tests: don’t skip if LONG_MAX < pid
[gnulib.git] / ChangeLog
blob02edd93ac762ab6e69d858b2904ccaba3a79127a
1 2023-12-29  Paul Eggert  <eggert@cs.ucla.edu>
3         tests: don’t skip if LONG_MAX < pid
4         * modules/pthread_sigmask-tests, modules/sigprocmask-tests:
5         (Depends-on): Add inttypes.
6         * tests/test-pthread_sigmask1.c, tests/test-sigprocmask.c:
7         Include inttypes.h.
8         (main): Don’t skip test if pid exceeds LONG_MAX.
10         Omit no-longer-needed pragmas
11         * lib/anytostr.c, lib/poll.c, lib/regex.c:
12         Omit pragmas that should no longer be needed.
14         gnulib-common: suppress -Wtautological-constant-out-of-range-compare
15         * m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): Pass
16         -Wno-tautological-constant-out-of-range-compare to clang, as it’s
17         the warning is enabled by default and in portable code where type
18         ranges are platform dependent it is generally more trouble than
19         it’s worth.
21 2023-12-29  Simon Josefsson  <simon@josefsson.org>
23         announce-gen: Improve links.
24         * build-aux/announce-gen: Use https:// URLs.
26 2023-12-29  Bruno Haible  <bruno@clisp.org>
28         error: More clang -Winclude-next-absolute-path silencing.
29         * modules/error (Include): Suggest <error.h>, not "error.h".
30         * tests/test-error.c: Write #include <error.h>.
31         * tests/test-exclude.c: Likewise.
32         * tests/test-verror.c: Likewise.
33         * tests/test-xstrtol.c: Likewise.
35 2023-12-28  Paul Eggert  <eggert@cs.ucla.edu>
37         include_next: pacify clang -Winclude-next-absolute-path
38         Without this change, Ubuntu clang version 16.0.6 (15) issues
39         warnings like this: “In file included from xalloc-die.c:25:
40         ./error.h:28:3: warning: #include_next in file found relative to
41         primary source file or found by absolute path; will search from
42         start of include path [-Winclude-next-absolute-path]”.
43         And sure enough, each file includes itself rather than the
44         next include file and it’s only the subsidiary include that
45         gets around to including the next include file.
46         * lib/argmatch.c, lib/chdir-long.c, lib/clean-temp-simple.c:
47         * lib/clean-temp.c, lib/closein.c, lib/closeout.c, lib/copy-acl.c:
48         * lib/copy-file.c, lib/creat.c, lib/csharpcomp.c:
49         * lib/csharpexec.c, lib/error.c, lib/exclude.c, lib/execute.c:
50         * lib/faccessat.c, lib/fopen.c, lib/freopen.c, lib/getopt.c:
51         * lib/getopt1.c, lib/git-merge-changelog.c, lib/javacomp.c:
52         * lib/javaexec.c, lib/javaversion.c, lib/mkdir-p.c, lib/open.c:
53         * lib/openat-die.c, lib/openat.c, lib/os2-spawn.c:
54         * lib/pagealign_alloc.c, lib/pipe-filter-gi.c:
55         * lib/pipe-filter-ii.c, lib/same.c, lib/set-acl.c:
56         * lib/sigpipe-die.c, lib/spawn-pipe.c, lib/sys_socket.c, lib/truncate.c:
57         * lib/unistd.c, lib/verror.c, lib/wait-process.c, lib/wctype-h.c:
58         * lib/xalloc-die.c, lib/xfreopen.c, lib/xmemcoll.c, lib/xprintf.c:
59         * lib/xsetenv.c, lib/xstdopen.c, lib/xstrtol-error.c:
60         Use ‘#include <foo.h>’ instead of ‘#include "foo.h"’ if foo.h
61         possibly uses #include_next.  (However, don’t do this on OSF/1
62         which has its own problems.)
64         stat-time: fix macOS bug with negative file times
65         macOS has a bug similar (but not identical) to Solaris when
66         file timestamps are negative: tv_nsec might go negative.
67         Problem reported on Darwin 8.11.0 for GNU Tar by Gordon Steemson in:
68         https://lists.gnu.org/r/bug-tar/2023-12/msg00001.html
69         This was evidently Mac OS X 10.4.11; I reproduced it on
70         Darwin 21.6.0 (macOS 12.5).
71         * lib/stat-time.h (STAT_TIMESPEC_OFFSETOF): New macro.
72         (stat_time_normalize): Also normalize timestamps on macOS.
73         * m4/fstat.m4 (gl_FUNC_FSTAT):
74         * m4/fstatat.m4 (gl_FUNC_FSTATAT):
75         * m4/lstat.m4 (gl_FUNC_LSTAT):
76         * m4/stat.m4 (gl_FUNC_STAT):
77         Also replace on macOS.
79 2023-12-19  Bruno Haible  <bruno@clisp.org>
81         jit/cache: Fix compilation error on m68k, sparc, etc.
82         * lib/jit/cache.h: Include <stdint.h>.
83         * modules/jit/cache (Depends-on): Add stdint.
85 2023-12-19  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
87         jit/cache tests: Make more portable.
88         * tests/jit/test-cache.c (CODE): New macro.
89         (struct func): New type.
90         (main): Initialize f more carefully.
91         * modules/jit/cache-tests (Depends-on): Add host-cpu-c-abi.
93 2023-12-19  Christian Göttsche  <cgzones@googlemail.com>
95         selinux-h: add stubs and wrappers for raw counterparts
96         Add stubs and wrappers of already covered libselinux interfaces for
97         their `raw` counterparts.  These counterparts perform the same
98         operation except for context translation.  Context translation is used
99         to convert SELinux labels to human readable form, see mcstransd(8).
100         * lib/se-selinux.in.h: Add declarations for raw variants.
101         * lib/se-label.in.h: Likewise.
102         * lib/getfilecon.c: Add wrappers for problematic raw variants.
103         * m4/selinux-selinux-h.m4: Use wrappers for problematic raw variants.
105 2023-12-14  Paul Eggert  <eggert@cs.ucla.edu>
107         mcel-tests: fix thinko in test
108         * tests/test-mcel.c (main): Fix typo in mcel_scanz test.
109         Problem reported by Bruno Haible in:
110         https://lists.gnu.org/r/bug-gnulib/2023-12/msg00034.html
112 2023-12-11  Paul Eggert  <eggert@cs.ucla.edu>
114         savedir: scale better when sorting by name
115         * lib/savedir.c: Include attribute.h.
116         (direntry_t): The ‘name’ member is now idx_t, not char *,
117         so that it survives name_space relocation.
118         (direntry_cmp_name, direntry_cmp_inode, comparison_function):
119         Adjust to qsort_r API, and to direntry_t layout change.
120         (streamsavedir): Redo to avoid need for xstrdup on each directory
121         entry.  Instead, copy the string data into name_space; this
122         typically scales better as the memory allocator is called O(log N)
123         rather than O(N) times.  Use qsort_r so that name_space can be
124         passed to the comparison functions.  Simplify calls to ‘free’ so
125         that lack of leakage is more obvious.
126         * modules/savedir (Depends-on): Add attribute, qsort_r.
128         getopt: pacify gcc -Wanalyzer-null-dereference
129         * lib/getopt.c (process_long_option): Simplify logic slightly.
130         This pacifies gcc -flto -Wanalyzer-null-dereference when compiling
131         GNU tar on x86-64 with gcc 13.2.1 20231205 (Red Hat 13.2.1-6).
133 2023-12-10  Pádraig Brady  <P@draigBrady.com>
135         bootstrap: fix option propagation with --bootstrap-sync
136         * top/bootstrap: Ensure options are propagated through
137         upgrade_bootstrap().
138         * top/bootstrap-funclib.sh: Likewise.
139         * build-aux/bootstrap: Auto generated with `make build-aux/bootstrap`.
140         Fixes https://bugs.gnu.org/67731
142 2023-12-01  Paul Eggert  <eggert@cs.ucla.edu>
144         frexp, frexpf: pacify clang re address-of-volatile
145         Problem reported by Sam James in:
146         https://lists.gnu.org/r/bug-gnulib/2023-12/msg00013.html
147         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Don’t try to convert
148         ‘double volatile *’ to ‘void const *’ as the C standard
149         doesn’t allow accessing volatile variables through
150         pointer-to-nonvolatile.
151         * m4/frexpf.m4 (gl_FUNC_FREXPF_WORKS): Likewise.
153         Update portability doc for CHERI, C23
154         * doc/gnulib-readme.texi:
155         Prefer “null pointer” to “@code{NULL}” since C23 has nullptr.
156         (Portability guidelines): Mention C99 instead of C89 for what
157         Gnulib assumes of headers.
158         (C99 features avoided): Mention CHERI issue with intptr_t etc.
159         (Other portability assumptions): Say that C23 requires two’s
160         complement.  Mention CHERI’s holes.
162 2023-12-01  Bruno Haible  <bruno@clisp.org>
164         obstack: Avoid undefined behaviour.
165         Reported by Alexey Palienko <Alexey.Palienko@cma.se> in
166         <https://lists.gnu.org/archive/html/bug-m4/2023-02/msg00000.html>.
167         * lib/obstack.in.h: Include <stdint.h>.
168         (__BPTR_ALIGN): Remove macro.
169         (__PTR_ALIGN): For the optimized case, compute the alignment through
170         uintptr_t, instead of computing NULL + something.
172 2023-12-01  Bruno Haible  <bruno@clisp.org>
174         doc: Update for FreeBSD 14.0.
175         * doc/posix-headers/*.texi: Update.
176         * doc/glibc-headers/*.texi: Likewise.
177         * doc/posix-functions/*.texi: Likewise.
178         * doc/pastposix-functions/*.texi: Likewise.
179         * doc/glibc-functions/*.texi: Likewise.
180         * m4/printf.m4: Update comments.
182 2023-12-01  Bruno Haible  <bruno@clisp.org>
184         sethostname tests: Fix a compilation error on FreeBSD 14.0.
185         * tests/test-sethostname1.c: Skip the SIGNATURE_CHECK on some platforms.
186         * doc/glibc-functions/sethostname.texi: Update platforms list.
188 2023-11-27  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
190         stack: Fix documentation in header file.
191         * lib/stack.h: Correct documentation on `stack_current_base'.
193 2023-11-27  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
195         jit/cache-tests: Fix include guard.
196         * tests/jit/test-cache.c (main): Extend range of include guard.
198 2023-11-25  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
200         jit/cache-tests: New module.
201         * tests/jit/test-cache.c: New file.
202         * modules/jit/cache-tests: New file.  Mark the test as unportable
203         for now.
205 2023-11-25  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
207         jit/cache: Fix configure error.
208         * m4/valgrind-helper.m4: Unconditionally set support_valgrind.
210 2023-11-24  Bruno Haible  <bruno@clisp.org>
212         floorf, ceilf tests: Strengthen against compiler optimizations.
213         Reported by René Rebe <rene@t2-project.org>.
214         * tests/test-floorf1.c (main): Mark my_floorf as 'volatile'.
215         * tests/test-floorf-ieee.c (main): Likewise.
216         * tests/test-ceilf1.c (main): Mark my_ceilf as 'volatile'.
217         * tests/test-ceilf-ieee.c (main): Likewise.
219 2023-11-21  Bruno Haible  <bruno@clisp.org>
221         strerrorname_np: Work around glibc bug on HPPA systems.
222         * m4/strerrorname_np.m4 (gl_FUNC_STRERRORNAME_NP): Test also
223         strerrorname_np (ENOSYM).
224         * lib/strerrorname_np.c (strerrorname_np): Update comments.
225         * tests/test-strerrorname_np.c (main): Likewise.
226         * doc/glibc-functions/strerrorname_np.texi: Mention that glibc 2.37
227         still needs a workaround.
229 2023-11-21  Bruno Haible  <bruno@clisp.org>
231         rand: Use the usual patterns for overriding a function.
232         * lib/stdlib.in.h (RAND_MAX): Override also if module 'rand' is present.
233         (rand): New declaration.
234         * m4/stdlib_h.m4 (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize GNULIB_RAND.
235         (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_RAND.
236         * modules/stdlib (Makefile.am): Substitute GNULIB_RAND and REPLACE_RAND.
238 2023-11-18  Bruno Haible  <bruno@clisp.org>
240         nan, snan tests: Don't include these tests by default.
241         * modules/nan-tests (Status): Mark the test as unportable.
242         * modules/snan-tests (Status): Likewise.
244 2023-11-17  Bruno Haible  <bruno@clisp.org>
246         realloc-gnu: Fix wrong configure test result with optimizing ibm-clang.
247         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Use 'volatile', to defeat an
248         ibm-clang optimization.
249         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Likewise.
251 2023-11-17  Bruno Haible  <bruno@clisp.org>
253         mbrtowc, mbrtoc32, nl_langinfo, setlocale-null: Obey --disable-threads.
254         Reported by David Edelsohn <dje.gcc@gmail.com> in
255         <https://gcc.gnu.org/pipermail/gcc-patches/2023-November/636830.html>,
256         <https://gcc.gnu.org/pipermail/gcc-patches/2023-November/636843.html>.
257         * m4/threadlib.m4 (gl_THREADLIB_BODY): If --disable-threads was
258         specified, define AVOID_ANY_THREADS to 1.
259         * lib/mbtowc-lock.c: Omit all code if --disable-threads was specified.
260         * lib/nl_langinfo-lock.c: Likewise.
261         * lib/setlocale-lock.c: Likewise.
262         * lib/mbtowc-lock.h: Omit locking code if --disable-threads was
263         specified.
264         * lib/nl_langinfo.c: Likewise.
265         * lib/setlocale_null.c: Likewise.
266         * lib/mbrtowc.c: Don't include any multithreading headers if
267         --disable-threads was specified.
268         * lib/mbrtoc32.c: Likewise.
270 2023-11-17  Bruno Haible  <bruno@clisp.org>
272         gettext: Recognize a statically built libintl on macOS and AIX.
273         Reported by David Edelsohn <dje.gcc@gmail.com> in
274         <https://gcc.gnu.org/pipermail/gcc-patches/2023-November/636558.html>.
275         * m4/gettext.m4 (AM_GNU_GETTEXT): In the
276         "checking for GNU gettext in libintl..." test, add also the special
277         system library dependencies needed on macOS and AIX.
279 2023-11-16  Bruno Haible  <bruno@clisp.org>
281         boot-time: Make it work on Adélie Linux.
282         * lib/boot-time.c (get_boot_time_uncached): Invoke Linux fallbacks also
283         on Linux systems that have neither <utmp.h> nor <utmpx.h>.
285 2023-11-15  Bruno Haible  <bruno@clisp.org>
287         obstack: Modernize, fixing several problems.
288         * lib/obstack.in.h: Renamed from lib/obstack.h. Add reference to the
289         glibc documentation.
290         (_OBSTACK_INTERFACE_VERSION): Remove macro.
291         (_OBSTACK_SIZE_T, _CHUNK_SIZE_T, _OBSTACK_CAST): Mark old values with
292         _LIBC.
293         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
294         _obstack_memory_used, _obstack_allocated_p): Override if REPLACE_OBSTACK
295         is 1.
296         * lib/obstack.c: Don't include <gnu-versions.h>.
297         (_OBSTACK_ELIDE_CODE): Remove macro.
298         * m4/obstack.m4 (gl_FUNC_OBSTACK): Test whether obstack.h exists. Don't
299         define HAVE_OBSTACK any more. Set HAVE_OBSTACK, REPLACE_OBSTACK,
300         GL_GENERATE_OBSTACK_H.
301         * modules/obstack (Files): Remove obstack.h. Add obstack.in.h.
302         (Depends-on): Add gen-header. Add conditions.
303         (configure.ac): Consider HAVE_OBSTACK, REPLACE_OBSTACK. Invoke
304         gl_CONDITIONAL_HEADER and AC_PROG_MKDIR_P.
305         (Makefile.am): Generate obstack.h. Augment BUILT_SOURCES and
306         MOSTLYCLEANFILES.
308 2023-11-15  Paul Eggert  <eggert@cs.ucla.edu>
310         striconveha: pacify gcc -Wcast-align
311         * lib/striconveha.c (uniconv_register_autodetect): Rewrite to
312         avoid the need to cast from char * to a pointer to a more strictly
313         aligned type.  Use decls after statements to avoid some repetition.
315 2023-11-14  Bruno Haible  <bruno@clisp.org>
317         doc: Mention a 'random' limitation on OpenBSD.
318         Reported by Corinna Vinschen <vinschen@redhat.com>.
319         * doc/posix-functions/random.texi: Mention the OpenBSD limitation.
321 2023-11-14  Bruno Haible  <bruno@clisp.org>
323         rand: Mark as obsolete.
324         * modules/rand (Status, Notice): New sections.
326 2023-11-14  Bruno Haible  <bruno@clisp.org>
328         *printf-posix: Revert expectations of %lc of 0.
329         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LC): Expect a NUL byte in the
330         output.
331         * lib/vasnprintf.c (VASNPRINTF): In the %lc implementation, don't
332         special-case the NUL wide character.
333         * tests/test-vasnprintf-posix.c (test_function): Change expected result
334         for %lc of L'\0'.
335         * tests/test-vasprintf-posix.c (test_function): Likewise.
336         * tests/test-snprintf-posix.h (test_function): Likewise.
337         * tests/test-sprintf-posix.h (test_function): Likewise.
338         * doc/posix-functions/dprintf.texi: Update platform list regarding %lc
339         of 0 bug.
340         * doc/posix-functions/fprintf.texi: Likewise.
341         * doc/posix-functions/printf.texi: Likewise.
342         * doc/posix-functions/snprintf.texi: Likewise.
343         * doc/posix-functions/sprintf.texi: Likewise.
344         * doc/posix-functions/vdprintf.texi: Likewise.
345         * doc/posix-functions/vfprintf.texi: Likewise.
346         * doc/posix-functions/vprintf.texi: Likewise.
347         * doc/posix-functions/vsnprintf.texi: Likewise.
348         * doc/posix-functions/vsprintf.texi: Likewise.
349         * doc/glibc-functions/asprintf.texi: Likewise.
350         * doc/glibc-functions/vasprintf.texi: Likewise.
351         * doc/glibc-functions/obstack_printf.texi: Likewise.
352         * doc/glibc-functions/obstack_vprintf.texi: Likewise.
354 2023-11-13  Bruno Haible  <bruno@clisp.org>
356         doc: Add a note.
357         * doc/posix-headers/stdatomic.texi: Add a note about the memory model.
359 2023-11-13  Bruno Haible  <bruno@clisp.org>
361         Don't use CHERI facilities with CC="clang -march=morello".
362         Suggested by Jessica Clarke <jrtc27@jrtc27.com> in
363         <https://lists.gnu.org/archive/html/bug-gnulib/2023-11/msg00116.html>.
364         * lib/alignalloc.h (alignalloc): Test __CHERI_PURE_CAPABILITY__, not
365         __CHERI__.
366         * lib/eealloc.h (eemalloc, eerealloc): Likewise.
367         * lib/ialloc.h (irealloc, ireallocarray): Likewise.
368         * lib/malloca.h (malloca): Likewise.
369         * lib/malloca.c (small_t, mmalloca, freea): Likewise.
370         * lib/rawmemchr.c (rawmemchr): Likewise.
371         * lib/safe-alloc.h (safe_alloc_realloc_n): Likewise.
372         * lib/sigsegv.c (SIGSEGV_FAULT_STACKPOINTER): Likewise.
373         * lib/ssfmalloc.h (struct dissected_page_header, init_small_block_page,
374         init_medium_block_page, free_block_from_pool, allocate_block): Likewise.
375         * tests/test-stdint.c: Likewise.
377 2023-11-13  Bruno Haible  <bruno@clisp.org>
379         jit/cache: Fix configure test.
380         * m4/valgrind-helper.m4 (gl_VALGRIND_HELPER): Check already at configure
381         time whether <valgrind/valgrind.h> exists. Fix AC_DEFINE_UNQUOTED
382         invocation.
384 2023-11-12  Paul Eggert  <eggert@cs.ucla.edu>
386         rawmemchr: speed up, particularly on CHERI
387         * lib/rawmemchr.c (rawmemchr) [__CHERI__]: Use memchr instead of
388         one-byte reads.  This sped up a simple benchmark (rawmemchr on
389         100,000 bytes) by 6x on a Research Morello SoC r0p0 on CheriBSD 14.
390         [!__CHERI__]: Use sizeof, not alignof, as better alignment
391         should help performance a bit on some platforms.
392         * modules/rawmemchr (Depends-on): Remove alignasof.
394 2023-11-12  Bruno Haible  <bruno@clisp.org>
396         jit/cache: New module.
397         * lib/jit/cache.h: New file.
398         * m4/valgrind-helper.m4: New file.
399         * modules/jit/cache: New file.
401 2023-11-11  Bruno Haible  <bruno@clisp.org>
403         ssfmalloc: Take advantage of CHERI bounds-checking.
404         * lib/ssfmalloc.h: Include <cheri.h>.
405         (struct dissected_page_header) [CHERI]: Add field 'whole_page'.
406         (init_small_block_page, init_medium_block_page) [CHERI]: Initialize it.
407         (free_block_from_pool) [CHERI]: Use this field to initialize
408         pool->freeable_page.
409         (allocate_block) [CHERI]: Return a pointer with a tight upper bound.
411 2023-11-11  Johannes Schindelin  <johannes.schindelin@gmx.de>
413         vasnprintf: Re-enable parsing of directive with I64 (regr. 2023-03-24).
414         * lib/printf-parse.c (PRINTF_PARSE): When parsing a size specifier
415         "I64", increment cp by 3, not 1.
417 2023-11-11  Bruno Haible  <bruno@clisp.org>
419         malloca: Take advantage of CHERI bounds-checking.
420         * lib/malloca.h: Include <cheri.h>.
421         (malloca) [CHERI]: In the stack-allocation case, return a pointer with
422         a tight lower bound and a tight upper bound.
423         * lib/malloca.c: Include <cheri.h>.
424         (small_t) [CHERI]: Define as uintptr_t.
425         (mmalloca) [CHERI]: Return a pointer with a tight upper bound.
426         (freea) [CHERI]: Update.
428 2023-11-11  Bruno Haible  <bruno@clisp.org>
430         safe-alloc: Take advantage of CHERI bounds-checking.
431         * lib/safe-alloc.h: Include <cheri.h>.
432         (safe_alloc_realloc_n): When count or size is 0, return a pointer whose
433         bounds are of size 0, not 1.
435 2023-11-11  Bruno Haible  <bruno@clisp.org>
437         ialloc: Take advantage of CHERI bounds-checking.
438         * lib/ialloc.h: Include <cheri.h>.
439         (irealloc): When s is 0, return a pointer whose bounds are of size 0,
440         not 1.
441         (ireallocarray): When n or s is 0, return a pointer whose bounds are of
442         size 0, not 1.
444 2023-11-11  Bruno Haible  <bruno@clisp.org>
446         eealloc: Take advantage of CHERI bounds-checking.
447         * lib/eealloc.h: Include <cheri.h>.
448         (eemalloc): When n is 0, return a pointer whose bounds are of size 0,
449         not 1.
450         (eerealloc): Likewise.
452 2023-11-11  Bruno Haible  <bruno@clisp.org>
454         alignalloc: Take advantage of CHERI bounds-checking.
455         * lib/alignalloc.h: Include <cheri.h>.
456         (alignalloc): When size is 0, return a pointer whose bounds are of
457         size 0, not 1.
459 2023-11-11  Bruno Haible  <bruno@clisp.org>
461         rawmemchr tests: Add test case for last commit.
462         * tests/test-rawmemchr.c (main): Add test case for aligned oversized
463         read.
465 2023-11-11  Paul Eggert  <eggert@cs.ucla.edu>
467         rawmemchr: port better to CHERI
468         * lib/rawmemchr.c (rawmemchr): Use unsigned char for longword,
469         since CHERI doesn’t allow the aligned-word trick to speed up
470         performance.
472 2023-11-10  Paul Eggert  <eggert@cs.ucla.edu>
474         di-set: port better to CHERI-64
475         * lib/di-set.c: Include stdint.h.
476         (hashint): Make it uintptr_t, not size_t, since it’s for use
477         when converting to pointer and back again.  This suppresses
478         a false positive on CHERI-64.
479         * modules/di-set (Depends-on): Add stdint.
481         stdio: fix port to older macOS
482         * lib/stdio.in.h: It’s pre macOS 13, not pre macOS 10.13.
483         Problem reported by Sevan Janiyan in:
484         https://lists.gnu.org/r/bug-gnulib/2023-11/msg00066.html
485         et seq.
487 2023-11-10  Bruno Haible  <bruno@clisp.org>
489         doc: Mention rand and srand limitations.
490         * doc/posix-functions/rand.texi: Mention multithread-safety problem.
491         * doc/posix-functions/srand.texi: Mention a Cygwin bug.
493 2023-11-10  Bruno Haible  <bruno@clisp.org>
495         tests: In multithreaded tests, use random() instead of rand().
496         * tests/test-asyncsafe-spin2.c (random_account, lock_mutator_thread):
497         Use random() instead of rand().
498         * tests/test-lock.c (random_account, lock_mutator_thread,
499         rwlock_mutator_thread, recshuffle): Likewise.
500         * tests/test-mtx.c (random_account, lock_mutator_thread, recshuffle):
501         Likewise.
502         * tests/test-pthread-mutex.c (random_account, lock_mutator_thread,
503         recshuffle): Likewise.
504         * tests/test-pthread-rwlock.c (random_account, rwlock_mutator_thread):
505         Likewise.
506         * tests/test-pthread-spin.c (random_account, lock_mutator_thread):
507         Likewise.
508         * tests/test-pthread-tss.c (perhaps_yield, worker_thread,
509         racecheck_thread): Likewise.
510         * tests/test-thread_local.c (perhaps_yield, worker_thread): Likewise.
511         * tests/test-tls.c (perhaps_yield, worker_thread, racecheck_thread):
512         Likewise.
513         * tests/test-tss.c (perhaps_yield, worker_thread, racecheck_thread):
514         Likewise.
515         * asyncsafe-spin-tests (Depends-on): Add random.
516         * lock-tests (Depends-on): Likewise.
517         * mtx-tests (Depends-on): Likewise.
518         * pthread-mutex-tests (Depends-on): Likewise.
519         * pthread-rwlock-tests (Depends-on): Likewise.
520         * pthread-spin-tests (Depends-on): Likewise.
521         * pthread-tss-tests (Depends-on): Likewise.
522         * threads-h-tests (Depends-on): Likewise.
523         * tls-tests (Depends-on): Likewise.
524         * tss-tests (Depends-on): Likewise.
526 2023-11-10  Bruno Haible  <bruno@clisp.org>
528         doc: Mention an srandom limitation on OpenBSD.
529         * doc/posix-functions/srandom.texi: Mention the OpenBSD limitation.
531 2023-11-10  Bruno Haible  <bruno@clisp.org>
533         random tests: Add multithread-safety test.
534         * tests/test-random-mt.c: New file.
535         * modules/random-tests (Files): Add it.
536         (Depends-on): Add xalloc, thread, yield.
537         (Makefile.am): Also build and test test-random-mt.
539         random: Fix multithread-safety bug in general.
540         * m4/random.m4 (gl_FUNC_RANDOM): Override also macOS, FreeBSD, Solaris,
541         Cygwin, Haiku.
542         * doc/posix-functions/random.texi: Mention the wider scope of the
543         multithread-safety bug.
545 2023-11-09  Bruno Haible  <bruno@clisp.org>
547         sigsegv: Improve port to CHERI.
548         * lib/sigsegv.c (SIGSEGV_FAULT_STACKPOINTER): Define also on CheriBSD.
550         sigsegv: Port to CHERI.
551         * lib/sigsegv.c: Treat __aarch64__ like __arm64__.
552         (SIGSEGV_FOR_ALL_SIGNALS): Treat SIGPROT like SIGSEGV and SIGBUS.
554 2023-11-09  Paul Eggert  <eggert@cs.ucla.edu>
556         stdio: port better to older macOS
557         * lib/stdio.in.h: Do not define _POSIX_C_SOURCE on older macOS,
558         as it is not needed and defining it causes other problems.
559         Problem reported by Sevan Janiyan in:
560         https://mail.gnu.org/r/bug-gnulib/2023-11/msg00039.html
562 2023-11-09  Bruno Haible  <bruno@clisp.org>
564         rand: Add tests.
565         * tests/test-rand.c: New file.
566         * modules/rand-tests: New file.
568         rand: New module.
569         * lib/rand.c: New file, based on glibc/stdlib/rand.c.
570         * m4/rand.m4: New file.
571         * modules/rand: New file.
572         * doc/posix-functions/rand.texi: Mention the new module.
574 2023-11-09  Bruno Haible  <bruno@clisp.org>
576         random: Fix multithread-safety bug on CheriBSD.
577         * m4/random.m4 (gl_FUNC_RANDOM): Override on CheriBSD.
578         * lib/random.c: Include glthread/lock.h.
579         (__libc_lock_define_initialized, __libc_lock_lock, __libc_lock_unlock):
580         Define to do real locking.
581         * modules/random (Depends-on): Add lock.
582         * doc/posix-functions/random.texi: Mention the multithread-safety
583         problem.
585 2023-11-09  Bruno Haible  <bruno@clisp.org>
587         host-cpu-c-abi: Port to CHERI.
588         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI_32BIT): Treat aarch64c like
589         aarch64.
591 2023-11-08  Bruno Haible  <bruno@clisp.org>
593         pthread-rwlock: Port to Mac OS X 10.4.
594         Reported by Sevan Janiyan <venture37@geeklan.co.uk>.
595         * m4/pthread-rwlock.m4 (gl_PTHREAD_RWLOCK): On macOS, test for the
596         presence of PTHREAD_RWLOCK_INITIALIZER. If it is not defined, don't
597         attempt to use pthread_rwlock_init.
599 2023-11-07  Bruno Haible  <bruno@clisp.org>
601         fenv-environment tests: Add a test of the link dependencies.
602         * tests/test-fenv-env-6.c: Renamed from tests/test-fenv-env-5.c.
603         * tests/test-fenv-env-5.c: Renamed from tests/test-fenv-env-4.c.
604         * tests/test-fenv-env-4.c: Renamed from tests/test-fenv-env-3.c.
605         * tests/test-fenv-env-3.c: Renamed from tests/test-fenv-env-2.c.
606         * tests/test-fenv-env-2.c: Renamed from tests/test-fenv-env-1.c.
607         * tests/test-fenv-env-1.c: New file.
608         * tests/test-fenv-env-6.sh: Renamed from tests/test-fenv-env-5.sh. Update.
609         * modules/fenv-environment-tests: Update. Add test-fenv-env-1 unit test.
611 2023-11-07  Bruno Haible  <bruno@clisp.org>
613         fenv-exceptions-state-c99 tests: Add a test of the link dependencies.
614         * tests/test-fenv-except-state-4.c: Renamed from
615         tests/test-fenv-except-state-3.c.
616         * tests/test-fenv-except-state-3.c: Renamed from
617         tests/test-fenv-except-state-2.c.
618         * tests/test-fenv-except-state-2.c: Renamed from
619         tests/test-fenv-except-state-1.c.
620         * tests/test-fenv-except-state-1.c: New file.
621         * modules/fenv-exceptions-state-c23-tests: Update.
622         * modules/fenv-exceptions-state-c99-tests: Update. Add
623         test-fenv-except-state-1 unit test.
625 2023-11-07  Bruno Haible  <bruno@clisp.org>
627         fenv-exceptions-trapping tests: Comments.
628         * tests/test-fenv-except-trapping-1.c (main): Add a comment.
630 2023-11-07  Paul Eggert  <eggert@cs.ucla.edu>
632         malloca: pacify -Wcheri-provenance
633         This shouldn’t affect generated code when optimizing.
634         * lib/malloca.c (mmalloca): Pacify -Wcheri-provenance on CHERI-64 cc.
635         (freea): Assign to temporaries to simplify debugging and avoid casts.
637 2023-11-07  Bruno Haible  <bruno@clisp.org>
639         rawmemchr: Port to CHERI.
640         * lib/rawmemchr.c (rawmemchr): Use 'unsigned long' instead of uintptr_t.
642 2023-11-06  Paul Eggert  <eggert@cs.ucla.edu>
644         stdint: port intptr_t to CHERI
645         * lib/stdint.in.h: Do not redefine intptr_t/uintptr_t
646         if __INTPTR_WIDTH__ says otherwise.  This is needed on CHERI.
648         stdint-tests: port to CHERI etc
649         * tests/test-stdint.c: Test intptr_t only if INTPTR_MAX is
650         defined, since the type is optional.  Similarly for uintptr_t.
651         If CHERI, don’t assume TYPE_MINIMUM and TYPE_MAXIMUM works on
652         intptr_t, and similarly for TYPE_MAXIMUM and uintptr_t.
654         posix_memalign-tests: port to CHERI-64
655         * tests/test-posix_memalign.c (main):
656         Don’t assume sizeof (void *) <= 8.
658         mcel-tests: fix read overrun in test case
659         * tests/test-mcel.c (main): Don’t overrun test input buffer.
660         Problem reported by Bruno Haible; found on CHERI-64.
662 2023-11-06  Bruno Haible  <bruno@clisp.org>
664         fenv-exceptions-tracking-c99 tests: Fix typo.
665         Found by coverity.
666         * tests/test-fenv-except-tracking-1.c (main): Write & ~, not & !.
668 2023-11-06  Bruno Haible  <bruno@clisp.org>
670         snan: Avoid test failures on OpenBSD/mips64.
671         * tests/test-snan-1.c (main): Skip the 'long double' test on
672         OpenBSD/mips64.
673         * tests/test-snan-2.c (main): Likewise.
675         fenv-*: Avoid test failures on OpenBSD/mips64.
676         * tests/test-fenv-round.c (test_towardzero, test_upward, test_downward):
677         Skip the 'long double' tests on OpenBSD/mips64.
678         * tests/test-fenv-except-tracking-2.c (main): On OpenBSD/mips64, skip
679         the 'long double' test.
680         * tests/test-fenv-except-trapping-2.c (main): Skip the '4' tests and the
681         'long double' tests also on OpenBSD/mips64.
682         * doc/posix-functions/fesetround.texi: Mention OpenBSD/mips64 here too.
684         fenv-exceptions-tracking-c99: Fix test failures on OpenBSD/mips64.
685         * m4/fenv-exceptions-tracking.m4 (gl_FENV_EXCEPTIONS_TRACKING): On
686         OpenBSD/mips, set REPLACE_FECLEAREXCEPT to 1.
687         * doc/posix-functions/feclearexcept.texi: Mention the OpenBSD/mips64
688         bug.
689         * m4/fenv-exceptions-state.m4 (gl_FENV_EXCEPTIONS_STATE): No need to set
690         gl_cv_func_fesetexceptflag_works1 to 'no' on OpenBSD/mips.
692 2023-11-06  Bruno Haible  <bruno@clisp.org>
694         nan: Defeat clang's incorrect -O2 optimization on mips64.
695         * lib/nan.h (NaNf, NaNd, NaNl): Use 'volatile' to disable a clang
696         optimization.
698 2023-11-06  Bruno Haible  <bruno@clisp.org>
700         nan: Work around clang's incorrect constant-folding on mips64.
701         * lib/nan.h (NaNf, NaNd, NaNl): On mips platforms, avoid the compiler's
702         constant-folding for 0.0f/0.0f, 0.0/0.0, 0.0L/0.0L.
704 2023-11-06  Bruno Haible  <bruno@clisp.org>
706         snan: Add more info for mips-based platforms.
707         * m4/nan-mips.m4: New file.
708         * lib/snan.h: Add comments regarding mips.
709         * modules/snan (Files): Add m4/nan-mips.m4.
710         (configure.ac): Invoke gl_NAN_MIPS.
711         * m4/snan.m4: Update comment.
713 2023-11-06  Bruno Haible  <bruno@clisp.org>
715         fenv-exceptions-state-c99: Update doc regarding Minix.
716         * doc/posix-functions/fesetexceptflag.texi: Mention the Minix bug.
718 2023-11-05  Bruno Haible  <bruno@clisp.org>
720         fenv-exceptions-trapping: Avoid test failure on Minix.
721         * tests/test-fenv-except-trapping-2.c (main): Skip the '4' tests also on
722         Minix.
724         fenv-exceptions-tracking-c99: Fix test failures on Minix.
725         * m4/fenv-exceptions-tracking.m4 (gl_FENV_EXCEPTIONS_TRACKING): On
726         Minix, set REPLACE_FECLEAREXCEPT and REPLACE_FETESTEXCEPT to 1.
727         * doc/posix-functions/feclearexcept.texi: Mention the Minix bug.
728         * doc/posix-functions/fetestexcept.texi: Likewise.
730 2023-11-05  Bruno Haible  <bruno@clisp.org>
732         fenv-exceptions-trapping: Avoid test failure on Haiku/i386.
733         * tests/test-fenv-except-trapping-2.c (main): Skip the '4' tests also on
734         Haiku/i386.
736         fenv-exceptions-state: Fix test failure on Haiku/i386 and Haiku/x86_64.
737         * m4/fenv-exceptions-state.m4 (gl_FENV_EXCEPTIONS_STATE): Arrange to
738         override fesetexceptflag() on Haiku.
739         * doc/posix-functions/fesetexceptflag.texi: Mention the Haiku bug.
741 2023-11-05  Bruno Haible  <bruno@clisp.org>
743         fenv: Add C++ tests.
744         * tests/test-fenv-c++.cc: New file.
745         * modules/fenv-c++-tests: New file.
746         * modules/fenv-tests (Depends-on): Add it.
748 2023-11-05  Bruno Haible  <bruno@clisp.org>
750         fenv-environment: Add tests.
751         * tests/test-fenv-env-1.c: New file.
752         * tests/test-fenv-env-2.c: New file.
753         * tests/test-fenv-env-3.c: New file.
754         * tests/test-fenv-env-4.c: New file.
755         * tests/test-fenv-env-5.sh: New file.
756         * tests/test-fenv-env-5.c: New file.
757         * modules/fenv-environment-tests: New file.
759         fenv-environment: New module.
760         * lib/fenv.in.h (fenv_t) [hppa]: Remove the __exception field.
761         (FE_DFL_ENV): Override if <fenv.h> exists but HAVE_FE_DFL_ENV is not
762         defined.
763         (fegetenv, fesetenv, feupdateenv, feholdexcept): New declarations.
764         * lib/fenv-env.c: New file, based on glibc.
765         * lib/fenv-env-hold.c: New file.
766         * lib/fenv-env-update.c: New file.
767         * m4/fenv-environment.m4: New file.
768         * m4/mathfunc.m4 (gl_MATHFUNC): Handle also the 'fenv_t *' type.
769         * m4/fenv_h.m4 (gl_FENV_H_DEFAULTS): Initialize REPLACE_FEGETENV,
770         REPLACE_FEHOLDEXCEPT, REPLACE_FESETENV, REPLACE_FEUPDATEENV.
771         * modules/fenv (Makefile.am): Substitute REPLACE_FEGETENV,
772         REPLACE_FEHOLDEXCEPT, REPLACE_FESETENV, REPLACE_FEUPDATEENV.
773         * modules/fenv-environment: New file.
774         * doc/posix-functions/fegetenv.texi: Mention the new module and the bugs
775         on glibc, macOS, AIX.
776         * doc/posix-functions/feholdexcept.texi: Mention the new module and the
777         bugs on glibc, musl libc, FreeBSD, AIX, mingw, MSVC.
778         * doc/posix-functions/fesetenv.texi: Mention the new module and the bugs
779         on musl libc, FreeBSD, NetBSD, AIX, Solaris, Cygwin, mingw, MSVC.
780         * doc/posix-functions/feupdateenv.texi: Mention the new module and the
781         bugs on glibc, musl libc, macOS, FreeBSD, AIX, Solaris, mingw, MSVC.
783 2023-11-05  Bruno Haible  <bruno@clisp.org>
785         fenv-exceptions-tracking-c99 tests: Enhance tests.
786         * tests/test-fenv-except-tracking-3.sh: Test not only FE_INVALID, but
787         also FE_DIVBYZERO, FE_OVERFLOW, FE_UNDERFLOW, FE_INEXACT.
788         * tests/test-fenv-except-tracking-3.c: Include <stdlib.h>, <string.h>.
789         Don't include fpe-trapping.h. Assume HAVE_FPE_TRAPPING is 1.
790         (main): Receive the exception to test as first argument.
792 2023-11-05  Bruno Haible  <bruno@clisp.org>
794         fpe-trapping: Simplify.
795         * lib/fpe-trapping.h (sigfpe_on_invalid): Remove all platform specific
796         code. Just rely on feclearexcept and feenableexcept.
797         * m4/fpe-trapping.m4: Renamed from m4/fpe.m4.
798         (gl_FPE_TRAPPING): Greatly simplify.
799         * modules/fpe-trapping (Files): Use m4/fpe-trapping.m4 instead of
800         m4/fpe.m4. Remove m4/mathfunc.m4, m4/musl.m4.
801         (Depends-on): Add fenv-exceptions-trapping.
802         * tests/test-fenv-except-state-2.c (main): Update skip message.
803         * tests/test-fenv-except-tracking-2.c (main): Likewise.
804         * tests/test-fenv-except-tracking-3.c (main): Likewise.
805         * tests/test-fenv-except-tracking-5.c (main): Likewise.
806         * tests/test-nan-2.c (main): Likewise.
807         * tests/test-snan-2.c (main): Likewise.
809 2023-11-05  Bruno Haible  <bruno@clisp.org>
811         fpe-tracking: Remove module.
812         * modules/fpe-tracking: Remove file.
813         * m4/fpe.m4 (gl_FPE_TRACKING): Remove macro.
814         (gl_FPE_TRAPPING): Require gl_FENV_EXCEPTIONS_TRACKING instead of
815         gl_FPE_TRACKING. Use FENV_EXCEPTIONS_TRACKING_LIBM instead of
816         FPE_TRACKING_LIBM.
817         * modules/nan-tests (Depends-on): Add fenv-exceptions-tracking-c99.
818         Remove fpe-tracking.
819         (Makefile.am): Use FENV_EXCEPTIONS_TRACKING_LIBM instead of
820         FPE_TRACKING_LIBM.
821         * modules/snan-tests (Depends-on): Add fenv-exceptions-tracking-c99.
822         Remove fpe-tracking.
823         (Makefile.am): Use FENV_EXCEPTIONS_TRACKING_LIBM instead of
824         FPE_TRACKING_LIBM.
825         * tests/test-nan-1.c: Assume HAVE_FE_INVALID is 1.
826         * tests/test-snan-1.c: Likewise.
828 2023-11-05  Bruno Haible  <bruno@clisp.org>
830         fenv-exceptions-trapping: Avoid test failure on NetBSD/sparc.
831         * tests/test-fenv-except-trapping-2.c (main): Skip the 'long double'
832         tests also on NetBSD/sparc.
834 2023-11-05  Bruno Haible  <bruno@clisp.org>
836         fenv-exceptions-trapping: Update documentation.
837         * doc/glibc-functions/feenableexcept.texi: Document the Linux/hppa
838         problem.
840 2023-11-05  Bruno Haible  <bruno@clisp.org>
842         fenv-exceptions-trapping: Avoid test failure on older systems.
843         * tests/test-fenv-except-trapping-2.c (main): Skip the test also on x86
844         systems with gcc < 8.
846 2023-11-04  Bruno Haible  <bruno@clisp.org>
848         fenv-exceptions-trapping: Fix for powerpc* platforms.
849         * lib/fenv-except-trapping.c (feenableexcept, fedisableexcept)
850         [powerpc]: Use the correct bit mask for the trap bits.
851         * tests/test-fenv-except-trapping-2.c (main): Reenable the '9' tests on
852         powerpc platforms.
854 2023-11-04  Bruno Haible  <bruno@clisp.org>
856         fenv-exceptions-state-c99: Fix compilation error on FreeBSD.
857         * lib/fenv.in.h (fegetexceptflag, fesetexceptflag): On FreeBSD, use an
858         rpl_ prefix, to avoid a conflict with an inline definition in FreeBSD's
859         <fenv.h>.
861 2023-11-04  Bruno Haible  <bruno@clisp.org>
863         doc: Update info about Cygwin feraiseexcept bug.
864         * doc/posix-functions/feraiseexcept.texi: Update info regarding Cygwin.
866 2023-11-04  Bruno Haible  <bruno@clisp.org>
868         fenv-exceptions-tracking-c99 tests: Avoid test failure on NetBSD/sparc.
869         * tests/test-fenv-except-tracking-2.c (main): On NetBSD/sparc, skip the
870         'long double' test.
872 2023-11-04  Bruno Haible  <bruno@clisp.org>
874         fenv-exceptions-tracking-c99: Fix fetestexcept() override for AIX.
875         * lib/fenv-except-tracking-test.c (fetestexcept): On AIX, use
876         fp_read_flag() rather than the fpscr register.
878 2023-11-04  Bruno Haible  <bruno@clisp.org>
880         fenv-exceptions-tracking-c99: Work around a NetBSD/x86_64 bug.
881         * m4/fenv-exceptions-tracking.m4 (gl_FENV_EXCEPTIONS_TRACKING): On
882         NetBSD/x86_64, set REPLACE_FETESTEXCEPT to 1.
883         * doc/posix-functions/fetestexcept.texi: Document the NetBSD bug.
885 2023-11-04  Bruno Haible  <bruno@clisp.org>
887         fenv-rounding: Avoid a test failure on NetBSD/sparc64.
888         * tests/test-fenv-round.c (test_towardzero, test_upward, test_downward):
889         Skip the 'long double' tests on NetBSD/sparc64.
890         * doc/posix-functions/fesetround.texi: Mention the problem with
891         'long double' operations on some platforms.
893 2023-11-04  Bruno Haible  <bruno@clisp.org>
895         fenv-rounding: Improve code for MSVC.
896         * lib/fenv-round.c (fegetround) [MSVC]: Use the rounding direction from
897         the SSE unit. Don't assume stable values for FE_UPWARD and FE_DOWNWARD.
898         (fesetround) [MSVC]: Set the rounding direction only in the SSE unit.
899         Don't assume stable values for FE_UPWARD and FE_DOWNWARD.
901 2023-11-04  Bruno Haible  <bruno@clisp.org>
903         fenv-rounding et al.: Require AC_CANONICAL_HOST before accessing $host.
904         * m4/fenv-rounding.m4 (gl_FENV_ROUNDING): Require AC_CANONICAL_HOST.
905         * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Likewise.
906         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Likewise.
907         * m4/iswdigit.m4 (gl_FUNC_ISWDIGIT): Likewise.
908         * m4/iswpunct.m4 (gl_FUNC_ISWPUNCT): Likewise.
909         * m4/iswxdigit.m4 (gl_FUNC_ISWXDIGIT): Likewise.
910         * m4/strerrorname_np.m4 (gl_FUNC_STRERRORNAME_NP): Likewise.
911         * m4/strfmon_l.m4 (gl_FUNC_STRFMON_L): Likewise.
912         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
913         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Likewise.
914         * m4/wcscmp.m4 (gl_FUNC_WCSCMP): Likewise.
915         * m4/wcsncmp.m4 (gl_FUNC_WCSNCMP): Likewise.
917 2023-11-04  Bruno Haible  <bruno@clisp.org>
919         fenv: Document an ABI break on MSVC.
920         * doc/posix-headers/fenv.texi: Document why fegetround and fesetround
921         are seemingly broken on MSVC.
923 2023-10-31  Bruno Haible  <bruno@clisp.org>
925         fenv-exceptions-trapping: Add tests.
926         * tests/test-fenv-except-trapping-1.c: New file.
927         * tests/test-fenv-except-trapping-2.sh: New file.
928         * tests/test-fenv-except-trapping-2.c: New file.
929         * modules/fenv-exceptions-trapping-tests: New file.
931         fenv-exceptions-trapping: New module.
932         * lib/fenv.in.h (feenableexcept, fedisableexcept, fegetexcept): New
933         declarations.
934         * lib/fenv-except-trapping.c: New file, based on glibc.
935         * m4/fenv_h.m4 (gl_FENV_H): Test also whether fegetexcept is declared.
936         * m4/fenv-exceptions-trapping.m4: New file.
937         * modules/fenv-exceptions-trapping: New file.
938         * doc/glibc-functions/fegetexcept.texi: Mention the new module.
939         * doc/glibc-functions/fedisableexcept.texi: Likewise.
940         * doc/glibc-functions/feenableexcept.texi: Likewise. Mention the glibc,
941         macOS, FreeBSD bugs.
943 2023-10-30  Bruno Haible  <bruno@clisp.org>
945         fenv-exceptions-state-c99: Fix the x86_64 and i386 case.
946         * lib/fenv-except-state-set.c (fesetexceptflag): Make sure to restore
947         the exception trap bits in all cases.
949 2023-10-30  Bruno Haible  <bruno@clisp.org>
951         fenv-exceptions-state-c23: Add tests.
952         * tests/test-fenv-except-state-3.c: New file.
953         * modules/fenv-exceptions-state-c23-tests: New file.
955         fenv-exceptions-state-c23: New module.
956         * lib/fenv.in.h (fetestexceptflag): New declaration.
957         * lib/fenv-except-state-test.c: New file, based on glibc.
958         * m4/fenv-exceptions-state-c23.m4: New file.
959         * modules/fenv-exceptions-state-c23: New file.
960         * doc/posix-functions/fetestexceptflag.texi: Mention the new module.
962 2023-10-30  Bruno Haible  <bruno@clisp.org>
964         fenv-exceptions-state-c99: Add tests.
965         * tests/test-fenv-except-state-1.c: New file.
966         * tests/test-fenv-except-state-2.c: New file.
967         * modules/fenv-exceptions-state-c99-tests: New file.
969         fenv-exceptions-state-c99: New module.
970         * lib/fenv.in.h (fegetexceptflag, fesetexceptflag): New declarations.
971         * lib/fenv-except-state-get.c: New file, based on glibc.
972         * lib/fenv-except-state-set.c: New file, based on glibc.
973         * m4/mathfunc.m4 (gl_MATHFUNC): Handle also the 'fexcept_t *' type.
974         * m4/fenv-exceptions-state.m4: New file.
975         * modules/fenv-exceptions-state-c99: New file.
976         * doc/posix-functions/fegetexceptflag.texi: Mention the new module.
977         * doc/posix-functions/fesetexceptflag.texi: Mention the new module and
978         the glibc, musl libc, macOS, AIX, mingw bugs.
980 2023-10-30  Bruno Haible  <bruno@clisp.org>
982         fenv-exceptions-tracking-{c99,c23}: Fix the x86_64 and i386 case.
983         * lib/fenv-except-tracking-clear.c (feclearexcept): Make sure to restore
984         the exception trap bits in all cases.
985         * lib/fenv-except-tracking-raise.c (feraiseexcept): Likewise.
986         * lib/fenv-except-tracking-set.c (fesetexcept): Likewise.
988 2023-10-29  Bruno Haible  <bruno@clisp.org>
990         fenv-exceptions-tracking-c23: Add tests.
991         * tests/test-fenv-except-tracking-4.c: New file.
992         * tests/test-fenv-except-tracking-5.c: New file.
993         * modules/fenv-exceptions-tracking-c23-tests: New file.
995         fenv-exceptions-tracking-c23: New module.
996         * lib/fenv.in.h (fesetexcept): New declaration.
997         * lib/fenv-except-tracking-set.c: New file, based on glibc.
998         * lib/fenv-private.h (_GETMSR, _SETMSR, MSR_FP_EXC_MASK, PR_SET_FPEXC,
999         PR_FP_EXC_DISABLED, PR_FP_EXC_NONRECOV, PR_FP_EXC_ASYNC,
1000         PR_FP_EXC_PRECISE, prctl) [NetBSD/powerpc]: New macros.
1001         * m4/fenv-exceptions-tracking-c23.m4: New file.
1002         * modules/fenv-exceptions-tracking-c23: New file.
1003         * doc/posix-functions/fesetexcept.texi: Mention the new module and the
1004         glibc bugs.
1006 2023-10-28  Bruno Haible  <bruno@clisp.org>
1008         fenv-exceptions-tracking-c99: Fix feraiseexcept (FE_OVERFLOW) on MSVC.
1009         * lib/fenv-except-tracking-raise.c (feraiseexcept): Use the generic
1010         approach for all exceptions.
1012 2023-10-28  Bruno Haible  <bruno@clisp.org>
1014         fpe-trapping: Always clear the FE_INVALID exception flag first.
1015         * lib/fpe-trapping.h: Include <fenv.h> on all platforms.
1016         (sigfpe_on_invalid) [AIX, HP-UX, IRIX, Solaris] : Clear the FE_INVALID
1017         exception flag first.
1018         * modules/fpe-trapping (Depends-on): Add fenv-exceptions-tracking-c99.
1020 2023-10-28  Bruno Haible  <bruno@clisp.org>
1022         fenv-exceptions-tracking-c99: Add tests.
1023         * tests/test-fenv-except-tracking-1.c: New file.
1024         * tests/test-fenv-except-tracking-2.sh: New file.
1025         * tests/test-fenv-except-tracking-2.c: New file.
1026         * tests/test-fenv-except-tracking-3.sh: New file.
1027         * tests/test-fenv-except-tracking-3.c: New file.
1028         * modules/fenv-exceptions-tracking-c99-tests: New file.
1030         fenv-exceptions-tracking-c99: New module.
1031         * lib/fenv.in.h (feclearexcept, feraiseexcept, fetestexcept): New
1032         declarations.
1033         * lib/fenv-except-tracking-clear.c: New file, based on glibc.
1034         * lib/fenv-except-tracking-raise.c: New file, based on glibc.
1035         * lib/fenv-except-tracking-test.c: New file, based on glibc.
1036         * m4/fenv-exceptions-tracking.m4: New file.
1037         * m4/fenv-exceptions.m4: New file.
1038         * modules/fenv-exceptions-tracking-c99: New file.
1039         * doc/posix-functions/feclearexcept.texi: Mention the new module.
1040         * doc/posix-functions/fetestexcept.texi: Likewise.
1041         * doc/posix-functions/feraiseexcept.texi: Likewise. Mention the glibc
1042         and Cygwin bugs.
1044 2023-10-27  Bruno Haible  <bruno@clisp.org>
1046         fenv-rounding: Add tests.
1047         * tests/test-fenv-round.c: New file.
1048         * modules/fenv-rounding-tests: New file.
1050         fenv-rounding: New module.
1051         * lib/fenv.in.h (fegetround, fesetround): New declarations.
1052         * lib/fenv-private.h: New file, based on glibc.
1053         * lib/fenv-round.c: New file, based on glibc.
1054         * m4/mathfunc.m4 (gl_MATHFUNC): Handle also the type fp_rnd.
1055         * m4/fenv-rounding.m4: New file.
1056         * modules/fenv (Depends-on): Add snippet/c++defs.
1057         (Makefile.am): Substitute $(CXXDEFS_H) into fenv.h.
1058         * modules/fenv-rounding: New file.
1059         * doc/posix-functions/fegetround.texi: Mention the new module.
1060         * doc/posix-functions/fesetround.texi: Likewise.
1062 2023-10-27  Bruno Haible  <bruno@clisp.org>
1064         tests: Use C99 initializer syntax for memory_long_double.
1065         * tests/test-isfinite.c (test_isfinitel): Use '.word = ...' syntax when
1066         initializing memory_long_double variables.
1067         * tests/test-isinf.c (test_isinfl): Likewise.
1068         * tests/test-isnan.c (test_long_double): Likewise.
1069         * tests/test-snprintf-posix.h (test_function): Likewise.
1070         * tests/test-sprintf-posix.h (test_function): Likewise.
1071         * tests/test-vasnprintf-posix.c (test_function): Likewise.
1072         * tests/test-vasnwprintf-posix.c (test_function): Likewise.
1073         * tests/test-vasprintf-posix.c (test_function): Likewise.
1074         * modules/isfinite-tests (Depends-on): Add c99.
1075         * modules/isinf-tests (Depends-on): Likewise.
1076         * modules/isnan-tests (Depends-on): Likewise.
1077         * modules/isnanl-nolibm-tests (Depends-on): Likewise.
1078         * modules/isnanl-tests (Depends-on): Likewise.
1079         * modules/pipe-filter-gi-tests (Depends-on): Likewise.
1080         * modules/pipe-filter-ii-tests (Depends-on): Likewise.
1081         * modules/snprintf-posix-tests (Depends-on): Likewise.
1082         * modules/sprintf-posix-tests (Depends-on): Likewise.
1083         * modules/vasnprintf-posix-tests (Depends-on): Likewise.
1084         * modules/vasnwprintf-posix-tests (Depends-on): Likewise.
1085         * modules/vasprintf-posix-tests (Depends-on): Likewise.
1086         * modules/vsnprintf-posix-tests (Depends-on): Likewise.
1087         * modules/vsprintf-posix-tests (Depends-on): Likewise.
1089 2023-10-26  Pádraig Brady  <P@draigBrady.com>
1091         base32, base64: disallow non-canonical encodings
1092         * lib/base32.c: Check that discarded bits in the encoding are zero.
1093         * lib/base64.c: Likewise.
1094         * tests/test-base32.c: Add test cases.
1095         * tests/test-base64.c: Likewise.
1097 2023-10-26  Bruno Haible  <bruno@clisp.org>
1099         fenv: Add tests.
1100         * tests/test-fenv.c: New file.
1101         * modules/fenv-tests: New file.
1103         fenv: New module.
1104         * lib/fenv.in.h: New file, based on glibc.
1105         * m4/fenv_h.m4: New file.
1106         * modules/fenv: New file.
1107         * doc/posix-headers/fenv.texi: Mention the new module.
1109 2023-10-25  Paul Eggert  <eggert@cs.ucla.edu>
1111         base32: new function isubase32; also, tune.
1112         * lib/base32.c (BASE32_INLINE): Define.
1113         (base32_to_int): Rename from b32 and make it extern.  All uses changed.
1114         (uchar_in_range): Remove.  All uses removed.
1115         (isbase32, base32_decode_ctx_init):
1116         Move to lib/base32.h and make inline.
1117         * lib/base32.h: Ignore -Wtype-limits, so that we needn’t
1118         worry about uchar_in_range.
1119         (BASE32_INLINE): Define, and use _GL_INLINE_HEADER_BEGIN.
1120         (isubase32): New function, useful as it as a different signature.
1121         (isbase32): Define in terms of isubase32.
1122         * modules/base32 (Depends-on): Add extern-inline.
1124         base64: new function isubase64; also, tune.
1125         * lib/base64.c (BASE64_INLINE): Define.
1126         (base64_to_int): Rename from b64 and make it extern.  All uses changed.
1127         (uchar_in_range): Remove.  All uses removed.
1128         (isbase64, base64_decode_ctx_init):
1129         Move to lib/base64.h and make inline.
1130         * lib/base64.h: Ignore -Wtype-limits, so that we needn’t
1131         worry about uchar_in_range.
1132         (BASE64_INLINE): Define, and use _GL_INLINE_HEADER_BEGIN.
1133         (isubase64): New function, useful as it as a different signature.
1134         (isbase64): Define in terms of isubase64.
1135         * modules/base64 (Depends-on): Add extern-inline.
1137 2023-10-24  Paul Eggert  <eggert@cs.ucla.edu>
1139         tests/unistr/u16-chr-tests: pacify -Wcast-align
1140         * tests/unistr/test-chr.h (main): Redo types to pacify
1141         gcc -Wcast-align.
1143         isnanl-tests, stdio-tests: pacify GCC -Wshadow
1144         * tests/test-isnanl.h (NWORDS): Remove.
1145         (memory_long_double): Do not redefine in an inner scope.
1146         All uses changed to use the snan.h memory_long_double.
1147         * tests/test-stdio.c (NWORDS): Remove.
1148         (memory_long_double): Do not redefine in an inner scope.
1149         The snan.h memory_long_double is fine here.
1151         explicit_bzero-tests: pacify GCC 13.2.1
1152         * tests/test-explicit_bzero.c:
1153         * tests/test-memset_explicit.c:
1154         Ignore -Wdangling pointer.
1156 2023-10-22  Bruno Haible  <bruno@clisp.org>
1158         memset_explicit, explicit_bzero tests: Fix test failures with new gcc.
1159         Reported by Sam James <sam@gentoo.org> in
1160         <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111904>.
1161         Fix by Alexandre Oliva <aoliva@gcc.gnu.org>.
1162         * tests/test-memset_explicit.c (do_secret_stuff): Declare with
1163         attributes 'noclone' and 'noipa'.
1164         * tests/test-explicit_bzero.c (do_secret_stuff): Likewise.
1166 2023-10-15  Bruno Haible  <bruno@clisp.org>
1168         net_if tests: Fix gcc warning.
1169         * tests/test-net_if.c: Include <string.h>.
1171 2023-10-15  Bruno Haible  <bruno@clisp.org>
1173         mbspbrk: Fix gcc warning (regression 2023-09-26).
1174         * lib/mbspbrk.c (mbspbrk): Fix gcc warning in GNULIB_MCEL_PREFER mode.
1176 2023-10-15  Bruno Haible  <bruno@clisp.org>
1178         pthread-spin: Fix warnings on FreeBSD 5.2.1/i386.
1179         * lib/pthread.in.h (pthread_spinlock_t): Override if <pthread.h> defines
1180         pthread_spinlock_t but we need to approximate spinlocks with mutexes.
1181         * m4/pthread-spin.m4 (gl_PTHREAD_SPIN): When the pthread_spin_*
1182         functions are declared but don't exist, mark them as REPLACEd.
1184         pthread-spin: Fix link errors on FreeBSD 5.2.1/i386.
1185         * m4/pthread-spin.m4 (gl_PTHREAD_SPIN): Test not only whether
1186         <pthread.h> defines the pthread_spinlock_t type, but also whether the
1187         function pthread_spin_init is actually defined.
1189 2023-10-15  Bruno Haible  <bruno@clisp.org>
1191         pthread_mutex_timedlock: Fix link errors on FreeBSD 5.2.1/i386.
1192         * m4/pthread_mutex_timedlock.m4 (gl_FUNC_PTHREAD_MUTEX_TIMEDLOCK): Test
1193         not only whether pthread_mutex_timedlock is declared, but also whether
1194         it is actually defined.
1196 2023-10-15  Bruno Haible  <bruno@clisp.org>
1198         threadlib: Fix link errors on FreeBSD 5.2.1/i386.
1199         * m4/threadlib.m4 (gl_PTHREADLIB_BODY): When pthread_kill could not be
1200         found in -lpthread, try -lthr.
1202 2023-10-15  Bruno Haible  <bruno@clisp.org>
1204         lock: Make Autoconf macro more robust.
1205         * m4/pthread_rwlock_rdlock.m4 (gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER):
1206         Require gl_THREADLIB, not gl_THREADLIB_EARLY. Needed to get the value of
1207         LIBMULTITHREAD.
1209 2023-10-15  Bruno Haible  <bruno@clisp.org>
1211         totalorder-bench-tests: New module.
1212         * tests/bench-totalorder.c: New file, based on tests/test-totalorder.h.
1213         * modules/totalorder-bench-tests: New file.
1215 2023-10-15  Bruno Haible  <bruno@clisp.org>
1217         snan: Simplify a type.
1218         * lib/snan.h (memory_long_double): Put the 'value' field first.
1219         * tests/test-totalorder.h (main): No need for designated initializer
1220         syntax any more.
1222 2023-10-15  Bruno Haible  <bruno@clisp.org>
1224         vma-iter: Fix compilation error on FreeBSD 5.2.1.
1225         * lib/vma-iter.c [FreeBSD]: Include <sys/param.h>.
1227 2023-10-14  Bruno Haible  <bruno@clisp.org>
1229         totalorder*: Document glibc bug on SH4.
1230         * doc/posix-functions/totalorder.texi: Mention the glibc bug on SH4.
1231         * doc/posix-functions/totalorderf.texi: Likewise.
1232         * doc/posix-functions/totalorderl.texi: Likewise.
1234         totalorder*: Fix test failures on SH4.
1235         * lib/snan.h: Update comment.
1236         * lib/totalorderf.c (totalorderf): On sh4, invert bit 22 before
1237         comparing two NaNs.
1238         * lib/totalorder.c (totalorder): On sh4, invert bit 51 before comparing
1239         two NaNs.
1240         * lib/totalorderl.c (totalorderl): On sh4, invert bit 51 or 47 of the
1241         xhi, yhi parts before comparing two NaNs.
1243         totalorder*: Fix test failures on PA-RISC and MIPS CPUs.
1244         * lib/totalorderf.c (totalorderf): On hppa and mips, invert bit 22
1245         before comparing two NaNs.
1246         * lib/totalorder.c (totalorder): On hppa and mips, invert bit 51 before
1247         comparing two NaNs.
1248         * lib/totalorderl.c: Include <float.h>.
1249         (totalorderl): On hppa and mips, invert bit 51 or 47 of the xhi, yhi
1250         parts before comparing two NaNs.
1251         * modules/totalorderl (Depends-on): Add 'float'.
1253 2023-10-14  Bruno Haible  <bruno@clisp.org>
1255         totalorder* tests: Test also the signalling NaNs.
1256         * tests/test-totalorder.h: Include signed-snan.h.
1257         (main): Change the array initializer to contain memory_* objects rather
1258         than floating-point numbers. This is needed for i386 and x86_64 CPUs.
1259         * tests/test-totalorder.c (TOTALORDER_TYPE): Use memory_double.
1260         (TOTALORDER_HAVE_SNAN, TOTALORDER_POSITIVE_SNAN,
1261         TOTALORDER_NEGATIVE_SNAN): New macros.
1262         * tests/test-totalorderf.c (TOTALORDER_TYPE): Use memory_float.
1263         (TOTALORDER_HAVE_SNAN, TOTALORDER_POSITIVE_SNAN,
1264         TOTALORDER_NEGATIVE_SNAN): New macros.
1265         * tests/test-totalorderl.c (TOTALORDER_TYPE): Use memory_long_double.
1266         (TOTALORDER_HAVE_SNAN, TOTALORDER_POSITIVE_SNAN,
1267         TOTALORDER_NEGATIVE_SNAN): New macros.
1268         * modules/totalorder-tests (Depends-on): Add signed-snan.
1269         * modules/totalorderf-tests (Depends-on): Likewise.
1270         * modules/totalorderl-tests (Depends-on): Likewise.
1272 2023-10-14  Bruno Haible  <bruno@clisp.org>
1274         totalorder* tests: Make it easier to debug failures.
1275         * tests/test-totalorder.h: Include <stdio.h>.
1276         (main): Print array indices of all failures.
1278 2023-10-14  Bruno Haible  <bruno@clisp.org>
1280         totalorder* tests: Verify also the function signatures.
1281         * tests/test-totalorder.h: New file, based on tests/test-totalorder.c.
1282         * tests/test-totalorder.c: Check the signature. Include
1283         test-totalorder.h for the rest.
1284         * tests/test-totalorderf.c: Include <config.h>, <math.h>. Check the
1285         signature. Include test-totalorder.h instead of test-totalorder.c.
1286         * tests/test-totalorderl.c: Likewise.
1287         * modules/totalorder-tests (Files): Add test-totalorder.h, signature.h.
1288         * modules/totalorderf-tests (Files): Add test-totalorder.h, signature.h.
1289         Remove test-totalorder.c.
1290         * modules/totalorderl-tests (Files): Likewise.
1292 2023-10-14  Bruno Haible  <bruno@clisp.org>
1294         totalorder*: Improve documentation.
1295         * doc/posix-functions/totalorder.texi: Reference the specification.
1296         * doc/posix-functions/totalorderf.texi: Likewise.
1297         * doc/posix-functions/totalorderl.texi: Likewise.
1299 2023-10-14  Bruno Haible  <bruno@clisp.org>
1301         snan, signed-snan: Add API that works also on x86 and x86_64 CPUs.
1302         * lib/snan.h (memory_float, memory_double, memory_long_double): New
1303         types.
1304         (construct_memory_SNaNf, memory_SNaNf, construct_memory_SNaNd,
1305         memory_SNaNd, construct_memory_SNaNl, memory_SNaNl): New functions.
1306         * lib/signed-snan.h (memory_positive_SNaNf, memory_negative_SNaNf,
1307         memory_positive_SNaNd, memory_negative_SNaNd, memory_positive_SNaNl,
1308         memory_negative_SNaNl): New functions.
1310 2023-10-14  Bruno Haible  <bruno@clisp.org>
1312         snan tests: Fix "unused variable" warnings on i386.
1313         * tests/test-snan-1.c (main): Mark nanf, nand, nanl as possibly unused.
1314         * tests/test-snan-2.c (main): Likewise.
1316 2023-10-14  Bruno Haible  <bruno@clisp.org>
1318         snan: Avoid test failures with CC="gcc -mfpmath=387".
1319         * tests/test-snan-1.c (main): Treat x86_64 CPU with
1320         __FLT_EVAL_METHOD__ == 2 like i386 CPU. Update comments.
1321         * tests/test-snan-2.c (main): Likewise.
1323 2023-10-14  Bruno Haible  <bruno@clisp.org>
1325         snan: Fix the value of SNaNl() on i386, x86_64, ia64 CPUs.
1326         * lib/snan.h (construct_SNaNl): On i386, x86_64, ia64 CPUs, invert
1327         bit 62, not bit 63, of the mantissa.
1328         * m4/snan.m4 (gl_SNAN): Require gl_LONG_DOUBLE_VS_DOUBLE.
1329         * modules/snan (Files): Add m4/math_h.m4.
1331 2023-10-13  Bruno Haible  <bruno@clisp.org>
1333         tests: Make use of signed signalling NaNs.
1334         * tests/test-signbit.c: Include signed-snan.h instead of snan.h.
1335         (test_signbitf): Test positive_SNaNf, negative_SNaNf, instead of only
1336         SNaNf.
1337         (test_signbitd): Test positive_SNaNd, negative_SNaNd, instead of only
1338         SNaNd.
1339         (test_signbitl): Test positive_SNaNl, negative_SNaNl, instead of only
1340         SNaNl.
1341         * tests/test-stdio.c: Include signed-snan.h instead of snan.h.
1342         (main): Test positive_SNaNd, negative_SNaNd, instead of only SNaNd.
1343         Also, test positive_NaNd, negative_NaNd, instead of NaNd.
1344         * modules/signbit-tests (Depends-on): Add signed-snan. Remove snan.
1345         * modules/stdio-tests (Depends-on): Likewise.
1347 2023-10-13  Bruno Haible  <bruno@clisp.org>
1349         signed-snan: New module.
1350         * lib/snan.h (construct_SNaNf): New function, extracted from SNaNf.
1351         (SNaNf): Use it.
1352         (construct_SNaNd): New function, extracted from SNaNd.
1353         (SNaNd): Use it.
1354         (construct_SNaNl): New function, extracted from SNaNl.
1355         (SNaNl): Use it.
1356         * lib/signed-snan.h: New file.
1357         * modules/signed-snan: New file.
1359 2023-10-13  Bruno Haible  <bruno@clisp.org>
1361         signed-nan: New module, renamed from qnan.
1362         * lib/signed-nan.h: Renamed from lib/qnan.h. Update double-inclusion
1363         guard.
1364         * modules/signed-nan: Renamed from modules/qnan. Update.
1365         * tests/test-signbit.c: Update.
1366         * tests/test-stdio.c: Likewise.
1367         * tests/test-totalorder.c: Likewise.
1368         * modules/*-tests: Update.
1370 2023-10-13  Bruno Haible  <bruno@clisp.org>
1372         access: Fix test failure on native Windows.
1373         * lib/access.c (access): Do the trailing slash workaround also on
1374         native Windows.
1375         * modules/access (Depends-on): Add stat.
1377 2023-10-13  Bruno Haible  <bruno@clisp.org>
1379         isnanf, isnand: Fix conflict with Solaris <ieeefp.h>.
1380         * lib/math.in.h (isnanf, isnand): On Solaris and IRIX, declare this
1381         function, instead of defining it as a macro.
1383 2023-10-12  Bruno Haible  <bruno@clisp.org>
1385         *printf tests: Test printing of signalling NaNs.
1386         These tests run without sigfpe_on_invalid(), therefore they won't crash.
1387         * tests/test-vasnprintf-posix.c: Include snan.h.
1388         (test_function): For each test case that uses NaNd or NaNl, add a test
1389         case with SNaNd or SNaNl, respectively.
1390         * tests/test-vasprintf-posix.c: Likewise.
1391         * tests/test-snprintf-posix.h: Likewise.
1392         * tests/test-sprintf-posix.h: Likewise.
1393         * tests/test-vasnwprintf-posix.c: Likewise.
1394         * modules/vasnprintf-posix-tests (Depends-on): Add snan.
1395         * modules/vasprintf-posix-tests (Depends-on): Likewise.
1396         * modules/vsnprintf-posix-tests (Depends-on): Likewise.
1397         * modules/snprintf-posix-tests (Depends-on): Likewise.
1398         * modules/vsprintf-posix-tests (Depends-on): Likewise.
1399         * modules/sprintf-posix-tests (Depends-on): Likewise.
1400         * modules/vasnwprintf-posix-tests (Depends-on): Likewise.
1401         * modules/pipe-filter-gi-tests (Depends-on): Likewise.
1402         * modules/pipe-filter-ii-tests (Depends-on): Likewise.
1404 2023-10-12  Bruno Haible  <bruno@clisp.org>
1406         nan, snan tests: Avoid test failures.
1407         * tests/test-nan-1.c (main): Special handling of arm CPUs with software
1408         floating-point emulation.
1409         * tests/test-snan-1.c (main): Likewise. Disable tests that are known to
1410         fail.
1411         * tests/test-snan-2.c (main): Skip tests that are known to fail.
1412         * modules/snan-tests (Files): Add m4/math_h.m4.
1413         (configure.ac): Require gl_LONG_DOUBLE_VS_DOUBLE.
1414         * m4/math_h.m4 (gl_LONG_DOUBLE_VS_DOUBLE): Mention also NetBSD/sparc32.
1416 2023-10-12  Bruno Haible  <bruno@clisp.org>
1418         snan: Add tests.
1419         * tests/test-snan-1.c: New file.
1420         * tests/test-snan-2.sh: New file.
1421         * tests/test-snan-2.c: New file.
1422         * modules/snan-tests: New file.
1424 2023-10-12  Bruno Haible  <bruno@clisp.org>
1426         nan: Add tests.
1427         * tests/test-nan-1.c: New file.
1428         * tests/test-nan-2.c: New file.
1429         * modules/nan-tests: New file.
1431 2023-10-12  Bruno Haible  <bruno@clisp.org>
1433         fpe-tracking, fpe-trapping: New modules.
1434         * lib/fpe-trapping.h: New file.
1435         * m4/mathfunc.m4 (gl_MATHFUNC): Handle also the type fp_except_t.
1436         * m4/fpe.m4: New file.
1437         * modules/fpe-tracking: New file.
1438         * modules/fpe-trapping: New file.
1440 2023-10-12  Bruno Haible  <bruno@clisp.org>
1442         snan: Comments.
1443         * lib/snan.h: Add more comments.
1445 2023-10-12  Bruno Haible  <bruno@clisp.org>
1447         snan: New module.
1448         * lib/snan.h: Renamed from tests/snan.h. Add double-inclusion guard.
1449         * m4/snan.m4: New file.
1450         * modules/snan: New file.
1451         * isfinite-tests (Files): Remove tests/snan.h, m4/exponent*.m4.
1452         (Depends-on): Add snan.
1453         (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION,
1454         gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION.
1455         * isinf-tests (Files): Remove tests/snan.h, m4/exponent*.m4.
1456         (Depends-on): Add snan.
1457         (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION,
1458         gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION.
1459         * isnan-tests (Files): Remove tests/snan.h, m4/exponent*.m4.
1460         (Depends-on): Add snan.
1461         (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION,
1462         gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION.
1463         * isnanf-nolibm-tests (Files): Remove tests/snan.h, m4/exponentf.m4.
1464         (Depends-on): Add snan.
1465         (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION.
1466         * isnanf-tests (Files): Remove tests/snan.h, m4/exponentf.m4.
1467         (Depends-on): Add snan.
1468         (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION.
1469         * isnand-nolibm-tests (Files): Remove tests/snan.h, m4/exponentd.m4.
1470         (Depends-on): Add snan.
1471         (configure.ac): Don't invoke gl_DOUBLE_EXPONENT_LOCATION.
1472         * isnand-tests (Files): Remove tests/snan.h, m4/exponentd.m4.
1473         (Depends-on): Add snan.
1474         (configure.ac): Don't invoke gl_DOUBLE_EXPONENT_LOCATION.
1475         * isnanl-nolibm-tests (Files): Remove tests/snan.h, m4/exponentl.m4.
1476         (Depends-on): Add snan.
1477         (configure.ac): Don't invoke gl_LONG_DOUBLE_EXPONENT_LOCATION.
1478         * isnanl-tests (Files): Remove tests/snan.h, m4/exponentl.m4.
1479         (Depends-on): Add snan.
1480         (configure.ac): Don't invoke gl_LONG_DOUBLE_EXPONENT_LOCATION.
1481         * signbit-tests (Files): Remove tests/snan.h, m4/exponent*.m4.
1482         (Depends-on): Add snan.
1483         (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION,
1484         gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION.
1485         * stdio-tests (Files): Remove tests/snan.h
1486         (Depends-on): Add snan.
1488 2023-10-12  Bruno Haible  <bruno@clisp.org>
1490         qnan: New module.
1491         * lib/qnan.h: Renamed from tests/qnan.h. Add double-inclusion guard.
1492         * modules/qnan: New file.
1493         * modules/signbit-tests (Files): Remove tests/qnan.h.
1494         (Depends-on): Add qnan. Remove nan.
1495         * modules/stdio-tests (Files): Remove tests/qnan.h.
1496         (Depends-on): Add qnan. Remove nan.
1497         * modules/totalorder-tests (Files): Remove tests/qnan.h.
1498         (Depends-on): Add qnan. Remove nan, signbit.
1499         * modules/totalorderf-tests (Files): Remove tests/qnan.h.
1500         (Depends-on): Add qnan. Remove nan, signbit.
1501         * modules/totalorderl-tests (Files): Remove tests/qnan.h.
1502         (Depends-on): Add qnan. Remove nan, signbit.
1504 2023-10-12  Bruno Haible  <bruno@clisp.org>
1506         nan: New module.
1507         * lib/nan.h: Renamed from tests/nan.h. Change double-inclusion guard.
1508         * modules/nan: New file.
1509         * modules/*-tests: Depend on this module instead of embedding
1510         tests/nan.h.
1512 2023-10-11  Bruno Haible  <bruno@clisp.org>
1514         unictype/category-and-not: Add more tests.
1515         Suggested by Arindam Sharma <arindam.sharma@imperial.ac.uk>.
1516         * tests/unictype/test-categ_and_not.c (main): Add two more test cases.
1517         * modules/unictype/category-and-not-tests (Depends-on): Add
1518         unictype/category-Cc.
1520 2023-10-09  Bruno Haible  <bruno@clisp.org>
1522         tests: Refactor functions for signalling NaNs.
1523         * tests/snan.h: New file, based on tests/test-isnanf.h,
1524         tests/test-isnand.h, tests/test-isnanl.h.
1525         * tests/test-isfinite.c: Include snan.h.
1526         (test_isfinitef, test_isfinited, test_isfinitel): Simplify.
1527         * tests/test-isinf.c: Include snan.h.
1528         (test_isinff, test_isinfd, test_isinfl): Simplify.
1529         * tests/test-isnan.c: Include snan.h.
1530         (test_float, test_double, test_long_double): Simplify.
1531         * tests/test-isnanf.h: Include snan.h.
1532         (main): Simplify.
1533         * tests/test-isnand.h: Include snan.h.
1534         (main): Simplify.
1535         * tests/test-isnanl.h: Include snan.h.
1536         (main): Simplify.
1537         * tests/test-signbit.c: Include snan.h.
1538         (test_signbitf, test_signbitd, test_signbitl): Simplify.
1539         * tests/test-stdio.c: Include qnan.h, snan.h instead of nan.h.
1540         (main): Test quiet NaNs always. Also test a signalling NaN.
1541         * modules/isfinite-tests (Files): Add tests/nan.h, tests/snan.h.
1542         * modules/isinf-tests (Files): Likewise.
1543         * modules/isnan-tests (Files): Add tests/snan.h.
1544         * modules/isnanf-tests (Files): Likewise.
1545         * modules/isnanf-nolibm-tests (Files): Likewise.
1546         * modules/isnand-tests (Files): Likewise.
1547         * modules/isnand-nolibm-tests (Files): Likewise.
1548         * modules/isnanl-tests (Files): Likewise.
1549         * modules/isnanl-nolibm-tests (Files): Likewise.
1550         * modules/signbit-tests (Files): Likewise.
1551         * modules/stdio-tests (Files): Add tests/qnan.h, tests/snan.h.
1553 2023-10-08  Bruno Haible  <bruno@clisp.org>
1555         isfinite: Work around a bug with 'long double' in glibc 2.5/ia64.
1556         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Require
1557         gl_LONG_DOUBLE_EXPONENT_LOCATION. Test also another NaN value.
1558         * modules/isfinite (Files): Add m4/exponentl.m4.
1559         * doc/posix-functions/isfinite.texi: Mention also a 'long double'
1560         problem on ia64.
1562 2023-10-07  Bruno Haible  <bruno@clisp.org>
1564         tests: Refactor functions for quiet NaNs.
1565         * tests/qnan.h: New file, based on tests/totalorder.c.
1566         * tests/nan.h: Add double-inclusion guard.
1567         * tests/test-signbit.c: Include qnan.h.
1568         (test_signbitf, test_signbitd, test_signbitl): Simplify.
1569         * tests/test-totalorder.c: Include qnan.h instead of NaN.h.
1570         (TOTALORDER_NAN): Remove macro.
1571         (TOTALORDER_POSITIVE_NAN, TOTALORDER_NEGATIVE_NAN): New macros.
1572         (positive_nan, negative_nan): Remove functions.
1573         (main): Update.
1574         * tests/test-totalorderf.c (TOTALORDER_NAN): Remove macro.
1575         (TOTALORDER_POSITIVE_NAN, TOTALORDER_NEGATIVE_NAN): New macros.
1576         * tests/test-totalorderl.c (TOTALORDER_NAN): Remove macro.
1577         (TOTALORDER_POSITIVE_NAN, TOTALORDER_NEGATIVE_NAN): New macros.
1578         * modules/signbit-tests (Files): Add tests/nan.h, tests/qnan.h.
1579         * modules/totalorder-tests (Files): Add tests/qnan.h.
1580         (Depends-on): Add signbit.
1581         * modules/totalorderf-tests (Files): Add tests/qnan.h.
1582         (Depends-on): Add signbit.
1583         * modules/totalorderl-tests (Files): Add tests/qnan.h.
1584         (Depends-on): Add signbit.
1586 2023-10-07  Bruno Haible  <bruno@clisp.org>
1588         totalorder*: Fix compilation error on glibc 2.25..2.30.
1589         * m4/totalorder.m4 (gl_FUNC_TOTALORDERF): Test whether <math.h> has an
1590         incompatible declaration of totalorderf, and set REPLACE_TOTALORDERF
1591         to 1 if so.
1592         (gl_FUNC_TOTALORDER): Test whether <math.h> has an incompatible
1593         declaration of totalorder, and set REPLACE_TOTALORDER to 1 if so.
1594         (gl_FUNC_TOTALORDERL): Test whether <math.h> has an incompatible
1595         declaration of totalorderl, and set REPLACE_TOTALORDERL to 1 if so.
1597 2023-10-07  Bruno Haible  <bruno@clisp.org>
1599         isnan: Avoid dangerous shell coding pattern.
1600         * m4/isnand.m4 (gl_FUNC_ISNAND): Use 'test -n "$arg"', not
1601         'test "$arg"'.
1602         * m4/isnanf.m4 (gl_FUNC_ISNANF): Likewise.
1603         * m4/isnanl.m4 (gl_FUNC_ISNANL): Likewise.
1605 2023-10-05  Bruno Haible  <bruno@clisp.org>
1607         doc: Mention xstrerror.
1608         * doc/posix-functions/strerror_r.texi: Mention xstrerror.
1610         xstrerror: Add tests.
1611         * tests/test-xstrerror.c: New file.
1612         * modules/xstrerror-tests: New file.
1614         xstrerror: New module.
1615         * lib/xstrerror.h: New file.
1616         * lib/xstrerror.c: New file.
1617         * modules/xstrerror: New file.
1618         * modules/strerror_r-posix (configure.ac): Update comment.
1620 2023-10-05  Paul Eggert  <eggert@cs.ucla.edu>
1622         isnan: slightly simplify configuration
1623         * m4/isnand.m4 (gl_FUNC_ISNAND):
1624         * m4/isnanf.m4 (gl_FUNC_ISNANF):
1625         * m4/isnanl.m4 (gl_FUNC_ISNANL):
1626         Slightly simplify shell ‘if’.  This should simplify future changes.
1628         totalorder: speed up configuration
1629         * m4/totalorder.m4 (gl_FUNC_TOTALORDERF, gl_FUNC_TOTALORDER)
1630         (gl_FUNC_TOTALORDERL): Avoid unnecessary call to AC_SEARCH_LIBS,
1631         since the information is already available in shell vars.
1633         totalorderl: minor porting fixes
1634         * lib/totalorderl.c (LDBL_SIGNBIT_WORD): Define to -1 if not defined.
1635         (totalorderl): Avoid unused local zu by preferring ‘if’ to ‘ifdef’.
1636         Don’t assume sizeof (unsigned long long) == 2 * sizeof (unsigned).
1638 2023-10-04  Bruno Haible  <bruno@clisp.org>
1640         totalorder* tests: Refactor.
1641         * tests/test-totalorder.c (positive_nan, negative_nan): New functions,
1642         extracted from main.
1643         (main): Use them when initializing the array.
1645 2023-10-04  Bruno Haible  <bruno@clisp.org>
1647         totalorderl: Optimize.
1648         * modules/totalorderl (Files): Add m4/signbit.m4.
1649         * m4/totalorder.m4 (gl_FUNC_TOTALORDERL): Invoke
1650         gl_LONG_DOUBLE_SIGN_LOCATION.
1651         * lib/totalorderl.c (totalorderl): If LDBL_SIGNBIT_WORD is known,
1652         use it, so that 'bigendian' becomes a constant.
1654 2023-10-04  Bruno Haible  <bruno@clisp.org>
1656         totalorderl: Work around Solaris cc bug.
1657         * lib/totalorderl.c (totalorderl): Initialize xu, yu, zu using a
1658         different syntax.
1660 2023-10-04  Bruno Haible  <bruno@clisp.org>
1662         signbit tests: Strengthen tests.
1663         * tests/test-signbit.c (test_signbitf, test_signbitd, test_signbitl):
1664         Test the sign bit both of a NaN value and of its negative.
1666 2023-10-03  Bruno Haible  <bruno@clisp.org>
1668         doc: Document portability of __VA_ARGS__.
1669         * doc/gnulib-readme.texi (C99 features assumed): Add a note about
1670         __VA_ARGS__.
1672 2023-10-03  Bruno Haible  <bruno@clisp.org>
1674         ilogb: Document a Mac OS X bug.
1675         * doc/posix-functions/ilogb.texi: Mention a bug that affects Mac OS X.
1676         * m4/ilogb.m4 (gl_FUNC_ILOGB): Update comments.
1678 2023-10-03  Bruno Haible  <bruno@clisp.org>
1680         *printf-posix: Work around bug with %#.0x on Mac OS X 10.6.
1681         * lib/vasnprintf.c (VASNPRINTF): Enable NEED_PRINTF_UNBOUNDED_PRECISION-
1682         guarded code also for NEED_PRINTF_FLAG_ALT_PRECISION_ZERO. Set
1683         prec_ourselves to 1 if NEED_PRINTF_FLAG_ALT_PRECISION_ZERO, precision is
1684         0, and the directive is 'x' or 'X'. If prec_ourselves, remove the "0"
1685         output if required.
1686         * m4/printf.m4 (gl_PRINTF_FLAG_ALT_PRECISION_ZERO): New macro.
1687         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_ALT_PRECISION_ZERO): New
1688         macro.
1689         (gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS): Invoke it.
1690         * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_IS_POSIX): Require
1691         gl_PRINTF_FLAG_ALT_PRECISION_ZERO and test its result.
1692         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_IS_POSIX): Likewise.
1693         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_IS_POSIX):
1694         Likewise.
1695         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_IS_POSIX): Likewise.
1696         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_IS_POSIX): Likewise.
1697         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_IS_POSIX): Likewise.
1698         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_IS_POSIX): Likewise.
1699         * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_IS_POSIX): Likewise.
1700         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_IS_POSIX): Likewise.
1701         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_IS_POSIX): Likewise.
1702         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_IS_POSIX): Likewise.
1703         * doc/glibc-functions/asprintf.texi: Mention the %#.0x bug.
1704         * doc/glibc-functions/obstack_printf.texi: Likewise.
1705         * doc/glibc-functions/obstack_vprintf.texi: Likewise.
1706         * doc/glibc-functions/vasprintf.texi: Likewise.
1707         * doc/posix-functions/dprintf.texi: Likewise.
1708         * doc/posix-functions/fprintf.texi: Likewise.
1709         * doc/posix-functions/fwprintf.texi: Likewise.
1710         * doc/posix-functions/printf.texi: Likewise.
1711         * doc/posix-functions/snprintf.texi: Likewise.
1712         * doc/posix-functions/sprintf.texi: Likewise.
1713         * doc/posix-functions/swprintf.texi: Likewise.
1714         * doc/posix-functions/vdprintf.texi: Likewise.
1715         * doc/posix-functions/vfprintf.texi: Likewise.
1716         * doc/posix-functions/vfwprintf.texi: Likewise.
1717         * doc/posix-functions/vprintf.texi: Likewise.
1718         * doc/posix-functions/vsnprintf.texi: Likewise.
1719         * doc/posix-functions/vsprintf.texi: Likewise.
1720         * doc/posix-functions/vswprintf.texi: Likewise.
1721         * doc/posix-functions/vwprintf.texi: Likewise.
1722         * doc/posix-functions/wprintf.texi: Likewise.
1724 2023-10-03  Bruno Haible  <bruno@clisp.org>
1726         faccessat tests: Strengthen tests.
1727         * tests/test-faccessat.c (main): Test other modes than F_OK. Check errno
1728         values.
1730 2023-10-03  Bruno Haible  <bruno@clisp.org>
1732         euidaccess: Reject trailing slashes on symlinks to non-directories.
1733         * modules/euidaccess (Depends-on): Add access.
1735         euidaccess: Add tests.
1736         * tests/test-access.h: New file, extracted from tests/test-access.c.
1737         * tests/test-access.c: Moved most code to tests/test-access.h.
1738         Include test-access.h.
1739         (main): Invoke test_access.
1740         * tests/test-euidaccess.c: New file, based on tests/test-access.c.
1741         * modules/access-tests (Files): Add tests/test-access.h.
1742         * modules/euidaccess-tests: New file, based on modules/access-tests.
1744 2023-10-03  Bruno Haible  <bruno@clisp.org>
1746         access: Make last change work also when module 'stat' is in use.
1747         * lib/access.c (access): When stat() returns -1 with errno != EOVERFLOW,
1748         fail.
1750         access: Work around trailing slash bug on Mac OS X 10.5.
1751         * m4/access.m4 (gl_FUNC_ACCESS): Test whether access honors a trailing
1752         slash. Set REPLACE_ACCESS to 1 and define ACCESS_TRAILING_SLASH_BUG if
1753         not.
1754         * lib/access.c (access): Add an implementation for Unix-like platforms.
1755         * tests/test-access.c (main): Test for result if the argument has a
1756         trailing slash.
1757         * modules/access-tests (Depends-on): Add 'symlink'.
1758         * doc/posix-functions/access.texi: Mention the Mac OS X bug.
1760 2023-10-03  Bruno Haible  <bruno@clisp.org>
1762         update-copyright tests: Fix test failure (regression 2023-06-18).
1763         * build-aux/update-copyright: Add "use re 'eval';" declaration.
1765 2023-10-03  Bruno Haible  <bruno@clisp.org>
1767         Update re *-*-windows*-gnu* config triplets, withdrawn on 2023-09-19.
1768         * m4/*.m4: Don't recognize windows*-gnu* as equivalent to mingw*.
1770 2023-10-03  Bruno Haible  <bruno@clisp.org>
1772         string-c++-tests, uchar-c++-tests: Fix link errors on Mac OS X.
1773         * modules/string-c++-tests (Makefile.am): Link test-string-c++ with
1774         $(LIBC32CONV).
1775         * modules/uchar-c++-tests (Makefile.am): Link test-uchar-c++ with
1776         $(LIBC32CONV).
1778 2023-10-03  Bruno Haible  <bruno@clisp.org>
1780         mcel tests: Fix link error.
1781         * modules/mcel-tests (Makefile.am): Link test-mcel with $(LIBUNISTRING)
1782         $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBC32CONV).
1784 2023-10-03  Bruno Haible  <bruno@clisp.org>
1786         mcel: Fix compilation error in tests.
1787         * lib/mcel.h (mcel_scan): Undefine 'mbs' after use.
1789 2023-10-02  Bruno Haible  <bruno@clisp.org>
1791         localename, gettext: Avoid crash on macOS 14.
1792         Reported by Shupeng Xue <dspxue@gmail.com> at
1793         <https://lists.gnu.org/archive/html/bug-gettext/2023-10/msg00001.html>.
1794         Cf <https://github.com/aria2/aria2/issues/2083#issuecomment-1694662007>.
1795         * m4/intlmacosx.m4 (gt_INTL_MACOSX): Link with the CoreServices
1796         framework in addition to the CoreFoundation framework.
1798 2023-10-02  Bruno Haible  <bruno@clisp.org>
1800         localcharset: Avoid internal compiler error with -Wextra on macOS 10.5.
1801         * lib/localcharset.c (locale_charset): Use an empty compound statement
1802         instead of a null statement.
1804 2023-10-02  KO Myung-Hun  <komh78@gmail.com>
1806         fchdir: Fix a compilation error on OS/2 kLIBC (regression 2023-09-29).
1807         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Define REPLACE_FCHDIR macro to 1 if
1808         REPLACE_FCHDIR is 1.
1810 2023-10-02  Bruno Haible  <bruno@clisp.org>
1812         totalorder, totalorderf, totalorderl: Fix some typos.
1813         * m4/totalorder.m4 (gl_FUNC_TOTALORDERF): Assign TOTALORDERF_LIBM, not
1814         TOTALORDER_LIBM.
1815         * modules/totalorder (Description): Fix copy&paste mistake.
1816         (Depends-on): Fix conditions.
1817         * modules/totalorderf (Depends-on): Likewise.
1818         * modules/totalorderl (Depends-on): Likewise.
1820 2023-10-01  Paul Eggert  <eggert@cs.ucla.edu>
1822         totalorder, totalorderf, totalorderl: new modules
1823         * lib/math.in.h: Declare totalorderf, totalorder, totalorderl.
1824         * lib/totalorder.c, lib/totalorderf.c, lib/totalorderl.c:
1825         * m4/totalorder.m4, modules/totalorder, modules/totalorder-tests:
1826         * modules/totalorderf, modules/totalorderf-tests:
1827         * modules/totalorderl, modules/totalorderl-tests:
1828         * tests/test-totalorder.c, tests/test-totalorderf.c:
1829         * tests/test-totalorderl.c: New files.
1830         * m4/math_h.m4 (gl_MATH_H, gl_MATH_H_REQUIRE_DEFAULTS)
1831         (gl_MATH_H_DEFAULTS):
1832         * modules/math (math.h): Set up totalorder, totalorderf, totalorderl.
1833         * m4/mathfunc.m4 (gl_MATHFUNC): Also support pointer-to-const.
1835 2023-09-30  Paul Eggert  <eggert@cs.ucla.edu>
1837         regex-quote: fix recently-introduced typo
1838         Problem reported by Bruno Haible in:
1839         https://lists.gnu.org/r/bug-gnulib/2023-09/msg00146.html
1840         * lib/regex-quote.c (regex_quote_copy): Add missing #endif.
1842 2023-09-30  Bruno Haible  <bruno@clisp.org>
1844         wgetcwd-lgpl: Add tests.
1845         * tests/test-wgetcwd-lgpl.c: New file, based on
1846         tests/test-getcwd-lgpl.c.
1847         * modules/wgetcwd-lgpl-tests: New file, based on
1848         modules/getcwd-lgpl-tests.
1850         wgetcwd-lgpl: New module.
1851         * lib/wchar.in.h (wgetcwd): New declaration.
1852         * lib/wgetcwd-lgpl.c: New file, based on lib/getcwd-lgpl.c.
1853         * m4/wchar_h.m4 (gl_WCHAR_H_REQUIRE_DEFAULTS): Initialize
1854         GNULIB_WGETCWD.
1855         * modules/wchar (Makefile.am): Substitute GNULIB_WGETCWD.
1856         * modules/wgetcwd-lgpl: New file.
1858 2023-09-30  Bruno Haible  <bruno@clisp.org>
1860         getcwd-lgpl: Tweaks.
1861         * lib/unistd.in.h (getcwd): Mention the module 'getcwd-lgpl'.
1862         * lib/getcwd-lgpl.c (rpl_getcwd): Minimize scope of local variables.
1863         * tests/test-getcwd-lgpl.c (main): Use GNU coding style.
1865 2023-09-29  Bruno Haible  <bruno@clisp.org>
1867         Allow different --libtool options from multiple gnulib-tool invocations.
1868         * modules/crypto/gc (Makefile.am): Don't test GL_COND_LIBTOOL, since
1869         gnulib-tool already eliminates lib_LDFLAGS augmentations for non-libtool
1870         libraries.
1871         * modules/striconv (Makefile.am): Likewise.
1872         * modules/striconveh (Makefile.am): Likewise.
1873         * modules/termcap (Makefile.am): Likewise.
1874         * modules/terminfo (Makefile.am): Likewise.
1876 2023-09-29  KO Myung-Hun  <komh78@gmail.com>
1878         stdlib: Cast putenv() on OS/2 kLIBC
1879         * lib/stdlib.in.h (putenv) [kLIBC]: Cast with _GL_CXXALIAS_SYS_CAST().
1881 2023-09-29  Bruno Haible  <bruno@clisp.org>
1883         fchdir: Override properly on OS/2 kLIBC.
1884         * lib/unistd.in.h (fchdir): Override if REPLACE_FCHDIR is 1.
1885         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_FCHDIR.
1886         * modules/unistd (Makefile.am): Substitute REPLACE_FCHDIR.
1887         * modules/fchdir (Depends-on, configure.ac): Test REPLACE_FCHDIR.
1888         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Instead of setting HAVE_FCHDIR to 0,
1889         set REPLACE_FCHDIR to 1.
1891 2023-09-29  KO Myung-Hun  <komh78@gmail.com>
1893         fdopendir: Use Windows code path on OS/2 kLIBC
1894         * lib/closedir.c (closedir): Use Windows code path.
1895         * lib/dirent.in.h (_gl_register_dirp_fd, _gl_unregister_dirp_fd):
1896         Remove.
1897         * lib/dirfd.c (_gl_register_dirp_fd, _gl_unregister_dirp_fd): Remove.
1898         (dirfd): Use Windows code path.
1899         * lib/fdopendir.c (fdopendir): Use Windows code path.
1900         * lib/opendir.c (opendir): Use Windows code path.
1901         * m4/closedir.m4 (REPLACE_CLOSEDIR): Use Windows code path.
1902         * m4/dirent_h.m4 (DIR_HAS_FD_MEMBER): Use Windows code path.
1903         * m4/dirfd.m4 (REPLACE_DIRFD): Use Windows code path.
1904         * m4/fchdir.m4 (HAVE_FCHDIR): Replace fchdir() if dirfd() does not work.
1905         * m4/opendir.m4 (REPLACE_OPENDIR): Use Windows code path.
1906         * m4/readdir.m4 (REPLACE_READDIR): Use Windows code path.
1907         * m4/rewinddir.m4 (REPLACE_REWINDDIR): Use Windows code path.
1908         * modules/fchdir (Depends-on): Include dirent always.
1910 2023-09-26  Paul Eggert  <eggert@cs.ucla.edu>
1912         mcel-bench-tests: fix typo
1913         * tests/bench-mcel.c (main): Fix typo in usage message.
1915         Remaining support for GNULIB_MCEL_PREFER
1916         Support mcel API in remaining modules where this might matter,
1917         for apps that prefer it.
1918         * lib/mbmemcasecmp.c, lib/mbscspn.c, lib/mbsncasecmp.c, lib/mbsnlen.c:
1919         * lib/mbspbrk.c, lib/mbspcasecmp.c, lib/mbssep.c, lib/mbsspn.c:
1920         * lib/regex-quote.c:
1921         Include mcel.h instead of mbiterf.h or mbuiterf.h,
1922         if GNULIB_MCEL_PREFER.
1923         * lib/mbmemcasecmp.c (mbmemcasecmp), lib/mbscspn.c (mbscspn):
1924         * lib/mbsncasecmp.c (mbsncasecmp), lib/mbsnlen.c (mbsnlen):
1925         * lib/mbspbrk.c (mbspbrk), lib/mbspcasecmp.c (mbspcasecmp):
1926         * lib/mbssep.c (mbssep), lib/mbsspn.c (mbsspn):
1927         * lib/regex-quote.c (regex_quote_length, regex_quote_copy):
1928         Use mcel API, if GNULIB_MCEL_PREFER.
1929         * lib/mbscspn.c, lib/mbspbrk.c, lib/mbspcasecmp.c, lib/mbsspn.c:
1930         Include stdlib.h, for MB_CUR_MAX.
1931         * modules/mbmemcasecmp, modules/mbsncasecmp, modules/mbspcasecmp:
1932         Depend on c32tolower.
1933         * modules/regex-quote: Depend on mempcpy.
1935 2023-09-25  Paul Eggert  <eggert@cs.ucla.edu>
1937         mbscasestr: support GNULIB_MCEL_PREFER
1938         Support mcel API for apps that prefer it.
1939         This mirrors the recent changes to mbsstr.
1940         * lib/mbscasestr.c [GNULIB_MCEL_PREFER]: Include mcel.h not mbuiter.h.
1941         (mbchar_t, mb_equal) [GNULIB_MCEL_PREFER]: New type and function,
1942         to make it easier to use common code.
1943         (knuth_morris_pratt_multibyte): Don't assume mbchar_t's alignment
1944         is at least that of size_t.
1945         (knuth_morris_pratt_multibyte, mbscasestr) [GNULIB_MCEL_PREFER]:
1946         Use mcel API.
1947         * modules/mbscasestr (Depends-on): Add alignasof.
1949 2023-09-24  Bernhard Voelker  <mail@bernhard-voelker.de>
1951         maintainer-makefile: Fix syntax-check rules wrt README.
1952         * top/maint.mk (sc_readme_link_install): Change the value of the
1953         variable in_vc_files to contain a pattern for the README file.
1954         (sc_readme_link_copying): Likewise.
1955         Previously, the above rules always passed, because the generated
1956         list of files was empty.  Bug introduced when adding the rules
1957         in commit 53b4bf3018.
1959 2023-09-22  Bruno Haible  <bruno@clisp.org>
1961         striconveh, *vasnprintf, vasnwprintf: Make more virtual-memory friendly.
1962         * lib/striconveh.c (mem_cd_iconveh_internal): Mark hex as 'const'.
1963         * lib/vasnprintf.c (wctomb_fallback): Likewise.
1965 2023-09-21  Paul Eggert  <eggert@cs.ucla.edu>
1967         mbschr, mbsrchr: support GNULIB_MCEL_PREFER
1968         Support mcel API for apps that prefer it.
1969         The following changes are in effect only if GNULIB_MCEL_PREFER.
1970         * lib/mbschr.c, lib/mbsrchr.c: Include stdlib.h, for MB_CUR_MAX.
1971         [GNULIB_MCEL_PREFER]: Include mcel.h instead of mbuiterf.h.
1972         (mbschr, mbsrchr) [GNULIB_MCEL_PREFER]: Use mcel API.
1974         gnulib-common: don’t suppress -Wpedantic
1975         Problem reported by Pádraig Brady in:
1976         https://lists.gnu.org/r/bug-gnulib/2023-09/msg00130.html
1977         * m4/gnulib-common.m4 (_GL_HAVE___HAS_C_ATTRIBUTE): New macro.
1978         Use it instead of ‘defined __has_c_attribute’.
1980         crypto/sm3: rename gl_cv_* variable for clarity
1981         * m4/gc-sm3.m4 (gl_cv_libgcrypt_md_sm3):
1982         Rename from gl_cv_libcrypt_md_sm3 since this is unrelated to libcrypt.
1984 2023-09-17  Paul Eggert  <eggert@cs.ucla.edu>
1986         intprops: pacify GCC -Wtype-limits
1987         * lib/intprops-internal.h: Pacify gcc (GCC) 13.2.1 20230728 (Red
1988         Hat 13.2.1-1) x86-64 -Wtype-limits on bleeding-edge diffutils.
1990 2023-09-16  Bruno Haible  <bruno@clisp.org>
1992         lib-symbol-visibility: Fix a misnomer.
1993         * doc/lib-symbol-visibility.texi: Rename LIBFOO_DLL_EXPORTED to
1994         LIBFOO_SHLIB_EXPORTED. Prefer the term "shared library", since the term
1995         "DLL" applies only to Windows.
1996         * lib/relocatable.h (RELOCATABLE_SHLIB_EXPORTED): Renamed from
1997         RELOCATABLE_DLL_EXPORTED. Prefer the term "shared library", since the
1998         term "DLL" applies only to Windows.
1999         * lib/mbtowc-lock.c (SHLIB_EXPORTED): Renamed from DLL_EXPORTED.
2000         * lib/nl_langinfo-lock.c (SHLIB_EXPORTED): Likewise.
2001         * lib/setlocale-lock.c (SHLIB_EXPORTED): Likewise.
2003 2023-09-15  Bruno Haible  <bruno@clisp.org>
2005         acl-permissions: Fix compilation error on Solaris 11 (regr. 2023-09-04).
2006         * lib/set-permissions.c: Include minmax.h.
2007         * modules/acl-permissions (Depends-on): Add minmax.
2009 2023-09-15  Bruno Haible  <bruno@clisp.org>
2011         readutmp: Fix crash when gdm is in use.
2012         Reported by Thorsten Kukuk <kukuk@suse.com> in
2013         <https://lists.gnu.org/archive/html/bug-gnulib/2023-09/msg00093.html>.
2014         * lib/readutmp.c (read_utmp_from_systemd): Don't use the value returned
2015         by sd_session_get_display if it is NULL.
2017 2023-09-14  Bruno Haible  <bruno@clisp.org>
2019         doc: Mention libucontext.
2020         * doc/pastposix-functions/getcontext.texi: Mention libucontext.
2021         * doc/pastposix-functions/makecontext.texi: Likewise.
2022         * doc/pastposix-functions/setcontext.texi: Likewise.
2023         * doc/pastposix-functions/swapcontext.texi: Likewise.
2025 2023-09-13  Bruno Haible  <bruno@clisp.org>
2027         mbfile: Add tests.
2028         * tests/test-mbfile.sh: New file.
2029         * tests/test-mbfile.c: New file.
2030         * modules/mbfile-tests: New file.
2032         mbfile: Fix major bug (regression 2023-07-04).
2033         Reported by Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org> in
2034         <https://lists.gnu.org/archive/html/bug-gnulib/2023-09/msg00088.html>.
2035         * lib/mbfile.h (mbfile_multi_getc): If bytes != -1, -2, -3, add the
2036         previous mbf->bufcount to bytes.
2038 2023-09-11  Pádraig Brady  <P@draigBrady.com>
2040         gnu-web-doc-update: fix updating of manual directory
2041         * build-aux/gnu-web-doc-update: Change to the 'manual' directory,
2042         since $tmp is a relative path.  This avoids removing files
2043         outside of the 'manual' directory.
2045 2023-09-10  Bruno Haible  <bruno@clisp.org>
2047         Fix clang errors "different exception specifier" (regr. 2023-09-04).
2048         * lib/malloc.in.h (memalign): Don't use _GL_ATTRIBUTE_NOTHROW on
2049         platforms other than glibc systems.
2050         * lib/stdio.in.h (fdopen): Likewise.
2051         * lib/stdlib.in.h (aligned_alloc, calloc, canonicalize_file_name,
2052         malloc, realloc): Likewise.
2053         * lib/string.in.h (strdup, strndup): Likewise.
2054         * lib/sys_stat.in.h (getumask): Likewise.
2055         * lib/wchar.in.h (wcsdup): Likewise.
2057 2023-09-09  Paul Eggert  <eggert@cs.ucla.edu>
2059         propername: support GNULIB_MCEL_PREFER
2060         Support mcel API for apps that prefer it.
2061         The following changes are in effect only if GNULIB_MCEL_PREFER.
2062         * lib/propername.c: Include mcel.h, not mbchar.h and mbuiter.h.
2063         (mbsstr_trimmed_wordbounded): Use mcel API.
2064         * modules/propername (Depends-on): Add c32isalnum.
2066         trim: support GNULIB_MCEL_PREFER
2067         Support mcel API for apps that prefer it.
2068         The following changes are in effect only if GNULIB_MCEL_PREFER.
2069         * lib/trim.c: Include mcel.h, not mbchar.h and mbuiterf.h.
2070         (trim2): Use mcel API.
2071         * modules/trim (Depends-on): Add c32isspace.
2073         mbsstr: support GNULIB_MCEL_PREFER
2074         Support mcel API for apps that prefer it.
2075         * lib/mbsstr.c [GNULIB_MCEL_PREFER]: Include mcel.h not mbuiter.h.
2076         (mbchar_t, mb_equal) [GNULIB_MCEL_PREFER]: New type and function,
2077         to make it easier to use common code.
2078         (knuth_morris_pratt_multibyte): Don't assume mbchar_t's alignment
2079         is at least that of size_t.
2080         (knuth_morris_pratt_multibyte, mbsstr) [GNULIB_MCEL_PREFER]:
2081         Use mcel API.
2082         * modules/mbsstr (Depends-on): Add alignasof.
2084         mbslen: support GNULIB_MCEL_PREFER
2085         Support mcel API for apps that prefer it.
2086         The following changes are in effect only if GNULIB_MCEL_PREFER.
2087         * lib/mbslen.c: Include mcel.h instead of mbuiterf.h.
2088         (mbslen): Use mcel API.
2090         chown: work around symlink issues on odd platforms
2091         Problem reported by Jordi Sanfeliu in:
2092         https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00116.html
2093         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
2094         Do not declare unused locals st, stat_valid.
2095         Redo to just call chown if arg is a symlink.
2096         This induces a race but is perhaps the best we can do easily
2097         on oddball platforms where chown does not follow symlinks.
2099 2023-09-09  Bruno Haible  <bruno@clisp.org>
2101         chown, lchown: Revisit platforms.
2102         * doc/posix-functions/chown.texi: Update platforms list.
2103         * doc/posix-functions/lchown.texi: Likewise.
2104         * lib/chown.c (rpl_chown): Add platform comments.
2105         * lib/lchown.c: Likewise.
2107 2023-09-07  Paul Eggert  <eggert@cs.ucla.edu>
2109         mbscasecmp: support GNULIB_MCEL_PREFER
2110         * lib/mbscasecmp.c: Include stdlib.h, since we use MB_CUR_MAX.
2111         Include uchar.h, for c32tolower.
2112         (GNULIB_MCEL_PREFER): Include mcel.h instead of mbuiterf.h.
2113         (mbscasecmp) [GNULIB_MCEL_PREFER]: Use mcel instead of mbuiterf.
2114         * modules/mbscasecmp (Depends-on): Add c32tolower, stdlib, uchar.
2115         Depend on mbuiterf only if not preferring mcel.
2117         exclude: support GNULIB_MCEL_PREFER
2118         Support mcel API for apps that prefer it.
2119         The following changes are in effect only if GNULIB_MCEL_PREFER.
2120         * lib/exclude.c: Include mcel.h instead of mbuiter.h.
2121         (string_hasher_ci): Use mcel_scanz instead of mbui_init,
2122         mbui_avail, mbui_cur, and mbui_advance.
2123         * modules/exclude: Do not depend on mbuiter.
2125         mcel-prefer: new module
2126         * modules/mcel-prefer: New file.
2128         mcel-bench-tests: new module
2129         * modules/mcel-bench-tests, tests/bench-mcel.c: New files.
2130         * tests/bench-multibyte.h (TEXT_LATIN_ASCII_LINE1)
2131         (TEXT_FRENCH_UTF8_LINE1, TEXT_GREEK_UTF8_LINE1)
2132         (TEXT_CHINESE_UTF8_LINE1): New macros.
2133         (text_random_bytes): New constant.
2134         * tests/bench.h (timing_output): Mark with _GL_UNUSED,
2135         since bench-mcel.c does not use it.
2137         mcel-tests: new module
2138         * modules/mcel-tests, tests/test-mcel.c: New files
2140         mcel: new module
2141         * lib/mcel.c, lib/mcel.h, modules/mcel: New files.
2143 2023-09-07  Bruno Haible  <bruno@clisp.org>
2145         Don't use 'throw ()' in C++ 11 or newer.
2146         * lib/stddef.in.h (_GL_ATTRIBUTE_NOTHROW):  Provide fallback definition.
2147         (abort): Declare with _GL_ATTRIBUTE_NOTHROW instead of throw().
2148         * lib/malloc.in.h (rpl_free, free): Likewise.
2149         * lib/stdlib.in.h (free): Likewise.
2150         * lib/string.in.h (rpl_free, free, memchr, memrchr, rawmemchr,
2151         strchrnul, strpbrk, strstr, strcasestr): Likewise.
2152         * lib/wchar.in.h (rpl_free, free): Likewise.
2153         * lib/getopt-cdefs.in.h (__THROW): Define to noexcept(true) for C++ 11
2154         or newer.
2155         * lib/md5.h (__THROW): Likewise.
2157 2023-09-07  Bruno Haible  <bruno@clisp.org>
2159         Add info about recommended warning options with clang.
2160         * HACKING (Warning Options): Add info regarding clang.
2162 2023-09-07  Bruno Haible  <bruno@clisp.org>
2164         uchar: Fix references to overridden functions with GNULIB_NAMESPACE.
2165         * lib/uchar.in.h (btoc32, c32isalnum, c32isalpha, c32isblank,
2166         c32iscntrl, c32isdigit, c32isgraph, c32islower, c32isprint, c32ispunct,
2167         c32isspace, c32isupper, c32isxdigit, c32tolower, c32toupper, c32width,
2168         c32snrtombs, c32srtombs, c32swidth, c32tob, mbsnrtoc32s, mbsrtoc32s,
2169         c32_get_type_test, c32_apply_type_test, c32_get_mapping,
2170         c32_apply_mapping): Use GNULIB_NAMESPACE:: prefix to refer to the gnulib
2171         overridden function.
2172         * modules/uchar (Depends-on): Add wctype-h.
2173         (Makefile.am): Substitute GNULIB_BTOWC, GNULIB_ISWDIGIT,
2174         GNULIB_ISWXDIGIT, GNULIB_WCWIDTH, GNULIB_WCSNRTOMBS, GNULIB_WCSRTOMBS,
2175         GNULIB_WCSWIDTH, GNULIB_WCTOB, GNULIB_MBSNRTOWCS, GNULIB_MBSRTOWCS,
2176         GNULIB_WCTYPE, GNULIB_ISWCTYPE, GNULIB_WCTRANS, GNULIB_TOWCTRANS.
2178 2023-09-07  Bruno Haible  <bruno@clisp.org>
2180         tests: Fix some clang -Wimplicit-fallthrough warnings.
2181         * tests/test-execute-main.c (main): Add 'break' statement.
2182         * tests/test-sys_file.c (main): Likewise.
2184         unictype/category-none: Fix clang -Wpedantic warning.
2185         * lib/unictype/categ_none.c (_UC_CATEGORY_NONE): Use ISO C designated
2186         initializer syntax to initialize the intended field of the union.
2188         c-*snprintf: Fix some clang -Wmissing-prototypes warnings.
2189         * lib/c-snprintf.c: Include c-snprintf.h instead of <stdio.h>.
2190         * lib/c-vsnprintf.c: Include c-vsnprintf.h instead of <stdio.h>.
2191         * lib/c-vasnprintf.c: Include c-vasnprintf.h.
2193 2023-09-06  Bruno Haible  <bruno@clisp.org>
2195         argp: Fix clang -Wextra-semi-stmt warning.
2196         * lib/argp-help.c (SKIPWS): Remove trailing semicolon.
2198 2023-09-06  Bruno Haible  <bruno@clisp.org>
2200         doc: Refine documentation of MSVC support for shared libraries.
2201         * doc/lib-symbol-visibility.texi (Exported Symbols of Shared Libraries):
2202         Recommend to define BUILDING_SHARED as an Autoconf variable. Recommend
2203         to test DLL_EXPORT.
2205 2023-09-06  Bruno Haible  <bruno@clisp.org>
2207         doc: Fix syntax error (regression 2023-09-03).
2208         * doc/posix-headers/sys_stat.texi: Correct @itemize / @end itemize
2209         nesting.
2211 2023-09-05  Bruno Haible  <bruno@clisp.org>
2213         relocatable-lib-lgpl: Don't export symbols from static MSVC .obj files.
2214         Reported by Dmitry Bely <dmitry.bely@gmail.com> in
2215         <https://lists.gnu.org/archive/html/bug-gnu-libiconv/2023-08/msg00002.html>.
2216         * lib/relocatable.h (RELOCATABLE_DLL_EXPORTED): Don't use
2217         __declspec(dllexport) when creating static .obj files with MSVC.
2219 2023-09-05  Bruno Haible  <bruno@clisp.org>
2221         unigbrk/u8-grapheme-{next,prev} tests: Fix gcc -Wformat warnings.
2222         * tests/unigbrk/test-u8-grapheme-next.c (test_u8_grapheme_next): Use
2223         %tu, not %zu, to print a pointer difference.
2224         * tests/unigbrk/test-u16-grapheme-next.c (test_u16_grapheme_next):
2225         Likewise.
2226         * tests/unigbrk/test-u32-grapheme-next.c (test_u32_grapheme_next):
2227         Likewise.
2228         * tests/unigbrk/test-u8-grapheme-prev.c (test_u8_grapheme_prev):
2229         Likewise.
2230         * tests/unigbrk/test-u16-grapheme-prev.c (test_u16_grapheme_prev):
2231         Likewise.
2232         * tests/unigbrk/test-u32-grapheme-prev.c (test_u32_grapheme_prev):
2233         Likewise.
2235 2023-09-05  Bruno Haible  <bruno@clisp.org>
2237         stdint, *printf: Update doc about MSVC.
2238         * doc/posix-headers/stdint.texi: MSVC 14 has <stdint.h>.
2239         * doc/posix-functions/*printf.texi: Current mingw and MSVC 14 support
2240         the j, t, z size specifiers.
2241         * doc/glibc-functions/obstack_*printf.texi: Likewise.
2243 2023-09-05  Bruno Haible  <bruno@clisp.org>
2245         tests: Ensure stderr output is displayed before abort().
2246         * tests/atomic-int-gnulib.h (init_atomic_int): Call fflush(stderr)
2247         before abort().
2248         * tests/atomic-int-isoc.h (init_atomic_int): Likewise.
2249         * tests/atomic-int-posix.h (init_atomic_int): Likewise.
2250         * tests/unigbrk/test-u8-grapheme-breaks.c (test_u8_grapheme_breaks):
2251         Likewise.
2252         * tests/unigbrk/test-u16-grapheme-breaks.c (test_u16_grapheme_breaks):
2253         Likewise.
2254         * tests/unigbrk/test-u32-grapheme-breaks.c (test_u32_grapheme_breaks):
2255         Likewise.
2256         * tests/unigbrk/test-uc-grapheme-breaks.c (test_uc_grapheme_breaks):
2257         Likewise.
2258         * tests/unigbrk/test-ulc-grapheme-breaks.c (main): Likewise.
2259         * tests/unigbrk/test-u8-grapheme-next.c (test_u8_grapheme_next):
2260         Likewise.
2261         * tests/unigbrk/test-u16-grapheme-next.c (test_u16_grapheme_next):
2262         Likewise.
2263         * tests/unigbrk/test-u32-grapheme-next.c (test_u32_grapheme_next):
2264         Likewise.
2265         * tests/unigbrk/test-u8-grapheme-prev.c (test_u8_grapheme_prev):
2266         Likewise.
2267         * tests/unigbrk/test-u16-grapheme-prev.c (test_u16_grapheme_prev):
2268         Likewise.
2269         * tests/unigbrk/test-u32-grapheme-prev.c (test_u32_grapheme_prev):
2270         Likewise.
2272 2023-09-05  Bruno Haible  <bruno@clisp.org>
2274         threads-h: Modernize configure test.
2275         * m4/threads_h.m4 (gl_THREADS_H): In the test program, put the
2276         '_Thread_local' storage class specifier before the type.
2278 2023-09-05  Bruno Haible  <bruno@clisp.org>
2280         Add info about recommended warning options.
2281         * HACKING: New section "Warning Options".
2283 2023-09-04  Bruno Haible  <bruno@clisp.org>
2285         string-buffer tests: Fix a compilation error (regression from today).
2286         * tests/test-string-buffer.c: Include <wchar.h>.
2288         unistr/u{8,16,32}-strtok tests: Fix -Wanalyzer-allocation-size warnings.
2289         * tests/unistr/test-u-strtok.h (test_u_strtok): Correct values of
2290         input_len and delim_len.
2292         sigpipe tests: Fix -Wanalyzer-unsafe-call-within-signal-handler warning.
2293         * tests/test-sigpipe.c (handler): Invoke _exit, not exit.
2294         * tests/test-raise.c (handler): Update comments after 2020-11-25 change.
2296         argp: Distinguish NULL and '\0' from 0.
2297         * lib/argp-pin.c: Include <stddef.h>.
2298         (program_invocation_short_name, program_invocation_name): Use NULL
2299         instead of 0.
2300         * lib/argp-parse.c (convert_options, __argp_parse, __argp_input):
2301         Likewise.
2302         * lib/argp-fmtstream.c (__argp_make_fmtstream): Likewise.
2303         * lib/argp-help.c (make_hol, hol_entry_first_long, hol_find_entry,
2304         hol_append, hol_entry_help, argp_doc, _help): Likewise.
2305         (hol_usage): Use '\0' instead of 0.
2307         argp: Fix gcc -Wanalyzer-use-of-uninitialized-value warning.
2308         * lib/argp-help.c (hol_find_entry): Access hol->entries only after
2309         having verified that hol->num_entries > 0.
2311         unictype/category-byname tests: Fix gcc -Wunused-value warning.
2312         * tests/unictype/test-categ_byname.c (main): Add some tests for category
2313         Nl.
2315         unigbrk/uc-grapheme-breaks tests: Fix gcc -Wunused-function warning.
2316         * tests/unigbrk/test-uc-grapheme-breaks.c
2317         (graphemebreakproperty_to_string): Mark as possibly unused.
2319         bitset, nonblocking-* tests: Fix gcc -Wunused-but-set-variable warnings.
2320         * tests/test-bitset.c (check_zero): Mark 'i' as possibly unused.
2321         * tests/test-nonblocking-reader.h (full_read): Mark 'spent_time' as
2322         possibly unused.
2324 2023-09-04  Bruno Haible  <bruno@clisp.org>
2326         Use statement-expressions without warnings, even in strict ISO C mode.
2327         Suggested by Eric Blake <eblake@redhat.com> in
2328         <https://lists.gnu.org/archive/html/bug-gnulib/2023-09/msg00025.html>.
2329         * lib/error.in.h (__gl_error_call): Use the variant with obvious control
2330         flow also with clang. Use '__extension__' to avoid -Wpedantic warnings.
2331         * lib/math.in.h (gl_signbitf, gl_signbitd, gl_signbitl): Define as
2332         macros even when __STRICT_ANSI__ is defined. But use '__extension__' to
2333         avoid -Wpedantic warnings.
2334         * lib/setenv.c (KNOWN_VALUE): Use '__extension__' to avoid -Wpedantic
2335         warnings.
2336         * lib/xalloc-oversized.h (xalloc_oversized): Use optimized variant even
2337         when __STRICT_ANSI__ is defined. But use '__extension__' to avoid
2338         -Wpedantic warnings.
2340 2023-09-04  Bruno Haible  <bruno@clisp.org>
2342         Fix some g++ warnings "has a different exception specifier".
2343         * m4/gnulib-common.m4 (gl_COMMON_BODY): Make _GL_ATTRIBUTE_NOTHROW
2344         effective in C++ mode.
2345         * lib/attribute.h (ATTRIBUTE_NOTHROW): Add a comment.
2346         * lib/malloc.in.h (_GL_ATTRIBUTE_NOTHROW): Provide fallback definition.
2347         (memalign): Invoke _GL_FUNCDECL_SYS with _GL_ATTRIBUTE_NOTHROW.
2348         * lib/stdio.in.h (_GL_ATTRIBUTE_NOTHROW): Provide fallback definition.
2349         (fdopen): Invoke _GL_FUNCDECL_SYS with _GL_ATTRIBUTE_NOTHROW.
2350         * lib/stdlib.in.h (_GL_ATTRIBUTE_NOTHROW): Provide fallback definition.
2351         (aligned_alloc, calloc, canonicalize_file_name, malloc, realloc): Invoke
2352         _GL_FUNCDECL_SYS with _GL_ATTRIBUTE_NOTHROW.
2353         * lib/string.in.h (_GL_ATTRIBUTE_NOTHROW): Provide fallback definition.
2354         (strdup, strndup): Invoke _GL_FUNCDECL_SYS with _GL_ATTRIBUTE_NOTHROW.
2355         * lib/sys_stat.in.h (_GL_ATTRIBUTE_NOTHROW): Provide fallback
2356         definition.
2357         (getumask): Invoke _GL_FUNCDECL_SYS with _GL_ATTRIBUTE_NOTHROW.
2358         * lib/wchar.in.h (_GL_ATTRIBUTE_NOTHROW): Provide fallback definition.
2359         (wcsdup): Invoke _GL_FUNCDECL_SYS with _GL_ATTRIBUTE_NOTHROW.
2361 2023-09-04  Bruno Haible  <bruno@clisp.org>
2363         unistr/u{8,16,32}-strchr tests: Fix some gcc -Wshadow warnings.
2364         * tests/unistr/test-strchr.h (test_strchr): Reduce of scope of local
2365         variable 'i'.
2367         unistr/u{8,16,32}-chr tests: Fix some gcc -Wshadow warnings.
2368         * tests/unistr/test-chr.h (main): Reduce of scope of local variables
2369         'i' and 'page_boundary'.
2371         pipe-filter-gi, pipe-filter-ii tests: Fix some gcc -Wshadow warnings.
2372         * tests/test-pipe-filter-gi1.c (main): Rename local variable 'argv' to
2373         'tr_argv'.
2374         * tests/test-pipe-filter-ii1.c (main): Likewise.
2376         argv-iter tests: Avoid gcc -Wanalyzer-out-of-bounds warning.
2377         * tests/test-argv-iter.c (main): Simplify logic.
2379         crypto/{gc-rijndael,rijndael} tests: Fix some gcc -Wshadow warnings.
2380         * tests/test-gc-rijndael.c (main): Rename local variable 'i' to 'round'.
2381         * tests/test-rijndael.c (main): Likewise.
2383         threads-h tests: Fix gcc -Wold-style-declaration warning.
2384         * tests/test-thread_local.c (value0, value1, value2, value3): Put the
2385         'thread_local' storage class specifier before the type.
2387         ieee754-h tests: Fix some gcc -Wmissing-field-initializers warnings.
2388         * tests/test-ieee754-h.c (float_tests): Use float literals.
2389         (double_tests): Use double literals. Initialize frac_lo.
2391         string-buffer tests: Fix a gcc -Wformat warning.
2392         * tests/test-string-buffer.c: Don't assume that wint_t has the same size
2393         as 'int'.
2395         crypto/* tests: Fix some gcc -Wdiscarded-qualifiers warnings.
2396         * tests/test-gc-hmac-md5.c (main): Change type of variables with a
2397         string literal initializer to 'const char *'.
2398         * tests/test-gc-hmac-sha1.c (main): Likewise.
2399         * tests/test-gc-hmac-sha256.c (main): Likewise.
2400         * tests/test-gc-hmac-sha512.c (main): Likewise.
2401         * tests/test-gc-md2.c (main): Likewise.
2402         * tests/test-gc-md5.c (main): Likewise.
2403         * tests/test-gc-sha1.c (main): Likewise.
2404         * tests/test-gc-sha256.c (main): Likewise.
2405         * tests/test-gc-sha512.c (main): Likewise.
2406         * tests/test-hmac-md5.c (main): Likewise.
2407         * tests/test-hmac-sha1.c (main): Likewise.
2408         * tests/test-hmac-sha256.c (main): Likewise.
2409         * tests/test-hmac-sha512.c (main): Likewise.
2411         file-has-acl: Avoid gcc warning.
2412         * lib/acl-internal.h (MIN): Remove definition.
2414 2023-09-03  Paul Eggert  <eggert@cs.ucla.edu>
2416         same-inode, stat-size: support pointers too
2417         Add functions and macros so that we can test pointers to struct
2418         stat as well as plain struct stat.  This lets coreutils deal with
2419         structs that are only partly initialized, without relying on
2420         undefined behavior.
2421         * NEWS: Mention this.
2422         * doc/posix-headers/sys_stat.texi, doc/stat-size.texi:
2423         Mention this and modernize.
2424         * lib/at-func2.c (at_func2):
2425         * lib/fts.c (same_fd):
2426         * lib/rename.c (rpl_rename) [RENAME_HARD_LINK_BUG]:
2427         * lib/same-inode.c: New file.
2428         * lib/same.c (same_nameat):
2429         * lib/term-style-control.c (activate_term_style_controller):
2430         Prefer psame_inode (a, b) to SAME_INODE (*a, *b).
2431         * lib/hash-triple-simple.c (triple_compare_ino_str):
2432         * lib/hash-triple.c (triple_compare):
2433         Prefer PSAME_INODE (a, b) to SAME_INODE (*a, *b).
2434         psame_inode is not suitable since the args are not struct stat *.
2435         * lib/same-inode.h: Check that config.h is included first.
2436         (SAME_INODE_INLINE, PSAME_INODE): New macros.
2437         (SAME_INODE): Reimplement in terms of PSAME_INODE.
2438         (psame_inode): New function.
2439         * lib/stat-size.h (STP_BLKSIZE, STP_NBLOCKS): New macros.
2440         (ST_BLKSIZE, ST_NBLOCKS): Use them.
2441         * lib/term-style-control.c (log_signal_handler_called):
2442         Always define as a function, to pacify -Wunused*.
2443         * modules/canonicalize-lgpl-tests (Files): Add m4/musl.m4.
2444         (Depends-on): Call gl_MUSL_LIBC.
2445         * modules/same-inode (Files): Add same-inode.c.
2446         (Depends-on): Add extern-inline, stdbool.
2447         (lib_SOURCES): New macro.
2448         * tests/test-binary-io.c, tests/test-canonicalize-lgpl.c:
2449         * tests/test-canonicalize.c, tests/test-cloexec.c:
2450         * tests/test-dup-safer.c, tests/test-dup2.c, tests/test-error.c:
2451         * tests/test-fcntl.c, tests/test-fdopendir.c, tests/test-fgetc.c:
2452         * tests/test-fputc.c, tests/test-fread.c, tests/test-fstat.c:
2453         * tests/test-fstatat.c, tests/test-ftruncate.c:
2454         * tests/test-fwrite.c, tests/test-getcwd.c:
2455         * tests/test-getdtablesize.c, tests/test-isblank.c:
2456         * tests/test-linkat.c, tests/test-lock.c, tests/test-lstat.h:
2457         * tests/test-malloc-gnu.c, tests/test-openat.c:
2458         * tests/test-pthread-thread.c, tests/test-pthread_sigmask1.c:
2459         * tests/test-pthread_sigmask2.c, tests/test-ptsname.c:
2460         * tests/test-ptsname_r.c, tests/test-raise.c:
2461         * tests/test-realloc-gnu.c, tests/test-rwlock1.c:
2462         * tests/test-sigprocmask.c, tests/test-snprintf.c:
2463         * tests/test-stat.h, tests/test-term-style-control-hello.c:
2464         * tests/test-term-style-control-yes.c, tests/test-thread_create.c:
2465         * tests/test-unlinkat.c, tests/test-vasnprintf.c:
2466         * tests/test-xalloc-die.c:
2467         Adjust to these changes, and fix some warnings elicited by
2468         -Wall -Wextra that I ran into while testing.
2469         * top/maint.mk (sc_prohibit_stat_st_blocks): Mention STP_NBLOCKS.
2471 2023-09-02  Bruno Haible  <bruno@clisp.org>
2473         alignalloc: Fix license header.
2474         Suggested by Paul Eggert in
2475         <https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00170.html>.
2476         * lib/alignalloc.h: Make license header consistent with module
2477         description.
2478         * lib/alignalloc.c: Likewise.
2480 2023-09-01  Bruno Haible  <bruno@clisp.org>
2482         crypto/{sha*,md5}-buffer: Add comment.
2483         * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Add comment regarding license.
2485 2023-09-01  Bruno Haible  <bruno@clisp.org>
2487         crypto/{sha*,md5,sm3}-buffer: Fix --with-openssl (regr. 2023-08-26).
2488         Reported by Agostino Sarubbo via Sam James <sam@gentoo.org> in
2489         <https://lists.gnu.org/archive/html/bug-gnulib/2023-09/msg00000.html>.
2490         * lib/sha1.h: Test the OpenSSL major version before attempting to
2491         include <openssl/configuration.h>.
2492         * lib/sha256.h: Likewise.
2493         * lib/sha512.h: Likewise.
2494         * lib/md5.h: Likewise.
2495         * lib/sm3.h: Likewise.
2497 2023-08-31  Bruno Haible  <bruno@clisp.org>
2499         readutmp: Fix memory leak introduced by last commit.
2500         * lib/readutmp.c (read_utmp_from_systemd): If num_sessions == 0 and
2501         sessions != NULL, do call free (sessions).
2503 2023-08-30  Paul Eggert  <eggert@cs.ucla.edu>
2505         readutmp: fix core dump if --enable-systemd
2506         Problem reported by Thorsten Kukuk <https://bugs.gnu.org/65617>.
2507         * lib/readutmp.c (read_utmp_from_systemd):
2508         Don’t assume session_ptr != NULL if num_sessions == 0.
2509         In practice it can be null, and the man page OKs this behavior.
2511 2023-08-30  Bruno Haible  <bruno@clisp.org>
2513         doc: Mention the module 'wchar-single'.
2514         * doc/multithread.texi: Mention the module 'wchar-single'.
2516 2023-08-30  Paul Eggert  <eggert@cs.ucla.edu>
2518         wchar-single: fix module broken since 2021
2519         Adjust to 2021-03-07 change “Rename GNULIB_WCHAR_SINGLE to
2520         GNULIB_WCHAR_SINGLE_LOCALE”.  Apparently nobody noticed that
2521         the module was broken.  Perhaps we should obsolete the module?
2522         * modules/wchar-single (GNULIB_WCHAR_SINGLE_LOCALE): Define.
2524 2023-08-29  Bruno Haible  <bruno@clisp.org>
2526         wctype: Rely on module iswpunct.
2527         * m4/wctype.m4 (gl_FUNC_WCTYPE): Also test whether the "punct" class
2528         works.
2529         * modules/wctype (Depends-on): Add iswpunct.
2530         * tests/test-iswctype.c (main): Add more tests of the "punct" class.
2531         * doc/posix-functions/wctype.texi: Mention the Android problem.
2533         c32ispunct: Rely on module iswpunct.
2534         * modules/c32ispunct (Depends-on): Add iswpunct.
2535         * tests/test-c32ispunct.c (main): Add a few more tests in the "C"
2536         locale.
2538         iswpunct: Add tests.
2539         * tests/test-iswpunct.c: New file, based on tests/test-iswdigit.c and
2540         tests/test-c32ispunct.c.
2541         * tests/test-iswpunct.sh: New file, based on tests/test-iswdigit.sh.
2542         * modules/iswpunct-tests: New file.
2544         iswpunct: New module.
2545         * lib/wctype.in.h (iswpunct): New declaration.
2546         * lib/iswpunct.c: New file.
2547         * m4/iswpunct.m4: New file.
2548         * m4/wctype_h.m4 (gl_WCTYPE_H_REQUIRE_DEFAULTS): Initialize
2549         GNULIB_ISWPUNCT.
2550         (gl_WCTYPE_H_DEFAULTS): Initialize REPLACE_ISWPUNCT.
2551         * modules/wctype-h (Makefile.am): Substitute GNULIB_ISWPUNCT,
2552         REPLACE_ISWPUNCT.
2553         * modules/iswpunct: New file.
2554         * doc/posix-functions/iswpunct.texi: Mention the new module.
2556         wctype-h tests: Add more tests.
2557         * tests/test-wctype-h.c (main): Add a sanity check of iswpunct.
2559 2023-08-29  Bruno Haible  <bruno@clisp.org>
2561         iswdigit, iswxdigit: Fix documentation.
2562         * doc/posix-functions/iswdigit.texi: Mention the module 'iswdigit'.
2563         * doc/posix-functions/iswxdigit.texi: Mention the module 'iswxdigit'.
2565 2023-08-29  Bruno Haible  <bruno@clisp.org>
2567         wctype: Fix documentation (mistake 2023-07-26).
2568         * doc/posix-functions/wctype.texi: The "blank" argument problem on mingw
2569         is now worked around by Gnulib.
2571 2023-08-26  Paul Eggert  <eggert@cs.ucla.edu>
2573         trim: do not over-allocate result
2574         * lib/trim.c: Include mbuiterf.h, not mbiterf.h, since we no
2575         longer compute strlen at first.
2576         (trim2): Do not over-allocate result and then trim the parts we
2577         don’t want.  Instead, skip unwanted input before allocating,
2578         so that the result is just the right size.  Use mempcpy
2579         instead of memmove.  Simplify.
2580         * modules/trim (Depends-on): Remove mbiterf, memmove, strdup, xalloc.
2581         Add mbuiterf, mempcpy, xalloc-die.
2583 2023-08-26  Paul Eggert  <eggert@cs.ucla.edu>
2585         propername: tune single-byte code
2586         * lib/propername.c (mbsstr_trimmed_wordbounded): Cache MB_CUR_MAX.
2587         Simplify word boundary detection in single-byte code.
2589 2023-08-26  Paul Eggert  <eggert@cs.ucla.edu>
2591         Tune single-byte code involving tolower
2592         * lib/mbmemcasecmp.c (mbmemcasecmp):
2593         * lib/mbscasecmp.c (mbscasecmp):
2594         * lib/mbscasestr.c (mbscasestr):
2595         * lib/mbsncasecmp.c (mbsncasecmp):
2596         * lib/mbspcasecmp.c (mbspcasecmp):
2597         Avoid some unnecessary calls to tolower.  For example, if the two
2598         single-byte characters are equal before downcasing there is no
2599         need to call tolower on either character.
2601 2023-08-26  Bruno Haible  <bruno@clisp.org>
2603         c32width tests: Avoid failure on FreeBSD 12.
2604         * tests/test-c32width.c (main): Skip two tests on FreeBSD < 13.
2606 2023-08-26  Bruno Haible  <bruno@clisp.org>
2608         crypto/{sha*,md5,sm3}-buffer: Ignore too old OpenSSL versions.
2609         * lib/sha1.h: If <openssl/macros.h> would give a compile-time error,
2610         undefine HAVE_OPENSSL_SHA1.
2611         * lib/sha256.h: If <openssl/macros.h> would give a compile-time error,
2612         undefine HAVE_OPENSSL_SHA256.
2613         * lib/sha512.h: If <openssl/macros.h> would give a compile-time error,
2614         undefine HAVE_OPENSSL_SHA512.
2615         * lib/md5.h: If <openssl/macros.h> would give a compile-time error,
2616         undefine HAVE_OPENSSL_MD5.
2617         * lib/sm3.h: If <openssl/macros.h> would give a compile-time error,
2618         undefine HAVE_OPENSSL_SM3.
2620 2023-08-26  Bruno Haible  <bruno@clisp.org>
2622         selinux-h: Add a comment.
2623         * lib/se-selinux.in.h: Clarify which #endif belongs to the
2624         double-inclusion guard.
2626 2023-08-26  Bruno Haible  <bruno@clisp.org>
2628         sys_utsname: Make double-inclusion guard more robust.
2629         * lib/sys_utsname.in.h: Test the guard symbol a second time.
2631 2023-08-26  Bruno Haible  <bruno@clisp.org>
2633         sys_times: Make double-inclusion guard more robust.
2634         * lib/sys_times.in.h: Test the guard symbol a second time.
2636 2023-08-26  Bruno Haible  <bruno@clisp.org>
2638         uchar: Make #include_next work right.
2639         * lib/uchar.in.h: Use a split double-inclusion guard.
2641 2023-08-26  Paul Eggert  <eggert@cs.ucla.edu>
2643         utimens: update FIXME date
2644         * lib/utimens.c (fdutimens): Change FIXME date to agree with
2645         similar FIXME in utimensat.c.
2647 2023-08-24  Paul Eggert  <eggert@cs.ucla.edu>
2649         exclude: refactor for more-modern style
2650         * lib/exclude.c: Sort include directives.
2651         (fnmatch_pattern_has_wildcards, file_name_matches):
2652         Prefer ‘true’ to ‘1’.
2653         (string_hasher, string_compare, string_compare_ci):
2654         Avoid unnecessary locals.
2655         (string_free): Remove.  All callers changed to just use ‘free’.
2656         (new_exclude_segment): Prefer xmalloc to xzalloc when it’s
2657         clearer to initialize ourselves.
2658         (new_exclude_segment, exclude_patopts, add_exclude_fp):
2659         Prefer nullptr to NULL.
2660         (free_exclude_segment, file_pattern_matches):
2661         Avoid unnecessary nesting.
2662         (free_exclude, fnmatch_no_wildcards, exclude_fnmatch)
2663         (excluded_file_name, add_exclude, add_exclude_fp):
2664         Assume C99 decl syntax.
2665         (fnmatch_no_wildcards): Prefer idx_t to size_t.
2666         (exclude_fnmatch, add_exclude_fp): Prefer ‘f (x)’ to ‘(*f) (x)’.
2667         (add_exclude): Help compiler by refactoring search for
2668         trailing slashes.  Avoid unnecessary cast to char *.
2669         * modules/exclude (Depends-on): Add nullptr.
2671 2023-08-21  Paul Eggert  <eggert@cs.ucla.edu>
2673         unlocked-io: fix getc_unlocked typo
2674         * lib/unlocked-io.h (getc): Fix misspelling of ‘getc_unlocked’.
2676 2023-08-21  Bruno Haible  <bruno@clisp.org>
2678         alignasof, stdalign: Fix a compilation error in C++ mode on FreeBSD 12.
2679         * m4/stdalign.m4 (gl_ALIGNASOF): In C++ mode, prefer __builtin_offsetof
2680         over offsetof when possible, since __builtin_offsetof works also when
2681         <stddef.h> has not been fully included yet.
2683 2023-08-21  Bruno Haible  <bruno@clisp.org>
2685         wcsstr: Relicense under LGPLv2+.
2686         * modules/wcsstr (License): Change to LGPLv2+.
2688         wcsstr-simple: Relicense under LGPLv2+.
2689         * modules/wcsstr-simple (License): Change to LGPLv2+.
2690         * lib/wcsstr.c: Update license notice.
2691         * lib/wcsstr-impl.h: Update license notice. The code added here on
2692         2023-03-27 was under LGPLv2+.
2694         wmemcmp: Relicense under LGPLv2+.
2695         * modules/wmemcmp (License): Change to LGPLv2+.
2696         * lib/wmemcmp.c: Update license notice.
2697         * lib/wmemcmp-impl.h: Likewise.
2699         wcschr: Relicense under LGPLv2+.
2700         * modules/wcschr (License): Change to LGPLv2+.
2701         * lib/wcschr.c: Update license notice.
2702         * lib/wcschr-impl.h: Likewise.
2704 2023-08-21  Bruno Haible  <bruno@clisp.org>
2706         unistr/u32-strlen: Complete license change from 2023-07-23.
2707         * lib/unistr/u-strlen.h: Update license notice.
2709 2023-08-21  Bruno Haible  <bruno@clisp.org>
2711         isnanl: Relicense under LGPLv2+.
2712         * modules/isnanl (License): Change to LGPLv2+.
2714 2023-08-20  Paul Eggert  <eggert@cs.ucla.edu>
2716         ldexp: port to non-two’s complement
2717         * lib/ldexp.c (FUNC): Don’t assume two’s-complement.
2719 2023-08-20  Bruno Haible  <bruno@clisp.org>
2721         readutmp, boot-time: Fix the result on runit and s6 init systems.
2722         * lib/boot-time-aux.h (get_linux_boot_time_fallback): Try also
2723         /var/lib/urandom/random-seed. Try /var/run/utmp last.
2725 2023-08-20  Paul Eggert  <eggert@cs.ucla.edu>
2727         ldexp: fix INT_MIN infloop
2728         * lib/ldexp.c (FUNC): Instead of converting EXP to unsigned,
2729         work on it directly.  This simplifies the code and avoids
2730         an infinite loop when EXP == INT_MIN.
2731         * modules/ldexp, modules/ldexpl: Depend on stdbool.
2732         * tests/test-ldexp.h: Include <limits.h> for INT_MIN.
2733         (test_function): Test for infloop.
2735 2023-08-20  Bruno Haible  <bruno@clisp.org>
2737         ldexp: Fix compilation error in C++ mode.
2738         * lib/math.in.h (ldexp): Use _GL_CXXALIASWARN1, not _GL_CXXALIASWARN.
2740 2023-08-19  Bruno Haible  <bruno@clisp.org>
2742         ldexp: Work around OpenBSD/mips64 bug.
2743         * lib/math.in.h (ldexp): New declaration.
2744         * lib/ldexp.c: New file, based on lib/ldexpl.c.
2745         * lib/ldexpl.c: Moved the implementation to lib/ldexp.c. Just include
2746         it.
2747         * m4/math_h.m4 (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_LDEXP.
2748         (gl_MATH_H_DEFAULTS): Initialize REPLACE_LDEXP.
2749         * m4/ldexp.m4 (gl_FUNC_LDEXP): Require gl_MATH_H_DEFAULTS and
2750         gl_FUNC_ISNAND. Invoke gl_FUNC_LDEXP_WORKS. Set REPLACE_LDEXP. Consider
2751         it when setting LDEXP_LIBM.
2752         (gl_FUNC_LDEXP_WORKS): New macro.
2753         * modules/math (Makefile.am): Substitute GNULIB_LDEXP, REPLACE_LDEXP.
2754         * modules/ldexp (Files): Add lib/ldexp.c.
2755         (Depends-on): Add math, isnand.
2756         (configure.ac): Set GL_COND_OBJ_LDEXP. Invoke gl_MATH_MODULE_INDICATOR.
2757         (Makefile.am): Conditionally compile ldexp.c.
2758         * modules/ldexpl (Files): Add lib/ldexp.c.
2759         * doc/posix-functions/ldexp.texi: Mention the OpenBSD bug.
2761 2023-08-19  Bruno Haible  <bruno@clisp.org>
2763         ldexpl: Relicense under LGPLv2+.
2764         * modules/ldexpl (License): Change to LGPLv2+.
2765         * lib/ldexpl.c: Update license notice.
2767 2023-08-19  Bruno Haible  <bruno@clisp.org>
2769         isnand: Relicense under LGPLv2+.
2770         * modules/isnand (License): Change to LGPLv2+.
2772 2023-08-19  Bruno Haible  <bruno@clisp.org>
2774         ldexpl: Avoid possible -Wshadow warning.
2775         * lib/ldexpl.c (exp): Locally rename to 'exponent'.
2777         ldexpl: Fix signed integer overflow.
2778         * lib/ldexpl.c (ldexpl): Use an 'unsigned int' variable to represent the
2779         absolute value of exp without overflow.
2781 2023-08-19  Bruno Haible  <bruno@clisp.org>
2783         logbl: Work around endless loop on OpenBSD 7.3/mips64.
2784         * m4/logbl.m4 (gl_FUNC_LOGBL_WORKS): Terminate the test program if it
2785         takes longer than 5 seconds.
2786         * doc/posix-functions/logbl.texi: Mention the OpenBSD bug.
2788 2023-08-18  Bruno Haible  <bruno@clisp.org>
2790         thrd: Work around thrd_join bug on AIX 7.3.1.
2791         * m4/threads_h.m4 (gl_THREADS_H): Test against AIX 7 thrd_join bug. Set
2792         BROKEN_THRD_JOIN.
2793         (gl_THREADS_H_DEFAULTS): Initialize BROKEN_THRD_JOIN.
2794         * m4/thrd.m4 (gl_FUNC_THRD_JOIN): Set REPLACE_THRD_* to 1 also if
2795         BROKEN_THRD_JOIN is 1. Define BROKEN_THRD_START_T_OR_JOIN instead of
2796         BROKEN_THRD_START_T.
2797         * modules/threads-h (Makefile.am): Substitute BROKEN_THRD_JOIN.
2798         * lib/threads.in.h (rpl_thrd_t, thrd_t): Define also if BROKEN_THRD_JOIN
2799         is 1.
2800         * lib/thrd.c: Test BROKEN_THRD_START_T_OR_JOIN instead of
2801         BROKEN_THRD_START_T.
2802         * doc/posix-functions/thrd_join.texi: Update.
2803         * doc/posix-functions/thrd_exit.texi: Likewise.
2805         thrd: Refactor.
2806         * m4/thrd.m4 (gl_FUNC_THRD_JOIN): Define BROKEN_THRD_JOIN_NULL, not
2807         BROKEN_THRD_JOIN. Rename gl_cv_func_thrd_join_works to
2808         gl_cv_func_thrd_join_null_works.
2809         * lib/thrd.c: Test BROKEN_THRD_JOIN_NULL instead of BROKEN_THRD_JOIN.
2811 2023-08-18  Bruno Haible  <bruno@clisp.org>
2813         thrd tests: Add unit test for thrd_exit.
2814         * tests/test-thrd_exit.c: New file, based on tests/test-thrd_create.c.
2815         * modules/thrd-tests (Files): Add it.
2816         (Makefile.am): Compile and run it.
2818         thrd: On AIX 7.1 and 7.2, override also thrd_exit.
2819         * lib/threads.in.h (thrd_exit): Consider REPLACE_THRD_EXIT.
2820         * lib/thrd.c (rpl_thrd_exit): New function.
2821         * m4/threads_h.m4 (gl_THREADS_H_DEFAULTS): Initialize REPLACE_THRD_EXIT.
2822         * m4/thrd.m4 (gl_FUNC_THRD_JOIN): Set also REPLACE_THRD_EXIT and adjust
2823         LIBSTDTHREAD.
2824         * modules/threads-h (Makefile.am): Substitute REPLACE_THRD_EXIT.
2825         * doc/posix-functions/thrd_exit.texi: Mention the AIX thrd_join problem
2826         also here.
2828 2023-08-18  Bruno Haible  <bruno@clisp.org>
2830         aligned_alloc: Fix test failure on AIX 7.3 with ibm-clang.
2831         * m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Use 'volatile', to
2832         disable optimization of ibm-clang -O2.
2833         * doc/posix-functions/aligned_alloc.texi: Update version info.
2835 2023-08-18  Bruno Haible  <bruno@clisp.org>
2837         sys_socket: Fix compilation errors in C++ mode on AIX 7.3 with gcc.
2838         * lib/sys_socket.in.h (accept, getpeername, getsockname, recvfrom):
2839         Disable _GL_CXXALIASWARN invocation on non-glibc systems.
2841 2023-08-18  Bruno Haible  <bruno@clisp.org>
2843         stddef: Don't unnecessarily override max_align_t on AIX 7.3 with gcc.
2844         * lib/stddef.in.h (max_align_t, GNULIB_defined_max_align_t): Don't
2845         define or override if HAVE_MAX_ALIGN_T is 1.
2847 2023-08-18  Bruno Haible  <bruno@clisp.org>
2849         uptime: Deprecate.
2850         Suggested by Paul Eggert in
2851         <https://lists.gnu.org/archive/html/bug-coreutils/2023-08/msg00070.html>.
2852         * modules/uptime (Status, Notice): New sections.
2854 2023-08-17  Bruno Haible  <bruno@clisp.org>
2856         Recognize the *-*-windows* config triplets introduced on 2023-06-26.
2857         * m4/*.m4: Treat windows* as equivalent to mingw*.
2858         * modules/*: Likewise.
2860 2023-08-16  Bruno Haible  <bruno@clisp.org>
2862         mbrtoc32-regular: Make it work as expected on glibc 2.12.
2863         * lib/mbrtoc32.c (mbrtoc32): If necessary, clear the mbstate_t after
2864         mbrtowc() returned.
2866 2023-08-16  Bruno Haible  <bruno@clisp.org>
2868         fnmatch: Override fnmatch from glibc versions < 2.22.
2869         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Force REPLACE_FNMATCH=1 in
2870         glibc versions < 2.22.
2872 2023-08-16  Bruno Haible  <bruno@clisp.org>
2874         tests: Avoid some test failures on Slackware 13.37.
2875         * tests/test-c32isalnum.c (main): Disable GB18030 tests on
2876         glibc 2.13..2.15.
2877         * tests/test-c32isalpha.c (main): Likewise.
2878         * tests/test-c32isblank.c (main): Likewise.
2879         * tests/test-c32iscntrl.c (main): Likewise.
2880         * tests/test-c32isdigit.c (main): Likewise.
2881         * tests/test-c32isgraph.c (main): Likewise.
2882         * tests/test-c32islower.c (main): Likewise.
2883         * tests/test-c32isprint.c (main): Likewise.
2884         * tests/test-c32ispunct.c (main): Likewise.
2885         * tests/test-c32isspace.c (main): Likewise.
2886         * tests/test-c32isupper.c (main): Likewise.
2887         * tests/test-c32isxdigit.c (main): Likewise.
2888         * tests/test-c32rtomb.c (main): Likewise.
2889         * tests/test-c32snrtombs.c (main): Likewise.
2890         * tests/test-c32srtombs.c (main): Likewise.
2891         * tests/test-c32stombs.c (main): Likewise.
2892         * tests/test-c32tolower.c (main): Likewise.
2893         * tests/test-c32toupper.c (main): Likewise.
2894         * tests/test-fnmatch.c (main): Likewise.
2895         * tests/test-mbrtoc16.c (main): Likewise.
2896         * tests/test-mbrtoc32.c (main): Likewise.
2897         * tests/test-mbsnrtoc32s.c (main): Likewise.
2898         * tests/test-mbsrtoc32s.c (main): Likewise.
2899         * tests/test-mbstoc32s.c (main): Likewise.
2901 2023-08-15  Bruno Haible  <bruno@clisp.org>
2903         readutmp tests: Add test against today's bug.
2904         * tests/test-readutmp.c (main): Verify that there is exactly one
2905         BOOT_TIME entry.
2907         readutmp: Fix for platforms without ut_type (regression 2023-08-08).
2908         * lib/readutmp.h (UT_TYPE_BOOT_TIME, UT_TYPE_USER_PROCESS): Don't use
2909         UT_TYPE_EQ macro.
2910         (IS_USER_PROCESS): Don't use UT_USER, UT_TYPE_NOT_DEFINED macros.
2911         * lib/readutmp.c (IS_USER_PROCESS): Don't override.
2913 2023-08-14  Bruno Haible  <bruno@clisp.org>
2915         readutmp, boot-time: Don't use __UT_* symbols (regression 2023-08-11).
2916         * lib/readutmp.h (_GL_UT_USER_SIZE, _GL_UT_ID_SIZE, _GL_UT_LINE_SIZE,
2917         _GL_UT_HOST_SIZE): New macros.
2918         (struct utmpx32): Use them.
2920 2023-08-14  Bruno Haible  <bruno@clisp.org>
2922         readutmp, boot-time: Fix build on 32-bit glibc (regression 2023-08-11).
2923         Reported by Andreas Schwab <schwab@suse.de> in
2924         <https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00125.html>.
2925         * lib/readutmp.h (struct utmpx32): Reference __UT_NAMESIZE, not
2926         __UT_USERSIZE.
2928 2023-08-13  Bruno Haible  <bruno@clisp.org>
2930         stdint: Fix configure test result with gcc 4.7 or 4.8.
2931         * m4/stdint.m4 (gl_STDINT_H): Don't assume that _Generic works with
2932         GCC versions < 4.9 with -std=gnu11.
2934 2023-08-13  Bruno Haible  <bruno@clisp.org>
2936         Fix some test module descriptions.
2937         * modules/boot-time-tests (Files): Add tests/macros.h.
2938         * modules/dprintf-gnu-tests (Files): Likewise.
2939         * modules/fclose-tests (Files): Likewise.
2940         * modules/getcwd-tests (Files): Likewise.
2941         * modules/lock-tests (Files): Likewise.
2942         * modules/nullptr-c++-tests (Files): Likewise.
2943         * modules/posix_spawn-tests (Files): Likewise.
2944         * modules/posix_spawnp-tests (Files): Likewise.
2945         * modules/readutmp-tests (Files): Likewise.
2946         * modules/sh-quote-tests (Files): Likewise.
2947         * modules/unigbrk/u16-grapheme-breaks-tests (Files): Likewise.
2948         * modules/unigbrk/u16-grapheme-next-tests (Files): Likewise.
2949         * modules/unigbrk/u16-grapheme-prev-tests (Files): Likewise.
2950         * modules/unigbrk/u32-grapheme-breaks-tests (Files): Likewise.
2951         * modules/unigbrk/u32-grapheme-next-tests (Files): Likewise.
2952         * modules/unigbrk/u32-grapheme-prev-tests (Files): Likewise.
2953         * modules/unigbrk/u8-grapheme-breaks-tests (Files): Likewise.
2954         * modules/unigbrk/u8-grapheme-next-tests (Files): Likewise.
2955         * modules/unigbrk/u8-grapheme-prev-tests (Files): Likewise.
2956         * modules/unigbrk/uc-grapheme-breaks-tests (Files): Likewise.
2958 2023-08-13  Bruno Haible  <bruno@clisp.org>
2960         nproc, physmem: Use sysctl() as a fallback on GNU/kFreeBSD.
2961         * lib/nproc.c: Do include <sys/sysctl.h> on GNU/kFreeBSD.
2962         (num_processors_ignoring_omp): Call sysctl on GNU/kFreeBSD.
2963         * lib/physmem.c: Do include <sys/sysctl.h> on GNU/kFreeBSD.
2964         (physmem_total, physmem_available): Call sysctl on GNU/kFreeBSD.
2966 2023-08-13  Bruno Haible  <bruno@clisp.org>
2968         physmem: Add tests.
2969         * tests/test-physmem.c: New file.
2970         * modules/physmem-tests: New file.
2972 2023-08-13  Bruno Haible  <bruno@clisp.org>
2974         readutmp, boot-time: Fix warning on glibc 2.30..2.31 on Linux.
2975         Reported by Pádraig Brady in
2976         <https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00110.html>.
2977         * lib/readutmp.c: Don't include <sys/sysctl.h> on glibc/Linux.
2978         * lib/boot-time.c: Likewise.
2980 2023-08-13  Paul Eggert  <eggert@cs.ucla.edu>
2982         fts: improve memory-allocation errno handling
2983         * lib/fts.c (fts_read, fts_build): When enter_dir or setup_dir
2984         fails, report its errno value back to the user.
2985         (internal_function): Preserve errno.
2986         * modules/fts (Depends-on): Add calloc-posix, free-posix,
2987         malloc-posix, and realloc-posix, for better errno handling
2988         on allocation failures.
2990         hash: set errno on failure
2991         * lib/hash.c: Include errno.h.
2992         (compute_bucket_size, hash_initialize, hash_rehash)
2993         (hash_insert_if_absent): Set errno reliably on failure.
2994         (hash_free): Preserve errno, like plain 'free'.
2995         * modules/hash (Depends-on): Depend on calloc-posix,
2996         free-posix, malloc-posix, so that errno is set reliably.
2998 2023-08-13  Bruno Haible  <bruno@clisp.org>
3000         readutmp, boot-time: Fix compilation error on old Android.
3001         Reported by Po Lu in
3002         <https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00108.html>.
3003         * lib/readutmp.h (BOOT_TIME): Add fallback.
3005 2023-08-13  Bruno Haible  <bruno@clisp.org>
3007         readutmp, boot-time: Fix compilation error on Android API 8.
3008         Reported by Po Lu in
3009         <https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00108.html>.
3010         * m4/readutmp.m4 (gl_PREREQ_READUTMP_H): Test whether sysinfo is
3011         declared.
3012         * lib/boot-time-aux.h (get_linux_uptime): Invoke sysinfo only if it is
3013         declared.
3014         * doc/glibc-functions/sysinfo.texi: Mention the Android problem.
3016 2023-08-13  Bruno Haible  <bruno@clisp.org>
3018         readutmp, boot-time: Fix compilation error on old Android.
3019         Reported by Po Lu in
3020         <https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00108.html>.
3021         * lib/readutmp.c (endutent): New fallback declaration, for Android.
3022         (getutent): Remove Ultrix workaround from 2000-04-05.
3023         * lib/boot-time.c: Likewise.
3024         * m4/readutmp.m4 (gl_PREREQ_READUTMP_H): Test whether endutent is
3025         declared, not getutent.
3026         * doc/glibc-functions/endutent.texi: Mention the Android bug.
3028 2023-08-12  Paul Eggert  <eggert@cs.ucla.edu>
3030         boot-time,readutmp: do not depend on c-strtod
3031         * lib/boot-time-aux.h (get_linux_uptime): Compute struct timespec
3032         using integer arithmetic rather than double.
3033         * lib/boot-time.c, lib/readutmp.c: Don’t include c-strtod.h.
3034         * modules/boot-time, modules/readutmp (Depends-on): Remove c-strtod.
3036         boot-time,readutmp: remove -lrt usage
3037         This code uses clock-relevant functions only on platforms
3038         that do not need -lrt.
3039         * m4/readutmp.m4 (gl_READUTMP): Do not require gl_CLOCK_TIME
3040         or add CLOCK_TIME_LIB to READUTMP_LIB.
3041         * modules/boot-time (Link): No need to link with CLOCK_TIME_LIB.
3043         boot-time,readutmp: do not depend on fopen-gnu
3044         These modules should work well enough even if fopen is not fixed
3045         to conform to fopen-gnu standards.  The only gotcha I can see is
3046         older fopen implementations that lack support for "e", and
3047         a potential O_CLOEXEC leak is not worth worrying about.
3048         * modules/boot-time (Depends-on):
3049         * modules/readutmp (Depends-on):
3050         Remove fopen-gnu.
3052         readutmp: do not depend on timespec_get
3053         boot-time code no longer needs it.
3054         * modules/readutmp (Depends-on): Remove timespec_get.
3056         boot-time: do not depend on timespec_get
3057         This is for Emacs, which does not use timespec_get now
3058         and which likes to minimize dependencies.
3059         Also, treat musl libc like recent glibc,
3060         and fix a timespec_get return value typo.
3061         * lib/boot-time-aux.h (get_linux_uptime):
3062         Assume musl libc supports CLOCK_BOOTTIME.
3063         (get_linux_boot_time_final_fallback):
3064         Likewise for musl libc and CLOCK_REALTIME.
3065         Do not rely on the timespec_get module, to break the dependency.
3066         Consider 0 to be a failure return from timespec_get.
3067         Fall back on gettimeofday if timespec_get does not exist.
3068         * modules/boot-time (Depends-on): Remove timespec_get.
3070 2023-08-12  Bruno Haible  <bruno@clisp.org>
3072         readutmp, boot-time: Fix parsing of /proc/uptime.
3073         * lib/boot-time-aux.h (get_linux_uptime): Use c_strtod, not strtod.
3074         * lib/readutmp.c: Include c-strtod.h.
3075         * lib/boot-time.c: Likewise.
3076         * modules/readutmp (Depends-on): Add c-strtod.
3077         * modules/boot-time (Depends-on): Likewise.
3079 2023-08-12  Bruno Haible  <bruno@clisp.org>
3081         readutmp: On Linux, don't fail if /var/run/utmp is not accessible.
3082         * lib/boot-time-aux.h (get_linux_boot_time_final_fallback): Don't test
3083         NEED_BOOT_TIME_FINAL_FALLBACK.
3084         * lib/boot-time.c (NEED_BOOT_TIME_FINAL_FALLBACK): Remove macro.
3085         * lib/readutmp.c (NEED_BOOT_TIME_FINAL_FALLBACK): Remove macro.
3086         (read_utmp_from_file): As a fallback on Linux, invoke
3087         get_linux_boot_time_final_fallback.
3088         (get_boot_time_uncached): Don't do it here.
3089         * m4/readutmp.m4 (gl_READUTMP): Add $CLOCK_TIME_LIB to READUTMP_LIB.
3091 2023-08-12  Bruno Haible  <bruno@clisp.org>
3093         readutmp, boot-time: On Haiku, return the boot time.
3094         * m4/readutmp.m4 (gl_PREREQ_READUTMP_H): Test whether <OS.h> exists.
3095         * lib/boot-time-aux.h (get_haiku_boot_time,
3096         get_haiku_boot_time_final_fallback): New functions.
3097         * lib/readutmp.c: Include <OS.h>.
3098         (read_utmp_from_file): If opening UTMP_FILE fails, continue processing
3099         instead of failing. Invoke get_haiku_boot_time and
3100         get_haiku_boot_time_final_fallback.
3101         * lib/boot-time.c: Include <OS.h>.
3102         (get_boot_time_uncached): Invoke get_haiku_boot_time and
3103         get_haiku_boot_time_final_fallback.
3105 2023-08-12  Bruno Haible  <bruno@clisp.org>
3107         readutmp: Reduce code duplication.
3108         * lib/readutmp.c (have_boot_time): New function.
3109         (read_utmp_from_file): Invoke it, instead of duplicating the same loop.
3111 2023-08-12  Paul Eggert  <eggert@cs.ucla.edu>
3113         c-file-type: new module
3114         * lib/c-file-type.c: New file, containing all of the
3115         old file-type except for the gettext call.
3116         * lib/file-type.c (_): Remove; no longer used.
3117         (file_type): Call c_file_type for most of the work.
3118         * modules/c-file-type: New module.
3119         * modules/file-type (Depends-on): Add c-file-type.
3121 2023-08-12  Bruno Haible  <bruno@clisp.org>
3123         readutmp, boot-time: Use the BSD sysctl as fallback.
3124         * m4/readutmp.m4 (gl_PREREQ_READUTMP_H): Test for <sys/param.h>,
3125         <sys/sysctl.h>, sysctl.
3126         * lib/boot-time-aux.h (get_bsd_boot_time_final_fallback): New function.
3127         * lib/readutmp.c: Include <sys/param.h> and <sys/sysctl.h>.
3128         (read_utmp_from_file): Invoke get_bsd_boot_time_final_fallback as a
3129         fallback.
3130         * lib/boot-time.c: Include <sys/param.h> and <sys/sysctl.h>.
3131         (get_boot_time_uncached): Invoke get_bsd_boot_time_final_fallback as a
3132         fallback.
3134 2023-08-12  Bruno Haible  <bruno@clisp.org>
3136         readutmp: Fix compilation error on OpenBSD (regression 2023-08-11).
3137         * lib/readutmp.c (read_utmp_from_file): Remove extraneous 'break'
3138         statement.
3140 2023-08-11  Bruno Haible  <bruno@clisp.org>
3142         boot-time: Add comment about multithread-safety.
3143         * lib/boot-time.h (get_boot_time): Add comment, same as in readutmp.h.
3145 2023-08-11  Bruno Haible  <bruno@clisp.org>
3147         boot-time: Simplify execution.
3148         * lib/boot-time.c: Include <stdio.h>, <string.h>, <sys/types.h>,
3149         <sys/stat.h>, <sys/sysinfo.h>, <time.h>, stat-time.h, unlocked-io.h,
3150         boot-time-aux.h.
3151         (UT_USER): New macro, from lib/readutmp.c.
3152         (getutent): New declaration.
3153         (get_boot_time_uncached): New function, containing a simplified code
3154         from lib/readutmp.c.
3155         (get_boot_time): Don't invoke read_utmp. Instead, invoke
3156         get_boot_time_uncached and cache the result.
3157         * modules/boot-time (Files): Add lib/boot-time-aux.h, lib/readutmp.h,
3158         m4/readutmp.m4.
3159         (Depends-on): Remove readutmp. Add extensions, fopen-gnu, stat-time,
3160         stdbool, time-h, timespec_get, unlocked-io-internal.
3161         (configure.ac): Invoke gl_PREREQ_READUTMP_H.
3162         (Link): Remove $(READUTMP_LIB). Add $(CLOCK_TIME_LIB).
3163         * modules/boot-time-tests (Makefile.am): Link test-boot-time with
3164         $(CLOCK_TIME_LIB), not with $(READUTMP_LIB).
3166 2023-08-11  Bruno Haible  <bruno@clisp.org>
3168         readutmp: Refactor boot time determination code.
3169         * lib/boot-time-aux.h: New file, extracted from lib/readutmp.c.
3170         * lib/readutmp.c: On Linux, include <sys/sysinfo.h> even if
3171         !READUTMP_USE_SYSTEMD.
3172         Include boot-time-aux.h.
3173         (SIZEOF): Remove macro, moved to boot-time-aux.h.
3174         (get_linux_uptime): Remove function, moved to boot-time-aux.h.
3175         (read_utmp_from_file): Invoke get_linux_boot_time_fallback,
3176         get_android_boot_time, get_openbsd_boot_time, get_windows_boot_time.
3177         Code moved to boot-time-aux.h.
3178         (get_boot_time_uncached: Invoke get_linux_boot_time_final_fallback.
3179         Code moved to boot-time-aux.h.
3180         * m4/readutmp.m4 (gl_PREREQ_READUTMP_H): New macro, extracted from
3181         gl_READUTMP.
3182         (gl_READUTMP): Invoke it.
3183         * modules/readutmp (Files): Add lib/boot-time-aux.h.
3185 2023-08-11  Bruno Haible  <bruno@clisp.org>
3187         readutmp: Make 'struct utmpx32' usable by other code.
3188         * lib/readutmp.h (struct utmpx32): Moved to here from lib/readutmp.c.
3189         (UTMP_STRUCT_NAME): Define as utmpx32 if needed.
3190         * lib/readutmp.c (read_utmp_from_file): Simply use UTMP_STRUCT_NAME.
3192 2023-08-11  Bruno Haible  <bruno@clisp.org>
3194         readutmp tests: Fix link error.
3195         * modules/readutmp-tests (Makefile.am): Link test-readutmp with
3196         $(LIBINTL).
3198 2023-08-11  Bruno Haible  <bruno@clisp.org>
3200         readutmp: Fix the boot time returned on Minix.
3201         * lib/readutmp.c (read_utmp_from_file): [__minix] When the time of the
3202         BOOT_TIME entry is very close to the Epoch, replace it with the time
3203         from the "run-level m" entry.
3205 2023-08-11  Bruno Haible  <bruno@clisp.org>
3207         readutmp: On Cygwin and Windows, return the boot time.
3208         * lib/readutmp.h (READ_UTMP_SUPPORTED): Define also on native Windows.
3209         * lib/readutmp.c (desirable_utmp_entry): Ignore READ_UTMP_CHECK_PIDS on
3210         Windows.
3211         (read_utmp_from_file): Add a BOOT_TIME entry on Windows.
3213 2023-08-11  Bruno Haible  <bruno@clisp.org>
3215         clock-time: On mingw, avoid buggy clock_gettime from libwinpthread.
3216         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_CANONICAL_HOST. On
3217         native Windows, avoid using clock_getres clock_gettime clock_settime
3218         from mingw's libwinpthread.
3219         * doc/posix-functions/clock_gettime.texi: Mention the mingw bug.
3221 2023-08-10  Bruno Haible  <bruno@clisp.org>
3223         readutmp: Make the header file includable from C++.
3224         * lib/readutmp.h: Add extern "C" block.
3226 2023-08-10  Bruno Haible  <bruno@clisp.org>
3228         readutmp: Tweak the Android specific addition.
3229         * lib/readutmp.c (read_utmp_from_file) [__ANDROID__]: Don't fake a
3230         BOOT_TIME entry if the options request to omit it or if a BOOT_TIME
3231         entry is already present.
3233 2023-08-10  Bruno Haible  <bruno@clisp.org>
3235         readutmp: Fix the boot time returned on Raspbian.
3236         * lib/readutmp.c (read_utmp_from_file): When the time of the BOOT_TIME
3237         entry is very close to the Epoch, replace it with the time from the
3238         "runlevel"/"~" entry.
3240 2023-08-10  Bruno Haible  <bruno@clisp.org>
3242         boot-time: Add tests.
3243         * tests/test-boot-time.c: New file.
3244         * modules/boot-time-tests: New file.
3246         boot-time: New module.
3247         * lib/boot-time.h: New file.
3248         * lib/boot-time.c: New file.
3249         * modules/boot-time: New file.
3251 2023-08-10  Bruno Haible  <bruno@clisp.org>
3253         readutmp: Return a boot time also on Android.
3254         * lib/readutmp.c (get_linux_uptime): New function, extracted from
3255         get_boot_time_uncached.
3256         (read_utmp_from_file): Don't look for file time stamps on Android.
3257         Instead, use get_linux_uptime.
3258         (get_boot_time_uncached): Use get_linux_uptime.
3260 2023-08-09  Bruno Haible  <bruno@clisp.org>
3262         readutmp: Fix a mistake (regression 2023-08-08).
3263         * lib/readutmp.c (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED): Fix a typo.
3265         readutmp: Return a boot time also on OpenBSD.
3266         * lib/readutmp.h (BOOT_TIME, USER_PROCESS): Provide fallback
3267         definitions.
3268         * lib/readutmp.c (read_utmp_from_file) [__OpenBSD__]: Fake a BOOT_TIME
3269         entry by looking at the time stamp of a specific file.
3271         readutmp: Return a boot time also on Alpine Linux.
3272         * lib/readutmp.c: Include stat-time.h.
3273         (SIZEOF): New macro.
3274         (read_utmp_from_file) [__linux__]: Fake a BOOT_TIME entry by looking
3275         at the time stamp of a specific file.
3276         * modules/readutmp (Depends-on): Add stat-time.
3278         readutmp: Fix boot time in VMs after sleep state and date update.
3279         * lib/readutmp.c (read_utmp_from_file): New function, extracted from
3280         read_utmp.
3281         (get_boot_time_uncached): Before all other approaches, try to find the
3282         boot time in the /var/run/utmp file.
3283         (read_utmp): Invoke read_utmp_from_file.
3285         readutmp: Make it easier to filter for/against the boot-time entry.
3286         * lib/readutmp.h (READ_UTMP_BOOT_TIME, READ_UTMP_NO_BOOT_TIME): New
3287         enum items.
3288         * lib/readutmp.c (desirable_utmp_entry, read_utmp_from_systemd):
3289         Implement them.
3290         (read_utmp): If no entries can match the given options, return
3291         immediately.
3293 2023-08-08  Paul Eggert  <eggert@cs.ucla.edu>
3295         readutmp: omit pragma
3296         * lib/readutmp.c: Omit -Wstringop-overread pragma.
3297         It’s no longer needed now that extract_trimmed_name
3298         no longer calls strnlen.
3300 2023-08-08  Bruno Haible  <bruno@clisp.org>
3302         readutmp: Use classical implementation for files != /var/run/utmp.
3303         * lib/readutmp.c (read_utmp_from_systemd): Renamed from read_utmp
3304         [READUTMP_USE_SYSTEMD]. Remove file argument.
3305         (read_utmp): Call it when the file argument is "/var/run/utmp".
3307 2023-08-08  Bruno Haible  <bruno@clisp.org>
3309         readutmp: Get the boot time with higher precision.
3310         Suggested by Thorsten Kukuk <kukuk@suse.com> in
3311         <https://github.com/thkukuk/utmpx/blob/main/utmp-to-logind.md#determine-boot-time>.
3312         * lib/readutmp.c (get_boot_time_uncached): Try clock_gettime first.
3314 2023-08-08  Bruno Haible  <bruno@clisp.org>
3316         readutmp: Add comment about multithread-safety.
3317         * lib/readutmp.h (read_utmp): Add comment.
3319 2023-08-08  Bruno Haible  <bruno@clisp.org>
3321         readutmp: Return entries with unbounded strings on all platforms.
3322         Suggested  by Paul Eggert in
3323         <https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00165.html>.
3324         * m4/readutmp.m4 (gl_READUTMP): Test also whether struct utmp has an
3325         ut_tv member, and whether struct utmp and struct utmpx have an
3326         ut_session member.
3327         * lib/readutmp.h (struct gl_utmp): Define always. Add ut_exit field.
3328         (HAVE_GL_UTMP): Remove macro.
3329         (UT_USER, UT_TIME_MEMBER, UT_PID, UT_TYPE_EQ, UT_TYPE_NOT_DEFINED,
3330         UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT, STRUCT_UTMP): Define w.r.t.
3331         struct gl_utmp.
3332         (UT_USER_SIZE, UT_ID_SIZE, UT_LINE_SIZE, UT_HOST_SIZE): Define to -1
3333         always.
3334         (getutent): Remove declaration.
3335         (HAVE_STRUCT_XTMP_UT_EXIT): Remove unused macro.
3336         (HAVE_STRUCT_XTMP_UT_ID, HAVE_STRUCT_XTMP_UT_PID,
3337         HAVE_STRUCT_XTMP_UT_HOST): Change to match the way coreutils uses these
3338         macros.
3339         * lib/readutmp.c (UT_USER, UT_TIME_MEMBER, UT_PID, UT_TYPE_EQ,
3340         UT_TYPE_NOT_DEFINED, IS_USER_PROCESS, UT_EXIT_E_TERMINATION,
3341         UT_EXIT_E_EXIT, UT_USER_SIZE, UT_ID_SIZE, UT_LINE_SIZE, UT_HOST_SIZE):
3342         Define w.r.t. struct utmpx or struct utmp.
3343         (extract_trimmed_name): Don't use UT_USER or UT_USER_SIZE here.
3344         (desirable_utmp_entry): Don't use UT_TIME_MEMBER or UT_USER here.
3345         (struct utmp_alloc): Define always.
3346         (add_utmp): Likewise. Add user_len, id_len, line_len, host_len,
3347         termination, exit arguments. Don't require that user, id, line, host are
3348         NUL-terminated. Assume user and host are non-NULL.
3349         (finish_utmp): New function, extracted from read_utmp.
3350         (read_utmp) [READUTMP_USE_SYSTEMD]: Update add_utmp invocations. Pass a
3351         non-NULL user and a non-NULL host. Call finish_utmp.
3352         (getutent): Move declaration from readutmp.h to here.
3353         (copy_utmp_entry): Remove function.
3354         (read_utmp) [UTMP_NAME_FUNCTION]: Replace variables n_read, n_alloc,
3355         utmp with a 'struct utmp_alloc'. Use 'struct utmpx32' from
3356         copy_utmp_entry here. Invoke add_utmp and finish_utmp.
3357         (read_utmp) [!UTMP_NAME_FUNCTION]: Replace variables n_read, n_alloc,
3358         utmp with a 'struct utmp_alloc'. Invoke add_utmp and finish_utmp.
3359         * NEWS: Mention the API change.
3361 2023-08-08  Bruno Haible  <bruno@clisp.org>
3363         readutmp: Fix compilation error on OpenBSD and AIX (regr. 2023-08-03).
3364         * lib/readutmp.h (UT_TIME_MEMBER) [HAVE_UTMP_H]: Revert last change.
3366 2023-08-08  Bruno Haible  <bruno@clisp.org>
3368         readutmp: Fix compilation error on OpenBSD (regr. 2023-08-02).
3369         * lib/readutmp.h (UT_ID_SIZE): Define to a dummy if there is no ut_id
3370         field.
3372 2023-08-07  Paul Eggert  <eggert@cs.ucla.edu>
3374         quotearg: fix obsolete comment
3375         * lib/quotearg.h: Fix comment to match behavior.
3376         This fixes a commentary bug introduced in
3377         commit 1a43a982c927eaf26bbc2701a872009d9be4b33b
3378         "quotearg: do not use grave accent for left quote"
3379         dated 2011-12-18 15:44:17+01, where the comment
3380         was not updated to match the changed behavior.
3382 2023-08-06  Paul Eggert  <eggert@cs.ucla.edu>
3384         readutmp: fix comment bug ID
3385         * lib/readutmp.c: Fix comment (thanks to Bruno Haible).
3387         doc: Document lack of printf "%n" on Android, OpenBSD.
3388         * doc/posix/functions/*printf.texi: Document that the POSIX-specified
3389         printf functions do not support the %n format on Android and OpenBSD.
3390         This lack of support is deliberate, as %n is a common target of attacks
3391         on security.
3393 2023-08-05  Paul Eggert  <eggert@cs.ucla.edu>
3395         readutmp: anticipate Y2038 hack for utmp
3396         * lib/readutmp.c (struct utmpx32): Use unsigned int for tv_sec,
3397         not int, as that is more likely to work after 2038.
3398         Suggested by Andreas Schwab in:
3399         https://sourceware.org/pipermail/libc-alpha/2023-August/150661.html
3401         diffseq: simplify lint removal
3402         * lib/diffseq.h (IF_LINT): Remove.
3403         Instead, always ignore the diagnostic, as that’s simpler
3404         now that we have the pragma change installed in May.
3405         This removes the last IF_LINT from diffutils, though not
3406         the last use of GCC_LINT.
3408 2023-08-04  Bruno Haible  <bruno@clisp.org>
3410         unistr/{u8-mbtouc,u8-mbsnlen}: Fix test failures (regr. 2023-07-25).
3411         * modules/unistr/u8-mbtouc (configure.ac): Compile this code if the
3412         preinstalled libunistring version is >= 0.9.4, < 1.2.
3413         * modules/unistr/u8-mbsnlen (configure.ac): Likewise.
3415         unistr/*-pcpy: Fix compilation errors (regression 2023-07-21).
3416         * modules/unistr/base (configure.ac): Generate unistr.h if the
3417         preinstalled libunistring version is >= 0.9.11, < 1.2.
3419 2023-08-04  Bruno Haible  <bruno@clisp.org>
3421         readutmp: In systemd mode, fix the ut_host contents (regr. yesterday).
3422         * lib/readutmp.c (add_utmp): Fix ut_host contents.
3423         * tests/test-readutmp.c (main): Show also the contents of the ut_host
3424         field.
3426 2023-08-04  Bruno Haible  <bruno@clisp.org>
3428         readutmp: Ensure multithread-safety.
3429         * lib/readutmp.c (get_boot_time): Initialize 'cached' after 'boot_time',
3430         not before. Also declare both as volatile.
3432 2023-08-04  Bruno Haible  <bruno@clisp.org>
3434         readutmp tests: Fix gcc warning (regression from yesterday).
3435         * tests/test-readutmp.c: Include idx.h.
3436         (main): Use idx_t instead of size_t.
3438 2023-08-03  Paul Eggert  <eggert@cs.ucla.edu>
3440         readutmp: systemd supports only UTMP_FILE
3441         * lib/readutmp.c (read_utmp): Fail if not UTMP_FILE.
3442         * m4/systemd.m4 (gl_SYSTEMD_CHOICE): Default to no for now,
3443         since yes means "who /var/log/wtmp" stops working.
3445         readutmp: switch new struct to struct timespec
3446         * lib/readutmp.c (get_boot_time_uncached, get_boot_time)
3447         (add_utmp, read_utmp):
3448         Use struct timespec, not struct timeval.
3449         * lib/readutmp.h: Always include <time.h>, for struct timespec.
3450         Simplify when utmp.h and utmpx.h are included.
3451         (struct gl_utmp): Use the same struct for both the
3452         systemd and the dummy version.  Reorder members, and
3453         use proper pid_t type for ut_session.  Rename ut_tv to ut_ts
3454         and make it a struct timespec.  All uses changed.
3455         (HAVE_GL_UTMP): New macro.  Use it where appropriate, instead
3456         of READUTMP_USE_SYSTEMD.
3457         (UT_USER, HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID)
3458         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_HOST):
3459         Simplify.
3460         * modules/readutmp (Depends-on): Add time-h, timespec_get.
3461         Remove sys_type.  Sort.
3463         readutmp: fix # indentation
3464         * lib/readutmp.h: Change # indentation to standard Gnulib style.
3466         readutmp: pacify -Wstrict-prototypes
3467         * lib/readutmp.c (get_boot_time_uncached, get_boot_time):
3468         Pacify gcc 13 -Wstrict-prototypes.
3470         readutmp: fix idx_t FIXME in API
3471         * lib/readutmp.c (read_utmp): 2nd arg is now idx_t *, not
3472         size_t *.
3473         * lib/readutmp.h: Include idx.h, for idx_t.
3474         * modules/readutmp (Depends-on): Add idx.
3476         readutmp: go back to simple ‘free’
3477         Omit the new free_utmp function.  Instead, allocate storage
3478         in one block, so that using code can still just call ‘free’.
3479         * lib/readutmp.c (struct utmp_alloc) [READUTMP_USE_SYSTEMD]: New type.
3480         (add_utmp) [READUTMP_USE_SYSTEMD]: New function.
3481         (read_utmp) [READUTMP_USE_SYSTEMD]: Use it.
3482         Also, use malloc a bit less heavily.
3483         (free_utmp): Remove.
3484         * tests/test-readutmp.c (main): Call free, not free_utmp.
3486         readutmp: simplify extract_trimmed_name via ximemdup0
3487         * lib/readutmp.c (extract_trimmed_name): Simplify.
3488         * modules/readutmp (Depends-on):
3489         Add strnlen, which was a missing dependency.
3491 2023-08-03  Bruno Haible  <bruno@clisp.org>
3493         alignasof, stdalign: Avoid some -Wundef warnings from config.h.
3494         Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
3495         <https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00012.html>.
3496         * m4/stdalign.m4 (gl_ALIGNASOF): Test whether __cplusplus is defined
3497         before evaluating it. Assume HAVE_STDALIGN_H, _GL_STDALIGN_NEEDS_STDDEF
3498         are never defined to 0.
3500 2023-08-03  Bruno Haible  <bruno@clisp.org>
3502         doc: More platform detail.
3503         * doc/posix-functions/fnmatch.texi: Mention Solaris OpenIndiana here,
3504         since it behaves differently than Solaris 11.4.
3506 2023-08-03  Bruno Haible  <bruno@clisp.org>
3508         doc: Add references to FreeBSD bugs.
3509         * doc/posix-functions/fnmatch.texi: Add commented reference to FreeBSD
3510         bug.
3511         * doc/posix-functions/wcscmp.texi: Likewise.
3512         * doc/posix-functions/wcsncmp.texi: Likewise.
3514 2023-08-02  Bruno Haible  <bruno@clisp.org>
3516         readutmp: In systemd mode, put the X11 display into the ut_host field.
3517         * lib/readutmp.c (read_utmp): In sessions of type "x11", use the X11
3518         display as host.
3520 2023-08-02  Bruno Haible  <bruno@clisp.org>
3522         readutmp: Small change to reduce the code size on the coreutils side.
3523         * lib/readutmp.h (UT_ID_SIZE): New constant and macro.
3525 2023-08-01  Bruno Haible  <bruno@clisp.org>
3527         readutmp: Small changes to reduce the code size on the coreutils side.
3528         * m4/readutmp.m4 (gl_READUTMP): Test also for the ut_host field in
3529         'struct utmpx' and 'struct utmp'.
3530         * lib/readutmp.h (HAVE_STRUCT_XTMP_UT_HOST): New macro.
3531         (UT_USER_SIZE): Define also as a macro. Set to -1 if
3532         READUTMP_USE_SYSTEMD.
3533         (UT_LINE_SIZE, UT_HOST_SIZE): New constants and macros.
3535 2023-08-01  Bruno Haible  <bruno@clisp.org>
3537         readutmp: For year-2038 safety on Linux/{x86,arm}, use systemd APIs.
3538         Suggested by Thorsten Kukuk <kukuk@suse.com> in
3539         <https://www.thkukuk.de/blog/Y2038_glibc_utmp_64bit/> and
3540         <https://github.com/thkukuk/utmpx/blob/main/utmp-to-logind.md>.
3541         * m4/systemd.m4: New file.
3542         * m4/readutmp.m4 (gl_READUTMP): Require gl_SYSTEMD_CHOICE. Set
3543         READUTMP_LIB. Conditionally define READUTMP_USE_SYSTEMD.
3544         * lib/readutmp.h: For READUTMP_USE_SYSTEMD, include <sys/time.h> and
3545         <utmpx.h>.
3546         (struct gl_utmp): New type.
3547         (UTMP_STRUCT_NAME, UT_TIME_MEMBER, UT_EXIT_E_TERMINATION,
3548         UT_EXIT_E_EXIT, UT_USER, HAVE_STRUCT_XTMP_UT_EXIT,
3549         HAVE_STRUCT_XTMP_UT_ID, HAVE_STRUCT_XTMP_UT_PID): Define differently for
3550         READUTMP_USE_SYSTEMD.
3551         (UT_USER_SIZE): Don't define for READUTMP_USE_SYSTEMD.
3552         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, READ_UTMP_SUPPORTED): Define also for
3553         READUTMP_USE_SYSTEMD.
3554         (free_utmp): New declaration.
3555         * lib/readutmp.c: Add new includes for READUTMP_USE_SYSTEMD.
3556         (extract_trimmed_name): Adapt to READUTMP_USE_SYSTEMD.
3557         (get_boot_time_uncached, get_boot_time, guess_pty_name): New functions.
3558         (read_utmp): New implementation for READUTMP_USE_SYSTEMD.
3559         (free_utmp): New function.
3560         * tests/test-readutmp.c (main): At the end, invoke free_utmp.
3561         * modules/readutmp (Files): Add m4/systemd.m4.
3562         (Link): New section.
3563         * modules/readutmp-tests (Makefile.am): Link test-readutmp with
3564         READUTMP_LIB.
3565         * NEWS: Mention the free_utmp function and the READUTMP_LIB link
3566         requirement.
3568 2023-08-01  Bruno Haible  <bruno@clisp.org>
3570         readutmp: Trivial simplification.
3571         * lib/readutmp.c (extract_trimmed_name): Use constant UT_USER_SIZE.
3573 2023-07-31  Bruno Haible  <bruno@clisp.org>
3575         readutmp tests: Show also the ut_line field.
3576         * tests/test-readutmp.c (main): Add a "Device" column to the table.
3577         Adjust the column widths. Flush stdout before possibly calling abort().
3579 2023-07-31  Bruno Haible  <bruno@clisp.org>
3581         readutmp: Fix test failure on OpenBSD.
3582         * lib/readutmp.c (desirable_utmp_entry): On OpenBSD, eliminate entirely
3583         empty entries.
3585 2023-07-31  Bruno Haible  <bruno@clisp.org>
3587         readutmp: Revisit portability.
3588         * m4/readutmp.m4 (gl_READUTMP): Don't test for struct utmp.ut_exit.ut_*,
3589         since no platform has these.
3590         * lib/readutmp.h (UT_EXIT_E_TERMINATION): Don't test
3591         HAVE_STRUCT_UTMP_UT_EXIT_UT_TERMINATION.
3592         (UT_EXIT_E_EXIT): Don't test HAVE_STRUCT_UTMP_UT_EXIT_UT_EXIT.
3593         * doc/posix-headers/utmpx.texi: Update platforms list. Mention
3594         portability problems of specific 'struct utmpx' fields.
3595         * doc/glibc-headers/utmp.texi: Update platforms list. Mention
3596         portability problems of specific 'struct utmp' fields.
3598 2023-07-31  Bruno Haible  <bruno@clisp.org>
3600         readutmp: Make argument names consistent.
3601         * lib/readutmp.h (UT_TIME_MEMBER, UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT,
3602         UT_USER, UT_PID, UT_TYPE_EQ, UT_TYPE_BOOT_TIME, UT_TYPE_USER_PROCESS,
3603         IS_USER_PROCESS): Rename parameter to 'UT'.
3604         * lib/readutmp.c (desirable_utmp_entry, read_utmp): Rename local
3605         variable 'u' to 'ut'.
3607 2023-07-31  Bruno Haible  <bruno@clisp.org>
3609         readutmp: Make the header file and function usable on all platforms.
3610         * lib/readutmp.h (struct gl_utmp, UTMP_STRUCT_NAME, UT_TIME_MEMBER,
3611         UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT, UT_USER): Provide fallback
3612         definitions.
3613         (READ_UTMP_SUPPORTED): New macro.
3614         * lib/readutmp.c (read_utmp) [!READ_UTMP_SUPPORTED]: Provide a dummy
3615         definition.
3616         * modules/readutmp (Depends-on): Add sys_time.
3617         (configure.ac): Remove conditional.
3618         (Makefile.am): Compile readutmp.c on all platforms.
3619         (Include): Include readutmp.h on all platforms.
3620         * tests/test-readutmp.c: Include readutmp.h on all platforms.
3621         (main): Invoke read_utmp on all platforms.
3623 2023-07-30  Bruno Haible  <bruno@clisp.org>
3625         readutmp: Add tests.
3626         * tests/test-readutmp.c: New file.
3627         * modules/readutmp-tests: New file.
3629         readutmp: Improve comments. Fix module description.
3630         * lib/readutmp.h (extract_trimmed_name): Add specification comment.
3631         (read_utmp): Move specification comment from lib/readutmp.c to here.
3632         Mention also UTMP_FILE and READ_UTMP_USER_PROCESS.
3633         * lib/readutmp.c (extract_trimmed_name): Fix comment.
3634         * modules/readutmp (Include): Only include the .h file if
3635         HAVE_UTMPX_H || HAVE_UTMP_H.
3637 2023-07-29  Paul Eggert  <eggert@cs.ucla.edu>
3639         readutmp: work around glibc utmpx bug
3640         When compiled with _TIME_BITS=64, glibc <utmpx.h> does not work,
3641         because the files use 32-bit time_t and the code passes this to
3642         the user unmodified, but <utmpx.h> defines a struct with 64-bit
3643         time_t.  Work around this compatibility bug.
3644         * lib/readutmp.c (copy_utmp_entry): New function.
3645         (read_utmp): Use it.
3647 2023-07-29  Bruno Haible  <bruno@clisp.org>
3649         wcsrtombs tests: Renumber tests.
3650         * tests/test-wcsrtombs*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5.
3651         * tests/test-wcsrtombs.c: Update.
3652         * modules/wcsrtombs-tests: Update.
3654         wcsnrtombs tests: Renumber tests.
3655         * tests/test-wcsnrtombs*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5.
3656         * tests/test-wcsnrtombs.c: Update.
3657         * modules/wcsnrtombs-tests: Update.
3659         wcrtomb tests: Renumber tests.
3660         * tests/test-wcrtomb.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
3661         * tests/test-wcrtomb.c: Update.
3662         * tests/test-wcrtomb-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6
3663         -> 8.
3664         * tests/test-wcrtomb-w32.c: Update.
3665         * modules/wcrtomb-tests: Update.
3667         mbstoc32s tests: Renumber tests.
3668         * tests/test-mbstoc32s-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
3669         * tests/test-mbstoc32s.c: Update.
3671         mbsrtoc32s tests: Renumber tests.
3672         * tests/test-mbsrtoc32s-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
3673         * tests/test-mbsrtoc32s.c: Update.
3675         mbsnrtoc32s tests: Renumber tests.
3676         * tests/test-mbsnrtoc32s-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
3677         * tests/test-mbsnrtoc32s.c: Update.
3679         mbstowcs tests: Renumber tests.
3680         * tests/test-mbstowcs*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
3681         * tests/test-mbstowcs.c: Update.
3682         * modules/mbstowcs-tests: Update.
3684         mbsrtowcs tests: Renumber tests.
3685         * tests/test-mbsrtowcs*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
3686         * tests/test-mbsrtowcs.c: Update.
3687         * modules/mbsrtowcs-tests: Update.
3689         mbsnrtowcs tests: Renumber tests.
3690         * tests/test-mbsnrtowcs*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
3691         * tests/test-mbsnrtowcs.c: Update.
3692         * modules/mbsnrtowcs-tests: Update.
3694         mbrtoc16 tests: Renumber tests.
3695         * tests/test-mbrtoc16-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
3696         * tests/test-mbrtoc16.c: Update.
3697         * tests/test-mbrtoc16-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6
3698         -> 8.
3699         * tests/test-mbrtoc16-w32.c: Update.
3700         * modules/mbrtoc16-tests: Update.
3702         mbrtoc32 tests: Renumber tests.
3703         * tests/test-mbrtoc32-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
3704         * tests/test-mbrtoc32.c: Update.
3705         * tests/test-mbrtoc32-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6
3706         -> 8.
3707         * tests/test-mbrtoc32-w32.c: Update.
3708         * modules/mbrtoc32-tests: Update.
3710         mbrtowc tests: Renumber tests.
3711         * tests/test-mbrtowc*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
3712         * tests/test-mbrtowc.c: Update.
3713         * tests/test-mbrtowc-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6
3714         -> 8.
3715         * tests/test-mbrtowc-w32.c: Update.
3716         * modules/mbrtowc-tests: Update.
3718         mbrlen tests: Renumber tests.
3719         * tests/test-mbrlen*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
3720         * tests/test-mbrlen.c: Update.
3721         * tests/test-mbrlen-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6
3722         -> 8.
3723         * tests/test-mbrlen-w32.c: Update.
3724         * modules/mbrlen-tests: Update.
3726         mbmemcasecoll tests: Renumber tests.
3727         * tests/test-mbmemcasecoll*.sh: Renamed 1 -> 2 -> 3 -> 4.
3728         * tests/test-mbmemcasecoll.c: Update.
3729         * modules/mbmemcasecoll-tests: Update.
3731         mbmemcasecmp tests: Renumber tests.
3732         * tests/test-mbmemcasecmp*.sh: Renamed 1 -> 2 -> 3 -> 4.
3733         * tests/test-mbmemcasecmp.c: Update.
3734         * modules/mbmemcasecmp-tests: Update.
3736         fnmatch tests: Renumber tests.
3737         * tests/test-fnmatch-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6
3738         -> 8.
3739         * tests/test-fnmatch-w32.c: Update.
3740         * modules/fnmatch-tests: Update.
3742         c32stombs tests: Renumber tests.
3743         * tests/test-c32stombs-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5.
3744         * tests/test-c32stombs.c: Update.
3745         * modules/c32stombs-tests: Update.
3747         c32srtombs tests: Renumber tests.
3748         * tests/test-c32srtombs-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5.
3749         * tests/test-c32srtombs.c: Update.
3750         * modules/c32srtombs-tests: Update.
3752         c32snrtombs tests: Renumber tests.
3753         * tests/test-c32snrtombs-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5.
3754         * tests/test-c32snrtombs.c: Update.
3755         * modules/c32snrtombs-tests: Update.
3757         c32rtomb tests: Renumber tests.
3758         * tests/test-c32rtomb.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1.
3759         * tests/test-c32rtomb.c: Update.
3760         * tests/test-c32rtomb-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6
3761         -> 8.
3762         * tests/test-c32rtomb-w32.c: Update.
3763         * modules/c32rtomb-tests: Update.
3765         btoc32 tests: Renumber tests.
3766         * tests/test-btoc32-*.sh: Renamed 1 -> 2 -> 3 -> 1.
3767         * tests/test-btoc32.c: Update.
3769         btowc tests: Renumber tests.
3770         * tests/test-btowc*.sh: Renamed 1 -> 2 -> 3 -> 1.
3771         * tests/test-btowc.c: Update.
3772         * modules/btowc-tests: Update.
3774 2023-07-29  Bruno Haible  <bruno@clisp.org>
3776         time-h: Simplify after 2017-05-01 change.
3777         * m4/time_h.m4 (gl_TIME_H_DEFAULTS): Don't provide a default value for
3778         GNULIB_GETTIMEOFDAY.
3780         time-h: Obey GNULIB_POSIXCHECK, not GNULIB_PORTCHECK.
3781         * lib/time.in.h (timespec_get, timespec_getres, time, nanosleep, tzset,
3782         mktime, localtime_r, gmtime_r, localtime, strptime, ctime, strftime,
3783         timegm): Add _GL_WARN_ON_USE invocation.
3784         (asctime, ctime): Don't assume that these functions are declared, since
3785         POSIX obsoletes them.
3786         * m4/time_h.m4 (gl_TIME_H): Test for the declarations of asctime, ctime,
3787         gmtime_r, localtime, localtime_r, mktime, nanosleep, strftime, strptime,
3788         time, timegm, timespec_get, timespec_getres, tzset.
3789         (gl_TIME_H_DEFAULTS): Initialize REPLACE_CTIME, REPLACE_LOCALTIME_R,
3790         REPLACE_MKTIME, REPLACE_NANOSLEEP, REPLACE_STRFTIME, REPLACE_TIMEGM,
3791         REPLACE_TIMESPEC_GET, REPLACE_TZSET with 0 instead of GNULIB_PORTCHECK.
3792         * m4/ctime.m4 (gl_FUNC_CTIME): Don't re-initialize REPLACE_CTIME.
3793         * m4/time_r.m4 (gl_TIME_R): Don't re-initialize REPLACE_LOCALTIME_R.
3794         * m4/mktime.m4 (gl_FUNC_MKTIME): Don't re-initialize REPLACE_MKTIME.
3795         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Don't re-initialize
3796         REPLACE_NANOSLEEP.
3797         * m4/strftime-fixes.m4 (gl_FUNC_STRFTIME): Don't re-initialize
3798         REPLACE_STRFTIME.
3799         * m4/timegm.m4 (gl_FUNC_TIMEGM): Don't re-initialize REPLACE_TIMEGM.
3800         * m4/timespec_get.m4 (gl_FUNC_TIMESPEC_GET): Don't re-initialize
3801         REPLACE_TIMESPEC_GET.
3802         * m4/tzset.m4 (gl_FUNC_TZSET: Don't re-initialize REPLACE_TZSET.
3804 2023-07-28  Bruno Haible  <bruno@clisp.org>
3806         fnmatch: Ensure that on Cygwin ≥ 3.5.0, Cygwin's native fnmatch is used.
3807         Tested by Corinna Vinschen in
3808         <https://cygwin.com/pipermail/cygwin/2023-July/254036.html>.
3809         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): On Cygwin, don't force
3810         REPLACE_FNMATCH to 1 just because wchar_t is small.
3812 2023-07-28  Bruno Haible  <bruno@clisp.org>
3814         posixcheck: Fix dependencies.
3815         * modules/posixcheck (Depends-on): Add malloc-h, pthread-h, sched,
3816         sys_random, threads-h, uchar, utmp.
3818 2023-07-28  Bruno Haible  <bruno@clisp.org>
3820         uchar: Include the necessary snippets.
3821         * lib/uchar.in.h: Add insertion points for _GL_ARG_NONNULL and
3822         _GL_WARN_ON_USE.
3823         * modules/uchar (Depends-on): Add snippet/arg-nonnull,
3824         snippet/warn-on-use.
3825         (Makefile.am): In uchar.h, include the ARG_NONNULL_H and WARN_ON_USE_H
3826         snippets.
3828 2023-07-28  Bruno Haible  <bruno@clisp.org>
3830         mbmemcasecmp, mbmemcasecoll: Avoid test failure on MSVC.
3831         * tests/test-mbmemcasecmp.h (test_utf_8): Disable two tests on platforms
3832         that don't have the upper/lower mappings for 'ü'/'Ü'.
3833         * tests/test-mbmemcasecmp.c: Include <wchar.h>, <wctype.h>.
3834         * tests/test-mbmemcasecoll.c: Likewise.
3835         * modules/mbmemcasecmp-tests (Depends-on): Add mbrtowc, wctype-h.
3836         * modules/mbmemcasecoll-tests (Depends-on): Likewise.
3838 2023-07-27  Bruno Haible  <bruno@clisp.org>
3840         gnulib-tool: Include ftruncate in testdirs.
3841         * gnulib-tool (func_create_testdir): Don't exclude module 'ftruncate'
3842         from testdirs by default.
3843         * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
3845 2023-07-27  Bruno Haible  <bruno@clisp.org>
3847         fnmatch-h, glob-h tests: Fix link errors (regression 2023-07-24).
3848         * modules/fnmatch-h-c++-tests (Makefile.am): Link test-fnmatch-h-c++
3849         with $(LIBUNISTRING).
3850         * modules/glob-h-c++-tests (Makefile.am): Link test-glob-h-c++ with
3851         $(LIBUNISTRING).
3853         fnmatch, glob tests: Fix link errors (regression 2023-07-24).
3854         * modules/fnmatch-tests (Makefile.am): Link test-fnmatch-w32 with the
3855         same libraries as test-fnmatch.
3856         * modules/glob (Link): Add $(LIBUNISTRING).
3857         * modules/glob-tests (Makefile.am): Link test-glob with $(LIBUNISTRING).
3859 2023-07-26  Bruno Haible  <bruno@clisp.org>
3861         wctrans: Work around bug on NetBSD.
3862         * lib/wctype.in.h (rpl_wctrans_t, wctrans_t, GNULIB_defined_wctrans_t):
3863         Define if REPLACE_WCTRANS is 1.
3864         (wctrans): Consider REPLACE_WCTRANS.
3865         (towctrans): Override if REPLACE_WCTRANS is 1.
3866         * m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Initialize REPLACE_WCTRANS.
3867         * m4/wctrans.m4 (gl_FUNC_WCTRANS): Define through AC_DEFUN_ONCE. Test
3868         whether wctrans supports the "tolower" character mapping. Set
3869         REPLACE_WCTRANS if not.
3870         * m4/towctrans.m4 (gl_FUNC_TOWCTRANS): Require gl_FUNC_WCTRANS.
3871         * modules/wctrans (Depends-on): Add towctrans.
3872         (configure.ac): Consider REPLACE_WCTRANS.
3873         * modules/towctrans (Files): Add m4/wctrans.m4.
3874         (configure.ac): Override also if REPLACE_WCTRANS is 1.
3875         * modules/wctype-h (Makefile.am): Substitute REPLACE_WCTRANS.
3876         * doc/posix-functions/wctrans.texi: Mention the NetBSD bug.
3878 2023-07-26  Bruno Haible  <bruno@clisp.org>
3880         towctrans: Add tests.
3881         * tests/test-towctrans.c: New file, based on
3882         tests/test-c32_apply_mapping.c.
3883         * modules/towctrans-tests: New file.
3885         wctrans: Add tests.
3886         * tests/test-wctrans.c: New file, based on tests/test-c32_get_mapping.c.
3887         * modules/wctrans-tests: New file.
3889 2023-07-26  Bruno Haible  <bruno@clisp.org>
3891         fnmatch: Update dependencies.
3892         * modules/fnmatch (Depends-on): Add wctype.
3894 2023-07-26  Bruno Haible  <bruno@clisp.org>
3896         wctype: Work around wctype+iswctype bug on MSVC.
3897         * m4/wctype.m4 (gl_FUNC_WCTYPE): In the test program, test also for the
3898         MSVC bug. Update cross-compilation guess.
3899         * doc/posix-functions/wctype.texi: Mention the MSVC bug.
3901 2023-07-26  Bruno Haible  <bruno@clisp.org>
3903         wctype: Work around wctype bug on mingw.
3904         * lib/wctype.in.h (rpl_wctype_t, wctype_t, GNULIB_defined_wctype_t):
3905         Define if REPLACE_WCTYPE is 1.
3906         (wctype): Consider REPLACE_WCTYPE.
3907         (iswctype): Override also if REPLACE_WCTYPE is 1.
3908         * lib/iswctype.c: If GNULIB_defined_wctype_t is defined, use the
3909         function-pointer based implementation.
3910         * m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Initialize REPLACE_WCTYPE.
3911         * m4/wctype.m4 (gl_FUNC_WCTYPE): Define through AC_DEFUN_ONCE. Test
3912         whether wctype supports the "blank" character class. Set REPLACE_WCTYPE
3913         if not.
3914         * m4/iswctype.m4 (gl_FUNC_ISWCTYPE): Require gl_FUNC_WCTYPE.
3915         * modules/wctype (Status, Notice): Remove.
3916         (Depends-on): Add iswctype. Consider REPLACE_WCTYPE.
3917         (configure.ac): Consider REPLACE_WCTYPE.
3918         * modules/iswctype (Status, Notice): Remove.
3919         (Files): Add m4/wctype.m4.
3920         (configure.ac): Override also if REPLACE_WCTYPE is 1.
3921         * modules/wctype-h (Makefile.am): Substitute REPLACE_WCTYPE.
3922         * doc/posix-functions/wctype.texi: Mention the mingw bug.
3924 2023-07-26  Bruno Haible  <bruno@clisp.org>
3926         wctype-h: Work around iswprint bug on mingw.
3927         * lib/wctype.in.h (rpl_iswprint): On mingw, don't use the system's
3928         iswprint function.
3929         * tests/test-wctype-h.c (main): Verify that this character class
3930         contains the ASCII space but not tab and newline.
3931         * tests/test-c32isprint.c (main): For tab, \v, \f, expect the same value
3932         on native Windows as on other platforms.
3933         * doc/posix-functions/iswprint.texi: Mention the mingw bug.
3935 2023-07-26  Bruno Haible  <bruno@clisp.org>
3937         iswblank tests: Add more tests.
3938         * tests/test-iswblank.c (main): Verify that this character class
3939         contains the ASCII space and tab, but not newline.
3941 2023-07-26  Bruno Haible  <bruno@clisp.org>
3943         wctype, wctrans: Require a non-NULL argument.
3944         * lib/wctype.in.h: Add placeholder for definition of _GL_ARG_NONNULL.
3945         (wctype, wctrans): Mark with _GL_ARG_NONNULL ((1)).
3946         * modules/wctype-h (Depends-on): Add snippet/arg-nonnull.
3947         (Makefile.am): Substitute $(ARG_NONNULL_H) into wctype.h.
3949 2023-07-25  Bruno Haible  <bruno@clisp.org>
3951         iswctype: Add tests.
3952         * tests/test-iswctype.c: New file, based on
3953         tests/test-c32_apply_type_test.c.
3954         * tests/test-c32_apply_type_test.c (main): Update accordingly.
3955         * modules/iswctype-tests: New file.
3957         wctype: Add tests.
3958         * tests/test-wctype.c: New file, based on
3959         tests/test-c32_get_type_test.c.
3960         * modules/wctype-tests: New file.
3962 2023-07-25  Bruno Haible  <bruno@clisp.org>
3964         Compile benchmark programs without assertions.
3965         * modules/mbiter-bench-tests (Makefile.am): Compile bench-mbiter with
3966         -DNDEBUG.
3967         * modules/mbiterf-bench-tests (Makefile.am): Compile bench-mbiterf with
3968         -DNDEBUG.
3969         * modules/mbuiter-bench-tests (Makefile.am): Compile bench-mbuiter with
3970         -DNDEBUG.
3971         * modules/mbuiterf-bench-tests (Makefile.am): Compile bench-mbuiterf
3972         with -DNDEBUG.
3973         * modules/mbswidth-bench-tests (Makefile.am): Compile bench-mbswidth
3974         with -DNDEBUG.
3975         * modules/crypto/md5-buffer-tests (Makefile.am): Compile bench-md5 with
3976         -DNDEBUG.
3977         * modules/crypto/sha1-buffer-tests (Makefile.am): Compile bench-sha1
3978         with -DNDEBUG.
3979         * modules/crypto/sha256-buffer-tests (Makefile.am): Compile bench-sha224
3980         and bench-sha256 with -DNDEBUG.
3981         * modules/crypto/sha512-buffer-tests (Makefile.am): Compile bench-sha384
3982         and bench-sha512 with -DNDEBUG.
3984 2023-07-25  Bruno Haible  <bruno@clisp.org>
3986         unistr/u8-*: Make Unicode decoder more Unicode Standard compliant.
3987         Based on a remark by Paul Eggert in
3988         <https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00120.html>.
3989         * tests/unistr/test-u8-mbtouc.c (test_safe_function): Change expected
3990         results for "non-shortest form" or out-of-range byte sequences. Add new
3991         test cases of incomplete well-formed byte sequences.
3992         * tests/unistr/test-u8-mbsnlen.c (main): Likewise.
3993         * lib/unistr/u8-mbtouc-aux.c (u8_mbtouc_aux): Reject a first byte in the
3994         range 0xF5..0xF7 as invalid. Distinguish incomplete from invalid byte
3995         sequences correctly. For the former, return only the number of bytes in
3996         the maximal well-formed subpart.
3997         * lib/unistr/u8-mbtouc.c (u8_mbtouc): Likewise.
3998         * lib/unistr/u8-check.c (u8_check): Reject a first byte in the range
3999         0xF5..0xF7 as invalid.
4000         * lib/unistr/u8-mblen.c (u8_mblen): Likewise.
4001         * lib/unistr/u8-mbtoucr.c (u8_mbtoucr): Likewise.
4002         * lib/unistr/u8-strmbtouc.c (u8_strmbtouc): Likewise.
4003         * lib/unistr/u8-strmblen.c (u8_strmblen): Likewise.
4004         * lib/unistr/u8-prev.c (u8_prev): Likewise.
4006 2023-07-24  Bruno Haible  <bruno@clisp.org>
4008         fnmatch: Overcome wchar_t limitations.
4009         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Set REPLACE_FNMATCH to 1 on
4010         AIX in 32-bit mode.
4011         * lib/fnmatch.c: Include <uchar.h>. Conditionally include unistr.h.
4012         (UCHAR_TO_WCHAR): Renamed from BTOWC.
4013         (WCHAR_T, WINT_T, BTOWC, MBSRTOWCS, WCSLEN, WCSCAT, WMEMPCPY, WMEMCHR,
4014         TOWLOWER, WCTYPE_T, WCTYPE, ISWCTYPE): New macros.
4015         (IS_CHAR_CLASS): Use WCTYPE instead of wctype.
4016         (UCHAR_TO_WCHAR): Use BTOWC instead of btowc.
4017         (FOLD): Use TOWLOWER instead of towlower.
4018         (CHAR): Use WCHAR_T instead of wchar_t.
4019         (UCHAR, INT): Use WINT_T instead of wint_t.
4020         (STRLEN): Use WCSLEN instead of wcslen.
4021         (STRCAT): Use WCSCAT instead of wcscat.
4022         (MEMPCPY): Use WMEMPCPY instead of wmempcpy.
4023         (MEMCHR): Use WMEMCHR instead of wmemchr.
4024         (is_char_class): Use WCTYPE_T instead of wctype_t, WCHAR_T instead of
4025         wchar_t, WCTYPE instead of wctype.
4026         (fnmatch): Use WCHAR_T instead of wchar_t, MBSRTOWCS instead of
4027         mbsrtowcs.
4028         * lib/fnmatch_loop.c (FCT): Use WCTYPE_T instead of wctype_t, ISWCTYPE
4029         instead of iswctype. Update for renamed BTOWC.
4030         * modules/fnmatch (Depends-on): Add btoc32, c32tolower,
4031         c32_get_type_test, c32_apply_type_test, mbsrtoc32s, unistr/u32-chr,
4032         unistr/u32-pcpy, unistr/u32-strcat, unistr/u32-strlen.
4033         (Link): Add $(LIBUNISTRING).
4034         * modules/fnmatch-tests (Makefile.am): Link test-fnmatch with
4035         $(LIBUNISTRING).
4036         * doc/posix-functions/fnmatch.texi: Move the Cygwin, mingw, MSVC, AIX
4037         bug descriptions to the "fixed by Gnulib" section.
4039 2023-07-24  Bruno Haible  <bruno@clisp.org>
4041         fnmatch: Update doc regarding Solaris 10.
4042         * doc/posix-functions/fnmatch.texi: Move the Solaris 10 bug description
4043         to the "fixed by Gnulib" section.
4045 2023-07-23  Paul Eggert  <eggert@cs.ucla.edu>
4047         timespec_get: port to Ubuntu 23.04
4048         * m4/timespec_get.m4 (gl_FUNC_TIMESPEC_GET):
4049         Default REPLACE_TIMESPEC_GET to 0, fixing a typo.
4051 2023-07-23  Bruno Haible  <bruno@clisp.org>
4053         unistr/u32-strcat: Relicense under LGPLv2+.
4054         * modules/unistr/u32-strcat (License): Change to LGPLv2+.
4055         * lib/unistr/u32-strcat.c: Update license notice.
4056         * lib/unistr/u-strcat.h: Likewise.
4058 2023-07-23  Bruno Haible  <bruno@clisp.org>
4060         unistr/u32-strlen: Relicense under LGPLv2+.
4061         * modules/unistr/u32-strlen (License): Change to LGPLv2+.
4062         * lib/unistr/u32-strlen.c: Update license notice.
4064 2023-07-23  Bruno Haible  <bruno@clisp.org>
4066         unistr/u32-chr: Relicense under LGPLv2+.
4067         * modules/unistr/u32-chr (License): Change to LGPLv2+.
4068         * lib/unistr/u32-chr.c: Update license notice.
4070 2023-07-23  Paul Eggert  <eggert@cs.ucla.edu>
4072         utimecmp: clean up old spare1 cruft
4073         * lib/utimecmp.c: Remove a ‘defined HAVE_STRUCT_STAT_ST_SPARE1’
4074         that has been false since 2007.
4076 2023-07-23  Bruno Haible  <bruno@clisp.org>
4078         fnmatch tests: Avoid a test failure on FreeBSD.
4079         * tests/test-fnmatch.c (main): In a GB18030 locale, test the towupper()
4080         mapping of 'ö', not of 'ü'.
4082 2023-07-23  Bruno Haible  <bruno@clisp.org>
4084         fnmatch: Work around bugs on FreeBSD, NetBSD, Solaris, Cygwin, Android.
4085         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Add three more test cases to
4086         the test program. Reorganize its return values.
4087         * tests/test-fnmatch.c (main): Reflect the changes done in fnmatch.m4.
4088         * doc/posix-functions/fnmatch.texi: Move the corresponding bug
4089         descriptions to the "fixed by Gnulib" section.
4091 2023-07-23  Bruno Haible  <bruno@clisp.org>
4093         fnmatch, fnmatch-gnu: Document known bugs.
4094         * doc/posix-headers/fnmatch.texi: Mention the macros FNM_LEADING_DIR,
4095         FNM_CASEFOLD, FNM_EXTMATCH, FNM_FILE_NAME.
4096         * doc/posix-functions/fnmatch.texi: Reference the glibc documentation
4097         and the Linux man page. Document the effects of the two modules and all
4098         the known bugs in detail.
4100 2023-07-22  Bruno Haible  <bruno@clisp.org>
4102         fnmatch tests: Add many more test cases.
4103         * lib/fnmatch.in.h (GNULIB_defined_fnmatch_function): New macro.
4104         * tests/test-fnmatch.c: Add many more test cases.
4105         * tests/test-fnmatch-1.sh: New file, based on tests/test-mbrtoc32-5.sh.
4106         * tests/test-fnmatch-2.sh: New file, based on tests/test-mbrtoc32-1.sh.
4107         * tests/test-fnmatch-3.sh: New file, based on tests/test-mbrtoc32-2.sh.
4108         * tests/test-fnmatch-4.sh: New file, based on tests/test-mbrtoc32-3.sh.
4109         * tests/test-fnmatch-5.sh: New file, based on tests/test-mbrtoc32-4.sh.
4110         * tests/test-fnmatch-w32.c: New file, based on tests/test-mbrtoc32-w32.c
4111         and tests/test-fnmatch.c.
4112         * tests/test-fnmatch-w32-1.sh: New file, based on
4113         tests/test-mbrtoc32-w32-1.sh.
4114         * tests/test-fnmatch-w32-2.sh: New file, based on
4115         tests/test-mbrtoc32-w32-2.sh.
4116         * tests/test-fnmatch-w32-3.sh: New file, based on
4117         tests/test-mbrtoc32-w32-3.sh.
4118         * tests/test-fnmatch-w32-4.sh: New file, based on
4119         tests/test-mbrtoc32-w32-4.sh.
4120         * tests/test-fnmatch-w32-5.sh: New file, based on
4121         tests/test-mbrtoc32-w32-5.sh.
4122         * tests/test-fnmatch-w32-6.sh: New file, based on
4123         tests/test-mbrtoc32-w32-6.sh.
4124         * tests/test-fnmatch-w32-7.sh: New file, based on
4125         tests/test-mbrtoc32-w32-7.sh.
4126         * modules/fnmatch-tests: Add the new program and shell scripts.
4128 2023-07-22  Bruno Haible  <bruno@clisp.org>
4130         doc: Mention a wctype bug.
4131         * doc/posix-functions/wctype.texi: Mention a bug on mingw.
4133 2023-07-21  Bruno Haible  <bruno@clisp.org>
4135         unistr/u8-pcpy, unistr/u16-pcpy, unistr/u32-pcpy: Add tests.
4136         * tests/unistr/test-pcpy.h: New file, based on tests/unistr/test-cpy.h.
4137         * tests/unistr/test-u8-pcpy.c: New file, based on
4138         tests/unistr/test-u8-cpy.c.
4139         * tests/unistr/test-u16-pcpy.c: New file, based on
4140         tests/unistr/test-u16-cpy.c.
4141         * tests/unistr/test-u32-pcpy.c: New file, based on
4142         tests/unistr/test-u32-cpy.c.
4143         * modules/unistr/u8-pcpy-tests: New file, based on
4144         modules/unistr/u8-cpy-tests.
4145         * modules/unistr/u16-pcpy-tests: New file, based on
4146         modules/unistr/u16-cpy-tests.
4147         * modules/unistr/u32-pcpy-tests: New file, based on
4148         modules/unistr/u32-cpy-tests.
4150         unistr/u8-pcpy, unistr/u16-pcpy, unistr/u32-pcpy: New modules.
4151         * lib/unistr.in.h (u8_pcpy, u16_pcpy, u32_pcpy): New declarations.
4152         * lib/unistr/u-pcpy.h: New file, based on lib/wmempcpy.c.
4153         * lib/unistr/u8-pcpy.c: New file, based on lib/unistr/u8-cpy.c.
4154         * lib/unistr/u16-pcpy.c: New file, based on lib/unistr/u16-cpy.c.
4155         * lib/unistr/u32-pcpy.c: New file, based on lib/unistr/u32-cpy.c.
4156         * modules/unistr/u8-pcpy: New file, based on modules/unistr/u8-cpy.
4157         * modules/unistr/u16-pcpy: New file, based on modules/unistr/u16-cpy.
4158         * modules/unistr/u32-pcpy: New file, based on modules/unistr/u32-cpy.
4160 2023-07-20  Bruno Haible  <bruno@clisp.org>
4162         error-h: Fix dependencies.
4163         Reported by <cbh34680@gmail.com> in
4164         <https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00111.html>.
4165         * modules/error-h (Depends-on): Add include_next.
4167 2023-07-20  Pádraig Brady  <P@draigBrady.com>
4169         fts: fix compilation errors with fts_cross_check()
4170         * lib/fts.c: Fix printf format chars.
4171         * lib/fts_.h: Provide a declaration for users.
4173 2023-07-19  Bruno Haible  <bruno@clisp.org>
4175         Document migration path for obsolescent functions.
4176         * doc/glibc-functions/timespec_get.texi: Add reference to ISO C.
4177         * doc/posix-functions/_tolower.texi: Recommend use of tolower.
4178         * doc/posix-functions/_toupper.texi: Recommend use of toupper.
4179         * doc/posix-functions/asctime.texi: Recommend use of strftime.
4180         * doc/posix-functions/asctime_r.texi: Likewise.
4181         * doc/posix-functions/ctime.texi: Recommend use of localtime_r and
4182         strftime.
4183         * doc/posix-functions/ctime_r.texi: Likewise.
4184         * doc/posix-functions/ftw.texi: Recommend use of fts.
4185         * doc/posix-functions/getitimer.texi: Recommend use of timer_gettime.
4186         * doc/posix-functions/gets.texi: Recommend use of fgets.
4187         * doc/posix-functions/gettimeofday.texi: Recommend use of gettime or
4188         timespec_get.
4189         * doc/posix-functions/inet_addr.texi: Recommend use of inet_pton.
4190         * doc/posix-functions/inet_ntoa.texi: Recommend use of inet_ntop.
4191         * doc/posix-functions/pthread_getconcurrency.texi: Recommend no-op.
4192         * doc/posix-functions/pthread_setconcurrency.texi: Recommend no-op.
4193         * doc/posix-functions/rand_r.texi: Recommend use of random_r.
4194         * doc/posix-functions/setitimer.texi: Recommend use of timer_create and
4195         timer_settime.
4196         * doc/posix-functions/setpgrp.texi: Recommend use of setpgid or setsid.
4197         * doc/posix-functions/sighold.texi: Recommend use of sigprocmask.
4198         * doc/posix-functions/sigignore.texi: Recommend use of sigaction.
4199         * doc/posix-functions/siginterrupt.texi: Recommend use of sigaction.
4200         * doc/posix-functions/sigpause.texi: Recommend use of sigsuspend.
4201         * doc/posix-functions/sigrelse.texi: Recommend use of sigprocmask.
4202         * doc/posix-functions/sigset.texi: Recommend use of sigaction.
4203         * doc/posix-functions/tempnam.texi: Recommend use of mkstemp.
4204         * doc/posix-functions/ulimit.texi: Recommend use of getrlimit and
4205         setrlimit.
4206         * doc/posix-functions/utime.texi: Recommend use of utimens.
4208 2023-07-19  Paul Eggert  <eggert@cs.ucla.edu>
4210         Document POSIX obsolescence
4211         * doc/posix-functions/_longjmp.texi, doc/posix-functions/_setjmp.texi:
4212         * doc/posix-functions/_tolower.texi, doc/posix-functions/_toupper.texi:
4213         * doc/posix-functions/asctime.texi, doc/posix-functions/asctime_r.texi:
4214         * doc/posix-functions/ctime.texi, doc/posix-functions/ctime_r.texi:
4215         * doc/posix-functions/encrypt.texi, doc/posix-functions/ftw.texi:
4216         * doc/posix-functions/getitimer.texi, doc/posix-functions/gets.texi:
4217         * doc/posix-functions/gettimeofday.texi:
4218         * doc/posix-functions/inet_addr.texi:
4219         * doc/posix-functions/inet_ntoa.texi, doc/posix-functions/isascii.texi:
4220         * doc/posix-functions/pthread_getconcurrency.texi:
4221         * doc/posix-functions/pthread_setconcurrency.texi:
4222         * doc/posix-functions/rand_r.texi, doc/posix-functions/setitimer.texi:
4223         * doc/posix-functions/setkey.texi, doc/posix-functions/setpgrp.texi:
4224         * doc/posix-functions/sighold.texi, doc/posix-functions/sigignore.texi:
4225         * doc/posix-functions/siginterrupt.texi:
4226         * doc/posix-functions/sigpause.texi, doc/posix-functions/sigrelse.texi:
4227         * doc/posix-functions/sigset.texi, doc/posix-functions/tempnam.texi:
4228         * doc/posix-functions/toascii.texi, doc/posix-functions/ulimit.texi:
4229         * doc/posix-functions/utime.texi:
4230         Update as per draft 3 of POSIX 10003.1-202x.
4232 2023-07-19  Paul Eggert  <eggert@cs.ucla.edu>
4234         Don’t worry about Version 7 tolower
4235         Some code ported back to pre-C89 libraries where tolower (C) had
4236         undefined behavior if C is not an upper case character.
4237         Nowadays that function is _tolower which is itself obsolete,
4238         and much Gnulib code already assumes this part of C89 anyway.
4239         Assume C89 or better tolower, which simplifies the code
4240         and should improve performance slightly.
4241         * lib/mbmemcasecmp.c, lib/mbmemcasecoll.c, lib/mbscasecmp.c:
4242         * lib/mbscasestr.c, lib/mbsncasecmp.c, lib/mbspcasecmp.c:
4243         * lib/strcasecmp.c, lib/strcasestr.c, lib/strncasecmp.c:
4244         (TOLOWER): Remove.  All uses replaced by tolower.
4246 2023-07-19  Bruno Haible  <bruno@clisp.org>
4248         c32swidth, mbszero: Fix file list.
4249         * modules/c32swidth (Files): Add locale-ja.m4, locale-zh.m4, codeset.m4.
4250         * modules/mbszero (Files): Likewise.
4252 2023-07-19  Bruno Haible  <bruno@clisp.org>
4254         wcsnrtombs: Fix file list.
4255         * modules/wcsnrtombs (Files): Add locale-fr.m4.
4257 2023-07-19  Bruno Haible  <bruno@clisp.org>
4259         mbsnrtowcs: Fix file list.
4260         * modules/mbsnrtowcs (Files): Add locale-fr.m4, codeset.m4.
4262 2023-07-19  Bruno Haible  <bruno@clisp.org>
4264         mbrtoc16: Fix file list.
4265         * modules/mbrtoc16 (Files): Add locale-zh.m4.
4267 2023-07-19  Bruno Haible  <bruno@clisp.org>
4269         mbrlen: Fix file list.
4270         * modules/mbrlen (Files): Add locale-fr.m4, locale-ja.m4, locale-zh.m4,
4271         codeset.m4.
4273 2023-07-18  Paul Eggert  <eggert@cs.ucla.edu>
4275         mbiterf, mbuiterf: port to strict C17
4276         I ran into this problem on NetBSD 9.3.
4277         * lib/mbiterf.h (mbiterf_next) [!GNULIB_MBRTOC32_REGULAR]:
4278         * lib/mbuiterf.h (mbuiterf_next) [!GNULIB_MBRTOC32_REGULAR]:
4279         Don’t label a declaration.
4281 2023-07-18  Bruno Haible  <bruno@clisp.org>
4283         mbiter, mbiterf, mbuiter, mbuiterf: Force inlining with clang.
4284         * lib/mbiter.h (MBITER_INLINE): Use _GL_ATTRIBUTE_ALWAYS_INLINE.
4285         * lib/mbiterf.h (MBITERF_INLINE): Likewise.
4286         * lib/mbuiter.h (MBUITER_INLINE): Likewise.
4287         * lib/mbuiterf.h (MBUITERF_INLINE): Likewise.
4289 2023-07-18  Bruno Haible  <bruno@clisp.org>
4291         mbsspn: Optimize.
4292         * lib/mbsspn.c: Include mbuiterf.h instead of mbuiter.h.
4293         (mbsspn): Use mbuif_* macros instead of mbui_* macros.
4294         * modules/mbsspn (Depends-on): Add mbuiterf. Remove mbuiter.
4296         mbscspn: Optimize.
4297         * lib/mbscspn.c: Include mbuiterf.h instead of mbuiter.h.
4298         (mbscspn): Use mbuif_* macros instead of mbui_* macros.
4299         * modules/mbscspn (Depends-on): Add mbuiterf. Remove mbuiter.
4301         mbspbrk: Optimize.
4302         * lib/mbspbrk.c: Include mbuiterf.h instead of mbuiter.h.
4303         (mbspbrk): Use mbuif_* macros instead of mbui_* macros.
4304         * modules/mbspbrk (Depends-on): Add mbuiterf. Remove mbuiter.
4306         mbspcasecmp: Optimize.
4307         * lib/mbspcasecmp.c: Include mbuiterf.h instead of mbuiter.h.
4308         (mbspcasecmp): Use mbuif_* macros instead of mbui_* macros.
4309         * modules/mbspcasecmp (Depends-on): Add mbuiterf. Remove mbuiter.
4311         mbsncasecmp: Optimize.
4312         * lib/mbsncasecmp.c: Include mbuiterf.h instead of mbuiter.h.
4313         (mbsncasecmp): Use mbuif_* macros instead of mbui_* macros.
4314         * modules/mbsncasecmp (Depends-on): Add mbuiterf. Remove mbuiter.
4316         mbscasecmp: Optimize.
4317         * lib/mbscasecmp.c: Include mbuiterf.h instead of mbuiter.h.
4318         (mbscasecmp): Use mbuif_* macros instead of mbui_* macros.
4319         * modules/mbscasecmp (Depends-on): Add mbuiterf. Remove mbuiter.
4321         mbssep: Optimize.
4322         * lib/mbssep.c: Include mbuiterf.h instead of mbuiter.h.
4323         (mbssep): Use mbuif_* macros instead of mbui_* macros.
4324         * modules/mbssep (Depends-on): Add mbuiterf. Remove mbuiter.
4326         mbsrchr: Optimize.
4327         * lib/mbsrchr.c: Include mbuiterf.h instead of mbuiter.h.
4328         (mbsrchr): Use mbuif_* macros instead of mbui_* macros.
4329         * modules/mbsrchr (Depends-on): Add mbuiterf. Remove mbuiter.
4331         mbschr: Optimize.
4332         * lib/mbschr.c: Include mbuiterf.h instead of mbuiter.h.
4333         (mbschr): Use mbuif_* macros instead of mbui_* macros.
4334         * modules/mbschr (Depends-on): Add mbuiterf. Remove mbuiter.
4336         mbslen: Optimize.
4337         * lib/mbslen.c: Include mbuiterf.h instead of mbuiter.h.
4338         (mbslen): Use mbuif_* macros instead of mbui_* macros.
4339         * modules/mbslen (Depends-on): Add mbuiterf. Remove mbuiter.
4341         mbuiterf: Add a benchmark.
4342         * tests/bench-mbuiterf.c: New file, based on tests/bench-mbuiter.c.
4343         * modules/mbuiterf-bench-tests: New file, based on
4344         modules/mbuiter-bench-tests.
4346         mbuiterf: New module.
4347         * lib/mbuiterf.h: New file, based on lib/mbuiter.h.
4348         * lib/mbuiterf.c: New file, based on lib/mbuiter.c.
4349         * modules/mbuiterf: New file, based on modules/mbuiter.
4351 2023-07-18  Bruno Haible  <bruno@clisp.org>
4353         mbiterf: Fix compiler warnings.
4354         * lib/mbiterf.h (mbiterf_next): Use C99 designated initializer syntax.
4355         * tests/bench-mbiterf.c (do_test): Use a 'const char *' pointer.
4357         trim: Optimize.
4358         * lib/trim.c: Include mbiterf.h instead of mbiter.h.
4359         (trim2): Use mbif_* macros instead of mbi_* macros.
4360         * modules/trim (Depends-on): Add mbiterf. Remove mbiter.
4362         mbmemcasecmp: Optimize.
4363         * lib/mbmemcasecmp.c: Include mbiterf.h instead of mbiter.h.
4364         (mbmemcasecmp): Use mbif_* macros instead of mbi_* macros.
4365         * modules/mbmemcasecmp (Depends-on): Add mbiterf. Remove mbiter.
4367         mbsnlen: Optimize.
4368         * lib/mbsnlen.c: Include mbiterf.h instead of mbiter.h.
4369         (mbsnlen): Use mbif_* macros instead of mbi_* macros.
4370         * modules/mbsnlen (Depends-on): Add mbiterf. Remove mbiter.
4372         mbiterf: Add a benchmark.
4373         * tests/bench-mbiterf.c: New file, based on tests/bench-mbiter.c.
4374         * modules/mbiterf-bench-tests: New file, based on
4375         modules/mbiter-bench-tests.
4377         mbiterf: New module.
4378         * lib/mbiterf.h: New file, based on lib/mbiter.h.
4379         * lib/mbiterf.c: New file, based on lib/mbiter.c.
4380         * modules/mbiterf: New file, based on modules/mbiter.
4382 2023-07-18  Bruno Haible  <bruno@clisp.org>
4384         mbstok_r: Simplify dependencies.
4385         * lib/mbstok_r.c: Include <stdlib.h> instead of mbuiter.h.
4386         * modules/mbstok_r (Depends-on): Remove mbuiter.
4388 2023-07-17  Simon Josefsson  <simon@josefsson.org>
4390         announce-gen: Allow using local git user.name.
4391         * build-aux/announce-gen (readable_interval): Remove --global
4392         parameter to 'git config' call.
4394 2023-07-17  Bruno Haible  <bruno@clisp.org>
4396         mbuiter: Optimize.
4397         * lib/mbuiter.h (struct mbuiter_multi): Add cur_max field.
4398         (mbui_init): Initialize it.
4399         (mbuiter_multi_next): Use it instead of MB_CUR_MAX.
4400         (mbuiter_multi_copy): Update.
4402 2023-07-17  Bruno Haible  <bruno@clisp.org>
4404         mbchar: Reduce size of 'struct mbchar'.
4405         * modules/mbfile (configure.ac): Define GNULIB_MBFILE as an indicator.
4406         * lib/mbchar.h (MBCHAR_BUF_SIZE): Set to 4.
4407         (struct mbchar): Disable member 'buf' if the module 'mbfile' is not in
4408         use.
4409         (mb_setascii): Disable if the module 'mbfile' is not in use.
4410         (mb_copy): Update.
4412 2023-07-17  Bruno Haible  <bruno@clisp.org>
4414         mbszero: Fix for Minix.
4415         * lib/wchar.in.h: (_GL_MBSTATE_INIT_SIZE): Don't define on Minix.
4416         (_GL_MBSTATE_ZERO_SIZE): Define to 4 on Minix.
4418 2023-07-17  Bruno Haible  <bruno@clisp.org>
4420         mbszero: Source code tweaks.
4421         Suggested by Paul Eggert in
4422         <https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00084.html>.
4423         * lib/wchar.in.h: Comment changes.
4424         (_GL_MBSTATE_INIT_SIZE): Don't define on NetBSD, Solaris, native
4425         Windows. Use a safe default at the end.
4426         (_GL_MBSTATE_ZERO_SIZE): Don't define on AIX, IRIX, Solaris, native
4427         Windows. Use a safe default at the end.
4428         * lib/mbrtoc16.c: Update comments accordingly.
4430 2023-07-16  Bruno Haible  <bruno@clisp.org>
4432         dfa: Optimize clearing an mbstate_t.
4433         * lib/dfa.c (mbszero) [GAWK]: Add fallback definition.
4434         (mbs_to_wchar, lex, addtok_wc, dfaexec_main): Use mbszero.
4435         * modules/dfa (Depends-on): Add mbszero.
4437 2023-07-16  Bruno Haible  <bruno@clisp.org>
4439         uchar-c23: Optimize clearing an mbstate_t.
4440         * lib/lc-charset-unicode.c (locale_encoding_to_unicode,
4441         unicode_to_locale_encoding): Use mbszero.
4442         * modules/uchar-c23 (Depends-on): Add mbszero.
4444 2023-07-16  Bruno Haible  <bruno@clisp.org>
4446         quotearg: Optimize clearing an mbstate_t.
4447         * lib/quotearg.c: Include <wchar.h>.
4448         (quotearg_buffer_restyled): Use mbszero.
4449         * modules/quotearg (Depends-on): Add mbszero.
4451 2023-07-16  Bruno Haible  <bruno@clisp.org>
4453         vasnprintf, vasnwprintf: Optimize clearing an mbstate_t.
4454         * lib/vasnprintf.c (VASNPRINTF): Use mbszero.
4455         * modules/vasnprintf (Depends-on): Add mbszero.
4456         * modules/vasnwprintf (Depends-on): Likewise.
4457         * modules/c-vasnprintf (Depends-on): Likewise.
4458         * modules/unistdio/u8-vasnprintf (Depends-on): Likewise.
4459         * modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
4460         * modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
4461         * modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
4462         * modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
4463         * modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
4464         * modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
4466 2023-07-16  Bruno Haible  <bruno@clisp.org>
4468         mbmemcasecoll: Optimize clearing an mbstate_t.
4469         * lib/mbmemcasecoll.c (apply_c32tolower): Use mbszero.
4470         * modules/mbmemcasecoll (Depends-on): Add mbszero.
4472 2023-07-16  Bruno Haible  <bruno@clisp.org>
4474         mbswidth: Optimize clearing an mbstate_t.
4475         * lib/mbswidth.c (mbsnwidth): Use mbszero.
4476         * modules/mbswidth (Depends-on): Add mbszero.
4478 2023-07-16  Bruno Haible  <bruno@clisp.org>
4480         mbfile: Optimize clearing an mbstate_t.
4481         * lib/mbfile.h (mbfile_multi_getc, mbf_init): Use mbszero.
4482         * modules/mbfile (Depends-on): Add mbszero.
4484 2023-07-16  Bruno Haible  <bruno@clisp.org>
4486         mbuiter: Optimize clearing an mbstate_t.
4487         * lib/mbuiter.h: Include <wchar.h>.
4488         (mbuiter_multi_next, mbuiter_multi_copy, mbui_init): Use mbszero.
4489         * modules/mbuiter (Depends-on): Add mbszero.
4491 2023-07-16  Bruno Haible  <bruno@clisp.org>
4493         mbiter: Optimize clearing an mbstate_t.
4494         * lib/mbiter.h: Include <wchar.h>.
4495         (mbiter_multi_next, mbiter_multi_copy, mbi_init): Use mbszero.
4496         * modules/mbiter (Depends-on): Add mbszero.
4498 2023-07-16  Bruno Haible  <bruno@clisp.org>
4500         c32stombs: Optimize clearing an mbstate_t.
4501         * lib/c32stombs.c (c32stombs): Use mbszero.
4502         * lib/uchar.in.h (c32stombs): Likewise.
4503         * modules/c32stombs (Depends-on): Add mbszero.
4505 2023-07-16  Bruno Haible  <bruno@clisp.org>
4507         mbstoc32s: Optimize clearing an mbstate_t.
4508         * lib/mbstoc32s.c (mbstoc32s): Use mbszero.
4509         * lib/uchar.in.h (mbstoc32s): Likewise.
4510         * modules/mbstoc32s (Depends-on): Add mbszero.
4512 2023-07-16  Bruno Haible  <bruno@clisp.org>
4514         mbstowcs: Optimize clearing an mbstate_t.
4515         * lib/mbstowcs.c (mbstowcs): Use mbszero.
4516         * modules/mbstowcs (Depends-on): Add mbszero.
4518 2023-07-16  Bruno Haible  <bruno@clisp.org>
4520         c32tob: Optimize clearing an mbstate_t.
4521         * lib/c32tob.c (c32tob): Use mbszero.
4522         * modules/c32tob (Depends-on): Add mbszero.
4524 2023-07-16  Bruno Haible  <bruno@clisp.org>
4526         wctomb: Optimize clearing an mbstate_t.
4527         * lib/wctomb-impl.h (wctomb): Use mbszero.
4528         * modules/wctomb (Depends-on): Add mbszero.
4530 2023-07-16  Bruno Haible  <bruno@clisp.org>
4532         btoc32: Optimize clearing an mbstate_t.
4533         * lib/btoc32.c: Include <wchar.h>.
4534         (btoc32): Use mbszero.
4535         * modules/btoc32 (Depends-on): Add mbszero.
4537 2023-07-16  Bruno Haible  <bruno@clisp.org>
4539         btowc: Optimize clearing an mbstate_t.
4540         * lib/btowc.c (btowc): Use mbszero.
4541         * modules/btowc (Depends-on): Add mbszero.
4543 2023-07-16  Bruno Haible  <bruno@clisp.org>
4545         mbrtoc32: Optimize clearing an mbstate_t.
4546         * lib/mbrtoc32.c (mbrtoc32): Use mbszero.
4547         * modules/mbrtoc32 (Depends-on): Add mbsinit, mbszero.
4549 2023-07-16  Bruno Haible  <bruno@clisp.org>
4551         mbtowc: Optimize clearing an mbstate_t.
4552         * lib/mbtowc-impl.h (mbtowc): Use mbszero.
4553         * modules/mbtowc (Depends-on): Add mbszero.
4555 2023-07-16  Bruno Haible  <bruno@clisp.org>
4557         mbszero: New module.
4558         * lib/wchar.in.h: Include <string.h>.
4559         (_GL_MBSTATE_INIT_SIZE, _GL_MBSTATE_ZERO_SIZE): New macros.
4560         (mbszero): New declaration.
4561         * lib/mbrtoc16.c: Update comments.
4562         * lib/mbszero.c: New file.
4563         * m4/wchar_h.m4 (gl_WCHAR_H_REQUIRE_DEFAULTS): Initialize
4564         GNULIB_MBSZERO.
4565         * modules/wchar (Depends-on): Add extern-inline.
4566         (Makefile.am): Substitute GNULIB_MBSZERO.
4567         * modules/mbszero: New file.
4569 2023-07-15  Bruno Haible  <bruno@clisp.org>
4571         mbsinit: Fix module description.
4572         * modules/mbsinit (Files): Add m4/mbrtowc.m4.
4574 2023-07-15  Bruno Haible  <bruno@clisp.org>
4576         c32_apply_type_test: Fix compilation error with GCC < 9.
4577         * lib/uchar.in.h (c32_apply_type_test) [_GL_WCHAR_T_IS_UCS4]: Remove
4578         _GL_ARG_NONNULL attribute.
4580 2023-07-13  Bruno Haible  <bruno@clisp.org>
4582         mbchar: Optimize is_basic.
4583         * lib/mbchar.h (is_basic_table): Remove declaration.
4584         (is_basic) [IS_BASIC_ASCII]: Define through a simple range test.
4585         * lib/mbchar.c (is_basic_table): Remove array.
4587         localcharset: Clean up locale encodings used by glibc.
4588         * lib/localcharset.h: Remove VISCII from the list, since never supported
4589         in glibc/localedata/SUPPORTED. JOHAB is not supported by glibc any more
4590         since 2000-09-25. TCVN5712-1 is not supported by glibc any more since
4591         2012-05-21.
4593 2023-07-13  Bruno Haible  <bruno@clisp.org>
4595         doc: Mention c32_get_mapping, c32_apply_mapping.
4596         * doc/posix-functions/wctrans.texi: Mention c32_get_mapping.
4597         * doc/posix-functions/towctrans.texi: Mention c32_apply_mapping.
4598         * doc/strings.texi (Comparison of character APIs): Mention both.
4600         c32_apply_mapping: Add tests.
4601         * tests/test-c32_apply_mapping.c: New file.
4602         * modules/c32_apply_mapping-tests: New file.
4604         c32_apply_mapping: New module.
4605         * lib/uchar.in.h (c32_apply_mapping): New declaration.
4606         * lib/c32_apply_mapping.c: New file.
4607         * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
4608         GNULIB_C32_APPLY_MAPPING.
4609         * modules/uchar (Makefile.am): Substitute GNULIB_C32_APPLY_MAPPING.
4610         * modules/c32_apply_mapping: New file.
4612         c32_get_mapping: Add tests.
4613         * tests/test-c32_get_mapping.c: New file.
4614         * modules/c32_get_mapping-tests: New file.
4616         c32_get_mapping: New module.
4617         * lib/uchar.in.h (c32_mapping_t): New type.
4618         (c32_get_mapping): New declaration.
4619         * lib/c32_get_mapping.c: New file, based on lib/wctrans-impl.h.
4620         * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
4621         GNULIB_C32_GET_MAPPING.
4622         * modules/uchar (Makefile.am): Substitute GNULIB_C32_GET_MAPPING.
4623         * modules/c32_get_mapping: New file.
4625         towctrans: Relax license.
4626         * modules/towctrans (License): Change to LGPLv2+.
4627         * lib/towctrans.c: Update license notice.
4628         * lib/towctrans-impl.h: Likewise.
4630         wctrans: Relax license.
4631         * modules/wctrans (License): Change to LGPLv2+.
4632         * lib/wctrans.c: Update license notice.
4633         * lib/wctrans-impl.h: Likewise.
4635 2023-07-12  Bruno Haible  <bruno@clisp.org>
4637         doc: Mention c32_get_type_test, c32_apply_type_test.
4638         * doc/posix-functions/wctype.texi: Mention c32_get_type_test.
4639         * doc/posix-functions/iswctype.texi: Mention c32_apply_type_test.
4640         * doc/strings.texi (Comparison of character APIs): Mention both.
4642         c32_apply_type_test: Add tests.
4643         * tests/test-c32_apply_type_test.c: New file.
4644         * modules/c32_apply_type_test-tests: New file.
4646         c32_apply_type_test: New module.
4647         * lib/uchar.in.h (c32_apply_type_test): New declaration.
4648         * lib/c32_apply_type_test.c: New file.
4649         * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
4650         GNULIB_C32_APPLY_TYPE_TEST.
4651         * modules/uchar (Makefile.am): Substitute GNULIB_C32_APPLY_TYPE_TEST.
4652         * modules/c32_apply_type_test: New file.
4654         c32_get_type_test: Add tests.
4655         * tests/test-c32_get_type_test.c: New file.
4656         * modules/c32_get_type_test-tests: New file.
4658         c32_get_type_test: New module.
4659         * lib/uchar.in.h (c32_type_test_t): New type.
4660         (c32_get_type_test): New declaration.
4661         * lib/c32_get_type_test.c: New file, based on lib/wctype-impl.h.
4662         * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
4663         GNULIB_C32_GET_TYPE_TEST.
4664         * modules/uchar (Makefile.am): Substitute GNULIB_C32_GET_TYPE_TEST.
4665         * modules/c32_get_type_test: New file.
4667         iswctype: Relax license.
4668         * modules/iswctype (License): Change to LGPLv2+.
4669         * lib/iswctype.c: Update license notice.
4670         * lib/iswctype-impl.h: Likewise.
4672         wctype: Relax license.
4673         * modules/wctype (License): Change to LGPLv2+.
4674         * lib/wctype.c: Update license notice.
4675         * lib/wctype-impl.h: Likewise.
4677 2023-07-12  Bruno Haible  <bruno@clisp.org>
4679         mbiter, mbuiter: Small optimization.
4680         * lib/mbiter.h: Optimize away the in_shift field when the module
4681         'mbrtoc32-regular' is in use.
4682         * lib/mbuiter.h: Likewise.
4684 2023-07-12  Gavin Smith  <gavinsmith0123@gmail.com>
4686         gendocs: support chapter- and section-level split
4687         * doc/gendocs_template: Add lines to mark parts of file to output
4688         only when splitting HTML by node.
4689         Remove obsolete comment about ranges of years in copyright notice
4690         (as per Karl).
4691         * build-aux/gendocs.sh
4692         [!texi2html]: Strip out parts of the template depending on --split.
4693         [texi2html] Include all of the template as before.
4695 2023-07-11  Bruno Haible  <bruno@clisp.org>
4697         mbsrtoc32s, mbsnrtoc32s: Small optimization.
4698         * lib/mbsrtoc32s.c (USES_C32): Set to 0 when the module
4699         'mbrtoc32-regular' is in use.
4700         * lib/mbsnrtoc32s.c (USES_C32): Likewise.
4702 2023-07-11  Bruno Haible  <bruno@clisp.org>
4704         mbswidth: Add a benchmark.
4705         * tests/bench-mbswidth.c: New file, based on tests/bench-mbiter.c.
4706         * modules/mbswidth-bench-tests: New file.
4708         mbuiter: Add a benchmark.
4709         * tests/bench-mbuiter.c: New file, based on tests/bench-mbiter.c.
4710         * modules/mbuiter-bench-tests: New file.
4712         mbiter: Add a benchmark.
4713         * tests/bench-mbiter.c: New file.
4714         * tests/bench-multibyte.h: New file.
4715         * modules/mbiter-bench-tests: New file.
4717         tests: Create new file bench.h.
4718         * tests/bench.h: New file, extracted from tests/bench-digest.h.
4719         * tests/bench-digest.h: Include it.
4720         * modules/crypto/md5-buffer-tests (Files): Add tests/bench.h.
4721         * modules/crypto/sha1-buffer-tests (Files): Likewise.
4722         * modules/crypto/sha256-buffer-tests (Files): Likewise.
4723         * modules/crypto/sha512-buffer-tests (Files): Likewise.
4725 2023-07-11  Bruno Haible  <bruno@clisp.org>
4727         Optimize away some mbsinit calls.
4728         * lib/mbiter.h (mbiter_multi_next): When the module 'mbrtoc32-regular'
4729         is in use, don't invoke mbsinit and don't compare the mbrtoc32 result
4730         against (size_t)(-3).
4731         * lib/mbuiter.h (mbuiter_multi_next): Likewise.
4732         * lib/mbfile.h (mbfile_multi_getc): Likewise.
4733         * lib/mbswidth.c (mbsnwidth): Likewise.
4734         * lib/mbmemcasecoll.c (apply_c32tolower): Likewise.
4735         * lib/quotearg.c (quotearg_buffer_restyled): Likewise.
4737 2023-07-11  Bruno Haible  <bruno@clisp.org>
4739         Fix build errors on Linux/hppa.
4740         * modules/math (Makefile.am): Split long pipe command into several
4741         smaller commands.
4742         * modules/pthread-h (Makefile.am): Likewise.
4743         * modules/stdio (Makefile.am): Likewise.
4744         * modules/stdlib (Makefile.am): Likewise.
4745         * modules/string (Makefile.am): Likewise.
4746         * modules/unictype/base (Makefile.am): Likewise.
4747         * modules/unistd (Makefile.am): Likewise.
4748         * modules/wchar (Makefile.am): Likewise.
4750 2023-07-11  Paul Eggert  <eggert@cs.ucla.edu>
4752         quotearg: update Solaris-related comments
4753         * doc/solaris-versions: Modernize.
4754         * lib/quotearg.c: Update comments.
4756 2023-07-10  Bruno Haible  <bruno@clisp.org>
4758         dfa: Overcome wchar_t limitations.
4759         * lib/localeinfo.h: Include <uchar.h>. Add special definitions for GAWK.
4760         (case_folded_counterparts): Change array element type to char32_t.
4761         * lib/localeinfo.c: Include <uchar.h>. Add special definitions for GAWK.
4762         (is_using_utf8, init_localeinfo): Use mbrtoc32 instead of mbrtowc.
4763         (lonesome_lower): Change element type to 'unsigned short'.
4764         (case_folded_counterparts): Change array element type to char32_t. Use
4765         c32toupper instead of towupper. Use c32tolower instead of towlower.
4766         * lib/dfa.c: Include <uchar.h>. Add special definitions for GAWK.
4767         (struct mb_char_classes): Change element type of 'chars' to char32_t.
4768         (mbs_to_wchar): Use mbrtoc32 instead of mbrtowc.
4769         (setbit_wc): Change type of first argument to char32_t. Use c32tob
4770         instead of wctob.
4771         (parse_bracket_exp): Update.
4772         (lex): Use c32isprint instead of iswprint. Use c32isspace instead of
4773         iswspace. Use c32rtomb instead of a %lc directive.
4774         (addtok_wc): Use c32rtomb instead of wcrtomb.
4775         (atom): Update.
4776         * modules/dfa (Depends-on): Remove wctype-h. Add uchar,
4777         mbrtoc32-regular, c32rtomb, c32tob, c32tolower, c32toupper, c32isprint,
4778         c32isspace.
4779         (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
4780         * modules/dfa-tests (Makefile.am): Link test-dfa-match-aux with
4781         $(LIBUNISTRING) $(LIBC32CONV).
4782         * NEWS: Mention the change.
4784 2023-07-10  Bruno Haible  <bruno@clisp.org>
4786         mbrtoc32-regular: Add tests.
4787         * tests/test-mbrtoc32-regular.c: New file.
4788         * modules/mbrtoc32-regular-tests: New file.
4790         mbrtoc32-regular: New module.
4791         * modules/mbrtoc32-regular: New file.
4792         * lib/mbrtoc32.c (mbrtoc32): If the module 'mbrtoc32-regular' is present
4793         and the system's mbrtoc32 returned a char32_t, clear the mbstate_t.
4794         * doc/posix-functions/mbrtoc32.texi: Mention the new module.
4796 2023-07-10  Bruno Haible  <bruno@clisp.org>
4798         Apply the last change to all locale-*.m4 files.
4799         * m4/locale-ar.m4 (gt_LOCALE_AR): Reject locale name that might cause
4800         trouble with sh or make.
4801         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.
4803 2023-07-09  Paul Eggert  <eggert@cs.ucla.edu>
4805         c32width: protect against bad configure args
4806         Avoid ‘test’ misuse with ‘./configure gt_cv_locale_fr=""’.
4807         Possible problem of this sort reported by Angelo Graziosi in:
4808         https://lists.gnu.org/r/emacs-devel/2023-07/msg00329.html
4809         * m4/locale-fr.m4 (gt_LOCALE_FR_UTF8, gt_LOCALE_FR_UTF8):
4810         * m4/locale-ja.m4 (gt_LOCALE_JA):
4811         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN):
4812         Reject locale names that might cause trouble with sh or make.
4814 2023-07-06  Bruno Haible  <bruno@clisp.org>
4816         wcscmp: Work around a glibc bug.
4817         Reported by مصعب الزعبي (Mosab Al-Zoubi) <moceap@hotmail.com> in
4818         <https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00029.html>.
4819         * m4/wcscmp.m4 (gl_FUNC_WCSCMP): Test against a glibc/arm* bug.
4820         * doc/posix-functions/wcscmp.texi: Mention the glibc/arm* bug.
4822 2023-07-04  Bruno Haible  <bruno@clisp.org>
4824         mbiter, mbfile, mbmemcasecoll: Improve handling of mbrtoc32 result.
4825         * lib/mbiter.h (mbi_avail): If cur.ptr has reached the limit but
4826         in_shift is true, call mbiter_multi_next.
4827         (mbiter_multi_next): Set in_shift to false after an incomplete multibyte
4828         character.
4829         * lib/mbfile.h (mbfile_multi_getc): Pass the input bytes incrementally
4830         into mbrtoc32. When mbf->state is not in the initial state, call
4831         mbrtoc32 again.
4832         * lib/mbmemcasecoll.c (apply_c32tolower): When the state is not in the
4833         initial state, call mbrtoc32 again.
4835 2023-07-04  Bruno Haible  <bruno@clisp.org>
4837         mbiter, mbuiter, mbfile: Improve state handling after invalid input.
4838         * lib/mbiter.h (mbiter_multi_next): After an invalid multibyte sequence
4839         was encountered, clear the state.
4840         * lib/mbuiter.h (mbuiter_multi_next): Likewise.
4841         * lib/mbfile.h (mbfile_multi_getc): Likewise.
4843 2023-07-04  Bruno Haible  <bruno@clisp.org>
4845         mbchar: Optimize all chars from the POSIX "portable character set".
4846         * lib/mbchar.h (is_basic): Include all the characters from the POSIX
4847         "portable character set".
4848         * lib/mbchar.c (is_basic_table): Likewise.
4849         * lib/mbiter.h (mbiter_multi_next): Update comment.
4850         * lib/mbuiter.h (mbuiter_multi_next): Likewise.
4851         * lib/mbfile.h (mbfile_multi_getc): Likewise.
4853 2023-07-04  Paul Eggert  <eggert@cs.ucla.edu>
4855         mbchar: treat @, $, ` as basic
4856         The C standard says that @, $, ` must have a single-byte
4857         representation so they count as basic as far as multibyte
4858         character processing goes.
4859         * lib/mbchar.c (is_basic_table):
4860         * lib/mbchar.h (is_basic):
4861         * lib/mbswidth.c (mbsnwidth):
4862         Treat @, $, ` as basic too.
4864 2023-07-03  Bruno Haible  <bruno@clisp.org>
4866         mbrtoc32: Document another glibc bug.
4867         * doc/posix-functions/mbrtoc32.texi: Reference the glibc bug in
4868         BIG5-HKSCS locales.
4870 2023-07-03  Paul Eggert  <eggert@cs.ucla.edu>
4872         mbrtoc32: document (size_t) -3 issue
4873         * doc/posix-functions/mbrtoc32.texi (mbrtoc32):
4874         Say (size_t) -3 might not be worth bothering about.
4876 2023-07-02  Bruno Haible  <bruno@clisp.org>
4878         mbsrtoc32s: Accommodate a difference between mbrtowc and mbrtoc32.
4879         * lib/mbsrtoc32s.c (USES_C32): New macro.
4880         * lib/mbsrtowcs.c (USES_C32): New macro.
4881         * lib/mbsrtowcs-impl.h (FUNC): If USES_C32 and mbrtoc32 returned
4882         (size_t)(-3), don't increment the pointer.
4884 2023-07-02  Bruno Haible  <bruno@clisp.org>
4886         mbsnrtoc32s: Accommodate a difference between mbrtowc and mbrtoc32.
4887         * lib/mbsnrtoc32s.c (USES_C32): New macro.
4888         * lib/mbsnrtowcs.c (USES_C32): New macro.
4889         * lib/mbsnrtowcs-impl.h (FUNC): If USES_C32 and mbrtoc32 returned
4890         (size_t)(-3), don't increment the pointer.
4892 2023-07-02  Bruno Haible  <bruno@clisp.org>
4894         mbmemcasecoll: Overcome wchar_t limitations.
4895         * lib/mbmemcasecoll.c: Include <uchar.h> instead of <wctype.h>.
4896         (apply_c32tolower): Renamed from apply_towlower. Use mbrtoc32 instead of
4897         mbrtowc. Use c32tolower instead of towlower. Use c32rtomb instead of
4898         wcrtomb.
4899         * modules/mbmemcasecoll (Depends-on): Remove mbrtowc, wcrtomb. Add
4900         uchar, mbrtoc32, c32rtomb, c32tolower.
4901         (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
4902         * modules/mbmemcasecoll-tests (Makefile.am): Link test-mbmemcasecoll
4903         with $(LIBUNISTRING) $(LIBC32CONV).
4905 2023-07-02  Bruno Haible  <bruno@clisp.org>
4907         mbswidth: Overcome wchar_t limitations.
4908         * lib/mbswidth.c: Include <uchar.h> instead of <wctype.h>.
4909         (mbsnwidth): Use mbrtoc32 instead of mbrtowc. Use c32width instead of
4910         wcwidth. Use c32iscntrl instead of iswcntrl.
4911         * modules/mbswidth (Depends-on): Remove wctype-h, mbrtowc, wcwidth. Add
4912         uchar, mbrtoc32, c32width, c32iscntrl.
4913         (Link): Add $(LIBC32CONV).
4915 2023-07-01  Paul Eggert  <eggert@cs.ucla.edu>
4917         Fix long bootstrap lines
4918         * top/bootstrap:
4919         * top/bootstrap-funclib.sh: Reformat to fit into 80 columns,
4920         for coreutils ‘make syntax-check’.
4922 2023-07-01  Bruno Haible  <bruno@clisp.org>
4924         doc: Update regarding stable branches.
4925         * doc/gnulib-readme.texi (Stable Branches): Mention new branch
4926         stable-202307. Mention that stable-202207 is no longer updated.
4928 2023-07-01  Paul Eggert  <eggert@cs.ucla.edu>
4930         maint.mk: Modernize stddef.h checks for C23
4931         * top/maint.mk (_stddef_syms_re): Modernize for C23.
4933 2023-07-01  Bruno Haible  <bruno@clisp.org>
4935         quotearg: Overcome wchar_t limitations.
4936         * lib/quotearg.c: Include <uchar.h> instead of <wchar.h>, <wctype.h>.
4937         (quotearg_buffer_restyled): Use mbrtoc32, c32isprint instead of mbrtowc,
4938         iswprint.
4939         * modules/quotearg (Files): Remove m4/mbstate_t.m4, m4/mbrtowc.m4
4940         (redundant).
4941         (Depends-on): Add uchar, mbrtoc32, c32isprint. Remove wchar, wctype-h,
4942         mbrtowc.
4943         (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
4944         * modules/quotearg-tests (Makefile.am): Link test-quotearg with
4945         $(LIBUNISTRING) $(LIBC32CONV).
4946         * modules/quotearg-simple (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
4947         * modules/quotearg-simple-tests (Makefile.am): Link test-quotearg-simple
4948         with $(LIBUNISTRING) $(LIBC32CONV).
4949         --
4950         * modules/quote (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
4951         --
4952         * modules/acl (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
4953         * modules/acl-tests (Makefile.am): Link test-set-mode-acl and
4954         test-copy-acl with $(LIBUNISTRING) $(LIBC32CONV).
4955         * modules/copy-file (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
4956         * modules/copy-file-tests (Makefile.am): Link test-copy-file with
4957         $(LIBUNISTRING) $(LIBC32CONV).
4958         --
4959         * modules/argmatch (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
4960         * modules/argmatch-tests (Makefile.am): Link test-argmatch with
4961         $(LIBUNISTRING) $(LIBC32CONV).
4962         * modules/backup-rename (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
4963         * modules/backupfile (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
4964         * modules/human (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
4965         --
4966         * modules/sh-quote (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
4967         * modules/sh-quote-tests (Makefile.am): Link test-sh-quote with
4968         $(LIBUNISTRING) $(LIBC32CONV).
4969         * modules/system-quote (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
4970         * modules/system-quote-tests (Makefile.am): Link test-system-quote-main
4971         with $(LIBUNISTRING) $(LIBC32CONV).
4972         * modules/csharpcomp (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
4973         * modules/csharpexec (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
4974         * modules/javacomp (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
4975         * modules/javaexec (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
4976         --
4977         * modules/string-desc-quotearg (Link): New section.
4978         * modules/string-desc-quotearg-tests (Makefile.am): Link
4979         test-string-desc-quotearg with $(LIBUNISTRING) $(LIBC32CONV).
4980         --
4981         * modules/xmemcoll (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
4982         --
4983         * modules/closeout (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
4984         * modules/readtokens-tests (Makefile.am): Link test-readtokens with
4985         $(LIBUNISTRING) $(LIBC32CONV).
4986         --
4987         * modules/closein (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
4988         * modules/closein-tests (Makefile.am): Link test-closein with
4989         $(LIBUNISTRING) $(LIBC32CONV).
4990         * modules/yesno-tests (Makefile.am): Link test-yesno with
4991         $(LIBUNISTRING) $(LIBC32CONV).
4993 2023-06-30  Bruno Haible  <bruno@clisp.org>
4995         Accommodate a difference between mbrtowc and mbrtoc32.
4996         * lib/mbiter.h (mbiter_multi_next): Handle the mbrtoc32 return value
4997         (size_t)(-3).
4998         * lib/mbuiter.h (mbuiter_multi_next): Likewise.
4999         * lib/mbfile.h (mbfile_multi_getc): Likewise.
5001 2023-06-30  Bruno Haible  <bruno@clisp.org>
5003         doc: Reference some reported bugs (in comments).
5004         * doc/posix-functions/mbrlen.texi: Add references to bug reports.
5005         * doc/posix-functions/mbrtoc16.texi: Likewise.
5006         * doc/posix-functions/mbrtoc32.texi: Likewise.
5007         * doc/posix-functions/mbrtowc.texi: Likewise.
5008         * doc/posix-functions/mbsnrtowcs.texi: Likewise.
5009         * doc/posix-functions/mbsrtowcs.texi: Likewise.
5010         * doc/posix-functions/mbstowcs.texi: Likewise.
5012 2023-06-29  Paul Eggert  <eggert@cs.ucla.edu>
5014         assert-tests: pacify gcc -Wunused-function
5015         * tests/test-assert.c (main): Call f, so that the test
5016         works even if NDEBUG is defined.
5018         stddef-tests: pacify gcc -Wshadow
5019         * tests/test-stddef.c (mat): Rename from ‘x’.
5021         nullptr-tests: pacify gcc -Wmissing-declarations
5022         * tests/test-nullptr.c (varargs_callee): Now static.
5024 2023-06-29  Bruno Haible  <bruno@clisp.org>
5026         libtextstyle-optional: Update to gettext 0.22.
5027         * lib/textstyle.in.h: Declare all functions that were added in
5028         textstyle.h from gettext-0.22.
5030         libtextstyle-optional: Update to gettext 0.21.
5031         * lib/textstyle.in.h: Declare all functions that exist in textstyle.h
5032         from gettext-0.21, independently of iconv.
5034 2023-06-28  Bruno Haible  <bruno@clisp.org>
5036         doc: Mention c8rtomb and mbrtoc8 from ISO C 23.
5037         * doc/posix-functions/c8rtomb.texi: New file.
5038         * doc/posix-functions/mbrtoc8.texi: New file.
5039         * doc/gnulib.texi (Function Substitutes): Include them.
5041 2023-06-28  Bruno Haible  <bruno@clisp.org>
5043         mbrtoc16: Add tests.
5044         * tests/test-mbrtoc16.c: New file, based on tests/test-mbrtoc32.c.
5045         * tests/test-mbrtoc16-1.sh: New file, based on tests/test-mbrtoc32-1.sh.
5046         * tests/test-mbrtoc16-2.sh: New file, based on tests/test-mbrtoc32-2.sh.
5047         * tests/test-mbrtoc16-3.sh: New file, based on tests/test-mbrtoc32-3.sh.
5048         * tests/test-mbrtoc16-4.sh: New file, based on tests/test-mbrtoc32-4.sh.
5049         * tests/test-mbrtoc16-5.sh: New file, based on tests/test-mbrtoc32-5.sh.
5050         * tests/test-mbrtoc16-w32.c: New file, based on
5051         tests/test-mbrtoc32-w32.c.
5052         * tests/test-mbrtoc16-w32-1.sh: New file, based on
5053         tests/test-mbrtoc32-w32-1.sh.
5054         * tests/test-mbrtoc16-w32-2.sh: New file, based on
5055         tests/test-mbrtoc32-w32-2.sh.
5056         * tests/test-mbrtoc16-w32-3.sh: New file, based on
5057         tests/test-mbrtoc32-w32-3.sh.
5058         * tests/test-mbrtoc16-w32-4.sh: New file, based on
5059         tests/test-mbrtoc32-w32-4.sh.
5060         * tests/test-mbrtoc16-w32-5.sh: New file, based on
5061         tests/test-mbrtoc32-w32-5.sh.
5062         * tests/test-mbrtoc16-w32-6.sh: New file, based on
5063         tests/test-mbrtoc32-w32-6.sh.
5064         * tests/test-mbrtoc16-w32-7.sh: New file, based on
5065         tests/test-mbrtoc32-w32-7.sh.
5066         * modules/mbrtoc16-tests: New file, based on modules/mbrtoc32-tests.
5068         mbrtoc16: New module.
5069         * lib/uchar.in.h (mbrtoc16): New declaration.
5070         * lib/mbrtoc16.c: New file.
5071         * m4/mbrtoc16.m4: New file, based on m4/mbrtoc32.m4.
5072         * modules/mbrtoc16: New file.
5073         * m4/uchar_h.m4 (gl_UCHAR_H): Test whether mbrtoc16 is declared.
5074         (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize GNULIB_MBRTOC16.
5075         (gl_UCHAR_H_DEFAULTS): Initialize HAVE_MBRTOC16, REPLACE_MBRTOC16.
5076         * modules/uchar (Makefile.am): Substitute GNULIB_MBRTOC16,
5077         HAVE_MBRTOC16, REPLACE_MBRTOC16.
5078         * doc/posix-functions/mbrtoc16.texi: Mention the mbrtoc16 module and the
5079         mbsinit related limitation.
5080         * doc/posix-functions/mbsinit.texi: Mention the mbrtoc16 related
5081         limitation.
5083 2023-06-28  Bruno Haible  <bruno@clisp.org>
5085         c32*: Update comment.
5086         * lib/c32is-impl.h (FUNC): Add comment regarding Android.
5087         * lib/c32to-impl.h (FUNC): Likewise.
5088         * lib/c32width.c (c32width): Likewise.
5090 2023-06-28  Bruno Haible  <bruno@clisp.org>
5092         mbrtoc32: Doc tweak.
5093         * doc/posix-functions/mbrtoc32.texi: Mention that mingw and Android have
5094         the empty input bug.
5095         * m4/mbrtoc32.m4 (gl_MBRTOC32_EMPTY_INPUT): Update cross-compilation
5096         guess.
5098 2023-06-28  Bruno Haible  <bruno@clisp.org>
5100         mbrtowc: Doc tweak.
5101         * doc/posix-functions/mbrtowc.texi: Mention that MSVC has the empty
5102         input bug and the return value bug. Mention that Android has the empty
5103         input bug.
5104         * m4/mbrtowc.m4 (gl_MBRTOC32_EMPTY_INPUT): Update cross-compilation
5105         guess.
5107 2023-06-28  Bruno Haible  <bruno@clisp.org>
5109         mbrtowc, mbrtoc32: Simplify autoconf macros.
5110         * m4/mbrtowc.m4 (gl_MBRTOWC_EMPTY_INPUT, gl_MBRTOWC_C_LOCALE): Put
5111         cross-compilation guess at the usual place.
5112         * m4/mbrtoc32.m4 (gl_MBRTOC32_EMPTY_INPUT, gl_MBRTOC32_C_LOCALE):
5113         Likewise.
5115 2023-06-27  Bruno Haible  <bruno@clisp.org>
5117         c32*: Optionally enforce ISO C 23 semantics of char32_t.
5118         * lib/lc-charset-unicode.h: New file.
5119         * lib/lc-charset-unicode.c: New file.
5120         * modules/uchar-c23: New file.
5121         * lib/uchar.in.h (char32_t): Add comment.
5122         * lib/mbrtoc32.c: Include lc-charset-unicode.h.
5123         (mbrtoc32): If char32_t is Unicode and wchar_t is not, invoke
5124         locale_encoding_to_unicode.
5125         * lib/btoc32.c: Include lc-charset-unicode.h.
5126         (btoc32): If char32_t is Unicode and wchar_t is not, invoke
5127         locale_encoding_to_unicode.
5128         * lib/c32rtomb.c: Include lc-charset-unicode.h.
5129         (c32rtomb): If char32_t is Unicode and wchar_t is not, invoke
5130         unicode_to_locale_encoding.
5131         * lib/c32tob.c: Include lc-charset-unicode.h.
5132         (c32tob): If char32_t is Unicode and wchar_t is not, invoke
5133         unicode_to_locale_encoding.
5134         * lib/mbsnrtoc32s.c: If char32_t is Unicode and wchar_t is not, don't
5135         use mbsnrtowcs.
5136         * lib/mbsrtoc32s.c: If char32_t is Unicode and wchar_t is not, don't use
5137         mbsrtowcs.
5138         * lib/c32snrtombs.c: If char32_t is Unicode and wchar_t is not, don't
5139         use wcsnrtombs.
5140         * lib/c32srtombs.c: If char32_t is Unicode and wchar_t is not, don't use
5141         wcsrtombs.
5142         * lib/c32is-impl.h: Include lc-charset-unicode.h.
5143         (FUNC): If char32_t is Unicode and wchar_t is not, use UCS_FUNC.
5144         * lib/c32to-impl.h: Include lc-charset-unicode.h.
5145         (FUNC): If char32_t is Unicode and wchar_t is not, use UCS_FUNC.
5146         * lib/c32width.c: Include lc-charset-unicode.h.
5147         (c32width): If char32_t is Unicode and wchar_t is not, use uc_width.
5148         * tests/test-mbrtoc32.c: Include <wchar.h>.
5149         (main): Skip GB18030 tests on NetBSD and Solaris. If
5150         GL_CHAR32_T_IS_UNICODE, expect Unicode encoding for the char32_t values.
5151         * tests/test-mbrtoc32-w32.c: Include <wchar.h>.
5152         (test_one_locale): Simplify.
5153         * tests/test-c32rtomb.c (main): Skip GB18030 tests on NetBSD and
5154         Solaris.
5155         * tests/test-c32rtomb.sh: Update.
5156         * tests/test-mbsnrtoc32s.c: Include <wchar.h>.
5157         (main): Skip GB18030 tests on NetBSD and Solaris.
5158         * tests/test-mbsrtoc32s.c: Include <wchar.h>.
5159         (main): Skip GB18030 tests on NetBSD and Solaris.
5160         * tests/test-mbstoc32s.c (main): Skip GB18030 tests on NetBSD and
5161         Solaris.
5162         * tests/test-c32snrtombs.c (main): Skip GB18030 tests on NetBSD and
5163         Solaris.
5164         * tests/test-c32srtombs.c (main): Skip GB18030 tests on NetBSD and
5165         Solaris.
5166         * tests/test-c32stombs.c (main): Skip GB18030 tests on NetBSD and
5167         Solaris.
5168         * tests/test-c32isalnum.c (main): Skip GB18030 tests on NetBSD and
5169         Solaris.
5170         * tests/test-c32isalnum.sh: Update.
5171         * tests/test-c32isalpha.c (main): Skip GB18030 tests on NetBSD and
5172         Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
5173         Solaris.
5174         * tests/test-c32isalpha.sh: Update.
5175         * tests/test-c32isblank.c (main): Skip GB18030 tests on NetBSD and
5176         Solaris.
5177         * tests/test-c32isblank.sh: Update.
5178         * tests/test-c32iscntrl.c (main): Skip GB18030 tests on NetBSD and
5179         Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
5180         Solaris.
5181         * tests/test-c32iscntrl.sh: Update.
5182         * tests/test-c32isdigit.c (main): Skip GB18030 tests on NetBSD and
5183         Solaris.
5184         * tests/test-c32isdigit.sh: Update.
5185         * tests/test-c32isgraph.c (main): Skip GB18030 tests on NetBSD and
5186         Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
5187         Solaris.
5188         * tests/test-c32isgraph.sh: Update.
5189         * tests/test-c32islower.c (main): Skip GB18030 tests on NetBSD and
5190         Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
5191         Solaris.
5192         * tests/test-c32islower.sh: Update.
5193         * tests/test-c32isprint.c (main): Skip GB18030 tests on NetBSD and
5194         Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
5195         Solaris.
5196         * tests/test-c32isprint.sh: Update.
5197         * tests/test-c32ispunct.c (main): Skip GB18030 tests on NetBSD and
5198         Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
5199         Solaris.
5200         * tests/test-c32ispunct.sh: Update.
5201         * tests/test-c32isspace.c (main): Skip GB18030 tests on NetBSD and
5202         Solaris.
5203         * tests/test-c32isspace.sh: Update.
5204         * tests/test-c32isupper.c (main): Skip GB18030 tests on NetBSD and
5205         Solaris.
5206         * tests/test-c32isupper.sh: Update.
5207         * tests/test-c32isxdigit.c (main): Skip GB18030 tests on NetBSD and
5208         Solaris.
5209         * tests/test-c32isxdigit.sh: Update.
5210         * tests/test-c32tolower.c (main): Skip GB18030 tests on NetBSD and
5211         Solaris.
5212         * tests/test-c32tolower.sh: Update.
5213         * tests/test-c32toupper.c (main): Skip GB18030 tests on NetBSD and
5214         Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD,
5215         Solaris.
5216         * tests/test-c32toupper.sh: Update.
5217         * modules/mbrtoc32 (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
5218         * modules/mbrtoc32-tests (Makefile.am): Link test-mbrtoc32 with
5219         $(LIBUNISTRING) $(LIBC32CONV).
5220         * modules/btoc32 (Link): New section.
5221         * modules/btoc32-tests (Makefile.am): Link test-btoc32 with
5222         $(LIBUNISTRING) $(LIBC32CONV).
5223         * modules/c32rtomb (Link): New section.
5224         * modules/c32rtomb-tests (Makefile.am): Link test-c32rtomb with
5225         $(LIBUNISTRING) $(LIBC32CONV).
5226         * modules/c32tob (Link): New section.
5227         * modules/mbsnrtoc32s (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
5228         * modules/mbsnrtoc32s-tests (Makefile.am): Link test-mbsnrtoc32s with
5229         $(LIBUNISTRING) $(LIBC32CONV).
5230         * modules/mbsrtoc32s (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
5231         * modules/mbsrtoc32s-tests (Makefile.am): Link test-mbsrtoc32s with
5232         $(LIBUNISTRING) $(LIBC32CONV).
5233         * modules/mbstoc32s (Link): Add $(LIBUNISTRING) $(LIBC32CONV).
5234         * modules/mbstoc32s-tests (Makefile.am): Link test-mbstoc32s with
5235         $(LIBUNISTRING) $(LIBC32CONV).
5236         * modules/c32snrtombs (Link): New section.
5237         * modules/c32snrtombs-tests (Makefile.am): Link test-c32snrtombs with
5238         $(LIBUNISTRING) $(LIBC32CONV).
5239         * modules/c32srtombs (Link): New section.
5240         * modules/c32srtombs-tests (Makefile.am): Link test-c32srtombs with
5241         $(LIBUNISTRING) $(LIBC32CONV).
5242         * modules/c32stombs (Link): New section.
5243         * modules/c32stombs-tests (Makefile.am): Link test-c32stombs with
5244         $(LIBUNISTRING) $(LIBC32CONV).
5245         * modules/c32isalnum (Link): Add $(LIBC32CONV).
5246         * modules/c32isalnum-tests (Makefile.am): Link test-c32isalnum with
5247         $(LIBC32CONV).
5248         * modules/c32isalpha (Link): Add $(LIBC32CONV).
5249         * modules/c32isalpha-tests (Makefile.am): Link test-c32isalpha with
5250         $(LIBC32CONV).
5251         * modules/c32isblank (Link): Add $(LIBC32CONV).
5252         * modules/c32isblank-tests (Makefile.am): Link test-c32isblank with
5253         $(LIBC32CONV).
5254         * modules/c32iscntrl (Link): Add $(LIBC32CONV).
5255         * modules/c32iscntrl-tests (Makefile.am): Link test-c32iscntrl with
5256         $(LIBC32CONV).
5257         * modules/c32isdigit (Link): Add $(LIBC32CONV).
5258         * modules/c32isdigit-tests (Makefile.am): Link test-c32isdigit with
5259         $(LIBC32CONV).
5260         * modules/c32isgraph (Link): Add $(LIBC32CONV).
5261         * modules/c32isgraph-tests (Makefile.am): Link test-c32isgraph with
5262         $(LIBC32CONV).
5263         * modules/c32islower (Link): Add $(LIBC32CONV).
5264         * modules/c32islower-tests (Makefile.am): Link test-c32islower with
5265         $(LIBC32CONV).
5266         * modules/c32isprint (Link): Add $(LIBC32CONV).
5267         * modules/c32isprint-tests (Makefile.am): Link test-c32isprint with
5268         $(LIBC32CONV).
5269         * modules/c32ispunct (Link): Add $(LIBC32CONV).
5270         * modules/c32ispunct-tests (Makefile.am): Link test-c32ispunct with
5271         $(LIBC32CONV).
5272         * modules/c32isspace (Link): Add $(LIBC32CONV).
5273         * modules/c32isspace-tests (Makefile.am): Link test-c32isspace with
5274         $(LIBC32CONV).
5275         * modules/c32isupper (Link): Add $(LIBC32CONV).
5276         * modules/c32isupper-tests (Makefile.am): Link test-c32isupper with
5277         $(LIBC32CONV).
5278         * modules/c32isxdigit (Link): Add $(LIBC32CONV).
5279         * modules/c32isxdigit-tests (Makefile.am): Link test-c32isxdigit with
5280         $(LIBC32CONV).
5281         * modules/c32tolower (Link): Add $(LIBC32CONV).
5282         * modules/c32tolower-tests (Makefile.am): Link test-c32tolower with
5283         $(LIBC32CONV).
5284         * modules/c32toupper (Link): Add $(LIBC32CONV).
5285         * modules/c32toupper-tests (Makefile.am): Link test-c32toupper with
5286         $(LIBC32CONV).
5287         * modules/c32width (Link): Add $(LIBC32CONV).
5288         * modules/c32width-tests (Makefile.am): Link test-c32width with
5289         $(LIBC32CONV).
5290         * modules/c32swidth (Link): Add $(LIBC32CONV).
5291         * modules/c32swidth-tests (Makefile.am): Link test-c32swidth with
5292         $(LIBC32CONV).
5293         * modules/mbchar (Link): Add $(LIBC32CONV).
5294         * modules/mbiter (Link): Add $(LIBC32CONV).
5295         * modules/mbuiter (Link): Add $(LIBC32CONV).
5296         * modules/mbfile (Link): Add $(LIBC32CONV).
5297         * modules/mbmemcasecmp (Link): Add $(LIBC32CONV).
5298         * modules/mbmemcasecmp-tests (Makefile.am): Link test-mbmemcasecmp with
5299         $(LIBC32CONV).
5300         * modules/mbscasecmp (Link): Add $(LIBC32CONV).
5301         * modules/mbscasecmp-tests (Makefile.am): Link test-mbscasecmp with
5302         $(LIBC32CONV).
5303         * modules/mbscasestr (Link): Add $(LIBC32CONV).
5304         * modules/mbscasestr-tests (Makefile.am): Link test-mbscasestr1,
5305         test-mbscasestr2, test-mbscasestr3, test-mbscasestr4 with $(LIBC32CONV).
5306         * modules/mbschr (Link): Add $(LIBC32CONV).
5307         * modules/mbschr-tests (Makefile.am): Link test-mbschr with
5308         $(LIBC32CONV).
5309         * modules/mbscspn (Link): Add $(LIBC32CONV).
5310         * modules/mbscspn-tests (Makefile.am): Link test-mbscspn with
5311         $(LIBC32CONV).
5312         * modules/mbslen (Link): Add $(LIBC32CONV).
5313         * modules/mbsncasecmp (Link): Add $(LIBC32CONV).
5314         * modules/mbsncasecmp-tests (Makefile.am): Link test-mbsncasecmp with
5315         $(LIBC32CONV).
5316         * modules/mbsnlen (Link): Add $(LIBC32CONV).
5317         * modules/mbspbrk (Link): Add $(LIBC32CONV).
5318         * modules/mbspbrk-tests (Makefile.am): Link test-mbspbrk with
5319         $(LIBC32CONV).
5320         * modules/mbspcasecmp (Link): Add $(LIBC32CONV).
5321         * modules/mbspcasecmp-tests (Makefile.am): Link test-mbspcasecmp with
5322         $(LIBC32CONV).
5323         * modules/mbsrchr (Link): Add $(LIBC32CONV).
5324         * modules/mbsrchr-tests (Makefile.am): Link test-mbsrchr with
5325         $(LIBC32CONV).
5326         * modules/mbssep (Link): Add $(LIBC32CONV).
5327         * modules/mbsspn (Link): Add $(LIBC32CONV).
5328         * modules/mbsspn-tests (Makefile.am): Link test-mbsspn with
5329         $(LIBC32CONV).
5330         * modules/mbsstr (Link): Add $(LIBC32CONV).
5331         * modules/mbsstr-tests (Makefile.am): Link test-mbsstr1, test-mbsstr2,
5332         test-mbsstr3 with $(LIBC32CONV).
5333         * modules/mbstok_r (Link): Add $(LIBC32CONV).
5334         * modules/propername (Link): Add $(LIBC32CONV).
5335         * modules/regex-quote (Link): Add $(LIBC32CONV).
5336         * modules/regex-quote-tests (Makefile.am): Link test-regex-quote with
5337         $(LIBC32CONV).
5338         * modules/trim (Link): Add $(LIBC32CONV).
5339         * modules/trim-tests (Makefile.am): Link test-trim with $(LIBC32CONV).
5340         * modules/exclude (Link): Add $(LIBC32CONV).
5341         * modules/exclude-tests (Makefile.am): Link test-exclude with
5342         $(LIBC32CONV).
5343         * doc/posix-headers/uchar.texi: Mention the uchar-c23 module.
5344         * doc/posix-functions/mbrtoc32.texi: Likewise.
5345         * doc/strings.texi (The char32_t type): Likewise.
5347 2023-06-27  Bruno Haible  <bruno@clisp.org>
5349         striconveh: Fix module description.
5350         * modules/striconveh (Link): Add $(LIBUNISTRING).
5351         * modules/striconveha (Link): New section.
5352         * modules/xstriconveh (Link): New section.
5354 2023-06-25  Bruno Haible  <bruno@clisp.org>
5356         strncat: Update doc regarding Solaris 11.4.
5357         * doc/posix-functions/strncat.texi: Mention that the bug still exists on
5358         Solaris 11.4.
5359         * m4/strncat.m4 (gl_FUNC_STRNCAT): Update comments.
5361 2023-06-25  Bruno Haible  <bruno@clisp.org>
5363         thread: Avoid compiler warnings on Solaris.
5364         * lib/glthread/thread.h: Include <stdint.h>.
5365         (gl_thread_self_pointer): Do the cast from pthread_t to 'void *' via
5366         intptr_t.
5367         * modules/thread (Depends-on): Add stdint.
5369 2023-06-25  Bruno Haible  <bruno@clisp.org>
5371         strerrorname_np: Add support for Solaris 11.4/sparc.
5372         * lib/strerrorname_np.c (strerrorname_np): Consider ECKSUM, EFRAGS.
5373         Allow ENOANO to be overloaded to another value.
5374         * tests/test-strerrorname_np.c (main): Likewise.
5376 2023-06-25  Jim Meyering  <meyering@meta.com>
5378         doc: correct doubled "on on"
5379         * doc/glibc-functions/initstate_r.texi: As above.
5380         * doc/posix-functions/initstate.texi: As above.
5382 2023-06-25  Bruno Haible  <bruno@clisp.org>
5384         sigdescr_np tests: Avoid test failure on glibc/sparc.
5385         * tests/test-sigdescr_np.c (main): Accept the glibc result for SIGEMT.
5386         * doc/glibc-functions/sigdescr_np.texi: Mention two glibc deficiencies.
5388 2023-06-25  Bruno Haible  <bruno@clisp.org>
5390         strerrorname_np: Work around glibc bug on PowerPC, SPARC systems.
5391         * m4/strerrorname_np.m4 (gl_FUNC_STRERRORNAME_NP): Test also
5392         strerrorname_np (EDEADLOCK).
5393         * doc/glibc-functions/strerrorname_np.texi: Mention that glibc 2.36
5394         still needs a workaround.
5396 2023-06-25  Bruno Haible  <bruno@clisp.org>
5398         doc: Mention glibc initstate, initstate_r bug.
5399         * doc/posix-functions/initstate.texi: Mention glibc bug.
5400         * doc/glibc-functions/initstate_r.texi: Likewise.
5401         * tests/test-random_r.c: Add a comment.
5403 2023-06-25  Bruno Haible  <bruno@clisp.org>
5405         doc: Update doc regarding 'setstate'.
5406         * doc/posix-functions/setstate.texi: Mention also Solaris 11.4.
5408 2023-06-25  Bruno Haible  <bruno@clisp.org>
5410         doc: Update doc regarding <ieee754.h>.
5411         * doc/glibc-headers/ieee754.texi: Mention that it's not present on
5412         glibc/sparc64 in 32-bit mode.
5414 2023-06-25  Bruno Haible  <bruno@clisp.org>
5416         exclude: Complete last change.
5417         * lib/exclude.c: Include <uchar.h> instead of <wctype.h>.
5419 2023-06-24  Bruno Haible  <bruno@clisp.org>
5421         mbchar, mbiter, mbuiter: Overcome wchar_t limitations.
5422         * lib/mbchar.h: Include <uchar.h> instead of <wchar.h>, <wctype.h>.
5423         (struct mbchar): Use char32_t instead of wchar_t.
5424         (mb_casecmp, mb_caseequal): Use c32tolower instead of towlower.
5425         (mb_isalnum): Use c32isalnum instead of iswalnum.
5426         (mb_isalpha): Use c32isalpha instead of iswalpha.
5427         (mb_isblank): Use c32isblank instead of iswblank.
5428         (mb_iscntrl): Use c32iscntrl instead of iswcntrl.
5429         (mb_isdigit): Use c32isdigit instead of iswdigit.
5430         (mb_isgraph): Use c32isgraph instead of iswgraph.
5431         (mb_islower): Use c32islower instead of iswlower.
5432         (mb_isprint): Use c32isprint instead of iswprint.
5433         (mb_ispunct): Use c32ispunct instead of iswpunct.
5434         (mb_isspace): Use c32isspace instead of iswspace.
5435         (mb_isupper): Use c32isupper instead of iswupper.
5436         (mb_isxdigit): Use c32isxdigit instead of iswxdigit.
5437         (mb_width_aux): Use c32width, c32iscntrl instead of wcwidth, iswcntrl.
5438         * lib/mbiter.h: Include <uchar.h> instead of <wchar.h>.
5439         (mbiter_multi_next): Use mbrtoc32 instead of mbrtowc.
5440         * lib/mbuiter.h: Include <uchar.h> instead of <wchar.h>.
5441         (mbuiter_multi_next): Use mbrtoc32 instead of mbrtowc.
5442         * lib/mbfile.h (mbfile_multi_getc): Use mbrtoc32 instead of mbrtowc.
5443         * lib/mbscasestr.c (knuth_morris_pratt_multibyte, mbscasestr): Use
5444         c32tolower instead of towlower.
5445         * lib/exclude.c (string_hasher_ci): Use char32_t, c32tolower instead of
5446         wchar_t, towlower.
5447         * modules/mbchar (Depends-on): Add uchar, c32isalnum, c32isalpha,
5448         c32isblank, c32iscntrl, c32isdigit, c32isgraph, c32islower, c32isprint,
5449         c32ispunct, c32isspace, c32isupper, c32isxdigit, c32tolower, c32width.
5450         Remove wchar, wctype-h, iswblank, iswdigit, iswxdigit, wcwidth.
5451         * modules/mbiter (Depends-on): Add mbrtoc32, uchar. Remove mbrtowc,
5452         wchar.
5453         * modules/mbuiter (Depends-on): Likewise.
5454         * modules/mbscasestr (Depends-on): Add c32tolower.
5455         * modules/exclude (Depends-on): Add c32tolower.
5456         * doc/strings.texi (C strings): Fix typo.
5458 2023-06-22  Bruno Haible  <bruno@clisp.org>
5460         doc: Use makeinfo option to check menu structure.
5461         Trick revealed by Patrice Dumas <pertusus@free.fr> in
5462         <https://lists.gnu.org/archive/html/bug-texinfo/2023-06/msg00015.html>.
5463         * doc/Makefile (MAKEINFO): Enforce checking of menu structure.
5465 2023-06-22  Bruno Haible  <bruno@clisp.org>
5467         doc: Correct info menu structure.
5468         Reported by Elijah Zarezky <elijah@zarezky.spb.ru> in
5469         <https://lists.gnu.org/archive/html/bug-gnulib/2023-06/msg00105.html>.
5470         * doc/strings.texi (Strings): Add missing @menu item.
5472 2023-06-20  Paul Eggert  <eggert@cs.ucla.edu>
5474         doc: INSTALL uses UTF-8 now
5475         * doc/Makefile (INSTALL.ISO, INSTALL.UTF-8):
5476         Adjust to the fact that INSTALL now uses UTF-8.
5477         INSTALL.UTF-8 is now obsolescent since it is identical.
5478         (INSTALL.ISO): Transliterate all non-ASCII characters,
5479         not just single quotes.
5480         * doc/INSTALL.ISO: Regenerate.
5482 2023-06-19  Paul Eggert  <eggert@cs.ucla.edu>
5484         largefile: port to GNU/Linux s390x and alpha
5485         This patch syncs from Autoconf master.
5486         Problem reported by Matoro <https://bugs.gnu.org/64123>.
5487         * lib/autoconf/specific.m4 (_AC_SYS_LARGEFILE_TEST_CODE):
5488         New overridable macro FTYPE, to test types other than off_t.
5489         (_AC_SYS_LARGEFILE_TEST_CODE): Test ino_t for
5490         -D_FILE_OFFSETBITS=64 too, if no flags are needed for off_t.
5491         Needed for GNU/Linux on alpha and s390x.
5493 2023-06-19  Bruno Haible  <bruno@clisp.org>
5495         doc: Corrections to the "Strings and Characters" chapter.
5496         Suggested by Paul Eggert.
5497         * doc/strings.texi: Corrections: GB18030 is rarely used nowadays.
5498         <ctype.h> functions can be useful for specific data.
5500 2023-06-19  Bruno Haible  <bruno@clisp.org>
5502         doc: Use "spaced en dash" style instead of "spaced em dash" style.
5503         Suggested by Paul Eggert.
5504         * doc/gnulib.texi: At sentence level, use "spaced en dash" style instead
5505         of "spaced em dash" style.
5506         * doc/gnulib-intro.texi: Likewise.
5507         * doc/multithread.texi: Likewise.
5508         * doc/strings.texi: Likewise.
5510 2023-06-19  Bruno Haible  <bruno@clisp.org>
5512         setenv: Simplify m4 requires.
5513         * m4/setenv.m4 (gl_PREREQ_SETENV): Don't require AC_FUNC_ALLOCA.
5515 2023-06-18  Bruno Haible  <bruno@clisp.org>
5517         configmake: Bypass the unusable 'echo' command of some shells.
5518         Reported by Brian Inglis <Brian.Inglis@Shaw.ca> in
5519         <https://lists.gnu.org/archive/html/bug-gettext/2023-06/msg00054.html>.
5520         * m4/build-to-host.m4 (gl_BUILD_TO_HOST): Use 'printf' instead of
5521         'echo', because the "dash" shell has a SystemV compatible 'echo'
5522         command. Also, be sure to remove trailing CRs.
5524 2023-06-18  Paul Eggert  <eggert@cs.ucla.edu>
5526         update-copyright tests: fix to match behavior
5527         * tests/test-update-copyright.sh: Change tests to match new behavior.
5529 2023-06-18  Bruno Haible  <bruno@clisp.org>
5531         update-copyright tests: Add tests for man pages.
5532         * tests/test-update-copyright.sh: Add 4 tests that use man page syntax.
5534 2023-06-18  Bruno Haible  <bruno@clisp.org>
5536         gettext: Clarify the purpose of this module.
5537         Suggested by Paul Eggert in
5538         <https://lists.gnu.org/archive/html/bug-gnulib/2023-06/msg00089.html>.
5539         * modules/gettext (Description): Clarify the purpose.
5540         (Makefile.am): Remove outdated comment. "gettextize --intl" is no longer
5541         possible since 2019.
5543 2023-06-18  Paul Eggert  <eggert@cs.ucla.edu>
5545         Update \(en in copyright notices
5546         * build-aux/update-copyright (ndash_re): New var, matching \(en too.
5547         (stmt_remainder_re, stmt): Use it.
5548         (stmt): Match year in constructs like "\(en2023".
5549         (ndash): Now \(en in man pages.
5551 2023-06-17  Bruno Haible  <bruno@clisp.org>
5553         gettext: Update to gettext 0.22.
5554         * modules/gettext (Files): Add m4/build-to-host.m4.
5555         (configure.ac): Request infrastructure compatible with gettext 0.22.
5556         * m4/gettext.m4: Update from gettext 0.22.
5557         * m4/po.m4: Likewise.
5559 2023-06-15  Bruno Haible  <bruno@clisp.org>
5561         aligned-malloc, rmdir-errno: Sanitize configuration test result.
5562         * m4/malloc-align.m4 (gl_MALLOC_ALIGNMENT): Don't put a newline at the
5563         end of the conftest.out file.
5564         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Don't put a newline at the
5565         end of the confdir2/errno file.
5567 2023-06-13  Bruno Haible  <bruno@clisp.org>
5569         Make internationalization tests stricter on musl systems.
5570         --
5571         * m4/locale-fr.m4 (gt_LOCALE_FR): On musl systems, set LOCALE_FR_UTF8 to
5572         "fr_FR.UTF-8" instead of "none". Set and substitute
5573         LC_COLLATE_IMPLEMENTED, LC_NUMERIC_IMPLEMENTED, LC_TIME_IMPLEMENTED,
5574         LC_MONETARY_IMPLEMENTED.
5575         * m4/iswdigit.m4 (gl_FUNC_ISWDIGIT): Skip testing a certain locale if
5576         that locale is "none".
5577         * m4/iswxdigit.m4 (gl_FUNC_ISWXDIGIT): Likewise.
5578         * m4/mbrlen.m4 (gl_MBRLEN_RETVAL): Likewise.
5579         * m4/mbrtowc.m4 (gl_MBRTOWC_RETVAL): Likewise.
5580         * m4/mbrtoc32.m4 (gl_MBRTOC32_SANITYCHECK): Likewise.
5581         * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Likewise.
5582         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.
5583         --
5584         * tests/test-c32isalpha.c (main): On musl libc, disable tests that fail.
5585         * tests/test-c32iscntrl.c (main): Likewise.
5586         * tests/test-c32isgraph.c (main): Likewise.
5587         * tests/test-c32islower.c (main): Likewise.
5588         * tests/test-c32isprint.c (main): Likewise.
5589         * tests/test-c32toupper.c (main): Likewise.
5590         * tests/test-nl_langinfo1.c (main): Likewise.
5591         * tests/test-nl_langinfo2.c (main): Likewise.
5592         * modules/c32isalpha-tests (Files): Add musl.m4.
5593         (configure.ac): Invoke gl_MUSL_LIBC.
5594         * modules/c32iscntrl-tests (Files): Add musl.m4.
5595         (configure.ac): Invoke gl_MUSL_LIBC.
5596         * modules/c32isgraph-tests (Files): Add musl.m4.
5597         (configure.ac): Invoke gl_MUSL_LIBC.
5598         * modules/c32islower-tests (Files): Add musl.m4.
5599         (configure.ac): Invoke gl_MUSL_LIBC.
5600         * modules/c32isprint-tests (Files): Add musl.m4.
5601         (configure.ac): Invoke gl_MUSL_LIBC.
5602         * modules/c32toupper-tests (Files): Add musl.m4.
5603         (configure.ac): Invoke gl_MUSL_LIBC.
5604         * modules/nl_langinfo-tests (Files): Add musl.m4.
5605         (configure.ac): Invoke gl_MUSL_LIBC.
5606         --
5607         * tests/test-strtod1.sh: Skip the test if LC_NUMERIC_IMPLEMENTED is
5608         false.
5609         * tests/test-strtold1.sh: Likewise.
5610         * tests/test-vasnprintf-posix2.sh: Likewise.
5611         * tests/test-vasnwprintf-posix2.sh: Likewise.
5612         * modules/strtod-tests (Makefile.am): Set LC_NUMERIC_IMPLEMENTED in the
5613         tests environment.
5614         * modules/strtold-tests (Makefile.am): Likewise.
5615         * modules/vasnprintf-posix-tests (Makefile.am): Likewise.
5616         * modules/vasnwprintf-posix-tests (Makefile.am): Likewise.
5618 2023-06-12  Bruno Haible  <bruno@clisp.org>
5620         vasnwprintf-posix: Work around another musl libc bug.
5621         * m4/printf.m4 (gl_SWPRINTF_DIRECTIVE_LC): New macro.
5622         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke it, and set
5623         NEED_WPRINTF_DIRECTIVE_LC if the %lc test failed.
5624         * lib/vasnprintf.c (VASNPRINTF): If NEED_WPRINTF_DIRECTIVE_LC is set, do
5625         the processing for %lc and %ls ourselves.
5626         (local_wcslen): Update condition.
5627         * doc/posix-functions/swprintf.texi: Mention the %lc problem.
5629 2023-06-12  Bruno Haible  <bruno@clisp.org>
5631         vasnwprintf-posix: Work around a musl libc bug.
5632         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Test also whether swprintf
5633         in the C locale is free of encoding errors, and set
5634         NEED_WPRINTF_DIRECTIVE_C if not.
5635         * doc/posix-functions/swprintf.texi: Clarify the list of platforms for
5636         the %c problem.
5638 2023-06-12  Bruno Haible  <bruno@clisp.org>
5640         vasnwprintf: Fix some cross-compilation results.
5641         * m4/printf.m4 (gl_SWPRINTF_WORKS): Fix cross-compilation result for
5642         musl.
5643         (gl_SWPRINTF_DIRECTIVE_LA): Fix cross-compilation result for Android.
5645 2023-06-12  Bruno Haible  <bruno@clisp.org>
5647         warnings: Save memory and CPU time when inhibiting all warnings.
5648         * m4/warnings.m4 (gl_WARN_ADD): Improve comments.
5649         (gl_CC_INHIBIT_WARNINGS): Add also '-fno-analyzer' to
5650         GL_CFLAG_INHIBIT_WARNINGS.
5651         (gl_CXX_INHIBIT_WARNINGS): Add also '-fno-analyzer' to
5652         GL_CXXFLAG_INHIBIT_WARNINGS.
5654 2023-06-11  Bruno Haible  <bruno@clisp.org>
5656         javacomp-script, javacomp: Document effects of yesterday's change.
5657         * NEWS: Mention yesterday's change.
5659 2023-06-11  Bruno Haible  <bruno@clisp.org>
5661         javacomp-script, javacomp: Silence javac warnings regarding [options].
5662         * m4/javacomp.m4 (gt_JAVACOMP): Use option '-Xlint:-options' by default
5663         and omit it only when it does not work.
5664         * lib/javacomp.c (compile_using_javac): Add nowarn_option parameter.
5665         (is_envjavac_usable): Add nowarn_option_out parameter. Use option
5666         '-Xlint:-options' by default and omit it only when it does not work.
5667         (is_javac_usable): Likewise.
5668         (compile_java_class): Store the nowarn_option returned from
5669         is_envjavac_usable and use it when invoking compile_using_envjavac.
5670         Store the nowarn_option returned from is_javac_usable and use it when
5671         invoking compile_using_javac.
5673 2023-06-10  Bruno Haible  <bruno@clisp.org>
5675         javacomp-script, javacomp: Add support for javac versions > 11.
5676         Reported by Adrian Bunk <bunk-gnu@fs.tum.de> in
5677         <https://savannah.gnu.org/bugs/?63385>.
5678         * m4/javacomp.m4 (gt_JAVACOMP): When the java version is > 11, use that
5679         version as target_version, not 11. When the java version is > 17, don't
5680         warn. Remove goodcode, failcode variables. Don't bail out if the
5681         source-version argument or the target-version argument is in the range
5682         12..99. Use a heuristic that works with javac versions 11..20 at least.
5683         Update comments.
5684         * lib/javacomp.h (compile_java_class): State that source-version and
5685         target-version may be larger than 11.
5686         * lib/javacomp.c (default_target_version): Accommodate versions up to
5687         99.
5688         (SOURCE_VERSION_BOUND): Increase to 94.
5689         (source_version_index): Accept versions up to 99.
5690         (get_goodcode_snippet, get_failcode_snippet): Remove functions.
5691         (TARGET_VERSION_BOUND): Increase to 94.
5692         (target_version_index): Accept versions up to 99.
5693         (corresponding_classfile_version): Remove function.
5694         (execute_and_read_line): New function, based on lib/javaversion.c.
5695         (get_compiler_version): New function.
5696         (is_envjavac_usable): Add parameters source_option_out,
5697         target_option_out. Use a heuristic that works with javac versions 11..20
5698         at least. Call cleanup_temp_dir.
5699         (is_javac_usable): Likewise.
5700         (compile_java_class): Update.
5702 2023-06-10  Bruno Haible  <bruno@clisp.org>
5704         javacomp-script, javacomp: Remove support for javac versions < 1.6.
5705         * m4/javacomp.m4 (gt_JAVACOMP): State that the minimum source_version
5706         and the minimum target_version are 1.6. Map smaller values to 1.6.
5707         Complain if the java version is < 1.6. Use 1.6 as default, instead of
5708         1.1. Don't bother trying the -target option alone.
5709         * lib/javacomp.h (compile_java_class): State that the minimum
5710         source_version and the minimum target_version are 1.6.
5711         * lib/javacomp.c (default_target_version): Complain if the java version
5712         is < 1.6. Use 1.6 as default, instead of 1.1.
5713         (SOURCE_VERSION_BOUND, source_version_index, get_goodcode_snippet,
5714         get_failcode_snippet): Adjust to the new minimum source_version = 1.6.
5715         (TARGET_VERSION_BOUND, target_version_index,
5716         corresponding_classfile_version): Adjust to the new minimum
5717         target_version = 1.6.
5718         (get_source_version_for_javac): Remove function.
5719         (is_envjavac_usable): Remove source_version_for_javac parameter. Don't
5720         bother trying the -target option alone.
5721         (is_javac_usable): Likewise.
5722         (compile_java_class): Map source_version < 1.6 to 1.6. Map
5723         target_version < 1.6 to 1.6. Use source_version instead of calling
5724         get_source_version_for_javac.
5726 2023-06-10  Bruno Haible  <bruno@clisp.org>
5728         javacomp: Simplify after gcj support was removed.
5729         * m4/javacomp.m4 (gt_JAVACOMP): Don't create conftestlib.java.
5730         * lib/javacomp.c (compile_java_class): Remove local variables
5731         no_assert_option, fsource_option, ftarget_option.
5733 2023-06-09  Bruno Haible  <bruno@clisp.org>
5735         doc: Document <stdatomic.h>.
5736         * doc/posix-headers/stdatomic.texi: New file.
5737         * doc/gnulib.texi (Header File Substitutes): Include it.
5739 2023-06-09  Jim Meyering  <meyering@meta.com>
5741         maint.mk: sc_prohibit_xalloc_without_use: also match alloc_die
5742         * top/maint.mk (sc_prohibit_xalloc_without_use):
5743         Adjust in-comment command's regexp so it also finds alloc_die,
5744         whose declaration has a prefix of "_Noreturn ".
5745         Also delete some now-obsolete commentary.
5746         (_xa1): Regenerate the regexp using that command.
5747         Reported by Pádraig Brady in
5748         <https://lists.gnu.org/r/bug-gnulib/2023-06/msg00062.html>.
5750 2023-06-09  Paul Eggert  <eggert@cs.ucla.edu>
5752         xalloc-die: omit /*extern*/
5753         * lib/xalloc.h (xalloc_die): Omit leading "/*extern*/".
5754         It complicates syntax checking; see:
5755         https://lists.gnu.org/r/bug-gnulib/2023-06/msg00062.html
5756         Plus, it’s inconsistent style: the other function declarations in
5757         xalloc.h don’t use ‘extern’. (I’m not a fan of using ‘extern’ when
5758         it’s just noise, as is the case here.)
5760 2023-06-09  Bruno Haible  <bruno@clisp.org>
5762         javaversion: Update comments.
5763         * lib/javaversion.h (javaexec_version): Document the possible results up
5764         to OpenJDK 20.
5766 2023-06-09  Bruno Haible  <bruno@clisp.org>
5768         javacomp: Remove support for 'jikes'.
5769         * lib/javacomp.c (compile_using_jikes, is_jikes_present): Remove
5770         functions.
5771         (compile_java_class): Remove jikes related code.
5773         javacomp-script: Remove support for 'jikes'.
5774         * build-aux/javacomp.sh.in: Don't test HAVE_JIKES.
5775         * m4/javacomp.m4 (gt_JAVACOMP): Don't set HAVE_JIKES. Don't set
5776         CONF_JAVAC to 'jikes'. Update comment.
5777         (gt_JAVACOMP_DISABLED): Don't set HAVE_JIKES.
5779 2023-06-09  Bruno Haible  <bruno@clisp.org>
5781         javacomp: Remove support for 'gcj'.
5782         * lib/javacomp.h: Update comment.
5783         * lib/javacomp.c (compile_using_gcj, is_envjavac_gcj, is_envjavac_gcj43,
5784         is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
5785         is_envjavac_oldgcj_14_13_usable, is_gcj_present, is_gcj_43,
5786         is_gcj43_usable, is_oldgcj_14_14_usable, is_oldgcj_14_13_usable): Remove
5787         functions.
5788         (is_envjavac_usable): Renamed from is_envjavac_nongcj_usable.
5789         (compile_java_class): Remove gcj related code.
5791         javacomp-script: Remove support for 'gcj'.
5792         * build-aux/javacomp.sh.in: Don't test HAVE_GCJ_C.
5793         * m4/javacomp.m4 (gt_JAVACOMP): Don't set HAVE_GCJ_C. Don't test whether
5794         $JAVAC is gcj. Don't set CONF_JAVAC to 'gcj -C'. Update comment.
5795         (gt_JAVACOMP_DISABLED): Don't set HAVE_GCJ_C.
5797         javaexec: Remove support for 'gij'.
5798         * lib/javaexec.c (execute_java_class): Don't test for gij.
5800         javaexec-script: Remove support for 'gij'.
5801         * build-aux/javaexec.sh.in: Don't test HAVE_GIJ.
5802         * m4/javaexec.m4 (gt_JAVAEXEC): Don't set HAVE_GIJ. Don't set CONF_JAVA
5803         to 'gij'.
5804         * m4/javacomp.m4: Update comment.
5806 2023-06-09  Bruno Haible  <bruno@clisp.org>
5808         javaexec: Remove support for 'jview'.
5809         * lib/javaexec.c (execute_java_class): Don't test for jview.
5811         javaexec-script: Remove support for 'jview'.
5812         * build-aux/javaexec.sh.in: Don't test HAVE_JVIEW.
5813         * m4/javaexec.m4 (gt_JAVAEXEC): Don't set HAVE_JVIEW. Don't set
5814         CONF_JAVA to 'jview'.
5815         (gt_JAVAEXEC_DISABLED): Don't set HAVE_JVIEW.
5816         * m4/javacomp.m4: Update comment.
5818 2023-06-06  Jim Meyering  <meyering@meta.com>
5820         maint.mk: regenerate regex to reflect new functions in xalloc.h
5821         * top/maint.mk (sc_prohibit_xalloc_without_use) [_xa1]:
5822         Regenerate using the command listed in the comment.
5824 2023-06-06  Paul Eggert  <eggert@cs.ucla.edu>
5826         propername: pacify po_check
5827         Problem reported by Bruno Haible <https://bugs.gnu.org/63933>.
5828         * lib/propername.h: Change comment.
5830         Put "/" at end of .gitignore directory names
5831         * build-aux/bootstrap: Regenerate.
5832         * top/bootstrap-funclib.sh (symlink_to_dir, autogen):
5833         Put slashes after .gitignore entries that name directories.
5835 2023-06-06  Jose E. Marchesi  <jemarch@gnu.org>
5837         maintainer-makefile: Enforce the GNU Coding Standards in the README.
5838         * top/maint.mk (sc_readme_link_install): New rule.
5839         (sc_readme_link_copying): Likewise.
5841 2023-06-05  Paul Eggert  <eggert@cs.ucla.edu>
5843         copy-file-range: support building for older kernels
5844         * m4/copy-file-range.m4 (gl_FUNC_COPY_FILE_RANGE):
5845         Remove static check, to support the dubious practice of
5846         building for platforms that predate the build platform.
5847         On working kernels this adds an extra syscall the first time
5848         that copy_file_range is used.  Problem reported for Gentoo by
5849         Sam James <https://bugs.gnu.org/63850>.
5851         manywarnings: more nuance about optimization
5852         * doc/manywarnings.texi (manywarnings): Suggest compiling with the
5853         optimization flags commonly used, as opposed to -O2 and -O0
5854         specifically.  -ggdb shouldn’t affect warnings so don’t mention it.
5856 2023-06-05  Bruno Haible  <bruno@clisp.org>
5858         posix_spawn-internal: Fix a warning (regression 2022-11-20).
5859         * lib/spawni.c: Don't use this particular #pragma for gcc < 4.2.
5861 2023-06-05  Bruno Haible  <bruno@clisp.org>
5863         file-has-acl: Fix compilation error on Slackware 13 (regr. 2023-05-12).
5864         * lib/file-has-acl.c (XATTR_NAME_POSIX_ACL_ACCESS,
5865         XATTR_NAME_POSIX_ACL_DEFAULT): Add fallback definitions.
5867 2023-06-05  Bruno Haible  <bruno@clisp.org>
5869         Fix bugs on mingw when module dirfd is in use (regression 2023-04-26).
5870         * lib/getcwd.c: When GNULIB_defined_DIR, revert to the system's
5871         definitions of opendir, closedir, readdir, rewinddir.
5872         * lib/mountlist.c: When GNULIB_defined_DIR, revert to the system's
5873         definitions of opendir, closedir, readdir.
5874         * lib/scandir.c: Likewise.
5875         * lib/glob.c: Fix comment. When GNULIB_defined_DIR, don't undefine
5876         opendir, closedir.
5878 2023-06-04  Bruno Haible  <bruno@clisp.org>
5880         manywarnings: Overhaul documentation.
5881         * doc/manywarnings.texi: In the example, put all unwanted warning
5882         options into 'nw', and use a second gl_MANYWARN_COMPLEMENT invocation to
5883         sort out how these options need to get added to WARN_FLAGS.
5884         Describe the first-time use in more detail: Recommend a new GCC.
5885         Recommend to test builds with -O2 and with -O0. Suggest to sort the
5886         warning by warning option. Add reference to the GCC pragma's
5887         documentation.
5889 2023-06-04  Bruno Haible  <bruno@clisp.org>
5891         error: Fix support for library namespacing (regression 2023-05-27).
5892         * lib/error.in.h (error): If error is defined as a macro, define a
5893         static inline function _gl_inline_error that invokes it, and let the
5894         new error macro invoke that function.
5895         (error_at_line): If error_at_line is defined as a macro, define a static
5896         inline function _gl_inline_error_at_line that invokes it, and let the
5897         new error_at_line macro invoke that function.
5899 2023-06-04  Bruno Haible  <bruno@clisp.org>
5901         terminfo, termcap: Fix "discards 'const' qualifier" warnings.
5902         * lib/tparm.c (tparm): Change type of 'fmt'. New local variable 'fmtp'.
5904 2023-06-04  Bruno Haible  <bruno@clisp.org>
5906         uniname/uniname: Add comments.
5907         * modules/uniname/uniname (Makefile.am): Explain how to work around a
5908         GCC bug.
5910 2023-06-04  Bruno Haible  <bruno@clisp.org>
5912         uniname/uniname: Fix -Wformat-signedness warning.
5913         * lib/uniname/uniname.c (unicode_character_name): Use %u instead of %d
5914         in format string.
5916 2023-06-04  Bruno Haible  <bruno@clisp.org>
5918         uniname/uniname: Improve comments.
5919         * lib/uniname/uniname.c (unicode_character_name): Fix comments.
5921 2023-06-03  Bruno Haible  <bruno@clisp.org>
5923         classpath, csharpexec: Avoid "candidate for attribute 'malloc'" warning.
5924         * lib/classpath.h (set_classpath): Mark with attribute 'malloc'.
5926 2023-06-03  Bruno Haible  <bruno@clisp.org>
5928         propername-lite: Improve documentation.
5929         * lib/propername.h: Describe functional differences between
5930         proper_name_lite and proper_name_utf8.
5932 2023-06-03  Bruno Haible  <bruno@clisp.org>
5934         gnulib-tool: Keep in sync with last change to gnulib-tool.py.
5935         * gnulib-tool (func_emit_po_Makevars): Treat proper_name_lite like
5936         proper_name_utf8.
5938 2023-06-03  Bruno Haible  <bruno@clisp.org>
5940         error: Improve comments.
5941         * lib/error.in.h (__gl_error_call): Add more comments.
5943 2023-06-02  Paul Eggert  <eggert@cs.ucla.edu>
5945         error: do not evaluate status twice
5946         Do this in a different way, so that the status is evaluated
5947         once even when not optimizing and when using GCC.
5948         * lib/error.in.h (__gl_error_call1) [__GNUC__]: New macro.
5949         (__gl_error_call) [__GNUC__]: Use it.
5951 2023-06-02  Bruno Haible  <bruno@clisp.org>
5953         warnings: Add ability to inhibit all warnings.
5954         * m4/warnings.m4 (gl_CC_INHIBIT_WARNINGS, gl_CXX_INHIBIT_WARNINGS): New
5955         macros, based on gl_CC_ALLOW_WARNINGS and gl_CXX_ALLOW_WARNINGS in
5956         m4/gnulib-common.m4.
5958 2023-06-02  Paul Eggert  <eggert@cs.ucla.edu>
5960         propername-lite: new module
5961         propername_lite acts like propername_utf8 but needs less
5962         infrastructure, e.g., it does not worry about memory allocation.
5963         * MODULES.html.sh (func_all_modules): Mention it.
5964         * lib/propername.h (proper_name_lite): New decl.
5965         * lib/propername-lite.c, modules/propername-lite: New files.
5966         * pygnulib/GLEmiter.py (GLEmiter.po_Makevars):
5967         Treat proper_name_lite like proper_name_utf8.
5969 2023-06-02  Bruno Haible  <bruno@clisp.org>
5971         openmp-init: Silence "no previous prototype for 'openmp_init'" warning.
5972         * lib/omp.in.h: Test _OPENMP.
5973         * lib/omp-init.c: Include <omp.h> always.
5974         * modules/openmp-init (Include): Allow <omp.h> to be included always.
5976 2023-06-02  Bruno Haible  <bruno@clisp.org>
5978         term-style-control: Silence -Wshadow warning.
5979         * lib/term-style-control.c (continuing_signal_handler): Rename
5980         parameter.
5982 2023-06-02  Bruno Haible  <bruno@clisp.org>
5984         pipe-filter-gi, pipe-filter-ii: Silence -Wunused-macro warning.
5985         * lib/pipe-filter-aux.c: Remove many unnecessary includes.
5986         (_): Remove macro.
5988 2023-06-02  Bruno Haible  <bruno@clisp.org>
5990         javacomp: Silence -Wanalyzer-possible-null-argument warning.
5991         * lib/javacomp.c: Include verify.h.
5992         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_13_usable,
5993         is_envjavac_nongcj_usable, compile_java_class): Assert that the
5994         xasprintf results are non-NULL. This is possible since all involved
5995         format strings are valid and don't use %ls, and all argument strings
5996         are small compared to INT_MAX.
5997         * modules/javacomp (Depends-on): Add verify.
5999 2023-06-02  Bruno Haible  <bruno@clisp.org>
6001         striconveha: Don't crash if malloc() returns NULL.
6002         * lib/striconveha.c (mem_iconveha, str_iconveha): Check malloca() return
6003         value.
6005 2023-06-02  Bruno Haible  <bruno@clisp.org>
6007         setenv: Don't crash if malloc() returns NULL.
6008         * lib/setenv.c (rpl_setenv): Check malloca() return value.
6010 2023-06-02  Bruno Haible  <bruno@clisp.org>
6012         error: Avoid implicit-fallthrough warnings with -O0 (regr. 2023-05-30).
6013         * lib/error.in.h (__gl_error_call): Parenthesize status. When not
6014         optimizing, expand to code without compound statements.
6016 2023-06-01  Bruno Haible  <bruno@clisp.org>
6018         getprogname: Add support for ASCII-compatible environments in z/OS.
6019         Reported by Mike Fulton <mikefultonpersonal@gmail.com> in
6020         <https://lists.gnu.org/archive/html/bug-gnulib/2023-05/msg00198.html>.
6021         * lib/getprogname.c (getprogname): On z/OS, when compiling for an
6022         ASCII-compatible environment, convert the result from EBCDIC to ASCII.
6024 2023-06-01  Mitch Capper  <mitch.capper@gmail.com>
6026         gnulib-tool.py: Fix a format string mistake.
6027         * pygnulib/GLImport.py (GLImport.execute): Fix a typo in a format
6028         string.
6029         Copyright-paperwork-exempt: Yes
6031 2023-06-01  Bruno Haible  <bruno@clisp.org>
6033         Add info for maintainers and contributors.
6034         * HACKING: New file.
6036 2023-05-30  Nick Bowler  <nbowler@draconx.ca>
6038         readline: fix memory leak in replacement readline.
6039         * lib/readline.c (readline): Free memory after getline failure.
6040         Copyright-paperwork-exempt: true
6042 2023-05-30  Paul Eggert  <eggert@cs.ucla.edu>
6044         error: don’t call ‘exit’
6045         Let the underlying functions call ‘exit’, instead of having the
6046         Gnulib replacement macros do it.  Use ‘unreachable’ to tell the
6047         compiler that those functions exit when the status is nonzero.
6048         This saves a function call.
6049         * lib/error.in.h: Include stddef.h, not stdlib.h.
6050         (__gl_error_call): Rely on the function to exit, using
6051         ‘unreachable’ to tell the compiler that the function does not return.
6052         * modules/error (Depends-on): Add stddef.
6054         error: don’t evaluate status arg twice
6055         This avoids potential issues if the first argument has a side effect.
6056         * lib/error.in.h (__gl_error_call): New macro, which evaluates its
6057         status arg only once, by using a statement expression if GNU C -
6058         the only platform we need to worry about pacifying - and by simply
6059         calling ‘error’ otherwise.
6060         (error, error_at_line): Use it.
6062 2023-05-28  Bruno Haible  <bruno@clisp.org>
6064         warnings, manywarnings: Assume autoconf >= 2.64.
6065         * m4/warnings.m4 (gl_AS_VAR_APPEND): Remove macro.
6066         (gl_COMPILER_OPTION_IF, gl_WARN_ADD): Use AS_VAR_APPEND instead of
6067         gl_AS_VAR_APPEND.
6068         * m4/manywarnings.m4: Likewise.
6070 2023-05-28  Jim Meyering  <meyering@fb.com>
6072         file-has-acl: avoid warning from bleeding-edge GCC
6073         * lib/file-has-acl.c: Include attribute.h.
6074         (have_xattr): Declare with ATTRIBUTE_PURE,
6075         to avoid new warning from GCC14-to-be.
6076         * modules/file-has-acl (Depends-on): Add attribute.
6077         Spotted while building coreutils with this:
6078         gcc version 14.0.0 20230526 (experimental)
6080 2023-05-28  Bruno Haible  <bruno@clisp.org>
6082         error: Avoid -Wint-in-bool-context warning.
6083         Reported by Pádraig Brady in
6084         <https://lists.gnu.org/archive/html/bug-gnulib/2023-05/msg00178.html>.
6085         * lib/error.in.h (error, error_at_line): Use 'status != 0', since status
6086         is expected to be an int, not a bool value.
6088 2023-05-27  Bruno Haible  <bruno@clisp.org>
6090         error: Support the compiler's control flow analysis better.
6091         * lib/error.in.h: Remove @PRAGMA_SYSTEM_HEADER@. Include <stdlib.h>.
6092         (error): Define as a macro that explicitly invokes exit().
6093         (error_at_line): Likewise.
6094         * lib/error.c (_GL_NO_INLINE_ERROR): Define before including error.h.
6095         * modules/error-h (configure.ac): Don't invoke gl_CONDITIONAL_HEADER.
6096         (Makefile.am): Generate error.h always. Don't substitute
6097         PRAGMA_SYSTEM_HEADER.
6098         * m4/error_h.m4 (gl_ERROR_H): Set COMPILE_ERROR_C instead of
6099         GL_GENERATE_ERROR_H.
6100         * modules/error (configure.ac, Depends-on): Test COMPILE_ERROR_C instead
6101         of GL_GENERATE_ERROR_H.
6102         * lib/copy-file.c: Revert the last change.
6104 2023-05-26  Bruno Haible  <bruno@clisp.org>
6106         flexmember: Make it easier to use.
6107         * lib/flexmember.h (FLEXNSIZEOF): New macro.
6108         * lib/hamt.c (alloc_bucket, alloc_subtrie): Fix FLEXSIZEOF invocation.
6109         Use FLEXNSIZEOF instead of FLEXSIZEOF.
6110         * lib/ssfmalloc.h (init_small_block_page_pool): Use FLEXNSIZEOF instead
6111         of FLEXSIZEOF.
6113 2023-05-26  Bruno Haible  <bruno@clisp.org>
6115         diffseq: Silence another gcc warning.
6116         * lib/diffseq.h (compareseq): Move into the scope of the '#pragma GCC
6117         diagnostic'.
6119 2023-05-26  Bruno Haible  <bruno@clisp.org>
6121         copy-file: Silence gcc warnings.
6122         * lib/copy-file.c: Add #pragma GCC diagnostic.
6124 2023-05-26  Bruno Haible  <bruno@clisp.org>
6126         diffseq: Silence gcc warning.
6127         * lib/diffseq.h: Add #pragma GCC diagnostic.
6129 2023-05-24  Paul Eggert  <eggert@cs.ucla.edu>
6131         manywarnings: speed up nomfi test
6132         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Simplify and speed up
6133         on current platforms, by seeing first whether
6134         -Wno-missing-field-initializers is needed (it isn’t), so that
6135         later we don’t need to determine whether it’s supported.
6137         Simplify -Wno-missing-field-initializers checking
6138         * m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): Don’t worry about
6139         -Wmissing-field-initializers, as this is no longer needed now that
6140         gl_MANYWARN_ALL_GCC is fixed.
6142         manywarnings: port better to GCC 11.2 and earlier
6143         Problem reported by Bruno Haible in:
6144         https://lists.gnu.org/r/bug-diffutils/2023-05/msg00015.html
6145         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
6146         Also test for GCC bug 82283
6147         <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82283>.
6149 2023-05-24  Bruno Haible  <bruno@clisp.org>
6151         asyncsafe-spin, simple-atomic: Don't use -mcpu-v9 on NetBSD/sparc.
6152         Reported by Brandon Applegate in
6153         <https://lists.gnu.org/archive/html/bug-gettext/2023-05/msg00042.html>.
6154         * lib/asyncsafe-spin.c: Limit the SPARC workaround to Solaris.
6155         * lib/simple-atomic.c: Likewise.
6156         * m4/sparcv8+.m4 (gl_SPARC_V8PLUS): Likewise.
6158 2023-05-23  Paul Eggert  <eggert@cs.ucla.edu>
6160         nstrftime: wmemmove → __wmemmove in glibc part
6161         https://sourceware.org/pipermail/libc-alpha/2023-May/148435.html
6162         * lib/nstrftime.c (__strftime_internal) [COMPILE_WIDE]:
6163         Use __wmemmove, not wmemmove, to keep in better sync with draft glibc.
6165 2023-05-22  Bruno Haible  <bruno@clisp.org>
6167         git-merge-changelog: Code style changes.
6168         * lib/git-merge-changelog.c: Don't make side effects to variables
6169         inside parenthesized expressions. Write (size_t)(-1), for consistency
6170         with gl_list.h.
6171         (compute_mapping): Rename variable in2 to jrev.
6173 2023-05-21  Paul Eggert  <eggert@cs.ucla.edu>
6175         strtol: match 'configure' to 'make check'
6176         Inferred from report by Tomasz Kłoczko <https://bugs.gnu.org/63632>.
6177         * m4/strtol.m4 (gl_FUNC_STRTOL):
6178         * m4/strtoll.m4 (gl_FUNC_STRTOLL):
6179         Also test "0b", since the test cases check it.
6181         git-merge-changelog: port to size_t padding
6182         * lib/git-merge-changelog (entry_hashcode):
6183         As a nicety, Prefer SIZE_WIDTH to computing it ourselves.
6185         git-merge-changelog: prefer idx_t
6186         * lib/git-merge-changelog.c: Include idx.h.
6187         (struct entry, entry_create, entry_hashcode)
6188         (struct changelog_file, read_changelog_file)
6189         (entries_mapping_get, entries_mapping_reverse_get)
6190         (compute_mapping, struct edit, struct differences)
6191         (compute_differences, find_paragraph_end)
6192         (try_split_merged_entry, struct conflict, conflict_write, main):
6193         Prefer idx_t to ptrdiff_t and size_t when the value is a
6194         nonnegative index or size.  Change a few for-loops so that
6195         the index never goes negative.
6196         * modules/git-merge-changelog (Depends-on): Add idx.
6198         git-merge-changelog: ssize_t → ptrdiff_t
6199         Prefer ptrdiff_t to ssize_t, as per
6200         <https://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00019.html>.
6201         * lib/git-merge-changelog.c (struct entries_mapping)
6202         (entries_mapping_get, entries_mapping_reverse_get)
6203         (compute_mapping, struct edit, struct differences, OFFSET)
6204         (OFFSET_MAX, EXTRA_CONTEXT_FIELDS, compute_differences, main):
6205         Use ptrdiff_t, not ssize_t.
6206         * modules/git-merge-changelog (Depends-on): Add stdint for PTRDIFF_MAX.
6208         git-merge-changelog: port to ssize_t padding
6209         * lib/git-merge-changelog.c (OFFSET_MAX): New macro, as a nicety.
6211 2023-05-21  Bruno Haible  <bruno@clisp.org>
6213         limits-h tests: Check the value of SSIZE_MAX.
6214         * tests/test-limits-h.c (limits12): New variable.
6215         Include <sys/types.h> and check the value of SSIZE_MAX.
6216         * modules/limits-h-tests (Depends-on): Add sys_types.
6218 2023-05-21  Bruno Haible  <bruno@clisp.org>
6220         ssize_t: Fix replacement on 64-bit Windows.
6221         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Use prefix 'gl_' instead of 'gt_'.
6222         Define ssize_t to 'long long' or 'long', depending on the width of
6223         'size_t'.
6225 2023-05-20  Paul Eggert  <eggert@cs.ucla.edu>
6227         limits-h: other modules can rely on SSIZE_MAX
6228         * lib/areadlink-with-size.c, lib/areadlinkat-with-size.c:
6229         * lib/careadlinkat.c, lib/getdelim.c, lib/getndelim2.c:
6230         * lib/regex_internal.h:
6231         (SSIZE_MAX): Do not define.
6232         * modules/areadlink-with-size, modules/areadlinkat-with-size:
6233         * modules/careadlinkat, modules/getdelim, modules/getndelim2:
6234         * modules/regex:
6235         (Depends-on) Add limits-h.
6237         limits-h: define SSIZE_MAX
6238         * doc/posix-headers/limits.texi (limits.h): Document this.
6239         * lib/limits.in.h (SSIZE_MAX): Define if not already defined.
6240         * m4/limits-h.m4 (gl_LIMITS_H): Also generate limits.h
6241         if <limits.h> does not define SSIZE_MAX.
6243         diffseq: backward compatibility for OFFSET_MAX
6244         * lib/diffseq.h (OFFSET_MAX): Define only if not already defined.
6246 2023-05-19  Bruno Haible  <bruno@clisp.org>
6248         careadlinkat: Silence gcc warning for GCC ≥ 12.
6249         * lib/careadlinkat.c: For GCC 12 or newer, use
6250         "#pragma GCC diagnostic ignored" to silence the warning.
6252 2023-05-19  Pádraig Brady  <P@draigBrady.com>
6254         modechange: pacify gcc -Wsuggest-attribute=pure
6255         * lib/modechange.h (mode_adjust): Add _GL_ATTRIBUTE_PURE
6256         suggested with GCC 12 with -flto.
6258 2023-05-19  Paul Eggert  <eggert@cs.ucla.edu>
6260         diffseq: don’t assume integers lack padding
6261         * NEWS: Mention this.
6262         * lib/diffseq.h (OFFSET_MAX): Don’t define;
6263         this is now the user’s responsibility.
6264         * lib/fstrcmp.c (OFFSET_MAX): Define to PTRDIFF_MAX.
6266 2023-05-18  Bruno Haible  <bruno@clisp.org>
6268         getndelim2: Silence gcc warning.
6269         * lib/getndelim2.c: Add #pragma GCC diagnostic.
6270         (IF_LINT): Remove macro.
6271         (getndelim2): Remove use of IF_LINT.
6273 2023-05-18  Bruno Haible  <bruno@clisp.org>
6275         canonicalize: Silence gcc warning.
6276         * lib/canonicalize.c: Add #pragma GCC diagnostic.
6277         (IF_LINT): Remove macro.
6278         (canonicalize_filename_mode_stk): Remove use of IF_LINT.
6280 2023-05-18  Bruno Haible  <bruno@clisp.org>
6282         vasnprintf, c-vasnprintf: Silence gcc warning.
6283         * lib/vasnprintf.c: Add #pragma GCC diagnostic.
6285 2023-05-18  Bruno Haible  <bruno@clisp.org>
6287         nstrftime: Silence gcc warning.
6288         * lib/nstrftime.c: Add #pragma GCC diagnostic.
6290 2023-05-18  Bruno Haible  <bruno@clisp.org>
6292         astrxfrm: Silence gcc warning.
6293         * lib/astrxfrm.c: Add #pragma GCC diagnostic.
6295 2023-05-18  Bruno Haible  <bruno@clisp.org>
6297         vasnprintf, c-vasnprintf: Silence gcc warnings.
6298         * lib/vasnprintf.c (scale10_round_decimal_decoded): Remove memory==NULL
6299         test.
6300         (scale10_round_decimal_long_double, scale10_round_decimal_double): Test
6301         for memory==NULL here. Remove use of IF_LINT.
6303 2023-05-18  Bruno Haible  <bruno@clisp.org>
6305         bitset: Silence gcc warning.
6306         * lib/bitset/list.c (lbitset_copy_): Remove redundant test from the
6307         loop's first iteration.
6309 2023-05-18  Bruno Haible  <bruno@clisp.org>
6311         stack: Silence gcc warning in tests.
6312         * lib/stack.h (init, destroy, empty, current_base, push, pop, discard,
6313         top, size): Mark as possibly unused.
6315 2023-05-18  Bruno Haible  <bruno@clisp.org>
6317         hamt: Silence gcc warning.
6318         * lib/hamt.c (init_element): Mark as possibly unused.
6320 2023-05-18  Bruno Haible  <bruno@clisp.org>
6322         get-rusage-data: Silence gcc warning.
6323         * lib/get-rusage-data.c (get_rusage_data_via_iterator): Mark as possibly
6324         unused.
6326 2023-05-18  Bruno Haible  <bruno@clisp.org>
6328         astrxfrm: Fix use-after-free bug.
6329         * lib/astrxfrm.c (astrxfrm): Don't use memcpy after realloc succeeded.
6331 2023-05-18  Bruno Haible  <bruno@clisp.org>
6333         gnulib-tool: Ignore .orig and .rej files under modules/.
6334         * gnulib-tool (func_sanitize_modulelist): Exclude also files whose name
6335         ends in .orig or .rej.
6336         * pygnulib/GLModuleSystem.py (GLModuleSystem.file_is_module): Likewise.
6338 2023-05-18  Bruno Haible  <bruno@clisp.org>
6340         uchar: Fix error when <uchar.h> is included twice.
6341         * lib/uchar.in.h: Fix double-inclusion guard.
6343 2023-05-17  Paul Eggert  <eggert@cs.ucla.edu>
6345         stdckdint: use in more modules
6346         * lib/nstrftime.c (__strftime_internal):
6347         * lib/parse-datetime.y (apply_relative_time, zone, date)
6348         (iso_8601_date, relunit, relunit_snumber, time_zone_hhmm)
6349         (to_tm_year, yylex, parse_datetime_body):
6350         * lib/timespec-add.c (timespec_add):
6351         * lib/timespec-sub.c (timespec_sub):
6352         * lib/xstrtol.c (bkm_scale):
6353         Prefer ckd_add to INT_ADD_WRAPV etc., and include stdckdint.h.
6354         * modules/nstrftime, modules/parse-datetime:
6355         * modules/timespec-add, modules/timespec-sub, modules/xstrtol:
6356         (Depends-on): Add stdckdint.
6358         nstrftime: suggest to glibc how to avoid alloca
6359         * lib/nstrftime.c (widen) [COMPILE_WIDE]: Remove.
6360         (__strftime_internal) [COMPILE_WIDE): Instead of converting the
6361         multibyte time zone abbreviation into a potentially unbounded
6362         alloca buffer, convert it directly into the output buffer.
6363         Although this code is not used in Gnulib, this can help the glibc
6364         developers avoid the problem on the glibc side.
6366 2023-05-15  Bruno Haible  <bruno@clisp.org>
6368         doc: New chapter "Strings and Characters".
6369         * doc/strings.texi: New file.
6370         * doc/gnulib.texi (POSIXURL): New variable.
6371         (posixheader, posixfunc, func): New macros, from GNU libunistring's
6372         documentation.
6373         Include strings.texi.
6374         (Particular Modules): Don't include c-locale.texi here.
6375         * doc/c-locale.texi: Sections become subsections, subsections become
6376         subsubsections.
6377         * doc/posix-functions/isalnum.texi: Mention c32isalnum.
6378         * doc/posix-functions/isalpha.texi: Mention c32isalpha.
6379         * doc/posix-functions/isblank.texi: Mention c32isblank.
6380         * doc/posix-functions/iscntrl.texi: Mention c32iscntrl.
6381         * doc/posix-functions/isdigit.texi: Mention c32isdigit.
6382         * doc/posix-functions/isgraph.texi: Mention c32isgraph.
6383         * doc/posix-functions/islower.texi: Mention c32islower.
6384         * doc/posix-functions/isprint.texi: Mention c32isprint.
6385         * doc/posix-functions/ispunct.texi: Mention c32ispunct.
6386         * doc/posix-functions/isspace.texi: Mention c32isspace.
6387         * doc/posix-functions/isupper.texi: Mention c32isupper.
6388         * doc/posix-functions/isxdigit.texi: Mention c32isxdigit.
6389         * doc/posix-functions/tolower.texi: Mention alternative APIs.
6390         * doc/posix-functions/toupper.texi: Likewise.
6391         * doc/posix-functions/towlower.texi: Mention c32tolower.
6392         * doc/posix-functions/towupper.texi: Mention c32toupper.
6393         * doc/posix-functions/wcswidth.texi: Mention c32swidth.
6394         * doc/posix-functions/wcwidth.texi: Mention c32width.
6396 2023-05-15  Bruno Haible  <bruno@clisp.org>
6398         sigsegv: Add tentative support for Hurd/x86_64.
6399         Based on explanations by Sergey Bugaev <bugaevc@gmail.com>.
6400         * lib/sigsegv.c: Update from libsigsegv/src/fault-hurd-i386-old.h.
6402 2023-05-15  Paul Eggert  <eggert@cs.ucla.edu>
6404         file-has-acl: improve port to Fedora 39
6405         Problem reported by Ondrej Valousek in:
6406         https://lists.gnu.org/r/bug-gnulib/2023-05/msg00078.html
6407         * lib/file-has-acl.c: Include minmax.h.
6408         [USE_ACL && HAVE_LINUX_XATTR_H && HAVE_LISTXATTR]: Include stdckdint.h.
6409         (file_has_acl) [USE_ACL && HAVE_LINUX_XATTR_H && HAVE_LISTXATTR]:
6410         If the file has NFSv4 ACLs, ignore any POSIX ACLs, for Fedora 39.
6411         Return a bit faster when listxattr returns 0.
6412         Don’t loop forever if an attacker is fiddling with ACLs.
6413         * modules/file-has-acl (Depends-on): Add minmax, stdckdint.
6415 2023-05-15  Bruno Haible  <bruno@clisp.org>
6417         Work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82283 .
6418         Reported by Pádraig Brady <P@draigBrady.com> in
6419         <https://lists.gnu.org/archive/html/bug-gnulib/2023-05/msg00077.html>.
6420         * m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): Add
6421         -Wno-missing-field-initializers for GCC < 11.
6423 2023-05-15  Bruno Haible  <bruno@clisp.org>
6425         gettimeofday, pthread-*, thread, thrd: Don't omit intended initializers.
6426         * lib/gettimeofday.c (gettimeofday): List the initializers of both
6427         tv_sec and tv_usec.
6428         * lib/glthread/thread.c (gl_thread_self): List the initializers of both
6429         tv_sec and tv_nsec.
6430         * lib/pthread-cond.c (pthread_cond_wait): Likewise.
6431         * lib/thrd.c (rpl_thrd_current): Likewise.
6432         * lib/pthread-rwlock.c (MIN): New macro.
6433         (pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock): List the
6434         initializers of both tv_sec and tv_nsec. Don't modify the duration after
6435         having initialized it.
6436         * lib/pthread_mutex_timedlock.c (MIN): New macro.
6437         (pthread_mutex_timedlock): List the initializers of both tv_sec and
6438         tv_nsec. Don't modify the duration after having initialized it.
6440         select: Fix compilation error (regression from yesterday).
6441         * lib/select.c (rpl_select): Revert last change.
6443         poll: Fix syntax error (regression from yesterday).
6444         * lib/poll.c (poll): Remove semicolon inside braces.
6446 2023-05-14  Paul Eggert  <eggert@cs.ucla.edu>
6448         timespec: fill in other members
6449         This problem was found when compiling GNU Emacs with
6450         --enable-gcc-warnings on a platform where tv_sec is 64 bits and
6451         tv_nsec is 32 bits, and struct timespec has padding.  GCC
6452         -Wuse-of-uninitialized-value complained when a struct timespec
6453         initialized only via assigning to tv_sec and tv_nsec was copied
6454         via assignment (this was in lib/timespec.h’s make_timespec).
6455         Although behavior is well-defined on this platform, the warning is
6456         annoying and the behavior might not be well-defined on theoretical
6457         platforms where struct timespec has other members.  To work around
6458         this, initialize all the struct’s members.
6459         * lib/getsockopt.c (rpl_getsockopt):
6460         * lib/gettime.c (gettime):
6461         * lib/gettimeofday.c (gettimeofday):
6462         * lib/glthread/thread.c (gl_thread_self):
6463         * lib/nanosleep.c (nanosleep):
6464         * lib/parse-datetime.y (digits_to_date_time, set_hhmmss)
6465         (signed_seconds, unsigned_seconds, yylex, parse_datetime_body):
6466         * lib/poll.c (poll):
6467         * lib/pselect.c (pselect):
6468         * lib/pthread-cond.c (endlessly, pthread_cond_timedwait):
6469         * lib/pthread-rwlock.c (pthread_rwlock_timedrdlock)
6470         (pthread_rwlock_timedwrlock):
6471         * lib/pthread_mutex_timedlock.c (pthread_mutex_timedlock):
6472         * lib/select.c (rpl_select):
6473         * lib/settime.c (settime):
6474         * lib/stat-time.h (get_stat_atime, get_stat_ctime)
6475         (get_stat_mtime, get_stat_birthtime):
6476         * lib/thrd.c (rpl_thrd_current):
6477         * lib/timespec.h (make_timespec):
6478         * lib/timespec_getres.c (timespec_getres):
6479         * lib/utimecmp.c (utimecmpat):
6480         * lib/utimens.c (fdutimens):
6481         When filling in a struct timespec or similar time-related structure
6482         that might be copied elsewhere, also assign to any storage other
6483         than tv_sec and tv_nsec, to avoid undefined behavior on (likely
6484         theoretical) platforms where struct timespec has other members,
6485         and also to avoid warnings from GCC and/or valgrind.
6487         year2038-recommended: Improve failure diagnostic.
6488         * m4/largefile.m4 (AC_SYS_YEAR2038_RECOMMENDED): Sync from Autoconf.
6490 2023-05-13  Paul Eggert  <eggert@cs.ucla.edu>
6492         stdio: use _GL_ATTRIBUTE_MALLOC
6493         * lib/stdio.in.h (fdopen, fopen, popen, tmpfile): Declare with
6494         _GL_ATTRIBUTE_MALLOC, for consistency with glibc, and so that
6495         building the fopen module with ‘gcc -O2 -Wsuggest-attribute=malloc
6496         -Wsystem-headers -Werror’ does not fail with “stdio.h: In function
6497         ‘rpl_fopen’: stdio.h:970:1: error: function might be candidate for
6498         attribute ‘malloc’ [-Werror=suggest-attribute=malloc]”, a problem
6499         I noticed on both Fedora 38 and Ubuntu 23.04.
6501 2023-05-12  Bruno Haible  <bruno@clisp.org>
6503         sigsegv: Add tentative support for Hurd/x86_64.
6504         Reported by Samuel Thibault <samuel.thibault@ens-lyon.org>.
6505         * lib/sigsegv.c: Update from libsigsegv/src/fault-hurd-i386.h.
6507 2023-05-12  Paul Eggert  <eggert@cs.ucla.edu>
6509         file-has-acl: port to Fedora 39
6510         Fedora 39 getxattr with XATTR_NAME_POSIX_ACL_ACCESS either
6511         succeeds or fails with ENODATA, so it is no longer possible to
6512         detect from its failure that the filesystem might support NFSv4 ACLs.
6513         Problem reported by Ondrej Valousek in:
6514         https://lists.gnu.org/r/bug-gnulib/2023-04/msg00228.html
6515         Instead, use listxattr to determine whether NFSv4 ACLs are in play.
6516         This typically saves syscalls anyway.
6517         * lib/file-has-acl.c: In #if, use (HAVE_LINUX_XATTR_H &&
6518         HAVE_LISTXATTR) instead of GETXATTR_WITH_POSIX_ACLS.
6519         The following changes apply when (USE_ACL && HAVE_LINUX_XATTR_H &&
6520         HAVE_LISTXATTR):
6521         Include minmax.h.
6522         (have_xattr): New function.
6523         (file_has_acl): Try listxattr first; typically this means we need
6524         to do no other syscall.  Call getxattr only if there are NFSv4
6525         ACLs but not POSIX ACLs.
6526         * m4/acl.m4 (gl_FILE_HAS_ACL): Simplify by merely testing for
6527         linux/xattr.h and listxattr.  All uses changed.
6529 2023-05-10  Josh Soref  <jsoref@gmail.com>
6531         bootstrap: spelling/grammar fix in comment
6532         * build-aux/bootstrap: As above.
6534 2023-05-07  Paul Eggert  <eggert@cs.ucla.edu>
6536         Warn against bogus TZ settings
6537         * doc/parse-datetime.texi (Specifying time zone rules):
6538         Warn against TZ="UTC=5".
6540 2023-05-05  Bruno Haible  <bruno@clisp.org>
6542         dirfd: Add tests.
6543         * tests/test-dirfd.c: New file.
6544         * modules/dirfd-tests: New file.
6546 2023-05-05  Bruno Haible  <bruno@clisp.org>
6548         dirfd: Fix bogus override (regression 2023-04-26).
6549         Reported by Bjarni Ingi Gislason <bjarniig@simnet.is> in
6550         <https://lists.gnu.org/archive/html/bug-gnulib/2023-05/msg00040.html>.
6551         * m4/dirfd.m4 (gl_FUNC_DIRFD): Fix mistake in last change.
6553 2023-05-04  Bruno Haible  <bruno@clisp.org>
6555         c32swidth: Add tests.
6556         * tests/test-c32swidth.c: New file, based on tests/test-c32width.c.
6557         * modules/c32swidth-tests: New file.
6559         c32swidth: New module.
6560         * lib/uchar.in.h (c32swidth): New declaration.
6561         * lib/wcswidth-impl.h: Use macros FUNC, UNIT, CHARACTER_WIDTH.
6562         * lib/wcswidth.c: Define FUNC, UNIT, CHARACTER_WIDTH before including
6563         wcswidth-impl.h.
6564         * lib/c32swidth.c: New file.
6565         * modules/c32swidth: New file.
6566         * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
6567         GNULIB_C32SWIDTH.
6568         * modules/uchar (Makefile.am): Substitute GNULIB_C32SWIDTH.
6570 2023-05-04  Bruno Haible  <bruno@clisp.org>
6572         wcswidth: Fix result in case of overflow.
6573         * lib/wcswidth-impl.h (wcswidth): Continue searching for a non-printing
6574         wide character after the total width has become > INT_MAX.
6576 2023-05-04  Bruno Haible  <bruno@clisp.org>
6578         wcswidth: Relax license.
6579         * modules/wcswidth (License): Change to LGPLv2+.
6580         * lib/wcswidth.c: Update license notice.
6581         * lib/wcswidth-impl.h: Likewise.
6583 2023-05-04  Bruno Haible  <bruno@clisp.org>
6585         c32width: Relax license.
6586         * modules/c32width (License): Change to LGPLv2+.
6587         * lib/c32width.c: Update license notice.
6589 2023-05-04  Bruno Haible  <bruno@clisp.org>
6591         c32to*: Relax license.
6592         * modules/c32tolower (License): Change to LGPLv2+.
6593         * modules/c32toupper (License): Likewise.
6594         * lib/c32tolower.c: Update license notice.
6595         * lib/c32toupper.c: Likewise.
6596         * lib/c32to-impl.h: Likewise.
6598         unicase/tolower, unicase/toupper: Relax license.
6599         * lib/gen-uni-tables.c (output_simple_mapping): Bump copyright year. For
6600         unicase/tolower.h and unicase/toupper.h, use the LGPLv2+.
6601         * lib/unicase/tolower.h: Regenerated.
6602         * lib/unicase/toupper.h: Likewise.
6603         * lib/unicase/simple-mapping.h: Update license notice.
6604         * lib/unicase/tolower.c: Likewise.
6605         * lib/unicase/toupper.c: Likewise.
6606         * modules/unicase/tolower (License): Change to LGPLv2+.
6607         * modules/unicase/toupper (License): Likewise.
6609         unicase/base: Relax license.
6610         * modules/unicase/base (License): Change to LGPLv2+.
6611         * lib/unicase.in.h: Update license notice.
6613 2023-05-04  Bruno Haible  <bruno@clisp.org>
6615         c32is*: Relax license.
6616         * modules/c32isalnum (License): Change to LGPLv2+.
6617         * modules/c32isalpha (License): Likewise.
6618         * modules/c32isblank (License): Likewise.
6619         * modules/c32iscntrl (License): Likewise.
6620         * modules/c32isdigit (License): Likewise.
6621         * modules/c32isgraph (License): Likewise.
6622         * modules/c32islower (License): Likewise.
6623         * modules/c32isprint (License): Likewise.
6624         * modules/c32ispunct (License): Likewise.
6625         * modules/c32isspace (License): Likewise.
6626         * modules/c32isupper (License): Likewise.
6627         * modules/c32isxdigit (License): Likewise.
6628         * lib/c32isalnum.c: Update license notice.
6629         * lib/c32isalpha.c: Likewise.
6630         * lib/c32isblank.c: Likewise.
6631         * lib/c32iscntrl.c: Likewise.
6632         * lib/c32isdigit.c: Likewise.
6633         * lib/c32isgraph.c: Likewise.
6634         * lib/c32islower.c: Likewise.
6635         * lib/c32isprint.c: Likewise.
6636         * lib/c32ispunct.c: Likewise.
6637         * lib/c32isspace.c: Likewise.
6638         * lib/c32isupper.c: Likewise.
6639         * lib/c32isxdigit.c: Likewise.
6640         * lib/c32is-impl.h: Likewise.
6642         unictype/ctype-*: Relax license.
6643         * lib/gen-uni-tables.c (output_predicate): Bump copyright year. For
6644         unictype/ctype_*, use the LGPLv2+.
6645         * lib/unictype/ctype_*.h: Regenerated.
6646         * lib/unictype/ctype_*.c: Update license notice.
6647         * modules/unictype/ctype-alnum (License): Change to LGPLv2+.
6648         * modules/unictype/ctype-alpha (License): Likewise.
6649         * modules/unictype/ctype-blank (License): Likewise.
6650         * modules/unictype/ctype-cntrl (License): Likewise.
6651         * modules/unictype/ctype-digit (License): Likewise.
6652         * modules/unictype/ctype-graph (License): Likewise.
6653         * modules/unictype/ctype-lower (License): Likewise.
6654         * modules/unictype/ctype-print (License): Likewise.
6655         * modules/unictype/ctype-punct (License): Likewise.
6656         * modules/unictype/ctype-space (License): Likewise.
6657         * modules/unictype/ctype-upper (License): Likewise.
6658         * modules/unictype/ctype-xdigit (License): Likewise.
6660 2023-05-04  Bruno Haible  <bruno@clisp.org>
6662         c32width: Add tests.
6663         * tests/test-c32width.c: New file, based on tests/test-wcwidth.c.
6664         * modules/c32width-tests: New file.
6666         c32width: New module.
6667         * lib/uchar.in.h (c32width): New declaration.
6668         * lib/c32width.c: New file, based on lib/c32is-impl.h.
6669         * modules/c32width: New file.
6670         * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
6671         GNULIB_C32WIDTH.
6672         * modules/uchar (Makefile.am): Substitute GNULIB_C32WIDTH.
6674 2023-05-04  Bruno Haible  <bruno@clisp.org>
6676         doc: Mention macOS wcwidth bug.
6677         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Mention macOS bugs.
6678         * doc/posix-functions/wcwidth.texi: Update regarding macOS.
6680 2023-05-03  Bruno Haible  <bruno@clisp.org>
6682         vasnprintf, vasnwprintf: Make '0' flag handling more ISO C compliant.
6683         * lib/vasnprintf.c (VASNPRINTF): When doing the padding ourselves,
6684         ignore the '0' flag if a precision is specified and the conversion is
6685         one of d, i, o, u, x, X, b, B.
6686         * tests/test-vasnprintf-posix.c (test_function): Update expected results
6687         accordingly.
6688         * tests/test-vasprintf-posix.c (test_function): Likewise.
6689         * tests/test-snprintf-posix.h (test_function): Likewise.
6690         * tests/test-sprintf-posix.h (test_function): Likewise.
6691         * tests/test-vasnwprintf-posix.c (test_function): Likewise.
6693 2023-05-02  Paul Eggert  <eggert@cs.ucla.edu>
6695         mktime: include <intprops.h>
6696         * lib/mktime.c: Include <intprops.h> again,
6697         fixing a typo noted by Bruno Haible in:
6698         https://lists.gnu.org/r/bug-gnulib/2023-05/msg00014.html
6700 2023-05-02  Bruno Haible  <bruno@clisp.org>
6702         fopen: Silence a gcc warning.
6703         * lib/fopen.c (rpl_fopen): Mark open_direction as used.
6705 2023-05-01  Paul Eggert  <eggert@cs.ucla.edu>
6707         extern-inline: port to pcc
6708         * m4/extern-inline.m4 (gl_EXTERN_INLINE): Port to pcc
6709         1.2.0.DEVEL 20220331, which doesn’t support extern inline
6710         even though it claims to be GCC 4.3 and to support C11.
6712         regex: prefer C23 style overflow checking
6713         * lib/regex_internal.h: Include stdckdint.h.
6714         * lib/regexec.c (re_search_2_stub):
6715         * modules/regex (Depends-on): Add stdckdint.
6716         Prefer stdckdint.h to intprops.h macros.
6718         dynarray: prefer C23 style overflow checking
6719         * lib/malloc/dynarray_emplace_enlarge.c, lib/malloc/dynarray_resize.c:
6720         Include stdckdint.h, not intprops.h.
6721         * lib/malloc/dynarray_emplace_enlarge.c:
6722         (__libc_dynarray_emplace_enlarge):
6723         * lib/malloc/dynarray_resize.c (__libc_dynarray_resize):
6724         Prefer stdckdint.h to intprops.h macros.
6725         * modules/glibc-internal/dynarray (Depends-on):
6726         Depend on stdckdint, not intprops.
6728         mktime: prefer C23 style overflow checking
6729         Prefer stdckdint.h macros to intprops.h macros where either will do,
6730         as this is the C23 standard.  Also, it ports around a pcc bug.
6731         * config/srclist.txt: Comment out mktime.c.
6732         * lib/mktime.c: Include stdckdint.h, not intprops.h.
6733         (__mktime_internal): Prefer stdckdint.h to intprops.h macros.
6734         * modules/mktime (Depends-on): Add stdckdint.
6736         limits-h: port to pcc
6737         * doc/posix-headers/limits.texi: Document the issue.
6738         * lib/limits.in.h (MB_LEN_MAX): New macro, if not already defined.
6739         * m4/limits-h.m4 (gl_LIMITS_H): Test for MB_LEN_MAX.
6740         * tests/test-limits-h.c: Check that it’s positive.
6742 2023-04-28  Paul Eggert  <eggert@cs.ucla.edu>
6744         year2038-recommended: new module
6745         Remove year2038-required and largefile-required, replacing
6746         the former with year2038-recommended and simply removing
6747         the latter.  This syncs with Autoconf master.
6748         * MODULES.html.sh, NEWS, doc/largefile.texi:
6749         * all-modules (exclude): Exclude year2038-recommended, not -required.
6750         * doc/posix-headers/sys_types.texi, doc/posix-headers/time.texi:
6751         * doc/year2038.texi: Mention this.
6752         * m4/largefile.m4: Sync from Autoconf.  Override existing macros
6753         if AC_SYS_YEAR2038_RECOMMENDED is not defined, rather than if
6754         AC_SYS_LARGEFILE_REQUIRED is not defined.
6755         * modules/largefile-required, modules/year2038-required: Removed.
6756         * modules/year2038: Do not depend on largefile; simply
6757         use m4/largefile.m4, since we shouldn’t need the extra goodies
6758         largefile supplies.
6759         * modules/year2038-recommended: New module.
6761 2023-04-28  Bruno Haible  <bruno@clisp.org>
6763         stdio: Avoid different configure results in different testdirs.
6764         * m4/stdio_h.m4 (gl_STDIO_H_EARLY): New macro, extracted from
6765         gl_STDIO_H.
6766         (gl_STDIO_H): Move the code that sets __USE_MINGW_ANSI_STDIO to
6767         gl_STDIO_H_EARLY.
6768         * modules/stdio (configure.ac-early): New section.
6770 2023-04-28  Bruno Haible  <bruno@clisp.org>
6772         stdbool tests: Avoid compilation error with Sun C on Solaris 10.
6773         * tests/test-stdbool.c (WORKING_BOOL): Set to 0 on Sun C.
6775 2023-04-28  Bruno Haible  <bruno@clisp.org>
6777         hamt tests: Fix test failure with Sun C on Solaris 10/SPARC.
6778         * tests/test-hamt.c (main): Finish with exit code 0.
6780 2023-04-27  Bruno Haible  <bruno@clisp.org>
6782         localeconv: Work around a mingw bug.
6783         * m4/localeconv.m4 (gl_FUNC_LOCALECONV): Test whether fields of type
6784         'char' are filled correctly.
6785         (gl_PREREQ_LOCALECONV): Test whether 'struct lconv' has the int_{p,n}_*
6786         members.
6787         * lib/localeconv.c (FIX_CHAR_VALUE): New macro.
6788         (localeconv): Replace negative field values with CHAR_MAX.
6789         * doc/posix-functions/localeconv.texi: Mention the mingw bug.
6791 2023-04-27  Bruno Haible  <bruno@clisp.org>
6793         stdlib: Fix error when cross-compiling (regression 2023-04-04).
6794         Reported by Pierre Labastie <pierre.labastie@neuf.fr> in
6795         <https://lists.gnu.org/archive/html/bug-gnulib/2023-04/msg00220.html>.
6796         * m4/stdlib_h.m4 (gl_STDLIB_H): Provide a 4th argument to AC_RUN_IFELSE.
6798 2023-04-26  Paul Eggert  <eggert@cs.ucla.edu>
6800         freopen-safer: pacify GCC 13
6801         * lib/freopen-safer.c: Ignore -Wanalyzer-fd-leak.
6803 2023-04-26  Bruno Haible  <bruno@clisp.org>
6805         fdopendir: Fix fd leak and test failure on native Windows.
6806         --
6807         * lib/dirent-private.h: On mingw, define 'struct gl_directory' as a
6808         wrapper around the original DIR. On MSVC, add an 'fd_to_close' field to
6809         'struct gl_directory'.
6810         * lib/dirent.in.h (DIR): Define when DIR_HAS_FD_MEMBER is 0, i.e. on
6811         both mingw and MSVC.
6812         (GNULIB_defined_DIR): New macro.
6813         (opendir): Avoid incompatible redeclaration.
6814         (readdir): Consider REPLACE_READDIR.
6815         (rewinddir): Consider REPLACE_REWINDDIR.
6816         * m4/dirent_h.m4 (gl_DIRENT_DIR): New macro.
6817         (gl_DIRENT_H): Invoke it.
6818         (gl_DIRENT_H_DEFAULTS): Initialize REPLACE_READDIR, REPLACE_REWINDDIR.
6819         * modules/dirent (Makefile.am): Substitute DIR_HAS_FD_MEMBER,
6820         REPLACE_READDIR, REPLACE_REWINDDIR.
6821         --
6822         * lib/dirfd.c (dirfd): If GNULIB_defined_DIR, just use the
6823         'fd_to_close' field.
6824         * m4/dirfd.m4 (gl_FUNC_DIRFD): Set HAVE_DIRFD. Don't set REPLACE_DIRFD
6825         to 1 if HAVE_DIRFD is 0. If DIR_HAS_FD_MEMBER is 0, ensure dirfd.c gets
6826         compiled.
6827         * modules/dirfd (Files): Add lib/dirent-private.h.
6828         (Depends-on, configure.ac): Simplify conditions.
6829         --
6830         * lib/closedir.c: Include <stdlib.h> always, for free().
6831         (closedir): If GNULIB_defined_DIR, arrange to call close(dirfd(dirp)) at
6832         the end. On mingw, call free() of dirp. Prefer testing HAVE_DIRENT_H,
6833         for consistency with dirent.h.
6834         * m4/closedir.m4 (gl_FUNC_CLOSEDIR): Don't set REPLACE_CLOSEDIR to 1 if
6835         HAVE_CLOSEDIR is 0. If DIR_HAS_FD_MEMBER is 0, ensure closedir.c gets
6836         compiled.
6837         --
6838         * lib/opendir.c: Include <stdlib.h> always. Include <string.h>.
6839         (opendir): On mingw, allocate the 'struct gl_directory' through malloc.
6840         If GNULIB_defined_DIR, set the 'fd_to_close' field to -1. Prefer
6841         testing HAVE_DIRENT_H, for consistency with dirent.h.
6842         * m4/opendir.m4 (gl_FUNC_OPENDIR): Don't set REPLACE_OPENDIR to 1 if
6843         HAVE_OPENDIR is 0. If DIR_HAS_FD_MEMBER is 0, ensure opendir.c gets
6844         compiled.
6845         --
6846         * lib/fdopendir.c (fdopendir): If GNULIB_defined_DIR, use a simple
6847         implementation based on opendir and the fchdir module. If __KLIBC__,
6848         don't define unused auxiliary functions.
6849         * modules/fdopendir (Files): Add lib/dirent-private.h.
6850         --
6851         * lib/readdir.c (readdir): On mingw, redirect to the original readdir
6852         function. Prefer testing HAVE_DIRENT_H, for consistency with dirent.h.
6853         * m4/readdir.m4 (gl_FUNC_READDIR): If DIR_HAS_FD_MEMBER is 0, ensure
6854         readdir.c gets compiled.
6855         * modules/readdir (configure.ac): Consider REPLACE_READDIR.
6856         --
6857         * lib/rewinddir.c (rewinddir): On mingw, redirect to the original
6858         rewinddir function. Prefer testing HAVE_DIRENT_H, for consistency with
6859         dirent.h.
6860         * m4/rewinddir.m4 (gl_FUNC_REWINDDIR): If DIR_HAS_FD_MEMBER is 0, ensure
6861         rewinddir.c gets compiled.
6862         * modules/rewinddir (configure.ac): Consider REPLACE_REWINDDIR.
6863         --
6864         * lib/fchdir.c (dir_info_t): Remove a FIXME.
6866 2023-04-26  Bruno Haible  <bruno@clisp.org>
6868         fchdir tests: Fix test failure on native Windows.
6869         * modules/fchdir-tests (Depends-on): Add dup.
6871 2023-04-26  Bruno Haible  <bruno@clisp.org>
6873         fclose: Make last change more maintainable.
6874         * m4/fclose.m4 (gl_FUNC_FCLOSE): Define through AC_DEFUN_ONCE. Don't
6875         modify REPLACE_FOPEN.
6876         * modules/fclose (Depends-on): Add comment.
6877         (configure.ac): Don't modify REPLACE_FOPEN. Don't duplicate actions of
6878         module 'fopen'.
6879         * m4/fopen.m4 (gl_FUNC_FOPEN_ITSELF): Renamed from gl_FUNC_FOPEN.
6880         (gl_FUNC_FOPEN): New macro.
6881         * modules/fopen (Files): Add m4/fclose.m4, m4/fflush.m4.
6882         * m4/close.m4 (gl_FUNC_CLOSE): Define through AC_DEFUN_ONCE.
6884 2023-04-26  Po Lu  <luangruo@yahoo.com>  (tiny change)
6885             Bruno Haible  <bruno@clisp.org>
6887         gnulib-tool: For conditional dependencies, generate portable sh code.
6888         * gnulib-tool (func_emit_autoconf_snippets): Avoid sh syntax
6889         'if ! variable', that does not work with Solaris /bin/sh.
6890         * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Likewise.
6892 2023-04-25  Bruno Haible  <bruno@clisp.org>
6894         expm1 tests: Avoid test failure on 32-bit mingw.
6895         * tests/test-expm1.h (test_function): Mark y as 'volatile'.
6897 2023-04-25  Bruno Haible  <bruno@clisp.org>
6899         poll tests: Avoid test failure on native Windows.
6900         * tests/test-poll.c (test_pipe): Disable the POLLHUP check also on
6901         native Windows.
6902         * doc/posix-functions/poll.texi: Mention also native Windows w.r.t.
6903         POLLHUP.
6905 2023-04-25  Bruno Haible  <bruno@clisp.org>
6907         dfa tests: Fix compilation error (regression 2023-04-22).
6908         * tests/test-dfa-match-aux.c: Include unistd.h.
6909         * modules/dfa-tests (Depends-on): Add unistd.
6911 2023-04-24  Bruno Haible  <bruno@clisp.org>
6913         tests: Suppress ‘#pragma GCC diagnostic’ warnings with GCC < 13.
6914         * tests/test-localename.c: Disable #pragma for GCC < 12.
6915         * tests/test-dup2.c: Disable #pragma for GCC < 13.
6916         * tests/test-fcntl.c: Likewise.
6917         * tests/test-getdtablesize.c: Likewise.
6918         * tests/test-listen.c: Likewise.
6919         * tests/test-open.h: Likewise.
6920         * tests/test-perror2.c: Likewise.
6921         * tests/test-select.h: Likewise.
6923 2023-04-24  Bruno Haible  <bruno@clisp.org>
6925         select, pselect: Fix test failure on native Windows.
6926         * lib/select.c (rpl_select): Fail if nfds is out-of-range.
6927         * lib/pselect.c (pselect): Likewise.
6929 2023-04-24  Paul Eggert  <eggert@cs.ucla.edu>
6931         fclose: pacify gcc -Wanalyzer-file-leak
6932         Without this patch, building coreutils with
6933         --enable-gcc-checking=expensive would fail with a message like
6934         “lib/exclude.c:682:6: error: leak of FILE 'in' [CWE-775]
6935         [-Werror=analyzer-file-leak]”, because Gnulib replaced fclose but
6936         not fopen, and GCC saw a call to fopen followed by a call to
6937         rpl_fclose.  The patch causes GCC to instead see a call to
6938         rpl_fopen followed by rpl_fclose.
6939         * m4/fclose.m4 (gl_FUNC_FCLOSE): Replace fopen when replacing
6940         fclose.
6941         * modules/fclose (Depends-on): Add fopen.
6942         (configure.ac): Replace fopen when replacing fclose.
6944         unsetenv-tests: pacify -Wanalyzer-putenv-of-auto-var
6945         * tests/test-unsetenv.c (main): Make entry static.  Even with this
6946         change, it’s unclear whether this test is portable POSIX code, but
6947         that’s a different matter.
6949         tests: suppress some unwanted -fanalyzer checking
6950         * tests/test-dup2.c, tests/test-fcntl.c, tests/test-fopen.h:
6951         * tests/test-getdtablesize.c, tests/test-listen.c:
6952         * tests/test-localename.c, tests/test-open.h, tests/test-perror2.c:
6953         * tests/test-select.h:
6954         Add pragmas to disable unwanted -fanalyzer checking.
6956 2023-04-24  Bruno Haible  <bruno@clisp.org>
6958         ftell, ftello: Fix recognition of pipes on native Windows.
6959         * m4/lseek.m4 (gl_FUNC_LSEEK): Update comment.
6960         * m4/ftello.m4 (gl_FUNC_FTELLO): On native Windows, set REPLACE_FTELLO=1
6961         always.
6962         * doc/posix-functions/ftello.texi: Mention the behaviour on pipes.
6963         * doc/posix-functions/ftell.texi: Likewise.
6964         * doc/posix-functions/fgetpos.texi: Likewise.
6966 2023-04-24  Bruno Haible  <bruno@clisp.org>
6968         lseek: Fix module dependencies (regression 2021-11-15).
6969         * modules/lseek (Depends-on): Re-enable the msvc-nothrow dependency
6970         also when WINDOWS_64_BIT_OFF_T is 0.
6972 2023-04-24  Bruno Haible  <bruno@clisp.org>
6974         system-quote: Fix memory overrun bug on native Windows.
6975         * lib/system-quote.c (system_quote): Allocate enough space for the
6976         result.
6978 2023-04-24  Bruno Haible  <bruno@clisp.org>
6980         unicodeio tests: Avoid test failures on native Windows.
6981         * tests/test-unicodeio.c: Include localcharset.h.
6982         (main): Handle C locales whose encoding is CP1252 or similar.
6983         * modules/unicodeio-tests (Depends-on): Add localcharset.
6985 2023-04-24  Bruno Haible  <bruno@clisp.org>
6987         *sprintf tests: Avoid test failures on mingw 10.
6988         * tests/test-vasnprintf-posix.c (test_function): On newer mingw, expect
6989         the de-facto standard result.
6990         * tests/test-vasprintf-posix.c (test_function): Likewise.
6991         * tests/test-snprintf-posix.h (test_function): Likewise.
6992         * tests/test-sprintf-posix.h (test_function): Likewise.
6994 2023-04-23  Bruno Haible  <bruno@clisp.org>
6996         Improve quoting of AS_HELP_STRING's first argument.
6997         * m4/acl.m4 (gl_FUNC_ACL_ARG): Don't underquote AS_HELP_STRING's first
6998         argument.
6999         * m4/assert.m4 (gl_ASSERT): Likewise.
7000         * m4/gc.m4 (gl_GC): Likewise.
7001         * m4/gnulib-common.m4 (gl_COMMON_BODY): Likewise.
7002         * m4/ld-version-script.m4 (gl_LD_VERSION_SCRIPT): Likewise.
7003         * m4/lib-ld.m4 (AC_LIB_PROG_LD): Likewise.
7004         * m4/libgmp.m4 (gl_LIBGMP): Likewise.
7005         * m4/regex.m4 (gl_REGEX): Likewise.
7006         * m4/relocatable-lib.m4 (gl_RELOCATABLE_NOP): Likewise.
7007         * m4/selinux-selinux-h.m4 (gl_LIBSELINUX): Likewise.
7008         * m4/sigsegv.m4 (gl_SIGSEGV): Likewise.
7009         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Likewise.
7010         * m4/valgrind-tests.m4 (gl_VALGRIND_TESTS): Likewise.
7011         * m4/version-etc.m4 (gl_VERSION_ETC_FLAG): Likewise.
7012         * m4/xattr.m4 (gl_FUNC_XATTR): Likewise.
7013         * doc/manywarnings.texi (manywarnings): Likewise. This avoids the use of
7014         quadrigraphs.
7016 2023-04-23  Bruno Haible  <bruno@clisp.org>
7018         category-none: Fix link errors on MSVC, when libunistring is installed.
7019         * modules/unictype/category-none (configure.ac): Remove
7020         gl_LIBUNISTRING_MODULE invocation.
7021         (Makefile.am): Compile unictype/categ_none.c always.
7023 2023-04-23  Paul Eggert  <eggert@cs.ucla.edu>
7025         manywarnings: use AS_IF
7026         * m4/manywarnings.m4 (gl_MANYWARN_COMPLEMENT):
7027         Use AS_IF when the body contains Autoconf macros that could
7028         conceivably require something.
7030         manywarnings: update C warnings for GCC 13
7031         Adjust for C programs compiled by GCC 13.
7032         (A C++ expert still needs to look at manywarnings-c++.m4.)
7033         * build-aux/gcc-warning.spec: Add warnings introduced in GCC 13.
7034         * doc/manywarnings.texi (manywarnings): Document flex arrays.
7035         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add
7036         -fstrict-flex-arrays and -Wstrict-flex-arrays as these should be
7037         suitable for Gnulib-using code.
7039         manywarnings: bring doc up to date
7040         * doc/manywarnings.texi: Bring doc up to date for GCC 12.
7042         manywarnings: omit -fno-common in GCC 10+
7043         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Omit -fno-common
7044         in GCC 10 and later, as it is the default there.
7045         Check exit status of ‘gcc --version’.
7047 2023-04-23  Bruno Haible  <bruno@clisp.org>
7049         libunistring: Fix build on Windows, when a libunistring is installed.
7050         * lib/unicase.in.h: Include <unistring/woe32dll.h>.
7051         (unicase_empty_prefix_context, unicase_empty_suffix_context): Declare
7052         with GNULIB_UNICASE_..._DLL_VARIABLE.
7053         * lib/unictype.in.h: Include <unistring/woe32dll.h>.
7054         (UC_CATEGORY_*, UC_PROPERTY_*): Declare with
7055         GNULIB_UNICTYPE_..._DLL_VARIABLE.
7056         * lib/uninorm.in.h: Include <unistring/woe32dll.h>.
7057         (unicode_normalization_form uninorm_nf*): Declare with
7058         GNULIB_UNINORM_..._DLL_VARIABLE.
7059         * m4/libunistring-base.m4 (gl_LIBUNISTRING_MODULE_WITH_VARIABLE): New
7060         macro.
7061         (gl_LIBUNISTRING_LIB_PREPARE): Set HAVE_UNISTRING_WOE32DLL_H.
7062         * m4/unicase_h.m4: New file.
7063         * m4/unictype_h.m4: New file.
7064         * m4/uninorm_h.m4: New file.
7065         * modules/unicase/base (Files): Add m4/unicase_h.m4.
7066         (configure.ac): Bump version number. Invoke gl_UNICASE_H,
7067         gl_UNICASE_H_REQUIRE_DEFAULTS.
7068         (Makefile.am): Substitute all GNULIB_UNICASE_*_DLL_VARIABLE.
7069         * modules/unicase/empty-*-context (configure.ac): Invoke
7070         gl_UNICASE_H_REQUIRE_DEFAULTS. Use gl_LIBUNISTRING_MODULE_WITH_VARIABLE.
7071         * modules/unictype/base (Files): Add m4/unictype_h.m4.
7072         (configure.ac): Bump version number. Invoke gl_UNICTYPE_H,
7073         gl_UNICTYPE_H_REQUIRE_DEFAULTS.
7074         (Makefile.am): Substitute all GNULIB_UNICTYPE_*_DLL_VARIABLE.
7075         * modules/unictype/category-* (configure.ac): Invoke
7076         gl_UNICTYPE_H_REQUIRE_DEFAULTS. Use
7077         gl_LIBUNISTRING_MODULE_WITH_VARIABLE.
7078         * modules/unictype/property-* (configure.ac): Likewise.
7079         * modules/uninorm/base (Files): Add m4/uninorm_h.m4.
7080         (configure.ac): Bump version number. Invoke gl_UNINORM_H,
7081         gl_UNINORM_H_REQUIRE_DEFAULTS.
7082         (Makefile.am): Substitute all GNULIB_UNINORM_*_DLL_VARIABLE.
7083         * modules/uninorm/nf* (configure.ac): Invoke
7084         gl_UNINORM_H_REQUIRE_DEFAULTS. Use gl_LIBUNISTRING_MODULE_WITH_VARIABLE.
7086 2023-04-22  Bruno Haible  <bruno@clisp.org>
7088         Avoid some Autoconf "was expanded before it was required" warnings.
7089         * m4/locale-ar.m4 (gt_LOCALE_AR): Define through AC_DEFUN_ONCE.
7090         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Likewise.
7091         * m4/locale-ja.m4 (gt_LOCALE_JA): Likewise.
7092         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.
7093         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
7095 2023-04-22  Bruno Haible  <bruno@clisp.org>
7097         string-desc tests: Avoid test failure on native Windows.
7098         * tests/test-string-desc.c: Include <fcntl.h>, <unistd.h>.
7099         (main): Expect a file name argument. Write to this file, instead of to
7100         fd 3.
7101         * tests/test-string-desc.sh: Pass a file name as argument, instead of
7102         using '3>'.
7103         * modules/string-desc-tests (Depends-on): Add close.
7105 2023-04-22  Bruno Haible  <bruno@clisp.org>
7107         threadlib, pthread-h, threads-h: Avoid mingw's libwinpthread by default.
7108         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Set
7109         gl_use_winpthreads_default to 'no' by default.
7110         (gl_AVOID_WINPTHREAD): Update comments.
7112 2023-04-22  Bruno Haible  <bruno@clisp.org>
7114         posixtm tests: Avoid test failure on native Windows.
7115         * tests/test-posixtm.c (T): On native Windows, disable test cases that
7116         would fail.
7118 2023-04-22  Bruno Haible  <bruno@clisp.org>
7120         dfa tests: Fix test failure on mingw differently.
7121         Suggested by Paul Eggert.
7122         * tests/test-dfa-invalid-char-class.sh: Revert last change.
7123         * tests/test-dfa-match-aux.c: Include binary-io.h.
7124         (main): Put stdout into binary mode.
7125         * modules/dfa-tests (Depends-on): Add binary-io.
7127 2023-04-20  Bruno Haible  <bruno@clisp.org>
7129         getumask: Make it work on native Windows.
7130         * lib/getumask.c (getumask): When TMPDIR is unset, try TMP and TEMP.
7131         * tests/test-getumask.c (ASSUME_UMASK_CONSTANT): Define to 1 on native
7132         Windows.
7134 2023-04-20  Bruno Haible  <bruno@clisp.org>
7136         posixtm tests: Fix link error.
7137         * modules/posixtm-tests (Depends-on): Add stpcpy.
7139 2023-04-20  Bruno Haible  <bruno@clisp.org>
7141         readtokens tests: Fix test failure on mingw.
7142         * tests/test-readtokens.sh: Transform CRLF to LF in the output, before
7143         comparing with the expected output.
7145         parse-duration tests: Fix test failure on mingw.
7146         * tests/test-parse-duration.sh: Transform CRLF to LF in the output,
7147         before analyzing the output.
7149         dfa tests: Fix test failure on mingw.
7150         * tests/test-dfa-invalid-char-class.sh: Transform CRLF to LF in the
7151         output, before comparing with the expected output.
7153 2023-04-20  Bruno Haible  <bruno@clisp.org>
7155         Fix uses of libwinpthread on mingw 10.
7156         * m4/threadlib.m4 (gl_WEAK_SYMBOLS): On mingw, set the result to
7157         "guessing no".
7159 2023-04-20  Bruno Haible  <bruno@clisp.org>
7161         Move remaining call_once tests from mtx-tests to call_once-tests.
7162         * tests/test-call_once1.c: Renamed from tests/test-call_once.c.
7163         * tests/test-call_once2.c: New file, based on tests/test-mtx.c.
7164         * tests/test-mtx.c: Remove the code that was testing call_once.
7165         * modules/call_once-tests (Files): Add test-call_once1.c,
7166         test-call_once2.c. Remove test-call_once.c.
7167         (Depends-on): Add thrd, lock, stdint.
7168         (configure.ac): Check for alarm.
7169         (Makefile.am): Test test-call_once1 instead of test-call_once. Also test
7170         test-call_once2.
7172 2023-04-20  Bruno Haible  <bruno@clisp.org>
7174         execute tests: Fix compilation error on mingw (regression 2023-01-17).
7175         * tests/test-execute-main.c (main): Don't use SIGPIPE if it's not
7176         defined.
7178 2023-04-20  Bruno Haible  <bruno@clisp.org>
7180         assert-h, verify: Fix compilation error in C++ mode with MSVC 14.30.
7181         * lib/verify.h (_Static_assert): In C++ mode with MSVC 14.1 or newer,
7182         define merely to static_assert.
7183         (static_assert): In C++ mode with MSVC 14.1 or newer, don't define.
7185 2023-04-19  Bruno Haible  <bruno@clisp.org>
7187         chown, lchown tests: Fix link error on mingw 10.
7188         * modules/chown-tests (configure.ac): Test whether getgid() exists.
7189         * modules/lchown-tests (configure.ac): Likewise.
7190         * modules/fchownat-tests (configure.ac): Likewise.
7191         * tests/test-chown.h (getgid): Define a fallback.
7192         * tests/test-lchown.h (getgid): Likewise.
7194 2023-04-19  Bruno Haible  <bruno@clisp.org>
7196         ctime: Fix compilation errors in C++ mode on mingw 10.
7197         * lib/c++defs.h (_GL_FUNCDECL_RPL): Add a comment.
7198         * lib/time.in.h (ctime): Don't use _GL_ATTRIBUTE_DEPRECATED before
7199         _GL_FUNCDECL_RPL in C++ mode.
7201 2023-04-19  Bruno Haible  <bruno@clisp.org>
7203         random: Fix compilation errors in C++ mode on mingw 10.
7204         * lib/stdlib.in.h (random, srandom): Disable _GL_CXXALIASWARN invocation
7205         on non-glibc systems.
7207 2023-04-19  Bruno Haible  <bruno@clisp.org>
7209         year2038-required: Fix configure failure with MSVC.
7210         * m4/largefile.m4 (_AC_SYS_LARGEFILE_PROBE): Distinguish the results
7211         "support not detected" and "supported through gnulib". If the result is
7212         "supported through gnulib", don't fail.
7214 2023-04-19  Bruno Haible  <bruno@clisp.org>
7216         doc: Add references to changes accepted for future POSIX revisions.
7217         * doc/glibc-functions/bind_textdomain_codeset.texi: Add reference to
7218         www.austingroupbugs.net issue.
7219         * doc/glibc-functions/bindtextdomain.texi: Likewise.
7220         * doc/glibc-functions/dcgettext.texi: Likewise.
7221         * doc/glibc-functions/dcngettext.texi: Likewise.
7222         * doc/glibc-functions/dgettext.texi: Likewise.
7223         * doc/glibc-functions/dngettext.texi: Likewise.
7224         * doc/glibc-functions/getentropy.texi: Likewise.
7225         * doc/glibc-functions/getresgid.texi: Likewise.
7226         * doc/glibc-functions/getresuid.texi: Likewise.
7227         * doc/glibc-functions/gettext.texi: Likewise.
7228         * doc/glibc-functions/ngettext.texi: Likewise.
7229         * doc/glibc-functions/posix_spawn_file_actions_addchdir_np.texi:
7230         Likewise.
7231         * doc/glibc-functions/posix_spawn_file_actions_addfchdir_np.texi:
7232         Likewise.
7233         * doc/glibc-functions/setresgid.texi: Likewise.
7234         * doc/glibc-functions/setresuid.texi: Likewise.
7235         * doc/glibc-functions/textdomain.texi: Likewise.
7236         * doc/posix-functions/asctime_r.texi: Likewise.
7237         * doc/posix-functions/ctime_r.texi: Likewise.
7239 2023-04-19  Bruno Haible  <bruno@clisp.org>
7241         wcsncmp: Add tests.
7242         * tests/test-wcsncmp.c: New file, based on tests/unistr/test-strncmp.h
7243         and tests/test-wcscmp.c.
7244         * modules/wcsncmp-tests: New file.
7246         wcsncmp: Work around two ISO C compliance bugs on several platforms.
7247         * lib/wchar.in.h (wcsncmp): Consider REPLACE_WCSNCMP.
7248         * lib/wcsncmp-impl.h (wcsncmp): Don't assume that the two wide
7249         characters are in the range 0..INT_MAX.
7250         * m4/wcsncmp.m4 (gl_FUNC_WCSNCMP): Test whether wcsncmp works for all
7251         wide characters. Set REPLACE_WCSNCMP.
7252         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCSNCMP.
7253         * modules/wchar (Makefile.am): Substitute REPLACE_WCSNCMP.
7254         * modules/wcsncmp (Status, Notice): Un-obsolete this module.
7255         (configure.ac): Consider REPLACE_WCSNCMP.
7256         * doc/posix-functions/wcsncmp.texi: Mention the two bugs.
7258 2023-04-18  Bruno Haible  <bruno@clisp.org>
7260         wcscmp: Add tests.
7261         * tests/test-wcscmp.c: New file, based on tests/unistr/test-strcmp.h.
7262         * modules/wcscmp-tests: New file.
7264         wcscmp: Work around two ISO C compliance bugs on several platforms.
7265         * lib/wchar.in.h (wcscmp): Consider REPLACE_WCSCMP.
7266         * lib/wcscmp-impl.h (wcscmp): Don't assume that the two wide characters
7267         are in the range 0..INT_MAX.
7268         * m4/wcscmp.m4 (gl_FUNC_WCSCMP): Test whether wcscmp works for all wide
7269         characters. Set REPLACE_WCSCMP.
7270         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCSCMP.
7271         * modules/wchar (Makefile.am): Substitute REPLACE_WCSCMP.
7272         * modules/wcscmp (Status, Notice): Un-obsolete this module.
7273         (configure.ac): Consider REPLACE_WCSCMP.
7274         * doc/posix-functions/wcscmp.texi: Mention the two bugs.
7276 2023-04-18  Bruno Haible  <bruno@clisp.org>
7278         wmemcmp: Add tests.
7279         * tests/test-wmemcmp.c: New file, based on tests/unistr/test-cmp.h.
7280         * modules/wmemcmp-tests: New file.
7282         wmemcmp: Work around ISO C compliance bug on several platforms.
7283         * lib/wchar.in.h (wmemcmp): Consider REPLACE_WMEMCMP.
7284         * lib/wmemcmp-impl.h (wmemcmp): Don't assume that the two wide
7285         characters are in the range 0..INT_MAX.
7286         * m4/wmemcmp.m4 (gl_FUNC_WMEMCMP): Test whether wmemcmp works for all
7287         wide characters. Set REPLACE_WMEMCMP.
7288         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WMEMCMP.
7289         * modules/wchar (Makefile.am): Substitute REPLACE_WMEMCMP.
7290         * modules/wmemcmp (configure.ac): Consider REPLACE_WMEMCMP.
7291         * doc/posix-functions/wmemcmp.texi: Mention the bug.
7293 2023-04-18  Bruno Haible  <bruno@clisp.org>
7295         doc: Update platform list for posix_spawnp.
7296         * doc/posix-functions/posix_spawnp.texi: Update platform list.
7298 2023-04-18  Paul Eggert  <eggert@cs.ucla.edu>
7300         Go back to dynamic largefile, year2038 tests
7301         Problem reported by Bruno Haible in:
7302         https://lists.gnu.org/r/bug-gnulib/2023-04/msg00134.html
7303         * modules/largefile-tests, modules/year2038-tests (Depends-on):
7304         Remove assert-h.
7305         * tests/test-largefile.c, tests/test-year2038.c:
7306         Test dynamically, not via static_assert.
7308         doc: mention when O_* defaults to 0
7309         * doc/posix-headers/fcntl.texi: Document in more detail which O_*
7310         macros default to 0 in Gnulib.
7312 2023-04-18  Bruno Haible  <bruno@clisp.org>
7314         doc: Mention a Cygwin 3.4.6 bug.
7315         * doc/posix-functions/readlinkat.texi: Mention a readlinkat bug on
7316         Cygwin < 3.4.7.
7318 2023-04-18  Bruno Haible  <bruno@clisp.org>
7320         ilogbl: Work around a Cygwin 3.4.6 bug.
7321         * m4/ilogbl.m4 (gl_FUNC_ILOGBL_WORKS): Also test the value of
7322         ilogbl(NaN).
7323         * doc/posix-functions/ilogbl.texi: Mention the new Cygwin bug.
7325 2023-04-18  Bruno Haible  <bruno@clisp.org>
7327         file-has-acl tests: Avoid test failures on Cygwin 3.4.6.
7328         * tests/test-file-has-acl.sh: Fix distinction between Linux setfacl and
7329         Cygwin setfacl.
7331 2023-04-18  Bruno Haible  <bruno@clisp.org>
7333         c32isgraph tests: Avoid test failure on Cygwin 3.4.6.
7334         * tests/test-c32isgraph.c (main): Skip U+00A0 test on Cygwin.
7336 2023-04-17  Paul Eggert  <eggert@cs.ucla.edu>
7338         Slightly nicer largefile, year2038 tests
7339         * modules/largefile-tests, modules/year2038-tests (Depends-on):
7340         Add assert-h, intprops.
7341         * tests/test-largefile.c, tests/test-year2038.c:
7342         Prefer compile-time to run-time tests.
7343         Don’t assume CHAR_BIT == 8.
7345 2023-04-17  Bruno Haible  <bruno@clisp.org>
7347         MODULES.html.sh: Ensure hyperlinked files are displayable.
7348         * MODULES.html.sh (repo_url_prefix): Use cgit instead of gitweb.
7350         MODULES.html.sh: Avoid a HTTP redirect.
7351         * MODULES.html.sh (repo_url_prefix): Use the unabbreviated name of the
7352         git repository server.
7354 2023-04-16  Bruno Haible  <bruno@clisp.org>
7356         year2038: Add tests.
7357         * tests/test-year2038.c: New file.
7358         * modules/year2038-tests: New file.
7360 2023-04-16  Bruno Haible  <bruno@clisp.org>
7362         largefile: Add tests.
7363         * tests/test-largefile.c: New file.
7364         * modules/largefile-tests: New file.
7366 2023-04-16  Bruno Haible  <bruno@clisp.org>
7368         year2038: Revert the added module dependencies.
7369         Suggested by Paul Eggert in
7370         <https://lists.gnu.org/archive/html/bug-gnulib/2023-04/msg00117.html>.
7371         * modules/year2038 (Depends-on): Remove sched, sys_msg, sys_select,
7372         sys_sem, sys_shm, sys_stat, sys_time, sys_types, time-h, utime-h.
7374 2023-04-16  Bruno Haible  <bruno@clisp.org>
7376         posix_spawn_file_actions_addclose tests: Avoid test failure on Cygwin.
7377         * tests/test-posix_spawn_file_actions_addclose.c (main): Skip an
7378         unportable test also on Cygwin.
7380 2023-04-15  Bruno Haible  <bruno@clisp.org>
7382         Fix compilation errors of list, set, oset, map, omap in C++ mode.
7383         * m4/gnulib-common.m4 (gl_COMMON_BODY): Define
7384         _GL_BRACKET_BEFORE_ATTRIBUTE. In _GL_ATTRIBUTE_DEPRECATED,
7385         _GL_ATTRIBUTE_MAYBE_UNUSED, _GL_ATTRIBUTE_NODISCARD, don't use the
7386         bracket syntax if _GL_BRACKET_BEFORE_ATTRIBUTE is defined.
7388 2023-04-15  Bruno Haible  <bruno@clisp.org>
7390         Don't include module 'year2038-required' in all-of-gnulib testdirs.
7391         * all-modules (exclude): Add year2038-required.
7393 2023-04-15  Bruno Haible  <bruno@clisp.org>
7395         selinux-h: Fix compilation error (regression 2023-04-13).
7396         * m4/selinux-selinux-h.m4 (gl_HEADERS_SELINUX_SELINUX_H): Instead of
7397         defining the C macro HAVE_SELINUX_SELINUX_H to 0, set the Autoconf
7398         variable HAVE_SELINUX_SELINUX_H to 0.
7400 2023-04-14  Bruno Haible  <bruno@clisp.org>
7402         year2038: Fix configure failure on 32-bit mingw.
7403         * m4/largefile.m4 (_AC_SYS_YEAR2038_PROBE): Use the same option
7404         spelling as in _AC_SYS_YEAR2038_OPTIONS.
7406 2023-04-14  Bruno Haible  <bruno@clisp.org>
7408         isnan: Fix compilation error in C++ mode on FreeBSD 13.2.
7409         * lib/math.in.h (isnan): On FreeBSD 13.2 or newer, don't declare isnan
7410         through _GL_MATH_CXX_REAL_FLOATING_DECL_2.
7412 2023-04-14  Bruno Haible  <bruno@clisp.org>
7414         filemode: Fix double-inclusion guard.
7415         * lib/filemode.h: Make the double-inclusion guard actually work.
7417 2023-04-14  Bruno Haible  <bruno@clisp.org>
7419         year2038: Add reminder to include <config.h> before time_t gets defined.
7420         * lib/sched.in.h: Check that config.h was already included before the
7421         #include_next.
7422         * lib/sys_select.in.h: Likewise.
7423         * lib/sys_stat.in.h: Likewise.
7424         * lib/sys_time.in.h: Likewise.
7425         * lib/sys_types.in.h: Likewise.
7426         * lib/time.in.h: Likewise.
7427         * lib/utime.in.h: Likewise.
7428         * modules/year2038 (Depends-on): Add sched, sys_msg, sys_select,
7429         sys_sem, sys_shm, sys_stat, sys_time, sys_types, time-h, utime-h.
7431         sys_shm: New module.
7432         * lib/sys_shm.in.h: New file.
7433         * m4/sys_shm_h.m4: New file.
7434         * modules/sys_shm: New file.
7435         * doc/posix-headers/sys_shm.texi: Mention the new module.
7437         sys_sem: New module.
7438         * lib/sys_sem.in.h: New file.
7439         * m4/sys_sem_h.m4: New file.
7440         * modules/sys_sem: New file.
7441         * doc/posix-headers/sys_sem.texi: Mention the new module.
7443         sys_msg: New module.
7444         * lib/sys_msg.in.h: New file.
7445         * m4/sys_msg_h.m4: New file.
7446         * modules/sys_msg: New file.
7447         * doc/posix-headers/sys_msg.texi: Mention the new module.
7449 2023-04-13  Bruno Haible  <bruno@clisp.org>
7451         Add more reminders to include <config.h>.
7452         * lib/aligned-malloc.h: Check that config.h was already included.
7453         * lib/careadlinkat.h: Likewise.
7454         * lib/filemode.h: Likewise.
7455         * lib/freadptr.h: Likewise.
7456         * lib/fseterr.h: Likewise.
7457         * lib/glthread/lock.h: Likewise.
7458         * lib/glthread/tls.h: Likewise.
7459         * lib/immutable.h: Likewise.
7460         * lib/isapipe.h: Likewise.
7461         * lib/isnand-nolibm.h: Likewise.
7462         * lib/isnanf-nolibm.h: Likewise.
7463         * lib/isnanl-nolibm.h: Likewise.
7464         * lib/mbswidth.h: Likewise.
7465         * lib/md5.h: Likewise.
7466         * lib/minmax.h: Likewise.
7467         * lib/msvc-inval.h: Likewise.
7468         * lib/msvc-nothrow.h: Likewise.
7469         * lib/pathmax.h: Likewise.
7470         * lib/sha1.h: Likewise.
7471         * lib/sha256.h: Likewise.
7472         * lib/sha512.h: Likewise.
7473         * lib/size_max.h: Likewise.
7474         * lib/sm3.h: Likewise.
7475         * lib/stat-size.h: Likewise.
7476         * lib/termcap.h: Likewise.
7477         * lib/terminfo.h: Likewise.
7478         * lib/thread-optim.h: Likewise.
7479         * lib/unlocked-io.h: Likewise.
7480         * lib/vma-iter.h: Likewise.
7482 2023-04-13  Bruno Haible  <bruno@clisp.org>
7484         Adjust comments in <config.h> reminders.
7485         * lib/*.h: In the comments, mention also HAVE_*.
7487 2023-04-13  Bruno Haible  <bruno@clisp.org>
7489         Adjust comments in <config.h> reminders.
7490         * lib/*.in.h: In the comments, mention also HAVE_RAW_DECL_*.
7491         * Makefile (sc_check_config_h_reminder): Search also for HAVE_RAW_DECL_.
7493 2023-04-13  Bruno Haible  <bruno@clisp.org>
7495         utmp: Avoid using HAVE_* macros in *.in.h files.
7496         * m4/pty_h.m4 (gl_PTY_CHECK_UTIL_H): New macro, extracted from gl_PTY_H.
7497         (gl_PTY_H): Invoke it.
7498         * m4/utmp_h.m4 (gl_UTMP_H): Invoke gl_PTY_CHECK_UTIL_H and set
7499         HAVE_TERMIOS_H.
7500         (gl_UTMP_H_DEFAULTS): Require gl_PTY_H_DEFAULTS, gl_TERMIOS_H_DEFAULTS.
7501         * modules/utmp (Files): Add m4/pty_h.m4, m4/termios_h.m4.
7502         (Makefile.am): Substitute also HAVE_UTIL_H, HAVE_LIBUTIL_H,
7503         HAVE_TERMIOS_H.
7504         * lib/utmp.in.h: Test HAVE_UTIL_H, HAVE_LIBUTIL_H, HAVE_TERMIOS_H as
7505         Autoconf variables.
7507 2023-04-13  Bruno Haible  <bruno@clisp.org>
7509         getprogname: Avoid using HAVE_* macros in *.in.h files.
7510         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
7511         HAVE_DECL_PROGRAM_INVOCATION_NAME.
7512         * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Require gl_STDLIB_H_DEFAULTS
7513         and gl_USE_SYSTEM_EXTENSIONS. Set HAVE_DECL_PROGRAM_INVOCATION_NAME.
7514         * modules/stdlib (Makefile.am): Substitute
7515         HAVE_DECL_PROGRAM_INVOCATION_NAME.
7516         * lib/stdlib.in.h (getprogname): Test HAVE_DECL_PROGRAM_INVOCATION_NAME
7517         as an Autoconf variable.
7519 2023-04-13  Bruno Haible  <bruno@clisp.org>
7521         selinux-h: Avoid using HAVE_* macros in *.in.h files.
7522         * m4/selinux-selinux-h.m4 (gl_HEADERS_SELINUX_SELINUX_H): Initialize
7523         HAVE_SELINUX_SELINUX_H.
7524         * modules/selinux-h (Makefile.am): Substitute HAVE_SELINUX_SELINUX_H.
7525         * lib/se-selinux.in.h: Test HAVE_SELINUX_SELINUX_H as an Autoconf
7526         variable.
7528 2023-04-13  Bruno Haible  <bruno@clisp.org>
7530         ialloc, gethrxtime: Restore GCC diagnostics options.
7531         * lib/ialloc.h: Invoke _GL_INLINE_HEADER_END.
7532         * lib/xtime.h: Likewise.
7533         * Makefile (sc_check_GL_INLINE_HEADER_use): New rule.
7535 2023-04-13  Bruno Haible  <bruno@clisp.org>
7537         flexmember: Fix module description (regression 2016-09-07).
7538         * modules/flexmember (Include): Add "flexmember.h".
7540 2023-04-12  Paul Eggert  <eggert@cs.ucla.edu>
7542         doc: year2038 MIPS o32 nudge
7543         * doc/year2038.texi: Use more-common "o32" name for
7544         32-bit MIPS ABI.
7546 2023-04-12  Bruno Haible  <bruno@clisp.org>
7548         Add more reminders to include <config.h>.
7549         * m4/gnulib-common.m4 (gl_COMMON): In config.h, define
7550         _GL_CONFIG_H_INCLUDED.
7551         * lib/acl-internal.h: Test _GL_CONFIG_H_INCLUDED instead of
7552         _GL_INLINE_HEADER_BEGIN.
7553         * lib/alignalloc.h: Likewise.
7554         * lib/argp-fmtstream.h: Likewise.
7555         * lib/argp.h: Likewise.
7556         * lib/binary-io.h: Likewise.
7557         * lib/bitrotate.h: Likewise.
7558         * lib/c-ctype.h: Likewise.
7559         * lib/count-leading-zeros.h: Likewise.
7560         * lib/count-one-bits.h: Likewise.
7561         * lib/count-trailing-zeros.h: Likewise.
7562         * lib/eealloc.h: Likewise.
7563         * lib/execinfo.in.h: Likewise.
7564         * lib/gethrxtime.h: Likewise.
7565         * lib/gl_list.h: Likewise.
7566         * lib/gl_map.h: Likewise.
7567         * lib/gl_omap.h: Likewise.
7568         * lib/gl_openssl.h: Likewise.
7569         * lib/gl_oset.h: Likewise.
7570         * lib/gl_set.h: Likewise.
7571         * lib/gl_xlist.h: Likewise.
7572         * lib/gl_xmap.h: Likewise.
7573         * lib/gl_xomap.h: Likewise.
7574         * lib/gl_xoset.h: Likewise.
7575         * lib/gl_xset.h: Likewise.
7576         * lib/gl_xsublist.h: Likewise.
7577         * lib/glthread/cond.h: Likewise.
7578         * lib/hamt.h: Likewise.
7579         * lib/ialloc.h: Likewise.
7580         * lib/math.in.h: Likewise.
7581         * lib/mbchar.h: Likewise.
7582         * lib/mbfile.h: Likewise.
7583         * lib/mbiter.h: Likewise.
7584         * lib/mbuiter.h: Likewise.
7585         * lib/openat.h: Likewise.
7586         * lib/pipe-filter-aux.h: Likewise.
7587         * lib/priv-set.h: Likewise.
7588         * lib/safe-alloc.h: Likewise.
7589         * lib/savewd.h: Likewise.
7590         * lib/se-context.in.h: Likewise.
7591         * lib/se-label.in.h: Likewise.
7592         * lib/se-selinux.in.h: Likewise.
7593         * lib/sig-handler.h: Likewise.
7594         * lib/stat-time.h: Likewise.
7595         * lib/string-desc-quotearg.h: Likewise.
7596         * lib/string-desc.h: Likewise.
7597         * lib/sys_socket.in.h: Likewise.
7598         * lib/timespec.h: Likewise.
7599         * lib/u64.h: Likewise.
7600         * lib/uchar.in.h: Likewise.
7601         * lib/unistd.in.h: Likewise.
7602         * lib/utimens.h: Likewise.
7603         * lib/wctype.in.h: Likewise.
7604         * lib/xalloc.h: Likewise.
7605         * lib/xbinary-io.h: Likewise.
7606         * lib/xsize.h: Likewise.
7607         * lib/xstring-desc.h: Likewise.
7608         * lib/xtime.h: Likewise.
7609         * lib/acl.h: Check that config.h was already included.
7610         * lib/alignof.h: Likewise.
7611         * lib/argmatch.h: Likewise.
7612         * lib/argv-iter.h: Likewise.
7613         * lib/arpa_inet.in.h: Likewise.
7614         * lib/attribute.h: Likewise.
7615         * lib/backupfile.h: Likewise.
7616         * lib/base32.h: Likewise.
7617         * lib/base64.h: Likewise.
7618         * lib/basename-lgpl.h: Likewise.
7619         * lib/bitset.h: Likewise.
7620         * lib/bitsetv.h: Likewise.
7621         * lib/c-snprintf.h: Likewise.
7622         * lib/c-stack.h: Likewise.
7623         * lib/c-strcase.h: Likewise.
7624         * lib/c-vasnprintf.h: Likewise.
7625         * lib/c-vasprintf.h: Likewise.
7626         * lib/c-vsnprintf.h: Likewise.
7627         * lib/c-xvasprintf.h: Likewise.
7628         * lib/canon-host.h: Likewise.
7629         * lib/canonicalize.h: Likewise.
7630         * lib/clean-temp.h: Likewise.
7631         * lib/concat-filename.h: Likewise.
7632         * lib/ctype.in.h: Likewise.
7633         * lib/dfa.h: Likewise.
7634         * lib/di-set.h: Likewise.
7635         * lib/dirent-safer.h: Likewise.
7636         * lib/dirent.in.h: Likewise.
7637         * lib/dirname.h: Likewise.
7638         * lib/eloop-threshold.h: Likewise.
7639         * lib/error.in.h: Likewise.
7640         * lib/exclude.h: Likewise.
7641         * lib/fatal-signal.h: Likewise.
7642         * lib/fcntl.in.h: Likewise.
7643         * lib/file-type.h: Likewise.
7644         * lib/filenamecat.h: Likewise.
7645         * lib/filevercmp.h: Likewise.
7646         * lib/flexmember.h: Likewise.
7647         * lib/fnmatch.in.h: Likewise.
7648         * lib/fpending.h: Likewise.
7649         * lib/freadable.h: Likewise.
7650         * lib/freadahead.h: Likewise.
7651         * lib/freading.h: Likewise.
7652         * lib/fts_.h: Likewise.
7653         * lib/fwritable.h: Likewise.
7654         * lib/fwriting.h: Likewise.
7655         * lib/gc.h: Likewise.
7656         * lib/get_progname_of.h: Likewise.
7657         * lib/glob.in.h: Likewise.
7658         * lib/glthread/thread.h: Likewise.
7659         * lib/hash-pjw-bare.h: Likewise.
7660         * lib/hash-pjw.h: Likewise.
7661         * lib/hash-triple.h: Likewise.
7662         * lib/hash.h: Likewise.
7663         * lib/i-ring.h: Likewise.
7664         * lib/iconv.in.h: Likewise.
7665         * lib/ino-map.h: Likewise.
7666         * lib/inttostr.h: Likewise.
7667         * lib/inttypes.in.h: Likewise.
7668         * lib/javaversion.h: Likewise.
7669         * lib/langinfo.in.h: Likewise.
7670         * lib/locale.in.h: Likewise.
7671         * lib/localename.h: Likewise.
7672         * lib/malloc.in.h: Likewise.
7673         * lib/malloca.h: Likewise.
7674         * lib/memcasecmp.h: Likewise.
7675         * lib/memchr2.h: Likewise.
7676         * lib/memcmp2.h: Likewise.
7677         * lib/modechange.h: Likewise.
7678         * lib/monetary.in.h: Likewise.
7679         * lib/mountlist.h: Likewise.
7680         * lib/netdb.in.h: Likewise.
7681         * lib/obstack.h: Likewise.
7682         * lib/opendirat.h: Likewise.
7683         * lib/pagealign_alloc.h: Likewise.
7684         * lib/pipe-filter.h: Likewise.
7685         * lib/poll.in.h: Likewise.
7686         * lib/pthread.in.h: Likewise.
7687         * lib/pty.in.h: Likewise.
7688         * lib/quotearg.h: Likewise.
7689         * lib/read-file.h: Likewise.
7690         * lib/readline.h: Likewise.
7691         * lib/readutmp.h: Likewise.
7692         * lib/regex-quote.h: Likewise.
7693         * lib/relocatable.h: Likewise.
7694         * lib/savedir.h: Likewise.
7695         * lib/sched.in.h: Likewise.
7696         * lib/search.in.h: Likewise.
7697         * lib/sh-quote.h: Likewise.
7698         * lib/signal.in.h: Likewise.
7699         * lib/sigpipe-die.h: Likewise.
7700         * lib/sockets.h: Likewise.
7701         * lib/spawn.in.h: Likewise.
7702         * lib/ssfmalloc.h: Likewise.
7703         * lib/stack.h: Likewise.
7704         * lib/stdalign.in.h: Likewise.
7705         * lib/stdarg.in.h: Likewise.
7706         * lib/stddef.in.h: Likewise.
7707         * lib/stdio-safer.h: Likewise.
7708         * lib/stdio.in.h: Likewise.
7709         * lib/stdlib.in.h: Likewise.
7710         * lib/stdnoreturn.in.h: Likewise.
7711         * lib/strerror-override.h: Likewise.
7712         * lib/striconv.h: Likewise.
7713         * lib/striconveh.h: Likewise.
7714         * lib/striconveha.h: Likewise.
7715         * lib/string-buffer.h: Likewise.
7716         * lib/string.in.h: Likewise.
7717         * lib/strings.in.h: Likewise.
7718         * lib/strnlen1.h: Likewise.
7719         * lib/sys_file.in.h: Likewise.
7720         * lib/sys_ioctl.in.h: Likewise.
7721         * lib/sys_random.in.h: Likewise.
7722         * lib/sys_resource.in.h: Likewise.
7723         * lib/sys_select.in.h: Likewise.
7724         * lib/sys_stat.in.h: Likewise.
7725         * lib/sys_time.in.h: Likewise.
7726         * lib/sys_times.in.h: Likewise.
7727         * lib/sys_utsname.in.h: Likewise.
7728         * lib/sys_wait.in.h: Likewise.
7729         * lib/system-quote.h: Likewise.
7730         * lib/term-style-control.h: Likewise.
7731         * lib/termios.in.h: Likewise.
7732         * lib/textstyle.in.h: Likewise.
7733         * lib/threads.in.h: Likewise.
7734         * lib/time.in.h: Likewise.
7735         * lib/trim.h: Likewise.
7736         * lib/utime.in.h: Likewise.
7737         * lib/utmp.in.h: Likewise.
7738         * lib/vasnprintf.h: Likewise.
7739         * lib/verror.h: Likewise.
7740         * lib/version-etc.h: Likewise.
7741         * lib/wchar.in.h: Likewise.
7742         * lib/windows-spawn.h: Likewise.
7743         * lib/windows-thread.h: Likewise.
7744         * lib/xgetcwd.h: Likewise.
7745         * lib/xgetdomainname.h: Likewise.
7746         * lib/xgethostname.h: Likewise.
7747         * lib/xmalloca.h: Likewise.
7748         * lib/xmemdup0.h: Likewise.
7749         * lib/xprintf.h: Likewise.
7750         * lib/xreadlink.h: Likewise.
7751         * lib/xstriconv.h: Likewise.
7752         * lib/xstriconveh.h: Likewise.
7753         * lib/xstrndup.h: Likewise.
7754         * lib/xstrtol-error.h: Likewise.
7755         * lib/xvasprintf.h: Likewise.
7756         * Makefile (config_h_MACROS*): New variables.
7757         (sc_check_config_h_reminder): New rule.
7759 2023-04-11  Paul Eggert  <eggert@cs.ucla.edu>
7761         doc: update year2038 list further
7762         Prompted by Adhemerval Zanella Netto’s email in:
7763         https://lists.gnu.org/r/bug-gnulib/2023-04/msg00083.html
7764         Also, mention 32-bit Android.
7765         * doc/year2038.texi: Mention Linux/ork1 and Android.
7766         Append "32" to powerpc and sparc names.
7768 2023-04-11  Bruno Haible  <bruno@clisp.org>
7770         Fix the "make sc_prohibit_AC_LIBOBJ_in_m4" findings.
7771         * Makefile (allow_AC_LIBOBJ): Update after 2023-03-24 change. Add
7772         termcap, terminfo.
7774 2023-04-11  Bruno Haible  <bruno@clisp.org>
7776         Fix some "make sc_prohibit_leading_TABs" findings.
7777         * tests/test-calloc-gnu.c: Expand tabs.
7778         * tests/test-regex.c: Likewise.
7780 2023-04-11  Bruno Haible  <bruno@clisp.org>
7782         Makefile: Fix a syntax alert.
7783         * Makefile: Indent commands with tabs, not spaces.
7785 2023-04-10  Bruno Haible  <bruno@clisp.org>
7787         alignasof: Ensure a correct _Alignas (regression 2023-01-15).
7788         * m4/stdalign.m4 (gl_ALIGNASOF): Define _Alignas also when <stdalign.h>
7789         exists.
7791 2023-04-10  Paul Eggert  <eggert@cs.ucla.edu>
7793         doc: update list of year2038 platforms
7794         * doc/year2038.texi: Update list of platforms
7795         by adding dates and version numbers and fixing some that
7796         appear to have been misfiled.  Also, list working systems
7797         and versions first, as that helps shorten the list of
7798         failing systems by saying "older versions".
7800         doc: moved year2038 para up
7801         * doc/year2038.texi: Move a paragraph up,
7802         as it’s lonely at the end.
7804         doc: document year2038 first
7805         * doc/year2038.texi: Document year2038 first, then
7806         year2038-required.
7808 2023-04-10  Bruno Haible  <bruno@clisp.org>
7810         doc: Clarify list of platforms for year2038 support.
7811         * doc/year2038.texi (Avoiding the year 2038 problem): List the platforms
7812         on which year2038-required is known to fail vs. known to succeed.
7814 2023-04-10  Bruno Haible  <bruno@clisp.org>
7816         doc: Avoid ambiguous wording.
7817         * doc/posix-headers/time.texi: Say "or" not "and".
7819 2023-04-09  Bruno Haible  <bruno@clisp.org>
7821         doc: Fix a typo.
7822         * doc/posix-headers/time.texi: Fix typo in module name.
7824 2023-04-09  Paul Eggert  <eggert@cs.ucla.edu>
7826         largefile: sync from Autoconf master
7827         * modules/largefile-required, modules/year2038-required: New modules.
7828         * MODULES.html.sh, doc/largefile.texi, doc/posix-headers/time.texi:
7829         * doc/year2038.texi: Document this.
7830         * m4/largefile.m4: Sync from Autoconf master.
7831         Conditionalize the workaround on AC_SYS_LARGEFILE_REQUIRED rather
7832         than on AC_SYS_YEAR2038 so that we replace older but still
7833         unreleased Autoconf.
7834         (AC_SYS_LARGEFILE_REQUIRED, AC_SYS_YEAR2038_REQUIRED): New macros.
7836         year2038: configure earlier
7837         * modules/year2038: Put AC_SYS_YEAR2038 in configure.ac-early
7838         since it can affect later compilations with _TIME_BITS=64.
7840 2023-04-09  Bruno Haible  <bruno@clisp.org>
7842         c32toupper: Add tests.
7843         * tests/test-c32toupper.sh: New file.
7844         * tests/test-c32toupper.c: New file, based on tests/test-c32islower.c.
7845         * modules/c32toupper-tests: New file.
7847         c32toupper: New module.
7848         * lib/uchar.in.h (c32toupper): New declaration.
7849         * lib/c32toupper.c: New file.
7850         * modules/c32toupper: New file.
7851         * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
7852         GNULIB_C32TOUPPER.
7853         * modules/uchar (Makefile.am): Substitute GNULIB_C32TOUPPER.
7855 2023-04-09  Bruno Haible  <bruno@clisp.org>
7857         c32tolower: Add tests.
7858         * tests/test-c32tolower.sh: New file.
7859         * tests/test-c32tolower.c: New file, based on tests/test-c32isupper.c.
7860         * modules/c32tolower-tests: New file.
7862         c32tolower: New module.
7863         * lib/uchar.in.h (c32tolower): New declaration.
7864         * lib/c32tolower.c: New file.
7865         * lib/c32to-impl.h: New file, based on lib/c32is-impl.h.
7866         * modules/c32tolower: New file.
7867         * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize
7868         GNULIB_C32TOLOWER.
7869         * modules/uchar (Makefile.am): Substitute GNULIB_C32TOLOWER.
7871 2023-04-09  Bruno Haible  <bruno@clisp.org>
7873         c32is*: Ensure GNULIB_defined_mbstate_t is defined on AIX.
7874         * m4/mbrtowc.m4 (gl_MBSTATE_T_BROKEN): Define through AC_DEFUN_ONCE.
7875         * m4/mbrtoc32.m4 (gl_FUNC_MBRTOC32): Require it.
7876         * modules/c32isalnum (Files): Add m4/mbrtowc.m4, m4/locale-ja.m4.
7877         (configure.ac): Require gl_MBSTATE_T_BROKEN.
7878         * modules/c32isalpha: Likewise.
7879         * modules/c32isblank: Likewise.
7880         * modules/c32iscntrl: Likewise.
7881         * modules/c32isdigit: Likewise.
7882         * modules/c32isgraph: Likewise.
7883         * modules/c32islower: Likewise.
7884         * modules/c32isprint: Likewise.
7885         * modules/c32ispunct: Likewise.
7886         * modules/c32isspace: Likewise.
7887         * modules/c32isupper: Likewise.
7888         * modules/c32isxdigit: Likewise.
7890 2023-04-09  Bruno Haible  <bruno@clisp.org>
7892         mbrtoc32: Add comments.
7893         * lib/mbrtoc32.c: Add comment regarding AIX.
7894         * m4/mbrtoc32.m4 (gl_FUNC_MBRTOC32): Add comment regarding
7895         GNULIB_defined_mbstate_t.
7897 2023-04-09  Bruno Haible  <bruno@clisp.org>
7899         doc: Mention a NetBSD bug.
7900         * doc/posix-functions/towlower.texi: Mention NetBSD bug 57339.
7901         * doc/posix-functions/towupper.texi: Likewise.
7903 2023-04-09  Bruno Haible  <bruno@clisp.org>
7905         vasnwprintf-posix: More details about the glibc bug.
7906         * doc/posix-functions/swprintf.texi: Add comment.
7907         * m4/printf.m4 (gl_SWPRINTF_DIRECTIVE_LA): Update cross-compilation
7908         guess.
7910 2023-04-08  Bruno Haible  <bruno@clisp.org>
7912         doc: Mention another Haiku bug.
7913         * doc/posix-functions/open.texi: Mention a Haiku bug with symlinks.
7915 2023-04-08  Bruno Haible  <bruno@clisp.org>
7917         Avoid Autoconf "was expanded before it was required" warning.
7918         * m4/exponentf.m4 (gl_FLOAT_EXPONENT_LOCATION): Define through
7919         AC_DEFUN_ONCE.
7920         * m4/exponentd.m4 (gl_DOUBLE_EXPONENT_LOCATION): Likewise.
7921         * m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Likewise.
7923 2023-04-08  Bruno Haible  <bruno@clisp.org>
7925         striconveh tests: Avoid test failure on glibc 2.15.
7926         * tests/test-striconveh.c (main): Skip some of the GB18030 tests on
7927         glibc < 2.16.
7929 2023-04-08  Bruno Haible  <bruno@clisp.org>
7931         vasnwprintf-posix: Really work around %La bug in glibc 2.15 and Haiku.
7932         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Fix a copy&paste bug.
7934 2023-04-08  Bruno Haible  <bruno@clisp.org>
7936         login_tty: Fix compilation error in C++ mode on Solaris 11.4.
7937         * m4/login_tty.m4 (gl_FUNC_LOGIN_TTY): Test whether <termios.h> exists.
7938         Consider it when testing whether login_tty is declared.
7939         * lib/utmp.in.h: If none of <util.h> and <libutil.h> exists, include
7940         <termios.h> instead.
7941         * doc/glibc-functions/login_tty.texi: Document the Solaris 11.4 problem.
7943 2023-04-08  Bruno Haible  <bruno@clisp.org>
7945         time: Fix compilation error in C++ mode on Solaris 11.
7946         * lib/time.in.h (time): Disable _GL_CXXALIASWARN invocation on non-glibc
7947         systems.
7949 2023-04-07  Bruno Haible  <bruno@clisp.org>
7951         unistdio/*: Fix test failures (regression 2023-01-28).
7952         * modules/unistdio/*printf (configure.ac): Bump required libunistring
7953         version number.
7955 2023-04-07  Bruno Haible  <bruno@clisp.org>
7957         trim tests: Fix link error.
7958         * modules/trim-tests (Makefile.am): Link test-trim also against libintl.
7960 2023-04-07  Bruno Haible  <bruno@clisp.org>
7962         stdio: Fix the value of _PRINTF_NAN_LEN_MAX on OpenBSD.
7963         * lib/stdio.in.h (_PRINTF_NAN_LEN_MAX): Define to 4 on OpenBSD.
7965 2023-04-07  Bruno Haible  <bruno@clisp.org>
7967         vasnwprintf-posix: Work around %La bug in glibc 2.15 and Haiku.
7968         * m4/printf.m4 (gl_SWPRINTF_DIRECTIVE_LA): New macro.
7969         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke
7970         gl_SWPRINTF_DIRECTIVE_LA and define NEED_WPRINTF_DIRECTIVE_LA
7971         accordingly.
7972         * lib/vasnprintf.c: When compiling vasnwprintf, if
7973         NEED_WPRINTF_DIRECTIVE_LA, handle the %La and %LA directives ourselves.
7974         * doc/posix-functions/swprintf.texi: Mention the %La bug.
7976 2023-04-07  Bruno Haible  <bruno@clisp.org>
7978         stdio: Fix compilation error in C++ mode on macOS.
7979         * lib/stdio.in.h (getw, putw): Repeat the declaration even if the
7980         function is already supposed to be declared.
7982 2023-04-07  Bruno Haible  <bruno@clisp.org>
7984         vasnwprintf-posix tests: Avoid test failure on mingw.
7985         * tests/test-vasnwprintf-posix.c (test_function): For mingw, change two
7986         expected test results.
7988 2023-04-06  Bruno Haible  <bruno@clisp.org>
7990         uchar: Inline functions with C linkage in C++ mode (regr. 2023-04-04).
7991         * m4/gnulib-common.m4 (gl_COMMON_BODY): Put definitions of
7992         _GL_BEGIN_C_LINKAGE, _GL_END_C_LINKAGE into config.h.
7993         * lib/uchar.in.h: Enclose all inline functions in _GL_BEGIN_C_LINKAGE /
7994         _GL_END_C_LINKAGE.
7996 2023-04-06  Bruno Haible  <bruno@clisp.org>
7998         alignalloc: Fix link error on glibc 2.15 systems.
7999         * lib/alignalloc.h (ALIGNALLOC_VIA_ALIGNED_ALLOC): Set to 0 on
8000         glibc 2.15 systems.
8002 2023-04-05  Bruno Haible  <bruno@clisp.org>
8004         doc: Add references to registered Haiku bugs.
8005         * doc/posix-functions/call_once.texi: Mention Haiku bug.
8006         * doc/posix-functions/duplocale.texi: Likewise.
8007         * doc/posix-functions/freelocale.texi: Likewise.
8008         * doc/posix-functions/getlogin_r.texi: Likewise.
8009         * doc/posix-functions/initstate.texi: Likewise.
8010         * doc/posix-functions/mbrtoc32.texi: Likewise.
8011         * doc/posix-functions/strxfrm.texi: Likewise.
8012         * doc/posix-headers/math.texi: Update.
8014 2023-04-05  Bruno Haible  <bruno@clisp.org>
8016         string-desc-quotearg tests: Avoid a test failure on Haiku.
8017         * tests/test-string-desc-quotearg.c (main): For the
8018         clocale_quoting_style, accept also the U+2018 and U+2019 characters in
8019         UTF-8 encoding.
8021 2023-04-05  Bruno Haible  <bruno@clisp.org>
8023         random_r: Fix compilation error on Haiku.
8024         * lib/stdlib.in.h: For random_r, include <stdint.h> always.
8025         * modules/random_r (Depends-on): Depend on 'stdint' always.
8027 2023-04-05  Bruno Haible  <bruno@clisp.org>
8029         forkpty, openpty, login_tty: Fix link errors of the tests.
8030         * m4/pty.m4 (gl_PTY_LIB): On Haiku, set PTY_LIB to '-lbsd'.
8032 2023-04-05  Bruno Haible  <bruno@clisp.org>
8034         strerrorname_np: Fix compilation error on Haiku.
8035         * lib/strerrorname_np.c (strerrorname_np): Avoid conflict between
8036         EDOOFUS and EINVAL.
8037         * tests/test-strerrorname_np.c (main): Likewise.
8039 2023-04-05  Bruno Haible  <bruno@clisp.org>
8041         uchar: Fix recent change.
8042         * lib/uchar.in.h: Include <string.h>, <wctype.h>.
8044 2023-04-05  Bruno Haible  <bruno@clisp.org>
8046         localename tests: Work around a Haiku bug.
8047         * tests/test-localename.c (freelocale): New macro.
8049 2023-04-05  Bruno Haible  <bruno@clisp.org>
8051         localename: Add support for Haiku's per-thread locales.
8052         * lib/localename.c: Include <dlfcn.h>.
8053         (gl_locale_name_thread_unsafe): Add special code for Haiku.
8055 2023-04-05  Bruno Haible  <bruno@clisp.org>
8057         uchar: Work around Haiku bug.
8058         * m4/uchar_h.m4 (gl_UCHAR_H, gl_TYPE_CHAR8_T, gl_TYPE_CHAR16_T,
8059         gl_TYPE_CHAR32_T): Before including <uchar.h>, on Haiku, first include
8060         <stdint.h>.
8061         * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Likewise.
8062         * m4/mbrtoc32.m4 (gl_FUNC_MBRTOC32, gl_CHECK_FUNC_MBRTOC32,
8063         gl_MBRTOC32_EMPTY_INPUT, gl_MBRTOC32_C_LOCALE, gl_MBRTOC32_SANITYCHECK):
8064         Likewise.
8065         * lib/uchar.in.h: On Haiku, include <stdint.h> before the include_next.
8066         * doc/posix-headers/uchar.texi: Mention the Haiku bug.
8068 2023-04-05  Bruno Haible  <bruno@clisp.org>
8070         stdlib, btowc: Fix file lists.
8071         * modules/stdlib (Files): Add m4/codeset.m4.
8072         * modules/btowc (Files): Likewise.
8073         * modules/c-dtoastr-tests (Files): Likewise.
8074         * modules/c-ldtoastr-tests (Files): Likewise.
8075         * modules/c-snprintf-tests (Files): Likewise.
8076         * modules/c-vasprintf-tests (Files): Likewise.
8077         * modules/c-vsnprintf-tests (Files): Likewise.
8078         * modules/c-xvasprintf-tests (Files): Likewise.
8079         * modules/nl_langinfo-tests (Files): Likewise.
8081 2023-04-04  Bruno Haible  <bruno@clisp.org>
8083         duplocale: Fix compilation error on Haiku (regression 2023-01-22).
8084         * lib/locale.in.h (duplocale): If HAVE_DUPLOCALE = 0, don't declare it,
8085         even if REPLACE_DUPLOCALE = 1.
8086         * modules/duplocale (Depends-on, configure.ac): Don't compile a
8087         replacement if HAVE_DUPLOCALE = 0 and REPLACE_DUPLOCALE = 1.
8089 2023-04-04  Bruno Haible  <bruno@clisp.org>
8091         c32tob, c32is*, c32rtomb, mbrtoc32: Fix file lists.
8092         * modules/c32tob (Files): Add m4/locale-fr.m4, m4/locale-zh.m4,
8093         m4/codeset.m4.
8094         * modules/c32isalnum (Files): Likewise.
8095         * modules/c32isalpha (Files): Likewise.
8096         * modules/c32isblank (Files): Likewise.
8097         * modules/c32iscntrl (Files): Likewise.
8098         * modules/c32isdigit (Files): Likewise.
8099         * modules/c32isgraph (Files): Likewise.
8100         * modules/c32islower (Files): Likewise.
8101         * modules/c32isprint (Files): Likewise.
8102         * modules/c32ispunct (Files): Likewise.
8103         * modules/c32isspace (Files): Likewise.
8104         * modules/c32isupper (Files): Likewise.
8105         * modules/c32isxdigit (Files): Likewise.
8106         * modules/c32rtomb (Files): Likewise.
8107         * modules/mbrtoc32 (Files): Likewise.
8109 2023-04-04  Bruno Haible  <bruno@clisp.org>
8111         stdlib: Work around MB_CUR_MAX bug on Solaris 10.
8112         * lib/stdlib.in.h (gl_MB_CUR_MAX): New function.
8113         (MB_CUR_MAX, GNULIB_defined_MB_CUR_MAX): New macros.
8114         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether MB_CUR_MAX is correct.
8115         (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MB_CUR_MAX.
8116         * modules/stdlib (Files): Add m4/locale-fr.m4.
8117         (Makefile.am): Substitute REPLACE_MB_CUR_MAX.
8118         * doc/posix-headers/stdlib.texi: Mention the Solaris 10 bug.
8120 2023-04-04  Bruno Haible  <bruno@clisp.org>
8122         *c32*: Inline most functions on glibc and musl libc.
8123         * lib/uchar.in.h: Invoke _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
8124         (btoc32): Inline if _GL_WCHAR_T_IS_UCS4.
8125         (c32isalnum, c32isalpha, c32isblank, c32iscntrl, c32isdigit, c32isgraph,
8126         c32islower, c32isprint, c32ispunct, c32isspace, c32isupper,
8127         c32isxdigit): Inline if
8128         _GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t.
8129         (c32snrtombs, c32srtombs, c32stombs, c32tob, mbsnrtoc32s, mbsrtoc32s,
8130         mbstoc32s): Inline if _GL_WCHAR_T_IS_UCS4.
8131         * lib/btoc32.c: Define compilation unit marker.
8132         (btoc32): Conditionally mark as _GL_EXTERN_INLINE.
8133         * lib/c32isalnum.c: Define compilation unit marker.
8134         * lib/c32isalpha.c: Likewise.
8135         * lib/c32isblank.c: Likewise.
8136         * lib/c32iscntrl.c: Likewise.
8137         * lib/c32isdigit.c: Likewise.
8138         * lib/c32isgraph.c: Likewise.
8139         * lib/c32islower.c: Likewise.
8140         * lib/c32isprint.c: Likewise.
8141         * lib/c32ispunct.c: Likewise.
8142         * lib/c32isspace.c: Likewise.
8143         * lib/c32isupper.c: Likewise.
8144         * lib/c32isxdigit.c: Likewise.
8145         * lib/c32is-impl.h (FUNC): Conditionally mark as _GL_EXTERN_INLINE.
8146         * lib/c32snrtombs.c: Define compilation unit marker.
8147         (c32snrtombs): Conditionally mark as _GL_EXTERN_INLINE.
8148         * lib/c32srtombs.c: Define compilation unit marker.
8149         (c32srtombs): Conditionally mark as _GL_EXTERN_INLINE.
8150         * lib/c32stombs.c: Define compilation unit marker.
8151         (c32stombs): Conditionally mark as _GL_EXTERN_INLINE.
8152         * lib/c32tob.c: Define compilation unit marker.
8153         (c32tob): Conditionally mark as _GL_EXTERN_INLINE.
8154         * lib/mbsnrtoc32s.c: Define compilation unit marker.
8155         (mbsnrtoc32s): Conditionally mark as _GL_EXTERN_INLINE.
8156         * lib/mbsrtoc32s.c: Define compilation unit marker.
8157         (mbsrtoc32s): Conditionally mark as _GL_EXTERN_INLINE.
8158         * lib/mbstoc32s.c: Define compilation unit marker.
8159         (mbstoc32s): Conditionally mark as _GL_EXTERN_INLINE.
8160         * modules/uchar (Depends-on): Add extern-inline.
8162 2023-04-04  Pádraig Brady  <P@draigBrady.com>
8164         backupfile: fix bug when renaming from subdirectory
8165         * lib/backupfile.c (backup_internal): Ensure we use the
8166         appropriate offset if operating on a subdirectory,
8167         i.e., on an updated sdir.
8168         Fixes https://bugs.gnu.org/62607
8170 2023-04-04  Bruno Haible  <bruno@clisp.org>
8172         *c32*: Optimize on musl libc like on glibc.
8173         * lib/uchar.in.h (_GL_WCHAR_T_IS_UCS4): New macro.
8174         * lib/btoc32.c (btoc32): Test _GL_WCHAR_T_IS_UCS4 instead of __GLIBC__.
8175         * lib/mbsrtoc32s.c: Likewise.
8176         * lib/mbsnrtoc32s.c: Likewise.
8177         * lib/c32tob.c (c32tob): Likewise.
8178         * lib/c32srtombs.c: Likewise.
8179         * lib/c32snrtombs.c: Likewise.
8180         * lib/c32is-impl.h (FUNC): Likewise.
8182 2023-04-04  Bruno Haible  <bruno@clisp.org>
8184         uchar: Rename _GL_LARGE_CHAR32_T to _GL_SMALL_WCHAR_T.
8185         * lib/uchar.in.h (_GL_SMALL_WCHAR_T): Renamed from _GL_LARGE_CHAR32_T.
8186         * lib/mbrtoc32.c: Update.
8187         * lib/mbsrtoc32s.c: Update.
8188         * lib/mbsnrtoc32s.c: Update.
8189         * lib/c32tob.c: Update.
8190         * lib/c32rtomb.c: Update.
8191         * lib/c32srtombs.c: Update.
8192         * lib/c32snrtombs.c: Update.
8193         * lib/c32is-impl.h: Update.
8194         * tests/test-uchar.c: Update.
8196 2023-04-04  Bruno Haible  <bruno@clisp.org>
8198         c32rtomb: Fix an autoconf test.
8199         * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): In a test program, include
8200         <stddef.h>, for NULL.
8202 2023-04-03  Bruno Haible  <bruno@clisp.org>
8204         tests: Set executable bit on more tests.
8205         * tests/test-c-dtoastr.sh: Make executable.
8206         * tests/test-c-ldtoastr.sh: Likewise.
8207         * tests/test-immutable.sh: Likewise.
8208         * tests/test-vasnwprintf-posix2.sh: Likewise.
8210 2023-04-03  Jim Meyering  <meyering@fb.com>
8212         tests: set executable bit in test-trim[1-3].sh
8213         This avoids a test failure for each new file.
8214         * tests/test-trim1.sh: Make this file executable.
8215         * tests/test-trim2.sh: Likewise.
8216         * tests/test-trim3.sh: Likewise.
8218 2023-04-03  Bruno Haible  <bruno@clisp.org>
8220         Use the 'extern-inline' module explicitly where needed.
8221         I found the list of affected modules through this command:
8222           for m in $(for f in `grep -Fl _GL_INLINE_HEADER_BEGIN lib/*.h | sort`
8223                      do ./gnulib-tool --find $f; done)
8224           do grep '^extern-inline' modules/$m > /dev/null || echo $m
8225           done
8226         * modules/fdutimensat (Depends-on): Add extern-inline.
8227         * modules/file-has-acl (Depends-on): Likewise.
8228         * modules/hamt (Depends-on): Likewise.
8229         * modules/relocatable-prog-wrapper (Depends-on): Likewise.
8230         * modules/safe-alloc (Depends-on): Likewise.
8231         * modules/string-desc (Depends-on): Likewise.
8232         * modules/string-desc-quotearg (Depends-on): Likewise.
8233         * modules/xstring-desc (Depends-on): Likewise.
8234         * modules/xvasprintf (Depends-on): Likewise.
8236 2023-04-03  Bruno Haible  <bruno@clisp.org>
8238         vasnprintf-posix: Fix harmless mistake (regression 2023-03-24).
8239         Found by Coverity.
8240         * lib/vasnprintf.c (MAX_ROOM_NEEDED): Insert 'break;' statement.
8242 2023-04-03  Bruno Haible  <bruno@clisp.org>
8244         mbstoc32s tests: Check behaviour in the C locale.
8245         * tests/test-mbstoc32s.c (main): Test behaviour in the C locale. Based
8246         on tests/test-mbstowcs.c.
8247         * tests/test-mbstoc32s-5.sh: New file, based on tests/test-mbstowcs5.sh.
8248         * modules/mbstoc32s-tests (Files): Add it.
8249         (Depends-on): Add btoc32.
8250         (Makefile.am): Run test-mbstoc32s-5.sh.
8252 2023-04-03  Bruno Haible  <bruno@clisp.org>
8254         mbsnrtoc32s tests: Check behaviour in the C locale.
8255         * tests/test-mbsnrtoc32s.c (main): Test behaviour in the C locale. Based
8256         on tests/test-mbsnrtowcs.c.
8257         * tests/test-mbsnrtoc32s-5.sh: New file, based on
8258         tests/test-mbsrtowcs5.sh.
8259         * modules/mbsnrtoc32s-tests (Files): Add it.
8260         (Depends-on): Add btoc32.
8261         (Makefile.am): Run test-mbsnrtoc32s-5.sh.
8263 2023-04-03  Bruno Haible  <bruno@clisp.org>
8265         mbsrtoc32s tests: Check behaviour in the C locale.
8266         * tests/test-mbsrtoc32s.c (main): Test behaviour in the C locale. Based
8267         on tests/test-mbsrtowcs.c.
8268         * tests/test-mbsrtoc32s-5.sh: New file, based on
8269         tests/test-mbsrtowcs5.sh.
8270         * modules/mbsrtoc32s-tests (Files): Add it.
8271         (Depends-on): Add btoc32.
8272         (Makefile.am): Run test-mbsrtoc32s-5.sh.
8274 2023-04-03  Bruno Haible  <bruno@clisp.org>
8276         btoc32 tests: Check behaviour in the C locale.
8277         * tests/test-btoc32.c (main): Test behaviour in the C locale. Based on
8278         tests/test-btowc.c.
8279         * tests/test-btoc32-3.sh: New file, based on tests/test-btowc3.sh.
8280         * modules/btoc32-tests (Files): Add it.
8281         (Makefile.am): Test it.
8283 2023-04-03  Bruno Haible  <bruno@clisp.org>
8285         mbrtoc32 tests: Prefer *c32* functions.
8286         * tests/test-mbrtoc32.c (main): Use btoc32 instead of btowc.
8287         * modules/mbrtoc32-tests (Depends-on): Add btoc32.
8289 2023-04-03  Bruno Haible  <bruno@clisp.org>
8291         mbrtoc32 tests: Add comment.
8292         * m4/mbrtowc.m4 (gl_MBRTOWC_C_LOCALE): Add comment.
8293         * m4/mbrtoc32.m4 (gl_MBRTOC32_C_LOCALE): Add comment.
8294         * tests/test-mbrtoc32.c: Add comment.
8295         * tests/test-mbrtoc32-5.sh: Use symmetric coding style.
8296         * doc/posix-functions/mbrtoc32.texi: Update.
8298 2023-04-02  Bruno Haible  <bruno@clisp.org>
8300         trim: Fix trim_trailing result in multibyte locales.
8301         * lib/trim.c (trim2): Simplify algorithm for trim_trailing in multibyte
8302         locales, to use 2 instead of 3 states.
8303         (IF_LINT): Remove macro.
8305         trim: Add tests.
8306         * tests/test-trim.c: New file.
8307         * tests/test-trim1.sh: New file.
8308         * tests/test-trim2.sh: New file.
8309         * tests/test-trim3.sh: New file.
8310         * modules/trim-tests: New file.
8312 2023-04-02  Bruno Haible  <bruno@clisp.org>
8314         unistr/u8-strstr: Simplify code.
8315         * lib/unistr/u8-strstr.c: Inline the contents of lib/unistr/u-strstr.h.
8316         * lib/unistr/u-strstr.h: Remove file.
8317         * modules/unistr/u8-strstr (Files): Remove it.
8319         unistr/u{16,32}-strstr: Use two-way algorithm (no memory allocation).
8320         * lib/wcs-two-way.h: Use UNIT instead of wchar_t. Don't undefine
8321         RETURN_TYPE.
8322         * lib/wcsstr-impl.h: Move the non-linear implementation away. Use UNIT
8323         instead of wchar_t, RETURN_TYPE instead of 'wchar_t *', FUNC instead of
8324         wcsstr.
8325         (AVAILABLE): Use MEMCHR0 instead of wmemchr.
8326         (FUNC): Use STRCHR instead of wcschr.
8327         * lib/wcsstr.c: Moved the non-linear implementation to here.
8328         (FUNC, UNIT, RETURN_TYPE, MEMCHR0, STRCHR): New macros.
8329         * lib/unistr/u16-strstr.c: Don't include malloca.h, str-kmp.h,
8330         u-strstr.h. Instead, include wcsstr-impl.h.
8331         * lib/unistr/u32-strstr.c: Likewise.
8332         * modules/unistr/u16-strstr (Files): Remove u-strstr.h, str-kmp.h. Add
8333         wcsstr-impl.h, wcs-two-way.h.
8334         (Depends-on): Remove u16-strmbtouc, u16-strlen, u16-strnlen, malloca.
8335         Add u16-chr, u16-cmp.
8336         * modules/unistr/u32-strstr (Files): Remove u-strstr.h, str-kmp.h. Add
8337         wcsstr-impl.h, wcs-two-way.h.
8338         (Depends-on): Remove u32-strlen, u32-strnlen, malloca. Add u32-chr,
8339         u32-cmp.
8341 2023-04-02  Bruno Haible  <bruno@clisp.org>
8343         unistr/u*strstr tests: Add more tests.
8344         * tests/unistr/test-u-strstr.h (test_u_strstr): Add the two latest tests
8345         from tests/test-strstr.c.
8346         * tests/unistr/test-u8-strstr.c (U_SET): New macro.
8347         * tests/unistr/test-u16-strstr.c (U_SET): New macro.
8348         * tests/unistr/test-u32-strstr.c (U_SET): New macro.
8349         * modules/unistr/u8-strstr-tests (Depends-on): Add unistr/u8-set.
8350         * modules/unistr/u16-strstr-tests (Depends-on): Add unistr/u16-set.
8351         * modules/unistr/u32-strstr-tests (Depends-on): Add unistr/u32-set.
8353 2023-04-01  Bruno Haible  <bruno@clisp.org>
8355         vasnwprintf-posix: Fix behaviour in the C locale.
8356         * lib/vasnprintf.c (VASNPRINTF): If NEED_WPRINTF_DIRECTIVE_C is set,
8357         implement the 'c' directive here.
8358         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke gl_MBRTOWC_C_LOCALE.
8359         If mbrtowc is buggy in the C locale, define NEED_WPRINTF_DIRECTIVE_C.
8360         * modules/vasnwprintf (Files): Add m4/mbrtowc.m4.
8361         * tests/test-vasnwprintf-posix.c (test_function): Add tests of %s and %c
8362         in the C locale.
8363         * doc/posix-functions/fwprintf.texi: Mention the C locale behaviour bug.
8364         * doc/posix-functions/swprintf.texi: Likewise.
8365         * doc/posix-functions/vfwprintf.texi: Likewise.
8366         * doc/posix-functions/vswprintf.texi: Likewise.
8367         * doc/posix-functions/vwprintf.texi: Likewise.
8368         * doc/posix-functions/wprintf.texi: Likewise.
8370 2023-04-01  Bruno Haible  <bruno@clisp.org>
8372         vasnprintf-posix: Fix crash in narrow %lc directive (regr. 2023-03-21).
8373         * lib/vasnprintf.c (VASNPRINTF): Negative results of local_wcrtomb can
8374         now occur; handle them.
8375         * tests/test-vasnprintf-posix.c (test_function): Test %lc directive with
8376         a wint_t argument that is not a valid wide character.
8377         * tests/test-snprintf-posix.h (test_function): Likewise.
8378         * tests/test-sprintf-posix.h (test_function): Likewise.
8379         * tests/test-vasnwprintf-posix.c (test_function): Likewise.
8380         * tests/test-vasprintf-posix.c (test_function): Likewise.
8382 2023-04-01  Bruno Haible  <bruno@clisp.org>
8384         stddef: Fix __need_wint_t handling in case of two stddef.h overrides.
8385         * lib/stddef.in.h: Replace _GL_STDDEF_WINT_T with a symbol that depends
8386         on the @GUARD_PREFIX@.
8388 2023-03-31  Bruno Haible  <bruno@clisp.org>
8390         vasnwprintf: Fix crash upon conversion failure when processing %s.
8391         * lib/vasnprintf.c (VASNPRINTF): When processing %s with !has_precision
8392         and !has_width, don't call abort() if there is a conversion failure.
8394 2023-03-30  Bruno Haible  <bruno@clisp.org>
8396         Avoid test failures on Android.
8397         * tests/test-btowc.c (main): Treat C locale like in
8398         tests/test-mbrtowc.c.
8399         * tests/test-mbsrtowcs.c (main): Likewise.
8400         * tests/test-mbsnrtowcs.c (main): Likewise.
8401         * tests/test-mbstowcs.c (main): Likewise.
8403 2023-03-30  Bruno Haible  <bruno@clisp.org>
8405         mbstowcs: Add tests.
8406         * tests/test-mbstowcs1.sh: New file, based on tests/test-mbsrtowcs1.sh.
8407         * tests/test-mbstowcs2.sh: New file, based on tests/test-mbsrtowcs2.sh.
8408         * tests/test-mbstowcs3.sh: New file, based on tests/test-mbsrtowcs3.sh.
8409         * tests/test-mbstowcs4.sh: New file, based on tests/test-mbsrtowcs4.sh.
8410         * tests/test-mbstowcs5.sh: New file, based on tests/test-mbsrtowcs5.sh.
8411         * tests/test-mbstowcs.c: New file, based on tests/test-mbsrtowcs.c.
8412         * modules/mbstowcs-tests: New file, based on modules/mbsrtowcs-tests.
8414         mbstowcs: New module.
8415         * lib/stdlib.in.h (mbstowcs): New declaration.
8416         * lib/mbstowcs.c: New file, based on lib/mbstoc32s.c.
8417         * m4/mbstowcs.m4: New file.
8418         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether mbstowcs is declared.
8419         (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize GNULIB_MBSTOWCS.
8420         (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MBSTOWCS.
8421         * modules/stdlib (Makefile.am): Substitute GNULIB_MBSTOWCS,
8422         REPLACE_MBSTOWCS.
8423         * modules/mbstowcs: New file.
8424         * tests/test-stdlib-c++.cc (mbstowcs): Check signature.
8425         * doc/posix-functions/mbstowcs.texi: Mention the C locale behaviour bug
8426         and the new module.
8428 2023-03-30  Bruno Haible  <bruno@clisp.org>
8430         mbsnrtowcs: Fix behaviour in the C locale.
8431         * m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): Invoke gl_MBRTOWC_C_LOCALE. If
8432         mbrtowc is buggy in the C locale, override also mbsnrtowcs.
8433         * modules/mbsnrtowcs (Files): Add m4/mbrtowc.m4.
8434         * tests/test-mbsnrtowcs.c (main): Add a test of the C locale, based on
8435         tests/test-mbsrtowcs.c.
8436         * tests/test-mbsnrtowcs5.sh: New file, based on tests/test-mbrtowc5.sh.
8437         * modules/mbsnrtowcs-tests (Files): Add it.
8438         (Makefile.am): Test it.
8439         * doc/posix-functions/mbsnrtowcs.texi: Mention the C locale behaviour
8440         bug.
8442 2023-03-30  Bruno Haible  <bruno@clisp.org>
8444         mbsrtowcs: Fix behaviour in the C locale.
8445         * m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): Invoke gl_MBRTOWC_C_LOCALE. If
8446         mbrtowc is buggy in the C locale, override also mbsrtowcs.
8447         * modules/mbsrtowcs (Files): Add m4/mbrtowc.m4.
8448         * tests/test-mbsrtowcs.c (main): Add a test of the C locale, based on
8449         tests/test-mbrtowc.c.
8450         * tests/test-mbsrtowcs5.sh: New file, based on tests/test-mbrtowc5.sh.
8451         * modules/mbsrtowcs-tests (Files): Add it.
8452         (Makefile.am): Test it.
8453         * doc/posix-functions/mbsrtowcs.texi: Mention the C locale behaviour
8454         bug.
8456 2023-03-30  Bruno Haible  <bruno@clisp.org>
8458         mbrlen: Add tests.
8459         * tests/test-mbrlen1.sh: New file, based on tests/test-mbrtowc1.sh.
8460         * tests/test-mbrlen2.sh: New file, based on tests/test-mbrtowc2.sh.
8461         * tests/test-mbrlen3.sh: New file, based on tests/test-mbrtowc3.sh.
8462         * tests/test-mbrlen4.sh: New file, based on tests/test-mbrtowc4.sh.
8463         * tests/test-mbrlen5.sh: New file, based on tests/test-mbrtowc5.sh.
8464         * tests/test-mbrlen.c: New file, based on tests/test-mbrtowc.c.
8465         * tests/test-mbrlen-w32-1.sh: New file, based on
8466         tests/test-mbrtowc-w32-1.sh.
8467         * tests/test-mbrlen-w32-2.sh: New file, based on
8468         tests/test-mbrtowc-w32-2.sh.
8469         * tests/test-mbrlen-w32-3.sh: New file, based on
8470         tests/test-mbrtowc-w32-3.sh.
8471         * tests/test-mbrlen-w32-4.sh: New file, based on
8472         tests/test-mbrtowc-w32-4.sh.
8473         * tests/test-mbrlen-w32-5.sh: New file, based on
8474         tests/test-mbrtowc-w32-5.sh.
8475         * tests/test-mbrlen-w32-6.sh: New file, based on
8476         tests/test-mbrtowc-w32-6.sh.
8477         * tests/test-mbrlen-w32-7.sh: New file, based on
8478         tests/test-mbrtowc-w32-7.sh.
8479         * tests/test-mbrlen-w32.c: New file, based on tests/test-mbrtowc-w32.c.
8480         * modules/mbrlen-tests: New file, based on modules/mbrtowc-tests.
8481         * doc/posix-functions/mbrlen.texi: Update.
8483 2023-03-30  Bruno Haible  <bruno@clisp.org>
8485         btowc: Fix behaviour in the C locale.
8486         * lib/btowc.c: Include <string.h>
8487         (btowc): Use mbrtowc instead of mbtowc when possible.
8488         * m4/btowc.m4 (gl_FUNC_BTOWC): Test for the mingw bug in the C locale.
8489         Invoke gl_MBRTOWC_C_LOCALE. If mbrtowc is buggy in the C locale,
8490         override also btowc.
8491         (gl_PREREQ_BTOWC): Test whether mbrtowc exists.
8492         * modules/btowc (Files): Add m4/mbrtowc.m4.
8493         (Depends-on): Add mbrtowc.
8494         * tests/test-btowc.c (main): Add a test of the C locale, based on
8495         tests/test-mbrtowc.c.
8496         * tests/test-btowc3.sh: New file, based on tests/test-mbrtowc5.sh.
8497         * modules/btowc-tests (Files): Add it.
8498         (Makefile.am): Test it.
8499         * doc/posix-functions/btowc.texi: Mention the two C locale behaviour
8500         bugs and that they are worked around.
8502 2023-03-30  Bruno Haible  <bruno@clisp.org>
8504         mbrtowc tests: Add comment.
8505         * tests/test-mbrtowc.c: Add comment.
8506         * tests/test-mbrtowc5.sh: Use symmetric coding style.
8507         * doc/posix-functions/mbrtowc.texi: Update.
8509 2023-03-30  Bruno Haible  <bruno@clisp.org>
8511         stdlib tests: Check behaviour of C locale.
8512         * tests/test-stdlib.c (main): Check MB_CUR_MAX.
8514 2023-03-30  Bruno Haible  <bruno@clisp.org>
8516         string-desc tests: Fix "make distcheck" failure.
8517         * tests/test-string-desc.sh: Run the test in a subdir.
8519 2023-03-30  Bruno Haible  <bruno@clisp.org>
8521         snprintf: Avoid autoconf warning regarding gl_PRINTF_POSITIONS.
8522         * m4/printf.m4 (gl_PRINTF_POSITIONS): Define through AC_DEFUN_ONCE.
8524 2023-03-28  Bruno Haible  <bruno@clisp.org>
8526         doc: Document string-desc and related modules.
8527         * doc/string-desc.texi: New file.
8528         * doc/gnulib.texi (Particular Modules): Include it.
8530         string-desc-quotearg: Add tests.
8531         * tests/test-string-desc-quotearg.c: New file.
8532         * modules/string-desc-quotearg-tests: New file.
8534         string-desc-quotearg: New module.
8535         * lib/string-desc-quotearg.h: New file.
8536         * lib/string-desc-quotearg.c: New file.
8537         * modules/string-desc-quotearg: New file.
8539         xstring-desc: Add tests.
8540         * tests/test-xstring-desc.c: New file.
8541         * modules/xstring-desc-tests: New file.
8543         xstring-desc: New module.
8544         * lib/xstring-desc.h: New file.
8545         * lib/xstring-desc.c: New file.
8546         * modules/xstring-desc: New file.
8548         string-desc: Add tests.
8549         * tests/test-string-desc.sh: New file.
8550         * tests/test-string-desc.c: New file.
8551         * modules/string-desc-tests: New file.
8553         string-desc: New module.
8554         * lib/string-desc.h: New file.
8555         * lib/string-desc.c: New file.
8556         * lib/string-desc-contains.c: New file.
8557         * modules/string-desc: New file.
8559 2023-03-28  Bruno Haible  <bruno@clisp.org>
8561         doc: Fix placement of memset_explicit node.
8562         * doc/posix-functions/memset_explicit.texi: Define a section, not a
8563         subsection.
8565 2023-03-28  Bruno Haible  <bruno@clisp.org>
8567         doc: Update regarding linear string search.
8568         * doc/glibc-functions/memmem.texi: Update platforms list.
8569         * doc/posix-functions/strstr.texi: Likewise.
8570         * doc/glibc-functions/strcasestr.texi: Likewise.
8572 2023-03-27  Bruno Haible  <bruno@clisp.org>
8574         ialloc: Add comments.
8575         * lib/ialloc.h (imalloc, irealloc, icalloc, ireallocarray): Add
8576         comments.
8578 2023-03-27  Paul Eggert  <eggert@cs.ucla.edu>
8580         Support FALLTHROUGH macro better in glibc+clang.
8581         * lib/fnmatch.c (FALLTHROUGH): Use __attribute__ ((__fallthrough__))
8582         also in clang >= 10.
8583         * lib/fts.c (FALLTHROUGH): Likewise.
8584         * lib/regex_internal.h (FALLTHROUGH): Likewise.
8586 2023-03-27  Bruno Haible  <bruno@clisp.org>
8588         wcsstr: Ensure worst-case linear execution time.
8589         * lib/wchar.in.h (wcsstr): Consider REPLACE_WCSSTR.
8590         * lib/wcs-two-way.h: New file, based on lib/str-two-way.h.
8591         * lib/wcsstr-impl.h: If requested, use the two-way algorithm. New code
8592         based on lib/strstr.c.
8593         * m4/wcsstr.m4 (gl_FUNC_WCSSTR_SIMPLE): Renamed from gl_FUNC_WCSSTR.
8594         (gl_FUNC_WCSSTR): New macro, based on gl_FUNC_STRSTR in m4/strstr.m4.
8595         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCSSTR.
8596         * modules/wchar (Makefile.am): Substitute REPLACE_WCSSTR.
8597         * modules/wcsstr-simple: New file, based on modules/wcsstr.
8598         * modules/wcsstr (Description): Document that this module now provides
8599         an efficient implementation.
8600         (Files): Add lib/wcs-two-way.h.
8601         (Depends-on): Depend on wcsstr-simple and the dependencies of the
8602         two-way implementation.
8603         (configure.ac): Use AC_LIBOBJ instead of a conditional. Don't invoke
8604         gl_WCHAR_MODULE_INDICATOR.
8605         (Makefile.am): Don't augment lib_SOURCES.
8606         * tests/test-wcsstr.c: New file, based on tests/test-strstr.c.
8607         * modules/wcsstr-tests: New file, based on modules/strstr-tests.
8608         * doc/posix-functions/wcsstr.texi: Mention the worst-case complexity.
8609         Mention the new 'wcsstr-simple' module.
8610         * doc/posix-functions/strstr.texi: Fix typo.
8612 2023-03-27  Bruno Haible  <bruno@clisp.org>
8614         Add test case from a past musl libc bug.
8615         * tests/test-strstr.c (main): Add test of periodic needle.
8616         * tests/test-strcasestr.c (main): Likewise.
8617         * tests/test-c-strstr.c (main): Likewise.
8618         * tests/test-c-strcasestr.c (main): Likewise.
8619         * tests/test-memmem.c (main): Likewise.
8621 2023-03-27  Bruno Haible  <bruno@clisp.org>
8623         uchar: ISO C 23: Define char8_t.
8624         * lib/uchar.in.h (char8_t): New type or macro.
8625         * m4/uchar_h.m4 (gl_TYPE_CHAR8_T): New macro.
8626         (gl_UCHAR_H): Invoke it. Set CXX_HAS_CHAR8_TYPE.
8627         * modules/uchar (Makefile.am): Substitute CXX_HAS_CHAR8_TYPE,
8628         GNULIBHEADERS_OVERRIDE_CHAR8_T.
8629         * tests/test-uchar.c: Add tests for char8_t.
8631 2023-03-25  Bruno Haible  <bruno@clisp.org>
8633         stdlib: ISO C 23: Document issue with once_flag and call_once.
8634         * doc/posix-headers/stdlib.texi: Document issue and workaround.
8636 2023-03-25  Bruno Haible  <bruno@clisp.org>
8638         call_once: New module, separate from mtx.
8639         * lib/threads.in.h (call_once): Declare as part of module 'call_once',
8640         not module 'mtx'.
8641         * lib/call_once.c: New file, extracted from lib/mtx.c.
8642         * lib/mtx.c (call_once): Remove function.
8643         * m4/threads_h.m4 (gl_THREADS_H_REQUIRE_DEFAULTS): Inititalize
8644         GNULIB_CALL_ONCE.
8645         * modules/threads-h (Makefile.am): Substitute GNULIB_CALL_ONCE.
8646         * modules/call_once: New file, based on modules/mtx.
8647         * modules/threads (Depends-on): Add call_once.
8648         * tests/test-threads-c++.cc: Update accordingly.
8649         * modules/call_once-tests: New file, based on modules/mtx-tests.
8650         * modules/mtx-tests (Files): Remove tests/test-call_once.c.
8651         (Makefile.am): Don't compile test-call_once.
8652         * doc/posix-functions/call_once.texi: Document that the relevant module
8653         is now 'call_once'.
8654         * NEWS: Mention the change.
8656 2023-03-25  Bruno Haible  <bruno@clisp.org>
8658         stdio: ISO C 23: Define _PRINTF_NAN_LEN_MAX.
8659         * lib/stdio.in.h (_PRINTF_NAN_LEN_MAX): New macro.
8660         * m4/stdio_h.m4 (gl_STDIO_H): Invoke gl_MUSL_LIBC.
8661         * modules/stdio (Files): Add m4/musl.m4.
8662         * tests/test-stdio.c: Check that _PRINTF_NAN_LEN_MAX is defined.
8663         Include nan.h, macros.h.
8664         (main): Check the value of _PRINTF_NAN_LEN_MAX.
8665         * modules/stdio-tests (Files): Add tests/nan.h, tests/macros.h,
8666         m4/exponentd.m4.
8667         (configure.ac): Invoke gl_DOUBLE_EXPONENT_LOCATION.
8669 2023-03-25  Bruno Haible  <bruno@clisp.org>
8671         Make some header file tests a bit stronger.
8672         * tests/test-float.c: Include fpucw.h and macros.h only after checking
8673         the macros.
8674         * tests/test-glob-h.c: Include macros.h only after checking the types
8675         and macros.
8676         * tests/test-inttypes.c: Don't include <stddef.h>.
8677         * tests/test-math.c: Include <limits.h> and macros.h only after checking
8678         the types and macros.
8679         * tests/test-stddef.c: Include <limits.h> only after checking the types
8680         and macros.
8681         * tests/test-sys_select.c: Include signature.h only after checking the
8682         types.
8683         * tests/test-sys_socket.c: Include <errno.h> only after checking the
8684         types and macros.
8685         * tests/test-wctype-h.c: Include macros.h only after checking the types.
8687 2023-03-25  Bruno Haible  <bruno@clisp.org>
8689         is* tests: Ensure needed .m4 files are packaged.
8690         * modules/isfinite-tests (Files): Add m4/exponent*.m4.
8691         * modules/isnan-tests (Files): Likewise.
8692         * modules/isnanf-tests (Files): Add m4/exponentf.m4.
8693         * modules/isnanf-nolibm-tests (Files): Likewise.
8694         * modules/isnand-tests (Files): Add m4/exponentd.m4.
8695         * modules/isnand-nolibm-tests (Files): Likewise.
8696         * modules/isnanl-tests (Files): Add m4/exponentl.m4.
8697         * modules/isnanl-nolibm-tests (Files): Likewise.
8698         * modules/isinf-tests (Files): Reorder.
8700 2023-03-24  Bruno Haible  <bruno@clisp.org>
8702         *printf-posix: ISO C 23: Support size specifiers 'wN' and 'wfN'.
8703         * lib/printf-args.h: Include <stdint.h>.
8704         (arg_type): Add TYPE_[U]INT8_T, ..., TYPE_[U]INT_FAST64_T and
8705         TYPE_COUNT_INT8_T_POINTER, ..., TYPE_COUNT_INT_FAST64_T_POINTER.
8706         (argument): Add the union members a_[u]int8_t, ..., a_[u]int_fast64_t
8707         and a_count_int8_t_pointer, ..., a_count_int_fast64_t_pointer.
8708         * lib/printf-args.c: Include <limits.h>.
8709         (PRINTF_FETCHARGS): Handle TYPE_[U]INT8_T, ..., TYPE_[U]INT_FAST64_T and
8710         TYPE_COUNT_INT8_T_POINTER, ..., TYPE_COUNT_INT_FAST64_T_POINTER.
8711         * lib/printf-parse.c (PRINTF_PARSE): Accept only one size specifier, not
8712         a sequence of size specifiers. Accept "wN" and "wfN", where N = 8, 16,
8713         32, 64.
8714         * lib/vasnprintf.c (MAX_ROOM_NEEDED, VASNPRINTF): Handle the new TYPE_*
8715         values as well.
8716         * m4/printf.m4 (gl_PRINTF_SIZES_C23): New macro.
8717         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_IS_POSIX): Require
8718         gl_PRINTF_SIZES_C23. Test gl_cv_func_printf_sizes_c23.
8719         * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_IS_POSIX): Likewise.
8720         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_IS_POSIX): Likewise.
8721         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_IS_POSIX):
8722         Likewise.
8723         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_IS_POSIX): Likewise.
8724         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_IS_POSIX): Likewise.
8725         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_IS_POSIX): Likewise.
8726         * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_IS_POSIX): Likewise.
8727         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_IS_POSIX): Likewise.
8728         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_IS_POSIX): Likewise.
8729         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_IS_POSIX): Likewise.
8730         * tests/test-vasnprintf-posix.c (test_function): Add tests for size
8731         specifiers with %d, %u, %b, %o, %x.
8732         * tests/test-snprintf-posix.h (test_function): Likewise.
8733         * tests/test-sprintf-posix.h (test_function): Likewise.
8734         * tests/test-vasnwprintf-posix.c (test_function): Likewise.
8735         * tests/test-vasprintf-posix.c (test_function): Likewise.
8736         * modules/vasnprintf (Depends-on): Add limits-h.
8737         * modules/vasnwprintf (Depends-on): Add limits-h.
8738         * modules/c-vasnprintf (Depends-on): Add limits-h, stdint.
8739         * modules/unistdio/u-printf-args (Depends-on): Add stdint, limits-h.
8740         * doc/posix-functions/dprintf.texi: Mention the ISO C 23 size
8741         specifiers.
8742         * doc/posix-functions/fprintf.texi: Likewise.
8743         * doc/posix-functions/fwprintf.texi: Likewise.
8744         * doc/posix-functions/printf.texi: Likewise.
8745         * doc/posix-functions/snprintf.texi: Likewise.
8746         * doc/posix-functions/sprintf.texi: Likewise.
8747         * doc/posix-functions/swprintf.texi: Likewise.
8748         * doc/posix-functions/vdprintf.texi: Likewise.
8749         * doc/posix-functions/vfprintf.texi: Likewise.
8750         * doc/posix-functions/vfwprintf.texi: Likewise.
8751         * doc/posix-functions/vprintf.texi: Likewise.
8752         * doc/posix-functions/vsnprintf.texi: Likewise.
8753         * doc/posix-functions/vsprintf.texi: Likewise.
8754         * doc/posix-functions/vswprintf.texi: Likewise.
8755         * doc/posix-functions/vwprintf.texi: Likewise.
8756         * doc/posix-functions/wprintf.texi: Likewise.
8758 2023-03-24  Bruno Haible  <bruno@clisp.org>
8760         xprintf-gnu: New module.
8761         * modules/xprintf-gnu: New file, based on modules/vasnprintf-gnu and
8762         modules/xprintf-posix.
8764 2023-03-24  Bruno Haible  <bruno@clisp.org>
8766         xvasprintf-gnu: New module.
8767         * modules/xvasprintf-gnu: New file, based on modules/xvasprintf-posix.
8769 2023-03-24  Bruno Haible  <bruno@clisp.org>
8771         vasnwprintf-gnu: Add tests.
8772         * tests/test-vasnwprintf-gnu.c: New file, based on
8773         tests/test-vasnwprintf-posix.c and tests/test-vasnprintf-gnu.c.
8774         * modules/vasnwprintf-gnu-tests: New file, based on
8775         modules/vasnwprintf-posix-tests.
8777         vasnwprintf-gnu: New module.
8778         * m4/vasnwprintf-posix.m4 (gl_FUNC_VASNWPRINTF_IS_POSIX): New macro.
8779         (gl_FUNC_VASNWPRINTF_POSIX): Require it. Invoke
8780         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
8781         * m4/vasnwprintf-gnu.m4: New file, based on m4/vasnprintf-gnu.m4.
8782         * modules/vasnwprintf-gnu: New file, based on modules/vasnprintf-gnu.
8784 2023-03-24  Bruno Haible  <bruno@clisp.org>
8786         obstack-printf-gnu: Add tests.
8787         * modules/obstack-printf-gnu-tests: New file, based on
8788         modules/obstack-printf-posix-tests.
8790         obstack-printf-gnu: New module.
8791         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_IS_POSIX): New
8792         macro, extracted from gl_FUNC_OBSTACK_PRINTF_POSIX.
8793         (gl_FUNC_OBSTACK_PRINTF_POSIX): Require it. Invoke
8794         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
8795         * m4/obstack-printf-gnu.m4: New file, based on
8796         m4/obstack-printf-posix.m4.
8797         * modules/obstack-printf-gnu: New file, based on modules/vasnprintf-gnu.
8798         * doc/glibc-functions/obstack_printf.texi: Mention the new module.
8799         * doc/glibc-functions/obstack_vprintf.texi: Likewise.
8801 2023-03-24  Bruno Haible  <bruno@clisp.org>
8803         dprintf-gnu: Add tests.
8804         * tests/test-dprintf-gnu.sh: New file, based on
8805         tests/test-dprintf-posix.sh.
8806         * tests/test-dprintf-gnu.c: New file, based on
8807         tests/test-vasnprintf-gnu.c.
8808         * modules/dprintf-gnu-tests: New file, based on
8809         modules/dprintf-posix-tests.
8811         dprintf-gnu: New module.
8812         * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_IS_POSIX): New macro,
8813         extracted from gl_FUNC_DPRINTF_POSIX.
8814         (gl_FUNC_DPRINTF_POSIX): Require it. Invoke
8815         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
8816         * m4/dprintf-gnu.m4: New file, based on m4/dprintf-posix.m4.
8817         * modules/dprintf-gnu: New file, based on modules/vasnprintf-gnu.
8818         * doc/posix-functions/dprintf.texi: Mention the new module.
8820 2023-03-24  Bruno Haible  <bruno@clisp.org>
8822         vdprintf-gnu: Add tests.
8823         * tests/test-vdprintf-gnu.sh: New file, based on
8824         tests/test-vdprintf-posix.sh.
8825         * tests/test-vdprintf-gnu.c: New file, based on
8826         tests/test-vdprintf-posix.c.
8827         * modules/vdprintf-gnu-tests: New file, based on
8828         modules/vdprintf-posix-tests.
8830         vdprintf-gnu: New module.
8831         * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_IS_POSIX): New macro,
8832         extracted from gl_FUNC_VDPRINTF_POSIX.
8833         (gl_FUNC_VDPRINTF_POSIX): Require it. Invoke
8834         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
8835         * m4/vdprintf-gnu.m4: New file, based on m4/vdprintf-posix.m4.
8836         * modules/vdprintf-gnu: New file, based on modules/vasnprintf-gnu.
8837         * doc/posix-functions/vdprintf.texi: Mention the new module.
8839 2023-03-24  Bruno Haible  <bruno@clisp.org>
8841         printf-gnu: Add tests.
8842         * tests/test-printf-gnu.sh: New file, based on
8843         tests/test-printf-posix.sh.
8844         * tests/test-printf-gnu.c: New file, based on tests/test-printf-posix.c.
8845         * modules/printf-gnu-tests: New file, based on
8846         modules/printf-posix-tests.
8848         printf-gnu: New module.
8849         * m4/printf-posix.m4: Renamed from m4/printf-posix-rpl.m4.
8850         (gl_FUNC_PRINTF_IS_POSIX): New macro.
8851         (gl_FUNC_PRINTF_POSIX): Require it. Don't require
8852         gl_FUNC_VFPRINTF_POSIX. Invoke gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS
8853         and gl_REPLACE_VASNPRINTF.
8854         * m4/printf-gnu.m4: New file, based on m4/fprintf-posix.m4.
8855         * modules/printf-posix (Files): Update.
8856         * modules/printf-gnu: New file, based on modules/vasnprintf-gnu.
8857         * doc/posix-functions/printf.texi: Mention the new module.
8859 2023-03-24  Bruno Haible  <bruno@clisp.org>
8861         vprintf-gnu: Add tests.
8862         * tests/test-vprintf-gnu.sh: New file, based on
8863         tests/test-vprintf-posix.sh.
8864         * tests/test-vprintf-gnu.c: New file, based on
8865         tests/test-vprintf-posix.c.
8866         * tests/test-printf-gnu.h: New file, based on
8867         tests/test-vasnprintf-gnu.c.
8868         * modules/vprintf-gnu-tests: New file, based on
8869         modules/vprintf-posix-tests.
8871         vprintf-gnu: New module.
8872         * m4/vprintf-posix.m4 (gl_FUNC_VPRINTF_IS_POSIX): New macro.
8873         (gl_FUNC_VPRINTF_POSIX): Require it. Don't require
8874         gl_FUNC_VFPRINTF_POSIX. Invoke gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS
8875         and gl_REPLACE_VASNPRINTF.
8876         * m4/vprintf-gnu.m4: New file, based on m4/vfprintf-posix.m4.
8877         * modules/vprintf-gnu: New file, based on modules/vasnprintf-gnu.
8878         * doc/posix-functions/vprintf.texi: Mention the new module.
8880 2023-03-24  Bruno Haible  <bruno@clisp.org>
8882         fprintf-gnu: Add tests.
8883         * tests/test-fprintf-gnu.sh: New file, based on
8884         tests/test-fprintf-posix.sh.
8885         * tests/test-fprintf-gnu.c: New file, based on
8886         tests/test-fprintf-posix.c.
8887         * modules/fprintf-gnu-tests: New file, based on
8888         modules/fprintf-posix-tests.
8890         fprintf-gnu: New module.
8891         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_IS_POSIX): New macro,
8892         extracted from gl_FUNC_FPRINTF_POSIX.
8893         (gl_FUNC_FPRINTF_POSIX): Require it. Invoke
8894         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
8895         * m4/fprintf-gnu.m4: New file, based on m4/fprintf-posix.m4.
8896         * modules/fprintf-gnu: New file, based on modules/vasnprintf-gnu.
8897         * doc/posix-functions/fprintf.texi: Mention the new module.
8899 2023-03-24  Bruno Haible  <bruno@clisp.org>
8901         vfprintf-gnu: Add tests.
8902         * tests/test-vfprintf-gnu.sh: New file, based on
8903         tests/test-vfprintf-posix.sh.
8904         * tests/test-vfprintf-gnu.c: New file, based on
8905         tests/test-vfprintf-posix.c.
8906         * tests/test-fprintf-gnu.h: New file, based on
8907         tests/test-vasnprintf-gnu.c.
8908         * tests/test-printf-gnu.output: New file, based on
8909         tests/test-vasnprintf-gnu.c.
8910         * modules/vfprintf-gnu-tests: New file, based on
8911         modules/vfprintf-posix-tests.
8913         vfprintf-gnu: New module.
8914         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_IS_POSIX): New macro,
8915         extracted from gl_FUNC_VFPRINTF_POSIX.
8916         (gl_FUNC_VFPRINTF_POSIX): Require it. Invoke
8917         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
8918         * m4/vfprintf-gnu.m4: New file, based on m4/vfprintf-posix.m4.
8919         * modules/vfprintf-gnu: New file, based on modules/vasnprintf-gnu.
8920         * doc/posix-functions/vfprintf.texi: Mention the new module.
8922 2023-03-24  Bruno Haible  <bruno@clisp.org>
8924         vasprintf-gnu: Add tests.
8925         * tests/test-vasprintf-gnu.c: New file, based on
8926         tests/test-vasprintf-posix.c and tests/test-vasnprintf-gnu.c.
8927         * modules/vasprintf-gnu-tests: New file, based on
8928         modules/vasprintf-posix-tests.
8930         vasprintf-gnu: New module.
8931         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_IS_POSIX): New macro,
8932         extracted from gl_FUNC_VASPRINTF_POSIX.
8933         (gl_FUNC_VASPRINTF_POSIX): Require it. Invoke
8934         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
8935         * m4/vasprintf-gnu.m4: New file, based on m4/vasprintf-posix.m4.
8936         * modules/vasprintf-gnu: New file, based on modules/vasnprintf-gnu.
8937         * doc/glibc-functions/vasprintf.texi: Mention the new module.
8938         * doc/glibc-functions/asprintf.texi: Likewise.
8940 2023-03-24  Bruno Haible  <bruno@clisp.org>
8942         sprintf-gnu: Add tests.
8943         * tests/test-sprintf-gnu.c: New file, based on
8944         tests/test-sprintf-posix.c.
8945         * modules/sprintf-gnu-tests: New file, based on
8946         modules/sprintf-posix-tests.
8948         sprintf-gnu: New module.
8949         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_IS_POSIX): New macro,
8950         extracted from gl_FUNC_SPRINTF_POSIX.
8951         (gl_FUNC_SPRINTF_POSIX): Require it. Invoke
8952         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
8953         * m4/sprintf-gnu.m4: New file, based on m4/sprintf-posix.m4.
8954         * modules/sprintf-gnu: New file, based on modules/vasnprintf-gnu.
8955         * doc/posix-functions/sprintf.texi: Mention the new module.
8957 2023-03-24  Bruno Haible  <bruno@clisp.org>
8959         vsprintf-gnu: Add tests.
8960         * tests/test-vsprintf-gnu.c: New file, based on
8961         tests/test-vsprintf-posix.c.
8962         * tests/test-sprintf-gnu.h: New file, based on
8963         tests/test-vasnprintf-gnu.c.
8964         * modules/vsprintf-gnu-tests: New file, based on
8965         modules/vsprintf-posix-tests.
8967         vsprintf-gnu: New module.
8968         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_IS_POSIX): New macro,
8969         extracted from gl_FUNC_VSPRINTF_POSIX.
8970         (gl_FUNC_VSPRINTF_POSIX): Require it. Invoke
8971         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
8972         * m4/vsprintf-gnu.m4: New file, based on m4/vsprintf-posix.m4.
8973         * modules/vsprintf-gnu: New file, based on modules/vasnprintf-gnu.
8974         * doc/posix-functions/vsprintf.texi: Mention the new module.
8976 2023-03-24  Bruno Haible  <bruno@clisp.org>
8978         snprintf-gnu: Add tests.
8979         * tests/test-snprintf-gnu.c: New file, based on
8980         tests/test-snprintf-posix.c.
8981         * modules/snprintf-gnu-tests: New file, based on
8982         modules/snprintf-posix-tests.
8984         snprintf-gnu: New module.
8985         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_IS_POSIX): New macro,
8986         extracted from gl_FUNC_SNPRINTF_POSIX.
8987         (gl_FUNC_SNPRINTF_POSIX): Require it. Invoke
8988         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
8989         * m4/snprintf-gnu.m4: New file, based on m4/snprintf-posix.m4.
8990         * modules/snprintf-gnu: New file, based on modules/vasnprintf-gnu.
8991         * doc/posix-functions/snprintf.texi: Mention the new module.
8993 2023-03-24  Bruno Haible  <bruno@clisp.org>
8995         vsnprintf-gnu: Add tests.
8996         * tests/test-vsnprintf-gnu.c: New file, based on
8997         tests/test-vsnprintf-posix.c.
8998         * tests/test-snprintf-gnu.h: New file, based on
8999         tests/test-vasnprintf-gnu.c.
9000         * modules/vsnprintf-gnu-tests: New file, based on
9001         modules/vsnprintf-posix-tests.
9003         vsnprintf-gnu: New module.
9004         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_IS_POSIX): New macro,
9005         extracted from gl_FUNC_VSNPRINTF_POSIX.
9006         (gl_FUNC_VSNPRINTF_POSIX): Require it. Invoke
9007         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
9008         * m4/vsnprintf-gnu.m4: New file, based on m4/vsnprintf-posix.m4.
9009         * modules/vsnprintf-gnu: New file, based on modules/vasnprintf-gnu.
9010         * doc/posix-functions/vsnprintf.texi: Mention the new module.
9012 2023-03-23  Bruno Haible  <bruno@clisp.org>
9014         vasnprintf-gnu: Add tests.
9015         * tests/test-vasnprintf-gnu.c: New file, based on
9016         tests/test-vasnprintf-posix.c.
9017         * modules/vasnprintf-gnu-tests: New file.
9019         vasnprintf-gnu: New module.
9020         Suggested by Eric Blake in
9021         <https://lists.gnu.org/archive/html/bug-gnulib/2023-03/msg00060.html>.
9022         * lib/printf-parse.c (PRINTF_PARSE): Recognize the 'B' conversion.
9023         * lib/printf-parse.h: Update comments.
9024         * lib/wprintf-parse.h: Likewise.
9025         * lib/vasnprintf.c (MAX_ROOM_NEEDED): Treat the 'B' conversion like 'b'.
9026         (VASNPRINTF): Implement 'B' conversion if
9027         NEED_PRINTF_DIRECTIVE_UPPERCASE_B is set. Support the 'B' conversion if
9028         requested.
9029         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_B): When cross-compiling, guess yes
9030         on glibc >= 2.35.
9031         (gl_PRINTF_DIRECTIVE_UPPERCASE_B): New macro.
9032         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS): Renamed
9033         from gl_PREREQ_VASNPRINTF_WITH_EXTRAS.
9034         (gl_PREREQ_VASNPRINTF_DIRECTIVE_UPPERCASE_B,
9035         gl_PREREQ_VASNPRINTF_WITH_GNU_EXTRAS): New macros.
9036         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_IS_POSIX): New macro,
9037         extracted from gl_FUNC_VASNPRINTF_POSIX.
9038         (gl_FUNC_VASNPRINTF_POSIX): Require it. Invoke
9039         gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
9040         * m4/vasnprintf-gnu.m4: New file.
9041         * modules/vasnprintf-gnu: New file.
9042         * modules/c-vasnprintf (configure.ac): Update.
9043         * modules/unistdio/u8-vasnprintf (configure.ac): Likewise.
9044         * modules/unistdio/u8-u8-vasnprintf (configure.ac): Likewise.
9045         * modules/unistdio/u16-vasnprintf (configure.ac): Likewise.
9046         * modules/unistdio/u16-u16-vasnprintf (configure.ac): Likewise.
9047         * modules/unistdio/u32-vasnprintf (configure.ac): Likewise.
9048         * modules/unistdio/u32-u32-vasnprintf (configure.ac): Likewise.
9049         * modules/unistdio/ulc-vasnprintf (configure.ac): Likewise.
9051 2023-03-23  Bruno Haible  <bruno@clisp.org>
9053         printf-posix tests: Fix compilation error (regression 2021-08-28).
9054         * modules/printf-posix-tests (Files): Add tests/qemu.h.
9056 2023-03-22  Jim Meyering  <meyering@fb.com>
9058         gnu-web-doc-update: don't use host alias, cvs.sv.gnu.org
9059         * build-aux/gnu-web-doc-update: Use hostname cvs.savannah.gnu.org,
9060         not cvs.sv.gnu.org. Using the shorter alias would elicit this:
9061           $ pkg=grep ; cvs -d $USER@cvs.sv.gnu.org:/webcvs/$pkg co $pkg
9062           Bad server host key: Invalid key length
9064 2023-03-22  Bruno Haible  <bruno@clisp.org>
9066         *printf-posix: Fix implementation of %b directive.
9067         * lib/vasnprintf.c (VASNPRINTF): In the %b directive implementation, fix
9068         the precision handling, and ignore the '0' flag when a width and a
9069         precision are both present.
9070         * tests/test-snprintf-posix.h (test_function): Add test cases for the %x
9071         directive and more test cases for the %b directive.
9072         * tests/test-sprintf-posix.h (test_function): Likewise.
9073         * tests/test-vasnprintf-posix.c (test_function): Likewise.
9074         * tests/test-vasnwprintf-posix.c (test_function): Likewise.
9075         * tests/test-vasprintf-posix.c (test_function): Likewise.
9076         * modules/vasnwprintf-posix-tests (Files): Add m4/musl.m4.
9077         (configure.ac): Invoke gl_MUSL_LIBC.
9079 2023-03-22  Bruno Haible  <bruno@clisp.org>
9081         vasnwprintf: Fix a warning: implicit declaration of function ‘wcsnlen’.
9082         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Test also whether wcsnlen is
9083         declared.
9084         * lib/vasnprintf.c (local_wcsnlen): Together with HAVE_WCSNLEN, test
9085         also HAVE_DECL_WCSNLEN.
9087 2023-03-22  Bruno Haible  <bruno@clisp.org>
9089         vasnwprintf: Fix a "warning: unused function local_wcsnlen".
9090         * lib/vasnprintf.c: Adjust #if conditions.
9092 2023-03-22  Bruno Haible  <bruno@clisp.org>
9094         vasnwprintf: Fix test failures on FreeBSD, NetBSD, AIX, mingw.
9095         * m4/printf.m4 (gl_SWPRINTF_WORKS): New macro.
9096         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke it and define
9097         HAVE_WORKING_SWPRINTF accordingly.
9098         * lib/vasnprintf.c: Together with HAVE_SWPRINTF, test also
9099         HAVE_WORKING_SWPRINTF.
9100         (VASNPRINTF): If WIDE_CHAR_VERSION && !DCHAR_IS_TCHAR, don't pass a
9101         wchar_t[] to snprintf. Add a workaround against mingw's snwprintf
9102         function.
9103         * doc/posix-functions/swprintf.texi: Document the null wide character
9104         bug.
9106 2023-03-22  Bruno Haible  <bruno@clisp.org>
9108         vasnwprintf: Fix a "warning: unused function 'wmax_room_needed'".
9109         * lib/vasnprintf.c (MAX_ROOM_NEEDED): Adjust #if condition.
9111 2023-03-22  Bruno Haible  <bruno@clisp.org>
9113         vasnwprintf: Simplify last change.
9114         * lib/vasnprintf.c (VASNPRINTF): Remove unused variable 'len'.
9116 2023-03-22  Bruno Haible  <bruno@clisp.org>
9118         vasnwprintf tests: Fix link errors on AIX.
9119         * modules/vasnwprintf (Link): New section.
9120         * modules/vasnwprintf-posix (Link): New section.
9121         * modules/vasnwprintf-tests (Makefile.am): Link test-vasnwprintf with
9122         $(MBRTOWC_LIB).
9123         * modules/vasnwprintf-posix-tests (Makefile.am): Link
9124         test-vasnwprintf-posix, test-vasnwprintf-posix2, test-vasnwprintf-posix3
9125         with $(MBRTOWC_LIB).
9127 2023-03-22  Bruno Haible  <bruno@clisp.org>
9129         gnu-web-doc-update: Make it work for the first upload of a manual.
9130         Reported by Reuben Thomas <rrt@sc3d.org> in
9131         <https://lists.gnu.org/archive/html/bug-gnulib/2023-03/msg00066.html>.
9132         * build-aux/gnu-web-doc-update: Put the 'manual' directory under version
9133         control if it is not yet.
9135 2023-03-21  Bruno Haible  <bruno@clisp.org>
9137         unistdio/u*-vasnprintf: Fix conversion of %Id directive result.
9138         * lib/vasnprintf.c (VASNPRINTF): Don't assume that snprintf's result is
9139         entirely ASCII if the directive contain the glibc 'I' flag.
9141 2023-03-21  Bruno Haible  <bruno@clisp.org>
9143         vasnwprintf: Fix for older platforms without swprintf.
9144         * lib/vasnprintf.c (VASNPRINTF): In the %lc handling, ignore the
9145         precision. Convert the snprintf result to a wchar_t[] not by mbsrtowcs,
9146         but by a loop that does not stop at NUL characters.
9147         * tests/test-vasnwprintf-posix.c (test_function): Add more tests for the
9148         %c and %lc directives.
9149         * modules/vasnwprintf (Depends-on): Add mbrtowc. Remove mbsrtowcs.
9151 2023-03-21  Bruno Haible  <bruno@clisp.org>
9153         *printf-posix: Work around bug with %lc of 0 on many platforms.
9154         * lib/vasnprintf.c (local_wctomb): Define also for
9155         NEED_PRINTF_DIRECTIVE_LC.
9156         (VASNPRINTF): Implement %lc handling ourselves if
9157         NEED_PRINTF_DIRECTIVE_LC.
9158         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LC): New macro.
9159         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_LC): New macro.
9160         (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): Invoke it.
9161         * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_POSIX): Require
9162         gl_PRINTF_DIRECTIVE_LC and test its result. Invoke
9163         gl_PREREQ_VASNPRINTF_DIRECTIVE_LC.
9164         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
9165         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_POSIX): Likewise.
9166         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
9167         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
9168         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
9169         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
9170         * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_POSIX): Likewise.
9171         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
9172         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
9173         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
9174         * tests/test-snprintf-posix.h (test_function): Add more tests for the
9175         %c and %lc directives.
9176         * tests/test-sprintf-posix.h (test_function): Likewise.
9177         * tests/test-vasnprintf-posix.c (test_function): Likewise.
9178         * tests/test-vasprintf-posix.c (test_function): Likewise.
9179         * doc/glibc-functions/asprintf.texi: Mention the %lc 0 bug.
9180         * doc/glibc-functions/obstack_printf.texi: Likewise.
9181         * doc/glibc-functions/obstack_vprintf.texi: Likewise.
9182         * doc/glibc-functions/vasprintf.texi: Likewise.
9183         * doc/posix-functions/dprintf.texi: Likewise.
9184         * doc/posix-functions/fprintf.texi: Likewise.
9185         * doc/posix-functions/printf.texi: Likewise.
9186         * doc/posix-functions/snprintf.texi: Likewise.
9187         * doc/posix-functions/sprintf.texi: Likewise.
9188         * doc/posix-functions/vdprintf.texi: Likewise.
9189         * doc/posix-functions/vfprintf.texi: Likewise.
9190         * doc/posix-functions/vprintf.texi: Likewise.
9191         * doc/posix-functions/vsnprintf.texi: Likewise.
9192         * doc/posix-functions/vsprintf.texi: Likewise.
9194 2023-03-21  Ar Rakin  <rakinar2@onesoftnet.eu.org>  (tiny change)
9196         gnupload: correct SFTP connection URL
9197         Approved by Sergey Poznyakoff in
9198         <https://lists.gnu.org/archive/html/bug-gnulib/2023-03/msg00078.html>.
9199         * build-aux/gnupload: fix gnu.org.ua SFTP connection URL:
9200         puszcza.gnu.org.ua -> download.gnu.org.ua
9202 2023-03-20  Bruno Haible  <bruno@clisp.org>
9204         memrchr tests: Avoid GCC warning.
9205         * tests/test-memrchr.c: Don't use '#pragma GCC diagnostic' for GCC
9206         versions older than 4.7.
9208 2023-03-20  Bruno Haible  <bruno@clisp.org>
9210         unistdio: Simplify code.
9211         * lib/unistdio/u8-vasnprintf.c (DCHAR_T_IS_UINT8_T): Remove unused
9212         macro.
9213         * lib/unistdio/u8-u8-vasnprintf.c: Likewise.
9214         * lib/unistdio/u16-vasnprintf.c (DCHAR_T_IS_UINT16_T): Remove unused
9215         macro.
9216         * lib/unistdio/u16-u32-vasnprintf.c: Likewise.
9217         * lib/unistdio/u32-vasnprintf.c (DCHAR_T_IS_UINT32_T): Remove unused
9218         macro.
9219         * lib/unistdio/u32-u32-vasnprintf.c: Likewise.
9221 2023-03-20  Bruno Haible  <bruno@clisp.org>
9223         vasnwprintf: Port to older platforms without swprintf.
9224         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Test for swprintf.
9225         * lib/vasnprintf.c (TCHAR_T, DCHAR_IS_TCHAR, SNPRINTF): When
9226         WIDE_CHAR_VERSION and swprintf does not exist, use TCHAR_T = char,
9227         SNPRINTF = snprintf, and !DCHAR_IS_TCHAR.
9228         (VASNPRINTF): In this case, implement %ls and %lc directly. Adjust a
9229         couple of #if conditions. For the conversion from TCHAR_T[] to
9230         DCHAR_T[], use mbsrtowcs.
9231         * modules/vasnwprintf (Depends-on): Add mbsrtowcs.
9233 2023-03-20  Bruno Haible  <bruno@clisp.org>
9235         wmemset: Relicense under LGPLv2+.
9236         * modules/wmemset (License): Change to LGPLv2+.
9237         * lib/wmemset.c: Update license notice.
9238         * lib/wmemset-impl.h: Likewise.
9240 2023-03-20  Bruno Haible  <bruno@clisp.org>
9242         wmemcpy: Relicense under LGPLv2+.
9243         * modules/wmemcpy (License): Change to LGPLv2+.
9244         * lib/wmemcpy.c: Update license notice.
9245         * lib/wmemcpy-impl.h: Likewise.
9247 2023-03-19  Bruno Haible  <bruno@clisp.org>
9249         vasnwprintf: Fix test failures on musl libc.
9250         * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke gl_MUSL_LIBC.
9251         * lib/vasnprintf.c (VASNPRINTF): On musl libc, when WIDE_CHAR_VERSION,
9252         - force pad_ourselves to be 1,
9253         - don't use %n.
9254         Fix zero-padding when the result starts with a prefix "0x" or "0b".
9255         * modules/vasnwprintf (Files): Add musl.m4.
9256         * doc/posix-functions/swprintf.texi: Mention two musl libc bugs.
9258 2023-03-19  Bruno Haible  <bruno@clisp.org>
9260         vasnwprintf: Fix module dependencies.
9261         * modules/vasnwprintf (Depends-on): Add wmemcpy, wmemset.
9262         * modules/vasnwprintf-tests (Depends-on): Add wmemcmp.
9263         * modules/vasnwprintf-posix-tests (Depends-on): Likewise.
9265 2023-03-19  Paul Eggert  <eggert@cs.ucla.edu>
9267         test-pselect, test-select: use different ports
9268         I have observed rare and hard-to-reproduce problems with the GNU
9269         grep release candidate with ‘make -j5 check’ on Fedora 37 x86-64.
9270         One possibility is that test-pselect and test-select interfere
9271         with each other somehow when run simultaneously, as they use the
9272         same port.  Work around this possibility by using different ports
9273         from each other, and from test-poll (which also uses 12345).
9274         Of course it’d be better if all these tests used system-assigned
9275         ports, but I assume that’d take more work.
9276         * tests/test-pselect.c, tests/test-select.c (TEST_PORT): New macro.
9277         * tests/test-select.h (TEST_PORT): Remove.
9279 2023-03-19  Bruno Haible  <bruno@clisp.org>
9281         Update MODULES.html.sh.
9282         * MODULES.html.sh: Move stack, wmempcpy, bison to different sections.
9283         Fix a HTML layout problem.
9285 2023-03-18  Paul Eggert  <eggert@cs.ucla.edu>
9287         dfa: pacify Oracle Solaris Studio 12.6
9288         Without this patch, the compiler complains “statement not reached”.
9289         * lib/dfa.c (lex): Refactor to omit unreachable statement.
9291         Update MODULES.html.sh
9292         * MODULES.html.sh: Add some recently-added modules.
9293         This is by no means a complete update.  I needed to point
9294         to something about ‘time’ so I added ‘time’, and then added
9295         more modules until I ran out of, errr, time.
9296         Assuming MODULES.html.sh is still useful,
9297         at some point a more-complete update should be done.
9299 2023-03-17  Bruno Haible  <bruno@clisp.org>
9301         *printf-posix: ISO C 23: Add %b directive for binary output of integers.
9302         * lib/printf-parse.c (PRINTF_PARSE): Recognize the 'b' directive.
9303         * lib/printf-parse.h: Update comment.
9304         * lib/wprintf-parse.h: Likewise.
9305         * lib/vasnprintf.c (MAX_ROOM_NEEDED, VASNPRINTF): Add support for the
9306         'b' directive.
9307         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_B): New macro.
9308         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_B): New macro.
9309         (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): Invoke it.
9310         * m4/vasnwprintf-posix.m4 (gl_FUNC_VASNWPRINTF_POSIX): Invoke
9311         gl_PREREQ_VASNPRINTF_DIRECTIVE_B.
9312         * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_POSIX): Require
9313         gl_PRINTF_DIRECTIVE_B and test its result. Invoke
9314         gl_PREREQ_VASNPRINTF_DIRECTIVE_B.
9315         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
9316         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_POSIX): Likewise.
9317         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
9318         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
9319         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
9320         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
9321         * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_POSIX): Likewise.
9322         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
9323         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
9324         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
9325         * tests/test-snprintf-posix.h (test_function): Add some tests of the %b
9326         directive.
9327         * tests/test-sprintf-posix.h (test_function): Likewise.
9328         * tests/test-vasnprintf-posix.c (test_function): Likewise.
9329         * tests/test-vasnwprintf-posix.c (test_function): Likewise.
9330         * tests/test-vasprintf-posix.c (test_function): Likewise.
9331         * doc/glibc-functions/asprintf.texi: Mention the 'b' directive.
9332         * doc/glibc-functions/obstack_printf.texi: Likewise.
9333         * doc/glibc-functions/obstack_vprintf.texi: Likewise.
9334         * doc/glibc-functions/vasprintf.texi: Likewise.
9335         * doc/posix-functions/dprintf.texi: Likewise.
9336         * doc/posix-functions/fprintf.texi: Likewise.
9337         * doc/posix-functions/fwprintf.texi: Likewise.
9338         * doc/posix-functions/printf.texi: Likewise.
9339         * doc/posix-functions/snprintf.texi: Likewise.
9340         * doc/posix-functions/sprintf.texi: Likewise.
9341         * doc/posix-functions/swprintf.texi: Likewise.
9342         * doc/posix-functions/vdprintf.texi: Likewise.
9343         * doc/posix-functions/vfprintf.texi: Likewise.
9344         * doc/posix-functions/vfwprintf.texi: Likewise.
9345         * doc/posix-functions/vprintf.texi: Likewise.
9346         * doc/posix-functions/vsnprintf.texi: Likewise.
9347         * doc/posix-functions/vsprintf.texi: Likewise.
9348         * doc/posix-functions/vswprintf.texi: Likewise.
9349         * doc/posix-functions/vwprintf.texi: Likewise.
9350         * doc/posix-functions/wprintf.texi: Likewise.
9352 2023-03-17  Bruno Haible  <bruno@clisp.org>
9354         vasnprintf, vasnwprintf: Simplify code.
9355         * lib/vasnprintf.c (MAX_ROOM_NEEDED): Remove dead code: The directives
9356         'o', 'x', 'X' always take an unsigned integer argument.
9358 2023-03-17  Bruno Haible  <bruno@clisp.org>
9360         vasnwprintf: Fix test failure on OpenBSD.
9361         * lib/vasnprintf.c (VASNPRINTF): Don't use the %n directive on OpenBSD.
9363 2023-03-17  Bruno Haible  <bruno@clisp.org>
9365         time: Fix test failure on AIX 7.2.
9366         * m4/time.m4 (gl_FUNC_TIME): Guess that it does not work on AIX.
9367         * doc/posix-functions/time.texi: Mention the bug on AIX.
9369         time: Fix test failure on native Windows.
9370         * m4/time.m4 (gl_FUNC_TIME): Guess that it does not work on native
9371         Windows.
9372         * modules/time (Depends-on): Add gettimeofday.
9373         * doc/posix-functions/time.texi: Mention the bug on Windows.
9375 2023-03-17  Bruno Haible  <bruno@clisp.org>
9377         vasnprintf, vasnwprintf: Include all necessary workarounds in libintl.
9378         * lib/vasnprintf.c: Remove IN_LIBINTL special-casing.
9380 2023-03-17  Bruno Haible  <bruno@clisp.org>
9382         vasnwprintf-posix: Add tests.
9383         * tests/test-vasnwprintf-posix.c: New file, based on
9384         tests/test-vasnprintf-posix.c.
9385         * tests/test-vasnwprintf-posix2.sh: New file, based on
9386         tests/test-vasnprintf-posix2.sh.
9387         * tests/test-vasnwprintf-posix2.c: New file, based on
9388         tests/test-vasnprintf-posix2.c.
9389         * tests/test-vasnwprintf-posix3.c: New file, based on
9390         tests/test-vasnprintf-posix3.c.
9391         * modules/vasnwprintf-posix-tests: New file, based on
9392         modules/vasnprintf-posix-tests.
9394         vasnwprintf-posix: New module.
9395         * m4/vasnwprintf-posix.m4: New file.
9396         * modules/vasnwprintf-posix: New file, based on
9397         modules/vasnprintf-posix.
9399 2023-03-17  Bruno Haible  <bruno@clisp.org>
9401         vasnprintf-posix: Relicense under LGPLv2+.
9402         * modules/vasnprintf-posix (License): Change to LGPLv2+.
9404 2023-03-17  Bruno Haible  <bruno@clisp.org>
9406         vasnwprintf: Add tests.
9407         * tests/test-vasnwprintf.c: New file, based on tests/test-vasnprintf.c.
9408         * modules/vasnwprintf-tests: New file, based on
9409         modules/vasnprintf-tests.
9411         vasnwprintf: New module.
9412         * lib/vasnprintf.c: Enable more code for WIDE_CHAR_VERSION, because
9413         snwprintf()/_snwprintf() (Windows) and swprintf() (Unix) don't return
9414         the needed buffer size, like snprintf does.
9415         * lib/wprintf-parse.h: New file, based on lib/printf-parse.h and
9416         gettext/gettext-runtime/intl/wprintf-parse.h.
9417         * lib/wprintf-parse.c: New file, based on
9418         gettext/gettext-runtime/intl/printf.c.
9419         * lib/vasnwprintf.h: New file, based on lib/vasnprintf.h and
9420         gettext/gettext-runtime/intl/vasnwprintf.h.
9421         * lib/vasnwprintf.c: New file.
9422         * lib/asnwprintf.c: New file, based on lib/asnprintf.c.
9423         * m4/vasnprintf.m4 (gl_FUNC_VASNWPRINTF): New macro.
9424         (gl_PREREQ_VASNXPRINTF): New macro, extracted from gl_PREREQ_VASNPRINTF.
9425         (gl_PREREQ_VASNPRINTF): Invoke it. Don't test for wcsnlen and mbrtowc.
9426         (gl_PREREQ_VASNWPRINTF): New macro.
9427         * modules/vasnwprintf: New file, based on modules/vasnprintf.
9429 2023-03-16  Bruno Haible  <bruno@clisp.org>
9431         strtol, strtoll, strtoul, strtoull: Make ISO C 23 compliant.
9432         * lib/strtol.c (INTERNAL (strtol)): Treat 'b' and base 2 like 'x' and
9433         base 16. Based on glibc commit 64924422a99690d147a166b4de3103f3bf3eaf6c
9434         by Joseph Myers.
9435         * m4/strtol.m4 (gl_FUNC_STRTOL): Test also whether parsing binary
9436         integers works. Update cross-compilation guesses.
9437         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
9438         * m4/strtoul.m4 (gl_FUNC_STRTOUL): Likewise.
9439         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise.
9440         * tests/test-strtol.c (main): Add tests of parsing binary integers.
9441         * tests/test-strtoll.c (main): Likewise.
9442         * tests/test-strtoul.c (main): Likewise.
9443         * tests/test-strtoull.c (main): Likewise.
9444         * doc/posix-functions/strtol.texi: Mention the problem with parsing
9445         binary integers.
9446         * doc/posix-functions/strtoll.texi: Likewise.
9447         * doc/posix-functions/strtoul.texi: Likewise.
9448         * doc/posix-functions/strtoull.texi: Likewise.
9450 2023-03-16  Bruno Haible  <bruno@clisp.org>
9452         timegm: Document under ISO C and POSIX substitutes.
9453         * doc/posix-functions/timegm.texi: Renamed from doc/glibc-functions/timegm.texi.
9454         * doc/gnulib.texi (Function Substitutes): Include timegm.texi here...
9455         (Glibc time.h): ... not here.
9457 2023-03-16  Bruno Haible  <bruno@clisp.org>
9459         stddef: Fix a compilation error on AIX 7.2 with xlclang.
9460         * lib/stddef.in.h (__CLANG_MAX_ALIGN_T_DEFINED): Define whenever we
9461         define GNULIB_defined_max_align_t.
9463 2023-03-16  Bruno Haible  <bruno@clisp.org>
9465         stddef: Define 'unreachable', for ISO C 23 compliance.
9466         * lib/verify.h (_GL_HAS_BUILTIN_UNREACHABLE): Don't define if already
9467         defined.
9468         * lib/stddef.in.h (_GL_HAS_BUILTIN_UNREACHABLE, unreachable): New
9469         macros.
9470         (abort): Declare if needed for unreachable.
9471         * m4/stddef_h.m4 (gl_STDDEF_H): Test for unreachable.
9472         * tests/test-stddef.c (test_unreachable_optimization,
9473         test_unreachable_noreturn): New functions, based on tests/test-verify.c.
9474         * doc/posix-headers/stddef.texi: Mention unreachable.
9476 2023-03-10  Paul Eggert  <eggert@cs.ucla.edu>
9478         posixtm: work around Glibc time issue
9479         * modules/posixtm (Depends-on): Add time.
9481 2023-03-09  Jim Meyering  <meyering@fb.com>
9483         bootstrap: correct last change
9484         * top/bootstrap-funclib.sh (autogen) [AUTORECONFFLAGS]: Do always
9485         apply the --no-recursive option.
9486         * build-aux/bootstrap: Regenerate.
9488         bootstrap: remove code that accommodated RHEL5's old autoreconf
9489         * top/bootstrap-funclib.sh (autogen) [AUTORECONFFLAGS]: RHEL5 has not
9490         been supported since 2017. It included (and this code worked around)
9491         a version of autoreconf that was so old it did not accept the
9492         --no-recursive option. Drop that workaround.
9493         * build-aux/bootstrap: Regenerate.
9495 2023-03-08  Bruno Haible  <bruno@clisp.org>
9497         gettimeofday, timespec_get tests: Avoid test failure on glibc/Linux.
9498         * modules/gettimeofday-tests (Depends-on): Add 'time'.
9499         * modules/timespec_get-tests (Depends-on): Likewise.
9500         * tests/test-gettimeofday.c (test_consistency): Update comment.
9501         * tests/test-timespec_get.c (main): Likewise.
9503         time: Add tests.
9504         * tests/test-time.c: New file.
9505         * modules/time-tests: New file.
9507         time: New module.
9508         * lib/time.in.h (time): New declaration.
9509         * lib/time.c: New file.
9510         * m4/time_h.m4 (gl_TIME_H_REQUIRE_DEFAULTS): Initialize GNULIB_TIME.
9511         (gl_TIME_H_DEFAULTS): Initialize REPLACE_TIME.
9512         * m4/time.m4: New file.
9513         * modules/time-h (Makefile.am): Substitute GNULIB_TIME, REPLACE_TIME.
9514         * modules/time: New file.
9515         * tests/test-time-h-c++.cc: Check the signature of
9516         GNULIB_NAMESPACE::time.
9517         * doc/posix-functions/time.texi: Mention the glibc problem and the
9518         'time' module.
9520 2023-03-08  Bruno Haible  <bruno@clisp.org>
9522         time-h: Renamed from time.
9523         * modules/time-h: Renamed from modules/time.
9524         * tests/test-time-h.c: Renamed from tests/test-time.c.
9525         * modules/time-h-tests: Renamed from modules/time-tests. Update.
9526         * tests/test-time-h-c++.cc: Renamed from tests/test-time-c++.cc.
9527         * tests/test-time-h-c++2.cc: Renamed from tests/test-time-c++2.cc.
9528         * modules/time-h-c++-tests: Renamed from modules/time-c++-tests. Update.
9529         * modules/cond (Depends-on): Update.
9530         * modules/ctime (Depends-on): Likewise.
9531         * modules/localtime (Depends-on): Likewise.
9532         * modules/mktime (Depends-on): Likewise.
9533         * modules/nanosleep (Depends-on): Likewise.
9534         * modules/parse-datetime (Depends-on): Likewise.
9535         * modules/posixcheck (Depends-on): Likewise.
9536         * modules/pthread-h (Depends-on): Likewise.
9537         * modules/stat-time (Depends-on): Likewise.
9538         * modules/stat-time-tests (Depends-on): Likewise.
9539         * modules/strftime-fixes (Depends-on): Likewise.
9540         * modules/strptime (Depends-on): Likewise.
9541         * modules/sys_stat (Depends-on): Likewise.
9542         * modules/tempname (Depends-on): Likewise.
9543         * modules/threads-h (Depends-on): Likewise.
9544         * modules/time_r (Depends-on): Likewise.
9545         * modules/time_rz (Depends-on): Likewise.
9546         * modules/timegm (Depends-on): Likewise.
9547         * modules/timespec (Depends-on): Likewise.
9548         * modules/timespec_get (Depends-on): Likewise.
9549         * modules/timespec_getres (Depends-on): Likewise.
9550         * modules/tzset (Depends-on): Likewise.
9551         * modules/usleep-tests (Depends-on): Likewise.
9552         * modules/utime (Depends-on): Likewise.
9553         * modules/utimecmp (Depends-on): Likewise.
9554         * modules/utimens (Depends-on): Likewise.
9555         * modules/windows-cond (Depends-on): Likewise.
9556         * modules/windows-timedmutex (Depends-on): Likewise.
9557         * modules/windows-timedrecmutex (Depends-on): Likewise.
9558         * modules/windows-timedrwlock (Depends-on): Likewise.
9559         * modules/xnanosleep (Depends-on): Likewise.
9560         * doc/posix-headers/time.texi: Update.
9561         * NEWS: Mention the change.
9563 2023-03-08  Bruno Haible  <bruno@clisp.org>
9565         gettimeofday tests: Enhance test.
9566         * tests/test-gettimeofday.c: Include <stdlib.h> and macros.h.
9567         (test_clobber): New function, extracted from main.
9568         (test_consistency): New function, based on tests/test-timespec_get.c.
9569         (main): Invoke both functions.
9570         * modules/gettimeofday-tests (Files): Add macros.h.
9572 2023-03-05  Paul Eggert  <eggert@cs.ucla.edu>
9574         stdio: suppress macOS 13 sprintf warnings
9575         * lib/stdio.in.h (_POSIX_C_SOURCE, _GL_DEFINED__POSIX_C_SOURCE):
9576         Suppress deprecation warnings for sprintf and vsprintf
9577         that were introduced in macOS 13.  These are not useful
9578         for Gnulib itself, and are more likely than not to be
9579         merely an annoyance for Gnulib-using code.
9581 2023-03-05  Bruno Haible  <bruno@clisp.org>
9583         timespec_get tests: Add comment.
9584         * tests/test-timespec_get.c: Add a comment regarding a glibc bug.
9586 2023-03-02  Bruno Haible  <bruno@clisp.org>
9588         nl_langinfo tests: Avoid test failure on Solaris 11.
9589         * tests/test-nl_langinfo2.c (main): Skip French T_FMT_AMPM test on
9590         Solaris.
9592 2023-02-28  Benno Schulenberg  <bensberg@telfort.nl>  (tiny change)
9594         terminfo, termcap: Fix more spellos in a comment.
9595         * lib/tparm.c: Fix misspellings and wording in the main comment.
9597 2023-02-28  Bruno Haible  <bruno@clisp.org>
9599         perl: Allow this module to be used with 'gnulib-tool --lgpl'.
9600         Reported by Reuben Thomas <rrt@sc3d.org> in
9601         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00191.html>.
9602         * modules/perl (License): Relax to 'GPLed build tool'.
9603         Approved by Jim Meyering in
9604         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00198.html>.
9606 2023-02-28  Bruno Haible  <bruno@clisp.org>
9608         dfa: Tweak the last patch.
9609         Suggested by Alexei Podtelezhnikov <apodtele@gmail.com>.
9610         * lib/dfa.c (FALLTHROUGH): Assume that Apple clang, in C mode, supports
9611         __attribute__ ((__fallthrough__)) starting with version 1200.
9612         References:
9613         https://en.wikipedia.org/wiki/Xcode#Xcode_11.0_-_14.x_(since_SwiftUI_framework)_2
9614         https://github.com/apple/llvm-project/blob/swift-5.3-RELEASE/clang/test/Sema/fallthrough-attr.c
9616 2023-02-27  ChuanGang Jiang  <jiangchuanganghw@outlook.com>
9618         fts: fail gracefully when out of memory
9619         * lib/fts.c (fts_read): Set errno==ENOMEM and return NULL
9620         when setup_dir() fails, rather than hitting an assertion later.
9622 2023-02-26  Jim Meyering  <meyering@fb.com>
9624         announce-gen: spell OpenBSD with a capital "O"
9625         * build-aux/announce-gen (print_checksums): Capitalize
9626         the "O" in OpenBSD, as suggested by Bruno Haible.
9628 2023-02-26  Bruno Haible  <bruno@clisp.org>
9630         dfa: Avoid warnings with some Apple clang versions.
9631         Reported by Werner Lemberg <wl@gnu.org> in
9632         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00159.html>.
9633         * lib/dfa.c (FALLTHROUGH): When __apple_build_version__ is defined,
9634         ignore __clang_major__.
9636 2023-02-25  Jim Meyering  <meyering@fb.com>
9638         announce-gen: add more info the auto-generated announce template
9639         * build-aux/announce-gen (readable_interval, readable_interval0):
9640         New functions.
9641         (digest_file_base64_wrap): New function to add padding to the
9642         base64-encoded SHA256 checksums.
9643         (print_checksums): Use that wrapper. Indent each line by two spaces.
9644         (main): Emit new sections, e.g., these lines from grep-3.8's release:
9645         - There have been 104 commits by 6 people in the 55 weeks since 3.7.
9646         - The following people contributed changes to this release: (and list)
9647         I tested with this, running from a sibling cloned grep directory:
9648           ../gnulib/build-aux/announce-gen --release-type=stable \
9649             --package-name=grep --previous-version=3.7 --current-version=3.8 \
9650             --gpg-key-id=0x7FD9FCCB000BEEEE --url-directory=https://testing
9651         Also, reference the cksum programs from coreutils-9.2 and from OpenBSD.
9653 2023-02-25  ChuanGang Jiang  <jiangchuanganghw@outlook.com>  (tiny change)
9655         terminfo, termcap: Fix typos in comments.
9656         * lib/tparm.c: Fix misspellings in comments.
9658 2023-02-23  Paul Eggert  <eggert@cs.ucla.edu>
9660         lseek: avoid SEEK_HOLE bugs in FreeBSD, macOS
9661         This attempts to fix <https://bugs.gnu.org/61386>, a bug in GNU cp
9662         caused by a serious data corruption bug in FreeBSD and macOS.
9663         * doc/posix-functions/lseek.texi: Mention the bug.
9664         * lib/unistd.in.h (SEEK_DATA, SEEK_HOLE): Undef in macOS < 13 and
9665         FreeBSD < 14.  FreeBSD fixed the bug sometime during FreeBSD 13
9666         <https://bugs.freebsd.org/256205>, so the "FreeBSD < 14" is
9667         conservative.  It’s unknown when Apple will fix macOS so use
9668         macOS "9999" as a placeholder.
9669         * m4/lseek.m4 (gl_FUNC_LSEEK): Replace lseek if on one of the
9670         above platforms.
9672 2023-02-18  Bruno Haible  <bruno@clisp.org>
9674         configmake: Add support for $build_os != $host_os.
9675         * m4/build-to-host.m4: New file.
9676         * m4/configmake.m4 (gl_CONFIGMAKE_PREP): Provide a configure-time
9677         definition for pkgdatadir, pkgincludedir, pkglibdir.
9678         (gl_CONFIGMAKE): New macro.
9679         * modules/configmake (Files): Add m4/build-to-host.m4.
9680         (configure.ac): Invoke gl_CONFIGMAKE instead of gl_CONFIGMAKE_PREP.
9681         (Makefile.am): For creating configmake.h, use the various *prefix_c_make
9682         and *dir_c_make variables.
9684 2023-02-18  Bruno Haible  <bruno@clisp.org>
9686         configmake: Prepare for using directory names with backslashes.
9687         * modules/configmake (Makefile.am): Use printf instead of echo.
9689 2023-02-18  Bruno Haible  <bruno@clisp.org>
9691         unilbrk tests: Fix compilation failures (regression 2023-02-11).
9692         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Outside of
9693         libunistring, don't test the backward compatibility function.
9694         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
9695         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
9696         * tests/unilbrk/test-ulc-possible-linebreaks.c (main): Likewise.
9697         * tests/unilbrk/test-u8-width-linebreaks.c (main): Likewise.
9698         * tests/unilbrk/test-u16-width-linebreaks.c (main): Likewise.
9699         * tests/unilbrk/test-u32-width-linebreaks.c (main): Likewise.
9700         * tests/unilbrk/test-ulc-width-linebreaks.c (main): Likewise.
9702 2023-02-17  Bruno Haible  <bruno@clisp.org>
9704         Improve cross-compilation for midipix.
9705         Reported by Ørjan Malde <red@foxi.me> at
9706         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00131.html>.
9707         This patch handles the cases where midipix acts like Linux.
9708         * m4/chmod.m4 (gl_FUNC_CHMOD): Treat midipix like Linux with glibc or
9709         musl libc.
9710         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
9711         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
9712         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Likewise.
9713         * m4/link.m4 (gl_FUNC_LINK): Likewise.
9714         * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise.
9715         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Likewise.
9716         * m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise.
9717         * m4/pselect.m4 (gl_FUNC_PSELECT): Likewise.
9718         * m4/ptsname.m4 (gl_FUNC_PTSNAME): Likewise.
9719         * m4/readlink.m4 (gl_FUNC_READLINK): Likewise.
9720         * m4/rename.m4 (gl_FUNC_RENAME): Likewise.
9721         * m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise.
9722         * m4/select.m4 (gl_FUNC_SELECT): Likewise.
9723         * m4/sleep.m4 (gl_FUNC_SLEEP): Likewise.
9724         * m4/stat.m4 (gl_FUNC_STAT): Likewise.
9725         * m4/symlink.m4 (gl_FUNC_SYMLINK): Likewise.
9726         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Likewise.
9727         * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise.
9728         * m4/usleep.m4 (gl_FUNC_USLEEP): Likewise.
9730         Improve cross-compilation for midipix.
9731         Reported by Ørjan Malde <red@foxi.me> at
9732         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00131.html>.
9733         Since midipix consists of musl libc based on an emulation of Linux system
9734         calls, for pure libc functionality it can be treated like musl libc.
9735         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Treat midipix like systems with
9736         musl libc.
9737         * m4/cbrtl.m4 (gl_FUNC_CBRTL): Likewise.
9738         * m4/ceil.m4 (gl_FUNC_CEIL): Likewise.
9739         * m4/ceilf.m4 (gl_FUNC_CEILF): Likewise.
9740         * m4/ceill.m4 (gl_FUNC_CEILL): Likewise.
9741         * m4/exp2l.m4 (gl_FUNC_EXP2L): Likewise.
9742         * m4/expl.m4 (gl_FUNC_EXPL): Likewise.
9743         * m4/expm1.m4 (gl_FUNC_EXPM1): Likewise.
9744         * m4/expm1f.m4 (gl_FUNC_EXPM1F): Likewise.
9745         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Likewise.
9746         * m4/fclose.m4 (gl_FUNC_FCLOSE_STDIN): Likewise.
9747         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Likewise.
9748         * m4/ffsll.m4 (gl_FUNC_FFSLL): Likewise.
9749         * m4/floor.m4 (gl_FUNC_FLOOR): Likewise.
9750         * m4/floorf.m4 (gl_FUNC_FLOORF): Likewise.
9751         * m4/fmod.m4 (gl_FUNC_FMOD): Likewise.
9752         * m4/fmodf.m4 (gl_FUNC_FMODF): Likewise.
9753         * m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
9754         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Likewise.
9755         * m4/fopen.m4 (gl_FUNC_FOPEN_GNU): Likewise.
9756         * m4/fpurge.m4 (gl_FUNC_FPURGE): Likewise.
9757         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
9758         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
9759         * m4/hypot.m4 (gl_FUNC_HYPOT): Likewise.
9760         * m4/hypotf.m4 (gl_FUNC_HYPOTF): Likewise.
9761         * m4/hypotl.m4 (gl_FUNC_HYPOTL): Likewise.
9762         * m4/iconv_open-utf.m4 (gl_FUNC_ICONV_OPEN_UTF_SUPPORT): Likewise.
9763         * m4/log.m4 (gl_FUNC_LOG): Likewise.
9764         * m4/log10.m4 (gl_FUNC_LOG10): Likewise.
9765         * m4/log10f.m4 (gl_FUNC_LOG10F): Likewise.
9766         * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Likewise.
9767         * m4/log1p.m4 (gl_FUNC_LOG1P): Likewise.
9768         * m4/log1pf.m4 (gl_FUNC_LOG1PF): Likewise.
9769         * m4/log1pl.m4 (gl_FUNC_LOG1PL, gl_FUNC_LOG1PL_WORKS): Likewise.
9770         * m4/log2.m4 (gl_FUNC_LOG2): Likewise.
9771         * m4/log2f.m4 (gl_FUNC_LOG2F): Likewise.
9772         * m4/log2l.m4 (gl_FUNC_LOG2L_WORKS): Likewise.
9773         * m4/logf.m4 (gl_FUNC_LOGF): Likewise.
9774         * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Likewise.
9775         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Likewise.
9776         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise.
9777         * m4/modf.m4 (gl_FUNC_MODF): Likewise.
9778         * m4/modff.m4 (gl_FUNC_MODFF): Likewise.
9779         * m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
9780         * m4/musl.m4 (gl_MUSL_LIBC): Likewise.
9781         * m4/perror.m4 (gl_FUNC_PERROR): Likewise.
9782         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_SECURE,
9783         gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE,
9784         gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2,
9785         gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN): Likewise.
9786         * m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_INFINITE,
9787         gl_PRINTF_INFINITE_LONG_DOUBLE, gl_PRINTF_DIRECTIVE_A,
9788         gl_PRINTF_DIRECTIVE_F, gl_PRINTF_FLAG_ZERO, gl_SNPRINTF_TRUNCATION_C99,
9789         gl_SNPRINTF_RETVAL_C99, gl_SNPRINTF_DIRECTIVE_N,
9790         gl_VSNPRINTF_ZEROSIZE_C99): Likewise.
9791         * m4/pthread_rwlock_rdlock.m4 (gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER):
9792         Likewise.
9793         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
9794         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Likewise.
9795         * m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise.
9796         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise.
9797         * m4/remainderl.m4 (gl_FUNC_REMAINDERL, gl_FUNC_REMAINDERL_WORKS):
9798         Likewise.
9799         * m4/rintl.m4 (gl_FUNC_RINTL): Likewise.
9800         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
9801         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
9802         * m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise.
9803         * m4/setenv.m4 (gl_FUNC_SETENV): Likewise.
9804         * m4/setlocale_null.m4 (gl_FUNC_SETLOCALE_NULL): Likewise.
9805         * m4/signbit.m4 (gl_SIGNBIT): Likewise.
9806         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
9807         * m4/strerror.m4 (gl_FUNC_STRERROR, gl_FUNC_STRERROR_0): Likewise.
9808         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
9809         * m4/strtold.m4 (gl_FUNC_STRTOLD): Likewise.
9810         * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
9811         * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
9812         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
9813         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise.
9814         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
9816 2023-02-13  ChuanGang Jiang  <jiangchuanganghw@outlook.com>  (tiny change)
9818         hamt: Detect GCC version correctly.
9819         * lib/hamt.h:Use __GNUC_MINOR__, not  __GNUC_MINOR.
9821 2023-02-11  Bruno Haible  <bruno@clisp.org>
9823         terminfo, termcap: Avoid wrong configure result with clang ≥ 15.
9824         clang 15 reports an error for -Wint-conversion by default.
9825         Reported by Sam James <sam@gentoo.org> in
9826         <https://savannah.gnu.org/bugs/?63793>.
9827         * m4/terminfo.m4 (gl_TERMINFO_BODY): Avoid a -Wint-conversion warning
9828         when testing for tparam and tparm.
9829         * m4/termcap.m4 (gl_TERMCAP_BODY): Likewise.
9831 2023-02-11  Bruno Haible  <bruno@clisp.org>
9833         error-h: Make less fragile.
9834         * lib/error.in.h: Use #include_next if the system has an <error.h>. Use
9835         a split double-inclusion guard.
9836         * m4/error_h.m4 (gl_ERROR_H): Invoke gl_CHECK_NEXT_HEADERS. Set
9837         HAVE_ERROR_H.
9838         * modules/error-h (Makefile.am): Substitute GUARD_PREFIX, HAVE_ERROR_H,
9839         INCLUDE_NEXT, PRAGMA_SYSTEM_HEADER, NEXT_ERROR_H.
9841 2023-02-11  Bruno Haible  <bruno@clisp.org>
9843         unilbrk: Don't compile unused functions outside of libunistring.
9844         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks): Don't
9845         compile outside of libunistring.
9846         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
9847         Likewise.
9848         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
9849         Likewise.
9850         * lib/unilbrk/ulc-possible-linebreaks.c (ulc_possible_linebreaks):
9851         Likewise.
9852         * lib/unilbrk/u8-width-linebreaks.c (u8_width_linebreaks): Likewise.
9853         * lib/unilbrk/u16-width-linebreaks.c (u16_width_linebreaks): Likewise.
9854         * lib/unilbrk/u32-width-linebreaks.c (u32_width_linebreaks): Likewise.
9855         * lib/unilbrk/ulc-width-linebreaks.c (ulc_width_linebreaks): Likewise.
9857 2023-02-11  Bruno Haible  <bruno@clisp.org>
9859         sigsegv: Fix a compilation error on OpenBSD with clang ≥ 16.
9860         * lib/sigsegv.c (install_for): Add a cast when assigning to
9861         action.sa_sigaction.
9863 2023-02-10  Bruno Haible  <bruno@clisp.org>
9865         Fix code duplication in last commit.
9866         * m4/gnulib-common.m4 (gl_CHECK_FUNCS_DEFAULT_CASE,
9867         gl_CHECK_FUNCS_CASE_FOR_ANDROID, gl_CHECK_FUNCS_CASE_FOR_MACOS,
9868         gl_CHECK_FUNCS_SET_RESULTS): New macros, extracted from
9869         gl_CHECK_FUNCS_ANDROID, gl_CHECK_FUNCS_MACOS,
9870         gl_CHECK_FUNCS_ANDROID_MACOS.
9871         (gl_CHECK_FUNCS_ANDROID, gl_CHECK_FUNCS_MACOS,
9872         gl_CHECK_FUNCS_ANDROID_MACOS): Use them.
9874         mkfifoat: Fix crash on macOS 12.
9875         * m4/gnulib-common.m4 (gl_PREPARE_CHECK_FUNCS_MACOS,
9876         gl_CHECK_FUNCS_MACOS, gl_CHECK_FUNCS_ANDROID_MACOS): New macros.
9877         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Test for mknodat and mkfifoat using
9878         gl_CHECK_FUNCS_ANDROID_MACOS instead of gl_CHECK_FUNCS_ANDROID.
9880 2023-02-10  ChuanGang Jiang  <jiangchuanganghw@outlook.com>  (tiny change)
9882         Fix typos like "the the" and "a a" in comments.
9883         * lib/c32is-impl.h: s/the the/the/
9884         * lib/getopt-pfx-core.h: s/a a/a/
9885         * lib/term-style-control.h: s/the the/the/
9886         * lib/textstyle.in.h: Likewise.
9888 2023-02-10  Bruno Haible  <bruno@clisp.org>
9890         chown, lchown, fchownat tests: Avoid test failure on macOS 12.
9891         * tests/test-chown.h (test_chown): Skip some assertions if
9892         getgid() == (gid_t)-1.
9893         * tests/test-lchown.h (test_lchown): Likewise.
9895 2023-02-09  Paul Eggert  <eggert@cs.ucla.edu>
9897         nullptr: work around Apple clang 14 issue
9898         Problem reported by Bruno Haible in:
9899         https://lists.gnu.org/r/bug-gnulib/2023-02/msg00098.html
9900         * doc/gnulib.texi (nullptr): Document limitations better.
9901         * m4/nullptr.m4 (gl_NULLPTR): Check for incompatibility of macOS
9902         clang 14.0.0 (clang-1400.0.29.202), where <stddef.h> defines a
9903         non-working nullptr macro.
9905 2023-02-09  Bruno Haible  <bruno@clisp.org>
9907         math: Fix compilation error in C++ mode on macOS 12.5.
9908         * lib/math.in.h (isnan): On macOS, treat clang version 14 again like
9909         clang versions < 12.
9911 2023-02-09  Bruno Haible  <bruno@clisp.org>
9913         Fix compilation errors in C++ mode on macOS 12.5.
9914         * m4/gnulib-common.m4 (gl_COMMON_BODY): Don't define
9915         _GL_ATTRIBUTE_MAYBE_UNUSED to [[__maybe_unused__]] if the compiler is
9916         an Apple variant of clang.
9918 2023-02-09  Bruno Haible  <bruno@clisp.org>
9920         limits-h: Work around a clang 15 bug.
9921         * m4/limits-h.m4 (gl_LIMITS_H): Test also for BOOL_MAX.
9922         * lib/limits.in.h: Handle the case where BOOL_WIDTH is present and
9923         BOOL_MAX is missing.
9924         * doc/posix-headers/limits.texi: Mention the clang bug.
9926 2023-02-09  Bruno Haible  <bruno@clisp.org>
9928         Fix error in C++ mode on glibc systems (regression 2022-04-28).
9929         * lib/malloc.in.h (rpl_free): Add exception specification like
9930         stdlib.in.h does.
9931         * lib/string.in.h (rpl_free): Likewise.
9932         * lib/wchar.in.h (rpl_free): Likewise.
9934 2023-02-09  Bruno Haible  <bruno@clisp.org>
9936         getcwd: Fix compilation error in C23 mode.
9937         * lib/getcwd.c: Include <stdio.h>.
9939 2023-02-08  Bruno Haible  <bruno@clisp.org>
9941         x-to-1: Accept additional help2man arguments.
9942         Suggested by Reuben Thomas <rrt@sc3d.org> in
9943         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00078.html>.
9944         * build-aux/x-to-1.in: Allow additional options after the HELP2MAN
9945         argument, and pass them down to help2man.
9947 2023-02-08  Bruno Haible  <bruno@clisp.org>
9949         x-to-1: Document the configure-time prerequisites.
9950         Suggested by Reuben Thomas <rrt@sc3d.org> in
9951         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00078.html>.
9952         * build-aux/x-to-1.in: Add more comments.
9954 2023-02-08  Bruno Haible  <bruno@clisp.org>
9956         hard-locale: Add comment regarding per-thread locales.
9957         * lib/hard-locale.h (hard_locale): Add comment.
9959 2023-02-08  Bruno Haible  <bruno@clisp.org>
9961         nl_langinfo: Add comment regarding per-thread locales.
9962         * lib/nl_langinfo.c (ctype_codeset): Add comment.
9964         nl_langinfo tests: Add another test.
9965         * tests/test-nl_langinfo2.c: New file.
9966         * tests/test-nl_langinfo2.sh: New file.
9967         * modules/nl_langinfo-tests (Files): Add them. Add
9968         intl-thread-locale.m4.
9969         (Depends-on): Add c-strcasestr, stdbool.
9970         (configure.ac): Invoke gt_FUNC_USELOCALE.
9971         (Makefile.am): Arrange to compile test-nl_langinfo2 and test it through
9972         test-nl_langinfo2.sh.
9974         nl_langinfo tests: Prepare for adding more tests.
9975         * tests/test-nl_langinfo1.c: Renamed from tests/test-nl_langinfo.c.
9976         * tests/test-nl_langinfo1.sh: Renamed from tests/test-nl_langinfo.sh.
9977         Update.
9978         * modules/nl_langinfo-tests (Files, Makefile.am): Update.
9980 2023-02-08  Bruno Haible  <bruno@clisp.org>
9982         assert-h: Fix test failure on IRIX 6.5.
9983         * m4/assert_h.m4 (gl_ASSERT_H): Ensure that on IRIX, including
9984         <assert.h> after <config.h> actually defines the assert macro.
9986 2023-02-07  Paul Eggert  <eggert@cs.ucla.edu>
9988         nullptr: test for compilers at autoconf-time
9989         * m4/nullptr.m4 (gl_NULLPTR): Test for C and C++ compiler usage at
9990         autoconf-time.  This should work better than testing at
9991         configure-time.  Also, push and pop languages so we check the
9992         proper compiler.
9994         nullptr: test for C++ nullptr at configure-time
9995         * m4/nullptr.m4 (gl_NULLPTR): Test for C++ support for nullptr
9996         at configure-time, as we already do for C support.
9997         This should be more reliable than maintaining #ifdefs by hand.
9999         nullptr: rename from c-nullptr
10000         * NEWS, doc/gnulib.texi: Mention this.
10001         * m4/nullptr.m4: Rename from m4/c-nullptr.m4.
10002         (gl_NULLPTR): Rename from gl_C_NULLPTR.
10003         * modules/nullptr: Rename from modules/nullptr.
10004         * modules/nullptr-c++-tests: Rename from modules/c-nullptr-c++-tests.
10005         * modules/nullptr-tests: Rename from modules/c-nullptr-tests.
10006         All uses changed.
10008 2023-02-07  Bruno Haible  <bruno@clisp.org>
10010         Fix a copyright header - module license mismatch.
10011         Reported by Bjarni Ingi Gislason <bjarniig@simnet.is> in
10012         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00057.html>.
10013         * lib/gen-uni-tables.c (output_predicate): For uniwidth/width2.h, use an
10014         LGPLv2+ license.
10015         (output_nonspacing_property): Use an LGPLv2+ license.
10016         * lib/uniwidth/width0.h: Regenerated.
10017         * lib/uniwidth/width2.h: Likewise.
10019 2023-02-07  Bruno Haible  <bruno@clisp.org>
10021         check-copyright: Don't fail because of the 'glob' module.
10022         Reported by Bjarni Ingi Gislason <bjarniig@simnet.is> in
10023         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00057.html>.
10024         * check-copyright: Filter out the files from the 'glob' module.
10026 2023-02-07  Bruno Haible  <bruno@clisp.org>
10028         check-copyright: Make output prettier.
10029         * check-copyright: Resize the second column from width 14 to width 17.
10031 2023-02-06  Bruno Haible  <bruno@clisp.org>
10033         setlocale-null: Don't use a lock in Cygwin >= 3.4.6.
10034         Road paved by Corinna Vinschen <vinschen@redhat.com>.
10035         * m4/setlocale_null.m4 (gl_FUNC_SETLOCALE_NULL): Assume that
10036         setlocale (LC_ALL, NULL) is multithread-safe in Cygwin >= 3.4.6.
10037         * lib/setlocale_null.c: Update comments.
10038         * tests/test-setlocale_null-mt-all.c: Likewise.
10040 2023-02-05  Bruno Haible  <bruno@clisp.org>
10042         c-nullptr: Fix conflict with libstdc++ in GCC >= 11.
10043         Reported by Bjarni Ingi Gislason <bjarniig@simnet.is> in
10044         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00030.html>.
10045         * m4/c-nullptr.m4 (gl_C_NULLPTR): Don't define nullptr if it is already
10046         defined. In C++ mode, ignore the result of the configure test and don't
10047         define it when we know that the C++ compiler already supports it.
10049 2023-02-05  Bruno Haible  <bruno@clisp.org>
10051         c-nullptr: Add tests.
10052         * tests/test-nullptr.c: New file.
10053         * modules/c-nullptr-tests: New file.
10054         * tests/test-nullptr-c++.cc: New file.
10055         * modules/c-nullptr-c++-tests: New file.
10057 2023-02-05  Paul Eggert  <eggert@cs.ucla.edu>
10059         sh-quote: backport fix from diffutils
10060         * lib/sh-quote.c (init_sh_quoting_options):
10061         Use C89 through C17 style for parameterless static function.
10062         This avoided a warning when compiling diffutils.
10063         This patch is backported from a circa-2009 diffutils patch
10064         and lets us remove diffutils/gl/lib/sh-quote.c.diff; see:
10065         https://git.savannah.gnu.org/cgit/diffutils.git/commit/?id=8c3d25a63a2c5912170ef6e13f748f3904e6b5cf
10067         c-nullptr: new module
10068         * doc/gnulib.texi (nullptr): New section.
10069         * doc/posix-headers/stddef.texi: Document lack of nullptr_t.
10070         * m4/c-nullptr.m4, modules/c-nullptr: New files.
10072 2023-02-05  Bruno Haible  <bruno@clisp.org>
10074         Update build-aux/po/Makefile.in.in.
10075         Reported by Reuben Thomas <rrt@sc3d.org> in
10076         <https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00020.html>.
10077         * build-aux/po/Makefile.in.in: Sync from GNU gettext 0.21.1.
10078         Fixes:
10079         - In the .po -> .gmo rules, consider the newest changes to the POT file.
10080         - Emit a warning when creating a tarball without POT file.
10082 2023-02-05  Bruno Haible  <bruno@clisp.org>
10084         assert-h, verify: Fix compilation error in C++ mode with MSVC 14.
10085         * lib/verify.h (static_assert): Define _ALLOW_KEYWORD_MACROS.
10086         * tests/test-assert-h-c++.cc: Strengthen test.
10087         * tests/test-assert-h-c++2.cc: Likewise.
10089 2023-02-04  Paul Eggert  <eggert@cs.ucla.edu>
10091         fts: pacify GCC 13 -Wuse-after-free
10092         Ordinarily I fix this sort of thing by using well-defined rather
10093         than undefined behavior, but a straightforward patch along those
10094         lines would change the fts_.h API since fts_accpath would change
10095         from a pointer to an integer with a more-complex interpretation.
10096         Instead, attempt to pacify GCC 13 with code that relies on
10097         undefined but portable-in-practice behavior that GCC 13 does not
10098         complain about.  GCC problem reported by Peter Frazier in:
10099         https://lists.gnu.org/r/bug-gnulib/2023-02/msg00000.html
10100         * lib/fts.c: Include stdint.h.
10101         (fts_build): Do not access freed pointer directly; instead,
10102         save its bit-pattern into a uintptr_t, and use that to compare.
10103         (ADJUST): Likewise, but more trickily since this hack
10104         actually accesses freed pointers, but does so in a way that
10105         I hope GCC doesn’t notice.  Although using ‘*(uintptr_t *) &P’
10106         instead of ‘(uintptr_t) P’ would avoid accessing freed pointers,
10107         it would provoke a -Wstrict-aliasing diagnostic.
10108         * modules/fts (Depends-on): Add stdint.
10110 2023-02-04  Bruno Haible  <bruno@clisp.org>
10112         assert-h, verify: Fix conflict with standard C++ header files on macOS.
10113         * lib/verify.h (_Static_assert): Don't redefine with clang ≥ 3.8.0
10114         in C++ mode.
10115         * tests/test-assert-h-c++.cc: Also check against conflict with the
10116         standard C++ header files.
10117         * tests/test-assert-h-c++2.cc: Likewise.
10119 2023-02-04  Bruno Haible  <bruno@clisp.org>
10121         Activate all existing C++ tests.
10122         * modules/assert-h-tests (Depends-on): Add assert-h-c++-tests.
10123         * modules/stdarg-tests (Depends-on): Add stdarg-c++-tests.
10125 2023-02-04  Bruno Haible  <bruno@clisp.org>
10127         spawn: Fix compilation error on macOS (regression 2023-01-22).
10128         * lib/spawn.in.h: Tweak logic for defining the POSIX_SPAWN_* constants.
10130 2023-02-03  Bruno Haible  <bruno@clisp.org>
10132         relocatable-prog: Fix compiler warning.
10133         * lib/progreloc.c (full_read): Use a non-const pointer.
10135 2023-02-03  Bruno Haible  <bruno@clisp.org>
10137         doc: Update regarding AIX.
10138         * doc/glibc-headers/getopt.texi: Update.
10140 2023-02-03  Bruno Haible  <bruno@clisp.org>
10142         doc: Update regarding NetBSD.
10143         * doc/posix-functions/sigprocmask.texi: Mention a NetBSD 9.0 bug.
10144         * doc/posix-functions/pthread_sigmask.texi: Likewise.
10146 2023-02-03  Paul Eggert  <eggert@cs.ucla.edu>
10148         isnan: update comment
10149         * lib/isnan.c: Update comment for C23.
10151 2023-01-30  Bruno Haible  <bruno@clisp.org>
10153         at-internal: Fix support for z/OS.
10154         * lib/openat-proc.c (openat_proc_name) [z/OS]: Proper error handling.
10155         Convert only the relevant part of the dir[] buffer.
10157         at-internal: Add support for z/OS.
10158         Reported and draft patch by Igor Todorovski <itodorov@ca.ibm.com>.
10159         * lib/openat-proc.c [z/OS]: Include <termios.h>.
10160         (openat_proc_name): For z/OS, use an approach similar to kLIBC, with
10161         3 lines of z/OS specific code by Igor Todorovski <itodorov@ca.ibm.com>.
10163 2023-01-30  Bruno Haible  <bruno@clisp.org>
10165         Update NEWS.
10166         * NEWS: Update for qcopy-acl change on 2023-01-13.
10168 2023-01-29  Bruno Haible  <bruno@clisp.org>
10170         maintainer-makefile: Determine gnulib's location on disk correctly.
10171         * top/maint.mk (gnulib_dir): Give priority to $(GNULIB_SRCDIR) over
10172         $(srcdir)/gnulib.
10174 2023-01-29  Bruno Haible  <bruno@clisp.org>
10176         Fix compilation errors with CC="clang -D_FORTIFY_SOURCE=2" on Android.
10177         Reported by Alexey Rochev <equeim@gmail.com> in
10178         <https://lists.gnu.org/archive/html/bug-gnu-libiconv/2023-01/msg00019.html>.
10179         * lib/cdefs.h (__bos, __bos0, __glibc_objsize0, __glibc_objsize,
10180         __glibc_safe_len_cond, __glibc_unsigned_or_positive,
10181         __glibc_safe_or_unknown_len, __glibc_unsafe_len, __glibc_fortify,
10182         __glibc_fortify_n): Don't define these macros in Gnulib.
10183         * lib/libc-config.h: Don't undefine these macros in Gnulib.
10185 2023-01-28  Bruno Haible  <bruno@clisp.org>
10187         Clarify _GL_ATTRIBUTE_NODISCARD code.
10188         Reported by Paul Eggert.
10189         * m4/gnulib-common.m4 (gl_COMMON_BODY): Add comment regarding
10190         _GL_ATTRIBUTE_NODISCARD definition.
10192 2023-01-28  Bruno Haible  <bruno@clisp.org>
10194         unistdio/*printf: Fix negative width handling for %U, %lU, %llU.
10195         * lib/vasnprintf.c (VASNPRINTF): In the code for %U, %lU, %llU, test for
10196         the FLAG_LEFT bit in the flags variable.
10197         * tests/unistdio/test-u8-printf1.h (test_xfunction): Add tests for width
10198         given as argument for the directives %U, %lU, %llU, %s, %a, %f, %e, %g.
10199         * tests/unistdio/test-u16-printf1.h (test_xfunction): Likewise.
10200         * tests/unistdio/test-u32-printf1.h (test_xfunction): Likewise.
10201         * tests/unistdio/test-ulc-printf1.h (test_xfunction): Likewise.
10203 2023-01-28  Bruno Haible  <bruno@clisp.org>
10205         vasnprintf-posix: Fix possible bug with negative width handling for %lc.
10206         * lib/vasnprintf.c (VASNPRINTF): In the code for %lc in vasnprintf, test
10207         for the FLAG_LEFT bit in the flags variable.
10208         * tests/test-vasnprintf-posix.c (test_function): Add tests for width
10209         given as argument for the directives %c, %lc.
10210         * tests/test-vasprintf-posix.c (test_function): Likewise.
10211         * tests/test-snprintf-posix.h (test_function): Likewise.
10212         * tests/test-sprintf-posix.h (test_function): Likewise.
10213         * tests/test-snprintf-posix.c: Include <wchar.h>, for wint_t.
10214         * tests/test-sprintf-posix.c: Likewise.
10215         * tests/test-vsnprintf-posix.c: Likewise.
10216         * tests/test-vsprintf-posix.c: Likewise.
10218 2023-01-28  Bruno Haible  <bruno@clisp.org>
10220         vasnprintf-posix: Fix negative width handling for %ls directive.
10221         Reported by clang via Po Lu <luangruo@yahoo.com>.
10222         * lib/vasnprintf.c (VASNPRINTF): In the code for %ls in vasnprintf and
10223         for %s in vasnwprintf, test for the FLAG_LEFT bit in the flags variable.
10224         * tests/test-vasnprintf-posix.c (test_function): Add tests for width
10225         given as argument for the directives %s, %ls.
10226         * tests/test-vasprintf-posix.c (test_function): Likewise.
10227         * tests/test-snprintf-posix.h (test_function): Likewise.
10228         * tests/test-sprintf-posix.h (test_function): Likewise.
10230 2023-01-28  Bruno Haible  <bruno@clisp.org>
10232         vasnprintf-posix: Add more unit tests.
10233         * tests/test-vasnprintf-posix.c (test_function): Add tests for width
10234         given as argument for the directives %a, %f, %e, %g.
10235         * tests/test-vasprintf-posix.c (test_function): Likewise.
10236         * tests/test-snprintf-posix.h (test_function): Likewise.
10237         * tests/test-sprintf-posix.h (test_function): Likewise.
10239 2023-01-28  Bruno Haible  <bruno@clisp.org>
10241         Avoid clang warnings regarding [[__nodiscard__]].
10242         * m4/gnulib-common.m4 (gl_COMMON_BODY): For clang, in C++ mode, ignore
10243         the __has_c_attribute value and define _GL_ATTRIBUTE_NODISCARD to
10244         __attribute__ ((__warn_unused_result__)), not [[__nodiscard__]].
10246 2023-01-28  Bruno Haible  <bruno@clisp.org>
10248         Avoid clang warnings regarding [[__maybe_unused__]].
10249         * m4/gnulib-common.m4 (gl_COMMON_BODY): For clang versions ≥ 6, < 10,
10250         in C++ mode, ignore the __has_c_attribute value and define
10251         _GL_ATTRIBUTE_MAYBE_UNUSED to __attribute__ ((__unused__)), not
10252         [[__maybe_unused__]].
10254 2023-01-27  Bruno Haible  <bruno@clisp.org>
10256         alignasof: Ensure a correct _Alignof (regression 2023-01-15).
10257         * m4/stdalign.m4 (gl_ALIGNASOF): Apply the workaround for wrong _Alignof
10258         in GCC < 4.9 and clang < 8.0.0 also when the system has <stdalign.h>.
10260 2023-01-27  Bruno Haible  <bruno@clisp.org>
10262         stdalign: Ensure alignof is defined on FreeBSD (regression 2023-01-15).
10263         * lib/stdalign.in.h: Include the system's <stdalign.h> when it exists.
10264         * m4/stdalign.m4 (gl_ALIGNASOF): Invoke gl_CHECK_NEXT_HEADERS. Set
10265         HAVE_STDALIGN_H.
10266         * modules/stdalign (Makefile.am): Substitute GUARD_PREFIX,
10267         HAVE_STDALIGN_H, INCLUDE_NEXT, PRAGMA_SYSTEM_HEADER, PRAGMA_COLUMNS,
10268         NEXT_STDALIGN_H.
10270 2023-01-27  Bruno Haible  <bruno@clisp.org>
10272         stddef: Fix test-stddef compilation error on FreeBSD 12/x86.
10273         * m4/stddef_h.m4 (gl_STDDEF_H): When testing for good max_align_t, use
10274         an ISO C compliant definition of _Alignof.
10276 2023-01-25  Bruno Haible  <bruno@clisp.org>
10278         Keep config.h idempotent.
10279         * m4/gnulib-common.m4 (gl_COMMON_BODY): Add double-inclusion guards to
10280         the definitions of the macros _GL_ATTRIBUTE_ALLOC_SIZE,
10281         _GL_ATTRIBUTE_ALWAYS_INLINE, _GL_ATTRIBUTE_ARTIFICIAL,
10282         _GL_ATTRIBUTE_COLD, _GL_ATTRIBUTE_CONST, _GL_ATTRIBUTE_DEALLOC,
10283         _GL_ATTRIBUTE_DEPRECATED, _GL_ATTRIBUTE_ERROR, _GL_ATTRIBUTE_WARNING,
10284         _GL_ATTRIBUTE_EXTERNALLY_VISIBLE, _GL_ATTRIBUTE_FALLTHROUGH,
10285         _GL_ATTRIBUTE_FORMAT, _GL_ATTRIBUTE_LEAF, _GL_ATTRIBUTE_MALLOC,
10286         _GL_ATTRIBUTE_MAY_ALIAS, _GL_ATTRIBUTE_MAYBE_UNUSED,
10287         _GL_ATTRIBUTE_NODISCARD, _GL_ATTRIBUTE_NOINLINE, _GL_ATTRIBUTE_NONNULL,
10288         _GL_ATTRIBUTE_NONSTRING, _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PACKED,
10289         _GL_ATTRIBUTE_PURE, _GL_ATTRIBUTE_RETURNS_NONNULL,
10290         _GL_ATTRIBUTE_SENTINEL, _GL_ATTRIBUTE_UNUSED, _GL_UNUSED_LABEL.
10292 2023-01-25  Bruno Haible  <bruno@clisp.org>
10294         vasnprintf: Fix compilation error on Android NDK r26b.
10295         Reported by Po Lu <luangruo@yahoo.com>.
10296         * lib/vasnprintf.c: Include <wchar.h>.
10298 2023-01-25  Nick Bowler  <nbowler@draconx.ca>  (tiny change)
10300         threadlib: Fix support for Solaris 9 and older.
10301         * m4/threadlib.m4 (gl_PTHREADLIB_BODY): Allow case patterns to survive
10302         m4 processing by using changequote.
10304 2023-01-24  Bruno Haible  <bruno@clisp.org>
10306         alignasof, stdalign: Fix a compilation error on FreeBSD 12.0.
10307         * m4/stdalign.m4 (gl_ALIGNASOF): In C mode, prefer __builtin_offsetof
10308         over offsetof when possible, since __builtin_offsetof works also when
10309         <stddef.h> has not been fully included yet.
10311 2023-01-22  Bruno Haible  <bruno@clisp.org>
10313         doc: Update list of target platforms.
10314         * doc/gnulib-intro.texi (Supported Platforms): Mark musl libc, Android,
10315         and MSVC as "occasionally tested". Update the version numbers of some
10316         OSes. Combine paragraphs regarding mingw and MSVC.
10317         (Formerly Supported Platforms): Mark AIX 5, 6 as "formerly supported".
10319 2023-01-22  Bruno Haible  <bruno@clisp.org>
10321         Resolve conflicts for functions introduced in Android API level 29.
10323         * m4/reallocarray.m4 (gl_FUNC_REALLOCARRAY): Conditionally set
10324         REPLACE_REALLOCARRAY.
10325         * lib/stdlib.in.h (reallocarray): Disable _GL_CXXALIASWARN invocation on
10326         non-glibc systems.
10328         * lib/stdlib.in.h (getloadavg): Consider REPLACE_GETLOADAVG. Disable
10329         _GL_CXXALIASWARN invocation on non-glibc systems.
10330         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_GETLOADAVG.
10331         * modules/stdlib (Makefile.am): Substitute REPLACE_GETLOADAVG.
10332         * m4/getloadavg.m4 (gl_GETLOADAVG): Conditionally set
10333         REPLACE_GETLOADAVG.
10334         * modules/getloadavg (Depends-on, configure.ac): Consider
10335         REPLACE_GETLOADAVG.
10337         * lib/time.in.h (timespec_get): Consider REPLACE_TIMESPEC_GET. Disable
10338         _GL_CXXALIASWARN invocation on non-glibc systems.
10339         * m4/time_h.m4 (gl_TIME_H_DEFAULTS): Initialize REPLACE_TIMESPEC_GET.
10340         * modules/time (Makefile.am): Substitute REPLACE_TIMESPEC_GET.
10341         * m4/gettime.m4 (gl_CHECK_FUNC_TIMESPEC_GET): Set also
10342         gl_cv_onwards_func_timespec_get.
10343         * m4/timespec_get.m4 (gl_FUNC_TIMESPEC_GET): Conditionally set
10344         REPLACE_TIMESPEC_GET.
10345         * modules/timespec_get (Depends-on, configure.ac): Consider
10346         REPLACE_TIMESPEC_GET.
10348 2023-01-22  Bruno Haible  <bruno@clisp.org>
10350         Resolve conflicts for functions introduced in Android API level 28.
10352         * m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Conditionally set
10353         REPLACE_ALIGNED_ALLOC.
10354         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Conditionally set
10355         REPLACE_GETRANDOM.
10357         * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Conditionally set
10358         REPLACE_GETLOGIN_R.
10359         * lib/unistd.in.h (getlogin_r): Disable _GL_CXXALIASWARN invocation on
10360         non-glibc systems.
10362         * m4/spawn_h.m4 (gl_HAVE_POSIX_SPAWN): Conditionally set
10363         REPLACE_POSIX_SPAWN.
10364         * lib/spawn.in.h: Adapt logic for defining the POSIX_SPAWN_* constants.
10365         (posix_spawn, posix_spawnp, posix_spawnattr_init,
10366         posix_spawnattr_destroy, posix_spawnattr_getsigdefault,
10367         posix_spawnattr_setsigdefault, posix_spawnattr_getsigmask,
10368         posix_spawnattr_setsigmask, posix_spawnattr_getflags,
10369         posix_spawnattr_setflags, posix_spawnattr_getpgroup,
10370         posix_spawnattr_setpgroup, posix_spawn_file_actions_init,
10371         posix_spawn_file_actions_destroy, posix_spawn_file_actions_addchdir,
10372         posix_spawn_file_actions_addfchdir): Disable _GL_CXXALIASWARN invocation
10373         on non-glibc systems.
10375         * m4/glob.m4 (gl_GLOB): Conditionally set REPLACE_GLOB.
10376         * lib/glob.in.h (glob): Disable _GL_CXXALIASWARN invocation on non-glibc
10377         systems.
10379         * lib/unistd.in.h (getentropy): Consider REPLACE_GETENTROPY. Disable
10380         _GL_CXXALIASWARN invocation on non-glibc systems.
10381         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_GETENTROPY.
10382         * modules/unistd (Makefile.am): Substitute REPLACE_GETENTROPY.
10383         * m4/getentropy.m4 (gl_FUNC_GETENTROPY): Conditionally set
10384         REPLACE_GETENTROPY.
10385         * modules/getentropy (Depends-on, configure.ac): Consider
10386         REPLACE_GETENTROPY.
10388 2023-01-22  Bruno Haible  <bruno@clisp.org>
10390         Resolve conflicts for functions introduced in Android API level 26.
10392         * m4/getdomainname.m4 (gl_FUNC_GETDOMAINNAME): Test for getdomainname
10393         using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. Conditionally
10394         set REPLACE_GETSUBOPT.
10396         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Conditionally set
10397         REPLACE_NL_LANGINFO.
10398         * lib/langinfo.in.h (nl_langinfo): Disable _GL_CXXALIASWARN invocation
10399         on non-glibc systems.
10401         * lib/stdlib.in.h (getsubopt): Consider REPLACE_GETSUBOPT. Disable
10402         _GL_CXXALIASWARN invocation on non-glibc systems.
10403         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_GETSUBOPT.
10404         * modules/stdlib (Makefile.am): Substitute REPLACE_GETSUBOPT.
10405         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Conditionally set
10406         REPLACE_GETSUBOPT.
10407         * modules/getsubopt (Depends-on, configure.ac): Consider
10408         REPLACE_GETSUBOPT.
10410 2023-01-22  Bruno Haible  <bruno@clisp.org>
10412         Resolve conflicts for functions introduced in Android API level 24.
10413         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Conditionally set
10414         REPLACE_STRCHRNUL.
10416 2023-01-22  Bruno Haible  <bruno@clisp.org>
10418         Resolve conflicts for functions introduced in Android API level 23.
10420         * m4/login_tty.m4 (gl_FUNC_LOGIN_TTY): Conditionally set
10421         REPLACE_LOGIN_TTY.
10422         * lib/utmp.in.h (login_tty): Disable _GL_CXXALIASWARN invocation on
10423         non-glibc systems.
10425         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Conditionally set REPLACE_MKFIFOAT.
10426         * lib/sys_stat.in.h (mkfifoat): Disable _GL_CXXALIASWARN invocation on
10427         non-glibc systems.
10429         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS): Conditionally set
10430         REPLACE_STRERROR_R.
10431         * lib/string.in.h (strerror_r): Disable _GL_CXXALIASWARN invocation on
10432         non-glibc systems.
10434         * m4/error_h.m4 (gl_ERROR_H): Conditionally set REPLACE_ERROR.
10435         * lib/error.in.h (error): Disable _GL_CXXALIASWARN invocation on
10436         non-glibc systems.
10438         * lib/wchar.in.h (wmempcpy): Consider REPLACE_WMEMPCPY.
10439         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WMEMPCPY.
10440         * modules/wchar (Makefile.am): Substitute REPLACE_WMEMPCPY.
10441         * m4/wmempcpy.m4 (gl_FUNC_WMEMPCPY): Conditionally set
10442         REPLACE_WMEMPCPY.
10443         * modules/wmempcpy (configure.ac): Consider REPLACE_WMEMPCPY.
10445         * lib/unistd.in.h (sethostname): Consider REPLACE_SETHOSTNAME. Disable
10446         _GL_CXXALIASWARN invocation on non-glibc systems.
10447         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_SETHOSTNAME.
10448         * modules/unistd (Makefile.am): Substitute REPLACE_SETHOSTNAME.
10449         * m4/sethostname.m4 (gl_FUNC_SETHOSTNAME): Conditionally set
10450         REPLACE_SETHOSTNAME.
10451         * modules/sethostname (Depends-on, configure.ac): Consider
10452         REPLACE_SETHOSTNAME.
10454         * lib/string.in.h (mempcpy): Consider REPLACE_MEMPCPY. Disable
10455         _GL_CXXALIASWARN invocation on non-glibc systems.
10456         * m4/string_h.m4 (gl_STRING_H_DEFAULTS): Initialize REPLACE_MEMPCPY.
10457         * modules/string (Makefile.am): Substitute REPLACE_MEMPCPY.
10458         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Conditionally set REPLACE_MEMPCPY.
10459         * modules/mempcpy (configure.ac): Consider REPLACE_MEMPCPY.
10461         * lib/stdlib.in.h (mkostemp): Consider REPLACE_MKOSTEMP. Disable
10462         _GL_CXXALIASWARN invocation on non-glibc systems.
10463         (mkostemps): Consider REPLACE_MKOSTEMPS. Disable _GL_CXXALIASWARN
10464         invocation on non-glibc systems.
10465         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MKOSTEMP,
10466         REPLACE_MKOSTEMPS.
10467         * modules/stdlib (Makefile.am): Substitute REPLACE_MKOSTEMP,
10468         REPLACE_MKOSTEMPS.
10469         * m4/mkostemp.m4 (gl_FUNC_MKOSTEMP): Conditionally set REPLACE_MKOSTEMP.
10470         * modules/mkostemp (Depends-on, configure.ac): Consider
10471         REPLACE_MKOSTEMP.
10472         * m4/mkostemps.m4 (gl_FUNC_MKOSTEMPS): Conditionally set
10473         REPLACE_MKOSTEMPS.
10474         * modules/mkostemps (Depends-on, configure.ac): Consider
10475         REPLACE_MKOSTEMPS.
10477 2023-01-22  Bruno Haible  <bruno@clisp.org>
10479         Resolve conflicts for functions introduced in Android API level 21.
10481         * m4/fts.m4 (gl_FUNC_FTS_CORE): Use rpl_* symbols also when the system
10482         will have fts_open in a future version.
10483         * m4/iswblank.m4 (gl_FUNC_ISWBLANK): Conditionally set REPLACE_ISWBLANK.
10484         * m4/mbtowc.m4 (gl_FUNC_MBTOWC): Conditionally set REPLACE_MBTOWC.
10485         * m4/vdprintf.m4 (gl_REPLACE_VDPRINTF): Conditionally set
10486         REPLACE_VDPRINTF.
10487         * m4/wcsnrtombs.m4 (gl_FUNC_WCSNRTOMBS): Conditionally set
10488         REPLACE_WCSNRTOMBS.
10490         * m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): Conditionally set
10491         REPLACE_MBSNRTOWCS.
10492         * lib/wchar.in.h (mbsnrtowcs): Disable _GL_CXXALIASWARN invocation on
10493         non-glibc systems.
10495         * m4/execvpe.m4 (gl_FUNC_EXECVPE): Conditionally set REPLACE_EXECVPE.
10496         * m4/linkat.m4 (gl_FUNC_LINKAT): Conditionally set REPLACE_LINKAT.
10497         * m4/readlinkat.m4 (gl_FUNC_READLINKAT): Conditionally set
10498         REPLACE_READLINKAT.
10499         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Conditionally set
10500         REPLACE_SYMLINKAT.
10501         * m4/truncate.m4 (gl_FUNC_TRUNCATE): Conditionally set REPLACE_TRUNCATE.
10502         * lib/unistd.in.h (execvpe, linkat, readlinkat, symlinkat, truncate):
10503         Disable _GL_CXXALIASWARN invocation on non-glibc systems.
10505         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Conditionally set REPLACE_MKNODAT.
10506         * lib/sys_stat.in.h (mknodat): Disable _GL_CXXALIASWARN invocation on
10507         non-glibc systems.
10509         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Conditionally set REPLACE_STPNCPY.
10510         * lib/string.in.h (stpncpy): Disable _GL_CXXALIASWARN invocation on
10511         non-glibc systems.
10513         * m4/random.m4 (gl_FUNC_RANDOM): Conditionally set REPLACE_INITSTATE,
10514         REPLACE_SETSTATE.
10515         * lib/stdlib.in.h (initstate, setstate): Disable _GL_CXXALIASWARN
10516         invocation on non-glibc systems.
10518         * m4/dprintf.m4 (gl_REPLACE_DPRINTF): Conditionally set REPLACE_DPRINTF.
10519         * lib/stdio.in.h (dprintf): Disable _GL_CXXALIASWARN invocation on
10520         non-glibc systems.
10522         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Conditionally set
10523         REPLACE_DUPLOCALE.
10524         * m4/localename.m4 (gl_LOCALENAME): Conditionally set REPLACE_NEWLOCALE,
10525         REPLACE_DUPLOCALE, REPLACE_FREELOCALE.
10526         * lib/locale.in.h (newlocale, duplocale, freelocale): Disable
10527         _GL_CXXALIASWARN invocation on non-glibc systems.
10529         * lib/unistd.in.h (dup3): Consider REPLACE_DUP3. Disable
10530         _GL_CXXALIASWARN invocation on non-glibc systems.
10531         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_DUP3.
10532         * modules/unistd (Makefile.am): Substitute REPLACE_DUP3.
10533         * m4/dup3.m4 (gl_FUNC_DUP3): Conditionally set REPLACE_DUP3.
10535         * lib/string.in.h (stpcpy): Consider REPLACE_STPCPY. Disable
10536         _GL_CXXALIASWARN invocation on non-glibc systems.
10537         * m4/string_h.m4 (gl_STRING_H_DEFAULTS): Initialize REPLACE_STPCPY.
10538         * modules/string (Makefile.am): Substitute REPLACE_STPCPY.
10539         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Conditionally set REPLACE_STPCPY.
10540         * modules/stpcpy (configure.ac): Consider REPLACE_STPCPY.
10542         * lib/stdlib.in.h (_Exit): Consider REPLACE__EXIT. Disable
10543         _GL_CXXALIASWARN invocation on non-glibc systems.
10544         (getprogname): Consider REPLACE_GETPROGNAME. Disable _GL_CXXALIASWARN
10545         invocation on non-glibc systems.
10546         (posix_openpt): Consider REPLACE_POSIX_OPENPT. Disable _GL_CXXALIASWARN
10547         invocation on non-glibc systems.
10548         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE__EXIT,
10549         REPLACE_GETPROGNAME, REPLACE_POSIX_OPENPT.
10550         * modules/stdlib (Makefile.am): Substitute REPLACE__EXIT,
10551         REPLACE_GETPROGNAME, REPLACE_POSIX_OPENPT.
10552         * m4/_Exit.m4 (gl_FUNC__EXIT): Conditionally set REPLACE__EXIT.
10553         * modules/_Exit (configure.ac): Consider REPLACE__EXIT.
10554         * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Conditionally set
10555         REPLACE_GETPROGNAME.
10556         * modules/getprogname (configure.ac): Consider REPLACE_GETPROGNAME.
10557         * m4/posix_openpt.m4 (gl_FUNC_POSIX_OPENPT): Conditionally set
10558         REPLACE_POSIX_OPENPT.
10559         * modules/posix_openpt (configure.ac): Consider REPLACE_POSIX_OPENPT.
10561         * lib/search.in.h (twalk): Consider REPLACE_TWALK.
10562         * m4/search_h.m4 (gl_SEARCH_H_DEFAULTS): Initialize REPLACE_TWALK.
10563         * modules/search (Makefile.am): Substitute REPLACE_TWALK.
10564         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Conditionally set REPLACE_TWALK.
10565         * modules/tsearch (configure.ac): Consider REPLACE_TWALK.
10567 2023-01-22  Bruno Haible  <bruno@clisp.org>
10569         Resolve conflicts for functions introduced in Android API level 19.
10571         * lib/inttypes.in.h (imaxabs): Consider REPLACE_IMAXABS. Disable
10572         _GL_CXXALIASWARN invocation on non-glibc systems.
10573         (imaxdiv): Consider REPLACE_IMAXDIV. Disable _GL_CXXALIASWARN invocation
10574         on non-glibc systems.
10575         * m4/inttypes.m4 (gl_INTTYPES_H_DEFAULTS): Initialize HAVE_IMAXABS,
10576         HAVE_IMAXDIV, REPLACE_IMAXABS, REPLACE_IMAXDIV.
10577         * modules/inttypes-incomplete (Makefile.am): Substitute REPLACE_IMAXABS,
10578         REPLACE_IMAXDIV.
10579         * m4/imaxabs.m4 (gl_FUNC_IMAXABS): Conditionally set HAVE_IMAXABS,
10580         REPLACE_IMAXABS.
10581         * modules/imaxabs (configure.ac): Consider HAVE_IMAXABS, REPLACE_IMAXABS.
10582         * m4/imaxdiv.m4 (gl_FUNC_IMAXDIV): Conditionally set HAVE_IMAXDIV,
10583         REPLACE_IMAXDIV.
10584         * modules/imaxdiv (configure.ac): Consider HAVE_IMAXDIV, REPLACE_IMAXDIV.
10586         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Conditionally set REPLACE_FUTIMENS.
10587         * lib/sys_stat.in.h (futimens): Disable _GL_CXXALIASWARN invocation on
10588         non-glibc systems.
10590 2023-01-22  Bruno Haible  <bruno@clisp.org>
10592         Resolve conflicts for functions introduced in Android API level 18.
10594         * m4/log2.m4 (gl_FUNC_LOG2): Conditionally set REPLACE_LOG2.
10595         * m4/log2f.m4 (gl_FUNC_LOG2F): Conditionally set REPLACE_LOG2F.
10596         * m4/log2l.m4 (gl_FUNC_LOG2L): Conditionally set REPLACE_LOG2L.
10597         * lib/math.in.h (log2f): Disable _GL_CXXALIASWARN invocation on
10598         non-glibc systems.
10600         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Conditionally set REPLACE_GETDELIM.
10601         * m4/getline.m4 (gl_FUNC_GETLINE): Conditionally set REPLACE_GETLINE.
10602         * lib/stdio.in.h (getdelim, getline): Disable _GL_CXXALIASWARN
10603         invocation on non-glibc systems.
10605 2023-01-22  Bruno Haible  <bruno@clisp.org>
10607         Resolve conflicts for functions introduced in Android API level 16-17.
10608         * m4/posix_memalign.m4 (gl_FUNC_POSIX_MEMALIGN): Conditionally set
10609         REPLACE_POSIX_MEMALIGN.
10610         * lib/stdlib.in.h (posix_memalign): Disable _GL_CXXALIASWARN invocation
10611         on non-glibc systems.
10613 2023-01-22  Bruno Haible  <bruno@clisp.org>
10615         Resolve conflicts for functions introduced in Android API level 16.
10617         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Conditionally set REPLACE_TSEARCH.
10618         * lib/search.in.h (tsearch, tfind, tdelete, twalk): Disable
10619         _GL_CXXALIASWARN invocation on non-glibc systems.
10621         * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Conditionally set
10622         REPLACE_FACCESSAT.
10623         * lib/unistd.in.h (faccessat): Disable _GL_CXXALIASWARN invocation on
10624         non-glibc systems.
10626 2023-01-22  Bruno Haible  <bruno@clisp.org>
10628         Resolve conflicts for functions introduced in Android API level 12.
10630         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Conditionally set
10631         REPLACE_UTIMENSAT.
10632         * lib/sys_stat.in.h (utimensat): Disable _GL_CXXALIASWARN invocation on
10633         non-glibc systems.
10635         * m4/timegm.m4 (gl_FUNC_TIMEGM): Conditionally set REPLACE_TIMEGM.
10636         * lib/time.in.h (timegm): Disable _GL_CXXALIASWARN invocation on
10637         non-glibc systems.
10639         * m4/pwrite.m4 (gl_FUNC_PWRITE): Conditionally set REPLACE_PWRITE.
10640         * lib/unistd.in.h (pwrite): Disable _GL_CXXALIASWARN invocation on
10641         non-glibc systems.
10643         * m4/pread.m4 (gl_FUNC_PREAD): Conditionally set REPLACE_PREAD.
10644         * lib/unistd.in.h (pread): Disable _GL_CXXALIASWARN invocation on
10645         non-glibc systems.
10647         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Conditionally set
10648         REPLACE_FTRUNCATE.
10649         * lib/unistd.in.h (ftruncate): Disable _GL_CXXALIASWARN invocation on
10650         non-glibc systems.
10652 2023-01-22  Bruno Haible  <bruno@clisp.org>
10654         Resolve conflicts for functions introduced in Android API level 9.
10655         * lib/unistd.in.h (fdatasync): Consider REPLACE_FDATASYNC. Disable
10656         _GL_CXXALIASWARN invocation on non-glibc systems.
10657         (pipe2): Consider REPLACE_PIPE2. Disable _GL_CXXALIASWARN invocation on
10658         non-glibc systems.
10659         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_FDATASYNC,
10660         REPLACE_PIPE2.
10661         * modules/unistd (Makefile.am): Substitute REPLACE_FDATASYNC,
10662         REPLACE_PIPE2.
10663         * m4/fdatasync.m4 (gl_FUNC_FDATASYNC): Test for fdatasync using
10664         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. Conditionally set
10665         REPLACE_FDATASYNC.
10666         * modules/fdatasync (Depends-on, configure.ac): Consider
10667         REPLACE_FDATASYNC.
10668         * m4/pipe2.m4 (gl_FUNC_PIPE2): Conditionally set REPLACE_PIPE2.
10670 2023-01-22  Bruno Haible  <bruno@clisp.org>
10672         Resolve conflicts for functions introduced in Android API level 8.
10673         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Conditionally set
10674         REPLACE_TTYNAME_R.
10675         * lib/unistd.in.h (ttyname_r): Disable _GL_CXXALIASWARN invocation on
10676         non-glibc systems.
10678 2023-01-22  Bruno Haible  <bruno@clisp.org>
10680         Prepare for resolving conflicts regarding future Android API levels.
10681         * m4/gnulib-common.m4 (gl_CHECK_FUNCS_ANDROID): Don't check for the
10682         function declaration on platforms other than Android. Set a variable
10683         gl_cv_onwards_func_<func>.
10685 2023-01-22  Paul Eggert  <eggert@cs.ucla.edu>
10687         sigsegv, vma-iter: port to Solaris 10
10688         On this platform, <sys/types.h> does not define off_t if neither
10689         _LP64 nor _FILE_OFFSET_BITS is defined, which can happen if we
10690         #undef _FILE_OFFSET_BITS.  This became a problem with the new way
10691         of doing stdbool, since config.h now includes <stdbool.h>, and
10692         Solaris 10 <stdbool.h> includes <sys/feature_tests.h> which
10693         arranges for _FILE_OFFSET_BITS to always be defined (if only to 32),
10694         which <sys/types.h> assumes.
10695         * lib/stackvma.c, lib/vma-iter.c (_FILE_OFFSET_BITS) [__sun && !_LP64]:
10696         Define to 32 instead of leaving undefined.
10698 2023-01-21  Bruno Haible  <bruno@clisp.org>
10700         login_tty: Ensure declaration in <utmp.h>.
10702         * tests/test-utmp-c++.cc: New file.
10703         * modules/utmp-c++-tests: New file.
10705         * tests/test-utmp.c: New file.
10706         * modules/utmp-tests: New file.
10708         * lib/login_tty.c: Include <utmp.h>.
10709         * m4/login_tty.m4: New file.
10710         (gl_FUNC_LOGIN_TTY): Moved here from m4/pty.m4. Set HAVE_LOGIN_TTY.
10711         * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Moved to m4/login_tty.m4.
10712         * modules/login_tty (Files): Add m4/login_tty.m4.
10713         (Depends-on): Add utmp. Remove pty. Update condition.
10714         (configure.ac): Update condition. Invoke gl_UTMP_MODULE_INDICATOR
10715         instead of gl_PTY_MODULE_INDICATOR.
10716         (Include): List <utmp.h>.
10717         * doc/glibc-functions/login_tty.texi: Mark the include file diversity as
10718         fixed.
10719         * tests/test-login_tty.c: Include <utmp.h>. Don't declare login_tty
10720         here.
10722         * lib/utmp.in.h: New file.
10723         * m4/utmp_h.m4: New file.
10724         * modules/utmp: New file.
10725         * doc/glibc-headers/utmp.texi: New file.
10726         * doc/gnulib.texi (Glibc Header File Substitutes): Include it.
10728 2023-01-21  Bruno Haible  <bruno@clisp.org>
10730         login_tty: Fix detection of declaration (regression 2023-01-19).
10731         * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Check for the three possible header
10732         files.
10734 2023-01-21  Bruno Haible  <bruno@clisp.org>
10736         alignasof tests: Rename test file.
10737         * tests/test-alignasof.c: Renamed from tests/test-stdalign.c.
10738         * modules/alignasof-tests (Files, Makefile.am): Update accordingly.
10740 2023-01-21  Bruno Haible  <bruno@clisp.org>
10742         alignasof tests: Fix GCC warning (regression 2023-01-15).
10743         * tests/test-stdalign.c (alignas): Undefine before redefine.
10745 2023-01-21  Bruno Haible  <bruno@clisp.org>
10747         getprogname: Move declaration from "getprogname.h" to <stdlib.h>.
10748         * lib/stdlib.in.h (getprogname): New declaration.
10749         * lib/getprogname.h: Add deprecation warning.
10750         (getprogname): Remove declaration.
10751         * lib/getprogname.c: Include <stdlib.h> instead of getprogname.h.
10752         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether getprogname is declared.
10753         (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize GNULIB_GETPROGNAME.
10754         (gl_STDLIB_H_DEFAULTS): Initialize HAVE_GETPROGNAME.
10755         * m4/getprogname.m4 (gl_PREREQ_GETPROGNAME): New macro, extracted from
10756         gl_FUNC_GETPROGNAME. Set HAVE_GETPROGNAME.
10757         (gl_FUNC_GETPROGNAME): Remove code that was moved to
10758         gl_PREREQ_GETPROGNAME.
10759         * modules/stdlib (Makefile.am): Substitute GNULIB_GETPROGNAME and
10760         HAVE_GETPROGNAME.
10761         * modules/getprogname (Depends-on): Add stdlib.
10762         (configure.ac): Define a module indicator. Invoke gl_PREREQ_GETPROGNAME.
10763         (Makefile.am): Don't compile getprogname.c if not needed.
10764         (Include): List <stdlib.h> instead of getprogname.h.
10765         * tests/test-getprogname.c: Include <stdlib.h> instead of getprogname.h.
10766         * NEWS: Mention the change.
10767         * lib/argmatch.c: Don't include getprogname.h.
10768         * lib/c-stack.c: Likewise.
10769         * lib/error.c: Likewise.
10770         * lib/git-merge-changelog.c: Likewise.
10772 2023-01-19  Paul Eggert  <eggert@cs.ucla.edu>
10774         snippet/_Noreturn: work around Clang _Noreturn bug
10775         This is a bigger-hammer workaround for the clang _Noreturn issue
10776         fix for dfa.c on 2023-01-01.  Unfortunately, it causes 270
10777         -Wreturn-type and -Wsometimes-uninitialized warnings when building
10778         bleeding-edge GNU Emacs from Git on Fedora 37 with plain
10779         ‘./configure && make’.  So the workaround is enabled only if you
10780         compile with -D_GL_WORK_AROUND_LLVM_BUG_59792.
10781         * lib/_Noreturn.h (_Noreturn):
10782         * m4/gnulib-common.m4 (gl_COMMON_BODY):
10783         #define _Noreturn to be empty if it is Clang 15 or earlier,
10784         and if _GL_WORK_AROUND_LLVM_BUG_59792 is defined.
10786 2023-01-19  Bruno Haible  <bruno@clisp.org>
10788         Fix warnings for functions introduced in Android API level 34.
10789         * modules/execute-tests (configure.ac): Test for close_range using
10790         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
10792 2023-01-19  Bruno Haible  <bruno@clisp.org>
10794         Fix warnings for functions introduced in Android API level 30.
10795         * m4/threadlib.m4 (gl_STDTHREADLIB_BODY): Test for thrd_create using
10796         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
10798 2023-01-19  Bruno Haible  <bruno@clisp.org>
10800         Fix warnings for functions introduced in Android API level 29.
10801         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for getloadavg using
10802         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNC.
10804 2023-01-19  Bruno Haible  <bruno@clisp.org>
10806         Fix warnings for functions introduced in Android API level 28.
10807         * m4/glob.m4 (gl_GLOB): Test for glob using gl_CHECK_FUNCS_ANDROID
10808         instead of AC_CHECK_FUNCS_ONCE.
10810 2023-01-19  Bruno Haible  <bruno@clisp.org>
10812         Fix warnings for functions introduced in Android API level 26.
10813         * m4/mountlist.m4 (gl_MOUNTLIST): Test for hasmntopt using
10814         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
10815         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Test for nl_langinfo using
10816         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10817         * m4/strtod.m4 (gl_PREREQ_STRTOD): Test for nl_langinfo using
10818         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
10819         * m4/strtold.m4 (gl_PREREQ_STRTOLD): Likewise.
10820         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Likewise.
10821         * m4/strerror_r.m4 (gl_PREREQ_STRERROR_R): Test for catgets using
10822         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10823         * m4/utimens.m4 (gl_UTIMENS): Test for lutimes using
10824         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10825         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Test for nl_langinfo_l using
10826         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10827         * modules/duplocale-tests (configure.ac): Likewise.
10828         * m4/getdomainname.m4 (gl_FUNC_GETDOMAINNAME): Update comment.
10830 2023-01-19  Bruno Haible  <bruno@clisp.org>
10832         Fix warnings for functions introduced in Android API level 24.
10833         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Test for strchrnul using
10834         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
10836 2023-01-19  Bruno Haible  <bruno@clisp.org>
10838         Fix warnings for functions introduced in Android API level 23.
10839         * m4/fbufmode.m4 (gl_FUNC_FBUFMODE): Test for __flbf, __fbufsize using
10840         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10841         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT_LGPL): Test for mempcpy using
10842         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10843         * m4/fpurge.m4 (gl_FUNC_FPURGE): Test for __fpurge using
10844         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10845         * m4/freadable.m4 (gl_FUNC_FREADABLE): Test for __freadable using
10846         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10847         * m4/fwritable.m4 (gl_FUNC_FWRITABLE): Test for __fwritable using
10848         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10849         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): Test for __fsetlocking using
10850         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10851         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Test for mempcpy using
10852         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
10853         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Test for mkfifoat using
10854         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10855         * m4/mkostemp.m4 (gl_FUNC_MKOSTEMP): Test for mkostemp using
10856         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10857         * m4/mkostemps.m4 (gl_FUNC_MKOSTEMPS): Test for mkostemps using
10858         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10859         * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Test for login_tty using
10860         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
10861         * m4/sethostname.m4 (gl_FUNC_SETHOSTNAME): Test for sethostname using
10862         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
10863         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS): Test for strerror_r using
10864         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10865         * m4/wmempcpy.m4 (gl_FUNC_WMEMPCPY): Test for wmempcpy using
10866         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10868 2023-01-19  Bruno Haible  <bruno@clisp.org>
10870         Fix warnings for functions introduced in Android API level 21.
10871         * m4/_Exit.m4 (gl_FUNC__EXIT): Test for _Exit using
10872         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
10873         * m4/c-strtod.m4 (gl_C_STRTOLD): Test for strtold_l using
10874         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
10875         * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Test for c32rtomb like
10876         gl_CHECK_FUNCS_ANDROID does.
10877         * m4/dprintf.m4 (gl_FUNC_DPRINTF): Test for dprintf using
10878         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10879         * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_POSIX): Likewise.
10880         * m4/dup3.m4 (gl_FUNC_DUP3): Test for dup3 using
10881         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10882         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Test for duplocale using
10883         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10884         * m4/execvpe.m4 (gl_FUNC_EXECVPE): Test for execvpe using
10885         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
10886         * m4/fts.m4 (gl_FUNC_FTS_CORE): Test for fts_open using
10887         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNC.
10888         * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Test for getprogname using
10889         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10890         * m4/intl-thread-locale.m4 (gt_FUNC_USELOCALE): Test for uselocale using
10891         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10892         * m4/iswblank.m4 (gl_FUNC_ISWBLANK): Test for iswblank using
10893         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10894         * m4/libtextstyle-optional.m4 (gl_LIBTEXTSTYLE_OPTIONAL): Test for
10895         tcdrain using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10896         * m4/linkat.m4 (gl_FUNC_LINKAT): Test for linkat using
10897         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10898         * m4/localename.m4 (gl_LOCALENAME): Test for newlocale, duplocale,
10899         freelocale using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10900         * m4/mbrtoc32.m4 (gl_CHECK_FUNC_MBRTOC32): Test for mbrtoc32 like
10901         gl_CHECK_FUNCS_ANDROID does.
10902         * m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): Test for mbsnrtowcs using
10903         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10904         * m4/mbtowc.m4 (gl_FUNC_MBTOWC): Test for mbtowc using
10905         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
10906         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Test for mknodat using
10907         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10908         * m4/mountlist.m4 (gl_MOUNTLIST): Test for setmntent, endmntent using
10909         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
10910         * m4/posix_openpt.m4 (gl_FUNC_POSIX_OPENPT): Test for posix_openpt using
10911         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10912         * m4/pty.m4 (gl_FUNC_OPENPTY): Test for posix_openpt using
10913         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
10914         * m4/random.m4 (gl_FUNC_RANDOM): Test for initstate, setstate using
10915         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
10916         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Test for stpcpy using
10917         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
10918         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Test for stpncpy using
10919         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10920         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Test for symlinkat using
10921         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10922         * m4/truncate.m4 (gl_FUNC_TRUNCATE): Test for truncate using
10923         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10924         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Test for twalk using
10925         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
10926         * m4/vdprintf.m4 (gl_FUNC_VDPRINTF): Test for vdprintf using
10927         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10928         * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_POSIX): Likewise.
10929         * m4/wcsnrtombs.m4 (gl_FUNC_WCSNRTOMBS): Test for wcsnrtombs using
10930         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10931         * m4/readlinkat.m4 (gl_FUNC_READLINKAT): Test for readlinkat using
10932         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10933         * m4/fchmodat.m4 (gl_PREREQ_FCHMODAT): Likewise.
10934         * modules/careadlinkat (configure.ac): Likewise.
10935         * modules/ftoastr (configure.ac): Test for strtof using
10936         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10937         * modules/duplocale-tests (configure.ac): Test for duplocale using
10938         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10939         * modules/hard-locale-tests (configure.ac): Likewise.
10940         * modules/locale-tests (configure.ac): Test for newlocale using
10941         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10942         * modules/localename-tests (configure.ac): Likewise.
10943         * modules/tsearch-tests (configure.ac): Test for initstate using
10944         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10945         * modules/unistr/u8-stpcpy (configure.ac): Test for stpcpy using
10946         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10948         * m4/tcgetattr.m4: New file, extracted from m4/getpass.m4.
10949         * m4/getpass.m4 (gl_PREREQ_GETPASS): Remove code that tests for
10950         tcgetattr. Invoke gl_HAVE_TCGETATTR instead.
10951         * modules/getpass (Files): Add tcgetattr.m4.
10952         * modules/getpass-gnu (Files): Add tcgetattr.m4.
10953         * modules/term-style-control (Files): Add tcgetattr.m4.
10954         (configure.ac): Remove code that tests for tcgetattr. Invoke
10955         gl_HAVE_TCGETATTR instead.
10957 2023-01-19  Bruno Haible  <bruno@clisp.org>
10959         Fix warnings for functions introduced in Android API level 19.
10960         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Test for futimens using
10961         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10962         * m4/utimens.m4 (gl_UTIMENS): Likewise.
10963         * m4/imaxabs.m4 (gl_FUNC_IMAXABS): Test for imaxabs using
10964         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10965         * m4/imaxdiv.m4 (gl_FUNC_IMAXDIV): Test for imaxdiv using
10966         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10968 2023-01-19  Bruno Haible  <bruno@clisp.org>
10970         Fix warnings for functions introduced in Android API level 18.
10971         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Test for getdelim using
10972         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10973         * m4/getline.m4 (gl_FUNC_GETLINE): Test for getline using
10974         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNC.
10975         * m4/log2.m4 (gl_FUNC_LOG2): Test for log2 using
10976         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
10977         * m4/log2f.m4 (gl_FUNC_LOG2F): Test for log2f using
10978         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
10979         * m4/log2l.m4 (gl_FUNC_LOG2L): Test for log2l using
10980         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
10982 2023-01-19  Bruno Haible  <bruno@clisp.org>
10984         Fix warnings for functions introduced in Android API level 16 or 17.
10985         * m4/posix_memalign.m4 (gl_FUNC_POSIX_MEMALIGN): Test for posix_memalign
10986         using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10987         * m4/alignalloc.m4 (gl_ALIGNALLOC): Likewise.
10988         * m4/pagealign_alloc.m4 (gl_PREREQ_PAGEALIGN_ALLOC): Likewise.
10989         * modules/aligned-malloc (configure.ac): Likewise.
10991 2023-01-19  Bruno Haible  <bruno@clisp.org>
10993         Fix warnings for functions introduced in Android API level 16.
10994         * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Test for faccessat using
10995         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
10996         * m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE,
10997         gl_CANONICALIZE_LGPL_SEPARATE): Likewise.
10998         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
10999         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Test for tsearch using
11000         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
11001         * m4/setenv.m4 (gl_PREREQ_SETENV): Likewise.
11003 2023-01-19  Bruno Haible  <bruno@clisp.org>
11005         Fix warnings for functions introduced in Android API level 12.
11006         Reported by Po Lu <luangruo@yahoo.com>.
11007         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Test for ftruncate using
11008         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
11009         * m4/glob.m4 (gl_PREREQ_GLOB): Test for getpwnam_r using
11010         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
11011         * m4/nproc.m4 (gl_PREREQ_NPROC): Test for sched_getaffinity using
11012         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
11013         * m4/pread.m4 (gl_FUNC_PREAD): Test for pread using
11014         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
11015         * m4/pwrite.m4 (gl_FUNC_PWRITE): Test for pwrite using
11016         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
11017         * m4/thread.m4 (gl_THREAD): Test for pthread_atfork using
11018         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
11019         * m4/timegm.m4 (gl_FUNC_TIMEGM): Test for timegm using
11020         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
11021         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Test for utimensat using
11022         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
11023         * m4/utimens.m4 (gl_UTIMENS): Likewise.
11025 2023-01-19  Bruno Haible  <bruno@clisp.org>
11027         Fix warnings for functions introduced in Android API level 9.
11028         * m4/pipe2.m4 (gl_FUNC_PIPE2): Test for pipe2 using
11029         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
11030         * m4/fdatasync.m4 (gl_FUNC_FDATASYNC): Update comments.
11032 2023-01-19  Bruno Haible  <bruno@clisp.org>
11034         Fix warnings for functions introduced in Android API level 8.
11035         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Test for ttyname_r using
11036         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
11038 2023-01-19  Bruno Haible  <bruno@clisp.org>
11040         fts: Document this module.
11041         * doc/glibc-headers/fts.texi: Mention the 'fts' module.
11042         * doc/glibc-functions/fts_children.texi: Likewise.
11043         * doc/glibc-functions/fts_close.texi: Likewise.
11044         * doc/glibc-functions/fts_open.texi: Likewise.
11045         * doc/glibc-functions/fts_read.texi: Likewise.
11046         * doc/glibc-functions/fts_set.texi: Likewise.
11048 2023-01-18  Bruno Haible  <bruno@clisp.org>
11050         getcwd: Speed up on Linux. Add support for Android.
11051         * lib/getcwd.c (__getcwd_generic): On Linux, use a specific readlink
11052         call to speed up the operation.
11054 2023-01-17  Paul Eggert  <eggert@cs.ucla.edu>
11056         qcopy-acl: port to Fedora 9
11057         It has libattr-2.4.41, which is too old for our code.
11058         Problem reported by Po Lu <https://bugs.gnu.org/60843>.
11059         * m4/xattr.m4 (gl_FUNC_XATTR): Check that we can use
11060         ATTR_ACTION_PERMISSIONS, too.  Refactor so that there’s a single
11061         test program that we compile and link, rather than doing the tests
11062         in dribs and drabs.
11064 2023-01-17  Bruno Haible  <bruno@clisp.org>
11066         execute tests: Avoid test failure with GNU make 4.4.
11067         Reported by Eric Blake in
11068         <https://lists.gnu.org/archive/html/bug-gnulib/2023-01/msg00157.html>.
11069         * tests/test-execute-main.c (main): Reset the SIGPIPE handler to
11070         default on all platforms.
11072 2023-01-17  Bruno Haible  <bruno@clisp.org>
11074         fflush: Tweak last commit.
11075         * lib/stdio-impl.h (fp_): Make the last change work also with newer
11076         Android NDKs and _FILE_OFFSET_BITS=64.
11078 2023-01-17  Ondrej Valousek  <ondrej.valousek.xm@renesas.com>
11080         qset-acl, acl: Improve comments.
11081         * lib/qset-acl.c (qset_acl): Improve comments.
11082         * lib/set-acl.c (set_acl): Likewise.
11084 2023-01-17  Bruno Haible  <bruno@clisp.org>
11086         fflush: Fix a buffer overrun on 32-bit Android.
11087         * lib/stdio-impl.h (fp_): On Android, change the type of _offset to
11088         'long'.
11089         * lib/fflush.c (update_fpos_cache): On Android, update a 'long', not an
11090         'fpos_t'.
11092 2023-01-17  Bruno Haible  <bruno@clisp.org>
11094         execute tests: Avoid test failure on Android.
11095         * tests/test-execute-main.c (main): Reset the SIGPIPE handler to
11096         default.
11098 2023-01-17  Bruno Haible  <bruno@clisp.org>
11100         hard-locale: Port to Android ≥ 5.0.
11101         * lib/hard-locale.c: Include <stdlib.h>.
11102         (hard_locale): On Android, consider also MB_CUR_MAX, even if the
11103         locale's name is "C".
11104         * tests/test-hard-locale.c (test_one, main): Assume that on Android,
11105         even the "C" locale is hard.
11107 2023-01-16  Bruno Haible  <bruno@clisp.org>
11109         stddef tests: Fix compilation error (regression 2023-01-15).
11110         * tests/test-stddef.c: Don't include <stdalign.h>.
11112 2023-01-16  Bruno Haible  <bruno@clisp.org>
11114         mbrtowc, mbrtoc32 tests: Avoid test failure on Android ≥ 5.0.
11115         * tests/test-mbrtowc.c (main): On Android 5.0 or newer, when testing
11116         the "C" locale, verify that the encoding is UTF-8.
11117         * tests/test-mbrtoc32.c (main): Likewise.
11118         * doc/posix-functions/setlocale.texi: Mention the Android problems.
11120         mbrtowc, mbrtoc32 tests: Refactor.
11121         * tests/test-mbrtowc.c (main): Straighten convoluted code.
11122         * tests/test-mbrtoc32.c (main): Likewise.
11124 2023-01-16  Paul Eggert  <eggert@cs.ucla.edu>
11126         sigpipe tests: Modernize use of 'head'.
11127         POSIX no longer requires support for ‘head -1’.
11128         * tests/test-sigpipe.sh: Use ‘head -n1’ rather than ‘head -1’.
11129         * tests/test-sigpipe.c (main): Likewise.
11130         * lib/git-merge-changelog.c (main): Update comment accordingly.
11132 2023-01-15  Paul Eggert  <eggert@cs.ucla.edu>
11134         alignasof: new module
11135         This splits off support for the C23 keywords alignas and alignof,
11136         from the now-deprecated stdalign module.  The latter now merely
11137         provides C11 support.
11138         * MODULES.html.sh, NEWS, doc/gnulib.texi:
11139         * doc/posix-headers/stdalign.texi: Document the change.
11140         * lib/stdalign.in.h: Remove most of the definitions (which are now
11141         supplied by the alignasof module), leaving only
11142         __alignas_is_defined and __alignof_is_defined.
11143         * modules/alignasof, modules/alignasof-tests: New files.
11144         * m4/stdalign.m4 (gl_ALIGNASOF): New macro, with
11145         most of the contents of the old gl_STDALIGN_H.
11146         Do not define __alignas_is_defined or __alignof_is_defined.
11147         (gl_STDALIGN_H): Rely on gl_ALIGNASOF for most of the work.
11148         * modules/alignalloc, modules/alignof, modules/argp:
11149         * modules/crypto/md4-buffer, modules/crypto/md5-buffer:
11150         * modules/crypto/sha1-buffer, modules/crypto/sha256-buffer:
11151         * modules/crypto/sha512-buffer, modules/crypto/sm3-buffer:
11152         * modules/fts, modules/rawmemchr, modules/relocatable-prog-wrapper:
11153         * modules/stddef-tests, modules/sys_socket:
11154         Depend on alignasof, not stdalign.
11155         * modules/stdalign: Deprecate.  Depend on alignasof.
11156         * modules/stdalign-tests: Move most contents to the new module
11157         alignasof-tests, and depend on that.
11159 2023-01-15  Bruno Haible  <bruno@clisp.org>
11161         fpending: Fix compilation error with NDK ≥ r14b and Android API < 23.
11162         Report and patch by Po Lu <luangruo@yahoo.com>.
11163         * lib/fpending.c (__fpending) [__ANDROID__]: Use the fp_ macro.
11165 2023-01-14  Paul Eggert  <eggert@cs.ucla.edu>
11167         alignof: port to strict C23
11168         Problem reported by Khem Raj in:
11169         https://lists.gnu.org/r/bug-gnulib/2023-01/msg00111.html
11170         * lib/alignof.h (alignof_slot) [!__cplusplus]: Use C23-style alignof.
11171         * modules/alignof (Depends-on): Add stdalign.
11173         test-framework-sh: work around AIX 7.2 diff bugs
11174         * tests/init.sh (compare_dev_null_): Run diff in the C locale.
11175         AIX 7.2 diff messes up in UTF-8 locales; for example,
11176         ‘printf '\360\220\200\200\n' | diff - /dev/null’ incorrectly
11177         outputs nothing and exits with status 0 when LC_ALL=en_US.UTF-8.
11179 2023-01-14  Bruno Haible  <bruno@clisp.org>
11181         error, verror tests: Fix link error when the package uses libintl.
11182         * modules/error-tests (Makefile.am): Link test-error with $(LIBINTL).
11183         * modules/verror-tests (Makefile.am): Link test-verror with $(LIBINTL).
11185 2023-01-13  Bruno Haible  <bruno@clisp.org>
11187         localename: Fix -Wtautological-pointer-compare warning in a better way.
11188         * lib/localename.c (duplocale, freelocale): Revert last patch.
11189         (_GL_ARG_NONNULL): Define to empty.
11191 2023-01-13  Paul Eggert  <eggert@cs.ucla.edu>
11193         verify: work around xlclang 16.1 compiler bug
11194         Problem reported by Bruno Haible in:
11195         https://lists.gnu.org/r/grep-devel/2023-01/msg00003.html
11196         * lib/verify.h (_GL_HAS_BUILTIN_TRAP, _GL_HAS_BUILTIN_UNREACHABLE):
11197         Define to 0 if compiler advertises itself as clang before version 5.
11198         xlclang 16.1 advertises itself as 4.0.1 and this patch works
11199         around what appears to be a compiler bug when compiling dfa.c in
11200         bleeding-edge grep.
11202         assert-h: suppress xlclang 16.1 false alarms
11203         * m4/assert_h.m4 (gl_ASSERT_H): Pacify older clangs too,
11204         with regard to single-argument static_assert.
11205         Problem found with xlclang 16.1 on AIX 7.2.
11207         assert-h: fix configure comment-out
11208         * m4/assert_h.m4 (gl_ASSERT_H): Also break apart "#undef
11209         static_assert" with /**/.  Problem discovered with xlclang 16.1,
11210         though it does not directly affect xlclang 16.1.
11212         Don’t use alloc_size with xlclang 16.1
11213         * m4/gnulib-common.m4 (_GL_HAS_ATTRIBUTE): Require Clang 5 instead
11214         of 3.5 for this, to pacify xlclang 16.1.0 on AIX 7.2, which
11215         advertises itself as clang 4.0.1, and which otherwise issues
11216         warnings like “./xalloc.h:141:3: warning: 1540-2990 The attribute
11217         "__attribute__((alloc_size(2, 3)))" is not supported.  The
11218         attribute is ignored.” when building bleeding-edge GNU grep.
11220         localename: -Wtautological-pointer-compare
11221         Problem found by xlclang 16.1 on AIX 7.2.
11222         * lib/localename.c (duplocale, freelocale):
11223         Omit unnecessary comparison of non-null args to NULL.
11225 2023-01-13  Bruno Haible  <bruno@clisp.org>
11227         login_tty tests: Be more verbose when the test fails.
11228         * tests/test-login_tty.c (main): When the test fails, write a message
11229         into a file.
11231 2023-01-13  Bruno Haible  <bruno@clisp.org>
11233         qcopy-acl: Make last patch more robust.
11234         * m4/acl.m4 (gl_FUNC_ACL): Define through AC_DEFUN_ONCE.
11235         * modules/qcopy-acl (configure.ac): Require gl_FUNC_ACL.
11237         qcopy-acl: Adjust link dependencies.
11238         * modules/qcopy-acl (Depends-on): Add condition.
11239         (configure.ac): Set QCOPY_ACL_LIB.
11240         (Link): Add $(QCOPY_ACL_LIB). Remove $(LIB_ACL).
11241         * modules/qacl (Link): Add $(LIB_ACL) and $(QCOPY_ACL_LIB).
11242         * modules/acl (Link): Add $(LIB_ACL) and $(QCOPY_ACL_LIB).
11243         * modules/copy-file (Link): Add $(QCOPY_ACL_LIB).
11244         * modules/supersede (Link): Add $(QCOPY_ACL_LIB).
11245         * modules/acl-tests (Makefile.am): Link test-copy-acl with
11246         $(QCOPY_ACL_LIB).
11247         * modules/copy-file-tests (Makefile.am): Link test-copy-file with
11248         $(QCOPY_ACL_LIB).
11249         * modules/supersede-tests (Makefile.am): Link test-supersede with
11250         $(QCOPY_ACL_LIB).
11252 2023-01-13  Bruno Haible  <bruno@clisp.org>
11254         qcopy-acl: Avoid autoconf warning.
11255         * m4/xattr.m4 (gl_FUNC_XATTR): Provide a description in AC_DEFINE.
11256         Also, protect against unsafe use of a configure option value.
11258 2023-01-12  Ondrej Valousek  <ondrej.valousek.xm@renesas.com>
11260         qcopy-acl: Optimize copying of ACLs by directly copying the attributes.
11261         * lib/qcopy-acl.c (is_attr_permissions): New functions.
11262         (qcopy_acl): If USE_XATTR, copy the ACL related attributes directly.
11263         * m4/xattr.m4: New file.
11264         * modules/qcopy-acl (Files): Add it.
11265         (configure.ac): Invoke gl_FUNC_XATTR.
11267 2023-01-12  Bruno Haible  <bruno@clisp.org>
11269         error: Work around an Android problem.
11270         * lib/error.in.h: Renamed from lib/error.h.
11271         (_GL_ATTRIBUTE_SPEC_PRINTF_ERROR): New macro.
11272         (error): Consider HAVE_ERROR and REPLACE_ERROR.
11273         (error_at_line): Consider HAVE_ERROR_AT_LINE and REPLACE_ERROR_AT_LINE.
11274         * m4/error_h.m4: New file, partially based on m4/error.m4.
11275         * m4/error.m4 (gl_ERROR): Remove the test for error_at_line.
11276         * modules/error-h: New file.
11277         * modules/error (Files): Remove lib/error.h.
11278         (Depends-on): Add error-h. Update conditions.
11279         (configure.ac): Require gl_ERROR_H. Update condition.
11280         * doc/glibc-headers/error.texi: Mention the 'error-h' module.
11281         * doc/glibc-functions/error.texi: Mention the Android problem.
11282         * config/srclist.txt: Add comment regarding error.h.
11284 2023-01-12  Bruno Haible  <bruno@clisp.org>
11286         error, verror tests: Add clarification.
11287         * tests/test-error.c (main): Clarify why we don't test error_at_line
11288         with a NULL filename.
11289         * tests/test-verror.c (main): Clarify why we don't test verror_at_line
11290         with a NULL filename.
11292 2023-01-12  Bruno Haible  <bruno@clisp.org>
11294         verror: Add tests.
11295         * tests/test-verror.sh: New file, based on tests/test-error.sh.
11296         * tests/test-verror.c: New file, based on tests/test-error.c.
11297         * modules/verror-tests: New file.
11299 2023-01-12  Bruno Haible  <bruno@clisp.org>
11301         error: Add tests.
11302         * tests/test-error.sh: New file.
11303         * tests/test-error.c: New file.
11304         * modules/error-tests: New file.
11306 2023-01-11  Bruno Haible  <bruno@clisp.org>
11308         xstrtol-error: Improve comments.
11309         * lib/xstrtol-error.h (xstrtol_fatal): Add parameter names to
11310         declaration.
11312 2023-01-11  Bruno Haible  <bruno@clisp.org>
11314         spawn-pipe tests: Fix test failure on Android.
11315         * tests/test-spawn-pipe-child.c (main): Skip the is_open (STDERR_FILENO)
11316         check on Android.
11318 2023-01-11  Bruno Haible  <bruno@clisp.org>
11320         perror: Fix "perror clobbers strerror's buffer" problem on Android.
11321         * m4/perror.m4 (gl_FUNC_PERROR): Set REPLACE_PERROR to 1 on Android.
11322         * doc/posix-functions/perror.texi: Mention the Android problem.
11324 2023-01-11  Bruno Haible  <bruno@clisp.org>
11326         posix_spawn_file_actions_addfchdir tests: Fix test failure on Android.
11327         * tests/test-posix_spawn-fchdir.c: Include xvasprintf.h.
11328         (test): On Android, use "/proc" instead of "/".
11329         (main): Determine the relative location of the 'pwd' program
11330         accordingly.
11331         * modules/posix_spawn_file_actions_addfchdir-tests (Depends-on): Add
11332         xvasprintf.
11334 2023-01-11  Bruno Haible  <bruno@clisp.org>
11336         rename, renameat, renameatu: Fix test failures on Android/Termux.
11337         * tests/test-rename.h (test_rename): On Android, treat an EACCES failure
11338         like EPERM.
11340 2023-01-11  Bruno Haible  <bruno@clisp.org>
11342         link, linkat tests: Fix test failures on Android/Termux.
11343         * tests/test-link.h (test_link): On Android, treat an EACCES failure
11344         like EPERM.
11345         * tests/test-linkat.c (main): When test_link is marked skipped, skip the
11346         rest of the test as well.
11348 2023-01-11  Bruno Haible  <bruno@clisp.org>
11350         link tests: Correct indentation.
11351         * tests/test-link.h (test_link): Correct indentation.
11353 2023-01-11  Bruno Haible  <bruno@clisp.org>
11355         Fix link errors on Android 4.3.
11356         * lib/asyncsafe-spin.c: Don't use the GCC >= 4.1 builtins on Android,
11357         when building with GCC.
11358         * lib/pthread-spin.c: Likewise.
11359         * lib/simple-atomic.c: Likewise.
11361 2023-01-10  Jim Meyering  <meyering@fb.com>
11363         update-copyright: also work with two or more updatable lines in a file
11364         * build-aux/update-copyright: Replace every occurrence of the copyright
11365         line, not just the first one.
11366         * tests/test-update-copyright.sh: Add a test case for this.
11368 2023-01-10  Bruno Haible  <bruno@clisp.org>
11370         immutable: Fix initialization failure on Android.
11371         * lib/immutable.c: Include "pathmax.h".
11372         (do_init_mmap_file): Use $TMPDIR rather than /tmp, if it is safe.
11373         * modules/immutable (Depends-on): Add pathmax.
11375 2023-01-10  Bruno Haible  <bruno@clisp.org>
11377         Fix some test failures on Android ≥ 11.
11378         * tests/test-fclose.c (main): On Android, avoid triggering the
11379         file-descriptor sanitizer (fdsan).
11380         * tests/test-fdopen.c (main): Likewise.
11381         * tests/test-fflush.c (main): Likewise.
11382         * tests/test-fgetc.c (main): Likewise.
11383         * tests/test-fputc.c (main): Likewise.
11384         * tests/test-fread.c (main): Likewise.
11385         * tests/test-fseeko4.c (main): Likewise.
11386         * tests/test-ftello4.c (main): Likewise.
11387         * tests/test-fwrite.c (main): Likewise.
11389 2023-01-10  Bruno Haible  <bruno@clisp.org>
11391         utimens: Fix warning on Android.
11392         * m4/utimens.m4 (gl_UTIMENS): Test for futimesat and futimes using
11393         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
11395 2023-01-10  Bruno Haible  <bruno@clisp.org>
11397         secure_getenv: Fix warning on Android.
11398         * m4/secure_getenv.m4 (gl_FUNC_SECURE_GETENV): Test for issetugid using
11399         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
11400         * lib/secure_getenv.c: Fix comment regarding issetugid.
11402 2023-01-10  Bruno Haible  <bruno@clisp.org>
11404         renameat, renameatu: Fix warning on Android.
11405         * m4/renameat.m4 (gl_FUNC_RENAMEAT): Test for renameat2 using
11406         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
11408 2023-01-10  Bruno Haible  <bruno@clisp.org>
11410         memset_explicit tests: Fix signature check.
11411         * tests/test-memset_explicit.c: Fix return type in signature check.
11413 2023-01-10  Bruno Haible  <bruno@clisp.org>
11415         math: Fix compilation errors in C++ mode on Android.
11416         * lib/math.in.h: Declare nothing if this file gets included from
11417         /usr/include/c++/v1/math.h too early.
11419 2023-01-10  Bruno Haible  <bruno@clisp.org>
11421         sys_ioctl: Fix compilation error in C++ mode on Android.
11422         * lib/sys_ioctl.in.h (ioctl): Disable _GL_CXXALIASWARN invocation on
11423         non-glibc systems.
11425 2023-01-09  Bruno Haible  <bruno@clisp.org>
11427         threads-h: Improve portability.
11428         * lib/threads.in.h: Use INCLUDE_NEXT_AS_FIRST_DIRECTIVE when possible.
11429         * modules/threads-h (Makefile.am): Substitute
11430         INCLUDE_NEXT_AS_FIRST_DIRECTIVE and NEXT_AS_FIRST_DIRECTIVE_THREADS_H.
11432 2023-01-09  Bruno Haible  <bruno@clisp.org>
11434         threads-h: Fix compilation errors in C++ mode on Android.
11435         * lib/threads.in.h (_GL_ALREADY_INCLUDING_THREADS_H): New macro.
11437 2023-01-09  Bruno Haible  <bruno@clisp.org>
11439         aligned-malloc: Don't disturb the module aligned_alloc.
11440         * modules/aligned-malloc (configure.ac): Test for aligned_alloc in the
11441         same way as module aligned_alloc does.
11443 2023-01-09  Bruno Haible  <bruno@clisp.org>
11445         malloc-h: Improve portability.
11446         * lib/malloc.in.h: Use INCLUDE_NEXT_AS_FIRST_DIRECTIVE when possible.
11447         * modules/malloc-h (Makefile.am): Substitute
11448         INCLUDE_NEXT_AS_FIRST_DIRECTIVE and NEXT_AS_FIRST_DIRECTIVE_MALLOC_H.
11450 2023-01-09  Bruno Haible  <bruno@clisp.org>
11452         reallocarray: Fix compilation error in C++ mode on Android.
11453         * m4/reallocarray.m4 (gl_FUNC_REALLOCARRAY): Use gl_CHECK_FUNCS_ANDROID
11454         instead of AC_CHECK_FUNCS.
11456 2023-01-09  Bruno Haible  <bruno@clisp.org>
11458         getsubopt: Fix compilation error in C++ mode on Android.
11459         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Use gl_CHECK_FUNCS_ANDROID
11460         instead of AC_CHECK_FUNCS_ONCE.
11462 2023-01-09  Bruno Haible  <bruno@clisp.org>
11464         malloc-h: Fix compilation errors in C++ mode on Android.
11465         * lib/malloc.in.h: Don't include <stdlib.h>, except on Solaris and on
11466         HP-UX. Include <stddef.h>. Make _GL_ATTRIBUTE_DEALLOC_FREE work (code
11467         snippet copied from string.in.h and wchar.in.h).
11468         * m4/malloc_h.m4 (gl_MALLOC_H_REQUIRE_DEFAULTS): Invoke
11469         gl_STDLIB_H_REQUIRE_DEFAULTS.
11470         * modules/malloc-h (Depends-on): Add stddef, stdlib.
11471         (Makefile.am): Substitute GNULIB_FREE_POSIX and REPLACE_FREE.
11473 2023-01-09  Bruno Haible  <bruno@clisp.org>
11475         gettime: Fix compilation error in C++ mode on Android.
11476         * m4/gettime.m4 (gl_CHECK_FUNC_TIMESPEC_GET): Also test whether
11477         timespec_get is declared.
11479 2023-01-09  Bruno Haible  <bruno@clisp.org>
11481         malloc-h: Fix compilation error in C++ mode on Android.
11482         * lib/malloc.in.h (_GL_ALREADY_INCLUDING_MALLOC_H): New macro.
11484 2023-01-07  Bruno Haible  <bruno@clisp.org>
11486         timer_time: Rename LIB_TIMER_TIME to TIMER_TIME_LIB.
11487         * m4/timer_time.m4: Rename LIB_TIMER_TIME to TIMER_TIME_LIB.
11488         All uses changed.
11489         * NEWS: Mention the change
11491 2023-01-07  Bruno Haible  <bruno@clisp.org>
11493         setlocale-null: Rename LIB_SETLOCALE_NULL to SETLOCALE_NULL_LIB.
11494         * m4/setlocale_null.m4: Rename LIB_SETLOCALE_NULL to SETLOCALE_NULL_LIB.
11495         All uses changed.
11496         * NEWS: Mention the change
11498 2023-01-07  Bruno Haible  <bruno@clisp.org>
11500         setlocale: Rename LIB_SETLOCALE to SETLOCALE_LIB.
11501         * m4/setlocale.m4: Rename LIB_SETLOCALE to SETLOCALE_LIB.
11502         All uses changed.
11503         * NEWS: Mention the change.
11505 2023-01-07  Bruno Haible  <bruno@clisp.org>
11507         select: Rename LIB_SELECT to SELECT_LIB.
11508         * m4/select.m4: Rename LIB_SELECT to SELECT_LIB.
11509         All uses changed.
11510         * NEWS: Mention the change.
11512 2023-01-07  Bruno Haible  <bruno@clisp.org>
11514         sched_yield: Rename LIB_SCHED_YIELD to SCHED_YIELD_LIB.
11515         * m4/threadlib.m4: Rename LIB_SCHED_YIELD to SCHED_YIELD_LIB.
11516         All uses changed.
11517         * NEWS: Mention the change.
11519 2023-01-07  Bruno Haible  <bruno@clisp.org>
11521         pthread_sigmask: Rename LIB_PTHREAD_SIGMASK to PTHREAD_SIGMASK_LIB.
11522         * m4/pthread_sigmask.m4: Rename LIB_PTHREAD_SIGMASK to
11523         PTHREAD_SIGMASK_LIB.
11524         All uses changed.
11525         * NEWS: Mention the change.
11527 2023-01-07  Bruno Haible  <bruno@clisp.org>
11529         posix_spawn: Rename LIB_POSIX_SPAWN to POSIX_SPAWN_LIB.
11530         * m4/spawn_h.m4: Rename LIB_POSIX_SPAWN to POSIX_SPAWN_LIB.
11531         All uses changed.
11532         * NEWS: Mention the change.
11534 2023-01-07  Bruno Haible  <bruno@clisp.org>
11536         poll: Rename LIB_POLL to POLL_LIB.
11537         * m4/poll.m4: Rename LIB_POLL to POLL_LIB.
11538         All uses changed.
11539         * NEWS: Mention the change.
11541 2023-01-07  Bruno Haible  <bruno@clisp.org>
11543         nanosleep: Rename LIB_NANOSLEEP to NANOSLEEP_LIB.
11544         * m4/nanosleep.m4: Rename LIB_NANOSLEEP to NANOSLEEP_LIB.
11545         All uses changed.
11546         * NEWS: Mention the change.
11548 2023-01-07  Bruno Haible  <bruno@clisp.org>
11550         mbrtowc: Rename LIB_MBRTOWC to MBRTOWC_LIB.
11551         * m4/mbrtowc.m4: Rename LIB_MBRTOWC to MBRTOWC_LIB.
11552         All uses changed.
11553         * NEWS: Mention the change.
11555 2023-01-07  Bruno Haible  <bruno@clisp.org>
11557         hard-locale: Rename LIB_HARD_LOCALE to HARD_LOCALE_LIB.
11558         * modules/hard-locale (configure.ac): Rename LIB_HARD_LOCALE to
11559         HARD_LOCALE_LIB.
11560         All uses changed.
11561         * NEWS: Mention the change.
11563 2023-01-07  Bruno Haible  <bruno@clisp.org>
11565         getrandom: Rename LIB_GETRANDOM to GETRANDOM_LIB.
11566         * m4/getrandom.m4: Rename LIB_GETRANDOM to GETRANDOM_LIB.
11567         All uses changed.
11568         * NEWS: Mention the change.
11570 2023-01-07  Bruno Haible  <bruno@clisp.org>
11572         getlogin, getlogin_r: Rename LIB_GETLOGIN to GETLOGIN_LIB.
11573         * m4/getlogin.m4: Rename LIB_GETLOGIN to GETLOGIN_LIB.
11574         All uses changed.
11575         * NEWS: Mention the change.
11577 2023-01-07  Bruno Haible  <bruno@clisp.org>
11579         gethrxtime: Rename LIB_GETHRXTIME to GETHRXTIME_LIB.
11580         * m4/gethrxtime.m4: Rename LIB_GETHRXTIME to GETHRXTIME_LIB.
11581         All uses changed.
11582         * NEWS: Mention the change.
11584 2023-01-07  Bruno Haible  <bruno@clisp.org>
11586         fdatasync: Rename LIB_FDATASYNC to FDATASYNC_LIB.
11587         * m4/fdatasync.m4: Rename LIB_FDATASYNC to FDATASYNC_LIB.
11588         All uses changed.
11589         * NEWS: Mention the change.
11591 2023-01-07  Bruno Haible  <bruno@clisp.org>
11593         euidaccess: Rename LIB_EACCESS to EUIDACCESS_LIBGEN.
11594         * m4/euidaccess.m4: Rename LIB_EACCESS to EUIDACCESS_LIBGEN.
11595         All uses changed.
11596         * NEWS: Mention the change.
11598 2023-01-07  Bruno Haible  <bruno@clisp.org>
11600         duplocale: Rename LIB_DUPLOCALE to DUPLOCALE_LIB.
11601         * m4/duplocale.m4: Rename LIB_DUPLOCALE to DUPLOCALE_LIB.
11602         All uses changed.
11603         * NEWS: Mention the change.
11605 2023-01-07  Bruno Haible  <bruno@clisp.org>
11607         clock_time: Rename LIB_CLOCK_GETTIME to CLOCK_TIME_LIB.
11608         * m4/clock_time.m4: Rename LIB_CLOCK_GETTIME to CLOCK_TIME_LIB.
11609         All uses changed.
11610         * NEWS: Mention the change.
11612 2023-01-06  Paul Eggert  <eggert@cs.ucla.edu>
11614         file-has-acl: don’t bother setting LIB_HAS_ACL
11615         * m4/acl.m4 (gl_FUNC_ACL, gl_FILE_HAS_ACL): Don’t set LIB_HAS_ACL.
11616         I think only Coreutils and Tar used it, and I’ve updated them.
11618         bootstrap: suppress stray message from --pull
11619         * build-aux/bootstrap: Regenerate.
11620         * top/bootstrap-funclib.sh (autopull): Suggest running autogen.sh
11621         only if it exists (i.e., the package is using autopull.sh/autogen.sh).
11622         Suggest the same name for autogen.sh that is used in the test.
11624 2023-01-05  Bruno Haible  <bruno@clisp.org>
11626         string: Fix compilation errors in C++ mode on Android.
11627         * lib/string.in.h (memrchr, strchrnul, strcasestr): Disable
11628         _GL_CXXALIASWARN invocation on non-glibc systems.
11630 2023-01-05  Bruno Haible  <bruno@clisp.org>
11632         getpass: Fix compilation error on Android.
11633         * m4/getpass.m4 (gl_FUNC_GETPASS): Define NO_INLINE_GETPASS.
11634         * doc/glibc-functions/getpass.texi: Mention the Android problem.
11636 2023-01-05  Bruno Haible  <bruno@clisp.org>
11638         Recognize functions added in future versions of Android.
11639         * m4/gnulib-common.m4 (gl_CHECK_FUNCS_ANDROID): New macro.
11640         * m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Use
11641         gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
11642         * m4/freading.m4 (gl_FUNC_FREADING): Likewise.
11643         * m4/fseterr.m4 (gl_FUNC_FSETERR): Likewise.
11644         * m4/fwriting.m4 (gl_FUNC_FWRITING): Likewise.
11645         * m4/getentropy.m4 (gl_FUNC_GETENTROPY): Likewise.
11646         * m4/getlogin_r.m4 (gl_CHECK_FUNCS_ANDROID): Likewise.
11647         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Likewise.
11648         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
11649         * m4/spawn_h.m4 (gl_HAVE_POSIX_SPAWN): Likewise.
11650         * doc/glibc-functions/getentropy.texi: Mark function as existing in
11651         Android 9.0.
11652         * doc/glibc-functions/getrandom.texi: Likewise.
11653         * doc/posix-functions/pthread_attr_getinheritsched.texi: Likewise.
11654         * doc/posix-functions/pthread_attr_setinheritsched.texi: Likewise.
11656 2023-01-05  Bruno Haible  <bruno@clisp.org>
11658         copy-file, supersede: Fix link-time requirements.
11659         * modules/copy-file (Link): Add $(LIB_ACL).
11660         * modules/supersede (Link): Likewise.
11662 2023-01-05  Bruno Haible  <bruno@clisp.org>
11664         More systematic naming of LIB variables.
11665         * m4/acl.m4 (gl_FUNC_ACL, gl_FILE_HAS_ACL): Set FILE_HAS_ACL_LIB to the
11666         same value as LIB_HAS_ACL.
11667         * modules/file-has-acl (Link): Use FILE_HAS_ACL_LIB instead of
11668         LIB_HAS_ACL.
11669         * modules/file-has-acl-tests (Makefile.am): Likewise.
11671 2023-01-04  Bruno Haible  <bruno@clisp.org>
11673         doc: Update regarding Android.
11674         * doc/glibc-functions/getdtablesize.texi: Update Android information.
11675         * doc/glibc-functions/wait3.texi: Likewise.
11676         * doc/pastposix-functions/ftime.texi: Likewise.
11677         * doc/pastposix-functions/index.texi: Likewise.
11678         * doc/pastposix-functions/pthread_attr_getstackaddr.texi: Likewise.
11679         * doc/pastposix-functions/pthread_attr_setstackaddr.texi: Likewise.
11680         * doc/pastposix-functions/wcswcs.texi: Likewise.
11682 2023-01-03  Bruno Haible  <bruno@clisp.org>
11684         ffsl, ffsll: Fix compilation error on Android.
11685         * lib/string.in.h: On Android as well, include <strings.h>.
11686         * m4/ffsl.m4 (gl_FUNC_FFSL): Use a specific link test instead of
11687         AC_CHECK_FUNCS_ONCE.
11688         * m4/ffsll.m4 (gl_FUNC_FFSLL): Likewise.
11689         * doc/glibc-functions/ffsl.texi: Mention Android problems.
11690         * doc/glibc-functions/ffsll.texi: Likewise.
11692         ffs: Document Android problem.
11693         * doc/posix-functions/ffs.texi: Mention Android problem.
11694         * m4/ffs.m4: Update comment.
11696 2023-01-03  Bruno Haible  <bruno@clisp.org>
11698         stdio: Fix error in C++ mode on Android, due to putw.
11699         * lib/stdio.in.h (putw): Don't declare in the C++ namespace if putw is
11700         not declared.
11701         * m4/stdio_h.m4 (gl_STDIO_H): Test whether putw is declared.
11702         (gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_PUTW.
11703         * modules/stdio (Makefile.am): Substitute HAVE_DECL_PUTW.
11704         * doc/glibc-functions/putw.texi: Update regarding Android.
11706 2023-01-03  Bruno Haible  <bruno@clisp.org>
11708         stdio: Fix error in C++ mode on Android, due to getw.
11709         * lib/stdio.in.h (getw): Don't declare in the C++ namespace if getw is
11710         not declared.
11711         * m4/stdio_h.m4 (gl_STDIO_H): Test whether getw is declared.
11712         (gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_GETW.
11713         * modules/stdio (Makefile.am): Substitute HAVE_DECL_GETW.
11715 2023-01-02  Bruno Haible  <bruno@clisp.org>
11717         sigsegv: Fix compilation error on Android 4.3.
11718         * lib/sigsegv.in.h: For Android, don't include <ucontext.h> and don't
11719         reference ucontext_t.
11720         * lib/sigsegv.c (SIGSEGV_FAULT_): For Android, use a plain POSIX fault
11721         handler (cf. libsigsegv/src/fault-posix.h).
11723 2023-01-01  Paul Eggert  <eggert@cs.ucla.edu>
11725         dfa: work around Clang 15 bug
11726         Problem reported by Kenton Groombridge in:
11727         https://lists.gnu.org/archive/html/bug-gawk/2022-12/msg00010.html
11728         On x86-64, Clang 15 gets confused by a call (X ? dfaerror :
11729         dfawarn) (Y) and generates the wrong code, presumably because
11730         dfaerror is _Noreturn and dfawarn is not.
11731         * lib/dfa.c (parse_bracket_exp): Reword to have one call for
11732         dfaerror, the other for dfawarn.
11734 2023-01-01  Bruno Haible  <bruno@clisp.org>
11736         doc: Update regarding stable branches.
11737         * doc/gnulib-readme.texi (Stable Branches): Mention new branch
11738         stable-202301. Mention that stable-202201 is no longer updated.
11740 2022-12-31  Paul Eggert  <eggert@cs.ucla.edu>
11742         maint: use UTC when updating copyright date
11743         Problem reported by Simon Josefsson in:
11744         https://lists.gnu.org/r/bug-gnulib/2022-12/msg00125.html
11745         * Makefile (COPYRIGHT_TZ): New macro.
11746         (update-copyright): Use it.
11748 2022-12-28  Paul Eggert  <eggert@cs.ucla.edu>
11750         assert-h: port static_assert to strict C99
11751         * lib/verify.h (_GL_VERIFY): Port MSVC hack back to C99.
11752         Problem found when testing bleeding-edge gzip on IBM XL C for AIX,
11753         V12.1 (5765-J02, 5725-C72), which complained ‘"malloca.c", line
11754         42.56: 1506-041 (E) The invocation of macro _Static_assert
11755         contains fewer arguments than are required by the macro
11756         definition.’  This diagnostic is valid because C99 requires
11757         that if you #define _Static_assert(R, ...) you must call
11758         _Static_assert with at least two arguments.  I found a similar
11759         problem with Sun C 5.9 SunOS_sparc Patch 124867-12 2009/11/22.
11761 2022-12-27  Paul Eggert  <eggert@cs.ucla.edu>
11763         file-has-acl: fix recently-introduced NFSv4 bug
11764         * lib/file-has-acl.c (acl_nfs4_nontrivial): Fix off-by-one
11765         error when rounding WHOLEN up to next multiple of 4.
11766         Pacify GCC 12.2.1 -Wcast-align.
11768         Add --pull, --gen options to build-aux/bootstrap
11769         This supports a single bootstrap script with --pull and --gen
11770         options, as an alternative to separate autogen.sh and autopull.sh
11771         and bootstrap-funclib.sh auxiliary files.
11772         * top/bootstrap: With --version, also output library version.
11773         Support update of package that has only the bootstrap script,
11774         and not the other three files.
11776         Support packages with just 'bootstrap'
11777         * top/bootstrap: With --version, also output library version.
11778         Support update of package that has only the bootstrap script,
11779         and not the other three files.
11781         * top/bootstrap-funclib.sh (scriptlibversion): Rename
11782         from scriptversion.  All uses changed.  This way we
11783         can distinguish script from script library versions.
11784         (upgrade_bootstrap): If the package currently has only
11785         the bootstrap script, just update that.
11787         Bootstrap with functions, not scripts
11788         * top/bootstrap: Use autopull and autogen functions, not
11789         shell scripts.  This lets build-aux/bootstrap become a
11790         standalone script.  It does not change the behavior of
11791         top/bootstrap, except for minor rewording of disagnostics.
11793         Make autopull a shell function too
11794         This does not change behavior.  It is helpful for future changes.
11795         * top/autopull.sh: Call autopull to do the actual work.
11796         (usage, download_po_files, update_po_files):
11797         Move to top/bootstrap-funclib.sh.
11798         * top/bootstrap-funclib.sh (autopull_usage): Rename from ‘usage’.
11799         (autopull): New function, containing the top level of the
11800         old top/autopull.sh.
11802         Make autogen a shell function too
11803         This does not change behavior.  It is helpful for future changes.
11804         * top/autogen.sh: Call autogen to do the actual work.
11805         (usage, version_controlled_file, gitignore_entries, insert_if_absent):
11806         (insert_vc_ignore, symlink_to_dir): Move to top/bootstrap-funclib.sh.
11807         * top/bootstrap-funclib.sh (autogen_usage): Rename from ‘usage’.
11808         (autogen): New function, containing the top level of the
11809         old top/autogen.sh.
11811 2022-12-27  Bruno Haible  <bruno@clisp.org>
11813         Fix compilation errors in C++ mode on Solaris 11 OpenIndiana.
11814         * m4/gnulib-common.m4 (gl_COMMON_BODY): In _GL_ATTRIBUTE_DEALLOC_FREE,
11815         with GNU C++, cast the 'free' function.
11816         * lib/string.in.h (_GL_ATTRIBUTE_DEALLOC_FREE): With GNU C++, cast the
11817         'free' function.
11818         * lib/wchar.in.h (_GL_ATTRIBUTE_DEALLOC_FREE): Likewise.
11820 2022-12-27  Bruno Haible  <bruno@clisp.org>
11822         stdnoreturn: Mark as deprecated, not obsolete. (Regression 2022-12-24.)
11823         * modules/stdnoreturn (Status): Remove.
11824         (Notice): Say that it is deprecated, not obsolete.
11825         * doc/noreturn.texi: Fix a typo.
11827 2022-12-26  Paul Eggert  <eggert@cs.ucla.edu>
11829         stdbool-c99: fix typo
11830         Reported against Autoconf by Todd C. Miller in:
11831         https://lists.gnu.org/r/autoconf/2022-12/msg00001.html
11832         * m4/stdbool.m4 (AC_CHECK_HEADER_STDBOOL): Sync from Autoconf master.
11834 2022-12-26  Bruno Haible  <bruno@clisp.org>
11836         ctime: Mark as deprecated, not obsolete. (Regression 2022-12-21.)
11837         * modules/ctime (Status): Remove.
11838         (Notice): Say that it is deprecated, not obsolete.
11840 2022-12-25  Paul Eggert  <eggert@cs.ucla.edu>
11842         largefile: sync from Autoconf master
11843         * m4/largefile.m4 (gl_SET_LARGEFILE_SOURCE): Test whether
11844         AC_SYS_YEAR2038 is defined when this macro is defined, not when it
11845         is used, as we now define AC_SYS_YEAR2038 later.
11846         (_AC_SYS_LARGEFILE_MACRO_VALUE): Remove.
11847         (_AC_SYS_YEAR2038_TEST_CODE, _AC_SYS_YEAR2038_OPTIONS)
11848         (_AC_SYS_YEAR2038_PROBE, _AC_SYS_YEAR2038_ENABLE)
11849         (_AC_SYS_YEAR2038_OPT_IN, AC_SYS_YEAR2038)
11850         (_AC_SYS_LARGEFILE_TEST_CODE, _AC_SYS_LARGEFILE_OPTIONS)
11851         (_AC_SYS_LARGEFILE_PROBE, _AC_SYS_LARGEFILE_ENABLE): New macros.
11852         (AC_SYS_LARGEFILE): Use them.
11853         * m4/year2038.m4: Remove.  All mentions removed.
11854         * modules/largefile, modules/year2038 (configure.ac-early):
11855         Do not require gl_YEAR2038_EARLY.
11856         * modules/year2038 (Depends-on): Depend on largefile.
11857         (configure.ac): Require AC_SYS_YEAR2038, not gl_YEAR2038.
11859 2022-12-24  Paul Eggert  <eggert@cs.ucla.edu>
11861         extensions: enable some C23 Annex F functions
11862         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS):
11863         Also define __STDC_WANT_IEC_60559_EXT__, for C23 Annex F
11864         functions like totalorder.  This syncs from Autoconf master.
11866         stdnoreturn: deprecate
11867         C23 says <stdnoreturn.h> is obsolescent, so deprecate the
11868         stdnoreturn module.  I don't think it was being used anyway
11869         as it had too many problems.
11870         * modules/stdnoreturn: Mark as obsolete.
11872 2022-12-23  Paul Eggert  <eggert@cs.ucla.edu>
11874         file-has-acl: improve recent NFSv4 support
11875         This fixes a link failure with emacsclient on GNU/Linux.  This
11876         program wants file_has_acl but none of the other ACL primitives,
11877         so it doesn’t link acl-internal.o; this way it doesn’t need to
11878         link with -lacl.  While I was at it I reviewed the recent changes,
11879         fixed some unlikely overflow bugs, and adjusted to GNU style.
11880         * doc/acl-nfsv4.txt: Remove.  Its contents are now in a
11881         comment in lib/file-has-acl.c.
11882         * lib/acl-internal.c, lib/acl-internal.h: Move recent changes
11883         relating to acl_nfs4_nontrivial to lib/file-has-acl.c, so that
11884         there is no trouble linking programs that need only file_has_acl.
11885         * lib/file-has-acl.c (acl_nfs4_nontrivial): Move here from
11886         lib/acl-internal.c, so that we needn't link -lacl in
11887         programs that want only file_has_acl, such as emacsclient.
11888         Do not assume a char buffer is aligned for uint32_t.
11889         Check more carefully for buffer read overrun.
11890         Allow up to 6 ACEs, since other code does; but check
11891         that they’re distinct.  Avoid integer overflow.
11892         Use memcmp rather than strncmp to compare memory blocks.
11893         (file_has_acl): Preserve initial errno instead of setting to 0.
11894         Allocate a bit more room for trivial ACL buffer.
11895         Use EINVAL for botchedk NFSv4 ACLs (which shouldn’t happen).
11897 2022-12-22  Paul Eggert  <eggert@cs.ucla.edu>
11899         posix_spawnp-tests: fix filename typo
11900         Problem reported for GNU m4 by Mitchell Dorrell in:
11901         https://lists.gnu.org/r/bug-m4/2022-12/msg00000.html
11902         * tests/test-posix_spawnp-script.c (DATA_FILENAME):
11903         Fix typo in file name that caused race with
11904         test-posix_spawn-script.c.
11906 2022-12-22  Ondrej Valousek  <ondrej.valousek.xm@renesas.com>
11908         file-has-acl: Basic support for checking NFSv4 ACLs in Linux.
11909         * lib/acl-internal.h (acl_nfs4_nontrivial): New declaration.
11910         * lib/acl-internal.c (acl_nfs4_nontrivial): New function.
11911         * lib/file-has-acl.c: Include <arpa/inet.h>.
11912         (XATTR_NAME_NFSV4_ACL, TRIVIAL_NFS4_ACL_MAX_LENGTH): New macros.
11913         (file_has_acl): Test for NFSv4 ACLs.
11914         * doc/acl-nfsv4.txt: New file.
11916 2022-12-21  Paul Eggert  <eggert@cs.ucla.edu>
11918         Port __has_c_attribute to strict C23
11919         * m4/gnulib-common.m4 (_GL_HAS_C_ATTRIBUTE): Remove, as C23 says
11920         behavior is undefined if __has_c_attribute appears anywhere other
11921         than at the top level of an #if or #ifdef.  All uses replaced by
11922         wordier invocations of __has_c_attribute.
11924         asctime, ctime: deprecate
11925         C23 deprecates asctime and ctime, so deprecate them in Gnulib too.
11926         * NEWS, doc/posix-functions/asctime.texi:
11927         * doc/posix-functions/ctime.texi: Mention this.
11928         * lib/time.in.h (ctime): Deprecate any ctime replacement.
11929         * modules/ctime: Now obsolete.
11931 2022-12-17  Paul Eggert  <eggert@cs.ucla.edu>
11933         memset_explicit: port to older MS-Windows
11934         * lib/memset_explicit.c (memset_explicit):
11935         Remove special case for C==0 and MS-Windows.  The code isn’t
11936         needed for correctness and it’s more trouble than it’s worth as it
11937         prevents this module from being used with GNU Emacs, which wants
11938         to port to MS-Windows versions so old that they lack
11939         SecureZeroMemory.
11941 2022-12-09  Bruno Haible  <bruno@clisp.org>
11943         Update users.txt.
11944         * users.txt: Add lbzip2.
11946 2022-12-09  Paul Eggert  <eggert@cs.ucla.edu>
11948         fts: make debug version compilable again
11949         This fixes things in what I hope is a better way than the
11950         fd-only approach proposed by Kamil Dudka here:
11951         https://lists.gnu.org/archive/html/bug-gnulib/2018-03/msg00079.html
11952         https://lists.gnu.org/archive/html/bug-gnulib/2018-03/msg00080.html
11953         * lib/fts.c (GNULIB_FTS_DEBUG): Rename from FTS_DEBUG,
11954         to avoid collision with coreutils symbol.
11955         Do not include <stdint.h> (not needed, since we include <stdint.h>)
11956         or "getcwdat.h" (no longer exists).
11957         (fd_ring_check, fd_ring_print): Add forward decls.
11958         (struct devino): New type.
11959         (PRINT_DEVINO): New macro.
11960         (getdevino): New static function.
11961         (fd_ring_print): Do nothing if not debugging.
11962         (fd_ring_print, fd_ring_check): Use getdevino instead of getcwdat.
11963         The output isn’t as good, but at least it compiles and runs.
11965 2022-12-07  Paul Eggert  <eggert@cs.ucla.edu>
11967         verify: update __STDC_VERSION__ as per C23
11968         This shouldn’t affect anything; it’s merely a refactoring.
11969         * lib/verify.h (_GL_HAVE__STATIC_ASSERT1): Require
11970         __STDC_VERSION__ to be at least 202311, instead of at least
11971         202000.  The latter number was put in in 2019 because we didn’t
11972         yet know C23’s __STDC_VERSION__ value.
11974 2022-12-06  Paul Eggert  <eggert@cs.ucla.edu>
11976         fts: fix race + mishandling of fstatat failure
11977         I hope this fixes a Luke Dashjr coreutils bug report about ext4
11978         ramdisks; see “9.1: du Aborted (corrupt filesystem)”
11979         <https://debbugs.gnu.org/59821>.
11980         * lib/fts.c (fts_build): Fix two bugs.  First, fts_stat was being
11981         called without checking its return value, causing a later abort.
11982         Second, there was a race between opening a directory and statting
11983         it, fixed by using fstat on the file descriptor rather than
11984         fstatat on the directory name.
11986         fts: omit goto break_without_closedir
11987         * lib/fts.c (fts_build): Refactor to omit goto.
11989         fts: clarify ISSET
11990         * lib/fts.c (ISSET): Refactor to clarify boolean usage.
11992 2022-12-05  Bruno Haible  <bruno@clisp.org>
11994         argp: Correct documentation.
11995         Reported by José E. Marchesi <jemarch@gnu.org>.
11996         * doc/glibc-functions/argp_*.texi: Mention the 'argp' module.
11998 2022-12-02  Pádraig Brady  <P@draigBrady.com>
12000         doc: poll: document poll of special files not supported on macOS
12001         * doc/posix-functions/poll.texi: Reinstate (updated) macOS info,
12002         removed in recent cleanup re removal of support for Mac OS X <= 10.4.
12003         * m4/poll.m4: Update macOS to latest tested version.
12005 2022-11-29  Pádraig Brady  <P@draigBrady.com>
12007         add new ronna and quetta SI prefixes
12008         As voted for in Nov 2022 by the BIPM:
12009         https://www.bipm.org/en/cgpm-2022/resolution-3
12011         * lib/human.c: Add Ronna (10^27), and Quetta (10^30) to the prefix list.
12012         * lib/xstrtol.c (__xstrtol): Likewise.
12014 2022-11-29  Bruno Haible  <bruno@clisp.org>
12016         Update users.txt.
12017         * users.txt: Add 4ti2, ale, amanda, binfmt-support, cgminer, collectd,
12018         complexity, dc3dd, dico, enchant-2, fuse-overlayfs, gsequencer, idutils,
12019         libu2f-host, licenseutils, mmv, pacemaker, trader, ttfautohint.
12021 2022-11-27  Paul Eggert  <eggert@cs.ucla.edu>
12023         explicit_bzero: implement via memset_explicit
12024         * lib/explicit_bzero.c (explicit_bzero):
12025         Simplify by just calling memset_explicit.
12026         * m4/explicit_bzero.m4 (gl_PREREQ_EXPLICIT_BZERO): Remove.
12027         All uses removed.
12028         * modules/explicit_bzero (Depends-on): Add memset_explicit.
12030         explicit_bzero: memset_explicit is standard
12031         * doc/glibc-functions/explicit_bzero.texi:
12032         Say that memset_explicit is preferred in new code.
12034         read-file: use memset_explicit
12035         * lib/read-file.c (fread_file, read_file):
12036         Use memset_explicit instead of explicit_bzero.
12037         * modules/read-file (Depends-on): Depend on memset_explicit
12038         instead of on explicit_bzero.
12040         memset_explicit: new module
12041         * doc/posix-functions/memset_explicit.texi, lib/memset_explicit.c:
12042         * m4/memset_explicit.m4, modules/memset_explicit:
12043         * modules/memset_explicit-tests, tests/test-memset_explicit.c:
12044         New files.
12045         * lib/string.in.h (memset_explict): New decl.
12046         * m4/string_h.m4 (gl_STRING_H, gl_STRING_H_REQUIRE_DEFAULTS)
12047         (gl_STRING_H_DEFAULTS):
12048         * modules/string (string.h):
12049         Support memset_explicit.
12051         explicit_bzero: add poison
12052         * m4/string_h.m4 (gl_STRING_H): Poison explicit_bzero.
12053         This was inadvertently omitted when explicit_bzero was added.
12055 2022-11-27  Arsen Arsenović  <arsen@aarsen.me>
12057         bootstrap: Fix --help output.
12058         * build-aux/bootstrap (usage): Regenerate.
12060 2022-11-27  Paul Eggert  <eggert@cs.ucla.edu>
12062         explicit_bzero: work with gcc -std=c99
12063         * lib/explicit_bzero.c (explicit_bzero) [__GNUC__ && !__clang__]:
12064         Use __asm__ instead of asm.
12066 2022-11-26  Paul Eggert  <eggert@cs.ucla.edu>
12068         Prefer "kill -INT" to killing with a number
12069         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK):
12070         * tests/test-login_tty.c (main):
12071         * tests/test-pthread_sigmask1.c (main):
12072         * tests/test-sigprocmask.c (main):
12073         Prefer "kill -INT" to "kill -N" where N is SIGINT’s value.
12074         Don’t assume pid_t fits in int.
12076 2022-11-25  Bruno Haible  <bruno@clisp.org>
12078         In 'trap' commands, prefer symbolic to numeric signal names.
12079         Reported by Mike Fulton <fultonm@ca.ibm.com> in
12080         <https://lists.gnu.org/archive/html/bug-gnulib/2022-11/msg00130.html>.
12081         * gnulib-tool: Use symbolic signal names.
12082         * posix-modules: Likewise.
12083         * MODULES.html.sh: Likewise.
12084         * build-aux/bootstrap (prepare_GNULIB_SRCDIR): Likewise.
12085         * build-aux/csharpcomp.sh.in: Likewise.
12086         * build-aux/gnu-web-doc-update: Likewise.
12087         * top/autogen.sh: Likewise.
12088         * top/bootstrap-funclib.sh: Likewise.
12089         * top/gitsub.sh: Likewise.
12090         * lib/t-idcache: Likewise.
12091         * tests/havelib/rpath-1: Likewise.
12092         * tests/havelib/rpath-2_a: Likewise.
12093         * tests/havelib/rpath-2_b: Likewise.
12094         * tests/havelib/rpath-3_a: Likewise.
12095         * tests/havelib/rpath-3_b: Likewise.
12096         * tests/init.sh: Likewise.
12097         * tests/test-binary-io.sh: Likewise.
12098         * tests/test-c-stack.sh: Likewise.
12099         * tests/test-c-stack2.sh: Likewise.
12100         * tests/test-dprintf-posix.sh: Likewise.
12101         * tests/test-fpending.sh: Likewise.
12102         * tests/test-fprintf-posix.sh: Likewise.
12103         * tests/test-lseek.sh: Likewise.
12104         * tests/test-printf-posix.sh: Likewise.
12105         * tests/test-select-in.sh: Likewise.
12106         * tests/test-select-out.sh: Likewise.
12107         * tests/test-sigpipe.sh: Likewise.
12108         * tests/test-tsearch.sh: Likewise.
12109         * tests/test-update-copyright.sh: Likewise.
12110         * tests/test-vdprintf-posix.sh: Likewise.
12111         * tests/test-vfprintf-posix.sh: Likewise.
12112         * tests/test-vprintf-posix.sh: Likewise.
12113         * tests/test-xprintf-posix.sh: Likewise.
12114         * tests/uniwidth/test-uc_width2.sh: Likewise.
12116 2022-11-20  Bruno Haible  <bruno@clisp.org>
12118         posix_spawn-internal: Avoid warning on macOS.
12119         Suggested by Minsoo Choo in
12120         <https://lists.gnu.org/archive/html/bug-gnulib/2022-11/msg00114.html>.
12121         * lib/spawni.c: Ignore -Wdeprecated-declarations warnings.
12123 2022-11-20  Bruno Haible  <bruno@clisp.org>
12125         posix_spawn tests: Fix compilation error (regression 2022-09-14).
12126         * modules/posix_spawn-tests (Makefile.am): Augment DEFS, to define
12127         EXEEXT.
12129 2022-11-14  Paul Eggert  <eggert@cs.ucla.edu>
12131         parse-datetime: improve doc formatting, timeliness
12132         * doc/parse-datetime.texi: Use @samp and @code in menus
12133         for consistenty with how the Coreutils manual will do
12134         this sort of thing.  Update examples to this year.
12136 2022-11-13  Simon Josefsson  <simon@josefsson.org>
12138         vc-list-files-tests: Avoid OpenPGP private key operations.
12139         * tests/test-vc-list-files-git.sh (GIT_CONFIG_GLOBAL): Set it to
12140         /dev/null.
12142 2022-11-03  Bruno Haible  <bruno@clisp.org>
12144         dynarray: Rename to glibc-internal/dynarray.
12145         * modules/glibc-internal/dynarray: Renamed from modules/dynarray.
12146         * modules/glibc-internal/dynarray-tests: Renamed from
12147         modules/dynarray-tests.
12148         * modules/regex (Depends-on): Update.
12149         * NEWS: Mention this change and the previous one.
12151 2022-11-03  Bruno Haible  <bruno@clisp.org>
12153         scratch_buffer: Rename to glibc-internal/scratch_buffer.
12154         * modules/glibc-internal/scratch_buffer: Renamed from
12155         modules/scratch_buffer.
12156         * modules/glibc-internal/scratch_buffer-tests: Renamed from
12157         modules/scratch_buffer-tests.
12158         * modules/canonicalize (Depends-on): Update.
12159         * modules/canonicalize-lgpl (Depends-on): Likewise.
12160         * modules/glob (Depends-on): Likewise.
12162 2022-11-02  Bruno Haible  <bruno@clisp.org>
12164         scratch_buffer: Document last change.
12165         * NEWS: Mention last change.
12167 2022-11-02  Paul Eggert  <eggert@cs.ucla.edu>
12169         scratch_buffer: adjust to glibc changes
12170         Problem reported by Karl Berry in:
12171         https://lists.gnu.org/r/bug-gnulib/2022-11/msg00004.html
12172         * build-aux/depcomp, doc/make-stds.texi, lib/malloc/scratch_buffer.h:
12173         Autoupdate.
12174         * build-aux/install-reloc (func_create_wrapper):
12175         Omit removed file scratch_buffer_dupfree.c.
12176         * config/srclist.txt: Remove lib/malloc/scratch_buffer_dupfree.c
12177         * lib/canonicalize-lgpl.c: Merge changes from glibc through its
12178         commit ef0700004bf0dccf493a5e8e21f71d9e7972ea9f dated 2022-07-05
12179         11:04:45 +0200.
12180         (__strdup) [!_LIBC]: New macro.
12181         (struct realpath_bufs): New type.
12182         (realpath_stk): Use it as the extra argument.  All uses changed.
12183         No longer any need for noinline or GCC_BOGUS_WRETURN_LOCAL_ADDR.
12184         * lib/canonicalize.c (struct realpath_bufs)
12185         (canonicalize_filename_mode_stk): Likewise.
12186         * lib/malloc/scratch_buffer_dupfree.c:
12187         Remove, since it was removed in glibc.
12188         * lib/scratch_buffer.h (scratch_buffer_dupfree) [0]:
12189         (__libc_scratch_buffer_dupfree): Remove decls.
12190         * modules/relocatable-prog-wrapper (Files):
12191         * modules/scratch_buffer (Files, lib_SOURCES):
12192         Remove lib/malloc/scratch_buffer_dupfree.c.
12194 2022-11-01  Bruno Haible  <bruno@clisp.org>
12196         relocatable-script: Relax license.
12197         * modules/relocatable-script (License): Change to GPLv2+.
12198         * build-aux/relocatable.sh.in: Change copyright header to GPLv2+.
12200 2022-10-31  Simon Josefsson  <simon@josefsson.org>
12202         maintainer-makefile: Fix Apple Xcode 'make syntax-check'.
12203         * top/maint.mk (sc_indent): Don't use non-GNU indent.
12205 2022-10-30  Paul Eggert  <eggert@cs.ucla.edu>
12207         thread: pacify gcc -Wbad-function-cast
12208         * lib/glthread/thread.h (gl_thread_self_pointer): With POSIX
12209         threads, cast the call to gl_thread_t before casting to void *.
12211         test-getlogin: pacify gcc -Wshadow
12212         * tests/test-getlogin.h (test_getlogin_result): Rename local.
12214 2022-10-25  Simon Josefsson  <simon@josefsson.org>
12216         gendocs: Output timestamp in English.
12217         * build-aux/gendocs.sh (SETLANG): Add LC_TIME= for "date".
12219 2022-10-23  Bruno Haible  <bruno@clisp.org>
12221         assert-h: Make static_assert work on Solaris 11.4.
12222         * m4/assert_h.m4 (gl_ASSERT_H): After including <assert.h>, on Solaris,
12223         redefine static_assert.
12225 2022-10-16  Bruno Haible  <bruno@clisp.org>
12227         getdelim: Work around buggy implementation on macOS 10.13.
12228         * doc/posix-functions/getdelim.texi: Mention the macOS bug.
12229         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Let the "checking for working
12230         getdelim function" test answer 'no' on macOS.
12232 2022-10-15  Bruno Haible  <bruno@clisp.org>
12234         Update to Unicode 15.0.0.
12236         * lib/gen-uni-tables.c (is_property_default_ignorable_code_point):
12237         Exclude 0x13439..0x1343F.
12238         (get_lbp): Update such that unilbrk/lbrkprop.txt comes out as expected.
12240         * All generated files under lib/uni* and tests/uni*: Regenerate.
12241         * tests/uniname/NameAliases.txt: Update.
12242         * tests/uniname/UnicodeData.txt: Update.
12243         * tests/uninorm/NormalizationTest.txt: Update.
12244         * tests/unigbrk/GraphemeBreakTest.txt: Update.
12245         * tests/uniwbrk/WordBreakTest.txt: Update.
12247         * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
12248         0x0ECE, 0x10EFD..0x10EFF, 0x11241, 0x11F00..0x11F01, 0x11F36..0x11F3A,
12249         0x11F40, 0x11F42, 0x13439..0x13440, 0x13447..0x13455, 0x1E08F,
12250         0x1E4EC..0x1E4EF.
12252         * All the affected modules: Bump required libunistring version.
12254 2022-10-15  Bruno Haible  <bruno@clisp.org>
12256         gen-uni-tables: Temporarily revert last change.
12257         * lib/gen-uni-tables.c: Include <stdbool.h>, unless the C compiler
12258         advertises compliance to ISO C 23.
12260 2022-10-12  Paul Eggert  <eggert@cs.ucla.edu>
12262         doc: improve intprops doc
12263         * doc/intprops.texi: Tighten up wording, by saying that macros
12264         "yield 1 if X, 0 otherwise" rather than the weaker "yield 1 if X".
12265         Say "yield" rather than "return" since the macros are not
12266         functions.  Say "1" and "0" rather than "true" and "false" since
12267         the macros yield int.  Say that stdckdint.h is the standard
12268         alternative to the _WRAPV macros.  Mention another source of
12269         problems with the _OVERFLOW macros.
12271 2022-10-10  Paul Eggert  <eggert@cs.ucla.edu>
12273         tests: prefer stdckdint to intprops
12274         * modules/chown-tests, modules/fchownat-tests:
12275         * modules/fdutimensat-tests, modules/futimens-tests:
12276         * modules/lchown-tests, modules/stat-time-tests:
12277         * modules/utime-tests, modules/utimens-tests:
12278         * modules/utimensat-tests:
12279         (Depends on): Depend on stdckint, not intprops.
12280         * tests/nap.h: Include stdckdint.h, not intprops.h.
12281         All macro uses changed.
12283         stat-time: prefer stdckdint to intprops
12284         * lib/stat-time.h: Include stdckdint.h instead of intprops.h.
12285         (stat_time_normalize): Use ckd_add instead of INT_ADD_WRAPV.
12286         * modules/stat-time (Depends-on): Depend on stdckdint, not intprops.
12288         xalloc: remove stray includes + dependencies
12289         These used to be needed, but are not needed now.
12290         * lib/xalloc.h: Do not include stdlib.h.
12291         [GNULIB_XALLOC]: Do not include "intprops.h".
12292         * lib/xmalloc.c: Include stdint.h here instead, for SIZE_MAX.
12293         * modules/xalloc-die, modules/xvasprintf (Depends-on): Remove stdint.
12295 2022-09-30  Paul Eggert  <eggert@cs.ucla.edu>
12297         assert-h: suppress Apple clang 13 false alarms
12298         * m4/assert_h.m4 (gl_ASSERT_H): Suppress bogus warnings from Apple
12299         clang 13 (clang-1300.0.29.30).  Problem privately reported by
12300         Mattias Engdegård for GNU Emacs.
12302 2022-09-26  Daiki Ueno  <ueno@gnu.org>
12304         largefile: fix detection of time_t size on mingw32
12305         * modules/largefile (configure.ac-early): Ensure gl_YEAR2038_EARLY
12306         is invoked before gl_YEAR2038_BODY.
12308 2022-09-25  Paul Eggert  <eggert@cs.ucla.edu>
12310         fts: fix errno handling if dirfd fails
12311         * lib/fts.c (fts_build): Use proper errno if dirfd failed.
12312         Although I don’t know of any platform where dirfd can fail here,
12313         we might as well get it right.
12315 2022-09-25  Bruno Haible  <bruno@clisp.org>
12317         stdbool: Mostly revert last patch.
12318         * m4/c-bool.m4 (gl_C_BOOL): If stdbool.h does not exist, just err out.
12319         * modules/stdbool (Files): Remove m4/stdbool.m4.
12321 2022-09-24  Bruno Haible  <bruno@clisp.org>
12323         stdbool: Don't #include a gnulib-generated stdbool.h from config.h.
12324         * m4/c-bool.m4 (gl_C_BOOL): Check for stdbool.h and for _Bool. If
12325         stdbool.h does not exist, don't #include <stdbool.h> but instead put the
12326         substitute code into config.h.
12327         * modules/stdbool (Files): Add m4/stdbool.m4.
12329 2022-09-24  Bruno Haible  <bruno@clisp.org>
12331         stdalign: Don't #include a gnulib-generated stdalign.h from config.h.
12332         * m4/stdalign.m4 (gl_STDALIGN_H): Check for stdalign.h. If it does not
12333         exist, don't #include <stdalign.h> but instead put the substitute code
12334         into config.h.
12336 2022-09-24  Bruno Haible  <bruno@clisp.org>
12338         stdalign: Fix compilation error with MSVC in C++ mode.
12339         * lib/stdalign.in.h: Treat MSVC in C++ mode like C++11 compliant
12340         compilers.
12341         * tests/test-stdalign-c++.cc: Include some other header files.
12343         stdalign: Avoid namespace pollution.
12344         * lib/stdalign.in.h (_GL_STDALIGN_NEEDS_STDDEF): New macro.
12345         Include <stddef.h> only when needed.
12347 2022-09-23  Simon Josefsson  <simon@josefsson.org>
12349         warnings, manywarnings: Doc fixes.
12350         * doc/manywarnings.texi (manywarnings): Improve usage instruction.
12351         Start list of comments on particular warning flags, based on
12352         comment from Paul Eggert <eggert@cs.ucla.edu>.
12353         * doc/warnings.texi (warnings): Mention that it is often used with manywarnings.
12355 2022-09-21  Paul Eggert  <eggert@cs.ucla.edu>
12357         assert-h: suppress clang false alarms
12358         Suppress scads of annoying warnings from clang version 14.0.5
12359         (Fedora 14.0.5-1.fc36) of the form "warning: '_Static_assert' with
12360         no message is a C2x extension [-Wc2x-extensions]",
12361         by refusing to use single-arg static_assert with older clang.
12362         * m4/assert_h.m4 (gl_ASSERT_H): Turn -Wc2x-extensions from a
12363         warning into an error when testing static_assert, so that the
12364         annoying diagnostic causes the test to fail, which causes assert.h
12365         to be replaced in a way that suppresses the diagnostic during
12366         the real build.
12368 2022-09-20  Bruno Haible  <bruno@clisp.org>
12370         Add another helper script for creating testdirs.
12371         * all-modules: New file, based on posix-modules.
12373 2022-09-20  Bruno Haible  <bruno@clisp.org>
12375         snippet/warn-on-use: Don't cause wrong AC_CHECK_DECL results with clang.
12376         * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Use the clang command-line
12377         option that disables implicit built-in function declarations in clang.
12379 2022-09-19  Bruno Haible  <bruno@clisp.org>
12381         stdbool, stdbool-c99 tests: Fix compilation error with clang/MSVC.
12382         * tests/test-stdbool.c (WORKING_BOOL): Define to 0 on compilers that
12383         define _MSC_VER.
12385 2022-09-18  Paul Eggert  <eggert@cs.ucla.edu>
12387         stdbool: omit ‘#undef true’
12388         This is mostly just simplification.
12389         * m4/c-bool.m4 (gl_C_BOOL): Test all preprocessors when
12390         !HAVE_C_BOOL, not merely __SUNPRO_CC.  Use the slightly
12391         more-elegant ‘!true’ instead of ‘true == 1’; this shouldn’t matter
12392         in practice and if it does matter we want to know about it anyway.
12393         Remove an unnecessary ‘#undef true’ that is simply commented out
12394         by ‘configure’; again, if true is already #defined to be 0 the
12395         system is so messed up we want to know about it anyway.
12397 2022-09-18  Bruno Haible  <bruno@clisp.org>
12399         stdbool: Ensure that 'true' can be used in the preprocessor.
12400         * m4/c-bool.m4 (gl_C_BOOL): With Sun C++, redefine 'true' if it does not
12401         evaluate to 1 in the preprocessor.
12403         stdbool-c99: Ensure that 'true' can be used in the preprocessor.
12404         * lib/stdbool.in.h (true): Redefine if it does not evaluate to 1 in the
12405         preprocessor.
12407 2022-09-18  Bruno Haible  <bruno@clisp.org>
12409         uni{case,ctype,gbrk,str}/base: Fix installed .h file (regr. 2022-09-10).
12410         * lib/unicase.in.h: Do include <stdbool.h>.
12411         * lib/unictype.in.h: Likewise.
12412         * lib/unigbrk.in.h: Likewise.
12413         * lib/unistr.in.h: Likewise.
12415 2022-09-18  Bruno Haible  <bruno@clisp.org>
12417         signal: Fix a C++ compilation error due to sched_yield on OpenBSD 6.0.
12418         * lib/signal.in.h: On OpenBSD, include <sys/param.h>. Don't include
12419         <pthread.h> on OpenBSD ≥ 5.1.
12421 2022-09-17  Paul Eggert  <eggert@cs.ucla.edu>
12423         explicit_bzero-tests: robustify a bit
12424         This is mostly to suppress GCC warnings, though I suppose it
12425         might also improve the test.
12426         * tests/test-explicit_bzero.c: Do not ignore -Wmaybe-uninitialized,
12427         as this warning should no longer be generated given the other changes.
12428         (test_heap): ASSERT that malloc succeeds, to suppress any GCC
12429         warning about relying on malloc succeeding.  Declare addr to be
12430         volatile, so that GCC does not deduce that it is heapbuf in
12431         disguise and diagnose using it after freeing it.
12432         (do_secret_stuff): Declare more things to be volatile, to avoid
12433         optimizations that might disturb the stack and/or mess up the test
12434         in other ways.  Pass last_stackbuf address as a parameter rather
12435         than having last_stackbuf be static, to avoid GCC warning about
12436         assigning address of a local to a static; all callers changed.
12438 2022-09-17  Bruno Haible  <bruno@clisp.org>
12440         wchar: Fix compilation errors in C++ mode on Solaris 11.3.
12441         * lib/wchar.in.h (wcsnlen, wcpcpy, wcpncpy, wcscasecmp, wcsncasecmp,
12442         wcsdup): Force declaration in C++ mode on Solaris (which does not
12443         declare these functions in the global namespace).
12445 2022-09-17  Bruno Haible  <bruno@clisp.org>
12447         swab: Fix compilation error with Sun C++ on Solaris 11.3.
12448         * lib/unistd.in.h (swab): For the C++ declaration, under Solaris 11 but
12449         not under Solaris 10, test also __XOPEN_OR_POSIX.
12451 2022-09-17  Bruno Haible  <bruno@clisp.org>
12453         time C++ tests: Fix link error on CentOS 5.
12454         * modules/time-c++-tests (Makefile.am): Link test-time-c++ against
12455         $(LIB_CLOCK_GETTIME).
12457 2022-09-14  Bruno Haible  <bruno@clisp.org>
12459         time: Fix compilation errors with clang/MSVC.
12460         * m4/time_h.m4 (gl_TIME_H): Test whether asctime_r and ctime_r are
12461         declared.
12462         * lib/time.in.h (asctime_r, ctime_r): Skip _GL_WARN_ON_USE invocations
12463         when these functions are not declared.
12465 2022-09-14  Bruno Haible  <bruno@clisp.org>
12467         verify: Avoid syntax error due to static_assert with clang in C++ mode.
12468         * lib/verify.h (static_assert): Don't define in clang C++ 6 or newer.
12469         * m4/assert_h.m4 (gl_ASSERT_H): If we don't need to define static_assert
12470         with clang in C++ mode, don't include <assert.h>.
12472 2022-09-14  Paul Eggert  <eggert@cs.ucla.edu>
12474         assert-h: work around include confusion
12475         * m4/assert_h.m4 (gl_ASSERT_H): Arrange for <config.h> to not
12476         include <assert.h> if assert is already defined.  This works
12477         around bugs in packages that mistakenly include <config.h> after
12478         including <assert.h> (typically due to double-inclusion of
12479         <config.h>).  Found in coreutils, which I plan to fix.
12481         stdbool: depend on C99
12482         Record that stdbool depends on C99 these days.
12483         This matters only for ancient compilers that need special
12484         flags to support C99 features.
12485         * modules/stdbool (Depends-on): Add c99.
12487 2022-09-14  Bruno Haible  <bruno@clisp.org>
12489         verify: Avoid syntax error due to static_assert with MSVC 14 in C++.
12490         * lib/verify.h (static_assert): For MSVC in C++ mode, use a definition
12491         that supports both the two-arguments and the one-argument syntax.
12493 2022-09-14  Bruno Haible  <bruno@clisp.org>
12495         posix_spawn-* tests: Fix test failure on mingw when libtool is in use.
12496         * tests/test-posix_spawn-inherit0.c (CHILD_PROGRAM_FILENAME): Add the
12497         EXEEXT suffix.
12498         * tests/test-posix_spawn-inherit1.c (CHILD_PROGRAM_FILENAME): Likewise.
12499         * tests/test-posix_spawn-open1.c (CHILD_PROGRAM_FILENAME): Likewise.
12500         * tests/test-posix_spawn-open2.c (CHILD_PROGRAM_FILENAME): Likewise.
12502 2022-09-14  Bruno Haible  <bruno@clisp.org>
12504         verify: Avoid syntax error due to static_assert with MSVC 14.
12505         * lib/verify.h (_Static_assert): Pass only the first argument to
12506         _GL_VERIFY.
12508 2022-09-13  Paul Eggert  <eggert@cs.ucla.edu>
12510         verify: treat GNU C++ 6 like recent C++
12511         * m4/assert_h.m4 (gl_ASSERT_H):
12512         If we check __cpp_static_assert < 201411, also check __GNUG__ < 6,
12513         for consistency with the previous change.
12515 2022-09-13  Bruno Haible  <bruno@clisp.org>
12517         verify: Avoid syntax error due to static_assert with GNU C++ 6.x.
12518         * lib/verify.h (static_assert): Don't define in GNU C++ 6 or newer.
12520 2022-09-13  Paul Eggert  <eggert@cs.ucla.edu>
12522         stdalign: prefer to not include <stdalign.h>
12523         * lib/alignalloc.c, lib/argp-parse.c, lib/fts.c, lib/md4.c, lib/md5.c:
12524         * lib/rawmemchr.c, lib/sha1.c, lib/sha256.c, lib/sha512.c, lib/sm3.c:
12525         * lib/sys_socket.in.h:
12526         In C23, <stdalign.h> is a no-op, so don’t include it.
12528         stdalign: alignas and alignof are C23 keywords
12529         * m4/stdalign.m4 (gl_STDALIGN_H): Check also whether
12530         alignas and alignof are keywords and so don’t need stdalign.h,
12531         and define HAVE_C_ALIGNASOF if so.
12532         If not, arrange for config.h to #define alignas and alignof
12533         by including <stdalign.h>.
12534         * modules/stdalign: No need to include <stdalign.h>.
12535         * tests/test-stdalign.c: Do not include stdalign.h.
12537         assert-h: prefer to ‘verify’
12538         Where it’s easy, prefer ‘static_assert’ to ‘verify’,
12539         as this simplifies the source by removing the need to
12540         include verify.h.  Keep using ‘verify’ if verify.h
12541         is used for other reasons, or if code is shared with glibc.
12542         * lib/alignalloc.c, lib/argmatch.h, lib/c32is-impl.h:
12543         * lib/c32snrtombs.c, lib/c32srtombs.c, lib/exclude.c:
12544         * lib/filevercmp.c, lib/fma.c, lib/i-ring.h, lib/ino-map.c:
12545         * lib/localeinfo.c, lib/malloca.c, lib/mbrtoc32.c, lib/mbrtowc.c:
12546         * lib/mbsinit.c, lib/mbsnrtoc32s.c, lib/mbsrtoc32s.c:
12547         * lib/nanosleep.c, lib/parse-datetime.y, lib/pipe2.c:
12548         * lib/rawmemchr.c, lib/relocwrapper.c, lib/sleep.c:
12549         * lib/stat-w32.c, lib/strerror.c, lib/strtoimax.c:
12550         * lib/utimecmp.c, lib/vasnprintf.c, tests/test-alignof.c:
12551         * tests/test-intprops.c, tests/test-libgmp.c:
12552         * tests/test-limits-h.c, tests/test-locale.c:
12553         * tests/test-pthread.c, tests/test-round2.c:
12554         * tests/test-stdalign.c, tests/test-stddef.c, tests/test-stdio.c:
12555         * tests/test-stdlib.c, tests/test-string.c, tests/test-sys_stat.c:
12556         * tests/test-time.c, tests/test-uchar.c, tests/test-unistd.c:
12557         * tests/test-wchar.c:
12558         Prefer static_assert to verify, and stop including verify.h.
12559         * lib/stat.c: Don’t include verify.h (this include was unnecessary).
12560         * modules/alignalloc, modules/alignof-tests, modules/argmatch:
12561         * modules/c-vasnprintf, modules/c32isalnum, modules/c32isalpha:
12562         * modules/c32isblank, modules/c32iscntrl, modules/c32isdigit:
12563         * modules/c32isgraph, modules/c32islower, modules/c32isprint:
12564         * modules/c32ispunct, modules/c32isspace, modules/c32isupper:
12565         * modules/c32isxdigit, modules/c32snrtombs, modules/c32srtombs:
12566         * modules/exclude, modules/filevercmp, modules/fma, modules/fmaf:
12567         * modules/fmal, modules/fstat, modules/i-ring, modules/ino-map:
12568         * modules/intprops-tests, modules/libgmp-tests:
12569         * modules/limits-h-tests, modules/locale-tests, modules/malloca:
12570         * modules/mbrtoc32, modules/mbrtowc, modules/mbsinit:
12571         * modules/mbsnrtoc32s, modules/mbsrtoc32s, modules/nanosleep:
12572         * modules/parse-datetime, modules/pipe2, modules/pthread-h-tests:
12573         * modules/rawmemchr, modules/relocatable-prog-wrapper:
12574         * modules/round-tests, modules/roundf-tests, modules/sleep:
12575         * modules/stat, modules/stdalign-tests, modules/stdckdint-tests:
12576         * modules/stddef-tests, modules/stdio-tests, modules/stdlib-tests:
12577         * modules/strerror, modules/string-tests, modules/strtoimax:
12578         * modules/strtoumax, modules/sys_stat-tests, modules/time-tests:
12579         * modules/uchar-tests, modules/unistd-tests:
12580         * modules/unistdio/u16-u16-vasnprintf:
12581         * modules/unistdio/u16-vasnprintf:
12582         * modules/unistdio/u32-u32-vasnprintf:
12583         * modules/unistdio/u32-vasnprintf:
12584         * modules/unistdio/u8-u8-vasnprintf:
12585         * modules/unistdio/u8-vasnprintf, modules/unistdio/ulc-vasnprintf:
12586         * modules/utimecmp, modules/vasnprintf, modules/wchar-tests:
12587         Depend on assert-h, not verify.
12589         assert-h: static_assert is a keyword in C23
12590         * m4/assert_h.m4 (gl_ASSERT_H): Also test for static_assert
12591         keyword a la C23, and define HAVE_C_STATIC_ASSERT if so.
12592         If not, arrange for config.h to #define static_assert
12593         by including <assert.h>, and then do "#undef assert"
12594         so that the assert macro still needs an explicit include.
12595         This should be safe even on very old hosts, as assert.h
12596         has been re-includable for decades.
12597         * tests/tests-assert.c: New test.
12598         * modules/assert-h-tests (Files, Makefile.am): Add it.
12600 2022-09-13  Bruno Haible  <bruno@clisp.org>
12602         Prefer talking about alignas than _Alignas.
12603         * m4/gnulib-common.m4 (gl_COMMON_BODY): Don't mention _Alignas in a
12604         comment.
12605         * m4/stdalign.m4 (gl_STDALIGN_H): Likewise.
12607 2022-09-13  Paul Eggert  <eggert@cs.ucla.edu>
12609         stdalign-tests: port to C23
12610         * tests/test-stdalign.c: Do not test __alignas_is_defined,
12611         _Alignof, or _Alignas as they are obsolescent.
12612         Do not use __alignas_is_defined in C23 or later (or C++11 or later),
12613         as it’s removed in C23.
12615 2022-09-12  Bruno Haible  <bruno@clisp.org>
12617         supersede: Avoid a failure when writing to /dev/null in Solaris zones.
12618         * lib/supersede.c (open_supersede): Treat EACCES (seen on Solaris 11.3)
12619         like EINVAL (seen on Illumos).
12621 2022-09-11  Paul Eggert  <eggert@cs.ucla.edu>
12623         maint: avoid unportable ERE \}
12624         * top/maint.mk (sc_copyright_check):
12625         Avoid unportable use of \} in ERE.
12627         verify: improve maint check
12628         * top/maint.mk (sc_prohibit_verify_without_use):
12629         Adjust re to match verify.h.
12631         verify: port better to C23
12632         * lib/verify.h (_GL_VERIFY, static_assert):
12633         If C23, use static_assert keyword; no macro.
12634         This should simplify diagnostics and debugging.
12636 2022-09-10  Bruno Haible  <bruno@clisp.org>
12638         pipe-filter-gi: Fix test failure on native Windows.
12639         * lib/pipe-filter-aux.h (write): Redefine on native Windows.
12641 2022-09-10  Bruno Haible  <bruno@clisp.org>
12643         stdbool C++ tests: Fix compilation error with MSVC14 (regr. from today).
12644         * tests/test-stdbool-c++.cc (s): Choose field names that are not type
12645         names.
12647         Reorganize C++ tests for stdbool and stdbool-c99.
12648         * tests/test-stdbool-c++.cc: Don't include <stdbool.h> if TEST_STDBOOL_H
12649         is not defined. Add a couple of simple tests, from test-stdbool.c.
12650         * tests/test-stdbool-c99-c++.cc: New file.
12651         * modules/stdbool-c99-c++-tests: New file, based on
12652         modules/stdbool-c++-tests.
12653         * modules/stdbool-c99-tests (Depends-on): Add stdbool-c99-c++-tests.
12654         Remove stdbool-c++-tests.
12655         * modules/stdbool-tests (Depends-on): Add stdbool-c++-tests.
12657 2022-09-10  Bruno Haible  <bruno@clisp.org>
12659         stdbool C++ tests: Fix for C++20.
12660         * tests/test-stdbool-c++2.cc: Don't include <cstdbool> in C++20 or
12661         newer.
12663 2022-09-10  Bruno Haible  <bruno@clisp.org>
12665         uchar: Work around error in C++ mode on AIX 7.2 with xlclang.
12666         * lib/uchar.in.h (char16_t, char32_t): On AIX with xlclang++, define
12667         these as macros.
12668         * doc/posix-headers/uchar.texi: Document the AIX + xlclang++ bug.
12670 2022-09-10  Paul Eggert  <eggert@cs.ucla.edu>
12672         Rely on new stdbool behavior
12673         Prefer the C23 style to the C99 style,
12674         since the stdbool module now supports C23.
12675         * lib/acl-internal.h, lib/acl.h, lib/argmatch.c, lib/argmatch.h:
12676         * lib/argp-help.c, lib/argv-iter.h, lib/asyncsafe-spin.c:
12677         * lib/backup-internal.h, lib/backupfile.c, lib/base32.h:
12678         * lib/base64.h, lib/basename-lgpl.c, lib/bitset/base.h:
12679         * lib/c-ctype.h, lib/c-strcasestr.c, lib/canonicalize-lgpl.c:
12680         * lib/canonicalize.c, lib/chdir-long.c, lib/chown.c:
12681         * lib/classpath.h, lib/clean-temp-private.h:
12682         * lib/clean-temp-simple.c, lib/clean-temp-simple.h:
12683         * lib/clean-temp.c, lib/clean-temp.h, lib/cloexec.h:
12684         * lib/close-stream.c, lib/closein.c, lib/closeout.c, lib/closeout.h:
12685         * lib/csharpcomp.h, lib/csharpexec.h, lib/cycle-check.c:
12686         * lib/cycle-check.h, lib/des.h, lib/dfa.h, lib/diffseq.h:
12687         * lib/dirname.h, lib/exclude.c, lib/exclude.h, lib/execute.c:
12688         * lib/execute.h, lib/execvpe.c, lib/fatal-signal.c, lib/fchdir.c:
12689         * lib/file-set.h, lib/filevercmp.c, lib/findprog-in.c:
12690         * lib/findprog.c, lib/findprog.h, lib/fma.c, lib/fnmatch.c:
12691         * lib/fopen.c, lib/freadable.h, lib/freading.h, lib/freopen-safer.c:
12692         * lib/fstrcmp.c, lib/fsusage.h, lib/fts.c, lib/fwritable.h:
12693         * lib/fwriteerror.c, lib/fwriting.h, lib/gen-uni-tables.c:
12694         * lib/getaddrinfo.c, lib/getcwd.c, lib/getloadavg.c:
12695         * lib/getndelim2.c, lib/getpass.c, lib/getrandom.c:
12696         * lib/git-merge-changelog.c, lib/gl_list.h, lib/gl_map.h:
12697         * lib/gl_omap.h, lib/gl_oset.h, lib/gl_set.h, lib/glob.c:
12698         * lib/glthread/cond.h, lib/hamt.h, lib/hard-locale.h:
12699         * lib/hash-triple.h, lib/hash.h, lib/human.h, lib/i-ring.h:
12700         * lib/isapipe.c, lib/javacomp.h, lib/javaexec.h, lib/javaversion.c:
12701         * lib/lchown.c, lib/localeinfo.h, lib/localename.c:
12702         * lib/long-options.h, lib/malloc/dynarray.h, lib/mbchar.h:
12703         * lib/mbfile.h, lib/mbiter.h, lib/mbmemcasecoll.h, lib/mbscasestr.c:
12704         * lib/mbsstr.c, lib/mbuiter.h, lib/mkdir-p.h, lib/modechange.h:
12705         * lib/mountlist.h, lib/nanosleep.c, lib/nonblocking.h:
12706         * lib/nstrftime.c, lib/openat.c, lib/openat.h, lib/os2-spawn.c:
12707         * lib/parse-datetime.h, lib/pipe-filter-aux.c, lib/pipe-filter-gi.c:
12708         * lib/pipe-filter-ii.c, lib/pipe-filter.h, lib/posixtm.h:
12709         * lib/priv-set.c, lib/progreloc.c, lib/propername.c:
12710         * lib/pthread-spin.c, lib/quotearg.c, lib/readtokens.c:
12711         * lib/readtokens0.h, lib/readutmp.c, lib/regex-quote.h:
12712         * lib/regex_internal.h, lib/relocwrapper.c, lib/rename.c:
12713         * lib/renameatu.c, lib/rpmatch.c, lib/same.c, lib/same.h:
12714         * lib/save-cwd.c, lib/savewd.c, lib/savewd.h, lib/spawn-pipe.h:
12715         * lib/spawni.c, lib/stack.h, lib/stat.c, lib/stdckdint.in.h:
12716         * lib/strcasestr.c, lib/strfmon_l.c, lib/striconveh.c:
12717         * lib/striconveha.h, lib/string-buffer.h, lib/strptime.c:
12718         * lib/strstr.c, lib/strtod.c, lib/supersede.h, lib/system-quote.c:
12719         * lib/tempname.c, lib/term-style-control.c:
12720         * lib/term-style-control.h, lib/textstyle.in.h, lib/time_rz.c:
12721         * lib/tmpdir.c, lib/tmpdir.h, lib/tmpfile.c, lib/unicase.in.h:
12722         * lib/unicase/caseprop.h, lib/unicase/invariant.h:
12723         * lib/unicase/u16-casemap.c, lib/unicase/u16-ct-totitle.c:
12724         * lib/unicase/u16-is-invariant.c, lib/unicase/u32-casemap.c:
12725         * lib/unicase/u32-ct-totitle.c, lib/unicase/u32-is-invariant.c:
12726         * lib/unicase/u8-casemap.c, lib/unicase/u8-ct-totitle.c:
12727         * lib/unicase/u8-is-invariant.c, lib/unictype.in.h:
12728         * lib/unigbrk.in.h, lib/unigbrk/u16-grapheme-breaks.c:
12729         * lib/unigbrk/u32-grapheme-breaks.c:
12730         * lib/unigbrk/u8-grapheme-breaks.c:
12731         * lib/unigbrk/uc-grapheme-breaks.c, lib/uniname/uniname.c:
12732         * lib/unistr.in.h, lib/unlinkdir.h, lib/userspec.h, lib/utime.c:
12733         * lib/utimecmp.c, lib/utimens.c, lib/wait-process.h:
12734         * lib/windows-cond.c, lib/windows-spawn.c, lib/windows-spawn.h:
12735         * lib/windows-timedrwlock.c, lib/write-any-file.h, lib/xbinary-io.c:
12736         * lib/xstrtod.h, lib/yesno.h:
12737         * tests/nap.h, tests/qemu.h, tests/test-areadlink-with-size.c:
12738         * tests/test-areadlink.c, tests/test-areadlinkat-with-size.c:
12739         * tests/test-areadlinkat.c, tests/test-base32.c:
12740         * tests/test-base64.c, tests/test-ceil2.c, tests/test-ceilf2.c:
12741         * tests/test-chown.c, tests/test-dirname.c, tests/test-dup-safer.c:
12742         * tests/test-dup3.c, tests/test-exclude.c:
12743         * tests/test-execute-child.c, tests/test-execute-main.c:
12744         * tests/test-execute-script.c, tests/test-explicit_bzero.c:
12745         * tests/test-fchownat.c, tests/test-fcntl-safer.c:
12746         * tests/test-fcntl.c, tests/test-fdutimensat.c:
12747         * tests/test-filenamecat.c, tests/test-floor2.c:
12748         * tests/test-floorf2.c, tests/test-fstatat.c, tests/test-fstrcmp.c:
12749         * tests/test-futimens.c, tests/test-getlogin.h, tests/test-getopt.h:
12750         * tests/test-hard-locale.c, tests/test-hash.c:
12751         * tests/test-idpriv-drop.c, tests/test-idpriv-droptemp.c:
12752         * tests/test-immutable.c, tests/test-intprops.c:
12753         * tests/test-lchown.c, tests/test-link.c, tests/test-linkat.c:
12754         * tests/test-lstat.c, tests/test-mbmemcasecmp.c:
12755         * tests/test-mbmemcasecoll.c, tests/test-mkdir.c:
12756         * tests/test-mkdirat.c, tests/test-mkfifo.c, tests/test-mkfifoat.c:
12757         * tests/test-mknod.c, tests/test-nonblocking-pipe-child.c:
12758         * tests/test-nonblocking-pipe-main.c:
12759         * tests/test-nonblocking-socket-child.c:
12760         * tests/test-nonblocking-socket-main.c, tests/test-open.c:
12761         * tests/test-openat.c, tests/test-pipe.c, tests/test-pipe2.c:
12762         * tests/test-poll.c, tests/test-posix_spawn-chdir.c:
12763         * tests/test-posix_spawn-dup2-stdin.c:
12764         * tests/test-posix_spawn-dup2-stdout.c:
12765         * tests/test-posix_spawn-fchdir.c, tests/test-posix_spawn-open1.c:
12766         * tests/test-posix_spawn-open2.c, tests/test-quotearg-simple.c:
12767         * tests/test-quotearg.c, tests/test-readlink.c:
12768         * tests/test-readlinkat.c, tests/test-readtokens.c:
12769         * tests/test-rename.c, tests/test-renameat.c:
12770         * tests/test-renameatu.c, tests/test-rmdir.c, tests/test-round2.c:
12771         * tests/test-select.h, tests/test-spawn-pipe-child.c:
12772         * tests/test-spawn-pipe-main.c, tests/test-spawn-pipe-script.c:
12773         * tests/test-stack.c, tests/test-stat.c, tests/test-supersede.c:
12774         * tests/test-symlink.c, tests/test-symlinkat.c:
12775         * tests/test-system-quote-main.c:
12776         * tests/test-term-style-control-hello.c:
12777         * tests/test-term-style-control-yes.c, tests/test-timespec.c:
12778         * tests/test-trunc2.c, tests/test-truncf2.c, tests/test-unlink.c:
12779         * tests/test-unlinkat.c, tests/test-userspec.c, tests/test-utime.c:
12780         * tests/test-utimens.c, tests/test-utimensat.c:
12781         * tests/unictype/test-categ_byname.c:
12782         * tests/unigbrk/test-uc-is-grapheme-break.c:
12783         Don’t include stdbool.h.
12784         * modules/acl, modules/xgetcwd:
12785         Don’t depend on stdbool, as these modules don’t use bool.
12786         * modules/argp, modules/bitset, modules/diffseq, modules/file-has-acl:
12787         * modules/gen-uni-tables, modules/getrandom:
12788         * modules/hash-triple-simple, modules/posix_spawn-internal:
12789         * modules/strcasestr, modules/supersede, modules/system-quote:
12790         * modules/uniconv/base, modules/uniname/uniname, modules/utime:
12791         * modules/windows-timedrwlock:
12792         Depend on stdbool, as these modules use bool.
12794         stdbool: upgrade from C99 to C23
12795         Change the stdbool module so that it now emulates C23.
12796         The module now assumes C99.  The old module (which assumes
12797         C89 and emulates C99) is still available  as stdbool-c99,
12798         but is deprecated.
12799         * tests/test-stdbool.c [TEST_C_BOOL]: Do not include stdbool.h.
12800         * m4/c-bool.m4, modules/c-bool, modules/c-bool-tests:
12801         * tests/test-c-bool.c: New files.
12803 2022-09-10  Bruno Haible  <bruno@clisp.org>
12805         string: Fix compilation error in C++ mode on AIX 7.2 with xlclang.
12806         * lib/string.in.h (mbslen): Enable the C++ alias warning only on glibc
12807         systems.
12809 2022-09-10  Bruno Haible  <bruno@clisp.org>
12811         math: Fix compilation error in C++ mode on AIX 7.2 with xlclang.
12812         * lib/math.in.h (cbrtl, copysignl, exp2l, expm1l, fmal, ilogbl, log1pl,
12813         log2l, logbl, remainderl, rintl, roundl, truncl): Enable the C++ alias
12814         warning only on glibc systems.
12816 2022-09-10  Bruno Haible  <bruno@clisp.org>
12818         doc: Mention the stable branches.
12819         * doc/gnulib-readme.texi (High Quality): Add subsection
12820         'Stable Branches'.
12821         (Writing reliable code): Extracted from 'High Quality'. Mention also
12822         -Wall and valgrind.
12824 2022-09-09  Bruno Haible  <bruno@clisp.org>
12826         posix_spawn-internal: Optimize DuplicateHandle calls on native Windows.
12827         * lib/windows-spawn.h (DELAYED_DUP2_OLDFD, DELAYED_DUP2_NEWFD): New
12828         macros.
12829         (struct IHANDLE): Add a linked_fd field.
12830         * lib/spawni.c (SPAWN_INTERNAL_OPTIMIZE_DUPLICATEHANDLE): New macro.
12831         (do_delayed_dup2, do_remaining_delayed_dup2): New functions.
12832         (close_inheritable_handles): Don't close handles in DELAYED_DUP2_NEWFD
12833         entries.
12834         (do_close): Add a third parameter. Optimize delayed dup2 calls.
12835         (do_open): Use do_close.
12836         (do_dup2): Likewise. Prepare for optimizing the DuplicateHandle call.
12837         (__spawni): Do the remaining delayed dup2 invocations after the loop
12838         over the actions.
12840         posix_spawn-internal: Refactor.
12841         * lib/windows-spawn.h (struct IHANDLE): New type.
12842         (struct inheritable_handles): Combine handles and flags into a single
12843         array.
12844         * lib/windows-spawn.c (init_inheritable_handles, compose_handles_block,
12845         spawnpvech): Update.
12846         * lib/spawni.c (grow_inheritable_handles, shrink_inheritable_handles,
12847         do_open, do_dup2, do_close): Update.
12849         posix_spawn-internal: Optimize DuplicateHandle calls on native Windows.
12850         * lib/spawni.c (open_handle): Return an inheritable HANDLE.
12851         (do_open): Don't call DuplicateHandle. Remove curr_process parameter.
12852         (__spawni): Update.
12854         posix_spawn-internal: Optimize DuplicateHandle calls on native Windows.
12855         * lib/windows-spawn.h (KEEP_OPEN_IN_PARENT): New macro.
12856         * lib/windows-spawn.c (init_inheritable_handles): When a handle is
12857         already inheritable, don't bother duplicating it; instead, just mark it
12858         as KEEP_OPEN_IN_PARENT.
12859         * lib/spawni.c (shrink_inheritable_handles, close_inheritable_handles,
12860         do_open, do_dup2, do_close): Don't close handles that are marked as
12861         KEEP_OPEN_IN_PARENT.
12863 2022-09-09  Bruno Haible  <bruno@clisp.org>
12865         posix_spawn-internal: Don't lose flags while duplicating an fd.
12866         * lib/spawni.c (do_dup2): Fix the flags of the new fd.
12868 2022-09-09  Bruno Haible  <bruno@clisp.org>
12870         spawn-pipe: Fix pipe-filter-* test hangs (regression 2020-12-24).
12871         * lib/windows-spawn.h (struct inheritable_handles): Widen the per-fd
12872         flags from 8 bits to 16 bits.
12873         (KEEP_OPEN_IN_CHILD): New macro.
12874         (init_inheritable_handles): Change description of what it does when
12875         duplicate == true.
12876         * lib/windows-spawn.c (init_inheritable_handles): If duplicate == true,
12877         add all fds to the array, regardless whether they are scheduled to be
12878         preserved in the child process.
12879         (compose_handles_block): Update.
12880         (spawnpvech): Update.
12881         * lib/spawni.c (grow_inheritable_handles): Update.
12882         (shrink_inheritable_handles): Also close the handles not marked with
12883         KEEP_OPEN_IN_CHILD.
12884         (do_open, do_dup2): Mark the new fd with KEEP_OPEN_IN_CHILD.
12886 2022-09-09  Bruno Haible  <bruno@clisp.org>
12888         spawn-pipe: Fix possible hangs in programs that spawn several children.
12889         * lib/spawn-pipe.c (create_pipe) [Unix]: Create the ifd[] and ofd[] file
12890         descriptors with the close-on-exec flag set.
12892 2022-09-09  Bruno Haible  <bruno@clisp.org>
12894         pipe-filter-gi tests: Fix long-standing failure on native Windows.
12895         * tests/test-pipe-filter-gi2-main.c: Include binary-io.h.
12896         (main): Avoid NL to CRLF conversion on standard output.
12897         * tests/test-pipe-filter-gi2-child.c: Include <unistd.h>, binary-io.h.
12898         (main): Avoid NL to CRLF conversion on standard output.
12900 2022-09-09  Bruno Haible  <bruno@clisp.org>
12902         posix_spawn_file_actions_addclose tests: Fix mistake from 2022-09-07.
12903         * modules/posix_spawn_file_actions_addclose-tests (Files): Add
12904         m4/musl.m4.
12906 2022-09-08  Paul Eggert  <eggert@cs.ucla.edu>
12908         stdbool-tests: match stdbool
12909         * tests/test-stdbool.c: Omit test for
12910         __bool_true_false_are_defined since AC_CHECK_HEADER_STDBOOL no
12911         longer checks for this obsolescent macro.
12913         mktime: back in sync with GNUlib
12914         * config/srclist.txt: glibc has synced mktime from Gnulib.
12916 2022-09-07  Bruno Haible  <bruno@clisp.org>
12918         posix_spawn_file_actions_addclose tests: Avoid test failure on musl.
12919         Reported by Valery Ushakov <uwe@stderr.spb.ru> in
12920         <https://lists.gnu.org/archive/html/bug-gnulib/2022-09/msg00041.html>.
12921         * modules/posix_spawn_file_actions_addclose-tests (configure.ac): Invoke
12922         gl_MUSL_LIBC.
12923         * tests/test-posix_spawn_file_actions_addclose.c (main): Skip one of the
12924         tests on musl libc.
12926 2022-09-06  Simon Josefsson  <simon@josefsson.org>
12928         gnumakefile: Improve tarball reproducibility.
12929         * top/GNUmakefile (TAR_OPTIONS): Add --sort=name.  Suggested by
12930         Tzvetelin Katchov <katchov@gnu.org>.
12931         * DEPENDENCIES: Mention tar 1.28 dependency.
12933 2022-09-05  Bruno Haible  <bruno@clisp.org>
12935         pthread-h: Fix compilation error on mingw with --enable-threads=windows.
12936         * lib/pthread.in.h: In C++ mode, if mingw's <pthread.h> has not been
12937         used, import many pthread_* symbols from the GNULIB_NAMESPACE into the
12938         global namespace.
12940 2022-09-04  Bruno Haible  <bruno@clisp.org>
12942         Fix various test link errors on MSVC.
12943         * modules/crypto/gc-arcfour-tests (Makefile.am): Link test-gc-arcfour
12944         with $(LIB_GETRANDOM).
12945         * modules/crypto/gc-arctwo-tests (Makefile.am): Link test-gc-arctwo with
12946         $(LIB_GETRANDOM).
12947         * modules/crypto/gc-des-tests (Makefile.am): Link test-gc-des with
12948         $(LIB_GETRANDOM).
12949         * modules/crypto/gc-hmac-md5-tests (Makefile.am): Link test-gc-hmac-md5
12950         with $(LIB_GETRANDOM).
12951         * modules/crypto/gc-hmac-sha1-tests (Makefile.am): Link
12952         test-gc-hmac-sha1 with $(LIB_GETRANDOM).
12953         * modules/crypto/gc-hmac-sha256-tests (Makefile.am): Link
12954         test-gc-hmac-sha256 with $(LIB_GETRANDOM).
12955         * modules/crypto/gc-hmac-sha512-tests (Makefile.am): Link
12956         test-gc-hmac-sha512 with $(LIB_GETRANDOM).
12957         * modules/crypto/gc-md2-tests (Makefile.am): Link test-gc-md2 with
12958         $(LIB_GETRANDOM).
12959         * modules/crypto/gc-md4-tests (Makefile.am): Link test-gc-md4 with
12960         $(LIB_GETRANDOM).
12961         * modules/crypto/gc-md5-tests (Makefile.am): Link test-gc-md5 with
12962         $(LIB_GETRANDOM).
12963         * modules/crypto/gc-pbkdf2-tests (Makefile.am): Link test-gc-pbkdf2 with
12964         $(LIB_GETRANDOM).
12965         * modules/crypto/gc-pbkdf2-sha1-tests (Makefile.am): Link
12966         test-gc-pbkdf2-sha1 with $(LIB_GETRANDOM).
12967         * modules/crypto/gc-rijndael-tests (Makefile.am): Link test-gc-rijndael
12968         with $(LIB_GETRANDOM).
12969         * modules/crypto/gc-sha1-tests (Makefile.am): Link test-gc-sha1 with
12970         $(LIB_GETRANDOM).
12971         * modules/crypto/gc-sha256-tests (Makefile.am): Link test-gc-sha256 with
12972         $(LIB_GETRANDOM).
12973         * modules/crypto/gc-sha512-tests (Makefile.am): Link test-gc-sha512 with
12974         $(LIB_GETRANDOM).
12975         * modules/crypto/gc-sm3-tests (Makefile.am): Link test-gc-sm3 with
12976         $(LIB_GETRANDOM).
12977         * modules/sys_stat-c++-tests (Makefile.am): Link test-sys_stat-c++ with
12978         $(LIB_GETRANDOM).
12979         * modules/unistd-c++-tests (Makefile.am): Link test-unistd-c++ with
12980         $(LIB_GETRANDOM).
12982 2022-09-04  Bruno Haible  <bruno@clisp.org>
12984         count-leading-zeros: Fix a link error on 32-bit MSVC and a test failure.
12985         * lib/count-leading-zeros.h: Correct syntax for #pragma intrinsic.
12986         (COUNT_LEADING_ZEROS): Fix the return value.
12987         (count_leading_zeros_ll): Use two _BitScanReverse invocations instead
12988         of a _BitScanReverse64 invocation.
12990 2022-09-04  Bruno Haible  <bruno@clisp.org>
12992         count-trailing-zeros: Fix a link error on 32-bit MSVC.
12993         * lib/count-trailing-zeros.h: Correct syntax for #pragma intrinsic.
12994         (count_trailing_zeros_ll): Use two _BitScanForward invocations instead
12995         of a _BitScanForward64 invocation.
12997 2022-09-04  Bruno Haible  <bruno@clisp.org>
12999         unictype/category-none tests: Fix a link error on MSVC.
13000         * tests/unictype/test-categ_none.c (main): Disable the test on MSVC.
13002 2022-09-04  Bruno Haible  <bruno@clisp.org>
13004         oset-c++: Fix compilation error with MSVC 14.
13005         * lib/gl_oset.hh: With MSVC, avoid 'friend'.
13007 2022-09-04  Bruno Haible  <bruno@clisp.org>
13009         glob tests: Fix link error on mingw.
13010         * modules/glob-tests (Makefile.am): Link test-glob with $(LIBINTL).
13012 2022-09-04  Bruno Haible  <bruno@clisp.org>
13014         timespec_get: Fix compilation error with MSVC 14.
13015         * m4/gettime.m4 (gl_CHECK_FUNC_TIMESPEC_GET): New macro.
13016         (gl_GETTIME): Use it instead of AC_CHECK_FUNCS_ONCE.
13017         * m4/timespec_get.m4 (gl_FUNC_TIMESPEC_GET): Likewise.
13019 2022-09-04  Bruno Haible  <bruno@clisp.org>
13021         stdbool: Fix compilation error in C++ mode with MSVC 14.
13022         * lib/stdbool.in.h (_Bool, bool, false, true): In C++ mode with MSVC 14,
13023         don't define these as macros.
13025 2022-09-04  Bruno Haible  <bruno@clisp.org>
13027         fts: Fix compilation error with MSVC 14.
13028         * lib/fts.c (S_IFBLK): Add fallback definition.
13030 2022-09-04  Bruno Haible  <bruno@clisp.org>
13032         lstat: Fix compilation error in C++ mode on mingw.
13033         * lib/sys_stat.h (lstat): Move declaration after the declaration of
13034         'stat'.
13036 2022-09-04  Bruno Haible  <bruno@clisp.org>
13038         pselect: Fix compilation error in C++ mode on mingw.
13039         * lib/sys_select.in.h (pselect): Enable the C++ alias warning only on
13040         glibc systems.
13042 2022-09-04  Bruno Haible  <bruno@clisp.org>
13044         nanosleep: Work around bug on newer 32-bit mingw.
13045         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Test for 32-bit mingw bug.
13046         * tests/test-nanosleep.c (main): Add another test.
13047         * doc/posix-functions/nanosleep.texi: Mention the mingw bug.
13049 2022-09-03  Bruno Haible  <bruno@clisp.org>
13051         fmal: Work around glibc 2.17 bug on x86_64.
13052         * m4/fmal.m4 (gl_FUNC_FMAL_WORKS): Test against bug seen on glibc 2.17
13053         x86_64.
13054         * doc/posix-functions/fmal.texi: Update info.
13056 2022-09-03  Bruno Haible  <bruno@clisp.org>
13058         Fix a compilation error in C++ mode on Solaris 11.4.
13059         * lib/uchar.in.h (c32rtomb): Enable the C++ alias warning only on
13060         glibc ≥ 2.16 systems. Fix a GNULIB_POSIXCHECK mistake.
13061         (mbrtoc32): Enable the C++ alias warning only on glibc ≥ 2.16 systems.
13063 2022-09-03  Bruno Haible  <bruno@clisp.org>
13065         Fix compilation errors of C++ tests on Solaris 10 with Sun C++.
13066         * modules/string-c++-tests (Makefile.am): Link test-string-c++ with
13067         $(LIBUNISTRING).
13068         * modules/wchar-c++-tests (Makefile.am): Link test-wchar-c++ with
13069         $(LIBUNISTRING).
13071 2022-09-03  Bruno Haible  <bruno@clisp.org>
13073         Fix a compilation error in C++ mode on FreeBSD 13.1.
13074         * lib/signal.in.h: Don't include <pthread.h> on FreeBSD ≥ 8.0.
13075         * lib/sys_select.in.h: Don't include <sys/time.h> on FreeBSD.
13077 2022-09-03  Bruno Haible  <bruno@clisp.org>
13079         stdnoreturn: Document relation to C++.
13080         * doc/posix-headers/stdnoreturn.texi: Document FreeBSD problem.
13082 2022-09-03  Bruno Haible  <bruno@clisp.org>
13084         sysexits: Add C++ tests.
13085         * tests/test-sysexits-c++.cc: New file.
13086         * modules/sysexits-c++-tests: New file.
13087         * modules/sysexits-tests (Depends-on): Add sysexits-c++-tests.
13089 2022-09-03  Bruno Haible  <bruno@clisp.org>
13091         sys_utsname: Add C++ tests.
13092         * tests/test-sys_utsname-c++.cc: New file.
13093         * modules/sys_utsname-c++-tests: New file.
13094         * modules/sys_utsname-tests (Depends-on): Add sys_utsname-c++-tests.
13096 2022-09-03  Bruno Haible  <bruno@clisp.org>
13098         sys_uio: Add C++ tests.
13099         * tests/test-sys_uio-c++.cc: New file.
13100         * modules/sys_uio-c++-tests: New file.
13101         * modules/sys_uio-tests (Depends-on): Add sys_uio-c++-tests.
13103 2022-09-03  Bruno Haible  <bruno@clisp.org>
13105         sys_times: Add C++ tests.
13106         * tests/test-sys_times-c++.cc: New file.
13107         * modules/sys_times-c++-tests: New file.
13108         * modules/sys_times-tests (Depends-on): Add sys_times-c++-tests.
13110 2022-09-03  Bruno Haible  <bruno@clisp.org>
13112         sys_file: Add C++ tests.
13113         * tests/test-sys_file-c++.cc: New file.
13114         * modules/sys_file-c++-tests: New file.
13115         * modules/sys_file-tests (Depends-on): Add sys_file-c++-tests.
13117         sys_file: Document this module.
13118         * doc/glibc-headers/sys_file.texi: New file.
13119         * doc/gnulib.texi (Glibc Header File Substitutes): Include it.
13121 2022-09-03  Bruno Haible  <bruno@clisp.org>
13123         stdckdint: Add C++ tests.
13124         * tests/test-stdckdint-c++.cc: New file.
13125         * modules/stdckdint-c++-tests: New file.
13126         * modules/stdckdint-tests (Depends-on): Add stdckdint-c++-tests.
13128 2022-09-03  Bruno Haible  <bruno@clisp.org>
13130         stdalign: Add C++ tests.
13131         * tests/test-stdalign-c++.cc: New file.
13132         * modules/stdalign-c++-tests: New file.
13133         * modules/stdalign-tests (Depends-on): Add stdalign-c++-tests.
13135 2022-09-03  Bruno Haible  <bruno@clisp.org>
13137         sched: Add C++ tests.
13138         * tests/test-sched-c++.cc: New file.
13139         * modules/sched-c++-tests: New file.
13140         * modules/sched-tests (Depends-on): Add sched-c++-tests.
13142 2022-09-03  Bruno Haible  <bruno@clisp.org>
13144         netinet_in: Add C++ tests.
13145         * tests/test-netinet_in-c++.cc: New file.
13146         * modules/netinet_in-c++-tests: New file.
13147         * modules/netinet_in-tests (Depends-on): Add netinet_in-c++-tests.
13149 2022-09-03  Bruno Haible  <bruno@clisp.org>
13151         net_if: Add C++ tests.
13152         * tests/test-net_if-c++.cc: New file.
13153         * modules/net_if-c++-tests: New file.
13154         * modules/net_if-tests (Depends-on): Add net_if-c++-tests.
13155         * doc/posix-headers/net_if.texi: Fix documentation.
13157 2022-09-03  Bruno Haible  <bruno@clisp.org>
13159         termcap: Fix link error on AIX 7.
13160         * m4/termcap.m4 (gl_TERMCAP_BODY): Search also for libxcurses and for
13161         libcurses, like gl_TERMINFO_BODY does.
13162         * m4/terminfo.m4 (gl_TERMINFO_BODY): Update platform list in comment.
13164 2022-09-02  Bruno Haible  <bruno@clisp.org>
13166         getrandom: Fix compilation error in C++ mode on FreeBSD 12.
13167         * lib/sys_random.in.h (getrandom): Enable the C++ alias warning only on
13168         glibc ≥ 2.25 systems.
13170 2022-09-02  Bruno Haible  <bruno@clisp.org>
13172         math C++ tests: Fix compilation error with clang on FreeBSD 13.
13173         * lib/math.in.h (isnan): For clang >= 11 on FreeBSD, declare 'isnan',
13174         not 'rpl_isnan'.
13176 2022-09-02  Bruno Haible  <bruno@clisp.org>
13178         strerror_r-posix: Fix for Hurd.
13179         * lib/strerror_r.c (strerror_r): Interpret return value of
13180         __xpg_strerror_r correctly. Remove assumption about how strerror_r
13181         behaves.
13183 2022-09-02  Bruno Haible  <bruno@clisp.org>
13185         ptsname tests, ptsname_r tests: Fix test failures on Hurd.
13186         * tests/test-ptsname.c (main): On Hurd, test only the BSD ptys that
13187         actually exist on Hurd.
13188         * tests/test-ptsname_r.c (main): Likewise.
13190 2022-09-02  Bruno Haible  <bruno@clisp.org>
13192         strtol, strtoul: Fix compilation error in C++ mode on Solaris 11.
13193         * lib/stdlib.in.h (strtol, strtoul): Enable the C++ alias warning only
13194         on glibc systems.
13196 2022-09-02  Bruno Haible  <bruno@clisp.org>
13198         aligned_alloc: Fix compilation error in C++ mode on Solaris 11.
13199         * lib/stdlib.in.h (aligned_alloc): Enable the C++ alias warning only on
13200         glibc systems.
13202 2022-09-02  Bruno Haible  <bruno@clisp.org>
13204         getdomainname: Fix compilation error in C++ mode on Solaris 11.
13205         * lib/unistd.in.h (getdomainname): Enable the C++ alias warning only on
13206         glibc systems.
13208 2022-09-02  Bruno Haible  <bruno@clisp.org>
13210         terminfo: Don't disturb the termcap module.
13211         * m4/terminfo.m4 (gl_TERMINFO_BODY): Save and restore the variables
13212         determined by the gl_TERMCAP_BODY macro.
13214 2022-08-30  Paul Eggert  <eggert@cs.ucla.edu>
13216         fnmatch: fix stdckdint typo
13217         * lib/fnmatch_loop.c (NEW_PATTERN): Fix typo in previous patch.
13218         Problem and fix reported by Simon Josefsson in:
13219         https://lists.gnu.org/r/bug-gnulib/2022-08/msg00104.html
13221 2022-08-25  Paul Eggert  <eggert@cs.ucla.edu>
13223         tempname: simplify by omitting _LIBC code
13224         * lib/tempname.c [_LIBC]: Simplify.
13225         Suggested by Bruno Haible in:
13226         https://lists.gnu.org/r/bug-gnulib/2022-08/msg00077.html
13227         I plan to propose a corresponding patch to glibc.
13229 2022-08-22  Paul Eggert  <eggert@cs.ucla.edu>
13231         tempname: don't lose entropy in seed
13232         * lib/tempname.c (random_bits): Don't lose entropy in S
13233         in the rare case where where the template has more than 10 Xs.
13234         From a suggestion by Bruno Haible in:
13235         https://bugs.gnu.org/57129#149
13237         tempname: fix multithreading, ASLR leak etc.
13238         Fix problems with tempname and multithreading, entropy loss,
13239         and missing clock data (this last on non-GNU platforms).
13240         See analysis by Bruno Haible in:
13241         https://bugs.gnu.org/57129#149
13242         While looking into this, I noticed that tempname can leak
13243         info derived from ASLR into publicly-visible file names,
13244         which is a no-no.  Fix that too.
13245         * lib/tempname.c: Don't include stdalign.h.
13246         (HAS_CLOCK_ENTROPY): Remove.
13247         (mix_random_values): New function.
13248         (random_bits): Use it.  Args are now new value address and
13249         old value, and this function now returns a success indicator.
13250         Omit old USE_GETRANDOM argument: always try getrandom now, as
13251         there is no good reason not to now that GRND_NONBLOCK is used.
13252         Caller changed.  Use CLOCK_REALTIME for for ersatz entropy,
13253         as CLOCK_MONOTONIC doesn't work on some platforms.
13254         Also, mix in ersatz entropy from tv_sec and from clock ().
13255         (try_tempname_len): Do not mix in ASLR-based entropy, as
13256         the result is published to the world and ASLR should be private.
13257         Do not try to use a static var as that has issues if multithreaded.
13258         Instead, simply generate new random bits.
13259         Worry about bias only with high-quality random bits.
13261         * modules/tempname (Depends-on): Do not depend on stdalign.
13263         tempname: merge 64-bit time_t fix from glibc
13264         This merges glibc commit 52a5fe70a2c77935afe807fb6e904e512ddd894e
13265         "Use 64 bit time_t stat internally".
13266         * lib/tempname.c (struct_stat64) [_LIBC]: Use struct __stat64_t64.
13267         (__lstat64_time64) [!_LIBC]: Rename from __lstat64.
13268         All uses changed.
13269         (direxists): Use __stat64_time64 instead of __stat64.
13271 2022-08-16  Bruno Haible  <bruno@clisp.org>
13273         tempname: Add more tests.
13274         Based on scenario described by Eli Zaretskii in
13275         <https://lists.gnu.org/archive/html/bug-gnulib/2022-08/msg00043.html>.
13276         * tests/test-tempname.c (main): Add another test.
13277         * modules/tempname-tests (Status): Mark the test as unportable.
13279 2022-08-16  Paul Eggert  <eggert@cs.ucla.edu>
13281         tempname: generate better names for MinGW Emacs
13282         On MinGW, GNU Emacs disables clock_gettime, which reliably breaks
13283         some of gen_tempname’s optimistic callers.  Work around the
13284         problem by making the generated names less predictable.  We don’t
13285         need cryptographic randomness here, just enough unpredictability
13286         to keep Emacs happy most of the time.
13287         * lib/tempname.c (HAS_CLOCK_ENTROPY): New macro.
13288         (random_bits): Use it.
13289         (try_tempname_len): On systems lacking clock entropy, maintain
13290         state so that gen_filename generates less-predictable names on
13291         successive successful calls.
13293 2022-08-16  Simon Josefsson  <simon@josefsson.org>
13295         maintainer-makefile: Check for incorrect DISTCHECK_CONFIGURE_FLAGS
13296         usage.
13297         * top/maint.mk (sc_makefile_DISTCHECK_CONFIGURE_FLAGS): Add.
13299 2022-08-16  Bruno Haible  <bruno@clisp.org>
13301         tempname: Add tests.
13302         * tests/test-tempname.c: New file.
13303         * modules/tempname-tests: New file.
13305 2022-08-16  Simon Josefsson  <simon@josefsson.org>
13307         pmccabe2html: Doc fix.
13308         * build-aux/pmccabe2html: Don't use reserved _SOURCES namespace.
13309         Use AM_V_GEN.  Use LC_ALL=C.
13311 2022-08-15  Bruno Haible  <bruno@clisp.org>
13313         stdbool: Drop old BeOS support that gets in the way of ISO C 23 support.
13314         * lib/stdbool.in.h: Don't include <OS.h>.
13316 2022-08-15  Bruno Haible  <bruno@clisp.org>
13318         tempname: Fix a comment.
13319         * lib/tempname.c (try_tempname_len): Use of entropy makes the function
13320         more, not less, secure.
13322 2022-08-15  Paul Eggert  <eggert@cs.ucla.edu>
13324         tempname: remove incorrect comment
13325         * lib/tempname.c, lib/tempname.h: Remove incorrect comment,
13326         as the names are not necessarily hard to predict (Bug#57129).
13328 2022-08-14  Simon Josefsson  <simon@josefsson.org>
13330         bootstrap.conf: Use proper shell marker for Emacs.
13331         * build-aux/bootstrap.conf: Add it.
13333 2022-08-13  Paul Eggert  <eggert@cs.ucla.edu>
13335         stdbool: port to C23
13336         * m4/stdbool.m4 (AC_CHECK_HEADER_STDBOOL): Copy from bleeding-edge
13337         Autoconf.  Define only if Autoconf 2.71 and earlier.
13338         * tests/test-stdbool.c (bool, false, true)
13339         (__bool_true_false_are_defined): Do not require these to be
13340         defined.  C23 still requires __bool_true_false_are_defined but
13341         marks it as obsolescent, and it’s no longer worth testing.
13342         (WORKING_BOOL): New macro, which also tests __STDC_VERSION__.
13343         Use it in tests for working bool.
13344         Test for bool instead of for _Bool, which C23 says is obsolescent.
13346 2022-08-13  Bruno Haible  <bruno@clisp.org>
13348         gnulib-tool.py: Fix some code generation details.
13349         * pygnulib/GLEmiter.py: Don't produce Windows CR-LFs on Windows.
13350         (GLEmiter.po_Makevars): Emit a definition of top_builddir, not
13351         top_subdir.
13352         (GLEmiter.po_POTFILES_in): Fix result when sourcebase is 'tests' or
13353         something like that.
13354         (GLEmiter.initmacro_start): Add two more newlines (mistake from
13355         2021-04-11).
13357         gnulib-tool.py: Reduce code duplication.
13358         * pygnulib/constants.py (relinverse): New function.
13359         * pygnulib/GLEmiter.py (GLEmiter.po_Makevars,
13360         GLEmiter.tests_Makefile_am): Use it.
13361         * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
13363 2022-08-12  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
13365         hamt: fix technically undefined behavior
13366         Bug reported by Bruno Haible in
13367         <https://lists.gnu.org/r/bug-gnulib/2022-04/msg00023.html>.
13368         * lib/hamt.c (entry_insert): Remove technically undefined
13369         behavior when shifting an integer of N bits by N or more bits.
13371 2022-08-10  Paul Eggert  <eggert@cs.ucla.edu>
13373         stdckdint: fix dependency
13374         * modules/stdckdint (Depends-on): Add stdbool.
13375         Reported by Bruno Haible.
13377         maint: parenthesize macro definiens
13378         * lib/intprops.h (INT_ADD_OK, INT_SUBTRACT_OK, INT_MULTIPLY_OK):
13379         * lib/pipe-filter-ii.c (GetLastError):
13380         * lib/thread-optim.h (gl_multithreaded): Parenthesize
13381         function-like macro definiens beginning with a unary operator;
13382         needed for weird invocations like ‘m (...)[p]’.
13384 2022-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13386         stdckdint: prefer to intprops when easy
13387         stdckdint.h is part of draft C23 and therefore is more likely
13388         to be familiar to programmers in the future, so prefer it to
13389         intprops.h in files that don’t need non-_WRAPV intprops.h macros.
13390         * lib/alignalloc.c, lib/backupfile.c, lib/fnmatch.c, lib/fnmatch_loop.c:
13391         * lib/group-member.c, lib/malloca.c, lib/posixtm.c, lib/reallocarray.c:
13392         * lib/xmalloc.c:
13393         For files that can use stdckdint.h just as easily as intprops.h,
13394         include the former instead of the latter, and use the former’s
13395         ckd_* macros instead of the latter’s *_WRAPV macros.
13396         * modules/alignalloc, modules/backup-rename, modules/backupfile:
13397         * modules/fnmatch, modules/group-member, modules/malloca:
13398         * modules/posixtm, modules/reallocarray:
13399         * modules/relocatable-prog-wrapper, modules/xalloc:
13400         Depend on stdckdint instead of intprops.
13402         stdckdint: new module
13403         This supports draft C23 <stdckdint.h>.
13404         * doc/posix-headers/stdckdint.texi:
13405         * lib/stdckdint.in.h, modules/stdckdint:
13406         * modules/stdckdint-tests, tests/test-stdckdint.c:
13407         New files.
13408         * MODULES.html.sh, doc/gnulib.texi: Update for new module.
13409         * lib/intprops-internal.h: Include <stdckdint.h> if C23 and
13410         its macros would help and our substitute has not already
13411         started to be included.
13412         (_GL_INT_ADD_WRAPV, _GL_INT_SUBTRACT_WRAPV)
13413         (_GL_INT_MULTIPLY_WRAPV): Use ckd_add, ckd_sub, ckd_mul
13414         if they are defined and would help.
13415         * lib/intprops-internal.h, lib/intprops.h: Improve comments.
13416         The C23 restrictions on stdckdint macros already mostly applied to
13417         intprops.h, so these are clarifications, not further restrictions.
13418         * tests/test-intprops.c: If TEST_STDCKDINT is defined,
13419         include <stdckdint.h> instead of "intprops.h", and test
13420         it instead.
13421         (VERIFY) [TEST_STDCKDINT]: Ignore the arg in this case.
13422         (main) [TEST_STDCKDINT]: Skip tests irrelevant to stdckdint.h.
13424         intprops: refactor intprops.h into two
13425         * lib/intprops.h: Include new file intprops-internal.h.
13426         (_GL_INT_CONVERT, _GL_INT_NEGATE_CONVERT, _GL_INT_MINIMUM)
13427         (_GL_INT_MAXIMUM, _GL_SIGNED_INT_MAXIMUM, LLONG_MAX, LLONG_MIN)
13428         (_GL_HAVE___TYPEOF__, _GL_SIGNED_TYPE_OR_EXPR)
13429         (_GL_HAS_BUILTIN_ADD_OVERFLOW, _GL_HAS_BUILTIN_MUL_OVERFLOW)
13430         (_GL_HAS_BUILTIN_OVERFLOW_P, _GL__GENERIC_BOGUS)
13431         (_GL_INT_OP_WRAPV, _GL_INT_OP_WRAPV_LONGISH, _GL_INT_OP_CALC)
13432         (_GL_INT_OP_WRAPV_VIA_UNSIGNED, _GL_INT_ADD_RANGE_OVERFLOW)
13433         (_GL_INT_SUBTRACT_RANGE_OVERFLOW)
13434         (_GL_INT_MULTIPLY_RANGE_OVERFLOW):
13435         Move to intprops-internal.h.
13436         (TYPE_SIGNED, EXPR_SIGNED, TYPE_WIDTH, INT_NEGATE_RANGE_OVERFLOW)
13437         (INT_NEGATE_OVERFLOW, INT_ADD_WRAPV, INT_SUBTRACT_WRAPV)
13438         (INT_MULTIPLY_WRAPV): Rename to _GL_ prefix, move to
13439         intprops-internal.h, and define here in terms of the _GL_ name.
13440         * lib/intprops-internal.h: New file, containing the above.
13441         * modules/intprops (Files): Add lib/intprops-internal.h.
13443         intprops: refactor _GL_HAS_BUILTIN_OVERFLOW_P
13444         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_P)
13445         [_GL_HAS_BUILTIN_OVERFLOW_P]: Use __builtin_sub_overflow_p
13446         directly rather than indirectly via INT_SUBTRACT_OVERFLOW.
13447         This simplifies future changes, and doesn’t change the generated code.
13449         verify: port ‘assume’ to C23 non-GCC
13450         * lib/verify.h (assume): Use C23's unreachable if available
13451         and if GCC and/or MSC primitives are not available.
13453 2022-08-09  Bruno Haible  <bruno@clisp.org>
13455         gnulib-tool.py: Finish implementing option --conditional-dependencies.
13456         * gnulib-tool.py (main) Accept options --conditional-dependencies,
13457         --no-conditional-dependencies.
13458         * pygnulib/GLModuleSystem.py (GLModuleTable.addConditional): Use
13459         str(module), not module, as key. Fix logic bug.
13460         (GLModuleTable.getCondition): Simplify.
13461         (GLModuleTable.transitive_closure): Show a warning when there are
13462         duplicate dependencies. Fix logic bug.
13463         (GLModuleTable.transitive_closure_separately): Simplify.
13464         (GLModuleTable.add_dummy): Ignore tests modules. Cope with multiple
13465         lib_SOURCES augmentation lines. Cope with comments at the end of a
13466         lib_SOURCES augmentation line. Add the dummy module at the end of the
13467         modules list.
13468         * pygnulib/GLTestDir.py (GLTestDir.execute): Remove the code that forces
13469         the dummy module to the end of the list.
13470         * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Add code to
13471         terminate the shell functions. Add code for the dependencies from the
13472         unconditional to the conditional modules. Don't emit AM_CONDITIONAL for
13473         unconditional modules.
13475         gnulib-tool.py: Don't do license replacements in the autoconf snippets.
13476         * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippet): Remove fileassistant
13477         argument. Don't invoke the 'aux' transformer here. Don't produce Windows
13478         CR-LFs on Windows.
13479         (GLEmiter.autoconfSnippets): Remove fileassistant argument.
13480         * pygnulib/GLImport.py (GLImport.gnulib_comp): Update all callers.
13481         * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
13483         gnulib-tool.py: Fix some code generation details.
13484         * pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am): When removing a
13485         lib_LDFLAGS line, remove also the newline. Fix regex that matches
13486         lib_SOMETHING. Add a newline after each '## begin gnulib module' line.
13487         Don't emit 'endif' lines without corresponding 'if'. When emitting a
13488         '+=' augmentation, make sure it does not get emitted a second time.
13489         Don't emit a blank line when there is no AM_CPPFLAGS augmentation.
13490         Update after getLink() changed. In the value of DEFAULT_TEXT_DOMAIN,
13491         backslash-escape the double-quotes. Don't produce Windows CR-LFs on
13492         Windows. Simplify.
13493         (GLEmiter.tests_Makefile_am): When removing a lib_LDFLAGS line, remove
13494         also the newline. Fix regex that matches lib_SOMETHING. Don't remove a
13495         blank line before EXTRA_DIST. Add a newline after each
13496         '## begin gnulib module' line. Set uses_subdirs also when there is a .c
13497         file in a subdir of tests/. When emitting a '+=' augmentation, make sure
13498         it does not get emitted a second time. Don't produce Windows CR-LFs on
13499         Windows. Simplify.
13500         * pygnulib/GLImport.py (GLImport.execute): Update after getLink()
13501         changed.
13503         gnulib-tool.py: Fixes for conditional dependencies.
13504         * pygnulib/GLModuleSystem.py (GLModule.shell_id_chars): New constant.
13505         (GLModule.getShellFunc): Don't use md5 just because of an '_' character.
13506         (GLModule.getShellVar): Likewise.
13507         (GLModule.getConditionalName): Include a newline in the md5 input.
13508         * pygnulib/constants.py (ALPHANUMERIC): Remove constant.
13510         gnulib-tool.py: Refactor.
13511         * pygnulib/GLModuleSystem.py (GLModule.getLicense): Separate the warning
13512         logic from the result logic.
13514 2022-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13516         largefile, year2038: simplify if > Autoconf 2.71
13517         * m4/largefile.m4 (gl_SET_LARGEFILE_SOURCE)
13518         (_AC_SYS_LARGEFILE_MACRO_VALUE):
13519         * m4/year2038.m4 (gl_YEAR2038_EARLY, gl_YEAR2038, gl_YEAR2038_BODY):
13520         Adjust to Autoconf versions after 2.71, which should contain the Gnulib
13521         patches in this area and so should not need to be overridden.
13523 2022-08-07  Bruno Haible  <bruno@clisp.org>
13525         gnulib-tool.py: Finish implementing option --extract-test-module.
13526         * gnulib-tool.py (main): Accept option --extract-tests-module.
13528         gnulib-tool.py: Fix handling of nonexistent module names in --extract-*.
13529         * gnulib-tool.py (main): To test whether a module exists, just call
13530         GLModuleSystem.find and test its return value.
13532         gnulib-tool.py: Fix --extract-dependencies result.
13533         * pygnulib/GLModuleSystem.py (GLModule.getDependencies): Return a
13534         snippet, not a list. Implement dependency of ${module}-tests on
13535         ${module}.
13536         (GLModule.getDependenciesWithoutConditions,
13537         GLModule.getDependenciesWithConditions): New methods.
13538         (GLModuleTable.transitive_closure): Call getDependenciesWithConditions.
13539         * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Call
13540         getDependenciesWithoutConditions.
13541         * gnulib-tool.py (main) [--extract-dependencies]: Update.
13543         gnulib-tool.py: Rename a method.
13544         * pygnulib/GLModuleSystem.py (GLModule.getAutoconfEarlySnippet): Renamed
13545         from GLModule.getAutoconfSnippet_Early.
13546         * pygnulib/GLImport.py: Update.
13547         * pygnulib/GLTestDir.py: Likewise.
13549         gnulib-tool.py: Fix section extraction from module descriptions.
13550         The code with   self.content.split(section)[-1]
13551         was broken because it recognizes an indented section label.
13552         Similar code with   ('\n' + self.content).split('\n' + section)[-1]
13553         would still be broken because it recognizes an indented section label
13554         in the first line of the file.
13555         The code with   section_label_regex
13556         was broken because sometimes it returns the second-to-last section with
13557         the given label, not the last one.
13558         Also, whitespace after the colon was not ignored.
13559         * pygnulib/GLModuleSystem.py (GLModule.__init__): Dissect the module
13560         description's contents immediately, once only, in a reliable way.
13561         (GLModule.getDescription, GLModule.getComment): Simplify.
13562         (GLModule.getStatus): Simplify. Return a string.
13563         (GLModule.getStatuses): New function. Return a list.
13564         (GLModule.getNotice, GLModule.getApplicability, GLModule.getFiles,
13565         GLModule.getDependencies, GLModules.getAutoconfSnippet_Early,
13566         GLModules.getAutoconfSnippet, GLModule.getAutomakeSnippet_Conditional,
13567         GLModule.getInclude, GLModule.getLink, GLModule.getLicense_Raw):
13568         Simplify.
13569         (GLModule.getLicense): Remove whitespace after calling getLicense_Raw.
13570         (GLModule.getMaintainer): Simplify.
13571         (GLModuleTable.transitive_closure): Call getStatuses() instead of
13572         getStatus().
13573         * pygnulib/GLEmiter.py: Likewise.
13574         * gnulib-tool.py (main): For --extract-description, --extract-comment,
13575         --extract-status, --extract-notice, --extract-autoconf-snippet,
13576         --extract-automake-snippet, --extract-include-directive,
13577         --extract-link-directive, --extract-maintainer, don't add an extra
13578         newline after the snippet.
13580         gnulib-tool.py: Improve field naming.
13581         * pygnulib/GLModuleSystem.py (GLModule): Rename field 'module' to
13582         'path'. Fix a typo in a TypeError message.
13584         gnulib-tool.py: Simplify.
13585         * pygnulib/GLModuleSystem.py (GLModule): Convert Windows newlines right
13586         after reading the module description, not in every accessor.
13588         gnulib-tool.py: Reduce code duplication.
13589         * pygnulib/GLModuleSystem.py (GLModule): Declare two regexes are class
13590         variables.
13592         gnulib-tool.py: Implement option --find.
13593         * pygnulib/GLModuleSystem.py (GLModuleSystem.file_is_module): New
13594         method.
13595         (GLModuleSystem.list): Filter the listing in memory; don't use a 'sed'
13596         subprocess.
13597         * gnulib-tool.py (main): Handle mode 'find'.
13599         gnulib-tool: Fix option --find in combination with option --local-dir.
13600         * gnulib-tool (func_prefixed_modules_in_dir): New function.
13601         (find): Use it, and filter the directory names away after the 'grep'
13602         pass.
13604         gnulib-tool.py: Fix some regexes.
13605         * pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am): Use an equivalent
13606         regex as gnulib-tool.
13607         * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
13609         gnulib-tool.py: Fix some regex uses.
13610         * pygnulib/GLModuleSystem.py (GLModuleTable.transitive_closure): Match
13611         the regex against all lines of the snippet, not only the first line.
13612         * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippet): Likewise.
13614         gnulib-tool.py: Make regex uses more straightforward.
13615         * pygnulib/constants.py: Don't use the "minimal matching" *? construct
13616         when it makes no difference (because we're matching a single line only
13617         and flag re.M is not specified).
13618         * pygnulib/GLModuleSystem.py: Likewise.
13620         gnulib-tool.py: Make regex uses more straightforward.
13621         * pygnulib/GLModuleSystem.py: Don't use flag re.S on regular expressions
13622         that are meant to match a single line only, and remove the use of the
13623         "minimal matching" *? construct whose only purpose was to neutralize the
13624         re.S flag.
13625         * pygnulib/GLEmiter.py: Likewise.
13626         * pygnulib/GLImport.py: Likewise.
13627         * pygnulib/GLTestDir.py: Likewise.
13629         gnulib-tool.py: Make regex uses more straightforward.
13630         * pygnulib/GLEmiter.py: Don't use flag re.S on regular expressions on
13631         regular expressions with no '.'.
13632         * pygnulib/GLImport.py: Likewise.
13634 2022-08-06  Bruno Haible  <bruno@clisp.org>
13636         gnulib-tool: In the VC files messages, omit the destination directory.
13637         This makes these messages consistent with the other "Copying ..." and
13638         "Creating ..." messages.
13639         * gnulib-tool (func_import): Omit $destdir/ from the "Updating"/
13640         "Creating" messages regarding .gitignore files.
13641         * pygnulib/GLImport.py (GLImport._update_ignorelist_): Likewise.
13643         gnulib-tool.py: Fix output in --dry-run mode.
13644         * pygnulib/GLImport.py (GLImport._update_ignorelist_): In dry-run mode,
13645         say "Update", not "Updating".
13647         gnulib-tool.py: Finish implementing options --vc-files, --no-vc-files.
13648         * gnulib-tool.py (main): Accept options --vc-files, --no-vc-files.
13649         * pygnulib/GLImport.py (GLImport.__init__): Correct parsing of
13650         gl_VC_FILES directive.
13651         (GLImport.gnulib_cache): Don't treat the value False like None.
13652         (GLImport.execute): Skip the .gitignore file manipulations if vc_files
13653         is False.
13655         gnulib-tool.py: Finish implementing option --witness-c-macro.
13656         * gnulib-tool.py (main): Accept option --witness-c-macro.
13657         * pygnulib/GLConfig.py (GLConfig.__init__): Remove wrong type check of
13658         witness_c_macro argument.
13660 2022-08-05  Bruno Haible  <bruno@clisp.org>
13662         gnulib-tool.py: Don't initialize local variables too early.
13663         * gnulib-tool.py (main): Initialize each local variable in one place.
13664         I prefer to have pylint tell me about uninitialized variables than to
13665         get the value None at runtime.
13667         gnulib-tool.py: Finish implementing option --po-domain.
13668         * gnulib-tool.py (main): Accept option --po-domain.
13669         * pygnulib/GLEmiter.py (GLEmiter.po_POTFILES_in): Fix variable
13670         reference.
13671         * pygnulib/GLImport.py (GLImport.execute): Don't delete Makefile.in.in
13672         from the gnulib directory. Don't require a shell when invoking wget.
13673         After invoking wget, restore the current directory.
13675         gnulib-tool.py: Finish implementing option --macro-prefix.
13676         * gnulib-tool.py (main): Accept option --macro-prefix.
13678         gnulib-tool.py: Refactor --makefile-name option.
13679         * gnulib-tool.py (main): Handle option --makefile-name like all other
13680         string-valued options.
13682         gnulib-tool.py: Implement option --no-libtool.
13683         * gnulib-tool.py (main): Accept option --no-libtool.
13685         gnulib-tool.py: Remove redundant type checks.
13686         * pygnulib/GLConfig.py (GLConfig.__init__): Remove redundant type
13687         checks, left over from 2022-08-04.
13688         (GLConfig.getIncludeGuardPrefix): Improve comment.
13689         (GLConfig.resetMacroPrefix): Optimize.
13691         gnulib-tool.py: Refactor --makefile-name option.
13692         * gnulib-tool.py (main): Rename variable 'makefile' to 'makefile_name'.
13693         * pygnulib/GLConfig.py: Rename attribute 'makefile' to 'makefile_name'.
13694         * pygnulib/GLMakefileTable.py: Update.
13695         * pygnulib/GLEmiter.py: Likewise.
13696         * pygnulib/GLImport.py: Likewise.
13697         * pygnulib/GLFileSystem.py (GLFileAssistant): Remove unused assignment.
13699         gnulib-tool.py: Fix link_if_changed function.
13700         * pygnulib/constants.py (joinpath): Fix comment.
13701         (as_link_value_at_dest): New function, extracted from link_relative.
13702         (link_relative): Use it.
13703         (link_if_changed): Really don't replace the symbolic link if it does not
13704         need to change.
13706         gnulib-tool.py: Fix 'Unused import' warnings.
13707         * gnulib-tool.py: Remove unused imports.
13708         * pygnulib/*.py: Likewise.
13710         gnulib-tool.py: Fix 'Undefined variable' errors.
13711         * pygnulib/constants.py: Import codecs.
13712         * pygnulib/GLConfig.py (GLConfig.setLibName): Fix local variable
13713         reference.
13714         * pygnulib/GLFileSystem.py (GLFileSystem.lookup,
13715         GLFileAssistant.update): Fix local variable references.
13716         * pygnulib/GLEmiter.py (GLEmiter.po_POTFILES_in): Fix reference.
13717         * pygnulib/GLTestDir.py (GLMegaTestDir.execute): Define missing local
13718         variables.
13720         gnulib-tool.py: Make option --version work.
13721         * pygnulib/constants.py (__copyright__): Bump copyright year.
13722         * pygnulib/GLInfo.py (GLInfo.authors): Add a comma after the
13723         second-to-last author.
13724         (GLInfo.copyright): Show only the last modification year.
13725         (GLInfo.date): Check whether git and GNU date are available. Use
13726         'git log ChangeLog', not 'git log'. Run 'git log' in the gnulib
13727         directory, not in the current directory. Search for 'Date:' only at the
13728         beginning of a line. As a fallback, look at the first ChangeLog entry.
13729         (GLInfo.version): Check whether git is available. Run git-version-gen in
13730         the gnulib directory, not in the current directory. Replace '-dirty'
13731         with '-modified'. As a fallback, return the empty string.
13732         * gnulib-tool.py (main) [--version]: Add a space before the version.
13734         gnulib-tool.py: Simplify.
13735         * pygnulib/constants.py (compiler): Remove function.
13736         * gnulib-tool.py: Use re.compile directly instead.
13737         * pygnulib/*.py: Likewise.
13739 2022-08-04  Bruno Haible  <bruno@clisp.org>
13741         gnulib-tool.py: Fix typo.
13742         * pygnulib/GLImport.py (GLImport.execute): Actually handle file
13743         removals.
13745         gnulib-tool.py: Coding style: Revisit line breaks.
13746         * gnulib-tool.py: Avoid line breaks at arbitrary points inside
13747         expressions. Use line breaks to clarify [... for ...] iterations.
13748         * pygnulib/*.py: Likewise.
13750         gnulib-tool.py: Simplify boolean setters.
13751         * pygnulib/GLConfig.py (setLibtool): New method, replaces enableLibtool
13752         and disableLibtool.
13753         (setCondDeps): New method, replaces enableCondDeps and disableCondDeps.
13754         (setVCFiles): New method, replaces enableVCFiles and disableVCFiles.
13755         (setSymbolic): New method, replaces enableSymbolic and disableSymbolic.
13756         (setLSymbolic): New method, replaces enableLSymbolic and
13757         disableLSymbolic.
13758         (setLibtests): New method, replaces enableLibtests and disableLibtests.
13759         (setSingleConfigure): New method, replaces enableSingleConfigure and
13760         disableSingleConfigure.
13761         (setDryRun): New method, replaces enableDryRun and disableDryRun.
13762         (setErrors): New method, replaces enableErrors and disableErrors.
13763         (__init__): Update.
13764         * pygnulib/GLImport.py: Likewise.
13765         * pygnulib/GLTestDir.py: Likewise.
13767         gnulib-tool.py: Implement options --cache-modules, --no-cache-modules.
13768         * gnulib-tool.py (main): Accept options --cache-modules,
13769         --no-cache-modules.
13770         * pygnulib/GLConfig.py: Remove modcache property and constructor
13771         argument.
13772         * pygnulib/GLInfo.py (GLInfo.usage): Don't document these no-op options.
13774         gnulib-tool.py: Use mainstream/GNU coding style.
13775         * gnulib-tool.py: Break lines before the % operator, not after.
13776         * pygnulib/*.py: Likewise. Avoid line breaks when the resulting lines
13777         are not too long.
13779         gnulib-tool.py: Follow gnulib-tool changes, part 24.
13780         Follow gnulib-tool change
13781         2017-02-19  Bruno Haible  <bruno@clisp.org>
13782         gnulib-tool: Avoid conflict of havelib-tests with --single-configure.
13783         * pygnulib/GLTestDir.py (GLTestDir.__init__): Don't allocate the
13784         GLModuleTable here.
13785         (GLTestDir.execute): Do it here. Avoid havelib-tests when
13786         --with-tests --single-configure is specified.
13788         gnulib-tool.py: Respect the specified module list.
13789         * pygnulib/GLTestDir.py (GLTestDir.execute): Don't remove specific
13790         modules (ftruncate, mountlist, etc.) from the specified module list.
13792         gnulib-tool.py: Implement option --avoid.
13793         * pygnulib/GLModuleSystem.py (GLModuleTable.__init__): Compute the
13794         effective avoids list here.
13795         (GLModuleTable.transitive_closure, GLModuleTable.add_dummy): Consider
13796         the avoids list.
13797         * pygnulib/GLImport.py (GLImport.gnulib_cache): Use the avoids list from
13798         GLConfig directly.
13799         (GLImport.prepare): No need any more to set the avoids list in the
13800         GLModuleTable.
13802         gnulib-tool.py: Make --with/--without-*-tests handling a little safer.
13803         * pygnulib/GLConfig.py (__init__): Fix reset* invocations.
13804         setInclTestCategories, setExclTestCategories): Revert to old value if
13805         the new value is invalid.
13807 2022-08-03  Bruno Haible  <bruno@clisp.org>
13809         gnulib-tool.py: Implement option --single-configure.
13810         * gnulib-tool.py (main): Accept option --single-configure. Pass its
13811         value to the GLConfig constructor.
13812         * pygnulib/GLTestDir.py (GLTestDir.execute): Remove debugging output.
13814         gnulib-tool.py: Implement options --without-c++-tests etc.
13815         * gnulib-tool.py (main): Accept options --without-c++-tests,
13816         --without-longrunning-tests, --without-privileged-tests,
13817         --without-unportable-tests.
13818         Improve error message for --copy-file with invalid number of arguments.
13819         Check for invalid options given in --import, --add-import,
13820         --remove-import, --update modes.
13821         Pass both sets of test categories to the GLConfig constructor.
13822         * pygnulib/GLConfig.py (GLConfig.__init__): Accept incl_test_categories
13823         and excl_test_categories instead of testflags.
13824         (checkInclTestCategory): Renamed from checkTestFlag.
13825         (enableInclTestCategory): Renamed from enableTestFlag.
13826         (disableInclTestCategory): Renamed from disableTestFlag.
13827         (getInclTestCategories): Renamed from getTestFlags.
13828         (setInclTestCategories): Renamed from setTestFlags.
13829         (resetInclTestCategories): Renamed from resetTestFlags.
13830         (setInclTestCategory, checkExclTestCategory, enableExclTestCategory,
13831         disableExclTestCategory, getExclTestCategories, setExclTestCategories,
13832         resetExclTestCategories): New methods.
13833         * pygnulib/GLModuleSystem.py (GLModuleTable.__init__): Accept two
13834         booleans as second and third constructor arguments.
13835         (transitive_closure): Correct the determination of whether to include
13836         each module, depending on the with-* and without-* options.
13837         (transitive_closure_separately): Update.
13838         * pygnulib/GLMakefileTable.py: Update.
13839         * pygnulib/GLImport.py (__init__, actioncmd, gnulib_cache, execute):
13840         Update.
13841         * pygnulib/GLTestDir.py (GLTestDir.__init__, GLTestDir.execute,
13842         GLMegaTestDir.__init__): Update.
13844         gnulib-tool.py: Implement option --without-tests.
13845         * gnulib-tool.py (main): Accept option --without-tests.
13847         gnulib-tool.py: Fix broken 'for' loop.
13848         * gnulib-tool.py (main): Canonicalize inctests before creating the
13849         GLConfig. Rewrite a broken 'for' loop.
13850         * pygnulib/GLConfig.py (GLConfig.setTestFlags): Remove unused statement.
13852         gnulib-tool.py: Follow gnulib-tool changes, part 23.
13853         Follow gnulib-tool changes
13854         2016-11-11  Bruno Haible  <bruno@clisp.org>
13855         gnulib-tool: Support for the dual "LGPLv3+ or GPLv2" license.
13856         2016-12-02  Nikos Mavrogiannopoulos <nmav@gnutls.org>
13857         gnulib-tool (func_import): Adhere to the license guideline ...
13858         2016-12-02  Daiki Ueno  <ueno@gnu.org>
13859         gnulib-tool (func_import): Relax the regex ...
13860         * gnulib-tool.py: For --lgpl, accept value 3orGPLv2.
13861         * pygnulib/GLInfo.py (GLInfo.usage): Update.
13862         * pygnulib/GLConfig.py (GLConfig.setLGPL): Update argument check.
13863         * pygnulib/GLImport.py (GLImport.__init__, GLImport.gnulib_cache):
13864         Update gl_LGPL handling.
13865         (GLImport.prepare): Update license compatibility checks and license
13866         header rewriting.
13867         * pygnulib/GLTestDir.py (GLTestDir.execute): Update license
13868         compatibility checks. Handle also the licenses GPLv3+, GPL, LGPLv3+.
13870         gnulib-tool.py: Fix unjustified "incompatible license" warnings.
13871         * pygnulib/GLTestDir.py (GLTestDir.execute): Don't emit a warning when
13872         the dependency module has a license such as "public domain" or
13873         "unlimited".
13875         gnulib-tool.py: Follow gnulib-tool changes, part 22.
13876         Follow gnulib-tool change
13877         2016-10-15  Bruno Haible  <bruno@clisp.org>
13878         Avoid gnulib-tool warnings about the dependencies of 'parse-datetime'.
13879         * pygnulib/GLModuleSystem.py (GLModule.getLicense): Special-case the
13880         'parse-datetime' module.
13882         gnulib-tool.py: Follow gnulib-tool changes, part 21.
13883         Follow gnulib-tool change
13884         2016-10-16  Bruno Haible  <bruno@clisp.org>
13885         gnulib-tool: Make --create-testdir on all modules work again.
13886         * pygnulib/GLTestDir.py (GLTestDir.execute): Don't include the
13887         non-recursive-gnulib-prefix-hack module.
13889         gnulib-tool.py: Follow gnulib-tool changes, part 20.
13890         Follow gnulib-tool changes
13891         2016-01-15  Paul Eggert  <eggert@cs.ucla.edu>
13892         gnulib-tool: don't assume ln -s works
13893         2016-01-24  Paul Eggert  <eggert@cs.ucla.edu>
13894         gnulib-tool: don't give up on ln -s so easily
13895         2017-06-08  Bruno Haible  <bruno@clisp.org>
13896         gnulib-tool: Fix bug in func_ln_s, from 2016-01-15.
13897         * pygnulib/constants.py (symlink_relative): New function.
13898         (link_relative): Use it instead of os.symlink.
13900         gnulib-tool.py: Avoid errors when writing to a VFAT file system, part 2.
13901         * pygnulib/constants.py (movefile): New function.
13902         * pygnulib/*.py: Use it instead of shutil.
13904         gnulib-tool.py: Avoid errors when writing to a VFAT file system.
13905         * pygnulib/constants.py (copyfile, copyfile2): New functions.
13906         * gnulib-tool.py: Use them instead of shutil.
13907         * pygnulib/*.py: Likewise.
13909         gnulib-tool.py: Fix typo.
13910         * pygnulib/GLImport.py (GLImport.__init__): Use the relative auxdir as
13911         second, not as first argument of joinpath.
13913 2022-07-31  Bruno Haible  <bruno@clisp.org>
13915         gnulib-tool.py: Fix typo.
13916         * pygnulib/GLTestDir.py (GLMegaTestDir.execute): Invoke os.mkdir as
13917         intended.
13919         gnulib-tool.py: Improve some error messages.
13920         * gnulib-tool.py (main): Write "*** Stop." instead of "*** Exit.".
13921         (__main__): Print an error message for GLError 5, 13, 14, 15, 16, 17, 18.
13922         * pygnulib/GLError.py (GLError.__repr__): Compute one error message,
13923         not 19.
13925         gnulib-tool.py: Write errors to stderr, not stdout.
13926         * pygnulib/constants.py: Write error messages to stderr, not stdout.
13928         gnulib-tool.py: Use mainstream coding style.
13929         * pygnulib/GLConfig.py: Use 'raise' to re-throw an exception.
13931         gnulib-tool.py: Implement options --symlink and --local-symlink.
13932         * gnulib-tool.py (main): Handle options --symlink and --local-symlink.
13933         * pygnulib/constants.py (link_if_changed): Ignore FileNotFoundError from
13934         os.remove call.
13936         gnulib-tool.py: Make --copy-file work.
13937         * gnulib-tool.py (main) [copy-file]: Fix reference to uninitialized
13938         variable. Fix error handling of os.makedirs. Pass the destdir to the
13939         GLFileAssistant.
13941         gnulib-tool.py: Allow module arguments to occur at any position.
13942         * gnulib-tool.py (main): Collect the non-option arguments in a single
13943         list, regardless of their position. Use parse_known_args instead of
13944         parse_args, and give an error message about unknown options ourselves.
13945         * gnulib-tool: Fix typo in error message.
13947         gnulib-tool.py: Make --test behaviour more similar to gnulib-tool.
13948         * gnulib-tool.py (main) [test]: Remove space from the testdir name.
13950         gnulib-tool: Clarify that --test allows zero module arguments.
13951         * gnulib-tool (func_usage): Mark the modules for --test as optional.
13952         * pygnulib/GLInfo.py (GLInfo.usage): Likewise.
13954         gnulib-tool.py: Make option processing more similar to gnulib-tool.
13955         * gnulib-tool.py (main): Allow --add-import and --remove-import with 0
13956         modules.
13958         gnulib-tool.py: Improve compliance with GNU standards.
13959         * gnulib-tool.py (main): Handle --help and --version before testing for
13960         conflicting modes.
13962         gnulib-tool.py: Emit error message when conflicting modes are specified.
13963         * gnulib-tool.py (main): Fix test of conflicting modes. (Some options
13964         produce a value of [], and as a condition, [] evaluates to False.)
13966         gnulib-tool.py: Remove most short options.
13967         * gnulib-tool.py (main): Reorder the list of options. Remove most short
13968         options, for consistency with gnulib-tool.
13970         gnulib-tool.py: Follow gnulib-tool changes, part 19.
13971         Follow gnulib-tool changes
13972         2015-12-09  Pavel Raiskup  <praiskup@redhat.com>
13973         gnulib-tool: allow multiple --local-dir usage
13974         2019-02-14  Bruno Haible  <bruno@clisp.org>
13975         gnulib-tool: Improve handling of multiple --local-dir options.
13976         * gnulib-tool (func_reconstruct_cached_dir): When the argument is
13977         absolute, return it unmodified.
13978         (func_compute_relative_local_gnulib_path): Renamed from
13979         func_count_relative_local_gnulib_path. Add comment.
13980         * gnulib-tool.py: Accept multiple --local-dir options and collect the
13981         values into localpath.
13982         * pygnulib/GLConfig.py: Take a localpath argument instead of a localdir
13983         argument.
13984         (getLocalDir, setLocalDir, resetLocalDir): Remove methods.
13985         (getLocalPath, setLocalPath, resetLocalPath): New methods.
13986         * pygnulib/GLFileSystem.py (CopyAction): New class.
13987         (GLFileSystem.lookup): Consider all dirs in localpath.
13988         (GLFileSystem.shouldLink): New method.
13989         (GLFileAssistant): Use shouldLink.
13990         * pygnulib/GLModuleSystem.py (GLModuleSystem.exists): Iterate over all
13991         dirs in localpath.
13992         (GLModuleSystem.list): Likewise.
13993         * pygnulib/GLEmiter.py: Update.
13994         * pygnulib/GLImport.py (GLImport.__init__): Put the argument of
13995         gl_LOCAL_DIR into localpath, not localdir.
13996         (GLImport.actioncmd): Consider all dirs in localpath.
13997         (GLImport.relative_to_destdir, GLImport.relative_to_currdir): New
13998         methods.
13999         (GLImport.gnulib_cache): Combine all dirs in localpath. Use
14000         self.relative_to_destdir.
14001         * pygnulib/GLTestDir.py (GLTestDir.execute): Use shouldLink.
14003         gnulib-tool.py: Improve the primitives for relative file names.
14004         * pygnulib/constants.py (relativize): Don't attempt to handle absolute
14005         file names. Fix bug with relativize('../foo/bar', '../foo/bla/zut').
14006         (relconcat): New function.
14008         gnulib-tool.py: Follow gnulib-tool changes, part 18.
14009         Follow gnulib-tool change
14010         2005-09-20  Bruno Haible  <bruno@clisp.org>
14011         gnulib-tool: Remove trailing slashes
14012         * pygnulib/constants.py (remove_trailing_slashes): New function.
14013         * pygnulib/GLConfig.py (GLConfig): Use it in the setters.
14015 2022-07-31  Bruno Haible  <bruno@clisp.org>
14017         avltree-omap, avltree-oset, avltreehash-list, rbtree-omap: Pacify GCC.
14018         * lib/gl_avltree_omap.c (gl_avltree_omap_check_invariants): Add extern
14019         decl.
14020         * lib/gl_avltree_oset.c (gl_avltree_oset_check_invariants): Likewise.
14021         * lib/gl_avltreehash_list.c (gl_avltreehash_list_check_invariants):
14022         Likewise.
14023         * lib/gl_rbtree_omap.c (gl_rbtree_omap_check_invariants): Likewise.
14025 2022-07-31  Paul Eggert  <eggert@cs.ucla.edu>
14027         rbtree-oset, rbtreehash-list: Pacify GCC
14028         * lib/gl_rbtree_oset.c (gl_rbtree_oset_check_invariants):
14029         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_check_invariants):
14030         Add extern decls, to pacify --enable-gcc-warnings with Bison.
14032 2022-07-31  Akim Demaille  <akim@lrde.epita.fr>
14034         gnulib-tool: add support for --automake-subdir-tests
14035         <https://lists.gnu.org/r/bug-gnulib/2022-01/msg00111.html>
14036         * gnulib-tool (main): Handle --automake-subdir-tests.
14037         (func_emit_shellvars_init, func_emit_lib_Makefile_am): Use
14038         $sourcebase when handling tests and --automake-subdir-tests is
14039         given.
14040         (func_append_actionarg): Support --automake-subdir-tests.
14041         (func_create_testdir): Add missing argument for func_emit_initmacro_end.
14043 2022-07-31  Bruno Haible  <bruno@clisp.org>
14045         gendocs.sh: Fix error when invoking 'perl' (regression 2022-07-23).
14046         * build-aux/gendocs.sh (PERL): Use double-quotes, not single-quotes.
14048 2022-07-30  Bruno Haible  <bruno@clisp.org>
14050         gnulib-tool.py: Clean up imports.
14051         * gnulib-tool.py: Remove unused constants.
14052         * pygnulib/*.py: Likewise.
14054         gnulib-tool.py: Assume Python 3.
14055         * gnulib-tool.py: Don't allow 'bytes' as an alternative to 'str'.
14056         * pygnulib/*.py: Likewise.
14058         gnulib-tool.py: Assume Python 3.
14059         * gnulib-tool.py: Don't set PYTHON3, string. Use str instead of string.
14060         * pygnulib/*.py: Likewise.
14062         gnulib-tool.py: Modernize coding style.
14063         * pygnulib/*.py: Remove parentheses around raise value expressions.
14065 2022-07-30  Bruno Haible  <bruno@clisp.org>
14067         doc: Update regarding bootstrap split.
14068         Reported by Paul Smith <psmith@gnu.org>.
14069         * doc/gnulib-tool.texi (gettextize and autopoint): Mention autogen.sh
14070         instead of bootstrap.
14071         (VCS Issues): Describe three alternative approaches.
14072         * doc/gnulib.texi (Developer tools): Mention also autopull.sh and
14073         autogen.sh.
14074         * top/bootstrap (usage): Fix copy&paste mistake.
14076 2022-07-29  Bruno Haible  <bruno@clisp.org>
14078         gnulib-tool.py: Follow gnulib-tool changes, part 17.
14079         Follow gnulib-tool change
14080         2015-10-06  Pavel Raiskup  <praiskup@redhat.com>
14081         gnulib-tool: fix tests of 'extensions' module
14082         * pygnulib/GLEmiter.py (GLEmiter.preEarlyMacros): New function.
14083         * pygnulib/GLImport.py (GLImport.gnulib_comp): Invoke it.
14084         * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
14086         gnulib-tool.py: Follow gnulib-tool changes, part 16.
14087         Follow gnulib-tool change
14088         2015-09-25  Pavel Raiskup  <praiskup@redhat.com>
14089         gnulib-common.m4: fix gl_PROG_AR_RANLIB/AM_PROG_AR clash
14090         * pygnulib/GLImport.py (GLImport.gnulib_comp): Put the
14091         gl_USE_SYSTEM_EXTENSIONS right before gl_PROG_AR_RANLIB into
14092         gnulib-comp.m4 (if the 'extensions' module is used).
14094         gnulib-tool.py: Modernize coding style.
14095         * pygnulib/*.py: Remove parentheses around return value expressions.
14097         gnulib-tool.py: Modernize the file headers.
14098         * pygnulib/*.py: Remove '#!/usr/bin/python' (not needed) and
14099         'encoding: UTF-8' lines (default in Python 3). Add copyright notice.
14101         gnulib-tool.py: Use mainstream coding style.
14102         * gnulib-tool.py: Clarify the coding style. Fix some pycodestyle
14103         warnings.
14104         * pygnulib/constants.py: Likewise.
14105         * pygnulib/GLEmiter.py: Likewise.
14106         * pygnulib/GLImport.py: Likewise.
14107         * pygnulib/GLMakefileTable.py: Likewise.
14109 2022-07-29  Bruno Haible  <bruno@clisp.org>
14111         gnulib-tool.py: Fix error (regression 2021-04-11).
14112         * pygnulib/GLConfig.py (GLConfig.getModuleIndicatorPrefix): Fix code.
14114         gnulib-tool.py: Fix warning from Python 3.10.4.
14115         * pygnulib/GLModuleSystem.py (getConditionalName): Fix a string
14116         substitution expression.
14118         gnulib-tool.py: Fix error in Ubuntu 22.04.
14119         * gnulib-tool.py: Search for python3 in $PATH.
14121 2022-07-25  Bruno Haible  <bruno@clisp.org>
14123         bootstrap: Make the automatic sync more resilient.
14124         Reported by Paul Eggert in
14125         <https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00060.html>.
14126         * top/bootstrap (bootstrap_sync): Set to true when bootstrap-funclib.sh
14127         is not present.
14128         * top/gen-bootstrap.sed: Insert a couple of comment lines.
14129         * build-aux/bootstrap: Regenerated using "make build-aux/bootstrap".
14131 2022-07-24  Bruno Haible  <bruno@clisp.org>
14133         Fix comment.
14134         Reported by Paul Eggert in
14135         <https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00058.html>.
14136         * top/bootstrap-funclib.sh: Fix comment about canonical location.
14137         * top/autopull.sh: Likewise.
14138         * top/autogen.sh: Likewise.
14139         * top/bootstrap: Likewise.
14141         Split bootstrap into autopull.sh and autogen.sh.
14142         * top/bootstrap-funclib.sh: New file, based on build-aux/bootstrap.
14143         * top/autopull.sh: New file, based on build-aux/bootstrap.
14144         * top/autogen.sh: New file, based on build-aux/bootstrap.
14145         * top/bootstrap: New file, based on build-aux/bootstrap.
14146         * top/gen-bootstrap.sed: New file.
14147         * Makefile (build-aux/bootstrap): New rule.
14148         (regen): Depend on it.
14149         * build-aux/bootstrap: Regenerated using "make build-aux/bootstrap".
14151 2022-07-24  Bruno Haible  <bruno@clisp.org>
14153         bootstrap: Obey another environment variable GNULIB_REFDIR.
14154         * build-aux/bootstrap (usage): Document option --gnulib-refdir and
14155         environment variable GNULIB_REFDIR.
14156         Accept option --gnulib-refdir.
14157         When GNULIB_SRCDIR is specified, verify that it denotes a directory.
14158         Use $GNULIB_REFDIR, not $GNULIB_SRCDIR, as argument to git's --reference
14159         option.
14160         Improve an error message.
14161         * NEWS: Mention the change.
14163 2022-07-23  Bruno Haible  <bruno@clisp.org>
14165         Fix a couple of ShellCheck warnings.
14166         * MODULES.html.sh (sed_escape_slash): Remove unused variable.
14167         * build-aux/bootstrap: Avoid computed printf format strings.
14168         * build-aux/do-release-commit-and-tag: Likewise.
14169         * build-aux/gendocs.sh: Likewise.
14170         * build-aux/declared.sh: Fix "unrecognized option" message.
14171         * gnulib-tool (supplied_opts): Remove unused variable.
14172         (--single-con): Remove redundant option recognition.
14173         * tests/test-parse-duration.sh (nl): Remove unused variable.
14174         * tests/test-update-copyright.sh: Use double-quotes instead of
14175         single-quotes.
14177 2022-07-23  Bruno Haible  <bruno@clisp.org>
14179         Avoid DoS vulnerability through unsafe default assignment.
14180         See https://www.shellcheck.net/wiki/SC2223 .
14181         * MODULES.html.sh (func_tmpdir): Surround default assignment with
14182         double-quotes.
14183         * build-aux/bootstrap: Likewise.
14184         * build-aux/csharpcomp.sh.in (func_tmpdir): Likewise.
14185         * build-aux/gendocs.sh: Likewise.
14186         * build-aux/libtool-next-version (func_tmpdir): Likewise.
14187         * config/srclist-update: Likewise.
14188         * gnulib-tool (func_tmpdir): Likewise.
14189         * posix-modules (func_tmpdir): Likewise.
14190         * tests/test-atexit.sh: Likewise.
14191         * tests/test-btoc32-1.sh: Likewise.
14192         * tests/test-btoc32-2.sh: Likewise.
14193         * tests/test-btowc1.sh: Likewise.
14194         * tests/test-btowc2.sh: Likewise.
14195         * tests/test-c-dtoastr.sh: Likewise.
14196         * tests/test-c-ldtoastr.sh: Likewise.
14197         * tests/test-c-snprintf.sh: Likewise.
14198         * tests/test-c-strcase.sh: Likewise.
14199         * tests/test-c-vasprintf.sh: Likewise.
14200         * tests/test-c-vsnprintf.sh: Likewise.
14201         * tests/test-c-xvasprintf.sh: Likewise.
14202         * tests/test-c32isalnum.sh: Likewise.
14203         * tests/test-c32isalpha.sh: Likewise.
14204         * tests/test-c32isblank.sh: Likewise.
14205         * tests/test-c32iscntrl.sh: Likewise.
14206         * tests/test-c32isdigit.sh: Likewise.
14207         * tests/test-c32isgraph.sh: Likewise.
14208         * tests/test-c32islower.sh: Likewise.
14209         * tests/test-c32isprint.sh: Likewise.
14210         * tests/test-c32ispunct.sh: Likewise.
14211         * tests/test-c32isspace.sh: Likewise.
14212         * tests/test-c32isupper.sh: Likewise.
14213         * tests/test-c32isxdigit.sh: Likewise.
14214         * tests/test-c32rtomb.sh: Likewise.
14215         * tests/test-c32snrtombs-1.sh: Likewise.
14216         * tests/test-c32snrtombs-2.sh: Likewise.
14217         * tests/test-c32snrtombs-3.sh: Likewise.
14218         * tests/test-c32snrtombs-4.sh: Likewise.
14219         * tests/test-c32srtombs-1.sh: Likewise.
14220         * tests/test-c32srtombs-2.sh: Likewise.
14221         * tests/test-c32srtombs-3.sh: Likewise.
14222         * tests/test-c32srtombs-4.sh: Likewise.
14223         * tests/test-c32stombs-1.sh: Likewise.
14224         * tests/test-c32stombs-2.sh: Likewise.
14225         * tests/test-c32stombs-3.sh: Likewise.
14226         * tests/test-c32stombs-4.sh: Likewise.
14227         * tests/test-closein.sh: Likewise.
14228         * tests/test-copy-acl.sh (func_tmpdir): Likewise.
14229         * tests/test-copy-file.sh (func_tmpdir): Likewise.
14230         * tests/test-dprintf-posix.sh: Likewise.
14231         * tests/test-execl.sh: Likewise.
14232         * tests/test-execle.sh: Likewise.
14233         * tests/test-execlp.sh: Likewise.
14234         * tests/test-execv.sh: Likewise.
14235         * tests/test-execve.sh: Likewise.
14236         * tests/test-execvp.sh: Likewise.
14237         * tests/test-execvpe.sh: Likewise.
14238         * tests/test-file-has-acl.sh (func_tmpdir): Likewise.
14239         * tests/test-fprintf-posix.sh: Likewise.
14240         * tests/test-init.sh: Likewise.
14241         * tests/test-iswdigit.sh: Likewise.
14242         * tests/test-iswxdigit.sh: Likewise.
14243         * tests/test-mbmemcasecmp1.sh: Likewise.
14244         * tests/test-mbmemcasecmp2.sh: Likewise.
14245         * tests/test-mbmemcasecmp3.sh: Likewise.
14246         * tests/test-mbmemcasecoll1.sh: Likewise.
14247         * tests/test-mbmemcasecoll2.sh: Likewise.
14248         * tests/test-mbmemcasecoll3.sh: Likewise.
14249         * tests/test-mbrtoc32-1.sh: Likewise.
14250         * tests/test-mbrtoc32-2.sh: Likewise.
14251         * tests/test-mbrtoc32-3.sh: Likewise.
14252         * tests/test-mbrtoc32-4.sh: Likewise.
14253         * tests/test-mbrtowc1.sh: Likewise.
14254         * tests/test-mbrtowc2.sh: Likewise.
14255         * tests/test-mbrtowc3.sh: Likewise.
14256         * tests/test-mbrtowc4.sh: Likewise.
14257         * tests/test-mbscasecmp.sh: Likewise.
14258         * tests/test-mbscasestr2.sh: Likewise.
14259         * tests/test-mbscasestr3.sh: Likewise.
14260         * tests/test-mbscasestr4.sh: Likewise.
14261         * tests/test-mbschr.sh: Likewise.
14262         * tests/test-mbscspn.sh: Likewise.
14263         * tests/test-mbsinit.sh: Likewise.
14264         * tests/test-mbsncasecmp.sh: Likewise.
14265         * tests/test-mbsnrtoc32s-1.sh: Likewise.
14266         * tests/test-mbsnrtoc32s-2.sh: Likewise.
14267         * tests/test-mbsnrtoc32s-3.sh: Likewise.
14268         * tests/test-mbsnrtoc32s-4.sh: Likewise.
14269         * tests/test-mbsnrtowcs1.sh: Likewise.
14270         * tests/test-mbsnrtowcs2.sh: Likewise.
14271         * tests/test-mbsnrtowcs3.sh: Likewise.
14272         * tests/test-mbsnrtowcs4.sh: Likewise.
14273         * tests/test-mbspbrk.sh: Likewise.
14274         * tests/test-mbspcasecmp.sh: Likewise.
14275         * tests/test-mbsrchr.sh: Likewise.
14276         * tests/test-mbsrtoc32s-1.sh: Likewise.
14277         * tests/test-mbsrtoc32s-2.sh: Likewise.
14278         * tests/test-mbsrtoc32s-3.sh: Likewise.
14279         * tests/test-mbsrtoc32s-4.sh: Likewise.
14280         * tests/test-mbsrtowcs1.sh: Likewise.
14281         * tests/test-mbsrtowcs2.sh: Likewise.
14282         * tests/test-mbsrtowcs3.sh: Likewise.
14283         * tests/test-mbsrtowcs4.sh: Likewise.
14284         * tests/test-mbsspn.sh: Likewise.
14285         * tests/test-mbsstr2.sh: Likewise.
14286         * tests/test-mbsstr3.sh: Likewise.
14287         * tests/test-mbstoc32s-1.sh: Likewise.
14288         * tests/test-mbstoc32s-2.sh: Likewise.
14289         * tests/test-mbstoc32s-3.sh: Likewise.
14290         * tests/test-mbstoc32s-4.sh: Likewise.
14291         * tests/test-nl_langinfo.sh: Likewise.
14292         * tests/test-parse-duration.sh (func_tmpdir): Likewise.
14293         * tests/test-perror.sh: Likewise.
14294         * tests/test-printf-posix.sh: Likewise.
14295         * tests/test-set-mode-acl.sh (func_tmpdir): Likewise.
14296         * tests/test-setlocale1.sh: Likewise.
14297         * tests/test-strtod1.sh: Likewise.
14298         * tests/test-strtold1.sh: Likewise.
14299         * tests/test-unicodeio2.sh: Likewise.
14300         * tests/test-unicodeio3.sh: Likewise.
14301         * tests/test-vasnprintf-posix2.sh: Likewise.
14302         * tests/test-vc-list-files-cvs.sh: Likewise.
14303         * tests/test-vc-list-files-git.sh: Likewise.
14304         * tests/test-vdprintf-posix.sh: Likewise.
14305         * tests/test-vfprintf-posix.sh: Likewise.
14306         * tests/test-vprintf-posix.sh: Likewise.
14307         * tests/test-wcrtomb.sh: Likewise.
14308         * tests/test-wcsnrtombs1.sh: Likewise.
14309         * tests/test-wcsnrtombs2.sh: Likewise.
14310         * tests/test-wcsnrtombs3.sh: Likewise.
14311         * tests/test-wcsnrtombs4.sh: Likewise.
14312         * tests/test-wcsrtombs1.sh: Likewise.
14313         * tests/test-wcsrtombs2.sh: Likewise.
14314         * tests/test-wcsrtombs3.sh: Likewise.
14315         * tests/test-wcsrtombs4.sh: Likewise.
14316         * tests/test-xprintf-posix.sh: Likewise.
14317         * tests/test-xstrtoimax.sh: Likewise.
14318         * tests/test-xstrtol.sh: Likewise.
14319         * tests/test-xstrtoll.sh: Likewise.
14320         * tests/test-xstrtoumax.sh: Likewise.
14321         * tests/test-yesno.sh: Likewise.
14322         * tests/unicase/test-locale-language.sh: Likewise.
14323         * tests/unicase/test-ulc-casecmp1.sh: Likewise.
14324         * tests/unicase/test-ulc-casecmp2.sh: Likewise.
14325         * tests/unicase/test-ulc-casecoll1.sh: Likewise.
14326         * tests/unicase/test-ulc-casecoll2.sh: Likewise.
14327         * tests/unigbrk/test-ulc-grapheme-breaks.sh: Likewise.
14328         * tests/unistdio/test-u16-vasnprintf2.sh: Likewise.
14329         * tests/unistdio/test-u16-vasnprintf3.sh: Likewise.
14330         * tests/unistdio/test-u32-vasnprintf2.sh: Likewise.
14331         * tests/unistdio/test-u32-vasnprintf3.sh: Likewise.
14332         * tests/unistdio/test-u8-vasnprintf2.sh: Likewise.
14333         * tests/unistdio/test-u8-vasnprintf3.sh: Likewise.
14334         * tests/unistdio/test-ulc-vasnprintf2.sh: Likewise.
14335         * tests/unistdio/test-ulc-vasnprintf3.sh: Likewise.
14336         * tests/uniwbrk/test-ulc-wordbreaks.sh: Likewise.
14337         * tests/uniwidth/test-uc_width2.sh: Likewise.
14339 2022-07-18  Bruno Haible  <bruno@clisp.org>
14341         bootstrap: Comments.
14342         * build-aux/bootstrap: Comment about two unused variables.
14344 2022-07-17  Bruno Haible  <bruno@clisp.org>
14346         doc: Update README.
14347         * doc/README: Fix stale links (reported by Tzvetelin Katchov). Clarify
14348         the relation to build-aux/gnu-web-doc-update.
14350 2022-07-14  Bruno Haible  <bruno@clisp.org>
14352         doc: Fix typo.
14353         Reported by Eric Gallager <egall@gwmail.gwu.edu> in
14354         <https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00045.html>.
14355         * doc/posix-functions/mmap.texi: Add parenthesis.
14357 2022-07-12  Paul Eggert  <eggert@cs.ucla.edu>
14359         parse-datetime: improve doc for TZ="<-07>7" etc.
14360         * doc/parse-datetime.texi (Specifying time zone rules):
14361         Give examples of POSIX TZ strings that specify UTC offsets (Bug#56524).
14363 2022-07-10  Bruno Haible  <bruno@clisp.org>
14365         sigsegv: Optimize stackvma implementation for AIX 7.
14366         Reported by Neha Jain <nehajain29@in.ibm.com> in
14367         <https://lists.gnu.org/archive/html/bug-m4/2022-06/msg00005.html>
14368         via Eric Blake.
14369         * lib/stackvma.c: For AIX, add implementation that uses /proc/$pid/map,
14370         based on lib/vma-iter.c.
14371         (sigsegv_get_vma): Use it on AIX 7 or higher.
14373 2022-07-10  Bruno Haible  <bruno@clisp.org>
14375         vma-iter: Add support for AIX 7.
14376         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on AIX.
14377         * lib/vma-iter.c (vma_iterate): Add code for AIX, known to work on
14378         AIX 7.
14379         * lib/get-rusage-as.c: Update comments.
14380         * lib/get-rusage-data.c: Likewise.
14381         * tests/test-get-rusage-as.c (main): Take into account the special
14382         address space organization on AIX in 32-bit mode.
14384 2022-07-10  Bruno Haible  <bruno@clisp.org>
14386         iconv: Define a summary result.
14387         Reported by Simon Josefsson in
14388         <https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00020.html>.
14389         * m4/iconv.m4 (AM_ICONV): Define also am_cv_func_iconv_summary.
14391 2022-07-10  Bruno Haible  <bruno@clisp.org>
14393         iconv: Remove obsolete comment.
14394         * m4/iconv.m4 (AM_ICONV): Remove comment that is obsolete since
14395         2020-08-16.
14397 2022-07-10  Bruno Haible  <bruno@clisp.org>
14399         announce-gen: Fix internationalization in verification instructions.
14400         * build-aux/announce-gen: Set LC_ALL, not LANG, to "C", to force English
14401         output from gpg.
14403 2022-07-10  Bruno Haible  <bruno@clisp.org>
14405         lib-symbol-visibility: Improve documentation.
14406         * doc/lib-symbol-visibility.texi: Tweak BUILDING_SHARED snippet.
14408 2022-07-10  Bruno Haible  <bruno@clisp.org>
14410         doc: Mark Minix as no longer tested.
14411         Rationale: No commits since 2018 at https://git.minix3.org/.
14412         Reported by Paul Eggert and Jim Meyering in
14413         <https://lists.gnu.org/archive/html/grep-devel/2022-07/msg00027.html>.
14414         * doc/gnulib-intro.texi (Supported Platforms): Mark Minix as no longer
14415         tested.
14417 2022-07-09  Jim Meyering  <meyering@fb.com>
14419         announce-gen: better diagnose some usage errors
14420         * build-aux/announce-gen (main): Erroneous usage would elicit a
14421         misleading diagnostic. When --gnulib-version=V was specified:
14422         - without --bootstrap_tools, or
14423         - with --bootstrap_tools, but without listing "gnulib" as a tool
14424         we would give an inappropriate diagnostic. Now, each diagnostic
14425         is tailored to the precise erroneous condition.
14426         Reported by Bruno Haible in
14427         https://lists.gnu.org/r/bug-gnulib/2022-01/msg00025.html
14429 2022-07-09  Simon Josefsson  <simon@josefsson.org>
14431         git-version-gen: Doc fix.
14432         Reported by Reuben Thomas <rrt@sc3d.org> in
14433         <https://lists.gnu.org/archive/html/bug-gnulib/2022-04/msg00012.html>.
14434         * build-aux/git-version-gen (usage): Replace incorrect text with
14435         bug report instructions.
14437 2022-07-09  Simon Josefsson  <simon@josefsson.org>
14439         announce-gen: Improve GnuPG verification instructions.
14440         * build-aux/announce-gen: Add GPG fingerprint to output, and a
14441         pointer to GNU keyring.
14443 2022-07-08  Simon Josefsson  <simon@josefsson.org>
14445         lib-symbol-visibility: Improve documentation.
14446         * doc/lib-symbol-visibility.texi: Include BUILDING_SHARED snippet
14447         suggested by Bruno Haible.
14449 2022-07-04  Bruno Haible  <bruno@clisp.org>
14451         havelib: Fix 'configure --help' output.
14452         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Fix m4 quoting bug.
14454 2022-07-03  Bruno Haible  <bruno@clisp.org>
14456         lib-symbol-visibility: Improve documentation.
14457         Reported by Vivien Kraus <vivien@planete-kraus.eu> in
14458         <https://lists.gnu.org/archive/html/bug-gnulib/2022-06/msg00093.html>.
14459         * doc/lib-symbol-visibility.texi: List the platforms. Extend the
14460         LIBFOO_DLL_EXPORTED to work also with mingw and also with
14461         --disable-shared.
14463 2022-07-03  Bruno Haible  <bruno@clisp.org>
14465         supersede: Support the file name "/dev/null" on native Windows.
14466         * lib/supersede.c (open_supersede): On native Windows, map "/dev/null"
14467         to "NUL".
14469 2022-06-23  Jim Meyering  <meyering@fb.com>
14471         maint.mk: fix syntax-check for unnecessary hash.h header use
14472         * top/maint.mk (_hash_re): Correct the regexp. It had two problems:
14473         - lacked the "hash_" prefix, so would match non-uses
14474         - failed to detect uses of the hash_x?initialize functions
14475         The former led to an excess/unneeded use of hash.h in coreutils' cut.c.
14476         The latter would have led to a FP "not needed" report for copy.c.
14478 2022-06-22  Bruno Haible  <bruno@clisp.org>
14480         fchmodat: Fix test failure on native Windows.
14481         * modules/fchmodat (Depends-on): Add 'chmod'.
14483 2022-06-22  Bruno Haible  <bruno@clisp.org>
14485         chmod: Add tests.
14486         * tests/test-chmod.c: New file, based on tests/test-lchmod.c.
14487         * modules/chmod-tests: New file.
14489         chmod: New module.
14490         * lib/sys_stat.in.h (chmod): Declare when GNULIB_CHMOD is 1.
14491         * lib/chmod.c: New file, based on lib/lchmod.c.
14492         * m4/chmod.m4: New file, based on m4/fchmodat.m4.
14493         * m4/sys_stat_h.m4 (gl_SYS_STAT_H): Test whether chmod is declared.
14494         (gl_SYS_STAT_H_REQUIRE_DEFAULTS): Initialize GNULIB_CHMOD.
14495         (gl_SYS_STAT_H_DEFAULTS): Initialize REPLACE_CHMOD.
14496         * modules/sys_stat (Makefile.am): Substitute GNULIB_CHMOD,
14497         REPLACE_CHMOD.
14498         * modules/chmod: New file, based on modules/lchmod.
14499         * doc/posix-functions/chmod.texi: Mention the new module and the
14500         problems on IRIX and Windows.
14502 2022-06-21  Bruno Haible  <bruno@clisp.org>
14504         lchmod: Simplify.
14505         * lib/lchmod.c: Remove unnecessary include, obsolete since 2020-02-23.
14507 2022-06-20  Bruno Haible  <bruno@clisp.org>
14509         javacomp-script, javaexec-script: Add support for disabling Java.
14510         * m4/javacomp.m4 (gt_JAVACOMP_DISABLED): New macro.
14511         * m4/javaexec.m4 (gt_JAVAEXEC_DISABLED): New macro.
14513 2022-06-19  Paul Eggert  <eggert@cs.ucla.edu>
14515         lchmod: port back to AIX 7.2
14516         Problem reported by Bruno Haible in:
14517         https://lists.gnu.org/r/bug-gnulib/2022-06/msg00075.html
14518         * lib/lchmod.c: Include string.h, for strlen.
14519         (lchmod): Do not depend on HAVE_READLINK since we now depend on
14520         the readlink module.  Check for AIX 7.2 bug.
14521         * m4/lchmod.m4 (gl_PREREQ_LCHMOD): Do not check for readlink
14522         since we now depend on the readlink module.
14523         * modules/lchmod (Depends-on): Depend on readlink.
14525         fchmodat: pacify gcc -Wunused-variable
14526         Problem reported by Bruno Haible in:
14527         https://lists.gnu.org/r/bug-gnulib/2022-06/msg00075.html
14528         * lib/fchmodat.c (fchmodat): Remove unused local.
14530 2022-06-19  Bruno Haible  <bruno@clisp.org>
14532         getlogin, getlogin_r tests: Really avoid test failure.
14533         Reported by Letu Ren <fantasquex@gmail.com> in
14534         <https://lists.gnu.org/archive/html/bug-gnulib/2022-06/msg00037.html>.
14535         * tests/test-getlogin.h (test_getlogin_result): Parse the contents of
14536         /proc/self/loginuid as an unsigned integer.
14538 2022-06-12  Paul Eggert  <eggert@cs.ucla.edu>
14540         fchmodat: port better to MS-Windows etc.
14541         MS-Windows problem reported by Bruno Haible in:
14542         https://lists.gnu.org/r/bug-gnulib/2022-06/msg00041.html
14543         Although I don’t use MS-Windows I see some related fstatat etc.
14544         problems and am trying to fix them with this further patch.
14545         * lib/fchmodat.c (fchmodat):
14546         * lib/lchmod.c (lchmod):
14547         * lib/lchown.c (lchown)
14548         [!HAVE_LCHOWN && HAVE_CHOWN && !CHOWN_MODIFIES_SYMLINK]:
14549         * lib/renameatu.c (renameatu)
14550         [HAVE_RENAME && RENAME_TRAILING_SLASH_SOURCE_BUG]:
14551         Use readlinkat/readlink instead of fstatat/lstat to test merely
14552         whether a string names a symlink, as this avoids problems
14553         with EOVERFLOW.  Also, I hope it works around the MS-Windows
14554         issues that Bruno noted.
14555         * m4/fchmodat.m4 (gl_PREREQ_FCHMODAT):
14556         Check for readlinkat, not lchmod.
14557         * m4/lchmod.m4 (gl_FUNC_LCHMOD): Do not require AC_CANONICAL_HOST
14558         or check for lstat.
14559         (gl_PREREQ_LCHMOD): Check for readlink.
14560         * modules/lchown (Depends-on): Add readlink.  Do not depend on
14561         lstat merely because !HAVE_LCHOWN.
14562         * modules/renameatu (Depends-on): Add fstatat, readlinkat.
14564 2022-06-12  Bruno Haible  <bruno@clisp.org>
14566         doc: Update O_PATH platforms list.
14567         * doc/posix-headers/fcntl.texi: Update O_PATH platforms list.
14569 2022-06-11  Paul Eggert  <eggert@cs.ucla.edu>
14571         fcntl: document O_PATH
14572         * doc/posix-headers/fcntl.texi: Mention O_PATH.
14574         fchmodat: port to old Linux kernel + newer headers
14575         Problem reported by Lance Fredrickson in:
14576         https://lists.gnu.org/r/bug-gnulib/2022-06/msg00038.html
14577         * lib/fchmodat.c (fchmodat):
14578         * lib/lchmod.c (lchmod): Do not rely on AT_EMPTY_PATH as to
14579         whether syscalls work on ""; instead, if a call fails with
14580         ENOENT assume that those syscalls do not work.
14581         Do not use fstatat to determine whether a file is a symlink,
14582         as this has problems with EOVERFLOW.  Use readlinkat instead,
14583         and if it fails with EINVAL then the file is not a symlink.
14584         Remove #if tests on __linux__ || __ANDROID__ || __CYGWIN__
14585         as this has been a maintenance hassle and it’s unlikely
14586         these days that a new platform would #define O_PATH without also
14587         either supporting /proc or keeping it absent.
14588         * modules/fchmodat (Depends-on): Remove fstatat.
14589         There should be no need for either fchmodat or lchmod to depend on
14590         readlinkat, since they use readlinkat only in contexts where it
14591         should work without Gnulib intervention.
14593 2022-06-06  Bruno Haible  <bruno@clisp.org>
14595         fopen-gnu: Make this module work again (regression 2022-01-03).
14596         Reported by Nelson H. F. Beebe <beebe@math.utah.edu> in
14597         <https://lists.gnu.org/archive/html/platform-testers/2022-04/msg00005.html>.
14598         * modules/fopen-gnu (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
14600 2022-06-06  Bruno Haible  <bruno@clisp.org>
14602         getlogin, getlogin_r tests: Avoid test failure in specific environments.
14603         Reported by Letu Ren <fantasquex@gmail.com> in
14604         <https://lists.gnu.org/archive/html/bug-gnulib/2022-06/msg00001.html>.
14605         * modules/getlogin-tests (Depends-on): Add stdbool.
14606         * modules/getlogin_r-tests (Depends-on): Likewise.
14607         * tests/test-getlogin.h: Include stdbool.h.
14608         (test_getlogin_result): On Linux, skip the test if /proc/self/loginuid
14609         contains "-1".
14611 2022-06-05  Bruno Haible  <bruno@clisp.org>
14613         doc: Add section to attract more people towards the GNU project.
14614         Inspired by a suggestion from José E. Marchesi <jemarch@gnu.org> on
14615         the gnu-prog-discuss mailing list.
14616         * doc/join-gnu.texi: New file.
14617         * doc/gnulib-readme.texi: Include it.
14619 2022-06-05  Bruno Haible  <bruno@clisp.org>
14621         doc: Fix warnings about regex chapter structure (regression 2022-05-15).
14622         * doc/regex.texi (GNU Operators): Fix menu.
14624 2022-06-04  Paul Eggert  <eggert@cs.ucla.edu>
14626         regex-quote: \} -> } in EREs
14627         * lib/regex-quote.c (ere_special): Don’t use \} in EREs,
14628         as POSIX says the interpretation is undefined.
14629         * tests/test-regex-quote.c (test_bre, test_ere):
14630         Add tests for }.
14632         dfa: do not warn about \] and \}
14633         * lib/dfa.c (lex): Do not warn about \] and \}, since they’re
14634         surely universally supported even though POSIX says their
14635         interpretation is undefined.
14637 2022-06-03  Paul Eggert  <eggert@cs.ucla.edu>
14639         regex-quote: \] -> ] in EREs and BREs
14640         * build-aux/bootstrap:
14641         * build-aux/bootstrap.conf (gettext_external):
14642         * check-AC_LIBOBJ:
14643         * lib/regex-quote.c (bre_special, ere_special):
14644         * gnulib-tool (func_modules_transitive_closure)
14645         (func_emit_autoconf_snippet, func_import, func_create_testdir):
14646         * tests/test-regex-quote.c (test_bre, test_ere):
14647         * top/maint.mk (longopt_re, gpg_key_ID):
14648         Don’t use \] in BREs and EREs, as POSIX says the interpretation is
14649         undefined.
14651         filevercmp: don’t treat entire filename as suffix
14652         Problem reported by Artém S. Tashkinóv in:
14653         https://lists.gnu.org/r/bug-gnulib/2022-06/msg00012.html
14654         * lib/filevercmp.c (file_prefixlen): When stripping
14655         (\.[A-Za-z~][A-Za-z0-9~]*)*$ suffixes, do not strip
14656         the entire file name.
14657         * tests/test-filevercmp.c (examples): Adjust to match new behavior.
14659 2022-06-03  Bruno Haible  <bruno@clisp.org>
14661         setlocale: Update after Turkey changed its name.
14662         * lib/setlocale.c: Update comments.
14664 2022-05-25  Karl Berry  <karl@freefriends.org>
14666         doc: regex.texi deleted the node GNU Emacs Operators
14667         * doc/gnulib.texi (Regular expression): remove "GNU Emacs Operators"
14668         from the @menu, since the node no longer exists in regex.texi.
14670 2022-05-24  Paul Eggert  <eggert@cs.ucla.edu>
14672         dfa: new options DFA_STAR_WARN, DFA_PLUS_WARN
14673         This lets ‘grep -E '(*a|+b)'’ warn about the * and the +.
14674         * lib/dfa.h (DFA_STAR_WARN, DFA_PLUS_WARN): New flags.
14675         * lib/dfa.c (lex): Support them.
14677 2022-05-23  Paul Eggert  <eggert@cs.ucla.edu>
14679         dfa: '\n' is not governed by RE_LIMITED_OPS
14680         * lib/dfa.c (lex): Pay no attention to RE_LIMITED_OPS when
14681         deciding how to parse '\n', since regcomp.c doesn’t.
14683         dfa: new option DFA_STRAY_BACKSLASH_WARN
14684         This is for grep, which wants to warn about stray backslashes that
14685         lead to unspecified behavior.  For example, "grep -oi '\a'"
14686         surprisingly is not equivalent to "grep -oi 'a'", so the stray
14687         backslash should be warned about.
14688         * lib/dfa.c: Include wctype.h, for iswprint and iswspace.
14689         (lex): Add support for DFA_STRAY_BACKSLASH_WARN.
14690         * lib/dfa.h (DFA_STRAY_BACKSLASH_WARN): New constant.
14692         dfa: new option DFA_CONFUSING_BRACKETS_ERROR
14693         This is for grep, which wants [:alpha:] to be an error
14694         at the top level.
14695         * lib/dfa.c (struct regex_syntax): New member dfaopts,
14696         replacing anchor.  All uses changed.
14697         (parse_bracket_exp): Error, not warn, if DFA_CONFUSING_BRACKETS_ERROR.
14698         * lib/dfa.h (DFA_CONFUSING_BRACKETS_ERROR): New constant.
14700 2022-05-21  Paul Eggert  <eggert@cs.ucla.edu>
14702         strstr-simple: pacify GCC 12.1
14703         * lib/str-two-way.h (two_way_long_needle): Pacify GCC 12.1
14704         -Wsuggest-attribute=pure (x86-64, -O2).
14706 2022-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14708         dfa: steer cleer of POSIX-reserved symbols
14709         * lib/dfa.c (str_eq): Rename from streq.  All uses changed.
14710         (c_isdigit): Rename from isasciidigit.  The function worked in
14711         EBCDIC so it wasn’t ASCII-specific anyway.  All uses changed.
14713 2022-05-17  Paul Eggert  <eggert@cs.ucla.edu>
14715         parse-datetime: support 'J' military time zone
14716         Requested by Brian Inglis in:
14717         https://savannah.gnu.org/support/?110644
14718         * lib/parse-datetime.y (parser_control): New member J_zones_seen.
14719         (item): New item 'J'.
14720         (military_table): Add 'J'.
14721         (parse_datetime_body): Set and use J_zones_seen.
14722         * tests/test-parse-datetime.c (main): Test "J".
14724 2022-05-15  Reuben Thomas  <rrt@sc3d.org>
14726         doc: Update regex documentation to match implementation.
14727         * doc/regex.texi: remove Emacs-specific documentation; match code.
14728         Remove mention of both Emacs and non-Emacs syntax tables, as these
14729         are no longer supported by the code.  Document the word character
14730         class (alnum + _).  Add documentation for \s and \S.  Replace
14731         mentions of #defining emacs with RE_NO_GNU_OPS (which takes effect
14732         in the opposite sense); merge the node “GNU Emacs Operators” into
14733         “GNU Operators”.  For \` and \', refer to the “whole string” rather
14734         than the (Emacs) “buffer”.
14736 2022-05-15  Bruno Haible  <bruno@clisp.org>
14738         string, wchar: Fix compilation error on MSVC (regression 2021-09-07).
14739         * lib/string.in.h (free): For MSVC, add the dllimport specification if
14740         the MSVC headers have it.
14741         * lib/wchar.in.h (free): Likewise.
14743 2022-05-14  Bruno Haible  <bruno@clisp.org>
14745         glob tests: Fix a warning (regression from 2022-03-23).
14746         * tests/test-glob.c: Include <fcntl.h>.
14747         * modules/glob-tests (Depends-on): Add fcntl-h.
14749 2022-05-14  Bruno Haible  <bruno@clisp.org>
14751         termcap: Fix link error when no suitable library is found.
14752         * m4/termcap.m4 (gl_TERMCAP_BODY): If no suitable library is found,
14753         set LIBTERMCAP and LTLIBTERMCAP to empty.
14755 2022-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14757         dfa: fix bug with ‘.’ and UTF-8 Hangul Syllables
14758         This fixes a bug introduced in 2019-12-18T05:41:27Z!eggert@cs.ucla.edu,
14759         an earlier patch that fixed dfa.c to not match invalid UTF-8.
14760         Unfortunately that patch had a couple of typos when dfa.c is
14761         matching against the regular expression ‘.’ (dot).  One typo
14762         caused dfa.c to incorrectly reject the valid UTF-8 sequences
14763         (ED)(90-9F)(80-BF) corresponding to U+D400 through U+D7FF, which
14764         are some Hangul Syllables and Hangul Jamo Extended-B.  The other
14765         typo caused dfa.c to incorrectly reject the valid sequences
14766         (F4)(88-8F)(80-BF)(80-BF) which correspond to U+108000 through
14767         U+10FFFF (Supplemental Private Use Area plane B).
14768         * lib/dfa.c (utf8_classes): Fix typos.
14769         * tests/test-dfa-match.sh: Test the fix.
14771 2022-05-12  Paul Eggert  <eggert@cs.ucla.edu>
14773         manywarnings: update C warnings for GCC 12
14774         Adjust for C programs compiled by GCC 12.
14775         (A C++ expert still needs to look at manywarnings-c++.m4.)
14776         * build-aux/gcc-warning.spec: Add warnings introduced in GCC 12.
14777         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -Wbidi-chars=any,ucn
14778         and -Wuse-after-free=3.  Although not enabled by -Wall or -Wextra
14779         they seem suitable for Gnulib-using C code.
14781 2022-05-11  Paul Eggert  <eggert@cs.ucla.edu>
14783         parse-datetime: remove Emacs cruft
14784         * lib/parse-datetime.y: Remove an ‘ifdef emacs’.  Emacs has never
14785         used this module.  The module is derived from code taken from
14786         Emacs, but that code was removed from Emacs in the 1990s.
14788 2022-05-11  Bruno Haible  <bruno@clisp.org>
14790         alloca: Remove old code for Emacs, unused since 2009.
14791         Reported by Reuben Thomas <rrt@sc3d.org> in
14792         <https://lists.gnu.org/archive/html/bug-gnulib/2022-05/msg00032.html>.
14793         * lib/alloca.c: Remove Emacs specific code.
14795 2022-05-05  Paul Eggert  <eggert@cs.ucla.edu>
14797         libc-config: update to match cdefs
14798         * lib/libc-config.h (__attribute_alloc_align__)
14799         (__attribute_maybe_unused, __fortified_attr_access)
14800         (__glibc_fortify, __glibc_fortify_n, __glibc_likely)
14801         (__glibc_safe_len_cond, __glibc_safe_or_unknown_len)
14802         (__glibc_unsafe_len, __glibc_unsigned_or_positive, __wur):
14803         Undef these too, since lib/cdefs.h now defines them
14804         unconditionally.
14806         cdefs: merge from glibc
14807         * lib/cdefs.h (__glibc_safe_or_unknown_len):
14808         Use glibc’s newer version.
14810 2022-05-02  Paul Eggert  <eggert@cs.ucla.edu>
14812         gettime-res: help the compiler
14813         * lib/gettime-res.c (gettime_res): Pacify GCC versions that
14814         incorrectly complain about earlier.tv_sec not being initialized.
14815         Let GCC know that gcd args are always positive.
14817         af_alg: port to Ubuntu 22.04
14818         Without this patch, maintainer builds of coreutils fail on Ubuntu
14819         22.04 with diagnostics like "./lib/gl_openssl.h:79:1: error:
14820         'MD5_Init' is deprecated: Since OpenSSL 3.0
14821         [-Werror=deprecated-declarations]".  From
14822         <https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes>
14823         it appears that Gnulib needs to either define OPENSSL_API_COMPAT
14824         to a version less than 3.0, or use a compatibility layer, or
14825         assume OpenSSL 1.1.0 or later.  The simplest workaround is to
14826         define OPENSSL_API_COMPAT for 1.1.1, the oldest OpenSSL release
14827         still supported.  A better fix would be to rewrite the code to
14828         assume OpenSSL 1.1.1 or later, and stop using the older API.
14829         * lib/md5.h, lib/sha1.h, lib/sha256.h, lib/sha512.h, lib/sm3.h:
14830         Define OPENSSL_API_COMPAT to 0x10101000L to suppress
14831         the deprecation warnings on Ubuntu 22.04.
14833 2022-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14835         vasnprintf: Simplify. Reduce binary code size.
14836         * lib/vasnprintf.c (VASNPRINTF): Coalesce cleanup code.
14838         vasnprintf: Simplify 'result' variable.
14839         * lib/vasnprintf.c (VASNPRINTF): Simplify initialization and test of
14840         'result' variable.
14842         vasnprintf: Simplify a free() call.
14843         * lib/vasnprintf.c (divide): Just call
14844         free (x) instead of doing ‘if (x != NULL) free (x);’.
14846 2022-04-30  Bruno Haible  <bruno@clisp.org>
14848         string: Avoid syntax error on glibc systems with GCC 11.
14849         Reported by Tom Tromey <tromey@adacore.com> in
14850         <https://lists.gnu.org/archive/html/bug-gnulib/2022-04/msg00075.html>
14851         and by Satadru Pramanik <satadru@umich.edu> in
14852         <https://lists.gnu.org/archive/html/bug-gnulib/2022-04/msg00076.html>.
14853         * lib/string.in.h (strndup): Don't rededeclare strndup if it is defined
14854         as a macro.
14856 2022-04-28  Simon Marchi  <simon.marchi@efficios.com>  (tiny change)
14858         stdlib: Fix error in C++ mode on glibc systems (regr. 2022-04-13).
14859         * lib/stdlib.in.h (free): Add exception specification like glibc does.
14861 2022-04-28  Paul Eggert  <eggert@cs.ucla.edu>
14863         glob: improve config and test cleanup
14864         Config problem reported by Benno Schulenberg in:
14865         https://lists.gnu.org/r/bug-gnulib/2022-04/msg00071.html
14866         * m4/glob.m4 (gl_GLOB): Clean up temporary file.
14867         Also, name it conf$$-file not conf-file, so it’s cleaned
14868         up on interrupt.
14869         * modules/glob-tests (MOSTLYCLEANFILES):
14870         Append test-glob.tglobfile, test-glob.tgloblink[123].
14872 2022-04-26  Paul Eggert  <eggert@cs.ucla.edu>
14874         glob: port to NetBSD 9.2
14875         Problem reported by Benno Schulenberg in:
14876         https://lists.gnu.org/r/bug-gnulib/2022-04/msg00052.html
14877         * doc/posix-functions/dirfd.texi: Document NetBSD 9.2 portability
14878         bugs.  Remove an old comment about errno that is no longer true
14879         of POSIX 2018.
14880         * lib/glob.c (glob_in_dir): Convert dirfd arg from void *
14881         to DIR * before passing it to dirfd.
14883 2022-04-21  Paul Eggert  <eggert@cs.ucla.edu>
14885         regex: match [...---...] like V7 grep
14886         Problem reported by Arnold Robbins in:
14887         https://bugs.gnu.org/20657
14888         https://lists.gnu.org/r/bug-gnulib/2022-04/msg00053.html
14889         * lib/regcomp.c (peek_token_bracket): Let [...---...] match '-'.
14890         This is an extension to POSIX, and matches V7 Unix grep.
14892 2022-04-20  Paul Eggert  <eggert@cs.ucla.edu>
14894         backupfile: fix bug when renaming simple backups
14895         * lib/backupfile.c (backupfile_internal): Fix bug when RENAME
14896         and when doing simple backups.  Problem reported by Steve Ward in:
14897         https://bugs.gnu.org/55029
14899         gettime-res: more-robust sampling
14900         * lib/gettime-res.c (gettime_res): If adjacent timestamps are
14901         identical search for a differing timestamp.  Also, stop collecting
14902         samples thereafter since they surely won’t help.
14904 2022-04-19  Paul Eggert  <eggert@cs.ucla.edu>
14906         Port _GL_HAS_C_ATTRIBUTE to pedantic gcc -std=c99
14907         * m4/gnulib-common.m4 (_GL_HAS_C_ATTRIBUTE):
14908         Disable -Wpedantic if using __has_c_attribute and this is not C2x.
14910         verify: port to pedantic gcc -std=c99
14911         * lib/verify.h (_GL_VERIFY): If we lack both _Static_assert and
14912         static_assert, suppress -Wnexted-externs.
14914         gettime-res: add tests
14915         * modules/gettime-res-tests, tests/test-gettime-res.c: New files.
14917 2022-04-16  Paul Eggert  <eggert@cs.ucla.edu>
14919         verify: port to Mac OS 10.7.5
14920         Mac OS 10.7.5 clang sets __clang_major__ to 4 even though it was
14921         derived from Clang 3.2.  Problem reported by Werner Lemberg in:
14922         https://lists.gnu.org/r/emacs-devel/2022-04/msg00779.html
14923         * lib/verify.h (_GL_HAVE__STATIC_ASSERT): Don’t define to 1
14924         when __clang_major__ == 4 && !__cplusplus
14925         && __STDC_VERSION__ < 201112L && !defined __STRICT_ANSI__.
14927 2022-04-15  Bruno Haible  <bruno@clisp.org>
14929         sigsegv: Fix compilation error on arceb CPUs.
14930         Reported by Fabrice Fontaine <fontaine.fabrice@gmail.com> in
14931         <https://lists.gnu.org/archive/html/bug-gnulib/2022-04/msg00028.html>.
14932         * m4/stack-direction.m4 (SV_STACK_DIRECTION): Treat the 'arc' variants
14933         like 'arc'.
14935 2022-04-13  Bruno Haible  <bruno@clisp.org>
14937         string, wchar: Fix error in C++ mode on glibc systems with clang.
14938         * lib/string.in.h (free): Add exception specification like glibc does.
14939         * lib/wchar.in.h (free): Likewise.
14941 2022-04-13  Bruno Haible  <bruno@clisp.org>
14943         string: Fix errors in C++ mode on glibc systems with clang.
14944         * lib/string.in.h (memchr, memrchr, rawmemchr, strchrnul, strpbrk,
14945         strstr, strcasestr): Use _GL_CXXALIASWARN1 also with clang, and add
14946         exception specification.
14948 2022-04-13  Bruno Haible  <bruno@clisp.org>
14950         math: Fix errors in C++ mode on glibc systems with clang.
14951         * lib/math.in.h (GNULIB_NAMESPACE_LACKS_ISFINITE,
14952         GNULIB_NAMESPACE_LACKS_ISINF, GNULIB_NAMESPACE_LACKS_ISNAN,
14953         GNULIB_NAMESPACE_LACKS_SIGNBIT): New macros.
14954         * tests/test-math-c++.cc (isfinite): Skip test if
14955         GNULIB_NAMESPACE_LACKS_ISFINITE is 1.
14956         (isinf): Skip test if GNULIB_NAMESPACE_LACKS_ISINF is 1.
14957         (isnan): Skip test if GNULIB_NAMESPACE_LACKS_ISNAN is 1.
14958         (signbit): Skip test if GNULIB_NAMESPACE_LACKS_SIGNBIT is 1.
14960 2022-04-08  Paul Eggert  <eggert@cs.ucla.edu>
14962         libgmp: pacify Clang too
14963         * lib/mini-gmp-gnulib.c [NDEBUG]: Also use -Wunused-variable if clang.
14964         Problem reported for Emacs by Mattias Engdegård.
14966 2022-04-04  Paul Eggert  <eggert@cs.ucla.edu>
14968         init.sh: don’t assume gzip
14969         * tests/init.sh (rand_bytes_): Don’t assume gzip is installed.
14970         I found this while testing gzip installation on a platform where I
14971         had removed the installed gzip.  gzip is executed only on
14972         platforms lacking mktemp and /dev/urandom so this code is rarely
14973         used; however, these platforms might also lack gzip since gzip
14974         is neither specified by POSIX or required by the GNU Coding Standards.
14976 2022-03-30  Paul Eggert  <eggert@cs.ucla.edu>
14978         glob: sync better with glibc
14979         * lib/glob.c (dirfd) [_LIBC]: Use #undef instead of #ifdef.
14980         Problem reported by DJ Delorie.
14982 2022-03-23  Paul Eggert  <eggert@cs.ucla.edu>
14984         glob: test for glibc bug 25659
14985         https://sourceware.org/bugzilla/show_bug.cgi?id=25659
14986         * m4/glob.m4 (gl_GLOB): Replace glob if it has bug 25659.
14987         * tests/test-glob.c (main): Test for glibc bug 25659.
14989         glob: fix symlink and // issues; improve speed
14990         * lib/glob.c: Include fcntl.h.
14991         (dirfd) [_LIBC]: New macro.
14992         (GLOB_STAT64, GLOB_LSTAT64): Remove.  Replace all uses with ...
14993         (GLOB_FSTATAT64): ... this new macro.
14994         (glob_in_dir): Treat DT_LNK like DT_UNKNOWN.
14995         Use directory-relative fstatat unless GLOB_ALTDIRFUNC, or dirfd fails.
14996         Avoid duplicate strlen (directory).
14997         Work even if directory is "/", without turning it into "//".
14998         Use a scratch buffer instead of by-hand alloca stuff.
14999         Use mempcpy and memcpy instead of stpcpy and strcpy.
15000         * modules/glob (Depends-on): Add dirfd, fstatat.  Remove stat.
15001         (License): Change from LGPLv2+ to GPL, since it depends on
15002         fstatat.
15004 2022-03-23  DJ Delorie  <dj@redhat.com>
15006         glob: resolve DT_UNKNOWN via is_dir
15008         The DT_* values returned by getdents (readdir) are only hints and
15009         not required.  In fact, some Linux filesystems return DT_UNKNOWN
15010         for most entries, regardless of actual type.  This causes make
15011         to mis-match patterns with a trailing slash (via GLOB_ONLYDIR)
15012         (see make's functions/wildcard test case).  Thus, this patch
15013         detects that case and uses is_dir() to make the type known enough
15014         for proper operation.
15016         Performance in non-DT_UNKNOWN cases is not affected.
15018         The lack of DT_* is a well known issue on older XFS installations
15019         (for example, RHEL 7 and 8, Fedora 28) but can be recreated by
15020         creating an XFS filesystem with flags that mimic older behavior:
15022         $ fallocate -l 10G /xfs.fs
15023         $ mkfs.xfs -n ftype=0 -m crc=0 -f /xfs.fs
15024         $ mkdir /xfs
15025         $ mount -o loop /xfs.fs /xfs
15027 2022-03-20  Jim Meyering  <meyering@fb.com>
15029         maint: bootstrap: split a too-long line
15030         * build-aux/bootstrap (git_modules_config): Split longer-than-80 line.
15032 2022-03-14  Simon Josefsson  <simon@josefsson.org>
15034         announce-gen: Modernize GnuPG key retrieval suggestions.  Based on
15035         patch by Darshit Shah in:
15036         https://lists.gnu.org/archive/html/bug-gnulib/2022-03/msg00022.html
15037         * build-aux/announce-gen (usage): Add --gpg-key-email and
15038         --gpg-keyring-url.
15039         (main): Support the new options.
15040         (main): Don't suggest 'gpg --keyserver' since the situation with
15041         public key servers is complicated and GnuPG version dependent.
15043         maintainer-makefile: Improve GnuPG announce-gen options.
15044         * top/maint.mk (gpg_key_emil): New variable.
15045         (gpg_keyring_url): New variable.
15046         (announcement): Pass them as --gpg-key-email and
15047         --gpg-keyring-url.
15049 2022-03-13  Ben Pfaff  <blp@cs.stanford.edu>
15051         Document Automake 1.14 requirement in NEWS, too, since it had been
15052         documented there before for the Automake 1.11 requirement.
15053         * NEWS: Mention the change.
15055 2022-03-13  Bruno Haible  <bruno@clisp.org>
15057         sigsegv: Add support for Linux/PowerPC (32-bit) with musl libc.
15058         Reported by Khem Raj <raj.khem@gmail.com> in
15059         <https://lists.gnu.org/archive/html/m4-patches/2022-03/msg00000.html>.
15060         * src/sigsegv.c (SIGSEGV_FAULT_STACKPOINTER): In the Linux/PowerPC
15061         32-bit case, handle musl libc differently.
15062         * modules/sigsegv (Files): Add m4/musl.m4.
15063         (configure.ac): Invoke gl_MUSL_LIBC.
15065 2022-03-11  Paul Eggert  <eggert@cs.ucla.edu>
15067         regex: fix double-free
15068         * lib/regex_internal.c (re_dfa_add_node): Don’t free storage
15069         twice if an allocation fails.
15071         regex: fix minor over-allocation
15072         * lib/regexec.c (push_fail_stack): Fix off-by-one error that
15073         over-allocated the stack.
15075         regex: fix free_fail_stack undefined behavior
15076         * lib/regexec.c (push_fail_stack): Don’t increment number of
15077         re_fail_stack_t entries until after successful allocation.  This
15078         prevents a crash if re_realloc or re_malloc fails here, and a
15079         later free_fail_stack examines regs or a later pop_fail_stack
15080         examines node.  Problem discovered by Coverity scan sent
15081         2022-03-11 11:03:52Z.
15083 2022-03-10  Paul Eggert  <eggert@cs.ucla.edu>
15085         fts: revert change to use AT_NO_AUTOMOUNT
15086         * NEWS: Don’t mention AT_NO_AUTOMOUNT.
15087         * lib/fts.c (fts_stat): Don’t use AT_NO_AUTOMOUNT, as
15088         it has no effect with fstatat.
15090 2022-03-09  Paul Eggert  <eggert@cs.ucla.edu>
15092         statat: now obsolete
15093         * lib/openat.h (statat, lstatat): Now deprecated.
15094         All uses removed, and replaced with fstatat.
15095         * modules/statat: Mark as obsolete, because it’s confusing:
15096         it’s not clear whether it should use AT_NO_AUTOMOUNT,
15097         which is implied by stat and by lstat, but not by fstatat.
15098         * tests/test-statat.c: Disable deprecated-declarations warnings.
15100         fts: be consistent about AT_NO_AUTOMOUNT
15101         * lib/fts.c (fts_stat): Use fstatat with AT_NO_AUTOMOUNT
15102         consistently, instead of sometimes using stat (which implies
15103         AT_NO_AUTOMOUNT) and sometimes using fstatat without AT_NO_AUTOMOUNT.
15104         Remove a goto while we’re at it.
15106 2022-03-07  Pádraig Brady  <P@draigBrady.com>
15108         fcntl-h: add AT_NO_AUTOMOUNT
15109         * lib/fcntl.in.h: Define AT_NO_AUTOMOUNT to 0 where not defined.
15110         This is available on Linux since 2.6.38.
15112 2022-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15114         Create lib/Makefile.am after gnulib-comp.m4
15115         * gnulib-tool (func_import): Create library makefile after
15116         creating gnulib-comp.m4.  With --gnu-make, the latter depends on
15117         the former.  See <https://bugs.gnu.org/32452#109>.
15119 2022-02-26  Paul Eggert  <eggert@cs.ucla.edu>
15121         gettime-res: fix unlikely overflow bug
15122         * lib/gettime-res.c (gettime_res): Fix bug when hz * tv_sec overflows.
15123         With 64-bit ‘long’ and nanosecond resolution the bug can occur
15124         starting in the year 2262, with probability about 2e-9.
15125         With 32-bit ‘long’ the bug can occur now, with same probability.
15126         The probability goes up on hosts with worse timestamp resolution.
15128         Document clang -fsanitize=undefined glitch
15129         * doc/gnulib-intro.texi (Unsupported Platforms):
15130         Document incompatibility of ‘clang -fsanitize=undefined’
15131         with Gnulib, and how to work around it by also using
15132         ‘-fno-sanitize=pointer-overflow’.
15134 2022-02-25  Darshit Shah  <darnir@gnu.org>
15136         modules/unicase/special-casing: Fix compilation error
15137         * modules/unicase/special-casing: Don't prepend $(AM_V_at) to the
15138         second part of a compound command.  It causes make to try and
15139         execute the command "@sed" which doesn't exist.
15141 2022-02-25  Paul Eggert  <eggert@cs.ucla.edu>
15143         Port __has_attribute to Apple’s Clang renumbering
15144         Problem reported by Kirill A. Korinsky in:
15145         https://lists.gnu.org/r/bug-gnulib/2022-02/msg00034.html
15146         * config/srclist.txt: Comment out sys/cdefs.h for now.
15147         * lib/cdefs.h (__glibc_has_attribute):
15148         * m4/gnulib-common.m4 (gl_COMMON_BODY):
15149         Port to Apple’s renumbering of Clang versions.
15151         nanosleep: simplify by using pselect
15152         GNU Emacs avoids Gnulib’s ‘select’ module and uses only pselect,
15153         which it implements in a special way on MS-DOS.
15154         Unfortunately, though, nanosleep uses ‘select’;
15155         problem reported by Lars Ingebrigtsen (Bug#32452#74).
15156         As far as I can tell, Gnulib nanosleep's use of
15157         ‘select’ with signals is only for ancient platforms
15158         that Gnulib no longer cares about, so remove that use of ‘select’.
15159         I don’t know of any platforms that still need this fallback code,
15160         but just in case, fall back to pselect instead, while removing
15161         signal handling that it shouldn’t be needed nowadays.
15162         * lib/nanosleep.c: Do not include sig-handler.h, sys/time.h.
15163         (SIGCONT, suspended, sighandler, my_usleep): Remove.
15164         (nanosleep) [!HAVE_BUG_BIG_NANOSLEEP && !(_WIN32 && !__CYGWIN__)]:
15165         Just call pselect.
15166         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Do not check for sys/time.h
15167         or call gl_FUNC_SELECT.  Do not include sys/time.h or worry
15168         about LIBSOCKET.
15169         (gl_PREREQ_NANOSLEEP): Remove as it’s no longer needed.
15170         All uses removed.
15171         * modules/nanosleep (Depends-on): Add pselect.
15172         Remove select, sigaction, sys_time.
15174 2022-02-24  Paul Eggert  <eggert@cs.ucla.edu>
15176         userspec: warn about '.' separator
15177         Problem reported by Dan Jacobson (Bug#44770).
15178         * lib/userspec.c: Don’t include stdbool.h since it’s now in our API.
15179         (parse_user_spec_warn): New function, broken out of parse_user_spec
15180         and with a new PWARN arg.
15181         (parse_user_spec): Use it.
15182         * lib/userspec.h: Include stdbool.h and declare new function.
15183         * tests/test-userspec.c (struct test.in): Now a char array
15184         so that it can be modified.
15185         (T): Make the placeholder a valid test, as that simplifies
15186         the code.  Omit NULL placeholder at the end, likewise.
15187         (main): Set up T in the new way, and test that the "."  separator
15188         acts like the ":" separator except with a warning if it works.
15190         userspec: no need for static vars
15191         * lib/userspec.c (parse_with_separator): Simplify.
15193 2022-02-22  Benno Schulenberg  <bensberg@telfort.nl>  (tiny change)
15195         doc: add two missing closing parentheses
15196         * doc/regex.texi (Syntax Bits): Add missing closing parenthesis.
15197         * doc/regex.texi (BSD Regular Expression Compiling): Likewise.
15199 2022-02-22  Simon Josefsson  <simon@josefsson.org>
15201         gnulib-tool: Bump automake dependency.
15202         * gnulib-tool (func_emit_lib_Makefile_am)
15203         (func_emit_tests_Makefile_am): Demand Automake ≥ 1.14, for
15204         %reldir%.
15206 2022-02-21  Paul Eggert  <eggert@cs.ucla.edu>
15208         close-stream: don't depend on fclose
15209         This reverts 2022-01-26T17:33:03Z!eggert@cs.ucla.edu.
15210         Depending on fclose broke Emacs, and since this dependency didn't
15211         help GNU m4 let's remove it for now.  Problem reported by
15212         Lars Ingebrigtsen <https://bugs.gnu.org/32452#47>.
15213         * modules/close-stream (Depends-on): Remove fclose.
15215 2022-02-20  Bruno Haible  <bruno@clisp.org>
15217         Document that Automake ≥ 1.14 is needed (regression 2021-12-15).
15218         Reported by Simon Josefsson and Mike Frysinger in
15219         <https://lists.gnu.org/archive/html/bug-gnulib/2022-02/msg00010.html>.
15220         * DEPENDENCIES (Automake): Require version 1.14 or newer.
15222 2022-02-19  Paul Eggert  <eggert@cs.ucla.edu>
15224         mktime: improve heuristic for ca-1986 Indiana DST
15225         Problem reported by Mark Krenz <https://bugs.gnu.org/48085>.
15226         * lib/mktime.c (__mktime_internal): Be more generous about
15227         accepting arguments with the wrong value of tm_isdst, by falling
15228         back to a one-hour DST difference if we find no nearby DST that is
15229         unusual.  This fixes a problem where "1986-04-28 00:00 EDT" was
15230         rejected when TZ="America/Indianapolis" because the nearest DST
15231         timestamp occurred in 1970, a temporal distance too great for the
15232         old heuristic.  This also also narrows the search a bit, which
15233         is a minor performance win.
15234         * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS):
15235         Check for putenv failures and for Bug#48085.
15236         * tests/test-parse-datetime.c (main):
15237         Test for setenv failures and for Bug#48085.
15239 2022-02-12  Paul Eggert  <eggert@cs.ucla.edu>
15241         filevercmp: fix several unexpected results
15242         Problems reported by Michael Debertol in <https://bugs.gnu.org/49239>.
15243         While looking into this, I spotted some more areas where the
15244         code and documentation did not agree, or where the documentation
15245         was unclear.  The biggest change needed by coreutils is a new
15246         function filenvercmp that can compare byte strings containing NUL.
15247         * lib/filevercmp.c: Do not include sys/types.h, stdlib.h, string.h.
15248         Include idx.h, verify.h.
15249         (match_suffix): Remove, replacing all uses with calls to ...
15250         (file_prefixlen): ... this new function.  Simplify it by
15251         avoiding the need for a confusing READ_ALPHA state variable.
15252         Change its API to something more useful, with a *LEN arg.
15253         it with a new *LEN arg.
15254         (file_prefixlen, verrevcmp):
15255         Prefer idx_t to size_t where either will do.
15256         (order): Change args to S, POS, LEN instead of just S[POS].
15257         This lets us handle NUL bytes correctly.  Callers changed.
15258         Verify that ints are sufficiently wide for its API.
15259         (verrevcmp): Don't assume that S1[S1_LEN] is a non-digit,
15260         and likewise for S2[S2_LEN].  The byte might not be accessible
15261         if filenvercmp is being called.
15262         (filevercmp): Reimplement by calling filenvercmp.
15263         (filenvercmp): New function, rewritten without the assumption
15264         that the inputs are null-terminated.
15265         Remove "easy comparison to see if strings are identical", as the
15266         use of it later (a) was undocumented, and (b) caused sort -V to be
15267         unstable.  When both strings start with ".", do not skip past
15268         the "."s before looking for suffixes, as this disagreed
15269         with the documentation.
15270         * lib/filevercmp.h: Fix comments, which had many mistakes.
15271         (filenvercmp): New decl.
15272         * modules/filevercmp (Depends-on): Add idx, verify.  Remove string.
15273         * tests/test-filevercmp.c: Include string.h.
15274         (examples): Reorder examples ".0" and ".9" that matched the code
15275         but not the documentation.  The code has been fixed to match the
15276         documentation.  Add some examples involving \1 so that they
15277         can be tried with both \1 and \0.  Add some other examples
15278         taken from the bug report.
15279         (equals): New set of test cases.
15280         (sign, test_filevercmp): New functions.
15281         (main): Remove test case where the fixed filevercmp disagrees with
15282         strverscmp.  Use test_filevercmp instead of filevercmp, so that
15283         we also test filenvercmp.  Test the newly-introduced EQUALS cases.
15285 2022-02-09  Bruno Haible  <bruno@clisp.org>
15287         string: Fix "mismatched allocation function" warnings regarding strndup.
15288         * lib/string.in.h (strndup): Mark with _GL_ATTRIBUTE_MALLOC and
15289         _GL_ATTRIBUTE_DEALLOC_FREE. For GCC >= 11: Declare also when the
15290         platform already declares the function or when the module 'strndup' is
15291         not in use.
15293 2022-02-09  Bruno Haible  <bruno@clisp.org>
15295         unictype/category-byname: Fix test failure.
15296         * modules/unictype/category-byname (configure.ac): Bump required
15297         libunistring version.
15299 2022-02-06  Bruno Haible  <bruno@clisp.org>
15301         termcap, termcap-h: Deprecate.
15302         * modules/termcap (Status, Notice): Add deprecation.
15303         * modules/termcap-h (Status, Notice): Likewise.
15305 2022-02-05  Paul Eggert  <eggert@cs.ucla.edu>
15307         parse-datetime: allow calculations to yield -1
15308         Problem reported by Jeremy Cantrell <https://bugs.gnu.org/50115>.
15309         * lib/parse-datetime.y (parse_datetime_body): When calling mktime,
15310         use an unmodifed and negative tm_wday or tm_yday to detect an error,
15311         as a (time_t) -1 return value is valid on most hosts.
15312         * tests/test-parse-datetime.c (main): Add a test for the bug.
15314 2022-02-04  Paul Eggert  <eggert@cs.ucla.edu>
15316         userspec: help fix GNU ‘id’ incompatibility
15317         * lib/userspec.c (parse_with_separator):
15318         Don’t set *username to a numeric string that is not a user name,
15319         and similarly for *groupname.  Needed to fix Bug#53631.
15321 2022-01-30  Pádraig Brady  <P@draigBrady.com>
15323         argmatch: add variants that only match full argument
15324         * lib/argmatch.h (argmatch_exact, [X]ARGMATCH_EXACT): New interfaces
15325         that don't allow abbreviations.
15326         * lib/argmatch.c (argmatch_exact): Likewise.
15327         (__xargmatch_internal): Add a bool parameter to disable abbreviations.
15328         * tests/test-argmatch.c: Add tests.
15330 2022-01-30  Bruno Haible  <bruno@clisp.org>
15332         tests: Fix interpretation of setupterm's return code.
15333         * tests/test-terminfo.c (main): Test the value of err when setupterm
15334         fails, not when it succeeds.
15335         * tests/test-termcap.c (main): Likewise.
15337 2022-01-30  Bruno Haible  <bruno@clisp.org>
15339         terminfo: Add tests.
15340         * tests/test-terminfo.c: New file.
15341         * modules/terminfo-tests: New file.
15343         terminfo, terminfo-h: New modules.
15344         * lib/terminfo.h: New file, from GNU gettext.
15345         * m4/terminfo.m4: New file, from GNU gettext.
15346         * modules/terminfo: New file, from GNU gettext.
15347         * modules/terminfo-h: New file, from GNU gettext.
15349 2022-01-30  Bruno Haible  <bruno@clisp.org>
15351         termcap: Add tests.
15352         * tests/test-termcap.c: New file.
15353         * modules/termcap-tests: New file.
15355         termcap, termcap-h: New modules.
15356         * lib/termcap.h: New file, from GNU gettext.
15357         * lib/tparm.c: New file, from GNU gettext.
15358         * lib/tputs.c: New file, from GNU gettext.
15359         * m4/termcap.m4: New file, from GNU gettext.
15360         * m4/curses.m4: New file, from GNU gettext.
15361         * modules/termcap: New file, from GNU gettext.
15362         * modules/termcap-h: New file, from GNU gettext.
15364 2022-01-29  Bruno Haible  <bruno@clisp.org>
15366         doc: Clarify MSVC support.
15367         * doc/gnulib-intro.texi (Supported Platforms): Document that "debug"
15368         builds are unsupported.
15370 2022-01-28  Pádraig Brady  <P@draigBrady.com>
15372         maintainer-makefile: fix sc_error_message_uppercase false failure
15373         * top/maint.mk (sc_error_message_uppercase): Don't trigger for
15374         any of the PRI... defines.
15376 2022-01-27  Paul Eggert  <eggert@cs.ucla.edu>
15378         alignalloc: work around AddressSanitizer bug
15379         * doc/posix-functions/aligned_alloc.texi (aligned_alloc):
15380         Mention AddressSanitizer bug.
15381         * lib/alignalloc.h (ALIGNALLOC_VIA_ALIGNED_ALLOC):
15382         Define to 0 if AddressSanitizer is in use.
15383         * tests/test-alignalloc.c (test_alignalloc): New function,
15384         which tests for non-aligned sizes too.
15385         (main): Use it.  Don’t bother checking for alignments
15386         greater than 16 MiB, as this flummoxes AddressSanitizer
15387         and there seems little point to testing them.
15389         doc: use UTF-8 encoding
15390         * doc/gnulib.texi: Use ‘@documentencoding UTF-8’.
15391         Partly this is because there are a few UTF-8 characters
15392         in the .texi files and there seems little point nowadays
15393         to @U-ifiying them.  And partly it is so that the .info
15394         output uses nicer UTF-8 characters, e.g., it single-quotes
15395         ‘like this’ instead of 'like this'.
15397         maint: Update copyright notices
15398         * build-aux/announce-gen, build-aux/declared.sh:
15399         * build-aux/git-version-gen, build-aux/gitlog-to-changelog:
15400         * build-aux/gnu-web-doc-update, build-aux/gnupload:
15401         * build-aux/increment-serial, build-aux/libtool-next-version:
15402         * build-aux/useless-if-before-free:
15403         Update some copyright notices by hand, that were not
15404         updated automatically.
15406 2022-01-26  Paul Eggert  <eggert@cs.ucla.edu>
15408         calloc-gnu: fix misspelling in 2022-01-03 patch
15409         Problem reported by Thien-Thi Nguyen in:
15410         https://lists.gnu.org/r/bug-gnulib/2022-01/msg00170.html
15411         * modules/calloc-gnu (Depends-on):
15412         * modules/calloc-posix (Depends-on):
15413         Fix misspelling of REPLACE_CALLOC_FOR_CALLOC_POSIX.
15415         close-stream: avoid crash on MSVC Debug mode
15416         Problem reported by Julien Marrec in:
15417         https://lists.gnu.org/r/bug-m4/2022-01/msg00000.html
15418         * modules/close-stream (Depends-on): Depend on fclose.
15420 2022-01-23  Paul Eggert  <eggert@cs.ucla.edu>
15422         xstrtoimax, xstrtoumax: depend on inttypes-incomplete
15423         This fixes a call to strtoimax without declaring it,
15424         and similarly for strtoumax.
15425         * lib/xstrtoimax.c, lib/xstrtoumax.c (XSTRTOL_INCLUDE_INTTYPES_H):
15426         Define, so that strtoimax and strtoumax are declared.
15427         * lib/xstrtol.c [XSTRTOL_INCLUDE_INTTYPES_H]: Include inttypes.h.
15428         * modules/xstrtoimax, modules/xstrtoumax (Depends-on):
15429         Add inttypes-incomplete.
15431         alignalloc, xalignalloc: new modules
15432         * lib/alignalloc.c, lib/alignalloc.h, lib/xalignalloc.c:
15433         * m4/alignalloc.m4, modules/alignalloc, modules/alignalloc-tests:
15434         * modules/xalignalloc, tests/test-alignalloc.c:
15435         New files.
15437 2022-01-17  Paul Eggert  <eggert@cs.ucla.edu>
15439         extern-inline: improve macOS port
15440         * m4/extern-inline.m4 (gl_EXTERN_INLINE):
15441         Define HAVE___HEADER_INLINE at configure-time, so that config.h
15442         knows the workaround is not needed even though ctype.h has not yet
15443         been included.  This lets the compiler use extern inline functions
15444         on newer macOS platforms, instead of static inline.
15445         Problem reported by Reuben Thomas in:
15446         https://lists.gnu.org/r/bug-gnulib/2022-01/msg00130.html
15448 2022-01-17  Bruno Haible  <bruno@clisp.org>
15450         xstrtol: Trim dependencies.
15451         * lib/xstrtol.h: Include <stdint.h>, not <inttypes.h>.
15452         * modules/xstrtol (Depends-on): Add stdint. Remove inttypes-incomplete.
15454 2022-01-17  Bruno Haible  <bruno@clisp.org>
15456         xstrtol: Fix compilation error (regression 2022-01-16).
15457         * modules/xstrtol (Depends-on): Add intprops.
15459 2022-01-17  Jim Meyering  <meyering@fb.com>
15461         xstrtol: remove unnecessary else after return
15462         * lib/xstrtol.c (bkm_scale): Drop "else" after return.
15464 2022-01-16  Paul Eggert  <eggert@cs.ucla.edu>
15466         xstrtol: simplify integer overflow checking
15467         * lib/xstrtol.c: Include intprops.h.
15468         (TYPE_SIGNED): Remove, as intprops.h defines that for us now.
15469         (bkm_scale): Use INT_MULTIPLY_WRAPV instead of checking for
15470         overflow by hand.
15472         xstrtoll-tests: use %lld for long long
15473         * tests/test-xstrtoll.c, tests/test-xstrtoull.c (__spec):
15474         Do not assume long long is 64 bits, or that exact-width
15475         64-bit types exist.  Although these assumptions are true
15476         on current Gnulib platforms they are not true in general.
15477         Also, GCC warns if PRId64 is "ld" but intmax_t is long long
15478         even when long and long long are both 64 bits.
15480 2022-01-15  Bruno Haible  <bruno@clisp.org>
15482         Don't pass unknown warning option to clang.
15483         Reported by Assaf Gordon via Paul Eggert in
15484         <https://lists.gnu.org/archive/html/coreutils/2022-01/msg00018.html>.
15485         * m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): Don't use
15486         -Wno-unsuffixed-float-constants with clang.
15488 2022-01-15  Bruno Haible  <bruno@clisp.org>
15490         log tests: Avoid test failure with nvc 22.1.
15491         * tests/test-log.h (test_function): With nvc, expect up to 4 ulps error.
15493 2022-01-15  Bruno Haible  <bruno@clisp.org>
15495         havelib: Recognize ELF platform despite nvc 22.1.
15496         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Recognize Linux as an ELF
15497         platform, even with a compiler that does not define __ELF__.
15499 2022-01-15  Bruno Haible  <bruno@clisp.org>
15501         oset-c++: Avoid compilation error with nvc++ 22.1.
15502         * lib/gl_oset.hh: With EDG C++ compilers, avoid 'friend'.
15504 2022-01-14  Paul Eggert  <eggert@cs.ucla.edu>
15506         nstrftime: pacify nvc 22.1 unreachable statement
15507         * lib/nstrftime.c (__strftime_internal):
15508         Omit unreachable ‘break;’.
15510         tests: pacify nvc 22.1 unreachable statement
15511         * tests/test-sys_wait.h (test_sys_wait_macros):
15512         Widen scope of ‘#if 0’ so that there is not an unreachable ‘break;’.
15514         tests: pacify nvc 22.1 set-but-not-used
15515         * tests/test-fnmatch.c (main): Don’t set a var without using it.
15516         * tests/test-sched.c (f1): Now extern.
15518         intprops: work around nvc 22.1 bug
15519         Problem reported by Olivier Cessenat (Bug#53256).
15520         * lib/intprops.h (_GL_HAS_BUILTIN_ADD_OVERFLOW) [__EDG__]:
15521         Define to 0, since __builtin_add_overflow doesn’t work
15522         on NVIDIA HPC SDK 22.1.
15524         copy-file-range: work around Linux kernel bug
15525         This workaround is adapted from Coreutils.
15526         * lib/copy-file-range.c [__linux__ && HAVE_COPY_FILE_RANGE]:
15527         Include <sys/utsname.h>.
15528         (copy_file_range): Use a stub to replace the copy_file_range of
15529         Linux kernel versions 4.5 through 5.2.
15530         * lib/unistd.in.h (copy_file_range):
15531         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS):
15532         * modules/copy-file-range (configure.ac):
15533         * modules/unistd (unistd.h):
15534         Support replacement of copy_file_range.
15535         * m4/copy-file-range.m4 (gl_FUNC_COPY_FILE_RANGE):
15536         Define HAVE_COPY_FILE_RANGE if the system has copy_file_range,
15537         and on Linux check whether the system’s is known to work.
15539 2022-01-14  Bruno Haible  <bruno@clisp.org>
15541         Avoid error "conditional LIBUNISTRING_COMPILE_... was never defined"
15542         when option --conditional-dependencies is used (regression 2022-01-09).
15543         Reported by Gavin Smith <gavinsmith0123@gmail.com> in
15544         <https://lists.gnu.org/archive/html/bug-gnulib/2022-01/msg00099.html>.
15545         * m4/libunistring-base.m4 (gl_LIBUNISTRING_MODULE): Use gl_CONDITIONAL
15546         instead of AM_CONDITIONAL.
15548 2022-01-13  Bruno Haible  <bruno@clisp.org>
15550         Avoid warning "_GL_ATTRIBUTE_DEALLOC_FREE redefined" (regr. 2022-01-04).
15551         Reported by Werner Lemberg <wl@gnu.org> in
15552         <https://lists.gnu.org/archive/html/bug-gnulib/2022-01/msg00094.html>.
15553         * m4/gnulib-common.m4 (gl_COMMON_BODY): Avoid redefining
15554         _GL_ATTRIBUTE_DEALLOC_FREE.
15556 2022-01-10  Paul Eggert  <eggert@cs.ucla.edu>
15558         backupfile: fix bug when renaming not from wd
15559         * lib/backupfile.c (backupfile_internal): Fix bug when DIR_FD
15560         does not specify the working directory, and when RENAME.
15561         Without the bug fix, FILE is treated as relative to the working
15562         directory, not relative to DIR_FD, when renaming FILE.
15563         This bug was introduced when DIR_FD and RENAME were introduced,
15564         in 2018-10-24T02:10:21Z!eggert@cs.ucla.edu.
15565         While we’re at it, when SDIR is nonnegative improve performance a
15566         bit by passing an SDIR-relative old name to renameatu.
15568 2022-01-09  Bruno Haible  <bruno@clisp.org>
15570         host-cpu-c-abi: Add support for LoongArch64 CPU.
15571         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Define __loongarch64__. (GCC
15572         and clang predefine only __loongarch__, __loongarch64.)
15574 2022-01-09  Bruno Haible  <bruno@clisp.org>
15576         stdio: Fix "missing file" errors (regression from today).
15577         * modules/stdio (Files): Add stdio-read.c, stdio-write.c.
15578         * m4/stdio_h.m4 (gl_STDIO_H): Update comments.
15580 2022-01-09  Bruno Haible  <bruno@clisp.org>
15582         Use the GL_CFLAG_GNULIB_WARNINGS for most AC_LIBOBJ compilation units.
15583         * modules/_Exit (configure.ac): Define an Automake conditional. Remove
15584         the AC_LIBOBJ invocation.
15585         (Makefile.am): Augment lib_SOURCES, guarded by that Automake
15586         conditional.
15587         * modules/accept: Likewise.
15588         * modules/access: Likewise.
15589         * modules/acosf: Likewise.
15590         * modules/acosl: Likewise.
15591         * modules/aligned_alloc: Likewise.
15592         * modules/alphasort: Likewise.
15593         * modules/argz: Likewise.
15594         * modules/asinf: Likewise.
15595         * modules/asinl: Likewise.
15596         * modules/atan2f: Likewise.
15597         * modules/atanf: Likewise.
15598         * modules/atanl: Likewise.
15599         * modules/atexit: Likewise.
15600         * modules/atoll: Likewise.
15601         * modules/bind: Likewise.
15602         * modules/btowc: Likewise.
15603         * modules/c32rtomb: Likewise.
15604         * modules/canonicalize-lgpl: Likewise.
15605         * modules/cbrt: Likewise.
15606         * modules/cbrtf: Likewise.
15607         * modules/cbrtl: Likewise.
15608         * modules/ceil: Likewise.
15609         * modules/ceilf: Likewise.
15610         * modules/ceill: Likewise.
15611         * modules/chdir-long: Likewise.
15612         * modules/chown: Likewise.
15613         * modules/close: Likewise.
15614         * modules/closedir: Likewise.
15615         * modules/cnd: Likewise.
15616         * modules/connect: Likewise.
15617         * modules/copy-file-range: Likewise.
15618         * modules/copysign: Likewise.
15619         * modules/copysignf: Likewise.
15620         * modules/copysignl: Likewise.
15621         * modules/cosf: Likewise.
15622         * modules/coshf: Likewise.
15623         * modules/cosl: Likewise.
15624         * modules/creat: Likewise.
15625         * modules/crypto/gc: Likewise.
15626         * modules/ctime: Likewise.
15627         * modules/dirfd: Likewise.
15628         * modules/dup: Likewise.
15629         * modules/dup2: Likewise.
15630         * modules/duplocale: Likewise.
15631         * modules/error: Likewise.
15632         * modules/euidaccess: Likewise.
15633         * modules/execinfo: Likewise.
15634         * modules/execl: Likewise.
15635         * modules/execle: Likewise.
15636         * modules/execlp: Likewise.
15637         * modules/execv: Likewise.
15638         * modules/execve: Likewise.
15639         * modules/execvp: Likewise.
15640         * modules/execvpe: Likewise.
15641         * modules/exp2: Likewise.
15642         * modules/exp2f: Likewise.
15643         * modules/exp2l: Likewise.
15644         * modules/expf: Likewise.
15645         * modules/expl: Likewise.
15646         * modules/explicit_bzero: Likewise.
15647         * modules/expm1: Likewise.
15648         * modules/expm1f: Likewise.
15649         * modules/expm1l: Likewise.
15650         * modules/fabsf: Likewise.
15651         * modules/fabsl: Likewise.
15652         * modules/faccessat: Likewise.
15653         * modules/fchdir: Likewise.
15654         * modules/fchmodat: Likewise.
15655         * modules/fchownat: Likewise.
15656         * modules/fclose: Likewise.
15657         * modules/fcntl: Likewise.
15658         * modules/fdatasync: Likewise.
15659         * modules/fdopen: Likewise.
15660         * modules/fdopendir: Likewise.
15661         * modules/fflush: Likewise.
15662         * modules/ffs: Likewise.
15663         * modules/ffsl: Likewise.
15664         * modules/ffsll: Likewise.
15665         * modules/fileblocks: Likewise.
15666         * modules/float: Likewise.
15667         * modules/flock: Likewise.
15668         * modules/floor: Likewise.
15669         * modules/floorf: Likewise.
15670         * modules/floorl: Likewise.
15671         * modules/fma: Likewise.
15672         * modules/fmaf: Likewise.
15673         * modules/fmal: Likewise.
15674         * modules/fmod: Likewise.
15675         * modules/fmodf: Likewise.
15676         * modules/fmodl: Likewise.
15677         * modules/forkpty: Likewise.
15678         * modules/fpending: Likewise.
15679         * modules/fpurge: Likewise.
15680         * modules/freadable: Likewise.
15681         * modules/freadahead: Likewise.
15682         * modules/freadptr: Likewise.
15683         * modules/free-posix: Likewise.
15684         * modules/freopen: Likewise.
15685         * modules/frexpf: Likewise.
15686         * modules/fseek: Likewise.
15687         * modules/fseeko: Likewise.
15688         * modules/fseterr: Likewise.
15689         * modules/fstat: Likewise.
15690         * modules/fstatat: Likewise.
15691         * modules/fsusage: Likewise.
15692         * modules/fsync: Likewise.
15693         * modules/ftell: Likewise.
15694         * modules/ftello: Likewise.
15695         * modules/ftruncate: Likewise.
15696         * modules/fts: Likewise.
15697         * modules/futimens: Likewise.
15698         * modules/fwritable: Likewise.
15699         * modules/fwriting: Likewise.
15700         * modules/getaddrinfo: Likewise.
15701         * modules/getcwd: Likewise.
15702         * modules/getcwd-lgpl: Likewise.
15703         * modules/getdelim: Likewise.
15704         * modules/getdomainname: Likewise.
15705         * modules/getdtablesize: Likewise.
15706         * modules/getentropy: Likewise.
15707         * modules/getgroups: Likewise.
15708         * modules/gethostname: Likewise.
15709         * modules/getline: Likewise.
15710         * modules/getloadavg: Likewise.
15711         * modules/getlogin: Likewise.
15712         * modules/getlogin_r: Likewise.
15713         * modules/getopt-posix: Likewise.
15714         * modules/getpagesize: Likewise.
15715         * modules/getpeername: Likewise.
15716         * modules/getrandom: Likewise.
15717         * modules/getrusage: Likewise.
15718         * modules/getsockname: Likewise.
15719         * modules/getsockopt: Likewise.
15720         * modules/getsubopt: Likewise.
15721         * modules/gettimeofday: Likewise.
15722         * modules/getumask: Likewise.
15723         * modules/getusershell: Likewise.
15724         * modules/glob: Likewise.
15725         * modules/grantpt: Likewise.
15726         * modules/group-member: Likewise.
15727         * modules/hypot: Likewise.
15728         * modules/hypotf: Likewise.
15729         * modules/hypotl: Likewise.
15730         * modules/iconv_open: Likewise.
15731         * modules/ilogb: Likewise.
15732         * modules/ilogbf: Likewise.
15733         * modules/ilogbl: Likewise.
15734         * modules/imaxabs: Likewise.
15735         * modules/imaxdiv: Likewise.
15736         * modules/inet_ntop: Likewise.
15737         * modules/inet_pton: Likewise.
15738         * modules/ioctl: Likewise.
15739         * modules/isapipe: Likewise.
15740         * modules/isatty: Likewise.
15741         * modules/isblank: Likewise.
15742         * modules/isfinite: Likewise.
15743         * modules/isinf: Likewise.
15744         * modules/iswblank: Likewise.
15745         * modules/iswctype: Likewise.
15746         * modules/iswdigit: Likewise.
15747         * modules/iswxdigit: Likewise.
15748         * modules/lchmod: Likewise.
15749         * modules/lchown: Likewise.
15750         * modules/ldexpf: Likewise.
15751         * modules/ldexpl: Likewise.
15752         * modules/libgmp: Likewise.
15753         * modules/link: Likewise.
15754         * modules/linkat: Likewise.
15755         * modules/listen: Likewise.
15756         * modules/localeconv: Likewise.
15757         * modules/localtime: Likewise.
15758         * modules/log: Likewise.
15759         * modules/log10: Likewise.
15760         * modules/log10f: Likewise.
15761         * modules/log10l: Likewise.
15762         * modules/log1p: Likewise.
15763         * modules/log1pf: Likewise.
15764         * modules/log1pl: Likewise.
15765         * modules/log2: Likewise.
15766         * modules/log2f: Likewise.
15767         * modules/log2l: Likewise.
15768         * modules/logb: Likewise.
15769         * modules/logbf: Likewise.
15770         * modules/logbl: Likewise.
15771         * modules/logf: Likewise.
15772         * modules/login_tty: Likewise.
15773         * modules/logl: Likewise.
15774         * modules/lseek: Likewise.
15775         * modules/lstat: Likewise.
15776         * modules/mbrlen: Likewise.
15777         * modules/mbrtoc32: Likewise.
15778         * modules/mbrtowc: Likewise.
15779         * modules/mbsinit: Likewise.
15780         * modules/mbsnrtowcs: Likewise.
15781         * modules/mbsrtowcs: Likewise.
15782         * modules/mbtowc: Likewise.
15783         * modules/memalign: Likewise.
15784         * modules/memchr: Likewise.
15785         * modules/memcmp: Likewise.
15786         * modules/memcpy: Likewise.
15787         * modules/memmove: Likewise.
15788         * modules/mempcpy: Likewise.
15789         * modules/memrchr: Likewise.
15790         * modules/memset: Likewise.
15791         * modules/mkdir: Likewise.
15792         * modules/mkdirat: Likewise.
15793         * modules/mkdtemp: Likewise.
15794         * modules/mkfifo: Likewise.
15795         * modules/mkfifoat: Likewise.
15796         * modules/mknod: Likewise.
15797         * modules/mkostemp: Likewise.
15798         * modules/mkostemps: Likewise.
15799         * modules/mkstemp: Likewise.
15800         * modules/mkstemps: Likewise.
15801         * modules/modf: Likewise.
15802         * modules/modff: Likewise.
15803         * modules/modfl: Likewise.
15804         * modules/mountlist: Likewise.
15805         * modules/msvc-inval: Likewise.
15806         * modules/msvc-nothrow: Likewise.
15807         * modules/mtx: Likewise.
15808         * modules/nanosleep: Likewise.
15809         * modules/nl_langinfo: Likewise.
15810         * modules/obstack: Likewise.
15811         * modules/open: Likewise.
15812         * modules/openat: Likewise.
15813         * modules/opendir: Likewise.
15814         * modules/openpty: Likewise.
15815         * modules/pclose: Likewise.
15816         * modules/perror: Likewise.
15817         * modules/pipe-posix: Likewise.
15818         * modules/poll: Likewise.
15819         * modules/popen: Likewise.
15820         * modules/posix_memalign: Likewise.
15821         * modules/posix_openpt: Likewise.
15822         * modules/posix_spawn: Likewise.
15823         * modules/posix_spawn-internal: Likewise.
15824         * modules/posix_spawn_file_actions_addchdir: Likewise.
15825         * modules/posix_spawn_file_actions_addclose: Likewise.
15826         * modules/posix_spawn_file_actions_adddup2: Likewise.
15827         * modules/posix_spawn_file_actions_addfchdir: Likewise.
15828         * modules/posix_spawn_file_actions_addopen: Likewise.
15829         * modules/posix_spawn_file_actions_destroy: Likewise.
15830         * modules/posix_spawn_file_actions_init: Likewise.
15831         * modules/posix_spawnattr_destroy: Likewise.
15832         * modules/posix_spawnattr_getflags: Likewise.
15833         * modules/posix_spawnattr_getpgroup: Likewise.
15834         * modules/posix_spawnattr_getschedparam: Likewise.
15835         * modules/posix_spawnattr_getschedpolicy: Likewise.
15836         * modules/posix_spawnattr_getsigdefault: Likewise.
15837         * modules/posix_spawnattr_getsigmask: Likewise.
15838         * modules/posix_spawnattr_init: Likewise.
15839         * modules/posix_spawnattr_setflags: Likewise.
15840         * modules/posix_spawnattr_setpgroup: Likewise.
15841         * modules/posix_spawnattr_setschedparam: Likewise.
15842         * modules/posix_spawnattr_setschedpolicy: Likewise.
15843         * modules/posix_spawnattr_setsigdefault: Likewise.
15844         * modules/posix_spawnattr_setsigmask: Likewise.
15845         * modules/posix_spawnp: Likewise.
15846         * modules/powf: Likewise.
15847         * modules/pread: Likewise.
15848         * modules/pselect: Likewise.
15849         * modules/pthread-cond: Likewise.
15850         * modules/pthread-mutex: Likewise.
15851         * modules/pthread-once: Likewise.
15852         * modules/pthread-rwlock: Likewise.
15853         * modules/pthread-spin: Likewise.
15854         * modules/pthread-thread: Likewise.
15855         * modules/pthread-tss: Likewise.
15856         * modules/pthread_mutex_timedlock: Likewise.
15857         * modules/pthread_sigmask: Likewise.
15858         * modules/ptsname: Likewise.
15859         * modules/ptsname_r: Likewise.
15860         * modules/putenv: Likewise.
15861         * modules/pwrite: Likewise.
15862         * modules/qsort_r: Likewise.
15863         * modules/raise: Likewise.
15864         * modules/random: Likewise.
15865         * modules/random_r: Likewise.
15866         * modules/rawmemchr: Likewise.
15867         * modules/read: Likewise.
15868         * modules/readdir: Likewise.
15869         * modules/readline: Likewise.
15870         * modules/readlink: Likewise.
15871         * modules/readlinkat: Likewise.
15872         * modules/readutmp: Likewise.
15873         * modules/reallocarray: Likewise.
15874         * modules/recv: Likewise.
15875         * modules/recvfrom: Likewise.
15876         * modules/regex: Likewise.
15877         * modules/relocatable-prog: Likewise.
15878         * modules/remainder: Likewise.
15879         * modules/remainderf: Likewise.
15880         * modules/remainderl: Likewise.
15881         * modules/remove: Likewise.
15882         * modules/rename: Likewise.
15883         * modules/renameat: Likewise.
15884         * modules/rewinddir: Likewise.
15885         * modules/rint: Likewise.
15886         * modules/rintf: Likewise.
15887         * modules/rintl: Likewise.
15888         * modules/rmdir: Likewise.
15889         * modules/round: Likewise.
15890         * modules/roundf: Likewise.
15891         * modules/roundl: Likewise.
15892         * modules/rpmatch: Likewise.
15893         * modules/scandir: Likewise.
15894         * modules/sched_yield: Likewise.
15895         * modules/secure_getenv: Likewise.
15896         * modules/select: Likewise.
15897         * modules/selinux-h: Likewise.
15898         * modules/send: Likewise.
15899         * modules/sendto: Likewise.
15900         * modules/setenv: Likewise.
15901         * modules/sethostname: Likewise.
15902         * modules/setlocale: Likewise.
15903         * modules/setlocale-null: Likewise.
15904         * modules/setsockopt: Likewise.
15905         * modules/shutdown: Likewise.
15906         * modules/sig2str: Likewise.
15907         * modules/sigabbrev_np: Likewise.
15908         * modules/sigaction: Likewise.
15909         * modules/sigdescr_np: Likewise.
15910         * modules/signbit: Likewise.
15911         * modules/sigprocmask: Likewise.
15912         * modules/sinf: Likewise.
15913         * modules/sinhf: Likewise.
15914         * modules/sinl: Likewise.
15915         * modules/sleep: Likewise.
15916         * modules/socket: Likewise.
15917         * modules/spawn-pipe: Likewise.
15918         * modules/sqrtf: Likewise.
15919         * modules/sqrtl: Likewise.
15920         * modules/stat: Likewise.
15921         * modules/stdio: Likewise.
15922         * modules/stpcpy: Likewise.
15923         * modules/stpncpy: Likewise.
15924         * modules/strcase: Likewise.
15925         * modules/strchrnul: Likewise.
15926         * modules/strcspn: Likewise.
15927         * modules/strdup-posix: Likewise.
15928         * modules/strerror: Likewise.
15929         * modules/strerror-override: Likewise.
15930         * modules/strerrorname_np: Likewise.
15931         * modules/strfmon_l: Likewise.
15932         * modules/strftime-fixes: Likewise.
15933         * modules/strncat: Likewise.
15934         * modules/strndup: Likewise.
15935         * modules/strnlen: Likewise.
15936         * modules/strpbrk: Likewise.
15937         * modules/strptime: Likewise.
15938         * modules/strsep: Likewise.
15939         * modules/strsignal: Likewise.
15940         * modules/strtod: Likewise.
15941         * modules/strtoimax: Likewise.
15942         * modules/strtok_r: Likewise.
15943         * modules/strtol: Likewise.
15944         * modules/strtold: Likewise.
15945         * modules/strtoll: Likewise.
15946         * modules/strtoul: Likewise.
15947         * modules/strtoull: Likewise.
15948         * modules/strtoumax: Likewise.
15949         * modules/strverscmp: Likewise.
15950         * modules/symlink: Likewise.
15951         * modules/symlinkat: Likewise.
15952         * modules/tanf: Likewise.
15953         * modules/tanhf: Likewise.
15954         * modules/tanl: Likewise.
15955         * modules/tcgetsid: Likewise.
15956         * modules/thrd: Likewise.
15957         * modules/time_r: Likewise.
15958         * modules/time_rz: Likewise.
15959         * modules/timegm: Likewise.
15960         * modules/times: Likewise.
15961         * modules/timespec_get: Likewise.
15962         * modules/timespec_getres: Likewise.
15963         * modules/tmpfile: Likewise.
15964         * modules/towctrans: Likewise.
15965         * modules/trunc: Likewise.
15966         * modules/truncate: Likewise.
15967         * modules/truncf: Likewise.
15968         * modules/truncl: Likewise.
15969         * modules/tsearch: Likewise.
15970         * modules/tss: Likewise.
15971         * modules/ttyname_r: Likewise.
15972         * modules/tzset: Likewise.
15973         * modules/uname: Likewise.
15974         * modules/unlink: Likewise.
15975         * modules/unlinkat: Likewise.
15976         * modules/unlockpt: Likewise.
15977         * modules/unsetenv: Likewise.
15978         * modules/usleep: Likewise.
15979         * modules/utime: Likewise.
15980         * modules/utimensat: Likewise.
15981         * modules/waitpid: Likewise.
15982         * modules/wcpcpy: Likewise.
15983         * modules/wcpncpy: Likewise.
15984         * modules/wcrtomb: Likewise.
15985         * modules/wcscasecmp: Likewise.
15986         * modules/wcscat: Likewise.
15987         * modules/wcschr: Likewise.
15988         * modules/wcscmp: Likewise.
15989         * modules/wcscoll: Likewise.
15990         * modules/wcscpy: Likewise.
15991         * modules/wcscspn: Likewise.
15992         * modules/wcsdup: Likewise.
15993         * modules/wcsftime: Likewise.
15994         * modules/wcslen: Likewise.
15995         * modules/wcsncasecmp: Likewise.
15996         * modules/wcsncat: Likewise.
15997         * modules/wcsncmp: Likewise.
15998         * modules/wcsncpy: Likewise.
15999         * modules/wcsnlen: Likewise.
16000         * modules/wcsnrtombs: Likewise.
16001         * modules/wcspbrk: Likewise.
16002         * modules/wcsrchr: Likewise.
16003         * modules/wcsrtombs: Likewise.
16004         * modules/wcsspn: Likewise.
16005         * modules/wcsstr: Likewise.
16006         * modules/wcstok: Likewise.
16007         * modules/wcswidth: Likewise.
16008         * modules/wcsxfrm: Likewise.
16009         * modules/wctob: Likewise.
16010         * modules/wctomb: Likewise.
16011         * modules/wctrans: Likewise.
16012         * modules/wctype: Likewise.
16013         * modules/wcwidth: Likewise.
16014         * modules/windows-cond: Likewise.
16015         * modules/windows-mutex: Likewise.
16016         * modules/windows-once: Likewise.
16017         * modules/windows-recmutex: Likewise.
16018         * modules/windows-rwlock: Likewise.
16019         * modules/windows-spawn: Likewise.
16020         * modules/windows-spin: Likewise.
16021         * modules/windows-thread: Likewise.
16022         * modules/windows-timedmutex: Likewise.
16023         * modules/windows-timedrecmutex: Likewise.
16024         * modules/windows-timedrwlock: Likewise.
16025         * modules/windows-tls: Likewise.
16026         * modules/wmemchr: Likewise.
16027         * modules/wmemcmp: Likewise.
16028         * modules/wmemcpy: Likewise.
16029         * modules/wmemmove: Likewise.
16030         * modules/wmempcpy: Likewise.
16031         * modules/wmemset: Likewise.
16032         * modules/write: Likewise.
16034 2022-01-09  Bruno Haible  <bruno@clisp.org>
16036         obstack: Move AC_LIBOBJ invocation to the module description.
16037         * m4/obstack.m4 (gl_FUNC_OBSTACK): Renamed from AC_FUNC_OBSTACK. Don't
16038         invoke AC_LIBSOURCES nor AC_LIBOBJ.
16039         * modules/obstack (configure.ac): Update. Invoke AC_LIBOBJ here.
16041 2022-01-09  Bruno Haible  <bruno@clisp.org>
16043         stdio: Move AC_LIBOBJ invocations to the module description.
16044         * m4/stdio_h.m4 (gl_STDIO_H): Don't invoke AC_LIBOBJ.
16045         * modules/stdio (configure.ac): Invoke AC_LIBOBJ here.
16047 2022-01-09  Bruno Haible  <bruno@clisp.org>
16049         fchdir: Move AC_LIBOBJ invocation to the module description.
16050         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't invoke AC_LIBOBJ and
16051         gl_PREREQ_FCHDIR.
16052         * modules/fchdir (configure.ac): Invoke AC_LIBOBJ and gl_PREREQ_FCHDIR.
16054 2022-01-09  Bruno Haible  <bruno@clisp.org>
16056         Remove influence of Automake conditionals on conditional dependencies.
16057         * m4/gnulib-common.m4 (gl_CONDITIONAL): New macro.
16058         (gl_CONDITIONAL_HEADER): Use it instead of AM_CONDITIONAL.
16059         * m4/libgmp.m4 (gl_LIBGMP): Likewise.
16060         * modules/posix_spawn_file_actions_addfchdir-tests (configure.ac):
16061         Likewise.
16062         * modules/uchar-c++-tests (configure.ac): Likewise.
16063         * gnulib-tool (func_modules_transitive_closure): Don't inhibit
16064         conditional dependencies processing on a module that uses an Automake
16065         conditional.
16067 2022-01-08  Bruno Haible  <bruno@clisp.org>
16069         gnulib-tool: Fix "Don't forget" messages (regression 2021-12-12).
16070         * gnulib-tool (func_import): Fix variable references in "Don't forget"
16071         messages.
16073 2022-01-08  Bruno Haible  <bruno@clisp.org>
16075         gnulib-tool: Remove all *.Po files upon distclean (regr. 2022-01-05).
16076         Reported by Mohammad Akhlaghi <mohammad@akhlaghi.org> in
16077         <https://lists.gnu.org/archive/html/bug-gnulib/2022-01/msg00061.html>.
16078         * gnulib-tool (func_emit_initmacro_end): Collect the *.Po or *.Plo files
16079         to remove into an AC_SUBSTed variable gl_LIBOBJDEPS.
16080         (func_emit_lib_Makefile_am): Extend the distclean and maintainer-clean
16081         rules.
16083 2022-01-08  Bruno Haible  <bruno@clisp.org>
16085         Add another example.
16086         * examples/hello-c-gnulib-conddeps: New directory.
16088 2022-01-08  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
16090         c-stack: Adapt header file for use in C++ applications.
16091         * lib/c-stack.h: Add extern "C" block.
16093 2022-01-08  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
16095         version-etc: Adapt header file for use in C++ applications.
16096         * lib/version-etc.h: Add extern "C" block.
16098 2022-01-07  Bruno Haible  <bruno@clisp.org>
16100         sigsegv: Improve support for Linux/LoongArch64.
16101         * lib/sigsegv.c (SIGSEGV_FAULT_STACKPOINTER): Add special case for
16102         Linux/LoongArch.
16104 2022-01-05  Glenn Washburn  <development@efficientek.com>
16106         bootstrap: When a commit is specified, do a shallow fetch if possible.
16107         Rationale and explanation:
16108         <https://lists.gnu.org/archive/html/bug-gnulib/2021-10/msg00073.html>.
16109         * bootstrap: When a commit hash is specified, ask for this specific
16110         commit on fetch, and fallback to fetching the entire repository if
16111         fetching by commit hash fails.
16113 2022-01-05  Paul Eggert  <eggert@cs.ucla.edu>
16115         stack: pacify gcc -Wsign-compare
16116         * lib/stack.h (_GL_STACK_TYPE): Use idx_t for size too.
16117         Suggested by Bruno Haible in:
16118         https://lists.gnu.org/r/bug-gnulib/2022-01/msg00035.html
16119         (_GL_STACK_PREFIX (size)): Return idx_t, not size_t.
16121 2022-01-05  Bruno Haible  <bruno@clisp.org>
16123         Fix last commit.
16124         Based on a patch by José E. Marchesi <jemarch@gnu.org>, reported in
16125         <https://lists.gnu.org/archive/html/bug-gnulib/2022-01/msg00036.html>.
16126         * m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): Don't enable
16127         -Wimplicit-fallthrough for GCC < 7.
16129 2022-01-05  Bruno Haible  <bruno@clisp.org>
16131         gnulib-tool: Avoid known warnings that reflect Gnulib's coding style.
16132         * m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): New macro.
16133         * gnulib-tool (func_emit_lib_Makefile_am): Add the
16134         GL_CFLAG_GNULIB_WARNINGS to the CFLAGS of all the compilation units of
16135         the library.
16136         (func_emit_tests_Makefile_am): Add the GL_CFLAG_GNULIB_WARNINGS to the
16137         CFLAGS.
16138         (func_import): Emit an invocation of gl_CC_GNULIB_WARNINGS.
16140 2022-01-04  Bernhard Voelker  <mail@bernhard-voelker.de>
16142         license: fix GPLv3 texts to use a comma instead of semicolon.
16143         See: https://www.gnu.org/licenses/gpl-3.0.html#howto
16144         Run:
16145           $ git grep -l 'Foundation; either version 3' \
16146               | xargs sed -i '/Foundation; either version 3/ s/n; e/n, e/'
16147         * All files using GPLv3: Adjust via the above command.
16149 2022-01-04  Bruno Haible  <bruno@clisp.org>
16151         string, wchar: Fix compilation error on MSVC (regression 2021-09-07).
16152         * lib/string.in.h (free): Don't redeclare as rpl_free. Instead, redefine
16153         _GL_ATTRIBUTE_DEALLOC_FREE to reference rpl_free directly.
16154         * lib/wchar.in.h (free): Likewise.
16156 2022-01-03  Bruno Haible  <bruno@clisp.org>
16158         getpass-gnu: Allow use as dependency from test modules.
16159         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): Set
16160         REPLACE_GETPASS_FOR_GETPASS_GNU instead of REPLACE_GETPASS.
16161         * m4/unistd_h.m4 (gl_UNISTD_H_REQUIRE_DEFAULTS): Initialize the
16162         getpass-gnu module indicator.
16163         (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_GETPASS_FOR_GETPASS_GNU.
16164         * modules/unistd (Makefile.am): Substitute GNULIB_GETPASS_GNU,
16165         REPLACE_GETPASS_FOR_GETPASS_GNU.
16166         * modules/getpass-gnu (configure.ac): Test
16167         REPLACE_GETPASS_FOR_GETPASS_GNU instead of REPLACE_GETPASS. Set a module
16168         indicator.
16169         * lib/unistd.in.h (getpass): Test REPLACE_GETPASS,
16170         REPLACE_GETPASS_FOR_GETPASS_GNU, and the respective module indicators
16171         instead of just REPLACE_GETPASS.
16173 2022-01-03  Bruno Haible  <bruno@clisp.org>
16175         fopen-gnu: Allow use as dependency from test modules.
16176         * m4/fopen.m4 (gl_FUNC_FOPEN_GNU): Set REPLACE_FOPEN_FOR_FOPEN_GNU
16177         instead of REPLACE_FOPEN.
16178         * m4/stdio_h.m4 (gl_STDIO_H_REQUIRE_DEFAULTS): Initialize the fopen-gnu
16179         module indicator.
16180         (gl_STDIO_H_DEFAULTS): Initialize REPLACE_FOPEN_FOR_FOPEN_GNU.
16181         * modules/stdio (Makefile.am): Substitute GNULIB_FOPEN_GNU,
16182         REPLACE_FOPEN_FOR_FOPEN_GNU.
16183         * modules/fopen-gnu (Depends-on): Add more dependencies.
16184         (configure.ac): Test REPLACE_FOPEN_FOR_FOPEN_GNU instead of
16185         REPLACE_FOPEN.
16186         * lib/stdio.in.h (fopen): Test REPLACE_FOPEN,
16187         REPLACE_FOPEN_FOR_FOPEN_GNU, and the respective module indicators
16188         instead of just REPLACE_FOPEN.
16190 2022-01-03  Bruno Haible  <bruno@clisp.org>
16192         realloc-gnu: Allow use as dependency from test modules.
16193         * m4/realloc.m4 (gl_FUNC_REALLOC_GNU): Set
16194         REPLACE_REALLOC_FOR_REALLOC_GNU instead of REPLACE_REALLOC.
16195         (gl_FUNC_REALLOC_POSIX): Set REPLACE_REALLOC_FOR_REALLOC_POSIX instead
16196         of REPLACE_REALLOC.
16197         * m4/stdlib_h.m4 (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize the
16198         realloc-gnu module indicator.
16199         (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_REALLOC_FOR_REALLOC_GNU,
16200         REPLACE_REALLOC_FOR_REALLOC_POSIX, not REPLACE_REALLOC.
16201         * modules/stdlib (Makefile.am): Substitute GNULIB_REALLOC_GNU,
16202         REPLACE_REALLOC_FOR_REALLOC_GNU, REPLACE_REALLOC_FOR_REALLOC_POSIX, not
16203         REPLACE_REALLOC.
16204         * modules/realloc-posix (Depends-on, configure.ac): Test
16205         REPLACE_REALLOC_FOR_REALLOC_POSIX instead of REPLACE_REALLOC.
16206         * modules/realloc-gnu (Comment): Remove section.
16207         (Depends-on): Add free-posix, malloc-gnu, xalloc-oversized.
16208         (configure.ac): Test REPLACE_REALLOC_FOR_REALLOC_GNU instead of
16209         REPLACE_REALLOC. Set a module indicator.
16210         * lib/stdlib.in.h (realloc): Test REPLACE_REALLOC_FOR_REALLOC_POSIX,
16211         REPLACE_REALLOC_FOR_REALLOC_GNU, and the respective module indicators
16212         instead of just REPLACE_REALLOC.
16214 2022-01-03  Bruno Haible  <bruno@clisp.org>
16216         calloc-gnu: Allow use as dependency from test modules.
16217         * m4/calloc.m4 (gl_FUNC_CALLOC_GNU): Set REPLACE_CALLOC_FOR_CALLOC_GNU
16218         instead of REPLACE_CALLOC.
16219         (gl_FUNC_CALLOC_POSIX): Set REPLACE_CALLOC_FOR_CALLOC_POSIX instead of
16220         REPLACE_CALLOC.
16221         * m4/stdlib_h.m4 (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize the
16222         calloc-gnu module indicator.
16223         (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_CALLOC_FOR_CALLOC_GNU,
16224         REPLACE_CALLOC_FOR_CALLOC_POSIX, not REPLACE_CALLOC.
16225         * modules/stdlib (Makefile.am): Substitute GNULIB_CALLOC_GNU,
16226         REPLACE_CALLOC_FOR_CALLOC_GNU, REPLACE_CALLOC_FOR_CALLOC_POSIX, not
16227         REPLACE_CALLOC.
16228         * modules/calloc-posix (Depends-on, configure.ac): Test
16229         REPLACE_CALLOC_FOR_CALLOC_POSIX instead of REPLACE_CALLOC.
16230         * modules/calloc-gnu (Depends-on): Add xalloc-oversized.
16231         (configure.ac): Test REPLACE_CALLOC_FOR_CALLOC_GNU instead of
16232         REPLACE_CALLOC. Set a module indicator.
16233         * lib/stdlib.in.h (calloc): Test REPLACE_CALLOC_FOR_CALLOC_POSIX,
16234         REPLACE_CALLOC_FOR_CALLOC_GNU, and the respective module indicators
16235         instead of just REPLACE_CALLOC.
16237 2022-01-03  Bruno Haible  <bruno@clisp.org>
16239         malloc-gnu: Allow use as dependency from test modules.
16240         * m4/malloc.m4 (gl_FUNC_MALLOC_GNU): Set REPLACE_MALLOC_FOR_MALLOC_GNU
16241         instead of REPLACE_MALLOC.
16242         (gl_FUNC_MALLOC_PTRDIFF, gl_FUNC_MALLOC_POSIX): Set
16243         REPLACE_MALLOC_FOR_MALLOC_POSIX instead of REPLACE_MALLOC.
16244         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): Test
16245         REPLACE_MALLOC_FOR_MALLOC_POSIX instead of REPLACE_MALLOC.
16246         * m4/realloc.m4 (gl_FUNC_REALLOC_POSIX): Likewise.
16247         * m4/stdlib_h.m4 (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize the
16248         malloc-gnu module indicator.
16249         (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MALLOC_FOR_MALLOC_GNU,
16250         REPLACE_MALLOC_FOR_MALLOC_POSIX, not REPLACE_MALLOC.
16251         * modules/stdlib (Makefile.am): Substitute GNULIB_MALLOC_GNU,
16252         REPLACE_MALLOC_FOR_MALLOC_GNU, REPLACE_MALLOC_FOR_MALLOC_POSIX, not
16253         REPLACE_MALLOC.
16254         * modules/malloc-posix (Depends-on, configure.ac): Test
16255         REPLACE_MALLOC_FOR_MALLOC_POSIX instead of REPLACE_MALLOC.
16256         * modules/malloc-gnu (Comment): Remove section.
16257         (Depends-on): Add xalloc-oversized.
16258         (configure.ac): Test REPLACE_MALLOC_FOR_MALLOC_GNU instead of
16259         REPLACE_MALLOC. Set a module indicator.
16260         * lib/stdlib.in.h (malloc): Test REPLACE_MALLOC_FOR_MALLOC_POSIX,
16261         REPLACE_MALLOC_FOR_MALLOC_GNU, and the respective module indicators
16262         instead of just REPLACE_MALLOC.
16264 2022-01-02  Bruno Haible  <bruno@clisp.org>
16266         striconveh: Make the last change also work on Solaris 11.
16267         * lib/striconveh.c (mem_cd_iconveh_internal): Tweak last commit.
16269         striconveh: Make the last change also work on musl libc.
16270         * lib/striconveh.c (mem_cd_iconveh_internal): Make the U+FFFD conversion
16271         also work with non-GNU iconv() implementations.
16273 2022-01-01  Paul Eggert  <eggert@cs.ucla.edu>
16275         gen-header: port to BusyBox ‘sed’
16276         Problem reported by Tim Rühsen in:
16277         https://lists.gnu.org/r/bug-gnulib/2022-01/msg00004.html
16278         * modules/gen-header (SED_HEADER_NOEDIT): Replace instead of prepend.
16279         (SED_HEADER_STDOUT, SED_HEADER_TO_AT_t): Adjust to that change.
16280         Do not use ‘w foo’ twice in the same script, as BusyBox ‘sed’
16281         mistakenly opens ‘foo’ for output twice, thus losing some output.
16283 2022-01-01  Bruno Haible  <bruno@clisp.org>
16285         striconveh: Support an error handler that produces a Unicode U+FFFD.
16286         Suggested by Marc Nieper-Wißkirchen in
16287         <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00175.html>.
16288         * lib/iconveh.h (iconveh_replacement_character): New enum value.
16289         * lib/striconveh.c (mem_cd_iconveh_internal): When the handler is
16290         iconveh_replacement_character, try to produce U+FFFD when possible,
16291         instead of '?'.
16292         * tests/test-striconveh.c (main): Add GB18030 tests. Test also
16293         iconveh_replacement_character.
16295 2022-01-01  Bruno Haible  <bruno@clisp.org>
16297         maint: Update copyright notices.
16298         * build-aux/declared.sh (func_version): Bump year.
16300 2022-01-01  Bruno Haible  <bruno@clisp.org>
16302         maint: Update copyright notices in code generating programs.
16303         * lib/gen-uni-tables.c (output_predicate_test, output_predicate,
16304         output_category, output_combclass, output_bidi_category,
16305         output_decimal_digit_test, output_decimal_digit, output_digit_test,
16306         output_digit, output_numeric_test, output_numeric, output_mirror,
16307         output_joining_type_test, output_joining_type,
16308         output_joining_group_test, output_joining_group, output_scripts,
16309         output_scripts_byname, output_blocks, output_ident_category,
16310         output_nonspacing_property, output_lbrk_tables,
16311         output_lbrk_rules_as_tables, output_wbrk_tables, output_gbp_test,
16312         output_gbp_table, output_decomposition_tables,
16313         output_composition_tables, output_simple_mapping_test,
16314         output_simple_mapping, output_casing_rules): Extend copyright year of
16315         generated file to 2022.
16316         * lib/uniname/gen-uninames.lisp (main): Likewise. Produce license notice
16317         that is consistent with the gnulib/etc/license-notices/ files.
16318         * All files regenerated.
16320 2022-01-01  Paul Eggert  <eggert@cs.ucla.edu>
16322         maint: fix ‘make update-copyright’ on symlinks
16323         After running ‘make update-copyright’ I noticed that it
16324         incorrectly replaced a couple of symlinks with their contents.
16325         * Makefile (update-copyright): Do not update symlinks.
16326         * etc/license-notices/GPL, etc/license-notices/LGPL:
16327         Change these back to symlinks.
16329 2021-12-31  Bruno Haible  <bruno@clisp.org>
16331         unistdio: Prefer newer version to older, buggy one.
16332         * modules/unistdio/ulc-vasnprintf (configure.ac): Bump required
16333         libunistring version. This is needed because of the heap overrun fix
16334         (2018-09-23) and the need to avoid %n on more platforms (2020-10-04).
16335         * modules/unistdio/ulc-asnprintf (configure.ac): Likewise.
16336         * modules/unistdio/ulc-asprintf (configure.ac): Likewise.
16337         * modules/unistdio/ulc-fprintf (configure.ac): Likewise.
16338         * modules/unistdio/ulc-snprintf (configure.ac): Likewise.
16339         * modules/unistdio/ulc-sprintf (configure.ac): Likewise.
16340         * modules/unistdio/ulc-vasprintf (configure.ac): Likewise.
16341         * modules/unistdio/ulc-vfprintf (configure.ac): Likewise.
16342         * modules/unistdio/ulc-vsnprintf (configure.ac): Likewise.
16343         * modules/unistdio/ulc-vsprintf (configure.ac): Likewise.
16345 2021-12-31  Bruno Haible  <bruno@clisp.org>
16347         uniwidth: Optimize.
16348         * lib/gen-uni-tables.c (output_nonspacing_property): Add version
16349         parameter. Emit the usual boilerplate header for generated files.
16350         (is_width2): New function, based on lib/uniwidth/width.c.
16351         (output_width2_property): New function.
16352         (main): Create uniwidth/width0.h instead of uniwidth/width.c.part.
16353         Create uniwidth/width2.h.
16354         * lib/uniwidth/width.c: Include width0.h, width2.h, bitmap.h.
16355         (nonspacing_table_data, nonspacing_table_ind): Remove here.
16356         (uc_width): Replace the double-width character with an u_width2 bitmap
16357         lookup.
16358         * modules/uniwidth/width (Files): Add lib/uniwidth/width0.h,
16359         lib/uniwidth/width2.h, lib/unictype/bitmap.h.
16361 2021-12-31  Bruno Haible  <bruno@clisp.org>
16363         Update to Unicode 14.0.0.
16365         * lib/gen-uni-tables.c (UC_JOINING_GROUP_THIN_YEH,
16366         UC_JOINING_GROUP_VERTICAL_TAIL): New enum values.
16367         (fill_arabicshaping, joining_group_as_c_identifier): Recognize these
16368         joining groups.
16369         * lib/unictype.in.h (UC_JOINING_GROUP_THIN_YEH,
16370         UC_JOINING_GROUP_VERTICAL_TAIL): New enum values.
16371         * lib/unictype/joininggroup_name.h: Add the THIN_YEH, VERTICAL_TAIL
16372         joining groups.
16373         * lib/unictype/joininggroup_byname.gperf: Likewise.
16375         * lib/gen-uni-tables.c (LBP_ID1, LBP_ID2): New enum values.
16376         (LBP_ID): Assign artificial value.
16377         (get_lbp): Use the extended_pictographic property to assign LBP_ID1,
16378         LBP_ID2 instead of LBP_ID. Update such that unilbrk/lbrkprop.txt comes
16379         out as expected.
16380         (debug_output_lbp): Print either LBP_ID1 or LBP_ID2 as LBP_ID.
16381         (lbp_value_to_string): Handle LBP_ID1, LBP_ID2 instead of LBP_ID.
16382         (output_lbrk_rules_as_tables): Treat LBP_ID as macro that maps to two
16383         table rows/columns. In rule LB30b, use LBP_ID2 in addition to LBP_EB.
16384         Remove redundant part of rule LB27.
16385         * lib/unilbrk/lbrktables.h (LBP_ID1, LBP_ID2): New enum values.
16386         (LBP_ID): Remove enum value.
16387         (unilbrk_table): Update declaration.
16388         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks_loop):
16389         Use LBP_ID1 instead of LBP_ID.
16390         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks_loop):
16391         Likewise.
16392         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks_loop):
16393         Likewise.
16394         * tests/unilbrk/test-u8-possible-linebreaks.c (test_function): Add a
16395         test of potential future emoji.
16396         * tests/unilbrk/test-u16-possible-linebreaks.c (test_function):
16397         Likewise.
16398         * tests/unilbrk/test-u32-possible-linebreaks.c (test_function):
16399         Likewise.
16401         * lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind):
16402         Update.
16403         (uc_width): Assign width 2 to the characters 0x1AFF0..0x1AFF3,
16404         0x1AFF5..0x1AFFB, 0x1AFFD..0x1AFFE, 0x1B120..0x1B122, 0x1F6DD..0x1F6DF,
16405         0x1F7F0, 0x1FA7B..0x1FA7C, 0x1FAA9..0x1FAAC, 0x1FAB7..0x1FABA,
16406         0x1FAC3..0x1FAC5, 0x1FAD7..0x1FAD9, 0x1FAE0..0x1FAE7, 0x1FAF0..0x1FAF6.
16407         * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
16408         0x0890..0x0891, 0x0898..0x089F, 0x08CA..0x0902, 0x0C3C, 0x180F,
16409         0x1AC1..0x1ACE, 0x1DFA, 0x10F82..0x10F85, 0x11070, 0x11073..0x11074,
16410         0x110C2, 0x1CF00..0x1CF2D, 0x1CF30..0x1CF46, 0x1E2AE. Expect ambiguous
16411         width for the character 0x1734. Expect width 2 for the characters
16412         0x1AFF0..0x1AFF3, 0x1AFF5..0x1AFFB, 0x1AFFD..0x1AFFE, 0x1B120..0x1B122,
16413         0x1F6DD..0x1F6DF, 0x1F7F0, 0x1FA7B..0x1FA7C, 0x1FAA9..0x1FAAC,
16414         0x1FAB7..0x1FABA, 0x1FAC3..0x1FAC5, 0x1FAD7..0x1FAD9, 0x1FAE0..0x1FAE7,
16415         0x1FAF0..0x1FAF6.
16417         * All generated files under lib/uni* and tests/uni*: Regenerate.
16418         * tests/uniname/NameAliases.txt: Update.
16419         * tests/uniname/UnicodeData.txt: Update.
16420         * tests/uninorm/NormalizationTest.txt: Update.
16421         * tests/unigbrk/GraphemeBreakTest.txt: Update.
16422         * tests/uniwbrk/WordBreakTest.txt: Update.
16424         * All the affected modules: Bump required libunistring version.
16426 2021-12-31  Bruno Haible  <bruno@clisp.org>
16428         Update to Unicode 13.0.0.
16430         * lib/gen-uni-tables.c (is_WBP_MIDLETTER): Add character 0x055F.
16431         (get_wbp): Assign value WBP_ALETTER to the characters 0x02E5..0x02EB,
16432         0x055A, 0x058A, 0xA708..0xA716.
16434         * lib/gen-uni-tables.c (LBP_CP1, LBP_CP2, LBP_OP1, LBP_OP2): New enum
16435         values.
16436         (LBP_OP, LBP_CP): Assign artificial values.
16437         (get_lbp): Use the unicode_width[] table to assign LBP_CP1, LBP_CP2
16438         instead of LBP_CP, and LBP_OP1, LBP_OP2 instead of LBP_OP. Update such
16439         that unilbrk/lbrkprop.txt comes out as expected.
16440         (debug_output_lbp): Print either LBP_CP1 or LBP_CP2 as LBP_CP. Print
16441         either LBP_OP1 or LBP_OP2 as LBP_OP.
16442         (lbp_value_to_string): Handle LBP_CP1, LBP_CP2, LBP_OP1, LBP_OP2 instead
16443         of LBP_CP, LBP_OP.
16444         (output_lbrk_rules_as_tables): Treat LBP_CP and LBP_OP as macros that
16445         map to two table rows/columns. In rule LB30, use only LBP_OP1 instead of
16446         LBP_OP, and only LBP_CP1 instead of LBP_CP. Simplify rule LB22.
16447         * lib/unilbrk/lbrktables.h (LBP_CP1, LBP_CP2, LBP_OP1, LBP_OP2): New
16448         enum values.
16449         (LBP_OP, LBP_CP): Remove enum values.
16450         (unilbrk_table): Update declaration.
16451         * tests/unilbrk/test-u8-possible-linebreaks.c (test_function): Add a
16452         test for East Asian opening parenthesis.
16453         * tests/unilbrk/test-u16-possible-linebreaks.c (test_function):
16454         Likewise.
16455         * tests/unilbrk/test-u32-possible-linebreaks.c (test_function):
16456         Likewise.
16458         * lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind):
16459         Update.
16460         (uc_width): Assign width 2 to the characters 0x16FF0..0x16FF1,
16461         0x18AF3..0x18CD5, 0x18D00..0x18D08, 0x1F6D6..0x1F6D7, 0x1F6FB..0x1F6FC,
16462         0x1F90C, 0x1FA74, 0x1FA83..0x1FA86, 0x1FA96..0x1FAA8, 0x1FAB0..0x1FAB6,
16463         0x1FAC0..0x1FAC2, 0x1FAD0..0x1FAD6.
16464         Assign width 1 to the characters 0x1F93B, 0x1F946.
16465         * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
16466         0x0B55, 0x0D81, 0x1ABF..0x1AC0, 0xA82C, 0x10EAB..0x10EAC, 0x111CF,
16467         0x1193B..0x1193C, 0x1193E, 0x11943, 0x16FE4. Expect width 2 for the
16468         characters 0x16FF0..0x16FF1, 0x18AF3..0x18CD5, 0x18D00..0x18D08,
16469         0x1F6D6..0x1F6D7, 0x1F6FB..0x1F6FC, 0x1F90C, 0x1FA74, 0x1FA83..0x1FA86,
16470         0x1FA96..0x1FAA8, 0x1FAB0..0x1FAB6, 0x1FAC0..0x1FAC2, 0x1FAD0..0x1FAD6.
16471         Expect width 1 for the characters 0x1F93B, 0x1F946.
16473         * All generated files under lib/uni* and tests/uni*: Regenerate.
16474         * tests/uniname/NameAliases.txt: Update.
16475         * tests/uniname/UnicodeData.txt: Update.
16476         * tests/uninorm/NormalizationTest.txt: Update.
16477         * tests/unigbrk/GraphemeBreakTest.txt: Update.
16478         * tests/uniwbrk/WordBreakTest.txt: Update.
16480         * All the affected modules: Bump required libunistring version.
16482 2021-12-30  Bruno Haible  <bruno@clisp.org>
16484         uniwbrk: Correction of Unicode 10.0.0 support.
16485         * lib/gen-uni-tables.c (is_WBP_MIDLETTER): Remove character 0x02D7.
16486         The generated files are not affected.
16488 2021-12-30  Bruno Haible  <bruno@clisp.org>
16490         Update to Unicode 12.1.0.
16492         * lib/gen-uni-tables.c: Update comments.
16494         * All generated files under lib/uni* and tests/uni*: Regenerate.
16495         * tests/uniname/NameAliases.txt: Update.
16496         * tests/uniname/UnicodeData.txt: Update.
16497         * tests/uninorm/NormalizationTest.txt: Update.
16498         * tests/unigbrk/GraphemeBreakTest.txt: Update.
16499         * tests/uniwbrk/WordBreakTest.txt: Update.
16501         * All the affected modules: Bump required libunistring version.
16503 2021-12-30  Bruno Haible  <bruno@clisp.org>
16505         Update to Unicode 12.0.0.
16507         * lib/gen-uni-tables.c (is_property_default_ignorable_code_point):
16508         Exclude 0x13430..0x13438.
16509         (get_lbp): Update such that unilbrk/lbrkprop.txt comes out as expected.
16510         (get_wbp): Map 0xFF10..0xFF19 to WBP_NUMERIC.
16512         * lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind):
16513         Update.
16514         (uc_width): Assign width 2 to the characters 0x16FE2..0x16FE3,
16515         0x187F2..0x187F7, 0x1B150..0x1B152, 0x1B164..0x1B167, 0x1F6D5, 0x1F6FA,
16516         0x1F7E0..0x1F7EB, 0x1F90D..0x1F90F, 0x1FA70..0x1FA73, 0x1FA78..0x1FA7A,
16517         0x1FA80..0x1FA82, 0x1FA90..0x1FA95.
16518         * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
16519         0x0EBA, 0xA9BD, 0x119D4..0x119D7, 0x119DA..0x119DB, 0x119E0,
16520         0x13430..0x13438, 0x16F4F, 0x1E130..0x1E136, 0x1E2EC..0x1E2EF. Expect
16521         width 2 for the characters 0x16FE2..0x16FE3, 0x187F2..0x187F7,
16522         0x1B150..0x1B152, 0x1B164..0x1B167, 0x1F6D5, 0x1F6FA, 0x1F7E0..0x1F7EB,
16523         0x1F90D..0x1F90F, 0x1FA70..0x1FA73, 0x1FA78..0x1FA7A, 0x1FA80..0x1FA82,
16524         0x1FA90..0x1FA95.
16526         * All generated files under lib/uni* and tests/uni*: Regenerate.
16527         * tests/uniname/NameAliases.txt: Update.
16528         * tests/uniname/UnicodeData.txt: Update.
16529         * tests/uninorm/NormalizationTest.txt: Update.
16530         * tests/unigbrk/GraphemeBreakTest.txt: Update.
16531         * tests/uniwbrk/WordBreakTest.txt: Update.
16533         * All the affected modules: Bump required libunistring version.
16535 2021-12-30  Paul Eggert  <eggert@cs.ucla.edu>
16537         crypto/sm3-buffer: fix C99 conformance bug
16538         * lib/sm3.c (sm3_process_block): Call varargs macro with enough
16539         arguments.  Problem found by IBM XL/C 12.1.0.0 for AIX.
16541 2021-12-30  Bruno Haible  <bruno@clisp.org>
16543         Update to Unicode 11.0.0.
16545         * lib/gen-uni-tables.c (is_property_default_ignorable_code_point):
16546         Simplify by use of PROP_PREPENDED_CONCATENATION_MARK.
16547         (UC_JOINING_GROUP_HANIFI_ROHINGYA_PA,
16548         UC_JOINING_GROUP_HANIFI_ROHINGYA_KINNA_YA): New enum values.
16549         (fill_arabicshaping, joining_group_as_c_identifier): Recognize these
16550         joining groups.
16551         (get_lbp): Update such that unilbrk/lbrkprop.txt comes out as expected.
16552         (WBP_EB, WBP_EM, WBP_GAZ, WBP_EBG): Remove enum values.
16553         (WBP_WSS): New enum value.
16554         (get_wbp): Update such that uniwbrk/wbrkprop.txt comes out as expected.
16555         (debug_output_wbp, fill_org_wbp, debug_output_org_wbp, output_wbp):
16556         Update for changed enum values.
16558         * lib/unictype.in.h (UC_JOINING_GROUP_HANIFI_ROHINGYA_*): New enum
16559         values.
16560         * lib/unictype/joininggroup_name.h: Add the HANIFI_ROHINGYA_* joining
16561         groups.
16562         * lib/unictype/joininggroup_byname.gperf: Likewise.
16564         * lib/unigbrk.in.h: Mark 4 enum values as obsolete.
16565         * lib/unigbrk/u-grapheme-breaks.h (FUNC): Handle emoji modifier sequence
16566         according to Unicode 11.0.0.
16567         * lib/unigbrk/u8-grapheme-breaks.c: Include <stdbool.h>, unictype.h.
16568         * lib/unigbrk/u16-grapheme-breaks.c: Likewise.
16569         * lib/unigbrk/u32-grapheme-breaks.c: Likewise.
16570         * lib/unigbrk/uc-grapheme-breaks.c: Likewise.
16571         * modules/unigbrk/u8-grapheme-breaks (Depends-on): Add
16572         unictype/property-extended-pictographic, stdbool.
16573         * modules/unigbrk/u16-grapheme-breaks (Depends-on): Likewise.
16574         * modules/unigbrk/u32-grapheme-breaks (Depends-on): Likewise.
16575         * modules/unigbrk/uc-grapheme-breaks (Depends-on): Likewise.
16576         * tests/unigbrk/test-u8-grapheme-breaks.c (main): Add test for emoji
16577         modifier / ZWJ sequence.
16578         * tests/unigbrk/test-u16-grapheme-breaks.c (main): Likewise.
16579         * tests/unigbrk/test-u32-grapheme-breaks.c (main): Likewise.
16580         * tests/unigbrk/test-uc-is-grapheme-break.c: Include <stdbool.h>,
16581         unictype.h.
16582         (main): Update workaround logic to match the one in
16583         lib/unigbrk/u-grapheme-breaks.h.
16584         * modules/unigbrk/uc-is-grapheme-break-tests (Depends-on): Add
16585         unictype/property-extended-pictographic, stdbool.
16587         * lib/uniwbrk.in.h: Mark 4 enum values as obsolete.
16588         (WBP_WSS): New enum value.
16589         * lib/uniwbrk/u-wordbreaks.h (FUNC): Handle emoji ZWJ sequences and
16590         horizontal whitespace according to Unicode 11.0.0.
16591         * lib/uniwbrk/u8-wordbreaks.c: Include unictype.h.
16592         * lib/uniwbrk/u16-wordbreaks.c: Likewise.
16593         * lib/uniwbrk/u32-wordbreaks.c: Likewise.
16594         * lib/uniwbrk/wbrktable.c (uniwbrk_prop_index, uniwbrk_table): Add a row
16595         and column for WBP_WSS.
16596         * lib/uniwbrk/wbrktable.h (uniwbrk_prop_index, uniwbrk_table): Update
16597         declarations.
16598         * modules/uniwbrk/u8-wordbreaks (Depends-on): Add
16599         unictype/property-extended-pictographic.
16600         * modules/uniwbrk/u16-wordbreaks (Depends-on): Likewise.
16601         * modules/uniwbrk/u32-wordbreaks (Depends-on): Likewise.
16602         * tests/uniwbrk/test-u8-wordbreaks.c (main): Update expected results.
16603         * tests/uniwbrk/test-u16-wordbreaks.c (main): Likewise.
16604         * tests/uniwbrk/test-u32-wordbreaks.c (main): Likewise.
16605         * tests/uniwbrk/test-uc-wordbreaks.c (wordbreakproperty_to_string):
16606         Update.
16608         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks_loop):
16609         Handle ZWJ according to Unicode 11.0.0.
16610         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks_loop):
16611         Likewise.
16612         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks_loop):
16613         Likewise.
16615         * lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind):
16616         Update.
16617         (uc_width): Assign width 2 to the characters 0x187ED..0x187F1, 0x1F6F9,
16618         0x1F9E7..0x1F9FF.
16619         * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
16620         0x07FD, 0x08D3, 0x09FE, 0x0C04, 0xA8FF, 0x10D24..0x10D27,
16621         0x10F46..0x10F50, 0x110CD, 0x111C9, 0x1133B, 0x1145E, 0x1182F..0x11837,
16622         0x11839..0x1183A, 0x11D90..0x11D91, 0x11D95, 0x11D97, 0x11EF3..0x11EF4.
16623         Expect width 2 for the characters 0x187ED..0x187F1, 0x1F6F9,
16624         0x1F9E7..0x1F9FF.
16626         * All generated files under lib/uni* and tests/uni*: Regenerate.
16627         * tests/uniname/NameAliases.txt: Update.
16628         * tests/uniname/UnicodeData.txt: Update.
16629         * tests/uninorm/NormalizationTest.txt: Update.
16630         * tests/unigbrk/GraphemeBreakTest.txt: Update.
16631         * tests/uniwbrk/WordBreakTest.txt: Update.
16633         * All the affected modules: Bump required libunistring version.
16635 2021-12-30  Bruno Haible  <bruno@clisp.org>
16637         unictype: Add Emoji properties from Unicode 11.0.0.
16638         * lib/gen-uni-tables.c (PROP_EMOJI*, PROP_EXTENDED_PICTOGRAPHIC): New
16639         enum values.
16640         (fill_properties): Don't require a space between the property name and
16641         the comment. Handle the property names from emoji-data.txt.
16642         (is_property_emoji, is_property_emoji_presentation,
16643         is_property_emoji_modifier, is_property_emoji_modifier_base,
16644         is_property_emoji_component, is_property_extended_pictographic): New
16645         declarations.
16646         (output_properties): Emit the properties emoji, emoji_presentation,
16647         emoji_modifier, emoji_modifier_base, emoji_component,
16648         extended_pictographic.
16649         (get_lbp): Use the emoji_modifier property.
16650         (main): Expect one more argument, for the emoji-data.txt file.
16651         * lib/unictype.in.h (UC_PROPERTY_EMOJI, UC_PROPERTY_EMOJI_PRESENTATION,
16652         UC_PROPERTY_EMOJI_MODIFIER, UC_PROPERTY_EMOJI_MODIFIER_BASE,
16653         UC_PROPERTY_EMOJI_COMPONENT, UC_PROPERTY_EXTENDED_PICTOGRAPHIC,
16654         uc_is_property_emoji, uc_is_property_emoji_presentation,
16655         uc_is_property_emoji_modifier, uc_is_property_emoji_modifier_base,
16656         uc_is_property_emoji_component, uc_is_property_extended_pictographic):
16657         New declarations.
16658         * lib/unictype/pr_emoji.c: New file.
16659         * lib/unictype/pr_emoji_presentation.c: New file.
16660         * lib/unictype/pr_emoji_modifier.c: New file.
16661         * lib/unictype/pr_emoji_modifier_base.c: New file.
16662         * lib/unictype/pr_emoji_component.c: New file.
16663         * lib/unictype/pr_extended_pictographic.c: New file.
16664         * modules/unictype/property-emoji: New file.
16665         * modules/unictype/property-emoji-tests: New file.
16666         * modules/unictype/property-emoji-presentation: New file.
16667         * modules/unictype/property-emoji-presentation-tests: New file.
16668         * modules/unictype/property-emoji-modifier: New file.
16669         * modules/unictype/property-emoji-modifier-tests: New file.
16670         * modules/unictype/property-emoji-modifier-base: New file.
16671         * modules/unictype/property-emoji-modifier-base-tests: New file.
16672         * modules/unictype/property-emoji-component: New file.
16673         * modules/unictype/property-emoji-component-tests: New file.
16674         * modules/unictype/property-extended-pictographic: New file.
16675         * modules/unictype/property-extended-pictographic-tests: New file.
16676         * modules/unictype/property-all (Depends-on): Depend on the new modules.
16678 2021-12-29  Bruno Haible  <bruno@clisp.org>
16680         uniwidth: Give width 0 to conjoining Hangul Jamo jungseong, jongseong.
16681         Reported by Luis Javier Merino <ninjalj@gmail.com> in
16682         <https://lists.gnu.org/archive/html/bug-libunistring/2021-12/msg00006.html>.
16683         * lib/gen-uni-tables.c (is_nonspacing): Return true for the conjoining
16684         Hangul Jamo jungseong and jongseong characters.
16685         * lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind):
16686         Regenerated.
16687         * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
16688         0x1160..0x11FF, 0xD7B0..0xD7C6, 0xD7CB..0xD7FB.
16690 2021-12-29  Bruno Haible  <bruno@clisp.org>
16692         uniwidth: Update to Unicode 10.0.0.
16693         * lib/uniwidth/width.c (uc_width): Assign width 2 to the characters
16694         0x231A..0x231B, 0x23E9..0x23EC, 0x23F0, 0x23F3, 0x25FD..0x25FE,
16695         0x2614..0x2615, 0x2648..0x2653, 0x267F, 0x2693, 0x26A1, 0x26AA..0x26AB,
16696         0x26BD..0x26BE, 0x26C4..0x26C5, 0x26CE, 0x26D4, 0x26EA, 0x26F2..0x26F3,
16697         0x26F5, 0x26FA, 0x26FD, 0x2705, 0x270A..0x270B, 0x2728, 0x274C, 0x274E,
16698         0x2753..0x2755, 0x2757, 0x2795..0x2797, 0x27B0, 0x27BF, 0x2B1B..0x2B1C,
16699         0x2B50, 0x2B55, 0xA960..0xA97C, 0x16FE0..0x16FE1, 0x17000..0x187EC,
16700         0x18800..0x18AF2, 0x1B000..0x1B11F, 0x1B170..0x1B2FB, 0x1F004, 0x1F0CF,
16701         0x1F18E, 0x1F191..0x1F19A, 0x1F200..0x1F320, 0x1F32D..0x1F335,
16702         0x1F337..0x1F37C, 0x1F37E..0x1F393, 0x1F3A0..0x1F3CA, 0x1F3CF..0x1F3D3,
16703         0x1F3E0..0x1F3F0, 0x1F3F4, 0x1F3F8..0x1F43E, 0x1F440, 0x1F442..0x1F4FC,
16704         0x1F4FF..0x1F53D, 0x1F54B..0x1F54E, 0x1F550..0x1F567, 0x1F57A,
16705         0x1F595..0x1F596, 0x1F5A4, 0x1F5FB..0x1F64F, 0x1F680..0x1F6C5, 0x1F6CC,
16706         0x1F6D0..0x1F6D2, 0x1F6EB..0x1F6EC, 0x1F6F4..0x1F6F8, 0x1F910..0x1F9E6.
16707         Assign ambiguous width to the characters 0x3248..0x324F.
16708         * tests/uniwidth/test-uc_width2.sh: Expect these changes.
16710 2021-12-29  Bruno Haible  <bruno@clisp.org>
16712         unilbrk: Improve support for strings that contain CR-LF sequences.
16713         * lib/gen-uni-tables.c (LBP_CR, LBP_LF): New enum values.
16714         (get_lbp): For '\r' and '\n', return LBP_CR and LBP_LF, respectively,
16715         instead of LBP_BK.
16716         (debug_output_lbp, fill_org_lbp, debug_output_org_lbp,
16717         lbp_value_to_string): Handle LBP_CR, LBP_LF.
16718         * lib/unilbrk/lbrkprop2.h: Regenerated.
16719         * lib/unilbrk/lbrktables.h (LBP_CR, LBP_LF): New enum values.
16720         * lib/unilbrk.in.h (UC_BREAK_CR_BEFORE_LF): New enum value.
16721         (u8_possible_linebreaks, u16_possible_linebreaks,
16722         u32_possible_linebreaks, ulc_possible_linebreaks, u8_width_linebreaks,
16723         u16_width_linebreaks, u32_width_linebreaks, ulc_width_linebreaks):
16724         Declare also a _v2 variant, and use a C macro to activate it by default.
16725         * lib/unilbrk/internal.h: New file.
16726         * lib/unilbrk/u8-possible-linebreaks.c: Include unilbrk/internal.h.
16727         (u8_possible_linebreaks_loop): Renamed from u8_possible_linebreaks. Add
16728         'cr' parameter.
16729         (u8_possible_linebreaks, u8_possible_linebreaks_v2): New functions.
16730         (main): Update.
16731         * lib/unilbrk/u16-possible-linebreaks.c: Include unilbrk/internal.h.
16732         (u16_possible_linebreaks_loop): Renamed from u16_possible_linebreaks.
16733         Add 'cr' parameter.
16734         (u16_possible_linebreaks, u16_possible_linebreaks_v2): New functions.
16735         * lib/unilbrk/u32-possible-linebreaks.c: Include unilbrk/internal.h.
16736         (u32_possible_linebreaks_loop): Renamed from u32_possible_linebreaks.
16737         Add 'cr' parameter.
16738         (u32_possible_linebreaks, u32_possible_linebreaks_v2): New functions.
16739         * lib/unilbrk/ulc-possible-linebreaks.c: Include unilbrk/internal.h,
16740         unilbrk/lbrktables.h.
16741         (ulc_possible_linebreaks_internal): Renamed from
16742         ulc_possible_linebreaks. Add 'cr' parameter.
16743         (ulc_possible_linebreaks, ulc_possible_linebreaks_v2): New functions.
16744         (main): Update.
16745         * lib/unilbrk/u8-width-linebreaks.c: Include unilbrk/internal.h,
16746         unilbrk/lbrktables.h.
16747         (u8_width_linebreaks_internal): Renamed from u8_width_linebreaks. Add
16748         'cr' parameter.
16749         (u8_width_linebreaks, u8_width_linebreaks_v2): New functions.
16750         (main): Update.
16751         * lib/unilbrk/u16-width-linebreaks.c: Include unilbrk/internal.h,
16752         unilbrk/lbrktables.h.
16753         (u16_width_linebreaks_internal): Renamed from u16_width_linebreaks. Add
16754         'cr' parameter.
16755         (u16_width_linebreaks, u16_width_linebreaks_v2): New functions.
16756         * lib/unilbrk/u32-width-linebreaks.c: Include unilbrk/internal.h,
16757         unilbrk/lbrktables.h.
16758         (u32_width_linebreaks_internal): Renamed from u32_width_linebreaks. Add
16759         'cr' parameter.
16760         (u32_width_linebreaks, u32_width_linebreaks_v2): New functions.
16761         * lib/unilbrk/ulc-width-linebreaks.c: Include unilbrk/internal.h,
16762         unilbrk/lbrktables.h.
16763         (ulc_width_linebreaks_internal): Renamed from ulc_width_linebreaks. Add
16764         'cr' parameter.
16765         (ulc_width_linebreaks, ulc_width_linebreaks_v2): New functions.
16766         (main): Update.
16767         * modules/unilbrk/u8-possible-linebreaks (Files): Add
16768         lib/unilbrk/internal.h.
16769         * modules/unilbrk/u16-possible-linebreaks (Files): Likewise.
16770         * modules/unilbrk/u32-possible-linebreaks (Files): Likewise.
16771         * modules/unilbrk/u8-width-linebreaks (Files): Likewise.
16772         * tests/unilbrk/test-u8-possible-linebreaks.c (test_function): New
16773         function, extracted from main. Add a test of CR-LF handling.
16774         (main): Invoke it twice.
16775         * tests/unilbrk/test-u16-possible-linebreaks.c (test_function): New
16776         function, extracted from main. Add a test of CR-LF handling.
16777         (main): Invoke it twice.
16778         * tests/unilbrk/test-u32-possible-linebreaks.c (test_function): New
16779         function, extracted from main. Add a test of CR-LF handling.
16780         (main): Invoke it twice.
16781         * tests/unilbrk/test-ulc-possible-linebreaks.c (test_function): New
16782         function, extracted from main.
16783         (main): Invoke it twice.
16784         * tests/unilbrk/test-u8-width-linebreaks.c (test_function): New
16785         function, extracted from main.
16786         (main): Invoke it twice.
16787         * tests/unilbrk/test-u16-width-linebreaks.c (test_function): New
16788         function, extracted from main.
16789         (main): Invoke it twice.
16790         * tests/unilbrk/test-u32-width-linebreaks.c (test_function): New
16791         function, extracted from main.
16792         (main): Invoke it twice.
16793         * tests/unilbrk/test-ulc-width-linebreaks.c (test_function): New
16794         function, extracted from main.
16795         (main): Invoke it twice.
16797 2021-12-29  Bruno Haible  <bruno@clisp.org>
16799         uniwbrk: Add unit tests of CR-LF sequences.
16800         * tests/uniwbrk/test-u8-wordbreaks.c (main): Add test of a string with
16801         CR-LF.
16802         * tests/uniwbrk/test-u16-wordbreaks.c (main): Likewise.
16803         * tests/uniwbrk/test-u32-wordbreaks.c (main): Likewise.
16805 2021-12-29  Bruno Haible  <bruno@clisp.org>
16807         unigbrk: Add unit tests of CR-LF sequences.
16808         * tests/unigbrk/test-u8-grapheme-breaks.c (main): Add test of a string
16809         with CR-LF.
16810         * tests/unigbrk/test-u16-grapheme-breaks.c (main): Likewise.
16811         * tests/unigbrk/test-u32-grapheme-breaks.c (main): Likewise.
16813 2021-12-29  Bruno Haible  <bruno@clisp.org>
16815         unilbrk: Update handling of Hebrew letter + hyphen for Unicode 10.0.0.
16816         * lib/unilbrk/lbrktables.h (LBP_HL_BA): New enum value.
16817         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks): Add
16818         code for handling break-after character after Hebrew letter.
16819         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
16820         Likewise.
16821         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
16822         Likewise.
16823         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Add a test
16824         regarding break-after character after Hebrew letter.
16825         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
16826         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
16828 2021-12-28  Paul Eggert  <eggert@cs.ucla.edu>
16830         nstrftime: improve handling of invalid formats
16831         * lib/nstrftime.c (__strftime_internal): Without this change,
16832         ‘date +'%0_-+^#1%A'’ would output ‘%A’; with it, it outputs
16833         something like ‘%0_-+^#1Tuesday’ which is easier to debug and to
16834         write wrappers for (such as the nstrftime/fprintftime usage in GNU
16835         ‘date’).
16837 2021-12-28  Bruno Haible  <bruno@clisp.org>
16839         unilbrk: Update handling of regional indicators for Unicode 10.0.0.
16840         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks): Add
16841         code for handling regional indicators.
16842         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
16843         Likewise.
16844         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
16845         Likewise.
16846         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Add a test
16847         regarding regional indicators.
16848         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
16849         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
16851 2021-12-28  Bruno Haible  <bruno@clisp.org>
16853         unilbrk: Update handling of zero-width joiner for Unicode 10.0.0.
16854         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks): Update
16855         code for zero-width joiner handling to match UAX #14 for Unicode 10.0.0.
16856         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
16857         Likewise.
16858         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
16859         Likewise.
16860         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Add a test
16861         regarding zero-width joiner.
16862         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
16863         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
16865 2021-12-28  Bruno Haible  <bruno@clisp.org>
16867         unilbrk: Update handling of combining marks for Unicode 10.0.0.
16868         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks): Update
16869         code for combining characters to match UAX #14 for Unicode 10.0.0.
16870         Remove legacy support for space + combining mark.
16871         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
16872         Likewise.
16873         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
16874         Likewise.
16875         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Add a test
16876         regarding combining characters.
16877         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
16878         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
16880 2021-12-28  Bruno Haible  <bruno@clisp.org>
16882         unilbrk: Restore deviation for (IS,AL) pair.
16883         * lib/gen-uni-tables.c (output_lbrk_rules_as_tables): Disable rule LB29.
16884         * lib/unilbrk/lbrktables.c: Regenerated.
16885         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Add test case with
16886         HTML markup.
16887         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
16888         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
16889         * tests/unilbrk/test-ulc-possible-linebreaks.c (main): Likewise.
16891 2021-12-28  Bruno Haible  <bruno@clisp.org>
16893         unilbrk: Change algorithm to be closer to Unicode Standard Annex #14.
16894         * lib/gen-uni-tables.c (lbp_value_to_string): New function, extracted
16895         from output_lbp.
16896         (output_lbp): Invoke it.
16897         (output_lbrk_rules_as_tables): New function.
16898         (main): Invoke it.
16899         * lib/unilbrk/lbrktables.c: Now automatically generated.
16900         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Update expected
16901         result.
16902         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
16903         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
16904         * tests/unilbrk/test-ulc-possible-linebreaks.c (main): Likewise.
16905         * tests/unilbrk/test-ulc-width-linebreaks.c (main): Likewise.
16907 2021-12-28  Bruno Haible  <bruno@clisp.org>
16909         uniwbrk: Add unit tests of regional indicators.
16910         * tests/uniwbrk/test-u8-wordbreaks.c (main): Add test of regional
16911         indicators.
16912         * tests/uniwbrk/test-u16-wordbreaks.c (main): Likewise.
16913         * tests/uniwbrk/test-u32-wordbreaks.c (main): Likewise.
16915 2021-12-28  Bruno Haible  <bruno@clisp.org>
16917         unigbrk: Simplify code for regional indicators.
16918         * lib/unigbrk/u-grapheme-breaks.h (FUNC): Make code for regional
16919         indicators more future-proof.
16920         * tests/unigbrk/test-u8-grapheme-breaks.c (main): Add test of regional
16921         indicators.
16922         * tests/unigbrk/test-u16-grapheme-breaks.c (main): Likewise.
16923         * tests/unigbrk/test-u32-grapheme-breaks.c (main): Likewise.
16925 2021-12-28  Paul Eggert  <eggert@cs.ucla.edu>
16927         clock_getres: document portability issues better
16928         * doc/posix-functions/clock_getres.texi:
16929         * doc/posix-functions/timespec_getres.texi:
16930         Document problems with timestamp resolution.
16932         timespec_getres: new module
16933         * lib/time.in.h (timespec_getres): New decl.
16934         * lib/timespec_getres.c, m4/timespec_getres.m4:
16935         * modules/timespec_getres, modules/timespec_getres-tests:
16936         * tests/test-timespec_getres.c:
16937         New files.
16938         * m4/time_h.m4 (gl_TIME_H_REQUIRE_DEFAULTS, gl_TIME_H_DEFAULTS):
16939         * modules/time (time.h):
16940         Support timespec_getres.
16942         gettime-res: new module
16943         * lib/gettime-res.c, modules/gettime-res: New files.
16944         * lib/timespec.h (gettime_res): New decl.
16945         * m4/clock_time.m4 (gl_CLOCK_TIME): Also check for clock_getres.
16946         * m4/gettime.m4 (gl_GETTIME_RES): New macro.
16948         gettime: port better to non-POSIX C2x
16949         C2x requires a function timespec_get; prefer that to
16950         gettimeofday, since it has better resolution.
16951         * lib/gettime.c (gettime): Prefer timespec_get to gettimeofday.
16952         * m4/gettime.m4 (gl_GETTIME): Check for timespec_get.
16953         Omit a check for gettimeofday; not needed because
16954         the gettime module depends on the gettimeofday module.
16956 2021-12-28  Bruno Haible  <bruno@clisp.org>
16958         gen-uni-tables: Produce license notices suitable for Gnulib.
16959         * lib/gen-uni-tables.c (output_library_license, output_tests_license):
16960         Produce license notices that are consistent with the
16961         gnulib/etc/license-notices/ files.
16962         * All generated files under lib/uni* and tests/uni*: Regenerate.
16964 2021-12-28  Bruno Haible  <bruno@clisp.org>
16966         unigbrk, uniwbrk: No-op tweaks.
16967         * lib/unigbrk/u-grapheme-breaks.h: Comment tweaks.
16968         * lib/uniwbrk/u-wordbreaks.h: Coding style and comment tweaks.
16969         * lib/uniwbrk/wbrktable.c: Comment tweaks.
16971 2021-12-28  Paul Eggert  <eggert@cs.ucla.edu>
16973         perl: let caller see whether perl was found
16974         Problem reported for coreutils by Serge Belyshev (Bug#52844).
16975         * m4/perl.m4 (gl_PERL): Use AC_CACHE_CHECK, so that
16976         an invoker of gl_PERL can later inspect gl_cv_prog_perl
16977         to see whether perl was found.
16979 2021-12-28  Bruno Haible  <bruno@clisp.org>
16981         Fix --automake-subdir breakage (regression 2021-12-24).
16982         Reported by Bjarni Ingi Gislason <bjarniig@rhi.hi.is> in
16983         <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00156.html>.
16984         * build-aux/prefix-gnulib-mk (prefix_assignment): Don't change
16985         SED_HEADER_* variables.
16987 2021-12-26  Bruno Haible  <bruno@clisp.org>
16989         Update to Unicode 10.0.0.
16991         * lib/gen-uni-tables.c (PROP_REGIONAL_INDICATOR): New enum value.
16992         (fill_properties): Recognize property "Regional_Indicator".
16993         (is_property_regional_indicator): New function.
16994         (output_properties): Also output the data for regional_indicator.
16995         (get_lbp): Update such that unilbrk/lbrkprop.txt comes out as expected.
16996         Use is_property_regional_indicator.
16997         (get_wbp): Update such that uniwbrk/wbrkprop.txt comes out as expected.
16998         Use is_property_regional_indicator.
16999         (UC_JOINING_GROUP_MALAYALAM_*): New enum values.
17000         (fill_arabicshaping, joining_group_as_c_identifier): Recognize these
17001         joining groups.
17003         * lib/uniname/gen-uninames.lisp (main): Ignore empty lines and comment
17004         lines in the aliases file. Needed because since 2015-06-20, we use the
17005         unmodified Unicode NameAliases.txt file. Remove reference to undefined
17006         variable. Correct indentation.
17008         * lib/unictype.in.h (UC_PROPERTY_REGIONAL_INDICATOR,
17009         uc_is_property_regional_indicator): New declarations.
17010         * lib/unictype/pr_regional_indicator.c: New file.
17011         * modules/unictype/property-regional-indicator: New file.
17012         * modules/unictype/property-regional-indicator-tests: New file.
17013         * modules/unictype/property-all (Depends-on): Add
17014         unictype/property-regional-indicator.
17016         * lib/unictype.in.h (UC_JOINING_GROUP_MALAYALAM_*): New enum values.
17017         * lib/unictype/joininggroup_name.h: Add the MALAYALAM_* joining groups.
17018         * lib/unictype/joininggroup_byname.gperf: Likewise.
17020         * lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind):
17021         Update.
17022         * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
17023         0x0AFA..0x0AFF, 0x0D00, 0x0D3B..0x0D3C, 0x1DF6..0x1DF9,
17024         0x11A01..0x11A06, 0x11A09..0x11A0A, 0x11A33..0x11A38, 0x11A3B..0x11A3E,
17025         0x11A47, 0x11A51..0x11A56, 0x11A59..0x11A5B, 0x11A8A..0x11A96,
17026         0x11A98..0x11A99, 0x11D31..0x11D36, 0x11D3A, 0x11D3C..0x11D3D,
17027         0x11D3F..0x11D45, 0x11D47.
17029         * All generated files under lib/uni* and tests/uni*: Regenerate.
17030         * tests/uniname/NameAliases.txt: Update.
17031         * tests/uniname/UnicodeData.txt: Update.
17032         * tests/uninorm/NormalizationTest.txt: Update.
17033         * tests/unigbrk/GraphemeBreakTest.txt: Update.
17034         * tests/uniwbrk/WordBreakTest.txt: Update.
17036         * All the affected modules: Bump required libunistring version.
17038 2021-12-26  Bruno Haible  <bruno@clisp.org>
17040         pselect: Fix compilation error in C++ mode on AIX 7.
17041         * lib/sys_select.in.h (pselect): Use _GL_CXXALIAS_SYS_CAST instead of
17042         _GL_CXXALIAS_SYS.
17043         * doc/posix-functions/pselect.texi: Mention the AIX problem.
17045 2021-12-25  Bruno Haible  <bruno@clisp.org>
17047         gnulib-tool: Fix handling of module libtextstyle-optional.
17048         Reported by Paul Eggert in
17049         <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00152.html>.
17050         * gnulib-tool (func_repeat_module_in_tests): New function.
17051         (func_emit_tests_Makefile_am, func_create_testdir): Use it for the file
17052         list and when creating tests/Makefile.am.
17054 2021-12-25  Bruno Haible  <bruno@clisp.org>
17056         gnulib-tool: Respect applicability 'all' without --single-configure.
17057         * gnulib-tool (func_verify_tests_module): Treat modules with
17058         applicability 'all' like 'tests' modules, not like 'main' modules.
17060 2021-12-24  Paul Eggert  <eggert@cs.ucla.edu>
17062         maint: avoid empty lines in recipes
17063         AIX 7.2 ‘make’ complains about recipe lines that are empty after
17064         macro expansion, and I suppose there’s a good chance some
17065         non-POSIX ‘make’ would prohibit them.  Rework macros so
17066         that we can avoid them.
17067         * gnulib-tool (func_emit_lib_Makefile_am)
17068         (func_emit_tests_Makefile_am): Support @!NMD@ too.
17069         * modules/gen-header (@gl_V_at): New macro.
17070         * modules/alloca-opt, modules/argz, modules/assert-h:
17071         * modules/byteswap, modules/configmake, modules/ctype:
17072         * modules/dirent, modules/errno, modules/execinfo, modules/fcntl-h:
17073         * modules/float, modules/fnmatch-h, modules/getopt-posix:
17074         * modules/glob-h, modules/iconv-h, modules/ieee754-h:
17075         * modules/inttypes-incomplete, modules/langinfo:
17076         * modules/libtextstyle-optional, modules/limits-h, modules/locale:
17077         * modules/malloc-h, modules/math, modules/monetary, modules/netdb:
17078         * modules/openmp-init, modules/poll-h, modules/posix-shell:
17079         * modules/pthread-h, modules/pty, modules/sched, modules/search:
17080         * modules/signal-h, modules/sigsegv, modules/snippet/link-warning:
17081         * modules/spawn, modules/stdalign, modules/stdarg, modules/stdbool:
17082         * modules/stddef, modules/stdint, modules/stdio, modules/stdlib:
17083         * modules/stdnoreturn, modules/string, modules/strings:
17084         * modules/sysexits, modules/termios, modules/threads-h:
17085         * modules/time, modules/uchar, modules/unicase/base:
17086         * modules/uniconv/base, modules/unictype/base, modules/unigbrk/base:
17087         * modules/unilbrk/base, modules/uniname/base, modules/uninorm/base:
17088         * modules/unistd, modules/unistdio/base, modules/unistr/base:
17089         * modules/unitypes, modules/uniwbrk/base, modules/uniwidth/base:
17090         * modules/utime-h, modules/wchar, modules/wctype-h:
17091         Use it.
17093         maint: tight-scope.mk need not be read-only
17094         * top/maint.mk (tight-scope.mk): Don’t bother to make
17095         tight-scope.mk read-only either.
17097         maint: break out '&& mv $@-t $@'
17098         * build-aux/git-version-gen, config/argz.mk, modules/configmake:
17099         * modules/posix_spawnp-tests, modules/snippet/link-warning:
17100         * top/maint.mk:
17101         Break out '&& mv $@-t $@' to a separate line in the Make recipe,
17102         as this makes things a bit easier to debug.
17104         gen-header: new module
17105         Simplify header generation by using Makefile variables
17106         defined by a new gen-header module.
17107         * modules/gen-header: New module.
17108         * modules/alloca-opt, modules/argz, modules/arpa_inet:
17109         * modules/assert-h, modules/byteswap:
17110         * modules/ctype, modules/dirent, modules/dynarray, modules/errno:
17111         * modules/execinfo, modules/fcntl-h, modules/float:
17112         * modules/fnmatch-h, modules/getopt-posix, modules/glob-h:
17113         * modules/iconv-h, modules/ieee754-h, modules/inttypes-incomplete:
17114         * modules/langinfo, modules/libtextstyle-optional, modules/limits-h:
17115         * modules/locale, modules/malloc-h, modules/math, modules/monetary:
17116         * modules/net_if, modules/netdb, modules/netinet_in:
17117         * modules/openmp-init, modules/poll-h:
17118         * modules/pthread-h, modules/pty, modules/sched:
17119         * modules/scratch_buffer, modules/search, modules/selinux-h:
17120         * modules/signal-h, modules/sigsegv:
17121         * modules/spawn, modules/stdalign, modules/stdarg, modules/stdbool:
17122         * modules/stddef, modules/stdint, modules/stdio, modules/stdlib:
17123         * modules/stdnoreturn, modules/string, modules/strings:
17124         * modules/sys_file, modules/sys_ioctl, modules/sys_random:
17125         * modules/sys_resource, modules/sys_select, modules/sys_socket:
17126         * modules/sys_stat, modules/sys_time, modules/sys_times:
17127         * modules/sys_types, modules/sys_uio, modules/sys_utsname:
17128         * modules/sys_wait, modules/sysexits, modules/termios:
17129         * modules/threads-h, modules/time, modules/uchar:
17130         * modules/unicase/base, modules/unicase/special-casing:
17131         * modules/uniconv/base, modules/unictype/base, modules/unigbrk/base:
17132         * modules/unilbrk/base, modules/uniname/base, modules/uninorm/base:
17133         * modules/unistd, modules/unistdio/base, modules/unistr/base:
17134         * modules/unitypes, modules/uniwbrk/base, modules/uniwidth/base:
17135         * modules/utime-h, modules/wchar, modules/wctype-h:
17136         Depend on gen-header, and use its macros to simplify
17137         header generation.
17139 2021-12-24  Bruno Haible  <bruno@clisp.org>
17141         passfd: Fix compilation error on IRIX.
17142         * lib/passfd.c (sendfd): On IRIX, ignore CMSG_FIRSTHDR.
17143         (recvfd): Likewise. Produce a fake error ENOTCONN.
17145 2021-12-24  Bruno Haible  <bruno@clisp.org>
17147         tests: Fix link errors on AIX.
17148         * modules/fnmatch-h-c++-tests (Makefile.am): Link test-fnmatch-h-c++
17149         with $(LIB_MBRTOWC).
17150         * modules/glob-h-c++-tests (Makefile.am): Link test-glob-h-c++ with
17151         $(LIB_MBRTOWC).
17152         * modules/stdlib-c++-tests (Makefile.am): Link test-stdlib-c++ with
17153         $(GETLOADAVG_LIBS).
17154         * modules/sys_stat-c++-tests (Makefile.am): Link test-sys_stat-c++ with
17155         $(LIB_MBRTOWC).
17156         * modules/uchar-c++-tests (Makefile.am): Link test-uchar-c++ with
17157         $(LIBUNISTRING).
17159 2021-12-24  Bruno Haible  <bruno@clisp.org>
17161         hamt tests: Fix compilation error with AIX xlc.
17162         * tests/test-hamt.c (test_iterator): Don't use compound initializer.
17164 2021-12-24  Bruno Haible  <bruno@clisp.org>
17166         strerrorname_np: Fix compilation error on IRIX.
17167         * lib/strerrorname_np.c (strerrorname_np): Handle conflict between
17168         EDIRCORRUPTED and EFSCORRUPTED.
17169         * tests/test-strerrorname_np.c (main): Likewise.
17171 2021-12-24  Bruno Haible  <bruno@clisp.org>
17173         hamt: Fix compilation error on NetBSD 7.
17174         * lib/hamt.h (GL_HAMT_THREAD_SAFE): Define to 0 if the compiler is a
17175         GCC version < 4.9.
17177 2021-12-24  Bruno Haible  <bruno@clisp.org>
17179         search: Fix compilation errors with SunPRO C++ on Solaris 10.
17180         * lib/search.in.h (_gl_lsearch_compar_fn): New type.
17181         (lfind, lsearch): Use it.
17183 2021-12-24  Bruno Haible  <bruno@clisp.org>
17185         qsort_r: Fix compilation error with SunPRO C++ on Solaris 10.
17186         * lib/stdlib.in.h (_gl_qsort_r_compar_fn): New type.
17187         (qsort_r): Use it.
17188         * tests/test-stdlib-c++.cc (qsort_r): Don't test with SunPRO C++.
17190 2021-12-24  Bruno Haible  <bruno@clisp.org>
17192         threads-h tests: Avoid clang warnings.
17193         * tests/test-threads.c (main): Add 'default' to switch statements.
17195 2021-12-24  Bruno Haible  <bruno@clisp.org>
17197         doc: Small updates.
17198         * doc/glibc-functions/ptsname_r.texi: Update info regarding Mac OS X.
17199         * doc/posix-functions/getlogin_r.texi: Update info regarding FreeBSD.
17201 2021-12-22  Paul Eggert  <eggert@cs.ucla.edu>
17203         libgmp: omit redundant 'mkdir -p .'
17204         * modules/libgmp: Mark $(MKDIR) with @NMD@; this was missed
17205         in a previous pass.
17207         maint: omit unnecessary ‘rm -f $@-t $@’
17208         * modules/alloca-opt, modules/argz, modules/arpa_inet:
17209         * modules/assert-h, modules/byteswap, modules/configmake:
17210         * modules/ctype, modules/dirent, modules/dynarray, modules/errno:
17211         * modules/execinfo, modules/fcntl-h, modules/float:
17212         * modules/fnmatch-h, modules/getopt-posix, modules/glob-h:
17213         * modules/iconv-h, modules/ieee754-h, modules/inttypes-incomplete:
17214         * modules/langinfo, modules/libtextstyle-optional:
17215         * modules/limits-h, modules/langinfo, modules/libgmp, modules/limits-h:
17216         * modules/locale, modules/malloc-h, modules/math, modules/monetary:
17217         * modules/net_if, modules/netdb, modules/netinet_in:
17218         * modules/openmp-init, modules/poll-h, modules/posix-shell:
17219         * modules/posix_spawnp-tests, modules/pthread-h, modules/pty:
17220         * modules/sched, modules/scratch_buffer, modules/search:
17221         * modules/selinux-h, modules/signal-h, modules/sigsegv:
17222         * modules/snippet/link-warning, modules/spawn, modules/stdalign:
17223         * modules/stdarg, modules/stdbool, modules/stddef, modules/stdint:
17224         * modules/stdio, modules/stdlib, modules/stdnoreturn:
17225         * modules/string, modules/strings, modules/sys_file:
17226         * modules/sys_ioctl, modules/sys_random, modules/sys_resource:
17227         * modules/sys_select, modules/sys_socket, modules/sys_stat:
17228         * modules/sys_time, modules/sys_times, modules/sys_types:
17229         * modules/sys_uio, modules/sys_utsname, modules/sys_wait:
17230         * modules/sysexits, modules/termios, modules/threads-h:
17231         * modules/time, modules/uchar, modules/unicase/base:
17232         * modules/unicase/special-casing, modules/uniconv/base:
17233         * modules/unictype/base, modules/unigbrk/base, modules/unilbrk/base:
17234         * modules/uniname/base, modules/uninorm/base, modules/unistd:
17235         * modules/unistdio/base, modules/unistr/base, modules/unitypes:
17236         * modules/uniwbrk/base, modules/uniwidth/base, modules/utime-h:
17237         * modules/wchar, modules/wctype-h:
17238         Don’t bother to do a ‘rm -f $@-t $@’ at the start of recipes that
17239         create .h and similar files.  This is a revenant of a style in
17240         which the files were created read-only.  Also, consistently use
17241         use plain ‘mv $@-t $@’ afterwards, instead of usually using
17242         ‘mv -f’ but sometimes plain ‘mv’.
17244 2021-12-21  Paul Eggert  <eggert@cs.ucla.edu>
17246         maint: fix __clang_major__ misspellings
17247         The intprops.h typo fix should fix a bug in Emacs on Debian testing
17248         with clang <https://bugs.gnu.org/52711>.
17249         * lib/asyncsafe-spin.c, lib/intprops.h, lib/pthread-spin.c:
17250         Fix some misspellings of ‘__clang_major__’.
17251         I left one misspelling alone, in lib/cdefs.h,
17252         and instead reported that bug upstream here:
17253         https://sourceware.org/pipermail/libc-alpha/2021-December/134512.html
17255 2021-12-21  Bruno Haible  <bruno@clisp.org>
17257         get_ppid_of, get_progname_of: Fix runtime error on Mac OS X < 10.5.
17258         Reported by Evan Miller <emmiller@gmail.com>
17259         <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00081.html>.
17260         * lib/get_ppid_of.c (proc_pidinfo): Declare with WEAK_IMPORT_ATTRIBUTE.
17261         (get_ppid_of): Test whether the symbol declared weak evaluates to
17262         non-NULL before invoking it.
17263         * lib/get_progname_of (proc_pidinfo): Declare with
17264         WEAK_IMPORT_ATTRIBUTE.
17265         (get_progname_of): Test whether the symbol declared weak evaluates to
17266         non-NULL before invoking it.
17268 2021-12-21  Paul Eggert  <eggert@cs.ucla.edu>
17270         Move AM_V_GEN to recipe start
17271         This is especially needed when building Emacs, as it uses
17272         ‘AM_V_GEN=@$(info GEN $@)', which means the GEN line is output by
17273         GNU make just before the recipe runs, regardless of where AM_V_GEN
17274         appears in the recipe.  And it’s also good practice even if the
17275         default Automake ‘AM_V_GEN=@echo GEN $@;’ is used, as it’s better
17276         to output the GEN line consistently at the start of every recipe,
17277         even if this precedes a preparatory command that almost always
17278         works silently.
17279         * modules/arpa_inet, modules/dynarray, modules/net_if:
17280         * modules/netinet_in, modules/scratch_buffer, modules/selinux-h:
17281         * modules/sys_file, modules/sys_ioctl, modules/sys_random:
17282         * modules/sys_resource, modules/sys_select, modules/sys_socket:
17283         * modules/sys_stat, modules/sys_time, modules/sys_times:
17284         * modules/sys_types, modules/sys_uio, modules/sys_utsname:
17285         * modules/sys_wait, modules/unicase/special-casing, top/maint.mk:
17286         Use AM_V_GEN only at the start of each recipe.
17288 2021-12-21  Bruno Haible  <bruno@clisp.org>
17290         c-xvasprintf: Fix declarations (regression 2021-08-07).
17291         * lib/c-xvasprintf.h (c_xasprintf, c_xvasprintf): Remove
17292         _GL_ATTRIBUTE_RETURNS_NONNULL attribute.
17294 2021-12-21  Bruno Haible  <bruno@clisp.org>
17296         snippet/warn-on-use: Fix compilation error in C++ mode on OpenBSD 7.0.
17297         * lib/warn-on-use.h (_GL_WARN_ON_USE): In C++ mode, declare function
17298         with "C" linkage.
17300 2021-12-21  Bruno Haible  <bruno@clisp.org>
17302         Optimize redundant 'mkdir -p .' invocations.
17303         Reported by Paul Eggert.
17304         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
17305         Eliminate @NMD@ tokens.
17306         * modules/alloca-opt (Makefile.am): Prefix the "$(MKDIR_P) '%reldir%'"
17307         line with @NMD@.
17308         * modules/argz (Makefile.am): Likewise.
17309         * modules/assert-h (Makefile.am): Likewise.
17310         * modules/byteswap (Makefile.am): Likewise.
17311         * modules/configmake (Makefile.am): Likewise.
17312         * modules/ctype (Makefile.am): Likewise.
17313         * modules/dirent (Makefile.am): Likewise.
17314         * modules/errno (Makefile.am): Likewise.
17315         * modules/execinfo (Makefile.am): Likewise.
17316         * modules/fcntl-h (Makefile.am): Likewise.
17317         * modules/float (Makefile.am): Likewise.
17318         * modules/fnmatch-h (Makefile.am): Likewise.
17319         * modules/getopt-posix (Makefile.am): Likewise.
17320         * modules/glob-h (Makefile.am): Likewise.
17321         * modules/iconv-h (Makefile.am): Likewise.
17322         * modules/ieee754-h (Makefile.am): Likewise.
17323         * modules/inttypes-incomplete (Makefile.am): Likewise.
17324         * modules/langinfo (Makefile.am): Likewise.
17325         * modules/libtextstyle-optional (Makefile.am): Likewise.
17326         * modules/limits-h (Makefile.am): Likewise.
17327         * modules/locale (Makefile.am): Likewise.
17328         * modules/malloc-h (Makefile.am): Likewise.
17329         * modules/math (Makefile.am): Likewise.
17330         * modules/monetary (Makefile.am): Likewise.
17331         * modules/netdb (Makefile.am): Likewise.
17332         * modules/openmp-init (Makefile.am): Likewise.
17333         * modules/poll-h (Makefile.am): Likewise.
17334         * modules/posix-shell (Makefile.am): Likewise.
17335         * modules/pthread-h (Makefile.am): Likewise.
17336         * modules/pty (Makefile.am): Likewise.
17337         * modules/sched (Makefile.am): Likewise.
17338         * modules/search (Makefile.am): Likewise.
17339         * modules/signal-h (Makefile.am): Likewise.
17340         * modules/sigsegv (Makefile.am): Likewise.
17341         * modules/snippet/link-warning (Makefile.am): Likewise.
17342         * modules/spawn (Makefile.am): Likewise.
17343         * modules/stdalign (Makefile.am): Likewise.
17344         * modules/stdarg (Makefile.am): Likewise.
17345         * modules/stdbool (Makefile.am): Likewise.
17346         * modules/stddef (Makefile.am): Likewise.
17347         * modules/stdint (Makefile.am): Likewise.
17348         * modules/stdio (Makefile.am): Likewise.
17349         * modules/stdlib (Makefile.am): Likewise.
17350         * modules/stdnoreturn (Makefile.am): Likewise.
17351         * modules/string (Makefile.am): Likewise.
17352         * modules/strings (Makefile.am): Likewise.
17353         * modules/sysexits (Makefile.am): Likewise.
17354         * modules/termios (Makefile.am): Likewise.
17355         * modules/threads-h (Makefile.am): Likewise.
17356         * modules/time (Makefile.am): Likewise.
17357         * modules/uchar (Makefile.am): Likewise.
17358         * modules/unicase/base (Makefile.am): Likewise.
17359         * modules/uniconv/base (Makefile.am): Likewise.
17360         * modules/unictype/base (Makefile.am): Likewise.
17361         * modules/unigbrk/base (Makefile.am): Likewise.
17362         * modules/unilbrk/base (Makefile.am): Likewise.
17363         * modules/uniname/base (Makefile.am): Likewise.
17364         * modules/uninorm/base (Makefile.am): Likewise.
17365         * modules/unistd (Makefile.am): Likewise.
17366         * modules/unistdio/base (Makefile.am): Likewise.
17367         * modules/unistr/base (Makefile.am): Likewise.
17368         * modules/unitypes (Makefile.am): Likewise.
17369         * modules/uniwbrk/base (Makefile.am): Likewise.
17370         * modules/uniwidth/base (Makefile.am): Likewise.
17371         * modules/utime-h (Makefile.am): Likewise.
17372         * modules/wchar (Makefile.am): Likewise.
17373         * modules/wctype-h (Makefile.am): Likewise.
17375 2021-12-19  Bruno Haible  <bruno@clisp.org>
17377         non-recursive-gnulib-prefix-hack: Deprecate module.
17378         * modules/non-recursive-gnulib-prefix-hack (Status, Notice): New
17379         sections.
17381 2021-12-19  Bruno Haible  <bruno@clisp.org>
17383         gnulib-tool: Don't insist on ACLOCAL_AMFLAGS.
17384         Reported by Bjarni Ingi Gislason <bjarniig@rhi.hi.is> in
17385         <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00112.html>.
17386         * gnulib-tool (func_import): Mention an AC_CONFIG_MACRO_DIRS invocation
17387         as an alternative to augmenting ACLOCAL_AMFLAGS.
17388         (--import, --add-import, --remove-import, --update): To find the m4
17389         directories, look also for AC_CONFIG_MACRO_DIR and AC_CONFIG_MACRO_DIRS
17390         invocations in configure.ac.
17392 2021-12-18  Bruno Haible  <bruno@clisp.org>
17394         nstrftime: Update meta info.
17395         * config/srclist.txt: Fix typo from 2017-07-23.
17397 2021-12-18  Bruno Haible  <bruno@clisp.org>
17399         stdint: Fix handling of limits.h (regression 2021-12-16).
17400         * modules/stdint (configure.ac): Revert last change.
17401         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
17402         If --gnu-make is used, assume that AC_SUBSTed variables for conditionals
17403         are constructed by appending the suffix '_CONDITION'.
17405 2021-12-18  Paul Eggert  <eggert@cs.ucla.edu>
17407         nstrftime: simplify by using libc-config.h.
17408         * lib/nstrftime.c [!_LIBC]: Include libc-config.h
17409         instead of config.h.
17410         (iso_week_days): Simplify via libc-config.h’s __inline.
17411         (my_strftime): Simplify via libc-config.h’s libc_hidden_def.
17412         * modules/nstrftime (Depends-on): Add libc-config.
17414 2021-12-18  Bruno Haible  <bruno@clisp.org>
17416         libtextstyle-optional: Fix generation of textstyle.h (regr. 2021-12-15).
17417         * m4/libtextstyle-optional.m4 (gl_LIBTEXTSTYLE_OPTIONAL): Invoke
17418         gl_CONDITIONAL_HEADER.
17420 2021-12-18  Bruno Haible  <bruno@clisp.org>
17422         Fix support for --gnu-make in tests (regression 2021-12-15).
17423         * gnulib-tool (func_emit_tests_Makefile_am): When producing output for
17424         GNU make, eliminate %reldir% tokens.
17426 2021-12-17  Bruno Haible  <bruno@clisp.org>
17428         getopt-posix: Fix build on AIX (regression 2021-12-15).
17429         * modules/getopt-posix (configure.ac): Arrange to generate
17430         getopt-cdefs.h.
17431         (Makefile.am): Separate the rules for getopt.h and getopt-cdefs.h.
17433 2021-12-16  Paul Eggert  <eggert@cs.ucla.edu>
17435         getopt-posix: omit unnessary building of getopt.h
17436         * modules/getopt-posix (getopt.h, getopt-cdefs.h):
17437         Build only if GL_GENERATE_GETOPT_H.
17439         stdint: omit duplicate gl_CONFIGURE_HEADER calls
17440         * modules/stdint (configure.ac): Omit
17441         ‘gl_CONDITIONAL_HEADER([limits.h])’, since stdint depends on
17442         limits-h and doing gl_CONDITIONAL_HEADER twice can result in
17443         ‘configure’ failing with “*** GL_GENERATE_LIMITS_H is not set
17444         correctly”.
17446 2021-12-15  Bruno Haible  <bruno@clisp.org>
17448         automake-subdir support: Support the libunistring modules.
17449         * m4/libunistring-base.m4 (gl_LIBUNISTRING_LIBHEADER): Use the value of
17450         the gl_source_base_prefix variable.
17452 2021-12-15  Bruno Haible  <bruno@clisp.org>
17454         automake-subdir support: Support arbitrary --source-base value.
17455         Reported by Marc Nieper-Wißkirchen in
17456         <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00066.html>.
17457         * build-aux/prefix-gnulib-mk ($canon_prefix): New variable.
17458         (prefix): Initialize it.
17459         (prefix_assignment): Use it.
17461 2021-12-15  Bruno Haible  <bruno@clisp.org>
17463         automake-subdir support: Look for 'subdir-objects' also in configure.ac.
17464         * gnulib-tool: Look for the automake options also in the first argument
17465         of the AM_INIT_AUTOMAKE invocation in configure.ac.
17467 2021-12-15  Bruno Haible  <bruno@clisp.org>
17469         Add simple examples.
17470         * examples: New directory.
17472 2021-12-15  Bruno Haible  <bruno@clisp.org>
17474         Accommodate non-recursive Automake in a less hacky way.
17475         * gnulib-tool: New option --automake-subdir.
17476         (automake_subdir): New variable.
17477         (func_emit_initmacro_end): Add a second argument. Use it to prefix each
17478         object file name in *_LIBOBJS and *_LTLIBOBJS.
17479         (func_emit_shellvars_init): New function.
17480         (func_import): Add support for --automake-subdir. Invoke
17481         prefix-gnulib-mk. Update calls to func_emit_initmacro_end. Call
17482         func_emit_shellvars_init.
17483         (func_create_testdir): Update calls to func_emit_initmacro_end. Call
17484         func_emit_shellvars_init.
17485         * m4/gnulib-tool.m4 (gl_AUTOMAKE_SUBDIR): New macro.
17486         * m4/gnulib-common.m4 (gl_CONDITIONAL_HEADER): Use the value of the
17487         gl_source_base_prefix variable.
17488         * build-aux/prefix-gnulib-mk: New options --from-gnulib-tool, --prefix.
17489         (contents_of_file): Renamed from contents.
17490         (contents_of_stdin): New function.
17491         (process): Inline and remove function.
17492         * doc/gnulib-tool.texi (Non-recursive make): New section.
17494 2021-12-15  Bruno Haible  <bruno@clisp.org>
17496         Move .h file names out of the *.m4 files.
17497         This is useful because Autoconf macros defined in *.m4 files can be
17498         AC_REQUIREd. In the configure file, they are then expanded before
17499         gl_INIT, i.e. at a place where it is not known whether they are required
17500         for the lib/ or for the tests/ directory (or both).
17501         * m4/gnulib-common.m4 (gl_CONDITIONAL_HEADER): New macro.
17502         * m4/alloca.m4 (gl_FUNC_ALLOCA): Set GL_GENERATE_ALLOCA_H instead of
17503         ALLOCA_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
17504         * modules/alloca-opt (configure.ac): Invoke gl_CONDITIONAL_HEADER.
17505         * m4/argz.m4 (gl_FUNC_ARGZ): Set GL_GENERATE_ARGZ_H instead of ARGZ_H.
17506         Drop AC_SUBST and AM_CONDITIONAL invocations.
17507         * modules/argz (configure.ac): Invoke gl_CONDITIONAL_HEADER.
17508         * m4/assert_h.m4 (gl_ASSERT_H): Set GL_GENERATE_ASSERT_H instead of
17509         ASSERT_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
17510         * modules/assert-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
17511         * m4/byteswap.m4 (gl_BYTESWAP): Set GL_GENERATE_BYTESWAP_H instead of
17512         BYTESWAP_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
17513         * modules/byteswap (configure.ac): Invoke gl_CONDITIONAL_HEADER.
17514         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Set GL_GENERATE_ERRNO_H instead of
17515         ERRNO_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
17516         (gl_REPLACE_ERRNO_VALUE): Update.
17517         * m4/perror.m4 (gl_FUNC_PERROR): Update.
17518         * m4/strerror.m4 (gl_FUNC_STRERROR): Update.
17519         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R, gl_FUNC_STRERROR_R_WORKS):
17520         Update.
17521         * modules/errno (configure.ac): Invoke gl_CONDITIONAL_HEADER.
17522         * m4/execinfo.m4 (gl_EXECINFO_H): Set GL_GENERATE_EXECINFO_H instead of
17523         EXECINFO_H. Drop AC_SUBST and AM_CONDITIONAL invocations. Drop AC_LIBOBJ
17524         invocation.
17525         * modules/execinfo (configure.ac): Invoke gl_CONDITIONAL_HEADER and
17526         AC_LIBOBJ.
17527         * m4/float_h.m4 (gl_FLOAT_H): Set GL_GENERATE_FLOAT_H instead of
17528         FLOAT_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
17529         * modules/float (configure.ac): Invoke gl_CONDITIONAL_HEADER.
17530         * m4/fnmatch_h.m4 (gl_FNMATCH_H, gl_REPLACE_FNMATCH_H): Set
17531         GL_GENERATE_FNMATCH_H instead of FNMATCH_H. Drop AC_SUBST and
17532         AM_CONDITIONAL invocations.
17533         * modules/fnmatch-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
17534         * modules/fnmatch (configure.ac): Likewise.
17535         * m4/getopt.m4 (gl_FUNC_GETOPT_POSIX, gl_GETOPT_SUBSTITUTE_HEADER): Set
17536         GL_GENERATE_GETOPT_H instead of GETOPT_H. Set GL_GENERATE_GETOPT_CDEFS_H
17537         instead of GETOPT_CDEFS_H. Drop AC_SUBST invocations.
17538         * modules/getopt-posix (configure.ac): Invoke gl_CONDITIONAL_HEADER.
17539         * m4/glob_h.m4 (gl_GLOB_H, gl_REPLACE_GLOB_H): Set GL_GENERATE_GLOB_H
17540         instead of GLOB_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
17541         * modules/glob-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
17542         * modules/glob (configure.ac): Likewise.
17543         * m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS, gl_REPLACE_ICONV_H): Set
17544         GL_GENERATE_ICONV_H instead of ICONV_H. Drop AC_SUBST and AM_CONDITIONAL
17545         invocations.
17546         (gl_ICONV_H): Update.
17547         * modules/iconv-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
17548         * modules/iconv_open (configure.ac): Likewise.
17549         * m4/ieee754-h.m4 (gl_IEEE754_H): Set GL_GENERATE_IEEE754_H instead of
17550         IEEE754_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
17551         * modules/ieee754-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
17552         * m4/libgmp.m4 (gl_LIBGMP): Set GL_GENERATE_GMP_H instead of GMP_H. Drop
17553         AC_SUBST invocation.
17554         * modules/libgmp (configure.ac): Invoke gl_CONDITIONAL_HEADER.
17555         (Makefile.am): Use GL_GENERATE_GMP_H.
17556         * m4/libtextstyle-optional.m4 (gl_LIBTEXTSTYLE_OPTIONAL): Set
17557         GL_GENERATE_TEXTSTYLE_H instead of TEXTSTYLE_H. Drop AC_SUBST and
17558         AM_CONDITIONAL invocations.
17559         * modules/libtextstyle-optional (configure.ac): Invoke
17560         gl_CONDITIONAL_HEADER.
17561         * m4/limits-h.m4 (gl_LIMITS_H, gl_REPLACE_LIMITS_H): Set
17562         GL_GENERATE_LIMITS_H instead of LIMITS_H. Drop AC_SUBST and
17563         AM_CONDITIONAL invocations.
17564         * modules/limits-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
17565         * m4/monetary_h.m4 (gl_MONETARY_H): Set GL_GENERATE_MONETARY_H instead
17566         of MONETARY_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
17567         * modules/monetary (configure.ac): Invoke gl_CONDITIONAL_HEADER.
17568         * m4/net_if_h.m4 (gl_HEADER_NET_IF): Set GL_GENERATE_NET_IF_H instead of
17569         NET_IF_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
17570         * modules/net_if (configure.ac): Invoke gl_CONDITIONAL_HEADER.
17571         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Set
17572         GL_GENERATE_NETINET_IN_H instead of NETINET_IN_H. Drop AC_SUBST and
17573         AM_CONDITIONAL invocations.
17574         * modules/netinet_in (configure.ac): Invoke gl_CONDITIONAL_HEADER.
17575         * m4/selinux-context-h.m4 (gl_HEADERS_SELINUX_CONTEXT_H): Set
17576         GL_GENERATE_SELINUX_CONTEXT_H instead of SELINUX_CONTEXT_H. Drop
17577         AC_SUBST and AM_CONDITIONAL invocations.
17578         * m4/selinux-label-h.m4 (gl_HEADERS_SELINUX_LABEL_H): Set
17579         GL_GENERATE_SELINUX_LABEL_H instead of SELINUX_LABEL_H. Drop AC_SUBST
17580         and AM_CONDITIONAL invocations.
17581         * modules/selinux-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
17582         * m4/stdalign.m4 (gl_STDALIGN_H): Set GL_GENERATE_STDALIGN_H instead of
17583         STDALIGN_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
17584         * modules/stdalign (configure.ac): Invoke gl_CONDITIONAL_HEADER.
17585         * m4/stdarg.m4 (gl_STDARG_H): Set GL_GENERATE_STDARG_H instead of
17586         STDARG_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
17587         * modules/stdarg (configure.ac): Invoke gl_CONDITIONAL_HEADER.
17588         * m4/stdbool.m4 (gl_STDBOOL_H): Renamed from AM_STDBOOL_H. Set
17589         GL_GENERATE_STDBOOL_H instead of STDBOOL_H. Drop AC_SUBST and
17590         AM_CONDITIONAL invocations.
17591         * m4/parse-datetime.m4 (gl_PARSE_DATETIME): Don't require AM_STDBOOL_H.
17592         * modules/stdbool (configure.ac): Invoke gl_STDBOOL_H instead of
17593         AM_STDBOOL_H. Invoke gl_CONDITIONAL_HEADER.
17594         * m4/stddef_h.m4 (gl_STDDEF_H): Set GL_GENERATE_STDDEF_H instead of
17595         STDDEF_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
17596         * modules/stddef (configure.ac): Invoke gl_CONDITIONAL_HEADER.
17597         * m4/stdint.m4 (gl_STDINT_H): Set GL_GENERATE_STDINT_H instead of
17598         STDINT_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
17599         * m4/inttypes.m4 (gl_INTTYPES_PRI_SCN): Update.
17600         * modules/stdint (configure.ac): Invoke gl_CONDITIONAL_HEADER.
17601         * m4/stdnoreturn.m4 (gl_STDNORETURN_H): Set GL_GENERATE_STDNORETURN_H
17602         instead of STDNORETURN_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
17603         * modules/stdnoreturn (configure.ac): Invoke gl_CONDITIONAL_HEADER.
17604         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_H): Set GL_GENERATE_SYS_SOCKET_H
17605         instead of SYS_SOCKET_H.
17606         * m4/sysexits.m4 (gl_SYSEXITS): Set GL_GENERATE_SYSEXITS_H instead of
17607         SYSEXITS_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
17608         * modules/sysexits (configure.ac): Invoke gl_CONDITIONAL_HEADER.
17609         * modules/sigsegv (configure.ac): Set GL_GENERATE_SIGSEGV_H instead of
17610         SIGSEGV_H. Drop AC_SUBST and AM_CONDITIONAL invocations. Invoke
17611         gl_CONDITIONAL_HEADER.
17613 2021-12-15  Bruno Haible  <bruno@clisp.org>
17615         Fix creation of build directories with non-recursive-gnulib-prefix-hack.
17616         This is necessary for executing "make" in a VPATH build of a package
17617         that uses prefix-gnulib-mk and a module such as alloca-opt.
17618         * modules/alloca-opt (Makefile.am): Before generating the .h-t file,
17619         ensure that the directory in which we want to create it exists.
17620         (configure.ac): Invoke AC_PROG_MKDIR_P.
17621         * modules/argz: Likewise.
17622         * modules/arpa_inet: Likewise.
17623         * modules/assert-h: Likewise.
17624         * modules/byteswap: Likewise.
17625         * modules/configmake: Likewise.
17626         * modules/ctype: Likewise.
17627         * modules/dirent: Likewise.
17628         * modules/dynarray: Likewise.
17629         * modules/errno: Likewise.
17630         * modules/execinfo: Likewise.
17631         * modules/fcntl-h: Likewise.
17632         * modules/float: Likewise.
17633         * modules/fnmatch-h: Likewise.
17634         * modules/getopt-posix: Likewise.
17635         * modules/glob-h: Likewise.
17636         * modules/iconv-h: Likewise.
17637         * modules/ieee754-h: Likewise.
17638         * modules/inttypes-incomplete: Likewise.
17639         * modules/langinfo: Likewise.
17640         * modules/libgmp: Likewise.
17641         * modules/libtextstyle-optional: Likewise.
17642         * modules/limits-h: Likewise.
17643         * modules/locale: Likewise.
17644         * modules/malloc-h: Likewise.
17645         * modules/math: Likewise.
17646         * modules/monetary: Likewise.
17647         * modules/net_if: Likewise.
17648         * modules/netdb: Likewise.
17649         * modules/netinet_in: Likewise.
17650         * modules/openmp-init: Likewise.
17651         * modules/poll-h: Likewise.
17652         * modules/posix-shell: Likewise.
17653         * modules/pthread-h: Likewise.
17654         * modules/pty: Likewise.
17655         * modules/sched: Likewise.
17656         * modules/scratch_buffer: Likewise.
17657         * modules/search: Likewise.
17658         * modules/selinux-h: Likewise.
17659         * modules/signal-h: Likewise.
17660         * modules/sigsegv: Likewise.
17661         * modules/snippet/link-warning: Likewise.
17662         * modules/spawn: Likewise.
17663         * modules/stdalign: Likewise.
17664         * modules/stdarg: Likewise.
17665         * modules/stdbool: Likewise.
17666         * modules/stddef: Likewise.
17667         * modules/stdint: Likewise.
17668         * modules/stdio: Likewise.
17669         * modules/stdlib: Likewise.
17670         * modules/stdnoreturn: Likewise.
17671         * modules/string: Likewise.
17672         * modules/strings: Likewise.
17673         * modules/sys_file: Likewise.
17674         * modules/sys_ioctl: Likewise.
17675         * modules/sys_random: Likewise.
17676         * modules/sys_resource: Likewise.
17677         * modules/sys_select: Likewise.
17678         * modules/sys_socket: Likewise.
17679         * modules/sys_stat: Likewise.
17680         * modules/sys_time: Likewise.
17681         * modules/sys_times: Likewise.
17682         * modules/sys_types: Likewise.
17683         * modules/sys_uio: Likewise.
17684         * modules/sys_utsname: Likewise.
17685         * modules/sys_wait: Likewise.
17686         * modules/sysexits: Likewise.
17687         * modules/termios: Likewise.
17688         * modules/threads-h: Likewise.
17689         * modules/time: Likewise.
17690         * modules/uchar: Likewise.
17691         * modules/unicase/base: Likewise.
17692         * modules/unicase/special-casing: Likewise.
17693         * modules/uniconv/base: Likewise.
17694         * modules/unictype/base: Likewise.
17695         * modules/unigbrk/base: Likewise.
17696         * modules/unilbrk/base: Likewise.
17697         * modules/uniname/base: Likewise.
17698         * modules/uninorm/base: Likewise.
17699         * modules/unistd: Likewise.
17700         * modules/unistdio/base: Likewise.
17701         * modules/unistr/base: Likewise.
17702         * modules/unitypes: Likewise.
17703         * modules/uniwbrk/base: Likewise.
17704         * modules/uniwidth/base: Likewise.
17705         * modules/utime-h: Likewise.
17706         * modules/wchar: Likewise.
17707         * modules/wctype-h: Likewise.
17708         * gnulib-tool (func_emit_lib_Makefile_am): When producing output for
17709         GNU make, eliminate %reldir% tokens.
17711 2021-12-15  Bruno Haible  <bruno@clisp.org>
17713         non-recursive-gnulib-prefix-hack: Remove obsolete code.
17714         * build-aux/prefix-gnulib-mk (prefix): Remove handling of t-$@ pattern.
17716 2021-12-15  Bruno Haible  <bruno@clisp.org>
17718         Indentation fix.
17719         * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Correct indentation.
17721 2021-12-14  Paul Eggert  <eggert@cs.ucla.edu>
17723         renameatu: port to macOS tmpfs
17724         Problem reported by Sudhip Nashi (Bug#52193).
17725         * lib/renameatu.c (renameat2ish) [HAVE_RENAMEAT]: New function.
17726         (renameatu): Use the new function, to avoid a bug when
17727         renameatx_np fails with errno == ENOTSUP.  Don’t try to support
17728         RENAME_EXCHANGE; the old code didn’t work and nobody using using
17729         RENAME_EXCHANGE anyway.
17731 2021-12-12  Bruno Haible  <bruno@clisp.org>
17733         gnulib-tool: Try to support non-recursive-gnulib-prefix-hack with tests.
17734         * gnulib-tool (func_import): Synthesize an AC_CONFIG_LIBOBJ_DIR
17735         invocation.
17736         * m4/non-recursive-gnulib-prefix-hack.m4
17737         (gl_NON_RECURSIVE_GNULIB_PREFIX_HACK): Don't invoke
17738         AC_CONFIG_LIBOBJ_DIR.
17740 2021-12-12  Paul Eggert  <eggert@cs.ucla.edu>
17742         bootstrap: refactor for GNU tar
17743         * build-aux/bootstrap (gitignore_entries, insert_if_absent)
17744         (insert_vc_ignore, symlink_to_dir): Define these shell functions
17745         before including bootstrap.conf.  This is for GNU tar, whose
17746         bootstrap.conf uses symlink_to_dir.
17748 2021-12-12  Bruno Haible  <bruno@clisp.org>
17750         gnulib-tool: Support different basenames for the lib/,tests/ Makefiles.
17751         * gnulib-tool: New option --tests-makefile-name.
17752         (tests_makefile_name): New variable.
17753         (func_import): Add support for --tests-makefile-name. Replace local
17754         variable makefile_am with two local variables source_makefile_am,
17755         tests_makefile_am.
17756         * m4/gnulib-tool.m4 (gl_TESTS_MAKEFILE_NAME): New macro.
17758 2021-12-11  Bruno Haible  <bruno@clisp.org>
17760         get_ppid_of, get_progname_of: Fix compilation error on Mac OS X < 10.5.
17761         Reported by Ryan Schmidt <gnulib@ryandesign.com> in
17762         <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00011.html>.
17763         * lib/get_ppid_of.c: Include AvailabilityMacros.h
17764         (get_ppid_of): Use MAC_OS_X_VERSION_MAX_ALLOWED and
17765         MAC_OS_X_VERSION_MIN_REQUIRED.
17766         * lib/get_progname_of: Include AvailabilityMacros.h
17767         (get_progname_of): Use MAC_OS_X_VERSION_MAX_ALLOWED and
17768         MAC_OS_X_VERSION_MIN_REQUIRED.
17770 2021-12-10  Paul Eggert  <eggert@cs.ucla.edu>
17772         backupfile: assume C99 decls
17773         * lib/backupfile.c: Use C99-style decls after statements.
17775         backupfile: prefer signed integers
17776         * lib/backupfile.c: Include ialloc.h instead of idx.h.
17777         Prefer idx_t to size_t where either will do.
17778         Use imalloc and irealloc instead of malloc and realloc.
17780         * modules/backupfile, modules/backup-rename (Depends-on):
17781         Depend on ialloc not idx.
17783         backupfile: fix numbered backups for XXX/
17784         * lib/backupfile.c (check_extension): Return a bool indicating
17785         whether the original extension was OK.  Caller changed.
17786         (numbered_backup): Require that FILELEN does not count
17787         trailing slashes after a non-slash, and don’t require
17788         that *BUF be null-terminated.  Caller changed.
17789         This fixes a bug where the numbered backup file name for X/ was
17790         incorrectly computed because the slash messed up the code
17791         looking for X.~1~, X.~2~, etc., and this caused numbered_backup
17792         to loop forever.  Also, check that check_extension doesn’t
17793         truncate a file name leading to an infloop.
17795 2021-12-07  Paul Eggert  <eggert@cs.ucla.edu>
17797         regex: pacify Coverity clean_state_log_if_needed
17798         Problem reported by Robbie Harwood in:
17799         https://lists.gnu.org/r/bug-gnulib/2021-12/msg00005.html
17800         * lib/regexec.c (clean_state_log_if_needed):
17801         Add a DEBUG_ASSERT; this both pacifies Coverity and
17802         will help to debug in case some other change mistakenly
17803         causes the assertion to become false.
17805 2021-12-07  Bruno Haible  <bruno@clisp.org>
17807         gettext-h: Optimize also for clang.
17808         * lib/gettext.h (pgettext_aux, npgettext_aux, dcpgettext_expr,
17809         dcnpgettext_expr): Inline also on clang.
17811 2021-12-06  Bruno Haible  <bruno@clisp.org>
17813         intprops: Break sync with glibc.
17814         * config/srclist.txt: Comment out intprops.h.
17816 2021-12-06  Paul Eggert  <eggert@cs.ucla.edu>
17818         intprops: streamline and get ready for Clang 14
17819         * lib/intprops.h (_GL_HAS_BUILTIN_ADD_OVERFLOW):
17820         Rely on __has_builtin first, since GCC didn’t introduce it until
17821         GCC 9 so we don’t need to special-case GCC first.
17822         (_GL_HAS_BUILTIN_ADD_OVERFLOW, _GL_HAS_BUILTIN_OVERFLOW_P):
17823         Look at __EDG__ rather than __ICC, since icc defines __EDG__ too.
17824         (_GL_HAS_BUILTIN_MUL_OVERFLOW): Define to 1 in Clang 14 and later,
17825         as a bug fix is scheduled for Clang 14.
17826         (_GL_HAS_BUILTIN_OVERFLOW_P): Do not bother to special-case
17827         __clang__, since __has_builtin should do the right thing anyway.
17829 2021-12-06  Bruno Haible  <bruno@clisp.org>
17831         intprops: Treat EDG-based compilers like Intel compilers.
17832         Reported by Ilya Kurdyukov <ilyakurdyukov@altlinux.org> in
17833         <https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00028.html>.
17834         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_P): Define to 0 on EDG-based
17835         compilers.
17837 2021-12-05  Bruno Haible  <bruno@clisp.org>
17839         sigsegv: Fix build on some more embedded CPUs.
17840         * m4/stack-direction.m4 (SV_STACK_DIRECTION): Assume the stack grows
17841         negative, when the GCC 11 sources say so.
17843 2021-11-30  Paul Eggert  <eggert@cs.ucla.edu>
17845         sys_random: port better to uClibc < 1.0.35
17846         Problem reported by Fabrice Fontaine in:
17847         https://lists.gnu.org/r/bug-gnulib/2021-11/msg00043.html
17848         * lib/sys_random.in.h [HAVE_SYS_RANDOM_H && !__GLIBC__ && __UCLIBC__]:
17849         Include <stddef.h>, in case this file is included before
17850         __UCLIBC__ is defined.
17852 2021-11-27  Paul Eggert  <eggert@cs.ucla.edu>
17854         gettext-h: document GNULIB_NO_VLA
17855         * doc/gnulib-readme.texi (C99 features avoided):
17856         Document GNULIB_NO_VLA.
17858         gettext-h: use VLA test similar to regex
17859         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Assuming
17860         GNULIB_NO_VLA, define if (defined __STDC_VERSION__ && 199901L <=
17861         __STDC_VERSION__ \ + && !defined __STDC_NO_VLA___), not if
17862         ((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__).
17863         This is more consistent with what the regex module does.
17864         * modules/gettext-h (Depends-on): Depend on vararrays, since
17865         lib/gettext.h uses __STDC_NO_VLA__.
17867         regex: port to tcc
17868         Problem reported by Benno Schulenberg in:
17869         https://lists.gnu.org/r/bug-gnulib/2021-11/msg00038.html
17870         * modules/regex (Depends-on): Depend on vararrays, since
17871         lib/regex.h uses __STDC_NO_VLA__.
17872         * modules/vararrays: Change license from LGPL to LGPLv2+.
17874 2021-11-25  Bernhard Voelker  <mail@bernhard-voelker.de>
17876         test-framework-sh: remove unsafe entries from PATH
17877         Running tests with '.' in the PATH may yield unspecified results,
17878         and is deemed unsafe per se.  This includes empty entries as well
17879         which are treated like a '.' entry as per POSIX.
17880         * tests/init.sh (setup_): Add snippet to remove relative and non-
17881         accessible entries from the PATH environment variable.
17883 2021-11-24  Paul Eggert  <eggert@cs.ucla.edu>
17885         regex: merge from glibc
17886         The main change here, imported from Glibc, is for the regex
17887         code to stop using nested functions when _LIBC is defined.
17888         The intent is for the result to be copied back to Glibc
17889         so that the two implementations can resync.
17890         * lib/regcomp.c (re_set_fastmap, seek_collating_symbol_entry)
17891         (lookup_collation_sequence_value, build_range_exp)
17892         (build_collating_symbol):
17893         * lib/regexec.c (acquire_init_state_context):
17894         Declare with __always_inline instead of with
17895         ‘inline __attribute__ ((always_inline))’.
17896         * lib/regexec.c (init_word_char):
17897         Move uint64_t comment to regex_internal.h.
17898         (parse_byte): Change multibyte-detecting arg from re_charset_t *
17899         to re_dfa_t const *.  All callers changed.
17900         (build_range_exp, build_collating_symbol) [!_LIBC]:
17901         Change signature to match _LIBC well enough so that the caller can
17902         be simplified to assume _LIBC.
17903         (parse_bracket_exp): Pull its nested functions
17904         seek_collating_symbol_entry, lookup_collation_sequence_value,
17905         build_range_exp, build_collating_symbol out to the top level,
17906         adding args to pass the information instead of having them access
17907         nonlocal vars.  Use types in local vars that do not assume glibc.
17908         * lib/regex_internal.h: Explain uint64_t etc. here.
17910 2021-11-23  Paul Eggert  <eggert@cs.ucla.edu>
17912         regex: assume RE_ENABLE_I18N
17913         These days there is no longer any need to port to platforms
17914         lacking iswctype etc., since Gnulib now has substitutes.
17915         * config/srclist.txt: Comment out regex_internal.c and
17916         regex_internal.h for now, since they no longer match glibc.
17917         The intent is to merge them again soon.
17918         * lib/regex_internal.h (RE_ENABLE_I18N): Remove.
17919         All uses changed to assume that RE_ENABLE_I18N is 1.
17920         * modules/regex (Depends-on): Add iswctype.
17922 2021-11-15  Paul Eggert  <eggert@cs.ucla.edu>
17924         lseek: port around macOS SEEK_HOLE glitch
17925         Problem reported by Sudhip Nashi (Bug#51857#47).
17926         * lib/lseek.c (rpl_lseek): Work around macOS lseek+SEEK_HOLE
17927         returning -1 with ENXIO if there are no holes before EOF,
17928         contrary to the macOS documentation.
17930         lseek: port around macOS SEEK_DATA glitch
17931         Problem reported by Sudhip Nashi (Bug#51857).
17932         * doc/posix-functions/lseek.texi (lseek): Mention macOS SEEK_DATA
17933         issue.
17934         * lib/lseek.c (rpl_lseek): Work around macOS portability glitch.
17935         * m4/lseek.m4 (gl_FUNC_LSEEK): Replace lseek on Darwin.
17936         * modules/lseek (Depends-on): Depend on msvc-nothrow
17937         and fstat only if needed.
17939 2021-11-11  Fabrice Fontaine  <fontaine.fabrice@gmail.com>  (tiny change)
17941         sigsegv: fix builds on microblazeel, or1k
17942         * m4/stack-direction.m4 (SV_STACK_DIRECTION):
17943         Assume it grows negative on microblaze* and or1k.
17945 2021-11-09  Paul Eggert  <eggert@cs.ucla.edu>
17947         exclude: yield proper errno on failure
17948         * lib/exclude.c (add_exclude_file): Do not assume that fclose
17949         preserves errno on success.
17951 2021-11-07  Paul Eggert  <eggert@cs.ucla.edu>
17953         regex: break regcomp.c link with glibc
17954         Problem reported by Bruno Haible in:
17955         https://lists.gnu.org/r/bug-gnulib/2021-11/msg00005.html
17956         * config/srclist.txt: Comment out regcomp.c for now.
17957         * lib/regcomp.c: Revert previous change.
17959 2021-10-24  Bruno Haible  <bruno@clisp.org>
17961         string: Avoid syntax error re strdup in string.in.h (regr. 2021-09-07).
17962         Reported by Jan Engelhardt <jengelh@inai.de>
17963         and by Arash Esbati <arash@gnu.org> via Andy Moreton in
17964         <https://lists.gnu.org/archive/html/bug-gnulib/2021-10/msg00058.html>.
17965         * lib/string.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEALLOC_FREE,
17966         _GL_ATTRIBUTE_MALLOC): Add fallback declarations, like in
17967         lib/stdlib.in.h.
17968         * lib/wchar.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEALLOC_FREE,
17969         _GL_ATTRIBUTE_MALLOC): Likewise.
17971 2021-10-19  Paul Eggert  <eggert@cs.ucla.edu>
17973         xalloc: new function xinmalloc
17974         * lib/xmalloc.c (xinmalloc): New function, which is like
17975         xnmalloc but for idx_t instead of size_t.
17977 2021-10-18  Paul Eggert  <eggert@cs.ucla.edu>
17979         regex: fix buffer read overrrun
17980         * lib/regexec.c (re_search_internal):
17981         Fix buffer read overrun reported by Benno Schulenberg in:
17982         https://lists.gnu.org/r/bug-gnulib/2021-10/msg00035.html
17984 2021-10-15  Paul Eggert  <eggert@cs.ucla.edu>
17986         nproc: port better to macOS 10.14
17987         * lib/nproc.c (num_processors_ignoring_omp)
17988         [HAVE_SYSCTL && !defined __GLIBC__ && defined HW_NCPU]:
17989         Do not use a const mib, as macOS 10.14 rejects this.
17991 2021-10-13  Paul Eggert  <eggert@cs.ucla.edu>
17993         sigsegv: fix quoting problem
17994         Problem reported for FreeBSD ports by Alexey Dokuchaev in:
17995         https://bugs.gnu.org/51144
17996         * m4/stack-direction.m4 (SV_STACK_DIRECTION): Quote brackets.
17998 2021-10-10  Paul Eggert  <eggert@cs.ucla.edu>
18000         nproc: port better to OpenBSD
18001         Problem reported by Omar Polo in:
18002         https://lists.gnu.org/r/emacs-devel/2021-10/msg00692.html
18003         * lib/nproc.c (num_processors_ignoring_omp): Prefer HW_NCPUONLINE
18004         to HW_NCPU, for OpenBSD.  Also, make mib const.
18006 2021-10-02  Paul Eggert  <eggert@cs.ucla.edu>
18008         timer-time: port better to OpenBSD 6.9
18009         * m4/timer_time.m4 (gl_TIMER_TIME): Also require timer_settime to
18010         be declared, as it exists in OpenBSD but always fails with ENOSYS.
18012         sys_select: port better to OpenBSD 6.9
18013         OpenBSD 6.9’s <sys/time.h> includes <sys/select.h> which then
18014         includes <signal.h>, which caused coreutils/lib/nproc.c compiles
18015         to fail with "/usr/include/signal.h:57: warning: 'struct
18016         sigaction' declared inside parameter list".  Fix this.
18017         * lib/sys_select.in.h [__OpenBSD__]: Simply delegate to the system
18018         header if being included from <sys/time.h>.
18020 2021-09-22  Bruno Haible  <bruno@clisp.org>
18022         doc: Fix outdated statement about Spanish collation.
18023         Reported by Dietmar Schindler in
18024         <https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00095.html>.
18025         * doc/regex.texi (Collating Elements vs. Characters): Choose another
18026         example of a digraph with special collation.
18028         doc: Don't assume that the output format is TeX-based or info.
18029         Reported by Dietmar Schindler in
18030         <https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00095.html>.
18031         * doc/regex.texi (Collating Elements vs. Characters): Assume a texinfo
18032         version that groks UTF-8 encoded ISO-8859-1 characters.
18034 2021-09-21  Paul Eggert  <eggert@cs.ucla.edu>
18036         regex: sync with glibc
18037         * config/srclist.txt: Uncomment-out posix/regex.c and related
18038         files, as the Gnulib versions have now been copied to glibc.
18039         * lib/intprops.h: Remove authorship comment, as per glibc guidelines.
18041 2021-09-20  Simon Josefsson  <simon@josefsson.org>
18043         maint: Avoid syntax-check failure for empty gnulib submodule.
18044         * top/maint.mk (gnulib_dir): Fall back to GNULIB_SRCDIR if
18045         submodule is not checked out.
18047 2021-09-19  Bruno Haible  <bruno@clisp.org>
18049         Relicense qemu.h under LGPLv2+.
18050         * tests/qemu.h: Change license header.
18052 2021-09-19  Bruno Haible  <bruno@clisp.org>
18054         ialloc: Update license headers after license change from 2021-08-29.
18055         * lib/ialloc.h: Update license header.
18056         * lib/ialloc.c: Likewise.
18058 2021-09-19  Bruno Haible  <bruno@clisp.org>
18060         Improve 'configure --help' output for crypto modules.
18061         * m4/af_alg.m4 (gl_AF_ALG): List the hash functions for which we use the
18062         Linux crypto. Also mention that we use it on files only.
18063         * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Use manual line breaking, not the
18064         line-filling style of AS_HELP_STRING. Show that --with-openssl takes an
18065         optional argument. List the hash functions for which we use the OpenSSL
18066         library. Don't mention --with-linux-crypto if the af_alg module is not
18067         in use. Mention that --with-linux-crypto applies only to the Linux
18068         kernel. Mention that it gets used only when available. Mention that it
18069         takes precedence only for files. In the error or warning, mention the
18070         pre-built package name that people can install.
18072 2021-09-18  Bruno Haible  <bruno@clisp.org>
18074         string, wchar: Don't require undefined m4 macros (regr. today).
18075         Reported by Colin Watson <cjwatson@debian.org> in
18076         <https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00078.html>.
18077         * m4/string_h.m4 (gl_STRING_H_REQUIRE_DEFAULTS): Don't use m4_require
18078         directly. Instead, invoke gl_STDLIB_H_REQUIRE_DEFAULTS.
18079         * m4/wchar_h.m4 (gl_WCHAR_H_REQUIRE_DEFAULTS): Likewise.
18081 2021-09-18  Bruno Haible  <bruno@clisp.org>
18083         sm3-buffer tests: New module.
18084         * tests/test-sm3-buffer.c: Renamed from tests/test-sm3.c.
18085         * modules/crypto/sm3-buffer-tests: Renamed from
18086         modules/crypto/sm3-tests. Test tests/test-sm3-buffer.c instead of
18087         tests/test-sm3.c.
18089         sm3-buffer: New module.
18090         * lib/sm3-stream.c: New file, extracted from lib/sm3.c.
18091         * lib/sm3.c: Don't include stdlib.h, unlocked-io.h.
18092         (BLOCKSIZE, sm3_stream): Moved to sm3-stream.c.
18093         * lib/sm3.h: Tweak.
18094         * modules/crypto/sm3-buffer: New file, based on modules/crypto/sm3.
18095         * modules/crypto/sm3: Rewritten.
18097 2021-09-18  Bruno Haible  <bruno@clisp.org>
18099         sha512-buffer tests: New module.
18100         * tests/test-sha512-stream.c: Renamed from tests/test-sha512.c.
18101         * modules/crypto/sha512-buffer-tests: New file, based on
18102         modules/crypto/sha512-tests.
18103         * modules/crypto/sha512-tests: Remove tests that are now in
18104         modules/crypto/sha512-buffer-tests. Test tests/test-sha512-stream.c
18105         instead of tests/test-sha512.c.
18107         sha512: Clarify module to source relation.
18108         * lib/sha512-stream.c: New file, extracted from lib/sha512.c.
18109         * lib/sha512.c: Don't include stdlib.h, unlocked-io.h.
18110         (BLOCKSIZE, shaxxx_stream, sha512_stream, sha384_stream): Moved to
18111         sha512-stream.c.
18112         * lib/sha512.h: Tweak.
18113         * modules/crypto/sha512 (Files): Add lib/sha512-stream.c.
18114         (configure.ac): Don't define GL_COMPILE_CRYPTO_STREAM.
18115         (Makefile.am): Arrange to compile sha512-stream.c.
18116         (Link): Mention $(LIB_CRYPTO).
18118 2021-09-18  Bruno Haible  <bruno@clisp.org>
18120         sha256-buffer tests: New module.
18121         * tests/test-sha256-stream.c: Renamed from tests/test-sha256.c.
18122         * modules/crypto/sha256-buffer-tests: New file, based on
18123         modules/crypto/sha256-tests.
18124         * modules/crypto/sha256-tests: Remove tests that are now in
18125         modules/crypto/sha256-buffer-tests. Test tests/test-sha256-stream.c
18126         instead of tests/test-sha256.c.
18128         sha256: Clarify module to source relation.
18129         * lib/sha256-stream.c: New file, extracted from lib/sha256.c.
18130         * lib/sha256.c: Don't include stdlib.h, unlocked-io.h.
18131         (BLOCKSIZE, shaxxx_stream, sha256_stream, sha224_stream): Moved to
18132         sha256-stream.c.
18133         * lib/sha256.h: Tweak.
18134         * modules/crypto/sha256 (Files): Add lib/sha256-stream.c.
18135         (configure.ac): Don't define GL_COMPILE_CRYPTO_STREAM.
18136         (Makefile.am): Arrange to compile sha256-stream.c.
18137         (Link): Mention $(LIB_CRYPTO).
18139 2021-09-18  Bruno Haible  <bruno@clisp.org>
18141         sha1-buffer tests: New module.
18142         * tests/test-sha1-buffer.c: New file, based on tests/test-sha1.c.
18143         * tests/test-sha1-stream.c: Renamed from tests/test-sha1.c.
18144         (main): Remove sha1-buffer tests.
18145         * modules/crypto/sha1-buffer-tests: New file, based on
18146         modules/crypto/sha1-tests.
18147         * modules/crypto/sha1-tests: Remove tests that are now in
18148         modules/crypto/sha1-buffer-tests. Test tests/test-sha1-stream.c instead
18149         of tests/test-sha1.c.
18151         sha1: Clarify module to source relation.
18152         * lib/sha1-stream.c: New file, extracted from lib/sha1.c.
18153         * lib/sha1.c: Don't include stdlib.h, unlocked-io.h.
18154         (BLOCKSIZE, sha1_stream): Moved to sha1-stream.c.
18155         * lib/sha1.h: Correct indentation.
18156         * modules/crypto/sha1 (Files): Add lib/sha1-stream.c.
18157         (configure.ac): Don't define GL_COMPILE_CRYPTO_STREAM.
18158         (Makefile.am): Arrange to compile sha1-stream.c.
18159         (Link): Mention $(LIB_CRYPTO).
18161 2021-09-18  Bruno Haible  <bruno@clisp.org>
18163         md5-buffer tests: New module.
18164         * tests/test-md5-buffer.c: New file, based on tests/test-md5.c.
18165         * tests/test-md5-stream.c: Renamed from tests/test-md5.c.
18166         (main): Remove md5-buffer tests.
18167         * modules/crypto/md5-buffer-tests: New file, based on
18168         modules/crypto/md5-tests.
18169         * modules/crypto/md5-tests: Remove tests that are now in
18170         modules/crypto/md5-buffer-tests. Test tests/test-md5-stream.c instead
18171         of tests/test-md5.c.
18173         md5: Clarify module to source relation.
18174         * lib/md5-stream.c: New file, extracted from lib/md5.c.
18175         * lib/md5.c: Don't include stdlib.h, unlocked-io.h.
18176         (BLOCKSIZE, md5_stream): Moved to md5-stream.c.
18177         * lib/md5.h: Tweak.
18178         * modules/crypto/md5 (Files): Add lib/md5-stream.c.
18179         (configure.ac): Don't define GL_COMPILE_CRYPTO_STREAM.
18180         (Makefile.am): Arrange to compile md5-stream.c.
18181         (Link): Mention $(LIB_CRYPTO).
18183 2021-09-18  Bruno Haible  <bruno@clisp.org>
18185         md4-buffer tests: New module.
18186         * tests/test-md4-buffer.c: Renamed from tests/test-md4.c.
18187         * modules/crypto/md4-buffer-tests: Renamed from
18188         modules/crypto/md4-tests. Test tests/test-md4-buffer.c instead of
18189         tests/test-md4.c.
18191         md4-buffer: New module.
18192         * lib/md4-stream.c: New file, extracted from lib/md4.c.
18193         * lib/md4.c: Don't include stdlib.h, unlocked-io.h.
18194         (BLOCKSIZE, md4_stream): Moved to md4-stream.c.
18195         * lib/md4.h: Reorder declarations.
18196         * modules/crypto/md4-buffer: New file, based on modules/crypto/md4.
18197         * modules/crypto/md4: Rewritten.
18199 2021-09-18  Bruno Haible  <bruno@clisp.org>
18201         md2-buffer tests: New module.
18202         * tests/test-md2-buffer.c: Renamed from tests/test-md2.c.
18203         * modules/crypto/md2-buffer-tests: Renamed from
18204         modules/crypto/md2-tests. Test tests/test-md2-buffer.c instead of
18205         tests/test-md2.c.
18207         md2-buffer: New module.
18208         * lib/md2-stream.c: New file, extracted from lib/md2.c.
18209         * lib/md2.c: Don't include stdlib.h, unlocked-io.h.
18210         (BLOCKSIZE, md2_stream): Moved to md2-stream.c.
18211         * lib/md2.h: Reorder declarations.
18212         * modules/crypto/md2-buffer: New file, based on modules/crypto/md2.
18213         * modules/crypto/md2: Rewritten.
18215 2021-09-18  Bruno Haible  <bruno@clisp.org>
18217         string, wchar: Don't cause link errors for rpl_free (regr. 2021-09-07).
18218         Reported by Simon Josefsson in
18219         <https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00042.html>.
18220         * lib/string.in.h (free, rpl_free): Consider GNULIB_FREE_POSIX variable.
18221         * lib/wchar.in.h (free, rpl_free): Likewise.
18222         * m4/string_h.m4 (gl_STRING_H_REQUIRE_DEFAULTS): Require module
18223         indicator variable initializations from the stdlib module.
18224         * m4/wchar_h.m4 (gl_WCHAR_H_REQUIRE_DEFAULTS): Likewise.
18225         * modules/string (Makefile.am): Substitute GNULIB_FREE_POSIX in string.h.
18226         * modules/wchar (Makefile.am): Substitute GNULIB_FREE_POSIX in wchar.h.
18228 2021-09-17  Bruno Haible  <bruno@clisp.org>
18230         threadlib: Avoid crashes in thread-related functions on Cygwin 3.2.0.
18231         Reported by Brian Inglis via Akim Demaille in
18232         <https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00063.html>.
18233         * m4/threadlib.m4 (gl_WEAK_SYMBOLS): Force a "guessing no" result on
18234         Cygwin.
18236 2021-09-13  Bruno Haible  <bruno@clisp.org>
18238         simple-atomic: Port to Oracle Studio 12.6.
18239         * lib/simple-atomic.c (asm) [0x590 <= __SUNPRO_C && __STDC__]:
18240         #define to __asm.
18242 2021-09-13  Paul Eggert  <eggert@cs.ucla.edu>
18244         asyncsafe-spin: port to Oracle Studio 12.6 sparc
18245         Problem reported by Dennis Clarke via Eric Blake in:
18246         https://lists.gnu.org/r/bug-gnulib/2021-09/msg00056.html
18247         * lib/asyncsafe-spin.c (asm) [0x590 <= __SUNPRO_C && __STDC__]:
18248         #define to __asm.
18250 2021-09-12  Paul Eggert  <eggert@cs.ucla.edu>
18252         stdint-tests: long long preproc on recent Sun C
18253         * tests/test-stdint.c: Test long long preprocessor constants on
18254         Oracle Developer Studio 12.6, where they should work.
18256 2021-09-13  Bruno Haible  <bruno@clisp.org>
18258         extern-inline: Fix syntax error on macOS with GCC 11 (regr. 2021-08-22).
18259         Reported by Akim Demaille in
18260         <https://lists.gnu.org/archive/html/bug-gnulib/2021-09/msg00052.html>.
18261         * m4/extern-inline.m4 (_GL_INLINE, _GL_EXTERN_INLINE): Put _GL_UNUSED
18262         before, not after, 'static'.
18264 2021-09-11  Christian Weisgerber  <naddy@mips.inka.de>  (tiny change)
18266         sigsegv: port to OpenBSD 6.8+ powerpc64
18267         * lib/sigsegv.c (SIGSEGV_FAULT_STACKPOINTER):
18268         Special case for __OpenBSD__ && __powerpc64__, needed due to:
18269         https://github.com/openbsd/src/commit/5e649a8714ba05cf482011b7b7d1e5437b7c17db
18270         which is part of the oldest currently-supported OpenBSD (6.8),
18271         so we needn’t worry about older versions.
18273 2021-09-09  Pádraig Brady  <P@draigBrady.com>
18275         maintainer-makefile: add 'can' to sc_prohibit_doubled_word
18276         * top/maint.mk (sc_prohibit_doubled_word): Check for "can can".
18278 2021-09-08  Paul Eggert  <eggert@cs.ucla.edu>
18280         strerror_r-posix: port even better to Android
18281         * lib/strerror_r.c: Use STRERROR_R_CHAR_P to decide whether the
18282         system strerror_r returns char *, and HAVE_DECL_STRERROR_R to
18283         decide whether it either does that or returns an integer.  In the
18284         former case, use the system strerror_r even on platforms like
18285         Android API level 23 that don’t have __xpg_strerror_r; also
18286         check for strerror_r failure just in case.
18287         * m4/error.m4 (gl_PREREQ_ERROR):
18288         * m4/strerror_r.m4 (gl_PREREQ_STRERROR_R):
18289         Use system extensions on Android, to avoid mishandling strerror_r
18290         on API level 23 and later.
18291         * modules/error, modules/strerror_r-posix (configure.ac):
18292         Surround gl_PREREQ_ERROR with AS_IF instead of plain if, so that
18293         AC_REQUIREs are propagated out.
18295         strerror_r-posix: port better to Android
18296         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Move requirement of
18297         gl_USE_SYSTEM_EXTENSIONS from here ...
18298         (gl_FUNC_STRERROR_R_WORKS): ... to here, which is the macro that
18299         actually needs it.  This avoids a bug where 'configure' tests
18300         whether strerror_r has the POSIX API before enabling GNU
18301         extensions.  On Android, enabling GNU extensions switches from the
18302         POSIX to the GNU API.  Problem reported by Lucy Phipps in:
18303         https://lists.gnu.org/r/bug-gnulib/2021-09/msg00026.html
18305         string, wchar: port rpl_free decl to Android
18306         * lib/string.in.h, lib/wchar.in.h:
18307         (free): When replacing it, declare the unreplaced version too.
18308         Problem reported by Lucy Phipps in:
18309         https://lists.gnu.org/r/bug-gnulib/2021-09/msg00026.html
18311 2021-09-07  Paul Eggert  <eggert@cs.ucla.edu>
18313         string, wchar: avoid some namespace pollution
18314         * lib/string.in.h, lib/wchar.in.h:
18315         (free): Declare by hand instead of including stdlib.h.
18316         This avoids some namespace pollution.  It should also avoid some
18317         nested-include problems described by Lucy Phipps in:
18318         https://lists.gnu.org/r/bug-gnulib/2021-09/msg00018.html
18319         * modules/string, modules/wchar:
18320         (Depends-on): Add stdlib, so that REPLACE_FREE has the right value.
18321         (Makefile.am): Replace @REPLACE_FREE@ when creating the include file.
18323 2021-09-04  Paul Eggert  <eggert@cs.ucla.edu>
18325         idx: break copying from glibc
18326         * config/srclist.txt: Comment out idx.h, and bring back recent change.
18328 2021-09-04  Sun Haiyong  <youbest@sina.com>  (tiny change)
18330         sigsegv: Improve cross-compilation support for LoongArch CPU.
18331         * m4/stack-direction.m4 (SV_STACK_DIRECTION): Assume the stack grows
18332         down on LoongArch.
18334 2021-09-04  Simon Josefsson  <simon@josefsson.org>
18336         doc: Improve help related to bootstrap script.
18337         * doc/gnulib-tool.texi (VCS Issues): Make title more positive,
18338         s/Issues/Integration/.  Some more bootstrap-related hints,
18339         including changing suggested submodule path from .gnulib to gnulib
18340         as this seems to be more wide-spread.
18342 2021-09-04  Paul Eggert  <eggert@cs.ucla.edu>
18344         intprops: fix minor doc glitches
18345         * doc/intprops.texi (Integer Properties): Fix doc glitches.
18347 2021-09-04  Simon Josefsson  <simon@josefsson.org>
18349         doc: Add suggestions on FDL texinfo usage.
18350         * doc/licenses-texi.texi (License Texinfo sources): Add texinfo
18351         examples.
18353 2021-09-03  Simon Josefsson  <simon@josefsson.org>
18355         maintainer-makefile: Add indentation syntax-check rule.
18356         * top/maint.mk (indent): Use AM_V_GEN and indent_args.
18357         (sc_indent): New rule.
18358         (indent_args): New variable.
18359         (C_SOURCES): New variable, initialized to reasonable C files.
18360         (exclude_file_name_regexp--indent): New variable.
18362 2021-08-30  Paul Eggert  <eggert@cs.ucla.edu>
18364         idx: add commentary
18365         * lib/idx.h: Add comments about ssize_t and strlen, in
18366         response to comments from Simon Josefsson in:
18367         https://lists.gnu.org/r/bug-gnulib/2021-08/msg00196.html
18369 2021-08-29  Paul Eggert  <eggert@cs.ucla.edu>
18371         attribute: keep up with gnulib-common.m4
18372         * lib/attribute.h (ATTRIBUTE_DEALLOC, ATTRIBUTE_DEALLOC_FREE):
18373         New macros, aliases for the _GL_-prefixed macros added
18374         to gnulib-common.m4 last month.
18376 2021-08-29  Bruno Haible  <bruno@clisp.org>
18378         supersede: Fix test failure under QEMU user-mode for Linux/mips.
18379         * tests/test-supersede-open.h (test_open_supersede): Copy statbuf.st_dev
18380         into a local variable of type dev_t.
18381         * tests/test-supersede-fopen.h (test_fopen_supersede): Likewise.
18383 2021-08-29  Bruno Haible  <bruno@clisp.org>
18385         spawn-pipe: Fix test failure when running under QEMU user-mode.
18386         * tests/test-spawn-pipe-child.c: Include <stdbool.h>, <string.h>,
18387         qemu.h.
18388         (main): Under QEMU user-mode, allow fd 2 or fd 3 to be open.
18389         * modules/spawn-pipe-tests (Files): Add qemu.h.
18390         (Depends-on): Add stdbool.
18392 2021-08-29  Bruno Haible  <bruno@clisp.org>
18394         execute: Fix test failure when running under QEMU user-mode.
18395         * tests/test-execute-child.c: Include <stdbool.h>, qemu.h.
18396         (main): Under QEMU user-mode, allow fd 3 to be open.
18397         * modules/execute-tests (Files): Add qemu.h.
18398         (Depends-on): Add stdbool.
18400 2021-08-29  Bruno Haible  <bruno@clisp.org>
18402         posix_spawn_file_actions_addfchdir: Avoid test failure under QEMU.
18403         * tests/test-posix_spawn-fchdir.c: Include qemu.h.
18404         (is_qemu): New variable.
18405         (test): Under QEMU user-mode, don't expect that "pwd" produces the
18406         result "/".
18407         (main): Initialize is_qemu. Under QEMU user-mode, skip the relative file
18408         name test.
18409         * modules/posix_spawn_file_actions_addfchdir-tests (Files): Add qemu.h.
18410         (Depends-on): Add stdbool.
18412 2021-08-29  Bruno Haible  <bruno@clisp.org>
18414         getcwd tests: Avoid test failure when running under QEMU user-mode.
18415         * modules/getcwd-tests (Files): Add qemu.h.
18416         (Depends-on): Add stdbool.
18417         * tests/test-getcwd.c: Include qemu.h.
18418         (test_long_name): Skip this test when running under QEMU user-mode.
18419         (main): Consider return code 77 from test_long_name.
18421 2021-08-29  Paul Eggert  <eggert@cs.ucla.edu>
18423         base32, base64: treat negative sizes as overflows
18424         * lib/base64.c (base64_encode_alloc):
18425         * lib/base32.c (base32_encode_alloc):
18426         Treat negative sizes as overflows, for better compatibility
18427         with previous API.
18429 2021-08-29  Bruno Haible  <bruno@clisp.org>
18431         explicit_bzero test: Fix test failure due to GCC optimizations.
18432         * tests/test-explicit_bzero.c (do_secret_stuff): Use static variable
18433         'last_stackbuf'.
18434         (main): Use an 'if' to combine the two do_secret_stuff invocations.
18436 2021-08-29  Paul Eggert  <eggert@cs.ucla.edu>
18438         dfa: port to non-gnulib
18439         Suggested by Arnold Robbins in:
18440         https://lists.gnu.org/r/bug-gnulib/2021-08/msg00181.html
18441         * lib/dfa.h (_GL_ATTRIBUTE_DEALLOC) [!_GL_ATTRIBUTE_MALLOC]:
18442         Add missing definition.
18444 2021-08-29  Paul Eggert  <eggert@cs.ucla.edu>
18446         base32, base64: fix broken tests
18447         Problem reported by Bruno Haible in:
18448         https://lists.gnu.org/r/bug-gnulib/2021-08/msg00170.html
18449         * lib/base32.c, lib/base64.c: Do not include verify.h,
18450         and omit all uses of ‘assume’.
18451         * modules/base32, modules/base64 (Depends-on): Remove verify.
18452         * tests/test-base32.c, tests/test-base64.c:
18453         Don’t pass out-of-range values to allocator,
18454         as converting them to idx_t relies on implementation-defined
18455         behavior that could trap.
18457         ialloc: relicense
18458         * modules/ialloc (License): Change from LGPL to LGPLv2+.
18460 2021-08-28  Bruno Haible  <bruno@clisp.org>
18462         fma: Fix compilation error on Linux/sh4.
18463         * lib/fma.c (FUNC): Don't test for FE_DOWNWARD or FE_UPWARD when these
18464         rounding modes are not defined.
18466 2021-08-28  Bruno Haible  <bruno@clisp.org>
18468         Skip some tests when running under QEMU user-mode.
18469         * tests/qemu.h: New file.
18470         * tests/test-get-rusage-as.c: Include qemu.h.
18471         (main): Skip the test when running under QEMU.
18472         * tests/test-get-rusage-data.c: Include qemu.h.
18473         (main): Skip the test when running under QEMU.
18474         * tests/test-printf-posix2.c: Include qemu.h.
18475         (main): Return with code 77 when running under QEMU.
18476         * tests/test-fprintf-posix2.c: Include qemu.h.
18477         (main): Return with code 77 when running under QEMU.
18478         * tests/test-fprintf-posix3.c: Include qemu.h.
18479         (main): Return with code 79 when running under QEMU.
18480         * tests/test-fprintf-posix3.sh: Skip the test when the return code was
18481         79.
18482         * tests/test-dprintf-posix2.c: Include qemu.h.
18483         (main): Return with code 79 when running under QEMU. Use return code 80
18484         instead of 78.
18485         * tests/test-dprintf-posix2.sh: Skip the test when the return code was
18486         79. Update for changed return code.
18487         * modules/get-rusage-as-tests (Files): Add qemu.h.
18488         (Depends-on): Add stdbool.
18489         * modules/get-rusage-data-tests (Files): Add qemu.h.
18490         (Depends-on): Add stdbool.
18491         * modules/fprintf-posix-tests (Files): Add qemu.h.
18492         (Depends-on): Add stdbool.
18493         * modules/dprintf-posix-tests (Files): Add qemu.h.
18494         (Depends-on): Add stdbool.
18496 2021-08-28  Bruno Haible  <bruno@clisp.org>
18498         sigabbrev_np, sigdescr_np: Fix compilation error on Linux/alpha.
18499         * lib/sigabbrev_np.c (sigabbrev_np): When SIGINFO and SIGPWR have the
18500         same value, give precendence to SIGPWR.
18501         * lib/sigdescr_np.c (sigdescr_np): Likewise.
18502         * tests/test-sigabbrev_np.c (main): Likewise.
18503         * tests/test-sigdescr_np.c (main): Likewise.
18505 2021-08-28  Bruno Haible  <bruno@clisp.org>
18507         execle, execve, execvpe tests: Fix test failures under qemu user-mode.
18508         * test-execle-main.c: Include <string.h>.
18509         (get_environ_assignment, create_minimal_env): New functions.
18510         (main): Call create_minimal_env.
18511         * test-execve-main.c: Likewise.
18512         * test-execvpe-main.c: Likewise.
18514 2021-08-27  Paul Eggert  <eggert@cs.ucla.edu>
18516         base32, base64: prefer signed to unsigned integers
18517         * lib/base32.c, lib/base64.c: Include ialloc.h instad of stdlib.h.
18518         Include intprops.h, verify.h.
18519         * lib/base32.c (base32_encode, base32_encode_alloc, get_8, decode_8)
18520         (base32_decode_ctx, base32_decode_alloc_ctx):
18521         * lib/base32.h (struct base32_decode_context):
18522         * lib/base64.c (base64_encode_fast, base64_encode)
18523         (base64_encode_alloc, get_4, decode_4, base64_decode_ctx)
18524         (base64_decode_alloc_ctx):
18525         * lib/base64.h (struct base64_decode_context):
18526         * tests/test-base32.c (main):
18527         * tests/test-base64.c (main):
18528         Prefer signed to unsigned integers.
18529         * lib/base32.c (base32_encode_alloc):
18530         * lib/base64.c (base64_encode_alloc):
18531         Use simpler and more-direct check for overflow, removing a TODO.
18532         * lib/base32.h, lib/base64.h: Include idx.h instead of stddef.h.
18533         * modules/base32, modules/base64 (Depends-on): Add ialloc, verify.
18535 2021-08-26  Paul Eggert  <eggert@cs.ucla.edu>
18537         regex: use __attr_access and C99-style array arg
18538         This should help with some static checking.
18539         Derived from a suggestion by Martin Sebor in:
18540         https://sourceware.org/pipermail/libc-alpha/2021-August/130336.html
18541         * config/srclist.txt: Remove lib/regex.c for now.
18542         * lib/regex.c: Ignore -Wvla for the whole file.
18543         * lib/regex.h (_REGEX_NELTS, _Attr_access_): New macros.
18544         Ignore -Wvla when declaring regexec.
18545         (re_compile_pattern, re_search, re_search2, re_match, re_match_2)
18546         (regerror): Mark with _Attr_access_, as glibc does.
18547         * lib/regex.h (regexec):
18548         * lib/regexec.c (regexec, __compat_regexec):
18549         Use _REGEX_NELTS for each array parameter whose size is another arg
18550         but with an access pattern that cannot be captured with __attr_access.
18552 2021-08-25  Bruno Haible  <bruno@clisp.org>
18554         execute tests: Fix test failure when libtool is in use.
18555         * modules/execute-tests (Makefile.am): Link test-execute-child without
18556         using libtool.
18557         * modules/spawn-pipe-tests (Makefile.am): Link test-spawn-pipe-child
18558         without using libtool.
18559         * modules/system-quote-tests (Makefile.am): Link test-system-quote-child
18560         without using libtool.
18562 2021-08-24  Paul Eggert  <eggert@cs.ucla.edu>
18564         dfa: prefer idx_t to ptrdiff_t for nonnegative
18565         * lib/dfa.c (struct dfa, dfaexec_main, dfaexec_mb, dfaexec_sb)
18566         (dfaexec_noop, dfaexec):
18567         * lib/dfa.h (dfaparse, dfacomp, dfaexec):
18568         Prefer idx_t to ptrdiff_t for counts, which should be nonnegative.
18569         * lib/dfa.h: Include idx.h.
18571 2021-08-22  Bruno Haible  <bruno@clisp.org>
18573         snippet/unused-parameter: Mark unused module obsolete.
18574         * modules/snippet/unused-parameter (Status, Notice): Mark as obsolete.
18576 2021-08-22  Bruno Haible  <bruno@clisp.org>
18578         Make generated .in.h files as standalone as possible.
18579         Reported by Jan Engelhardt <jengelh@inai.de>.
18580         * lib/stdlib.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEALLOC_FREE,
18581         _GL_ATTRIBUTE_MALLOC): Add fallback definitions.
18582         * lib/dirent.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC): Add
18583         fallback definitions.
18584         * lib/stdio.in.h (_GL_ATTRIBUTE_DEALLOC): Add fallback definition.
18585         * lib/math.in.h (_GL_ATTRIBUTE_CONST): Add fallback definition.
18586         * lib/pthread.in.h (_GL_ATTRIBUTE_PURE): Add fallback definition.
18587         * lib/threads.in.h (_GL_ATTRIBUTE_PURE): Likewise.
18588         * lib/uchar.in.h (_GL_ATTRIBUTE_PURE): Likewise.
18589         * lib/string.in.h (_GL_ATTRIBUTE_PURE): Move definition, for consistency
18590         with the other *.in.h files.
18591         * lib/se-context.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Add fallback
18592         definition.
18593         * lib/se-label.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Likewise.
18594         * lib/se-selinux.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Likewise.
18595         * lib/textstyle.in.h: Use _GL_ATTRIBUTE_MAYBE_UNUSED instead of
18596         _GL_UNUSED.
18597         (_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, _GL_ATTRIBUTE_MAYBE_UNUSED): Add
18598         fallback definitions.
18600 2021-08-22  Bruno Haible  <bruno@clisp.org>
18602         gnulib-common.m4: Clarify logic behind _GL_UNUSED_LABEL.
18603         Reported by Paul Eggert.
18604         * m4/gnulib-common.m4 (gl_COMMON_BODY): Add comment and write the
18605         condition in a way that is close to the comment.
18607 2021-08-22  Paul Eggert  <eggert@cs.ucla.edu>
18609         c-stack: depend on inttypes, mempcpy
18610         * modules/c-stack (Depends-on): Add inttypes, mempcpy.
18611         mempcpy problem reported by Evan Miller in:
18612         https://debbugs.gnu.org/50098#31
18614 2021-08-22  Bruno Haible  <bruno@clisp.org>
18616         mountlist: Use recommended syntax for _GL_UNUSED_LABEL.
18617         * lib/mountlist.c (read_file_system_list): Add semicolon after
18618         _GL_UNUSED_LABEL.
18620 2021-08-22  Bruno Haible  <bruno@clisp.org>
18622         gnulib-common.m4: Make _GL_UNUSED_LABEL effective for clang.
18623         * m4/gnulib-common.m4 (gl_COMMON_BODY): Make _GL_UNUSED_LABEL use
18624         _GL_ATTRIBUTE_UNUSED also for clang.
18626 2021-08-22  Bruno Haible  <bruno@clisp.org>
18628         gnulib-common.m4: Use C2x [[maybe_unused]] when possible.
18629         * m4/gnulib-common.m4 (gl_COMMON_BODY): Define _GL_UNUSED as an alias of
18630         _GL_ATTRIBUTE_MAYBE_UNUSED, not of _GL_ATTRIBUTE_UNUSED.
18631         * lib/binary-io.h (__gl_setmode): Put _GL_UNUSED before, not after, the
18632         declaration.
18633         * lib/c-stack.c (null_action, segv_handler, overflow_handler,
18634         c_stack_action): Likewise.
18635         * lib/chown.c (chown): Likewise.
18636         * lib/clean-temp-simple.c (cleanup_action): Likewise.
18637         * lib/fts.c (dirent_inode_sort_may_be_useful, leaf_optimization,
18638         fts_set): Likewise.
18639         * lib/getgroups.c (getgroups): Likewise.
18640         * lib/getopt.c (_getopt_initialize): Likewise.
18641         * lib/getugroups.c (getugroups): Likewise.
18642         * lib/localename.c (gl_locale_name_thread_unsafe, gl_locale_name_thread,
18643         gl_locale_name_posix, gl_locale_name_environ): Likewise.
18644         * lib/mkdir.c (rpl_mkdir): Likewise.
18645         * lib/mkfifo.c (mkfifo): Likewise.
18646         * lib/mkfifoat.c (mkfifoat): Likewise.
18647         * lib/mknod.c (mknod): Likewise.
18648         * lib/mknodat.c (mknodat): Likewise.
18649         * lib/mountlist.c (me_remote): Likewise.
18650         * lib/openpty.c (openpty): Likewise.
18651         * lib/parse-datetime.y (yyerror): Likewise.
18652         * lib/passfd.c (sendfd, recvfd): Likewise.
18653         * lib/pthread-cond.c (pthread_condattr_destroy, pthread_cond_init,
18654         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
18655         pthread_cond_broadcast, pthread_cond_destroy): Likewise.
18656         * lib/pthread-mutex.c (pthread_mutexattr_destroy, pthread_mutex_init,
18657         pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_timedlock,
18658         pthread_mutex_unlock, pthread_mutex_destroy): Likewise.
18659         * lib/pthread-rwlock.c (pthread_rwlockattr_destroy, pthread_rwlock_init,
18660         pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock): Likewise.
18661         * lib/pthread-spin.c (pthread_spin_init, pthread_spin_lock,
18662         pthread_spin_trylock, pthread_spin_unlock, pthread_spin_destroy):
18663         Likewise.
18664         * lib/pthread-thread.c (pthread_attr_destroy): Likewise.
18665         * lib/readlink.c (readlink): Likewise.
18666         * lib/rename.c (rpl_rename): Likewise.
18667         * lib/set-permissions.c (set_permissions): Likewise.
18668         * lib/sockets.c (gl_sockets_startup): Likewise.
18669         * lib/stat-time.h (get_stat_birthtime_ns, get_stat_birthtime,
18670         stat_time_normalize): Likewise.
18671         * lib/strptime.c (__strptime_internal): Likewise.
18672         * lib/strtod.c (LDEXP): Likewise.
18673         * lib/symlink.c (symlink): Likewise.
18674         * lib/symlinkat.c (symlinkat): Likewise.
18675         * lib/tempname.c (try_dir, try_nocreate): Likewise.
18676         * lib/textstyle.in.h (styled_ostream_begin_use_class,
18677         styled_ostream_end_use_class, styled_ostream_get_hyperlink_ref,
18678         styled_ostream_get_hyperlink_id, styled_ostream_set_hyperlink,
18679         styled_ostream_flush_to_current_style, fd_ostream_create,
18680         term_ostream_get_color, term_ostream_set_color,
18681         term_ostream_get_bgcolor, term_ostream_set_bgcolor,
18682         term_ostream_get_weight, term_ostream_set_weight,
18683         term_ostream_get_posture, term_ostream_set_posture,
18684         term_ostream_get_underline, term_ostream_set_underline,
18685         term_ostream_get_hyperlink_ref, term_ostream_get_hyperlink_id,
18686         term_ostream_set_hyperlink, term_ostream_create,
18687         term_styled_ostream_create, html_styled_ostream_create,
18688         handle_color_option, handle_style_option, style_file_prepare,
18689         styled_ostream_create, libtextstyle_set_failure_exit_code): Likewise.
18690         * lib/unicodeio.c (exit_failure_callback, fallback_failure_callback):
18691         Likewise.
18692         * lib/wait-process.c (cleanup_slaves_action): Likewise.
18693         * tests/signature.h (SIGNATURE_CHECK2): Likewise.
18694         * tests/test-areadlink.c (do_areadlink): Likewise.
18695         * tests/test-areadlinkat.c (do_areadlinkat): Likewise.
18696         * tests/test-ceilf-ieee.c (main): Likewise.
18697         * tests/test-ceilf1.c (main): Likewise.
18698         * tests/test-dirent.c (dir): Likewise.
18699         * tests/test-fchownat.c (main): Likewise.
18700         * tests/test-fdopendir.c (main): Likewise.
18701         * tests/test-filenamecat.c (main): Likewise.
18702         * tests/test-floor1.c (main): Likewise.
18703         * tests/test-floorf-ieee.c (main): Likewise.
18704         * tests/test-floorf1.c (main): Likewise.
18705         * tests/test-fseeko.c (main): Likewise.
18706         * tests/test-fstatat.c (main): Likewise.
18707         * tests/test-ftello.c (main): Likewise.
18708         * tests/test-getdomainname.c (main): Likewise.
18709         * tests/test-getgroups.c (main): Likewise.
18710         * tests/test-gethostname.c (main): Likewise.
18711         * tests/test-math-c++.cc (OVERLOADED_CHECK): Likewise.
18712         * tests/test-mkdirat.c (main): Likewise.
18713         * tests/test-openat.c (main): Likewise.
18714         * tests/test-parse-datetime.c (main): Likewise.
18715         * tests/test-quotearg-simple.c (main): Likewise.
18716         * tests/test-quotearg.c (main): Likewise.
18717         * tests/test-sethostname2.c (main): Likewise.
18718         * tests/test-unlinkat.c (main): Likewise.
18719         * tests/test-version-etc.c (main): Likewise.
18720         * tests/test-xalloc-die.c (main): Likewise.
18721         * tests/test-xfprintf-posix.c (main): Likewise.
18722         * tests/test-xprintf-posix.c (main): Likewise.
18723         * tests/test-xvasprintf.c (main): Likewise.
18725 2021-08-22  Bruno Haible  <bruno@clisp.org>
18727         gnulib-common.m4: Document the gnulib-internal _GL_ATTRIBUTE_* macros.
18728         * m4/gnulib-common.m4 (gl_COMMON_BODY): Add comments to the
18729         _GL_ATTRIBUTE_* macros, based on lib/attribute.h.
18731 2021-08-22  Bernhard Voelker  <mail@bernhard-voelker.de>
18733         doc: fix order of stdlib functions
18734         * doc/gnulib.texi (node Glibc stdlib.h): Move mrand48_r after mkstemps.
18735         Reported by Benno Schulenberg.
18737 2021-08-21  Bruno Haible  <bruno@clisp.org>
18739         c-stack: Test for libsigsegv once, not twice.
18740         * m4/sigsegv.m4: New file, based on modules/sigsegv.
18741         * modules/sigsegv (Files): Add it.
18742         (configure.ac): Require gl_SIGSEGV. Test gl_sigsegv_uses_libsigsegv
18743         instead of with_libsigsegv and gl_cv_lib_sigsegv.
18744         * m4/c-stack.m4 (gl_C_STACK): Likewise.
18746 2021-08-21  Bruno Haible  <bruno@clisp.org>
18748         rawmemchr: Fix use in relocatable-prog-wrapper (regression 2021-08-20).
18749         * lib/rawmemchr.c: Restore test of HAVE_RAWMEMCHR.
18750         * modules/relocatable-prog-wrapper (Depends-on): Add stdalign.
18752 2021-08-20  Paul Eggert  <eggert@cs.ucla.edu>
18754         rawmemchr: modernize and simplify
18755         * lib/rawmemchr.c (HAVE_RAWMEMCHR): Assume it’s not defined;
18756         otherwise this file would not be compiled.  Include limits.h,
18757         stdalign.h, stdint.h, verify.h.
18758         (rawmemchr): Prefer uintptr_t to unsigned long and to size_t when
18759         it’s the better type.  Verify that longword lacks padding.  Use
18760         alignof rather than sizeof when checking alignment.  Simplify by
18761         assuming C99 decl-after-statement, and by using multiplication
18762         rather than repeated shifting and OR (modern compilers can
18763         optimize the multiplication if needed).  Avoid unnecessary casts.
18764         Don’t assume CHAR_WIDTH is 8.  Convert back and forth between void *
18765         to suppress bogus GCC warnings about alignment.  Omit a
18766         duplicate assignment to char_ptr.
18767         * modules/rawmemchr (Depends-on): Add stdalign, stdint, verify.
18769 2021-08-17  Paul Eggert  <eggert@cs.ucla.edu>
18771         c-stack: fix libsigsegv dependency (regression 2021-05-18)
18772         Problem reported for GNU grep by Evan Miller (Bug#50098).
18773         * m4/c-stack.m4 (gl_C_STACK): Call gl_LIBSIGSEGV before
18774         testing gl_cv_lib_sigsegv.
18776 2021-08-14  Bruno Haible  <bruno@clisp.org>
18778         doc: Update for glibc 2.34.
18779         * doc/posix-functions/timespec_getres.texi: New file.
18780         * doc/glibc-functions/_Fork.texi: New file.
18781         * doc/glibc-functions/closefrom.texi: New file.
18782         * doc/glibc-functions/dn_comp.texi: New file.
18783         * doc/glibc-functions/dn_skipname.texi: New file.
18784         * doc/glibc-functions/execveat.texi: New file.
18785         * doc/glibc-functions/posix_spawn_file_actions_addclosefrom_np.texi: New
18786         file.
18787         * doc/glibc-functions/res_dnok.texi: New file.
18788         * doc/glibc-functions/res_hnok.texi: New file.
18789         * doc/glibc-functions/res_mailok.texi: New file.
18790         * doc/glibc-functions/res_nmkquery.texi: New file.
18791         * doc/glibc-functions/res_nquery.texi: New file.
18792         * doc/glibc-functions/res_nquerydomain.texi: New file.
18793         * doc/glibc-functions/res_nsearch.texi: New file.
18794         * doc/glibc-functions/res_nsend.texi: New file.
18795         * doc/glibc-functions/res_ownok.texi: New file.
18796         * doc/glibc-functions/res_send.texi: New file.
18797         * doc/gnulib.texi: Include them.
18798         * doc/glibc-functions/inet_neta.texi: Remove file.
18799         * doc/glibc-functions/malloc_get_state.texi: Remove file.
18800         * doc/glibc-functions/malloc_set_state.texi: Remove file.
18801         * doc/glibc-functions/pthread_mutex_consistent_np.texi: Remove file.
18802         * doc/glibc-functions/pthread_mutexattr_getrobust_np.texi: Remove file.
18803         * doc/glibc-functions/pthread_mutexattr_setrobust_np.texi: Remove file.
18804         * doc/glibc-functions/pthread_yield.texi: Remove file.
18805         * doc/gnulib.texi: Don't include them.
18806         * doc/glibc-headers/resolv.texi: Update.
18807         * doc/pastposix-functions/h_errno.texi: Likewise.
18808         * doc/posix-functions/*.texi: Likewise.
18809         * doc/glibc-functions/*.texi: Likewise.
18811 2021-08-12  Paul Eggert  <eggert@cs.ucla.edu>
18813         memrchr-tests: port to GCC 12
18814         * tests/test-memrchr.c: Bug#101494 is fixed in GCC 12.
18816 2021-08-12  Akim Demaille  <akim@lrde.epita.fr>
18818         snippet/_Noreturn: Fix typo
18819         * lib/_Noreturn.h: Fix spelling of 4.
18821 2021-08-11  Paul Eggert  <eggert@cs.ucla.edu>
18823         dynarray: merge from glibc
18824         This also helps document glibc’s direction in using GCC’s
18825         memory-allocation checking.
18826         * lib/cdefs.h: Omit comments that glibc rejected.
18827         (__returns_nonnull, __attr_access_none, __attr_dealloc)
18828         (__attr_dealloc_free): New macros.
18829         * lib/libc-config.h: Undef the new macros that are defined
18830         unconditionally.
18831         * lib/malloc/dynarray_at_failure.c [_LIBC]: Do not include stdlib.h.
18832         (__libc_dynarray_at_failure) [_LIBC]: Call __libc_fatal,
18833         fixing a bad merge previously.
18835 2021-08-08  Bruno Haible  <bruno@clisp.org>
18837         canonicalize-lgpl: Fix conflict with z/OS <sys/stat.h>.
18838         Reported by Mike Fulton <mikefultonpersonal@gmail.com> in
18839         <https://lists.gnu.org/archive/html/m4-discuss/2021-08/msg00000.html>
18840         via Eric Blake.
18841         * lib/canonicalize-lgpl.c (__stat): Remove macro.
18842         (file_accessible): Use 'stat' instead.
18844 2021-08-08  Bruno Haible  <bruno@clisp.org>
18846         ptsname_r: Drop sync with glibc.
18847         * lib/ptsname_r.c: Drop _LIBC code.
18848         (__set_errno, __isatty, __stat, __ttyname_r, __ptsname_r): Remove
18849         macros.
18850         (ptsname_r): Rename local variable 'save_errno'.
18852 2021-08-08  Bruno Haible  <bruno@clisp.org>
18854         config: Update after glibc changed.
18855         * config/srclist.txt: Remove two files that glibc dropped on 2013-12-17.
18857 2021-08-08  Bruno Haible  <bruno@clisp.org>
18859         relocatable-lib-lgpl: Fix a memory leak related to a Windows DLL.
18860         Reported by Jonathan Boeing <jonathan@claws-mail.org> in
18861         <https://lists.gnu.org/archive/html/bug-gnulib/2021-08/msg00048.html>.
18862         * lib/relocatable.c (DllMain): Avoid memory leak in a special case
18863         of repeated attach/detach.
18865 2021-08-08  Bruno Haible  <bruno@clisp.org>
18867         fopen: Fix link error on native Windows.
18868         * modules/fopen (Depends-on): Add close.
18870 2021-08-08  Bruno Haible  <bruno@clisp.org>
18872         fopen: Fix compilation error on AIX (regression from 2020-05-28).
18873         * modules/fopen (Depends-on): Add fcntl-h.
18875 2021-08-08  Bruno Haible  <bruno@clisp.org>
18877         stdio: Improve GCC 11 allocation-deallocation checking.
18878         * lib/stdio.in.h (fdopen, fopen, tmpfile): For GCC >= 11: Declare nearly
18879         always.
18880         (popen): For GCC >= 11: Declare also when the platform already declares
18881         the function or when the module 'popen' is not in use.
18883 2021-08-08  Bruno Haible  <bruno@clisp.org>
18885         dirent: Improve GCC 11 allocation-deallocation checking.
18886         * lib/dirent.in.h (opendir): For GCC >= 11: Declare also when the
18887         platform already declares the function or when the module 'opendir' is
18888         not in use.
18889         (fdopendir): For GCC >= 11: Declare also when the platform already
18890         declares the function or when the module 'fdopendir' is not in use.
18892 2021-08-08  Bruno Haible  <bruno@clisp.org>
18894         stdlib, string, wchar: Improve GCC 11 allocation-deallocation checking.
18895         * lib/stdlib.in.h (aligned_alloc): For GCC >= 11: Declare also when the
18896         platform already declares the function or when the module
18897         'aligned_alloc' is not in use.
18898         (calloc): For GCC >= 11: Declare nearly always.
18899         (canonicalize_file_name): For GCC >= 11: Declare also when the platform
18900         already declares the function or when the module 'canonicalize-lgpl' is
18901         not in use.
18902         (malloc, realloc): For GCC >= 11: Declare nearly always.
18903         * lib/malloc.in.h: Remove redundant include.
18904         (memalign): For GCC >= 11: Declare also when the platform already
18905         declares the function or when the module 'memalign' is not in use.
18906         * lib/string.in.h: Include <stdlib.h> always.
18907         (strdup): For GCC >= 11: Declare also when the platform already declares
18908         the function or when the module 'strdup' or 'strdup-posix' is not in
18909         use.
18910         * lib/wchar.in.h: Include <stdlib.h> always.
18911         (wcsdup): For GCC >= 11: Declare also when the platform already declares
18912         the function or when the module 'wcsdup' is not in use.
18913         * modules/free-posix (Depends-on): Add string, wchar.
18915 2021-08-07  Bruno Haible  <bruno@clisp.org>
18917         gnulib-tool: Add support for Automake 1.16.4.
18918         Reported by <shoober420@gmail.com> in
18919         <https://lists.gnu.org/archive/html/bug-libunistring/2021-08/msg00000.html>.
18920         * build-aux/test-driver-1.16.3.diff: Renamed from
18921         build-aux/test-driver.diff.
18922         * build-aux/test-driver.diff: Update to match Automake 1.16.4.
18923         * gnulib-tool (func_create_testdir, func_create_megatestdir): Try both
18924         .diff files.
18926 2021-08-07  Bruno Haible  <bruno@clisp.org>
18928         gnulib-common.m4: Minor style fix.
18929         * m4/gnulib-common.m4 (gl_COMMON_BODY): Keep list of attributes sorted
18930         alphabetically.
18932 2021-08-07  Bruno Haible  <bruno@clisp.org>
18934         uninorm, unistr: Improve GCC 11 allocation-deallocation checking.
18935         * lib/uninorm.in.h (uninorm_filter_free): Move declaration up.
18936         (uninorm_filter_create): Declare that deallocation must happen through
18937         'uninorm_filter_free'.
18938         * lib/unistr.in.h: Include <stdlib.h>.
18939         (u8_strdup, u16_strdup, u32_strdup): Declare that deallocation must
18940         happen through 'free'.
18942 2021-08-07  Bruno Haible  <bruno@clisp.org>
18944         ialloc: Prepare for allocation-deallocation checking.
18945         * lib/ialloc.h (imalloc, irealloc, icalloc): Add comment that
18946         deallocation must happen through 'free'.
18948 2021-08-07  Bruno Haible  <bruno@clisp.org>
18950         aligned-malloc: Prepare for allocation-deallocation checking.
18951         * lib/aligned-malloc.h (aligned_free): Move declaration up.
18952         (aligned_malloc): Add comment that deallocation must happen through
18953         'aligned_free'.
18955 2021-08-07  Bruno Haible  <bruno@clisp.org>
18957         list, set, oset, map, omap: Prepare allocation-deallocation checking.
18958         * lib/gl_list.h (gl_list_create_empty, gl_list_nx_create_empty,
18959         gl_list_create, gl_list_nx_create): Add comment that deallocation must
18960         happen through 'gl_list_free'.
18961         * lib/gl_xlist.h (gl_list_create_empty, gl_list_create): Likewise.
18962         * lib/gl_sublist.h (gl_sublist_create, gl_sublist_nx_create): Likewise.
18963         * lib/gl_xsublist.h (gl_sublist_create): Likewise.
18964         * lib/gl_set.h (gl_set_create_empty, gl_set_nx_create_empty): Add
18965         comment that deallocation must happen through 'gl_set_free'.
18966         * lib/gl_xset.h (gl_set_create_empty): Likewise.
18967         * lib/gl_oset.h (gl_oset_create_empty, gl_oset_nx_create_empty): Add
18968         comment that deallocation must happen through 'gl_oset_free'.
18969         * lib/gl_xoset.h (gl_oset_create_empty): Likewise.
18970         * lib/gl_map.h (gl_map_create_empty, gl_map_nx_create_empty): Add
18971         comment that deallocation must happen through 'gl_map_free'.
18972         * lib/gl_xmap.h (gl_map_create_empty): Likewise.
18973         * lib/gl_omap.h (gl_omap_create_empty, gl_omap_nx_create_empty): Add
18974         comment that deallocation must happen through 'gl_omap_free'.
18975         * lib/gl_xomap.h (gl_omap_create_empty): Likewise.
18977 2021-08-07  Bruno Haible  <bruno@clisp.org>
18979         xgetdomainname: Improve GCC 11 allocation-deallocation checking.
18980         * lib/xgetdomainname.h: Include <stdlib.h>.
18981         (xgetdomainname): Declare that deallocation must happen through 'free'.
18983 2021-08-07  Bruno Haible  <bruno@clisp.org>
18985         xgetdomainname: Ensure .c file starts with '#include <config.h>'.
18986         * lib/xgetaname-impl.h: New file, based on lib/xgethostname.c.
18987         * lib/xgethostname.c: Move implementation to lib/xgetaname-impl.h.
18988         * lib/xgetdomainname.c: Include <config.h>. Include xgetaname-impl.h
18989         instead of xgethostname.c.
18990         * modules/xgethostname (Files): Add lib/xgetaname-impl.h.
18991         * modules/xgetdomainname (Files): Likewise.
18992         (Depends-on): Remove xgethostname. Add free-posix, xalloc.
18994 2021-08-07  Bruno Haible  <bruno@clisp.org>
18996         xstrndup: Improve GCC 11 allocation-deallocation checking.
18997         * lib/xstrndup.h: Include <stdlib.h> instead of <stddef.h>.
18998         (xstrndup): Declare that deallocation must happen through 'free'.
19000 2021-08-07  Bruno Haible  <bruno@clisp.org>
19002         xstriconveh: Improve GCC 11 allocation-deallocation checking.
19003         * lib/xstriconveh.h: Include <stdlib.h> instead of <stddef.h>.
19004         (xstr_cd_iconveh, xstr_iconveh): Declare that deallocation must happen
19005         through 'free'.
19007 2021-08-07  Bruno Haible  <bruno@clisp.org>
19009         xmemdup0: Improve GCC 11 allocation-deallocation checking.
19010         * lib/xmemdup0.h: Include <stdlib.h> instead of <stddef.h>.
19011         (xmemdup0): Declare that deallocation must happen through 'free'.
19013 2021-08-07  Bruno Haible  <bruno@clisp.org>
19015         windows-spawn: Improve GCC 11 allocation-deallocation checking.
19016         * lib/windows-spawn.h: Include <stdlib.h>.
19017         (compose_command, compose_envblock): Declare that deallocation must
19018         happen through 'free'.
19020 2021-08-07  Bruno Haible  <bruno@clisp.org>
19022         string-buffer: Improve GCC 11 allocation-deallocation checking.
19023         * lib/string-buffer.h: Include <stdlib.h> instead of <stddef.h>.
19024         (sb_dupfree): Declare that deallocation must happen through 'free'.
19026 2021-08-07  Bruno Haible  <bruno@clisp.org>
19028         striconveha: Improve GCC 11 allocation-deallocation checking.
19029         * lib/striconveha.h: Include <stdlib.h> instead of <stddef.h>.
19030         (str_iconveha): Declare that deallocation must happen through 'free'.
19032 2021-08-07  Bruno Haible  <bruno@clisp.org>
19034         striconveh: Improve GCC 11 allocation-deallocation checking.
19035         * lib/striconveh.h: Include <stdlib.h> instead of <stddef.h>.
19036         (str_cd_iconveh, str_iconveh): Declare that deallocation must happen
19037         through 'free'.
19039 2021-08-07  Bruno Haible  <bruno@clisp.org>
19041         striconv: Improve GCC 11 allocation-deallocation checking.
19042         * lib/striconv.h: Include <stdlib.h> instead of <stddef.h>.
19043         (str_cd_iconv, str_iconv): Declare that deallocation must happen through
19044         'free'.
19046 2021-08-07  Bruno Haible  <bruno@clisp.org>
19048         relocatable-lib-lgpl: Improve GCC 11 allocation-deallocation checking.
19049         * lib/relocatable.h: Include <stdlib.h>.
19050         (compute_curr_prefix): Declare that deallocation must happen through
19051         'free'.
19053 2021-08-07  Bruno Haible  <bruno@clisp.org>
19055         regex-quote: Improve GCC 11 allocation-deallocation checking.
19056         * lib/regex-quote.h: Include <stdlib.h> instead of <stddef.h>.
19057         (regex_quote): Declare that deallocation must happen through 'free'.
19059 2021-08-07  Bruno Haible  <bruno@clisp.org>
19061         readline: Improve GCC 11 allocation-deallocation checking.
19062         * lib/readline.h: Include <stdlib.h>.
19063         (readline): Declare that deallocation must happen through 'free'.
19065 2021-08-07  Bruno Haible  <bruno@clisp.org>
19067         read-file: Improve GCC 11 allocation-deallocation checking.
19068         * lib/read-file.h: Include <stdlib.h> instead of <stddef.h>.
19069         (fread_file, read_file): Declare that deallocation must happen through
19070         'free'.
19072 2021-08-07  Bruno Haible  <bruno@clisp.org>
19074         pipe-filter-gi: Improve GCC 11 allocation-deallocation checking.
19075         * lib/pipe-filter.h (pipe_filter_gi_close): Move declaration up.
19076         (pipe_filter_gi_create): Declare that deallocation must happen through
19077         'pipe_filter_gi_close'.
19079 2021-08-07  Bruno Haible  <bruno@clisp.org>
19081         javaversion: Improve GCC 11 allocation-deallocation checking.
19082         * lib/javaversion.h: Include <stdlib.h>.
19083         (javaexec_version): Declare that deallocation must happen through
19084         'free'.
19086 2021-08-07  Bruno Haible  <bruno@clisp.org>
19088         ino-map: Improve GCC 11 allocation-deallocation checking.
19089         * lib/ino-map.h (ino_map_free): Move declaration up.
19090         (ino_map_alloc): Declare that deallocation must happen through
19091         'ino_map_free'.
19093 2021-08-07  Bruno Haible  <bruno@clisp.org>
19095         hash: Improve GCC 11 allocation-deallocation checking.
19096         * lib/hash.h (hash_free): Move declaration up.
19097         (hash_initialize, hash_xinitialize): Declare that deallocation must
19098         happen through 'hash_free'.
19100 2021-08-07  Bruno Haible  <bruno@clisp.org>
19102         hamt: Improve GCC 11 allocation-deallocation checking.
19103         * lib/hamt.h (hamt_free): Move declaration up.
19104         (hamt_create, hamt_copy): Declare that deallocation must happen through
19105         'hamt_free'.
19107 2021-08-07  Bruno Haible  <bruno@clisp.org>
19109         get_progname_of: Improve GCC 11 allocation-deallocation checking.
19110         * lib/get_progname_of.h: Include <stdlib.h>.
19111         (get_progname_of): Declare that deallocation must happen through 'free'.
19113 2021-08-07  Bruno Haible  <bruno@clisp.org>
19115         fts: Improve GCC 11 allocation-deallocation checking.
19116         * lib/fts_.h (fts_open): Declare that deallocation must happen through
19117         'fts_close'.
19119 2021-08-07  Bruno Haible  <bruno@clisp.org>
19121         eealloc: Improve GCC 11 allocation-deallocation checking.
19122         * lib/eealloc.h (eemalloc): Declare that deallocation must happen
19123         through 'free'.
19125 2021-08-07  Bruno Haible  <bruno@clisp.org>
19127         di-set: Improve GCC 11 allocation-deallocation checking.
19128         * lib/di-set.h (di_set_free): Move declaration up.
19129         (di_set_alloc): Declare that deallocation must happen through
19130         'di_set_free'.
19132 2021-08-07  Bruno Haible  <bruno@clisp.org>
19134         [x]concat-filename: Improve GCC 11 allocation-deallocation checking.
19135         * lib/concat-filename.h: Include <stdlib.h>.
19136         (concatenated_filename, xconcatenated_filename): Declare that
19137         deallocation must happen through 'free'.
19139 2021-08-07  Bruno Haible  <bruno@clisp.org>
19141         clean-temp: Improve GCC 11 allocation-deallocation checking.
19142         * lib/clean-temp.h (cleanup_temp_dir): Move declaration up.
19143         (create_temp_dir): Declare that deallocation must happen through
19144         'cleanup_temp_dir'.
19146 2021-08-07  Bruno Haible  <bruno@clisp.org>
19148         canon-host: Improve GCC 11 allocation-deallocation checking.
19149         * lib/canon-host.h: Include <stdlib.h>.
19150         (canon_host, canon_host_r): Declare that deallocation must happen
19151         through 'free'.
19153 2021-08-07  Bruno Haible  <bruno@clisp.org>
19155         c-xvasprintf: Improve GCC 11 allocation-deallocation checking.
19156         * lib/c-xvasprintf.h: Include <stdlib.h>.
19157         (c_xasprintf, c_xvasprintf): Declare that deallocation must happen
19158         through 'free'.
19160 2021-08-07  Bruno Haible  <bruno@clisp.org>
19162         bitsetv: Improve GCC 11 allocation-deallocation checking.
19163         * lib/bitsetv.h (bitsetv_free): Move declaration up.
19164         (bitsetv_alloc, bitsetv_create): Declare that deallocation must happen
19165         through 'bitsetv_free'.
19167         bitset: Improve GCC 11 allocation-deallocation checking.
19168         * lib/bitset.h (bitset_free): Move declaration up.
19169         (bitset_alloc, bitset_create): Declare that deallocation must happen
19170         through 'bitset_free'.
19171         (bitset_obstack_free): Move declaration up.
19172         (bitset_obstack_alloc): Declare that deallocation must happen through
19173         'bitset_obstack_free'.
19175 2021-08-07  Bruno Haible  <bruno@clisp.org>
19177         argv-iter: Improve GCC 11 allocation-deallocation checking.
19178         * lib/argv-iter.h (argv_iter_free): Move declaration up.
19179         (argv_iter_init_argv, argv_iter_init_stream): Declare that deallocation
19180         must happen through 'argv_iter_free'.
19182 2021-08-07  Bruno Haible  <bruno@clisp.org>
19184         argp: Improve GCC 11 allocation-deallocation checking.
19185         * lib/argp-fmtstream.h (__argp_fmtstream_free, argp_fmtstream_free):
19186         Move declarations up.
19187         (__argp_make_fmtstream): Declare that deallocation must happen through
19188         '__argp_fmtstream_free'.
19189         (argp_make_fmtstream): Declare that deallocation must happen through
19190         'argp_fmtstream_free'.
19192 2021-08-07  Bruno Haible  <bruno@clisp.org>
19194         areadlink, areadlinkat: Improve GCC 11 allocation-deallocation checking.
19195         * lib/areadlink.h: Include <stdlib.h> instead of <stddef.h>.
19196         (areadlink, areadlink_with_size, areadlinkat, areadlinkat_with_size):
19197         Declare that deallocation must happen through 'free'.
19199 2021-08-07  Bruno Haible  <bruno@clisp.org>
19201         stdio: Improve GCC 11 allocation-deallocation checking.
19202         * lib/stdio.in.h (fdopen, fopen, tmpfile): Declare that deallocation
19203         must happen through 'fclose'.
19204         (popen): Declare that deallocation must happen through 'pclose'.
19205         * lib/stdio-safer.h (fopen_safer, tmpfile_safer): Declare that
19206         deallocation must happen through 'fclose'.
19207         (popen_safer): Declare that deallocation must happen through 'pclose'.
19208         (freopen_safer): Declare that arguments must be non-NULL.
19210 2021-08-07  Bruno Haible  <bruno@clisp.org>
19212         dirent: Improve GCC 11 allocation-deallocation checking.
19213         * lib/dirent.in.h (closedir): Move declaration up.
19214         (opendir, fdopendir): Declare that deallocation must happen through
19215         'closedir'.
19216         * lib/dirent-safer.h (opendir_safer): Likewise.
19217         * lib/opendirat.h (opendirat): Likewise.
19219 2021-08-07  Bruno Haible  <bruno@clisp.org>
19221         stdlib, string, wchar: Improve GCC 11 allocation-deallocation checking.
19222         * lib/stdlib.in.h (free): Move declaration up.
19223         (aligned_alloc, calloc, canonicalize_file_name, malloc, realloc):
19224         Declare that deallocation must happen through 'free' (which may actually
19225         be 'rpl_free').
19226         * lib/string.in.h: Include <stdlib.h>.
19227         (strdup): Declare deallocation.
19228         * lib/wchar.in.h: Include <stdlib.h>.
19229         (wcsdup): Declare deallocation.
19230         * lib/malloc.in.h: Include <stdlib.h>.
19231         (memalign): Declare deallocation.
19233 2021-08-07  Bruno Haible  <bruno@clisp.org>
19235         year2038: Fix recommendation regarding -m64 flag.
19236         * m4/year2038.m4 (gl_YEAR2038_BODY): Recommend to put option --m64 in
19237         CC, not in CPPFLAGS and LDFLAGS.
19239 2021-08-07  Bruno Haible  <bruno@clisp.org>
19241         quotearg: Tweak last commit.
19242         * lib/quotearg.h: Don't include <stddef.h>. Remove stray semicolon.
19244 2021-08-07  Bruno Haible  <bruno@clisp.org>
19246         malloca: Tweak last commit.
19247         * lib/malloca.h: Keep use and declaration of mmalloca close together.
19249 2021-08-07  Bruno Haible  <bruno@clisp.org>
19251         dirname-lgpl, sh-quote, system-quote, xstriconv: Clean up includes.
19252         * lib/dirname.h: Don't include <stddef.h>.
19253         * lib/sh-quote.h: Likewise.
19254         * lib/system-quote.h: Likewise.
19255         * lib/xstriconv.h: Likewise.
19257 2021-08-07  Bruno Haible  <bruno@clisp.org>
19259         dfa: Improve GCC 11 allocation-deallocation checking.
19260         * lib/dfa.h (dfamust): Declare that deallocation must happen through
19261         dfamustfree.
19263 2021-08-06  Paul Eggert  <eggert@cs.ucla.edu>
19265         glob: merge from glibc
19266         * lib/glob-libc.h, lib/glob.c: Merge changes from glibc 2.34.
19267         The result should be copyable directly into glibc.
19268         * modules/glob-h (glob-libc.gl.h): Also omit __THROWNL.
19270 2021-08-03  Simon Josefsson  <simon@josefsson.org>
19272         announce-gen: Print SHA1/B64(SHA256) instead of MD5/SHA1.
19273         * build-aux/announce-gen (%digest_classes): Removed.
19274         (usage): Doc fix.
19275         (print_checksums): Instead of MD5/SHA1, print SHA1 and
19276         B64(SHA256), inspired by OpenSSH announcements.
19278         maintainer-makefile: Print checksums by default.
19279         * top/maint.mk (announcement): Drop --no-print-checksums.
19281 2021-08-02  Paul Eggert  <eggert@cs.ucla.edu>
19283         manywarnings: enable some malloc warnings
19284         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Stop adding
19285         -Wno-analyzer-double-free, -Wno-analyzer-null-dereference, and
19286         -Wno-analyzer-use-after-free, as these false alarms don’t seem
19287         to be as much of an issue now that we’ve pacified a couple
19288         of individual modules and GCC has some bug fixes.
19290         dfa: omit unneeded malloc+free
19291         Problem indirectly found by Coverity.
19292         * lib/dfa.c (enlistnew): New function, with most of the body of
19293         the old ‘enlist’.  It assumes its arg NEW has been malloced and
19294         can be freed eventually.
19295         (enlist, addlists, dfamust): Use it.
19296         (dfamust): Omit an unnecessary malloc+free.
19298         year2038: port to unusual time_t platforms
19299         * m4/year2038.m4 (gl_YEAR2038_TEST_INCLUDES): Check that time_t
19300         can go to 2**32 - 1, not to 2**63 - 1, as the former is enough to
19301         be year 2038 safe.  Unsigned 32-bit time_t (AmigaOS) and signed
19302         40-bit time_t (Unisys ClearPath) have occurred in the wild, and
19303         even if Gnulib code is rarely or never ported to them there’s no
19304         need to exclude them merely because of year 2038 issues.
19305         (gl_YEAR2038_BODY): Adjust messages to match.  Use 2**32 - 1,
19306         not 2**32, as the test timestamp, to allow unsigned 32-bit time_t.
19308 2021-08-01  Paul Eggert  <eggert@cs.ucla.edu>
19310         xalloc: no attribute (malloc (free)) on inline
19311         The GCC manual says you can’t use __attribute__ ((__malloc__
19312         (free, 1))) on inline functions.  Problem discovered when
19313         compiling diffutils 3.8 on RHEL 8.4 using a GCC 11.2.0 that I
19314         built myself.  Perhaps the problem was not discovered earlier
19315         because the attribute works with ‘free’ (which is what I was
19316         seeing before on Fedora 34) but not with ‘rpl_free’ (seen on RHEL
19317         8.4).  Anyway, the GCC manual says it shouldn’t work at all, so
19318         don’t use it.
19319         * lib/xalloc.h (xnmalloc, xcharalloc): No longer inline.
19320         * lib/xmalloc.c (xcharalloc, xnmalloc): Move function bodies here.
19321         * m4/gnulib-common.m4 (_GL_ATTRIBUTE_DEALLOC)
19322         (_GL_ATTRIBUTE_DEALLOC_FREE): Document that these cannot be
19323         used on inline functions, as per the GCC 11.2.1 manual.
19325         sigsegv-tests: make more things static
19326         * tests/test-sigsegv-catch-segv1.c:
19327         * tests/test-sigsegv-catch-stackoverflow1.c:
19328         * tests/test-sigsegv-catch-stackoverflow2.c:
19329         Declare some functions and variables static, to pacify GCC when
19330         warning about external functions missing declarations.
19332         maint: improve -fanalyzer malloc checking
19333         * lib/backup-internal.h, lib/backupfile.h:
19334         * lib/canonicalize.h, lib/dfa.h, lib/dirname.h, lib/exclude.h:
19335         * lib/filenamecat.h, lib/malloca.h, lib/modechange.h:
19336         * lib/mountlist.h, lib/pagealign_alloc.h, lib/quotearg.h:
19337         * lib/readutmp.h, lib/savedir.h, lib/sh-quote.h, lib/system-quote.h:
19338         * lib/trim.h, lib/xgetcwd.h, lib/xgethostname.h, lib/xmalloca.h:
19339         * lib/xreadlink.h, lib/xstriconv.h, lib/xvasprintf.h:
19340         Add malloc-related attributes and include stdlib.h as needed.
19341         * lib/dfa.c: Include verify.h.
19342         (assume_nonnull): New macro.
19343         (dfamust): Use it to pacify GCC.
19344         * lib/malloca.c (mmalloca): Redo to pacify GCC, to cut down on the
19345         number of casts, and to avoid signed integer overflow on
19346         theoretical platforms.
19347         * lib/vasnprintf.c, tests/test-argmatch.c:
19348         Disable -Wanalyzer-null-argument here.
19349         * m4/manywarnings.m4: Update GCC bug report number in comment.
19351 2021-08-01  Jim Meyering  <meyering@fb.com>
19353         regex: pacify GCC 11.2.1's -fanalyzer
19354         * lib/regex_internal.c (re_node_set_merge):
19355         Add a debug assertion to pacify GCC 11.2.1's -fanalyzer.
19357 2021-08-01  Bruno Haible  <bruno@clisp.org>
19359         limits-h tests: Add tests for BOOL_MAX and BOOL_WIDTH.
19360         * tests/test-limits-h.c (bool_attrs): New variable.
19361         Check value of BOOL_MAX.
19363 2021-07-31  Paul Eggert  <eggert@cs.ucla.edu>
19365         regex: pacify GCC 11.2 -fanalyzer
19366         * lib/regex_internal.c (re_node_set_insert):
19367         Add a debug assertion to pacify GCC 11.2 -fanalyzer.
19369         maint: pacify GCC 11.2 -fanalyzer in crypto tests
19370         * tests/bench-digest.h (main): Report an error after memory
19371         exhaustion, instead of using a null pointer.
19373 2021-07-30  Paul Eggert  <eggert@cs.ucla.edu>
19375         xalloc: add malloc-related function attributes
19376         * lib/quotearg.h, lib/xalloc.h: Include stdlib.h, for
19377         the benefit of _GL_ATTRIBUTE_RETURNS_NONNULL.
19378         * lib/quotearg.h (clone_quoting_options):
19379         * lib/xalloc.h (xmalloc, ximalloc, xzalloc, xizalloc, xcalloc)
19380         (xicalloc, xrealloc, xirealloc, xireallocarray, x2realloc)
19381         (x2nrealloc, xmemdup, ximemdup, xstrdup, xnmalloc, xcharalloc):
19382         Add _GL_ATTRIBUTE_DALLOC_FREE and _GL_ATTRIBUTE_RETURNS_NONNULL
19383         attributes as appropriate.
19385         gnulib-common: update for gcc -Wmismatched-dealloc
19386         * m4/gnulib-common.m4 (gl_COMMON_BODY): Define the macros
19387         _GL_ATTRIBUTE_DEALLOC and _GL_ATTRIBUTE_DEALLOC_FREE.  These can
19388         be useful with gcc -Wmismatched-dealloc.
19390         gnulib-common: update for C2x 2020-12-11 draft
19391         Use blessed-by-draft-standard way to test for [[__deprecated__]]
19392         etc.; this is supported by GCC 11 and the fallback code should
19393         work fine with GCC 10 and earlier.
19394         * m4/gnulib-common.m4 (gl_COMMON_BODY): Define the macro
19395         _GL_HAS_C_ATTRIBUTE, and use it instead of __STDC_VERSION__ in
19396         deciding whether to use C2x attributes like [[__deprecated__]].
19398         manywarnings: document GCC 11 warnings
19399         * build-aux/gcc-warning.spec: Add warnings introduced in GCC 11.
19400         None of them require Gnulib code changes, so this is just
19401         a documentation change.
19403         limits-h: add BOOL_MAX, BOOL_WIDTH
19404         * doc/posix-headers/limits.texi (limits.h): Document them.
19405         * lib/limits.in.h: Also define CHAR_WIDTH etc. if C2x.
19406         (BOOL_MAX, BOOL_WIDTH): New macros, from C2x.
19407         * m4/limits-h.m4 (gl_LIMITS_H): Also check BOOL_WIDTH.
19409 2021-07-28  Simon Josefsson  <simon@josefsson.org>
19411         maintainer-makefile: Respect cfg.mk setting announcement_Cc_,
19412         reverting most of the previous patch.
19413         * top/maint.mk (announcement_mail_Cc_stable): Rename back to
19414         announcement_Cc_stable.
19415         (announcement_Cc_alpha): Rename back to
19416         announcement_mail_Cc_alpha.
19417         (announcement_Cc_): Renamed from announcement_mail_Cc_.
19418         (announcement_mail_headers_stable)
19419         (announcement_mail_headers_alpha): Use announcement_Cc_ again.
19421 2021-07-28  Simon Josefsson  <simon@josefsson.org>
19423         maintainer-makefile: Fix announcement mail CC's.
19424         * top/maint.mk (announcement_Cc_stable): Rename to
19425         announcement_mail_Cc_stable.
19426         (announcement_Cc_alpha): Rename to announcement_mail_Cc_alpha.
19427         (announcement_mail_headers_stable)
19428         (announcement_mail_headers_alpha): Use announcement_mail_Cc_
19429         instead of announcement_Cc_.
19431 2021-07-25  Bruno Haible  <bruno@clisp.org>
19433         Assume GNU gettext >= 0.17.
19434         * modules/vasprintf (Notice): Remove.
19435         * modules/xvasprintf (Notice): Remove.
19436         * modules/xprintf (Notice): Remove.
19437         * modules/error (Notice): Remove.
19438         * modules/verror (Notice): Remove.
19439         * modules/argp (Notice): Remove.
19440         * modules/propername (Notice): Remove.
19441         * lib/propername.h: Remove outdated comment.
19443 2021-07-19  Simon Josefsson  <simon@josefsson.org>
19445         gendocs.sh: Fix local rendering of HTML manuals.
19446         * build-aux/gendocs.sh (htmlarg): Don't use relative URLs.
19448 2021-07-18  Paul Eggert  <eggert@cs.ucla.edu>
19450         explicit_bzero-tests: pacify GCC better
19451         Problem reported by Bruno Haible in:
19452         https://lists.gnu.org/r/bug-gnulib/2021-07/msg00039.html
19453         * tests/test-explicit_bzero.c: Ignore -Wmaybe-uninitialized.
19454         (stackbuf): Remove this static pointer, reverting recent change.
19455         (do_secret_stuff, test_stack): Revert these related changes too.
19457 2021-07-17  Paul Eggert  <eggert@cs.ucla.edu>
19459         memrchr-tests: pacify GCC
19460         Pacify GCC 11.1.1 20210531 (Red Hat 11.1.1-3) x86-64.
19461         * tests/test-memrchr.c: Disable -Wmaybe-uninitialized.
19463         explicit_bzero-tests: pacify GCC
19464         Redo to pacify -Wmaybe-uninitialized with
19465         GCC 11.1.1 20210531 (Red Hat 11.1.1-3) x86-64.
19466         * tests/test-explicit_bzero.c (stackbuf): New static pointer.
19467         (do_secret_stuff): Use it.
19468         (test_stack): Set it to a local buffer.
19470         posixtm: pacify latest GCC
19471         Also, modernize while I’m at it.
19472         * lib/posixtm.c: Include c-ctype.h, idx.h, intprops.h, verify.h
19473         instead of stdlib.h.
19474         (ISDIGIT): Remove.  All uses replaced by c_isdigit.
19475         (year, posix_time_parse): Prefer idx_t to size_t.  Use assume
19476         instead of abort.
19477         (posixtime): Do not parse twice; once is enough.  That way, we
19478         needn’t worry about a bogus warning about strcpy overrunning a
19479         buffer from GCC 11.1.1 20210531 (Red Hat 11.1.1-3) x86-64
19480         when coreutils is configured with --enable-gcc-warnings.
19481         * modules/posixtm (Depends-on): Add c-ctype, intprops, verify.
19482         Remove stpcpy.
19484 2021-07-17  Bruno Haible  <bruno@clisp.org>
19486         Don't use '#pragma weak' for thread functions in Linux/glibc>=2.34.
19487         Suggested by Florian Weimer <fweimer@redhat.com> in
19488         <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00211.html>.
19489         * m4/threadlib.m4 (gl_PTHREADLIB_BODY): Set gl_pthread_in_glibc and set
19490         LIBPMULTITHREAD accordingly.
19491         (gl_STDTHREADLIB_BODY): Update comments.
19492         (gl_THREADLIB_BODY): Define USE_POSIX_THREADS_FROM_LIBC.
19493         * lib/glthread/thread.h (c11_threads_in_use): Define to 1 if all POSIX
19494         thread functions are in libc.
19495         * lib/glthread/lock.h (c11_threads_in_use): Likewise.
19496         * lib/glthread/cond.h (c11_threads_in_use): Likewise.
19497         * lib/glthread/tls.h (c11_threads_in_use): Likewise.
19499 2021-07-17  Bruno Haible  <bruno@clisp.org>
19501         Fix cross-compilation test results.
19502         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): When cross-compiling, include
19503         <string.h> before testing __GNU_LIBRARY__.
19504         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): Likewise.
19505         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Likewise.
19507 2021-07-14  Paul Eggert  <eggert@cs.ucla.edu>
19509         regex: modernize to newer regex bugset
19510         Problem reported by Hiroo Hayashi in:
19511         https://lists.gnu.org/r/bug-gnulib/2021-07/msg00024.html
19512         * m4/regex.m4 (gl_REGEX): Allow newer glibc behavior for ()0|\1,
19513         behavior where the regex compiles but does not match.
19514         Test for glibc bug 11053.
19515         * tests/test-regex.c (bug_regex11, main): Add casts needed
19516         for printf portability.
19517         (main): Allow newer glibc behavior for ()0|\1.
19519         regex: fix shell quoting problem in configuration
19520         * m4/regex.m4 (gl_REGEX): Fix quoting problems.
19521         These C programs are put into unquoted here-documents,
19522         so $ and \ need to be quoted.
19524 2021-07-08  Paul Eggert  <eggert@cs.ucla.edu>
19526         select: port better to MinGW
19527         Problem reported by Eli Zaretskii in:
19528         https://lists.gnu.org/r/bug-gnulib/2021-07/msg00017.html
19529         * lib/select.c (rpl_select) [_WIN32 && !__CYGWIN__]:
19530         Pass a SOCKET, not a HANDLE, to FD_ISSET.
19532 2021-07-06  Paul Eggert  <eggert@cs.ucla.edu>
19534         year2038: Add --disable-year2038 option
19535         Also, document this stuff better.  Suggested by Bruno Haible in:
19536         https://lists.gnu.org/r/bug-gnulib/2021-07/msg00011.html
19537         * doc/year2038.texi: Document --disable-year2038.
19538         * m4/year2038.m4 (gl_YEAR2038_BODY): Support ‘./configure
19539         --disable-year2038’ to disable 64-bit time_t when that is not the
19540         default.  Arg is now either empty or nonempty (not a shell
19541         command) and is evaluated at m4 expansion time instead of at
19542         runtime; all callers changed.
19544         doc: clarify which module fixes 32-bit time_t
19545         * doc/posix-headers/time.texi: Make it clear that the 32-bit
19546         time_t problem is addressed by the year2038 module, not
19547         by the time module.
19549 2021-07-01  Paul Eggert  <eggert@cs.ucla.edu>
19551         year2038: support glibc 2.34 _TIME_BITS=64
19552         In glibc 2.34 on Linux kernels where time_t is traditionally 32-bit,
19553         defining _FILE_OFFSET_BITS=64 and _TIME_BITS=64 makes time_t 64-bit.
19554         Apps must define both macros.  Gnulib applications that use either
19555         the largefile or the year2038 modules will want this behavior;
19556         largefile because it deals with the off_t and ino_t components of
19557         struct stat already, and so should also deal with time_t.
19558         * NEWS, doc/largefile.texi, doc/posix-headers/time.texi:
19559         Mention this.
19560         * m4/largefile.m4: Override two macros even in Autoconf 2.70 and later.
19561         (_AC_SYS_LARGEFILE_MACRO_VALUE): #undef $1 before #defining it, in
19562         case some other Gnulib macro has #defined it.
19563         (AC_SYS_LARGEFILE): Use AS_IF and AS_CASE to propagate AC_REQUIREs.
19564         Invoke gl_YEAR2038_BODY if we need to set _FILE_OFFSET_BITS=64.
19565         * m4/year2038.m4 (gl_YEAR2038_TEST_INCLUDES): New macro.
19566         (gl_YEAR2038_BODY): New macro, with gl_YEAR2038’s old body; this
19567         macro is designed to be used directly instead of being
19568         AC_REQUIREd.  It takes an argument specifying whether 64-bit is
19569         required.  Set _TIME_BITS=64 if this makes a difference in time_t
19570         width when setting _FILE_OFFSET_BITS=64.  Do not warn about
19571         32-bit time_t more than once.
19572         * modules/largefile (Files): Add year2038.m4.
19573         (Depends-on): Require gl_YEAR2038_EARLY.
19575         relocatable-prog-wrapper: add m4 files
19576         Add .m4 files needed for standalone relocatable-prog-wrapper, so
19577         that ‘./gnulib-tool --test relocatable-prog-wrapper’ does not fail
19578         with diagnostics like ‘configure.ac:63: error: possibly undefined
19579         macro: gl_FUNC_MALLOC_POSIX’.
19580         * modules/relocatable-prog-wrapper (Files): Add m4/free.m4,
19581         m4/malloc.m4, m4/mempcpy.m4, m4/rawmemchr.m4, m4/realloc.m4.
19583 2021-06-28  Bruno Haible  <bruno@clisp.org>
19585         strerror-override: Fix possible compilation error.
19586         Reported by Thomas Klausner <wiz@netbsd.org>.
19587         * lib/strerror-override.h (GNULIB_defined_strerror_override_macro): New
19588         macro.
19589         * lib/strerror-override.c (strerror_override): Don't define if
19590         GNULIB_defined_strerror_override_macro is set.
19592 2021-06-27  Bruno Haible  <bruno@clisp.org>
19594         environ: Fix wrong autoconf test result in C++ mode.
19595         * m4/environ.m4 (gt_CHECK_VAR_DECL): Use a typedef'ed type, not an
19596         anonymous type.
19598 2021-06-22  Egor Ignatov  <egori@altlinux.org>  (tiny change)
19600         regex: fix undefined behavior
19601         Problem reported by Paul Eggert in:
19602         https://lists.gnu.org/r/bug-gnulib/2021-06/msg00115.html
19603         * lib/regexec.c (proceed_next_node):
19604         Don’t insert already-inserted node.
19606 2021-06-21  Eric Blake  <eblake@redhat.com>
19608         sigsegv, sigsegv-tests: Assign my contributions to the FSF.
19609         * m4/sigaltstack.m4: Change copyright notice: Write "Copyright (C) FSF"
19610         instead of "Copyright (C) Eric Blake".
19611         * tests/altstack-util.h: Likewise.
19612         * tests/test-sigsegv-catch-stackoverflow1.c: Likewise.
19613         * tests/test-sigsegv-catch-stackoverflow2.c: Likewise.
19615 2021-06-20  Bruno Haible  <bruno@clisp.org>
19617         unistd: Avoid compilation error in C++ mode on Solaris, HP-UX, mingw.
19618         Reported by Eli Zaretskii <eliz@gnu.org> in
19619         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00135.html>.
19620         * lib/unistd.in.h (swab): Consider different declarations on Solaris,
19621         HP-UX, and old mingw.
19623 2021-06-20  Bruno Haible  <bruno@clisp.org>
19625         Sync with GNU gettext.
19626         * lib/printf-parse.c: Ignore IN_LIBINTL and IN_LIBASPRINTF.
19627         * lib/vasnprintf.c: Ignore IN_LIBINTL.
19629 2021-06-19  Bruno Haible  <bruno@clisp.org>
19631         Sync with GNU gettext.
19632         * lib/tsearch.c: Ignore IN_LIBINTL.
19633         * lib/localename-table.h: Likewise.
19634         * lib/localename.c: Ignore IN_LIBINTL in some places.
19636 2021-06-19  Bruno Haible  <bruno@clisp.org>
19638         unistd: Improve conflict resolution between gnulib and textstyle.h.
19639         * lib/unistd.in.h (GNULIB_overrides_isatty): New macro.
19641 2021-06-19  Bruno Haible  <bruno@clisp.org>
19643         stdio: Improve conflict resolution between gnulib and libintl.h.
19644         * lib/stdio.in.h (GNULIB_overrides_snprintf, GNULIB_overrides_sprintf,
19645         GNULIB_overrides_asprintf, GNULIB_overrides_vasprintf,
19646         GNULIB_overrides_vsnprintf, GNULIB_overrides_vsprintf): New macros.
19648 2021-06-19  Bruno Haible  <bruno@clisp.org>
19650         declared.sh: Allow parsing 'extern "C"' lines.
19651         * build-aux/declared.sh: Don't concatenate lines to an 'extern "C" {'
19652         line.
19654 2021-06-19  Bruno Haible  <bruno@clisp.org>
19656         unitypes: Fix trouble caused by installed older versions of unitypes.h.
19657         * modules/unitypes (configure.ac): Define _UC_RESTRICT through config.h.
19659 2021-06-19  Bruno Haible  <bruno@clisp.org>
19661         sigsegv, sigsegv-tests: Assign my contributions to the FSF.
19662         * lib/sigsegv.in.h: Change copyright notice: Write "Copyright (C) FSF"
19663         instead of "Copyright (C) Bruno Haible".
19664         * lib/sigsegv.c: Likewise.
19665         * lib/stackvma.h: Likewise.
19666         * lib/stackvma.c: Likewise.
19667         * m4/sigaltstack.m4: Likewise.
19668         * m4/stack-direction.m4: Likewise.
19669         * tests/altstack-util.h: Likewise.
19670         * tests/mmap-anon-util.h: Likewise.
19671         * tests/test-sigsegv-catch-segv1.c: Likewise.
19672         * tests/test-sigsegv-catch-segv2.c: Likewise.
19673         * tests/test-sigsegv-catch-stackoverflow1.c: Likewise.
19674         * tests/test-sigsegv-catch-stackoverflow2.c: Likewise.
19676 2021-06-18  Darren Kenny  <darren.kenny@oracle.com>  (tiny change)
19678         argp: Avoid possible NULL access in argp_help.
19679         Reported by Coverity. The invocation chain is:
19680         argp_help -> _help -> fill_in_uparams -> validate_uparams.
19681         * lib/argp-help.c (validate_uparams): Don't crash if state == NULL.
19683 2021-06-16  Bruno Haible  <bruno@clisp.org>
19685         tsearch: Relicense under LGPLv2+.
19686         * modules/tsearch (License): Change to LGPLv2+.
19687         * lib/tsearch.c: Update license notice.
19689 2021-06-15  Bruno Haible  <bruno@clisp.org>
19691         pipe-filter-ii tests: Fix long-standing failure on native Windows.
19692         * tests/test-pipe-filter-ii2-main.c: Include binary-io.h.
19693         (main): Avoid NL to CRLF conversion on standard output.
19694         * tests/test-pipe-filter-ii2-child.c: Include <unistd.h>, binary-io.h.
19695         (main): Avoid NL to CRLF conversion on standard output.
19697 2021-06-15  Bruno Haible  <bruno@clisp.org>
19699         xnanosleep: Improve module description.
19700         * modules/xnanosleep (Description): Improve.
19701         * lib/xnanosleep.h: Add comment. Make includable from C++.
19702         * lib/xnanosleep.c: Update comment.
19704 2021-06-15  Bruno Haible  <bruno@clisp.org>
19706         xfreopen: Improve module description.
19707         * modules/xfreopen (Description): Improve.
19708         * lib/xfreopen.h: Add comments. Make includable from C++.
19709         * lib/xfreopen.c: Update comment.
19711 2021-06-14  Paul Eggert  <eggert@cs.ucla.edu>
19713         idx: new printf/scanf length modifier macro
19714         * lib/idx.h (pIDX): New macro.
19716 2021-06-13  Bruno Haible  <bruno@clisp.org>
19718         Align 2011-11-26 patch to 2021-04-11 patch (regression from 2021-04-11).
19719         Reported by Paul Eggert.
19720         * m4/unistd_h.m4 (gl_UNISTD_H_REQUIRE_DEFAULTS): Also initialize
19721         GNULIB_UNISTD_H_GETOPT variable.
19722         * modules/getopt-posix (configure.ac): Set GNULIB_UNISTD_H_GETOPT
19723         variable.
19724         * modules/unistd (Makefile.am): Rely on ${gl_include_guard_prefix}
19725         processing done by gnulib-tool since 2021-04-11.
19726         * gnulib-tool: Revert last change.
19727         * pygnulib/GLEmiter.py: Likewise.
19729 2021-06-13  Paul Eggert  <eggert@cs.ucla.edu>
19731         * lib/stack.h (_GL_STACK_PREFIX): Omit stray semicolon.
19733         getopt-gnu: port back to Solaris 10
19734         * gnulib-tool (func_emit_lib_Makefile_am)
19735         (func_emit_tests_Makefile_am): Don’t substitute things like
19736         $(GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT),
19737         as this mishandles unistd and getopt-gnu, which breaks
19738         ‘make check’ on Solaris 10 with getopt-gnu.
19739         * pygnulib/GLEmiter.py (lib_Makefile_am, tests_Makefile_am):
19740         Likewise, albeit hackier since I did not test this and
19741         so went with a trivial hack instead.
19743 2021-06-13  Bruno Haible  <bruno@clisp.org>
19745         ialloc: Put appropriate license notice in source files.
19746         * lib/ialloc.h: Use LGPLv3+ notice.
19747         * lib/ialloc.c: Likewise.
19749 2021-06-11  Paul Eggert  <eggert@cs.ucla.edu>
19751         xalloc: new idx_t-based allocators
19752         This is for code that prefers to use idx_t for sizes.
19753         * lib/basename.c (base_name):
19754         * lib/dfa.c (mbs_to_wchar, state_index, dfaoptimize, dfaanalyze)
19755         (icatalloc, enlist, allocmust, dfamust):
19756         * lib/exclude.c (struct exclude_pattern, free_exclude_segment)
19757         (file_pattern_matches, add_exclude, add_exclude_fp):
19758         * lib/getusershell.c (line_size, readname):
19759         * lib/linebuffer.c (readlinebuffer_delim):
19760         * lib/linebuffer.h (struct linebuffer):
19761         * lib/readtokens.c (readtoken, readtokens):
19762         * lib/readutmp.c (read_utmp):
19763         * lib/savedir.c (streamsavedir):
19764         * lib/stack.h (_GL_STACK_TYPE, _GL_STACK_PREFIX):
19765         * lib/userspec.c (parse_with_separator):
19766         * lib/xgethostname.c (XGETANAME):
19767         Prefer idx_t to size_t for indexes, and use idx_t-related allocators.
19768         * lib/basename.c: Do not include xstrndup.h.
19769         (basename): Simplify by always using memcpy.
19770         * lib/xalloc.h (ximalloc, xizalloc, xicalloc, xirealloc)
19771         (xireallocarray, ximemdup, ximemdup0) [GNULIB_XALLOC]:
19772         New decls.
19773         (x2nrealloc): Now just a decl, as the body is moved into xmalloc.c.
19774         * lib/xmalloc.c: Include ialloc.h.
19775         Rename some local parameters to be consistent with the .h files.
19776         (nonnull): New static function.
19777         (xmalloc, xcalloc): Simplify by using nonnull.
19778         (ximalloc, xirealloc, xireallocarray, xizalloc, xicalloc)
19779         (ximemdup, ximemdup0): New functions.
19780         (x2nrealloc): Moved here from xalloc.h.
19781         * modules/xalloc (Depends-on): Add ialloc.
19782         * modules/dirname (Depends-on): Removbe xstrndup.
19783         * modules/linebuffer (Depends-on): Add idx.
19785         ialloc: new module
19786         * lib/ialloc.c, lib/ialloc.h, modules/ialloc: New files.
19788         exclude: improve wide-character hashing
19789         * lib/exclude.c (string_hasher_ci): Take the modulo at the end
19790         rather than each time a wide character is retrieved; this should
19791         be more efficient and should hash better.
19793 2021-06-11  Bruno Haible  <bruno@clisp.org>
19795         Make message in last commit more precise.
19796         Suggested by Eric Blake.
19797         * gnulib-tool (func_emit_tests_Makefile_am): Add more precision to
19798         'check-notice' message.
19800 2021-06-10  Bruno Haible  <bruno@clisp.org>
19802         Clarify where to report test failures from Gnulib tests.
19803         * gnulib-tool (func_emit_tests_Makefile_am): Emit a dependency of
19804         'check-am' on 'check-notice' that prints a notice.
19806 2021-06-10  Bruno Haible  <bruno@clisp.org>
19808         Clarify that compiler warnings in the Gnulib tests can be ignored.
19809         * gnulib-tool (func_emit_tests_Makefile_am): Emit overrides for CFLAGS
19810         and CXXFLAGS. Emit a dependency of 'all' on 'all-notice' that prints a
19811         notice.
19812         (func_emit_initmacro_start): Add a second argument. If it is true, emit
19813         code to require gl_CC_ALLOW_WARNINGS and gl_CXX_ALLOW_WARNINGS.
19814         (func_import, func_create_testdir): All callers updated.
19815         * m4/gnulib-common.m4 (gl_CC_ALLOW_WARNINGS, gl_CXX_ALLOW_WARNINGS): New
19816         macros.
19818 2021-06-09  Bruno Haible  <bruno@clisp.org>
19820         sigsegv tests: Hide a null pointer from the compiler's optimizations.
19821         Patch by Paul Eggert.
19822         * tests/test-sigsegv-catch-stackoverflow2.c
19823         (null_pointer_to_volatile_int): New variable.
19824         (main): Use it.
19826 2021-06-07  Bruno Haible  <bruno@clisp.org>
19828         get_ppid_of: Add support for DragonFly BSD.
19829         * lib/get_ppid_of.c: Treat DragonFly BSD like FreeBSD.
19831 2021-06-07  Bruno Haible  <bruno@clisp.org>
19833         sigsegv: Document context type for DragonFly BSD.
19834         * lib/sigsegv.in.h (stackoverflow_context_t): On DragonFly BSD, it is a
19835         pointer to 'struct sigcontext'.
19837 2021-06-07  Bruno Haible  <bruno@clisp.org>
19839         dynarray, scratch_buffer: Fix VPATH builds (regression from yesterday).
19840         * modules/dynarray (configure.ac): Invoke AC_PROG_MKDIR_P.
19841         (Makefile.am): Create malloc/ directory before creating
19842         malloc/dynarray.gl.h and malloc/dynarray-skeleton.gl.h.
19843         * modules/scratch_buffer (configure.ac): Invoke AC_PROG_MKDIR_P.
19844         (Makefile.am): Create malloc/ directory before creating
19845         malloc/scratch_buffer.gl.h.
19847 2021-06-07  Bruno Haible  <bruno@clisp.org>
19849         ptsname_r: Add support for DragonFly BSD 6.0.
19850         * lib/ptsname_r.c (__ptsname_r): Add implementation for DragonFly BSD.
19851         * tests/test-ptsname_r.c (main): Treat Dragonfly BSD like Solaris.
19853 2021-06-07  Bruno Haible  <bruno@clisp.org>
19855         Avoid some test failures on DragonFly BSD 6.0.
19856         * tests/test-c32isalnum.c (main): On Dragonfly BSD, disable tests that
19857         fail.
19858         * tests/test-c32isalpha.c (main): Likewise.
19859         * tests/test-c32islower.c (main): Likewise.
19860         * tests/test-c32isupper.c (main): Likewise.
19861         * tests/test-ptsname.c (main): Treat Dragonfly BSD like Solaris.
19863 2021-06-07  Kamil Dudka  <kdudka@redhat.com>
19865         mountlist: recognize fuse.portal as dummy file system
19866         * lib/mountlist.c [ME_DUMMY_0]: Add "fuse.portal" as
19867         a dummy file system (used in flatpak implementations).
19869 2021-06-07  Bruno Haible  <bruno@clisp.org>
19871         host-os: Add support for DragonFly BSD.
19872         * m4/host-os.m4 (gl_HOST_OS): On DragonFly BSD, set
19873         HOST_OPERATING_SYSTEM to "DragonFly BSD", not "Dragonfly".
19875 2021-06-07  Bruno Haible  <bruno@clisp.org>
19877         thread: Fix test link error on DragonFly BSD 6.0.
19878         * lib/glthread/thread.c (gl_thread_create): Moved to here...
19879         * lib/glthread/thread.h (gl_thread_create): ...from here.
19880         (_GLTHREAD_THREAD_INLINE): Remove macro.
19881         Remove _GL_INLINE_HEADER_BEGIN/END invocations.
19883 2021-06-06  Bruno Haible  <bruno@clisp.org>
19885         sigsegv: Avoid a gcc warning "declaration of 'sig' shadows a parameter".
19886         Reported by Dmitry V. Levin <ldv@altlinux.org> in
19887         <https://lists.gnu.org/archive/html/bug-gnulib/2021-06/msg00018.html>.
19888         * lib/sigsegv.c (sigsegv_handler): Use a different local variable name
19889         than 'sig'.
19891 2021-06-06  Bruno Haible  <bruno@clisp.org>
19893         scratch_buffer: Avoid conflict with prepr. macros owned by the system.
19894         * lib/scratch_buffer.h: Don't include <libc-config.h>. Define
19895         _GL_LIKELY, _GL_UNLIKELY. Include malloc/scratch_buffer.gl.h instead of
19896         malloc/scratch_buffer.h.
19897         * modules/scratch_buffer (Depends-on): Add builtin-expect.
19898         (Makefile.am): Arrange to create malloc/scratch_buffer.gl.h from
19899         malloc/scratch_buffer.h.
19901 2021-06-06  Bruno Haible  <bruno@clisp.org>
19903         dynarray: Avoid conflict with preprocessor macros owned by the system.
19904         * lib/dynarray.h: Don't include <libc-config.h>. Define _GL_LIKELY,
19905         _GL_UNLIKELY. Include malloc/dynarray.gl.h instead of malloc/dynarray.h.
19906         Include malloc/dynarray-skeleton.gl.h instead of
19907         malloc/dynarray-skeleton.c.
19908         * modules/dynarray (Depends-on): Add builtin-expect.
19909         (Makefile.am): Arrange to create malloc/dynarray.gl.h from
19910         malloc/dynarray.h and malloc/dynarray-skeleton.gl.h from
19911         malloc/dynarray-skeleton.c.
19913 2021-06-06  Bruno Haible  <bruno@clisp.org>
19915         glob-h: Avoid conflict with preprocessor macros owned by the system.
19916         This fixes a compilation error on DragonFly BSD 6.0.
19917         * lib/glob.in.h: Don't include <libc-config.h>. Don't define __USE_GNU.
19918         Include glob-libc.gl.h instead of glob-libc.h.
19919         * modules/glob-h (Makefile.am): Arrange to create glob-libc.gl.h from
19920         glob-libc.h.
19921         * lib/libc-config.h: Add comment.
19923 2021-06-06  Dmitry V. Levin  <ldv@altlinux.org>
19925         * tests/test-regex.c (tests): Add test cases for *+ and ** regressions
19926         fixed by the previous commit.
19928         * tests/test-regex.c (tests): Remove the comment saying that some tests
19929         are not used.  That comment was copied along with tests from glibc
19930         where some of these tests are commented out.
19932 2021-06-06  Egor Ignatov  <egori@altlinux.org>  (tiny change)
19934         * lib/regexec.c (set_regs): Pop if CUR_NODE has already been checked
19935         only when we have a fail stack.
19937 2021-06-05  Bruno Haible  <bruno@clisp.org>
19939         lib-symbol-visibility: Make configure check work for newer GCC.
19940         Reported by Ozkan Sezer <sezeroz@gmail.com> in
19941         <https://lists.gnu.org/archive/html/bug-gnulib/2021-05/msg00117.html>.
19942         * m4/visibility.m4 (gl_VISIBILITY): Add a function definition for each
19943         declaration in the test program.
19945 2021-06-05  Bruno Haible  <bruno@clisp.org>
19947         vasnprintf: Don't leak memory when memory allocation fails.
19948         Found by Coverity. Reported by Mike Fabian <mfabian@redhat.com> in
19949         <https://lists.gnu.org/archive/html/bug-libunistring/2021-06/msg00000.html>.
19950         * lib/vasnprintf.c (VASNPRINTF): In places where a local variable points
19951         to heap-allocated storage, free that storage before doing
19952         'goto out_of_memory;'.
19954 2021-06-04  Bruno Haible  <bruno@clisp.org>
19956         gnulib-tool: Stop doing license notice replacements.
19957         * gnulib-tool: Don't document --more-symlinks and --more-hardlinks any
19958         more.
19959         (do_copyrights): Remove variable.
19960         (func_import): Don't perform license updates on imported files any more.
19961         * pygnulib/GLInfo.py: Don't document --more-symlinks any more.
19962         * doc/gnulib-intro.texi (Copyright): Document the new situation.
19963         * doc/gnulib.texi (Module description): Likewise.
19964         * NEWS: Mention the change.
19966 2021-06-04  Bruno Haible  <bruno@clisp.org>
19968         git-merge-changelog: Fix license.
19969         * modules/git-merge-changelog (License): Change back to GPL.
19970         * lib/git-merge-changelog.c: Use a GPLv3+ notice.
19972 2021-06-04  Bruno Haible  <bruno@clisp.org>
19974         Put GPLv3+ notices in source files where appropriate.
19975         * lib/*.{h,c}: Use GPLv3+ notice whenever the module description says
19976         so.
19977         * build-aux/pmccabe.css: Likewise.
19979 2021-06-04  Bruno Haible  <bruno@clisp.org>
19981         Put LGPLv3+ notices in source files where appropriate.
19982         * lib/*.{h,c}: Use LGPLv3+ notice whenever the module description says
19983         so.
19985 2021-06-04  Bruno Haible  <bruno@clisp.org>
19987         Put "LGPLv3+ or GPLv2+" notices in source files where appropriate.
19988         * lib/**.{h,c,gperf}: Use "LGPLv3+ or GPLv2+" notice whenever the module
19989         description says so.
19991 2021-06-04  Bruno Haible  <bruno@clisp.org>
19993         Generate correct license notices in libunistring files.
19994         * lib/gen-uni-tables.c (output_library_license, output_tests_license):
19995         New functions.
19996         (output_predicate, output_category, output_combclass,
19997         output_bidi_category, output_decimal_digit, output_digit,
19998         output_numeric, output_mirror, output_joining_type,
19999         output_joining_group, output_scripts, output_scripts_byname,
20000         output_blocks, output_ident_category, output_lbrk_tables,
20001         output_wbrk_tables, output_gbp_table, output_decomposition_tables,
20002         output_composition_tables, output_simple_mapping, output_casing_rules):
20003         Invoke output_library_license.
20004         (output_predicate_test, output_decimal_digit_test, output_digit_test,
20005         output_numeric_test, output_joining_type_test,
20006         output_joining_group_test, output_gbp_test, output_simple_mapping_test):
20007         Invoke output_tests_license.
20008         * lib/uni*/*.h, lib/uni*/*.gperf: Regenerated.
20009         * tests/uni*/*.h: Likewise.
20011 2021-06-04  Bruno Haible  <bruno@clisp.org>
20013         Generate correct license notices in libunistring files.
20014         * lib/uniname/gen-uninames.lisp (main): Emit a copyright and license
20015         notice.
20016         * lib/uniname/uninames.h: Regenerated.
20018 2021-06-04  Bruno Haible  <bruno@clisp.org>
20020         Put LGPLv2+ notices in source files where appropriate.
20021         * lib/**.{h,c,gperf}: Use LGPLv2+ notice whenever the module description
20022         says so.
20024 2021-06-04  Bruno Haible  <bruno@clisp.org>
20026         Put "unlimited" notices in source files where appropriate.
20027         * build-aux/prefix-gnulib-mk: Use "unlimited" notice, since the module
20028         description says so.
20030 2021-06-04  Bruno Haible  <bruno@clisp.org>
20032         Put public domain notices in source files where appropriate.
20033         * lib/{alloca.c,atexit.c,memmove.c}: Use public domain notice.
20035 2021-06-04  Bruno Haible  <bruno@clisp.org>
20037         Revamp check-copyright script.
20038         * check-copyright: Search only the first 50 lines of each file.
20039         Recognize 'LGPLv3+ or GPLv2+', 'unlimited', and 'public domain' license
20040         notices. For files that are part of several modules, consider the
20041         weakest among the licenses. Allocate more room for the first output
20042         column.
20044 2021-06-04  Bruno Haible  <bruno@clisp.org>
20046         gnupload, git-merge-changelog: Fix module description.
20047         * gnulib-tool (func_import, func_create_testdir): Treat
20048         'GPLv2+ build tool' like 'GPLed build tool'.
20049         * pygnulib/GLImport.py (prepare): Likewise.
20050         * modules/gnupload (License): Change to 'GPLv2+ build tool'.
20051         * modules/git-merge-changelog (License): Change to GPLv2+.
20053 2021-06-04  Bruno Haible  <bruno@clisp.org>
20055         New directory with license notices.
20056         * etc/license-notices/*: New files.
20058 2021-05-30  Paul Eggert  <eggert@cs.ucla.edu>
20060         reallocarray-tests: port to weird platforms
20061         * tests/test-reallocarray.c (main): Don’t assume that
20062         PTRDIFF_MAX / 2 + 1 <= SIZE_MAX.  POSIX allows platforms
20063         where this isn’t true, though I don’t know of any examples.
20065         dfa, etc.: prefer xreallocarray to older name
20066         * lib/dfa.c (addtok_mb, realloc_trans_if_necessary, enlist):
20067         * lib/readtokens.c (readtokens):
20068         * tests/uninorm/test-u32-normalize-big.c:
20069         (read_normalization_test_file):
20070         Prefer xreallocarray to the equivalent xnrealloc.
20071         The newer name follows the glibc lead of ‘reallocarray’.
20073 2021-05-30  Bruno Haible  <bruno@clisp.org>
20075         Write 'LGPLv3+ or GPLv2+' instead of 'LGPLv3+ or GPLv2'.
20076         * modules/* (License): Change.
20077         * gnulib-tool (func_import, func_create_testdir): Likewise.
20079 2021-05-29  Paul Eggert  <eggert@cs.ucla.edu>
20081         sigsegv: Port to Solaris 11
20082         Problem reported by Kiyoshi KANAZAWA in:
20083         https://lists.gnu.org/r/bug-m4/2021-05/msg00020.html
20084         * lib/stackvma.c (_FILE_OFFSET_BITS): #undef on Solaris and Android.
20086 2021-05-24  Bruno Haible  <bruno@clisp.org>
20088         c-stack: Document another restriction.
20089         Triggered by a discussion with Paul Eggert.
20090         * lib/c-stack.h: Mention that ACTION should not use nested functions.
20092 2021-05-22  Bruno Haible  <bruno@clisp.org>
20094         stdio: Fix compilation error on DragonFly BSD.
20095         * lib/stdio.in.h (fcloseall): Treat DragonFly BSD like FreeBSD.
20097 2021-05-22  Larkin Nickle  <me@larbob.org>  (tiny change)
20099         getprogname: port to Tru64
20100         * lib/getprogname.c: Treat __osf__ like __sgi, except
20101         with /proc/123 instead of /proc/pinfo/123.
20103 2021-05-21  Paul Eggert  <eggert@cs.ucla.edu>
20105         sigsegv: don’t assume SIGSTKSZ is a constant
20106         * m4/sigaltstack.m4 (SV_SIGALTSTACK): Don’t attempt to override
20107         SIGSTKSZ.  Instead, use an array that is plenty large, while
20108         checking that it’s large enough.  Also, be consistent about
20109         putting that array in static storage rather than on the stack.
20110         * tests/altstack-util.h (SIGSTKSZ): Don’t define.
20111         (MYSTACK_SIZE): New macro, used instead of SIGSTKSZ.
20112         (mystack_storage, mystack): Now static.
20113         (prepare_alternate_stack) [SIGSTKSZ]:
20114         Check that MYSTACK_SIZE is large enough.
20116 2021-05-20  Paul Eggert  <eggert@cs.ucla.edu>
20118         fstatat: doc improvement
20119         * doc/posix-functions/fstatat.texi (fstatat):
20120         Mention AT_EMPTY_PATH when talking about empty strings.
20122 2021-05-18  Bruno Haible  <bruno@clisp.org>
20124         c-stack: Support catching stack overflow on most platforms without libsigsegv.
20125         * lib/c-stack.c: Remove all Solaris-specific code. Include <sigsegv.h>
20126         always.
20127         * m4/c-stack.m4: Remove all Solaris-specific code.
20128         (gl_C_STACK): Test $with_libsigsegv from module 'sigsegv'.
20129         * modules/c-stack (Files): Remove m4/libsigsegv.m4.
20130         (Depends-on): Add sigsegv. Remove havelib, intprops, inttypes, mempcpy,
20131         sigaction, stdbool.
20133 2021-05-16  Bruno Haible  <bruno@clisp.org>
20135         sigsegv, c-stack: Avoid compilation error with glibc >= 2.34.
20136         * lib/sigsegv.in.h (SIGSTKSZ): On glibc systems, redefine to a suitable
20137         constant.
20138         * m4/sigaltstack.m4 (SV_SIGALTSTACK): Likewise.
20139         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Likewise.
20141 2021-05-16  Bruno Haible  <bruno@clisp.org>
20143         sigsegv: Add tests.
20144         * tests/test-sigsegv-catch-segv1.c: New file, from GNU libsigsegv with
20145         modifications.
20146         * tests/test-sigsegv-catch-segv2.c: Likewise.
20147         * tests/test-sigsegv-catch-stackoverflow1.c: Likewise.
20148         * tests/test-sigsegv-catch-stackoverflow2.c: Likewise.
20149         * tests/altstack-util.h: Likewise.
20150         * tests/mmap-anon-util.h: Likewise.
20151         * modules/sigsegv-tests: New file.
20153         sigsegv: New module.
20154         * lib/sigsegv.in.h: New file, from GNU libsigsegv with modifications.
20155         * lib/sigsegv.c: Likewise.
20156         * lib/stackvma.h: Likewise.
20157         * lib/stackvma.c: Likewise.
20158         * m4/sigaltstack.m4: Likewise.
20159         * m4/stack-direction.m4: Likewise.
20160         * modules/sigsegv: New file.
20162 2021-05-15  Pádraig Brady  <P@draigBrady.com>
20164         realloc-gnu: avoid glibc MALLOC_CHECK_ issue
20165         * tests/test-realloc-gnu.c (main): if MALLOC_CHECK_ env var
20166         is set then don't check ENOMEM is returned from realloc().
20167         See https://sourceware.org/bugzilla/show_bug.cgi?id=27870
20168         Note it doesn't suffice to unsetenv() this var within the program,
20169         as the hooks have already been set up at that stage.
20171 2021-05-14  Paul Eggert  <eggert@cs.ucla.edu>
20173         c-stack: work around Solaris 11 bugs
20174         Problem reported by Bruno Haible in:
20175         https://lists.gnu.org/r/bug-gnulib/2021-05/msg00062.html
20176         * lib/c-stack.c: Always include sigsegv.h if HAVE_LIBSIGSEGV.
20177         (USE_LIBSIGSEGV): Do not use libsigsegv if the kernel
20178         has the si_addr bug and libsigsegv is too old to work
20179         around it.
20180         (segv_handler) [!USE_LIBSIGSEGV]: Do not trust si_addr
20181         if BOGUS_SI_ADDR_UPON_STACK_OVERFLOW.
20182         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
20183         Define BOGUS_SI_ADDR_UPON_STACK_OVERFLOW on Solaris 2.11 SPARC.
20184         And do not define HAVE_XSI_STACK_OVERFLOW_HEURISTIC.
20186 2021-05-14  Bruno Haible  <bruno@clisp.org>
20188         fcntl tests: Avoid failure in MacPorts.
20189         Reported by Nicholas Gaya <nicholasgaya@gmail.com> in
20190         <https://lists.gnu.org/archive/html/bug-gnulib/2021-05/msg00014.html>.
20191         * tests/test-fcntl.c (main): Close fd 10 before assuming that it is
20192         closed.
20193         * tests/test-execute-main.c: Update comment.
20195 2021-05-14  Bruno Haible  <bruno@clisp.org>
20197         linked-list-unportable-test: New module.
20198         * modules/linked-list-unportable-tests: New file, based on
20199         modules/linked-list-tests.
20200         * modules/linked-list-tests: Remove the unportable tests from here.
20201         Depend on linked-list-unportable-tests.
20203 2021-05-14  Simon Josefsson  <simon@josefsson.org>
20205         valgrind-tests: Doc fix and introduce AM_VALGRINDFLAGS.
20206         * doc/valgrind-tests.texi (Using valgrind automatically): Clarify
20207         when the parallel vs serial test harness is used, suggested by
20208         Bruno Haible <bruno@clisp.org>.
20209         * m4/valgrind-tests.m4: Add VALGRIND_PROGRAM and AM_VALGRINDFLAGS.
20211 2021-05-14  Bruno Haible  <bruno@clisp.org>
20213         malloc-gnu, realloc-gnu, calloc-gnu: Ensure errno gets set to ENOMEM.
20214         * m4/malloc.m4 (gl_CHECK_MALLOC_POSIX): Set gl_cv_func_malloc_posix to
20215         'no' also on Solaris.
20217 2021-05-14  Bruno Haible  <bruno@clisp.org>
20219         DEPENDENCIES: Mention the requirement for 'join'.
20220         Reported by Simon Josefsson <simon@josefsson.org> in
20221         <https://lists.gnu.org/archive/html/bug-gnulib/2021-05/msg00047.html>.
20222         * DEPENDENCIES: Mention 'join' among the core POSIX utilities.
20224 2021-05-14  Bruno Haible  <bruno@clisp.org>
20226         *alloc-gnu tests: Use ASSERT macro.
20227         * tests/test-malloc-gnu.c: Include "macros.h".
20228         (main): Use ASSERT.
20229         * tests/test-calloc-gnu.c: Include "macros.h".
20230         (main): Use ASSERT.
20231         * tests/test-realloc-gnu.c: Include "macros.h".
20232         (main): Use ASSERT.
20233         * tests/test-reallocarray.c: Include "macros.h".
20234         (main): Use ASSERT.
20235         * modules/malloc-gnu-tests (Files): Add tests/macros.h.
20236         * modules/calloc-gnu-tests (Files): Likewise.
20237         * modules/realloc-gnu-tests (Files): Likewise.
20238         * modules/reallocarray-tests (Files): Likewise.
20240 2021-05-14  Simon Josefsson  <simon@josefsson.org>
20242         valgrind-tests: Fix 'sh: yes: unknown operand' error.
20243         * m4/valgrind-tests.m4: Protect variable usage.
20245 2021-05-14  Simon Josefsson  <simon@josefsson.org>
20247         valgrind-tests: Fix LOG_VALGRIND when valgrind is missing.
20248         * m4/valgrind-tests.m4: Clear all variables when missing.
20250 2021-05-14  Simon Josefsson  <simon@josefsson.org>
20252         valgrind-tests: Better option handling.
20253         * m4/valgrind-tests.m4: Support new variables VALGRINDFLAGS and
20254         DEFAULT_VALGRINDFLAGS.
20255         * doc/valgrind-tests.texi (Running self-tests under valgrind):
20256         Improve.
20258 2021-05-14  Markus Mützel  <markus.muetzel@gmx.de>  (tiny change)
20260         windows-spawn: Don't assume that UNICODE is not defined.
20261         * lib/windows-spawn.h (compose_handles_block): Use type STARTUPINFOA.
20263 2021-05-13  Bruno Haible  <bruno@clisp.org>
20265         getrandom: Produce a better error code.
20266         Reported by Paul Eggert in
20267         <https://lists.gnu.org/archive/html/bug-gnulib/2021-05/msg00025.html>.
20268         * lib/getrandom.c (getrandom): When open() fails with an error that does
20269         not indicate the absence of the file, fail with that error code, not
20270         with ENOSYS.
20272 2021-05-13  Bruno Haible  <bruno@clisp.org>
20274         fstatat: Document a glibc 2.7 bug.
20275         * doc/posix-functions/fstatat.texi: Document an old glibc 2.7 bug.
20277 2021-05-13  Bruno Haible  <bruno@clisp.org>
20279         posix_spawn, posix_spawnp: Fix build error on Minix 3.3.
20280         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): If posix_spawn does not exist
20281         but is declared, set REPLACE_POSIX_SPAWN.
20282         * doc/posix-functions/posix_spawn.texi: Update platforms list.
20283         * doc/posix-functions/posix_spawnp.texi: Likewise.
20285 2021-05-13  Bruno Haible  <bruno@clisp.org>
20287         reallocarray tests: Avoid test failure on NetBSD.
20288         * tests/test-reallocarray.c (main): Accept EOVERFLOW error code.
20290 2021-05-12  Bruno Haible  <bruno@clisp.org>
20292         gnulib-tool: Fail properly if the 'join' program is not found.
20293         Reported by Simon Josefsson <simon@josefsson.org> in
20294         <https://lists.gnu.org/archive/html/bug-gnulib/2021-05/msg00029.html>.
20295         * gnulib-tool: Bail out early of the 'join' program is not found.
20297 2021-05-09  Bruno Haible  <bruno@clisp.org>
20299         {realloc,calloc}-gnu: Fix autoconf macro (regression 2021-04-18).
20300         * m4/realloc.m4 (gl_FUNC_REALLOC_POSIX): Don't reset REPLACE_REALLOC
20301         to 0 if it is already 1 after gl_FUNC_REALLOC_GNU was executed.
20302         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): Don't reset REPLACE_CALLOC
20303         to 0 if it is already 1 after gl_FUNC_CALLOC_GNU was executed.
20305         {malloc,realloc,calloc}-gnu: Fix autoconf macro (regression 2021-04-18).
20306         * m4/malloc.m4 (gl_FUNC_MALLOC_GNU): Don't assume that
20307         _AC_FUNC_MALLOC_IF expands to a single shell statement.
20308         * m4/realloc.m4 (gl_FUNC_REALLOC_GNU): Don't assume that
20309         _AC_FUNC_REALLOC_IF expands to a single shell statement.
20310         * m4/calloc.m4 (gl_FUNC_CALLOC_GNU): Don't assume that
20311         _AC_FUNC_CALLOC_IF expands to a single shell statement.
20313 2021-05-09  Bruno Haible  <bruno@clisp.org>
20315         malloc-gnu, realloc-gnu, calloc-gnu: Ensure errno gets set on IRIX.
20316         * m4/malloc.m4 (gl_CHECK_MALLOC_POSIX): Require AC_CANONICAL_HOST. Set
20317         gl_cv_func_malloc_posix to 'no' also on IRIX.
20319         malloc-gnu, realloc-gnu, calloc-gnu tests: Verify errno is set.
20320         * tests/test-malloc-gnu.c: Include <errno.h>.
20321         (main): Verify that, when an allocation larger than PTRDIFF_MAX failed,
20322         errno is ENOMEM.
20323         * tests/test-realloc-gnu.c: Likewise.
20324         * tests/test-calloc-gnu.c: Likewise.
20326 2021-05-09  Bruno Haible  <bruno@clisp.org>
20328         getrandom: Fail with ENOSYS when the system has no randomness source.
20329         * lib/getrandom.c (getrandom): When open() fails, set errno to ENOSYS.
20331 2021-05-09  Bruno Haible  <bruno@clisp.org>
20333         free tests: Avoid test failure on glibc < 2.15.
20334         * tests/test-free.c (main): Skip the hairy test on glibc < 2.15.
20336 2021-05-08  Bruno Haible  <bruno@clisp.org>
20338         Fix build error when libintl is installed.
20339         * modules/posix_spawn_file_actions_addchdir-tests (Makefile.am): Link
20340         test-posix_spawn-chdir with libintl.
20341         * modules/posix_spawn_file_actions_addfchdir-tests (Makefile.am): Link
20342         test-posix_spawn-fchdir with libintl.
20344 2021-05-07  Bruno Haible  <bruno@clisp.org>
20346         Fix build when an older libunistring is installed (regr. 2020-02-23).
20347         * modules/unitypes (configure.ac): Arrange to generate the .h file if
20348         the installed one is from a version < 0.9.11.
20349         * modules/unicase/base (configure.ac): Likewise.
20350         * modules/uniconv/base (configure.ac): Likewise.
20351         * modules/unilbrk/base (configure.ac): Likewise.
20352         * modules/uninorm/base (configure.ac): Likewise.
20353         * modules/unistdio/base (configure.ac): Likewise.
20354         * modules/unistr/base (configure.ac): Likewise.
20355         * modules/uniwbrk/base (configure.ac): Likewise.
20356         * modules/uniwidth/base (configure.ac): Likewise.
20357         * modules/unictype/base (configure.ac): Arrange to generate the .h file
20358         if the installed one is from a version < 0.9.8.
20359         * modules/unigbrk/base (configure.ac): Likewise.
20361 2021-04-30  Bruno Haible  <bruno@clisp.org>
20363         immutable: Fix crash when immmalloc() fails.
20364         Found by GCC 11 '-fanalyzer'.
20365         * lib/immutable.c (immstrdup): Don't crash when immmalloc() fails.
20367 2021-04-30  Bruno Haible  <bruno@clisp.org>
20369         supersede: Fix crash when malloc() fails.
20370         Found by GCC 11 '-fanalyzer'.
20371         * lib/supersede.c (create_temp_file): Don't crash when malloc() fails.
20373 2021-04-27  Paul Eggert  <eggert@cs.ucla.edu>
20375         libc-config: fix include problem on older Debian
20376         https://lists.gnu.org/r/bug-gnulib/2021-04/msg00198.html
20377         * lib/cdefs.h: Use __GNULIB_CDEFS, not __GLIBC__,
20378         to determine whether to include the bits/* files.
20379         * lib/libc-config.h (__WORDSIZE): Remove.
20380         (__GNULIB_CDEFS): New macro.
20382 2021-04-26  Paul Eggert  <eggert@cs.ucla.edu>
20384         gnulib-tool: port better to current Autoconf
20385         * doc/gnulib-tool.texi (Initial import): Don’t mention
20386         AC_PROG_CC_STDC as it’s deprecated in current Autoconf.
20387         * gnulib-tool (func_done_dir): Suggest replacing
20388         AC_PROG_CC_STDC and AC_PROG_CC_C99, as per current Autoconf.
20390 2021-04-25  Paul Eggert  <eggert@cs.ucla.edu>
20392         reallocarray: a bit more tuning
20393         * lib/reallocarray.c: Include intprops.h.
20394         (reallocarray): Use INT_MULTIPLY_WRAPV instead of
20395         xalloc_oversized, as it now suffices and is likely a bit more
20396         efficient (five fewer machine insns on Ubuntu 20.10 x86-64).
20397         * modules/reallocarray (Depends-on): Depend on intprops, not
20398         xalloc-oversized.  Use conditional dependencies to avoid building
20399         realloc-gnu when not needed.
20401         reallocarray: don’t crash if item size is 0
20402         This problem affects only platforms where xalloc_oversized
20403         divides a number by the size arg.  Fix this by defining
20404         xalloc_oversized (n, s) to work even if s == 0.
20405         * lib/malloca.h, lib/xalloc-oversized.h: Document new behavior.
20406         * lib/xalloc-oversized.h (__xalloc_oversized): Do not crash if S==0.
20407         * tests/test-reallocarray.c (main): Test for the bug.
20409 2021-04-24  Paul Eggert  <eggert@cs.ucla.edu>
20411         xmalloca, etc.: avoid unlikely trap
20412         * lib/malloca.h (nmalloca):
20413         * lib/xmalloca.h (xnmalloca):
20414         Use size_t, not ptrdiff_t, to avoid implementation-defined
20415         behavior (which could include a trap) if N is 0 and S exceeds
20416         PTRDIFF_MAX.
20417         * lib/xalloc-oversized.h: Adjust comment to match.
20419         xmalloca, etc.: fix some xalloc-oversized issues
20420         * lib/malloca.h (nmalloca):
20421         * lib/xmalloca.h (xnmalloca): Convert S to ptrdiff_t to avoid
20422         arithmetic overflow if N and S are both narrower than ptrdiff_t.
20423         * lib/xalloc-oversized.h (xalloc_oversized):
20424         Don’t say that args must be ptrdiff_t or size_t or wider.
20425         The macro returns the correct answer even when that is not
20426         the case, and it’s the caller’s responsibility to avoid
20427         howlers like (xalloc_oversized (n, s) ? NULL : malloc (n * s))
20428         when N and S are both narrower than ptrdiff_t and size_t.
20429         Add a comment to that effect.
20430         * lib/xmalloca.h: Include xalloc-oversized.h, since this file uses
20431         xalloc_oversized.  Add comments about side effects and avoid
20432         unnecessary parens.
20433         * modules/xmalloca (Depends-on): Add xalloc-oversized.
20435         reallocarray: check for ptrdiff_t overflow
20436         * doc/glibc-functions/reallocarray.texi (reallocarray):
20437         Mention ptrdiff_t overflow.
20438         * lib/reallocarray.c (reallocarray): Reindent as per usual GNU.
20439         * lib/stdlib.in.h (reallocarray): Allow reallocarray to be replaced.
20440         * m4/reallocarray.m4 (gl_FUNC_REALLOCARRAY):
20441         Check for ptrdiff_t overflow.
20442         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Set up REPLACE_REALLOCARRAY.
20443         * modules/reallocarray (Files): Add malloc.m4.
20444         (configure.ac): Also test REPLACE_REALLOCARRAY.
20445         * modules/reallocarray-tests (Depends-on): Add stdint.
20446         * modules/stdlib (stdlib.h): Substitute REPLACE_REALLOCARRAY.
20447         * tests/test-reallocarray.c: Include stdint.h.
20448         (main): Check for ptrdiff_t overflow.
20450         calloc-gnu-tests: add overflow tests
20451         * tests/test-calloc-gnu.c (identity): New function, replacing ‘eight’.
20452         (main): Do 2 * log2(SIZE_MAX) tests instead of just two tests.
20453         Don’t bother to free on failure.
20455 2021-04-22  Paul Eggert  <eggert@cs.ucla.edu>
20457         libc-config: port better to Fedora Rawhide
20458         Problem reported by Eric Blake in:
20459         https://lists.gnu.org/r/bug-gnulib/2021-04/msg00181.html
20460         * lib/cdefs.h: Make this closer to glibc, so that we can
20461         merge Gnulib into glibc here.
20462         (__attribute_maybe_unused__): Make identical to glibc’s
20463         definition, though with an additional comment.
20464         (__attribute_nonnull__): Add clarifying comment.
20465         Make inclusion of bits/wordsize.h, bits/long-double.h
20466         dependent on __GLIBC__, not on !__WORDSIZE.
20467         * lib/libc-config.h: Use __attribute_nonnull__,
20468         not __attribute_maybe_unused__, to detect whether
20469         to include sys/cdefs.h.
20471 2021-04-21  Paul Eggert  <eggert@cs.ucla.edu>
20473         realloc: port to AIX 7.1
20474         * lib/realloc.c (_GL_USE_STDLIB_ALLOC): Do not define.  This
20475         module relies on GNU malloc.  This fixes a test failure on AIX 7.1.
20477         malloc: simplify
20478         * lib/malloc.c: Omit unnecessary "#undef malloc".
20479         I recently introduced it by mistake.  This module defines
20480         _GL_USE_STDLIB_ALLOC and so malloc isn’t redefined to rpl_malloc.
20482         malloca: avoid ptrdiff_t overflow
20483         * lib/malloca.c: Include idx.h, intprops.h.
20484         (mmalloca): Check for ptrdiff_t overflow.  Since this module uses
20485         _GL_USE_STDLIB_ALLOC, it cannot assume GNU malloc semantics.
20486         * modules/malloca (Depends-on): Add idx, intprops.
20488         careadlinkat: avoid ptrdiff_t overflow
20489         * lib/careadlinkat.c: Include idx.h, minmax.h.
20490         (readlink_stk): Avoid ptrdiff_t overflow in object allocation.
20491         Since this module uses arbitrary allocators (including
20492         stdlib_allocator), it cannot assume GNU malloc semantics.
20493         * modules/careadlinkat (Depends-on): Add idx, minmax.
20495         execute-tests: pacify compiler
20496         * tests/test-execute-main.c (main): Use 0x7DEADBEE rather than
20497         0xDEADBEEF for nonces, to avoid provoking AIX XLC compiler warning
20498         that the latter is out of int range.
20500 2021-04-20  Paul Eggert  <eggert@cs.ucla.edu>
20502         malloc-gnu-tests, etc.: use volatile for clang
20503         In some more test locations, store the result of malloc etc. into
20504         a volatile pointer so that clang doesn’t optimize away the malloc
20505         and thus bypass the test.  This fixes a malloc-gnu test failure on
20506         macOS 11.2.3 with clang 12.0.0 on ARM.
20507         * tests/test-alloca-opt.c (do_allocation):
20508         * tests/test-malloc-gnu.c (main):
20509         * tests/test-malloca.c (do_allocation):
20510         * tests/test-realloc-gnu.c (main):
20511         * tests/test-reallocarray.c (main):
20512         * tests/test-aligned-malloc.c (main):
20513         * tests/test-aligned_alloc.c (main):
20514         Store malloc etc. results into a volatile pointer.
20516 2021-04-18  Paul Eggert  <eggert@cs.ucla.edu>
20518         malloc-gnu-tests: pacify -Walloc-size-larger-than
20519         * tests/test-malloc-gnu.c (main):
20520         * tests/test-realloc-gnu.c (main): Hide true intentions from GCC,
20521         to prevent diagnostics like “warning: argument 1 value
20522         ‘9223372036854775808’ exceeds maximum object size
20523         9223372036854775807 [-Walloc-size-larger-than=]”.
20525         safe-alloc: fix pointer implementation
20526         The old implementation assumed that all pointers use the same
20527         internal representation, but the C standard doesn’t guarantee
20528         this.  Use void * (pointer) not void ** (pointer-to-pointer) for
20529         the internal functions’ API.  The internal functions now return
20530         NULL if and only if they failed, and the macros translate that
20531         into -1 or 0 to satisfy the existing API.
20532         * doc/safe-alloc.texi (Safe Allocation Macros): Mention overflow.
20533         * lib/safe-alloc.c: Major rewrite.  Now this simply
20534         defines SAFE_ALLOC_INLINE and includes safe-alloc.h.
20535         * lib/safe-alloc.h: Include stddef.h, not stdlib.h.
20536         (SAFE_ALLOC_INLINE): New macro; use Gnulib inline function style.
20537         (safe_alloc_realloc_n): New API, which passes and returns
20538         the pointer, and which returns NULL if and only if failure occurs.
20539         (safe_alloc_check): New function.
20540         (ALLOC, ALLOC_N, ALLOC_N_UNINITIALIZED, REALLOC_N):
20541         Redo using the new API for internal functions, and using calloc
20542         which is good enough since it’s GNU-compatible now.
20543         (FREE): Expand to an expression rather than merely to something
20544         that needs a following ‘;’ to become a statement.
20545         * modules/safe-alloc (Depends-on): Add calloc-gnu.
20547         calloc-gnu: now LGPLv2+
20548         * modules/calloc-gnu (License): Change from GPL to LGPLv2+.
20549         The old value was evidently a longstanding typo, and calloc
20550         will be needed by LGPLv2+ modules that will want to rely
20551         on GNU behavior.
20553         safe-alloc: simplify via reallocarray
20554         * lib/safe-alloc.c: Do not include xalloc-oversized.h.
20555         (safe_alloc_alloc_n, safe_alloc_realloc_n):
20556         Use reallocarray to check for size or ptrdiff_t overflow.
20557         * modules/reallocarray (License): Switch from LGPL to LGPLv2+, as
20558         this is needed for safe-alloc and anyway is more appropriate for
20559         this library function common with BSD.
20560         * modules/safe-alloc (Depends-on): Depend on reallocarray
20561         rather than xalloc-oversized.
20563         xalloc-oversized: fix SIZE_MAX optimization bug
20564         * lib/xalloc-oversized.h (xalloc_count_t): Remove; no longer
20565         needed and was evidently error-prone anyway.
20566         (xalloc_oversized): Omit some over-optimization that caused
20567         SIZE_MAX to not be treated as too large (the Gnulib convention) on
20568         unusual platforms where PTRDIFF_MAX == SIZE_MAX.  This change
20569         should not affect typical platforms where PTRDIFF_MAX < SIZE_MAX.
20570         When optimizing, simply use ptrdiff_t instead of xalloc_count_t.
20572         xalloc: new function xreallocarray
20573         This is the same as xnrealloc, which perhaps should be deprecated.
20574         The name xreallocarray should be easier to remember now that
20575         reallocarray is a standard GNU function.
20576         * lib/xalloc.h [GNULIB_XALLOC]: Do not include xalloc-oversized.h.
20577         (xnmalloc, xnrealloc, x2nrealloc): Simplify by using xreallocarray.
20578         * lib/xmalloc.c (xreallocarray): New function.
20579         * modules/xalloc (Depends-on): Add reallocarray;
20580         remove xalloc-oversized.
20582         group-member: simplify via realloc-gnu
20583         * lib/group-member.c, modules/group-member:
20584         Simplify similarly to backupfile.
20586         backupfile: simplify via realloc-gnu
20587         * lib/backupfile.c: Do not include xalloc-oversized.h.
20588         (numbered_backup): Simplify now that realloc will do the right
20589         thing about ptrdiff_t overflow.
20590         * modules/backupfile (Depends-on): Add realloc-gnu;
20591         remove xalloc-oversized.
20593         safe-alloc: improve doc
20594         * doc/safe-alloc.texi: Clarify that reallocating an array appends
20595         uninitialized storage.  Say ‘sizeof *p’ rather than ‘sizeof(*p)’
20596         which would need a space before the paren to follow GNU style.
20598         malloc-gnu-tests, etc.: test ptrdiff_t overflow
20599         * modules/calloc-gnu-tests (Depends-on):
20600         * modules/malloc-gnu-tests (Depends-on):
20601         * modules/realloc-gnu-tests (Depends-on): Add stdint.
20602         * tests/test-calloc-gnu.c (main):
20603         * tests/test-malloc-gnu.c (main):,
20604         * tests/test-realloc-gnu.c (main): Test for ptrdiff_t overflow.
20606         malloc-gnu, etc.: prefer AS_CASE to woolly AS_IF
20607         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF):
20608         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF):
20609         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Use AS_CASE.
20611         malloc-gnu, etc.: sync better with Autoconf
20612         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF):
20613         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF):
20614         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF):
20615         Avoid some unnecessary differences from Autoconf’s versions.
20616         Separate our platforms into a different line so that it’s easier
20617         to diff.  Use AS_IF in case the args use AC_REQUIRE.
20618         However, don’t bother with omitting the first newline, as
20619         omitting the newline is not Gnulib style and the difference
20620         doesn’t seem to matter here.
20622 2021-04-18  Bruno Haible  <bruno@clisp.org>
20624         malloc-posix, realloc-posix, calloc-posix: Document affected platforms.
20625         * doc/posix-functions/malloc.texi: Re-add platforms list.
20626         * doc/posix-functions/realloc.texi: Likewise.
20627         * doc/posix-functions/calloc.texi: Likewise.
20629 2021-04-18  Bruno Haible  <bruno@clisp.org>
20631         More systematic file naming.
20632         * m4/ctype_h.m4: Renamed from m4/ctype.m4.
20633         * m4/threads_h.m4: Renamed from m4/threads.m4.
20634         * m4/uchar_h.m4: Renamed from m4/uchar.m4.
20636 2021-04-18  Bruno Haible  <bruno@clisp.org>
20638         Add comments after 2021-04-11 change.
20639         * m4/*_h.m4: Add comments regarding *_REQUIRE_DEFAULTS and
20640         *_MODULE_INDICATOR macros.
20642 2021-04-18  Bruno Haible  <bruno@clisp.org>
20644         doc: Update for FreeBSD 13.0/arm64.
20645         * doc/posix-headers/stdint.texi: Mention FreeBSD 13 bug.
20646         * m4/stdint.m4: Update comment.
20648 2021-04-17  Paul Eggert  <eggert@cs.ucla.edu>
20650         xalloc: adjust to malloc ptrdiff_t change
20651         * lib/xmalloc.c (HAVE_GNU_CALLOC, HAVE_GNU_MALLOC, HAVE_GNU_REALLOC):
20652         Remove.
20653         (xmalloc, xrealloc, xcalloc): Simplify by assuming GNU behavior.
20654         * modules/xalloc (Depends-on): Add calloc-gnu, malloc-gnu,
20655         realloc-gnu.
20657         malloc, etc.: check for ptrdiff_t overflow
20658         In glibc 2.30 and later, malloc, realloc and calloc reject
20659         attempts to create objects larger than PTRDIFF_MAX bytes.
20660         This patch changes malloc-gnu etc. to support this behavior
20661         on non-GNU hosts.  It also makes this change for malloc-posix etc.
20662         since it’s a safety measure that ought to be in POSIX (perhaps
20663         we can talk them into that...).
20665         In writing this patch I found a complicated set of code that had
20666         accumulated over the years, some written by yours truly.  I got
20667         rid of the code I couldn’t see the need for nowadays.  Among other
20668         things, the GNU realloc behavior is no longer incompatible with
20669         the C standard, because in C17 the latter was relaxed to allow the
20670         former.  If I went too far in cleaning up, the old stuff can be
20671         resurrected.
20673         This change is mostly for 32-bit platforms, since practical 64-bit
20674         platforms cannot create objects larger than PTRDIFF_MAX bytes anyway.
20675         * doc/posix-functions/calloc.texi:
20676         * doc/posix-functions/malloc.texi:
20677         * doc/posix-functions/realloc.texi:
20678         Mention ptrdiff_t issues, and go into more detail about what
20679         the gnu extension module does.
20680         * doc/posix-functions/realloc.texi: Fix now-obsolete commentary
20681         about C99 vs glibc, as C17 allows the glibc behavior and POSIX
20682         will follow suit when it gets around to it.
20683         * lib/calloc.c, lib/malloc.c, lib/realloc.c:
20684         Simplify by always supplying a GNU-compatible version,
20685         as that suffices for correctness and is good enough for performance.
20686         Include xalloc-oversized.h, and use xalloc_oversized to
20687         check for ptrdiff_t overflow.
20688         (NEED_CALLOC_GNU, NEED_MALLOC_GNU, NEED_REALLOC_GNU): Remove.
20689         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF):
20690         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF):
20691         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF):
20692         Don’t start with a newline.  Fix message to match behavior.
20693         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don’t test for size_t overflow,
20694         as the ptrdiff_t test is good enough.
20695         * m4/calloc.m4 (gl_FUNC_CALLOC_GNU):
20696         * m4/malloc.m4 (gl_FUNC_MALLOC_GNU):
20697         * m4/realloc.m4 (gl_FUNC_REALLOC_GNU):
20698         Do not define HAVE_CALLOC_GNU, HAVE_MALLOC_GNU, HAVE_REALLOC_GNU.
20699         It’s not worth the aggravation of maintaining these, as they
20700         are confusing (they don’t really mean GNU-compatible anyway).
20701         Don’t bother testing for GNU behavior if we have already decided
20702         to replace the function, since the replacement is always GNUish.
20703         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX):
20704         * m4/realloc.m4 (gl_FUNC_REALLOC_POSIX):
20705         Defer to gl_FUNC_MALLOC_POSIX.
20706         * m4/malloc.m4 (gl_FUNC_MALLOC_PTRDIFF, gl_CHECK_MALLOC_PTRDIFF):
20707         New macros.
20708         (gl_FUNC_MALLOC_POSIX): Use them to check for ptrdiff_t overflow.
20709         * modules/calloc-gnu, modules/malloc-gnu, modules/realloc-gnu:
20710         Remove no-longer-needed module indicators.
20711         * modules/calloc-posix, modules/malloc-posix, modules/realloc-posix:
20712         Depend on xalloc-oversized.
20713         * modules/malloc-posix: Require gl_FUNC_MALLOC_POSIX instead of
20714         calling it directly, so that other code can require it.
20715         * modules/realloc-posix: Depend on free-posix and malloc-posix.
20717 2021-04-17  Bruno Haible  <bruno@clisp.org>
20719         stdio: Fix build error in some configurations (regression 2021-04-11).
20720         * m4/stdio_h.m4 (gl_STDIO_H): Move gl_STDIO_MODULE_INDICATOR and
20721         gl_MODULE_INDICATOR invocations from here...
20722         * modules/stdio (configure.ac): ... to here.
20724 2021-04-17  Bruno Haible  <bruno@clisp.org>
20726         doc: Update for FreeBSD 11.0, 12.0, 13.0.
20727         * doc/posix-headers/*.texi: Update.
20728         * doc/glibc-headers/*.texi: Update.
20729         * doc/posix-functions/*.texi: Likewise.
20730         * doc/pastposix-functions/*.texi: Likewise.
20731         * doc/glibc-functions/*.texi: Likewise.
20732         * m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): Update cross-compilation guess.
20734 2021-04-16  Paul Eggert  <eggert@cs.ucla.edu>
20736         malloc, realloc: fix recently-introduced #undef typos
20737         * lib/malloc.c (malloc):
20738         * lib/realloc.c (malloc, realloc): #undef before using.
20740 2021-04-14  Bruno Haible  <bruno@clisp.org>
20742         hamt tests: Fix link error.
20743         * modules/hamt-tests (Makefile.am): Link test-hamt against @LIBINTL@.
20745 2021-04-14  Bruno Haible  <bruno@clisp.org>
20747         c-stack: Don't use an undefined C macro (regression from 2020-10-04).
20748         * lib/c-stack.c: Test GNU C version directly, without __GNUC_PREREQ.
20750 2021-04-12  Bruno Haible  <bruno@clisp.org>
20752         doc: Fix confusion between LIBADD and LDADD.
20753         Reported by Reuben Thomas <rrt@sc3d.org> in
20754         <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00102.html>.
20755         * doc/gnulib-tool.texi (Multiple instances): For programs, use LDADD,
20756         not LIBADD.
20758 2021-04-11  Bruno Haible  <bruno@clisp.org>
20760         malloc, realloc, calloc: Support restricted library symbols on AIX.
20761         Suggested by Paul Eggert in
20762         <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00119.html>.
20763         * lib/malloc.c: Drop the code that intends to collaborate with
20764         AC_FUNC_MALLOC.
20765         * lib/realloc.c: Drop the code that intends to collaborate with
20766         AC_FUNC_REALLOC.
20767         * lib/calloc.c: Drop the code that intends to collaborate with the
20768         nonexistent macro AC_FUNC_CALLOC.
20770 2021-04-11  Bruno Haible  <bruno@clisp.org>
20772         Support several gnulib-tool invocations under the same configure.ac.
20773         Reported by Reuben Thomas <rrt@sc3d.org> in
20774         <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00104.html>.
20775         This is done by defining the Gnulib module indicator variables per
20776         gnulib-tool invocation. So that a generated .h file is no longer
20777         influenced by the set of modules used in other gnulib-tool invocations.
20778         * gnulib-tool (func_compute_include_guard_prefix): Set
20779         module_indicator_prefix.
20780         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use it to
20781         modify $(GNULIB_*) variable references in the Automake snippets.
20782         (func_emit_initmacro_start): Push macro definitions for GL_MACRO_PREFIX
20783         and GL_MODULE_INDICATOR_PREFIX.
20784         (func_emit_initmacro_end): Pop these macro definitions.
20785         * pygnulib/GLConfig.py (GLConfig.getIncludeGuardPrefix): New method.
20786         * pygnulib/GLEmiter.py (GLEmiter.initmacro_start): Push macro
20787         definitions for GL_MACRO_PREFIX and GL_MODULE_INDICATOR_PREFIX.
20788         (GLEmiter.initmacro_end): Pop these macro definitions.
20789         (GLEmiter.lib_Makefile_am, GLEmiter.tests_Makefile_am): Use the module
20790         indicator prefix to modify $(GNULIB_*) variable references in the
20791         Automake snippets.
20792         * m4/gnulib-common.m4 (gl_MODULE_INDICATOR_INIT_VARIABLE,
20793         gl_MODULE_INDICATOR_SET_VARIABLE): Use the value of
20794         GL_MODULE_INDICATOR_PREFIX.
20795         * m4/arpa_inet_h.m4: Use new idiom for header files that contain
20796         references to Gnulib module indicator variables:
20797         - Define the main macro through AC_DEFUN_ONCE.
20798         - Define a macro gl_*_H_REQUIRE_DEFAULTS that initializes the Gnulib
20799           module indicator variables (each prefixed with
20800           GL_MODULE_INDICATOR_PREFIX).
20801         - Invoke this macro in the gl_*_MODULE_INDICATOR macro.
20802         * m4/ctype.m4: Likewise.
20803         * m4/dirent_h.m4: Likewise.
20804         * m4/fcntl_h.m4: Likewise.
20805         * m4/fnmatch_h.m4: Likewise.
20806         * m4/glob_h.m4: Likewise.
20807         * m4/iconv_h.m4: Likewise.
20808         * m4/inttypes.m4: Likewise.
20809         * m4/langinfo_h.m4: Likewise.
20810         * m4/locale_h.m4: Likewise.
20811         * m4/malloc_h.m4: Likewise.
20812         * m4/math_h.m4: Likewise.
20813         * m4/monetary_h.m4: Likewise.
20814         * m4/netdb_h.m4: Likewise.
20815         * m4/poll_h.m4: Likewise.
20816         * m4/pthread_h.m4: Likewise.
20817         * m4/pty_h.m4: Likewise.
20818         * m4/sched_h.m4: Likewise.
20819         * m4/search_h.m4: Likewise.
20820         * m4/signal_h.m4: Likewise.
20821         * m4/spawn_h.m4: Likewise.
20822         * m4/stddef_h.m4: Likewise.
20823         * m4/stdio_h.m4: Likewise.
20824         * m4/stdlib_h.m4: Likewise.
20825         * m4/string_h.m4: Likewise.
20826         * m4/strings_h.m4: Likewise.
20827         * m4/sys_file_h.m4: Likewise.
20828         * m4/sys_ioctl_h.m4: Likewise.
20829         * m4/sys_random_h.m4: Likewise.
20830         * m4/sys_resource_h.m4: Likewise.
20831         * m4/sys_select_h.m4: Likewise.
20832         * m4/sys_socket_h.m4: Likewise.
20833         * m4/sys_stat_h.m4: Likewise.
20834         * m4/sys_time_h.m4: Likewise.
20835         * m4/sys_times_h.m4: Likewise.
20836         * m4/sys_types_h.m4: Likewise.
20837         * m4/sys_uio_h.m4: Likewise.
20838         * m4/sys_utsname_h.m4: Likewise.
20839         * m4/sys_wait_h.m4: Likewise.
20840         * m4/termios_h.m4: Likewise.
20841         * m4/threads.m4: Likewise.
20842         * m4/time_h.m4: Likewise.
20843         * m4/uchar.m4: Likewise.
20844         * m4/unistd_h.m4: Likewise.
20845         * m4/utime_h.m4: Likewise.
20846         * m4/wchar_h.m4: Likewise.
20847         * m4/wctype_h.m4: Likewise.
20848         * modules/arpa_inet (configure.ac): Invoke the macro
20849         gl_*_H_REQUIRE_DEFAULTS explicitly.
20850         * modules/ctype (configure.ac): Likewise.
20851         * modules/dirent (configure.ac): Likewise.
20852         * modules/fcntl-h (configure.ac): Likewise.
20853         * modules/fnmatch-h (configure.ac): Likewise.
20854         * modules/glob-h (configure.ac): Likewise.
20855         * modules/iconv-h (configure.ac): Likewise.
20856         * modules/inttypes-incomplete (configure.ac): Likewise.
20857         * modules/langinfo (configure.ac): Likewise.
20858         * modules/locale (configure.ac): Likewise.
20859         * modules/malloc-h (configure.ac): Likewise.
20860         * modules/math (configure.ac): Likewise.
20861         * modules/monetary (configure.ac): Likewise.
20862         * modules/netdb (configure.ac): Likewise.
20863         * modules/poll-h (configure.ac): Likewise.
20864         * modules/pthread-h (configure.ac): Likewise.
20865         * modules/pty (configure.ac): Likewise.
20866         * modules/sched (configure.ac): Likewise.
20867         * modules/search (configure.ac): Likewise.
20868         * modules/signal-h (configure.ac): Likewise.
20869         * modules/spawn (configure.ac): Likewise.
20870         * modules/stddef (configure.ac): Likewise.
20871         * modules/stdio (configure.ac): Likewise.
20872         * modules/stdlib (configure.ac): Likewise.
20873         * modules/string (configure.ac): Likewise.
20874         * modules/strings (configure.ac): Likewise.
20875         * modules/sys_file (configure.ac): Likewise.
20876         * modules/sys_ioctl (configure.ac): Likewise.
20877         * modules/sys_random (configure.ac): Likewise.
20878         * modules/sys_resource (configure.ac): Likewise.
20879         * modules/sys_select (configure.ac): Likewise.
20880         * modules/sys_socket (configure.ac): Likewise.
20881         * modules/sys_stat (configure.ac): Likewise.
20882         * modules/sys_time (configure.ac): Likewise.
20883         * modules/sys_times (configure.ac): Likewise.
20884         * modules/sys_types (configure.ac): Likewise.
20885         * modules/sys_uio (configure.ac): Likewise.
20886         * modules/sys_utsname (configure.ac): Likewise.
20887         * modules/sys_wait (configure.ac): Likewise.
20888         * modules/termios (configure.ac): Likewise.
20889         * modules/threads-h (configure.ac): Likewise.
20890         * modules/time (configure.ac): Likewise.
20891         * modules/uchar (configure.ac): Likewise.
20892         * modules/unistd (configure.ac): Likewise.
20893         * modules/utime-h (configure.ac): Likewise.
20894         * modules/wchar (configure.ac): Likewise.
20895         * modules/wctype-h (configure.ac): Likewise.
20896         * m4/af_alg.m4: Update after a macro name changed.
20897         * m4/ctime.m4: Likewise.
20898         * m4/explicit_bzero.m4: Likewise.
20899         * m4/ffs.m4: Likewise.
20900         * m4/ffsl.m4: Likewise.
20901         * m4/ffsll.m4: Likewise.
20902         * m4/flock.m4: Likewise.
20903         * m4/fstat.m4: Likewise.
20904         * m4/getaddrinfo.m4: Likewise.
20905         * m4/getdomainname.m4: Likewise.
20906         * m4/gettimeofday.m4: Likewise.
20907         * m4/hostent.m4: Likewise.
20908         * m4/ioctl.m4: Likewise.
20909         * m4/localtime.m4: Likewise.
20910         * m4/mbslen.m4: Likewise.
20911         * m4/memchr.m4: Likewise.
20912         * m4/memmem.m4: Likewise.
20913         * m4/mempcpy.m4: Likewise.
20914         * m4/memrchr.m4: Likewise.
20915         * m4/mktime.m4: Likewise.
20916         * m4/nanosleep.m4: Likewise.
20917         * m4/passfd.m4: Likewise.
20918         * m4/pselect.m4: Likewise.
20919         * m4/rawmemchr.m4: Likewise.
20920         * m4/select.m4: Likewise.
20921         * m4/servent.m4: Likewise.
20922         * m4/sigabbrev_np.m4: Likewise.
20923         * m4/sigdescr_np.m4: Likewise.
20924         * m4/sockpfaf.m4: Likewise.
20925         * m4/stat.m4: Likewise.
20926         * m4/stpcpy.m4: Likewise.
20927         * m4/stpncpy.m4: Likewise.
20928         * m4/strcase.m4: Likewise.
20929         * m4/strcasestr.m4: Likewise.
20930         * m4/strchrnul.m4: Likewise.
20931         * m4/strdup.m4: Likewise.
20932         * m4/strerror.m4: Likewise.
20933         * m4/strerror_r.m4: Likewise.
20934         * m4/strerrorname_np.m4: Likewise.
20935         * m4/strftime-fixes.m4: Likewise.
20936         * m4/strncat.m4: Likewise.
20937         * m4/strndup.m4: Likewise.
20938         * m4/strnlen.m4: Likewise.
20939         * m4/strpbrk.m4: Likewise.
20940         * m4/strptime.m4: Likewise.
20941         * m4/strsep.m4: Likewise.
20942         * m4/strsignal.m4: Likewise.
20943         * m4/strstr.m4: Likewise.
20944         * m4/strtok_r.m4: Likewise.
20945         * m4/strverscmp.m4: Likewise.
20946         * m4/time_r.m4: Likewise.
20947         * m4/time_rz.m4: Likewise.
20948         * m4/timegm.m4: Likewise.
20949         * m4/timespec_get.m4: Likewise.
20950         * m4/tzset.m4: Likewise.
20951         * modules/accept (configure.ac): Likewise.
20952         * modules/bind (configure.ac): Likewise.
20953         * modules/connect (configure.ac): Likewise.
20954         * modules/flock (configure.ac): Likewise.
20955         * modules/getpeername (configure.ac): Likewise.
20956         * modules/getsockname (configure.ac): Likewise.
20957         * modules/getsockopt (configure.ac): Likewise.
20958         * modules/listen (configure.ac): Likewise.
20959         * modules/recv (configure.ac): Likewise.
20960         * modules/recvfrom (configure.ac): Likewise.
20961         * modules/send (configure.ac): Likewise.
20962         * modules/sendto (configure.ac): Likewise.
20963         * modules/setsockopt (configure.ac): Likewise.
20964         * modules/shutdown (configure.ac): Likewise.
20965         * modules/socket (configure.ac): Likewise. Use the
20966         gl_*_H_REQUIRE_DEFAULTS macros.
20967         * modules/nonblocking (configure.ac): Use the gl_*_H_REQUIRE_DEFAULTS
20968         and gl_MODULE_INDICATOR_INIT_VARIABLE macros.
20969         * modules/sigpipe (configure.ac): Likewise.
20970         * modules/windows-stat-override (configure.ac): Likewise.
20971         * m4/nonblocking.m4: Update a comment.
20972         * m4/sigpipe.m4: Likewise.
20974 2021-04-11  Bruno Haible  <bruno@clisp.org>
20976         Rename GNULIB_OVERRIDES_CHAR16_T, GNULIB_OVERRIDES_CHAR32_T.
20977         * GNULIBHEADERS_OVERRIDE_CHAR16_T: Renamed from
20978         GNULIB_OVERRIDES_CHAR16_T.
20979         * GNULIBHEADERS_OVERRIDE_CHAR32_T: Renamed from
20980         GNULIB_OVERRIDES_CHAR32_T.
20982         Rename GNULIB_OVERRIDES_WINT_T.
20983         * GNULIBHEADERS_OVERRIDE_WINT_T: Renamed from GNULIB_OVERRIDES_WINT_T.
20985 2021-04-11  Bruno Haible  <bruno@clisp.org>
20987         increment-serial: New program.
20988         * build-aux/increment-serial: New file.
20990 2021-04-11  Bruno Haible  <bruno@clisp.org>
20992         useless-if-before-free: Implement --version option according to GCS.
20993         * build-aux/useless-if-before-free (copyright_year): New variable.
20994         (GetOptions): Print also a short copyright and license notice and
20995         author statement.
20997         libtool-next-version: Implement --version option according to GCS.
20998         * build-aux/libtool-next-version (scriptversion): New variable.
20999         (func_version): Deduce the copyright year from it. Terminate sentences
21000         with '.'.
21002         gnupload: Implement --version option according to GCS.
21003         * build-aux/gnupload (copyright_year, copyright): New variables.
21004         (--version): Print also a short copyright and license notice.
21006         git-version-gen: Implement --version option according to GCS.
21007         * build-aux/git-version-gen (version): State the license. Use wording
21008         from GCS.
21010         bootstrap: Implement --version option according to GCS.
21011         * build-aux/bootstrap (copyright_year, copyright): New variables.
21012         (--version): New option processing.
21014         announce-gen: Implement --version option according to GCS.
21015         * build-aux/announce-gen (copyright_year): New variable.
21016         (GetOptions): Print also a short copyright and license notice and
21017         author statement.
21019 2021-04-10  Bruno Haible  <bruno@clisp.org>
21021         Simplify GNULIB_* variable initializations.
21022         * modules/gnulib-common.m4 (gl_MODULE_INDICATOR_INIT_VARIABLE): New
21023         macro.
21024         * m4/arpa_inet_h.m4 (gl_ARPA_INET_H_DEFAULTS): Use it.
21025         * m4/ctype.m4 (gl_CTYPE_H_DEFAULTS): Likewise.
21026         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Likewise.
21027         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Likewise.
21028         * m4/fnmatch_h.m4 (gl_FNMATCH_H_DEFAULTS): Likewise.
21029         * m4/glob_h.m4 (gl_GLOB_H_DEFAULTS): Likewise.
21030         * m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS): Likewise.
21031         * m4/inttypes.m4 (gl_INTTYPES_H_DEFAULTS): Likewise.
21032         * m4/langinfo_h.m4 (gl_LANGINFO_H_DEFAULTS): Likewise.
21033         * m4/locale_h.m4 (gl_LOCALE_H_DEFAULTS): Likewise.
21034         * m4/malloc_h.m4 (gl_MALLOC_H_DEFAULTS): Likewise.
21035         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Likewise.
21036         * m4/monetary_h.m4 (gl_MONETARY_H_DEFAULTS): Likewise.
21037         * m4/netdb_h.m4 (gl_NETDB_H_DEFAULTS): Likewise.
21038         * m4/poll_h.m4 (gl_POLL_H_DEFAULTS): Likewise.
21039         * m4/pthread_h.m4 (gl_PTHREAD_H_DEFAULTS): Likewise.
21040         * m4/pty_h.m4 (gl_PTY_H_DEFAULTS): Likewise.
21041         * m4/sched_h.m4 (gl_SCHED_H_DEFAULTS): Likewise.
21042         * m4/search_h.m4 (gl_SEARCH_H_DEFAULTS): Likewise.
21043         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Likewise.
21044         * m4/spawn_h.m4 (gl_SPAWN_H_DEFAULTS): Likewise.
21045         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
21046         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Likewise.
21047         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Likewise.
21048         * m4/strings_h.m4 (gl_HEADER_STRINGS_H_DEFAULTS): Likewise.
21049         * m4/sys_file_h.m4 (gl_HEADER_SYS_FILE_H_DEFAULTS): Likewise.
21050         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H_DEFAULTS): Likewise.
21051         * m4/sys_random_h.m4 (gl_SYS_RANDOM_H_DEFAULTS): Likewise.
21052         * m4/sys_resource_h.m4 (gl_SYS_RESOURCE_H_DEFAULTS): Likewise.
21053         * m4/sys_select_h.m4 (gl_SYS_SELECT_H_DEFAULTS): Likewise.
21054         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_H_DEFAULTS): Likewise.
21055         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Likewise.
21056         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_DEFAULTS): Likewise.
21057         * m4/sys_times_h.m4 (gl_SYS_TIMES_H_DEFAULTS): Likewise.
21058         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H_DEFAULTS): Likewise.
21059         * m4/sys_wait_h.m4 (gl_SYS_WAIT_H_DEFAULTS): Likewise.
21060         * m4/termios_h.m4 (gl_TERMIOS_H_DEFAULTS): Likewise.
21061         * m4/threads.m4 (gl_THREADS_H_DEFAULTS): Likewise.
21062         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Likewise.
21063         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Likewise.
21064         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Likewise.
21065         * m4/utime_h.m4 (gl_UTIME_H_DEFAULTS): Likewise.
21066         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Likewise.
21067         * m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Likewise.
21069 2021-04-10  Paul Eggert  <eggert@cs.ucla.edu>
21071         realloc: fix undef typo
21072         * lib/realloc.c: #undef realloc if config.h defines it.
21073         This fixes a typo that I introduced in
21074         2011-04-08T18:39:01Z!eggert@cs.ucla.edu.
21075         Apparently nobody uses Gnulib realloc in that way?
21077 2021-04-07  Bruno Haible  <bruno@clisp.org>
21079         execute tests: Avoid test failure in certain environments.
21080         Reported by Dmitry V. Levin <ldv@altlinux.org> in
21081         <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00082.html>.
21082         * tests/test-execute-main.c (main): Close file descriptors 3..19.
21083         * tests/test-execute-child.c (main): Remove NetBSD workaround.
21084         * modules/execute-tests (configure.ac): Test for close_range function.
21086 2021-04-07  Paul Eggert  <eggert@cs.ucla.edu>
21088         utimens: fix confusing arg type in internal func
21089         Although the old code was technically correct, this was accidental
21090         and it confused a GCC 11 prerelease.  Reported by Ondrej Dubaj in:
21091         https://lists.gnu.org/r/bug-tar/2021-04/msg00000.html
21092         * lib/utimens.c (update_timespec): Change arg type from ‘struct
21093         timespec *[2]’ (pointer to array of 2 pointers to timespecs) to
21094         ‘struct timespec **’ (pointer to pointer to the first timespec in
21095         an array of 2 timespecs).  Although the old code happened to be
21096         technically correct, it was misleading and confused Coverity.
21097         And though the type ‘struct timespec (**)[2]’ (pointer to pointer
21098         to array of 2 timespecs) would perhaps be more technically
21099         correct, it would be almost as confusing and would require changes
21100         elsewhere in this file; let’s quit while we’re ahead.
21102         xalloc: simplify integer overflow test
21103         * lib/xalloc.h (x2nrealloc): Simplify integer overflow detection.
21104         This is easier to maintain, and (unlike the old code) exact.
21106 2021-04-06  Paul Eggert  <eggert@cs.ucla.edu>
21108         group-member: minor tweak to omit a *
21109         * lib/group-member.c: Include intprops.h.
21110         (get_group_info): Use INT_MULTIPLY_WRAPV instead of
21111         xalloc_oversized (which does a multiplication) followed by the
21112         same multiplication.  The code was OK as-is; this is just
21113         conceptual simplification, possible now that we have xalloc_count_t.
21114         * modules/group-member: Depend on intprops.
21116         backupfile: less-aggressive buffer growth
21117         * lib/backupfile.c: Include intprops.h.
21118         (numbered_backup): Grow buffer by the usual 50%, not 100%.
21119         This is easier to do now that we have xalloc_count_t.
21120         * modules/backup-rename, modules/backupfile: Depend on intprops.
21122         xalloc-oversized: export xalloc_count_t
21123         * lib/xalloc-oversized.h (__xalloc_oversized, xalloc_oversized):
21124         * lib/xmalloca.h (nmalloca):
21125         Comment re restrictions on arg types.
21126         * lib/xalloc-oversized.h (xalloc_count_t): Rename from
21127         __xalloc_count_type; all uses changed.  This publicizes the type.
21129 2021-04-05  Paul Eggert  <eggert@cs.ucla.edu>
21131         xalloc: try to pacify gcc -Wsign-compare
21132         Problem reported by Marc Nieper-Wißkirchen in:
21133         https://lists.gnu.org/r/bug-gnulib/2021-04/msg00034.html
21134         * lib/xmalloc.c (xpalloc): For odd platforms where SIZE_MAX < IDX_MAX,
21135         use a tricky destination for INT_MULTIPLY_WRAPV instead of an
21136         explicit comparison to SIZE_MAX.  This should be more likely to
21137         pacify gcc -Wsign-compare.
21139 2021-04-05  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
21141         hamt: Fix coding errors.
21142         Reported by Bruno Haible in
21143         <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00047.html>
21144         after a Coverity run.
21145         * lib/hamt.c (bucket_do_while, hamt_iterator): Add missing
21146         derefencing operator and silence a bogus warning on uninitialized
21147         variables.
21148         * tests/test-hamt.c (test_general): Replace two errorneous
21149         assignment operators with comparison operators.
21151 2021-04-05  Fabrice Fontaine  <fontaine.fabrice@gmail.com>
21153         pthread-cond: Fix compilation error.
21154         * lib/pthread-cond.c (pthread_cond_wait): Use tv.nsec instead of
21155         tv.usec.
21157 2021-04-04  Fabrice Fontaine  <fontaine.fabrice@gmail.com>
21159         pthread-cond: Fix wrong configure results when <pthread.h> is absent.
21160         * m4/pthread-cond.m4 (gl_PTHREAD_COND): When <pthread.h> does not exist,
21161         set HAVE_PTHREAD_COND_* to 0, not to 1.
21163 2021-04-04  Bruno Haible  <bruno@clisp.org>
21165         backupfile, backup-rename: Trim dependencies.
21166         * lib/backupfile.h: Add comment.
21167         * lib/backupfile.c: Include <dirent.h>, for readdir() declaration.
21168         * modules/backup-rename (Depends-on): Remove dirent-safer, fcntl. Add
21169         fcntl-h.
21170         * modules/backupfile (Depends-on): Likewise. Remove xalloc. Add
21171         xalloc-die.
21173 2021-04-04  Bruno Haible  <bruno@clisp.org>
21175         doc: Fix syntax error (regression from 2021-04-02).
21176         * doc/posix-functions/strtol.texi: Put @item inside @itemize block.
21178 2021-04-04  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
21180         hamt: Document the module in the Gnulib manual.
21181         Suggested by Bruno Haible in
21182         <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00026.html>.
21183         * doc/containers.texi: Add a subsection to section 15.11 Container
21184         data types.
21185         * lib/hamt.h: Improve documentation on how Hamt_entry is supposed
21186         to be used.
21188 2021-04-03  Paul Eggert  <eggert@cs.ucla.edu>
21190         savedir: avoid unlikely undefined behavior
21191         * lib/savedir.c (streamsavedir): Prefer idx_to size_t where
21192         either will do.  Simplify reallocation of entries.
21193         Use xpalloc to reallocate name_space, to avoid some unlikely
21194         integer overflows.
21196         quotearg: avoid undefined and/or O(N**2)
21197         Avoid undefined and O(N**2) behavior in some very unlikely cases.
21198         * lib/quotearg.c (quotearg_n_options): Document that N must
21199         be less than MIN (INT_MAX, IDX_MAX), and add this to the
21200         abort test; this also avoids a conditional branch.
21201         Use xpalloc instead of xrealloc, to avoid O(N**2) behavior in
21202         very-unlikely cases.
21204         xgethostname: reorganize / simplify
21205         xgethostname and xgetdomainname were essentially copies long
21206         ago, but they’ve diverged.  Bring them back together again
21207         by implementing the (rarely used) latter in terms of the former.
21208         And avoid some unnecessary realloc calls while we’re at it.
21209         * lib/xgetdomainname.c: Rewrite from scratch so that it merely
21210         includes xgethostname.c with a few preliminaries.
21211         * lib/xgethostname.c: Generalize so that it can be included
21212         from xgetdomainname.c.
21213         (GETANAME, XGETANAME): New macros.
21214         (INITIAL_HOSTNAME_LENGTH): Remove.  No need for this parameter.
21215         Use 100 instead, as few hostnames are longer than that.
21216         (XGETANAME): Try getting the hostname into the stack first,
21217         as that avoids a malloc call in the usual case.
21218         Check for both POSIX-style truncation and SunOS 5.5 bug
21219         in a cleaner way, by simply checking string length.
21220         Don’t use x2realloc, which wastes time preserving buffer garbage;
21221         use xpalloc with NULL instead.  Don’t bother shrinking buffer
21222         in the very rare case where the hostname is longer than sizeof
21223         buf; it’s not worth the aggravation.
21224         * modules/xgetdomainname (Depends-on): Remove free-posix, xalloc.
21225         Add xgethostname.
21227 2021-04-03  Bruno Haible  <bruno@clisp.org>
21229         *-list tests: Add more tests.
21230         * tests/test-array_list.c (check_equals_by_forward_iteration,
21231         check_equals_by_backward_iteration): New functions.
21232         (main): Invoke them.
21233         * tests/test-carray_list.c: Likewise.
21234         * tests/test-linked_list.c: Likewise.
21235         * tests/test-linkedhash_list.c: Likewise.
21236         * tests/test-avltree_list.c: Likewise.
21237         * tests/test-avltreehash_list.c: Likewise.
21238         * tests/test-rbtree_list.c: Likewise.
21239         * tests/test-rbtreehash_list.c: Likewise.
21241         list: Add operations first_node, last_node.
21242         Reported by Marc Nieper-Wißkirchen in
21243         <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00005.html>.
21244         * lib/gl_list.h (gl_list_first_node, gl_list_last_node): New functions.
21245         (struct gl_list_implementation): Add members first_node, last_node.
21246         * lib/gl_array_list.c (gl_array_first_node, gl_array_last_node): New
21247         functions.
21248         (gl_array_list_implementation): Add the new operations.
21249         * lib/gl_carray_list.c (gl_carray_first_node, gl_carray_last_node): New
21250         functions.
21251         (gl_carray_list_implementation): Add the new operations.
21252         * lib/gl_anylinked_list2.h (gl_linked_first_node, gl_linked_last_node):
21253         New functions.
21254         * lib/gl_linked_list.c (gl_linked_list_implementation): Add the new
21255         operations.
21256         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation):
21257         Likewise.
21258         * lib/gl_anytree_list2.h (gl_tree_first_node, gl_tree_last_node): New
21259         functions.
21260         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Add the new
21261         operations.
21262         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
21263         Likewise.
21264         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Likewise.
21265         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation):
21266         Likewise.
21267         * lib/gl_sublist.c (gl_sublist_first_node, gl_sublist_last_node): New
21268         functions.
21269         (gl_sublist_list_implementation): Add the new operations.
21270         * lib/gl_list.hh (class gl_List): Add member functions first_node,
21271         last_node.
21272         * doc/containers.texi: Update table.
21274 2021-04-03  Bruno Haible  <bruno@clisp.org>
21276         xalloc-die: Fix compilation error (regression from 2021-03-28).
21277         * lib/xalloc.h: Don't include idx.h and xalloc-oversized.h if the module
21278         'xalloc' is not in use.
21279         * modules/xalloc-die (Depends-on): Remove xalloc-oversized.
21281 2020-04-03  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
21283         hamt: New module.
21284         This module provides (persistent) hash array mapped tries.
21285         * MODULES.html.sh: Add hamt.
21286         * lib/hamt.c: New file.
21287         * lib/hamt.h: New file.
21288         * modules/hamt: New file.
21289         * modules/hamt-tests: New file.
21290         * tests/test-hamt.c: New file.
21292 2021-04-02  Bruno Haible  <bruno@clisp.org>
21294         strtoul, strtoll, strtoull: Fix compilation warning.
21295         * lib/strtol.c (strtol): Undefine before defining as a macro.
21297 2021-04-02  Bruno Haible  <bruno@clisp.org>
21299         strtoll: Work around a bug on native Windows and Minix.
21300         * lib/stdlib.in.h (strtoll): Override if REPLACE_STRTOLL is 1.
21301         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_STRTOLL.
21302         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Test whether strtoll works. Set
21303         REPLACE_STRTOLL.
21304         * modules/stdlib (Makefile.am): Substitute REPLACE_STRTOLL.
21305         * modules/strtoll (configure.ac): Test REPLACE_STRTOLL.
21306         * tests/test-strtoll.c (main): Add tests of hexadecimal integer syntax.
21307         * doc/posix-functions/strtoll.texi: Mention the bug.
21309 2021-04-02  Bruno Haible  <bruno@clisp.org>
21311         strtol: Work around a bug on native Windows and Minix.
21312         * lib/stdlib.in.h (strtol): New declaration.
21313         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether strtol is declared.
21314         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_STRTOL, HAVE_STRTOL,
21315         REPLACE_STRTOL.
21316         * m4/strtol.m4 (gl_FUNC_STRTOL): Require gl_STDLIB_H_DEFAULTS. Test
21317         whether strtol works. Set REPLACE_STRTOL.
21318         * modules/stdlib (Makefile.am): Substitute GNULIB_STRTOL, HAVE_STRTOL,
21319         REPLACE_STRTOL.
21320         * modules/strtol (Status, Notice): Remove.
21321         (Depends-on): Add stdlib.
21322         (configure.ac): Test HAVE_STRTOL and REPLACE_STRTOL. Invoke
21323         gl_STDLIB_MODULE_INDICATOR.
21324         * tests/test-strtol.c (main): Add tests of hexadecimal integer syntax.
21325         * doc/posix-functions/strtol.texi: Mention the bug.
21327 2021-04-02  Bruno Haible  <bruno@clisp.org>
21329         strtoull: Work around a bug on native Windows and Minix.
21330         * lib/stdlib.in.h (strtoull): Override if REPLACE_STRTOULL is 1.
21331         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_STRTOULL.
21332         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Test whether strtoull works. Set
21333         REPLACE_STRTOULL.
21334         * modules/stdlib (Makefile.am): Substitute REPLACE_STRTOULL.
21335         * modules/strtoull (configure.ac): Test REPLACE_STRTOULL.
21336         * tests/test-strtoull.c (main): Add tests of hexadecimal integer syntax.
21337         * doc/posix-functions/strtoull.texi: Mention the bug.
21339 2021-04-02  Bruno Haible  <bruno@clisp.org>
21341         strtoul: Work around a bug on native Windows and Minix.
21342         Reported by Eric Blake <eblake@redhat.com> in
21343         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00082.html>.
21344         * lib/stdlib.in.h (strtoul): New declaration.
21345         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether strtoul is declared.
21346         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_STRTOUL, HAVE_STRTOUL,
21347         REPLACE_STRTOUL.
21348         * m4/strtoul.m4 (gl_FUNC_STRTOUL): Require gl_STDLIB_H_DEFAULTS. Test
21349         whether strtoul works. Set REPLACE_STRTOUL.
21350         * modules/stdlib (Makefile.am): Substitute GNULIB_STRTOUL, HAVE_STRTOUL,
21351         REPLACE_STRTOUL.
21352         * modules/strtoul (Status, Notice): Remove.
21353         (Depends-on): Add stdlib.
21354         (configure.ac): Test HAVE_STRTOUL and REPLACE_STRTOUL. Invoke
21355         gl_STDLIB_MODULE_INDICATOR.
21356         * tests/test-strtoul.c (main): Add tests of hexadecimal integer syntax.
21357         * doc/posix-functions/strtoul.texi: Mention the bug.
21359 2021-04-02  Bruno Haible  <bruno@clisp.org>
21361         strtol, strtoul, strtoll, strtoull: Optimize.
21362         * lib/strtol.c (GROUP_PARAM_PROTO): New macro.
21363         (INTERNAL): Define differently if !USE_NUMBER_GROUPING.
21364         (INTERNAL (strtol)): Define without 'int group' parameter if
21365         !USE_NUMBER_GROUPING.
21366         (strtol): Don't define if !USE_NUMBER_GROUPING.
21368 2021-04-02  Bruno Haible  <bruno@clisp.org>
21370         strto*l: Don't pass invalid arguments to isspace, isalnum, toupper.
21371         * lib/strtol.c (ISSPACE, ISALPHA, TOUPPER): Cast argument to
21372         'unsigned char' before passing it to the functions isspace(), isalpha(),
21373         toupper().
21375 2021-04-02  Bruno Haible  <bruno@clisp.org>
21377         glob: Reject ~user syntax, when flag GLOB_TILDE_CHECK is given.
21378         Reported and patch suggested by Eli Zaretskii <eliz@gnu.org> in
21379         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00136.html>.
21380         * lib/glob.c (__glob) [WINDOWS32]: If flag GLOB_TILDE_CHECK is given, do
21381         error handling like when ~user is allowed by the user is unknown.
21383 2021-03-31  Paul Eggert  <eggert@cs.ucla.edu>
21385         xalloc: delay setting size until success
21386         * lib/xalloc.h (x2nrealloc): Don’t change *PN until after xrealloc
21387         succeeds, in case xalloc_die or one of its callees or longjmp
21388         targets uses *PN.  Similar code in xpalloc already does this.
21390 2021-03-28  Paul Eggert  <eggert@cs.ucla.edu>
21392         xalloc: new function xpalloc, from dfa
21393         Move xpalloc from dfa.c to xmalloc.c and change it from static to
21394         extern.  The function is useful in other contexts; I’m about to
21395         use it in coreutils.
21396         * lib/dfa.c: Include idx.h, instead of rolling our own idx_t and
21397         IDX_MAX.  Do not include intprops.h; no longer needed.
21398         (xpalloc): Move from here ...
21399         * lib/xmalloc.c (xpalloc): ... to here, and make it extern.
21400         Include intprops.h and minmax.h, needed by xpalloc.
21401         * lib/xalloc.h: Include idx.h, for idx_t.
21402         * modules/dfa (Depends-on): Add idx; remove intprops.
21403         * modules/xalloc (Depends-on): Add idx, intprops, minmax.
21405 2021-03-28  Bruno Haible  <bruno@clisp.org>
21407         linked-list tests: Add another test for SIGNAL_SAFE_LIST.
21408         * tests/test-asyncsafe-linked_list-strong.c: Renamed from
21409         tests/test-asyncsafe-linked_list.c.
21410         * tests/test-asyncsafe-linked_list-strong.sh: Renamed from
21411         tests/test-asyncsafe-linked_list.sh.
21412         * tests/test-asyncsafe-linked_list-weak.c: New file, based on
21413         tests/test-asyncsafe-linked_list.c.
21414         * tests/test-asyncsafe-linked_list-weak.sh: New file, based on
21415         tests/test-asyncsafe-linked_list.sh.
21416         * modules/linked-list-tests (Files): Add
21417         tests/test-asyncsafe-linked_list-weak.*,
21418         tests/test-asyncsafe-linked_list-strong.*.
21419         (Makefile.am): Arrange to test also
21420         tests/test-asyncsafe-linked_list-weak.sh. Mark
21421         test-asyncsafe-linked_list-weak.sh and
21422         test-asyncsafe-linked_list-strong.sh as expected failures.
21424 2021-03-27  Bruno Haible  <bruno@clisp.org>
21426         renameatu tests: Add unit test for bug found on macOS.
21427         * tests/test-renameatu.c (main): Add test for identical rename with
21428         RENAME_NOREPLACE.
21430 2021-03-26  Bruno Haible  <bruno@clisp.org>
21432         unistdio/*-vasnprintf: Fix errno value (regression from yesterday).
21433         * modules/unistdio/u8-vasnprintf (Depends-on): Add free-posix.
21434         * modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
21435         * modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
21436         * modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
21437         * modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
21438         * modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
21439         * modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
21441 2021-03-26  Bruno Haible  <bruno@clisp.org>
21443         vasnprintf: Fix memory leak (regression from yesterday).
21444         * lib/vasnprintf.c (VASNPRINTF): Restore omitted CLEANUP invocation.
21445         Some more simplifications of errno around free().
21447 2021-03-26  Akim Demaille  <akim@lrde.epita.fr>
21449         fprintf-posix: fix typo
21450         * modules/fprintf-posix (Depends-on): Fix typo.
21452 2021-03-25  Paul Eggert  <eggert@cs.ucla.edu>
21454         free-posix: use more often in other modules
21455         This lets us simplify cleanup code that calls ‘free’.
21456         * lib/amemxfrm.c (amemxfrm):
21457         * lib/areadlink-with-size.c (areadlink_with_size):
21458         * lib/areadlinkat-with-size.c (areadlinkat_with_size):
21459         * lib/astrxfrm.c (astrxfrm):
21460         * lib/dprintf.c (dprintf):
21461         * lib/execute.c (execute):
21462         * lib/execvpe.c (execvpe):
21463         * lib/fchdir.c (get_name):
21464         * lib/file-has-acl.c (file_has_acl):
21465         * lib/fprintf.c (fprintf):
21466         * lib/getcwd-lgpl.c (rpl_getcwd):
21467         * lib/getgroups.c (rpl_getgroups):
21468         * lib/link.c (link, rpl_link):
21469         * lib/linkat.c (link_immediate, link_follow, linkat_follow):
21470         * lib/localename.c (newlocale, duplocale):
21471         * lib/mgetgroups.c (mgetgroups):
21472         * lib/mountlist.c (read_file_system_list):
21473         * lib/pipe-filter-gi.c (pipe_filter_gi_close):
21474         * lib/putenv.c (_unsetenv, putenv):
21475         * lib/read-file.c (read_file):
21476         * lib/rename.c (rpl_rename):
21477         * lib/savedir.c (streamsavedir, savedir):
21478         * lib/spawni.c (do_open, __spawni):
21479         * lib/spawn-pipe.c (create_pipe):
21480         * lib/striconv.c (mem_cd_iconv, str_cd_iconv, str_iconv):
21481         * lib/striconveh.c (mem_cd_iconveh_internal, str_cd_iconveh)
21482         (mem_iconveh, str_iconveh):
21483         * lib/supersede.c (open_supersede, close_supersede):
21484         * lib/vasnprintf.c (VASNPRINTF):
21485         * lib/vdprintf.c (vdprintf):
21486         * lib/vfprintf.c (vfprintf):
21487         * lib/wcscoll-impl.h (wcscoll):
21488         * lib/wcsxfrm-impl.h (wcsxfrm):
21489         * lib/xgetdomainname.c (xgetdomainname):
21490         * lib/xgethostname.c (xgethostname):
21491         Simplify by assuming that ‘free’ preserves errno.
21492         * lib/localename.c: Do not include errno.h.
21493         * modules/amemxfrm, modules/areadlink-with-size:
21494         * modules/areadlinkat-with-size, modules/astrxfrm:
21495         * modules/c-vasnprintf, modules/dprintf, modules/execute:
21496         * modules/execvpe, modules/fchdir, modules/file-has-acl:
21497         * modules/fprintf-posix, modules/getcwd-lgpl, modules/getgroups:
21498         * modules/link, modules/linkat, modules/localename:
21499         * modules/mgetgroups, modules/mountlist, modules/pipe-filter-gi:
21500         * modules/posix_spawn-internal, modules/putenv, modules/read-file:
21501         * modules/rename, modules/savedir, modules/spawn-pipe:
21502         * modules/striconv, modules/striconveh, modules/supersede:
21503         * modules/vasnprintf, modules/vdprintf, modules/vfprintf-posix:
21504         * modules/wcscoll, modules/wcsxfrm, modules/xgetdomainname:
21505         * modules/xgethostname:
21506         Depend on free-posix.
21508 2021-03-24  Paul Eggert  <eggert@cs.ucla.edu>
21510         renameatu: work around macOS 11.2 renameatx_np bug
21511         * lib/renameatu.c (renameatu) [RENAME_EXCL]: Use lstatat test here too.
21513 2021-03-22  Bruno Haible  <bruno@clisp.org>
21515         clean-temp-simple: Fix a rare memory leak.
21516         * lib/clean-temp-simple.c (register_temporary_file): Fix cleanup code.
21518 2021-03-22  Bruno Haible  <bruno@clisp.org>
21520         clean-temp-simple: Relicense under LGPLv2+.
21521         * modules/clean-temp-simple (License): Change to LGPLv2+.
21523 2021-03-22  Bruno Haible  <bruno@clisp.org>
21525         clean-temp-simple: Remove dependency upon xalloc, xalloc-die, xlist.
21526         * lib/clean-temp-private.h (clean_temp_init): Change return type to
21527         'int'.
21528         * lib/clean-temp-simple.h (register_temporary_file): Change return type
21529         to 'int'.
21530         * lib/clean-temp-simple.c: Don't include xalloc.h, gl_xlist.h. Include
21531         gl_list.h instead.
21532         (init_failed): New variable.
21533         (do_clean_temp_init): Set it.
21534         (clean_temp_init): Return an error indicator.
21535         (register_temporary_file): Invoke gl_list_nx_create_empty instead of
21536         gl_list_create_empty. Invoke strdup instead of xstrdup. Invoke
21537         gl_list_nx_add_first instead of gl_list_add_first. Return an error
21538         indicator.
21539         * lib/clean-temp.c (create_temp_dir, gen_register_open_temp): Call
21540         xalloc_die() if clean_temp_init or register_temporary_file failed.
21541         * modules/clean-temp-simple (Depends-on): Remove xalloc, xalloc-die,
21542         xlist.
21544 2021-03-22  Bruno Haible  <bruno@clisp.org>
21546         clean-temp-simple: New module.
21547         * lib/clean-temp-simple.h: New file, based on lib/clean-temp.h.
21548         * lib/clean-temp-private.h: New file, based on lib/clean-temp.c.
21549         * lib/clean-temp-simple.c: New file, based on lib/clean-temp.c.
21550         * lib/clean-temp.h: Include clean-temp-simple.h.
21551         (register_temporary_file, unregister_temporary_file,
21552         cleanup_temporary_file): Remove declarations.
21553         * lib/clean-temp.c: Don't include <limits.h>, <stdint.h>. Include
21554         <signal.h>, <stdio.h>, clean-temp-simple.h, clean-temp-private.h.
21555         (file_cleanup_list_lock, file_cleanup_list): Moved to
21556         clean-temp-simple.c.
21557         (struct tempdir, dir_cleanup_list, struct closeable_fd, descriptors):
21558         Moved to clean-temp-private.h.
21559         (string_equals, SIZE_BITS, string_hash, fatal_signal_set,
21560         init_fatal_signal_set, asyncsafe_close): Moved to clean-temp-simple.c.
21561         (asyncsafe_fclose_variant): Use get_fatal_signal_set() here.
21562         (cleanup_action, do_init_clean_temp, clean_temp_once, init_clean_temp,
21563         register_temporary_file, unregister_temporary_file, do_unlink,
21564         cleanup_temporary_file): Moved to clean-temp-simple.c.
21565         (create_temp_dir, cleanup_temp_file, cleanup_temp_dir_contents,
21566         gen_register_open_temp, close_temp): Update for changed function names.
21567         (fclose_variant_temp): Don't call init_fatal_signal_set().
21568         * modules/clean-temp-simple: New file, based on modules/clean-temp.
21569         * modules/clean-temp (Depends-on): Add clean-temp-simple, list. Remove
21570         stdint.
21571         (configure.ac): Don't define SIGNAL_SAFE_LIST here.
21573 2021-03-22  Bruno Haible  <bruno@clisp.org>
21575         error: Relicense under LGPLv2+.
21576         Pino Toscano's approval is in
21577         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00109.html>.
21578         Paul Eggert's approval is in
21579         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00110.html>.
21580         * modules/error (License): Change to LGPLv2+.
21582 2021-03-22  Bruno Haible  <bruno@clisp.org>
21584         getprogname: Relicense under LGPLv2+.
21585         Pino Toscano's approval is in
21586         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00109.html>.
21587         Paul Eggert's approval is in
21588         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00110.html>.
21589         Jim Meyering's approval is in
21590         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00107.html>.
21591         Gisle Vanem's approval is in
21592         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00115.html>.
21593         Daniel Richard G's approval is in
21594         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00112.html>.
21595         John David Anglin's approval is in
21596         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00108.html>.
21597         Benji Wiebe's approval is in
21598         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00114.html>.
21599         * modules/getprogname (License): Change to LGPLv2+.
21601 2021-03-22  Bruno Haible  <bruno@clisp.org>
21603         fatal-signal: Relicense under LGPLv2+.
21604         Eric Blake's approval is in
21605         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00111.html>.
21606         * modules/fatal-signal (License): Change to LGPLv2+.
21608 2021-03-22  Bruno Haible  <bruno@clisp.org>
21610         doc: Mention an open glibc bug.
21611         * doc/posix-functions/mbrtowc.texi: Mention the possible out-of-range
21612         wchar_t values returned by this function on glibc.
21613         * doc/posix-functions/mbtowc.texi: Likewise.
21615 2021-03-22  Benno Schulenberg  <bensberg@telfort.nl>  (tiny change)
21617         mbrtowc: Remove a redundant condition.
21618         * lib/mbrtowc-impl-utf8.h: There is no need to check for c == 0xf4
21619         when !(c < 0xf4), as ten lines earlier c <= 0xf4 was established.
21621 2021-03-22  Bruno Haible  <bruno@clisp.org>
21623         linkedhash-list: Relicense under LGPLv2+.
21624         Paul Eggert's approval is in
21625         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00102.html>.
21626         * modules/linkedhash-list (License): Change to LGPLv2+.
21628 2021-03-21  Bruno Haible  <bruno@clisp.org>
21630         fatal-signal: Remove dependency upon xalloc.
21631         * lib/fatal-signal.h (at_fatal_signal): Change return type to 'int'.
21632         * lib/fatal-signal.c: Don't include xalloc.h.
21633         (at_fatal_signal): Return an error indicator.
21634         * modules/fatal-signal (Depends-on): Remove xalloc.
21635         * NEWS: Mention the change.
21636         * lib/term-style-control.c: Include xalloc.h.
21637         (ensure_other_signal_handlers): Test return value of at_fatal_signal.
21638         * lib/clean-temp.c (do_init_clean_temp): Likewise.
21639         * lib/wait-process.c (register_slave_subprocess): Likewise.
21640         * modules/term-style-control (Depends-on): Add xalloc-die.
21641         * modules/clean-temp (Depends-on): Likewise.
21642         * modules/wait-process (Depends-on): Likewise.
21644 2021-03-21  Paul Eggert  <eggert@cs.ucla.edu>
21646         diacrit: remove
21647         * MODULES.html.sh (func_all_modules), NEWS: Remove diacrit.
21648         * lib/diacrit.c, lib/diacrit.h, modules/diacrit: Remove.
21650         tests: fix signed overflow issues
21651         * tests/test-dynarray.c (value_at): Avoid undefined behavior
21652         in signed integer multiplication.
21653         * tests/test-scratch-buffer.c (byte_at): Likewise, for the
21654         theoretically-possible case where size_t is narrower than int.
21656 2021-03-21  Bruno Haible  <bruno@clisp.org>
21658         doc: More updates.
21659         * doc/glibc-functions/sethostname.texi: Update regarding macOS.
21660         * doc/glibc-functions/sethostname.texi: List the affected platforms.
21662         doc: Update for macOS 11.1.
21663         * doc/posix-headers/*.texi: Update.
21664         * doc/glibc-headers/*.texi: Update.
21665         * doc/posix-functions/*.texi: Likewise.
21666         * doc/pastposix-functions/*.texi: Likewise.
21667         * doc/glibc-functions/*.texi: Likewise.
21668         * m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Update cross-compilation
21669         guess.
21671 2021-03-21  Bruno Haible  <bruno@clisp.org>
21673         ftell: Document bug in macOS >= 10.15.
21674         * doc/posix-functions/ftell.texi: Mention the macOS bug.
21676 2021-03-20  Bruno Haible  <bruno@clisp.org>
21678         ftello: Work around bug in macOS >= 10.15.
21679         Reported by Martin Storsjö <martin@martin.st> in
21680         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00002.html>.
21681         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): On macOS, don't define
21682         FUNC_UNGETC_BROKEN. Instead, set gl_ftello_broken_after_ungetc to yes.
21683         * m4/ftello.m4 (gl_FUNC_FTELLO): Invoke gl_FUNC_UNGETC_WORKS, and
21684         arrange to provide the workaround if ftello is broken after ungetc.
21685         * lib/ftello.c: Include <errno.h>, intprops.h.
21686         (ftello) [FTELLO_BROKEN_AFTER_UNGETC]: Implement from scratch.
21687         * modules/ftello (Files): Add m4/ungetc.m4.
21688         (Depends-on): Add intprops.
21689         * doc/posix-functions/ftello.texi: Mention the macOS bug.
21691 2021-03-20  Bruno Haible  <bruno@clisp.org>
21693         math C++ tests: Fix compilation error on macOS 11.2.
21694         * lib/math.in.h (isnan): For clang >= 12 on macOS, declare 'rpl_isnan',
21695         not 'isnan'.
21697 2021-03-18  Bruno Haible  <bruno@clisp.org>
21699         simple-atomic tests: Fix compilation error on Solaris 10.
21700         Reported by Tom G. Christensen <tgc@jupiterrise.com> in
21701         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00085.html>.
21702         * tests/test-simple-atomic.c (yield): Define only after all #includes.
21704 2021-03-18  Bruno Haible  <bruno@clisp.org>
21706         simple-atomic: Fix compilation error on Solaris 10/x86_64 with cc.
21707         * lib/simple-atomic.c (atomic_compare_and_swap_ptr): Correct asm
21708         instruction.
21710 2021-03-18  Paul Eggert  <eggert@cs.ucla.edu>
21712         argmatch: fix testing typo
21713         Problem and fix reported by Gisle Vanem in:
21714         https://lists.gnu.org/r/bug-gnulib/2021-03/msg00083.html
21715         * lib/argmatch.c (main) [TEST]: Fix address-of typo.
21717 2021-03-14  Paul Eggert  <eggert@cs.ucla.edu>
21719         intprops: improve commentary
21720         * lib/intprops.h: Improve comments about promotion etc.
21722 2021-03-14  Bruno Haible  <bruno@clisp.org>
21724         time_rz: Put reference documentation into the .h file.
21725         * lib/time.in.h (timezone_t, tzalloc, tzfree, localtime_rz, mktime_z):
21726         Add comments, based on modules/time_rz.
21727         * modules/time_rz (Comment): Remove section.
21729 2021-03-14  Bruno Haible  <bruno@clisp.org>
21731         parse-datetime tests: Avoid a test failure on NetBSD.
21732         Reported by Thomas Klausner <tk@giga.or.at> in
21733         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00069.html>.
21734         * tests/test-parse-datetime.c (main): Skip two tests on NetBSD.
21736 2021-03-10  Paul Eggert  <eggert@cs.ucla.edu>
21738         libc-config: port to DragonFlyBSD 5.9
21739         DragonFlyBSD defines __nonnull incompatibly with glibc,
21740         so avoid the use of __nonnull in Gnulib code.
21741         Problem reported by Gavin Smith in:
21742         https://lists.gnu.org/r/bug-gnulib/2021-03/msg00066.html
21743         * lib/cdefs.h (__attribute_nonnull__): Rename from __nonnull.
21744         All uses in Gnulib changed.  There should be no need to change
21745         glibc code that is not shared with Gnulib.
21746         (__nonnull): New macro, defined in terms of __attribute_nonnull__,
21747         and which can be used in glibc code that is not shared with Gnulib.
21749 2021-03-07  Paul Eggert  <eggert@cs.ucla.edu>
21751         manywarnings: modernize documentation
21752         Problem reported by Reuben Thomas in:
21753         https://lists.gnu.org/r/bug-gnulib/2021-03/msg00046.html
21754         * doc/manywarnings.texi (manywarnings): Update in
21755         the light of recent changes to the manywarnings module.
21757 2021-03-07  Bruno Haible  <bruno@clisp.org>
21759         sysexits: Fix for Haiku.
21760         * lib/sysexits.in.h: Don't assume that <sysexits.h>, when it exists,
21761         defines anything.
21762         * doc/glibc-headers/sysexits.texi: Mention the Haiku bug.
21764 2021-03-07  Bruno Haible  <bruno@clisp.org>
21766         Rename GNULIB_WCHAR_SINGLE to GNULIB_WCHAR_SINGLE_LOCALE.
21767         * lib/lc-charset-dispatch.c: Test GNULIB_WCHAR_SINGLE_LOCALE instead of
21768         GNULIB_WCHAR_SINGLE.
21769         * lib/wcwidth.c: Likewise.
21770         * tests/test-wcwidth.c: Likewise.
21771         * doc/multithread.texi: Document GNULIB_WCHAR_SINGLE_LOCALE instead of
21772         GNULIB_WCHAR_SINGLE.
21773         * NEWS: Document the change.
21775 2021-03-06  Bruno Haible  <bruno@clisp.org>
21777         mbrtowc: Allow locking optimization independently of 'unlocked-io'.
21778         * lib/mbtowc-lock.h: Test GNULIB_MBRTOWC_SINGLE_THREAD instead of
21779         USE_UNLOCKED_IO.
21780         * doc/multithread.texi: Document GNULIB_MBRTOWC_SINGLE_THREAD.
21782 2021-03-06  Bruno Haible  <bruno@clisp.org>
21784         regex: Allow locking optimization independently of 'unlocked-io'.
21785         * lib/regex_internal.h: Test GNULIB_REGEX_SINGLE_THREAD instead of
21786         USE_UNLOCKED_IO.
21787         * doc/multithread.texi: Document GNULIB_REGEX_SINGLE_THREAD.
21789 2021-03-06  Bruno Haible  <bruno@clisp.org>
21791         exclude: Allow stdio optimization independently of 'unlocked-io'.
21792         * lib/exclude.c: Test GNULIB_EXCLUDE_SINGLE_THREAD instead of
21793         USE_UNLOCKED_IO.
21794         * modules/exclude (Depends-on): Add unlocked-io-internal.
21795         * doc/multithread.texi: Document GNULIB_EXCLUDE_SINGLE_THREAD.
21797 2021-03-06  Bruno Haible  <bruno@clisp.org>
21799         readutmp: Optimize stdio accesses.
21800         * lib/readutmp.c: Include unlocked-io.h unconditionally.
21801         * modules/readutmp (Depends-on): Add unlocked-io-internal.
21803 2021-03-06  Bruno Haible  <bruno@clisp.org>
21805         mountlist: Optimize stdio accesses.
21806         * lib/mountlist.c: Include unlocked-io.h unconditionally.
21807         * modules/mountlist (Depends-on): Add unlocked-io-internal.
21809 2021-03-06  Bruno Haible  <bruno@clisp.org>
21811         getusershell: Optimize stdio accesses when possible.
21812         * lib/getusershell.c: Test GNULIB_GETUSERSHELL_SINGLE_THREAD instead of
21813         USE_UNLOCKED_IO.
21814         * modules/getusershell (Depends-on): Add unlocked-io-internal.
21815         * doc/multithread.texi: Document GNULIB_GETUSERSHELL_SINGLE_THREAD.
21817 2021-03-06  Bruno Haible  <bruno@clisp.org>
21819         unlocked-io-internal: New module.
21820         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Don't define
21821         USE_UNLOCKED_IO here.
21822         * modules/unlocked-io-internal: New file, based on modules/unlocked-io.
21823         * modules/unlocked-io (Description): Clarify.
21824         (Files, Depends-on): Just use the unlocked-io-internal module.
21825         (configure.ac): Define GNULIB_STDIO_SINGLE_THREAD and USE_UNLOCKED_IO
21826         here.
21827         * doc/multithread.texi: Clarify when the 'unlocked-io' module can be
21828         used.
21830 2021-03-06  Bruno Haible  <bruno@clisp.org>
21832         posixtm: Remove unused includes.
21833         * lib/posixtm.c: Don't include <stdio.h>, <sys/types.h>, unlocked-io.h.
21835 2021-03-06  Bruno Haible  <bruno@clisp.org>
21837         dynarray: Add tests.
21838         * tests/test-dynarray.c: New file.
21839         * modules/dynarray-tests: New file.
21841         dynarray: Make the module usable on its own.
21842         * lib/dynarray.h: Document the exported API. Comments taken from
21843         lib/malloc/dynarray-skeleton.c and lib/malloc/dynarray.h.
21844         Distinguish an internal include from an include for instantiation.
21845         In the latter case, include <libc-config.h> and
21846         <malloc/dynarray-skeleton.c>.
21847         * modules/dynarray (Depends-on): Add intprops.
21848         (Include): Reduce to just "dynarray.h".
21850 2021-03-06  Bruno Haible  <bruno@clisp.org>
21852         scratch_buffer: Add comment.
21853         * lib/scratch_buffer.h: Add comment.
21855 2021-03-06  Paul Eggert  <eggert@cs.ucla.edu>
21857         parse-datetime2: fix licensing
21858         Problem reported by Bruno Haible in:
21859         https://lists.gnu.org/r/bug-gnulib/2021-03/msg00017.html
21860         * gnulib-tool (func_get_license): Treat parse-datetime2
21861         (actually, anything starting with "parse-datetime")
21862         like parse-datetime, as far as licenses go.
21864 2021-03-06  Bruno Haible  <bruno@clisp.org>
21866         free-posix: Update documentation.
21867         * doc/posix-functions/free.texi: Add platform details.
21869 2021-03-06  Bruno Haible  <bruno@clisp.org>
21871         doc: Update for glibc 2.33.
21872         * doc/glibc-functions/mallinfo2.texi: New file.
21873         * doc/gnulib.texi: Include it.
21874         (Glibc sys/vtimes.h): Remove section.
21875         * doc/glibc-functions/vtimes.texi: Remove file.
21876         * doc/pastposix-functions/h_errno.texi: Update.
21877         * doc/posix-functions/*.texi: Likewise.
21878         * doc/glibc-functions/*.texi: Likewise.
21880 2021-03-04  Bruno Haible  <bruno@clisp.org>
21882         stddef: Generalize tcc workaround to other compilers.
21883         Suggested by Paul Eggert in
21884         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00027.html>.
21885         * lib/stddef.in.h: Undefine the __need_* macros with all compilers.
21886         * doc/posix-headers/stddef.texi: Mention that the TinyCC bug also exists
21887         on macOS.
21889 2021-03-04  Paul Eggert  <eggert@cs.ucla.edu>
21891         stdalign: port to tcc + glibc
21892         * lib/stdalign.in.h (_Alignas): Do not define using __attribute__
21893         if __attribute__ is defined as a macro, as __attribute__ surely a
21894         no-op in that case and this is an area where __attribute__ cannot
21895         simply be ignored.
21896         * m4/stdalign.m4 (gl_STDALIGN_H): Include <stdint.h> so that
21897         it #defines __attribute__(x) to nothing on glibc-based systems
21898         when non-GNU-C-compatible compilers are used.
21899         This exposes a bug in Tiny C Compiler 0.9.27’s implementation
21900         of _Alignas on glibc platforms.
21902 2021-03-03  Bruno Haible  <bruno@clisp.org>
21904         asyncsafe-spin, simple-atomic: Add support for tcc/x86.
21905         * lib/asyncsafe-spin.c (memory_barrier): With tcc/x86, don't use the
21906         'mfence' instruction.
21907         * lib/simple-atomic.c (memory_barrier): Likewise.
21909         asyncsafe-spin, simple-atomic: Add support for tcc.
21910         * lib/asyncsafe-spin.c (memory_barrier, atomic_compare_and_swap): On
21911         i386 and x86_64, treat tcc like older GCC or clang.
21912         * lib/simple-atomic.c (memory_barrier, atomic_compare_and_swap,
21913         atomic_compare_and_swap_ptr): Likewise.
21915 2021-03-02  Bruno Haible  <bruno@clisp.org>
21917         stddef: Work around an interoperability problem of tcc with glibc.
21918         Reported by Luca Saiu <positron@gnu.org> in
21919         <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00011.html>.
21920         * lib/stddef.in.h [__TINYC__]: In case of the special invocation
21921         convention, undefine the macros that TinyCC's <stddef.h> should undefine
21922         but doesn't.
21923         * doc/posix-headers/stddef.texi: Mention the TinyCC bug.
21925 2021-03-02  Paul Eggert  <eggert@cs.ucla.edu>
21927         mbrtowc: port to AIX 7.1 with xlc 12.1
21928         Fix a problem with locks when building GNU Tar (Savannah commit
21929         55f2a0772e08b9febac3ac0de5cb048d4c60d2f5) on AIX 7.1 with IBM XL
21930         C/C++ V12.1 using ‘./configure CC=xlc’.  The link fails due to
21931         missing definitions of pthread_mutex_lock and
21932         pthread_mutex_unlock.  GNU Tar uses unlocked-io and so
21933         should not need to worry about multithreading or locks.
21934         * lib/mbtowc-lock.h (mbtowc_with_lock) [USE_UNLOCKED_IO]:
21935         Don’t bother with locks, since this app is single-threaded.
21936         There may be similar linking problems with lib/nl_langinfo.c and
21937         lib/setlocale_null.c but my GNU Tar build didn’t run into them, so
21938         I left them alone for now.
21940 2021-03-01  Paul Eggert  <eggert@cs.ucla.edu>
21942         unlocked-io: do not redefine getc_unlocked etc.
21943         I ran into this problem on AIX 7.1 with GNU Tar, which
21944         enables visibility of getc_unlocked etc. after testing
21945         whether they’re declared, causing argp-namefrob.h and
21946         unlocked-io.h to redefine the macros.
21947         * lib/argp-namefrob.h, lib/unlocked-io.h:
21948         (clearerr_unlocked, feof_unlocked ferror_unlocked)
21949         (fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked)
21950         (fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked)
21951         (putc_unlocked, putchar_unlocked): Do not define if already defined.
21953         parse-datetime2: new module
21954         This splits the old parse-datetime into two parts; the
21955         first is parse-datetime2 which supports all the new bells
21956         and whistles, the second is parse-datetime, which reverts to
21957         its original intent.  This avoids some bogus diagnostics
21958         when build GNU Tar with gcc -flto -fanalyze and
21959         with --enable-gcc-warnings.  And it slims down the
21960         executable a bit.
21961         * NEWS: Mention this.
21962         * lib/parse-datetime.y (parser_control) [!GNULIB_PARSE_DATETIME2]:
21963         Omit parse_datetime_debug member.
21964         (debugging): New function.  Use it everywhere the old code
21965         would load parse_datetime_debug.
21966         (parse_datetime_body): New static function, with the body
21967         of the old parse_datetime2.  Set pc.parse_datetime_debug
21968         only if GNULIB_PARSE_DATETIME2.
21969         (parse_datetime2, parse_datetime): Use this new function.
21970         (parse_datetime2) [!GNULIB_PARSE_DATETIME2]: Remove.
21971         * modules/parse-datetime2: New file.
21973 2021-02-27  Bruno Haible  <bruno@clisp.org>
21975         string-buffer: Fixes.
21976         * modules/string-buffer (License): Change to LGPL.
21977         * tests/test-string-buffer.c (main): Add another sb_appendf call, that
21978         is more likely to fail.
21980 2021-02-25  Bernhard Voelker  <mail@bernhard-voelker.de>
21982         gitlog-to-changelog: output SHA in "empty commit message" warning
21983         * build-aux/gitlog-to-changelog: Add $sha to above warning diagnostic.
21985 2021-02-24  Paul Eggert  <eggert@cs.ucla.edu>
21987         glob: include libc-config.h in a more-standard way
21988         Inspired by Tom Tromey’s report for RHEL 6 in:
21989         https://lists.gnu.org/r/bug-gnulib/2021-02/msg00088.html
21990         * lib/glob.c [!_LIBC]: Include libc-config.h, not just config.h
21991         * lib/glob.in.h: Include libc-config.h only if needed.
21993 2021-02-21  Bruno Haible  <bruno@clisp.org>
21995         string-buffer: Add tests.
21996         * tests/test-string-buffer.c: New file.
21997         * modules/string-buffer-tests: New file.
21999         string-buffer: New module.
22000         * lib/string-buffer.h: New file.
22001         * lib/string-buffer.c: New file.
22002         * modules/string-buffer: New file.
22003         * doc/posix-functions/open_memstream.texi: Mention the new module.
22005 2021-02-21  Bruno Haible  <bruno@clisp.org>
22007         scratch_buffer: Document the exported API.
22008         * lib/scratch_buffer.h: Add comments, taken from
22009         lib/malloc/scratch_buffer.h.
22011 2021-02-21  Bruno Haible  <bruno@clisp.org>
22013         DEPENDENCIES: Update.
22014         * DEPENDENCIES: Require GCC >= 3.1. Tell where to find working GNU m4
22015         tarballs. Mention awk. Point to pre-built packages for gettext, bison,
22016         gperf, texinfo.
22018 2021-02-20  Bruno Haible  <bruno@clisp.org>
22020         parse-datetime: Fix comment.
22021         * modules/parse-datetime (Makefile.am): Fix comment.
22023 2021-02-16  Bruno Haible  <bruno@clisp.org>
22025         passfd: Fix test failure on FreeBSD >= 12 and NetBSD in 64-bit mode.
22026         * lib/passfd.c (recvfd): Use the CMSG_SPACE macro to compute the value
22027         for msg_controllen.
22029 2021-02-16  Paul Eggert  <eggert@cs.ucla.edu>
22031         Port better to macOS Mojave
22032         Problem reported by Tom Shields in:
22033         https://lists.gnu.org/r/bug-gnulib/2021-02/msg00064.html
22034         * config/srclist.txt: Comment out dynarray_finalize.c.
22035         * lib/dynarray.h (__libc_dynarray_at_failure): Don’t include
22036         libc-config.h here, as that’s the includer’s responsibility.
22037         * lib/malloc/dynarray_at_failure.c:
22038         * lib/malloc/dynarray_emplace_enlarge.c:
22039         * lib/malloc/dynarray_finalize.c:
22040         * lib/malloc/dynarray_resize.c:
22041         * lib/malloc/dynarray_resize_clear.c:
22042         If _LIBC is not defined, include libc-config.h.
22044 2021-02-15  Bruno Haible  <bruno@clisp.org>
22046         linked-list test: Add test for SIGNAL_SAFE_LIST. (It currently fails.)
22047         * tests/test-asyncsafe-linked_list.sh: New file.
22048         * tests/test-asyncsafe-linked_list.c: New file.
22049         * modules/linked-list-tests (Files): Add them.
22050         (Depends-on): Add thread, yield, nanosleep, sigaction, sigprocmask.
22051         (Makefile.am): Arrange to compile test-asyncsafe-linked_list.c and run
22052         test-asyncsafe-linked_list.sh.
22054 2021-02-14  Bruno Haible  <bruno@clisp.org>
22056         simple-atomic: Add tests.
22057         * tests/test-simple-atomic.c: New file.
22058         * modules/simple-atomic-tests: New file.
22060         simple-atomic: New module.
22061         * lib/simple-atomic.h: New file.
22062         * lib/simple-atomic.c: New file, based on lib/asyncsafe-spin.c.
22063         * modules/simple-atomic: New file.
22065 2021-02-14  Bruno Haible  <bruno@clisp.org>
22067         Fix distinction of 32-bit/64-bit mode with xlc 13.1.3 on AIX.
22068         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI, gl_HOST_CPU_C_ABI_32BIT):
22069         Test __LP64__ instead of _ARCH_PPC64.
22070         * m4/lib-ld.m4 (AC_LIB_PROG_LD): Likewise.
22071         * lib/stddef.in.h: Likewise.
22073 2021-02-13  Ozkan Sezer  <sezeroz@gmail.com>
22075         lib-symbol-visibility: Make it work with -Wmissing-prototypes.
22076         * m4/visibility.m4 (gl_VISIBILITY): Avoid error from simultaneous use of
22077         -Wmissing-prototypes and -Werror.
22079 2021-02-08  Bruno Haible  <bruno@clisp.org>
22081         stddef: Fix test-stddef compilation error on MidnightBSD/x86.
22082         * lib/stddef.in.h (_GL_STDDEF_ALIGNAS, rpl_max_align_t, max_align_t):
22083         Don't ignore HAVE_MAX_ALIGN_T if the compiler is clang.
22085 2021-02-08  Bruno Haible  <bruno@clisp.org>
22087         Document non-standard prototypes on MidnightBSD.
22088         * doc/posix-functions/initstate.texi: Mention different prototype on
22089         MidnightBSD 2.0.
22090         * doc/posix-functions/srandom.texi: Likewise.
22091         * doc/posix-functions/getlogin_r.texi: Likewise.
22092         * doc/glibc-functions/sethostname.texi: Likewise.
22094 2021-02-08  Bruno Haible  <bruno@clisp.org>
22096         posixtm tests: Fix warnings seen on MidnightBSD/x86.
22097         * tests/test-posixtm.c (main): Convert two 'time_t' values to 'long' for
22098         printing.
22100 2021-02-07  Bruno Haible  <bruno@clisp.org>
22102         Add cross-compilation guesses for MidnightBSD.
22103         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): When cross-compiling, use the
22104         result from native compilation.
22105         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Likewise.
22106         * m4/mbrtoc32.m4 (gl_MBRTOC32_SANITYCHECK): Likewise.
22107         * m4/mprotect.m4 (gl_FUNC_MPROTECT_WORKS): Likewise.
22108         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_SECURE): Likewise.
22109         * m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_INFINITE,
22110         gl_PRINTF_INFINITE_LONG_DOUBLE, gl_PRINTF_DIRECTIVE_F,
22111         gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_RETVAL_C99,
22112         gl_SNPRINTF_DIRECTIVE_N, gl_VSNPRINTF_ZEROSIZE_C99): Likewise.
22113         * m4/strfmon_l.m4 (gl_FUNC_STRFMON_L): Likewise.
22114         * m4/setlocale_null.m4 (gl_FUNC_SETLOCALE_NULL): Use predetermined
22115         result on MidnightBSD.
22117 2021-02-07  Bruno Haible  <bruno@clisp.org>
22119         threadlib: Add support for MidnightBSD.
22120         * m4/threadlib.m4 (gl_WEAK_SYMBOLS, gl_THREADLIB_BODY): On MidnightBSD,
22121         use the same test as on FreeBSD.
22123 2021-02-07  Bruno Haible  <bruno@clisp.org>
22125         host-os: Add support for MidnightBSD.
22126         * m4/host-os.m4 (gl_HOST_OS): On MidnightBSD, set HOST_OPERATING_SYSTEM
22127         to "MidnightBSD", not "Midnightbsd".
22129 2021-02-07  Bruno Haible  <bruno@clisp.org>
22131         c-stack: Adjust for MidnightBSD.
22132         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): On MidnightBSD,
22133         set FAULT_YIELDS_SIGBUS.
22135 2021-02-07  Bruno Haible  <bruno@clisp.org>
22137         relocatable-prog: Add support for MidnightBSD.
22138         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Use the ELF $ORIGIN trick
22139         also on MidnightBSD >= 1.1.
22140         * build-aux/config.libpath: Treat MidnightBSD like FreeBSD.
22141         * build-aux/reloc-ldflags: Likewise.
22143 2021-02-07  Bruno Haible  <bruno@clisp.org>
22145         havelib: Add support for MidnightBSD.
22146         * build-aux/config.rpath: Treat MidnightBSD like FreeBSD >= 4.
22148 2021-02-07  Bruno Haible  <bruno@clisp.org>
22150         wcwidth: Document MidnightBSD bug.
22151         * doc/posix-functions/wcwidth.texi: Mention MidnightBSD as an affected
22152         platform.
22153         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Update comments.
22155 2021-02-07  Bruno Haible  <bruno@clisp.org>
22157         pthread_sigmask: Document MidnightBSD bug.
22158         * doc/posix-functions/pthread_sigmask.texi: Mention MidnightBSD as an
22159         affected platform.
22160         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Update
22161         cross-compilation guess accordingly.
22163 2021-02-07  Bruno Haible  <bruno@clisp.org>
22165         immutable: Avoid test failures on MidnightBSD.
22166         * tests/test-immutable.c (install_segv_handler): On FreeBSD, install the
22167         handler also for SIGBUS.
22169 2021-02-07  Bruno Haible  <bruno@clisp.org>
22171         c32is*: Avoid test failures on MidnightBSD.
22172         * tests/test-c32isalnum.c (main): On FreeBSD, disable tests that fail on
22173         MidnightBSD 1.1.
22174         * tests/test-c32isalpha.c (main): Likewise.
22175         * tests/test-c32isblank.c (main): Likewise.
22176         * tests/test-c32islower.c (main): Likewise.
22177         * tests/test-c32isupper.c (main): Likewise.
22179 2021-02-05  Paul Eggert  <eggert@cs.ucla.edu>
22181         regex: fix comment location
22182         * lib/regexec.c (update_regs): Move comment.
22184         regex-tests: add bug 11053 test
22185         * tests/test-regex.c (main): New test case for glibc bug 11053.
22187         regex: debug check for set member duplicates
22188         * lib/regex_internal.c (re_node_set_insert): Add a DEBUG_ASSERT
22189         that would have caught some recently-fixed performance bugs
22190         that caused sets to contain duplicate members.
22192         regex: fix longstanding backref match bug
22193         This fixes a longstanding glibc bug concerning backreferences
22194         <https://sourceware.org/11053> (2009-12-04).
22195         * lib/regexec.c (proceed_next_node, push_fail_stack)
22196         (pop_fail_stack): Push and pop the previous registers
22197         as well as the current ones.  All callers changed.
22198         (set_regs): Also pop if CUR_NODE has already been checked,
22199         so that it does not get added as a duplicate set entry.
22200         (update_regs): Fix comment location.
22201         * tests/test-regex.c (tests): New constant.
22202         (bug_regex11): New test function.
22203         (main): Bump alarm value.  Call new test function.
22205         regex: avoid duplicate in espilon closure
22206         * lib/regcomp.c (calc_eclosure_iter): Insert NODE into epsilon
22207         closure first rather than last.  Otherwise, the epsilon closure
22208         might contain a duplicate of NODE.
22210         regex-tests: fix typo
22211         * tests/test-regex.c (main): Fix typo that would have caused an
22212         old test case to report incorrect values on failure.
22214         regex: make it easier to merge into glibc
22215         * lib/regex_internal.h [_LIBC]: Do not include Gnulib’s dynarray.h.
22217         regex: minor refactoring
22218         * lib/regexec.c (proceed_next_node): Use more-local decls.
22220         regex: avoid undefined behavior
22221         * lib/regexec.c (pop_fail_stack): If the stack is empty, return -1
22222         instead of indulging in undefined behavior.  This simplifies
22223         callers, and avoids undefined behavior in some cases (see glibc
22224         bug 11053, though this change does not fix that overall bug).
22226         regex: improve comments
22227         * lib/regexec.c: Add and correct comments about return values.
22229 2021-01-31  Bruno Haible  <bruno@clisp.org>
22231         relocatable-prog-wrapper: Tweak today's patch.
22232         * build-aux/install-reloc (func_create_wrapper): Clean up free.o.
22234 2021-01-31  Bruno Haible  <bruno@clisp.org>
22236         fmaf: Document QEMU bug.
22237         * doc/posix-functions/fmaf.texi: Add note about QEMU bug.
22239 2021-01-31  Bruno Haible  <bruno@clisp.org>
22241         remainderl: Work around musl libc bug.
22242         * doc/posix-functions/remainderl.texi: Document musl libc bug.
22243         * m4/remainderl.m4 (gl_FUNC_REMAINDERL_WORKS): Add more tests. Update
22244         cross compilation guess.
22246 2021-01-31  Bruno Haible  <bruno@clisp.org>
22248         log2l: Work around musl libc bugs.
22249         * doc/posix-functions/log2l.texi: Document musl libc bugs.
22250         * m4/log2l.m4 (gl_FUNC_LOG2L_WORKS): Add more tests. Update cross
22251         compilation guess.
22253 2021-01-31  Bruno Haible  <bruno@clisp.org>
22255         log1pl: Work around musl libc bug.
22256         * doc/posix-functions/log1pl.texi: Document musl libc bug.
22257         * m4/log1pl.m4 (gl_FUNC_LOG1PL_WORKS): New macro.
22258         (gl_FUNC_LOG1PL): Invoke it.
22260 2021-01-31  Bruno Haible  <bruno@clisp.org>
22262         log10l: Document musl libc bug.
22263         * doc/posix-functions/log10l.texi: Document musl libc bug.
22264         * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Update comment and cross
22265         compilation guess.
22267 2021-01-31  Bruno Haible  <bruno@clisp.org>
22269         logl: Document musl libc bug.
22270         * doc/posix-functions/logl.texi: Document musl libc bug.
22271         * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Update comment and cross
22272         compilation guess.
22274 2021-01-31  Bruno Haible  <bruno@clisp.org>
22276         expm1l: Document musl libc bug.
22277         * doc/posix-functions/expm1l.texi: Document musl libc bug.
22278         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Update comment and cross
22279         compilation guess.
22281 2021-01-31  Bruno Haible  <bruno@clisp.org>
22283         expl: Document musl libc bug.
22284         * doc/posix-functions/expl.texi: Document musl libc bug.
22285         * m4/expl.m4 (gl_FUNC_EXPL): Update comment and cross
22286         compilation guess.
22288 2021-01-31  Bruno Haible  <bruno@clisp.org>
22290         relocatable-prog-wrapper: Update after recent changes.
22291         * lib/relocwrapper.c: Update comments.
22292         * modules/relocatable-prog-wrapper (Files): Add lib/scratch_buffer.h,
22293         lib/malloc/scratch_buffer*, lib/malloc.c, lib/realloc.c, lib/free.c,
22294         lib/mempcpy.c, lib/rawmemchr.c, m4/lstat.m4. Remove lib/lstat.c.
22295         (Depends-on): Add c99, eloop-threshold, fcntl-h, idx, intprops,
22296         libc-config, stddef, sys_stat. Remove alloca-opt.
22297         (configure.ac): Invoke gl_FUNC_MALLOC_POSIX, gl_FUNC_REALLOC_POSIX,
22298         gl_FUNC_FREE, gl_FUNC_MEMPCPY, gl_FUNC_RAWMEMCHR.
22299         * lib/canonicalize-lgpl.c (memmove): Undefine in the relocwrapper.
22300         * build-aux/install-reloc (func_create_wrapper): Compile also
22301         malloc/scratch_buffer_*.c, malloc.c, realloc.c, free.c, mempcpy.c,
22302         rawmemchr.c. Don't compile lstat.c.
22304         Make it possible to compile rawmemchr.c separately, unconditionally.
22305         * lib/rawmemchr.c: Don't define rawmemchr if not needed.
22307         Make it possible to compile mempcpy.c separately, unconditionally.
22308         * lib/mempcpy.c: Don't define mempcpy if not needed.
22310         Make it possible to compile free.c separately, unconditionally.
22311         * m4/free.m4 (gl_FUNC_FREE): Define HAVE_FREE_POSIX.
22312         * lib/free.c: Don't define rpl_free if not needed.
22314         Make it possible to compile realloc.c separately, unconditionally.
22315         * modules/realloc-posix (configure.ac): Invoke gl_MODULE_INDICATOR.
22316         * lib/realloc.c: Don't define rpl_realloc if not needed.
22318         Make it possible to compile malloc.c separately, unconditionally.
22319         * modules/malloc-posix (configure.ac): Invoke gl_MODULE_INDICATOR.
22320         * lib/malloc.c: Don't define rpl_malloc if not needed.
22322 2021-01-31  Bruno Haible  <bruno@clisp.org>
22324         canonicalize-lgpl: Simplify.
22325         * lib/canonicalize-lgpl.c (_GL_USE_STDLIB_ALLOC): Remove macro.
22327 2021-01-30  Bruno Haible  <bruno@clisp.org>
22329         canonicalize, canonicalize-lgpl: Straighten dependencies.
22330         * modules/canonicalize-lgpl (Depends-on): Remove free-posix,
22331         malloc-posix. Add unistd.
22332         * modules/canonicalize (Depends-on): Remove free-posix, xalloc.
22333         Add unistd.
22335 2021-01-30  Bruno Haible  <bruno@clisp.org>
22337         scratch_buffer: Fix dependencies.
22338         * modules/scratch_buffer (Depends-on): Add malloc-posix, realloc-posix,
22339         free-posix.
22341 2021-01-26  Bruno Haible  <bruno@clisp.org>
22343         doc: More precise wording.
22344         Reported by Reuben Thomas <rrt@sc3d.org> in
22345         <https://lists.gnu.org/archive/html/bug-gnulib/2021-01/msg00300.html>.
22346         * doc/relocatable.texi (Enabling Relocatability): Talk about package
22347         management systems in general.
22349         doc: Remove obsolete text.
22350         Suggested by Reuben Thomas <rrt@sc3d.org> in
22351         <https://lists.gnu.org/archive/html/bug-gnulib/2021-01/msg00299.html>.
22352         * doc/relocatable.texi (Enabling Relocatability): Stop mentioning an
22353         issue of libtool 1.5.x.
22355 2021-01-26  Simon Josefsson  <simon@josefsson.org>
22357         maintainer-makefile: Mimic bootstrap's gnulib-srcdir guessing.
22358         * top/maint.mk (gnulib_dir): If $(srcdir)/gnulib doesn't exist,
22359         fall back to $GNULIB_SRCDIR.
22361 2021-01-25  Bruno Haible  <bruno@clisp.org>
22363         posix_spawn_file_actions_* tests: Fix module dependencies.
22364         * modules/posix_spawn_file_actions_addclose-tests (Depends-on): Add
22365         posix_spawn_file_actions_destroy.
22366         * modules/posix_spawn_file_actions_addopen-tests (Depends-on): Likewise.
22367         * modules/posix_spawn_file_actions_adddup2-tests (Depends-on): Likewise.
22368         * modules/posix_spawn_file_actions_addchdir-tests (Depends-on):
22369         Likewise.
22370         * modules/posix_spawn_file_actions_addfchdir-tests (Depends-on):
22371         Likewise.
22373 2021-01-25  Bruno Haible  <bruno@clisp.org>
22375         posix_spawn_file_actions_addclose: Relax configure test.
22376         * m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE): Test a
22377         negative file descriptor, not an out-of-range file descriptor.
22378         * tests/test-posix_spawn_file_actions_addclose.c (main): Add comment.
22379         * doc/posix-functions/posix_spawn_file_actions_addclose.texi: Update.
22381 2021-01-25  Simon Josefsson  <simon@josefsson.org>
22383         getaddrinfo: Doc fix.
22384         * doc/posix-functions/getaddrinfo.texi (getaddrinfo): Gnulib does
22385         not support IDN.
22387 2021-01-24  Bruno Haible  <bruno@clisp.org>
22389         getcwd: Fix cross-compilation guess for musl libc.
22390         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Guess no also on
22391         musl libc.
22392         * doc/posix-functions/getcwd.texi: Update platform info.
22394 2021-01-24  Bruno Haible  <bruno@clisp.org>
22396         expm1l: Fix configure test result with GCC 10 on powerpc64le.
22397         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Change test to avoid GCC optimization.
22399 2021-01-23  Bruno Haible  <bruno@clisp.org>
22401         utime: Fix configure test (regression 2020-12-04).
22402         Reported by Ryan Schmidt <wget@ryandesign.com> via Tim Rühsen in
22403         <https://lists.gnu.org/archive/html/bug-gnulib/2021-01/msg00282.html>.
22404         * m4/utime.m4 (gl_FUNC_UTIME): In the test program, include <utime.h>,
22405         not <time.h>.
22407 2021-01-23  Paul Eggert  <eggert@cs.ucla.edu>
22409         libc-config: port to Xcode 7
22410         Problem reported by Mattias Engdegård in:
22411         https://lists.gnu.org/r/emacs-devel/2021-01/msg01089.html
22412         * lib/cdefs.h (__nonnull): If already defined but glibc is not in
22413         use, override the definition with Gnulib’s _GL_ATTRIBUTE_NONNULL.
22414         This is needed for Xcode 7, which has a ‘#define __nonnull
22415         _Nonnull’ builtin for backwards-compatibility with an older Xcode
22416         syntax that GNUish code never uses.
22418 2021-01-23  Bastien Roucariès  <rouca@debian.org>
22420         explicit_bzero: Add fallback for other compilers.
22421         * lib/explicit_bzero.c (explicit_bzero): For other compilers, invoke
22422         memset through a volatile function pointer.
22424         explicit_bzero: Add support for clang.
22425         * lib/explicit_bzero.c (explicit_bzero): Add a compiler barrier for
22426         clang.
22428 2021-01-21  Paul Eggert  <eggert@cs.ucla.edu>
22430         Port FALLTHROUGH to clang 3.4 and earlier
22431         Problem reported by Akim Demaille in:
22432         https://lists.gnu.org/r/bug-gnulib/2021-01/msg00241.html
22433         * lib/cdefs.h (__glibc_has_attribute):
22434         * m4/gnulib-common.m4 (gl_COMMON_BODY):
22435         Do not trust __has_attribute in clang 3.4 and earlier, as
22436         <https://releases.llvm.org/3.5.0/tools/clang/docs/ReleaseNotes.html>
22437         says that __has_attribute is unreliable in these old versions.
22439 2021-01-20  Bruno Haible  <bruno@clisp.org>
22441         gc-random: Fix link error in tests.
22442         * modules/crypto/gc-random (Link): New section.
22443         * modules/crypto/gc-tests (Makefile.am): Link test-gc with
22444         $(LIB_GETRANDOM).
22446 2021-01-20  Simon Josefsson  <simon@josefsson.org>
22448         gc-random: Replace implementation with call to getrandom.
22449         * lib/gc-gnulib.c [GNULIB_GC_RANDOM]: Replace #include's with
22450         those needed for getrandom.
22451         (gc_init): Remove old randomness code.
22452         (gc_done): Likewise.
22453         (randomize): Rewrite using getrandom, inspired by getentropy.
22454         * m4/gc-random.m4: Remove file.
22455         * modules/crypto/gc-random: Drop gc-random.m4, gl_GC_RANDOM, and
22456         LIB_GC_RANDOM.  Add conditional dependency on getrandom.
22457         * modules/crypto/gc-tests (test_gc_LDADD): Drop LIB_GC_RANDOM.
22459 2021-01-20  Bruno Haible  <bruno@clisp.org>
22461         exec*e tests: Avoid test failures on Cygwin.
22462         * tests/test-execle-main.c (main): On Cygwin, add /bin to the new PATH.
22463         * tests/test-execve-main.c (main): Likewise.
22464         * tests/test-execvpe-main.c (main): Likewise.
22466 2021-01-20  Bruno Haible  <bruno@clisp.org>
22468         canonicalize-lgpl: Work around a Cygwin bug.
22469         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Test for lstat. Add a
22470         test case that involves a symbolic link to an existing file.
22471         * doc/posix-functions/realpath.texi: Mention the Cygwin bug.
22473 2021-01-20  Bruno Haible  <bruno@clisp.org>
22475         doc: Document ptsname_r bug on Cygwin.
22476         * doc/glibc-functions/ptsname_r.texi: Mention Cygwin bug.
22478 2021-01-20  Bruno Haible  <bruno@clisp.org>
22480         sethostname tests: Avoid test failure on Cygwin.
22481         * tests/test-sethostname2.c (main): Treat errno EACCESS like EPERM.
22483 2021-01-19  Paul Eggert  <eggert@cs.ucla.edu>
22485         fnmatch, regex, fts: FALLTHROUGH consistency
22486         Be more consistent about how FALLTHROUGH is defined.
22487         For Gnulib, use attribute.h.  For glibc, use __GNUC__ >= 7.
22488         Problem for glibc reported by Vaseeharan Vinayagamoorthy in:
22489         https://sourceware.org/pipermail/libc-alpha/2021-January/121778.html
22490         * lib/fnmatch.c (FALLTHROUGH) [_LIBC]:
22491         * lib/regex_internal.h (FALLTHROUGH) [_LIBC]:
22492         Don’t worry about Clang, as it’s not needed and provokes GCC.
22493         * lib/fts.c (FALLTHROUGH) [!_LIBC]:
22494         * lib/regex_internal.h (FALLTHROUGH) [!_LIBC]:
22495         Rely on attribute.h for FALLTHROUGH
22496         * modules/regex: Depend on attribute module.
22498 2021-01-19  KO Myung-Hun  <komh78@gmail.com>
22500         spawn-pipe: Fix SIGSEGV on OS/2 kLIBC.
22501         * lib/spawn-pipe.c [OS/2 kLIBC]: Check directory correctly if it means
22502         a current directory.
22504 2021-01-19  KO Myung-Hun  <komh78@gmail.com>
22506         dirent: Fix compilation error in C++ mode on OS/2 kLIBC.
22507         * lib/dirent.in.h (dirfd): Redefine dirfd macro as a rpl function
22508         always.
22510 2021-01-19  KO Myung-Hun  <komh78@gmail.com>
22512         zerosize-ptr: Fix compilation on OS/2 kLIBC.
22513         * tests/zerosize-ptr.h [OS/2 kLIBC]: Don't use mmap().
22515 2021-01-19  KO Myung-Hun  <komh78@gmail.com>
22517         stddef: Fix compilation for max_align_t on OS/2 kLIBC.
22518         * lib/stddef.in.h [OS/2 kLIBC]: Include <cstddef> in C++ mode.
22520 2021-01-19  KO Myung-Hun  <komh78@gmail.com>
22522         yield: Implement for OS/2 kLIBC.
22523         * modules/yield (Depends-on): Add sched_yield.
22525         sched_yield: Implement for OS/2 kLIBC.
22526         * lib/sched_yield.c (sched_yield) [OS/2 kLIBC]: New implementation.
22528 2021-01-19  KO Myung-Hun  <komh78@gmail.com>
22530         spawn: Use special invocation for <spawn.h> on OS/2 kLIBC.
22531         * lib/spawn.in.h: Use special invocation to include <spawn.h> properly
22532         on OS/2 kLIBC.
22534 2021-01-18  Bruno Haible  <bruno@clisp.org>
22536         noreturn tests: Avoid test failure on Solaris 10/x86 with cc.
22537         * tests/test-noreturn.c (main): Return 0.
22539 2021-01-18  Bruno Haible  <bruno@clisp.org>
22541         uninorm tests: Fix compilation error on Cygwin.
22542         * tests/uninorm/test-nfc.c (n): Don't define when using a preinstalled
22543         libunistring on Windows.
22544         * tests/uninorm/test-nfd.c (n): Likewise.
22545         * tests/uninorm/test-nfkc.c (n): Likewise.
22546         * tests/uninorm/test-nfkd.c (n): Likewise.
22548 2021-01-17  Bruno Haible  <bruno@clisp.org>
22550         immutable: Implement on native Windows.
22551         * lib/immutable.h (IMMUTABLE_EFFECTIVE): Set to 1 on native Windows.
22552         * lib/immutable.c: Include <windows.h>.
22553         (CreateFileMapping): New macro.
22554         (init_pagesize, init_mmap_file, alloc_pages, free_pages): Add
22555         implementation for native Windows.
22557 2021-01-17  Bruno Haible  <bruno@clisp.org>
22559         canonicalize-lgpl tests: Fix link error.
22560         * modules/canonicalize-lgpl-tests (Makefile.am): Link
22561         test-canonicalize-lgpl with $(LIBINTL).
22563 2021-01-17  Bruno Haible  <bruno@clisp.org>
22565         canonicalize-lgpl: Work around // handling in realpath() of musl 1.2.2.
22566         Reported by Natanael Copa <ncopa@alpinelinux.org> in
22567         <https://lists.gnu.org/archive/html/bug-gettext/2021-01/msg00021.html>.
22568         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Add a test whether // is
22569         the same as /, on Linux only.
22570         * lib/canonicalize-lgpl.c: Correct indentation of preprocessor
22571         directives.
22572         * doc/posix-functions/realpath.texi: Mention the musl 1.2.2 bug.
22574 2021-01-17  Bruno Haible  <bruno@clisp.org>
22576         canonicalize[-lgpl] tests: Add more tests.
22577         * tests/test-canonicalize.c (main): Add detailed tests for // handling.
22578         * tests/test-canonicalize-lgpl.c (main): Likewise.
22580 2021-01-17  Bruno Haible  <bruno@clisp.org>
22582         argp tests: Avoid test failures on Alpine Linux.
22583         * tests/test-argp-2.sh: Use the test framework (init.sh). Use the
22584         'compare' function instead of 'diff -c'.
22585         * tests/test-argp-version-etc-1.sh: Likewise.
22587 2021-01-17  Bruno Haible  <bruno@clisp.org>
22589         get-rusage-data tests: Avoid test failure on musl libc.
22590         * modules/get-rusage-data-tests (Files): Add m4/musl.m4.
22591         (configure.ac): Invoke gl_MUSL_LIBC.
22592         * tests/test-get-rusage-data.c (main): Treat musl libc like glibc.
22594 2021-01-17  Bruno Haible  <bruno@clisp.org>
22596         immutable, get-rusage-data: Fix autoconf warning.
22597         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Define through AC_DEFUN_ONCE.
22599 2021-01-16  Bruno Haible  <bruno@clisp.org>
22601         vma-iter: Port to 64-bit Haiku.
22602         * lib/vma-iter.c (vma_iterate): Adapt to changed signature of
22603         get_next_area_info.
22605 2021-01-15  Bruno Haible  <bruno@clisp.org>
22607         doc: Update doc about realpath.
22608         * doc/posix-functions/realpath.texi: Update info about macOS.
22610 2021-01-13  Paul Eggert  <eggert@cs.ucla.edu>
22612         verify: simplify static_assert configuration
22613         * lib/verify.h (_GL_HAVE__STATIC_ASSERT, _GL_HAVE__STATIC_ASSERT1):
22614         Do not define for C++.  This should be good enough nowadays,
22615         since recent-enough C++ compilers have static_assert.
22616         (_GL_HAVE_STATIC_ASSERT_CXX11, _GL_HAVE_STATIC_ASSERT_CXX17):
22617         Remove.  All uses replaced by simply checking __cpp_static_assert.
22619 2021-01-13  Simon Josefsson  <simon@josefsson.org>
22621         lib-msvc-compat: Update libtool usage recommendation.
22622         * doc/ld-output-def.texi (Visual Studio Compatibility): Install
22623         .def files into libdir, not bindir.  Have libfoo-*.def file depend
22624         on libfoo.la to fix parallell builds.
22626 2021-01-12  Bruno Haible  <bruno@clisp.org>
22628         verify: Use C++11 static_assert when available.
22629         Reported by Alexandre Duret-Lutz <adl@lrde.epita.fr> in
22630         <https://lists.gnu.org/archive/html/bug-gnulib/2021-01/msg00177.html>.
22631         * lib/verify.h (_GL_HAVE_STATIC_ASSERT_CXX11): New macro.
22632         (_GL_HAVE_STATIC_ASSERT_CXX17): Renamed from _GL_HAVE_STATIC_ASSERT1.
22633         (_GL_VERIFY): Use static_assert when available with C++11 syntax.
22635 2021-01-11  Paul Eggert  <eggert@cs.ucla.edu>
22637         tempname: consume less entropy
22638         Derived from a glibc patch proposed by Adhemerval Zanella in:
22639         https://sourceware.org/pipermail/libc-alpha/2021-January/121302.html
22640         * lib/tempname.c: Include stdbool.h.
22641         (random_bits): New arg use_getrandom.
22642         (try_tempname_len): Skip getrandom on the first try,
22643         unless __GT_NOCREATE.
22644         * modules/tempname (Depends-on): Add stdbool.
22646 2021-01-10  Bruno Haible  <bruno@clisp.org>
22648         lchmod-tests: Fix link error.
22649         * modules/lchmod-tests (Makefile.am): Don't assume that LIBINTL is set.
22651 2021-01-10  Simon Josefsson  <simon@josefsson.org>
22653         Correct preceeding change.
22654         * top/gitsub.sh: Update link.
22656 2021-01-09  Bruno Haible  <bruno@clisp.org>
22658         immutable: Add tests.
22659         * tests/test-immutable.sh: New file.
22660         * tests/test-immutable.c: New file.
22661         * modules/immutable-tests: New file.
22663         immutable: New module.
22664         * lib/immutable.h: New file.
22665         * lib/immutable.c: New file.
22666         * m4/immutable.m4: New file.
22667         * m4/mprotect.m4: New file, based on libffcall/m4/codeexec.m4.
22668         * modules/immutable: New file.
22670 2021-01-10  Simon Josefsson  <simon@josefsson.org>
22672         Use https:// instead of git://.
22673         * build-aux/bootstrap (default_gnulib_url): Ditto.
22674         * config/srclistvars.sh: Ditto.
22675         * doc/gnulib-readme.texi (Git Checkout): Ditto.
22676         * doc/gnulib-tool.texi (VCS Issues): Ditto.
22677         * top/gitsub.sh: Update link.
22679 2021-01-09  Paul Eggert  <eggert@cs.ucla.edu>
22681         snippet/_Noreturn: port to pedantic clang
22682         Problem reported by Joe Nelson in:
22683         https://lists.gnu.org/r/bug-gnulib/2021-01/msg00152.html
22684         * doc/noreturn.texi: Improve.
22685         * lib/_Noreturn.h (_Noreturn):
22686         * m4/gnulib-common.m4 (gl_COMMON_BODY):
22687         Do not assume _Noreturn works as-is when __STRICT_ANSI__ is
22688         defined, unless __STDC_VERSION__ indicates C11 or later.
22689         * lib/_Noreturn.h (_Noreturn): Fall back on __attribute__
22690         ((__noreturn__)) if Clang; this merges the
22691         2020-08-10T23:53:13Zbruno@clisp.org patch to m4/gnulib-common.m4.
22693 2021-01-09  Darshit Shah  <darnir@gnu.org>
22695         Allow setting CVS username for gnu-web-doc-update.
22696         * build-aux/gnu-web-doc-update: Introduce new option --user to set the
22697         name of the user on Savannah, when it doesn't match $USER.
22699 2021-01-09  Bruno Haible  <bruno@clisp.org>
22701         exp* tests: Work around clang 6.0.1 optimization bugs on x86.
22702         * tests/test-exp-ieee.h (test_function): Mark some variable as
22703         'volatile'.
22704         * tests/test-exp2-ieee.h (test_function): Likewise.
22706 2021-01-09  Bruno Haible  <bruno@clisp.org>
22708         fchmodat: Work around trailing slash bug in fchmodat() on AIX 7.2.
22709         * m4/fchmodat.m4 (gl_FUNC_FCHMODAT): In the test whether fchmodat works,
22710         also test for the trailing slashes behaviour. Define
22711         HAVE_NEARLY_WORKING_FCHMODAT if this is the only missing feature.
22712         * lib/fchmodat.c (fchmodat): If HAVE_NEARLY_WORKING_FCHMODAT, handle
22713         trailing slashes here.
22714         * modules/fchmodat (Depends-on): Sort by condition, not alphabetically.
22715         * doc/posix-functions/fchmodat.texi: Document the AIX bug.
22717 2021-01-09  Bruno Haible  <bruno@clisp.org>
22719         fchmod-tests, fchmodat tests, lchmod tests: Add more tests.
22720         * tests/test-fchmod.c: Include <fcntl.h>.
22721         (BASE): New macro.
22722         (main): Add more tests.
22723         * tests/test-fchmodat.c (main): Add more tests.
22724         * tests/test-lchmod.c (main): Likewise.
22726 2021-01-09  Bruno Haible  <bruno@clisp.org>
22728         utimensat: Fix typo in last commit.
22729         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Fix typo in macro explanation.
22731 2021-01-09  Bruno Haible  <bruno@clisp.org>
22733         truncate: Document last workaround.
22734         * doc/posix-functions/truncate.texi: Document the AIX bug.
22736 2021-01-08  Paul Eggert  <eggert@cs.ucla.edu>
22738         dynarray: work even if ‘free’ is replaced
22739         Problem reported by Darshit Shah in:
22740         https://lists.gnu.org/r/bug-gnulib/2021-01/msg00140.html
22741         * lib/malloc/dynarray-skeleton.c (DYNARRAY_FREE): New macro.
22742         Use it everywhere instead of DYNARRAY_NAME (free).
22744         tempname: don’t block for minutes
22745         Derived from a patch proposed by Adhemerval Zanella in:
22746         https://sourceware.org/pipermail/libc-alpha/2021-January/121302.html
22747         * lib/tempname.c (random_bits): Use GRND_NONBLOCK.
22749         tempname: sync with proposed glibc patch
22750         This is from Adhemerval Zanella in:
22751         https://sourceware.org/pipermail/libc-alpha/2021-January/121301.html
22752         * lib/tempname.c (__lxstat64): Remove.
22753         (__lstat64, __stat64): New replacement macros.  All uses changed.
22755         regex: stop using alloca
22756         * lib/regex_internal.h: Do not include <alloca.h> or define
22757         __libc_use_alloca or alloca.  Patch written by Adhemerval Zanella:
22758         https://sourceware.org/pipermail/libc-alpha/2021-January/121374.html
22759         * modules/regex (Depends-on): Remove alloca-opt.
22761         regexec: remove alloca usage in build_trtable
22762         Prompted by this different change proposed by Adhemerval Zanella:
22763         https://sourceware.org/pipermail/libc-alpha/2021-January/121373.html
22764         * lib/regexec.c (build_trtable): Prevent inlining,
22765         so that it doesn’t bloat the caller’s stack.
22766         Use auto variables instead of alloca/malloc.
22767         After these changes, build_trtable’s total stack allocation is
22768         only 20 KiB on a 64-bit machine, and this is less than glibc’s 64
22769         KiB cutoff so there’s little point to using alloca to shrink it.
22770         Although Gnulib traditionally has used a 4 KiB cutoff, going to 20
22771         KiB here should not be a significant problem in practice;
22772         Gnulib-using packages concerned about overflow of tiny stacks can
22773         compile with something like gcc -fstack-clash-protection.
22775         scratch_buffer: add scratch_buffer_dupfree macro
22776         * lib/scratch_buffer.h (__libc_scratch_buffer_dupfree):
22777         New macro, needed to support recent changes in this module.
22779         regex: remove alloca usage on regex set_regs
22780         Derived from this patch by Adhemerval Zanella:
22781         https://sourceware.org/pipermail/libc-alpha/2021-January/121372.html
22782         * lib/regex_internal.h: Include dynarray.h, for Gnulib.
22783         * lib/regexec.c (DYNARRAY_STRUCT, DYNARRAY_ELEMENT)
22784         (DYNARRAY_PREFIX): New macros.
22785         Include malloc/dynarray-skeleton.c.
22786         (set_regs): Use dynarray rather than alloca.
22787         * modules/regex (Depends-on): Add dynarray.
22789         dynarray: new module
22790         * config/srclist.txt: Mention the new files.
22791         * lib/cdefs.h (__attribute_maybe_unused__): New macro,
22792         like Gnulib’s _GL_ATTRIBUTE_MAYBE_UNUSED but with glibc
22793         naming conventions.
22794         * lib/libc-config.h: Use it instead of __glibc_likely.
22795         * lib/dynarray.h, modules/dynarray: New files.
22796         * lib/malloc/dynarray-skeleton.c, lib/malloc/dynarray.h:
22797         * lib/malloc/dynarray_at_failure.c:
22798         * lib/malloc/dynarray_emplace_enlarge.c:
22799         * lib/malloc/dynarray_finalize.c, lib/malloc/dynarray_resize.c:
22800         * lib/malloc/dynarray_resize_clear.c, modules/dynarray:
22801         New files, from glibc with the following changes needed for
22802         portability to compilers that are not recent-enough GCC.
22803         * lib/malloc/dynarray_at_failure.c: Include stdlib.h, for abort.
22804         (__libc_dynarray_at_failure) [!_LIBC]: Simply abort.
22805         * lib/malloc/dynarray_emplace_enlarge.c:
22806         * lib/malloc/dynarray_resize.c:
22807         Include intprops.h, and use INT_MULTIPLY_WRAPV instead
22808         of __builtin_mul_overflow.
22809         * lib/malloc/dynarray.h (__libc_dynarray_at_failure):
22810         Use _Noreturn instead of __attribute__ ((noreturn)).
22811         * lib/malloc/dynarray_resize_clear.c: Do not include stdlib.h;
22812         it’s not needed.
22813         (__libc_dynarray_resize_clear): Do not do arithmetic on void *.
22814         * lib/malloc/dynarray-skeleton.c (struct DYNARRAY_STRUCT):
22815         Do not use anonymous unions, as they are not in C99. All uses changed.
22816         Use __nonnull (X) instead of __attribute__ ((nonnull X)),
22817         and __attribute_maybe_unused__ instead of __attribute__ ((unused)).
22819 2021-01-06  Simon Josefsson  <simon@josefsson.org>
22821         bootstrap: Fix parsing of package name.
22822         * build-aux/bootstrap (package): Attempt to use autoconf --trace
22823         to parse AC_INIT before falling back to sed expression.
22825 2021-01-07  Bruno Haible  <bruno@clisp.org>
22827         localename: Fix link error with duplocale on AIX 7.2 (regr. 2019-12-18).
22828         * m4/locale_h.m4 (gl_LOCALE_H_DEFAULTS): Initialize
22829         LOCALENAME_ENHANCE_LOCALE_FUNCS.
22830         * m4/intl-thread-locale.m4 (gt_FUNC_USELOCALE):
22831         Set gt_working_uselocale.
22832         (gt_INTL_THREAD_LOCALE_NAME): Set gt_fake_locales, gt_good_uselocale,
22833         gt_localename_enhances_locale_funcs, LOCALENAME_ENHANCE_LOCALE_FUNCS.
22834         Define HAVE_GOOD_USELOCALE, LOCALENAME_ENHANCE_LOCALE_FUNCS.
22835         * m4/localename.m4 (gl_LOCALENAME): Test
22836         gt_localename_enhances_locale_funcs instead of gt_nameless_locales.
22837         * modules/locale (Makefile.am): Substitute
22838         LOCALENAME_ENHANCE_LOCALE_FUNCS.
22839         * lib/locale.in.h (newlocale, duplocale, freelocale): Don't override if
22840         module 'localename' is in use but LOCALENAME_ENHANCE_LOCALE_FUNCS is 0.
22841         * lib/localename.c (HAVE_GOOD_USELOCALE): Don't define here.
22842         (get_locale_t_name, newlocale, duplocale, freelocale): Define if
22843         LOCALENAME_ENHANCE_LOCALE_FUNCS.
22845 2021-01-06  Bruno Haible  <bruno@clisp.org>
22847         logb: Fix test failure on glibc/powerpc.
22848         * doc/posix-functions/logb.texi: Update platform info.
22849         * m4/logb.m4 (gl_FUNC_LOGB_WORKS): Test against bug with negative
22850         subnormal numbers.
22852 2021-01-06  Paul Eggert  <eggert@cs.ucla.edu>
22854         libc-config: simplify clang __has_* macros
22855         cdefs.h sometimes used names like __glibc_clang_has_attribute and
22856         sometimes __glibc_has_attribute.  There is no need in glibc or
22857         Gnulib to distinguish clang from other compilers here, so be
22858         consistent and use the simpler names.
22859         * lib/cdefs.h (__glibc_has_builtin, __glibc_has_extension):
22860         Rename from __glibc_clang_has_builtin, __glibc_clang_has_extension.
22861         All uses changed.
22862         (__glibc_clang_has_attribute): Remove. All uses replaced
22863         by __glibc_has_attribute.
22864         * lib/libc-config.h [!__glibc_likely]: Undef them here too.
22865         This fixes a problem where __glibc_has_attribute was not undeffed.
22867 2021-01-06  Bruno Haible  <bruno@clisp.org>
22869         flock: Update documentation.
22870         * doc/glibc-functions/flock.texi: Document what to expect on AIX and
22871         Solaris.
22873 2021-01-06  Bruno Haible  <bruno@clisp.org>
22875         ilogbl: Fix compilation error with xlclang on AIX 7.2.
22876         * lib/math.in.h (ilogbl): Undefine macro before declaration.
22878 2021-01-06  Bruno Haible  <bruno@clisp.org>
22880         ilogbl: Fix test failures on AIX 7.1 in 64-bit mode.
22881         * m4/ilogbl.m4 (gl_FUNC_ILOGBL_WORKS): Test also some denormalized
22882         argument.
22883         * doc/posix-functions/ilogbl.texi: Mention the AIX bug.
22885 2021-01-06  Bruno Haible  <bruno@clisp.org>
22887         ilogb: Fix test failures on AIX 7.1 in 64-bit mode.
22888         * m4/ilogb.m4 (gl_FUNC_ILOGB_WORKS): Test also some denormalized
22889         argument.
22890         * doc/posix-functions/ilogb.texi: Mention the AIX bug.
22892 2021-01-05  Bruno Haible  <bruno@clisp.org>
22894         fclose: Fix test failure on AIX 7.2.
22895         * m4/fclose.m4 (gl_FUNC_FCLOSE_STDIN): New macro.
22896         (gl_FUNC_FCLOSE): Invoke it. Set REPLACE_FCLOSE accordingly.
22897         * doc/posix-functions/fclose.texi: Update platform information.
22898         * doc/posix-functions/fflush.texi: Likewise.
22900 2021-01-05  Bruno Haible  <bruno@clisp.org>
22902         pipe-filter-gi: Fix test failure on AIX 7.2.
22903         * lib/pipe-filter-aux.h (SSIZE_MAX) [AIX]: Set to 4096.
22905 2021-01-05  Bruno Haible  <bruno@clisp.org>
22907         utimens, utimensat, fdutimensat: Avoid test failures on AIX 7.2.
22908         * lib/utimecmp.c (utimecmpat): On AIX, declare equality when the two
22909         times differ by less than 0.01 seconds.
22910         * tests/test-futimens.h (test_futimens): Pass UTIMECMP_TRUNCATE_SOURCE
22911         flag.
22913 2021-01-05  Bruno Haible  <bruno@clisp.org>
22915         utimensat: Work around trailing slash bug in utimensat() on AIX 7.2.
22916         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Require AC_CANONICAL_HOST. Add a
22917         test for trailing slash handling. Improve cross-compilation guesses.
22918         Conditionally define HAVE_NEARLY_WORKING_UTIMENSAT.
22919         * lib/utimensat.c (rpl_utimensat): Add alternative implementation when
22920         HAVE_NEARLY_WORKING_UTIMENSAT is defined.
22921         * lib/utimens.c: Use the overridden utimensat when
22922         HAVE_NEARLY_WORKING_UTIMENSAT is defined.
22923         * doc/posix-functions/utimensat.texi: Mention the AIX bug.
22925 2021-01-05  Bruno Haible  <bruno@clisp.org>
22927         ptsname_r, ptsname: Avoid test failures on AIX 7.2.
22928         * tests/test-ptsname_r.c (main): On AIX, set a 20-seconds timer.
22929         * tests/test-ptsname.c (main): Likewise. On AIX, open a pty through
22930         /dev/ptc and don't test the BSD ptys.
22932 2021-01-05  Paul Eggert  <eggert@cs.ucla.edu>
22934         libc-config: merge from glibc
22935         Use a better way of keeping glibc <sys/cdefs.h> and gnulib
22936         lib/cdefs.h mostly in sync, by using lib/cdefs.h only on platforms
22937         where <sys/cdefs.h> does not work well enough for Gnulib.
22938         * lib/cdefs.h: Go back to using _SYS_CDEFS_H rather than
22939         _GL_DEFS_H as an include guard.
22940         (__THROW, __THROWNL, __NTH, __NTHNL):
22941         Define to noexcept for C++11 and later.
22942         (__glibc_objsize, __glibc_objsize0): New, for _FORTIFY_SOURCE=3.
22943         (__warndecl): Remove.
22944         (__attribute_copy__): New macro, for GCC 9 support.
22945         (__LDBL_REDIR, __LDBL_REDIR_DECL, __LDBL_REDIR1)
22946         (__LDBL_REDIR1_DECL, __LDBL_REDIR1_NTH, __REDIRECT_NTH_LDBL)
22947         (__REDIRECT_LDBL, __LDBL_REDIR_NTH):
22948         Redirections for IEEE long double on powerpc64le.
22949         (__LDBL_REDIR2_DECL): New macro.
22950         (__attr_access): New macro, for GCC 10 bounds checking.
22951         (__attribute_returns_twice__): New macro, for setjmp etc.
22952         * lib/libc-config.h: Include <cdefs.h> only if __glibc_likely is
22953         undefined.  The following changes apply only if __glibc_likely
22954         is not defined.
22955         (__LDBL_REDIR2_DECL, __attr_access, __attribute_returns_twice__)
22956         (__glibc_clang_has_attribute, __glibc_clang_has_extension)
22957         (__glibc_objsize, __glibc_objsize0):
22958         Undef these new (or newer) <cdefs.h> macros.
22959         (__P, __PMT, __always_inline): Do not undef, since cdefs.h does that.
22960         (__glibc_likely): Do not undef, since this is inside
22961         ifndef __glibc_likely.
22962         (__warndecl): Do not undef; no longer defined.
22964 2021-01-05  Jim Meyering  <meyering@fb.com>
22966         maintainer-makefile: correct preceding change
22967         * top/maint.mk (syntax-check-rules): Use LC_ALL=C, not LANG=C.
22969 2021-01-05  Paul Eggert  <eggert@cs.ucla.edu>
22971         maint: note syncs to glibc
22972         * config/srclist.txt: filename.h, idx.h, scratch_buffer.h and
22973         scratch_buffer_dupfree.c are now identical to glibc.  Add
22974         commentary about some other syncs we’d like.
22975         * modules/filename, modules/idx (Maintainer): Add glibc.
22977 2021-01-05  Bruno Haible  <bruno@clisp.org>
22979         truncate: Work around trailing slash bug in truncate() on AIX 7.2.
22980         * m4/truncate.m4 (gl_FUNC_TRUNCATE): Add a test whether truncate
22981         rejects trailing slashes. Set REPLACE_TRUNCATE and define
22982         TRUNCATE_TRAILING_SLASH_BUG if not.
22983         * lib/truncate.c (orig_truncate): New function.
22984         (truncate): Add alternative implementation when
22985         TRUNCATE_TRAILING_SLASH_BUG is defined.
22986         * modules/truncate (Depends-on): Add sys_stat, stat.
22988 2021-01-05  Bruno Haible  <bruno@clisp.org>
22990         mkfifoat: Fix cross-compilation guess (regression from 2021-01-04).
22991         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Fix copy-and-paste mistake.
22993 2021-01-05  Bruno Haible  <bruno@clisp.org>
22995         ffsll: Override completely broken implementation on AIX in 32-bit mode.
22996         * m4/ffsll.m4 (gl_FUNC_FFSLL): Test whether ffsll minimally works. If
22997         not, set REPLACE_FFSLL.
22998         * lib/string.in.h (ffsll): Consider REPLACE_FFSLL.
22999         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
23000         REPLACE_FFSLL.
23001         * modules/string (Makefile.am): Substitute REPLACE_FFSLL.
23002         * modules/ffsll (Depends-on, configure.ac): Consider REPLACE_FFSLL.
23003         * doc/glibc-functions/ffsll.texi: Mention the AIX 7.2 bug.
23005 2021-01-04  Bruno Haible  <bruno@clisp.org>
23007         symlinkat: Fix trailing slash handling.
23008         * lib/symlinkat.c (rpl_symlinkat): Don't follow symlinks during the
23009         trailing slash handling.
23010         * modules/symlinkat (Depends-on): Update conditions.
23012 2021-01-04  Bruno Haible  <bruno@clisp.org>
23014         mkfifoat: Update module description.
23015         * modules/mkfifoat (Depends-on): Update conditions after last commits.
23017 2021-01-04  Bruno Haible  <bruno@clisp.org>
23019         link: Improve trailing slash handling on native Windows.
23020         * lib/link.c (link): If stat() fails, provide a better errno.
23022 2021-01-04  Bruno Haible  <bruno@clisp.org>
23024         mkfifoat: Work around trailing slash bug in mknodat() on AIX 7.2.
23025         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Set also REPLACE_MKNODAT.
23026         * lib/sys_stat.in.h (mknodat): Consider REPLACE_MKNODAT.
23027         * lib/mknodat.c: Add an overriding implementation of mknodat().
23028         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize REPLACE_MKNODAT.
23029         * modules/sys_stat (Makefile.am): Substitute REPLACE_MKNODAT.
23030         * modules/mkfifoat (Depends-on, configure.ac): Consider REPLACE_MKNODAT.
23031         * doc/posix-functions/mknodat.texi: Mention the AIX bug.
23033         mkfifoat: Work around trailing slash bug in mkfifoat() on AIX 7.2.
23034         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Add a test whether mkfifoat rejects
23035         trailing slashes. Set REPLACE_MKFIFOAT if not.
23036         * lib/sys_stat.in.h (mkfifoat): Consider REPLACE_MKFIFOAT.
23037         * lib/mkfifoat.c: Add an overriding implementation of mkfifoat().
23038         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize
23039         REPLACE_MKFIFOAT.
23040         * modules/sys_stat (Makefile.am): Substitute REPLACE_MKFIFOAT.
23041         * modules/mkfifoat (Depends-on): Add fstatat.
23042         (configure.ac): Consider REPLACE_MKFIFOAT.
23043         * doc/posix-functions/mkfifoat.texi: Mention the AIX bug.
23045 2021-01-04  Bruno Haible  <bruno@clisp.org>
23047         libc-config: Avoid overriding the headers from an installed newer glibc.
23048         Reported by Paul E Murphy <murphyp@linux.ibm.com> in
23049         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00106.html>.
23050         * lib/cdefs.h: Use a different include guard than glibc's <sys/cdefs.h>.
23051         * lib/libc-config.h: Update accordingly.
23053 2021-01-04  Simon Josefsson  <simon@josefsson.org>
23055         maintainer-makefile: Invoke syntax-checks regardless of locale.
23056         * top/maint.mk (syntax-check-rules): Invoke sed with LANG=C
23057         environment because [a-z] may not include 'w' in all locales.
23059 2021-01-04  Bruno Haible  <bruno@clisp.org>
23061         nstrftime, time_rz: Avoid using an obsolete Autoconf macro.
23062         Reported by Mike Gran <spk121@yahoo.com> in
23063         <https://lists.gnu.org/archive/html/bug-gnulib/2021-01/msg00067.html>.
23064         * lib/time-internal.h: Test HAVE_STRUCT_TM_TM_ZONE, not HAVE_TM_ZONE.
23065         * lib/time_rz.c: Likewise.
23066         * lib/nstrftime.c: Set and test HAVE_STRUCT_TM_TM_ZONE, not
23067         HAVE_TM_ZONE.
23068         * m4/nstrftime.m4 (gl_FUNC_GNU_STRFTIME): Update comments.
23070 2021-01-04  Bruno Haible  <bruno@clisp.org>
23072         expm1f-ieee: Work around AIX 7.2 bug.
23073         * m4/expm1f.m4 (gl_FUNC_EXPM1F): Initialize gl_expm1f_required. If
23074         module 'expm1f-ieee' is in use, check whether expm1f works according to
23075         IEEE.
23076         * m4/expm1f-ieee.m4: New file.
23077         * modules/expm1f-ieee (Files): Add it.
23078         (Depends-on): Update conditions.
23079         (configure.ac): Invoke gl_FUNC_EXPM1F_IEEE.
23080         * doc/posix-functions/expm1f.texi: Mention the AIX bug.
23082 2021-01-04  Bruno Haible  <bruno@clisp.org>
23084         ffsl, ffsll: Work around AIX 7.2 problem.
23085         * lib/string.in.h: On AIX, include <strings.h> for the declarations of
23086         ffsl and ffsll.
23087         * doc/glibc-functions/ffsl.texi: Document the AIX 7.2 problem.
23088         * doc/glibc-functions/ffsll.texi: Likewise.
23090 2021-01-04  Bruno Haible  <bruno@clisp.org>
23092         ssfmalloc: Fix includes.
23093         * lib/ssfmalloc.h: Include <strings.h>, for ffs().
23094         * tests/test-ssfmalloc.c: Include <string.h>, for memset().
23096 2021-01-03  Bruno Haible  <bruno@clisp.org>
23098         quotearg tests: Avoid test failures on Solaris 11.3.
23099         * tests/test-quotearg.sh: Copy the fr/ directory using 'cp -R', not
23100         'cp -a'.
23102 2021-01-03  Bruno Haible  <bruno@clisp.org>
23104         tests: Fix link errors on Solaris, when libunistring-optional is in use.
23105         * modules/wcwidth (Link): New section.
23106         * modules/wcswidth (Link): New section.
23107         * modules/mbchar (Link): New section.
23108         * modules/mbfile (Link): Link against libunistring.
23109         * modules/mbiter (Link): Likewise.
23110         * modules/mbuiter (Link): Likewise.
23111         * modules/mbmemcasecmp (Link): Likewise.
23112         * modules/mbscasecmp (Link): Likewise.
23113         * modules/mbscasestr (Link): Likewise.
23114         * modules/mbschr (Link): Likewise.
23115         * modules/mbscspn (Link): Likewise.
23116         * modules/mbslen (Link): Likewise.
23117         * modules/mbsncasecmp (Link): Likewise.
23118         * modules/mbsnlen (Link): Likewise.
23119         * modules/mbspbrk (Link): Likewise.
23120         * modules/mbspcasecmp (Link): Likewise.
23121         * modules/mbsrchr (Link): Likewise.
23122         * modules/mbssep (Link): Likewise.
23123         * modules/mbsspn (Link): Likewise.
23124         * modules/mbsstr (Link): Likewise.
23125         * modules/mbstok_r (Link): Likewise.
23126         * modules/mbswidth (Link): Likewise.
23127         * modules/exclude (Link): Likewise.
23128         * modules/propername (Link): Likewise.
23129         * modules/regex-quote (Link): Likewise.
23130         * modules/trim (Link): Likewise.
23131         * modules/mbmemcasecmp-tests (Makefile.am): Link the test program
23132         against libunistring.
23133         * modules/mbscasecmp-tests (Makefile.am): Likewise.
23134         * modules/mbscasestr-tests (Makefile.am): Likewise.
23135         * modules/mbschr-tests (Makefile.am): Likewise.
23136         * modules/mbscspn-tests (Makefile.am): Likewise.
23137         * modules/mbsncasecmp-tests (Makefile.am): Likewise.
23138         * modules/mbspbrk-tests (Makefile.am): Likewise.
23139         * modules/mbspcasecmp-tests (Makefile.am): Likewise.
23140         * modules/mbsrchr-tests (Makefile.am): Likewise.
23141         * modules/mbsspn-tests (Makefile.am): Likewise.
23142         * modules/mbsstr-tests (Makefile.am): Likewise.
23143         * modules/exclude-tests (Makefile.am): Likewise.
23144         * modules/regex-quote-tests (Makefile.am): Likewise.
23146 2021-01-03  Bruno Haible  <bruno@clisp.org>
23148         c32ispunct tests: Avoid test failures on FreeBSD.
23149         * tests/test-c32ispunct.c (main): On FreeBSD, disable tests that fail on
23150         FreeBSD 12.1.1.
23152 2021-01-04  Simon Josefsson  <simon@josefsson.org>
23154         doc: Repeat warning that --with-tests cannot be used twice.
23155         * doc/gnulib-tool.texi (Multiple instances): Remind reader of
23156         --with-tests limitation.
23158 2021-01-03  Bruno Haible  <bruno@clisp.org>
23160         iconv, iconv_open: Improve documentation.
23161         Reported by Noah Misch <noah@leadboat.com> in
23162         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00172.html>.
23163         * doc/posix-functions/iconv_open.texi: Add new paragraph "Portability
23164         problems handled by Gnulib".
23165         * doc/posix-functions/iconv.texi: Likewise. Update info about AIX.
23166         * m4/iconv.m4 (AM_ICONV_LINK): Improve comments.
23168 2021-01-03  Bruno Haible  <bruno@clisp.org>
23170         iconv-h: Fix module description.
23171         * modules/iconv-h (Include): Check HAVE_ICONV_H.
23173 2021-01-03  Noah Misch  <noah@leadboat.com>
23175         iconv_open: Fix module description.
23176         * modules/iconv_open (Include): Check HAVE_ICONV, like modules/iconv.
23178 2021-01-03  Bruno Haible  <bruno@clisp.org>
23180         stddef: Override wrong max_align_t on AIX 7 with xlc in 64-bit mode.
23181         * m4/stddef_h.m4 (gl_STDDEF_H): Make check for good max_align_t
23182         stricter: Add tests for offsetof-based alignof.
23183         * lib/stddef.in.h (max_align_t): Override on AIX in 64-bit mode.
23184         * doc/posix-headers/stddef.texi: Document the AIX max_align_t bug.
23186 2021-01-03  Bruno Haible  <bruno@clisp.org>
23188         free-posix: Work around GCC mis-optimization bug.
23189         Code by Bernhard Voelker <mail@bernhard-voelker.de>.
23190         * lib/free.c (rpl_free): Add alternative complicated code for GCC.
23192 2021-01-02  Bruno Haible  <bruno@clisp.org>
23194         valgrind-tests: Disable valgrind if it would cause all tests to fail.
23195         Suggested by Simon Josefsson <simon@josefsson.org> in
23196         <https://lists.gnu.org/archive/html/help-gsasl/2021-01/msg00004.html>.
23197         * m4/valgrind-tests.m4 (gl_VALGRIND_TESTS): Test $VALGRIND on an
23198         executable produced by the current compiler. Set VALGRIND to empty if it
23199         does not work. Don't set VALGRIND to empty if it merely does not accept
23200         the --error-exitcode=1 --leak-check=full options.
23202 2021-01-02  Bruno Haible  <bruno@clisp.org>
23204         valgrind-tests: Really enable the valgrind options test.
23205         * m4/valgrind-tests.m4 (gl_VALGRIND_TESTS): Don't assume that the
23206         valgrind options --error-exitcode=1 --leak-check=full always work.
23208 2021-01-02  Bruno Haible  <bruno@clisp.org>
23210         utimensat: Fix test failures on macOS 10.13.
23211         * lib/utimensat.c: Include <string.h>, <sys/stat.h>.
23212         (rpl_utimensat): Check against invalid tv_nsec values. Before calling
23213         utimensat, recognize a filename ending in a slash that does not point
23214         to a directory.
23216 2021-01-02  Bruno Haible  <bruno@clisp.org>
23218         utimens: Fix test failure on macOS 10.13.
23219         * lib/utimens.c: Include <string.h>.
23221         utimens: Fix test failure on macOS 10.13.
23222         * lib/utimens.c (fdutimens): Before calling utimensat, recognize a
23223         filename ending in a slash that does not point to a directory.
23225 2021-01-02  Bruno Haible  <bruno@clisp.org>
23227         utimens: Avoid test failures on macOS 10.13.
23228         Reported by Martin Storsjö <martin@martin.st> in
23229         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00003.html>.
23230         * tests/test-utimens-common.h (check_ctime): Define to -1 on macOS.
23231         * tests/test-utimens.h (test_utimens): Don't expect a ctime change when
23232         only the atime is requested to change.
23233         * tests/test-futimens.h (test_futimens): Likewise.
23234         * tests/test-lutimens.h (test_lutimens): Likewise.
23236 2021-01-02  Bruno Haible  <bruno@clisp.org>
23238         renameatu: Fix test failures on macOS.
23239         Reported by Martin Storsjö <martin@martin.st> in
23240         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00003.html>.
23241         * lib/renameatu.c (renameatu): Don't call renameatx_np right away.
23242         Instead, treat it as a variant of renameat, with all possible bugs that
23243         renameat might have.
23245 2021-01-02  Bruno Haible  <bruno@clisp.org>
23247         getgroups test: Avoid warning with glibc >= 2.32 and gcc >= 10.
23248         Reported by Bernhard Voelker <mail@bernhard-voelker.de> in
23249         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00090.html>.
23250         * tests/test-getgroups.c: Silence gcc warnings of type
23251         -Wstringop-overflow.
23253 2021-01-02  Bruno Haible  <bruno@clisp.org>
23255         timespec_get: Add tests.
23256         * tests/test-timespec_get.c: New file.
23257         * modules/timespec_get-tests: New file.
23259         timespec_get: New module.
23260         * lib/time.in.h (timespec_get): New declaration.
23261         * lib/timespec_get.c: New file.
23262         * m4/timespec_get.m4: New file.
23263         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize
23264         GNULIB_TIMESPEC_GET, HAVE_TIMESPEC_GET.
23265         * modules/time (Makefile.am): Substitute GNULIB_TIMESPEC_GET,
23266         HAVE_TIMESPEC_GET.
23267         * modules/timespec_get: New file.
23268         * tests/test-time-c++.cc (timespec_get): Check signature.
23269         * doc/glibc-functions/timespec_get.texi: Mention the new module.
23271 2021-01-01  Bruno Haible  <bruno@clisp.org>
23273         time: Define TIME_UTC.
23274         * lib/time.in.h (TIME_UTC, GNULIB_defined_TIME_UTC): New macros.
23275         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Set TIME_H_DEFINES_TIME_UTC.
23276         * modules/time (Makefile.am): Substitute TIME_H_DEFINES_TIME_UTC.
23277         * tests/test-time.c: Check that TIME_UTC is defined and a positive
23278         integer.
23279         * doc/posix-headers/time.texi: Mention TIME_UTC.
23281 2021-01-01  Bruno Haible  <bruno@clisp.org>
23283         stddef: Try harder to get max_align_t defined on OpenBSD, part 2.
23284         * modules/stddef (Depends-on): Add extensions.
23286 2021-01-01  Paul Eggert  <eggert@cs.ucla.edu>
23288         canonicalize: remove NARROW_ADDRESSES optimization
23289         * lib/canonicalize-lgpl.c, lib/canonicalize.c (NARROW_ADDRESSES):
23290         Remove, and remove all uses, as the optimization is arguably not
23291         worth the extra complexity.  Suggested by Adhemerval Zanella in:
23292         https://sourceware.org/pipermail/libc-alpha/2020-December/121203.html
23294 2021-01-01  Bruno Haible  <bruno@clisp.org>
23296         stddef: Try harder to get max_align_t defined on OpenBSD.
23297         * m4/stddef_h.m4 (gl_STDDEF_H): Require gl_USE_SYSTEM_EXTENSIONS.
23299 2021-01-01  Bruno Haible  <bruno@clisp.org>
23301         aligned_alloc: Fix test failure on OpenBSD 6.8.
23302         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): On OpenBSD, define
23303         _ISOC11_SOURCE.
23304         * m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Require it. Update
23305         comment.
23307 2021-01-01  Bruno Haible  <bruno@clisp.org>
23309         posixtm tests: Disable part of the test on plaforms where it fails.
23310         * tests/test-posixtm.c (T): Disable two tests on macOS as well.
23312 2021-01-01  Bruno Haible  <bruno@clisp.org>
23314         c32isgraph/c32isprint/c32ispunct tests: Avoid test failures on OmniOS.
23315         * tests/test-c32isgraph.c (main): On Solaris, disable tests that fail on
23316         Solaris 11 OmniOS.
23317         * tests/test-c32isprint.c (main): Likewise.
23318         * tests/test-c32ispunct.c (main): Likewise.
23320 2021-01-01  Paul Eggert  <eggert@cs.ucla.edu>
23322         libc-config: port to Sun C 5.9
23323         * lib/libc-config.h (libc_hidden_proto): Omit ", ..." in macro
23324         definition.  It’s not needed for Gnulib and elicits a diagnostic
23325         from Sun C 5.9 Patch 124867-12 2009/11/22.
23327 2021-01-01  Bruno Haible  <bruno@clisp.org>
23329         quotearg tests: Avoid test failures on Solaris 11.
23330         * modules/quotearg-tests (Makefile.am): Set host_os in
23331         TESTS_ENVIRONMENT.
23332         * tests/test-quotearg.sh: On Solaris 11 systems, make a copy of the fr/
23333         directory that contains the .mo file.
23335 2021-01-01  Bruno Haible  <bruno@clisp.org>
23337         maint: Update copyright notices in --version output.
23338         List the most recent year in which changes were made, per
23339         <https://www.gnu.org/prep/standards/html_node/_002d_002dversion.html>.
23340         * build-aux/declared.sh (func_version): Say 2019.
23341         * build-aux/libtool-next-version (func_version): Likewise.
23342         * build-aux/run-test (func_version): Likewise.
23343         * check-module (COPYRIGHT_NOTICE): Say 2012.
23344         * lib/git-merge-changelog.c (main): Say 2020.
23346 2020-12-31  Paul Eggert  <eggert@cs.ucla.edu>
23348         filename: change filename.h comment to LGPLv2.1+
23349         * lib/filename.h: Change license notice to match what should be in
23350         glibc, and what modules/filename specifies.  This is to simplify
23351         syncing with glibc.
23353         doc: mention year-0 bugs in Solaris etc.
23354         * doc/posix-functions/gmtime.texi, doc/posix-functions/gmtime_r.texi:
23355         * doc/posix-functions/localtime.texi:
23356         * doc/posix-functions/localtime_r.texi:
23357         * doc/posix-functions/mktime.texi:
23358         Mention year-0 bugs in localtime etc.
23360 2020-12-31  Bruno Haible  <bruno@clisp.org>
23362         ptsname_r: Fix test failure on Solaris.
23363         * lib/ptsname_r.c (__ptsname_r) [__sun]: Don't test the major number of
23364         the device.
23366 2020-12-31  Bruno Haible  <bruno@clisp.org>
23368         posixtm tests: Disable part of the test on plaforms where it fails.
23369         * tests/test-posixtm.c (T): Disable two tests on Solaris.
23371 2020-12-31  Bruno Haible  <bruno@clisp.org>
23373         poll tests: Avoid test failure on AIX.
23374         * tests/test-poll.c (test_pipe): Disable the "expecting POLLHUP after
23375         shutdown" test on AIX.
23376         * doc/posix-functions/poll.texi: Mention the AIX bug.
23378 2020-12-31  Bruno Haible  <bruno@clisp.org>
23380         poll tests: Avoid test failure on BSD and Solaris systems.
23381         * tests/test-poll.c (test_accept_first, test_socket_pair): Disable the
23382         "expecting POLLHUP after shutdown" test on all platforms except Linux.
23384 2020-12-31  Paul Eggert  <eggert@cs.ucla.edu>
23386         fnmatch: merge from glibc + proposal
23387         This merges the change proposed by Adhemerval Zanella in:
23388         https://sourceware.org/pipermail/libc-alpha/2020-December/121212.html
23389         which fixes a Gnulib bug that led to a failed assert.
23390         * lib/fnmatch_loop.c (EXT): Use signed level, not unsigned, and
23391         check that it stays nonnegative.  Use __flexarr instead of
23392         FLEXIBLE_ARRAY_MEMBER, to port better to glibc.
23393         * tests/test-fnmatch.c (main): New test cases, taken from glibc.
23395         glob: merge proposed glibc changes
23396         This merges the change proposed by Adhemerval Zanella in:
23397         https://sourceware.org/pipermail/libc-alpha/2020-December/121211.html
23398         * lib/glob.c (__lstat64, __stat64) [_LIBC]: Remove.
23400 2020-12-31  Bruno Haible  <bruno@clisp.org>
23402         memalign: Work around Solaris bug.
23403         * lib/memalign.c: New file.
23404         * m4/memalign.m4: New file.
23405         * modules/memalign (Files): Add them.
23406         (Depends-on): Add malloc-h.
23407         (configure.ac): Invoke gl_FUNC_MEMALIGN. Conditionally compile
23408         memalign.c. Set module indicator.
23409         (Include): Include <malloc.h> unconditionally.
23410         * doc/glibc-functions/memalign.texi: Mention the Solaris issues.
23412         malloc-h: Add tests.
23413         * tests/test-malloc-h.c: New file.
23414         * modules/malloc-h-tests: New file.
23415         * tests/test-malloc-h-c++.cc: New file.
23416         * modules/malloc-h-c++-tests: New file.
23418         malloc-h: New module.
23419         * lib/malloc.in.h: New file.
23420         * m4/malloc_h.m4: New file.
23421         * modules/malloc-h: New file.
23422         * doc/glibc-headers/malloc.texi: New file.
23423         * doc/gnulib.texi (Glibc Header File Substitutes): Include it.
23425 2020-12-31  Bruno Haible  <bruno@clisp.org>
23427         unistd: Fix portability warnings.
23428         * lib/unistd.in.h (fchownat, unlinkat): Fix module name in warning.
23430 2020-12-31  Bruno Haible  <bruno@clisp.org>
23432         utime: Fix compilation error on macOS and Solaris 9 (regr. 2020-12-24).
23433         Reported by Tom G. Christensen <tgc@jupiterrise.com> in
23434         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00295.html>.
23435         * lib/utime.c: Include <errno.h>.
23437 2020-12-30  Karl Berry  <karl@freefriends.org>
23439         config: srclistvars doc.
23440         * config/srclistvars.sh: doc a couple of unusual source repo urls.
23442 2020-12-30  Bruno Haible  <bruno@clisp.org>
23444         getlogin tests, getlogin_r tests: Avoid failure on Solaris OpenIndiana.
23445         * tests/test-getlogin.c (main): Don't fail if getlogin() returns NULL
23446         with no errno.
23447         * tests/test-getlogin_r.c (main): Don't fail if getlogin_r() returns
23448         EINVAL.
23450 2020-12-29  Jim Meyering  <meyering@fb.com>
23452         regex-tests: tweak to avoid a clang-10 warning
23453         * tests/test-regex.c: Compare with explicit zero, rather than
23454         as boolean to avoid this from clang-10:
23455         test-regex.c:315:9: error: converting the result of '<<' to a \
23456           boolean always evaluates to true \
23457           [-Werror,-Wtautological-constant-compare]
23458         if (! REG_STARTEND)
23460         hash: add casts-to-float to avoid clang-10 warnings
23461         * lib/hash.c (compute_bucket_size): Cast SIZE_MAX to float
23462         to avoid this warning from clang-10 (for use in grep):
23463           hash.c:501:11: error: implicit conversion from 'unsigned long' \
23464             to 'float' changes value from 18446744073709551615 to \
23465             18446744073709551616 [-Werror,-Wimplicit-int-float-conversion]
23466           if (SIZE_MAX <= new_candidate)
23467         (hash_insert_if_absent): Likewise.
23469 2020-12-29  Paul Eggert  <eggert@cs.ucla.edu>
23471         canonicalize: fix size overflow treatment
23472         This also has some minor cleanups.
23473         * lib/canonicalize-lgpl.c, lib/canonicalize.c: No need to include
23474         stddef.h, since the code no longer refers directly to ptrdiff_t.
23475         * lib/canonicalize-lgpl.c (realpath_stk):
23476         * lib/canonicalize.c (canonicalize_filename_mode_stk):
23477         Treat size overflow like other out-of-memory.
23478         * lib/canonicalize.c: No need to include stdlib.h, since
23479         the code no longer refers to stdlib.h functions (other
23480         than those that canonicalize.h must declare).
23481         * lib/canonicalize.c (canonicalize_filename_mode_stk):
23482         Do not bother terminating the string result on error.
23484 2020-12-29  Bruno Haible  <bruno@clisp.org>
23486         list-c++, [o]map-c++, [o]set-c++: Fix conflict with 'free-posix' module.
23487         * lib/gl_list.hh: Include <stdlib.h>.
23488         * lib/gl_map.hh: Likewise.
23489         * lib/gl_omap.hh: Likewise.
23490         * lib/gl_set.hh: Likewise.
23491         * lib/gl_oset.hh: Likewise.
23493 2020-12-29  Paul Eggert  <eggert@cs.ucla.edu>
23495         canonicalize: fix ptrdiff_t overflow bug
23496         Problem reported by Adhemerval Zanella in:
23497         https://sourceware.org/pipermail/libc-alpha/2020-December/121182.html
23498         * lib/canonicalize-lgpl.c, lib/canonicalize.c:
23499         Include intprops.h.
23500         (NARROW_ADDRESSES): New constant.
23501         * lib/canonicalize-lgpl.c (realpath_stk):m
23502         * lib/canonicalize.c (canonicalize_filename_mode_stk):
23503         Work even if strlen (END) does not fit in idx_t, or if adding
23504         N to it overflows.
23505         * modules/canonicalize, modules/canonicalize-lgpl (Depends-on):
23506         Add intprops.
23508 2020-12-28  Bruno Haible  <bruno@clisp.org>
23510         havelib: Fix for Solaris 11 OpenIndiana and Solaris 11 OmniOS.
23511         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): In
23512         acl_is_expected_elfclass, use 'expr', not 'test'.
23514 2020-12-28  Bruno Haible  <bruno@clisp.org>
23516         ptsname_r: Fix a compiler warning on Solaris.
23517         * lib/ptsname_r.c (__ptsname_r): Reduce the scope of variable 'err'.
23519 2020-12-28  Bruno Haible  <bruno@clisp.org>
23521         gnulib-tool: Fix logic whether to add a dummy.c.
23522         * gnulib-tool (func_remove_if_blocks): New function.
23523         (func_modules_add_dummy): Use it to eliminate all conditional statements
23524         from the automake snippet.
23526 2020-12-28  Paul Eggert  <eggert@cs.ucla.edu>
23528         faccessat: revert recent EOVERFLOW change
23529         I misunderstood the glibc source code.  Deduced from
23530         Adhemerval Zanella’s proposed glibc patch in:
23531         https://sourceware.org/pipermail/libc-alpha/2020-December/121131.html
23532         * doc/posix-functions/faccessat.texi: It is not a problem.
23533         * lib/canonicalize-lgpl.c, lib/canonicalize.c, lib/faccessat.c:
23534         (FACCESSAT_NEVER_OVERFLOWS): Remove. All uses removed.
23535         * lib/faccessat.c: Revert to simpler version now that
23536         LSTAT_FOLLOWS_SLASHED_SYMLINK must be false.
23537         * m4/faccessat.m4 (gl_FUNC_FACCESSAT_EOVERFLOW):
23538         Remove.  All uses removed.
23539         * modules/canonicalize, modules/canonicalize-lgpl (Files):
23540         Remove m4/faccessat.m4.
23542         canonicalize-lgpl: accommodate picky cpp
23543         * lib/canonicalize-lgpl.c: Use "defined FUNC_REALPATH_WORKS" in
23544         case preprocessor is picky.  Reported by Adhemerval Zanella in:
23545         https://sourceware.org/pipermail/libc-alpha/2020-December/121130.html
23547         canonicalize: simplify via scratch_buffer_dupfree
23548         * config/srclist.txt: Adjust accordingly.
23549         * lib/canonicalize-lgpl.c (realpath_stk):
23550         * lib/canonicalize.c (canonicalize_filename_mode_stk):
23551         Simplify by using scratch_buffer_dupfree.
23552         * lib/malloc/scratch_buffer.h (scratch_buffer_dupfree): New function.
23553         * lib/malloc/scratch_buffer_dupfree.c: New file.
23554         * modules/scratch_buffer (Files, Depends-on):
23555         Add malloc/scratch_buffer_dupfree.c.
23557 2020-12-27  Paul Eggert  <eggert@cs.ucla.edu>
23559         regex: remove glibc21.m4
23560         It doesn’t seem to be needed any more; at least, I couldn’t
23561         reproduce the circa-2013 problem.  Perhaps the recent
23562         --conditional-dependencies fixes have removed the need for it.
23563         * m4/glibc21.m4: Remove.  All uses removed.
23565 2020-12-26  Bruno Haible  <bruno@clisp.org>
23567         gnulib-tool: Make --conditional-dependencies work with --with-tests.
23568         Reported by Paul Eggert in
23569         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00236.html>.
23570         * gnulib-tool (func_emit_tests_Makefile_am): Handle conditional
23571         dependencies like func_emit_lib_Makefile_am.
23573 2020-12-26  Bruno Haible  <bruno@clisp.org>
23575         execvpe: Make dependency to stdbool explicit.
23576         * lib/execvpe.c: Include <stdbool.h>.
23577         * modules/execvpe (Depends-on): Add stdbool.
23579         execlp: Add tests.
23580         * tests/test-execlp-main.c: New file.
23581         * tests/test-execlp.sh: New file.
23582         * modules/execlp-tests: New file.
23584         execlp: New module.
23585         * lib/execlp.c: New file.
23586         * m4/execlp.m4: New file.
23587         * modules/execlp: New file.
23588         * doc/posix-functions/execlp.texi: Mention more Windows problems and the
23589         new module.
23591         execle: Add tests.
23592         * tests/test-execle-main.c: New file.
23593         * tests/test-execle.sh: New file.
23594         * modules/execle-tests: New file.
23596         execle: New module.
23597         * lib/execle.c: New file.
23598         * m4/execle.m4: New file.
23599         * modules/execle: New file.
23600         * doc/posix-functions/execle.texi: Mention more Windows problems and the
23601         new module.
23603         execl: Add tests.
23604         * tests/test-execl-main.c: New file.
23605         * tests/test-execl.sh: New file.
23606         * modules/execl-tests: New file.
23608         execl: New module.
23609         * lib/execl.c: New file.
23610         * m4/execl.m4: New file.
23611         * modules/execl: New file.
23612         * doc/posix-functions/execl.texi: Mention more Windows problems and the
23613         new module.
23615         execv: Add tests.
23616         * tests/test-execv-main.c: New file.
23617         * tests/test-execv.sh: New file.
23618         * modules/execv-tests: New file.
23620         execv: New module.
23621         * lib/execv.c: New file.
23622         * m4/execv.m4: New file.
23623         * modules/execv: New file.
23624         * doc/posix-functions/execv.texi: Mention more Windows problems and the
23625         new module.
23627         execvp: Add tests.
23628         * tests/test-execvp-main.c: New file.
23629         * tests/test-execvp.sh: New file.
23630         * modules/execvp-tests: New file.
23632         execvp: New module.
23633         * lib/execvp.c: New file.
23634         * m4/execvp.m4: New file.
23635         * modules/execvp: New file.
23636         * doc/posix-functions/execvp.texi: Mention more Windows problems and the
23637         new module.
23639         execvpe: Add tests.
23640         * tests/test-execvpe-main.c: New file.
23641         * tests/test-execvpe.sh: New file.
23642         * modules/execvpe-tests: New file.
23644         execvpe: New module.
23645         * lib/execvpe.c: New file.
23646         * m4/execvpe.m4: New file.
23647         * modules/execvpe: New file.
23648         * doc/glibc-functions/execvpe.texi: Mention the Windows problems and the
23649         new module.
23651         execve: Add tests.
23652         * tests/test-exec-child.c: New file.
23653         * tests/test-execve-main.c: New file.
23654         * tests/test-execve.sh: New file.
23655         * modules/execve-tests: New file.
23657         execve: New module.
23658         * lib/execve.c: New file.
23659         * m4/execve.m4: New file.
23660         * modules/execve: New file.
23661         * doc/posix-functions/execve.texi: Mention more Windows problems and the
23662         new module.
23664         execve, execvpe, execvp, execv, execl, execle, execlp: Prepare modules.
23665         * lib/unistd.in.h (execl, execle, execlp, execv, execve, execvp,
23666         execvpe): Add declarations for the new modules.
23667         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether execl, execle, execlp,
23668         execv, execve, execvp, execvpe are declared.
23669         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_EXEC*, HAVE_EXECVPE,
23670         REPLACE_EXEC*.
23671         * modules/unistd (Makefile.am): Substitute GNULIB_EXEC*, HAVE_EXECVPE,
23672         REPLACE_EXEC*.
23673         * tests/test-unistd-c++.cc: Check the signature of execl, execle,
23674         execlp, execv, execve, execvp, execvpe.
23676 2020-12-26  Bruno Haible  <bruno@clisp.org>
23678         stack: Fix typo in comments.
23679         * lib/stack.h: Fix typo in comments.
23681 2020-12-26  Bruno Haible  <bruno@clisp.org>
23683         bitset: Fix conflict with 'free-posix' module.
23684         * lib/bitset/base.h: Include <stdlib.h>.
23686 2020-12-25  Paul Eggert  <eggert@cs.ucla.edu>
23688         idx: change idx.h comment to LGPLv2.1+
23689         * lib/idx.h: Change license notice to match what should be in glibc.
23690         gnulib-tool will change it as appropriate anyway, so this is just
23691         to simplify syncing with glibc.
23693 2020-12-25  Thien-Thi Nguyen  <ttn@gnu.org>
23695         MODULES.html.sh: Update after 2020-12-19 change.
23696         * MODULES.html.sh (func_all_modules): Do s/free/free-posix/.
23698 2020-12-25  Bruno Haible  <bruno@clisp.org>
23700         Make it possible to turn off the mkdir override on Windows.
23701         * lib/sys_stat.in.h (mkdir): Conditionalize through GNULIB_MKDIR and
23702         GNULIB_MDA_MKDIR. Also support GNULIB_POSIXCHECK.
23703         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize GNULIB_MKDIR,
23704         GNULIB_MDA_MKDIR.
23705         * modules/sys_stat (Makefile.am): Substitute GNULIB_MKDIR,
23706         GNULIB_MDA_MKDIR.
23707         * modules/mkdir (configure.ac): Invoke gl_SYS_STAT_MODULE_INDICATOR.
23708         * doc/posix-functions/mkdir.texi: Mention also the 'sys_stat' module.
23710         Make it possible to turn off each of the Windows oldnames workarounds.
23711         * lib/fcntl.in.h (creat, open):  Conditionalize each of the Windows
23712         oldnames workarounds through a GNULIB_MDA_<func> symbol.
23713         * lib/math.in.h (j0, j1, jn, y0, y1, yn): Likewise.
23714         * lib/search.in.h (lfind, lsearch): Likewise.
23715         * lib/stdio.in.h (fcloseall, fdopen, fileno, getw, putw, tempnam):
23716         Likewise.
23717         * lib/stdlib.in.h (ecvt, fcvt, gcvt, mktemp, putenv): Likewise.
23718         * lib/string.in.h (memccpy, strdup): Likewise.
23719         * lib/sys_stat.in.h (chmod, umask): Likewise.
23720         * lib/time.in.h (tzset): Likewise.
23721         * lib/unistd.in.h (access, chdir, close, dup, dup2, execl, execle,
23722         execlp, execv, execve, execvp, execvpe, getcwd, getpid, isatty, lseek,
23723         read, rmdir, swab, unlink, write): Likewise.
23724         * lib/utime.in.h (utime): Likewise.
23725         * lib/wchar.in.h (wcsdup): Likewise.
23726         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Initialize these
23727         GNULIB_MDA_<func> symbols.
23728         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Likewise.
23729         * m4/search_h.m4 (gl_SEARCH_H_DEFAULTS): Likewise.
23730         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
23731         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Likewise.
23732         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Likewise.
23733         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Likewise.
23734         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Likewise.
23735         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Likewise.
23736         * m4/utime_h.m4 (gl_UTIME_H_DEFAULTS): Likewise.
23737         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Likewise.
23738         * modules/fcntl-h (Makefile.am): Substitute these GNULIB_MDA_<func>
23739         symbols.
23740         * modules/math (Makefile.am): Likewise.
23741         * modules/search (Makefile.am): Likewise.
23742         * modules/stdio (Makefile.am): Likewise.
23743         * modules/stdlib (Makefile.am): Likewise.
23744         * modules/string (Makefile.am): Likewise.
23745         * modules/sys_stat (Makefile.am): Likewise.
23746         * modules/time (Makefile.am): Likewise.
23747         * modules/unistd (Makefile.am): Likewise.
23748         * modules/utime-h (Makefile.am): Likewise.
23749         * modules/wchar (Makefile.am): Likewise.
23751 2020-12-24  Paul Eggert  <eggert@cs.ucla.edu>
23753         canonicalize, canonicalize-lgpl: remove lint
23754         Pacify GCC.  Some of these problems were reported by Bruno Haible in:
23755         https://lists.gnu.org/r/bug-gnulib/2020-12/msg00217.html
23756         * lib/canonicalize-lgpl.c, lib/canonicalize.c:
23757         Sort shared include directives, for consistency.
23758         (IF_LINT): New macro.
23759         (suffix_requires_dir_check): Mark with _GL_ATTRIBUTE_PURE.
23760         * lib/canonicalize-lgpl.c (GCC_LINT, _GL_ATTRIBUTE_PURE) [_LIBC]:
23761         New macros.
23762         (realpath_stk): Suppress bogus -Wmaybe-uninitialized warning.
23763         * lib/canonicalize.c (canonicalize_filename_mode_stk):
23764         Omit unused local.  Suppress bogus -Wmaybe-uninitialized warning.
23766 2020-12-24  Bruno Haible  <bruno@clisp.org>
23768         spawn-pipe: Use posix_spawn by default on native Windows.
23769         * lib/spawn-pipe.c (SPAWN_PIPE_IMPL_AVOID_POSIX_SPAWN): New macro.
23770         (create_pipe): Use it to decide among the two possible implementations.
23771         * modules/spawn-pipe (Depends-on): Add posix_spawnattr_setpgroup.
23773 2020-12-24  Bruno Haible  <bruno@clisp.org>
23775         unistd-safer: Implement pipe_safer on native Windows.
23776         * lib/pipe-safer.c (pipe_safer): Don't test HAVE_PIPE.
23777         * modules/unistd-safer (Depends-on): Add pipe-posix.
23779 2020-12-24  Bruno Haible  <bruno@clisp.org>
23781         execute: Use posix_spawn by default on native Windows.
23782         * lib/execute.c (EXECUTE_IMPL_AVOID_POSIX_SPAWN): New macro.
23783         (execute): Use it to decide among the two possible implementations.
23785 2020-12-24  Paul Eggert  <eggert@cs.ucla.edu>
23787         canonicalize-lgpl: merge proposed libc changes
23788         This merges the changes proposed for glibc in:
23789         https://sourceware.org/pipermail/libc-alpha/2020-December/121085.html
23790         https://sourceware.org/pipermail/libc-alpha/2020-December/121086.html
23791         * lib/canonicalize-lgpl.c: Include idx.h and filename.h
23792         unconditionally.
23793         (idx_t, IDX_MAX, FILE_SYSTEM_PREFIX_LEN, IS_ABSOLUTE_FILE_NAME)
23794         (ISSLASH) [_LIBC]: Remove.
23796 2020-12-24  Bruno Haible  <bruno@clisp.org>
23798         posix_spawn-internal: Implement for native Windows.
23799         * lib/spawni.c (grow_inheritable_handles, shrink_inheritable_handles,
23800         close_inheritable_handles, memiszero, sigisempty, open_handle, do_open,
23801         do_dup2, do_close): New functions.
23802         (__spawni): Implement on native Windows.
23803         * modules/posix_spawn-internal (Depends-on): Add filename,
23804         concat-filename, findprog-in, malloca, windows-spawn.
23805         * doc/posix-functions/posix_spawn.texi: Update.
23806         * doc/posix-functions/posix_spawnp.texi: Likewise.
23808 2020-12-24  Bruno Haible  <bruno@clisp.org>
23810         windows-spawn: Export another auxiliary function.
23811         * lib/windows-spawn.h (convert_CreateProcess_error): New declaration.
23812         * lib/windows-spawn.c (convert_CreateProcess_error): New function,
23813         extracted from spawnpvech.
23814         (spawnpvech): Use it.
23816 2020-12-24  Bruno Haible  <bruno@clisp.org>
23818         windows-spawn: Export some more auxiliary functions.
23819         * lib/windows-spawn.h: Include <stdbool.h>.
23820         (struct inheritable_handles): New type.
23821         (init_inheritable_handles, compose_handles_block,
23822         free_inheritable_handles): New declarations.
23823         * lib/windows-spawn.c (init_inheritable_handles, compose_handles_block):
23824         New functions, based on spawnvech.
23825         (free_inheritable_handles): New function.
23826         (spawnpvech): Use them.
23828 2020-12-24  Bruno Haible  <bruno@clisp.org>
23830         windows-spawn: Export another auxiliary function.
23831         * lib/windows-spawn.h (compose_envblock): New declaration.
23832         * lib/windows-spawn.c (compose_envblock): New function, extracted from
23833         spawnpvech.
23834         (spawnpvech): Use it.
23836 2020-12-24  Bruno Haible  <bruno@clisp.org>
23838         windows-spawn: Export an auxiliary function.
23839         * lib/windows-spawn.h (compose_command): New declaration.
23840         * lib/windows-spawn.c (compose_command): New function, extracted from
23841         spawnpvech.
23842         (spawnpvech): Use it.
23844 2020-12-24  Bruno Haible  <bruno@clisp.org>
23846         posix_spawn* tests: Add support for native Windows.
23847         * tests/test-posix_spawn-open1.c (DATA_FILENAME): Treat native Windows
23848         like Cygwin.
23849         * tests/test-posix_spawn-dup2-stdin.c (main): Don't assume the signals
23850         SIGHUP and SIGPIPE. On native Windows, don't call
23851         posix_spawnattr_setsigmask.
23852         * tests/test-posix_spawn-dup2-stdout.c (main): Likewise.
23853         * tests/test-posix_spawn-fchdir.c (main): Likewise.
23854         * tests/test-posix_spawn-chdir.c (test): Likewise. Accept the child
23855         output from Cygwin's 'pwd' program.
23856         * tests/test-posix_spawn-script.c (main): On native Windows, skip the
23857         executable-shell-script part of the test.
23858         * tests/test-posix_spawnp-script.c (main): Likewise.
23859         * modules/posix_spawn-tests (Depends-on): Add freopen, waitpid.
23860         (configure.ac): Don't define the POSIX_SPAWN_PORTED conditional.
23861         (Makefile.am): Don't test the POSIX_SPAWN_PORTED conditional.
23862         * modules/posix_spawnp-tests (Depends-on): Add  waitpid.
23863         (configure.ac): Don't define the POSIX_SPAWN_PORTED conditional.
23864         (Makefile.am): Don't test the POSIX_SPAWN_PORTED conditional.
23865         * modules/posix_spawn_file_actions_addchdir-tests (Makefile.am): Don't
23866         test the POSIX_SPAWN_PORTED conditional.
23867         * modules/posix_spawn_file_actions_addfchdir-tests (configure.ac):
23868         Define the POSIX_SPAWN_PORTED conditional here.
23870 2020-12-24  Bruno Haible  <bruno@clisp.org>
23872         sh-filename: Add support for native Windows.
23873         * m4/sh-filename.m4 (gl_SH_FILENAME): Treat native Windows like Cygwin.
23875 2020-12-24  Paul Eggert  <eggert@cs.ucla.edu>
23877         careadlinkat: improve warning line number
23878         This propagates an idea first used in canonicalize-lgpl.
23879         * lib/careadlinkat.c (GCC_BOGUS_WRETURN_LOCAL_ADDR):
23880         New macro.
23881         (careadlinkat): Use it.
23883         linkat: use eloop-threshold
23884         * lib/linkat.c: Include eloop-threshold.h.
23885         Do not include sys/param.h.
23886         (MAXSYMLINKS): Remove.
23887         (link_follow, linkat_follow): Use __eloop_threshold instead
23888         of MAXSYMLINKS.
23889         * m4/linkat.m4 (gl_FUNC_LINKAT): Omit sys/param.h check.
23890         * modules/linkat (Depends-on): Add eloop-threshold.  Sort.
23892         canonicalize-lgpl: use eloop-threshold
23893         * lib/canonicalize-lgpl.c [!_LIBC]: Include eloop-threshold.h.
23894         (MAXSYMLINKS, __eloop_threshold): Remove.
23895         * modules/canonicalize-lgpl (Depends-on): Add eloop-threshold.
23897         eloop-threshold: new module
23898         * config/srclist.txt: Add a comment about it.
23899         * lib/eloop-threshold.h, modules/eloop-threshold: New files.
23901         canonicalize: prefer faccessat to stat
23902         A proper faccessat doesn't have the EOVERFLOW problem, and can be
23903         more efficient as it needn't gather data from the filesystem to
23904         fill in struct stat.  So use stat only if faccessat is absent,
23905         or when checking for symlink loops in canonicalize.c.
23906         * lib/canonicalize-lgpl.c, lib/canonicalize.c:
23907         Include fcntl.h, for AT_EACCESS.
23908         (FACCESSAT_NEVER_EOVERFLOWS): Default to false.
23909         (file_accessible): New function, based on faccessat but with
23910         a fallback to stat and with an EOVERFLOW workaround.
23911         (dir_check): Use it.
23912         (dir_suffix): New static constant.
23913         * lib/canonicalize-lgpl.c (FACCESSAT_NEVER_EOVERFLOWS) [_LIBC]:
23914         Use __ASSUME_FACCESSAT2 to set FACCESSAT_NEVER_EOVERFLOWS
23915         (__faccessat) [!_LIBC]: Define.
23916         (realpath_stk): Use dir_suffix now.
23917         * lib/canonicalize.c (canonicalize_filename_mode_stk):
23918         If logical, don't check each component's existence; just check
23919         at the end, as that's enough.
23920         * m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE)
23921         (gl_CANONICALIZE_LGPL_SEPARATE):
23922         Require gl_FUNC_FACCESSAT_EOVERFLOW,
23923         gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, and check for faccessat.
23924         (gl_CANONICALIZE_LGPL_SEPARATE): Do not check for readlink,
23925         as the code does not use HAVE_READLINK.
23926         * modules/canonicalize, modules/canonicalize-lgpl (Files):
23927         Add m4/faccessat.m4, m4/lstat.m4.
23928         (Depends-on): Add fcntl-lh.
23930         faccessat: work around F_OK EOVERFLOW bug
23931         * doc/posix-functions/faccessat.texi: Mention the problem.
23932         * lib/faccessat.c (FACCESSAT_NEVER_EOVERFLOWS): Default to 0.
23933         (rpl_faccessat): If !FACCESSAT_NEVER_EOVERFLOWS, check
23934         for F_OK and EOVERFLOW, which means we can return 0.
23935         * m4/faccessat.m4 (gl_FUNC_FACCESSAT_EOVERFLOW): New macro.
23936         (gl_FUNC_FACCESSAT): Use it.
23938         stat failing with EOVERFLOW implies existence
23939         * lib/euidaccess.c (euidaccess):
23940         * lib/file-has-acl.c (file_has_acl):
23941         * lib/link.c (link, rpl_link):
23942         * lib/mkdir.c (rpl_mkdir):
23943         * lib/mkfifo.c (rpl_mkfifo):
23944         * lib/mknod.c (rpl_mknod):
23945         * lib/ptsname_r.c (__ptsname_r):
23946         * lib/symlink.c (rpl_symlink):
23947         * lib/symlinkat.c (rpl_symlinkat):
23948         * lib/unlink.c (rpl_unlink):
23949         * lib/unlinkat.c (rpl_unlinkat):
23950         * lib/utime.c (utime):
23951         If stat fails with EOVERFLOW the file exists, so treat it that way
23952         in file-existence tests that do not need struct stat values.
23954         canonicalize-lgpl: remove freea macro
23955         * lib/canonicalize-lgpl.c (freea) [_LIBC]: Remove; not needed.
23957         canonicalize, canonicalize-lgpl: fix symlink bug
23958         Problem reported by Adhemerval Zanella in:
23959         https://lists.gnu.org/r/bug-gnulib/2020-12/msg00155.html
23960         * lib/canonicalize-lgpl.c, lib/canonicalize.c:
23961         (suffix_requires_dir_check, dir_check): New functions.
23962         (GCC_BOGUS_WRETURN_LOCAL_ADDR): New macro, to put the diagnostic
23963         closer to the related GCC diagnostics.
23964         * lib/canonicalize-lgpl.c (realpath_stk):
23965         * lib/canonicalize.c (canonicalize_file_mode_stk):
23966         Use them to fix a bug with .../symlink-to-regular-file/ etc.
23967         * lib/canonicalize-lgpl.c (__stat) [!_LIBC]: New macro.
23968         (realpath_stk): New function,
23969         with the contents of the old __realpath and a new scratch buffer arg.
23970         This is needed to pacify GCC 10.1, as canonicalize.c is already doing.
23971         (__realpath): Use it.
23972         * tests/test-canonicalize-lgpl.c, tests/test-canonicalize.c:
23973         Add test cases for the bugs.
23975 2020-12-24  Bruno Haible  <bruno@clisp.org>
23977         execute: Treat signalled processes like wait-process does.
23978         * lib/execute.c: Include <sys/types.h>, <sys/wait.h>.
23979         (execute): Recognize the case where the exit code indicates a signalled
23980         child process.
23981         * tests/test-execute-main.c (main): Update expected test result.
23982         * modules/execute (Depends-on): Add sys_wait.
23984 2020-12-24  Bruno Haible  <bruno@clisp.org>
23986         windows-spawn: Improve errno upon failure on native Windows.
23987         * lib/windows-spawn.c (spawnpvech): Map the CreateProcess errors
23988         ERROR_BAD_FORMAT and ERROR_BAD_EXE_FORMAT to ENOEXEC.
23989         * tests/executable-script.sh: New file.
23990         * tests/test-posix_spawn-script.c (main): Also try executing
23991         executable-script.sh.
23992         * tests/test-posix_spawnp-script.c (main): Likewise.
23993         * tests/test-execute-script.c (main): Likewise.
23994         * tests/test-spawn-pipe-script.c (main): Likewise.
23995         * modules/posix_spawn-tests (Files): Add tests/executable-script.sh.
23996         * modules/posix_spawnp-tests (Files): Likewise.
23997         * modules/execute-tests (Files): Likewise.
23998         * modules/spawn-pipe-tests (Files): Likewise.
24000 2020-12-24  Bruno Haible  <bruno@clisp.org>
24002         findprog-in: Improve errno upon failure on native Windows.
24003         * lib/findprog-in.c (find_in_given_path): If the file basename has no
24004         dot and the search with a suffix returned no result, do also a search
24005         without a suffix, and set errno = ENOEXEC if we find a file in this way.
24006         * tests/test-spawn-pipe-script.c (main): Update expected errno.
24008 2020-12-23  Bruno Haible  <bruno@clisp.org>
24010         posix_spawn, posix_spawnp: Fix execution of scripts.
24011         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_SECURE): New macro.
24012         (gl_POSIX_SPAWN_BODY): Invoke it. Set REPLACE_POSIX_SPAWN if posix_spawn
24013         or posix_spawnp allows unsecure execution of scripts.
24014         * doc/posix-functions/posix_spawn.texi: Document the script execution
24015         problem.
24016         * doc/posix-functions/posix_spawnp.texi: Likewise.
24018 2020-12-23  Bruno Haible  <bruno@clisp.org>
24020         Add unit tests regarding execution of scripts.
24021         * tests/executable-script: New file.
24022         * tests/executable-shell-script: New file.
24023         * tests/test-posix_spawn-script.c: New file.
24024         * tests/test-posix_spawnp-script.c: New file.
24025         * tests/test-execute-script.c: New file.
24026         * tests/test-spawn-pipe-script.c: New file.
24027         * modules/posix_spawn-tests (Files): Add
24028         tests/test-posix_spawn-script.c, tests/executable-script,
24029         tests/executable-shell-script.
24030         (Makefile.am): Compile and run test-posix_spawn-script.
24031         * modules/posix_spawnp-tests (Files): Add
24032         tests/test-posix_spawnp-script.c, tests/executable-script,
24033         tests/executable-shell-script.
24034         (Makefile.am): Compile and run test-posix_spawnp-script.
24035         * modules/execute-tests (Files): Add tests/test-execute-script.c,
24036         tests/executable-script, tests/executable-shell-script.
24037         (Makefile.am): Compile and run test-execute-script.
24038         * modules/spawn-pipe-tests (Files): Add tests/test-spawn-pipe-script.c,
24039         tests/executable-script, tests/executable-shell-script.
24040         (Makefile.am): Compile and run test-spawn-pipe-script.
24042 2020-12-23  Bruno Haible  <bruno@clisp.org>
24044         Don't execute scripts without '#!' marker through /bin/sh.
24045         This reflects the change done in glibc through
24046         <https://sourceware.org/bugzilla/show_bug.cgi?id=13134> and
24047         <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=d96de9634a334af16c0ac711074c15ac1762b23c>.
24048         * lib/spawni.c (internal_function): Remove macro.
24049         (script_execute): Remove function.
24050         (__spawni): Don't invoke script_execute.
24051         * lib/execute.c (execute): Disable the ENOEXEC handling.
24052         * lib/spawn-pipe.c (create_pipe): Likewise.
24053         * NEWS: Mention the change.
24055 2020-12-23  Bruno Haible  <bruno@clisp.org>
24057         posix_spawn[p]: Fix compilation error on Windows (regr. 2020-12-14).
24058         Reported by Adrian Ebeling <devl@adrian-ebeling.de> in
24059         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00189.html>.
24060         * lib/spawni.c (__spawni): Update function parameters.
24062 2020-12-23  Bruno Haible  <bruno@clisp.org>
24064         posix_spawn tests: Add two more tests.
24065         * tests/test-posix_spawn-inherit0.c: New file, based on
24066         tests/test-posix_spawn-open2.c.
24067         * tests/test-posix_spawn-inherit1.c: New file, based on
24068         tests/test-posix_spawn-open2.c.
24069         * modules/posix_spawn-tests (Files): Add them.
24070         (Depends-on): Add fflush.
24071         (Makefile.am): Compile and run test-posix_spawn-inherit0 and
24072         test-posix_spawn-inherit1.
24074 2020-12-23  Bruno Haible  <bruno@clisp.org>
24076         posix_spawn tests: Add another test.
24077         * tests/test-posix_spawn-open2.c: New file, based on
24078         tests/test-posix_spawn-open1.c.
24079         * modules/posix_spawn-tests (Files): Add it.
24080         (Makefile.am): Compile and run test-posix_spawn-open1.
24082 2020-12-20  Bruno Haible  <bruno@clisp.org>
24084         Remove support for broken <wchar.h> in AIX 3.
24085         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify test programs.
24087 2020-12-20  Bruno Haible  <bruno@clisp.org>
24089         Remove support for broken <wchar.h> in BSD/OS and OSF/1.
24090         * lib/wchar.in.h: Don't include <stdio.h>, <time.h>.
24091         * lib/mbchar.h: Likewise.
24092         * lib/mbiter.h: Likewise.
24093         * lib/mbuiter.h: Likewise.
24094         * m4/stdint.m4 (gl_STDINT_INCLUDES): Likewise.
24095         * lib/mbfile.h: Don't include <time.h>.
24096         * lib/mbswidth.h: Update comment.
24097         * lib/stdint.in.h: Don't include <stddef.h>, <stdio.h>, <time.h> before
24098         <wchar.h>.
24099         * lib/wctype.in.h: Likewise.
24100         * m4/btowc.m4 (gl_FUNC_BTOWC): Simplify test programs.
24101         * m4/iswblank.m4 (gl_FUNC_ISWBLANK): Likewise.
24102         * m4/iswdigit.m4 (gl_FUNC_ISWDIGIT): Likewise.
24103         * m4/iswxdigit.m4 (gl_FUNC_ISWXDIGIT): Likewise.
24104         * m4/mbrlen.m4 (gl_FUNC_MBRLEN, gl_MBRLEN_INCOMPLETE_STATE,
24105         gl_MBRLEN_RETVAL, gl_MBRLEN_NUL_RETVAL): Likewise.
24106         * m4/mbrtoc32.m4 (gl_MBRTOC32_SANITYCHECK): Likewise.
24107         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC, gl_MBRTOWC_INCOMPLETE_STATE,
24108         gl_MBRTOWC_SANITYCHECK, gl_MBRTOWC_NULL_ARG1, gl_MBRTOWC_NULL_ARG2,
24109         gl_MBRTOWC_RETVAL, gl_MBRTOWC_NUL_RETVAL, gl_MBRTOWC_STORES_INCOMPLETE,
24110         AC_FUNC_MBRTOWC): Likewise.
24111         * m4/mbsinit.m4 (gl_FUNC_MBSINIT): Likewise.
24112         * m4/mbsnrtowcs.m4 (gl_MBSNRTOWCS_WORKS_IN_TRADITIONAL_LOCALE):
24113         Likewise.
24114         * m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS, gl_MBSRTOWCS_WORKS): Likewise.
24115         * m4/mbstate_t.m4 (AC_TYPE_MBSTATE_T): Likewise.
24116         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
24117         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LS): Likewise.
24118         * m4/wchar_h.m4 (gl_WCHAR_H, gl_WCHAR_H_INLINE_OK): Likewise.
24119         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.
24120         * m4/wcsdup.m4 (gl_FUNC_WCSDUP): Likewise.
24121         * m4/wcsnrtombs.m4 (gl_WCSNRTOMBS_WORKS_IN_TRADITIONAL_LOCALE):
24122         Likewise.
24123         * m4/wcsrtombs.m4 (gl_FUNC_WCSRTOMBS, gl_WCSRTOMBS_TERMINATION,
24124         gl_WCSRTOMBS_NULL): Likewise.
24125         * m4/wcstok.m4 (gl_FUNC_WCSTOK): Likewise.
24126         * m4/wctob.m4 (gl_FUNC_WCTOB): Likewise.
24127         * m4/wctype_h.m4 (gl_WCTYPE_H): Likewise.
24128         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
24129         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
24130         * m4/wmemchr.m4 (gl_FUNC_WMEMCHR): Likewise.
24131         * m4/wmemcmp.m4 (gl_FUNC_WMEMCMP): Likewise.
24132         * m4/wmemcpy.m4 (gl_FUNC_WMEMCPY): Likewise.
24133         * m4/wmemmove.m4 (gl_FUNC_WMEMMOVE): Likewise.
24134         * m4/wmemset.m4 (gl_FUNC_WMEMSET): Likewise.
24136 2020-12-20  Bruno Haible  <bruno@clisp.org>
24138         isnanf: Fix autoconf test.
24139         * m4/isnanf.m4 (gl_ISNANF_WORKS): Fix one of the NaN tests.
24141 2020-12-20  Bruno Haible  <bruno@clisp.org>
24143         Remove some of the support for obsolete IRIX 4 and 5.
24144         * m4/mountlist.m4 (AC_FUNC_GETMNTENT): Don't test for getmntent in
24145         libsun.
24146         * tests/init.sh (setup_): Don't talk about IRIX 5.
24148 2020-12-20  Bruno Haible  <bruno@clisp.org>
24150         filemode: Remove Cray support.
24151         * lib/filemode.c (IS_MIGRATED_FILE): Remove macro.
24152         (filemodestring): Don't produce an 'M' type.
24153         * m4/filemode.m4 (gl_FILEMODE): Don't invoke AC_STRUCT_ST_DM_MODE.
24154         * m4/st_dm_mode.m4: Remove file.
24155         * modules/filemode (Files): Remove it.
24157 2020-12-20  Paul Eggert  <eggert@cs.ucla.edu>
24159         free-posix: assume glibc 2.33 fixes this.
24160         * m4/free.m4 (gl_FUNC_FREE): Assume glibc 2.33+ is fixed.
24161         Use compile-time test rather than guessing for cross-builds.
24163 2020-12-20  Bruno Haible  <bruno@clisp.org>
24165         backupfile: Fix compilation error on native Windows (regr. 2018-10-23).
24166         Reported by Adrian Ebeling <adrianebeling@gmx.de> in
24167         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00156.html>.
24168         * lib/backupfile.c (fpathconf): Define fallback, like for pathconf.
24170 2020-12-20  Bruno Haible  <bruno@clisp.org>
24172         float: Fix compilation error when gnulib's float.h exists twice.
24173         Reported by Santiago Vila <sanvila@unex.es>.
24174         * lib/float.in.h (GNULIB_defined_long_double_union): New macro.
24176 2020-12-19  Bruno Haible  <bruno@clisp.org>
24178         free-posix: Assume future POSIX compliance only on OpenBSD and Solaris.
24179         * m4/free.m4 (gl_FUNC_FREE): Guess yes only on OpenBSD and Solaris.
24180         Don't trust _POSIX_VERSION for this test.
24182 2020-12-19  Paul Eggert  <eggert@cs.ucla.edu>
24184         free-posix: port to GNU/Linux
24185         * m4/free.m4 (gl_FUNC_FREE): Don’t assume GNU hosts are free of
24186         the bug, as it occurs on Ubuntu 20.10 x86-64 and, I assume, on
24187         other GNU/Linux hosts.
24189 2020-12-19  Bruno Haible  <bruno@clisp.org>
24191         free-posix: Add tests.
24192         * tests/test-free.c: New file.
24193         * tests/macros.h (ASSERT_NO_STDIO,
24194         WRITE_MACROEXPANDED_INTEGER_TO_STDERR, WRITE_INTEGER_TO_STDERR,
24195         WRITE_TO_STDERR): New macros.
24196         * modules/free-posix-tests: New file.
24198 2020-12-18  Bruno Haible  <bruno@clisp.org>
24200         free-posix: Add C++ declaration test.
24201         * tests/test-stdlib-c++.cc (free): New declaration.
24203 2020-12-18  Bruno Haible  <bruno@clisp.org>
24205         free-posix: New module, renamed from 'free'.
24206         * modules/free-posix: Renamed from modules/free.
24207         (configure.ac): Update gl_STDLIB_MODULE_INDICATOR invocation.
24208         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_FREE_POSIX,
24209         not GNULIB_FREE.
24210         * modules/stdlib (Makefile.am): Substitute GNULIB_FREE_POSIX, not
24211         GNULIB_FREE.
24212         * lib/stdlib.in.h (free): Test GNULIB_FREE_POSIX, not GNULIB_FREE.
24213         * doc/posix-functions/free.texi: Mention the module 'free-posix' and
24214         what it does.
24215         * NEWS: Mention that module 'free' no longer exists.
24216         * modules/canonicalize (Depends-on): Add free-posix. Remove free.
24217         * modules/canonicalize-lgpl (Depends-on): Likewise.
24219 2020-12-18  Bruno Haible  <bruno@clisp.org>
24221         free: Remove support for obsolete platforms.
24222         * m4/free.m4 (gl_FUNC_FREE): Assume free(NULL) works. Don't define
24223         CANNOT_FREE_NULL.
24224         * lib/free.c (rpl_free): Don't test CANNOT_FREE_NULL.
24225         * modules/free (Description): Update.
24226         * doc/posix-functions/free.texi: Don't mention SunOS 4 any more.
24228 2020-12-18  Paul Eggert  <eggert@cs.ucla.edu>
24230         intprops: port to ICC 2021.1 Beta 20201112
24231         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_P):
24232         Port to ICC 2021.1, which has a non-working __builtin_mul_overflow_p.
24233         Add a clause for other compilers that claim to support
24234         __builtin_mul_overflow_p, since we might as well find out about
24235         slackers other than Clang and ICC.
24236         (INT_MULTIPLY_WRAPV): ICC 2021 has GCC bug 91450, so treat it
24237         like older GCCs even when it claims to be a newer one.
24239 2020-12-18  Bruno Haible  <bruno@clisp.org>
24241         intprops: Avoid potentially buggy __builtin_add_overflow in GCC 5, 6.
24242         Reported by Stefan Liebler <stli@linux.ibm.com> in
24243         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00152.html>.
24244         * lib/intprops.h (_GL_HAS_BUILTIN_ADD_OVERFLOW): Don't define for
24245         GCC 5.x and 6.x.
24246         * lib/glob.c (size_add_wrapv): Don't use __builtin_add_overflow for
24247         GCC 5.x and 6.x.
24249 2020-12-17  Bruno Haible  <bruno@clisp.org>
24251         free: Fix warning.
24252         Reported by Pádraig Brady <P@draigBrady.com> in
24253         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00148.html>.
24254         * lib/stdlib.in.h (free): New declaration.
24255         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether 'free' is declared.
24256         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_FREE, REPLACE_FREE.
24257         * modules/stdlib (Makefile.am): Substitute GNULIB_FREE, REPLACE_FREE.
24258         * m4/free.m4 (gl_FUNC_FREE): Set REPLACE_FREE, instead of defining
24259         'free' as a macro here.
24260         * modules/free (Depends-on): Add stdlib.
24261         (configure.ac): Test REPLACE_FREE. Invoke gl_STDLIB_MODULE_INDICATOR.
24263 2020-12-17  Paul Eggert  <eggert@cs.ucla.edu>
24265         canonicalize-lgpl: fix AIX test failures
24266         This merges the recent canonicalize.c fix into canonicalize-lgpl.c.
24267         Problem reported by Bruno Haible in:
24268         https://lists.gnu.org/r/bug-gnulib/2020-12/msg00138.html
24269         * lib/canonicalize-lgpl.c: Include sys/stat.h.
24270         (__realpath): When testing a file name ending in '/', use stat
24271         rather than readlink, so that it does the right thing on AIX.
24272         * modules/canonicalize-lgpl (Depends-on): Add stat, sys_stat.
24274         canonicalize: omit second readlink when not needed
24275         * lib/canonicalize.c (canonicalize_filename_mode_stk):
24276         Omit second readlink when (can_exist != CAN_MISSING
24277         && startlen != 0 && !logical).  Simplify.
24279         canonicalize: remove arbitrary 8192-byte limit
24280         Remove canonicalize.c’s arbitrary 8192-byte limit on platforms
24281         like GNU Hurd that do not define the PATH_MAX macro, and similarly
24282         for canonicalize-lgpl.c’s arbitrary 1024-byte limit.  Do this by
24283         using scratch buffers.  Lessen the number of differences between
24284         the two source files, to simplify this and future maintenance.
24285         * lib/canonicalize-lgpl.c (__realpath):
24286         * lib/canonicalize.c (canonicalize_filename_mode_stk):
24287         Use scratch buffers instead of malloc and malloca.  This avoids
24288         the need for alloca, and avoids the need for malloc in most cases.
24289         * lib/canonicalize-lgpl.c, lib/canonicalize.c: Make these files
24290         easier to compare, e.g., by sorting include files and by switching
24291         to the GNU convention of calling file names "file names", not
24292         "path names".  Include stdbool.h, scratch_buffer.h.
24293         * lib/canonicalize-lgpl.c (IDX_MAX) [_LIBC]: New macro.
24294         (malloca) [_LIBC]: Remove.
24295         [!_LIBC]: Do not include malloca.h.
24296         (get_path_max): New function, so that pathconf is called only in
24297         the rare and dubious case when when RESOLVED is not null and
24298         PATH_MAX is not defined.  Invoke pathconf on "/" not the input
24299         file name, as we care about the longest file name starting from
24300         "/" (not from the input file name), and POSIX does not specify
24301         what pathconf does on a non-directory file anyway.  If PATH_MAX is
24302         not defined, do not worry about overriding a path_max of 0, and do
24303         not let path_max exceed IDX_MAX.
24304         (__realpath): Remove an assumption that file name components
24305         cannot exceed 1024 bytes when PATH_MAX is not defined (wrong for
24306         the Hurd, presumably).
24307         When allocating the result, allocate it to just the right size;
24308         this costs nothing when the result is smaller than 1023 bytes,
24309         and for larger results it's probably worth the CPU to call realloc,
24310         as canonicalize.c already does.
24311         * lib/canonicalize.c: Include attribute.h.
24312         Do not include pathmax.h or xgetcwd.h.
24313         (PATH_MAX): Do not define, so file names longer than 8192 bytes
24314         work on platforms with no fixed limit.
24315         (canonicalize_filename_mode_stk): New function, with
24316         the content of the old canonicalize_filename_mode.
24317         Use getcwd instead of xgetcwd, and readlink instead of areadlink,
24318         since the scratch buffers now do memory management for us.
24319         Use rawmemchr instead of adding strlen.
24320         Use mempcpy instead of mempcpy + size.
24321         Assume free preserves errno.
24322         (canonicalize_filename_mode): Use it.
24323         * modules/canonicalize (Depends-on): Remove areadlink, pathmax,
24324         xgetcwd.  Add attribute, free, getcwd, mempcpy, rawmemchr,
24325         scratch_buffer, stdbool, xalloc-die.
24326         * modules/canonicalize-lgpl (Depends-on): Remove alloca-opt,
24327         malloca, realloc-posix.  Add scratch_buffer, stdbool.
24329         canonicalize-lgpl: simplify merge to glibc
24330         This patch lessens the differences between git glibc
24331         stdlib/canonicalize.c and lib/canonicalize-lgpl.c.
24332         The (perhaps wishful) goal is to make them identical.
24333         * lib/canonicalize-lgpl.c [!_LIBC]:
24334         Include <libc-config.h>, not config.h.
24335         Omit an unnecessary (!HAVE_CANONICALIZE_FILE_NAME ||
24336         !FUNC_REALPATH_WORKS || defined _LIBC) #if.
24337         Do not include alloca.h, since we use malloca now.
24338         [_LIBC]: Include <eloop-threshold.h>, and define dummy macros
24339         FILE_SYSTEM_PREFIX_LEN, IS_ABSOLUTE_FILE_NAME, ISSLASH, malloca,
24340         freea so that the mainline code can be kept #ifdef free.
24341         [!_LIBC]: Remove dummy macros for SHLIB_COMPAT, versioned_symbol,
24342         compat_symbol, weak_alias, __set_errno since libc-config.h does that.
24343         Add redirecting macros __mempcpy, __pathconf, __rawmemchr,
24344         __eloop_threshold.  All uses of their definiens changed.
24345         (SIZE_MAX): Remove; no longer needed.
24346         (alloc_failed): Remove, and remove all instances.
24347         No need for alloc_failed now that free preserves errno.
24348         (__realpath): Default path_max to 1024 instead of 8192, as that’s
24349         the glibc tradition and is safer when the 2nd argument is null.
24350         Use __rawmemchr instead of strchr.
24351         Use __mempcpy where appropriate.
24352         Simplify test for overflow so that it does not need SIZE_MAX.
24353         Do not preserve errno around free or freea calls; no longer needed.
24354         Mark __realpath with libc_hidden_def.
24355         * modules/canonicalize-lgpl (Depends-on): Add free, libc-config,
24356         malloc-posix, mempcpy, realloc-posix, rawmemchr.
24357         * modules/free: Now LGPLv2+, for canonicalize-lgpl.
24359         free: preserve errno
24360         * lib/free.c (rpl_free): Preserve errno.  Check for null only if
24361         CANNOT_FREE_NULL is defined, as an optimization for POSIX 2008
24362         platforms that do not preserve errno.
24363         * m4/free.m4 (gl_FUNC_FREE): Check whether free preserves errno.
24364         Also, define CANNOT_FREE_NULL if free cannot free NULL.
24365         * modules/free (configure.ac): Also replace 'free' if
24366         it does not preserve errno.
24368         idx: simplify IDX_MAX, remove IDX_WIDTH
24369         * lib/idx.h (IDX_MAX): Simplify by removing obsolete reference
24370         to UNSIGNED_IDX_T.
24371         (IDX_WIDTH): Remove, since it’s not used and its value
24372         arguably should be PTRDIFF_WIDTH anyway.
24374 2020-12-16  Bruno Haible  <bruno@clisp.org>
24376         posix_spawn_file_actions_addfchdir-tests: Rename test.
24377         * tests/test-posix_spawn-fchdir.c: Renamed from
24378         tests/test-posix_spawn5.c.
24379         * modules/posix_spawn_file_actions_addfchdir-tests (Files, Makefile.am):
24380         Update.
24382         posix_spawn_file_actions_addchdir-tests: Rename test.
24383         * tests/test-posix_spawn-chdir.c: Renamed from
24384         tests/test-posix_spawn4.c.
24385         * modules/posix_spawn_file_actions_addchdir-tests (Files, Makefile.am):
24386         Update.
24388         posix_spawn-tests: Rename test.
24389         * tests/test-posix_spawn-open1.c: Renamed from
24390         tests/test-posix_spawn3.c.
24391         * modules/posix_spawn-tests (Files, Makefile.am): Update.
24393         posix_spawnp-tests: Rename test.
24394         * tests/test-posix_spawn-dup2-stdin.c: Renamed from
24395         tests/test-posix_spawn2.c.
24396         * tests/test-posix_spawn-dup2-stdin.in.sh: Renamed from
24397         tests/test-posix_spawn2.in.sh.
24398         * modules/posix_spawnp-tests (Files, Makefile.am): Update.
24400         posix_spawnp-tests: Rename test.
24401         * tests/test-posix_spawn-dup2-stdout.c: Renamed from
24402         tests/test-posix_spawn1.c.
24403         * tests/test-posix_spawn-dup2-stdout.in.sh: Renamed from
24404         tests/test-posix_spawn1.in.sh.
24405         * modules/posix_spawnp-tests (Files, Makefile.am): Update.
24407 2020-12-14  Bruno Haible  <bruno@clisp.org>
24409         findprog-in: Allow overriding the current directory.
24410         * lib/findprog.h (find_in_given_path): Add directory argument.
24411         * lib/findprog-in.c (find_in_given_path): Likewise.
24412         * lib/execute.c (execute): Update caller.
24413         * lib/spawn-pipe.c (create_pipe): Likewise.
24414         * lib/windows-spawn.c (spawnpvech): Likewise.
24415         * NEWS: Mention the change.
24417 2020-12-14  Bruno Haible  <bruno@clisp.org>
24419         posix_spawn-internal: Make better use of 'const'.
24420         * lib/spawn_int.h (__spawni): Does not need write access to the elements
24421         of argv and envp.
24422         * lib/spawni.c (__spawni, script_execute): Likewise.
24423         * lib/spawn.c (posix_spawn): Update caller.
24424         * lib/spawnp.c (posix_spawnp): Likewise.
24426 2020-12-14  Bruno Haible  <bruno@clisp.org>
24428         spawn: Make it compile on native Windows.
24429         * modules/spawn (Depends-on): Add signal-h.
24431 2020-12-14  Bruno Haible  <bruno@clisp.org>
24433         windows-spawn: Avoid shadowing a variable.
24434         * lib/windows-spawn.c (spawnpvech): Rename local variable 'flags'.
24436 2020-12-13  Paul Eggert  <eggert@cs.ucla.edu>
24438         string: port memchr macro to AIX 7.2 XLC
24439         Its <string.h> defines a memchr macro to help inlining.
24440         * lib/string.in.h (memchr): #undef before #defining.
24442         canonicalize: fix AIX test failures
24443         Problem reported by Bruno Haible in:
24444         https://lists.gnu.org/r/bug-gnulib/2020-12/msg00109.html
24445         * lib/canonicalize.c (canonicalize_filename_mode):
24446         When testing a file name ending in '/', use stat rather than
24447         readlink, so that it does the right thing on AIX.
24448         * modules/canonicalize (Depends-on): Add readlink, to pull in the
24449         recent changes in the Gnulib readlink module.
24451         Assume readlink/readlinkat ERANGE fix
24452         * lib/areadlink-with-size.c (areadlink_with_size):
24453         * lib/areadlinkat-with-size.c (areadlinkat_with_size):
24454         * lib/careadlinkat.c (readlink_stk):
24455         Do not worry about readlink or readlinkat failing with errno == ERANGE,
24456         since the Gnulib readlink and readlinkat modules now fix that.
24458         getcwd: port to AIX
24459         * lib/getcwd.c [!_LIBC]: Undef stat64 before #defining it,
24460         in case our sys/stat.h #defined a function macro with the same name.
24462         readlink, readlinkat: add ERANGE portability
24463         Fix some portability issues with Gnulib's readlink and readlinkat,
24464         notably mostly working around the ERANGE problem in AIX and HP-UX.
24465         * doc/posix-functions/readlink.texi:
24466         * doc/posix-functions/readlinkat.texi:
24467         ERANGE problem is mostly fixed now.  Mention AIX problem with
24468         trailing / and EINVAL.  Lessen differences between these two files.
24469         * lib/readlink.c (rpl_readlink):
24470         * lib/readlinkat.c (rpl_readlinkat):
24471         If stat ("FILE/", ...) reports EOVERFLOW, treat FILE/ as an
24472         existing directory.  Mostly work around READLINK_TRUNCATE BUG.
24473         Lessen spurious differences between the readlink and readlinkat code.
24474         * lib/readlinkat.c (rpl_readlinkat):
24475         Fix bug where stat was used where fstatat was intended.
24476         * m4/readlink.m4 (gl_FUNC_READLINK):
24477         Rename gl_cv_func_readlink_works to gl_cv_func_readlink_trailing_slash
24478         to identify readlink problems more precisely.  All uses changed.
24479         Guess no on AIX or HP-UX for this variable.
24480         Add check for whether readlink truncates results,
24481         and define new macro READLINK_TRUCATE_BUG accordingly.
24482         * m4/readlinkat.m4 (gl_FUNC_READLINKAT):
24483         Also check gl_cv_func_readlink_trailing_slash when deciding
24484         whether to replace readlinkat.
24485         * modules/readlinkat (Depends-on): Most dependencies are also
24486         needed if replacing readlinkat.  fstatat is different, as it
24487         is needed only if replacing an existing readlinkat.
24489 2020-12-13  Bruno Haible  <bruno@clisp.org>
24491         spawn-pipe: Fix hanging processes on Windows (regression 2020-11-30).
24492         * lib/spawn-pipe.c (create_pipe): After spawning the subprocess, close
24493         the stdin_handle and/or stdout_handle.
24495 2020-12-12  Bruno Haible  <bruno@clisp.org>
24497         Fix gnulib-tool error when some modules occur in tests/.
24498         * doc/gnulib.texi (Specification): Update statistics.
24499         (Autoconf macros): Don't suggest to use AC_LIBOBJ in a .m4 file.
24500         (Using AC_LIBOBJ): New section.
24501         * check-AC_LIBOBJ: New file.
24502         * modules/fnmatch-gnu (Files): Add lib/fnmatch.c.
24503         * modules/fopen-gnu (Files): Add lib/fopen.c.
24504         * modules/memmem (Files): Add lib/memmem.c.
24505         * modules/renameat (Files): Add lib/at-func2.c.
24506         * modules/strcasestr (Files): Add lib/strcasestr.c.
24507         * modules/strstr (Files): Add lib/strstr.c.
24509 2020-12-11  Bruno Haible  <bruno@clisp.org>
24511         sh-quote, execute, spawn-pipe, etc.: Make better use of 'const'.
24512         * lib/sh-quote.h (shell_quote_argv): Does not need write access to the
24513         elements of argv.
24514         * lib/sh-quote.c (shell_quote_argv): Likewise.
24515         * lib/windows-spawn.h (prepare_spawn): Add 'const' the argument type and
24516         the return type.
24517         * lib/windows-spawn.c (prepare_spawn): Likewise.
24518         * lib/os2-spawn.h (prepare_spawn): Likewise.
24519         * lib/os2-spawn.c (prepare_spawn): Likewise.
24520         * lib/execute.h (execute): Does not need write access to the elements of
24521         prog_argv.
24522         * lib/execute.c (execute): Likewise.
24523         * lib/spawn-pipe.h (create_pipe_out, create_pipe_in, create_pipe_bidi):
24524         Likewise.
24525         * lib/spawn-pipe.c (create_pipe, create_pipe_bidi, create_pipe_in,
24526         create_pipe_out): Likewise.
24527         * lib/pipe-filter.h (pipe_filter_ii_execute, pipe_filter_gi_create):
24528         Likewise.
24529         * lib/pipe-filter-ii.c (pipe_filter_ii_execute): Likewise.
24530         * lib/pipe-filter-gi.c (pipe_filter_gi_create): Likewise.
24531         * lib/javaexec.h (execute_fn): Does not need write access to the
24532         elements of prog_argv.
24533         * lib/javaexec.c (execute_java_class): Update variable types and remove
24534         casts to 'char *'.
24535         * lib/csharpexec.h (execute_fn): Does not need write access to the
24536         elements of prog_argv.
24537         * lib/csharpexec.c (execute_csharp_using_mono,
24538         execute_csharp_using_sscli): Update variable types and remove casts to
24539         'char *'.
24540         * lib/javacomp.c (compile_using_envjavac, compile_using_gcj,
24541         compile_using_javac, compile_using_jikes, is_envjavac_gcj,
24542         is_envjavac_gcj43, is_gcj_present, is_gcj_43, is_javac_present,
24543         is_jikes_present): Update variable types and remove casts to 'char *'.
24544         * lib/javaversion.c (execute_and_read_line): Does not need write access
24545         to the elements of prog_argv.
24546         * lib/csharpcomp.c (compile_csharp_using_mono,
24547         compile_csharp_using_sscli): Update variable types and remove casts to
24548         'char *'.
24549         * tests/test-sh-quote.c (main): Update variable types and remove casts
24550         to 'char *'.
24551         * tests/test-execute-main.c (main): Update variable types and remove
24552         casts to 'char *'.
24553         * tests/test-spawn-pipe-main.c (test_pipe): Update variable types and
24554         remove casts to 'char *'.
24555         * NEWS: Mention the changes.
24557 2020-12-11  Bruno Haible  <bruno@clisp.org>
24559         execute-tests: Fix compilation error with MSVC.
24560         * tests/test-execute-child.c (is_device): With _fstat, use
24561         'struct _stat', not 'struct stat'.
24563 2020-12-11  Paul Eggert  <eggert@cs.ucla.edu>
24565         vararrays: just use 2.70
24566         * m4/vararrays.m4 (AC_C_VARARRAYS): Do not override Autoconf 2.70
24567         and later, since Autoconf 2.70 matches Gnulib now.
24569         sys_types: just use 2.70
24570         * m4/sys_types_h.m4 (AC_HEADER_MAJOR):
24571         Reindent to match Autoconf sources.
24572         Use Autoconf 2.70 as a prerequisite, not 2.69c.
24574         stdint: port to Autoconf 2.70
24575         * m4/stdint.m4 (gl_STDINT_H): Check for inttypes.h and sys/types.h
24576         instead of assuming that AC_INCLUDES_DEFAULT does it.
24577         The old code relied on AC_INCLUDES_DEFAULT being called
24578         and setting ac_cv_header_inttypes_h and ac_cv_header_sys_types_h,
24579         but this does not occur in Autoconf 2.70.
24581         pid_t.m4: just use 2.70
24582         * m4/pid_t.m4 (AC_TYPE_PID_T):
24583         Use Autoconf 2.70 as a prerequisite, not 2.69c.
24585         largefile: just use 2.70
24586         * m4/largefile.m4 (_AC_SYS_LARGEFILE_TEST_INCLUDES):
24587         Use Autoconf 2.70 as a prerequisite, not 2.69c.
24589         AC_C_RESTRICT: update from Autoconf
24590         * m4/gnulib-common.m4 (gl_PROG_CC_C99): Use Autoconf 2.70
24591         as a prerequisite, not 2.69c, since 2.70 is now out.
24592         (AC_C_RESTRICT): Define only for 2.70 or earlier.
24593         Try __restrict__ before __restrict.
24595         extensions: update from Autoconf
24596         * m4/extensions.m4 (AC_CHECK_INCLUDES_DEFAULT):
24597         Provide a default implementation for Autoconf 2.69 or earlier.
24598         (AC_USE_SYSTEM_EXTENSIONS): Copy from Autoconf git.  Define only
24599         if Autoconf 2.70 or earlier, since 2.70.1 or later should be OK.
24601         alloca: update from Autoconf
24602         * m4/alloca.m4 (gl_PREREQ_ALLOCA):
24603         Trivial update to match Autoconf 2.70.
24605 2020-12-11  Bruno Haible  <bruno@clisp.org>
24607         memchr: Work around memory overrun bug on AIX 7.2.
24608         * m4/memchr.m4 (gl_FUNC_MEMCHR): Test against AIX 7.2 bug.
24609         * doc/posix-functions/memchr.texi: Mention the AIX bug.
24611 2020-12-11  Bruno Haible  <bruno@clisp.org>
24613         execute-tests: Fix compilation error on AIX in 32-bit mode.
24614         * tests/test-execute-child.c: In order to get the original definition of
24615         fstat, don't use '#undef fstat' and '#undef stat'. Instead, arrange to
24616         include the system's <sys/stat.h> and use it before including other
24617         header files.
24619 2020-12-10  Bruno Haible  <bruno@clisp.org>
24621         windows-spawn: Relicense under LGPLv2+.
24622         * modules/windows-spawn (License): Change to LGPLv2+.
24624 2020-12-10  Bruno Haible  <bruno@clisp.org>
24626         execute, spawn-pipe: Fix memory leak on native Windows.
24627         * lib/windows-spawn.h (prepare_spawn): Add a second parameter.
24628         * lib/windows-spawn.c: Don't include xalloc.h.
24629         (quoted_arg_length, quoted_arg_string): New functions, extracted from
24630         prepare_spawn.
24631         (prepare_spawn): Use malloc instead of XNMALLOC. Allocate memory for all
24632         elements of *new_argv together.
24633         * modules/windows-spawn (Depends-on): Remove xalloc. Add malloc-posix.
24634         * lib/os2-spawn.h (prepare_spawn): Add a second parameter.
24635         * lib/os2-spawn.c: Don't include xalloc.h.
24636         (prepare_spawn): Use malloc instead of XNMALLOC. Allocate memory for all
24637         elements of *new_argv together.
24638         * lib/execute.c: Include xalloc.h.
24639         (execute): Check return value of prepare_spawn. Free the memory
24640         allocated by prepare_spawn.
24641         * modules/execute (Depends-on): Add xalloc-die.
24642         * lib/spawn-pipe.c: Include xalloc.h.
24643         (create_pipe): Check return value of prepare_spawn. Free the memory
24644         allocated by prepare_spawn.
24645         * modules/spawn-pipe (Depends-on): Add xalloc-die.
24647 2020-12-10  Bruno Haible  <bruno@clisp.org>
24649         findprog-in: Relicense under LGPLv2+.
24650         Paul Smith's approval is in
24651         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00072.html>.
24652         * modules/findprog-in (License): Change to LGPLv2+.
24654 2020-12-10  Bruno Haible  <bruno@clisp.org>
24656         findprog-in: Don't exit upon out-of-memory.
24657         * lib/findprog.h (find_in_given_path): Document ENOMEM as possible error
24658         code.
24659         * lib/findprog-in.c: Don't include xalloc.h.
24660         (find_in_given_path): Call concatenated_filename, not
24661         xconcatenated_filename. Call strdup, not xstrdup. Upon out-of-memory,
24662         return NULL with errno set.
24663         * modules/findprog-in (Depends-on): Remove xconcat-filename, xalloc. Add
24664         concat-filename, strdup-posix, malloc-posix.
24666 2020-12-09  Bruno Haible  <bruno@clisp.org>
24668         fmaf: Work around a bug on FreeBSD 12.2/arm.
24669         * m4/fmaf.m4 (gl_FUNC_FMAF_WORKS): Add one more test.
24670         * doc/posix-functions/fmaf.texi: Mention the FreeBSD bug.
24672 2020-12-09  Bruno Haible  <bruno@clisp.org>
24674         threadlib: Fix test-fstrcmp failure on FreeBSD 11.
24675         * m4/threadlib.m4 (gl_THREADLIB_BODY): When weak symbols are not present
24676         on FreeBSD, define PTHREAD_IN_USE_DETECTION_HARD.
24677         * lib/glthread/threadlib.c: Include <errno.h>.
24678         (glthread_in_use): For FreeBSD, provide an alternative implementation
24679         that uses pthread_key_create.
24681 2020-12-09  Bruno Haible  <bruno@clisp.org>
24683         math C++ tests: Fix compilation error in with clang >= 7 on FreeBSD.
24684         * lib/math.in.h (isnan): For clang >= 7 on FreeBSD, declare 'rpl_isnan',
24685         not 'isnan'.
24687 2020-12-08  Bruno Haible  <bruno@clisp.org>
24689         std-gnu11: Make compatible with Autoconf 2.70.
24690         * m4/std-gnu11.m4: Disable the entire file if Autoconf >= 2.70 is in
24691         use.
24693 2020-12-08  Bruno Haible  <bruno@clisp.org>
24695         argp: Avoid undefined behaviour when invoking qsort().
24696         This fixes a test-argp-2.sh test failure on macOS and FreeBSD.
24697         Reported by Jeffrey Walton <noloader@gmail.com> in
24698         <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00085.html>.
24699         * lib/argp-help.c (group_cmp): Remove third argument.
24700         (hol_sibling_cluster_cmp, hol_cousin_cluster_cmp): New functions, based
24701         upon hol_cluster_cmp.
24702         (hol_cluster_cmp): Use hol_cousin_cluster_cmp.
24703         (hol_entry_cmp): Rewritten to implement a total order.
24705 2020-12-08  Bruno Haible  <bruno@clisp.org>
24707         argp: Improve comments.
24708         * lib/argp-help.c: Add sectioning comments. Write NULL to designate a
24709         null pointer.
24710         (struct hol_entry): Fix comment regarding sort order of group.
24711         (hol_entry_short_iterate, hol_entry_long_iterate): Add comment.
24712         (until_short, canon_doc_option, hol_entry_qcmp): Improve comment.
24713         (hol_cluster_is_child, argp_hol): Move functions.
24714         (HOL_ENTRY_PTRCMP): Remove unused macro.
24716 2020-12-08  Bruno Haible  <bruno@clisp.org>
24718         argp: Don't pass invalid arguments to isspace() and isalnum().
24719         * lib/argp-help.c (canon_doc_option): Cast character to 'unsigned int'
24720         before passing it to isspace() or isalnum().
24722 2020-12-08  Bruno Haible  <bruno@clisp.org>
24724         argp: Don't rely on undefined behaviour of _tolower().
24725         Patch by Eric Blake
24726         <https://lists.gnu.org/archive/html/bug-gnulib/2009-09/msg00287.html>.
24727         * lib/argp-help.c (hol_entry_cmp): Don't use _tolower on values that are
24728         not upper-case.  Pass correct range to tolower.
24730 2020-12-07  Bruno Haible  <bruno@clisp.org>
24732         unicodeio: Fix wrong result on FreeBSD.
24733         * lib/unicodeio.c (unicode_to_mb): Handle question mark fallback
24734         characters on all platforms.
24736 2020-12-07  Bruno Haible  <bruno@clisp.org>
24738         get-rusage-data tests: Avoid test failure on FreeBSD/x86_64.
24739         * tests/test-get-rusage-data.c (main): Don't expect a strict increase on
24740         FreeBSD systems.
24742 2020-12-07  Bruno Haible  <bruno@clisp.org>
24744         get-rusage-data: Fix link error on FreeBSD 12.2/arm64.
24745         * modules/get-rusage-data (configure.ac): Test whether sbrk exists.
24746         * lib/get-rusage-data.c (get_rusage_data_via_setrlimit): Define
24747         trivially of sbrk is not available.
24748         * doc/glibc-functions/sbrk.texi: Mention that the function does not
24749         exist in FreeBSD 12.2/arm64.
24750         * doc/glibc-functions/brk.texi: Likewise.
24752 2020-12-07  Bruno Haible  <bruno@clisp.org>
24754         Correct interaction between gl_ANSI_CXX and AC_PROG_CXX.
24755         Suggested by Zack Weinberg in
24756         <https://savannah.gnu.org/support/?110294>.
24757         * m4/ansi-c++.m4 (gl_ANSI_CXX): Mark AC_PROG_CXX as provided.
24758         * modules/uchar-c++-tests: Revert the workaround from 2020-08-18.
24760 2020-12-07  Bruno Haible  <bruno@clisp.org>
24762         Tweak the Windows oldnames workaround.
24763         Reported by Daniel R. Hurtmans <Daniel.Hurtmans@ulb.ac.be> in
24764         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00073.html>.
24765         * lib/unistd.in.h: On native Windows, include <io.h> and <direct.h>
24766         always.
24767         (getcwd): Use _GL_CXXALIAS_MDA_CAST.
24768         * lib/stdlib.in.h (putenv): Likewise.
24770 2020-12-06  Paul Eggert  <eggert@cs.ucla.edu>
24772         doc: fix flat address space discussion
24773         * doc/gnulib-readme.texi (Other portability assumptions):
24774         Move the all-bits-zero assumption outside the flat address space
24775         section, since the two issues are independent.
24777         doc: document -static-libubsan more
24778         * doc/gnulib-readme.texi (High Quality): Document pros and cons of
24779         -static-libubsan a bit more.  Mostly cons.
24781 2020-12-06  Bruno Haible  <bruno@clisp.org>
24783         doc: Add more details regarding the undefined behaviour sanitizer.
24784         * doc/gnulib-readme.texi (High Quality): Describe
24785         -fsanitize-undefined-trap-on-error better.
24787 2020-12-06  Bruno Haible  <bruno@clisp.org>
24789         Do the Windows oldnames workaround through the C++ GNULIB_NAMESPACE.
24790         Reported by Daniel R. Hurtmans <Daniel.Hurtmans@ulb.ac.be> in
24791         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00029.html>.
24792         * lib/c++defs.h (_GL_CXXALIAS_MDA_CAST): New macro.
24793         * lib/fcntl.in.h (creat, open):  In C++ mode, when GNULIB_NAMESPACE is
24794         defined: 1. Define a symbol in this namespace. 2. Don't redirect using
24795         a preprocessor #define.
24796         * lib/math.in.h (j0, j1, jn, y0, y1, yn): Likewise.
24797         * lib/search.in.h (lfind, lsearch): Likewise.
24798         * lib/stdio.in.h (fcloseall, fdopen, fileno, getw, putw, tempnam):
24799         Likewise.
24800         * lib/stdlib.in.h (ecvt, fcvt, gcvt, mktemp, putenv): Likewise.
24801         * lib/string.in.h (memccpy, strdup): Likewise.
24802         * lib/sys_stat.in.h (chmod, umask): Likewise.
24803         * lib/time.in.h (tzset): Likewise.
24804         * lib/unistd.in.h (access, chdir, close, dup, dup2, execl, execle,
24805         execlp, execv, execve, execvp, execvpe, getcwd, getpid, isatty, lseek,
24806         read, rmdir, swab, unlink, write): Likewise.
24807         * lib/utime.in.h (utime): Likewise.
24808         * lib/wchar.in.h (wcsdup): Likewise.
24809         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_FCLOSEALL.
24810         (gl_STDIO_H): Set HAVE_DECL_FCLOSEALL.
24811         * modules/stdio (Makefile.am): Substitute HAVE_DECL_FCLOSEALL.
24812         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_DECL_ECVT,
24813         HAVE_DECL_FCVT, HAVE_DECL_GCVT.
24814         (gl_STDLIB_H): Set HAVE_DECL_ECVT, HAVE_DECL_FCVT, HAVE_DECL_GCVT.
24815         * modules/stdlib (Makefile.am): Substitute HAVE_DECL_ECVT,
24816         HAVE_DECL_FCVT, HAVE_DECL_GCVT.
24817         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize HAVE_DECL_EXECVPE.
24818         (gl_UNISTD_H): Set HAVE_DECL_EXECVPE.
24819         * modules/unistd (Makefile.am): Substitute HAVE_DECL_EXECVPE.
24820         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize HAVE_DECL_WCSDUP.
24821         (gl_WCHAR_H): Set HAVE_DECL_WCSDUP.
24822         * modules/wchar (Makefile.am): Substitute HAVE_DECL_WCSDUP.
24824 2020-12-06  Bruno Haible  <bruno@clisp.org>
24826         doc: Mention some missing function declarations.
24827         * doc/glibc-functions/execvpe.texi: Mention the missing declaration on
24828         AIX.
24829         * doc/glibc-functions/fcloseall.texi: Mention the missing declaration on
24830         FreeBSD.
24831         * doc/pastposix-functions/ecvt.texi: Mention the missing declaration on
24832         Cygwin.
24833         * doc/pastposix-functions/fcvt.texi: Likewise.
24834         * doc/pastposix-functions/gcvt.texi: Likewise.
24836 2020-12-06  Bruno Haible  <bruno@clisp.org>
24838         doc: Tweak example.
24839         * doc/intprops.texi (Checking Integer Overflow): Use 'printf', not
24840         'print'.
24842 2020-12-06  Bruno Haible  <bruno@clisp.org>
24844         filenamecat-tests: Use idx_t for nonnegative ptrdiff_t variables.
24845         * tests/test-filenamecat.c: Include idx.h.
24846         (main): Mark prefixlen as nonnegative.
24847         * modules/filenamecat-tests (Depends-on): Add idx.
24849 2020-12-06  Bruno Haible  <bruno@clisp.org>
24851         time_rz: Use idx_t for nonnegative ptrdiff_t variables.
24852         * lib/time_rz.c: Include idx.h.
24853         (save_abbr): Mark zone_size as nonnegative.
24854         * modules/time_rz (Depends-on): Add idx.
24856 2020-12-06  Bruno Haible  <bruno@clisp.org>
24858         parse-datetime: Use idx_t for nonnegative ptrdiff_t variables.
24859         * lib/parse-datetime.y: Include idx.h.
24860         (textint): Mark digits as nonnegative.
24861         (parser_control): Mark dates_seen, days_seen, local_zones_seen,
24862         dsts_seen, times_seen, zones_seen as nonnegative.
24863         (lookup_word): Mark wordlen as nonnegative.
24864         (yylex): Mark count as nonnegative.
24865         (parse_datetime2): Mark tzsize as nonnegative.
24866         * modules/parse-datetime (Depends-on): Add idx.
24868 2020-12-06  Bruno Haible  <bruno@clisp.org>
24870         fnmatch: Use idx_t for nonnegative ptrdiff_t variables.
24871         * lib/fnmatch.c: Include idx.h. In glibc, define idx_t directly.
24872         * lib/fnmatch_loop.c (EXT): Mark slen, new_used, plensize as
24873         nonnegative.
24874         * modules/fnmatch (Depends-on): Add idx.
24876 2020-12-06  Bruno Haible  <bruno@clisp.org>
24878         c-stack: Use idx_t for nonnegative ptrdiff_t variables.
24879         * lib/c-stack.c: Include idx.h.
24880         (die): Mark buflen as nonnegative.
24881         * modules/c-stack (Depends-on): Add idx.
24883 2020-12-06  Bruno Haible  <bruno@clisp.org>
24885         backupfile: Use idx_t for nonnegative ptrdiff_t variables.
24886         * lib/backupfile.c: Include idx.h.
24887         (numbered_backup): Mark base_offset as nonnegative.
24888         (backupfile_internal): Likewise.
24889         * modules/backup-rename (Depends-on): Add idx.
24890         * modules/backupfile (Depends-on): Likewise.
24892 2020-12-05  Paul Eggert  <eggert@cs.ucla.edu>
24894         doc: fix curved quotes issue
24895         * doc/gnulib.texi: Set txicodequoteundirected and
24896         txicodequotebacktick so that ` and ' in examples do not generate
24897         curved single quotes that do the wrong thing when cut and pasted.
24899         doc: mention static and dynamic checking
24900         * doc/gnulib-readme.texi (High Quality): Add a bit of advice
24901         for static and dynamic checking.
24903         intprops: Add INT_ADD_OK etc.
24904         * doc/intprops.texi (Checking Integer Overflow): New section.
24905         * lib/intprops.h: From a suggestion by Bruno Haible in:
24906         https://lists.gnu.org/r/bug-gnulib/2020-12/msg00051.html
24907         (SAFE_INT_ADD, SAFE_INT_SUBTRACT, SAFE_INT_MULTIPLY): New macros.
24909         doc: move exotic platfroms to Target Platforms
24910         * doc/gnulib-intro.texi (Supported Platforms)
24911         (Formerly Supported Platforms, Unsupported Platforms):
24912         New subsections, split off from Target Platforms.
24913         (Unsupported Platforms): Move the exotic-platform stuff here ...
24914         * doc/gnulib-readme.texi (Exotic platforms): ... from this removed
24915         section.
24917         doc: mention intptr_t etc. and IBM i
24918         * doc/gnulib-readme.texi (Other portability assumptions):
24919         Mention intptr_t and uintptr_t, and that arithmetic on them
24920         works in the usual way.
24921         (Exotic platforms): New section, containing material from
24922         the old 'Integer Portability' section.  Also mention IBM i.
24923         * doc/intprops.texi (Wraparound Arithmetic):
24924         Say that the macros work on unsigned integers too.
24925         (Integer Portability): Remove.
24927 2020-12-04  Bruno Haible  <bruno@clisp.org>
24929         utime: Fix a test failure on macOS 10.13.
24930         Reported by Martin Storsjö <martin@martin.st> in
24931         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00003.html>.
24932         * m4/utime.m4 (gl_FUNC_UTIME): Test whether utime handles trailing
24933         slashes on files.
24934         * lib/utime.c (utime): Add alternative implementation for Unix
24935         platforms.
24936         * modules/utime (Depends-on): Add stat.
24937         * doc/posix-functions/utime.texi: Mention the macOS 10.13 bug.
24938         * doc/posix-functions/lstat.texi: Mention that macOS 10.13 also has the
24939         trailing-slash bug.
24940         * doc/posix-functions/open.texi: Likewise.
24941         * doc/posix-functions/stat.texi: Likewise.
24942         * doc/posix-functions/symlink.texi: Likewise.
24944 2020-12-04  Paul Eggert  <eggert@cs.ucla.edu>
24946         intprops: update doc and mention Unisys
24947         * doc/gnulib-readme.texi (Other portability assumptions):
24948         Also mention ptrdiff_t when talking about widths and overflow.
24949         * doc/intprops.texi (Integer Properties): Summarize new section.
24950         (Arithmetic Type Properties): Document that EXPR_SIGNED no longer
24951         evaluates its argument.
24952         (Integer Bounds): Fix typo.
24953         (Wraparound Arithmetic): Remove obsolete comment about efficiency.
24954         Document that the _WRAPV macros now support pointers to unsigned
24955         integers.
24956         (Integer Range Overflow): Update SEI CERT citation.
24957         (Integer Portability): New subsection, which mentions
24958         the oddball Unisys platforms as non-Gnulib targets.
24960 2020-12-03  Bruno Haible  <bruno@clisp.org>
24962         idx: Clarify that idx_t always behaves like a signed type.
24963         Suggested by Paul Eggert in
24964         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00034.html>.
24965         * lib/idx.h: Clarify that idx_t always behaves like a signed type.
24966         Don't test UNSIGNED_IDX_T.
24968 2020-12-03  Bruno Haible  <bruno@clisp.org>
24970         idx: New module.
24971         * lib/idx.h: New file.
24972         * modules/idx: New file.
24973         * lib/canonicalize-lgpl.c: Include idx.h. Use idx_t instead of
24974         ptrdiff_t.
24975         * lib/canonicalize.c: Likewise.
24976         * modules/canonicalize-lgpl (Depends-on): Add idx.
24977         * modules/canonicalize (Depends-on): Likewise.
24979 2020-12-03  Bruno Haible  <bruno@clisp.org>
24981         fprintf-posix-tests: Avoid a test failure on macOS 10.13.
24982         Reported by Martin Storsjö <martin@martin.st> in
24983         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00003.html>.
24984         * tests/test-fprintf-posix3.c: Skip the test on macOS.
24985         (main): Return a different exit code at each point. Allow 100 KB extra
24986         memory consumption.
24987         * tests/test-fprintf-posix3.sh: Update. Remove the "get_rusage_as()
24988         doesn't work" diagnostic.
24990 2020-12-02  Paul Eggert  <eggert@cs.ucla.edu>
24992         canonicalize: refactor can_mode flag
24993         * lib/canonicalize.c (MULTIPLE_BITS_SET): Remove, replacing with ...
24994         (multiple_bits_set): ... this new static function.  Uses changed.
24995         (canonicalize_filename_mode): Refactor for clarity to avoid
24996         modifying the CAN_MODE argument.
24998         canonicalize: prefer signed integer types
24999         * lib/canonicalize.c: Include stddef.h, for ptrdiff_t.
25000         (seen_triple, canonicalize_filename_mode): Prefer signed to
25001         unsigned types where either will do, as they avoid some glitches
25002         in comparisons and can trap on overflow when debugging.
25004         canonicalize: fix most of another EOVERFLOW issue
25005         * lib/canonicalize.c (canonicalize_filename_mode):
25006         Do not call stat if fewer than 20 symlinks have been traversed.
25007         This avoids EOVERFLOW failure in the common case where there
25008         are not that many symlinks, while continuing to catch loops
25009         (or fail due to EOVERFLOW) in the unusual case when there
25010         are many symlinks to traverse.
25012         canonicalize: do not assume symlinks have st_ino
25013         * lib/canonicalize.c (canonicalize_filename_mode):
25014         When checking for loops, use st_dev and st_ino from the parent
25015         directory not from the symlink, as pre-2017 POSIX says these
25016         members are not reliable for symlinks.  Couple this with START
25017         (the remaining file name to be resolved), not NAME (the whole file
25018         name with START as its suffix).
25019         * modules/canonicalize (Depends-on): Depend on stat, not lstat.
25021         canonicalize: fix EOVERFLOW bug
25022         * lib/canonicalize.c (canonicalize_filename_mode):
25023         When testing whether a directory entry is a symbolic link, or a
25024         directory or other, do not use lstat or stat or
25025         areadlink_with_size.  Just use areadlink, as this suffices and it
25026         avoids the EOVERFLOW problem that lstat and stat have.
25027         * modules/canonicalize (Depends-on): Depend on areadlink instead
25028         of areadlink-with-size and stat.
25030         canonicalize-lgpl: fix EOVERFLOW bug
25031         * lib/canonicalize-lgpl.c: Do not include <sys/stat.h>.
25032         (__realpath): Do not use lstat.  Just use readlink, as this
25033         suffices and it avoids the EOVERFLOW problem that lstat has.
25034         * modules/canonicalize-lgpl (Depends-on): Remove lstat, sys_stat.
25036 2020-12-02  Bruno Haible  <bruno@clisp.org>
25038         strsignal-tests: Fix test failure on macOS 10.13.
25039         Reported by Martin Storsjö <martin@martin.st> in
25040         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00003.html>.
25041         * tests/test-strsignal.c (ASSERT_DESCRIPTION): Allow the actual result
25042         to be longer than the expected result.
25044 2020-12-02  Bruno Haible  <bruno@clisp.org>
25046         Fix compilation errors in test-math-c++.cc on FreeBSD 12.2/arm64.
25047         * lib/math.in.h (_GL_INCLUDING_MATH_H): New macro, to work around
25048         recursive self-include problem on FreeBSD 12.2 in C++ mode.
25050 2020-12-02  Bruno Haible  <bruno@clisp.org>
25052         spawn-pipe: Allow caller to specify directory for the subprocess.
25053         * lib/spawn-pipe.h (create_pipe_out, create_pipe_in, create_pipe_bidi):
25054         Add directory argument.
25055         * lib/spawn-pipe.c: Include canonicalize.h, filename.h, findprog.h.
25056         (create_pipe): Add directory argument. If specified, resolve the program
25057         file name and make it absolute, first. Pass the directory to spawnpvech
25058         and posix_spawn_file_actions_addchdir.
25059         (create_pipe_bidi, create_pipe_in, create_pipe_out): Add directory
25060         argument.
25061         * modules/spawn-pipe (Depends-on): Add canonicalize, filename,
25062         findprog-in, posix_spawn, posix_spawn_file_actions_addchdir.
25063         * tests/test-spawn-pipe-main.c (test_pipe): Update.
25064         * NEWS: Mention the change.
25065         * lib/csharpcomp.c (compile_csharp_using_mono,
25066         compile_csharp_using_sscli): Update.
25067         * lib/javacomp.c (is_envjavac_gcj, is_envjavac_gcj43, is_gcj_present,
25068         is_gcj_43): Update.
25069         * lib/javaversion.c (execute_and_read_line): Update.
25070         * lib/pipe-filter-gi.c (pipe_filter_gi_create): Update.
25071         * lib/pipe-filter-ii.c (pipe_filter_ii_execute): Update.
25073 2020-12-02  Bruno Haible  <bruno@clisp.org>
25075         execute: Allow caller to specify directory for the subprocess.
25076         * lib/execute.h (execute): Add directory argument.
25077         * lib/execute.c: Include canonicalize.h, filename.h, findprog.h.
25078         (execute): Add directory argument. If specified, resolve the program
25079         file name and make it absolute, first. Pass the directory to spawnpvech
25080         and posix_spawn_file_actions_addchdir.
25081         * modules/execute (Depends-on): Add canonicalize, filename, findprog-in,
25082         posix_spawn, posix_spawn_file_actions_addchdir.
25083         * tests/test-execute-main.c: Add test for passing a directory.
25084         * tests/test-execute-child.c: Likewise.
25085         * tests/test-execute.sh: Update.
25086         * modules/execute-tests (Depends-on): Add mkdir.
25087         * NEWS: Mention the change.
25088         * lib/csharpcomp.c (compile_csharp_using_sscli): Update.
25089         * lib/csharpexec.c (execute_csharp_using_mono,
25090         execute_csharp_using_sscli): Update.
25091         * lib/javacomp.c (compile_using_envjavac, compile_using_gcj,
25092         compile_using_javac, compile_using_jikes, is_javac_present,
25093         is_jikes_present): Update.
25094         * lib/javaexec.c (execute_java_class): Update.
25096 2020-12-01  Bruno Haible  <bruno@clisp.org>
25098         vma-iter: Add support for macOS11/arm64.
25099         Patch suggested by Hill Ma <maahiuzeon@gmail.com> in
25100         <https://gitlab.com/gnu-clisp/clisp/-/issues/27>
25101         and by Martin Storsjö <martin@martin.st> in
25102         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00003.html>.
25103         * lib/vma-iter.c (vma_iterate): On arm64, use 64-bit type definitions.
25105 2020-12-01  Bruno Haible  <bruno@clisp.org>
25107         spawn-pipe: Fix handling of OS/2 kLIBC.
25108         Reported by KO Myung-Hun <komh78@gmail.com> in
25109         <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00005.html>.
25110         * modules/spawn-pipe (configure.ac): Use the common idiom for
25111         recognizing the OS/2 operating system.
25113 2020-11-30  Bruno Haible  <bruno@clisp.org>
25115         execute: Fix uninitialized use of errno.
25116         * lib/execute.c (execute): Preserve errno across several system calls.
25118 2020-11-30  Bruno Haible  <bruno@clisp.org>
25120         access tests: Fix test failure on native Windows.
25121         * tests/test-access.c (main): Change permissions of f2 file before
25122         attempting to remove it.
25124 2020-11-30  Paul Eggert  <eggert@cs.ucla.edu>
25126         faccessat: link with $(LIB_EACCESS)
25127         * modules/faccessat (Link:): Add $(LIB_EACCESS), since this
25128         module depends on euidaccess.
25130 2020-11-30  Bruno Haible  <bruno@clisp.org>
25132         execute, spawn-pipe: Make multithread-safe on native Windows.
25133         * lib/windows-spawn.h: Include <stdint.h>, <windows.h>.
25134         (dup_safer_noinherit, undup_safer_noinherit): Remove declarations.
25135         (spawnpvech): New declaration.
25136         * lib/windows-spawn.c: Include <stdio.h>, <process.h>, findprog.h.
25137         Don't include <unistd.h>, cloexec.h, error.h, gettext.h.
25138         (_): Remove macro.
25139         (dup_noinherit, fd_safer_noinherit, dup_safer_noinherit,
25140         undup_safer_noinherit): Remove functions.
25141         (spawnpvech): New function.
25142         * modules/windows-spawn (Depends-on): Add findprog-in, stdint. Remove
25143         cloexec, dup2, error, gettext-h.
25144         * lib/execute.c: Include msvc-nothrow.h.
25145         (execute) [WIN32]: Use _get_osfhandle, spawnpvech instead of _spawnvpe.
25146         * lib/spawn-pipe.c: Include msvc-nothrow.h.
25147         (create_pipe) [WIN32]: Use _get_osfhandle, DuplicateHandle, spawnpvech
25148         instead of _spawnvpe.
25149         * modules/execute (Depends-on): Add msvc-nothrow.
25150         * modules/spawn-pipe (Depends-on): Likewise.
25152 2020-11-30  Bruno Haible  <bruno@clisp.org>
25154         execute, spawn-pipe: Improve documentation.
25155         * lib/execute.h: Describe progname, prog_path, prog_argv.
25156         * lib/spawn-pipe.h: Likewise.
25158 2020-11-30  Bruno Haible  <bruno@clisp.org>
25160         execute tests: Add more tests.
25161         * tests/test-execute-main.c: Add tests for reading, writing, isatty on
25162         inherited file descriptors >= 3.
25163         * tests/test-execute-child.c: Likewise.
25164         * tests/test-execute.sh: Update.
25166 2020-11-30  Bruno Haible  <bruno@clisp.org>
25168         havelib: Fix for non-ELF platforms (regression 2019-11-17).
25169         Reported by comex <comexk@gmail.com> in
25170         <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00188.html>.
25171         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): On non-ELF platforms,
25172         don't expect an ELF header.
25174 2020-11-29  Akim Demaille  <akim@lrde.epita.fr>
25176         bitset: use integer_length in table implementation
25177         * lib/bitset/table.c (tbitset_list_reverse): Use
25178         BITSET_FOR_EACH_BIT_REVERSE.
25180 2020-11-29  Akim Demaille  <akim@lrde.epita.fr>
25182         bitset: use integer_length in list implementation
25183         * lib/bitset/list.c (lbitset_list_reverse): Use
25184         BITSET_FOR_EACH_BIT_REVERSE.
25186 2020-11-29  Akim Demaille  <akim@lrde.epita.fr>
25188         bitset: use integer_length in vector implementation
25189         * lib/bitset/array.c (vbitset_list_reverse): Use
25190         BITSET_FOR_EACH_BIT_REVERSE.
25192 2020-11-29  Akim Demaille  <akim@lrde.epita.fr>
25194         bitset: use integer_length in array implementation
25195         * modules/bitset (Depends-on): Add integer_length_l.
25196         * lib/bitset/base.h (bitset_fls_, BITSET_FOR_EACH_BIT_REVERSE): New.
25197         * lib/bitset/array.c (abitset_list_reverse): Use it.
25199 2020-11-29  Akim Demaille  <akim@lrde.epita.fr>
25201         bitset: style: use consistent names
25202         * bitset/list.c (lbitset_list_reverse): Rename 'bcount' as 'bitcnt',
25203         and 'boffset' as 'bitoff', for consistency with the other
25204         implementations.
25205         * bitset/table.c (tbitset_list_reverse): Likewise.
25207 2020-11-29  Akim Demaille  <akim@lrde.epita.fr>
25209         bitset: style: sort header
25210         * lib/bitset/base.h (bitset_ffs): Rename as...
25211         (bitset_ffs_): this.
25212         (bitset_ffs_, BITSET_FOR_EACH_BIT): Move to better places.
25214 2020-11-29  Akim Demaille  <akim@lrde.epita.fr>
25216         bitset: tests: check BITSET_FOR_EACH_REVERSE
25217         * tests/test-bitset.c (compare, check_zero, check_one_bit, check_ones):
25218         Check BITSET_FOR_EACH_REVERSE.
25220 2020-11-29  Bruno Haible  <bruno@clisp.org>
25222         spawn-pipe tests: Fix test failure with MSVC.
25223         * tests/test-spawn-pipe-child.c: Include <stdint.h>.
25224         (gl_msvc_invalid_parameter_handler): New function.
25225         (main): Set a global invalid-parameter handler.
25226         * modules/spawn-pipe-tests (Depends-on): Add msvc-inval, stdint.
25228 2020-11-29  Bruno Haible  <bruno@clisp.org>
25230         execute: Add tests.
25231         * tests/test-execute.sh: New file.
25232         * tests/test-execute-main.c: New file.
25233         * tests/test-execute-child.c: New file.
25234         * modules/execute-tests: New file.
25236 2020-11-29  Bruno Haible  <bruno@clisp.org>
25238         fcntl: Work around NetBSD bug with F_DUPFD_CLOEXEC.
25239         * m4/fcntl.m4 (gl_FUNC_FCNTL): Test whether F_DUPFD_CLOEXEC actually
25240         works.
25241         * lib/fcntl.c (rpl_fcntl_DUPFD_CLOEXEC): On NetBSD, use the same
25242         fallback implementation as on Haiku.
25243         * tests/test-fcntl.c (main): Add a test whether F_DUPFD_CLOEXEC is
25244         effective.
25245         * doc/posix-functions/fcntl.texi: Mention the NetBSD bug.
25247 2020-11-29  Bruno Haible  <bruno@clisp.org>
25249         spawn-pipe: Fix build on OS/2 kLIBC (regression 2020-11-28).
25250         * lib/os2-spawn.h: New file, based on lib/windows-spawn.h.
25251         * lib/os2-spawn.c: New file, based on lib/windows-spawn.c.
25252         * lib/spawn-pipe.c: On OS/2 kLIBC, include "os2-spawn.h".
25253         * lib/windows-spawn.c: Remove modifications for kLIBC.
25254         * modules/spawn-pipe (Files): Add the new files.
25255         (configure.ac): Arrange to compile os2-spawn.c on OS/2.
25257 2020-11-28  Bruno Haible  <bruno@clisp.org>
25259         asyncsafe-spin: Fix compilation error with GCC on 32-bit SPARC.
25260         Reported by Paul Eggert in
25261         <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00066.html>.
25262         * m4/sparcv8+.m4: New file.
25263         * modules/sparcv8+: New file.
25264         * modules/asyncsafe-spin (Depends-on): Add sparcv8+.
25266 2020-11-28  Bruno Haible  <bruno@clisp.org>
25268         asyncsafe-spin: Fix build error with GCC on 32-bit SPARC.
25269         * lib/asyncsafe-spin.c: Don't use GCC >= 4.1 primitives on SPARC.
25271 2020-11-28  Bruno Haible  <bruno@clisp.org>
25273         windows-spawn: New module.
25274         * lib/windows-spawn.h: Renamed from lib/w32spawn.h. Remove
25275         implementations.
25276         * lib/windows-spawn.c: Renamed from lib/w32spawn.h.
25277         * modules/windows-spawn: New file.
25278         * lib/execute.c: Include "windows-spawn.h" instead of "w32spawn.h".
25279         * lib/spawn-pipe.c: Likewise.
25280         * modules/execute (Files): Remove lib/w32spawn.h.
25281         (Depends-on): Add windows-spawn. Remove cloexec, msvc-nothrow, strpbrk,
25282         xalloc.
25283         (Makefile.am): Remove w32spawn.h from lib_SOURCES.
25284         * modules/spawn-pipe (Files): Remove lib/w32spawn.h.
25285         (Depends-on): Add windows-spawn. Remove cloexec, msvc-nothrow, strpbrk,
25286         xalloc.
25287         (Makefile.am): Remove w32spawn.h from lib_SOURCES.
25289 2020-11-27  Bruno Haible  <bruno@clisp.org>
25291         ssfmalloc tests: Port to macOS 11.
25292         * tests/test-ssfmalloc.c (PAGESIZE_MAX): Set to 16384, not 8192.
25294 2020-11-26  Bruno Haible  <bruno@clisp.org>
25296         Fix dependencies of modules that use '_exit' on native Windows.
25297         Reported by Jim Meyering in
25298         <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00159.html>.
25299         * modules/_Exit (Depends-on): Add unistd.
25300         * modules/closein (Depends-on): Likewise.
25301         * modules/closeout (Depends-on): Likewise.
25302         * modules/forkpty (Depends-on): Likewise.
25303         * modules/posix_spawn-internal (Depends-on): Likewise.
25304         * modules/savewd (Depends-on): Likewise.
25305         * modules/stat-time-tests (Depends-on): Likewise.
25307 2020-11-26  Bruno Haible  <bruno@clisp.org>
25309         raise-tests: Fix compilation error on MSVC (regression 2020-11-25).
25310         * modules/raise-tests (Depends-on): Add unistd.
25311         * doc/posix-functions/_exit.texi: Mention the 'unistd' module.
25313 2020-11-25  Jim Meyering  <meyering@fb.com>
25315         setlocale-tests: do not trigger gcc's -Wanalyzer-possible-null-argument
25316         * tests/test-setlocale1.c (main): Assert that each strcmp argument is
25317         non-NULL, since we don't bother handing strdup failure.
25319         raise-tests: avoid GCC 11's new exit-from-signal-handler warning
25320         gcc's -Wanalyzer-unsafe-call-within-signal-handler exposed this.
25321         * tests/test-raise.c: Include unistd.h.
25322         (handler): Use _exit, not exit.
25324 2020-11-23  Bruno Haible  <bruno@clisp.org>
25326         Use the correct printf format attribute for mingw.
25327         Reported by Reuben Thomas <rrt@sc3d.org> in
25328         <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00133.html>.
25330         * modules/vfprintf-posix (configure.ac): Define GNULIB_VFPRINTF_POSIX.
25331         * modules/vprintf-posix (configure.ac): Define GNULIB_VPRINTF_POSIX.
25333         * lib/stdio.in.h (_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD,
25334         _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM): New macros.
25335         (_GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD): Renamed from
25336         _GL_ATTRIBUTE_FORMAT_PRINTF. Use _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD.
25337         (_GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM): Use
25338         _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM.
25340         * modules/vasnprintf (Depends-on): Add stdio.
25341         * lib/vasnprintf.h: Include <stdio.h>.
25342         (asnprintf, vasnprintf): Use the standard printf format attribute.
25344         * modules/xvasprintf (Depends-on): Add stdio.
25345         * lib/xvasprintf.h: Include <stdio.h>.
25346         (xasprintf, xvasprintf): Use the standard printf format attribute.
25348         * modules/xprintf (Depends-on): List stdio first.
25349         * lib/xprintf.h (xprintf, xvprintf): Use a printf format attribute that
25350         depends on GNULIB_VPRINTF_POSIX.
25351         (xfprintf, xvfprintf): Use a printf format attribute that depends on
25352         GNULIB_VFPRINTF_POSIX.
25354         * modules/c-vasnprintf (Depends-on): Add stdio.
25355         * lib/c-vasnprintf.h: Include <stdio.h>.
25356         (c_vasnprintf): Use the standard printf format attribute.
25358         * modules/c-vasprintf (Depends-on): Add stdio.
25359         * lib/c-vasprintf.h: Include <stdio.h>.
25360         (c_asprintf, c_vasprintf): Use the standard printf format attribute.
25362         * modules/c-vsnprintf (Depends-on): Add stdio.
25363         * lib/c-vsnprintf.h: Include <stdio.h>.
25364         (c_vsnprintf): Use the standard printf format attribute.
25366         * modules/c-snprintf (Depends-on): Add stdio.
25367         * lib/c-snprintf.h: Include <stdio.h>.
25368         (c_snprintf): Use the standard printf format attribute.
25370         * modules/c-xvasprintf (Depends-on): Add stdio.
25371         * lib/c-xvasprintf.h: Include <stdio.h>.
25372         (c_xasprintf, c_xvasprintf): Use the standard printf format attribute.
25374         * modules/error (Depends-on): Depend on stdio always.
25375         * lib/error.h: Include <stdio.h>.
25376         (_GL_ATTRIBUTE_SPEC_PRINTF): Remove macro.
25377         (error, error_at_line): Use a printf format attribute that depends on
25378         GNULIB_VFPRINTF_POSIX.
25379         * lib/error.c (_GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD): Renamed from
25380         _GL_ATTRIBUTE_FORMAT_PRINTF.
25382         * modules/verror (Depends-on): Add stdio.
25383         * lib/verror.h: Include <stdio.h>. Don't include "error.h".
25384         (verror, verror_at_line): Use the standard printf format attribute.
25385         * lib/verror.c: Include "error.h".
25387         * modules/argp (Depends-on): Add stdio.
25388         * lib/argp.h (argp_error, __argp_error, argp_failure, __argp_failure):
25389         Use a printf format attribute that depends on GNULIB_VFPRINTF_POSIX.
25391         * modules/libtextstyle-optional (Depends-on): Add stdio.
25392         * lib/textstyle.in.h (ostream_printf, ostream_vprintf): Use the standard
25393         printf format attribute.
25395         * tests/test-nonblocking-misc.h (dbgfprintf): Use the standard printf
25396         format attribute.
25398 2020-11-23  Pádraig Brady  <P@draigBrady.com>
25400         selinux-at, selinux-h: use const correct declarations
25401         * lib/se-selinux.in.h: Use const for "set" functions,
25402         to match current selinux, and support cleaner user code.
25403         * lib/selinux-at.c: Likewise.
25404         * lib/selinux-at.h: Likewise.
25406 2020-11-22  Paul Eggert  <eggert@cs.ucla.edu>
25408         canonicalize-lgpl: fix memory leak
25409         * lib/canonicalize-lgpl.c (__realpath): Fix unlikely memory leak,
25410         which could have occurred if BUF was so large that malloc was
25411         called.  Do this by allocating EXTRA_BUF and BUF at the same time;
25412         this eliminates the need to free BUF separately.
25414 2020-11-22  Bruno Haible  <bruno@clisp.org>
25416         Fix missing module dependencies to 'xalloc' (regression 2020-10-19).
25417         * modules/xvasprintf (Depends-on): Add xalloc.
25418         * modules/pipe-filter-gi (Depends-on): Likewise.
25419         * modules/execute (Depends-on): Likewise, for w32spawn.h.
25420         * modules/spawn-pipe (Depends-on): Likewise.
25422 2020-11-22  Jose E. Marchesi  <jemarch@gnu.org>
25424         bootstrap: add option hooks
25425         * build-aux/bootstrap (bootstrap_print_option_usage_hook): Define.
25426         (bootstrap_option_hook): Likewise.
25427         (usage): Call bootstrap_print_option_usage_hook.
25429 2020-11-22  Bruno Haible  <bruno@clisp.org>
25431         argp: Don't break getprogname on non-glibc systems.
25432         * m4/argp.m4 (gl_ARGP): Don't expect <argp.h> to exist when testing for
25433         program_invocation_name and program_invocation_short_name.
25435 2020-11-22  Bruno Haible  <bruno@clisp.org>
25437         doc: Document <link.h>.
25438         * doc/glibc-headers/link.texi: New file.
25439         * doc/gnulib.texi: Include it.
25441 2020-11-22  Bruno Haible  <bruno@clisp.org>
25443         doc: Add references to the LSB.
25444         * doc/glibc-functions/*.texi: Add references to LSB 5.0.
25445         * doc/posix-functions/*.texi: Likewise.
25447 2020-11-22  Bruno Haible  <bruno@clisp.org>
25449         doc: Fix a makeinfo warning (regression 2020-11-03).
25450         * doc/posix-functions/aligned_alloc.texi: Add missing @item.
25452 2020-11-21  Paul Eggert  <eggert@cs.ucla.edu>
25454         parse-datetime: fix printf format typo
25455         * lib/parse-datetime.y (parse_datetime2): Fix format typo in
25456         previous patch to this file.  Problem reported by Chris Elvidge in
25457         <https://bugs.gnu.org/44763#32>.
25459         setlocale-null-tests: work around GCC bug 44511
25460         * tests/test-setlocale_null-mt-all.c:
25461         * tests/test-setlocale_null-mt-one.c:
25462         Ignore -Wreturn-type, to work around GCC bug 44511.
25464         nl_langinfo-tests: work around GCC bug 44511
25465         * tests/test-nl_langinfo-mt.c: Ignore -Wreturn-type, to work
25466         around a GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44511>.
25467         Problem reported for GNU grep by Andreas Schwab
25468         <https://bugs.gnu.org/44535>.
25470         selinux-h: add stubs for selabel_open etc.
25471         Coreutils with --enable-gcc-warnings does not build on Ubuntu 20.10
25472         because matchpathcon is deprecated in favor of selabel_open etc.,
25473         so this patch adds stubs for these functions.
25474         * lib/se-label.c, lib/se-label.in.h, m4/selinux-label-h.m4: New files.
25475         * lib/se-selinux.in.h (struct selinux_opt): Add incomplete decl,
25476         as it is needed for selabel_open and selinux/selinux.h declares
25477         this type here.
25478         * modules/selinux-h (Files): Add the new files.
25479         (configure.ac): Add gl_HEADERS_SELINUX_LABEL_H.
25480         (lib_SOURCES): Add se-label.in.h, se-label.c.
25481         (BUILT_SOURCES): Add $(SELINUX_LABEL_H).
25482         (selinux/label.h): New rule, mimicking selinux/context.h.
25483         (MOSTLYCLEANFILES): Add selinux/label.h, selinux/label.h-t.
25484         (Include): Add selinux/label.h.
25486 2020-11-21  Bruno Haible  <bruno@clisp.org>
25488         Update after 'test-driver' in Automake changed.
25489         * build-aux/test-driver.diff: Rebase.
25491 2020-11-21  Daiki Ueno  <ueno@gnu.org>
25493         read-file: remove dead assignment
25494         * lib/read-file.c (fread_file): Remove dead assignment when
25495         RF_SENSITIVE is set, flagged by clang-analyzer.
25497 2020-11-19  Akim Demaille  <akim@lrde.epita.fr>
25499         bitset: tests: exercise the stats too
25501         * tests/test-bitset.c: Display the stats at the end of the test.
25502         * lib/bitset/stats.c (bitset_log_histogram_print): When diplaying the
25503         last bin, display "256-..." rather that "256-511", since the last bin
25504         does count item greater than or equal to 256.
25506 2020-11-19  Akim Demaille  <akim@lrde.epita.fr>
25508         bitset: tests: try harder to break it
25509         * tests/test-bitset.c (compare): Be ready to use bitsets larger than
25510         BITSET_LIST_SIZE.
25511         (main): Likewise.
25512         While at it, also exercise super small bitsets.
25514 2020-11-19  Akim Demaille  <akim@lrde.epita.fr>
25516         bitset: use ffs where possible in the vector implementation
25517         * lib/bitset/vector.c (vbitset_list): Use BITSET_FOR_EACH_BIT.
25519 2020-11-19  Akim Demaille  <akim@lrde.epita.fr>
25521         bitset: use ffs where possible in the table implementation
25522         * lib/bitset/table.c (tbitset_list): Use BITSET_FOR_EACH_BIT.
25524 2020-11-19  Akim Demaille  <akim@lrde.epita.fr>
25526         bitset: check empty and full bitsets
25527         * tests/test-bitset.c (check_zero, check_ones): New.
25528         (check_attributes): Use them.
25530 2020-11-19  Akim Demaille  <akim@lrde.epita.fr>
25532         bitset: be sure to always return a value
25533         * lib/bitset/array.c (abitset_small_list): Always update *next and
25534         return a value.
25536 2020-11-19  Siddhesh Poyarekar  <siddhesh@gotplt.org>
25538         vcs-to-changelog: Expect spaces in file names
25539         Reported by Thierry Bothorel <thierry.bothorel@zaclys.net> in
25540         <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00040.html>,
25541         * build-aux/vcstocl/vcs_git.py (exec_git_cmd): Do not transform
25542         tabs to spaces.
25543         (list_changes): Use tabs to identify file names.
25545 2020-11-17  Akim Demaille  <akim@lrde.epita.fr>
25547         bitset: strengthen tests
25548         * tests/test-bitset.c (compare): Also check count.
25549         Deal only with random values, move the one-bit tests to...
25550         (check_one_bit): this new function.
25551         (check_attributes): Call it.
25553 2020-11-17  Akim Demaille  <akim@lrde.epita.fr>
25555         bitset: fix iteration over table bitsets
25556         * lib/bitset/table.c (tbitset_list): Update bitno when windex is.
25558 2020-11-17  Akim Demaille  <akim@lrde.epita.fr>
25560         bitset: rename internal details for consistency
25561         * lib/bitset/table.c: Rename all the EBITSET_ symbols as TBITSET_.
25563 2020-11-17  Akim Demaille  <akim@lrde.epita.fr>
25565         bitset: test: run deterministic tests on several bitset sizes
25566         * tests/test-bitset.c (check_attributes): Run it with small and large
25567         sizes.
25569 2020-11-17  Akim Demaille  <akim@lrde.epita.fr>
25571         bitset: use ffs where possible in the list implementation
25572         * lib/bitset/list.c (lbitset_list): Use BITSET_FOR_EACH_BIT.
25574 2020-11-17  Akim Demaille  <akim@lrde.epita.fr>
25576         bitset: use ffs where possible in array implementation
25577         * lib/bitset/array.c (abitset_small_list): Use BITSET_FOR_EACH_BIT.
25579 2020-11-17  Bruno Haible  <bruno@clisp.org>
25581         posixcheck: Don't enable GNULIB_POSIXCHECK in C++ mode.
25582         Reported by Tom G. Christensen <tgc@jupiterrise.com> in
25583         <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00062.html>.
25584         * m4/posixcheck.m4 (gl_POSIXCHECK): Don't define GNULIB_POSIXCHECK in
25585         C++ mode.
25587 2020-11-17  Bruno Haible  <bruno@clisp.org>
25589         Fix error when GNULIB_POSIXCHECK is enabled (regression 2019-06-04).
25590         * lib/unistd.in.h (copy_file_range): Don't assume that copy_file_range
25591         is always declared.
25592         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether copy_file_range is
25593         declared.
25595 2020-11-17  Bruno Haible  <bruno@clisp.org>
25597         Fix link errors on AIX.
25598         * modules/clean-temp (Link): Link with $(LIBTHREAD).
25599         * modules/getumask (Link): Link with $(LIBTHREAD).
25600         * modules/getumask-tests (Makefile.am): Link test-getumask with
25601         $(LIBTHREAD).
25602         * modules/supersede (Link): Link with $(LIBTHREAD).
25603         * modules/supersede-tests (Makefile.am): Link test-supersede with
25604         $(LIBTHREAD).
25605         * modules/fatal-signal (Link): New section.
25606         * modules/execute (Link): New section.
25607         * modules/csharpexec (Link): Link with $(LIBTHREAD).
25608         * modules/javaexec (Link): Link with $(LIBTHREAD).
25609         * modules/spawn-pipe (Link): New section.
25610         * modules/spawn-pipe-tests (Makefile.am): Link test-spawn-pipe-main with
25611         $(LIBTHREAD).
25612         * modules/csharpcomp (Link): Link with $(LIBTHREAD).
25613         * modules/javacomp (Link): Link with $(LIBTHREAD).
25614         * modules/javaversion (Link): Link with $(LIBTHREAD).
25615         * modules/pipe-filter-gi (Link): New section.
25616         * modules/pipe-filter-gi-tests (Makefile.am): Link test-pipe-filter-gi1,
25617         test-pipe-filter-gi2-main with $(LIBTHREAD).
25618         * modules/pipe-filter-ii (Link): New section.
25619         * modules/pipe-filter-ii-tests (Makefile.am): Link test-pipe-filter-ii1,
25620         test-pipe-filter-ii2-main with $(LIBTHREAD).
25621         * modules/term-style-control (Link): New section.
25622         * modules/term-style-control-tests (Makefile.am): Link
25623         test-term-style-control-hello, test-term-style-control-yes with
25624         $(LIBTHREAD).
25625         * modules/wait-process (Link): New section.
25626         * modules/nonblocking-pipe-tests (Makefile.am): Link
25627         test-nonblocking-pipe-main with $(LIBTHREAD).
25628         * modules/nonblocking-socket-tests (Makefile.am): Link
25629         test-nonblocking-socket-main with $(LIBTHREAD).
25631 2020-11-16  Bruno Haible  <bruno@clisp.org>
25633         Fix link errors on platforms with libunistring.
25634         * modules/c32isalnum (Link): New section.
25635         * modules/c32isalnum-tests (Makefile.am): Link test-c32isalnum with
25636         $(LIBUNISTRING).
25637         * modules/c32isalpha (Link): New section.
25638         * modules/c32isalpha-tests (Makefile.am): Link test-c32isalpha with
25639         $(LIBUNISTRING).
25640         * modules/c32isblank (Link): New section.
25641         * modules/c32isblank-tests (Makefile.am): Link test-c32isblank with
25642         $(LIBUNISTRING).
25643         * modules/c32iscntrl (Link): New section.
25644         * modules/c32iscntrl-tests (Makefile.am): Link test-c32iscntrl with
25645         $(LIBUNISTRING).
25646         * modules/c32isdigit (Link): New section.
25647         * modules/c32isdigit-tests (Makefile.am): Link test-c32isdigit with
25648         $(LIBUNISTRING).
25649         * modules/c32isgraph (Link): New section.
25650         * modules/c32isgraph-tests (Makefile.am): Link test-c32isgraph with
25651         $(LIBUNISTRING).
25652         * modules/c32islower (Link): New section.
25653         * modules/c32islower-tests (Makefile.am): Link test-c32islower with
25654         $(LIBUNISTRING).
25655         * modules/c32isprint (Link): New section.
25656         * modules/c32isprint-tests (Makefile.am): Link test-c32isprint with
25657         $(LIBUNISTRING).
25658         * modules/c32ispunct (Link): New section.
25659         * modules/c32ispunct-tests (Makefile.am): Link test-c32ispunct with
25660         $(LIBUNISTRING).
25661         * modules/c32isspace (Link): New section.
25662         * modules/c32isspace-tests (Makefile.am): Link test-c32isspace with
25663         $(LIBUNISTRING).
25664         * modules/c32isupper (Link): New section.
25665         * modules/c32isupper-tests (Makefile.am): Link test-c32isupper with
25666         $(LIBUNISTRING).
25667         * modules/c32isxdigit (Link): New section.
25668         * modules/c32isxdigit-tests (Makefile.am): Link test-c32isxdigit with
25669         $(LIBUNISTRING).
25670         * modules/unicodeio (Link): Mention $(LIBUNISTRING).
25671         * modules/unicodeio-tests (Makefile.am): Link test-unicodeio with
25672         $(LIBUNISTRING).
25674 2020-11-16  Bruno Haible  <bruno@clisp.org>
25676         Fix link errors on platforms with libintl (e.g. Solaris and AIX).
25677         Reported by Tom G. Christensen <tgc@jupiterrise.com> in
25678         <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00062.html>.
25679         * modules/getumask-tests (Makefile.am): Link test-getumask with
25680         $(LIBINTL).
25681         * modules/stack-tests (Makefile.am): Link test-stack with $(LIBINTL).
25682         * modules/supersede-tests (Makefile.am): Link test-supersede with
25683         $(LIBINTL).
25684         * modules/unicodeio-tests (Makefile.am): Link test-unicodeio with
25685         $(LIBINTL).
25687 2020-11-16  Bruno Haible  <bruno@clisp.org>
25689         getumask: Document link dependencies.
25690         * modules/getumask (Link): New section.
25692 2020-11-16  Bruno Haible  <bruno@clisp.org>
25694         Update link dependencies in modules after 2020-09-09 change.
25695         * modules/tempname (Link): Add $(LIB_CLOCK_GETTIME).
25696         * modules/mkdtemp (Link): Likewise.
25697         * modules/mkostemp (Link): Likewise.
25698         * modules/mkostemps (Link): Likewise.
25699         * modules/mkstemp (Link): Likewise.
25700         * modules/mkstemps (Link): Likewise.
25701         * modules/supersede (Link): Likewise.
25702         * modules/tmpfile (Link): Likewise.
25703         * modules/tmpfile-safer (Link): Likewise.
25705 2020-11-15  Paul Eggert  <eggert@cs.ucla.edu>
25707         getumask-tests: port to Solaris 10 etc.
25708         Problem reported by Tom Christensen in:
25709         https://lists.gnu.org/r/bug-gnulib/2020-11/msg00062.html
25710         * modules/getumask-tests (test_getumask_LDADD):
25711         Add $(LIB_CLOCK_GETTIME).
25713 2020-11-15  Akim Demaille  <akim@lrde.epita.fr>
25715         bitset: use ffsl to accelerate iterations over set bits
25716         Suggested by Bruno Haible.
25717         * modules/bitset: Depend upon ffsl.
25718         * lib/bitset/base.h (bitset_ffs, BITSET_FOR_EACH_BIT): New.
25719         * lib/bitset/array.c (abitset_list): Use BITSET_FOR_EACH_BIT.
25721 2020-11-15  Akim Demaille  <akim@lrde.epita.fr>
25723         bitset: more tests
25724         * tests/test-bitset.c (compare): Make it clear that the random values
25725         should not be modified.
25726         Check bitset_first, bitset_last and BITSET_FOR_EACH.
25728 2020-11-15  Akim Demaille  <akim@lrde.epita.fr>
25730         bitset: fix the copy from lbitset to other types
25731         * lib/bitset/list.c (lbitset_copy): Rename as...
25732         (lbitset_copy_): this.
25733         (lbitset_copy): New.
25734         Dispatch to heterogeneous/homogeneous copy.
25736 2020-11-15  Akim Demaille  <akim@lrde.epita.fr>
25738         bitset: making debug traces more useful
25739         * lib/bitset.c (bitset_print): Print the bitset type in verbose mode.
25741         bitset: comment changes
25742         * lib/bitset.c: Move some documenting comments to...
25743         * lib/bitset.h: here.
25744         * lib/bitset/array.c: Fix some comments.
25746 2020-11-14  Paul Eggert  <eggert@cs.ucla.edu>
25748         careadlinkat: warn better about GCC bug 93644
25749         * lib/careadlinkat.c (readlink_stk): When --enable-gcc-warnings is
25750         not in effect, use "#warning" to let builders know more clearly
25751         about GCC bug 93644, because the bug triggers even if no -W option
25752         is given to GCC.
25754 2020-11-13  Jim Meyering  <meyering@fb.com>
25756         hard-locale-tests: avoid a -Wstrict-prototypes warning
25757         * tests/locale.c (main): Placate gcc's -Wstrict-prototypes by
25758         changing "main ()" to "main (void)". This was the only case that
25759         triggered a warning when building grep with --enable-gcc-warnings.
25761 2020-11-11  Paul Eggert  <eggert@cs.ucla.edu>
25763         time_rz: simplify CVE-2017-7476 fix
25764         * lib/time_rz.c: Do not include limits.h; I think it was included
25765         under the mistaken impression that limits.h defines SIZE_MAX.
25766         (SIZE_MAX): Remove.
25767         (save_abbr): Put string length into a ptrdiff_t variable,
25768         so that the size comparison works naturally.  This
25769         fixes CVE-2017-7476 in a cleaner way.
25771         parse-datetime: streamline overflow checking
25772         When parse-datetime.y’s overflow code was written, INT_ADD_WRAPV
25773         did not work for unsigned destinations, and since time_t might
25774         be unsigned that meant it did not work for time_t destinations.
25775         This limitation of INT_ADD_WRAPV has been fixed, so we can
25776         now streamline parse-datetime.y a bit.
25777         * lib/parse-datetime.y: Do not include limits.h, as LONG_MAX
25778         has not been used for a while.
25779         (yylex, parse_datetime2): Assume C99 declarations after statements.
25780         (yyles): Use INT_SUBTRACT_WRAPV instead of an explicit comparison
25781         to TYPE_MINIMUM.
25782         (parse_datetime2): No need for time_overflow now that
25783         INT_ADD_WRAPV works for unsigned results.
25785         parse-datetime-tests: port to Alpine Linux 3.12.1
25786         * tests/test-parse-datetime.c: Include errno.h for errno,
25787         and unistd.h for _SC_TZNAME_MAX and sysconf.
25788         (main): In the outlandishly-long time zone abbreviation test,
25789         do not exceed TZNAME_MAX as this has undefined behavior,
25790         and on Alpine Linux 3.12.1 it makes the test fail.
25792 2020-11-09  Pádraig Brady  <P@draigBrady.com>
25794         mgetgroups: avoid warning with clang
25795         * lib/mgetgroups.c: Xcode-12.1 identifies as GCC 4.2.1,
25796         so disable -Wpointer-sign for all clang versions.
25798 2020-11-07  Bruno Haible  <bruno@clisp.org>
25800         gnulib-tool: Fix link error with 'version-etc' (regression 2020-05-29).
25801         Reported by Simon Josefsson in
25802         <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00032.html>.
25803         * gnulib-tool (func_emit_tests_Makefile_am): Add libtests.a to
25804         LDADD a third time, after the second occurrence of ../lib/libgnu.a.
25805         * pygnulib/GLEmiter.py (tests_Makefile_am): Likewise.
25807 2020-11-04  Paul Eggert  <eggert@cs.ucla.edu>
25809         tests: pacify Sun C 5.9
25810         Without these changes, Sun C 5.9 (2009/11/22) issues complaints like
25811         “"test-nl_langinfo-mt.c", line 75: warning: statement not reached”.
25812         * tests/test-nl_langinfo-mt.c (thread1_func, thread2_func)
25813         (thread3_func, thread4_func, thread5_func, thread6_func, threadN_func):
25814         * tests/test-setlocale_null-mt-all.c (thread1_func, thread2_func):
25815         * tests/test-setlocale_null-mt-one.c (thread1_func, thread2_func):
25816         Remove unreachable ‘return NULL;’s.
25818         tests: port better to XLC 12.01
25819         * tests/test-argmatch.c (CHECK): Do not use -1 as a subscript,
25820         even in code that is not executed, as IBM XLC 12.01 complains "The
25821         subscript -1 is less than zero."
25822         * tests/test-stdint.c (verify_width): Pass an (unused) 3rd
25823         argument to _GL_VERIFY, as ISO C requires.  Otherwise, IBM XLC
25824         12.01 complains "The invocation of macro _GL_VERIFY contains fewer
25825         arguments than are required by the macro definition."
25827 2020-11-03  Bruno Haible  <bruno@clisp.org>
25829         aligned-malloc: Use fixes from the new modules.
25830         * modules/aligned-malloc (Depends-on): Add posix_memalign,
25831         aligned_alloc, memalign.
25832         (configure.ac): Use AC_CHECK_FUNCS_ONCE.
25834 2020-11-03  Bruno Haible  <bruno@clisp.org>
25836         aligned_alloc: Add tests.
25837         * tests/test-aligned_alloc.c: New file.
25838         * modules/aligned_alloc-tests: New file.
25840         aligned_alloc: New module.
25841         * lib/stdlib.in.h (aligned_alloc): New declaration.
25842         * lib/aligned_alloc.c: New file.
25843         * m4/aligned_alloc.m4: New file.
25844         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether aligned_alloc is declared.
25845         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_ALIGNED_ALLOC,
25846         HAVE_ALIGNED_ALLOC, REPLACE_ALIGNED_ALLOC.
25847         * modules/stdlib (Makefile.am): Substitute GNULIB_ALIGNED_ALLOC,
25848         HAVE_ALIGNED_ALLOC, REPLACE_ALIGNED_ALLOC.
25849         * modules/aligned_alloc: New file.
25850         * tests/test-stdlib-c++.cc (aligned_alloc): Check signature.
25851         * doc/posix-functions/aligned_alloc.texi: Mention the new module and the
25852         AIX bug.
25854 2020-11-03  Bruno Haible  <bruno@clisp.org>
25856         posix_memalign: Add tests.
25857         * tests/test-posix_memalign.c: New file.
25858         * modules/posix_memalign-tests: New file.
25860         posix_memalign: New module.
25861         * lib/stdlib.in.h (posix_memalign): New declaration.
25862         * lib/posix_memalign.c: New file.
25863         * m4/posix_memalign.m4: New file.
25864         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether posix_memalign is declared.
25865         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_POSIX_MEMALIGN,
25866         HAVE_POSIX_MEMALIGN, REPLACE_POSIX_MEMALIGN.
25867         * modules/stdlib (Makefile.am): Substitute GNULIB_POSIX_MEMALIGN,
25868         HAVE_POSIX_MEMALIGN, REPLACE_POSIX_MEMALIGN.
25869         * modules/posix_memalign: New file.
25870         * tests/test-stdlib-c++.cc (posix_memalign): Check signature.
25871         * doc/posix-functions/posix_memalign.texi: Mention the new module and
25872         the OpenBSD bug.
25874 2020-11-03  Bruno Haible  <bruno@clisp.org>
25876         memalign: Add tests.
25877         * tests/test-memalign.c: New file.
25878         * modules/memalign-tests: New file.
25880         memalign: New module.
25881         * modules/memalign: New file.
25882         * doc/glibc-functions/memalign.texi: Mention the new module.
25884 2020-11-03  Bruno Haible  <bruno@clisp.org>
25886         verify tests: Fix crash with GCC (regression 2020-11-02).
25887         * tests/test-verify.c (main): Fix initializer of s.
25889 2020-11-03  Pádraig Brady  <P@draigBrady.com>
25891         mountlist: recognize more file system types as remote
25893         * lib/mountlist.c (ME_REMOTE): Sync previously unconsidered
25894         "remote" file systems from stat.c in coreutils.
25896 2020-11-02  Bernhard Voelker  <mail@bernhard-voelker.de>
25898         verify tests: Fix -Wuninitialized warning (regression 2020-10-30).
25899         * tests/test-verify.c (main): Initialize state variable.
25900         Reported by Bruno Haible for GCC 5.4.0.
25902 2020-11-02  Paul Eggert  <eggert@cs.ucla.edu>
25904         dfa.h: support inclusion from C++
25905         * lib/dfa.h: Allow multiple inclusion, and inclusion from
25906         C++ code.  The latter was suggested by Arnold Robbins.
25908 2020-11-01  Bruno Haible  <bruno@clisp.org>
25910         ssfmalloc tests: Portability to Linux/PowerPC and Linux/SPARC.
25911         * tests/test-ssfmalloc.c: Include <limits.h>.
25912         (PAGESIZE_MAX): Set to 65536 on Linux/PowerPC.
25914 2020-11-01  Bruno Haible  <bruno@clisp.org>
25916         verify tests: Fix compilation error with MSVC (regression 2020-10-30).
25917         * tests/test-verify.c (test_assume_noreturn): Fix declaration.
25919 2020-11-01  Jim Meyering  <meyering@fb.com>
25921         dfa-tests: test for today's invalid-merge fix
25922         * tests/test-dfa-invalid-merge.sh: New file.
25923         * modules/dfa-tests (Files): Add it.
25924         (TESTS): Add it.
25926 2020-11-01  Norihiro Tanaka  <noritnk@kcn.ne.jp>
25928         dfa: retain sequences of similar nodes in optimization
25929         DFA was merging similar nodes when it should not.  For example,
25930         it would convert a+a+a to a+a.  Now, a sequence of similar nodes
25931         is not merged.  Problem reported by Gonzalo Padrino in
25932         https://bugs.gnu.org/44351
25933         * lib/dfa.c (merge_nfa_state): Skip the follow for repetition in
25934         optimization.
25936 2020-11-01  Jim Meyering  <meyering@fb.com>
25938         test-dfa-match-aux.c: accept EREs, not BREs
25939         * tests/test-dfa-match-aux.c (main): Specify RE_SYNTAX_EGREP, not
25940         RE_SYNTAX_GREP, so tests can use ERE syntax rather than BRE.
25942 2020-10-30  Bernhard Voelker  <mail@bernhard-voelker.de>
25944         verify tests: avoid -Wmissing-declarations warnings
25945         * tests/test-verify.c (test_assume_expressions): Add declaration.
25946         (test_assume_optimization): Likewise.
25947         (test_assume_noreturn): Likewise.
25948         (main): Move down after all other definitions.  While at it, also
25949         call test_assume_expressions and test_assume_optimization as a
25950         runtime check.
25952 2020-10-26  Paul Eggert  <eggert@cs.ucla.edu>
25954         sys_stat: update comments for S_IRWXUGO, S_IXUGO
25955         * lib/sys_stat.in.h (S_IXUGO, S_IRWXUGO): Update comments.
25956         Perhaps these macros should be removed, as they’re not in either
25957         POSIX or GNU.  They could be moved to stat-macros.h, which would
25958         be cleaner in some sense.
25960 2020-10-25  Bruno Haible  <bruno@clisp.org>
25962         ssfmalloc tests: Small tweaks.
25963         * tests/test-ssfmalloc.c: Add comments.
25964         (alloc_pages): Don't require PROT_EXEC bits.
25965         (block_sizes): Add more small sizes, for better coverage of
25966         ssfmalloc-bitmap.h.
25968         ssfmalloc tests: Portability to Minix.
25969         * modules/ssfmalloc-tests (Files): Add m4/mmap-anon.m4.
25970         (configure.ac): Invoke gl_FUNC_MMAP_ANON.
25971         * m4/mmap-anon.m4: Update comment.
25973         ssfmalloc: Portability to AIX.
25974         * modules/ssfmalloc (Include): Add ssfmalloc.h.
25975         (Link): New section.
25976         * modules/ssfmalloc-tests (Makefile.am): Link test-ssfmalloc with
25977         $(LIBTHREAD).
25979         ssfmalloc: Portability to Cygwin.
25980         * lib/ssfmalloc.h: Add parameter PAGESIZE_MAX.
25981         (pg_offset_t): Define depending on PAGESIZE_MAX.
25982         * tests/test-ssfmalloc.c: Undefine PAGESIZE.
25983         (PAGESIZE_MAX): New macro.
25985         ssfmalloc: Fix buffer overrun in bitmap search.
25986         * lib/ssfmalloc-bitmap.h (find_first_packet_set): Don't access the
25987         word *words_end.
25989 2020-10-24  Paul Eggert  <eggert@cs.ucla.edu>
25991         doc: mention ‘restrict’ and C++
25992         * doc/gnulib-readme.texi (C99 features assumed): Document
25993         that ‘restrict’ should be avoided in C++ code.
25995 2020-10-20  Bernhard Voelker  <mail@bernhard-voelker.de>
25997         selinux-at, selinux-h: port to SELinux 3.1
25998         The new release finally deprecated the typedef 'security_context_t',
25999         see <https://github.com/SELinuxProject/selinux/commit/7a124ca275>.
26000         Use the simpler 'char *' instead.
26001         * lib/getfilecon.c (getfilecon): Adjust type of context parameter.
26002         (lgetfilecon): Likewise.
26003         (fgetfilecon): Likewise.
26004         (map_to_failure): Likewise.
26005         (rpl_getfilecon): Likewise.
26006         (rpl_lgetfilecon): Likewise.
26007         (rpl_fgetfilecon): Likewise.
26008         * lib/se-selinux.in.h (security_context_t): Remove typedef.
26009         (getcon): Adjust type of context parameter.
26010         (freecon): Likewise.
26011         (getfscreatecon): Likewise.
26012         (setfscreatecon): Likewise.
26013         (matchpathcon): Likewise.
26014         (getfilecon): Likewise.
26015         (lgetfilecon): Likewise.
26016         (fgetfilecon): Likewise.
26017         (setfilecon): Likewise.
26018         (lsetfilecon): Likewise.
26019         (fsetfilecon): Likewise.
26020         (security_check_context): Likewise.
26021         (security_check_context_raw): Likewise.
26022         (setexeccon): Likewise.
26023         (security_compute_create): Likewise.
26024         * lib/selinux-at.c (getfileconat): Likewise.
26025         (lgetfileconat): Likewise.
26026         (setfileconat): Likewise.
26027         (lsetfileconat): Likewise.
26028         * lib/selinux-at.h: Likewise.
26030 2020-10-19  Bruno Haible  <bruno@clisp.org>
26032         xalloc-die: Fix link error with Solaris cc (regression 2020-07-27).
26033         * lib/xalloc.h (xalloc_die): Don't declare if GNULIB_XALLOC_DIE is 0.
26034         (xmalloc, xzalloc, xcalloc, xrealloc, x2realloc, xmemdup, xstrdup,
26035         XMALLOC, XNMALLOC, XZALLOC, XCALLOC, xnmalloc, xnrealloc, x2nrealloc,
26036         xcharalloc): Don't declare/define if GNULIB_XALLOC is 0.
26037         * modules/xalloc (configure.ac): Define GNULIB_XALLOC.
26038         * modules/xalloc-die (configure.ac): Define GNULIB_XALLOC_DIE.
26040 2020-10-18  Bruno Haible  <bruno@clisp.org>
26042         ssfmalloc: Add tests.
26043         * tests/test-ssfmalloc.c: New file.
26044         * modules/ssfmalloc-tests: New file.
26046         ssfmalloc: New module.
26047         * lib/ssfmalloc.h: New file.
26048         * lib/ssfmalloc-bitmap.h: New file.
26049         * modules/ssfmalloc: New file.
26051 2020-10-18  Bruno Haible  <bruno@clisp.org>
26053         wchar: Fix configure test result on some versions of AIX.
26054         Reported by Clément Chigot <clement.chigot@atos.net> in
26055         <https://lists.gnu.org/archive/html/bug-gnulib/2020-10/msg00115.html>.
26056         * m4/wchar_h.m4 (gl_WCHAR_H_INLINE_OK): Execute the test only on glibc
26057         systems.
26059 2020-10-18  Bruno Haible  <bruno@clisp.org>
26061         time: Fix warning about asctime when asctime is not used.
26062         * lib/time.in.h (asctime_r, ctime, ctime_r): Fix _GL_WARN_ON_USE
26063         invocation.
26065 2020-10-18  Bruno Haible  <bruno@clisp.org>
26067         *-list, *-oset, *-omap: Avoid a GCC warning (regression 2020-10-10).
26068         * lib/gl_anylinked_list2.h (gl_linked_iterator_free): Remove
26069         '_GL_ATTRIBUTE_CONST'.
26070         * lib/gl_anytree_list2.h (gl_tree_iterator_free): Likewise.
26071         * lib/gl_anytree_omap.h (gl_tree_iterator_free): Likewise.
26072         * lib/gl_anytree_oset.h (gl_tree_iterator_free): Likewise.
26073         * lib/gl_array_list.c (gl_array_iterator_free): Likewise.
26074         * lib/gl_array_omap.c (gl_array_iterator_free): Likewise.
26075         * lib/gl_array_oset.c (gl_array_iterator_free): Likewise.
26076         * lib/gl_carray_list.c (gl_carray_iterator_free): Likewise.
26078 2020-10-18  Bruno Haible  <bruno@clisp.org>
26080         obstack: Fix a clang warning.
26081         * lib/obstack.c (print_and_abort): Mark as __attribute_noreturn__.
26083 2020-10-16  Bruno Haible  <bruno@clisp.org>
26085         hash: Rename hash_delete to hash_remove.
26086         * lib/hash.h (hash_remove): Renamed from hash_delete.
26087         (hash_delete): New declaration.
26088         * lib/hash.c (hash_remove): Renamed from hash_delete.
26089         (hash_delete): New function.
26090         * tests/test-hash.c (main): Update.
26091         * lib/fts-cycle.c (leave_dir): Likewise.
26092         * NEWS: Mention the change.
26094 2020-10-16  Bruno Haible  <bruno@clisp.org>
26096         hash, xhash: Make usable from C++.
26097         * lib/hash.h: Add extern "C".
26099 2020-10-16  Bruno Haible  <bruno@clisp.org>
26101         hash, xhash: Move comments to the .h file.
26102         * lib/hash.c: Move comments meant for the user from here...
26103         * lib/xhash.c: ... and here...
26104         * lib/hash.h: ... to here.
26106 2020-10-13  Philipp Klaus Krause  <pkk@spth.de>  (tiny change)
26108         Don't declare an intention to modify the return value of strerror.
26109         * tests/test-perror2.c (main): Assign the return value of strerror to a
26110         'const char *' variable.
26112 2020-10-11  Bruno Haible  <bruno@clisp.org>
26114         *printf: Avoid "expanded before it was required" warning.
26115         * m4/printf.m4 (gl_SNPRINTF_TRUNCATION_C99): Define through
26116         AC_DEFUN_ONCE.
26118 2020-10-11  Benji Wiebe  <benjiwiebe14@gmail.com>
26120         getprogname: Add support for OpenServer 6 and UnixWare 7.
26121         * lib/getprogname.c: Include <fcntl.h>, <stdlib.h>, <string.h>.
26122         (getprogname): On OpenServer6 and UnixWare, read /proc/<pid>/cmdline.
26124 2020-10-11  Bruno Haible  <bruno@clisp.org>
26126         tests: Avoid a name clash on UnixWare.
26127         Reported by Tim Rice <tim@multitalents.net> in
26128         <https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00025.html>.
26129         * tests/nap.h (nap): Define as gl_nap on OpenServer and UnixWare.
26131 2020-10-11  Bruno Haible  <bruno@clisp.org>
26133         stdioext: Update comments regarding UnixWare.
26134         Reported by Tim Rice <tim@multitalents.net> in
26135         <https://lists.gnu.org/archive/html/bug-gnulib/2020-10/msg00005.html>.
26136         * lib/fbufmode.c: Update comments.
26137         * lib/fflush.c: Likewise.
26138         * lib/fpending.c: Likewise.
26139         * lib/fpurge.c: Likewise.
26140         * lib/freadable.h: Likewise.
26141         * lib/freadable.c: Likewise.
26142         * lib/freadahead.c: Likewise.
26143         * lib/freading.h: Likewise.
26144         * lib/freading.c: Likewise.
26145         * lib/freadptr.c: Likewise.
26146         * lib/freadseek.c: Likewise.
26147         * lib/fseeko.c: Likewise.
26148         * lib/fseterr.c: Likewise.
26149         * lib/fwritable.h: Likewise.
26150         * lib/fwritable.c: Likewise.
26151         * lib/fwriting.h: Likewise.
26152         * lib/fwriting.c: Likewise.
26154 2020-10-11  Bruno Haible  <bruno@clisp.org>
26156         stdioext: Treat OpenServer 6 and UnixWare 7 like OpenServer 5.
26157         Reported by Tim Rice <tim@multitalents.net> in
26158         <https://lists.gnu.org/archive/html/bug-gnulib/2020-10/msg00005.html>.
26159         Uses the info from
26160         <https://lists.gnu.org/archive/html/bug-gnulib/2020-10/msg00028.html>.
26161         * lib/stdio-impl.h: Test also __SCO_VERSION__ and __sysv5__.
26163 2020-10-11  Bruno Haible  <bruno@clisp.org>
26165         stdioext: Avoid compilation errors on UnixWare 7.
26166         Reported by Tim Rice <tim@multitalents.net> in
26167         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00127.html>.
26168         * lib/fbufmode.c: Don't include <stdio_ext.h> if it does not exist.
26169         * lib/fpurge.c: Likewise.
26170         * lib/freadable.h: Likewise.
26171         * lib/freading.h: Likewise.
26172         * lib/fwritable.h: Likewise.
26173         * lib/fwriting.h: Likewise.
26174         * m4/fbufmode.m4 (gl_FUNC_FBUFMODE): Test whether <stdio_ext.h> exists.
26175         * m4/fpurge.m4 (gl_FUNC_FPURGE): Likewise.
26176         * m4/freadable.m4 (gl_FUNC_FREADABLE): Likewise.
26177         * m4/freading.m4 (gl_FUNC_FREADING): Likewise.
26178         * m4/fwritable.m4 (gl_FUNC_FWRITABLE): Likewise.
26179         * m4/fwriting.m4 (gl_FUNC_FWRITING): Likewise.
26181 2020-10-11  Bruno Haible  <bruno@clisp.org>
26183         stdioext: Update comments regarding Cygwin.
26184         * lib/fpending.c: Update comments.
26185         * lib/fpurge.c: Likewise.
26186         * lib/freadable.h: Likewise.
26187         * lib/freadable.c: Likewise.
26188         * lib/freading.h: Likewise.
26189         * lib/freading.c: Likewise.
26190         * lib/fwritable.h: Likewise.
26191         * lib/fwritable.c: Likewise.
26192         * lib/fwriting.h: Likewise.
26193         * lib/fwriting.c: Likewise.
26195 2020-10-11  KO Myung-Hun  <komh78@gmail.com>
26197         Fix "warning: implicit declaration of function 'pthread_sigmask'".
26198         * lib/signal.in.h [__KLIBC__]: Include <pthread.h>.
26199         * lib/sys_select.in.h [__KLIBC__]: Do not include <signal.h>.
26201 2020-10-10  Bruno Haible  <bruno@clisp.org>
26203         *-list, *-oset, *-omap: Avoid possible compiler warnings.
26204         Reported by Marc Nieper-Wißkirchen in
26205         <https://lists.gnu.org/r/bug-gnulib/2020-10/msg00025.html>.
26206         * lib/gl_anylinked_list2.h (gl_linked_iterator,
26207         gl_linked_iterator_from_to): Mark as 'pure'.
26208         (gl_linked_iterator_free): Mark as 'const'.
26209         * lib/gl_anytree_list2.h (gl_tree_size, gl_tree_node_value,
26210         gl_tree_search_from_to, gl_tree_indexof_from_to, gl_tree_iterator,
26211         gl_tree_iterator_from_to, gl_tree_sortedlist_search,
26212         gl_tree_sortedlist_search_from_to, gl_tree_sortedlist_indexof,
26213         gl_tree_sortedlist_indexof_from_to): Mark as 'pure'.
26214         (gl_tree_iterator_free): Mark as 'const'.
26215         * lib/gl_anytree_omap.h (gl_tree_size, gl_tree_iterator): Mark as
26216         'pure'.
26217         (gl_tree_iterator_free): Mark as 'const'.
26218         * lib/gl_anytree_oset.h (gl_tree_size, gl_tree_next_node,
26219         gl_tree_prev_node, gl_tree_iterator): Mark as 'pure'.
26220         (gl_tree_iterator_free): Mark as 'const'.
26221         * lib/gl_anytreehash_list1.h (node_position, compare_by_position,
26222         compare_position_threshold): Mark as 'pure'.
26223         * lib/gl_array_list.c (gl_array_size, gl_array_indexof_from_to,
26224         gl_array_search_from_to, gl_array_iterator, gl_array_iterator_from_to,
26225         gl_array_sortedlist_indexof_from_to, gl_array_sortedlist_indexof,
26226         gl_array_sortedlist_search_from_to, gl_array_sortedlist_search): Mark as
26227         'pure'.
26228         (gl_array_iterator_free): Mark as 'const'.
26229         * lib/gl_array_omap.c (gl_array_size, gl_array_indexof, gl_array_search,
26230         gl_array_search_atleast, gl_array_iterator): Mark as 'pure'.
26231         (gl_array_iterator_free): Mark as 'const'.
26232         * lib/gl_array_oset.c (gl_array_size, gl_array_indexof, gl_array_search,
26233         gl_array_indexof_atleast, gl_array_search_atleast, gl_array_iterator,
26234         gl_array_iterator_atleast): Mark as 'pure'.
26235         (gl_array_iterator_free): Mark as 'const'.
26236         * lib/gl_carray_list.c (gl_carray_size, gl_carray_node_value,
26237         gl_carray_next_node, gl_carray_previous_node, gl_carray_get_at,
26238         gl_carray_indexof_from_to, gl_carray_search_from_to, gl_carray_iterator,
26239         gl_carray_iterator_from_to, gl_carray_sortedlist_indexof_from_to,
26240         gl_carray_sortedlist_indexof, gl_carray_sortedlist_search_from_to,
26241         gl_carray_sortedlist_search): Mark as 'pure'.
26242         (gl_carray_iterator_free): Mark as 'const'.
26244 2020-10-10  Bruno Haible  <bruno@clisp.org>
26246         rbtree-list: Avoid possible compiler warnings.
26247         This mirrors the change of avltree-list on 2014-09-16.
26248         * lib/gl_rbtree_list.c (gl_rbtree_list_check_invariants): Add extern
26249         declaration. Add cast to void for ignored value of check_invariants.
26251 2020-10-10  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
26253         stack: New module.
26254         * MODULES.html.sh: Add entry for the stack module.
26255         * modules/stack: New file.
26256         * modules/stack-tests: New file.
26257         * lib/stack.h: New file.
26258         * tests/test-stack.c: New file.
26260 2020-10-10  Paul Eggert  <eggert@cs.ucla.edu>
26262         attribute: improve const, pure doc
26263         Problem reported by Marc Nieper-Wißkirchen in:
26264         https://lists.gnu.org/r/bug-gnulib/2020-10/msg00035.html
26265         * lib/attribute.h (ATTRIBUTE_CONST, ATTRIBUTE_PURE): Improv doc.  See:
26266         https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51971#c1
26268 2020-10-05  Paul Eggert  <eggert@cs.ucla.edu>
26270         thread: pacify GCC on Solaris 10
26271         Problem reported by Kiyoshi KANAZAWA for grep (Bug#43666#29).
26272         * lib/glthread/thread.h (gl_thread_self): Use ‘(pthread_t) 0’
26273         instead of ‘(pthread_t) NULL’, to pacify GCC on Solaris 10
26274         where pthread_t is unsigned int.
26276 2020-10-04  Paul Eggert  <eggert@cs.ucla.edu>
26278         c-stack: avoid AS_IF
26279         Problem reported by Bruno Haible in:
26280         https://lists.gnu.org/r/bug-gnulib/2020-10/msg00018.html
26281         * m4/c-stack.m4 (gl_PREREQ_C_STACK): No need for AS_IF.
26283         c-stack: pacify GCC 9.3.1 when using libsigsegv
26284         * lib/c-stack.c [USE_LIBSIGSEGV]: Disable --suggest-attribute=pure.
26286 2020-10-04  Bruno Haible  <bruno@clisp.org>
26288         localename: Fix a couple of "unused parameter" warnings.
26289         Reported by Marc Nieper-Wißkirchen <marc@nieper-wisskirchen.de> in
26290         <https://lists.gnu.org/archive/html/bug-gnulib/2020-10/msg00014.html>.
26291         * lib/localename.c (gl_locale_name_thread_unsafe, gl_locale_name_thread,
26292         gl_locale_name_posix, gl_locale_name_environ): Add _GL_UNUSED in
26293         parameter list.
26295 2020-10-04  Bruno Haible  <bruno@clisp.org>
26297         vasnprintf: Don't use %n on modern, ISO C 99 compliant platforms.
26298         Suggested by Jeremie Courreges-Anglas <jca@wxcvbn.org> in
26299         <https://lists.gnu.org/archive/html/bug-gnulib/2020-10/msg00010.html>.
26300         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Define
26301         HAVE_SNPRINTF_TRUNCATION_C99.
26302         * lib/vasnprintf.c (VASNPRINTF): Don't use %n if
26303         HAVE_SNPRINTF_RETVAL_C99 && HAVE_SNPRINTF_TRUNCATION_C99.
26305 2020-10-03  Paul Eggert  <eggert@cs.ucla.edu>
26307         c-stack: streamline Solaris configuration
26308         * lib/c-stack.c: Omit mention of HAVE_SIGALTSTACK, since
26309         the code is used only if a test for sigaltstack worked
26310         in some other way.
26311         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Do not require gl_LIBSIGSEGV;
26312         instead, execute gl_LIBSIGSEGV only if needed (because the XSI
26313         heuristic does not work).
26314         * modules/c-stack (Files): Add m4/libsigsegv.m4, since
26315         we no longer require the libsigsegv module.
26316         (Depends-on): Depend on havelib, not libsigsegv.
26318         c-stack: stop using SIGSTKSZ
26319         It’s been proposed to stop making SIGSTKSZ an integer constant:
26320         https://sourceware.org/pipermail/libc-alpha/2020-September/118028.html
26321         Also, using SIGSTKSZ in #if did not conform to current POSIX.
26322         Also, avoiding SIGSTKSZ makes the code simpler and easier to grok.
26323         * lib/c-stack.c (SIGSTKSZ): Remove.
26324         (alternate_signal_stack): Now a 64 KiB array, for simplicity.
26325         All uses changed.
26327         c-stack: fix libsigsegv typo
26328         Problem reported by Bruno Haible in:
26329         https://lists.gnu.org/r/bug-gnulib/2020-09/msg00175.html
26330         * lib/c-stack.c (USE_LIBSIGSEGV): Fix typo that caused libsigsegv
26331         to be used only on Solaris (exactly where it is not needed!).
26333 2020-10-03  Thien-Thi Nguyen  <ttn@gnuvola.org>
26335         MODULES.html.sh: Fix typo.
26336         * MODULES.html.sh (Numeric conversion functions <stdlib.h>): Fix typo.
26338 2020-09-28  Paul Eggert  <eggert@cs.ucla.edu>
26340         version-etc: pacify Oracle Studio 12.6
26341         Without this patch, it complains: "version-etc.h", line 64:
26342         warning: token-less macro argument (E_TOKENLESS_MACRO)" when in
26343         pedantic mode.
26344         * lib/version-etc.h (version_etc): Port to C89 macro rules.
26346 2020-09-27  Bruno Haible  <bruno@clisp.org>
26348         Avoid "warning: The macro `AC_DECL_SYS_SIGLIST' is obsolete".
26349         Reported by Gavin Smith <gavinsmith0123@gmail.com> in
26350         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00154.html>.
26351         * m4/strsignal.m4 (gl_PREREQ_STRSIGNAL): Check for sys_siglist
26352         ourselves; don't use AC_DECL_SYS_SIGLIST.
26354 2020-09-27  Bruno Haible  <bruno@clisp.org>
26356         Avoid "warning: The macro `_AC_COMPUTE_INT' is obsolete".
26357         Reported by Gavin Smith <gavinsmith0123@gmail.com> in
26358         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00154.html>.
26359         * m4/gethostname.m4 (gl_PREREQ_HOST_NAME_MAX): Use AC_COMPUTE_INT
26360         instead of _AC_COMPUTE_INT.
26362 2020-09-27  Bruno Haible  <bruno@clisp.org>
26364         Avoid "warning: The macro `AC_HEADER_STDC' is obsolete".
26365         Reported by Gavin Smith <gavinsmith0123@gmail.com> in
26366         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00154.html>.
26367         Based on a patch by Paul Eggert.
26368         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Don't require AC_HEADER_STDC. Don't
26369         test STDC_HEADERS. Assume <stdlib.h> exists.
26370         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Likewise.
26372 2020-09-27  Bruno Haible  <bruno@clisp.org>
26374         Enable testing of prereleases of Autoconf 2.70.
26375         Suggested by Paul Eggert in
26376         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00160.html>.
26377         * m4/alloca.m4 (_AC_LIBOBJ_ALLOCA): Test for Autoconf >= 2.69c, not
26378         >= 2.70.
26379         * m4/largefile.m4 (AC_SYS_LARGEFILE): Likewise.
26380         * m4/pid_t.m4 (AC_TYPE_PID_T): Likewise.
26381         * m4/sys_types_h.m4 (AC_HEADER_MAJOR): Likewise.
26383 2020-09-27  Bruno Haible  <bruno@clisp.org>
26385         Avoid "warning: The macro `AC_PROG_CC_STDC' is obsolete".
26386         Reported by Gavin Smith <gavinsmith0123@gmail.com> in
26387         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00151.html>.
26388         * m4/gnulib-common.m4 (gl_PROG_CC_C99): Use AC_PROG_CC_C99 or
26389         AC_PROG_CC, depending on the Autoconf version.
26391 2020-09-27  Gavin Smith  <gavinsmith0123@gmail.com>
26393         Avoid "warning: The macro `AC_HELP_STRING' is obsolete".
26394         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Use AS_HELP_STRING instead
26395         of AC_HELP_STRING.
26396         * m4/libgcrypt.m4 (AM_PATH_LIBGCRYPT): Likewise.
26398 2020-09-27  Bruno Haible  <bruno@clisp.org>
26400         Avoid "warning: $as_echo_n is obsolete" from autoconf 2.69c.
26401         Reported by Gavin Smith <gavinsmith0123@gmail.com> in
26402         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00151.html>.
26403         * m4/gnulib-common.m4 (gl_CACHE_VAL_SILENT): Use gl_SILENT.
26405 2020-09-27  Bruno Haible  <bruno@clisp.org>
26407         extensions: Simplify last commit.
26408         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't require
26409         AC_GNU_SOURCE ever.
26411 2020-09-26  Paul Eggert  <eggert@cs.ucla.edu>
26413         extensions: require AC_GNU_SOURCE only for <=2.63
26414         Problem reported by Gavin Smith in:
26415         https://lists.gnu.org/r/autoconf/2020-09/msg00012.html
26416         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS):
26417         Require AC_GNU_SOURCE only for Autoconf 2.63 and earlier, since it
26418         shouldn’t be needed after that, and Autoconf 2.70 complains about
26419         it being obsolete.
26421 2020-09-26  Bruno Haible  <bruno@clisp.org>
26423         regex-tests: Make test more robust.
26424         * tests/test-regex.c (main): Make sure to revert the locale to "C" after
26425         the test in "tr_TR.UTF-8" locale. Exit if we can't revert it.
26427 2020-09-25  Paul Eggert  <eggert@cs.ucla.edu>
26429         regex-tests: fix possible Turkish false-alarm
26430         * modules/regex-tests (Depends-on): Add wctype-h.
26431         * tests/test-regex.c: Include wctype.h.
26432         (main): Check that ‘i’ uppercases to ‘İ’ in Turkish,
26433         as the Turkish regex test assumes this.
26435         regex-tests: fix test and add debug output
26436         Perhaps this will fix the recent grep test failure reported at:
26437         https://buildfarm.opencsw.org/buildbot/builders/ggrep-solaris10-sparc/builds/199
26438         At least, the debug output should help narrow down the failure.
26439         * tests/test-regex.c: Include stdarg.h, stdio.h.
26440         (exit_status): New var.
26441         (report_error): New function.
26442         (main): Use it to report failures to stdout instead of merely
26443         exiting with some nonzero status.  The status info alone isn’t
26444         enough to do remote debugging.  In the new tr_TR.UTF-8 test, clear
26445         regex before calling re_compile_pattern, fixing a portability bug.
26447         regex: no longer match glibc
26448         * config/srclist.txt: Comment out regex_internal.c for now.
26450 2020-09-23  Paul Eggert  <eggert@cs.ucla.edu>
26452         regex: fix ignore-case Turkish bug
26453         * lib/regex_internal.c (build_wcs_upper_buffer):
26454         Do not assume that converting single-byte character to upper
26455         yields a single-byte character.  This is not true for Turkish,
26456         where towupper (L'i') yields L'İ', which is not single-byte.
26457         * tests/test-regex.c (main): Test for this bug.
26459         regex: port to weird isascii platforms
26460         * lib/regex_internal.h (isascii) [!_LIBC]: Supply glibc version.
26462 2020-09-20  Norihiro Tanaka  <noritnk@kcn.ne.jp>
26464         dfa: make dfasupported a global function
26465         * lib/dfa.c (dfasupported): Rename, and make it global.
26466         Update caller.
26467         * lib/dfa.h (dfasupported): Add prototype.
26469 2020-09-20  Bruno Haible  <bruno@clisp.org>
26471         canonicalize: Add support for UNC file names on native Windows.
26472         Reported and initial patch by Vaclav Slavik <vaclav@slavik.io> in
26473         <https://savannah.gnu.org/bugs/?59079>.
26474         * lib/canonicalize.c (canonicalize_filename_mode): For UNC file names,
26475         extend the prefix to include the server.
26477 2020-09-20  Bruno Haible  <bruno@clisp.org>
26479         supersede: Fix test failures on native Windows.
26480         * lib/supersede.c (open_supersede): Handle non-regular files on native
26481         Windows like on Solaris.
26482         * tests/test-supersede-open.h (test_open_supersede): Use O_BINARY flag.
26484 2020-09-20  Paul Eggert  <eggert@cs.ucla.edu>
26486         test-stdalign: test Oracle Studio better
26487         * doc/posix-headers/stdalign.texi (stdalign.h):
26488         * tests/test-stdalign.c (main):
26489         Sun Studio Bug #2125432 seems to be fixed.
26491         c-stack: output diagnostic in single 'write'
26492         * lib/c-stack.c (die): In the typical case, use just one 'write'
26493         syscall to output the diagnostic, as this lessens interleaving.
26494         (die, c_stack_action): Assume C99.
26495         * modules/c-stack (Depends-on): Add c99, mempcpy.
26497         c-stack: improve checking if !libsigsegv
26498         If SIGINFO_WORKS, do not treat a null pointer dereference as if it
26499         were a stack overflow.  Use uintptr_t and INT_ADD_WRAPV to avoid
26500         unlikely pointer overflow.  Also, fix some obsolete code and typos.
26501         I found these problems while looking into this bug report:
26502         https://lists.gnu.org/r/grep-devel/2020-09/msg00053.html
26503         * lib/c-stack.c: Include c-stack.h first, to test interface.
26504         Include inttypes.h for UINTPTR_MAX, stdbool.h, stddef.h for
26505         max_align_t, intprops.h for INT_ADD_WRAPV.
26506         (USE_LIBSIGSEGV): New macro; use it to simplify later code.
26507         (SIGSTKSZ): Simplify setup.  Work around libsigsegv bug only
26508         for libsigsegv 2.8 and earlier since the bug should be fixed
26509         after that.
26510         (alternate_signal_stack): Use max_align_t instead of doing it by hand.
26511         (segv_handler, overflow_handler, segv_handler) [DEBUG]:
26512         Assume sprintf returns byte count; this assumption is safe now.
26513         (page_size): New static volatile variable, since sysconf isn’t
26514         documented to be async-signal-safe on Solaris.  This variable is
26515         present and used if (!USE_LIBSIGSEGV && HAVE_SIGALTSTACK &&
26516         HAVE_DECL_SIGALTSTACK && HAVE_STACK_OVERFLOW_HANDLING &&
26517         SIGINFO_WORKS).
26518         (segv_handler): Use it if present.  Never report null pointer
26519         dereference as a stack overflow.  Check for (unlikely) unsigned
26520         and/or pointer overflow.
26521         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
26522         Rename cache variables to gl_cv_sys_stack_overflow_works
26523         and gl_cv_sys_xsi_stack_overflow_heuristic.
26524         All uses changed.
26525         (gl_PREREQ_C_STACK): Do not require AC_FUNC_ALLOCA, since
26526         c-stack no longer uses STACK_DIRECTION.
26527         Do not check for unistd.h, since we depend on unistd.
26528         Fix shell typo ‘$"ac_cv_sys_xsi_stack_overflow_heuristic"’.
26529         * modules/c-stack (Depends-on): Sort.  Add intprops, inttypes,
26530         stdbool, stddef.
26532 2020-09-20  Bruno Haible  <bruno@clisp.org>
26534         Revert now-unnecessary override of config.guess on Alpine Linux 3.10.
26535         * m4/musl.m4: Revert 2020-09-19 patch.
26536         * m4/setlocale_null.m4: Likewise.
26537         * modules/setlocale-null: Likewise.
26539 2020-09-19  Ben Pfaff  <blp@cs.stanford.edu>
26540             Bruno Haible  <bruno@clisp.org>
26542         relocatable-prog: Fix for multiple relocatable library directories.
26543         * build-aux/reloc-ldflags: Fix handling of multiple relocatable library
26544         directories.  Each one needs its own -Wl,-rpath,$dir option, instead of
26545         being attached to a single one.
26547 2020-09-19  Jim Meyering  <meyering@fb.com>
26549         test-verify.c: avoid -Wshadow warnings
26550         * tests/test-verify.c (gx): Rename global from "x". Adjust use.
26551         (enum): Capitalize member names. Adjust uses.
26553 2020-09-19  Bruno Haible  <bruno@clisp.org>
26555         havelib: Avoid linking with libc.a on GNU systems.
26556         Reported by Bruce Dubbs <bruce.dubbs@gmail.com> in
26557         <https://lists.gnu.org/archive/html/grep-devel/2020-09/msg00052.html>.
26558         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): When processing the
26559         dependency_libs value of a .la file, ignore '-lc' options on GNU
26560         systems.
26562 2020-09-19  Bruno Haible  <bruno@clisp.org>
26564         Fix recognition of musl libc on Alpine Linux 3.10.
26565         Reported by Jeffrey Walton <noloader@gmail.com> in
26566         <https://lists.gnu.org/archive/html/grep-devel/2020-09/msg00020.html>.
26567         * m4/musl.m4 (gl_MUSL_CANONICAL_HOST): New macro.
26568         (gl_MUSL_LIBC): Require it.
26569         * m4/setlocale_null.m4 (gl_FUNC_SETLOCALE_NULL): Likewise.
26570         * modules/setlocale-null (Files): Add m4/musl.m4.
26572 2020-09-19  Bruno Haible  <bruno@clisp.org>
26574         nl_langinfo: Make multithread-safe on Solaris 10 and Solaris 11.3.
26575         Reported for Solaris 10 by Dagobert Michelsen via Paul Eggert in
26576         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00023.html>
26577         and for Solaris 11.3 by Jeffrey Walton <noloader@gmail.com> in
26578         <https://lists.gnu.org/archive/html/bug-grep/2020-06/msg00013.html>.
26579         * lib/nl_langinfo-lock.c: New file, based on lib/setlocale_null-lock.c.
26580         * lib/nl_langinfo.c: Include <stdlib.h> and <windows.h> or <pthread.h>
26581         or <threads.h>.
26582         (ITEMS, MAX_RESULT_LEN): New macros.
26583         (nl_langinfo_unlocked): New function.
26584         (gl_get_nl_langinfo_lock): New declaration.
26585         (nl_langinfo_with_lock): New function, based on lib/setlocale_null.c.
26586         (rpl_nl_langinfo): Use nl_langinfo_with_lock instead of nl_langinfo.
26587         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Require gl_PTHREADLIB. Define
26588         HAVE_THREADS_H. Set NL_LANGINFO_MTSAFE. If setting it to 0, also set
26589         REPLACE_NL_LANGINFO.
26590         (gl_PREREQ_NL_LANGINFO_LOCK): New macro.
26591         * modules/nl_langinfo (Files): Add lib/nl_langinfo-lock.c,
26592         lib/windows-initguard.h, m4/threadlib.m4, m4/visibility.m4.
26593         (configure.ac): Compile nl_langinfo-lock.c when NL_LANGINFO_MTSAFE is 0.
26594         * doc/posix-functions/nl_langinfo.texi: Mention the Solaris bug.
26596 2020-09-18  Bruno Haible  <bruno@clisp.org>
26598         fsusage, getaddrinfo: Produce more regular configure output.
26599         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Remove AC_MSG_CHECKING without
26600         corresponding AC_MSG_RESULT.
26601         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Likewise.
26603 2020-09-18  Bruno Haible  <bruno@clisp.org>
26605         Add back gl_SILENT.
26606         * m4/gnulib-common.m4 (GL_TMP_FD, gl_SILENT): New macros.
26608 2020-09-18  Paul Eggert  <eggert@cs.ucla.edu>
26610         c-stack-tests: fix -fsanitize=undefined false alarm
26611         * tests/test-c-stack2.sh: Skip the test-harness self-test
26612         if ‘gcc -fsanitize=undefined’ is in use.
26614 2020-09-17  Paul Eggert  <eggert@cs.ucla.edu>
26616         signalblocking: simplify and remove gl_SILENT
26617         gl_SILENT was problematic because if a trap was sprung, stderr
26618         generated during the trap was lost.  Avoid the problem by
26619         removing the need for gl_SILENT.
26620         * m4/gnulib-common.m4 (GL_TMP_FD, gl_SILENT): Remove.
26621         * m4/signalblocking.m4 (gl_SIGNALBLOCKING):
26622         Simplify, avoiding the need for gl_SILENT while preserving the
26623         ability of the user to override the value of the cache variable,
26624         now ac_cv_func_sigprocmask.
26626 2020-09-17  Bruno Haible  <bruno@clisp.org>
26628         sigprocmask: Fix configuration failure on Solaris 10 (regr. 2020-07-25).
26629         * m4/gnulib-common.m4 (GL_TMP_FD): New macro.
26630         (gl_SILENT): Use 'exec', not a compound statement, to redirect
26631         AS_MESSAGE_FD.
26633 2020-09-17  Paul Eggert  <eggert@cs.ucla.edu>
26635         intprops, xalloc: avoid __builtin_mul_overflow_p with Clang
26636         Problem reported by Nelson H. F. Beebe for clang 9.0.1 in:
26637         https://lists.gnu.org/r/grep-devel/2020-09/msg00028.html
26638         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_P) [__clang__]:
26639         Define to 0.
26640         * lib/xalloc-oversized.h (xalloc_oversized) [__clang__]:
26641         Do not use __builtin_mul_overflow_p.
26643         libc-config: port __THROW to Ubuntu 4
26644         * lib/cdefs.h (__THROW): Do not use __attribute__ ((__nothrow__))
26645         for GCC 3.3.  Problem reported by Jeffrey Walton in:
26646         https://lists.gnu.org/r/bug-gnulib/2019-07/msg00058.html
26647         The GCC 3.3.4 documentation says the attribute should work, but
26648         apparently it does not work on Ubuntu 4’s GCC 3.3.  There seems
26649         little point or desire to research this circa-2004 platform further,
26650         so just avoid the attribute there.
26652 2020-09-17  Jim Meyering  <meyering@fb.com>
26654         test-dfa-match.sh: port timeout work-around to newer Busybox
26655         * tests/test-dfa-match.sh: Update timeout -t portability test to
26656         accommodate Busybox 1.30.0 and newer.
26658 2020-09-16  Paul Eggert  <eggert@cs.ucla.edu>
26660         fnmatch: adjust to match glibc fix
26661         This fixes handling of collating symbols in fnmatch (glibc bug 26620).
26662         This does not affect Gnulib; it merely keeps Gnulib and glibc
26663         closer together, to help with any eventual merge, by incorporating
26664         a recent glibc patch.  The patch and the following commentary is
26665         by Andreas Schwab.
26666         * lib/fnmatch_loop.c (FCT) [WIDE_CHAR_VERSION]: The variable idx
26667         contains the index into the extra array, whereas wextra points
26668         into the extra array at this index, containing the length of the
26669         following collating sequence in the wide character representation.
26671 2020-09-16  Bruno Haible  <bruno@clisp.org>
26673         stat, fstat: Fix compilation error with old mingw headers.
26674         Reported by Eli Zaretskii <eliz@gnu.org> in
26675         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00027.html>.
26676         * lib/stat-w32.c (VOLUME_NAME_NONE): Define if the Windows headers don't
26677         define it.
26679 2020-09-16  Bruno Haible  <bruno@clisp.org>
26681         stat, fstat: Fix when compiling for versions older than Windows Vista.
26682         Reported by Eli Zaretskii <eliz@gnu.org> in
26683         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00027.html>.
26684         * lib/stat-w32.c: Include <sdkddkver.h>. Test the value of _WIN32_WINNT
26685         that was originally set before we redefined it.
26686         * m4/stat.m4 (gl_PREREQ_STAT_W32): New macro.
26687         (gl_PREREQ_STAT): Require it.
26688         * m4/fstat.m4 (gl_PREREQ_FSTAT): Likewise.
26690 2020-09-15  Paul Eggert  <eggert@cs.ucla.edu>
26692         dfa: remove dfa-heap-overrun workaround
26693         * lib/dfa.c (reorder_tokens): Go back to a single pass that
26694         both sets map[*] and does other things.  This reverts
26695         2020-09-14T01:20:01Z!eggert@cs.ucla.edu, which is no longer
26696         neeeded now that 2020-09-14T13:21:05Z!noritnk@kcn.ne.jp
26697         fixed the underlying problem.
26699 2020-09-13  Paul Eggert  <eggert@cs.ucla.edu>
26701         dfa: avoid use of uninitialized constraint
26702         * lib/dfa.c (merge_nfa_state): Do not initialize the constraint
26703         to zero here.
26704         (dfaoptimize): Do it here instead, via xcalloc.  This prevents the
26705         use of an uninitialized constraint by later code when ! (flags[i]
26706         & OPT_QUEUED) means merge_nfa_state was not called to initialize
26707         the constraint.  Problem found by running 'valgrind src/grep -E
26708         '(^| )*(a|b)*(c|d)*( |$)' < /dev/null' on Ubuntu 18.04.5 x86-64.
26710         dfa: assume C99 in reorder_tokens
26711         * lib/dfa.c (reorder_tokens): Assume C99 and simplify.
26713         dfa: fix dfa-heap-overrun failure
26714         * lib/dfa.c (reorder_tokens): When setting
26715         map[d->follows[i].elems[j].index], instead of incorrectly assuming
26716         that (i < d->follows[i].elems[j].index), use two loops, one to set
26717         the map array and the other to use it.  The incorrect assumption
26718         caused some elements to be missed, and this in turn caused grep's
26719         dfa-heap-overrun test to fail on Solaris 10 sparc when compiled
26720         with GCC.  I found this bug while investigating
26721         https://buildfarm.opencsw.org/buildbot/builders/ggrep-solaris10-sparc/builds/183
26722         and I think the bug also occurs on GNU/Linux but with more-subtle
26723         symptoms.  The bug predates the recent dfa.c changes; perhaps the
26724         recent changes make the bug more likely.
26726 2020-09-13  Bruno Haible  <bruno@clisp.org>
26728         parse-datetime: Make the build rule work with parallel 'make'.
26729         Reported by Daiki Ueno <ueno@gnu.org> in
26730         <https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00036.html>.
26731         * modules/parse-datetime (Makefile.am): Use a phony target and the
26732         general idiom for rules that produce multiple files.
26734 2020-09-13  Ben Pfaff  <blp@cs.stanford.edu>
26736         getpass: Check for nonnull prompt argument while avoiding warnings.
26737         * lib/getpass.c (_GL_ARG_NONNULL): Define to empty.
26738         (getpass) [!_WIN32]: Print prompt only if nonnull.
26740 2020-09-12  Paul Eggert  <eggert@cs.ucla.edu>
26742         dfa: epsilon-closure tweaks (Bug#40634)
26743         Rename BACKWORD to BACKWARD consistently.
26744         * lib/dfa.c (struct dfa): Reorder members to reduce fragmentation.
26745         (addtok_mb): Redo slightly to make it act more like a state machine.
26746         Check depth only when it increases.
26747         (epsclosure): Let the switch test the tokens.
26748         (dfaanalyze): Cache tindex.  Simplify position loops.
26749         Prefer xcalloc to xnmalloc + explicit zeroing.  Free BACKWARD
26750         only if it is not null, since we're testing that anyway.
26751         (dfaanalyze, build_state): Use merge2 instead of doing it by hand.
26753 2020-09-12  Norihiro Tanaka  <noritnk@kcn.ne.jp>
26755         dfa: use backward set in removal of epsilon closure
26756         When removing in epsilon closure, the code searched all nodes
26757         sequentially, and this was slow for some cases.  Build a backward
26758         set before search, and only check previous position with the set.
26759         Problem reported in <https://bugs.gnu.org/40634>.
26760         * lib/dfa.c (struct dfa): New member 'epsilon'.
26761         (addtok_mb): Check whether a pattern has epsilon node or not.
26762         (epsclosure): New arg BACKWORD; caller changed.  When removing
26763         epsilon node and reconnecting, check only previous positions.
26764         Treat BEG as if it were character.
26765         (dfaanalyze): Build backward set.
26767 2020-09-10  Paul Eggert  <eggert@cs.ucla.edu>
26769         canonicalize: fix pointer indexing bugs
26770         Problem reported by Florian Weimer in:
26771         https://lists.gnu.org/r/bug-gnulib/2020-09/msg00025.html
26772         * lib/canonicalize-lgpl.c (__realpath):
26773         * lib/canonicalize.c (canonicalize_filename_mode):
26774         Do not generate a pointer past the end of the array.
26775         * lib/canonicalize.c (canonicalize_filename_mode):
26776         Do not use a pointer after passing it to realloc.
26778 2020-09-09  Paul Eggert  <eggert@cs.ucla.edu>
26780         tempname: help merge with glibc
26781         Inspired by draft patches by Adhemerval Zanella in:
26782         https://sourceware.org/pipermail/libc-alpha/2020-September/117501.html
26783         https://sourceware.org/pipermail/libc-alpha/2020-September/117502.html
26784         * lib/tempname.c: Include stdalign.h, time.h.
26785         If _LIBC, do not include random-bits.h.
26786         (__getrandom, __clock_gettime64, __timespec64) [!_LIBC]: New macros.
26787         (RANDOM_BITS): Remove, replacing with ...
26788         (random_bits): ... this new static function.  All uses changed.
26789         Add entropy each time if getrandom is not supported.
26790         (RANDOM_VALUE, BASE_62_DIGITS, BASE_62_POWER):
26791         Assume 64-bit support a la C99.
26792         (try_tempname_len): Take advantage of ASLR when initializing
26793         random value.
26794         * modules/tempname (Depends-on): Add clock-time, stdalign, time.
26796         getcwd: merge recent glibc changes
26797         * lib/getcwd.c (GETCWD_RETURN_TYPE) [!_LIBC]: New macro.
26798         (__getcwd, getcwd) [_LIBC && !GETCWD_RETURN_TYPE]: Add aliases.
26800 2020-09-06  Bruno Haible  <bruno@clisp.org>
26802         attribute: Clarify which file to include.
26803         * modules/attribute (Include): Add "attribute.h".
26805 2020-09-06  Bruno Haible  <bruno@clisp.org>
26807         pipe-filter-ii, pipe-filter-gi: Fix warnings on native Windows.
26808         * lib/pipe-filter-ii.c: Include <process.h>.
26809         * lib/pipe-filter-gi.c: Likewise.
26811 2020-09-05  Paul Eggert  <eggert@cs.ucla.edu>
26813         verify: avoid __builtin_assume
26814         Our latest attempt to use Clang’s __builtin_assume caused a crash
26815         in GNU Emacs that we spent quite some time tracking down as being
26816         caused by the switch to __builtin_assume.  It’s not known whether
26817         the crash is due is a Clang bug or a portability bug in GNU Emacs.
26818         For now, play it safe and avoid __builtin_assume.
26819         * lib/verify.h (_GL_HAS_BUILTIN_ASSUME): Remove.
26820         (assume): Simplify by not trying to use Clang’s __builtin_assume.
26822 2020-09-05  Bruno Haible  <bruno@clisp.org>
26824         Fix several "warning: no previous prototype for function".
26825         * modules/unicase/locale-language (Makefile.am): Add a 'static' keyword
26826         in front of the declaration of the lookup function in
26827         unicase/locale-languages.h.
26828         * modules/unictype/bidiclass-byname (Makefile.am): Likewise in
26829         unictype/bidi_byname.h.
26830         * modules/unictype/category-byname (Makefile.am): Likewise in
26831         unictype/categ_byname.h.
26832         * modules/unictype/combining-class-byname (Makefile.am): Likewise in
26833         unictype/combiningclass_byname.h.
26834         * modules/unictype/joininggroup-byname (Makefile.am): Likewise in
26835         unictype/joininggroup_byname.h.
26836         * modules/unictype/joiningtype-byname (Makefile.am): Likewise in
26837         unictype/joiningtype_byname.h.
26838         * modules/unictype/property-byname (Makefile.am): Likewise in
26839         unictype/pr_byname.h.
26840         * modules/unictype/scripts (Makefile.am): Likewise in
26841         unictype/scripts_byname.h.
26842         * modules/uninorm/composition (Makefile.am): Likewise in
26843         uninorm/composition-table.h.
26845 2020-09-05  Bruno Haible  <bruno@clisp.org>
26847         select: Fix "warning: no previous prototype for function".
26848         * lib/select.c: Include <sys/select.h>.
26850 2020-09-05  Bruno Haible  <bruno@clisp.org>
26852         Use module 'c99' when needed for variadic macros with '...' syntax.
26853         * modules/crypto/sm3 (Depends-on): Add c99.
26855 2020-09-05  Bruno Haible  <bruno@clisp.org>
26857         Use module 'c99' when needed for subobject initializer syntax.
26858         * modules/tempname (Depends-on): Add c99.
26859         * modules/nstrftime-tests (Depends-on): Likewise.
26861 2020-09-05  Bruno Haible  <bruno@clisp.org>
26863         Use module 'c99' when needed for declaration-after-statement syntax.
26864         * modules/backup-rename (Depends-on): Add c99.
26865         * modules/backupfile (Depends-on): Likewise.
26866         * modules/bitset-tests (Depends-on): Likewise.
26867         * modules/bitsetv (Depends-on): Likewise.
26868         * modules/c-strtod (Depends-on): Likewise.
26869         * modules/c-strtold (Depends-on): Likewise.
26870         * modules/clean-temp (Depends-on): Likewise.
26871         * modules/copy-file (Depends-on): Likewise.
26872         * modules/crypto/hmac-md5-tests (Depends-on): Likewise.
26873         * modules/crypto/hmac-sha1-tests (Depends-on): Likewise.
26874         * modules/crypto/hmac-sha256-tests (Depends-on): Likewise.
26875         * modules/crypto/hmac-sha512-tests (Depends-on): Likewise.
26876         * modules/crypto/md5-buffer (Depends-on): Likewise.
26877         * modules/crypto/md5-tests (Depends-on): Likewise.
26878         * modules/crypto/sha1-buffer (Depends-on): Likewise.
26879         * modules/crypto/sha1-tests (Depends-on): Likewise.
26880         * modules/crypto/sha256-buffer (Depends-on): Likewise.
26881         * modules/crypto/sha256-tests (Depends-on): Likewise.
26882         * modules/crypto/sha512-buffer (Depends-on): Likewise.
26883         * modules/crypto/sha512-tests (Depends-on): Likewise.
26884         * modules/diffseq (Depends-on): Likewise.
26885         * modules/fatal-signal (Depends-on): Likewise.
26886         * modules/fchmodat (Depends-on): Likewise.
26887         * modules/fstrcmp (Depends-on): Likewise.
26888         * modules/fsusage (Depends-on): Likewise.
26889         * modules/fts (Depends-on): Likewise.
26890         * modules/fts-tests (Depends-on): Likewise.
26891         * modules/getumask (Depends-on): Likewise.
26892         * modules/git-merge-changelog (Depends-on): Likewise.
26893         * modules/hash-map (Depends-on): Likewise.
26894         * modules/hash-set (Depends-on): Likewise.
26895         * modules/lchmod (Depends-on): Likewise.
26896         * modules/libgmp-tests (Depends-on): Likewise.
26897         * modules/libtextstyle-optional-tests (Depends-on): Likewise.
26898         * modules/linkedhash-map (Depends-on): Likewise.
26899         * modules/linkedhash-set (Depends-on): Likewise.
26900         * modules/long-options (Depends-on): Likewise.
26901         * modules/mbrtoc32 (Depends-on): Likewise.
26902         * modules/memchr2-tests (Depends-on): Likewise.
26903         * modules/memmem-tests (Depends-on): Likewise.
26904         * modules/memrchr-tests (Depends-on): Likewise.
26905         * modules/mktime-internal (Depends-on): Likewise.
26906         * modules/nstrftime (Depends-on): Likewise.
26907         * modules/opendirat (Depends-on): Likewise.
26908         * modules/parse-datetime (Depends-on): Likewise.
26909         * modules/quotearg-simple-tests (Depends-on): Likewise.
26910         * modules/same (Depends-on): Likewise.
26911         * modules/supersede (Depends-on): Likewise.
26912         * modules/supersede-tests (Depends-on): Likewise.
26913         * modules/time_rz (Depends-on): Likewise.
26914         * modules/unistr/u16-chr-tests (Depends-on): Likewise.
26915         * modules/unistr/u32-chr-tests (Depends-on): Likewise.
26916         * modules/unistr/u8-chr-tests (Depends-on): Likewise.
26917         * modules/xalloc (Depends-on): Likewise.
26918         * modules/xnanosleep (Depends-on): Likewise.
26920 2020-09-05  Bruno Haible  <bruno@clisp.org>
26922         Fix "warning: array initialized from parenthesized string constant".
26923         * tests/test-memmem.c (main): Remove parentheses around string constant.
26924         * tests/test-c-strcasestr.c (main): Likewise.
26925         * tests/test-strcasestr.c (main): Likewise.
26927 2020-09-05  Bruno Haible  <bruno@clisp.org>
26929         argmatch tests: Fix ISO C compliance warning.
26930         * tests/test-argmatch.c: Omit semicolon after ARGMATCH_DEFINE_GROUP
26931         invocation.
26933 2020-09-05  Bruno Haible  <bruno@clisp.org>
26935         uniname/uniname: Fix -Wshadow warning.
26936         * lib/uniname/uniname.c (unicode_name_word): Don't declare i upfront.
26937         * modules/uniname/uniname (Depends-on): Add c99.
26939 2020-09-05  Bruno Haible  <bruno@clisp.org>
26941         uniname/uniname: Fix -Wshorten-64-to-32 warnings.
26942         * lib/uniname/uniname.c (unicode_name_word_lookup): Change type of last
26943         argument to size_t.
26944         (unicode_name_character): Change type of len, n1, n2, n3, words_length,
26945         n to size_t.
26947 2020-09-05  Bruno Haible  <bruno@clisp.org>
26949         unistr/u{8,16,32}-uctomb: Avoid possible trouble with huge strings.
26950         * lib/unistr.in.h (u8_uctomb_aux, u8_uctomb, u16_uctomb_aux, u16_uctomb,
26951         u32_uctomb): Change type of last argument to ptrdiff_t.
26952         * lib/unistr/u8-uctomb.c (u8_uctomb): Likewise.
26953         * lib/unistr/u8-uctomb-aux.c (u8_uctomb_aux): Likewise.
26954         * lib/unistr/u16-uctomb.c (u16_uctomb): Likewise.
26955         * lib/unistr/u16-uctomb-aux.c (u16_uctomb_aux): Likewise.
26956         * lib/unistr/u32-uctomb.c (u32_uctomb): Likewise.
26958 2020-09-01  Paul Eggert  <eggert@cs.ucla.edu>
26960         manywarnings: remove -Wchkp and -Wabi from C++ too
26961         Suggested by Reuben Thomas in:
26962         https://lists.gnu.org/r/bug-gnulib/2020-09/msg00001.html
26963         At some point somebody should merge the many other manywarnings-c.m4
26964         changes into manywarnings-c++.m4 too, e.g.,
26965         2020-07-02T00:00:51Z!eggert@cs.ucla.edu.
26966         * m4/manywarnings-c++.m4 (gl_MANYWARN_ALL_GCC_CXX_IMPL):
26967         Remove -Wchkp, -Wabi.
26969 2020-08-30  Bruno Haible  <bruno@clisp.org>
26971         strerrorname_np: Add tests.
26972         * tests/test-strerrorname_np.c: New file.
26973         * modules/strerrorname_np-tests: New file.
26975         strerrorname_np: New module.
26976         * lib/string.in.h (strerrorname_np): New declaration.
26977         * lib/strerrorname_np.c: New file.
26978         * m4/strerrorname_np.m4: New file.
26979         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Test whether strerrorname_np
26980         is declared.
26981         (gl_HEADER_STRING_H_DEFAULTS): Initialize GNULIB_STRERRORNAME_NP,
26982         HAVE_STRERRORNAME_NP, REPLACE_STRERRORNAME_NP.
26983         * modules/string (Makefile.am): Substitute GNULIB_STRERRORNAME_NP,
26984         HAVE_STRERRORNAME_NP, REPLACE_STRERRORNAME_NP.
26985         * modules/strerrorname_np: New file.
26986         * tests/test-string-c++.cc: Verify the signature of strerrorname_np.
26987         * doc/glibc-functions/strerrorname_np.texi: Mention the new module and
26988         the glibc 2.32 bug.
26990 2020-08-27  Paul Eggert  <eggert@cs.ucla.edu>
26992         perror, strerror_r: remove unportable tests
26993         Problem reported by Florian Weimer in:
26994         https://lists.gnu.org/r/bug-gnulib/2020-08/msg00220.html
26995         * tests/test-perror2.c (main):
26996         * tests/test-strerror_r.c (main): Omit unportable tests.
26998 2020-08-26  Bruno Haible  <bruno@clisp.org>
27000         stdint, wchar, wctype-h: Change configure message.
27001         * m4/wint_t.m4 (gt_TYPE_WINT_T): Say "checking whether wint_t is large
27002         enough..." instead of "checking whether wint_t is too small...".
27004 2020-08-26  Bruno Haible  <bruno@clisp.org>
27006         time_rz: Change configure message.
27007         * m4/time_rz.m4 (gl_TIME_RZ): Say "checking whether localtime works even
27008         near extrema..." instead of "checking whether localtime loops forever
27009         near extrema...".
27011 2020-08-26  Bruno Haible  <bruno@clisp.org>
27013         stdint: Change configure message.
27014         * m4/stdint.m4 (gl_STDINT_H): Say "checking whether stdint.h works
27015         without ISO C predefines..." instead of "checking whether stdint.h
27016         predates C++11...".
27018 2020-08-26  Bruno Haible  <bruno@clisp.org>
27020         socketlib: Change configure message.
27021         * m4/socketlib.m4 (gl_SOCKETLIB): Say "checking for WSAStartup..."
27022         instead of "checking if we need to call WSAStartup in winsock2.h and
27023         -lws2_32...".
27025 2020-08-26  Bruno Haible  <bruno@clisp.org>
27027         include_next: Change configure message.
27028         * m4/include_next.m4 (gl_INCLUDE_NEXT): Say "checking whether source
27029         code line length is unlimited..." instead of "checking whether system
27030         header files limit the line length...".
27032 2020-08-26  Bruno Haible  <bruno@clisp.org>
27034         getcwd: Change configure message.
27035         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Say "checking
27036         whether getcwd succeeds when 4k < cwd_length < 16k..." instead of
27037         "checking whether getcwd aborts when 4k < cwd_length < 16k...".
27039 2020-08-26  Bruno Haible  <bruno@clisp.org>
27041         chdir-long: Change configure message.
27042         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Say "checking whether this
27043         system supports file names of any length..." instead of "checking
27044         whether this system has an arbitrary file name length limit...".
27045         Set gl_cv_have_unlimited_file_name_length instead of
27046         gl_cv_have_arbitrary_file_name_length_limit.
27047         * modules/chdir-long (Depends-on, configure.ac): Update accordingly.
27049 2020-08-26  Bruno Haible  <bruno@clisp.org>
27051         ceill: Change configure message.
27052         * m4/ceill.m4 (gl_FUNC_CEILL): Say "checking whether ceill() works..."
27053         instead of "checking whether ceill() breaks with small values...".
27055 2020-08-26  Bruno Haible  <bruno@clisp.org>
27057         iconv: Change configure message.
27058         * m4/iconv.m4 (AM_ICONV): Say "checking whether iconv is compatible
27059         with its POSIX signature..." instead of "checking for iconv
27060         declaration...". Remove K&R C support.
27062 2020-08-26  Paul Eggert  <eggert@cs.ucla.edu>
27064         getcwd: help the merge back into glibc
27065         This patch was inspired by Adhemerval Zanella’s proposed glibc patches:
27066         https://sourceware.org/pipermail/libc-alpha/2020-August/117294.html
27067         The idea is to make it easier for Gnulib lib/getcwd.c to match
27068         glibc io/getcwd-generic.c.
27069         * lib/getcwd.c [_LIBC]: Do not include pathmax.h.
27070         Include not-cancel.h.
27071         (HAVE_OPENAT, D_INO_IN_DIRENT, HAVE_MSVC_INVALID_PARAMETER_HANDLER)
27072         (HAVE_MINIMALLY_WORKING_GETCWD): Define for the _LIBC case.
27073         (__getcwd, __lstat, __readdir) [!_LIBC]: Remove these macros.
27074         (__close_nocancel_nostatus, __getcwd_generic, stat64, __fstat64)
27075         (__fstatat64, __lstat64, __readdir64, __fdopendir, __openat)
27076         (__rewinddir, __openat64, dirent64) [_LIBC]: New macros.
27077         (__getcwd_generic): Rename from __getcwd.
27078         Use the abovementioned macros for consistency with glibc.
27079         (weak_alias): Remove.
27081 2020-08-25  Bruno Haible  <bruno@clisp.org>
27083         verify: Avoid warnings when assume(0) is used.
27084         Reported by Mattias Engdegård <mattiase@acm.org> via Paul Eggert in
27085         <https://lists.gnu.org/archive/html/emacs-devel/2020-08/msg00838.html>.
27086         * lib/verify.h (assume): Use __builtin_unreachable if the argument is
27087         the constant 0.
27088         * tests/test-verify.c (f): New function.
27089         (state): New type.
27090         (test_assume_expressions, test_assume_optimization,
27091         test_assume_noreturn): New functions.
27093 2020-08-25  Bruno Haible  <bruno@clisp.org>
27095         fstrcmp: Clarification regarding NOTE_ORDERED.
27096         * lib/fstrcmp.c (NOTE_ORDERED): Define to false.
27098 2020-08-24  Paul Eggert  <eggert@cs.ucla.edu>
27100         diffseq: new option NOTE_ORDERED
27101         Problem reported by Phil Sainty <https://bugs.gnu.org/42931>.
27102         * NEWS: Mention this.
27103         * lib/diffseq.h (NOTE_ORDERED): New macro.
27104         (IF_LINT2): Remove; no longer needed.
27105         (compareseq): If (!NOTE_ORDERED), recurse on the smaller
27106         subproblem and iterate to do the larger.
27108 2020-08-23  Paul Eggert  <eggert@cs.ucla.edu>
27110         sys_types: let Autoconf 2.70 do pid_t
27111         * m4/pid_t.m4 (AC_TYPE_PID_T): Redefine this Autoconf macro
27112         only for Autoconf versions 2.69 and earlier, since 2.70
27113         will be fixed.
27115 2020-08-23  Bruno Haible  <bruno@clisp.org>
27117         tests: Don't assume that pid_t fits in an 'int'.
27118         * tests/test-nonblocking-pipe-main.c (main): Use type 'pid_t' instead
27119         of 'int'.
27120         * tests/test-nonblocking-socket-main.c (main): Likewise.
27122         sys_types: Fix definition of pid_t on 64-bit MSVC.
27123         * m4/pid_t.m4: New file.
27124         * modules/sys_types (Files): Add it.
27125         * modules/dirent (Files): Likewise.
27126         * modules/fcntl-h (Files): Likewise.
27127         * modules/sched (Files): Likewise.
27128         * modules/signal-h (Files): Likewise.
27129         * modules/spawn (Files): Likewise.
27130         * modules/sys_stat (Files): Likewise.
27131         * modules/sys_wait (Files): Likewise.
27132         * modules/termios (Files): Likewise.
27133         * modules/unistd (Files): Likewise.
27135 2020-08-23  Bruno Haible  <bruno@clisp.org>
27137         inttypes: Fix {PRI,SCN}*PTR on 32-bit native Windows (regr. 2020-07-21).
27138         * m4/inttypes.m4 (gl_INTTYPES_PRI_SCN): Fix syntax error in test
27139         program.
27141 2020-08-23  Paul Eggert  <eggert@cs.ucla.edu>
27143         intprops: be consistent about +X vs X+0
27144         * lib/intprops.h (_GL_SIGNED_INT_MAXIMUM): Simplify.
27146         intprops: fix INT_MULTIPLY_WRAPV bit-field bug
27147         The bug occurs when using INT_MULTIPLY_WRAPV (a, b, c) where B
27148         is a bit-field, on older GCC or non-GCC compilers where we do
27149         things ourselves instead of using __builtin_mul_overflow.
27150         Without this fix, INT_MULTIPLY_WRAPV would not compile, due
27151         to applying sizeof to a bit-field.
27152         * lib/intprops.h (_GL_INT_MULTIPLY_RANGE_OVERFLOW):
27153         Promote B before giving it to TYPE_WIDTH, in case B is a bit-field.
27155 2020-08-23  Bruno Haible  <bruno@clisp.org>
27157         supersede: Avoid a failure when writing to /dev/null in Solaris zones.
27158         Reported by Jörg Sonnenberger <joerg@netbsd.org>
27159         via Thomas Klausner <tk@giga.or.at> in
27160         <https://pkgsrc.se/files.php?messageId=20200812233110.30230FB28@cvs.NetBSD.org>.
27161         * lib/supersede.c (open_supersede): When opening an existing non-regular
27162         file on Solaris, use O_CREAT although it should not be necessary.
27164 2020-08-23  Bruno Haible  <bruno@clisp.org>
27166         verify: Make assume work on bit field expressions (regr. 2020-08-22).
27167         Reported by Benno Schulenberg <bensberg@telfort.nl> in
27168         <https://lists.gnu.org/archive/html/bug-gnulib/2020-08/msg00202.html>.
27169         * lib/verify.h (assume): Use '_Bool' or 'bool' as type of the temporary
27170         variable.
27172 2020-08-23  Bruno Haible  <bruno@clisp.org>
27174         libc-config: Improve comments.
27175         * lib/cdefs.h (__warndecl, __warnattr, __errordecl): Explain why we
27176         cannot use clang's __diagnose_if__ here.
27178 2020-08-22  Bruno Haible  <bruno@clisp.org>
27180         verify: Do use __builtin_assume on clang.
27181         * lib/verify.h (assume): Use clang’s __builtin_assume, with a temporary
27182         variable in a statement expression.
27184 2020-08-22  Bruno Haible  <bruno@clisp.org>
27186         sig2str: Add more signals.
27187         * lib/sig2str.c (numname_table): Add SIGCPUFAIL, SIGTHR, SIGBREAK.
27189 2020-08-22  Bruno Haible  <bruno@clisp.org>
27191         doc: Update for OpenBSD 6.0, 6.7.
27192         * doc/*/*.texi: Update.
27193         * m4/printf.m4: Update comments and cross-compilation guesses.
27194         * m4/ceill.m4: Update comments.
27195         * m4/getcwd-abort-bug.m4: Likewise.
27196         * m4/ilogb.m4: Likewise.
27197         * m4/ilogbf.m4: Likewise.
27198         * m4/langinfo_h.m4: Likewise.
27199         * m4/modf.m4: Likewise.
27200         * m4/modff.m4: Likewise.
27202 2020-08-22  Bruno Haible  <bruno@clisp.org>
27204         doc: Mention sig2str module.
27205         * doc/glibc-functions/sigabbrev_np.texi: Mention the sig2str module.
27207 2020-08-21  Bruno Haible  <bruno@clisp.org>
27209         sigdescr_np: Add tests.
27210         * tests/test-sigdescr_np.c: New file.
27211         * modules/sigdescr_np-tests: New file.
27213         sigdescr_np: New module.
27214         * lib/string.in.h (sigdescr_np): New declaration.
27215         * lib/sigdescr_np.c: New file.
27216         * m4/sigdescr_np.m4: New file.
27217         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Test whether sigdescr_np is
27218         declared.
27219         (gl_HEADER_STRING_H_DEFAULTS): Initialize GNULIB_SIGDESCR_NP,
27220         HAVE_SIGDESCR_NP.
27221         * modules/string (Makefile.am): Substitute GNULIB_SIGDESCR_NP,
27222         HAVE_SIGDESCR_NP.
27223         * modules/sigdescr_np: New file.
27224         * tests/test-string-c++.cc: Verify the signature of sigdescr_np.
27225         * doc/glibc-functions/sigdescr_np.texi: Mention the new module.
27227 2020-08-20  Bruno Haible  <bruno@clisp.org>
27229         sigabbrev_np: Add tests.
27230         * tests/test-sigabbrev_np.c: New file.
27231         * modules/sigabbrev_np-tests: New file.
27233         sigabbrev_np: New module.
27234         * lib/string.in.h (sigabbrev_np): New declaration.
27235         * lib/sigabbrev_np.c: New file.
27236         * m4/sigabbrev_np.m4: New file.
27237         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Test whether sigabbrev_np is
27238         declared.
27239         (gl_HEADER_STRING_H_DEFAULTS): Initialize GNULIB_SIGABBREV_NP,
27240         HAVE_SIGABBREV_NP.
27241         * modules/string (Makefile.am): Substitute GNULIB_SIGABBREV_NP,
27242         HAVE_SIGABBREV_NP.
27243         * modules/sigabbrev_np: New file.
27244         * tests/test-string-c++.cc: Verify the signature of sigabbrev_np.
27245         * doc/glibc-functions/sigabbrev_np.texi: Mention the new module.
27247 2020-08-20  Bruno Haible  <bruno@clisp.org>
27249         stdalign tests: Skip test with AIX xlclang.
27250         * tests/test-stdalign.c (main): Skip alignas tests with AIX xlclang.
27252 2020-08-20  Bruno Haible  <bruno@clisp.org>
27254         stdalign: Fix test failures on 32-bit platforms with clang versions < 8.
27255         * lib/stdalign.in.h (_Alignof): For clang versions < 8, use the same
27256         workaround as for GCC versions < 4.9.
27258 2020-08-20  Siddhesh Poyarekar  <siddhesh@gotplt.org>
27260         Sync up ProjectQuirks comments and documentation
27261         Transform the ProjectQuirks comments into a docstring so that it can
27262         be accessed from python as ProjectQuirks.__doc__ and harmonize
27263         descriptions with the documentation.
27264         * build-aux/vcstocl/projectquirks.py (ProjectQuirks):
27265         Transform comments into a docstring.
27266         * doc/vcs-to-changelog.texi: Sync up description with comments.
27268         Split ProjectQuirks out into its own file
27269         ProjectQuirks is used by external quirks files and importing it from
27270         vcs-to-changelog.py is broken since it was renamed to use hyphens.  It
27271         is cleaner to put it in its own file anyway.
27272         * build-aux/vcstocl/projectquirks.py: A new file...
27273         * build-aux/vcs-to-changelog.py (ProjectQuirks): ...to which
27274         we move ProjectQuirks and import the file.
27276 2020-08-19  Bruno Haible  <bruno@clisp.org>
27278         uchar: Fix compilation errors in C++ mode on macOS.
27279         * m4/uchar.m4 (gl_UCHAR_H): Require gl_ANSI_CXX if present. Include some
27280         system header file before attempting to use 'char16_t' and 'char32_t'.
27282 2020-08-19  Bruno Haible  <bruno@clisp.org>
27284         ansi-c++-opt: Work around an autoconf macro reordering problem.
27285         * modules/ansi-c++-opt: Require gl_ANSI_CXX already in the early
27286         section.
27288 2020-08-19  Bruno Haible  <bruno@clisp.org>
27290         math C++ tests: Fix compilation error in with GCC 10.
27291         * lib/math.in.h (cbrt, ceil, copysign, exp2, expm1, floor, fma, fmod,
27292         hypot, ilogb, log, log10, log1p, log2, logb, modf, remainder, rint,
27293         round, trunc): Use _GL_CXXALIASWARN1 instead of _GL_CXXALIASWARN.
27295 2020-08-19  Bruno Haible  <bruno@clisp.org>
27297         uchar: Fix compilation errors in C++ mode on OpenBSD.
27298         * lib/uchar.in.h (char16_t, char32_t): Don't define in C++ mode if
27299         CXX_HAS_UCHAR_TYPES is 1.
27300         * m4/uchar.m4 (gl_UCHAR_H): Determine whether the C++ compiler
27301         predefines char16_t and char32_t. Substitute CXX_HAS_UCHAR_TYPES.
27302         * modules/uchar (Makefile.am): Substitute CXX_HAS_UCHAR_TYPES.
27304 2020-08-19  Bruno Haible  <bruno@clisp.org>
27306         Fix compilation errors in C++ mode on OpenBSD.
27307         * lib/math.in.h (isfinite, isinf, isnan, signbit): In C++ mode on
27308         OpenBSD with clang, use the approach without C preprocessor macro.
27310 2020-08-18  Bruno Haible  <bruno@clisp.org>
27312         uchar C++ tests: Fix side effect on math modules (regr. 2020-08-17).
27313         * modules/uchar-c++-tests (configure.ac): Don't use AC_LANG_PUSH and
27314         AC_LANG_POP.
27316 2020-08-17  Paul Eggert  <eggert@cs.ucla.edu>
27318         verify: avoid __built_assume on Clang
27319         * lib/verify.h (assume): Do not use Clang’s __builtin_assume, as
27320         Clang 9 incorrectly diagnoses arguments as having side effects
27321         even when they do not.  I guess Clang 9 considers any function
27322         call as if it had a side effect here.
27324         libc-config: avoid Clang’s __diagnose_if__
27325         * lib/cdefs.h (__warndecl, __warnattr, __errordecl):
27326         For now, do not use __diagnose_if__ here, as this fails
27327         on Fedora 31 with Clang 9.0.1, with diagnostic
27328         "/usr/include/bits/stdio2.h:263:9: error: fgets called with bigger
27329         size than length of destination buffer
27330         [-Werror,-Wuser-defined-warnings]".  I guess Clang 9 warns even
27331         for functions that are not called?
27333         careadlinkat: speedup for GCC 10 with GCC_LINT
27334         Inspired by a suggestion by Bruno Haible in:
27335         https://lists.gnu.org/r/bug-gnulib/2020-08/msg00155.html
27336         * lib/careadlinkat.c (STACK_BUF_SIZE): New constant.
27337         (readlink_stk): New function, with most of the old careadlinkat
27338         contents and with a new STACK_BUF arg.  Inline it in GCC 10
27339         if GCC_LINT.
27340         (careadlinkat): Use the new function for everything but the
27341         stack buffer.
27343         * build-aux/gcc-warning.spec: Update comments.
27345 2020-08-17  Bruno Haible  <bruno@clisp.org>
27347         Assume autoconf >= 2.64.
27348         * m4/std-gnu11.m4 (AC_PROG_CC, AC_PROG_CXX): Use _AC_DO_LIMIT always.
27350 2020-08-17  Bruno Haible  <bruno@clisp.org>
27352         Revert autoupdate's revert.
27353         * config/srclist.txt: Mark regcomp.c as needing sync with glibc.
27355 2020-08-17  Bruno Haible  <bruno@clisp.org>
27357         uchar C++ tests: Fix build error on FreeBSD 12.
27358         * modules/uchar-c++-tests (configure.ac): Test whether <cuchar> exists.
27359         (Makefile.am): Don't include test-uchar-c++2.cc in the compilation if
27360         <cuchar> does not exist.
27362 2020-08-16  Paul Eggert  <eggert@cs.ucla.edu>
27364         time_rz: remove unused functions
27365         * lib/time_rz.c (isdst_differ, equal_tm): Remove; no longer used.
27367         time_rz: fix issues with mktime_z failures
27368         * lib/time_rz.c (mktime_z): Do not update *TM if revert_tz fails.
27369         Use a cheaper tm_yday test for failed mktime.
27371 2020-08-16  Bruno Haible  <bruno@clisp.org>
27373         intprops test: Strengthen on clang.
27374         * tests/test-intprops.c (VERIFY): Use verify_stmt.
27376 2020-08-16  Bruno Haible  <bruno@clisp.org>
27378         nstrftime: Guide inlining also on clang.
27379         * lib/nstrftime.c (iso_week_days): Inline also on clang.
27381 2020-08-16  Bruno Haible  <bruno@clisp.org>
27383         intprops: Avoid bogus "warning: division by zero is undefined" on clang.
27384         * lib/intprops.h (_GL__GENERIC_BOGUS): Define to 1 on clang.
27386 2020-08-16  Bruno Haible  <bruno@clisp.org>
27388         log2l: Disable MSVC workaround on clang.
27389         * lib/log2l.c (log2l): On clang, use the expression 0.0L/0.0L.
27391 2020-08-16  Bruno Haible  <bruno@clisp.org>
27393         argp: Emit a warning also with clang.
27394         * lib/argp-help.c (__argp_short_program_name): Use #warning also on
27395         clang.
27397 2020-08-16  Bruno Haible  <bruno@clisp.org>
27399         libc-config: Enable __REDIRECT macro also on clang.
27400         * lib/cdefs.h (__REDIRECT, __REDIRECT_NTH, __REDIRECT_NTHNL, __ASMNAME,
27401         __ASMNAME2): Define on clang like on GCC.
27403 2020-08-16  Bruno Haible  <bruno@clisp.org>
27405         regex: Use initializer shorthand syntax also with clang.
27406         * lib/regcomp.c (utf8_sb_map): Use the initializer shorthand syntax also
27407         with clang.
27409 2020-08-16  Bruno Haible  <bruno@clisp.org>
27411         regex: Use space optimization also with clang.
27412         * lib/regex_internal.h (re_token_t): Use a single byte for the type also
27413         with clang.
27415 2020-08-16  Bruno Haible  <bruno@clisp.org>
27417         Use _Static_assert and static_assert primitives when present on clang.
27418         * lib/cdefs.h (_Static_assert): Don't define as a macro on clang.
27419         * lib/verify.h (_GL_HAVE__STATIC_ASSERT, _GL_HAVE__STATIC_ASSERT1,
27420         _GL_HAVE_STATIC_ASSERT1): Define as appropriate on clang.
27422 2020-08-16  Bruno Haible  <bruno@clisp.org>
27424         Use 'throw ()' for optimization in C++ mode also on clang.
27425         * lib/cdefs.h (__THROW): Define to 'throw ()' also on clang.
27426         * lib/getopt-cdefs.in.h (__THROW): Likewise.
27427         * lib/md5.h (__THROW): Likewise.
27429 2020-08-16  Bruno Haible  <bruno@clisp.org>
27431         absolute-header: Add support for clang.
27432         * modules/absolute-header (Makefile.am): Include '__clang__' in the
27433         HAVE_INCLUDE_NEXT expression.
27435 2020-08-16  Bruno Haible  <bruno@clisp.org>
27437         Fix "warning: implicitly declaring library function 'strcasecmp'".
27438         * lib/argp-help.c: Include <strings.h>.
27440 2020-08-16  Bruno Haible  <bruno@clisp.org>
27442         stdio: Don't break attribute 'scanf' on clang.
27443         * lib/stdio.in.h (scanf): Treat clang like GCC.
27445 2020-08-16  Bruno Haible  <bruno@clisp.org>
27447         Use __restrict also on clang.
27448         * lib/argp.h (__restrict): Don't define as a macro on clang >= 3.
27449         * lib/glob.in.h (_Restrict_): Use __restrict on clang >= 3.
27450         * lib/unitypes.in.h (_UC_RESTRICT): Likewise.
27452 2020-08-16  Bruno Haible  <bruno@clisp.org>
27454         pthread-spin: Use GCC built-ins also on clang.
27455         * lib/pthread-spin.c (pthread_spin_init, pthread_spin_lock,
27456         pthread_spin_trylock, pthread_spin_unlock): Use the newer GCC built-ins
27457         also on clang.
27459 2020-08-16  Bruno Haible  <bruno@clisp.org>
27461         asyncsafe-spin tests: Update.
27462         * tests/test-asyncsafe-spin2.c: Update to match the change in
27463         lib/asyncsafe-spin.c from 2020-08-11.
27465 2020-08-16  Bruno Haible  <bruno@clisp.org>
27467         setenv: Use tree code also with clang.
27468         * lib/setenv.c (USE_TSEARCH): Treat clang like GCC.
27470 2020-08-16  Bruno Haible  <bruno@clisp.org>
27472         math: Optimize signbit also on clang.
27473         * lib/math.in.h (gl_signbitf, gl_signbitd, gl_signbitl): Optimize also
27474         on clang.
27476 2020-08-16  Bruno Haible  <bruno@clisp.org>
27478         avltreehash-list, rbtreehash-list: Optimize also on clang.
27479         * lib/gl_anytreehash_list1.h (add_nodes_to_buckets): Use
27480         __builtin_expect also on clang.
27482 2020-08-16  Bruno Haible  <bruno@clisp.org>
27484         Fix "warning: 'WSASocketA' is deprecated: Use WSASocketW() instead".
27485         * lib/socket.c: Use WSASocketW, not WSASocketA.
27487         Fix "warning: format specifies type 'unsigned long'".
27488         * tests/test-nonblocking-writer.h (main_writer_loop): Cast dbgfprintf
27489         argument to match the format directive.
27491         Fix "warning: no case matching constant switch condition '0'".
27492         * tests/test-fcntl.c (check_flags): Add a 'default' case.
27494         Fix "warning: integer overflow in expression".
27495         * tests/test-strtol.c (main): Use an 'unsigned long' expression to
27496         remove a 'long' overflow.
27498         Fix "warning: "getpagesize" redefined".
27499         * tests/test-getcwd.c (getpagesize): Don't redefine if defined as a
27500         macro.
27502         Fix "warning: implicitly declaring library function 'strncasecmp'".
27503         * lib/strptime.c: Include <strings.h>.
27505         Fix "warning: 'snprintf' macro redefined".
27506         * lib/strerror_r.c (snprintf): Undefine before redefining.
27508         Fix "warning: address of array 'locale' will always evaluate to 'true'".
27509         * lib/nl_langinfo.c (ctype_codeset): Remove redundant NULL test.
27511         Fix "warning: '__stat64' macro redefined".
27512         * lib/glob.c (__stat64): Undefine also on MSVC/clang.
27514         Fix "warning: 'format' attribute argument not supported: rpl_printf".
27515         * lib/stdio.in.h (printf): Treat clang like GCC.
27517         Fix "warning: attribute declaration must precede definition" with clang.
27518         * lib/math.in.h (acosl, asinl, atanl, ceill, cosl, expl, fabsf, fabsl,
27519         floorl, fmodl, frexpf, frexpl, hypotf, hypotl, ldexpf, ldexpl, logl,
27520         log10l, modfl, sinl, sqrtl, tanl): Disable _GL_CXXALIASWARN invocation
27521         on non-glibc systems.
27522         * lib/netdb.in.h (gai_strerror): Likewise.
27523         * lib/stdio.in.h (snprintf, vfscanf, vscanf, vsnprintf): Likewise.
27524         * lib/sys_stat.in.h (fstat): Likewise.
27525         * lib/utime.in.h (utime): Likewise.
27527         Fix undesired warnings.
27528         * lib/sys_select.in.h: Disable all _GL_WARN_ON_USE invocations with
27529         clang.
27531 2020-08-16  Bruno Haible  <bruno@clisp.org>
27533         C++ tests: Fix link errors on MSVC (regression from 2020-05-31).
27534         * modules/stdio-c++-tests (Makefile.am): Link test-stdio-c++ with
27535         $(LIB_GETRANDOM), needed for the rpl_tmpfile symbol.
27536         * modules/stdlib-c++-tests (Makefile.am): Link test-stdlib-c++ with
27537         $(LIB_GETRANDOM), needed for the mkdtemp and mkstemp symbols.
27539 2020-08-16  Bruno Haible  <bruno@clisp.org>
27541         Don't use Autoconf quadrigraphs.
27542         * m4/alloca.m4 (_AC_LIBOBJ_ALLOCA): Use '#' instead of the corresponding
27543         Autoconf quadrigraph.
27544         * m4/free.m4 (gl_FUNC_FREE): Likewise.
27545         * m4/getloadavg.m4 (gl_PREREQ_GETLOADAVG): Likewise.
27546         * m4/largefile.m4 (_AC_SYS_LARGEFILE_TEST_INCLUDES,
27547         _AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
27548         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
27549         * m4/math_h.m4 (gl_MATH_H): Likewise.
27550         * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Likewise.
27552 2020-08-16  Bruno Haible  <bruno@clisp.org>
27554         Fix quoting of AC_LANG_PROGRAM arguments.
27555         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Quote the AC_LANG_PROGRAM
27556         arguments through [[...]].
27557         * m4/fpending.m4 (gl_FUNC_FPENDING): Likewise.
27558         * m4/fpurge.m4 (gl_FUNC_FPURGE): Likewise.
27559         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Likewise.
27560         * m4/ld-output-def.m4 (gl_LD_OUTPUT_DEF): Likewise.
27561         * m4/ld-version-script.m4 (gl_LD_VERSION_SCRIPT): Likewise.
27562         * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise.
27563         * m4/mountlist.m4 (gl_MOUNTLIST): Likewise.
27564         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H): Likewise.
27565         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise.
27566         * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Likewise.
27567         * m4/warnings.m4 (gl_COMPILER_OPTION_IF): Likewise.
27568         * m4/wcstok.m4 (gl_FUNC_WCSTOK): Likewise.
27569         * m4/wctype_h.m4 (gl_WCTYPE_H): Likewise.
27571 2020-08-16  Bruno Haible  <bruno@clisp.org>
27573         Assume autoconf >= 2.64.
27574         * gnulib-tool (DEFAULT_AUTOCONF_MINVERSION): Set to 2.64.
27575         * DEPENDENCIES: Require Autoconf 2.64 or newer.
27576         * NEWS: Mention the changed requirement.
27577         * m4/00gnulib.m4 (_m4_divert_diversion, AC_DEFUN_ONCE): Remove macros.
27578         * m4/gnulib-common.m4 (AS_VAR_IF, AS_VAR_COPY): Remove macros.
27579         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Quote pushdef'ed
27580         variables.
27581         * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Likewise.
27582         * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Likewise.
27583         * m4/warnings.m4 (gl_COMPILER_OPTION_IF): Likewise.
27584         (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C), gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++),
27585         gl_UNKNOWN_WARNINGS_ARE_ERRORS(Objective C)): Define through AC_DEFUN.
27586         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C), gl_MANYWARN_ALL_GCC(C++)):
27587         Likewise.
27588         * m4/iconv.m4 (AM_ICONV): Define through AC_DEFUN_ONCE directly.
27589         * m4/libunistring.m4 (gl_LIBUNISTRING): Likewise.
27590         * m4/configmake.m4: Update comment.
27592 2020-08-16  Bruno Haible  <bruno@clisp.org>
27594         sys_ioctl: Simplify.
27595         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H): Remove confusing use of
27596         AC_INCLUDES_DEFAULT.
27598 2020-08-16  Bruno Haible  <bruno@clisp.org>
27600         Fix quoting of AC_LANG_SOURCE arguments.
27601         * m4/printf.m4 (gl_PRINTF_ENOMEM): Fix an m4 quoting bug in the
27602         GL_NOCRASH expansion.
27603         * m4/locale-ar.m4 (gt_LOCALE_AR): Simplify m4 quoting.
27604         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Likewise.
27605         * m4/locale-ja.m4 (gt_LOCALE_JA): Likewise.
27606         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.
27607         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
27609 2020-08-15  Paul Eggert  <eggert@cs.ucla.edu>
27611         nstrftime: be more predictable about errno
27612         This aligns nstrftime better with draft POSIX 202x strftime.
27613         * lib/nstrftime.c: Include errno.h.
27614         (width_add, __strftime_internal): Set errno on failure,
27615         and preserve it on success.  Check for mktime_z failure.
27616         * modules/nstrftime (Depends-on): Add errno.
27617         * modules/nstrftime-tests (Depends-on): Add atoll, intprops.
27618         * tests/test-nstrftime.c: Include intprops.h, limits.h.
27619         (errno_test): New test function.
27620         (main): Call it.
27622 2020-08-15  Bruno Haible  <bruno@clisp.org>
27624         canonicalize: Fix a problem of the autoconf test on MSVC/clang.
27625         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Remove undesired file
27626         from dependency analysis first.
27628 2020-08-15  Bruno Haible  <bruno@clisp.org>
27630         Determine asm output option and filename suffix for MSVC/clang.
27631         * m4/asm-underscore.m4 (gl_C_ASM): Distinguish clang from cl and
27632         clang-cl.
27634 2020-08-15  Bruno Haible  <bruno@clisp.org>
27636         doc: Update for MSVC/clang.
27637         * doc/*-functions/*printf.texi: Mention that MSVC/clang has two bugs
27638         that MSVC 14 does not have.
27640 2020-08-15  Bruno Haible  <bruno@clisp.org>
27642         Revert autoupdate's revert.
27643         * config/srclist.txt: Mark mktime.c as needing sync with glibc.
27645 2020-08-15  Bruno Haible  <bruno@clisp.org>
27647         frexpl: Fix configuration test result on MSVC.
27648         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Avoid a division by a constant
27649         zero.
27651 2020-08-15  Bruno Haible  <bruno@clisp.org>
27653         Support compiling without -loldnames on native Windows.
27654         * m4/gnulib-common.m4 (GL_MDA_DEFINES, _GL_MDA_DEFINES): New macros.
27655         * m4/chown.m4 (AC_FUNC_CHOWN): In the test programs, use GL_MDA_DEFINES.
27656         (gl_FUNC_CHOWN, gl_FUNC_CHOWN_FOLLOWS_SYMLINK): Likewise.
27657         * m4/dup.m4 (gl_FUNC_DUP): Likewise.
27658         * m4/dup2.m4 (gl_FUNC_DUP2): Likewise.
27659         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
27660         * m4/fchmodat.m4 (gl_FUNC_FCHMODAT): Likewise.
27661         * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG): Likewise.
27662         * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Likewise.
27663         * m4/fcntl.m4 (gl_FUNC_FCNTL): Likewise.
27664         * m4/fdopen.m4 (gl_FUNC_FDOPEN): Likewise.
27665         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Likewise.
27666         * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): Likewise.
27667         * m4/fopen.m4 (gl_FUNC_FOPEN_GNU): Likewise.
27668         * m4/freopen.m4 (gl_FUNC_FREOPEN): Likewise.
27669         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Likewise.
27670         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise.
27671         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
27672         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL, gl_FUNC_GETCWD_SIGNATURE):
27673         Likewise.
27674         * m4/getdtablesize.m4 (gl_FUNC_GETDTABLESIZE): Likewise.
27675         * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise.
27676         * m4/lseek.m4 (gl_FUNC_LSEEK): Likewise.
27677         * m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise.
27678         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise.
27679         * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Likewise.
27680         * m4/open-slash.m4 (gl_OPEN_TRAILING_SLASH_BUG): Likewise.
27681         * m4/poll.m4 (gl_FUNC_POLL): Likewise.
27682         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Likewise.
27683         * m4/pread.m4 (gl_FUNC_PREAD): Likewise.
27684         * m4/pselect.m4 (gl_FUNC_PSELECT): Likewise.
27685         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Likewise.
27686         * m4/ptsname_r.m4 (gl_PREREQ_PTSNAME_R): Likewise.
27687         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
27688         * m4/pwrite.m4 (gl_FUNC_PWRITE): Likewise.
27689         * m4/rename.m4 (gl_FUNC_RENAME): Likewise.
27690         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
27691         * m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise.
27692         * m4/select.m4 (gl_FUNC_SELECT): Likewise.
27693         * m4/setenv.m4 (gl_FUNC_UNSETENV): Likewise.
27694         * m4/strncat.m4 (gl_FUNC_STRNCAT): Likewise.
27695         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Likewise.
27696         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
27697         * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise.
27698         * m4/utimens.m4 (gl_UTIMENS): Likewise.
27699         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise.
27700         * m4/utimes.m4 (gl_FUNC_UTIMES): Likewise.
27701         * m4/canonicalize.m4 (gl_CANONICALIZE_LGPL): On native Windows, don't
27702         test for getcwd.
27703         * m4/utime.m4 (gl_FUNC_UTIME): On native Windows, don't test for utime.
27704         * m4/wcsdup.m4 (gl_FUNC_WCSDUP): To test for wcsdup, use a test program
27705         with GL_MDA_DEFINES.
27706         * lib/c++defs.h (_GL_CXXALIAS_MDA): New macro.
27707         * lib/fcntl.in.h (creat, open):  On native Windows, use the underscore-
27708         prefixed symbol.
27709         * lib/search.in.h (lfind, lsearch): Likewise.
27710         * lib/stdio.in.h (fcloseall, fdopen, fileno, getw, putw, tempnam):
27711         Likewise.
27712         * lib/stdlib.in.h (ecvt, fcvt, gcvt, mktemp, putenv): Likewise.
27713         * lib/string.in.h (memccpy, strdup): Likewise.
27714         * lib/sys_stat.in.h (chmod, umask): Likewise.
27715         * lib/time.in.h (tzset): Likewise.
27716         * lib/unistd.in.h (access, chdir, close, dup, dup2, execl, execle,
27717         execlp, execv, execve, execvp, execvpe, getcwd, getpid, isatty, lseek,
27718         read, rmdir, swab, unlink, write): Likewise.
27719         * lib/utime.in.h (utime): Likewise.
27720         * lib/wchar.in.h (wcsdup): Likewise.
27721         * lib/math.in.h (j0, j1, jn, y0, y1, yn):  Likewise.
27722         (isfinite, isinf, isnan, signbit): On native Windows, don't define as an
27723         rpl_-prefixed macro.
27724         * lib/canonicalize-lgpl.c (__getcwd): On native Windows, use _getcwd.
27725         * lib/close.c (close_nothrow): On native Windows, use _close.
27726         * lib/creat.c (orig_creat): On native Windows, use _creat.
27727         * lib/dup.c (dup_nothrow): On native Windows, use _dup.
27728         * lib/dup2.c (dup2_nothrow): Use _dup2.
27729         * lib/fdopen.c (fdopen_nothrow): On native Windows, use _fdopen.
27730         * lib/getcwd-lgpl.c: On native Windows, use _getcwd.
27731         * lib/getcwd.c (getcwd_nothrow): Use _getcwd also on mingw.
27732         * lib/open.c (orig_open): On native Windows, use _open.
27733         * lib/read.c (read_nothrow): Use _read.
27734         * lib/rmdir.c: On native Windows, use _rmdir.
27735         * lib/unlink.c: On native Windows, use _unlink.
27736         * lib/write.c (write_nothrow): Use _write.
27737         * lib/sys_select.in.h (close): With clang, don't attach a warning on an
27738         undefined symbol.
27739         * lib/sys_socket.in.h (close): Likewise.
27740         * lib/sys_time.in.h (close): Likewise.
27741         * tests/test-spawn-pipe-child.c: On native Windows, use _fdopen.
27743 2020-08-15  Bruno Haible  <bruno@clisp.org>
27745         Fix "unknown pragma ignored" warnings with clang on native Windows.
27746         * lib/cbrt.c: Don't use '#pragma fenv_access (off)' with clang.
27747         * lib/cbrtf.c: Likewise.
27748         * lib/ceil.c: Likewise.
27749         * lib/floor.c: Likewise.
27750         * lib/fma.c: Likewise.
27751         * lib/fmod.c: Likewise.
27752         * lib/rint.c: Likewise.
27753         * lib/round.c: Likewise.
27754         * lib/trunc.c: Likewise.
27755         * tests/test-ceil2.c: Likewise.
27756         * tests/test-ceilf2.c: Likewise.
27757         * tests/test-floor2.c: Likewise.
27758         * tests/test-floorf2.c: Likewise.
27759         * tests/test-trunc2.c: Likewise.
27760         * tests/test-truncf2.c: Likewise.
27761         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
27762         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
27764 2020-08-15  Bruno Haible  <bruno@clisp.org>
27766         Fix compilation errors in C++ mode with clang on native Windows.
27767         * lib/pthread.in.h (pthread_*): Disable _GL_CXXALIASWARN invocation on
27768         non-glibc systems.
27769         * lib/sched.in.h (sched_yield): Likewise.
27771 2020-08-14  Bruno Haible  <bruno@clisp.org>
27773         stdnoreturn: Work around problem with MSVC/clang.
27774         * m4/stdnoreturn.m4 (gl_STDNORETURN_H): On native Windows, include some
27775         system header after <stdnoreturn.h>.
27776         * doc/posix-headers/stdnoreturn.texi: Mention the issue.
27778 2020-08-14  Bruno Haible  <bruno@clisp.org>
27780         utime-h: Generate an utime.h file always.
27781         * modules/utime-h (Makefile.am): Generate utime.h always.
27782         * m4/utime_h.m4 (gl_UTIME_H): Don't set UTIME_H. Don't define
27783         GL_GENERATE_UTIME_H.
27785 2020-08-14  Bruno Haible  <bruno@clisp.org>
27787         mktime, mktime-internal: Remove obsolete code.
27788         * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Don't #undef putenv.
27790 2020-08-14  Bruno Haible  <bruno@clisp.org>
27792         getcwd: Remove obsolete code.
27793         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Don't #undef mkdir.
27794         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
27796 2020-08-14  Bruno Haible  <bruno@clisp.org>
27798         tzset: Assume the function exists.
27799         * lib/time.in.h (tzset): Assume HAVE_TZSET is 1.
27800         * lib/tzset.c: Define rpl_tzset, not tzset. Assume HAVE_TZSET is 1.
27801         * modules/tzset (configure.ac): Don't test HAVE_TZSET.
27802         * m4/tzset.m4 (gl_FUNC_TZSET): Don't test for tzset. Don't set
27803         HAVE_TZSET.
27804         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Don't initialize HAVE_TZSET.
27805         * modules/time (Makefile.am): Don't substitute HAVE_TZSET.
27807         nstrftime: Assume tzset exists.
27808         * lib/nstrftime.c (HAVE_TZSET): Remove macro.
27809         (__strftime_internal): Test my_strftime, not HAVE_TZSET.
27810         * m4/nstrftime.m4 (gl_FUNC_GNU_STRFTIME): Don't test for tzset.
27812         mktime, mktime-internal: Assume tzset exists.
27813         * lib/mktime.c (my_tzset): Assume HAVE_TZSET is 1.
27814         * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Don't test for tzset.
27816 2020-08-14  Bruno Haible  <bruno@clisp.org>
27818         strdup: Assume the function exists.
27819         * m4/strdup.m4 (gl_FUNC_STRDUP, gl_FUNC_STRDUP_POSIX): Don't test
27820         whether strdup exists.
27821         * modules/strdup (Files): Remove lib/strdup.c.
27822         (configure.ac): Don't compile strdup.c.
27823         * modules/strdup-posix (Depends-on, configure.ac): Don't test
27824         ac_cv_func_strdup.
27825         * doc/posix-functions/strdup.texi: Update.
27826         * lib/unistr/u8-strdup.c: Assume HAVE_STRDUP is 1.
27827         * modules/unistr/u8-strdup (Files): Remove lib/unistr/u-strdup.h.
27828         (Depends-on): Remove unistr/u8-strlen.
27830 2020-08-13  Bruno Haible  <bruno@clisp.org>
27832         sys_random: Work around an uClibc bug.
27833         Reported by akater <nuclearspace@gmail.com>
27834         via Stefan Kangas <stefan@marxist.se>
27835         in <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42236>.
27836         * lib/sys_random.in.h: On uClibc, include <stddef.h> first.
27837         * m4/sys_random_h.m4 (gl_HEADER_SYS_RANDOM): Update comment.
27838         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Likewise.
27839         * doc/glibc-headers/sys_random.texi: Mention the uClibc bug.
27841 2020-08-12  Bruno Haible  <bruno@clisp.org>
27843         Avoid implicit conversion from 'unsigned int' to 'int' in initializers.
27844         Reported by Florian Weimer in
27845         <https://lists.gnu.org/archive/html/bug-gnulib/2020-08/msg00086.html>.
27846         * lib/gen-uni-tables.c (output_predicate): Change the element type of
27847         the level3 array to 'unsigned int'.
27848         * lib/unictype/bitmap.h (bitmap_lookup): Access an 'unsigned int'.
27849         * lib/unictype/categ_*.h: Regenerated.
27850         * lib/unictype/ctype_*.h: Regenerated.
27851         * lib/unictype/pr_*.h: Regenerated.
27852         * lib/unictype/sy_*.h: Regenerated.
27853         * lib/unicase/cased.h: Regenerated.
27854         * lib/unicase/ignorable.h: Regenerated.
27856 2020-08-12  Paul Eggert  <eggert@cs.ucla.edu>
27858         stdint: port intptr_t to more-recent MinGW
27859         Problem reported by Eli Zaretskii in <https://bugs.gnu.org/36597#106>.
27860         * lib/stdint.in.h (intptr_t, uintptr_t): Do not define on MinGW,
27861         even if _INTPTR_T_DEFINED and _UINTPTR_T_DEFINED are not defined.
27862         Apparently those two macros were removed in mingwrt-3.22
27863         dated 2016-07-14.
27865 2020-08-12  Bruno Haible  <bruno@clisp.org>
27867         thread-optim: Export function-like macros only.
27868         Suggested by Paul Eggert.
27869         * lib/thread-optim.h (gl_multithreaded): New macro.
27870         (IF_MT_DECL, IF_MT): Remove macros.
27871         * doc/multithread.texi (Multithreading Optimizations): Add a small
27872         example.
27873         * lib/fatal-signal.c: Update all uses.
27874         * lib/clean-temp.c: Likewise.
27875         * lib/localename.c: Likewise.
27876         * modules/localename (Depends-on): Add stdbool.
27878 2020-08-12  Bruno Haible  <bruno@clisp.org>
27880         Revert autoupdate's revert.
27881         * config/srclist.txt: Mark regex.h as needing sync with glibc.
27883 2020-08-11  Bruno Haible  <bruno@clisp.org>
27885         thread-optim: Fix a compiler warning.
27886         * lib/thread-optim.h (IF_MT_DECL): Define differently.
27888 2020-08-11  Bruno Haible  <bruno@clisp.org>
27890         Use __restrict also on clang.
27891         * lib/cdefs.h (__restrict): Don't define as a macro on clang.
27892         (__restrict_arr): On clang, define like on GCC.
27893         * lib/regex.h (_Restrict_): Use '__restrict' also on clang.
27894         (_Restrict_arr_): Use _Restrict_ also on clang.
27895         * lib/spawn.in.h (_Restrict_): Use '__restrict' also on clang.
27896         (_Restrict_arr_): Use _Restrict_ also on clang.
27898 2020-08-11  Bruno Haible  <bruno@clisp.org>
27900         Use flexible array syntax also on clang.
27901         * lib/cdefs.h (__flexarr, __glibc_c99_flexarr_available): For clang,
27902         define like for GCC 3.
27904 2020-08-11  Bruno Haible  <bruno@clisp.org>
27906         fcntl: On native Windows, use _setmode, not setmode.
27907         * lib/fcntl.c (dupfd): Use _setmode, not setmode.
27908         * lib/binary-io.h: Update comment.
27909         * tests/test-cloexec.c: Call set_binary_mode, not setmode.
27910         * tests/test-dup2.c: Likewise.
27911         * tests/test-dup-safer.c: Likewise.
27912         * tests/test-fcntl.c: Likewise.
27914 2020-08-11  Bruno Haible  <bruno@clisp.org>
27916         execute, spawn-pipe: Use _spawnvpe, not spawnvpe.
27917         * lib/execute.c (execute): Use _spawnvpe, not spawnvpe.
27918         * lib/spawn-pipe.c (create_pipe): Likewise.
27919         * tests/test-nonblocking-pipe-main.c (main): Likewise.
27920         * tests/test-nonblocking-socket-main.c (main): Likewise.
27921         * lib/wait-process.c: Update comment.
27922         * doc/posix-functions/fork.texi: Update.
27924 2020-08-11  Bruno Haible  <bruno@clisp.org>
27926         asyncsafe-spin: Use GCC built-ins also on clang.
27927         * lib/asyncsafe-spin.c (asyncsafe_spin_init, do_lock, do_unlock): Use
27928         the newer GCC built-ins also on clang.
27930 2020-08-11  Bruno Haible  <bruno@clisp.org>
27932         Use expression statements also on clang.
27933         * lib/cdefs.h (__extension__): Don't define to empty on clang.
27934         * lib/obstack.h (__extension__): Likewise.
27935         (obstack_object_size, obstack_room, obstack_make_room, obstack_empty_p,
27936         obstack_grow, obstack_grow0, obstack_1grow, obstack_ptr_grow,
27937         obstack_int_grow, obstack_ptr_grow_fast, obstack_int_grow_fast,
27938         obstack_blank, obstack_alloc, obstack_copy, obstack_copy0,
27939         obstack_finish, obstack_free): Enable as optimized macros also on clang.
27940         * lib/fpucw.h (fpucw_t etc.): Enable the definitions also on clang.
27942 2020-08-10  Bruno Haible  <bruno@clisp.org>
27944         Use many __attribute__s with clang.
27945         * m4/gnulib-common.m4 (_Noreturn): Use __attribute__ __noreturn__ also
27946         on clang.
27947         * lib/cdefs.h (__glibc_clang_has_attribute, __glibc_clang_has_builtin):
27948         New macros.
27949         (__THROW, __THROWNL, __NTH, __NTHNL): Use __attribute__ __nothrow__ also
27950         on clang.
27951         (__warndecl, __warnattr, __errordecl): Use __attribute__ __diagnose_if__
27952         also on older clang versions.
27953         (__attribute__): Don't define to empty on clang.
27954         (__attribute_malloc__): Use __attribute__ __malloc__ also on clang.
27955         (__attribute_pure__): Use __attribute__ __pure__ also on clang.
27956         (__attribute_const__): Use __attribute__ __const__ also on clang.
27957         (__attribute_used__): Use __attribute__ __used__ also on clang.
27958         (__attribute_noinline__): Use __attribute__ __noinline__ also on clang.
27959         (__attribute_deprecated__): Use __attribute__ __deprecated__ also on
27960         clang.
27961         (__attribute_format_arg__): Use __attribute__ __format_arg__ also on
27962         clang.
27963         (__attribute_format_strfmon__): Use __attribute__ __format__ __strfmon__
27964         also on clang.
27965         (__nonnull): Use __attribute__ __nonnull__ also on clang.
27966         (__attribute_warn_unused_result__): Use __attribute__
27967         __warn_unused_result__ also on clang.
27968         (__always_inline): Use __attribute__ __always_inline__ also on clang.
27969         (__attribute_artificial__): Use __attribute__ __artificial__ also on
27970         clang >= 7.
27971         (__glibc_unlikely, __glibc_likely): Use __builtin_expect also on older
27972         clang versions.
27973         (_Noreturn): Don't redefine on clang >= 3.5.
27974         * lib/arg-nonnull.h (_GL_ARG_NONNULL): Use __attribute__ __nonnull__
27975         also on clang.
27976         * lib/dirent.in.h (_GL_ATTRIBUTE_PURE): Use __attribute__ __pure__ also
27977         on clang.
27978         * lib/stdlib.in.h (_GL_ATTRIBUTE_PURE): Likewise.
27979         * lib/string.in.h (_GL_ATTRIBUTE_PURE): Likewise.
27980         * lib/wchar.in.h (_GL_ATTRIBUTE_PURE): Likewise.
27981         * lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT): Use __attribute__ __format__
27982         also on clang.
27983         * lib/monetary.in.h (_GL_ATTRIBUTE_FORMAT): Likewise.
27984         * lib/textstyle.in.h (ostream_printf, ostream_vprintf): Likewise.
27985         * lib/unitypes.in.h (_UC_ATTRIBUTE_CONST): Use __attribute__ __const__
27986         also on clang.
27987         (_UC_ATTRIBUTE_PURE): Use __attribute__ __pure__ also on clang.
27988         * lib/noreturn.h (_GL_NORETURN_FUNC, _GL_NORETURN_FUNCPTR): Use
27989         __attribute__ __noreturn__ also on clang.
27990         * lib/obstack.h (__attribute_noreturn__): Likewise.
27991         * lib/file-set.h (record_file): Use __attribute__ __nonnull__ also on
27992         clang.
27993         * lib/argp-help.c (hol_entry_long_iterate): Use __attribute__
27994         always_inline also on clang.
27995         * tests/test-printf-posix.c (func1, func2, func3, func4): Test also on
27996         clang.
27998 2020-08-10  Bruno Haible  <bruno@clisp.org>
28000         c-ldtoastr tests: Fix test failure.
28001         * tests/test-c-ldtoastr.c (main): Support platforms where 'long double'
28002         is longer than 'double'.
28004 2020-08-10  Bruno Haible  <bruno@clisp.org>
28006         Revert autoupdate's revert.
28007         * config/srclist.txt: Mark intprops.h as needing sync with glibc.
28009 2020-08-09  Bruno Haible  <bruno@clisp.org>
28011         string: Fix build error in C++ mode with clang (regression from today).
28012         * lib/warn-on-use.h (_GL_WARN_ON_USE_CXX): Expect two rettype
28013         parameters, one for GCC, one for clang.
28014         * lib/c++defs.h (_GL_CXXALIASWARN1_2): Update.
28015         * lib/string.in.h (strchr, strpbrk, strrchr): For clang, pass 'char *'
28016         as return type.
28018 2020-08-09  Bruno Haible  <bruno@clisp.org>
28020         ftruncate: Use _chsize, not chsize.
28021         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): Test for _chsize, not chsize.
28022         * lib/ftruncate.c: Test HAVE__CHSIZE.
28023         (chsize_nothrow): Use _chsize, not chsize.
28025 2020-08-09  Bruno Haible  <bruno@clisp.org>
28027         Silence warnings from clang 10 with -Wimplicit-fallthrough.
28028         * lib/dfa.c (FALLTHROUGH): Use __attribute__ __fallthrough__ also on
28029         clang >= 10.
28030         * lib/fnmatch.c (FALLTHROUGH): Likewise.
28031         * lib/fts.c (FALLTHROUGH): Likewise.
28032         * tests/macros.h (FALLTHROUGH): Likewise.
28033         * lib/regex_internal.h (FALLTHROUGH): Likewise.
28034         * config/srclist.txt: Mark it as needing sync with glibc.
28036 2020-08-09  Bruno Haible  <bruno@clisp.org>
28038         stdbool tests: Enable the stricter tests also on clang.
28039         * tests/test-stdbool.c (ADDRESS_CHECK_OKAY): Define also on clang.
28040         (e): Enable the address-to-bool conversion test also on clang.
28042 2020-08-09  Bruno Haible  <bruno@clisp.org>
28044         count-one-bits: Use __builtin_popcount{,l,ll} on clang.
28045         * lib/count-one-bits.h (COUNT_ONE_BITS): Use the GCC built-in.
28047 2020-08-09  Bruno Haible  <bruno@clisp.org>
28049         Use attribute __aligned__ with clang.
28050         * lib/stdalign.in.h (_Alignas): Treat clang like GCC.
28051         * lib/stddef.in.h (_GL_STDDEF_ALIGNAS): Likewise.
28053 2020-08-09  Bruno Haible  <bruno@clisp.org>
28055         Use __alignof__ with clang.
28056         * m4/stddef_h.m4 (gl_STDDEF_H): Test the alignment of max_align_t also
28057         on clang.
28058         * lib/alignof.h (alignof_type): Use __alignof__ also on clang.
28059         * lib/stdalign.in.h (_Alignof): Don't activate the GCC workaround on
28060         clang.
28061         * lib/malloca.h (sa_alignof): Use __alignof__ also on clang.
28062         * lib/bitset/list.c (lbitset_elt_alloc): Use __alignof__ also on clang.
28063         * lib/bitset/table.c (tbitset_elt_alloc): Likewise.
28064         * tests/test-stddef.c: Very the behaviour of __alignof__ also on clang.
28066 2020-08-09  Bruno Haible  <bruno@clisp.org>
28068         ignore-value: Simplify on clang.
28069         * lib/ignore-value.h (ignore_value): With clang, no need to use the GCC
28070         workaround.
28072 2020-08-09  Bruno Haible  <bruno@clisp.org>
28074         Use __typeof__ with clang.
28075         * m4/stdint.m4 (gl_STDINT_H): Check for SIZE_MAX also on
28076         "clang -std=gnu99".
28077         * lib/intprops.h (_GL_HAVE___TYPEOF__): Define to 1 also on clang.
28078         * tests/test-stdint.c (verify_same_types): Enable the check also on
28079         clang.
28081 2020-08-09  Bruno Haible  <bruno@clisp.org>
28083         Add ability to emit user-defined warnings and errors with clang.
28084         * m4/gnulib-common.m4 (gl_COMMON_BODY): Define _GL_ATTRIBUTE_ERROR,
28085         _GL_ATTRIBUTE_WARNING using an attribute for clang.
28086         * lib/warn-on-use.h (_GL_WARN_ON_USE, _GL_WARN_ON_USE_ATTRIBUTE,
28087         _GL_WARN_ON_USE_CXX): Define using an attribute for clang.
28088         * lib/cdefs.h (__warndecl, __warnattr, __errordecl): Define using an
28089         attribute for clang.
28091 2020-08-09  Bruno Haible  <bruno@clisp.org>
28093         intprops: Fix typo in comment.
28094         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_P): Fix typo in comment.
28096 2020-08-09  Bruno Haible  <bruno@clisp.org>
28098         Use __builtin_signbit* with clang.
28099         * lib/math.in.h (signbit): Use __builtin_signbit{,f,l} also on clang.
28100         * m4/signbit.m4 (gl_SIGNBIT): Use __builtin_signbit{,f,l} also on clang.
28101         Set REPLACE_SIGNBIT_USING_BUILTINS, not REPLACE_SIGNBIT_USING_GCC.
28102         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize
28103         REPLACE_SIGNBIT_USING_BUILTINS, not REPLACE_SIGNBIT_USING_GCC.
28104         * modules/math (Makefile.am): Substitute REPLACE_SIGNBIT_USING_BUILTINS,
28105         not REPLACE_SIGNBIT_USING_GCC.
28107 2020-08-09  Bruno Haible  <bruno@clisp.org>
28109         Use __builtin_isnan with clang.
28110         * lib/isnanf-nolibm.h (isnanf): Use the GCC built-in __builtin_isnan,
28111         not __builtin_isnanf. Also on clang.
28112         * m4/isnanf.m4 (gl_HAVE_ISNANF_NO_LIBM, gl_ISNANF_WORKS): Use the GCC
28113         built-in __builtin_isnan, not __builtin_isnanf. Also on clang.
28114         * lib/isnand-nolibm.h (isnand): With clang, use the GCC built-in.
28115         * m4/isnand.m4 (gl_HAVE_ISNAND_IN_LIBM): With clang, use the GCC
28116         built-in.
28117         * lib/isnanl-nolibm.h (isnanf): Use the GCC built-in __builtin_isnan,
28118         not __builtin_isnanl. Also on clang.
28119         * m4/isnanl.m4 (gl_HAVE_ISNANL_NO_LIBM, gl_FUNC_ISNANL_WORKS): Use the
28120         GCC built-in __builtin_isnan, not __builtin_isnanl. Also on clang.
28121         * lib/math.in.h (__has_builtin): Remove macro.
28122         (isnanf, gl_isnan_f): Use the GCC built-in __builtin_isnan, not
28123         __builtin_isnanf. Also on clang.
28124         (isnand, gl_isnan_d): With clang, use the GCC built-in.
28125         (isnanl, gl_isnan_l): Use the GCC built-in __builtin_isnan, not
28126         __builtin_isnanl. Also on clang.
28127         (isnan): Use the GCC built-in __builtin_isnan in all three cases. Also
28128         on clang.
28130 2020-08-09  Bruno Haible  <bruno@clisp.org>
28132         thread-optim: Fix logic error.
28133         Reported by Paul Eggert.
28134         * lib/thread-optim.h (IF_MT): Fix logic error.
28136 2020-08-08  Bruno Haible  <bruno@clisp.org>
28138         localename: Use module 'thread-optim'.
28139         * lib/localename.c: Include thread-optim.h.
28140         (struniq): Use IF_MT macro.
28141         * modules/localename (Depends-on): Add thread-optim.
28143         clean-temp: Use module 'thread-optim'.
28144         * lib/clean-temp.c: Include thread-optim.h.
28145         (register_temporary_file, unregister_temporary_file, create_temp_dir,
28146         register_temp_file, unregister_temp_file, register_temp_subdir,
28147         unregister_temp_subdir, cleanup_temp_dir_contents, register_fd,
28148         close_temp, fclose_variant_temp): Use IF_MT macro.
28149         * modules/clean-temp (Depends-on): Add thread-optim.
28151         fatal-signal: Use module 'thread-optim'.
28152         * lib/fatal-signal.c: Include thread-optim.h.
28153         (at_fatal_signal, block_fatal_signals, unblock_fatal_signals): Use IF_MT
28154         macro.
28155         * modules/fatal-signal (Depends-on): Add thread-optim.
28157 2020-08-08  Bruno Haible  <bruno@clisp.org>
28159         New module 'thread-optim'.
28160         * lib/thread-optim.h: New file.
28161         * modules/thread-optim: New file.
28162         * doc/multithread.texi (Multithreading Optimizations): New section.
28164 2020-08-07  Paul Eggert  <eggert@cs.ucla.edu>
28166         doc: more updates for glibc 2.32
28167         * doc/glibc-functions/lchmod.texi, doc/posix-functions/faccessat.texi:
28168         * doc/posix-functions/fchmodat.texi: Update.
28170 2020-08-07  Bruno Haible  <bruno@clisp.org>
28172         doc: Update for glibc 2.32.
28173         * doc/glibc-functions/__libc_single_threaded.texi: New file.
28174         * doc/glibc-functions/pthread_attr_getsigmask_np.texi: New file.
28175         * doc/glibc-functions/pthread_attr_setsigmask_np.texi: New file.
28176         * doc/glibc-functions/sigabbrev_np.texi: New file.
28177         * doc/glibc-functions/sigdescr_np.texi: New file.
28178         * doc/glibc-functions/strerrordesc_np.texi: New file.
28179         * doc/glibc-functions/strerrorname_np.texi: New file.
28180         * doc/gnulib.texi: Include them.
28181         (Glibc sys/single_threaded.h): New section.
28182         * doc/pastposix-functions/h_errno.texi: Update.
28183         * doc/posix-functions/*.texi: Likewise.
28184         * doc/glibc-functions/*.texi: Likewise.
28186 2020-08-07  Bruno Haible  <bruno@clisp.org>
28188         alloca: No need to compile alloca.c with clang.
28189         * lib/alloca.c: Skip all code with clang.
28191         Use __builtin_alloca with clang.
28192         * lib/alloca.in.h (alloca): Define as __builtin_alloca on clang.
28194 2020-08-06  Bruno Haible  <bruno@clisp.org>
28196         Use __builtin_assume with clang.
28197         * lib/verify.h (_GL_HAS_BUILTIN_ASSUME): New macro.
28198         (assume): Use __builtin_assume when available.
28200 2020-08-06  Paul Eggert  <eggert@cs.ucla.edu>
28202         libgmp: add <gmp/gmp.h> support
28203         * m4/libgmp.m4 (gl_LIBGMP):
28204         * modules/libgmp (configure.ac, Makefile.am):
28205         Support platforms requiring ‘#include <gmp/gmp.h>’ instead of
28206         ‘#include <gmp.h>’.
28208 2020-08-06  Bruno Haible  <bruno@clisp.org>
28210         Consider that clang defines __OPTIMIZE__ like GCC does.
28211         * lib/streq.h: Define the inline functions also on clang.
28212         * lib/c-strcaseeq.h: Likewise.
28213         * lib/c++defs.h (_GL_CXXALIASWARN_2, _GL_CXXALIASWARN1_2): Don't enable
28214         the GCC workaround to clang.
28216 2020-08-06  Bruno Haible  <bruno@clisp.org>
28218         safe-alloc: Remove unused code.
28219         * lib/safe-alloc.h (__GNUC_PREREQ): Remove macro.
28221 2020-08-06  Bruno Haible  <bruno@clisp.org>
28223         Use __builtin_expect with clang everywhere.
28224         * lib/cdefs.h (__glibc_unlikely, __glibc_likely): Use the GCC built-in
28225         also on clang.
28227 2020-08-05  Bruno Haible  <bruno@clisp.org>
28229         Use __builtin_ctz{,l,ll} and __builtin_ffs{,l,ll} with clang everywhere.
28230         * lib/count-trailing-zeros.h (COUNT_TRAILING_ZEROS): Use the GCC
28231         built-in also on clang.
28232         * lib/ffs.c: With clang, use the GCC built-in, not <intrin.h>.
28233         * lib/ffsl.h: Likewise. Assume GCC_BUILTIN is defined.
28235 2020-08-05  Bruno Haible  <bruno@clisp.org>
28237         Use __builtin_clz{,l,ll} with clang, also on Windows.
28238         * lib/integer_length.c: With clang, use the GCC built-in, not
28239         <intrin.h>.
28240         * lib/integer_length_l.c: Likewise.
28241         * lib/count-leading-zeros.h (COUNT_LEADING_ZEROS): Use the GCC built-in
28242         also on clang.
28243         * lib/vasnprintf.c (divide): Likewise.
28245 2020-08-04  Paul Eggert  <eggert@cs.ucla.edu>
28247         Update srclist.txt as per recent glibc changes
28248         * config/srclist.txt: Uncomment lines to reflect recent merges
28249         from Gnulib to glibc.
28251 2020-08-03  Bruno Haible  <bruno@clisp.org>
28253         Prefer documented autoconf macro 'm4_if' over 'ifelse'.
28254         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Use m4_if instead of ifelse.
28256 2020-08-03  Bruno Haible  <bruno@clisp.org>
28258         integer_length_ll: Optimize for MSVC in 64-bit mode.
28259         * lib/integer_length_l.c (MSVC_BUILTIN): Define for MSVC in 64-bit mode.
28260         (FUNC): On MSVC, use MSVC_BUILTIN if defined.
28262 2020-08-03  Bruno Haible  <bruno@clisp.org>
28264         integer_length_ll: Optimize for MSVC in 32-bit mode.
28265         * lib/integer_length_l.c: Include <intrin.h>.
28266         (integer_length): Define as inline function, like in
28267         lib/integer_length.c.
28269 2020-08-03  Bruno Haible  <bruno@clisp.org>
28271         integer_length: Optimize for MSVC.
28272         * lib/integer_length.c: Include <intrin.h>.
28273         (integer_length): With MSVC, use the _BitScanReverse built-in.
28275 2020-08-03  Bruno Haible  <bruno@clisp.org>
28277         ffsll: Optimize for MSVC in 64-bit mode.
28278         * lib/ffsl.h (FUNC): On MSVC, use MSVC_BUILTIN if defined.
28279         * lib/ffsll.c (MSVC_BUILTIN): Define for MSVC in 64-bit mode.
28280         * lib/ffsl.c (MSVC_BUILTIN): Define for MSVC.
28282 2020-08-03  Bruno Haible  <bruno@clisp.org>
28284         ffsll: Optimize for MSVC in 32-bit mode.
28285         * lib/ffsl.h: Include <intrin.h>.
28286         (ffs): Define as inline function, like in lib/ffs.c.
28288 2020-08-03  Bruno Haible  <bruno@clisp.org>
28290         ffs: Optimize for MSVC.
28291         * lib/ffs.c: Include <intrin.h>.
28292         (ffs): With MSVC, use the _BitScanForward built-in.
28294 2020-08-03  Bruno Haible  <bruno@clisp.org>
28296         sigprocmask: Try to avoid breakage for people who use an Autoconf cache.
28297         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Change the name of the cache
28298         variable.
28300 2020-08-03  Harald van Dijk  <harald@gigawatt.nl>  (tiny change)
28302         fopen: Avoid undesired interactions with glibc headers.
28303         * lib/fopen.c (_GL_ALREADY_INCLUDING_STDIO_H): Define this instead of
28304         __need_FILE, as the latter does not work with glibc.
28306 2020-08-02  Paul Eggert  <eggert@cs.ucla.edu>
28308         fcntl: document some F_SETLK errno variations
28309         * doc/posix-functions/fcntl.texi (fcntl): Document
28310         OpenIndiana, GNU/Linux, FreeBSD on NFS files.
28312 2020-08-02  Bruno Haible  <bruno@clisp.org>
28314         oset: Add an 'iterator_atleast' operation.
28315         * lib/gl_array_oset.c (gl_array_indexof_atleast): New function,
28316         extracted from gl_array_search_atleast.
28317         (gl_array_search_atleast): Use it.
28318         (gl_array_iterator_atleast): New function.
28319         (gl_array_oset_implementation): Use it.
28320         * lib/gl_anytree_oset.h (gl_tree_iterator_atleast): New function.
28321         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Use it.
28322         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Likewise.
28323         * lib/gl_oset.h (struct gl_oset_implementation): Add 'iterator_atleast'
28324         member.
28325         (gl_oset_iterator_atleast): New function.
28326         * lib/gl_oset.hh (gl_OSet): Add 'begin_atleast' member.
28327         (gl_OSet::iterator): Add another auxiliary constructor.
28328         * tests/test-array_oset.c (is_at_least, gl_sortedlist_indexof_atleast):
28329         New functions.
28330         (main): Test also gl_oset_iterator_atleast.
28331         * tests/test-avltree_oset.c (is_at_least): New function.
28332         (main): Test also gl_oset_iterator_atleast.
28333         * tests/test-rbtree_oset.c (is_at_least): New function.
28334         (main): Test also gl_oset_iterator_atleast.
28335         * tests/test-oset-c++.cc (is_at_most): New function.
28336         (main): Test also gl_OSet::begin_atleast.
28338 2020-08-02  Bruno Haible  <bruno@clisp.org>
28340         oset-c++, omap-c++: Remove restriction for search_atleast method.
28341         * lib/gl_oset.hh (gl_OSet::search_atleast): Allow the threshold to be of
28342         a different type than the element.
28343         * lib/gl_omap.hh (gl_OMap::search_atleast): Allow the threshold to be of
28344         a different type than the key.
28346 2020-08-01  Paul Eggert  <eggert@cs.ucla.edu>
28348         gnumakefile: say ‘$(MAKE)’ not ‘make’
28349         * top/GNUmakefile (abort-due-to-no-makefile):
28350         Prefer ‘$(MAKE)’ to ‘make’ in a diagnostic.
28351         This change is backported from Autoconf.
28353 2020-08-01  Bruno Haible  <bruno@clisp.org>
28355         Prefer documented autoconf macro 'm4_if' over 'ifelse'.
28356         * m4/autobuild.m4 (AB_INIT): Use m4_if instead of ifelse.
28357         * m4/csharpexec.m4 (gt_CSHARPEXEC): Likewise.
28358         * m4/javacomp.m4 (gt_JAVACOMP): Likewise.
28359         * m4/javaexec.m4 (gt_JAVAEXEC): Likewise.
28360         * m4/libtextstyle.m4 (gl_LIBTEXTSTYLE): Likewise.
28362 2020-08-01  Bruno Haible  <bruno@clisp.org>
28364         libtextstyle-optional: Update tests.
28365         * modules/libtextstyle-optional-tests (configure.ac): Invoke
28366         gl_LIBTEXTSTYLE_OPTIONAL.
28368 2020-08-01  Bruno Haible  <bruno@clisp.org>
28370         parse-datetime: Fix wrong #line statements.
28371         * modules/parse-datetime (Makefile.am): Correct #line statements also in
28372         parse-datetime-gen.h.
28374 2020-08-01  Bruno Haible  <bruno@clisp.org>
28376         libtextstyle[-optional]: Allow requesting a minimum version.
28377         * m4/libtextstyle.m4 (gl_LIBTEXTSTYLE): Allow an optional argument.
28378         (gl_LIBTEXTSTYLE_NEWEST_VERSION, gl_LIBTEXTSTYLE_INITIALIZE,
28379         gl_LIBTEXTSTYLE_SEARCH): New macros.
28380         * modules/libtextstyle (configure.ac): Don't invoke gl_LIBTEXTSTYLE.
28381         * m4/libtextstyle-optional.m4 (gl_LIBTEXTSTYLE_OPTIONAL): Allow an
28382         optional argument. Invoke, not require, gl_LIBTEXTSTYLE.
28383         * modules/libtextstyle-optional (configure.ac): Don't invoke
28384         gl_LIBTEXTSTYLE_OPTIONAL.
28385         * NEWS: Mention the changes.
28387 2020-07-31  Bruno Haible  <bruno@clisp.org>
28389         _GL_CMP: Improve documentation.
28390         Reported by Paul Eggert in
28391         <https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00188.html>.
28392         * m4/gnulib-common.m4 (gl_COMMON_BODY): Clarify what arguments can be
28393         passed.
28395 2020-07-30  Paul Eggert  <eggert@cs.ucla.edu>
28397         largefile: sync with Autoconf master
28398         * m4/largefile.m4 (_AC_SYS_LARGEFILE_TEST_INCLUDES):
28399         Avoid undefined behavior on platforms where off_t is 32 bits.
28400         See: https://bugs.debian.org/742780
28402         alloca: sync with Autoconf master
28403         * m4/alloca.m4 (_AC_LIBOBJ_ALLOCA):
28404         Do not define if Autoconf 2.70 or later, since Autoconf master
28405         now matches us.
28407 2020-07-30  Bruno Haible  <bruno@clisp.org>
28409         unicodeio: Add comment.
28410         * lib/unicodeio.c (unicode_to_mb): Clarify why the code distinguishes
28411         different iconv behaviours.
28413 2020-07-30  Paul Eggert  <eggert@cs.ucla.edu>
28415         Work around some Oracle Studio attribute bugs
28416         These were discovered when building bleeding-edge Emacs with
28417         Oracle Studio.
28418         * m4/gnulib-common.m4 (_GL_ATTRIBUTE_COLD, _GL_ATTRIBUTE_MAY_ALIAS):
28419         Port to Oracle Studio 12.6, which mishandles __attribute__
28420         ((__cold__)) and __attribute__ ((__may_alias__)) even though
28421         __has_attribute says they work.
28423 2020-07-29  Bruno Haible  <bruno@clisp.org>
28425         unicodeio: Fix wrong result on musl libc.
28426         Reported by A. Wilcox <awilfox@adelielinux.org> in
28427         <https://www.openwall.com/lists/musl/2020/07/29/2>.
28428         * lib/unicodeio.c (unicode_to_mb): Handle asterisk fallback characters
28429         on musl libc.
28430         * m4/unicodeio.m4 (gl_UNICODEIO): Invoke gl_MUSL_LIBC.
28431         * modules/unicodeio (Files): Add m4/musl.m4.
28433 2020-07-29  Paul Eggert  <eggert@cs.ucla.edu>
28435         fsusage, regex, stat-size: remove Cray support
28436         As near as I can make out this is actually support for UNICOS/mp,
28437         last released 2005, and Cray hasn’t supported that for years.
28438         * config/srclist.txt: Comment out regex.h for now.
28439         * lib/fsusage.c (get_fs_usage):
28440         * lib/regex.h (re_comp, re_exec):
28441         * lib/stat-size.h (ST_NBLOCKSIZE):
28442         Don’t worry about _CRAY.
28444 2020-07-29  Bruno Haible  <bruno@clisp.org>
28446         parse-datetime: Fix compilation error with bison 3.7.
28447         * modules/parse-datetime (Makefile.am): Create a generated header file
28448         parse-datetime-gen.h in the source directory. Correct #include and
28449         #line statements during preprocessing.
28451 2020-07-28  Bruno Haible  <bruno@clisp.org>
28453         fopen-gnu: Create files correctly (regression from 2020-05-24).
28454         * lib/fopen.c (rpl_open): Pass a third argument to open().
28456 2020-07-27  Paul Eggert  <eggert@cs.ucla.edu>
28458         xalloc-die: don’t depend on xalloc
28459         This removes a circular dependency, as xalloc depends on xalloc-die.
28460         * modules/xalloc-die (Files): Add lib/xalloc.h.
28461         (Depends-on): Remove xalloc.
28462         Add extern-inline, stdint, xalloc-oversized (this is for xalloc.h).
28464         dfa-tests: port to MSVC
28465         Problem reported by Gisle Vanem in:
28466         https://lists.gnu.org/r/bug-gnulib/2020-07/msg00159.html
28467         Also, remove an unnecessary dependency on getprogname.
28468         * modules/dfa-tests (Depends-on): Remove getprogname.
28469         * tests/test-dfa-match-aux.c: Do not include getprogname.h.
28470         (exit_status): New static var.
28471         (dfawarn): Set it instead of exiting.
28472         Do not declare as _Noreturn, to pacify MSVC.
28473         (main): Return exit_status.
28475 2020-07-26  Paul Eggert  <eggert@cs.ucla.edu>
28477         argz: pacify MSVC
28478         * lib/argz.in.h: Avoid "*/*" to pacify MSVC.
28479         Problem reported by Gisle Vanem.
28481         libgmp: remove dependency on havelib
28482         * m4/libgmp.m4 (gl_LIBGMP): If gl_HAVE_MODULE_HAVELIB is not defined,
28483         use the more-traditional AC_SEARCH_LIBS approach.
28484         This should work better with GNU Emacs configuration,
28485         which uses pkg-config instead of a havelib-style approach.
28486         * modules/havelib (gl_HAVE_MODULE_HAVELIB): New witness macro.
28487         * modules/libgmp (Depends-on): Remove havelib.
28489         libgmp: remove HAVE_GMP, LIB_GMP
28490         * m4/libgmp.m4 (gl_LIBGMP): Do not define HAVE_GMP and LIB_GMP, as
28491         they’re redundant.  I’ll adjust GNU Coreutils accordingly.
28493 2020-07-26  Bruno Haible  <bruno@clisp.org>
28495         inttypes: Remove support for AIX 4.
28496         * lib/inttypes.in.h: Assume that PRI_MACROS_BROKEN is 0.
28497         * m4/inttypes-pri.m4: Remove file.
28498         * m4/inttypes.m4 (gl_INTTYPES_PRI_SCN): Don't require gt_INTTYPES_PRI.
28499         (gl_INTTYPES_H_DEFAULTS): Don't initialize PRI_MACROS_BROKEN.
28500         * modules/inttypes-incomplete (Makefile.am): Don't substitute
28501         PRI_MACROS_BROKEN.
28502         * modules/inttypes (Files): Remove m4/inttypes-pri.m4.
28504 2020-07-26  Bruno Haible  <bruno@clisp.org>
28506         gettimeofday: Remove workaround for Mac OS X 10.0.
28507         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Remove macro.
28508         (gl_FUNC_GETTIMEOFDAY): Don't invoke it.
28509         * lib/gettimeofday.c: Don't include localtime-buffer.h.
28510         (gettimeofday): Don't test GETTIMEOFDAY_CLOBBERS_LOCALTIME.
28511         * lib/localtime.c: Don't test GETTIMEOFDAY_CLOBBERS_LOCALTIME.
28512         * modules/gettimeofday (Depends-on): Remove localtime-buffer.
28513         * modules/localtime-buffer: Remove file.
28514         * lib/localtime-buffer.h: Remove file.
28515         * lib/localtime-buffer.c: Remove file.
28516         * m4/localtime-buffer.m4: Remove file.
28517         * MODULES.html.sh (Date and time <time.h>): Remove localtime-buffer.
28519 2020-07-26  Bruno Haible  <bruno@clisp.org>
28521         tzset: Remove workaround for Solaris 2.6.
28522         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Remove macro.
28523         (gl_FUNC_TZSET): Don't invoke it. Don't define TZSET_CLOBBERS_LOCALTIME.
28524         Don't require gl_LOCALTIME_BUFFER_DEFAULTS.
28525         * lib/localtime-buffer.h: Don't test TZSET_CLOBBERS_LOCALTIME.
28526         * lib/localtime-buffer.c: Likewise.
28527         * lib/localtime.c: Likewise.
28528         * lib/tzset.c: Don't include localtime-buffer.h.
28529         (tzset): Don't test TZSET_CLOBBERS_LOCALTIME.
28530         * lib/nstrftime.c (__strftime_internal): Assume HAVE_RUN_TZSET_TEST
28531         is 1.
28532         * modules/tzset (Depends-on): Remove localtime-buffer.
28534 2020-07-26  Bruno Haible  <bruno@clisp.org>
28536         expl: Simplify autoconf test.
28537         * m4/expl.m4 (gl_FUNC_EXPL): Merge the "checking whether expl() breaks
28538         with small values..." test into the "checking whether expl works..."
28539         test.
28541 2020-07-26  Bruno Haible  <bruno@clisp.org>
28543         alloca: Remove Cray-2 and Cray Y-MP support.
28544         * m4/alloca.m4 (_AC_LIBOBJ_ALLOCA): Don't define CRAY_STACKSEG_END.
28545         Enable also on Autoconf >= 2.69.
28546         * lib/alloca.c (ADDRESS_FUNCTION, struct stack_control_header,
28547         struct stack_segment_linkage, struct stk_stat, struct stk_trailer,
28548         i00afunc): Remove.
28550 2020-07-25  Bruno Haible  <bruno@clisp.org>
28552         multiarch: Prepare for x86_64+arm64 universal binaries in macOS 11.
28553         * m4/multiarch.m4 (gl_MULTIARCH): Recognize also the ARM architectures.
28555 2020-07-25  Bruno Haible  <bruno@clisp.org>
28557         sigprocmask: Small autoconf macro improvement.
28558         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Make it possible for the
28559         user to override the value of gl_cv_func_sigprocmask.
28560         * m4/gnulib-common.m4 (gl_SILENT): New macro.
28562 2020-07-25  Bruno Haible  <bruno@clisp.org>
28564         Small autoconf macro improvements.
28565         * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Make it possible for the user to
28566         override the value of gl_cv_func_working_mktime.
28567         * m4/multiarch.m4 (gl_MULTIARCH): Show a line "checking whether the
28568         compiler produces multi-arch binaries..." in the configure output.
28569         * m4/size_max.m4 (gl_SIZE_MAX): When not found, say "no".
28570         * m4/parse-datetime.m4 (gl_C_COMPOUND_LITERALS): Improve indentation.
28572 2020-07-25  Bruno Haible  <bruno@clisp.org>
28574         doc: Update for NetBSD 7.1, 8.0, 9.0.
28575         * doc/*/*.texi: Update.
28576         * m4/exp2l.m4: Update comments.
28577         * m4/expl.m4: Likewise.
28578         * m4/ilogb.m4: Likewise.
28579         * m4/ilogbf.m4: Likewise.
28580         * m4/log10l.m4: Likewise.
28581         * m4/logl.m4: Likewise.
28582         * m4/printf.m4: Likewise.
28583         * m4/rintl.m4: Likewise.
28584         * m4/wcwidth.m4: Likewise.
28586 2020-07-24  Bruno Haible  <bruno@clisp.org>
28588         doc: Update for Mac OS X 10.13.
28589         * doc/*/*.texi: Update.
28590         * m4/expm1l.m4: Update comments.
28591         * m4/getgroups.m4: Likewise.
28592         * m4/getlogin_r.m4: Likewise.
28593         * m4/linkat.m4: Likewise.
28594         * m4/printf.m4: Likewise.
28596 2020-07-24  Bruno Haible  <bruno@clisp.org>
28598         doc: Update for Cygwin 2.9.0.
28599         * doc/*/*.texi: Update.
28601 2020-07-24  Paul Eggert  <eggert@cs.ucla.edu>
28603         parse-datetime: modernize doc
28604         * doc/parse-datetime.texi: Use more-current examples.
28605         Don’t lead with 32-bit time_t, as it’s on its way out.
28606         Capitalize “Epoch” to be consistent with POSIX.
28608         timespec: remove dependence on ‘verify’
28609         * lib/timespec.h: Do not include verify.h; no longer needed.
28610         * modules/timespec (Depends-on): Remove ‘verify’.
28612         Optimize a few more three-valued comparisons
28613         * lib/timespec.h (timespec_cmp, timespec_sign):
28614         * lib/utimecmp.c (utimecmpat):
28615         Avoid conditional branches by using _GL_CMP.
28617         Fix _GL_CMP parenthesization typo
28618         * m4/gnulib-common.m4 (_GL_CMP): Properly parenthesize.
28620 2020-07-24  Bruno Haible  <bruno@clisp.org>
28622         dfa: Revert breaking gawk.
28623         Reported by Arnold Robbins <arnold@skeeve.com>.
28624         * lib/dfa.c (compare): Don't reference the _GL_CMP macro.
28626 2020-07-23  Bruno Haible  <bruno@clisp.org>
28628         Optimize three-valued comparison between integers.
28629         (a > b ? 1 : a < b ? -1 : 0) is the same as (a > b) - (a < b).
28630         * m4/gnulib-common.m4 (gl_COMMON): Define _GL_CMP.
28631         * lib/c-strcasecmp.c (c_strcasecmp): Use _GL_CMP.
28632         * lib/c-strncasecmp.c (c_strncasecmp): Likewise.
28633         * lib/dfa.c (compare): Likewise.
28634         * lib/fts.c (fts_compare_ino): Likewise.
28635         * lib/mbmemcasecmp.c (mbmemcasecmp): Likewise.
28636         * lib/mbscasecmp.c (mbscasecmp): Likewise.
28637         * lib/mbsncasecmp.c (mbsncasecmp): Likewise.
28638         * lib/memcasecmp.c (memcasecmp): Likewise.
28639         * lib/memcmp2.c (memcmp2): Likewise.
28640         * lib/savedir.c (direntry_cmp_inode): Likewise.
28641         * lib/strcasecmp.c (strcasecmp): Likewise.
28642         * lib/strncasecmp.c (strncasecmp): Likewise.
28643         * lib/unistr/u-cmp2.h (FUNC): Likewise.
28645 2020-07-23  Bruno Haible  <bruno@clisp.org>
28647         lchmod: Use /proc on Cygwin.
28648         * lib/lchmod.c (lchmod): Use /proc on Cygwin.
28650 2020-07-23  Ken Brown  <kbrown@cornell.edu>
28652         fchmodat: Use /proc on Cygwin
28653         * lib/fchmodat.c (fchmodat): Use /proc on Cygwin.
28655 2020-07-21  Bruno Haible  <bruno@clisp.org>
28657         aligned-malloc: Optionally use aligned_alloc.
28658         * lib/aligned-malloc.h: Verify the alignment.
28659         (aligned_malloc): Use aligned_alloc as an alternative.
28660         * modules/aligned-malloc (configure.ac): Test for aligned_alloc.
28661         * doc/posix-functions/aligned_alloc.texi: Mention the modules
28662         'aligned-malloc' and 'pagealign_alloc'.
28664 2020-07-21  Bruno Haible  <bruno@clisp.org>
28666         aligned-malloc: Add tests.
28667         * tests/test-aligned-malloc.c: New file.
28668         * modules/aligned-malloc-tests: New file.
28670         aligned-malloc: New module.
28671         * lib/aligned-malloc.h: New file.
28672         * m4/malloc-align.m4: New file.
28673         * modules/aligned-malloc: New file.
28674         * doc/posix-functions/posix_memalign.texi: Mention the new module.
28675         * doc/glibc-functions/memalign.texi: Likewise.
28677 2020-07-21  Bruno Haible  <bruno@clisp.org>
28679         inttypes: Fix PRI*PTR and SCN*PTR on 64-bit native Windows.
28680         * m4/inttypes.m4 (gl_INTTYPES_PRI_SCN): On 64-bit native Windows, make
28681         sure PRIPTR_PREFIX is defined to "ll", not "l".
28683 2020-07-21  Bruno Haible  <bruno@clisp.org>
28685         printf-posix: Make an autoconf test more future-proof.
28686         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_N): Include <inttypes.h> before
28687         using uintptr_t.
28689 2020-07-20  Bruno Haible  <bruno@clisp.org>
28691         list, oset, omap: Relicense some of the container modules under LGPLv2+.
28692         * modules/list (License): Change to LGPLv2+.
28693         * modules/array-list (License): Likewise.
28694         * modules/carray-list (License): Likewise.
28695         * modules/linked-list (License): Likewise.
28696         * modules/avltree-list (License): Likewise.
28697         * modules/rbtree-list (License): Likewise.
28698         * modules/oset (License): Likewise.
28699         * modules/array-oset (License): Likewise.
28700         * modules/avltree-oset (License): Likewise.
28701         * modules/rbtree-oset (License): Likewise.
28702         * modules/omap (License): Likewise.
28703         * modules/array-omap (License): Likewise.
28704         * modules/avltree-omap (License): Likewise.
28705         * modules/rbtree-omap (License): Likewise.
28707 2020-07-20  Bruno Haible  <bruno@clisp.org>
28709         oset: Add an 'update' operation.
28710         * lib/gl_array_oset.c (gl_array_update): New function.
28711         (gl_array_oset_implementation): Use it.
28712         * lib/gl_avltree_omap.c (NODE_PAYLOAD_DISPOSE): Add parameters.
28713         * lib/gl_rbtree_omap.c (NODE_PAYLOAD_DISPOSE): Add parameters.
28714         * lib/gl_avltree_ordered.h (gl_tree_add_node_before): New function,
28715         extracted from gl_tree_nx_add_before.
28716         (gl_tree_nx_add_before): Invoke it.
28717         (gl_tree_add_node_after): New function, extracted from
28718         gl_tree_nx_add_after.
28719         (gl_tree_nx_add_after): Invoke it.
28720         (gl_tree_remove_node_no_free): New function, extracted from
28721         gl_tree_remove_node.
28722         (gl_tree_remove_node): Invoke it.
28723         * lib/gl_rbtree_ordered.h (gl_tree_add_node_before): New function,
28724         extracted from gl_tree_nx_add_before.
28725         (gl_tree_nx_add_before): Invoke it.
28726         (gl_tree_add_node_after): New function, extracted from
28727         gl_tree_nx_add_after.
28728         (gl_tree_nx_add_after): Invoke it.
28729         (gl_tree_remove_node_no_free): New function, extracted from
28730         gl_tree_remove_node.
28731         (gl_tree_remove_node): Invoke it.
28732         * lib/gl_anytree_oset.h (gl_tree_next_node): New function, extracted
28733         from gl_tree_iterator_next.
28734         (gl_tree_iterator_next): Invoke it.
28735         (gl_tree_prev_node, gl_tree_update): New functions.
28736         * lib/gl_avltree_oset.c (NODE_PAYLOAD_DISPOSE): Add parameters.
28737         (gl_avltree_oset_implementation): Use gl_tree_update.
28738         * lib/gl_rbtree_oset.c (NODE_PAYLOAD_DISPOSE): Add parameters.
28739         (gl_rbtree_oset_implementation): Use gl_tree_update.
28740         * lib/gl_oset.h (struct gl_oset_implementation): Add 'update' member.
28741         (gl_oset_update): New function.
28742         * lib/gl_oset.hh (gl_OSet): Add 'update' member.
28743         * modules/avltree-oset (configure.ac): Require AC_C_INLINE.
28744         * modules/rbtree-oset (configure.ac): Likewise.
28745         * tests/test-oset-update.h: New file.
28746         * tests/test-array_oset.c: Include test-oset-update.h.
28747         (main): Invoke test_update.
28748         * tests/test-avltree_oset.c: Likewise.
28749         * tests/test-rbtree_oset.c: Likewise.
28750         * modules/array-oset-tests (Files): Add tests/test-oset-update.h.
28751         * modules/avltree-oset-tests (Files): Likewise.
28752         * modules/rbtree-oset-tests (Files): Likewise.
28753         * tests/test-oset-c++.cc (action): New function.
28754         (main): Test the 'update' member function.
28756 2020-07-15  Paul Eggert  <eggert@cs.ucla.edu>
28758         md5, sha1, sha256, sha512: pacify Autoconf 2.70
28759         * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Use m4_if rather than a
28760         shell if, so that the argument to AC_CHECK_HEADERS is
28761         a simple string that does not require shell evaluation.
28762         This fixes a warning generated by Autoconf 2.69b.
28764 2020-07-12  Bruno Haible  <bruno@clisp.org>
28766         libgmp: Avoid warning when --without-libgmp is used.
28767         * lib/mini-gmp-gnulib.c: Ignore -Wsuggest-attribute=malloc only for
28768         GCC >= 8, not for GCC >= 4.6.
28770 2020-07-12  Bruno Haible  <bruno@clisp.org>
28772         libgmp: Link to the correct shared library.
28773         * m4/libgmp.m4 (gl_LIBGMP): Invoke AC_LIB_HAVE_LINKFLAGS.
28774         * modules/libgmp (Depends-on): Add havelib.
28775         (Link): Mention $(LIBGMP) and $(LTLIBGMP).
28776         * modules/libgmp-tests (Makefile.am): Link test-libgmp with $(LIBGMP).
28778 2020-07-12  Bruno Haible  <bruno@clisp.org>
28780         libgmp tests: Add some safety checks.
28781         * modules/libgmp-tests (Depends-on): Add verify.
28782         * tests/test-libgmp.c: Verify GMP_NUMB_BITS value.
28783         (main): Verify that gmp.h and libgmp versions match.
28785 2020-07-10  Bruno Haible  <bruno@clisp.org>
28787         unicodeio: Fix wrong result on NetBSD.
28788         * lib/unicodeio.c (unicode_to_mb): Handle question mark fallback
28789         characters also on NetBSD.
28791 2020-07-09  Bruno Haible  <bruno@clisp.org>
28793         unicodeio: Fix wrong result on Solaris 11.
28794         Reported by Kiyoshi Kanazawa <yoi_no_myoujou@yahoo.co.jp>
28795         via Akim Demaille <akim.demaille@gmail.com> in
28796         <https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00036.html>.
28797         * lib/unicodeio.c (unicode_to_mb): Handle question mark fallback
28798         characters on Solaris.
28799         * tests/test-unicodeio.c (main): In the "C" locale, expect either the
28800         UTF-8 output or the specified fallback.
28802 2020-07-08  Bruno Haible  <bruno@clisp.org>
28804         unicodeio: Add tests.
28805         * tests/test-unicodeio.c: New file.
28806         * tests/test-unicodeio1.sh: New file.
28807         * tests/test-unicodeio2.sh: New file.
28808         * tests/test-unicodeio3.sh: New file.
28809         * modules/unicodeio-tests: New file.
28811 2020-07-08  Bruno Haible  <bruno@clisp.org>
28813         unicodeio: Document link requirements.
28814         * modules/unicodeio (Link): New section.
28816 2020-07-07  Bruno Haible  <bruno@clisp.org>
28818         doc: Remove support for some very old platforms.
28819         * doc/posix-functions/memcmp.texi: Don't mention "older platforms".
28820         * doc/posix-functions/memcpy.texi: Likewise.
28821         * doc/posix-functions/memmove.texi: Likewise.
28822         * doc/posix-functions/memset.texi: Likewise.
28823         * doc/posix-functions/getcwd.texi: Likewise.
28825         memchr: Remove support for some very old platforms.
28826         * m4/memchr-obsolete.m4: Remove file.
28827         * modules/memchr-obsolete: Remove file.
28828         * m4/memchr.m4 (gl_FUNC_MEMCHR): Assume module 'memchr-obsolete' is
28829         absent. Don't define HAVE_MEMCHR.
28830         * lib/string.in.h (memchr): Assume HAVE_MEMCHR is 1.
28831         * modules/memchr (Depends-on): Remove memchr-obsolete.
28832         (configure.ac): Assume HAVE_MEMCHR is 1.
28833         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
28834         HAVE_MEMCHR.
28835         * modules/string (Makefile.am): Don't substitute HAVE_MEMCHR.
28836         * doc/posix-functions/memchr.texi: Don't mention module
28837         'memchr-obsolete'.
28838         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Assume HAVE_MEMCHR is 1.
28839         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): Assume HAVE_MEMCHR is 1.
28840         * modules/strnlen (Depends-on): Remove memchr-obsolete.
28842         dup2: Remove support for some very old platforms.
28843         * m4/dup2-obsolete.m4: Remove file.
28844         * modules/dup2-obsolete: Remove file.
28845         * m4/dup2.m4 (gl_FUNC_DUP2): Assume module 'dup2-obsolete' is absent.
28846         Don't define HAVE_DUP2.
28847         * lib/unistd.in.h (dup2): Assume HAVE_DUP2 is 1.
28848         * lib/dup2.c: Likewise.
28849         * modules/dup2 (Depends-on, configure.ac): Likewise.
28850         (Depends-on): Remove dup2-obsolete.
28851         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Don't initialize HAVE_DUP2.
28852         * modules/unistd (Makefile.am): Don't substitute HAVE_DUP2.
28853         * doc/posix-functions/dup2.texi: Don't mention module 'dup2-obsolete'.
28855 2020-07-07  Bruno Haible  <bruno@clisp.org>
28857         canonicalize: Trim module dependencies.
28858         * lib/hash-triple.h: Group declarations.
28859         * lib/hash-triple-simple.c: New file, extracted from lib/hash-triple.c.
28860         * lib/hash-triple.c: Don't include <stdlib.h>, <string.h>, hash-pjw.h.
28861         (STREQ): Remove macro.
28862         (triple_hash, triple_compare_ino_str, triple_free): Remove functions.
28863         * modules/hash-triple-simple: New file, based on modules/hash-triple.
28864         * modules/hash-triple (Files): Remove lib/hash-triple.h.
28865         (Depends-on): Add hash-triple-simple. Remove hash-pjw.
28866         * modules/canonicalize (Depends-on): Remove hash-triple. Add
28867         hash-triple-simple.
28868         * modules/file-set (Depends-on): Likewise.
28870 2020-07-07  Bruno Haible  <bruno@clisp.org>
28872         Clarify dependencies to double-slash-root.
28873         * modules/canonicalize (Files): Remove m4/double-slash-root.m4.
28874         (Depends-on): Add double-slash-root.
28875         * modules/canonicalize-lgpl (Depends-on): Add double-slash-root.
28876         * modules/dirname-lgpl (Depends-on): Add double-slash-root.
28878 2020-07-06  Paul Eggert  <eggert@cs.ucla.edu>
28880         libgmp: new module
28881         The idea is to let programs simply include <gmp.h>, and
28882         so long as they live within the mini-gmp subset they need
28883         not worry about whether the GMP libraries are installed.
28884         * MODULES.html.sh: Mention it.
28885         * config/srclist.txt: Mention files copied from GMP source.
28886         * config/srclistvars.sh (GMP): New var.
28887         * lib/mini-gmp-gnulib.c, m4/libgmp.m4, modules/libgmp:
28888         * modules/libgmp-tests, tests/test-libgmp.c: New files.
28889         * lib/mini-gmp.c, lib/mini-gmp.h: New files, copied from GMP.
28891 2020-07-05  Bruno Haible  <bruno@clisp.org>
28893         mkancesdirs: Trim module dependencies.
28894         * lib/mkancesdirs.c: Include filename.h instead of dirname.h.
28895         * modules/mkancesdirs (Depends-on): Remove dirname-lgpl. Add filename.
28897 2020-07-05  Bruno Haible  <bruno@clisp.org>
28899         getprogname: Trim module dependencies.
28900         * lib/getprogname.c: Include basename-lgpl.h instead of dirname.h.
28901         * modules/getprogname (Depends-on): Remove dirname-lgpl. Add
28902         basename-lgpl.
28904 2020-07-05  Bruno Haible  <bruno@clisp.org>
28906         filenamecat-lgpl: Trim module dependencies.
28907         * lib/filenamecat-lgpl.c: Include basename-lgpl.h, filename.h instead of
28908         dirname.h.
28909         * modules/filenamecat-lgpl (Depends-on): Remove dirname-lgpl. Add
28910         basename-lgpl, filename.
28912 2020-07-05  Bruno Haible  <bruno@clisp.org>
28914         backupfile, backup-rename: Trim module dependencies.
28915         * lib/backupfile.c: Include basename-lgpl.h instead of dirname.h.
28916         * modules/backupfile (Depends-on): Remove dirname-lgpl. Add
28917         basename-lgpl.
28918         * modules/backup-rename (Depends-on): Likewise.
28920 2020-07-05  Bruno Haible  <bruno@clisp.org>
28922         argp: Trim module dependencies.
28923         * lib/argp-namefrob.h: Include basename-lgpl.h instead of dirname.h.
28924         * modules/argp (Depends-on): Remove dirname-lgpl. Add basename-lgpl.
28926 2020-07-05  Bruno Haible  <bruno@clisp.org>
28928         basename-lgpl: New module.
28929         * lib/basename-lgpl.h: New file, based on lib/dirname.h and
28930         lib/basename-lgpl.c.
28931         * lib/basename-lgpl.c: Include basename-lgpl.h, not dirname.h. Include
28932         <stdbool.h>, filename.h.
28933         (last_component): Rename a local variable.
28934         * lib/dirname.h: Include basename-lgpl.h.
28935         (DOUBLE_SLASH_IS_DISTINCT_ROOT): Remove macro.
28936         (last_component, base_len): Remove declarations.
28937         * modules/basename-lgpl: New file.
28938         * modules/dirname-lgpl (Files): Remove lib/basename-lgpl.c.
28939         (Depends-on): Add basename-lgpl. Remove double-slash-root.
28940         (Makefile.am): Don't compile basename-lgpl.c.
28941         * doc/posix-functions/basename.texi: Mention the module 'basename-lgpl',
28942         not 'dirname'.
28944 2020-07-05  Bruno Haible  <bruno@clisp.org>
28946         dirname, dirname-lgpl: Simplify.
28947         * m4/dirname.m4: Remove file.
28948         * modules/dirname (configure.ac): Don't invoke gl_DIRNAME.
28949         * modules/dirname-lgpl (Files): Remove m4/dirname.m4.
28950         (configure.ac): Don't invoke gl_DIRNAME_LGPL.
28952 2020-07-05  Bernhard Voelker  <mail@bernhard-voelker.de>
28954         tests: avoid shadowing warning
28955         * tests/test-memchr.c (main): Give page_boundary variable a tight scope.
28957 2020-07-05  Bruno Haible  <bruno@clisp.org>
28959         supersede: Add tests.
28960         * tests/test-supersede.c: New file.
28961         * tests/test-supersede-open.h: New file.
28962         * tests/test-supersede-fopen.h: New file.
28963         * modules/supersede-tests: New file.
28965         supersede: New module.
28966         * lib/supersede.h: New file.
28967         * lib/supersede.c: New file.
28968         * m4/supersede.m4: New file.
28969         * modules/supersede: New file.
28971 2020-07-05  Bruno Haible  <bruno@clisp.org>
28973         Add some copyright headers.
28974         * lib/dev-ino.h: Add copyright header.
28975         * lib/di-set.h: Likewise.
28976         * lib/fchown-stub.c: Likewise.
28977         * lib/file-set.h: Likewise.
28978         * lib/hash-triple.h: Likewise.
28979         * lib/idcache.h: Likewise.
28980         * lib/ino-map.h: Likewise.
28981         * lib/mkancesdirs.h: Likewise.
28982         * lib/scratch_buffer.h: Likewise.
28983         * lib/se-context.in.h: Likewise.
28984         * lib/stdopen.h: Likewise.
28985         * lib/userspec.h: Likewise.
28987 2020-07-04  Bruno Haible  <bruno@clisp.org>
28989         getrandom: Relicense under LGPLv2+.
28990         Paul Eggert's approval is in
28991         <https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00023.html>.
28992         * modules/getrandom (License): Change to LGPLv2+.
28994 2020-07-04  Bruno Haible  <bruno@clisp.org>
28996         getumask: Add tests.
28997         * tests/test-getumask.c: New file.
28998         * modules/getumask-tests: New file.
29000         getumask: New module.
29001         * lib/sys_stat.in.h (getumask): New declaration.
29002         * lib/getumask.c: New file.
29003         * m4/getumask.m4: New file.
29004         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Test whether getumask is
29005         declared.
29006         (gl_SYS_STAT_H_DEFAULTS): Initialize GNULIB_GETUMASK, HAVE_GETUMASK.
29007         * modules/sys_stat (Makefile.am): Substitute GNULIB_GETUMASK,
29008         HAVE_GETUMASK.
29009         * modules/getumask: New file.
29010         * tests/test-sys_stat-c++.cc (getumask): Check signature.
29011         * doc/glibc-functions/getumask.texi: New file.
29012         * doc/gnulib.texi (Glibc sys/stat.h): Include it.
29014 2020-07-04  Bruno Haible  <bruno@clisp.org>
29016         clean-temp: Add support for temporary files with given mode.
29017         * lib/clean-temp.h (gen_register_open_temp): Add mode argument.
29018         * lib/clean-temp.c (struct try_create_file_params): New type.
29019         (try_create_file): New function.
29020         (gen_register_open_temp): Add mode argument. Use try_tempname instead of
29021         gen_tempname.
29023 2020-07-04  Bruno Haible  <bruno@clisp.org>
29025         clean-temp: Document limitations.
29026         * lib/clean-temp.h: Document limitations.
29028 2020-07-04  Bruno Haible  <bruno@clisp.org>
29030         clean-temp: Add support for temporary files with unpredictable names.
29031         * lib/clean-temp.h (gen_register_open_temp): New declaration.
29032         * lib/clean-temp.c: Include tempname.h.
29033         (gen_register_open_temp): New function.
29034         * modules/tempname (configure.ac): Define a module indicator.
29036 2020-07-04  Bruno Haible  <bruno@clisp.org>
29038         clean-temp: Add support for temporary files anywhere in the file system.
29039         * lib/clean-temp.h (register_temporary_file, unregister_temporary_file,
29040         cleanup_temporary_file): New declarations.
29041         * lib/clean-temp.c (file_cleanup_list_lock, file_cleanup_list): New
29042         variables.
29043         (dir_cleanup_list_lock): Renamed from cleanup_list_lock.
29044         (dir_cleanup_list): Renamed from cleanup_list.
29045         (cleanup_action): Process the file_cleanup_list as well.
29046         (do_init_clean_temp): New function.
29047         (clean_temp_once): New variable.
29048         (init_clean_temp): New function.
29049         (create_temp_dir): Invoke it.
29050         (register_temporary_file, unregister_temporary_file,
29051         cleanup_temporary_file): New functions.
29052         (do_unlink, do_rmdir): Remove 'dir' argument. Add 'cleanup_verbose'
29053         argument.
29055 2020-07-04  Bruno Haible  <bruno@clisp.org>
29057         clean-temp: Improve comments.
29058         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
29059         fwriteerror_temp, close_stream_temp): Clarify intended use.
29060         * lib/clean-temp.c: Likewise.
29062 2020-07-04  Bruno Haible  <bruno@clisp.org>
29064         clean-temp: Make multithread-safe, part 2.
29065         * lib/fatal-signal.h: Include <signal.h>.
29066         (get_fatal_signal_set): New declaration.
29067         * lib/fatal-signal.c (get_fatal_signal_set): New function.
29068         * lib/clean-temp.c: Include asyncsafe-spin.h, gl_linked_list.h.
29069         (struct closeable_fd): New type.
29070         (fatal_signal_set): New variable.
29071         (init_fatal_signal_set): New function.
29072         (asyncsafe_close, asyncsafe_fclose_variant): New functions.
29073         (cleanup_action): Invoke asyncsafe_close instead of close.
29074         (create_temp_dir): Invoke init_fatal_signal_set.
29075         (register_fd): Use a plain linked list. Add a 'struct closeable_fd *'
29076         element.
29077         (unregister_fd): Remove function.
29078         (close_temp): Cleanup descriptors list on the fly. Invoke
29079         init_fatal_signal_set. Invoke asyncsafe_close instead of close.
29080         (fclose_variant_temp): New function.
29081         (fclose_temp, fwriteerror_temp, close_stream_temp): Use it.
29082         * modules/clean-temp (Depends-on): Add asyncsafe-spin, linked-list.
29084 2020-07-04  Bruno Haible  <bruno@clisp.org>
29086         clean-temp: Make multithread-safe, part 1.
29087         * lib/clean-temp.c: Include glthread/lock.h.
29088         (cleanup_list_lock): New variable.
29089         (register_temp_file, unregister_temp_file, register_temp_subdir,
29090         unregister_temp_subdir, cleanup_temp_dir_contents): Use it.
29091         (create_temp_dir): Likewise. Don't free the old array.
29092         (descriptors_lock): New variable.
29093         (register_fd, unregister_fd): Use it.
29094         * modules/clean-temp (Depends-on): Add lock.
29096 2020-07-04  Bruno Haible  <bruno@clisp.org>
29098         fatal-signal: Make multithread-safe.
29099         * lib/fatal-signal.c (init_fatal_signals): Add comment.
29100         (do_init_fatal_signal_set): New function, extracted from
29101         init_fatal_signal_set.
29102         (fatal_signal_set_once): New variable.
29103         (init_fatal_signal_set): Use gl_once.
29105 2020-07-03  Bruno Haible  <bruno@clisp.org>
29107         getrandom: Fix compilation error on native Windows (regr. 2020-06-28).
29108         * lib/getrandom.c: Don't include <ntdef.h>. Instead, define NTSTATUS.
29109         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Include <windows.h> before
29110         <bcrypt.h>.
29112 2020-07-03  Bruno Haible  <bruno@clisp.org>
29114         dfa tests: Follow common file naming conventions.
29115         * tests/test-dfa-match-aux.c: Renamed from tests/dfa-match-aux.c.
29116         * tests/test-dfa-match.sh: Renamed from tests/dfa-match.sh. Update.
29117         * tests/test-dfa-invalid-char-class.sh: Renamed from
29118         tests/dfa-invalid-char-class.sh. Update.
29119         * modules/dfa-tests (Files, Makefile.am): Update.
29121 2020-07-03  Bruno Haible  <bruno@clisp.org>
29123         asyncsafe-spin: Use GCC extended asm syntax for SunStudio 12 compiler.
29124         * lib/asyncsafe-spin.c (memory_barrier, atomic_compare_and_swap): Use
29125         the GCC extended asm syntax also for the Sun Studio 12 compilers.
29127 2020-07-03  Bruno Haible  <bruno@clisp.org>
29129         asyncsafe-spin: Reduce code duplication.
29130         * lib/asyncsafe-spin.c (do_lock, do_unlock): New functions.
29131         (asyncsafe_spin_lock, asyncsafe_spin_unlock): Use them.
29132         * modules/asyncsafe-spin (configure.ac): Require AC_C_INLINE.
29134 2020-07-03  Bruno Haible  <bruno@clisp.org>
29136         lchmod: Simplify after 2020-02-22 change.
29137         * m4/lchmod.m4 (gl_FUNC_LCHMOD): Don't require AC_C_INLINE.
29139 2020-07-03  Bruno Haible  <bruno@clisp.org>
29141         gen-uni-tables: Make sure the compiler does not barf on 'inline'.
29142         * modules/gen-uni-tables (configure.ac): Require AC_C_INLINE.
29144 2020-07-03  Bruno Haible  <bruno@clisp.org>
29146         dfa: Make sure the compiler does not barf on 'inline'.
29147         * modules/dfa (configure.ac): Require AC_C_INLINE.
29149 2020-07-03  Bruno Haible  <bruno@clisp.org>
29151         bitset: Make sure the compiler does not barf on 'inline'.
29152         * modules/bitset (configure.ac): New section.
29154 2020-07-01  Paul Eggert  <eggert@cs.ucla.edu>
29156         manywarnings: improve port to GCC 10.1
29157         * build-aux/gcc-warning.spec: Also list warnings that are default
29158         or are enabled by already-given flags.  This lets us speed up
29159         checking for attributes, and makes the generated compilation
29160         commands shorter.  Add -Wanalyzer-too-complex (too much noise).
29161         * m4/manywarnings.m4 (gl_MANYWARN_COMPLEMENT)
29162         (gl_MANYWARN_ALL_GCC): Use gl_AS_VAR_APPEND to append
29163         to shell variables that may have long values.
29164         (gl_MANYWARN_ALL_GCC): Omit flags that are default or are
29165         consequences of other flags, to speed up checking and
29166         shorten commands.
29168         tests: pacify gcc -fanalyzer on zerosize_ptr
29169         * tests/test-memcasecmp.c (main):
29170         * tests/test-memchr.c (main):
29171         * tests/test-memchr2.c (main):
29172         * tests/test-memcmp.c (main):
29173         * tests/test-memmem.c (main):
29174         * tests/test-memrchr.c (main):
29175         * tests/unistr/test-chr.h (main):
29176         * tests/unistr/test-cmp.h (test_cmp):
29177         Check whether zerosize_ptr returns NULL before using it.
29178         This pacifies GCC 10.1’s new fanalyzer option, and matches
29179         other uses of zerosize_ptr.
29181 2020-07-01  Bruno Haible  <bruno@clisp.org>
29183         asyncsafe-spin: Add tests.
29184         * tests/test-asyncsafe-spin1.c: New file.
29185         * tests/test-asyncsafe-spin2.c: New file, based on tests/test-lock.c and
29186         tests/test-pthread-spin.c.
29187         * modules/asyncsafe-spin-tests: New file.
29189 2020-07-01  Bruno Haible  <bruno@clisp.org>
29191         asyncsafe-spin: New module.
29192         * lib/asyncsafe-spin.h: New file.
29193         * lib/asyncsafe-spin.c: New file, based on lib/pthread-spin.c.
29194         * modules/asyncsafe-spin: New file.
29196 2020-07-01  Bruno Haible  <bruno@clisp.org>
29198         windows-spin: Fix race condition on multiprocessor systems.
29199         * lib/windows-spin.c (glwthread_spin_init): Add a memory barrier.
29201 2020-07-01  Bruno Haible  <bruno@clisp.org>
29203         pthread-spin: Add optimized fallback for GCC versions >= 4.1, < 4.7.
29204         * lib/pthread-spin.c (pthread_spin_init, pthread_spin_lock,
29205         pthread_spin_trylock, pthread_spin_unlock): For GCC >= 4.1, < 4.7, use
29206         an implementation based on other GCC built-ins.
29208 2020-07-01  Bruno Haible  <bruno@clisp.org>
29210         pthread-spin: Optimize fallback for GCC versions >= 4.7.
29211         * lib/pthread-spin.c (pthread_spin_init, pthread_spin_lock,
29212         pthread_spin_trylock, pthread_spin_unlock): Use a lock word instead of a
29213         lock byte.
29215 2020-07-01  Bruno Haible  <bruno@clisp.org>
29217         pthread-spin: Add error checking.
29218         * lib/pthread-spin.c: Include <stdbool.h>.
29219         (pthread_spin_init, pthread_spin_lock, pthread_spin_trylock,
29220         pthread_spin_unlock) [GCC>=4.7]: Prefer an implementation that verifies
29221         the unlocks.
29222         * modules/pthread-spin (Depends-on): Add stdbool.
29224 2020-07-01  Bruno Haible  <bruno@clisp.org>
29226         pthread-spin: Add tests.
29227         * tests/test-pthread-spin.c: New file, based on tests/test-lock.c.
29228         * modules/pthread-spin-tests: New file.
29230 2020-07-01  Bruno Haible  <bruno@clisp.org>
29232         tests: Reduce code duplication.
29233         * tests/atomic-int-posix.h: New file, extracted from
29234         tests/test-pthread-mutex.c.
29235         * tests/test-pthread-mutex.c: Include it. Remove the corresponding code.
29236         * tests/test-pthread-rwlock.c: Likewise.
29237         * modules/pthread-mutex-tests (Files): Add tests/atomic-int-posix.h.
29238         * modules/pthread-rwlock-tests (Files): Likewise.
29240 2020-07-01  Bruno Haible  <bruno@clisp.org>
29242         tests: Refactor.
29243         * tests/atomic-int-isoc.h: New file, extracted from tests/test-mtx.c.
29244         * tests/test-mtx.c: Include it. Remove the corresponding code.
29245         * modules/mtx-tests (Files): Add tests/atomic-int-isoc.h.
29247 2020-07-01  Bruno Haible  <bruno@clisp.org>
29249         tests: Refactor.
29250         * tests/atomic-int-gnulib.h: New file, extracted from tests/test-lock.c.
29251         * tests/test-lock.c: Include it. Remove the corresponding code.
29252         * modules/lock-tests (Files): Add tests/atomic-int-gnulib.h.
29254 2020-06-29  Bruno Haible  <bruno@clisp.org>
29256         sys_socket: Don't define socklen_t if it is already defined on mingw.
29257         Reported by Keith Marshall <keith.d.marshall@ntlworld.com> in
29258         <https://savannah.gnu.org/bugs/?57725>,
29259         by Rahul Das <bokul_4u@yahoo.com> in
29260         <https://lists.gnu.org/archive/html/bug-gnulib/2020-04/msg00081.html>,
29261         and by Eli Zaretskii <eliz@gnu.org> in
29262         <https://lists.gnu.org/archive/html/bug-gnulib/2020-06/msg00068.html>.
29263         * lib/sys_socket.in.h (socklen_t): Remove definition.
29265 2020-06-29  Bruno Haible  <bruno@clisp.org>
29267         alloca-opt: Fix warning on mingw.
29268         Reported and solution by Eli Zaretskii <eliz@gnu.org> in
29269         <https://lists.gnu.org/archive/html/bug-gnulib/2020-06/msg00069.html>.
29270         * lib/alloca.in.h: On mingw, include <alloca.h> and then test again
29271         whether alloca is defined.
29273 2020-06-28  Paul Eggert  <eggert@cs.ucla.edu>
29275         getrandom: do not depend on ‘open’ on mingw
29276         Similarly for at-internal, getloadavg.  These modules do not call
29277         the ‘open’ function when they are compiled on mingw.  On mingw,
29278         this avoids having to compile open.c when building Emacs, which
29279         does its own thing with ‘open’.
29280         * modules/at-internal, modules/getloadavg, modules/getrandom:
29281         (Depends-on): Don’t depend on ‘open’ on mingw.
29282         (Depends-on): Require AC_CANONICAL_HOST, for host_os.
29283         * modules/getloadavg (Depends-on):
29284         Depend on intprops, open, stdbool, stdlib only if compiling
29285         getloadavg.c.
29287 2020-06-28  Bruno Haible  <bruno@clisp.org>
29289         doc: Add a note about sigprocmask vs. pthread_sigmask.
29290         * doc/posix-functions/sigprocmask.texi: Add note.
29292 2020-06-28  Bruno Haible  <bruno@clisp.org>
29294         getrandom: Fix compilation errors on older versions of mingw.
29295         Reported by Eli Zaretskii <eliz@gnu.org> in
29296         <https://lists.gnu.org/archive/html/bug-gnulib/2020-06/msg00059.html>.
29297         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Test whether <bcrypt.h> exists.
29298         * lib/getrandom.c: If <bcrypt.h> is not available, include <ntdef.h> and
29299         define/declare BCRYPT_ALG_HANDLE, BCRYPT_USE_SYSTEM_PREFERRED_RNG,
29300         BCryptGenRandom ourselves.
29302 2020-06-28  Bruno Haible  <bruno@clisp.org>
29304         clean-temp: Fix wrong errno in error message.
29305         * lib/clean-temp.c (create_temp_dir): Save errno around
29306         unblock_fatal_signals call.
29308 2020-06-27  Bruno Haible  <bruno@clisp.org>
29310         fatal-signal: Make multithread-safe.
29311         * lib/fatal-signal.c (at_fatal_signal): Don't free the old actions array.
29313 2020-06-27  Bruno Haible  <bruno@clisp.org>
29315         clean-temp: Don't force deletion of temporary files on native Windows.
29316         * lib/clean-temp.h (open_temp, fopen_temp): Add delete_on_close
29317         argument.
29318         * lib/clean-temp.c (open_temp, fopen_temp): Likewise.
29319         * NEWS: Mention the change.
29320         * lib/javacomp.c (write_temp_file): Update.
29322 2020-06-27  Bruno Haible  <bruno@clisp.org>
29324         fatal-signal: Make multithread-safe.
29325         * lib/fatal-signal.c: Include glthread/lock.h.
29326         (at_fatal_signal_lock): New variable.
29327         (at_fatal_signal): Use it.
29328         (fatal_signals_block_lock, fatal_signals_block_counter): New variables.
29329         (block_fatal_signals, unblock_fatal_signals): Use them.
29330         * modules/fatal-signal (Depends-on): Add lock.
29332 2020-06-27  Paul Eggert  <eggert@cs.ucla.edu>
29334         getloadavg: don’t depend on fopen-gnu
29335         This is for Emacs, which does not need fopen-gnu for anything else,
29336         and which would need it only on a NetBSD platform where getloadavg
29337         does not work (does that even happen?).
29338         * lib/getloadavg.c (getloadavg) [__NetBSD__]: Use open, not fopen.
29339         * modules/getloadavg (Depends-on): Remove fopen-gnu.
29341         * tests/test-getloadavg.c (main): Fix typo.
29343 2020-06-27  Bruno Haible  <bruno@clisp.org>
29345         tempname et al.: Fix link errors on MSVC (regression from 2020-05-31).
29346         * modules/tempname (Link): New section.
29347         * modules/mkdtemp (Link): Likewise.
29348         * modules/clean-temp (Link): Likewise.
29349         * modules/mkstemp (Link): Likewise.
29350         * modules/stdlib-safer (Link): Likewise.
29351         * modules/mkstemps (Link): Likewise.
29352         * modules/mkostemp (Link): Likewise.
29353         * modules/mkostemps (Link): Likewise.
29354         * modules/tmpfile (Link): Likewise.
29355         * modules/tmpfile-safer (Link): Likewise.
29356         * modules/javacomp (Link): Add $(LIB_GETRANDOM).
29357         * modules/argv-iter-tests (Makefile.am): Link test-argv-iter with
29358         $(LIB_GETRANDOM).
29359         * NEWS: Mention the changes.
29361 2020-06-27  Bruno Haible  <bruno@clisp.org>
29363         fopen-gnu: Simplify code.
29364         * lib/fopen.c: Include <stdbool.h>.
29365         (rpl_fopen): Use a single variable open_flags instead of
29366         open_flags_standard and open_flags_gnu. Make open_flags_gnu a bool.
29367         * modules/fopen (Depends-on): Add stdbool.
29369 2020-06-26  Bruno Haible  <bruno@clisp.org>
29371         canonicalize: Improve documentation.
29372         * lib/canonicalize.h (canonicalize_filename_mode): Document the failure
29373         return convention.
29375 2020-06-26  Bruno Haible  <bruno@clisp.org>
29377         xgetcwd: Improve documentation.
29378         * lib/xgetcwd.c (xgetcwd): Document the failure return convention.
29380 2020-06-26  Bruno Haible  <bruno@clisp.org>
29382         getcwd: Improve documentation.
29383         * lib/getcwd.c (__getcwd): Document the failure return convention.
29385 2020-06-26  Bruno Haible  <bruno@clisp.org>
29387         fchdir: Improve documentation.
29388         * lib/fchdir.c (get_name, _gl_register_fd): Document the failure return
29389         convention.
29391 2020-06-26  Bruno Haible  <bruno@clisp.org>
29393         filenamecat-lgpl: Set errno upon failure.
29394         * lib/filenamecat-lgpl.c (mfile_name_concat): Document the failure
29395         return convention.
29396         * modules/filenamecat-lgpl (Depends-on): Add malloc-posix.
29398 2020-06-26  Bruno Haible  <bruno@clisp.org>
29400         areadlink-with-size: Set errno upon failure.
29401         * lib/areadlink-with-size.c (areadlink_with_size): Set errno when malloc
29402         fails.
29403         * lib/areadlinkat-with-size.c (areadlinkat_with_size): Add comment.
29405 2020-06-26  Bruno Haible  <bruno@clisp.org>
29407         copy-file: Shrink dependencies.
29408         * modules/copy-file (Depends-on): Remove acl. Add acl-permissions,
29409         qcopy-acl.
29411 2020-06-26  Bruno Haible  <bruno@clisp.org>
29413         doc: Mention declaration fixes implemented by some modules.
29414         * doc/posix-functions/chdir.texi: Mention the module 'chdir'.
29415         * doc/posix-functions/close.texi: Mention that Gnulib makes the function
29416         declaration appear in <unistd.h>.
29417         * doc/posix-functions/dup.texi: Likewise.
29418         * doc/posix-functions/dup2.texi: Likewise.
29419         * doc/posix-functions/gethostname.texi: Likewise.
29420         * doc/posix-functions/isatty.texi: Likewise.
29421         * doc/posix-functions/lseek.texi: Likewise.
29422         * doc/posix-functions/unlink.texi: Likewise.
29423         * doc/posix-functions/read.texi: Mention the module 'read'.
29424         * doc/posix-functions/write.texi: Mention the effects of the module
29425         'write'.
29427 2020-06-25  Marc Nieper-Wißkirchen  <marc@nieper-wisskirchen.de>
29429         c-dtoastr, c-ldtoastr: new modules
29430         These modules provide the same functionality as the modules
29431         dtoastr and ldtoastr except for the formatting taking place in the
29432         C locale.
29433         * MODULES.html.sh: Add c-dtoastr and c-ldtoastr.
29434         * lib/c-dtoastr.c, lib/c-ldtoastr.c: New files.
29435         * lib/ftoastr.c: Prefix exported functions when the macro C_LOCALE is
29436         defined.  Use c_snprintf and c_strtod/c_strtold instead of
29437         snprintf and strtod/strtold whhen the macro C_LOCALE is defined.
29438         * lib/ftoastr.h: Add prototypes for c_dtoastr and c_ldtoastr.
29439         * modules/c-dtoastr, modules/c-dtoastr-tests, modules/c-ldtoastr,
29440         modules/c-ldtoastr-tests: New files.
29441         * tests/test-c-dtoastr.c, tests/test-c-dtoastr.sh,
29442         tests-c-ldtoastr.c tests-c-ldtoastr.sh: New files.
29444 2020-06-21  Bruno Haible  <bruno@clisp.org>
29446         tzset: Fix compilation warnings on mingw (regression from 2017-05-01).
29447         * lib/tzset.c: Include <stdlib.h>, <string.h>.
29449 2020-06-16  Bruno Haible  <bruno@clisp.org>
29451         thread: Avoid possible compiler warnings in uses of gl_thread_exit.
29452         * lib/glthread/thread.h (gl_thread_exit): Add a cast to void.
29454 2020-06-16  Bruno Haible  <bruno@clisp.org>
29456         thread, thrd: Avoid a compiler warning.
29457         * lib/windows-thread.h (glwthread_thread_exit): Mark as non-returning.
29459 2020-06-16  Biswapriyo Nath  <nathbappai@gmail.com>  (tiny change)
29461         windows-thread: Avoid a compiler warning.
29462         * lib/windows-thread.h (glwthread_thread_exit): Change return type to
29463         void.
29464         * lib/windows-thread.c (glwthread_thread_exit): Likewise.
29466 2020-06-15  Bruno Haible  <bruno@clisp.org>
29468         unictype/joininggroup-name: Fix warning on 64-bit mingw.
29469         Reported by Biswapriyo Nath <nathbappai@gmail.com> in
29470         <https://lists.gnu.org/archive/html/bug-gnulib/2020-06/msg00036.html>.
29471         * lib/unictype/joininggroup_name.c (ELEM): Cast struct offset to size_t
29472         first.
29474 2020-06-06  Bruno Haible  <bruno@clisp.org>
29476         calloc-gnu tests: Avoid a test failure with clang.
29477         * tests/test-calloc-gnu.c (main): Mark the pointer variable as
29478         'volatile', to defeat compiler optimizations.
29480 2020-06-01  Paul Eggert  <eggert@cs.ucla.edu>
29482         getloadavg: fix double-increment bug
29483         * lib/getloadavg.c (getloadavg): Fix double-increment typo on
29484         Linux without glibc, Android, Cygwin.  This fixes a bug I
29485         introduced in 2011-02-08T20:23:29Z!eggert@cs.ucla.edu.
29486         Problem and fix reported by Semen Verchenko in:
29487         https://lists.gnu.org/r/bug-gnulib/2020-06/msg00007.html
29489         tempname: use getrandom, not getentropy
29490         This removes a dependency, as getentropy depends on getrandom.
29491         * lib/tempname.c: Include sys/random.h instead of unistd.h.
29492         (RANDOM_BITS) [!_LIBC]: Use getrandom, not getentropy.
29493         * modules/tempname (Depends-on): Depend on getrandom, not getentropy.
29495 2020-06-01  Bruno Haible  <bruno@clisp.org>
29497         doc: New chapter 'Multithreading'.
29498         * doc/multithread.texi: New file.
29499         * doc/gnulib.texi: Include it.
29501 2020-06-01  Bruno Haible  <bruno@clisp.org>
29503         doc: Move 'Running self-tests under valgrind' section.
29504         * doc/gnulib.texi (Build Infrastructure Modules): Include
29505         valgrind-tests.texi here...
29506         (Miscellaneous Notes): ... not here.
29508 2020-06-01  Bruno Haible  <bruno@clisp.org>
29510         doc: Move 'Visual Studio Compatibility' section.
29511         * doc/gnulib.texi (Native Windows Support): Include ld-output-def.texi
29512         here...
29513         (Build Infrastructure Modules): ... not here.
29515 2020-06-01  Paul Eggert  <eggert@cs.ucla.edu>
29517         doc: improve randomness discussion
29518         Inspired by comments from Jeffrey Walton in:
29519         https://lists.gnu.org/r/bug-gnulib/2020-06/msg00002.html
29520         * doc/glibc-functions/getentropy.texi (getentropy):
29521         * doc/glibc-functions/getrandom.texi (getrandom):
29522         Improve discussion of problems with "random" data,
29523         and cite Ristenpart & Yilek.  Also, mention GRND_INSECURE.
29525 2020-06-01  Bruno Haible  <bruno@clisp.org>
29527         doc: Fix Texinfo syntax error.
29528         * doc/glibc-functions/getrandom.texi: Add missing '@item'.
29530 2020-06-01  Asher Gordon  <AsDaGo@posteo.net>
29532         doc: Change '.' to '@.' where appropriate.
29533         * doc/c-ctype.texi: Change '.' to '@.' where appropriate.
29534         * doc/glibc-functions/fstatfs.texi: Likewise.
29535         * doc/glibc-functions/fts_children.texi: Likewise.
29536         * doc/glibc-functions/fts_read.texi: Likewise.
29537         * doc/glibc-functions/getdirentries.texi: Likewise.
29538         * doc/glibc-functions/mkostemp.texi: Likewise.
29539         * doc/glibc-functions/mkostemps.texi: Likewise.
29540         * doc/glibc-functions/mkstemps.texi: Likewise.
29541         * doc/glibc-functions/preadv.texi: Likewise.
29542         * doc/glibc-functions/pwritev.texi: Likewise.
29543         * doc/glibc-functions/sendfile.texi: Likewise.
29544         * doc/glibc-functions/statfs.texi: Likewise.
29545         * doc/gnulib-intro.texi: Likewise.
29546         * doc/gnulib-tool.texi: Likewise.
29547         * doc/intprops.texi: Likewise.
29548         * doc/lib-symbol-visibility.texi: Likewise.
29549         * doc/licenses-texi.texi: Likewise.
29550         * doc/pastposix-functions/bcmp.texi: Likewise.
29551         * doc/pastposix-functions/bcopy.texi: Likewise.
29552         * doc/pastposix-functions/bzero.texi: Likewise.
29553         * doc/pastposix-functions/ecvt.texi: Likewise.
29554         * doc/pastposix-functions/fcvt.texi: Likewise.
29555         * doc/pastposix-functions/ftime.texi: Likewise.
29556         * doc/pastposix-functions/gcvt.texi: Likewise.
29557         * doc/pastposix-functions/getwd.texi: Likewise.
29558         * doc/pastposix-functions/index.texi: Likewise.
29559         * doc/pastposix-functions/mktemp.texi: Likewise.
29560         * doc/pastposix-functions/rindex.texi: Likewise.
29561         * doc/pastposix-functions/wcswcs.texi: Likewise.
29562         * doc/posix-functions/aio_cancel.texi: Likewise.
29563         * doc/posix-functions/aio_error.texi: Likewise.
29564         * doc/posix-functions/aio_fsync.texi: Likewise.
29565         * doc/posix-functions/aio_read.texi: Likewise.
29566         * doc/posix-functions/aio_return.texi: Likewise.
29567         * doc/posix-functions/aio_suspend.texi: Likewise.
29568         * doc/posix-functions/aio_write.texi: Likewise.
29569         * doc/posix-functions/creat.texi: Likewise.
29570         * doc/posix-functions/ctime.texi: Likewise.
29571         * doc/posix-functions/daylight.texi: Likewise.
29572         * doc/posix-functions/fgetpos.texi: Likewise.
29573         * doc/posix-functions/fopen.texi: Likewise.
29574         * doc/posix-functions/freopen.texi: Likewise.
29575         * doc/posix-functions/fseeko.texi: Likewise.
29576         * doc/posix-functions/fsetpos.texi: Likewise.
29577         * doc/posix-functions/fstatat.texi: Likewise.
29578         * doc/posix-functions/fstatvfs.texi: Likewise.
29579         * doc/posix-functions/ftello.texi: Likewise.
29580         * doc/posix-functions/ftruncate.texi: Likewise.
29581         * doc/posix-functions/getrlimit.texi: Likewise.
29582         * doc/posix-functions/lio_listio.texi: Likewise.
29583         * doc/posix-functions/localtime.texi: Likewise.
29584         * doc/posix-functions/lseek.texi: Likewise.
29585         * doc/posix-functions/mkstemp.texi: Likewise.
29586         * doc/posix-functions/mktime.texi: Likewise.
29587         * doc/posix-functions/open.texi: Likewise.
29588         * doc/posix-functions/openat.texi: Likewise.
29589         * doc/posix-functions/opendir.texi: Likewise.
29590         * doc/posix-functions/pread.texi: Likewise.
29591         * doc/posix-functions/pwrite.texi: Likewise.
29592         * doc/posix-functions/readdir.texi: Likewise.
29593         * doc/posix-functions/readdir_r.texi: Likewise.
29594         * doc/posix-functions/scandir.texi: Likewise.
29595         * doc/posix-functions/seekdir.texi: Likewise.
29596         * doc/posix-functions/setrlimit.texi: Likewise.
29597         * doc/posix-functions/statvfs.texi: Likewise.
29598         * doc/posix-functions/strftime.texi: Likewise.
29599         * doc/posix-functions/telldir.texi: Likewise.
29600         * doc/posix-functions/timezone.texi: Likewise.
29601         * doc/posix-functions/tmpfile.texi: Likewise.
29602         * doc/posix-functions/truncate.texi: Likewise.
29603         * doc/posix-functions/tzname.texi: Likewise.
29604         * doc/posix-functions/wcsftime.texi: Likewise.
29605         * doc/windows-sockets.texi: Likewise.
29607 2020-05-31  Paul Eggert  <eggert@cs.ucla.edu>
29609         getrandom-tests: do not assume GRND_RANDOM yields short read
29610         * tests/test-getrandom.c (main): Omit assertion that
29611         getrandom (b, sizeof b, GRND_RANDOM | GRND_NONBLOCK) < sizeof b
29612         when b’s size is 100000.  This assertion fails with Linux kernel
29613         5.6.13, as that kernel ignores the GRND_RANDOM flag.
29614         The separate blocking pool is going away in the Linux kernel, and
29615         they’ve added a flag GRND_INSECURE instead; see:
29616         https://lore.kernel.org/linux-api/705c5a091b63cc5da70c99304bb97e0109be0a26.1577088521.git.luto@kernel.org/
29617         The assertion was iffy anyway; what’s to prevent a kernel from
29618         lazily filling a large buffer with random bytes?
29620         read-file-test: pacify --enable-gcc-warnings
29621         * tests/test-read-file.c (test_read_file): Now static.
29623         tempname: merge from glibc and coreutils
29624         Also, merge in Gnulib’s more-recent methods of making it easier
29625         to share between Gnulib and glibc, and fix a few randomness
29626         glitches.
29627         * lib/tempname.c: Include libc-config.h, not config.h, if !_LIBC.
29628         (__set_errno): Remove; libc-config.h does that for us.
29629         Do not include <sys/time.h>.
29630         (__secure_getenv) [_LIBC]: New macro.
29631         (__try_tempname, __getpid, __gettimeofday) [!_LIBC]: Remove macros.
29632         (RANDOM_BITS): Rewrite.
29633         (RANDOM_VALUE_MAX, BASE_62_DIGITS, BASE_62_POWER): New macros.
29634         (random_value): New typedef.
29635         (try_file, try_dir, try_nocreate): Move up.
29636         (gen_tempname_len, try_tempname_len): New functions.
29637         (gen_tempname_len): Use a constant array rather than a switch.
29638         (try_tempname_len): Don’t assume string length fits in int.
29639         Generalize use of RANDOM_BITS.  If _LIBC, don’t assume RANDOM_BITS
29640         has enough entropy (it’s a bit short).
29641         (__gen_tempname): Rewrite in terms of gen_tempname_len.
29642         (__try_tempname): Rewrite in terms of try_tempname_len.
29643         * lib/tempname.h (gen_tempname_len, try_tempname_len): New decls.
29644         * modules/tempname (Depends-on): Remove gettimeofday, sys_time.
29645         Add getentropy, libc-config.
29647 2020-05-31  Bruno Haible  <bruno@clisp.org>
29649         getrandom, getentropy: Mention the crypto/gc-random module.
29650         Suggested by Simon Josefsson in
29651         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00400.html>.
29652         * doc/glibc-functions/getrandom.texi: Mention the quality issues and the
29653         crypto/gc-random module.
29654         * doc/glibc-functions/getentropy.texi: Likewise.
29656 2020-05-31  Bruno Haible  <bruno@clisp.org>
29658         getentropy: Enhance tests.
29659         * tests/test-getentropy.c (main): Add one more test.
29660         * tests/test-unistd-c++.cc: Check the signature of getentropy.
29662 2020-05-31  Bruno Haible  <bruno@clisp.org>
29664         getentropy: Work around a macOS and Solaris problem.
29665         * lib/unistd.in.h: Include <sys/random.h>, when needed for the
29666         'getentropy' module.
29667         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
29668         UNISTD_H_HAVE_SYS_RANDOM_H.
29669         * m4/sys_random_h.m4 (gl_HEADER_SYS_RANDOM): Set
29670         UNISTD_H_HAVE_SYS_RANDOM_H.
29671         * modules/unistd (Makefile.am): Substitute UNISTD_H_HAVE_SYS_RANDOM_H.
29672         * doc/glibc-functions/getentropy.texi: Document the macOS and Solaris
29673         problem. List more platforms.
29675 2020-05-31  Paul Eggert  <eggert@cs.ucla.edu>
29677         fnmatch: merge from glibc
29678         Also, merge in Gnulib’s more-recent methods of making it easier
29679         to share between Gnulib and glibc.
29680         * lib/fnmatch.c: Reorder includes to match glibc better.
29681         Include libc-config.h instead of config.h.
29682         Include alloca.h only if _LIBC || HAVE_ALLOCA.
29683         Do not include "../locale/elem-hash.h" if _LIBC.
29684         Define macros for btowc, etc. if _LIBC.  All uses simplified.
29685         Define FALLTHROUGH if _LIBC, instead of including attribute.h.
29686         Include intprops.h, since glibc has it now.
29687         (SIZE_MAX): Remove; use (size_t) -1 instead.
29688         Omit the "Comment out all this code" ifdef, since Gnulib
29689         has never really needed it.
29690         (STREQ): Remove; no longer used.
29691         (__libc_use_alloca, alloca, alloca_account): Define as
29692         needed if !_LIBC.
29693         (ISWCTYPE): Remove; all uses replaced by iswctype.
29694         (HANDLE_MULTIBYTE): Remove.  All uses removed by assuming true.
29695         (internal_function): Remove.  All uses removed.
29696         (STRUCT): New macro.
29697         (WIDE_CHAR_VERSION): Define to 0 instead of leaving undefined.
29698         (WMEMCMP): New macro.
29699         (FINDIDX): Define if _LIBC, and include <locale/weight.h>
29700         and <locale/weightwc.h>.
29701         (fnmatch): Prefer __glibc_likely and __glibc_unlikely to
29702         __builtin_expect.  Check for integer overflow more
29703         systematically.  Account for alloca storage better when
29704         recursive.  Use strnlen instead of strlen for efficiency.
29705         * lib/fnmatch_loop.c: Include stdint.h if _LIBC, for int32_t etc.
29706         (struct STRUCT): New type.
29707         (FCT, EXT): New ENDS and ALLOCA_USED args.
29708         All callers changed.
29709         (FCT): Prefer __glibc_unlikely to __builtin_expect.
29710         Simplify by assuming WIDE_CHAR_SUPPORT.
29711         Copy _LIBC code from glibc without worrying Gnulib compatibility.
29712         Cast cold to UCHAR to avoid signedness warning.
29713         (END): Check for invalid pattern.
29714         (EXT): Improve alloca/malloc checking (taken from glibc),
29715         and improve it some more by using intprops.h and checking
29716         for integer overflow and using bool for booleans.
29717         * lib/libc-config.h (compat_symbol): New macro.
29718         (versioned_symbol): Make it ‘extern int dummy’ so that it’s
29719         acceptable to non-GCC when a trailing semicolon is added.
29720         * modules/fnmatch (Depends-on): Add alloca-opt, intprops,
29721         libc-config, strnlen.  Remove alloca.
29723 2020-05-31  Bruno Haible  <bruno@clisp.org>
29725         getrandom: Doc and test tweaks.
29726         * lib/getrandom.c (getrandom): Mention that it never returns 0, and that
29727         it sets errno when failing.
29728         * tests/test-getrandom.c (main): Disable the high-quality check on those
29729         platforms on which it fails.
29730         * doc/glibc-functions/getrandom.texi: Add Minix, AIX, HP-UX, IRIX,
29731         Cygwin to the list of platforms that don't have the function. Add a note
29732         about the quality of the result.
29733         * doc/glibc-headers/sys_random.texi: Don't mention the 'getrandom'
29734         declaration; this is fixed by module 'getrandom'.
29736 2020-05-31  Bruno Haible  <bruno@clisp.org>
29738         getrandom: Add support for native Windows.
29739         * lib/getrandom.c: Include <errno.h>, <windows.h>, <bcrypt.h>,
29740         <wincrypt.h>.
29741         (CRYPT_VERIFY_CONTEXT): New macro.
29742         (LoadLibrary, CryptAcquireContext): Redirect to the variant with suffix
29743         'A'.
29744         (GetProcAddress): New macro.
29745         (BCryptGenRandomFuncType): New type.
29746         (BCryptGenRandomFunc, initialized): New variables.
29747         (initialize): New function.
29748         (getrandom): On native Windows, use <bcrypt.h> API when available, and
29749         <wincrypt.h> API as fallback.
29750         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Set LIB_GETRANDOM.
29751         * modules/getrandom (Link): New section.
29752         * modules/getentropy (Link): Likewise.
29753         * modules/getrandom-tests (Makefile.am): Link test-getrandom against
29754         $(LIB_GETRANDOM).
29755         * modules/getentropy-tests (Makefile.am): Link test-getentropy against
29756         $(LIB_GETRANDOM).
29757         * modules/sys_random-c++-tests (Makefile.am): Link test-sys_random-c++
29758         against $(LIB_GETRANDOM).
29759         * doc/glibc-functions/getrandom.texi: Mention the native Windows
29760         support.
29762 2020-05-31  Bruno Haible  <bruno@clisp.org>
29764         getrandom: Simplify the determination of the random number devices.
29765         Suggested by Paul Eggert in
29766         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00383.html>.
29767         * lib/getrandom.c (NAME_OF_RANDOM_DEVICE, NAME_OF_NONCE_DEVICE): New
29768         macros.
29769         * modules/getrandom (Depends-on): Remove crypto/gc-random.
29771 2020-05-31  Bruno Haible  <bruno@clisp.org>
29773         crypto/gc-random: Fix list of crypto devices for Solaris.
29774         * m4/gc-random.m4 (gl_GC_RANDOM): Don't special-case Solaris.
29776 2020-05-31  Akim Demaille  <akim@lrde.epita.fr>
29778         list: fix GCC warnings
29779         * lib/gl_anytree_list2.h (gl_tree_iterator_free)
29780         (gl_tree_next_node, gl_tree_node_nx_set_value)
29781         (gl_tree_previous_node, gl_tree_next_node):
29782         Mark unused arguments.
29783         * lib/gl_anytree_oset.h (gl_tree_iterator_free): Likewise.
29784         * lib/gl_anylinked_list2.h (gl_linked_node_value)
29785         (gl_linked_node_nx_set_value, gl_linked_iterator_free): Likewise.
29787         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Avoid using
29788         the same variable name in nested scopes.
29790 2020-05-31  Bruno Haible  <bruno@clisp.org>
29792         list-c++, set-c++, oset-c++, map-c++, omap-c++: Don't fool the compiler.
29793         Reported by Akim Demaille in
29794         <https://lists.gnu.org/archive/html/bug-bison/2020-05/msg00102.html>.
29795         * lib/gl_list.hh (gl_List::iterator::next): Avoid a reinterpret_cast.
29796         * lib/gl_set.hh (gl_Set::iterator::next): Likewise.
29797         * lib/gl_oset.hh (gl_OSet::iterator::next): Likewise.
29798         * lib/gl_map.hh (gl_Map::iterator::next): Likewise.
29799         * lib/gl_omap.hh (gl_OMap::iterator::next): Likewise.
29801 2020-05-30  Bruno Haible  <bruno@clisp.org>
29803         wmemchr: Relicense under LGPLv2+.
29804         * modules/wmemchr (License): Set to LGPLv2+.
29806 2020-05-30  Bruno Haible  <bruno@clisp.org>
29808         wmempcpy: New module.
29809         Reported by Paul Eggert in
29810         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00387.html>.
29811         * lib/wchar.in.h (wmempcpy): New declaration.
29812         * lib/wmempcpy.c: New file.
29813         * m4/wmempcpy.m4: New file.
29814         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmempcpy is declared.
29815         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMPCPY, HAVE_WMEMPCPY.
29816         * modules/wchar (Makefile.am): Substitute GNULIB_WMEMPCPY,
29817         HAVE_WMEMPCPY.
29818         * modules/wmempcpy: New file.
29819         * tests/test-wchar-c++.cc: Check the signature of wmempcpy.
29820         * doc/glibc-functions/wmempcpy.texi: Mention the new module.
29821         * modules/mempcpy (Description): Fix typo.
29823 2020-05-30  Bruno Haible  <bruno@clisp.org>
29825         crypto/gc-random: Fix list of crypto devices for NetBSD, OpenBSD.
29826         * m4/gc-random.m4 (gl_GC_RANDOM): Don't special-case NetBSD and OpenBSD.
29828 2020-05-30  Bruno Haible  <bruno@clisp.org>
29830         sys_random: Work around macOS bug.
29831         * m4/sys_random_h.m4 (gl_HEADER_SYS_RANDOM): Include <sys/types.h> and
29832         <stdlib.h> before <sys/random.h>.
29833         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Likewise.
29834         * lib/sys_random.in.h: On macOS, include <sys/types.h> and <stdlib.h>
29835         first.
29836         * doc/glibc-headers/sys_random.texi: Mention the macOS problem.
29838 2020-05-30  Bruno Haible  <bruno@clisp.org>
29840         getrandom: Override incompatible system function on Solaris 11.
29841         * lib/sys_random.in.h (getrandom): Override if REPLACE_GETRANDOM is 1.
29842         * lib/getrandom.c (getrandom): When the system has getrandom, just
29843         invoke it.
29844         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Set REPLACE_GETRANDOM if the
29845         system's getrandom function's prototype is not the expected one.
29846         * m4/sys_random_h.m4 (gl_SYS_RANDOM_H_DEFAULTS): Initialize
29847         REPLACE_GETRANDOM.
29848         * modules/sys_random (Makefile.am): Substitute REPLACE_GETRANDOM.
29849         * modules/getrandom (modules/getrandom): Consider REPLACE_GETRANDOM.
29850         * tests/test-getrandom.c (main): Allow error EINVAL as an alternative to
29851         EAGAIN.
29852         * doc/glibc-functions/getrandom.texi: Mention the new module and the
29853         Solaris problem.
29855 2020-05-30  Bruno Haible  <bruno@clisp.org>
29857         sys_random: Add C++ tests.
29858         * tests/test-sys_random-c++.cc: New file.
29859         * modules/sys_random-c++-tests: New file.
29860         * modules/sys_random-tests (Depends-on): Depend on it.
29862         sys_random: Add tests.
29863         * tests/test-sys_random.c: New file.
29864         * modules/sys_random-tests: New file.
29866         sys_random: New module.
29867         * lib/sys_random.in.h: Use the common idioms for overridable header
29868         files.
29869         * m4/sys_random_h.m4: New file.
29870         * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Require gl_SYS_RANDOM_H_DEFAULTS.
29871         * modules/sys_random: New file.
29872         * modules/getrandom (Files): Remove lib/sys_random.in.h.
29873         (Depends-on): Add sys_random.
29874         (configure.ac): Use gl_SYS_RANDOM_MODULE_INDICATOR, not
29875         gl_UNISTD_MODULE_INDICATOR.
29876         (Makefile.am): Don't generate sys/random.h here.
29877         * doc/glibc-headers/sys_random.texi: New file.
29878         * doc/gnulib.texi: Include it.
29880 2020-05-30  Bruno Haible  <bruno@clisp.org>
29882         unistd: Remove conflicting declaration of getrandom().
29883         * lib/unistd.in.h (getrandom): Remove declaration.
29884         * m4/unistd_h.m4 (gl_UNISTD_H): Don't test whether getrandom is
29885         declared.
29886         (gl_UNISTD_H_DEFAULTS): Don't initialize GNULIB_GETRANDOM,
29887         HAVE_GETRANDOM.
29888         * modules/unistd (Makefile.am): Don't substitute GNULIB_GETRANDOM,
29889         HAVE_GETRANDOM.
29891 2020-05-30  Bruno Haible  <bruno@clisp.org>
29893         getrandom: Add tests.
29894         * tests/test-getrandom.c: New file.
29895         * modules/getrandom-tests: New file.
29897 2020-05-30  Bruno Haible  <bruno@clisp.org>
29899         crypto/gc-random: Fix link error on MSVC.
29900         * m4/gc-random.m4 (gl_GC_RANDOM): Set LIB_GC_RANDOM.
29901         * modules/crypto/gc-random (Link): New section.
29902         * modules/crypto/gc-tests (Makefile.am): Link test-gc against
29903         $(LIB_GC_RANDOM).
29905 2020-05-30  Bruno Haible  <bruno@clisp.org>
29907         Don't assume that UNICODE is not defined.
29908         Many Windows API functions are defined differently (redirecting to a
29909         function with suffix 'W') if the application defines the macro UNICODE
29910         than by default (redirecting to a function with suffix 'A').
29911         * lib/clean-temp.c (OSVERSIONINFO, GetVersionEx): Redirect to the
29912         variant with suffix 'A'.
29913         * lib/dirent-private.h (WIN32_FIND_DATA): Likewise.
29914         * lib/gc-gnulib.c (CryptAcquireContext): Likewise.
29915         * lib/getaddrinfo.c (GetModuleHandle): Likewise.
29916         * lib/getlogin.c (GetUserName): Likewise.
29917         * lib/getlogin_r.c (GetUserName): Likewise.
29918         * lib/gettimeofday.c (LoadLibrary): Likewise.
29919         * lib/isatty.c (LoadLibrary, QueryFullProcessImageName): Likewise.
29920         * lib/link.c (GetModuleHandle, CreateHardLink): Likewise.
29921         * lib/localename.c (GetLocaleInfo, EnumSystemLocales): Likewise.
29922         * lib/mountlist.c (GetDriveType): Likewise.
29923         * lib/nonblocking.c (GetNamedPipeHandleState): Likewise.
29924         * lib/opendir.c (WIN32_FIND_DATA, GetFullPathName, FindFirstFile):
29925         Likewise.
29926         * lib/physmem.c (GetModuleHandle): Likewise.
29927         * lib/poll.c (GetModuleHandle, PeekConsoleInput, CreateEvent,
29928         PeekMessage, DispatchMessage): Likewise.
29929         * lib/progreloc.c (GetModuleFileName): Likewise.
29930         * lib/putenv.c (SetEnvironmentVariable): Likewise.
29931         * lib/read.c (GetNamedPipeHandleState): Likewise.
29932         * lib/readdir.c (FindNextFile): Likewise.
29933         * lib/relocatable.c (GetModuleFileName): Likewise.
29934         * lib/rename.c (MoveFileEx): Likewise.
29935         * lib/rewinddir.c (FindFirstFile): Likewise.
29936         * lib/select.c (GetModuleHandle, PeekConsoleInput, CreateEvent,
29937         PeekMessage, DispatchMessage): Likewise.
29938         * lib/sethostname.c (GetComputerNameEx, SetComputerNameEx): Likewise.
29939         * lib/socket.c (WSASocket): Likewise.
29940         * lib/stat-w32.c (LoadLibrary, GetFinalPathNameByHandle): Likewise.
29941         * lib/stat.c (WIN32_FIND_DATA, CreateFile, FindFirstFile): Likewise.
29942         * lib/stdio-read.c (GetNamedPipeHandleState): Likewise.
29943         * lib/stdio-write.c (GetNamedPipeHandleState): Likewise.
29944         * lib/tmpdir.c (GetTempPath): Likewise.
29945         * lib/tmpfile.c (OSVERSIONINFO, GetVersionEx, GetTempPath): Likewise.
29946         * lib/uname.c (OSVERSIONINFO, GetVersionEx): Likewise.
29947         * lib/utime.c (CreateFile, GetFileAttributes): Likewise.
29948         * lib/windows-cond.c (CreateEvent): Likewise.
29949         * lib/windows-rwlock.c (CreateEvent): Likewise.
29950         * lib/windows-timedmutex.c (CreateEvent): Likewise.
29951         * lib/windows-timedrecmutex.c (CreateEvent): Likewise.
29952         * lib/windows-timedrwlock.c (CreateEvent): Likewise.
29953         * lib/write.c (GetNamedPipeHandleState): Likewise.
29955 2020-05-30  Bruno Haible  <bruno@clisp.org>
29957         physmem: Fix compilation errors on MSVC.
29958         * lib/physmem.c (PFN_MS_EX): Use BOOL, not WINBOOL.
29959         * modules/physmem (Depends-on): Add unistd.
29961 2020-05-29  Bruno Haible  <bruno@clisp.org>
29963         gnulib-tool: Fix link errors with a particular set of modules on mingw.
29964         * gnulib-tool (func_emit_tests_Makefile_am): Add ../lib/libgnu.a to
29965         LDADD a second time, after the second occurrence of libtests.a.
29966         * pygnulib/GLEmiter.py (tests_Makefile_am): Likewise.
29968 2020-05-29  Bruno Haible  <bruno@clisp.org>
29970         fnmatch: Rely on more gnulib modules.
29971         * modules/fnmatch (Depends-on): Add btowc, isblank, iswctype, wmemchr,
29972         wmempcpy, mempcpy.
29973         * lib/fnmatch.c: Assume that HAVE_WCTYPE_H, HAVE_BTOWC, HAVE_ISWCTYPE,
29974         HAVE_WMEMCHR, HAVE_WMEMPCPY, HAVE_ISBLANK, HAVE_DECL_ISBLANK,
29975         HAVE_MEMPCPY are all 1.
29976         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH): Don't test for btowc, isblank,
29977         iswctype, mempcpy, wmemchr, wmemcpy, wmempcpy, <wctype.h>.
29979 2020-05-29  Bruno Haible  <bruno@clisp.org>
29981         Avoid dynamic lookup of Windows API functions when possible.
29982         * lib/getaddrinfo.c (GetProcAddress, getaddrinfo_func,
29983         freeaddrinfo_func, getnameinfo_func, getaddrinfo_ptr, freeaddrinfo_ptr,
29984         getnameinfo_ptr): Don't define in a build for Windows XP or higher.
29985         (use_win32_p): Define differently.
29986         * lib/link.c (GetProcAddress, CreateHardLinkFuncType,
29987         CreateHardLinkFunc, initialized, initialize): Don't define in a build
29988         for Windows XP or higher.
29990 2020-05-29  Daiki Ueno  <ueno@gnu.org>
29992         read-file: disable buffering if RF_SENSITIVE is set
29993         * lib/read-file.c (read_file): Call setvbuf if RF_SENSITIVE.
29994         Suggested by Glenn Strauss.
29995         (fread_file): Suggest calling setvbuf before calling this
29996         function.  Suggested by Bruno Haible.
29998 2020-05-29  Bruno Haible  <bruno@clisp.org>
30000         wmemchr, wmemcmp, wmemcpy, wmemmove, wmemset: Fix autoconf test.
30001         * m4/wmemchr.m4 (gl_FUNC_WMEMCHR): Link, not only compile, the test
30002         program.
30003         * m4/wmemcmp.m4 (gl_FUNC_WMEMCMP): Likewise.
30004         * m4/wmemcpy.m4 (gl_FUNC_WMEMCPY): Likewise.
30005         * m4/wmemmove.m4 (gl_FUNC_WMEMMOVE): Likewise.
30006         * m4/wmemset.m4 (gl_FUNC_WMEMSET): Likewise.
30008 2020-05-29  Bruno Haible  <bruno@clisp.org>
30010         Fix compilation error on native Windows (regression from 2020-05-28).
30011         Reported by Daiki Ueno.
30012         * lib/gettimeofday.c (GetSystemTimePreciseAsFileTimeFunc): Define as
30013         macro when not using dynamic loading.
30014         * lib/isatty.c (GetNamedPipeClientProcessIdFunc,
30015         QueryFullProcessImageNameFunc): Likewise.
30016         * lib/stat-w32.c (GetFileInformationByHandleExFunc,
30017         GetFinalPathNameByHandleFunc): Likewise.
30019 2020-05-29  Daiki Ueno  <ueno@gnu.org>
30021         fopen-gnu-tests: fix "\x" escape usage
30022         * tests/test-fopen-gnu.c (DATA): Use safer escape sequence.
30024 2020-05-28  Bruno Haible  <bruno@clisp.org>
30026         Avoid dynamic loading of Windows API functions when possible.
30027         Reported by Steve Lhomme <robux4@ycbcr.xyz> in
30028         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00182.html>.
30029         * lib/gettimeofday.c (GetProcAddress,
30030         GetSystemTimePreciseAsFileTimeFuncType,
30031         GetSystemTimePreciseAsFileTimeFunc, initialized, initialize): Don't
30032         define in a build for Windows 8 or higher.
30033         * lib/isatty.c (GetProcAddress, GetNamedPipeClientProcessIdFuncType,
30034         GetNamedPipeClientProcessIdFunc, QueryFullProcessImageNameFuncType,
30035         QueryFullProcessImageNameFunc, initialized, initialize): Don't define
30036         in a build for Windows Vista or higher.
30037         * lib/stat-w32.c (GetProcAddress, GetFileInformationByHandleExFuncType,
30038         GetFileInformationByHandleExFunc, GetFinalPathNameByHandleFuncType,
30039         GetFinalPathNameByHandleFunc, initialized, initialize): Likewise.
30041 2020-05-28  Paul Eggert  <eggert@cs.ucla.edu>
30043         explicit_bzero-tests: improve -Wmissing-declarations pacification
30044         * tests/test-explicit_bzero.c: Now noinline.
30045         Suggested by Bruno Haible in:
30046         https://lists.gnu.org/r/bug-gnulib/2020-05/msg00300.html
30048 2020-05-28  Bruno Haible  <bruno@clisp.org>
30050         Fix build errors due to read-file changes (regression from 2020-05-27).
30051         * lib/git-merge-changelog.c (read_changelog_file): Update read_file
30052         invocation.
30053         * tests/test-sameacls.c (main): Likewise.
30054         * tests/test-pipe-filter-gi1.c (main): Call read_file instead of
30055         read_binary_file.
30056         * tests/test-pipe-filter-ii1.c (main): Likewise.
30058 2020-05-28  Bruno Haible  <bruno@clisp.org>
30060         fts: Make more robust in multithreaded applications.
30061         * lib/fts.c (fts_open): Pass an O_CLOEXEC flag to open().
30062         * modules/fts (Depends-on): Add 'open'.
30064 2020-05-28  Bruno Haible  <bruno@clisp.org>
30066         relocatable-prog: Make more robust in multithreaded applications.
30067         * lib/progreloc.c (O_CLOEXEC): Define fallback to 0 when use from module
30068         relocatable-prog-wrapper.
30069         (find_executable): Pass an O_CLOEXEC flag to open().
30070         * modules/relocatable-prog (Depends-on): Add 'open'.
30072 2020-05-28  Bruno Haible  <bruno@clisp.org>
30074         getloadavg: Make more robust in multithreaded applications.
30075         * lib/getloadavg.c (getloadavg): Pass an O_CLOEXEC flag to open().
30076         Simplify use of O_CLOEXEC.
30077         * modules/getloadavg (Depends-on): Add 'open'.
30079 2020-05-28  Bruno Haible  <bruno@clisp.org>
30081         vma-iter: Make more robust in multithreaded applications.
30082         * lib/vma-iter.c (rof_open, vma_iterate): Pass an O_CLOEXEC flag to
30083         open().
30084         * modules/vma-iter (Depends-on): Add 'open'.
30086 2020-05-28  Bruno Haible  <bruno@clisp.org>
30088         truncate: Make more robust in multithreaded applications.
30089         * lib/truncate.c (truncate): Pass an O_CLOEXEC flag to open().
30091 2020-05-28  Bruno Haible  <bruno@clisp.org>
30093         pagealign_alloc: Make more robust in multithreaded applications.
30094         * lib/pagealign_alloc.c (pagealign_alloc): Pass an O_CLOEXEC flag to
30095         open().
30096         * modules/pagealign_alloc (Depends-on): Add 'open'.
30098 2020-05-28  Bruno Haible  <bruno@clisp.org>
30100         openat: Make more robust in multithreaded applications.
30101         * lib/openat.c (openat_needs_fchdir): Pass an O_CLOEXEC flag to open().
30103 2020-05-28  Bruno Haible  <bruno@clisp.org>
30105         at-internal: Make more robust in multithreaded applications.
30106         * lib/openat-proc.c (openat_proc_name): Pass an O_CLOEXEC flag to
30107         open().
30109 2020-05-28  Bruno Haible  <bruno@clisp.org>
30111         mountlist: Make more robust in multithreaded applications.
30112         * lib/mountlist.c (read_file_system_list): Pass an O_CLOEXEC flag to
30113         open().
30114         * modules/mountlist (Depends-on): Add 'open'.
30116 2020-05-28  Bruno Haible  <bruno@clisp.org>
30118         login_tty: Make more robust in multithreaded applications.
30119         * lib/login_tty.c (login_tty): Pass an O_CLOEXEC flag to open().
30120         * modules/login_tty (Depends-on): Add 'open'.
30122 2020-05-28  Bruno Haible  <bruno@clisp.org>
30124         javacomp: Make more robust in multithreaded applications.
30125         * lib/javacomp.c (get_classfile_version): Pass an O_CLOEXEC flag to
30126         open().
30127         * modules/javacomp (Depends-on): Add 'open'.
30129 2020-05-28  Bruno Haible  <bruno@clisp.org>
30131         getprogname: Make more robust in multithreaded applications.
30132         * lib/getprogname.c (getprogname): Pass an O_CLOEXEC flag to open().
30133         * modules/getprogname (Depends-on): Add 'open'.
30135 2020-05-28  Bruno Haible  <bruno@clisp.org>
30137         get_progname_of: Make more robust in multithreaded applications.
30138         * lib/get_progname_of.c (get_progname_of): Pass an O_CLOEXEC flag to
30139         open().
30140         * modules/get_progname_of (Depends-on): Add 'open'.
30142 2020-05-28  Bruno Haible  <bruno@clisp.org>
30144         get_ppid_of: Make more robust in multithreaded applications.
30145         * lib/get_ppid_of.c (get_ppid_of): Pass an O_CLOEXEC flag to open().
30146         * modules/get_ppid_of (Depends-on): Add 'open'.
30148 2020-05-28  Bruno Haible  <bruno@clisp.org>
30150         get-rusage-as: Make more robust in multithreaded applications.
30151         * lib/get-rusage-as.c (get_rusage_as_via_setrlimit): Pass an O_CLOEXEC
30152         flag to open().
30153         * modules/get-rusage-as (Depends-on): Add 'open'.
30155 2020-05-28  Bruno Haible  <bruno@clisp.org>
30157         crypto/gc: Make more robust in multithreaded applications.
30158         * lib/gc-gnulib.c (randomize): Pass an O_CLOEXEC flag to open().
30159         * modules/crypto/gc (Depends-on): Add 'open'.
30161 2020-05-28  Bruno Haible  <bruno@clisp.org>
30163         copy-file: Make more robust in multithreaded applications.
30164         * lib/copy-file.c (qcopy_file_preserving): Pass an O_CLOEXEC flag to
30165         open().
30167 2020-05-28  Bruno Haible  <bruno@clisp.org>
30169         chown: Make more robust in multithreaded applications.
30170         * lib/chown.c (rpl_chown): Pass an O_CLOEXEC flag to open().
30172 2020-05-28  Bruno Haible  <bruno@clisp.org>
30174         doc: Fix statement about O_CLOEXEC (wrong since 2017-08-14).
30175         * doc/posix-headers/fcntl.texi: Gnulib no longer defines O_CLOEXEC to 0.
30177 2020-05-28  Daiki Ueno  <ueno@gnu.org>
30179         fopen-gnu: make 'b' flag can be used with 'e' on Windows
30180         * lib/fopen.c (rpl_fopen): Pass O_BINARY to open, if a 'b' flag is
30181         specified on Windows.
30182         * tests/test-fopen-gnu.c (DATA): New define.
30183         (main): Add test for reading binary files with an 'e' flag.
30185 2020-05-27  Bruno Haible  <bruno@clisp.org>
30187         Don't assume that UNICODE is not defined.
30188         Some Windows types, such as TCHAR, LPTSTR, LPCTSTR, are defined
30189         differently if the application defines the macro UNICODE.
30190         Reported by Steve Lhomme <robux4@ycbcr.xyz> in
30191         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00184.html>.
30192         * lib/link.c (CreateHardLinkFuncType): Use LPCSTR, not LPCTSTR.
30193         * lib/localename.c (enum_locales_fn): Use LPSTR, not LPTSTR.
30194         * lib/stat-w32.c (GetFinalPathNameByHandleFuncType): Likewise.
30196 2020-05-27  Bruno Haible  <bruno@clisp.org>
30198         Improve pattern for defining _WIN32_WINNT.
30199         Newer versions of the Windows API may not only add, but also remove API
30200         functions. Therefore, when the user is e.g. building for Windows 10, we
30201         should not set _WIN32_WINNT to e.g. Windows 8, as this may enable the
30202         use of APIs that were present in Windows 8 but removed in Windows 10.
30203         Suggested by Steve Lhomme <robux4@ycbcr.xyz> in
30204         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00318.html>.
30205         * lib/ftruncate.c (_WIN32_WINNT): Don't set to a smaller value.
30206         * lib/sethostname.c (_WIN32_WINNT): Likewise.
30207         * lib/stat-w32.c (_WIN32_WINNT): Likewise.
30209 2020-05-27  Bruno Haible  <bruno@clisp.org>
30211         javacomp: Make more robust in multithreaded applications.
30212         * lib/javacomp.c (write_temp_file): Pass an 'e' flag to fopen_temp.
30213         * modules/javacomp (Depends-on): Add fopen-gnu.
30215 2020-05-27  Bruno Haible  <bruno@clisp.org>
30217         mountlist: Make more robust in multithreaded applications.
30218         * lib/mountlist.c (setmntent, read_file_system_list): Pass an 'e' flag
30219         to fopen.
30220         * modules/mountlist (Depends-on): Add fopen-gnu.
30222 2020-05-27  Bruno Haible  <bruno@clisp.org>
30224         sethostname: Make more robust in multithreaded applications.
30225         * lib/sethostname.c (sethostname): Pass an 'e' flag to fopen.
30226         * modules/sethostname (Depends-on): Add fopen-gnu.
30228 2020-05-27  Bruno Haible  <bruno@clisp.org>
30230         readutmp: Make more robust in multithreaded applications.
30231         * lib/readutmp.c (read_utmp): Pass an 'e' flag to fopen.
30232         * modules/readutmp (Depends-on): Add fopen-gnu.
30234 2020-05-27  Bruno Haible  <bruno@clisp.org>
30236         getpass: Make more robust in multithreaded applications.
30237         * lib/getpass.c (getpass): Pass an 'e' flag to fopen.
30238         * modules/getpass (Depends-on): Add fopen-gnu.
30240 2020-05-27  Bruno Haible  <bruno@clisp.org>
30242         getloadavg: Make more robust in multithreaded applications.
30243         * lib/getloadavg.c (getloadavg): Pass an 'e' flag to fopen.
30244         * modules/getloadavg (Depends-on): Add fopen-gnu.
30246 2020-05-27  Bruno Haible  <bruno@clisp.org>
30248         exclude: Make more robust in multithreaded applications.
30249         * lib/exclude.c (add_exclude_file): Pass an 'e' flag to fopen.
30250         * modules/exclude (Depends-on): Add fopen-gnu.
30252 2020-05-27  Bruno Haible  <bruno@clisp.org>
30254         bitset: Make more robust in multithreaded applications.
30255         * lib/bitset/stats.c (bitset_stats_read, bitset_stats_write): Pass an
30256         'e' flag to fopen.
30257         * modules/bitset (Depends-on): Add fopen-gnu.
30259 2020-05-27  Daiki Ueno  <ueno@gnu.org>
30261         read-file: add RF_SENSITIVE flag
30262         * lib/read-file.h (RF_SENSITIVE): New define.
30263         * lib/read-file.c (fread_file, read_file): Take into account of
30264         RF_SENSITIVE flag.
30265         * modules/read-file (Depends-on): Add explicit_bzero.
30266         This adds an alternative behavior of those functions to explicitly
30267         clear the internal memory block when it becomes unused.  This is
30268         useful for reading sensitive information from a file.
30270 2020-05-27  Daiki Ueno  <ueno@gnu.org>
30272         read-file: add flags to modify reading behavior
30273         * lib/read-file.h (RF_BINARY): New define.
30274         (fread_file, read_file): Take FLAGS argument.
30275         (read_binary_file): Remove.
30276         * lib/read-file.c (internal_read_file): Merge into ...
30277         (read_file): ... here.
30278         * modules/read-file-tests (Files): Add "tests/macros.h".
30279         * tests/test-read-file.c (main): Refactor using ASSERT macro.
30280         * NEWS: Mention this change.
30282 2020-05-26  Bernhard Voelker  <mail@bernhard-voelker.de>
30284         doc/gnulib-intro.texi: add missing "to" in sentence
30285         Reported by Bjarni Ingi Gislason <bjarniig@rhi.hi.is> in
30286         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00316.html>.
30287         * doc/gnulib-intro.texi (Collaborative Development): Add "to".
30289 2020-05-26  Bruno Haible  <bruno@clisp.org>
30291         count-one-bits: Fix MSVC specific code.
30292         Reported by Gisle Vanem <gisle.vanem@gmail.com> in
30293         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00309.html>.
30294         * lib/count-one-bits.h (COUNT_ONE_BITS_GENERIC): Don't define if we're
30295         using GCC.
30296         [_MSC_VER]: Use correct syntax for #pragma intrinsic.
30297         (__popcnt64): In 32-bit mode, define as an inline function.
30298         (COUNT_ONE_BITS): Rename first argument to GCC_BUILTIN.
30300 2020-05-26  Bruno Haible  <bruno@clisp.org>
30302         argz: Avoid name clashes through argz.h.
30303         Reported by Gisle Vanem <gisle.vanem@gmail.com> in
30304         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00308.html>.
30305         * lib/argz.h: Don't use __ prefixed identifiers.
30306         (const): Remove definition.
30307         (argz_next): Remove inline definitions.
30309 2020-05-26  Daiki Ueno  <ueno@gnu.org>
30311         read-file: make use of fopen-gnu
30312         * lib/read-file.c (read_file): Pass an 'e' flag to fopen.
30313         (read_binary_file): Likewise.
30314         * modules/read-file (Depends-on): Add fopen-gnu.
30316 2020-05-25  Paul Eggert  <eggert@cs.ucla.edu>
30318         getentropy, getrandom: new modules
30319         * MODULES.html.sh (func_all_modules):
30320         * lib/unistd.in.h (getentropy, getrandom):
30321         * m4/unistd_h.m4 (gl_UNISTD_H, gl_UNISTD_H_DEFAULTS):
30322         * modules/unistd (unistd.h):
30323         Add support for getentropy, getrandom.
30324         * doc/glibc-functions/getentropy.texi (getentropy):
30325         * doc/glibc-functions/getrandom.texi (getrandom):
30326         These are now fixed on some platforms.
30327         * lib/getentropy.c, lib/getrandom.c, lib/sys_random.in.h:
30328         * m4/getentropy.m4, m4/getrandom.m4:
30329         * modules/getentropy, modules/getentropy-tests:
30330         * modules/getrandom, modules/getrandom-tests:
30331         * tests/test-getentropy.c, tests/test-getrandom.c:
30332         New files.
30334 2020-05-25  Bruno Haible  <bruno@clisp.org>
30336         Add missing C99 dependencies.
30337         Reported by Paul Smith <psmith@gnu.org> in
30338         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00290.html>.
30339         * modules/assert (Depends-on): Add c99.
30340         * modules/filenamecat-lgpl (Depends-on): Likewise.
30341         * modules/libc-config (Depends-on): Likewise.
30342         * modules/mktime (Depends-on): Likewise.
30343         * modules/random_r (Depends-on): Likewise.
30344         * modules/regex (Depends-on): Likewise.
30345         * modules/scratch_buffer (Depends-on): Likewise.
30346         * modules/timespec-add (Depends-on): Likewise.
30347         * modules/timespec-sub (Depends-on): Likewise.
30348         * modules/verify (Depends-on): Likewise.
30350 2020-05-24  Paul Eggert  <eggert@cs.ucla.edu>
30352         explicit_bzero-tests: pacify -Wmissing-declarations
30353         * tests/test-explicit_bzero.c (do_secret_stuff, test_stack):
30354         Now static.
30356 2020-05-24  Bruno Haible  <bruno@clisp.org>
30358         fopen-gnu: Add tests.
30359         * tests/test-fopen-gnu.c: New file.
30360         * modules/fopen-gnu-tests: New file.
30362         fopen-gnu: New module.
30363         Suggested by Tim Rühsen <tim.ruehsen@gmx.de> in
30364         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00119.html>.
30365         * lib/fopen.c (rpl_fopen): When the fopen-gnu module is enabled and the
30366         mode contains an 'x' or 'e' flag, use open() followed by fdopen().
30367         * m4/fopen.m4 (gl_FUNC_FOPEN_GNU): New macro.
30368         * modules/fopen-gnu: New file.
30369         * doc/posix-functions/fopen.texi: Document the 'fopen-gnu' module.
30371 2020-05-24  Bruno Haible  <bruno@clisp.org>
30373         open, openat: Really support O_CLOEXEC.
30374         * lib/open.c (open): When have_cloexec is still undecided, do pass a
30375         O_CLOEXEC flag to orig_open.
30376         * lib/openat.c (rpl_openat): When have_cloexec is still undecided, do
30377         pass a O_CLOEXEC flag to orig_openat.
30378         * tests/test-open.h (test_open): Verify that O_CLOEXEC is honoured.
30379         * modules/open-tests (Depends-on): Add fcntl.
30380         * modules/openat-tests (Depends-on): Likewise.
30381         * modules/fcntl-safer-tests (Depends-on): Likewise.
30383 2020-05-24  Bruno Haible  <bruno@clisp.org>
30385         fopen: Fix the trailing slash workaround.
30386         * lib/fopen.c (rpl_fopen): Parse the mode string. Recognize "r+" as a
30387         write access. Pass the right flags to open().
30388         * tests/test-fopen.h (test_fopen): Add a few more tests on directories.
30390 2020-05-23  Paul Eggert  <eggert@cs.ucla.edu>
30392         assure: new macro ‘affirm’
30393         * lib/assure.h: Include verify.h.
30394         (affirm): New macro, after a suggestion by Marc Nieper-Wißkirchen in:
30395         https://lists.gnu.org/r/bug-gnulib/2020-05/msg00263.html
30396         and commentary by Bruno Haible in:
30397         https://lists.gnu.org/r/bug-gnulib/2020-05/msg00278.html
30398         * modules/assure (Depends-on:): Add verify.
30400 2020-05-23  Bruno Haible  <bruno@clisp.org>
30402         calloc-gnu: Make test work in non-flat address spaces.
30403         Uses code by Paul Eggert.
30404         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Allow a calloc() implementation
30405         to return more than SIZE_MAX bytes, but only without wrap-around bugs.
30407 2020-05-23  Bruno Haible  <bruno@clisp.org>
30409         calloc-gnu: Avoid wrong configure results with GCC's AddressSanitizer.
30410         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Split the AC_RUN_IFELSE into two
30411         AC_RUN_IFELSE invocations.
30413 2020-05-23  Bruno Haible  <bruno@clisp.org>
30415         isnanf, isnanl, isnan: Don't use nonexistent builtins with clang.
30416         * m4/isnanf.m4 (gl_HAVE_ISNANF_NO_LIBM, gl_HAVE_ISNANF_IN_LIBM,
30417         gl_ISNANF_WORKS): Don't use __builtin_isnanf on clang versions that
30418         don't have it.
30419         * m4/isnanl.m4 (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM,
30420         gl_FUNC_ISNANL_WORKS): Don't use __builtin_isnanl on clang versions that
30421         don't have it.
30422         * lib/isnanf-nolibm.h (__has_builtin): New macro.
30423         (isnanf): Don't use __builtin_isnanf on clang versions that don't have
30424         it.
30425         * lib/isnanl-nolibm.h (__has_builtin): New macro.
30426         (isnanl): Don't use __builtin_isnanl on clang versions that don't have
30427         it.
30428         * lib/math.in.h (__has_builtin): New macro.
30429         (isnanf): Don't use __builtin_isnanf on clang versions that don't have
30430         it.
30431         (isnanl): Don't use __builtin_isnanl on clang versions that don't have
30432         it.
30433         (isnan): Don't use the builtins on clang versions that don't have
30434         __builtin_isnanf and __builtin_isnanl.
30436 2020-05-23  Bruno Haible  <bruno@clisp.org>
30438         calloc-gnu: Avoid wrong configure results with clang.
30439         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Mark the pointer variable as
30440         'volatile', to defeat compiler optimizations.
30442 2020-05-23  Bruno Haible  <bruno@clisp.org>
30444         isnanl, isnanl-nolibm: Make a test work better with "gcc -O2" on x86_64.
30445         * m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Pass the
30446         'long double' values by reference, with values taken from a statically
30447         allocated array.
30449 2020-05-23  Bruno Haible  <bruno@clisp.org>
30451         findprog-in: Ignore directories.
30452         Reported by Frederick Eaton via Dmitry Goncharov in
30453         <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00003.html>.
30454         * lib/findprog-in.c (find_in_given_path): When the file found is a
30455         directory, set errno to EACCES and, during a PATH search, continue
30456         searching.
30457         * modules/findprog-in (Depends-on): Add sys_stat, stat.
30459 2020-05-23  Paul Eggert  <eggert@cs.ucla.edu>
30461         verify: document ‘assume’ better
30462         * lib/verify.h (assume): Say it’s for static analysis, not dynamic.
30464 2020-05-22  Asher Gordon  <AsDaGo@posteo.net>
30466         gendocs: Clarify licenses for templates.
30467         * doc/gendocs_template: Add a GNU All-Permissive license notice
30468         and bump Parent-Version.
30469         * doc/gendocs_template_min: Add a GNU All-Permissive license
30470         notice and copy the explanatory comment about the license notice
30471         at the bottom from gendocs_template.
30473 2020-05-21  Bruno Haible  <bruno@clisp.org>
30475         group-member: Relicense under LGPLv2+.
30476         Jim Meyering's approval is in
30477         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00218.html>.
30478         Paul Eggert's approval is in
30479         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00225.html>.
30480         Eric Blake's approval is in
30481         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00217.html>.
30482         * modules/group-member (License): Change to LGPLv2+.
30484 2020-05-21  Bruno Haible  <bruno@clisp.org>
30486         memmem: Avoid wrong configure results with "clang -fsanitize=undefined".
30487         Reported by Tim Rühsen in
30488         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00207.html>.
30489         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): Use NULL + 1, not NULL.
30491 2020-05-21  Bruno Haible  <bruno@clisp.org>
30493         regex: Avoid wrong configure results with "clang -fsanitize=leak".
30494         Reported by Tim Rühsen in
30495         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00207.html>.
30496         * m4/regex.m4 (gl_REGEX): Free compiled regexes and allocated registers
30497         before returning with status 0.
30499 2020-05-21  Bruno Haible  <bruno@clisp.org>
30501         glob: Avoid wrong configure results with "clang -fsanitize=leak".
30502         Reported by Tim Rühsen in
30503         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00207.html>.
30504         * m4/glob.m4 (gl_GLOB): Free allocated memory before returning.
30506 2020-05-21  Bruno Haible  <bruno@clisp.org>
30508         fchownat: Support clang -fsanitize=implicit-integer-sign-change better.
30509         Reported by Tim Rühsen in
30510         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00207.html>.
30511         * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG,
30512         gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG): Cast -1 to uid_t or git_t,
30513         respectively.
30515 2020-05-18  Tim Rühsen  <tim.ruehsenqgmx.de>
30517         getdelim: Avoid wrong configure results with gcc -fsanitize=address.
30518         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Fix memleak.
30520 2020-05-19  Paul Eggert  <eggert@cs.ucla.edu>
30522         ftoastr: fix ifndef typo
30523         * lib/ftoastr.h (_GL_FTOASTR_H): Define.
30525 2020-05-19  Bruno Haible  <bruno@clisp.org>
30527         havelib: Tweak documentation.
30528         * doc/havelib.texi (Searching for Libraries): Fix typo.
30530 2020-05-18  Siddhesh Poyarekar  <siddhesh@gotplt.org>
30532         vcs-to-changelog: Rename vcs_to_changelog.py to use hyphens.
30533         This was needed earlier because modules had to import the main script,
30534         but that is no longer true.  Rename the script so that it is
30535         consistent with all other scripts in gnulib and uses hyphens.
30536         * build-aux/vcs_to_changelog.py: Rename to...
30537         * build-aux/vcs-to-changelog.py: ... this.
30538         * doc/vcs-to-changelog.texi (VCS To ChangeLog): Update reference.
30539         * modules/vcs-to-changelog: Likewise.
30541 2020-05-17  Bruno Haible  <bruno@clisp.org>
30543         Clarify intended usage of the license file modules.
30544         Reported by Asher Gordon <AsDaGo@posteo.net> in
30545         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00126.html>.
30546         * doc/licenses-texi.texi (License Texinfo sources): Mention the
30547         GNU AGPL. Explain the intended usage of the modules.
30548         * modules/fdl (Notice): Discourage use as a module.
30549         * modules/fdl-1.3 (Notice): Likewise.
30551 2020-05-17  Akim Demaille  <akim@lrde.epita.fr>
30553         hash: add hash_xinsert
30554         * lib/hash.h, lib/xhash.c (hash_xinsert): New.
30556 2020-05-16  Bruno Haible  <bruno@clisp.org>
30558         findprog-lgpl: Fix link error (existing since 2008-09-02).
30559         * modules/findprog-lgpl (Makefile.am): Arrange to compile
30560         findprog-lgpl.c, not findprog.c.
30561         * lib/findprog.c (find_in_path): Add LGPLed replacement code for
30562         XNMALLOC.
30564 2020-05-15  Paul Eggert  <eggert@cs.ucla.edu>
30566         c-stack: pacify -Wunused-result when DEBUG
30567         Problem reported by Marc Nieper-Wißkirchen in:
30568         https://lists.gnu.org/r/bug-gnulib/2020-05/msg00132.html
30569         * lib/c-stack.c (segv_handler, overflow_handler, segv_handler) [DEBUG]:
30570         Explicitly ignore write failures.
30572 2020-05-13  Jim Meyering  <meyering@fb.com>
30574         announce-gen: improve a comment
30575         * build-aux/announce-gen: Improve comment.
30577 2020-05-12  Paul Eggert  <eggert@cs.ucla.edu>
30579         xalloc: pacify -Wanalyzer-possible-null-argument
30580         Problem reported for GCC 10.1.0 by Bruno Haible in:
30581         https://lists.gnu.org/r/bug-gnulib/2020-05/msg00118.html
30582         * lib/xmalloc.c (HAVE_GNU_MALLOC, HAVE_GNU_REALLOC): New constants.
30583         (xmalloc): Suppress unnecessary check if HAVE_GNU_MALLOC.
30584         (xrealloc): Suppress unnecssary check if HAVE_GNU_REALLOC.
30586 2020-05-11  Paul Eggert  <eggert@cs.ucla.edu>
30588         careadlinkat: fix GCC 10 workaround
30589         * lib/careadlinkat.c (careadlinkat) [GCC_LINT]:
30590         Massage the code so that it’s closer to what it was before
30591         the GCC 10.1.0 workaround was introduced.  This fixes
30592         a loop when !buffer and the bug workaround is in effect.
30593         Remove unnecessary casts.  Defend in a different way
30594         against (buffer && !buffer_size), by adding at least 1
30595         to buf_size each time through the loop.
30597 2020-05-10  Bruno Haible  <bruno@clisp.org>
30599         doc: Mark HP-UX as unsupported.
30600         * doc/gnulib-intro.texi (Target Platforms): List HP-UX as unsupported.
30602 2020-05-10  Paul Eggert  <eggert@cs.ucla.edu>
30604         careadlinkat: limit GCC workaround
30605         * lib/careadlinkat.c (careadlinkat): Limit workaround to GCC
30606         10.1.0 and later, since the workaround is pretty bad and the GCC
30607         bug should get fixed.
30609 2020-05-10  Bruno Haible  <bruno@clisp.org>
30611         havelib: Enhance documentation.
30612         * doc/havelib.texi (Searching for Libraries): Mention the bad
30613         consequences of using LIBxxx instead of LTLIBxxx and vice versa.
30615 2020-05-10  Bruno Haible  <bruno@clisp.org>
30617         attribute: Clarify list of attributes.
30618         * lib/attribute.h: Reorder the list of attributes, and group them by
30619         purpose.
30621 2020-05-10  Bruno Haible  <bruno@clisp.org>
30623         string: Fix compilation error in C++ mode.
30624         * lib/warn-on-use.h (_GL_WARN_ON_USE_CXX): In C mode, use plain
30625         _GL_WARN_ON_USE.
30626         * lib/string.in.h (strchr, strpbrk, strrchr): Use _GL_WARN_ON_USE_CXX
30627         instead of _GL_WARN_ON_USE.
30629 2020-05-10  Akim Demaille  <akim@lrde.epita.fr>
30631         announce-gen: add support for dist-lzip
30632         * build-aux/announce-gen (@archive_suffixes): Add tar.lz.
30634 2020-05-09  Paul Eggert  <eggert@cs.ucla.edu>
30636         manywarnings: port to GCC 10.1
30637         * build-aux/gcc-warning.spec:
30638         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)):
30639         Add GCC 10.1.0 warnings.
30641         careadlinkat: pacify -Wreturn-local-addr
30642         * lib/careadlinkat.c (careadlinkat) [GCC_LINT]:
30643         Pacify gcc 10’s -Wreturn-local-addr option.
30644         Simplify some of the later code.
30646 2020-05-09  Paul Eggert  <eggert@cs.ucla.edu>
30648         attribute: remove ATTRIBUTE_DEPRECATED
30649         * lib/attribute.h: Improve recently-added comments, mostly
30650         by shortening them (use active voice, etc.).
30651         (ATTRIBUTE_DEPRECATED): Remove, as it duplicates DEPRECATED.
30652         Problem reported by Bruno Haible in:
30653         https://lists.gnu.org/r/bug-gnulib/2020-05/msg00089.html
30655 2020-05-09  Bruno Haible  <bruno@clisp.org>
30657         attribute: Add comments.
30658         * lib/attribute.h: Document each macro.
30660 2020-05-09  Akim Demaille  <akim@lrde.epita.fr>
30662         bitset: use the attribute module
30663         * modules/bitset: Depend on 'attribute'.
30664         * lib/bitset/base.h (ATTRIBUTE_UNUSED): Remove.
30665         * lib/bitset.c, lib/bitset/array.c, lib/bitset/list.c,
30666         * lib/bitset/stats.c, lib/bitset/table.c, lib/bitset/vector.c:
30667         Use MAYBE_UNUSED instead of ATTRIBUTE_UNUSED.
30669 2020-05-09  Bruno Haible  <bruno@clisp.org>
30671         c-stack: Fix warning when DEBUG is enabled.
30672         Patch suggested by Marc Nieper-Wißkirchen <marc.nieper+gnu@gmail.com> in
30673         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00081.html>.
30674         * lib/c-stack.c: Include <stdio.h>.
30676 2020-05-09  Bruno Haible  <bruno@clisp.org>
30678         Remove redundant definitions of _GL_ATTRIBUTE_FORMAT.
30679         * lib/argp.h (_GL_ATTRIBUTE_FORMAT): Remove macro.
30680         * lib/argp-fmtstream.h (_GL_ATTRIBUTE_FORMAT): Likewise.
30681         * lib/c-snprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
30682         * lib/c-vasnprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
30683         * lib/c-vasprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
30684         * lib/c-vsnprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
30685         * lib/c-xvasprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
30686         * lib/error.h (_GL_ATTRIBUTE_FORMAT): Likewise.
30687         * lib/parse-datetime.y (_GL_ATTRIBUTE_FORMAT): Likewise.
30688         * lib/vasnprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
30689         * lib/xprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
30690         * lib/xvasprintf.h (_GL_ATTRIBUTE_FORMAT): Likewise.
30692 2020-05-09  Bruno Haible  <bruno@clisp.org>
30694         Remove redundant definitions of _GL_ATTRIBUTE_ALLOC_SIZE.
30695         Reported by Akim Demaille in
30696         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00077.html>.
30697         * lib/eealloc.h (_GL_ATTRIBUTE_ALLOC_SIZE): Remove macro.
30698         * lib/pagealign_alloc.h (_GL_ATTRIBUTE_ALLOC_SIZE): Likewise.
30699         * lib/xalloc.h (_GL_ATTRIBUTE_ALLOC_SIZE): Likewise.
30701 2020-05-09  Bruno Haible  <bruno@clisp.org>
30703         stdio, monetary: Don't redefine _GL_ATTRIBUTE_FORMAT.
30704         * lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT): Don't override the definition
30705         that usually comes from m4/gnulib-common.m4.
30706         * lib/monetary.in.h (_GL_ATTRIBUTE_FORMAT): Likewise.
30708 2020-05-09  Bruno Haible  <bruno@clisp.org>
30710         dirent, stdlib, wchar, string: Don't redefine _GL_ATTRIBUTE_PURE.
30711         * lib/dirent.in.h (_GL_ATTRIBUTE_PURE): Don't override the definition
30712         that usually comes from m4/gnulib-common.m4.
30713         * lib/stdlib.in.h (_GL_ATTRIBUTE_PURE): Likewise.
30714         * lib/string.in.h (_GL_ATTRIBUTE_PURE): Likewise.
30715         * lib/wchar.in.h (_GL_ATTRIBUTE_PURE): Likewise.
30717 2020-05-09  Bruno Haible  <bruno@clisp.org>
30719         uchar: Work around incorrect char16_t, char32_t types on Haiku 2020.
30720         * lib/uchar.in.h (char16_t): Define as macro if
30721         GNULIB_OVERRIDES_CHAR16_T.
30722         (char32_t): Define as macro if GNULIB_OVERRIDES_CHAR32_T.
30723         * m4/uchar.m4 (gl_TYPE_CHAR16_T, gl_TYPE_CHAR32_T): New macros.
30724         (gl_UCHAR_H): Invoke them.
30725         (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_OVERRIDES_CHAR16_T,
30726         GNULIB_OVERRIDES_CHAR32_T.
30727         * m4/mbrtoc32.m4 (gl_FUNC_MBRTOC32, gl_MBRTOC32_SANITYCHECK): Require
30728         gl_TYPE_CHAR32_T and test GNULIB_OVERRIDES_CHAR32_T.
30729         * modules/uchar (Makefile.am): Substitute GNULIB_OVERRIDES_CHAR16_T,
30730         GNULIB_OVERRIDES_CHAR32_T.
30732 2020-05-09  Bruno Haible  <bruno@clisp.org>
30734         Macro tweaks.
30735         * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Correct config.h comment.
30736         * m4/wint_t.m4 (gt_TYPE_WINT_T): Correct indentation.
30738 2020-05-08  Bruno Haible  <bruno@clisp.org>
30740         c32rtomb: Avoid compilation failure on Haiku.
30741         * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Test for c32rtomb without excluding
30742         inline definitions.
30743         * doc/posix-functions/c32rtomb.texi: Mention the Haiku problem.
30745 2020-05-08  Bruno Haible  <bruno@clisp.org>
30747         mbrtoc32: Avoid compilation failure on Haiku.
30748         * m4/mbrtoc32.m4 (gl_CHECK_FUNC_MBRTOC32): New macro.
30749         (gl_FUNC_MBRTOC32, gl_MBRTOC32_SANITYCHECK): Use it instead of
30750         AC_CHECK_FUNCS_ONCE.
30751         * doc/posix-functions/mbrtoc32.texi: Mention the Haiku problem.
30753 2020-05-08  Bruno Haible  <bruno@clisp.org>
30755         limits-h: Define LONG_BIT correctly on Haiku/x86_64.
30756         * lib/limits.in.h: Define and test _GL_ALREADY_INCLUDING_LIMITS_H.
30758 2020-05-08  Bruno Haible  <bruno@clisp.org>
30760         list: Update documentation.
30761         Reported by Marc Nieper-Wißkirchen <marc.nieper+gnu@gmail.com> in
30762         <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00062.html>.
30763         * doc/containers.texi (Container data types): Document the new list
30764         operations and their complexity.
30766 2020-05-08  Bruno Haible  <bruno@clisp.org>
30768         ignore-value tests: Use module 'attribute'.
30769         * m4/gnulib-common.m4 (gl_COMMON_BODY): Fix a typo.
30770         * tests/test-ignore-value.c: Include attribute.h.
30771         (_GL_ATTRIBUTE_RETURN_CHECK): Remove macro. Use NODISCARD instead.
30772         * modules/ignore-value-tests (Depends-on): Add attribute.
30774 2020-05-08  Bruno Haible  <bruno@clisp.org>
30776         uniname/uniname: Use module 'attribute'.
30777         * lib/uniname/gen-uninames.lisp: Emit a reference to ATTRIBUTE_PACKED.
30778         * lib/uniname/uninames.h: Regenerated.
30779         * lib/uniname/uniname.c: Include attribute.h.
30780         * modules/uniname/uniname (Depends-on): Add attribute.
30782 2020-05-08  Bruno Haible  <bruno@clisp.org>
30784         c32rtomb: Use module 'attribute'.
30785         * lib/c32rtomb.c: Include attribute.h.
30786         (FALLTHROUGH): Remove macro.
30787         * modules/c32rtomb (Depends-on): Add attribute.
30789 2020-05-08  Bruno Haible  <bruno@clisp.org>
30791         xsize: Use module 'attribute'.
30792         * lib/xsize.h: Include attribute.h. Use ATTRIBUTE_PURE.
30793         * modules/xsize (Depends-on): Add attribute.
30795 2020-05-06  Paul Eggert  <eggert@cs.ucla.edu>
30797         * m4/gnulib-common.m4 (gl_COMMON_BODY): Minor style fixes.
30799         * lib/attribute.h: Minor style fixes.
30801         Fix version-etc glitch on OpenIndiana
30802         Problem reported by Mats Erik Andersson in:
30803         https://lists.gnu.org/r/bug-gnulib/2020-05/msg00067.html
30804         * lib/version-etc.h (_GL_ATTRIBUTE_SENTINEL): Remove defn
30805         that now clashes with gnulib-common.h.  All uses changed.
30807 2020-05-03  Paul Eggert  <eggert@cs.ucla.edu>
30809         attribute: new module
30810         This simplifies use of GCC and C2x attributes like ‘deprecated’.
30811         * MODULES.html.sh: Add attribute.
30812         * doc/attribute.texi, lib/attribute.h, modules/attribute: New files.
30813         * doc/gnulib.texi (Particular Modules): Add Attributes.
30814         * lib/backupfile.c, lib/fnmatch.c, lib/freopen-safer.c:
30815         * lib/mbrtoc32.c, lib/mbrtowc.c, lib/nstrftime.c, lib/quotearg.c:
30816         * lib/savewd.c, lib/unistr/u8-uctomb-aux.c, lib/unistr/u8-uctomb.c:
30817         * lib/vasnprintf.c:
30818         Include attribute.h, and let it define FALLTHROUGH.
30819         * lib/bitset/base.h, lib/c-stack.c (__attribute__): Remove macro.
30820         * lib/bitset/base.h (ATTRIBUTE_UNUSED): Define in terms of
30821         _GL_ATTRIBUTE_MAYBE_UNUSED, for forwards compatibility to C2x.
30822         * lib/dfa.c (FALLTHROUGH): Define consistently with gl_COMMON_BODY.
30823         This is a copy since Gawk doesn’t use Gnulib.
30824         * lib/di-set.h (_GL_ATTRIBUTE_NONNULL): Remove definition that
30825         is incompatible with gl_COMMON_BODY’s.  All uses changed.
30826         * lib/fts.c: Include attribte.h, for FALLTHROUGH.
30827         Keep the existing FALLTHROUGH definition since Glibc might use it,
30828         and it does no harm to Gnulib’s FALLTHROUGH.
30829         * lib/fts_.h, lib/inttostr.h:
30830         (__GNUC_PREREQ): Remove; no longer needed.
30831         (__attribute_warn_unused_result__): Remove.  All uses
30832         replaced by _GL_ATTRIBUTE_NODISCARD.
30833         * lib/gl_list.h, lib/gl_map.h, lib/gl_omap.h, lib/gl_oset.h:
30834         * lib/gl_set.h: Prefer _GL_ATTRIBUTE_NODISCARD to an ifdeffed
30835         __attribute__ ((__warn_unused_result__)), for forward
30836         compatibility to C2x.
30837         * lib/hash.h (_GL_ATTRIBUTE_WUR): Remove.  All uses replaced by
30838         _GL_ATTRIBUTE_NODISCARD.
30839         (_GL_ATTRIBUTE_DEPRECATED): Remove, since gl_COMMON_BODY defines it.
30840         * lib/ino-map.h (_GL_ATTRIBUTE_NONNULL): Remove.  All uses
30841         replaced by gl_COMMON_BODY’s implementation, which has a
30842         slightly different signature.
30843         * lib/safe-alloc.h (_GL_ATTRIBUTE_RETURN_CHECK):
30844         Remove.  All uses replaced by _GL_ATTRIBUTE_NODISCARD.
30845         * lib/unused-parameter.h (_GL_UNUSED_PARAMETER):
30846         Define in terms of _GL_ATTRIBUTE_MAYBE_UNUSED.
30847         No doubt all uses should be replaced, at some point.
30848         * m4/gnulib-common.m4 (_GL_GNUC_PREREQ): New macro.
30849         (_Noreturn): Use it.
30850         (_GL_HAS_ATTRIBUTE, _GL_ATTRIBUTE_ALLOC_SIZE)
30851         (_GL_ATTRIBUTE_ALWAYS_INLINE, _GL_ATTRIBUTE_ARTIFICIAL)
30852         (_GL_ATTRIBUTE_COLD)
30853         (_GL_ATTRIBUTE_DEPRECATED, _GL_ATTRIBUTE_ERROR)
30854         (_GL_ATTRIBUTE_WARNING, _GL_ATTRIBUTE_EXTERNALLY_VISIBLE)
30855         (_GL_ATTRIBUTE_FALLTHROUGH, _GL_ATTRIBUTE_FORMAT)
30856         (_GL_ATTRIBUTE_LEAF, _GL_ATTRIBUTE_MAY_ALIAS)
30857         (_GL_ATTRIBUTE_MAYBE_UNUSED)
30858         (_GL_ATTRIBUTE_NODISCARD, _GL_ATTRIBUTE_NOINLINE)
30859         (_GL_ATTRIBUTE_NONNULL, _GL_ATTRIBUTE_NONSTRING)
30860         (_GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PACKED, _GL_ATTRIBUTE_PURE)
30861         (_GL_ATTRIBUTE_RETURNS_NONNULL)
30862         (_GL_ATTRIBUTE_SENTINEL): New macros.
30863         * modules/backup-rename, modules/backupfile, modules/c-vasnprintf:
30864         * modules/fnmatch, modules/freopen-safer, modules/fts:
30865         * modules/mbrtoc32, modules/mbrtowc, modules/nstrftime:
30866         * modules/quotearg, modules/savewd:
30867         * modules/unistdio/u16-u16-vasnprintf:
30868         * modules/unistdio/u16-vasnprintf:
30869         * modules/unistdio/u32-u32-vasnprintf:
30870         * modules/unistdio/u32-vasnprintf:
30871         * modules/unistdio/u8-u8-vasnprintf:
30872         * modules/unistdio/u8-vasnprintf:
30873         * modules/unistdio/ulc-vasnprintf:
30874         * modules/unistr/u8-uctomb, modules/vasnprintf:
30875         (Depends-on:): Add attribute module.
30877 2020-05-03  Bruno Haible  <bruno@clisp.org>
30879         bison: Fix today's commit.
30880         * m4/bison.m4 (gl_PROG_BISON): Set ac_verc_fail to 'yes', not 'true'.
30882 2020-05-03  Bruno Haible  <bruno@clisp.org>
30884         list-c++: Add get_first, get_last, set_first, set_last operations.
30885         * lib/gl_list.hh (class gl_List): Add methods get_first, get_last,
30886         set_first, set_last.
30887         * lib/gl_list.h: Tweak comments.
30889 2020-05-03  Akim Demaille  <akim@lrde.epita.fr>
30891         bison: rely on bison's %require to check a version requirement
30892         See https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00021.html.
30893         * m4/bison.m4 (gl_PROG_BISON): Let bison itself decide if it it recent
30894         enough of not.
30895         So far it is the only know Yacc tool that supports '%require'.
30896         Other yaccs will actually even choke on seeing the -o option after the
30897         input file name.
30898         * m4/parse-datetime.m4: Simplify gl_PROG_BISON invocation.
30900 2020-05-02  Bruno Haible  <bruno@clisp.org>
30902         list: Add get_first, get_last, set_first, set_last operations.
30903         * lib/gl_list.h (gl_list_get_first, gl_list_get_last,
30904         gl_list_nx_set_first, gl_list_nx_set_last): New functions.
30905         * lib/gl_xlist.h (gl_list_set_first, gl_list_set_last): New functions.
30907 2020-05-02  Bruno Haible  <bruno@clisp.org>
30909         list: Remove redundant code for remove_first and remove_last operations.
30910         * lib/gl_list.h (struct gl_list_implementation): Remove fields
30911         remove_first, remove_last.
30912         (gl_list_remove_first, gl_list_remove_last): Implement in a generic way.
30913         * lib/gl_array_list.c: Revert last change.
30914         * lib/gl_carray_list.c: Likewise.
30915         * lib/gl_anylinked_list2.h: Likewise.
30916         * lib/gl_linked_list.c: Likewise.
30917         * lib/gl_linkedhash_list.c: Likewise.
30918         * lib/gl_anytree_list2.h: Likewise.
30919         * lib/gl_avltree_list.c: Likewise.
30920         * lib/gl_avltreehash_list.c: Likewise.
30921         * lib/gl_rbtree_list.c: Likewise.
30922         * lib/gl_rbtreehash_list.c: Likewise.
30923         * lib/gl_sublist.c: Likewise.
30925 2020-05-02  Bruno Haible  <bruno@clisp.org>
30927         bison-i18n: Add support for cross-compilation.
30928         Reported by Hongxu Jia <hongxu.jia@windriver.com> in
30929         <https://lists.gnu.org/archive/html/bison-patches/2016-02/msg00000.html>
30930         via Akim Demaille <akim@lrde.epita.fr>.
30931         * m4/bison-i18n.m4 (BISON_I18N): Accept a configure option
30932         --with-bison-prefix=PREFIX and use it to determine BISON_LOCALEDIR.
30933         Don't use bison's --print-localedir option when cross-compiling.
30934         Also, fix an error message and a comment.
30936 2020-05-01  Bruno Haible  <bruno@clisp.org>
30938         list: Add remove_first and remove_last operations.
30939         Suggested by Marc Nieper-Wißkirchen <marc.nieper+gnu@gmail.com> in
30940         <https://lists.gnu.org/archive/html/bug-gnulib/2020-04/msg00092.html>.
30941         * lib/gl_list.h (struct gl_list_implementation): Add fields
30942         remove_first, remove_last.
30943         (gl_list_remove_first, gl_list_remove_last): New functions.
30944         * lib/gl_array_list.c (gl_array_remove_first, gl_array_remove_last): New
30945         functions, based on gl_array_remove_at.
30946         (gl_array_list_implementation): Implement the new operations.
30947         * lib/gl_carray_list.c (gl_carray_remove_first, gl_carray_remove_last):
30948         New functions, based on gl_carray_remove_at.
30949         (gl_carray_list_implementation): Implement the new operations.
30950         * lib/gl_anylinked_list2.h (gl_linked_remove_first,
30951         gl_linked_remove_last): New functions, based on gl_linked_remove_at.
30952         * lib/gl_linked_list.c (gl_linked_list_implementation): Implement the
30953         new operations.
30954         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation):
30955         Likewise.
30956         * lib/gl_anytree_list2.h (gl_tree_remove_first, gl_tree_remove_last):
30957         New functions, based on gl_tree_remove_at.
30958         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Implement the
30959         new operations.
30960         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
30961         Likewise.
30962         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Likewise.
30963         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation):
30964         Likewise.
30965         * lib/gl_sublist.c (gl_sublist_remove_first, gl_sublist_remove_last):
30966         New functions, based on gl_sublist_remove_at.
30967         (gl_sublist_list_implementation): Implement the new operations.
30968         * lib/gl_list.hh (class gl_List): Add methods remove_first,
30969         remove_last.
30970         * tests/test-array_list.c (main): Test also gl_list_remove_first and
30971         gl_list_remove_last.
30972         * tests/test-avltree_list.c (main): Likewise.
30973         * tests/test-avltreehash_list.c (main): Likewise.
30974         * tests/test-carray_list.c (main): Likewise.
30975         * tests/test-linked_list.c (main): Likewise.
30976         * tests/test-linkedhash_list.c (main): Likewise.
30977         * tests/test-rbtree_list.c (main): Likewise.
30978         * tests/test-rbtreehash_list.c (main): Likewise.
30980 2020-05-01  Bruno Haible  <bruno@clisp.org>
30982         parse-datetime: Fix a build failure with an older bison version.
30983         * modules/parse-datetime (Makefile.am): Don't do the post-processing of
30984         parse-datetime.tab.c if a suitable version of bison was not found.
30986 2020-05-01  Bruno Haible  <bruno@clisp.org>
30988         bison: New module.
30989         * m4/bison.m4 (gl_PROG_BISON): New macro, extracted from
30990         m4/parse-datetime.m4.
30991         * m4/parse-datetime.m4 (gl_PARSE_DATETIME): Invoke gl_PROG_BISON.
30992         * modules/bison: New file.
30993         * modules/parse-datetime (Files): Remove m4/bison.m4.
30994         (Depends-on): Add bison.
30996 2020-05-01  Jose E. Marchesi  <jemarch@gnu.org>
30998         Update users.txt.
30999         * users.txt: Add poke.
31001 2020-04-28  Bruno Haible  <bruno@clisp.org>
31003         posix_spawn_file_actions_addfchdir tests: Enhance test.
31004         * tests/test-posix_spawn5.c: Include findprog.h.
31005         (test): New function, extracted from main.
31006         (main): Invoke it. Also, invoke it with a program name such as
31007         "bin/pwd".
31008         * modules/posix_spawn_file_actions_addfchdir-tests (Depends-on): Add
31009         findprog.
31011 2020-04-28  Bruno Haible  <bruno@clisp.org>
31013         posix_spawn_file_actions_addchdir tests: Enhance test.
31014         * tests/test-posix_spawn4.c: Include findprog.h.
31015         (test): New function, extracted from main.
31016         (main): Invoke it. Also, invoke it with a program name such as
31017         "bin/pwd".
31018         * modules/posix_spawn_file_actions_addchdir-tests (Depends-on): Add
31019         findprog.
31021 2020-04-28  Bruno Haible  <bruno@clisp.org>
31023         posix_spawn_file_actions_destroy: Fix a crash (bug from 2019-06-10).
31024         * lib/spawn_faction_destroy.c (posix_spawn_file_actions_destroy): Don't
31025         access elements of the wrong union member.
31027 2020-04-27  Bruno Haible  <bruno@clisp.org>
31029         getdate: Remove deprecated module.
31030         * modules/getdate: Remove file.
31031         * doc/getdate.texi: Remove file.
31032         * lib/getdate.h: Remove file.
31033         * NEWS: Mention the removal.
31035 2020-04-27  Bruno Haible  <bruno@clisp.org>
31037         realloc: Remove deprecated module.
31038         * modules/realloc: Remove file.
31039         * NEWS: Mention the removal.
31041 2020-04-27  Bruno Haible  <bruno@clisp.org>
31043         calloc: Remove deprecated module.
31044         * modules/calloc: Remove file.
31045         * NEWS: Mention the removal.
31047 2020-04-27  Bruno Haible  <bruno@clisp.org>
31049         malloc: Remove deprecated module.
31050         * modules/malloc: Remove file.
31051         * NEWS: Mention the removal.
31053 2020-04-27  Bruno Haible  <bruno@clisp.org>
31055         fnmatch-posix: Remove deprecated module.
31056         * modules/fnmatch-posix: Remove file.
31057         * MODULES.html.sh (Enhancements for POSIX:2008 functions): Update.
31058         * NEWS: Mention the removal.
31060 2020-04-27  Bruno Haible  <bruno@clisp.org>
31062         pipe: Remove deprecated module.
31063         * modules/pipe: Remove file.
31064         * lib/pipe.h: Remove file.
31065         * NEWS: Mention the removal.
31067 2020-04-27  Bruno Haible  <bruno@clisp.org>
31069         getopt: Remove deprecated module.
31070         * modules/getopt: Remove file.
31071         * NEWS: Mention the removal.
31073 2020-04-27  Bruno Haible  <bruno@clisp.org>
31075         remove-dest-slash: Remove deprecated module.
31076         * modules/rename-dest-slash: Remove file.
31077         * MODULES.html.sh (Compatibility checks for POSIX:2008 functions):
31078         Update.
31079         * NEWS: Mention the removal.
31081 2020-04-27  Bruno Haible  <bruno@clisp.org>
31083         unictype/bidicategory-*: Remove deprecated modules.
31084         * modules/unictype/bidicategory-all: Remove file.
31085         * modules/unictype/bidicategory-byname: Remove file.
31086         * modules/unictype/bidicategory-name: Remove file.
31087         * modules/unictype/bidicategory-of: Remove file.
31088         * modules/unictype/bidicategory-test: Remove file.
31089         * MODULES.html.sh (Unicode string functions): Update.
31090         * NEWS: Mention the removals.
31092 2020-04-25  Paul Eggert  <eggert@cs.ucla.edu>
31094         Tune fts for FTS_LOGICAL+FTS_NOSTAT
31095         From a suggestion by Askar Safin in:
31096         https://lists.gnu.org/r/bug-gnulib/2020-04/msg00074.html
31097         * lib/fts.c (fts_build): If file types are known, optimize
31098         FTS_LOGICAL+FTS_NOSTAT for non-symlinks and non-directories the
31099         same way that we already optimize FTS_PHYSICAL+FTS_NOSTAT for
31100         non-directories.
31102 2020-04-19  Bruno Haible  <bruno@clisp.org>
31104         vasnprintf: Add support for printing wide characters using escapes.
31105         * lib/vasnprintf.c (ENABLE_WCHAR_FALLBACK): Document optional macro.
31106         (wctomb_fallback): New function.
31107         (local_wctomb): New function.
31108         (local_wcrtomb): New function or macro.
31109         (MAX_ROOM_NEEDED): Adjust estimate for %lc.
31110         (VASNPRINTF): Simplify %ls code by use of local_wcrtomb. Add code for
31111         %lc.
31113 2020-04-15  Paul Eggert  <eggert@cs.ucla.edu>
31115         fts: remove NOSTAT_LEAF_OPTIMIZATION
31116         It caused ‘find’ and ‘du’ to dump core, and it was useful
31117         only for obsolescent Linux filesystems anyway.  Problem reported in:
31118         https://lists.gnu.org/r/bug-gnulib/2020-04/msg00068.html
31119         Quite possibly there is still a serious underlying fts bug with
31120         tight-loop-check and mutating file systems, but if so this patch
31121         should cause the bug to be triggered less often.
31122         * lib/fts.c (enum leaf_optimization): Remove
31123         NOSTAT_LEAF_OPTIMIZATION, as it’s problematic.
31124         (S_MAGIC_REISERFS, S_MAGIC_XFS): Remove; no longer needed.
31125         (leaf_optimization): Remove special cases for ReiserFS and XFS.
31126         (fts_read): Remove NOSTAT_LEAF_OPTIMIZATION code.
31127         * lib/fts_.h (struct _ftsent.fts_n_dirs_remaining):
31128         Remove.  All uses removed.
31130 2020-04-13  Bastien Roucariès  <rouca@debian.org>
31132         explicit_bzero: Improve code style.
31133         * lib/explicit_bzero.c (explicit_bzero): Use '\0' instead of 0.
31135 2020-04-13  Bastien Roucariès  <rouca@debian.org>
31137         explicit_bzero: On native Windows, use SecureZeroMemory().
31138         * lib/explicit_bzero.c: Include <windows.h>.
31139         (explicit_bzero): On native Windows, use SecureZeroMemory.
31141 2020-04-13  Bastien Roucariès  <rouca@debian.org>
31143         explicit_bzero: Use memset_s() when available.
31144         * lib/explicit_bzero.c (__STDC_WANT_LIB_EXT1__): Define.
31145         (explicit_bzero): Use memset_s when available.
31146         * m4/explicit_bzero.m4 (gl_PREREQ_EXPLICIT_BZERO): Test for memset_s.
31148 2020-04-13  Bastien Roucariès  <rouca@debian.org>
31150         explicit_bzero tests: Fix test failure on OpenBSD 6.5.
31151         * tests/test-explicit_bzero.c (test_heap): Handle implementations of
31152         free() that overwrite the memory with canaries.
31154 2020-04-13  Akim Demaille  <akim@lrde.epita.fr>
31156         bootstrap: recommend git submodule update --init
31157         Reported by Bruno Haible.
31158         <https://lists.gnu.org/r/bug-gnulib/2020-03/msg00101.html>
31159         * build-aux/bootstrap: recommand "git submodule update --init"
31160         rather than "git submodule init".
31162 2020-04-12  Bruno Haible  <bruno@clisp.org>
31164         explicit_bzero: Add tests.
31165         * tests/test-explicit_bzero.c: New file.
31166         * modules/explicit_bzero-tests: New file.
31168 2020-04-11  Bruno Haible  <bruno@clisp.org>
31170         explicit_bzero: Relicense under LGPLv2+.
31171         Approved by Paul Eggert.
31172         * modules/explicit_bzero (License): Change to LGPLv2+.
31174 2020-04-10  Bruno Haible  <bruno@clisp.org>
31176         findprog, relocatable-prog: Ignore directories during PATH search.
31177         Reported by Frederick Eaton via Dmitry Goncharov in
31178         <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00003.html>.
31180         * lib/findprog.c (find_in_path): When the file found in a PATH element
31181         is a directory, continue searching.
31182         * modules/findprog (Depends-on): Add sys_stat, stat.
31183         * modules/findprog-lgpl (Depends-on): Likewise.
31185         * lib/progreloc.c (maybe_executable): When the file found in a PATH
31186         element is a directory, continue searching.
31187         * lib/relocwrapper.c: Update comments.
31188         * modules/relocatable-prog-wrapper (Files): Add m4/largefile.m4.
31189         (configure.ac-early): New section.
31191 2020-04-10  Bruno Haible  <bruno@clisp.org>
31193         MODULES.html.sh: Support for reproducible builds from git-less tarballs.
31194         Reported by Bernhard M. Wiedemann <bwiedemann@suse.de> in
31195         <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00061.html>.
31196         * MODULES.html.sh: In a git-less tarball, use the date of the first
31197         ChangeLog entry.
31199 2020-04-04  Bruno Haible  <bruno@clisp.org>
31201         Fix comments: The gettext library is under LGPL 2.1, not LGPL 2.0.
31202         * m4/gettext.m4: Fix comments regarding the gettext library.
31203         * m4/intl-thread-locale.m4: Likewise.
31204         * m4/intlmacosx.m4: Likewise.
31205         * m4/lcmessage.m4: Likewise.
31206         * m4/nls.m4: Likewise.
31207         * m4/po.m4: Likewise.
31208         * m4/progtest.m4: Likewise.
31210 2020-04-04  Jim Meyering  <meyering@fb.com>
31212         maint: remove a stray inter-word space in a 6x-repeated comment
31213         Induce the changes by running this:
31214           re='by  perl'; git grep -l "$re"|xargs perl -pi -e "s/$re/by perl/"
31215         * build-aux/announce-gen: Change "by  perl" to "by perl".
31216         * build-aux/gitlog-to-changelog: Likewise.
31217         * build-aux/prefix-gnulib-mk: Likewise.
31218         * build-aux/update-copyright: Likewise.
31219         * build-aux/useless-if-before-free: Likewise.
31220         * tests/test-update-copyright.sh: Likewise.
31222 2020-03-28  Bruno Haible  <bruno@clisp.org>
31224         Use module 'filename' instead of module 'dosname'.
31226         * lib/at-func.c: Include filename.h instead of dosname.h.
31227         * lib/unlinkat.c: Likewise.
31228         * modules/areadlinkat (Depends-on): Add filename. Remove dosname.
31229         * modules/areadlinkat-with-size (Depends-on): Likewise.
31230         * modules/faccessat (Depends-on): Likewise.
31231         * modules/fchmodat (Depends-on): Likewise.
31232         * modules/fchownat (Depends-on): Likewise.
31233         * modules/fstatat (Depends-on): Likewise.
31234         * modules/mkdirat (Depends-on): Likewise.
31235         * modules/mkfifoat (Depends-on): Likewise.
31236         * modules/readlinkat (Depends-on): Likewise.
31237         * modules/selinux-at (Depends-on): Likewise.
31238         * modules/symlinkat (Depends-on): Likewise.
31239         * modules/unlinkat (Depends-on): Likewise.
31240         * modules/utimensat (Depends-on): Likewise.
31242         * lib/at-func2.c: Include filename.h instead of dosname.h.
31243         * modules/linkat (Depends-on): Add filename. Remove dosname.
31244         * modules/renameatu (Depends-on): Likewise.
31246         * lib/canonicalize.c: Include filename.h instead of dosname.h.
31247         * lib/canonicalize-lgpl.c: Likewise.
31248         * modules/canonicalize (Depends-on): Add filename.
31249         * modules/canonicalize-lgpl (Depends-on): Likewise.
31251         * lib/dirname.h: Include filename.h instead of dosname.h.
31252         * modules/dirname-lgpl (Depends-on): Add filename. Remove dosname.
31254         * lib/fchdir.c: Include filename.h instead of dosname.h.
31255         * modules/fchdir (Depends-on): Add filename. Remove dosname.
31257         * lib/openat.c: Include filename.h instead of dosname.h.
31258         * modules/openat (Depends-on): Add filename. Remove dosname.
31260         * lib/rmdir.c: Include filename.h instead of dosname.h.
31261         * modules/rmdir (Depends-on): Add filename. Remove dosname.
31263         * lib/savewd.c: Include filename.h instead of dosname.h.
31264         * modules/savewd (Depends-on): Add filename. Remove dosname.
31266         * lib/unlink.c: Include filename.h instead of dosname.h.
31267         * modules/unlink (Depends-on): Add filename. Remove dosname.
31269         * modules/relocatable-prog-wrapper (Depends-on): Add filename.
31270         * lib/relocwrapper.c: Update comments.
31272         * modules/lstat (Depends-on): Remove dosname.
31274 2020-03-28  Bruno Haible  <bruno@clisp.org>
31276         dosname: Redirect to 'filename'.
31277         Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
31278         <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00042.html>.
31279         * lib/dosname.h: Remove all definitions. Just include filename.h.
31280         * modules/dosname (Status, Notice): Mark as deprecated.
31281         (Depends-on): Add 'filename'.
31283 2020-03-28  Bruno Haible  <bruno@clisp.org>
31285         dosname: Change IS_RELATIVE_FILE_NAME.
31286         * lib/dosname.h (IS_RELATIVE_FILE_NAME): On native Windows, OS/2, DOS,
31287         change the definition so that IS_RELATIVE_FILE_NAME("c:") is false.
31288         * NEWS: Mention the change.
31290 2020-03-28  Bruno Haible  <bruno@clisp.org>
31292         filename: Copy some definitions from module 'dosname'.
31293         * lib/filename.h: Include <string.h>, for IS_FILE_NAME_WITH_DIR.
31294         (HAS_DEVICE): Document macro.
31295         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New macro.
31296         (IS_ABSOLUTE_FILE_NAME): Consider
31297         FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE.
31298         (IS_RELATIVE_FILE_NAME, IS_FILE_NAME_WITH_DIR): New macros.
31299         (IS_ABSOLUTE_PATH, IS_PATH_WITH_DIR): Define as deprecated aliases.
31300         * lib/relocatable.c (IS_FILE_NAME_WITH_DIR): Renamed from
31301         IS_PATH_WITH_DIR.
31302         (DllMain): Update.
31303         * lib/progreloc.c (IS_FILE_NAME_WITH_DIR): Renamed from
31304         IS_PATH_WITH_DIR.
31305         (find_executable): Update.
31306         * NEWS: Document the deprecations.
31308 2020-03-25  Paul Eggert  <eggert@cs.ucla.edu>
31310         getopt-posix: port __GETOPT_PREFIX to macOS
31311         * lib/getopt-pfx-core.h (_GETOPT) [__APPLE__ && __GETOPT_PREFIX]:
31312         Define to work around a problem with asm on macOS (Bug#40205).
31314 2020-03-22  Bruno Haible  <bruno@clisp.org>
31316         MODULES.html.sh: Add support for reproducible builds.
31317         Reported by Bernhard M. Wiedemann <bwiedemann@suse.de> in
31318         <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00024.html>.
31319         * MODULES.html.sh: Print the date of the last gnulib commit, not the
31320         current date.
31322 2020-03-22  Bruno Haible  <bruno@clisp.org>
31324         Several modules: Depend on stat.
31325         * modules/acl-permissions (Depends-on): Add stat.
31326         * modules/canonicalize (Depends-on): Likewise.
31327         * modules/file-has-acl (Depends-on): Likewise.
31328         * modules/fstat (Depends-on): Likewise.
31329         * modules/fstatat (Depends-on): Likewise.
31330         * modules/glob (Depends-on): Likewise.
31331         * modules/javacomp (Depends-on): Likewise.
31332         * modules/linkat (Depends-on): Likewise.
31333         * modules/mkdir (Depends-on): Likewise.
31334         * modules/pt_chown (Depends-on): Likewise.
31335         * modules/ptsname_r (Depends-on): Likewise.
31336         * modules/readlinkat (Depends-on): Likewise.
31337         * modules/rename (Depends-on): Likewise.
31338         * modules/renameatu (Depends-on): Likewise.
31339         * modules/tmpdir (Depends-on): Likewise.
31340         * modules/utimens (Depends-on): Likewise.
31341         * modules/relocatable-prog-wrapper (Depends-on): Add largefile.
31342         * modules/same (Depends-on): Remove stat.
31344 2020-03-22  Bruno Haible  <bruno@clisp.org>
31346         acl-permissions: Improve autoconf macro.
31347         * m4/acl.m4 (gl_FUNC_ACL): Test the value of gl_need_lib_has_acl
31348         more reliably.
31350 2020-03-22  Bruno Haible  <bruno@clisp.org>
31352         file-has-acl: Fix module description.
31353         * modules/file-has-acl (Files): Add lib/acl-internal.h, m4/acl.m4.
31354         (Depends-on): Depend on acl-permissions unconditionally.
31356 2020-03-21  Bruno Haible  <bruno@clisp.org>
31358         unlink: Ensure errno also on native Windows.
31359         * modules/unlink (Depends-on): Add malloc-posix.
31361 2020-03-21  Paul Eggert  <eggert@cs.ucla.edu>
31363         unlink: fix malloc errno typo
31364         Problem reported by Tim Rühsen in:
31365         https://lists.gnu.org/r/bug-gnulib/2020-03/msg00044.html
31366         * lib/unlink.c (rpl_unlink): Don’t mask malloc errno.
31368 2020-03-16  Bruno Haible  <bruno@clisp.org>
31370         *printf-posix: Fix m4 error (regression from 2020-03-08).
31371         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): Enable interpretation of
31372         brackets in AC_COMPILE_IFELSE invocation.
31374 2020-03-08  Bruno Haible  <bruno@clisp.org>
31376         crypto/af_alg, renameatu, same, term-style-control: Depend on fstat.
31377         * modules/crypto/af_alg (Depends-on): Add fstat.
31378         * modules/renameatu (Depends-on): Likewise.
31379         * modules/same (Depends-on): Likewise.
31380         * modules/term-style-control (Depends-on): Likewise.
31382 2020-03-08  Bruno Haible  <bruno@clisp.org>
31384         *printf-posix: Document why it's overridden on some glibc systems.
31385         Reported by Adrian Bunk <bunk@stusta.de> in
31386         <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00011.html>.
31387         * doc/posix-functions/*printf.texi: Document the problem with the %n
31388         directive on some glibc systems.
31389         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_N, gl_SNPRINTF_DIRECTIVE_N): Adjust
31390         the cross-compilation guesses accordingly.
31392 2020-03-07  Paul Eggert  <eggert@cs.ucla.edu>
31394         open, openat: port to (O_RDWR | O_RDONLY) != 0
31395         Potential portability problem reported by Dan Gohman in:
31396         https://lists.gnu.org/r/bug-gnulib/2020-03/msg00000.html
31397         * lib/open.c (open):
31398         * lib/openat.c (rpl_openat):
31399         Don’t assume O_RDONLY is disjoint from O_RDWR.
31401 2020-03-07  Bruno Haible  <bruno@clisp.org>
31403         openat: Fix theoretically possible issue on GNU/Hurd.
31404         Reported by Dan Gohman <sunfish@mozilla.com> in
31405         <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00000.html>.
31406         * lib/openat.c (rpl_openat): When testing whether flags contains O_RDWR,
31407         ignore the bits that are also set in O_RDONLY.
31409 2020-02-24  Bruno Haible  <bruno@clisp.org>
31411         getloadavg: Don't use /usr/local when cross-compiling on AIX.
31412         Reported by Jens Rehsack <sno@netbsd.org> in
31413         <https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00136.html>.
31414         * m4/getloadavg.m4 (gl_GETLOADAVG): Don't look in /usr/local/lib when
31415         cross-compiling.
31417 2020-02-24  Bruno Haible  <bruno@clisp.org>
31419         fcntl: Add witness of gnulib override.
31420         Reported by Jens Rehsack <sno@netbsd.org> in
31421         <https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00137.html>.
31422         * lib/fcntl.in.h (GNULIB_defined_rpl_fcntl, GNULIB_defined_fcntl): New
31423         macros.
31425 2020-02-23  Assaf Gordon  <assafgordon@gmail.com>
31427         Update users.txt.
31428         * users.txt: Add datamash, time.
31430 2020-02-23  Bruno Haible  <bruno@clisp.org>
31432         uni*/base: Use 'restrict'.
31433         * lib/unitypes.in.h (_UC_RESTRICT): New macro, based on '_Restrict_'
31434         from lib/regex.h.
31435         * lib/unistr.in.h (u8_cpy, u16_cpy, u32_cpy, u8_strcpy, u16_strcpy,
31436         u32_strcpy, u8_stpcpy, u16_stpcpy, u32_stpcpy, u8_strncpy, u16_strncpy,
31437         u32_strncpy, u8_stpncpy, u16_stpncpy, u32_stpncpy, u8_strcat,
31438         u16_strcat, u32_strcat, u8_strncat, u16_strncat, u32_strncat, u8_strtok,
31439         u16_strtok, u32_strtok): Use '_UC_RESTRICT'.
31440         * lib/uninorm.in.h (u8_normalize, u16_normalize, u32_normalize): Use
31441         '_UC_RESTRICT'.
31442         * lib/uniconv.in.h (u8_conv_to_encoding, u16_conv_to_encoding,
31443         u32_conv_to_encoding): Use '_UC_RESTRICT'.
31444         * lib/unicase.in.h (u8_toupper, u16_toupper, u32_toupper, u8_tolower,
31445         u16_tolower, u32_tolower, u8_totitle, u16_totitle, u32_totitle,
31446         u8_ct_toupper, u16_ct_toupper, u32_ct_toupper, u8_ct_tolower,
31447         u16_ct_tolower, u32_ct_tolower, u8_ct_totitle, u16_ct_totitle,
31448         u32_ct_totitle, u8_casefold, u16_casefold, u32_casefold, u8_ct_casefold,
31449         u16_ct_casefold, u32_ct_casefold, u8_casexfrm, u16_casexfrm,
31450         u32_casexfrm, ulc_casexfrm): Use '_UC_RESTRICT'.
31451         * lib/unilbrk.in.h (u8_possible_linebreaks, u16_possible_linebreaks,
31452         u32_possible_linebreaks, ulc_possible_linebreaks, u8_width_linebreaks,
31453         u16_width_linebreaks, u32_width_linebreaks, ulc_width_linebreaks): Use
31454         '_UC_RESTRICT'.
31455         * lib/uniwbrk.in.h (ulc_wordbreaks): Use '_UC_RESTRICT'.
31456         * lib/unistdio.in.h (ulc_sprintf, ulc_snprintf, ulc_asnprintf,
31457         ulc_vsprintf, ulc_vsnprintf, ulc_vasnprintf, u8_u8_sprintf,
31458         u8_u8_snprintf, u8_u8_asnprintf, u8_u8_vsprintf, u8_u8_vsnprintf,
31459         u8_u8_vasnprintf, u16_u16_sprintf, u16_u16_snprintf, u16_u16_asnprintf,
31460         u16_u16_vsprintf, u16_u16_vsnprintf, u16_u16_vasnprintf,
31461         u32_u32_sprintf, u32_u32_snprintf, u32_u32_asnprintf, u32_u32_vsprintf,
31462         u32_u32_vsnprintf, u32_u32_vasnprintf): Use '_UC_RESTRICT'.
31464 2020-02-23  Bruno Haible  <bruno@clisp.org>
31466         glob, spawn: Use improved '_Restrict_' definition.
31467         * lib/glob.in.h (_Restrict_): Use same definition as in lib/regex.h.
31468         * lib/spawn.in.h (_Restrict_, _Restrict_arr_): Likewise.
31470 2020-02-23  Bruno Haible  <bruno@clisp.org>
31472         crypto/gc: Use 'restrict'.
31473         * lib/gc.h (gc_pbkdf2_hmac, gc_pbkdf2_sha1): Use 'restrict'.
31474         * m4/gc.m4 (gl_GC): Require AC_C_RESTRICT.
31476         crypto/hmac-*: Use 'restrict'.
31477         * lib/hmac.h (hmac_md5, hmac_sha1, hmac_sha256, hmac_sha512): Use
31478         'restrict'.
31479         * modules/crypto/hmac-md5 (configure.ac): Require AC_C_RESTRICT.
31480         * modules/crypto/hmac-sha1 (configure.ac): Likewise.
31481         * modules/crypto/hmac-sha256 (configure.ac): Likewise.
31482         * modules/crypto/hmac-sha512 (configure.ac): Likewise.
31484         crypto/sm3: Use 'restrict'.
31485         * lib/sm3.h (sm3_finish_ctx, sm3_read_ctx, sm3_buffer): Use 'restrict'.
31486         * m4/sm3.m4 (gl_SM3): Require AC_C_RESTRICT.
31488         crypto/*-buffer: Use 'restrict'.
31489         * lib/gl_openssl.h (GL_CRYPTO_FN (_finish_ctx), GL_CRYPTO_FN (_buffer),
31490         GL_CRYPTO_FN (_read_ctx)): Use 'restrict'.
31492         crypto/sha512-buffer: Use 'restrict'.
31493         * lib/sha512.h (sha512_finish_ctx, sha384_finish_ctx, sha512_read_ctx,
31494         sha384_read_ctx, sha512_buffer, sha384_buffer): Use 'restrict'.
31495         * modules/crypto/sha512-buffer (configure.ac): Require AC_C_RESTRICT.
31497         crypto/sha256-buffer: Use 'restrict'.
31498         * lib/sha256.h (sha256_finish_ctx, sha224_finish_ctx, sha256_read_ctx,
31499         sha224_read_ctx, sha256_buffer, sha224_buffer): Use 'restrict'.
31500         * modules/crypto/sha256-buffer (configure.ac): Require AC_C_RESTRICT.
31502         crypto/sha1-buffer: Use 'restrict'.
31503         * lib/sha1.h (sha1_finish_ctx, sha1_read_ctx, sha1_buffer): Use
31504         'restrict'.
31505         * modules/crypto/sha1-buffer (configure.ac): Require AC_C_RESTRICT.
31507         crypto/md5-buffer: Use 'restrict'.
31508         * lib/md5.h (__md5_finish_ctx, __md5_read_ctx, __md5_buffer): Use
31509         'restrict'.
31510         * modules/crypto/md5-buffer (configure.ac): Require AC_C_RESTRICT.
31512         crypto/md4: Use 'restrict'.
31513         * lib/md4.h (md4_finish_ctx, md4_read_ctx, md4_buffer): Use 'restrict'.
31514         * modules/crypto/md4 (configure.ac): Require AC_C_RESTRICT.
31516         crypto/md2: Use 'restrict'.
31517         * lib/md2.h (md2_finish_ctx, md2_read_ctx, md2_buffer): Use 'restrict'.
31518         * modules/crypto/md2 (configure.ac): Require AC_C_RESTRICT.
31520         crypto/rijndael: Use 'restrict'.
31521         * lib/rijndael-api-fst.h (rijndaelBlockEncrypt, rijndaelPadEncrypt,
31522         rijndaelBlockDecrypt, rijndaelPadDecrypt): Use 'restrict'.
31523         * modules/crypto/rijndael (configure.ac): Require AC_C_RESTRICT.
31525         crypto/arctwo: Use 'restrict'.
31526         * lib/arctwo.h (arctwo_encrypt, arctwo_decrypt): Use 'restrict'.
31527         * modules/crypto/arctwo (configure.ac): Require AC_C_RESTRICT.
31529         crypto/arcfour: Use 'restrict'.
31530         * lib/arcfour.h (arcfour_stream): Use 'restrict'.
31531         * modules/crypto/arcfour (configure.ac): Require AC_C_RESTRICT.
31533         careadlinkat: Use 'restrict'.
31534         * lib/careadlinkat.h (careadlinkat): Use 'restrict'.
31535         * modules/careadlinkat (configure.ac): Require AC_C_RESTRICT.
31536         * modules/relocatable-prog-wrapper (configure.ac): Likewise.
31538         regex-quote: Use 'restrict'.
31539         * lib/regex-quote.h (regex_quote_copy): Use 'restrict'.
31540         * modules/regex-quote (configure.ac): Require AC_C_RESTRICT.
31542         system-quote: Use 'restrict'.
31543         * lib/system-quote.h (system_quote_copy): Use 'restrict'.
31544         * modules/system-quote (configure.ac): Require AC_C_RESTRICT.
31546         sh-quote: Use 'restrict'.
31547         * lib/sh-quote.h (shell_quote_copy): Use 'restrict'.
31548         * modules/sh-quote (configure.ac): Require AC_C_RESTRICT.
31550         quotearg: Use 'restrict'.
31551         * lib/quotearg.h (quotearg_buffer): Use 'restrict'.
31552         * m4/quotearg.m4 (gl_QUOTEARG): Require AC_C_RESTRICT.
31554         parse-datetime: Use 'restrict'.
31555         * lib/parse-datetime.h (parse_datetime, parse_datetime2): Use
31556         'restrict'.
31557         * m4/parse-datetime.m4 (gl_PARSE_DATETIME): Require AC_C_RESTRICT.
31559         nstrftime: Use 'restrict'.
31560         * lib/strftime.h (nstrftime): Use 'restrict'.
31561         * m4/nstrftime.m4 (gl_FUNC_GNU_STRFTIME): Require AC_C_RESTRICT.
31563         mbstok_r: Use 'restrict'.
31564         * lib/string.in.h (mbstok_r): Use 'restrict'.
31566         xmemcoll: Use 'restrict'.
31567         * lib/xmemcoll.h (xmemcoll): Use 'restrict'.
31568         * modules/xmemcoll (configure.ac): Require AC_C_RESTRICT.
31570         memcoll: Use 'restrict'.
31571         * lib/memcoll.h (memcoll): Use 'restrict'.
31572         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_C_RESTRICT.
31574         vasnprintf: Use 'restrict'.
31575         * lib/vasnprintf.h (asnprintf, vasnprintf): Use 'restrict'.
31576         * modules/vasnprintf (configure.ac): Require AC_C_RESTRICT.
31578         c-vasnprintf: Use 'restrict'.
31579         * lib/c-vasnprintf.h (c_vasnprintf): Use 'restrict'.
31580         * modules/c-vasnprintf (configure.ac): Require AC_C_RESTRICT.
31582         c-vsnprintf: Use 'restrict'.
31583         * lib/c-vsnprintf.h (c_vsnprintf): Use 'restrict'.
31584         * modules/c-vsnprintf (configure.ac): Require AC_C_RESTRICT.
31586         c-snprintf: Use 'restrict'.
31587         * lib/c-snprintf.h (c_snprintf): Use 'restrict'.
31588         * modules/c-snprintf (configure.ac): Require AC_C_RESTRICT.
31590         astrxfrm: Use 'restrict'.
31591         * lib/astrxfrm.h (astrxfrm): Use 'restrict'.
31592         * modules/astrxfrm (configure.ac): Require AC_C_RESTRICT.
31594         amemxfrm: Use 'restrict'.
31595         * lib/amemxfrm.h (amemxfrm): Use 'restrict'.
31596         * modules/amemxfrm (configure.ac): Require AC_C_RESTRICT.
31598 2020-02-22  Paul Eggert  <eggert@cs.ucla.edu>
31600         fchmodat, lchmod: simplify
31601         It appears that we may have overengineered lchmod and fchmodat,
31602         in that the code was prepared for some hypothetical platforms but
31603         was so complicated that it was hard to understand.  I attempted to
31604         improve the situation by simplifying the code when this
31605         simplification should not hurt on real platforms; we can re-add
31606         complexity later to port to platforms I didn’t know about.
31607         * lib/fchmodat.c (fchmodat):
31608         * lib/lchmod.c (lchmod):
31609         Put the ‘defined __linux__ || defined __ANDROID__’ #ifdef only
31610         around the /proc code that needs it.
31611         * lib/fchmodat.c (fchmodat): Coalese calls to orig_fchmodat.
31612         * lib/lchmod.c (__need_system_sys_stat_h): Omit; no longer needed.
31613         Do not include <config.h> twice.
31614         (orig_lchmod) [HAVE_LCHMOD]: Remove, since we need not wrap
31615         lchmod on any known hosts.
31616         (lchmod): Do not defer to fchmodat, so that the lchmod module
31617         need not depend on the fchmodat module (which is a circular
31618         dependency).  Do not use openat, since ‘open’ suffices.
31619         Coalesce calls to lchmod/chmod.
31620         * lib/lchmod.c, lib/sys_stat.in.h (lchmod):
31621         * m4/sys_stat_h.m4 (REPLACE_FSTAT):
31622         * modules/lchmod (Depends-on, configure.ac):
31623         * modules/sys_stat (Depends-on):
31624         Do not worry about replacing lchmod, since that shouldn’t happen.
31625         * m4/lchmod.m4 (gl_FUNC_LCHMOD): Do not check for fchmodat.
31626         Do not worry about whether lchmod works on non-symlinks,
31627         since every known lchmod works on non-symlinks.
31628         * modules/lchmod (Depends-on):
31629         Remove circular dependency on fchmodat.
31631 2020-02-22  Bruno Haible  <bruno@clisp.org>
31633         lchmod: Fix link error on Solaris 10 (regression from 2020-02-16).
31634         * lib/lchmod.c (lchmod): Use the code with lstat and chmod also when
31635         NEED_LCHMOD_NONSYMLINK_FIX is not defined.
31637 2020-02-22  Bruno Haible  <bruno@clisp.org>
31639         Use 'restrict' in all POSIX function declarations.
31640         * lib/iconv.in.h (iconv): Use 'restrict'.
31641         * lib/inttypes.in.h (strtoimax, strtoumax): Likewise.
31642         * lib/monetary.in.h (strfmon_l): Likewise.
31643         * lib/pthread.in.h (pthread_create, pthread_mutex_init,
31644         pthread_mutexattr_gettype, pthread_mutexattr_getrobust,
31645         pthread_mutex_timedlock, pthread_rwlock_init,
31646         pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock,
31647         pthread_cond_init, pthread_cond_wait, pthread_cond_timedwait): Likewise.
31648         * lib/search.in.h (tdelete): Likewise.
31649         * lib/signal.in.h (pthread_sigmask, sigprocmask): Likewise.
31650         * lib/stdio.in.h (dprintf, fgets, fopen, fprintf, fputs, fread, freopen,
31651         fscanf, fwrite, getdelim, getline, printf, scanf, snprintf, sprintf,
31652         vdprintf, vfprintf, vfscanf, vprintf, vscanf, vsnprintf, vsprintf):
31653         Likewise.
31654         * lib/stdlib.in.h (mbtowc, realpath, strtod, strtold, strtoll,
31655         strtoull): Likewise.
31656         * lib/string.in.h (strncat): Likewise.
31657         * lib/sys_socket.in.h (accept, getpeername, getsockname, getsockopt,
31658         recvfrom): Likewise.
31659         * lib/sys_stat.in.h (fstatat, lstat, stat): Likewise.
31660         * lib/time.in.h (strftime): Likewise.
31661         * lib/unistd.in.h (readlink, readlinkat): Likewise.
31662         * lib/wchar.in.h (mbrtowc, mbrlen, mbsrtowcs, mbsnrtowcs, wcrtomb,
31663         wcsrtombs, wcsnrtombs, wmemcpy, wcscpy, wcpcpy, wcsncpy, wcpncpy,
31664         wcscat, wcsncat, wcsxfrm, wcsstr, wcstok, wcsftime): Likewise.
31665         * m4/iconv_h.m4 (gl_ICONV_H): Require AC_C_RESTRICT.
31666         * m4/inttypes.m4 (gl_INTTYPES_INCOMPLETE): Likewise.
31667         * m4/monetary_h.m4 (gl_MONETARY_H): Likewise.
31668         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
31669         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
31670         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
31671         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
31672         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
31673         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
31674         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
31675         * m4/wchar_h.m4 (gl_WCHAR_H): Likewise.
31676         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Make consistent with the
31677         other *_h.m4 files.
31678         * m4/time_h.m4 (gl_HEADER_TIME_H): Likewise.
31680 2020-02-22  Bruno Haible  <bruno@clisp.org>
31682         Update NEWS.
31683         * NEWS: Mention the last change.
31685 2020-02-22  Paul Eggert  <eggert@cs.ucla.edu>
31687         chmodat, chownat: new modules
31688         These are split from fchmodat, fchownat.  GNU Emacs needs the
31689         POSIX-specified fchmodat, but not the gnulib-specified chmodat and
31690         lchmodat.  Split the latter two into a new module chmodat.
31691         Similarly for fchownat.  This the same basic idea for why statat
31692         was split from fstatat on 2013-01-23.
31693         * lib/chmodat.c, lib/openat.h (CHMODAT_INLINE):
31694         Rename from FCHMODAT_INLINE.  All uses changed.
31695         * lib/chownat.c, lib/openat.h (CHOWNAT_INLINE):
31696         Rename from FCHOWNAT_INLINE.  All uses changed.
31697         * lib/openat.h:
31698         (chownat, lchownat): Define if GNULIB_CHOWNAT, not GNULIB_FCHOWNAT.
31699         (chmodat, lchmodat): Define if GNULIB_CHMODAT, not GNULIB_FCHMODAT.
31700         * modules/chmodat, modules/chownat, tests/test-chownat.c: New files.
31701         * modules/fchmodat (Files:): Remove lib/fchmodat.c.
31702         (configure.ac): Remove fchmodat module indicator.
31703         (Makefile.am): Omit chmodat.c.
31704         (Maintainer): Add self.
31705         * modules/fchownat: Similarly, but for chown.
31706         * tests/test-fchownat.c (BASE): Don't define if already defined.
31707         (do_chown, do_lchown) [!TEST_CHOWNAT]: Test fchownat instead.
31709 2020-02-22  Bruno Haible  <bruno@clisp.org>
31711         users.txt: Add groff.
31712         Reported by Bjarni Ingi Gislason <bjarniig@rhi.hi.is>.
31713         * users.txt: Add groff.
31715 2020-02-22  Bruno Haible  <bruno@clisp.org>
31717         gnulib-tool: Ensure copied files are writable.
31718         Reported by Benno Fünfstück <benno.fuenfstueck@gmail.com> in
31719         <https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00101.html>.
31720         * gnulib-tool (func_ensure_writable): New function.
31721         (func_ln_s, func_hardlink, func_lookup_file, func_import,
31722         func_create_testdir, copy-file): Invoke it after copying a file.
31724 2020-02-22  Bruno Haible  <bruno@clisp.org>
31726         users.txt: Update.
31727         * users.txt: Update URLs to projects that have moved or switched to git.
31728         Use canonical host names. Prefer gitweb over cgit. Prefer the tree view
31729         over the summary view. Add gawk.
31731 2020-02-21  Paul Eggert  <eggert@cs.ucla.edu>
31733         largefile: remove _DARWIN_USE_64_BIT_INODE
31734         It’s not needed in currently-supported macOS versions, and was
31735         problematic anyway in MacOS X 10.5 which was the only version that
31736         could use it.  Problem reported by Peter Eisentraut in:
31737         https://lists.gnu.org/r/bug-autoconf/2020-02/msg00004.html
31738         * m4/largefile.m4 (AC_SYS_LARGEFILE):
31739         Don’t define _DARWIN_USE_64_BIT_INODE.
31740         This syncs with Autoconf master.
31742         Add ‘extern "C"’ to count-one-bits.h etc.
31743         This ports these .h files to C++.
31744         Problem reported by Simon Marchi in:
31745         https://lists.gnu.org/r/bug-gnulib/2020-02/msg00110.html
31746         * lib/count-leading-zeros.h, lib/count-one-bits.h:
31747         * lib/count-trailing-zeros.h: Add ‘extern "C"’.
31749 2020-02-19  Bruno Haible  <bruno@clisp.org>
31751         uninorm/decompose-internal: Avoid "no previous prototype" warning.
31752         Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
31753         <https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00105.html>.
31754         * lib/array-mergesort.h: Accept an optional macro definition
31755         STATIC_FROMTO.
31756         * lib/uninorm/decompose-internal.c (STATIC_FROMTO): New macro.
31758 2020-02-16  Bruno Haible  <bruno@clisp.org>
31760         fchmodat: Make more future-proof.
31761         * m4/fchmodat.m4 (gl_FUNC_FCHMODAT): Define
31762         NEED_FCHMODAT_NONSYMLINK_FIX.
31763         (gl_PREREQ_FCHMODAT): New macro.
31764         * lib/fchmodat.c (fchmodat): Test NEED_FCHMODAT_NONSYMLINK_FIX. Access
31765         /proc only on Linux. Return EOPNOTSUPP only on Linux and on platforms
31766         without lchmod function.
31767         * modules/fchmodat (configure.ac): Invoke gl_PREREQ_FCHMODAT.
31769 2020-02-16  Bruno Haible  <bruno@clisp.org>
31771         lchmod: Make more future-proof.
31772         * m4/lchmod.m4 (gl_FUNC_LCHMOD): Define NEED_LCHMOD_NONSYMLINK_FIX.
31773         (gl_PREREQ_LCHMOD): New macro.
31774         * lib/lchmod.c (orig_lchmod): New function.
31775         (lchmod): Test NEED_LCHMOD_NONSYMLINK_FIX. Access /proc only on Linux.
31776         Return EOPNOTSUPP only on Linux and on platforms without lchmod
31777         function.
31778         * modules/lchmod (configure.ac): Invoke gl_PREREQ_LCHMOD.
31780         lchmod: Fix buggy override on macOS, HP-UX (regression from 2020-02-08).
31781         * modules/lchmod (Makefile.am): Don't add lchmod.c to lib_SOURCES.
31783 2020-02-16  Paul Eggert  <eggert@cs.ucla.edu>
31785         xnanosleep: prefer pause, and get remaining time
31786         Problem reported by Vladimir Panteleev in:
31787         https://lists.gnu.org/r/bug-gnulib/2020-02/msg00052.html
31788         * lib/xnanosleep.c: Include intprops.h, unistd.h.
31789         (xnanosleep) [HAVE_PAUSE]: Prefer pause when sleeping infinitely.
31790         (xnanosleep): Obtain remaining time when nanosleep is interrupted.
31791         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Check for 'pause'.
31792         * modules/xnanosleep (Depends-on): Add intprops, unistd.
31794 2020-02-16  Bruno Haible  <bruno@clisp.org>
31796         lchmod: Improve cross-compilation guess.
31797         * m4/lchmod.m4 (gl_FUNC_LCHMOD): Require AC_CANONICAL_HOST. When
31798         cross-compiling, guess depending on the platform.
31800 2020-02-16  Bruno Haible  <bruno@clisp.org>
31802         fstrcmp: Add API to clean up resources.
31803         Reported by Akim Demaille <akim@lrde.epita.fr> in
31804         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00080.html>.
31805         * lib/fstrcmp.h (fstrcmp_free_resources): New declaration.
31806         * lib/fstrcmp.c (fstrcmp_free_resources): New function.
31808 2020-02-14  Bruno Haible  <bruno@clisp.org>
31810         wctype-h: Fix compilation errors in C++ (regression from 2020-01-25).
31811         Reported by Christian Biesinger in
31812         <https://lists.gnu.org/archive/html/bug-gnulib/2020-02/msg00064.html>.
31813         * lib/wctype.in.h (iswdigit, iswxdigit): Don't declare if the
31814         corresponding module is not enabled.
31815         * tests/test-wctype-h-c++.cc (iswdigit, iswxdigit): Don't check the
31816         prototype if the corresponding module is not enabled.
31818 2020-02-13  Paul Eggert  <eggert@cs.ucla.edu>
31820         fchmodat, lchmod: port to buggy Linux filesystems
31821         Problem reported by Florian Weimer in:
31822         https://www.sourceware.org/ml/libc-alpha/2020-02/msg00534.html
31823         * lib/fchmodat.c (fchmodat):
31824         * lib/lchmod.c (lchmod):
31825         Don’t assume that chmod on the O_PATH-opened fd will do
31826         the right thing on a symbolic link.
31827         * lib/fchmodat.c (fchmodat):
31828         Don’t attempt to special-case
31829         any flag value other than AT_SYMLINK_NOFOLLOW.
31831 2020-02-11  Paul Eggert  <eggert@cs.ucla.edu>
31833         lchmod: pacify Coverity CID 1491216
31834         * lib/lchmod.c (lchmod): Redo #if nesting so that Coverity does
31835         not complain about unreachable code at the ‘struct stat st;’
31836         declaration.
31838 2020-02-10  Bruno Haible  <bruno@clisp.org>
31840         copysignf: Fix link error on HP-UX with cc.
31841         * m4/copysignf.m4 (gl_FUNC_COPYSIGNF): Require AC_CANONICAL_HOST. On
31842         HP-UX, set COPYSIGNF_LIBM to -lm.
31844 2020-02-10  Bruno Haible  <bruno@clisp.org>
31846         pthread-mutex-tests, pthread-rwlock-tests: Fix link errors on HP-UX.
31847         * modules/pthread-mutex-tests (Makefile.am): Link test-pthread-mutex
31848         with $(LIB_SEMAPHORE).
31849         * modules/pthread-rwlock-tests (Makefile.am): Link test-pthread-rwlock
31850         with $(LIB_SEMAPHORE).
31852 2020-02-10  Bruno Haible  <bruno@clisp.org>
31854         ptsname_r-tests: Avoid unused function warning.
31855         * tests/test-ptsname_r.c: Don't include null-ptr.h if we don't need it.
31857 2020-02-08  Bruno Haible  <bruno@clisp.org>
31859         lchmod: Add tests.
31860         * tests/test-lchmod.c: New file.
31861         * modules/lchmod-tests: New file.
31863 2020-02-08  Bruno Haible  <bruno@clisp.org>
31865         lchmod: Ensure declaration on HP-UX.
31866         * lib/sys_stat.in.h (lchown): Declare also on HP-UX.
31867         * doc/glibc-functions/lchmod.texi: Mention the HP-UX problem.
31869 2020-02-08  Bruno Haible  <bruno@clisp.org>
31871         fchmodat: Strengthen tests.
31872         * tests/test-fchmodat.c (BASE): New macro.
31873         (main): Use it, to avoid conflicts with other unit tests. Verify that
31874         fchmodat changed the file permission bits.
31876 2020-02-08  Bruno Haible  <bruno@clisp.org>
31878         fchmodat: Fix endless recursion on Cygwin (regression from 2020-02-07).
31879         * lib/fchmodat.c (orig_fchmodat): Move definition to immediately after
31880         '#undef __need_system_sys_stat_h'.
31882 2020-02-08  Bruno Haible  <bruno@clisp.org>
31884         fchmodat: Improve cross-compilation guesses.
31885         * m4/fchmodat.m4 (gl_FUNC_FCHMODAT): Require AC_CANONICAL_HOST. When
31886         cross-compiling, guess depending on the platform.
31887         * doc/posix-functions/fchmodat.texi: Clarify.
31889 2020-02-08  Bruno Haible  <bruno@clisp.org>
31891         Fix compilation errors in a testdir created with --with-c++-tests.
31892         * lib/c++defs.h (_GL_CXXALIASWARN1_2): Do not use __typeof__ (func),
31893         since it does not work any more with g++ >= 4.4.
31895 2020-02-08  Bruno Haible  <bruno@clisp.org>
31897         doc: Update for glibc 2.31.
31898         * doc/glibc-functions/pthread_clockjoin_np.texi: New file.
31899         * doc/gnulib.texi: Include it.
31900         * doc/pastposix-functions/h_errno.texi: Update.
31901         * doc/posix-functions/*.texi: Likewise.
31903 2020-02-08  Kenneth D'souza  <kdsouza@redhat.com>
31905         mountlist: consider smb3 file systems as remote
31906         * lib/mountlist.c (ME_REMOTE): Recognize file systems of type
31907         "smb3" as remote.
31909 2020-02-07  Paul Eggert  <eggert@cs.ucla.edu>
31911         fchmodat: AT_SYMLINK_NOFOLLOW fix for non-symlinks
31912         Fix lchmod, and fchmodat with AT_SYMLINK_NOFOLLOW, so that
31913         they act like chmod on non-symlinks.
31914         * NEWS:
31915         * doc/glibc-functions/lchmod.texi (lchmod):
31916         * doc/posix-functions/fchmodat.texi (fchmodat):
31917         Mention this.
31918         * lib/fchmodat.c: Define __need_system_sys_stat_h before including
31919         config.h, and undef it after including sys/stat.h the first time.
31920         Include fcntl.h, stdio.h, unistd.h, intprops.h, and include
31921         sys/stat.h a second time after defining orig_fchmodat.
31922         (orig_fchmodat) [HAVE_FCHMODAT]: New function.
31923         (fchmodat) [HAVE_FCHMODAT]: Work around the AT_SYMLINK_NOFOLLOW bug.
31924         * lib/lchmod.c: New file.
31925         * lib/sys_stat.in.h (fchmodat, lchmod):
31926         Support replacing these functions.
31927         * m4/fchmodat.m4 (gl_FUNC_FCHMODAT): If fchmodat exists,
31928         test that AT_SYMLINK_NOFOLLOW works on non-symlinks.
31929         * m4/lchmod.m4 (gl_FUNC_LCHMOD): Check for lstat.
31930         Test that lchmod works on non-symlinks.
31931         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS):
31932         Default REPLACE_FCHMODAT and REPLACE_LCHMOD to 0.
31933         * modules/fchmodat (Depends-on): Add fstatat, intprops, lchmod, unistd.
31934         (Depends-on, configure.ac): Check REPLACE_FCHMODAT too.
31935         * modules/lchmod (Files): Add lib/lchmod.c.
31936         (Depends-on): Add errno, fcntl-h, fchmodat, intprops, lstat, unistd.
31937         (configure.ac): Compile lchmod.c if needed.
31938         (lib_SOURCES): Add lchmod.c.
31939         * modules/sys_stat (sys/stat.h): Substitute REPLACE_FCHMODAT
31940         and REPLACE_LCHMOD.
31941         * tests/test-fchmodat.c: Include fcntl.h, sys/stat.h.
31942         (main): Test fchmodat with AT_SYMLINK_NOFOLLOW on non-symlinks.
31944 2020-02-05  Marc Dionne  <marc.dionne@auristor.com>  (tiny change)
31946         mountlist: Consider AFS filesystems as remote
31947         df --local relies on the ME_REMOTE macro to determine if a given
31948         mount entry should be considered "local".  There is special logic
31949         for nfs and smb/cifs mounts, but /afs as mounted by OpenAFS, the
31950         kernel's kafs module or AuriStorFS is treated as a local mount.
31951         * lib/mountlist.c (ME_REMOTE): Treat mounts of type 'afs'
31952         (OpenAFS, kernel kafs) and 'auristorfs' (AuriStorFS) as remote.
31954 2020-02-04  Paul Eggert  <eggert@cs.ucla.edu>
31956         Port _Noreturn to older Clang
31957         Problem reported by Jeffery Walton in:
31958         https://lists.gnu.org/r/bug-gnulib/2020-02/msg00013.html
31959         * lib/_Noreturn.h (_Noreturn):
31960         * m4/gnulib-common.m4 (gl_COMMON_BODY):
31961         Assume _Noreturn works in Clang 3.5 and later.
31962         It is documented to work in Clang 3.5:
31963         http://releases.llvm.org/3.5.0/tools/clang/docs/AttributeReference.html
31964         and is not documented in Clang 3.4:
31965         https://releases.llvm.org/3.4/tools/clang/docs/LanguageExtensions.html
31966         Apple sets __clang_version__ to a different value, so use
31967         __apple_build_version__ there.  See:
31968         https://lists.gnu.org/r/bug-gnulib/2020-02/msg00017.html
31970 2020-02-04  Pádraig Brady  <P@draigBrady.com>
31972         test-canonicalize: avoid unused function warning
31973         * tests/test-canonicalize.c: Protect the inclusion of null-ptr.h
31974         with the same guard as that used to protect usage of the null_ptr
31975         function, so that one doesn't get a -Wunused warning.
31976         * tests/test-canonicalize-lgpl.c: Likewise.
31978 2020-02-03  Paul Eggert  <eggert@cs.ucla.edu>
31980         libc-config: port to Apple’s Clang variant
31981         * lib/libc-config.h (__glibc_clang_prereq):
31982         Port to Apple’s Clang variant, which uses a different
31983         numbering scheme for __clang_major__.
31985 2020-02-02  Bruno Haible  <bruno@clisp.org>
31987         Document the new modules list-c++, set-c++, oset-c++, map-c++, omap-c++.
31988         * doc/containers.texi: Document these new modules.
31990 2020-02-02  Bruno Haible  <bruno@clisp.org>
31992         omap-c++: Add tests.
31993         * tests/test-omap-c++.cc: New file.
31994         * modules/omap-c++-tests: New file.
31996         omap-c++: New module.
31997         * lib/gl_omap.hh: New file, based on lib/gl_omap.h.
31998         * modules/omap-c++: New file.
32000 2020-02-02  Bruno Haible  <bruno@clisp.org>
32002         map-c++: Add tests.
32003         * tests/test-map-c++.cc: New file.
32004         * modules/map-c++-tests: New file.
32006         map-c++: New module.
32007         * lib/gl_map.hh: New file, based on lib/gl_map.h.
32008         * modules/map-c++: New file.
32010 2020-02-02  Bruno Haible  <bruno@clisp.org>
32012         oset-c++: Add tests.
32013         * tests/test-oset-c++.cc: New file.
32014         * modules/oset-c++-tests: New file.
32016         oset-c++: New module.
32017         * lib/gl_oset.hh: New file, based on lib/gl_oset.h.
32018         * modules/oset-c++: New file.
32020 2020-02-02  Bruno Haible  <bruno@clisp.org>
32022         set-c++: Add tests.
32023         * tests/test-set-c++.cc: New file.
32024         * modules/set-c++-tests: New file.
32026         set-c++: New module.
32027         * lib/gl_set.hh: New file, based on lib/gl_set.h.
32028         * modules/set-c++: New file.
32030 2020-02-02  Bruno Haible  <bruno@clisp.org>
32032         list-c++: Add tests.
32033         * tests/test-list-c++.cc: New file.
32034         * modules/list-c++-tests: New file.
32036         list-c++: New module.
32037         * lib/gl_list.hh: New file, based on lib/gl_list.h.
32038         * modules/list-c++: New file.
32040 2020-02-02  Bruno Haible  <bruno@clisp.org>
32042         xalloc: Fix compilation error in C++ mode on FreeBSD 12.
32043         * lib/xalloc.h (xalloc_die): Comment out 'extern' keyword before
32044         '_Noreturn'.
32045         * lib/sigpipe-die.h (sigpipe_die): Likewise.
32047 2020-02-02  Pádraig Brady  <P@draigBrady.com>
32049         read-file: reduce max size from SIZE_MAX to PTRDIFF_MAX
32050         On x86_64 with glibc-2.30, gcc 9.2 is giving:
32051           error: argument 2 value '18446744073709551615'
32052           exceeds maximum object size 9223372036854775807
32053           [-Werror=alloc-size-larger-than=]
32054         The details of this restriction are discussed at:
32055         https://stackoverflow.com/q/42574890/4421
32056         * lib/read-file.c: s/SIZE_MAX/PTRDIFF_MAX/
32058 2020-02-02  Pádraig Brady  <P@draigBrady.com>
32060         sysctl.h: avoid including on glibc
32061         * lib/nproc.c: Avoid including deprecated and unneeded header on GLIBC.
32062         * lib/physmem.c: Likewise.
32064 2020-02-02  Bruno Haible  <bruno@clisp.org>
32066         list, set, oset, map, omap: Avoid imperative voice in documentation.
32067         * lib/gl_list.h: Use descriptive sentences instead of imperative voice
32068         in the specification of functions.
32069         * lib/gl_set.h: Likewise.
32070         * lib/gl_oset.h: Likewise.
32071         * lib/gl_map.h: Likewise.
32072         * lib/gl_omap.h: Likewise.
32073         * lib/gl_*.h: Likewise.
32075 2020-02-01  Bruno Haible  <bruno@clisp.org>
32077         ansi-c++-opt: Set CXXFLAGS to "-g -O2" by default.
32078         * m4/ansi-c++.m4 (gl_PROG_ANSI_CXX): Determine CXXFLAGS like AC_PROG_CXX
32079         does.
32081 2020-01-29  Bruno Haible  <bruno@clisp.org>
32083         array-map, hash-map, linkedhash-map: Fix module description.
32084         * modules/array-map (Description): Fix description.
32085         * modules/hash-map (Description): Likewise.
32086         * modules/linkedhash-map (Description): Likewise.
32088 2020-01-29  Paul Eggert  <eggert@cs.ucla.edu>
32090         dfa: do not depend on isblank
32091         This removes a difference between Gawk dfa.c and Gnulib dfa.c.
32092         * lib/dfa.c (isblank): Define if neither system nor Gnulib does.
32093         * modules/dfa (Depends-on): Remove isblank.
32094         * modules/isblank: Add a module indicator, for lib/dfa.c.
32096         dfa: do not assume 64-bit int
32097         Problem reported for VAX/VMS C (!) by Arnold Robbins in:
32098         https://lists.gnu.org/r/bug-gnulib/2020-01/msg00173.html
32099         * lib/dfa.c (CHARCLASS_PAIR): Bring back this macro.
32100         (CHARCLASS_WORD_BITS, charclass_word) [!UINT_LEAST64_MAX]:
32101         Fall back to 32-bit words.
32102         (CHARCLASS_INIT): Go back to having 8 32-bit args instead
32103         of 4 64-bit args.  All uses changed.
32105 2020-01-27  Paul Eggert  <eggert@cs.ucla.edu>
32107         regex: remove limits-h dependency
32108         * modules/regex (Depends-on): Remove limits-h, since the
32109         code no longer depends on ULONG_WIDTH already being defined.
32111         regex: port to non-GCC pre-IEC-60559
32112         Problem reported by Arnold Robbins in:
32113         https://lists.gnu.org/r/bug-gnulib/2020-01/msg00154.html
32114         * lib/regex_internal.h (ULONG_WIDTH): Make this usable in #if.
32116 2020-01-25  Bruno Haible  <bruno@clisp.org>
32118         c32isxdigit: Add tests.
32119         * tests/test-c32isxdigit.c: New file, based on tests/test-iswxdigit.c.
32120         * tests/test-c32isxdigit.sh: New file.
32121         * modules/c32isxdigit-tests: New file.
32123         c32isxdigit: New module.
32124         * lib/c32isxdigit.c: New file.
32125         * modules/c32isxdigit: New file.
32126         * doc/posix-functions/iswxdigit.texi: Mention the new module.
32128 2020-01-25  Bruno Haible  <bruno@clisp.org>
32130         c32isupper: Add tests.
32131         * tests/test-c32isupper.c: New file.
32132         * tests/test-c32isupper.sh: New file.
32133         * modules/c32isupper-tests: New file.
32135         c32isupper: New module.
32136         * lib/c32isupper.c: New file.
32137         * modules/c32isupper: New file.
32138         * doc/posix-functions/iswupper.texi: Mention the new module.
32140 2020-01-25  Bruno Haible  <bruno@clisp.org>
32142         c32isspace: Add tests.
32143         * tests/test-c32isspace.c: New file.
32144         * tests/test-c32isspace.sh: New file.
32145         * modules/c32isspace-tests: New file.
32147         c32isspace: New module.
32148         * lib/c32isspace.c: New file.
32149         * modules/c32isspace: New file.
32150         * doc/posix-functions/iswspace.texi: Mention the new module.
32152 2020-01-25  Bruno Haible  <bruno@clisp.org>
32154         c32ispunct: Add tests.
32155         * tests/test-c32ispunct.c: New file.
32156         * tests/test-c32ispunct.sh: New file.
32157         * modules/c32ispunct-tests: New file.
32159         c32ispunct: New module.
32160         * lib/c32ispunct.c: New file.
32161         * modules/c32ispunct: New file.
32162         * doc/posix-functions/iswpunct.texi: Mention the new module.
32164 2020-01-25  Bruno Haible  <bruno@clisp.org>
32166         c32isprint: Add tests.
32167         * tests/test-c32isprint.c: New file.
32168         * tests/test-c32isprint.sh: New file.
32169         * modules/c32isprint-tests: New file.
32171         c32isprint: New module.
32172         * lib/c32isprint.c: New file.
32173         * modules/c32isprint: New file.
32174         * doc/posix-functions/iswprint.texi: Mention the new module.
32176 2020-01-25  Bruno Haible  <bruno@clisp.org>
32178         c32islower: Add tests.
32179         * tests/test-c32islower.c: New file.
32180         * tests/test-c32islower.sh: New file.
32181         * modules/c32islower-tests: New file.
32183         c32islower: New module.
32184         * lib/c32islower.c: New file.
32185         * modules/c32islower: New file.
32186         * doc/posix-functions/iswlower.texi: Mention the new module.
32188 2020-01-25  Bruno Haible  <bruno@clisp.org>
32190         c32isgraph: Add tests.
32191         * tests/test-c32isgraph.c: New file.
32192         * tests/test-c32isgraph.sh: New file.
32193         * modules/c32isgraph-tests: New file.
32195         c32isgraph: New module.
32196         * lib/c32isgraph.c: New file.
32197         * modules/c32isgraph: New file.
32198         * doc/posix-functions/iswgraph.texi: Mention the new module.
32200 2020-01-25  Bruno Haible  <bruno@clisp.org>
32202         c32isdigit: Add tests.
32203         * tests/test-c32isdigit.c: New file, based on tests/test-iswdigit.c.
32204         * tests/test-c32isdigit.sh: New file.
32205         * modules/c32isdigit-tests: New file.
32207         c32isdigit: New module.
32208         * lib/c32isdigit.c: New file.
32209         * modules/c32isdigit: New file.
32210         * doc/posix-functions/iswdigit.texi: Mention the new module.
32212 2020-01-25  Bruno Haible  <bruno@clisp.org>
32214         c32iscntrl: Add tests.
32215         * tests/test-c32iscntrl.c: New file.
32216         * tests/test-c32iscntrl.sh: New file.
32217         * modules/c32iscntrl-tests: New file.
32219         c32iscntrl: New module.
32220         * lib/c32iscntrl.c: New file.
32221         * modules/c32iscntrl: New file.
32222         * doc/posix-functions/iswcntrl.texi: Mention the new module.
32224 2020-01-25  Bruno Haible  <bruno@clisp.org>
32226         c32isblank: Add tests.
32227         * tests/test-c32isblank.c: New file.
32228         * tests/test-c32isblank.sh: New file.
32229         * modules/c32isblank-tests: New file.
32231         c32isblank: New module.
32232         * lib/c32isblank.c: New file.
32233         * modules/c32isblank: New file.
32234         * doc/posix-functions/iswblank.texi: Mention the new module.
32236 2020-01-25  Bruno Haible  <bruno@clisp.org>
32238         c32isalpha: Add tests.
32239         * tests/test-c32isalpha.c: New file.
32240         * tests/test-c32isalpha.sh: New file.
32241         * modules/c32isalpha-tests: New file.
32243         c32isalpha: New module.
32244         * lib/c32isalpha.c: New file.
32245         * modules/c32isalpha: New file.
32246         * doc/posix-functions/iswalpha.texi: Mention the new module.
32248 2020-01-25  Bruno Haible  <bruno@clisp.org>
32250         c32isalnum: Add tests.
32251         * tests/test-c32isalnum.c: New file.
32252         * tests/test-c32isalnum.sh: New file.
32253         * modules/c32isalnum-tests: New file.
32255         c32isalnum: New module.
32256         * lib/c32isalnum.c: New file.
32257         * lib/c32is-impl.h: New file.
32258         * modules/c32isalnum: New file.
32259         * doc/posix-functions/iswalnum.texi: Mention the new module.
32261 2020-01-25  Bruno Haible  <bruno@clisp.org>
32263         uchar: Preparations for modules c32isalnum, ..., c32isxdigit.
32264         * lib/uchar.in.h (c32isalnum, c32isalpha, c32isblank, c32iscntrl,
32265         c32isdigit, c32isgraph, c32islower, c32isprint, c32ispunct, c32isspace,
32266         c32isupper, c32isxdigit): New declarations.
32267         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32ISALNUM,
32268         GNULIB_C32ISALPHA, GNULIB_C32ISBLANK, GNULIB_C32ISCNTRL,
32269         GNULIB_C32ISDIGIT, GNULIB_C32ISGRAPH, GNULIB_C32ISLOWER,
32270         GNULIB_C32ISPRINT, GNULIB_C32ISPUNCT, GNULIB_C32ISSPACE,
32271         GNULIB_C32ISUPPER, GNULIB_C32ISXDIGIT.
32272         * modules/uchar (Makefile.am): Substitute GNULIB_C32ISALNUM,
32273         GNULIB_C32ISALPHA, GNULIB_C32ISBLANK, GNULIB_C32ISCNTRL,
32274         GNULIB_C32ISDIGIT, GNULIB_C32ISGRAPH, GNULIB_C32ISLOWER,
32275         GNULIB_C32ISPRINT, GNULIB_C32ISPUNCT, GNULIB_C32ISSPACE,
32276         GNULIB_C32ISUPPER, GNULIB_C32ISXDIGIT.
32277         * tests/test-uchar-c++.cc: Test the signature of c32isalnum, c32isalpha,
32278         c32isblank, c32iscntrl, c32isdigit, c32isgraph, c32islower, c32isprint,
32279         c32ispunct, c32isspace, c32isupper, c32isxdigit.
32281 2020-01-25  Bruno Haible  <bruno@clisp.org>
32283         mbchar, wctype: Use the corrected iswxdigit function.
32284         * modules/mbchar (Depends-on): Add iswxdigit.
32285         * modules/wctype (Depends-on): Likewise.
32287         iswxdigit: Add tests.
32288         * tests/test-iswxdigit.c: New file.
32289         * tests/test-iswxdigit.sh: New file.
32290         * modules/iswxdigit-tests: New file.
32292         iswxdigit: New module.
32293         * m4/iswxdigit.m4: New file.
32294         * lib/wctype.in.h (iswxdigit): Potentially override.
32295         (iswxdigit, rpl_iswxdigit): Test REPLACE_ISWXDIGIT, not
32296         REPLACE_ISWCNTRL. Rely on ISO C compliant definition.
32297         * lib/iswxdigit.c: New file.
32298         * m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_ISWXDIGIT,
32299         REPLACE_ISWXDIGIT.
32300         * modules/wctype-h (Makefile.am): Substitute GNULIB_ISWXDIGIT,
32301         REPLACE_ISWXDIGIT.
32302         * modules/iswxdigit: New file.
32303         * doc/posix-functions/iswxdigit.texi: Mention the portability problem.
32305 2020-01-25  Bruno Haible  <bruno@clisp.org>
32307         lseek: Fix the override to not undo the effects of AC_SYS_LARGEFILE.
32308         Reported by John Donoghue <john.david.donoghue@gmail.com> in
32309         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00146.html>.
32310         * lib/lseek.c (rpl_lseek): When AC_SYS_LARGEFILE has enabled a 64-bit
32311         off_t on mingw, invoke _lseeki64 instead of lseek.
32313 2020-01-25  Bruno Haible  <bruno@clisp.org>
32315         iswdigit tests: Avoid test failure on Cygwin.
32316         * tests/test-iswdigit.c (for_character): If mbrtowc cannot convert the
32317         byte sequence, return 0.
32319         iswdigit: Fix test failure on native Windows.
32320         * lib/wctype.in.h (rpl_iswdigit): Rely on ISO C compliant definition.
32322         mbchar, wctype: Use the corrected iswdigit function.
32323         * modules/mbchar (Depends-on): Add iswdigit.
32324         * modules/wctype (Depends-on): Likewise.
32326         iswdigit: Add tests.
32327         * tests/test-iswdigit.c: New file.
32328         * tests/test-iswdigit.sh: New file.
32329         * modules/iswdigit-tests: New file.
32331         iswdigit: New module.
32332         * m4/iswdigit.m4: New file.
32333         * lib/wctype.in.h (iswdigit): Potentially override.
32334         (iswdigit, rpl_iswdigit): Test REPLACE_ISWDIGIT, not REPLACE_ISWCNTRL.
32335         * lib/iswdigit.c: New file.
32336         * m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_ISWDIGIT,
32337         REPLACE_ISWDIGIT.
32338         * modules/wctype-h (Makefile.am): Substitute GNULIB_ISWDIGIT,
32339         REPLACE_ISWDIGIT.
32340         * modules/iswdigit: New file.
32341         * doc/posix-functions/iswdigit.texi: Mention the portability problem.
32343 2020-01-25  Bruno Haible  <bruno@clisp.org>
32345         hard-locale tests: Make it easy to reuse the musl test.
32346         * m4/musl.m4: New file, extracted from modules/hard-locale-tests.
32347         * modules/hard-locale-tests (Files): Add it.
32348         (configure.ac): Invoke gl_MUSL_LIBC.
32350 2020-01-24  Paul Eggert  <eggert@cs.ucla.edu>
32352         regex: port to Gawk on nonstandard platforms
32353         * lib/regex_internal.h (ULONG_WIDTH): Define if not already defined.
32354         This is useful for Gawk, which does not use the Gnulib stdlib-h
32355         module.  Problem reported by Arnold Robbins in:
32356         https://lists.gnu.org/r/bug-gnulib/2020-01/msg00138.html
32358 2020-01-21  Paul Eggert  <eggert@cs.ucla.edu>
32360         regex: fix bug with >=16 subexpressions
32361         * lib/regex_internal.h (struct re_backref_cache_entry):
32362         Use bitset_word_t as the type of eps_reachable_subexps_map,
32363         instead of unsigned short int.  This fixes a bug I introduced
32364         to glibc in 2005-09-28T17:33:18Z!drepper@redhat.com (glibc commit
32365         2c05d33f90861d074dc12808dafbde30f487b1a0, BZ #1302).
32366         Remove unused member 'unused'.
32368         regex: simplify definition of BITSET_WORD_BITS
32369         * config/srclist.txt: Remove regex.c, regex_internal.h temporarily.
32370         * lib/regex.c (__STDC_WANT_IEC_60559_BFP_EXT__): Define.
32371         * lib/regex_internal.h (BITSET_WORD_BITS):
32372         * modules/regex (Depends-on): Add limits-h.
32373         Simplify now that we can use ULONG_WIDTH.
32375 2020-01-20  Bruno Haible  <bruno@clisp.org>
32377         mbrtoc32: Add note about FreeBSD 12.
32378         * m4/mbrtoc32.m4 (gl_MBRTOC32_SANITYCHECK): Guess no also on FreeBSD.
32379         * doc/posix-functions/mbrtoc32.texi: Mention that FreeBSD 12 is also
32380         affected.
32382 2020-01-20  Bruno Haible  <bruno@clisp.org>
32384         unistr/u8-uctomb: Fix warning.
32385         Reported by Andreas Schwab <schwab@suse.de> in
32386         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00127.html>.
32387         * lib/unistr/u8-uctomb.c (FALLTHROUGH): New macro.
32388         (u8_uctomb): Add FALLTHROUGH markers.
32390 2020-01-20  Bruno Haible  <bruno@clisp.org>
32392         lock: Fix test-once1 failure on FreeBSD 11 (regression from 2020-01-19).
32393         * lib/glthread/lock.c (glthread_once_multithreaded): New function.
32394         * lib/glthread/lock.h (glthread_once_multithreaded): New declaration.
32395         (glthread_once): Use it.
32397 2020-01-19  Bruno Haible  <bruno@clisp.org>
32399         threadlib: Disable use of weak symbols on FreeBSD 11.
32400         Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
32401         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00061.html>.
32402         * m4/threadlib.m4 (gl_WEAK_SYMBOLS): Require AC_CANONICAL_HOST. Test
32403         against a bug in FreeBSD 11.
32405 2020-01-19  Bruno Haible  <bruno@clisp.org>
32407         iconv_open: Improve z/OS support.
32408         * lib/iconv_open-zos.gperf: Choose better aliases. Add mapping for
32409         ISO-8859-3, KOI8-R, KOI8-U, CP775, CP857, CP865, CP1129, CP1131, CP1257.
32410         Remove mapping for EUC-TW.
32412 2020-01-18  Bruno Haible  <bruno@clisp.org>
32414         Rename ~~gnulib.m4 to zzgnulib.m4.
32415         Suggested by Paul Eggert.
32416         * m4/zzgnulib.m4: Renamed from m4/~~gnulib.m4.
32417         * gnulib-tool (func_get_filelist): Update.
32418         * pygnulib/GLModuleSystem.py (getFiles): Likewise.
32420 2020-01-18  Bruno Haible  <bruno@clisp.org>
32422         doc: Update license notices.
32423         * doc/*.texi: Reference the GFDL 1.3 through a URL, rather than by
32424         reference to a section or to a "file as part of this distribution".
32426 2020-01-18  Bruno Haible  <bruno@clisp.org>
32428         Avoid error "m4_require: circular dependency of AC_LANG_COMPILER(C)".
32429         Reported by Mats Erik Andersson <mats.andersson@gisladisker.se> in
32430         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00109.html>.
32431         * m4/00gnulib.m4 (gl_COMPILER_CLANG): Use _AC_COMPILE_IFELSE, not
32432         AC_EGREP_CPP.
32434 2020-01-18  Bruno Haible  <bruno@clisp.org>
32436         Ensure Automake does not drop ~~gnulib.m4.
32437         * m4/~~gnulib.m4 (gl_ZZGNULIB): New macro.
32438         * m4/gnulib-common.m4 (gl_COMMON): Require it.
32440 2020-01-18  Bruno Haible  <bruno@clisp.org>
32442         Fix major regression from 2020-01-10.
32443         Reported by Paul Eggert in
32444         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00079.html>.
32445         * m4/00gnulib.m4 (gl_COMPILER_CLANG, gl_COMPILER_PREPARE_CHECK_DECL):
32446         Don't AC_REQUIRE anything.
32447         (gl_COMPILER_PREPARE_CHECK_DECL): Define through AC_DEFUN, not
32448         AC_DEFUN_ONCE. Use _AC_COMPILE_IFELSE, not AC_COMPILE_IFELSE.
32449         (_AC_CHECK_DECL_BODY): If ac_compile_for_check_decl has not been set,
32450         use ac_compile instead.
32451         (AC_CHECK_DECL): Remove override.
32452         * m4/~~gnulib.m4: New file.
32453         * gnulib-tool (func_get_filelist): Add also ~~gnulib.m4.
32454         * pygnulib/GLModuleSystem.py (getFiles): Likewise.
32456 2020-01-17  Bruno Haible  <bruno@clisp.org>
32457             Paul Eggert  <eggert@cs.ucla.edu>
32459         glob: Fix use-after-free bug.
32460         Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
32461         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00102.html>.
32462         * lib/glob.c (__glob): Delay freeing dirname until after the use of
32463         end_name.
32465 2020-01-16  Siddhesh Poyarekar  <siddhesh@gotplt.org>
32467         vcs-to-changelog: Fix parsing of fndecl without args.
32468         * build-aux/vcstocl/frontend_c.py (FNDECL_RE): Fix regular expression
32469         for empty arguments.
32471 2020-01-16  Siddhesh Poyarekar  <siddhesh@gotplt.org>
32473         vcs-to-changelog: Add documentation.
32474         * doc/vcs-to-changelog.texi: New file.
32475         * doc/gnulib.texi (Build Infrastructure Modules): Add vcs-to-changelog
32476         section.
32478 2020-01-16  Siddhesh Poyarekar  <siddhesh@gotplt.org>
32480         vcs-to-changelog: Allow loading of custom quirks file.
32481         * build-aux/vcs_to_changelog.py: New commandline option -q.
32483 2020-01-16  Siddhesh Poyarekar  <siddhesh@gotplt.org>
32485         vcs-to-changelog: Fix formatting of ChangeLog output.
32486         * build-aux/vcstocl/vcs_git.py (list_changes): Add newline in print
32487         output.
32489 2020-01-16  Siddhesh Poyarekar  <siddhesh@gotplt.org>
32491         vcs-to-changelog: Drop python3 shebang from frontend_c.py.
32492         Reported in
32493         <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00050.html>.
32494         * build-aux/vcstocl/frontend_c.py: Remove shebang.
32496 2020-01-15  Simon Josefsson  <simon@josefsson.org>
32498         crypto/gc-pbkdf2: New module.
32499         * MODULES.html.sh (func_all_modules): Add gc-pbkdf2.
32500         * NEWS: Deprecated gc-pbkdf2-sha1 in favor of gc-pbkdf2.
32501         * lib/gc-pbkdf2.c: New file.
32502         * lib/gc-pbkdf2-sha1.c: Use new interface.
32503         * lib/gc.h (GC_MAX_DIGEST_SIZE, gc_pbkdf2_hmac): Add.
32504         * modules/crypto/gc-pbkdf2: New file.
32505         * modules/crypto/gc-pbkdf2-tests: New file.
32506         * tests/test-gc-pbkdf2.c: New file.
32508 2020-01-12  Bruno Haible  <bruno@clisp.org>
32510         c32stombs: Add tests.
32511         * tests/test-c32stombs.c: New file, based on tests/test-c32srtombs.c.
32512         * tests/test-c32stombs-1.sh: New file, based on
32513         tests/test-c32srtombs-1.sh.
32514         * tests/test-c32stombs-2.sh: New file, based on
32515         tests/test-c32srtombs-2.sh.
32516         * tests/test-c32stombs-3.sh: New file, based on
32517         tests/test-c32srtombs-3.sh.
32518         * tests/test-c32stombs-4.sh: New file, based on
32519         tests/test-c32srtombs-4.sh.
32520         * modules/c32stombs-tests: New file, based on modules/c32srtombs-tests.
32522         c32stombs: New module.
32523         * lib/uchar.in.h (c32stombs): New declaration.
32524         * lib/c32stombs.c: New file.
32525         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32STOMBS.
32526         * modules/uchar (Makefile.am): Substitute GNULIB_C32STOMBS.
32527         * modules/c32stombs: New file.
32528         * tests/test-uchar-c++.cc: Test the signature of c32stombs.
32529         * doc/posix-functions/wcstombs.texi: Mention the new module.
32531 2020-01-11  Jim Meyering  <meyering@fb.com>
32533         perl: require the "warnings" module
32534         * m4/perl.m4: Also "use warnings", so we reject the perl found
32535         on at least one IRIX 6.5 system. Reported by Bruno Haible in
32536         https://lists.gnu.org/r/sed-devel/2020-01/msg00004.html
32538 2020-01-10  Bruno Haible  <bruno@clisp.org>
32540         Fix major regression from 2020-01-04.
32541         Reported by Mats Erik Andersson <mats.andersson@gisladisker.se> in
32542         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00072.html>.
32543         * m4/00gnulib.m4 (gl_COMPILER_PREPARE_CHECK_DECL): Define through
32544         AC_DEFUN_ONCE.
32545         (AC_CHECK_DECL): Invoke, not require, it.
32547 2020-01-10  Bruno Haible  <bruno@clisp.org>
32549         c32snrtombs: Add tests.
32550         * tests/test-c32snrtombs.c: New file, based on tests/test-wcsnrtombs.c.
32551         * tests/test-c32snrtombs-1.sh: New file, based on
32552         tests/test-wcsnrtombs1.sh.
32553         * tests/test-c32snrtombs-2.sh: New file, based on
32554         tests/test-wcsnrtombs2.sh.
32555         * tests/test-c32snrtombs-3.sh: New file, based on
32556         tests/test-wcsnrtombs3.sh.
32557         * tests/test-c32snrtombs-4.sh: New file, based on
32558         tests/test-wcsnrtombs4.sh.
32559         * modules/c32snrtombs-tests: New file, based on
32560         modules/wcsnrtombs-tests.
32562         c32snrtombs: New module.
32563         * lib/uchar.in.h (c32snrtombs): New declaration.
32564         * lib/wcsnrtombs-impl.h: Parameterize: Use macros FUNC, SCHAR_T,
32565         INTERNAL_STATE, WCRTOMB.
32566         * lib/wcsnrtombs.c (FUNC, SCHAR_T, INTERNAL_STATE, WCRTOMB): New macros.
32567         * lib/c32snrtombs.c: New file.
32568         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32SNRTOMBS.
32569         * modules/uchar (Makefile.am): Substitute GNULIB_C32SNRTOMBS.
32570         * modules/c32snrtombs: New file.
32571         * tests/test-uchar-c++.cc: Test the signature of c32snrtombs.
32572         * doc/posix-functions/wcsnrtombs.texi: Mention the new module.
32574 2020-01-09  Bruno Haible  <bruno@clisp.org>
32576         c32srtombs: Add tests.
32577         * tests/test-c32srtombs.c: New file, based on tests/test-wcsrtombs.c.
32578         * tests/test-c32srtombs-1.sh: New file, based on
32579         tests/test-wcsrtombs1.sh.
32580         * tests/test-c32srtombs-2.sh: New file, based on
32581         tests/test-wcsrtombs2.sh.
32582         * tests/test-c32srtombs-3.sh: New file, based on
32583         tests/test-wcsrtombs3.sh.
32584         * tests/test-c32srtombs-4.sh: New file, based on
32585         tests/test-wcsrtombs4.sh.
32586         * modules/c32srtombs-tests: New file, based on modules/wcsrtombs-tests.
32588         c32srtombs: New module.
32589         * lib/uchar.in.h (c32srtombs): New declaration.
32590         * lib/wcsrtombs-impl.h: Parameterize: Use macros FUNC, SCHAR_T,
32591         INTERNAL_STATE, WCRTOMB.
32592         * lib/wcsrtombs.c (FUNC, SCHAR_T, INTERNAL_STATE, WCRTOMB): New macros.
32593         * lib/c32srtombs.c: New file.
32594         * lib/c32srtombs-state.c: New file, based on lib/wcsrtombs-state.c.
32595         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32SRTOMBS.
32596         * modules/uchar (Makefile.am): Substitute GNULIB_C32SRTOMBS.
32597         * modules/c32srtombs: New file.
32598         * tests/test-uchar-c++.cc: Test the signature of c32srtombs.
32599         * doc/posix-functions/wcsrtombs.texi: Mention the new module.
32601 2020-01-08  Bruno Haible  <bruno@clisp.org>
32603         c32tob: Make consistent with mbrtoc32.
32604         * lib/c32tob.c: Include <stdio.h>, <string.h>, <wchar.h>.
32605         (c32tob): If the char32_t encoding and the wchar_t encoding may differ,
32606         use c32rtomb, not wctob.
32607         * modules/c32tob (Files): Add m4/mbrtoc32.m4.
32608         (Depends-on): Add c32rtomb.
32609         (configure.ac): Require gl_MBRTOC32_SANITYCHECK.
32611 2020-01-08  Bruno Haible  <bruno@clisp.org>
32613         c32rtomb: Add tests.
32614         * tests/test-c32rtomb.c: New file, based on tests/test-wcrtomb.c.
32615         * tests/test-c32rtomb.sh: New file, based on tests/test-wcrtomb.sh.
32616         * tests/test-c32rtomb-w32.c: New file, based on
32617         tests/test-wcrtomb-w32.c.
32618         * tests/test-c32rtomb-w32-1.sh: New file, based on
32619         tests/test-wcrtomb-w32-1.sh.
32620         * tests/test-c32rtomb-w32-2.sh: New file, based on
32621         tests/test-wcrtomb-w32-2.sh.
32622         * tests/test-c32rtomb-w32-3.sh: New file, based on
32623         tests/test-wcrtomb-w32-3.sh.
32624         * tests/test-c32rtomb-w32-4.sh: New file, based on
32625         tests/test-wcrtomb-w32-4.sh.
32626         * tests/test-c32rtomb-w32-5.sh: New file, based on
32627         tests/test-wcrtomb-w32-5.sh.
32628         * tests/test-c32rtomb-w32-6.sh: New file, based on
32629         tests/test-wcrtomb-w32-6.sh.
32630         * tests/test-c32rtomb-w32-7.sh: New file, based on
32631         tests/test-wcrtomb-w32-7.sh.
32632         * modules/c32rtomb-tests: New file.
32634         c32rtomb: New module.
32635         * lib/uchar.in.h (c32rtomb): New declaration.
32636         * lib/c32rtomb.c: New file, based on lib/unistr/u8-uctomb-aux.c.
32637         * m4/c32rtomb.m4: New file.
32638         * m4/uchar.m4 (gl_UCHAR_H): Test whether c32rtomb is declared.
32639         (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32RTOMB, HAVE_C32RTOMB,
32640         REPLACE_C32RTOMB.
32641         * modules/uchar (Makefile.am): Substitute GNULIB_C32RTOMB,
32642         HAVE_C32RTOMB, REPLACE_C32RTOMB.
32643         * modules/c32rtomb: New file.
32644         * tests/test-uchar-c++.cc: Test the signature of c32rtomb.
32645         * doc/posix-functions/c32rtomb.texi: Document the new module.
32646         * doc/posix-functions/wcrtomb.texi: Mention the new module.
32648 2020-01-08  Bruno Haible  <bruno@clisp.org>
32650         mbrtoc32: Use the system's mbrtoc32 if it exists and basically works.
32651         * m4/mbrtoc32.m4 (gl_MBRTOC32_SANITYCHECK): New macro.
32652         (gl_FUNC_MBRTOC32): Require it. Set REPLACE_MBRTOC32 if mbrtoc32 exists
32653         but is not working.
32654         * lib/mbrtoc32.c: Include hard-locale.h, <locale.h>.
32655         (mbrtoc32): If the char32_t encoding and the wchar_t encoding may
32656         differ, use the system's mbrtoc32, adding workarounds.
32657         * modules/mbrtoc32 (Depends-on): Add hard-locale.
32658         * doc/posix-functions/mbrtoc32.texi: Mention the Solaris and native
32659         Windows problem.
32660         * lib/btoc32.c: Include <stdio.h>, <string.h>.
32661         (btoc32): If the char32_t encoding and the wchar_t encoding may differ,
32662         use mbrtoc32, not btowc.
32663         * modules/btoc32 (Depends-on): Add mbrtoc32.
32664         * lib/mbsrtoc32s.c (mbsrtoc32s): If the char32_t encoding and the
32665         wchar_t encoding may differ, use mbrtoc32, not mbsrtowcs.
32666         * modules/mbsrtoc32s (Depends-on): Update conditions.
32667         (configure.ac): Compile mbsrtoc32s-state.c unconditionally.
32668         * lib/mbsnrtoc32s.c (mbsnrtoc32s): If the char32_t encoding and the
32669         wchar_t encoding may differ, use mbrtoc32, not mbsnrtowcs.
32670         * modules/mbsnrtoc32s (Depends-on): Update conditions.
32671         (configure.ac): Compile mbsrtoc32s-state.c unconditionally.
32673 2020-01-07  Bruno Haible  <bruno@clisp.org>
32675         wcrtomb: Make multithread-safe, except possibly on IRIX.
32676         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Don't set REPLACE_WCRTOMB to 1 when
32677         REPLACE_MBSTATE_T is set. Define WCRTOMB_C_LOCALE_BUG and
32678         WCRTOMB_RETVAL_BUG.
32679         * lib/wcrtomb.c (wcrtomb): Use original wcrtomb whenever available. Use
32680         wctomb only on IRIX.
32682 2020-01-05  Jim Meyering  <meyering@fb.com>
32684         tests: skip thread-using tests when threading is disabled
32685         sed's configure.ac specifies gl_DISABLE_THREADS, and that caused three
32686         thread-using gnulib tests to fail. Add an #if-guarded exit (77) to each
32687         of those, so they are skipped in this case.
32688         * tests/test-nl_langinfo-mt.c (main): Exit 77 when threading is disabled.
32689         * tests/test-setlocale_null-mt-all.c (main): Likewise.
32690         * tests/test-setlocale_null-mt-one.c (main): Likewise.
32692 2020-01-05  Bruno Haible  <bruno@clisp.org>
32694         tests: Avoid GCC over-optimization caused by _GL_ARG_NONNULL attributes.
32695         Reported by Jim Meyering in
32696         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00040.html>.
32697         * lib/stdlib.in.h (GNULIB_defined_canonicalize_file_name): New macro.
32698         (GNULIB_defined_ptsname_r): New macro.
32699         * tests/test-canonicalize.c (_GL_ARG_NONNULL): Define to empty.
32700         (main): Disable the NULL argument test if canonicalize_file_name does
32701         not come from gnulib.
32702         * tests/test-canonicalize-lgpl.c (_GL_ARG_NONNULL): Define to empty.
32703         (main): Disable the NULL argument test if canonicalize_file_name does
32704         not come from gnulib.
32705         * tests/test-ptsname_r.c (_GL_ARG_NONNULL): Define to empty.
32706         (test_errors): Disable the NULL argument test if ptsname_r does not come
32707         from gnulib.
32709 2020-01-04  Jim Meyering  <meyering@fb.com>
32711         update-copyright: reenable its always-skipped test
32712         * tests/test-update-copyright.sh: Restore the "-pi" options removed
32713         on 2019-06-15. Without those, an internal preliminary test would
32714         fail, causing this test always to be skipped.
32715         Verify that the test is now run and passes via this:
32716           ./gnulib-tool --test --dir /tmp/x --with-tests update-copyright
32718 2020-01-05  Bruno Haible  <bruno@clisp.org>
32720         mbstoc32s: Add tests.
32721         * tests/test-mbstoc32s.c: New file, based on tests/test-mbsrtoc32s.c.
32722         * tests/test-mbstoc32s-1.sh: New file, based on
32723         tests/test-mbsrtoc32s-1.sh.
32724         * tests/test-mbstoc32s-2.sh: New file, based on
32725         tests/test-mbsrtoc32s-2.sh.
32726         * tests/test-mbstoc32s-3.sh: New file, based on
32727         tests/test-mbsrtoc32s-3.sh.
32728         * tests/test-mbstoc32s-4.sh: New file, based on
32729         tests/test-mbsrtoc32s-4.sh.
32730         * modules/mbstoc32s-tests: New file, based on modules/mbsrtoc32s-tests.
32732         mbstoc32s: New module.
32733         * lib/uchar.in.h (mbstoc32s): New declaration.
32734         * lib/mbstoc32s.c: New file.
32735         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_MBSTOC32S.
32736         * modules/uchar (Makefile.am): Substitute GNULIB_MBSTOC32S.
32737         * modules/mbstoc32s: New file.
32738         * tests/test-uchar-c++.cc: Test the signature of mbstoc32s.
32739         * doc/posix-functions/mbstowcs.texi: Mention the new module.
32741 2020-01-05  Bruno Haible  <bruno@clisp.org>
32743         Tweak recently added tests.
32744         * tests/test-mbrtoc32.c: Make signature consistent with uchar.in.h.
32745         * tests/test-mbsrtoc32s.c: Likewise.
32746         * tests/test-mbsnrtoc32s.c: Likewise.
32748 2020-01-04  Bruno Haible  <bruno@clisp.org>
32750         mbsnrtoc32s: Add tests.
32751         * tests/test-mbsnrtoc32s.c: New file, based on tests/test-mbsnrtowcs.c.
32752         * tests/test-mbsnrtoc32s-1.sh: New file, based on
32753         tests/test-mbsnrtowcs1.sh.
32754         * tests/test-mbsnrtoc32s-2.sh: New file, based on
32755         tests/test-mbsnrtowcs2.sh.
32756         * tests/test-mbsnrtoc32s-3.sh: New file, based on
32757         tests/test-mbsnrtowcs3.sh.
32758         * tests/test-mbsnrtoc32s-4.sh: New file, based on
32759         tests/test-mbsnrtowcs4.sh.
32760         * modules/mbsnrtoc32s-tests: New file, based on
32761         modules/mbsnrtowcs-tests.
32763         mbsnrtoc32s: New module.
32764         * lib/uchar.in.h (mbsnrtoc32s): New declaration.
32765         * lib/mbsnrtowcs-impl.h: Parameterize: Use macros FUNC, DCHAR_T,
32766         INTERNAL_STATE, MBRTOWC.
32767         * lib/mbsnrtowcs.c (FUNC, DCHAR_T, INTERNAL_STATE, MBRTOWC): New macros.
32768         * lib/mbsnrtoc32s.c: New file.
32769         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_MBSNRTOC32S.
32770         * modules/uchar (Makefile.am): Substitute GNULIB_MBSNRTOC32S.
32771         * modules/mbsnrtoc32s: New file.
32772         * tests/test-uchar-c++.cc: Test the signature of mbsnrtoc32s.
32773         * doc/posix-functions/mbsnrtowcs.texi: Mention the new module.
32775 2020-01-04  Bruno Haible  <bruno@clisp.org>
32777         mbsrtoc32s tests: Enhance test.
32778         * tests/test-mbsrtoc32s.c (main): Include a non-BMP character in the
32779         test strings for UTF-8 and GB18030.
32781 2020-01-04  Bruno Haible  <bruno@clisp.org>
32783         mbsrtoc32s: Fix bug.
32784         * modules/mbsrtoc32s (configure.ac): Require gl_UCHAR_H, to make sure
32785         that SMALL_WCHAR_T is defined.
32787 2020-01-04  Bruno Haible  <bruno@clisp.org>
32789         mbsrtoc32s: Add tests.
32790         * tests/test-mbsrtoc32s.c: New file, based on tests/test-mbsrtowcs.c.
32791         * tests/test-mbsrtoc32s-1.sh: New file, based on
32792         tests/test-mbsrtowcs1.sh.
32793         * tests/test-mbsrtoc32s-2.sh: New file, based on
32794         tests/test-mbsrtowcs2.sh.
32795         * tests/test-mbsrtoc32s-3.sh: New file, based on
32796         tests/test-mbsrtowcs3.sh.
32797         * tests/test-mbsrtoc32s-4.sh: New file, based on
32798         tests/test-mbsrtowcs4.sh.
32799         * modules/mbsrtoc32s-tests: New file, based on modules/mbsrtowcs-tests.
32801         mbsrtoc32s: New module.
32802         * lib/uchar.in.h (mbsrtoc32s): New declaration.
32803         * lib/mbsrtowcs-impl.h: Parameterize: Use macros FUNC, DCHAR_T,
32804         INTERNAL_STATE, MBRTOWC.
32805         * lib/mbsrtowcs.c (FUNC, DCHAR_T, INTERNAL_STATE, MBRTOWC): New macros.
32806         * lib/mbsrtoc32s.c: New file.
32807         * lib/mbsrtoc32s-state.c: New file, based on lib/mbsrtowcs-state.c.
32808         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_MBSRTOC32S.
32809         * modules/uchar (Makefile.am): Substitute GNULIB_MBSRTOC32S.
32810         * modules/mbsrtoc32s: New file.
32811         * tests/test-uchar-c++.cc: Test the signature of mbsrtoc32s.
32812         * doc/posix-functions/mbsrtowcs.texi: Mention the new module.
32814 2020-01-04  Bruno Haible  <bruno@clisp.org>
32816         mbrtowc, mbrtoc32: Tighten dependendies.
32817         * modules/mbrtowc (Depends-on): Disable hard-locale, mbsinit if
32818         REPLACE_MBSTATE_T is 1.
32819         (configure.ac): Don't compile lc-charset-dispatch.c and mbtowc-lock.c if
32820         REPLACE_MBSTATE_T is 0.
32821         * modules/mbrtoc32 (Depends-on): Remove hard-locale, mbsinit. Disable
32822         mbrtowc dependency if REPLACE_MBSTATE_T is 1.
32823         (configure.ac): Don't compile lc-charset-dispatch.c and mbtowc-lock.c if
32824         REPLACE_MBSTATE_T is 0.
32826 2020-01-04  Bruno Haible  <bruno@clisp.org>
32828         uchar: Decide about _GL_LARGE_CHAR32_T at configure time.
32829         * m4/uchar.m4 (gl_UCHAR_H): Set SMALL_WCHAR_T.
32830         * modules/uchar (Files): Add stdint.m4.
32831         (Makefile.am): Substitute SMALL_WCHAR_T.
32832         * lib/uchar.in.h (_GL_LARGE_CHAR32_T): Rely on SMALL_WCHAR_T.
32834 2020-01-04  Bruno Haible  <bruno@clisp.org>
32836         Fix AC_CHECK_DECL so that it deactivates clang's built-in declarations.
32837         Reported by Martin Storsjö <martin@martin.st> in
32838         <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00016.html>.
32839         * m4/00gnulib.m4 (gl_COMPILER_CLANG, gl_COMPILER_PREPARE_CHECK_DECL):
32840         New macros.
32841         (_AC_CHECK_DECL_BODY, AC_CHECK_DECL): Augment.
32843 2020-01-04  Bruno Haible  <bruno@clisp.org>
32845         btoc32: Add tests.
32846         * tests/test-btoc32.c: New file, based on tests/test-btowc.c.
32847         * tests/test-btoc32-1.sh: New file, based on tests/test-btowc1.sh.
32848         * tests/test-btoc32-2.sh: New file, based on tests/test-btowc2.sh.
32849         * modules/btoc32-tests: New file, based on modules/btowc-tests.
32851         btoc32: New module.
32852         * lib/uchar.in.h (btoc32): New declaration.
32853         * lib/btoc32.c: New file.
32854         * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_BTOC32.
32855         * modules/uchar (Makefile.am): Substitute GNULIB_BTOC32.
32856         * modules/btoc32: New file.
32857         * tests/test-uchar-c++.cc: Test the signature of btoc32.
32858         * doc/posix-functions/btowc.texi: Mention the new module.
32860 2020-01-03  Bruno Haible  <bruno@clisp.org>
32862         uchar tests: Avoid compilation error with HP cc.
32863         * tests/test-uchar.c: Disable a test when HP cc is in use.
32865 2020-01-03  Bruno Haible  <bruno@clisp.org>
32867         mbrtoc32: Add tests.
32868         * tests/test-mbrtoc32.c: New file, based on tests/test-mbrtowc.c.
32869         * tests/test-mbrtoc32-1.sh: New file, based on tests/test-mbrtowc1.sh.
32870         * tests/test-mbrtoc32-2.sh: New file, based on tests/test-mbrtowc2.sh.
32871         * tests/test-mbrtoc32-3.sh: New file, based on tests/test-mbrtowc3.sh.
32872         * tests/test-mbrtoc32-4.sh: New file, based on tests/test-mbrtowc4.sh.
32873         * tests/test-mbrtoc32-5.sh: New file, based on tests/test-mbrtowc5.sh.
32874         * tests/test-mbrtoc32-w32.c: New file, based on tests/test-mbrtowc-w32.c.
32875         * tests/test-mbrtoc32-w32-1.sh: New file, based on
32876         tests/test-mbrtowc-w32-1.sh.
32877         * tests/test-mbrtoc32-w32-2.sh: New file, based on
32878         tests/test-mbrtowc-w32-2.sh.
32879         * tests/test-mbrtoc32-w32-3.sh: New file, based on
32880         tests/test-mbrtowc-w32-3.sh.
32881         * tests/test-mbrtoc32-w32-4.sh: New file, based on
32882         tests/test-mbrtowc-w32-4.sh.
32883         * tests/test-mbrtoc32-w32-5.sh: New file, based on
32884         tests/test-mbrtowc-w32-5.sh.
32885         * tests/test-mbrtoc32-w32-6.sh: New file, based on
32886         tests/test-mbrtowc-w32-6.sh.
32887         * tests/test-mbrtoc32-w32-7.sh: New file, based on
32888         tests/test-mbrtowc-w32-7.sh.
32889         * modules/mbrtoc32-tests: New file, based on modules/mbrtowc-tests.
32891         mbrtoc32: New module.
32892         * lib/uchar.in.h (mbrtoc32): New declaration.
32893         * lib/mbrtoc32.c: New file, based on lib/mbrtowc.c.
32894         * m4/mbrtoc32.m4: New file, based on m4/mbrtowc.m4.
32895         * m4/uchar.m4 (gl_UCHAR_H): Test whether mbrtoc32 is declared.
32896         (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_MBRTOC32, HAVE_MBRTOC32,
32897         REPLACE_MBRTOC32.
32898         * modules/uchar (Makefile.am): Substitute GNULIB_MBRTOC32,
32899         HAVE_MBRTOC32, REPLACE_MBRTOC32.
32900         * modules/mbrtoc32: New file, based on modules/mbrtowc.
32901         * tests/test-uchar-c++.cc (mbrtoc32): Verify the signature.
32902         * modules/uchar-c++-tests (Makefile.am): Link test-uchar-c++ with
32903         $(LIB_MBRTOWC).
32904         * doc/posix-functions/mbrtoc32.texi: Document the new module.
32905         * doc/posix-functions/mbrtowc.texi: Mention the new module.
32907 2020-01-03  Bruno Haible  <bruno@clisp.org>
32909         mbrtowc: Refactor to share code with mbrtoc32.
32910         * lib/mbrtowc-impl.h: New file, extracted from lib/mbrtowc.c.
32911         * lib/mbrtowc-impl-utf8.h: Likewise.
32912         * lib/mbrtowc.c (mbrtowc): Define macro FITS_IN_CHAR_TYPE. Include
32913         mbrtowc-impl.h.
32914         * modules/mbrtowc (Files): Add the new files.
32916 2020-01-03  Jim Meyering  <meyering@fb.com>
32918         doc: fix time.texi wording
32919         * doc/posix-headers/time.texi (time.h): Typo.
32921 2020-01-03  Bruno Haible  <bruno@clisp.org>
32923         mbrtowc: Refactor locale charset dispatching.
32924         * lib/lc-charset-dispatch.h: New file, extracted from lib/mbrtowc.c.
32925         * lib/lc-charset-dispatch.c: New file, extracted from lib/mbrtowc.c.
32926         * lib/mbrtowc.c: Include lc-charset-dispatch.h. Don't include
32927         localcharset.h, streq.h.
32928         (enc_t): Remove type.
32929         (locale_enc): Remove function.
32930         (cached_locale_enc): Remove variable.
32931         (locale_enc_cached): Remove function.
32932         (mbrtowc): Invoke locale_encoding_classification.
32933         * m4/mbrtowc.m4 (gl_PREREQ_MBRTOWC): Update comment.
32934         * modules/mbrtowc (Files): Add lc-charset-dispatch.h,
32935         lc-charset-dispatch.c.
32936         (configure.ac): Arrange to compile lc-charset-dispatch.c.
32938 2020-01-03  Paul Eggert  <eggert@cs.ucla.edu>
32940         doc: mention 32-bit time_t issue
32941         * doc/posix-headers/sys_stat.texi (sys/stat.h):
32942         * doc/posix-headers/time.texi (time.h): Mention 2038.
32944 2020-01-03  Bruno Haible  <bruno@clisp.org>
32946         mbrtowc: Ensure the mbtowc_lock is unique.
32947         * lib/mbtowc-lock.c: New file, based on lib/setlocale-lock.c.
32948         * lib/mbtowc-lock.h: New file, extracted from lib/mbrtowc.c and
32949         lib/setlocale_null.c.
32950         * lib/mbrtowc.c: Include headers needed for mbtowc-lock.h. Don't include
32951         glthread/lock.h. Include mbtowc-lock.h.
32952         (mbtowc_lock): Remove declaration.
32953         (mbrtowc): Use mbtowc_with_lock.
32954         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Require gl_PTHREADLIB. Check for
32955         threads.h. Set LIB_MBRTOWC.
32956         (gl_PREREQ_MBTOWC_LOCK): New macro.
32957         * modules/mbrtowc (Files): Add lib/mbtowc-lock.h, lib/mbtowc-lock.c,
32958         lib/windows-initguard.h, m4/threadlib.m4, m4/visibility.m4.
32959         (Depends-on): Remove lock.
32960         (configure.ac): Arrange to compile mbtowc-lock.c.
32961         (Link): Mention $(LIB_MBRTOWC) instead of $(LIBTHREAD).
32962         * modules/acl (Link): Likewise.
32963         * modules/argmatch (Link): Likewise.
32964         * modules/backup-rename (Link): Likewise.
32965         * modules/backupfile (Link): Likewise.
32966         * modules/closein (Link): Likewise.
32967         * modules/closeout (Link): Likewise.
32968         * modules/copy-file (Link): Likewise.
32969         * modules/csharpcomp (Link): Likewise.
32970         * modules/csharpexec (Link): Likewise.
32971         * modules/dfa (Link): Likewise.
32972         * modules/exclude (Link): Likewise.
32973         * modules/fnmatch (Link): Likewise.
32974         * modules/fnmatch-gnu (Link): Likewise.
32975         * modules/fnmatch-posix (Link): Likewise.
32976         * modules/glob (Link): Likewise.
32977         * modules/human (Link): Likewise.
32978         * modules/javacomp (Link): Likewise.
32979         * modules/javaexec (Link): Likewise.
32980         * modules/javaversion (Link): Likewise.
32981         * modules/mbfile (Link): Likewise.
32982         * modules/mbiter (Link): Likewise.
32983         * modules/mbmemcasecmp (Link): Likewise.
32984         * modules/mbmemcasecoll (Link): Likewise.
32985         * modules/mbrlen (Link): Likewise.
32986         * modules/mbscasecmp (Link): Likewise.
32987         * modules/mbscasestr (Link): Likewise.
32988         * modules/mbschr (Link): Likewise.
32989         * modules/mbscspn (Link): Likewise.
32990         * modules/mbsinit (Link): Likewise.
32991         * modules/mbslen (Link): Likewise.
32992         * modules/mbsncasecmp (Link): Likewise.
32993         * modules/mbsnlen (Link): Likewise.
32994         * modules/mbsnrtowcs (Link): Likewise.
32995         * modules/mbspbrk (Link): Likewise.
32996         * modules/mbspcasecmp (Link): Likewise.
32997         * modules/mbsrchr (Link): Likewise.
32998         * modules/mbsrtowcs (Link): Likewise.
32999         * modules/mbssep (Link): Likewise.
33000         * modules/mbsspn (Link): Likewise.
33001         * modules/mbsstr (Link): Likewise.
33002         * modules/mbstok_r (Link): Likewise.
33003         * modules/mbswidth (Link): Likewise.
33004         * modules/mbuiter (Link): Likewise.
33005         * modules/mkdir-p (Link): Likewise.
33006         * modules/propername (Link): Likewise.
33007         * modules/quote (Link): Likewise.
33008         * modules/quotearg (Link): Likewise.
33009         * modules/quotearg-simple (Link): Likewise.
33010         * modules/regex-quote (Link): Likewise.
33011         * modules/rpmatch (Link): Likewise.
33012         * modules/sh-quote (Link): Likewise.
33013         * modules/system-quote (Link): Likewise.
33014         * modules/trim (Link): Likewise.
33015         * modules/unistdio/ulc-asnprintf (Link): Likewise.
33016         * modules/unistdio/ulc-fprintf (Link): Likewise.
33017         * modules/unistdio/ulc-vasnprintf (Link): Likewise.
33018         * modules/unistdio/ulc-vasprintf (Link): Likewise.
33019         * modules/unistdio/ulc-vfprintf (Link): Likewise.
33020         * modules/unistdio/ulc-vsnprintf (Link): Likewise.
33021         * modules/unistdio/ulc-vsprintf (Link): Likewise.
33022         * modules/xfreopen (Link): Likewise.
33023         * modules/xmemcoll (Link): Likewise.
33024         * modules/yesno (Link): Likewise.
33025         * modules/regex (Link): Add $(LIB_MBRTOWC).
33026         * modules/acl-tests (Makefile.am): Link the programs with $(LIB_MBRTOWC)
33027         instead of $(LIBTHREAD).
33028         * modules/argmatch-tests (Makefile.am): Likewise.
33029         * modules/closein-tests (Makefile.am): Likewise.
33030         * modules/copy-file-tests (Makefile.am): Likewise.
33031         * modules/dfa-tests (Makefile.am): Likewise.
33032         * modules/fnmatch-tests (Makefile.am): Likewise.
33033         * modules/glob-tests (Makefile.am): Likewise.
33034         * modules/mbmemcasecmp-tests (Makefile.am): Likewise.
33035         * modules/mbmemcasecoll-tests (Makefile.am): Likewise.
33036         * modules/mbrtowc-tests (Makefile.am): Likewise.
33037         * modules/mbscasecmp-tests (Makefile.am): Likewise.
33038         * modules/mbscasestr-tests (Makefile.am): Likewise.
33039         * modules/mbschr-tests (Makefile.am): Likewise.
33040         * modules/mbscspn-tests (Makefile.am): Likewise.
33041         * modules/mbsinit-tests (Makefile.am): Likewise.
33042         * modules/mbsncasecmp-tests (Makefile.am): Likewise.
33043         * modules/mbsnrtowcs-tests (Makefile.am): Likewise.
33044         * modules/mbspbrk-tests (Makefile.am): Likewise.
33045         * modules/mbspcasecmp-tests (Makefile.am): Likewise.
33046         * modules/mbsrchr-tests (Makefile.am): Likewise.
33047         * modules/mbsrtowcs-tests (Makefile.am): Likewise.
33048         * modules/mbsspn-tests (Makefile.am): Likewise.
33049         * modules/mbsstr-tests (Makefile.am): Likewise.
33050         * modules/quotearg-simple-tests (Makefile.am): Likewise.
33051         * modules/quotearg-tests (Makefile.am): Likewise.
33052         * modules/readtokens-tests (Makefile.am): Likewise.
33053         * modules/sh-quote-tests (Makefile.am): Likewise.
33054         * modules/system-quote-tests (Makefile.am): Likewise.
33055         * modules/unistdio/ulc-asnprintf-tests (Makefile.am): Likewise.
33056         * modules/unistdio/ulc-vasnprintf-tests (Makefile.am): Likewise.
33057         * modules/unistdio/ulc-vasprintf-tests (Makefile.am): Likewise.
33058         * modules/unistdio/ulc-vsnprintf-tests (Makefile.am): Likewise.
33059         * modules/unistdio/ulc-vsprintf-tests (Makefile.am): Likewise.
33060         * modules/yesno-tests (Makefile.am): Likewise.
33061         * modules/exclude-tests (Makefile.am): Link the programs with
33062         $(LIB_MBRTOWC).
33063         * modules/regex-tests (Makefile.am): Likewise.
33064         * modules/regex-quote-tests (Makefile.am): Likewise.
33066 2020-01-03  Bruno Haible  <bruno@clisp.org>
33068         getopt-posix: Fix compilation failure in testdirs.
33069         * lib/unistd.in.h: Include <getopt-cdefs.h> and <getopt-pfx-core.h> only
33070         when the gnulib module 'getopt-posix' is enabled.
33071         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GETOPT_POSIX.
33072         * modules/getopt-posix (configure.ac): Set GNULIB_GETOPT_POSIX as a
33073         module indicator.
33074         * modules/unistd (Makefile.am): Substitute GNULIB_GETOPT_POSIX.
33076 2020-01-03  Bruno Haible  <bruno@clisp.org>
33078         doc: Mention the 64-bit inode number problem.
33079         * m4/largefile.m4 (AC_SYS_LARGEFILE): Mention that this macro fixes the
33080         64-bit inode number problem.
33081         * doc/posix-functions/stat.texi: Mention that this module fixes the
33082         64-bit inode number problem.
33083         * doc/posix-functions/lstat.texi: Likewise.
33084         * doc/posix-functions/fstat.texi: Likewise.
33085         * doc/posix-functions/readdir.texi: Add more details.
33086         * doc/posix-functions/readdir_r.texi: Likewise.
33088 2020-01-02  Bruno Haible  <bruno@clisp.org>
33090         wcrtomb: Add more tests.
33091         * tests/test-wcrtomb-w32.c: Include localcharset.h.
33092         (test_one_locale): For the GB18030 and UTF-8 tests, verify that
33093         locale_charset() returns the expected value; otherwise, skip the test.
33094         * tests/test-wcrtomb-w32-6.sh: Remove old comment.
33095         * tests/test-wcrtomb-w32-7.sh: Likewise.
33096         * modules/wcrtomb-tests (Files): Add these files.
33097         (Depends-on): Add localcharset.
33098         (TESTS): Add test-wcrtomb-w32-6.sh, test-wcrtomb-w32-7.sh.
33100 2020-01-02  Bruno Haible  <bruno@clisp.org>
33102         mbrtowc: Add more tests.
33103         * tests/test-mbrtowc-w32.c: Include localcharset.h.
33104         (test_one_locale): For the GB18030 and UTF-8 tests, verify that
33105         locale_charset() returns the expected value; otherwise, skip the test.
33106         * tests/test-mbrtowc-w32-6.sh: Remove old comment.
33107         * tests/test-mbrtowc-w32-7.sh: Likewise.
33108         * modules/mbrtowc-tests (Files): Add these files.
33109         (Depends-on): Add localcharset.
33110         (TESTS): Add test-mbrtowc-w32-6.sh, test-mbrtowc-w32-7.sh.
33112 2020-01-02  Bruno Haible  <bruno@clisp.org>
33114         mbrtowc: Fix test failures on MSVC (regression by previous commit).
33115         * m4/mbrtowc.m4 (gl_MBRTOWC_STORES_INCOMPLETE): New macro.
33116         (gl_FUNC_MBRTOWC): Invoke it. Define MBRTOWC_STORES_INCOMPLETE_BUG.
33117         * lib/mbrtowc.c (rpl_mbrtowc): Add workaround for
33118         MBRTOWC_STORES_INCOMPLETE_BUG.
33119         * doc/posix-functions/mbrtowc.texi: Mention the MSVC bug.
33121 2020-01-02  Paul Eggert  <eggert@cs.ucla.edu>
33123         doc: mention glibc bug 24269
33124         * doc/regex.texi (Back-reference Operator): Add glibc bug 24269.
33125         Reformat slightly so that it looks nicer in the Grep manual.
33127 2020-01-02  Bruno Haible  <bruno@clisp.org>
33129         mbrtowc: Don't replace mbstate_t on MSVC.
33130         * m4/mbrtowc.m4 (gl_MBSTATE_T_BROKEN): Require AC_CANONICAL_HOST. Ignore
33131         a missing mbsinit function on native Windows.
33132         * lib/wchar.in.h (GNULIB_defined_mbstate_t): Likewise.
33133         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Strengthen the test, to detect an
33134         MSVC bug.
33135         * doc/posix-functions/wcrtomb.texi: Mention the MSVC bug.
33137 2020-01-02  Bruno Haible  <bruno@clisp.org>
33139         setlocale-null: Avoid crashing the MSVC linker.
33140         * lib/setlocale-lock.c: Don't define IMP(gl_get_setlocale_null_lock) on
33141         MSVC.
33143 2020-01-02  Bruno Haible  <bruno@clisp.org>
33145         wchar: Make the HP-UX workaround work on HP-UX 11.31.
33146         * modules/wchar (Depends-on): Add inttypes-incomplete.
33147         * lib/inttypes.in.h: Define _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H.
33148         * lib/wchar.in.h: Test _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H instead
33149         of strtoimax.
33151 2020-01-02  Bruno Haible  <bruno@clisp.org>
33153         mbrtowc: Fix compilation error on IRIX (regression from 2019-12-26).
33154         * lib/mbrtowc.c: Include <stdint.h>.
33155         * modules/mbrtowc (Depends-on): Add stdint.
33157 2020-01-01  Pádraig Brady  <P@draigBrady.com>
33159         md5, sha1, sha256, sha512: support --with-openssl=auto-gpl-compat
33160         * m4/gl-openssl.m4: Add a new "auto-gpl-compat" mode,
33161         which will auto enable use of openssl, only for >= version 3,
33162         which is newly licensed under the Apache Software License.
33164 2020-01-01  Bruno Haible  <bruno@clisp.org>
33166         mbrtowc: Include function name in macro names.
33167         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Define
33168         MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ, not C_LOCALE_MAYBE_EILSEQ.
33169         (gl_MBRTOWC_C_LOCALE): Change cache variable name to
33170         gl_cv_func_mbrtowc_C_locale_sans_EILSEQ.
33171         * lib/mbrtowc.c: Test MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ, not
33172         C_LOCALE_MAYBE_EILSEQ.
33174 2020-01-01  Bruno Haible  <bruno@clisp.org>
33176         c32tob: New module.
33177         * lib/uchar.in.h (_GL_LARGE_CHAR32_T): New macro.
33178         (c32tob): New declaration.
33179         * lib/c32tob.c: New file.
33180         * m4/uchar.m4 (gl_UCHAR_MODULE_INDICATOR, gl_UCHAR_H_DEFAULTS): New
33181         macros.
33182         (gl_UCHAR_H): Require gl_UCHAR_H_DEFAULTS.
33183         * modules/uchar (Depends-on): Add snippet/c++defs.
33184         (Makefile.am): Include c++defs.h and substitute GNULIB_C32TOB in
33185         uchar.h.
33186         * modules/c32tob: New file.
33187         * tests/test-uchar.c: Verify that _GL_LARGE_CHAR32_T is correctly
33188         defined.
33189         * tests/test-uchar-c++.cc: Include signature.h. Test the signature of
33190         c32tob.
33191         * modules/uchar-c++-tests (Files): Add tests/signature.h.
33192         * doc/posix-functions/wctob.texi: Mention the new module.
33194 2020-01-01  Bruno Haible  <bruno@clisp.org>
33196         locale C++ tests: Fix link error on AIX (regression from 2019-12-18).
33197         * modules/locale-c++-tests (Makefile.am): Link test-locale-c++ with
33198         $(LIB_SETLOCALE).
33200 2020-01-01  Bruno Haible  <bruno@clisp.org>
33202         hard-locale tests: Fix a conflict with the C++ tests.
33203         * modules/hard-locale-tests (Makefile.am): Build a program named
33204         'current-locale', not 'locale'.
33206 2020-01-01  Bruno Haible  <bruno@clisp.org>
33208         doc: Update documentation about wchar_t.
33209         * doc/*/*wc*.texi: Clarify that 64-bit AIX does not have a too small
33210         wchar_t type.
33212 2020-01-01  Bruno Haible  <bruno@clisp.org>
33214         mbrtowc tests: Fix typos.
33215         * tests/test-mbrtowc.c (main): Fix typo.
33216         * tests/test-mbrtowc-w32.c (test_one_locale): Likewise.
33218 2019-12-31  Paul Eggert  <eggert@cs.ucla.edu>
33220         maint: update copyright notices
33221         Before doing the following changes done by hand, I also ran ‘make
33222         update-copyright’ and ‘config/srclist-update <config/srclist.txt’
33223         to do most of the copyright years automatically.  A few upstream
33224         sources are still in 2019 but these should eventually be changed
33225         automatically too.
33226         * build-aux/declared.sh (func_version):
33227         * build-aux/libtool-next-version (func_version):
33228         * build-aux/run-test (func_version):
33229         Update these notices by hand.  Put just the last year
33230         in output of programs, as per GNU coding standards.
33232 2019-12-31  Bruno Haible  <bruno@clisp.org>
33234         uchar: Add C++ tests.
33235         * tests/test-uchar-c++.cc: New file.
33236         * tests/test-uchar-c++2.cc: New file.
33237         * modules/uchar-c++-tests: New file.
33239         uchar: Add tests.
33240         * tests/test-uchar.c: New file.
33241         * modules/uchar-tests: New file.
33243         uchar: New module.
33244         * lib/uchar.in.h: New file.
33245         * m4/uchar.m4: New file.
33246         * modules/uchar: New file.
33247         * doc/posix-headers/uchar.texi: Mention the new module.
33249 2019-12-30  Jim Meyering  <meyering@fb.com>
33251         localeinfo: ->simple would be wrong for LC_ALL=C
33252         That would lead to using unnecessary and expensive code paths in dfa.c.
33253         * lib/localeinfo.c (using_simple_locale): Fix recently-introduced logic
33254         error that would have made grep many times slower in the C locale.
33255         With this change, and a file created like this:
33256           yes 00 | head -10000000 > in
33257         Running grep as follows becomes more than 40 times faster:
33258           LC_ALL=C grep -Fw 0 in
33260 2019-12-30  Paul Eggert  <eggert@cs.ucla.edu>
33262         doc: document trouble with back-references
33263         * doc/regex.texi (Back-reference Operator): Mention bugs etc.
33265 2019-12-29  Paul Eggert  <eggert@cs.ucla.edu>
33267         doc: use “back-reference” for \1 etc.
33268         * doc/regex.texi: Consistently spell “back-reference” with
33269         a hyphen, since that’s how POSIX does it.
33271 2019-12-26  Jim Meyering  <meyering@fb.com>
33273         test-framework-sh: tighten an internal grep regexp
33274         * tests/init.sh (gl_shell_test_script_): Tighten the grep regexp
33275         that helps test for a working printf.
33277 2019-12-26  Bruno Haible  <bruno@clisp.org>
33279         test-framework-sh: Avoid /bin/sh on AIX 7.2 due to its printf built-in.
33280         Reported by Paul Eggert in
33281         <https://lists.gnu.org/archive/html/grep-devel/2019-12/msg00020.html>.
33282         Simplification by Jim Meyering.
33283         * tests/init.sh (gl_shell_test_script_): Add a test of printf of an
33284         octal escape sequence in a UTF-8 locale.
33286 2019-12-26  Paul Eggert  <eggert@cs.ucla.edu>
33288         mbrtowc: port better to narrow-wchar_t platforms
33289         * lib/mbrtowc.c (mbrtowc): On platforms like AIX 7.2, where
33290         wchar_t is too narrow to represent all the Unicode characters,
33291         consider a byte sequence for an out-of-wchar_t-range character to
33292         be an encoding error.  This fixes grep’s surrogate-pair test
33293         failure on AIX 7.2.
33295 2019-12-24  Bruno Haible  <bruno@clisp.org>
33297         localcharset: Avoid referencing rpl_setlocale on native Windows.
33298         * lib/localcharset.c (setlocale): Undefine.
33300 2019-12-24  Bruno Haible  <bruno@clisp.org>
33302         lock tests: Fix link error on HP-UX/hppa (regression from 2019-12-21).
33303         * m4/semaphore.m4: New file.
33304         * modules/lock-tests (Files): Add it.
33305         (configure.ac): Require gl_SEMAPHORE.
33306         (Makefile.am): Link test-lock with $(LIB_SEMAPHORE).
33308 2019-12-24  Paul Eggert  <eggert@cs.ucla.edu>
33310         strptime: fix typo in previous patch
33311         Problem and fix reported by Bruno Haible in:
33312         https://lists.gnu.org/r/bug-gnulib/2019-12/msg00202.html
33313         * lib/strptime.c (day_of_the_week): Fix paren bug.
33315 2019-12-24  Bruno Haible  <bruno@clisp.org>
33317         setlocale-null: Make it easy to rely on the lock in another library.
33318         * lib/setlocale-lock.c: Do not define anything if OMIT_SETLOCALE_LOCK is
33319         defined.
33321 2019-12-23  Paul Eggert  <eggert@cs.ucla.edu>
33323         gethrxtime, mktime, nstrftime, strptime: tweak division performance
33324         Performanced analyzed by Bruno Haible in:
33325         https://lists.gnu.org/r/bug-gnulib/2019-12/msg00200.html
33326         * config/srclist.txt: Do not sync mktime.c for now.
33327         * lib/mktime.c (shr, ydhms_diff):
33328         * lib/nstrftime.c (SHR, tm_diff, __strftime_internal):
33329         * lib/strptime.c (day_of_the_week):
33330         * lib/xtime.h (xtime_sec):
33331         Redo with neither ‘%’ nor conditional branches.
33333 2019-12-23  Bruno Haible  <bruno@clisp.org>
33335         setlocale-null: Export the lock function also on non-Windows platforms.
33336         * lib/setlocale-lock.c (DLL_EXPORTED): New macro.
33337         (gl_get_setlocale_null_lock): Declare as DLL_EXPORTED.
33338         * m4/setlocale_null.m4 (gl_PREREQ_SETLOCALE_LOCK): New macro.
33339         * modules/setlocale-null (configure.ac): Invoke it.
33340         (Files): Add m4/visibility.m4.
33342 2019-12-22  Paul Eggert  <eggert@cs.ucla.edu>
33344         gethrxtime: fix rounding bug with negative args
33345         Problem reported by Bruno Haible in:
33346         https://lists.gnu.org/r/bug-gnulib/2019-12/msg00192.html
33347         * lib/xtime.h (xtime_sec): Simplify calculation and correct bug
33348         with negative rounding.  Common platforms can compute / and % with
33349         a single instruction, so the simplified code should be shorter and
33350         faster on these platforms anyway.
33352 2019-12-22  Bruno Haible  <bruno@clisp.org>
33354         gethrxtime: remove incorrect overflow detection
33355         * lib/xtime.h (xtime_make): Remove attempt to prevent internal
33356         integer overflow, as it didn’t suffice.  This reverts the xtime.h
33357         part of 2018-10-12T04:46:09Z!akim.demaille@gmail.com, which I
33358         cannot now see the need for anyway (even in cases where it works),
33359         as the patch is helpful only when the signs of S and NS disagree,
33360         and all callers pass nonnegative values for S and NS.
33362 2019-12-22  Bruno Haible  <bruno@clisp.org>
33364         setlocale-null: Add standalone include file.
33365         * lib/setlocale_null.h: New file, extracted from lib/locale.in.h.
33366         * lib/locale.in.h: Include setlocale_null.h.
33367         (SETLOCALE_NULL_MAX, SETLOCALE_NULL_ALL_MAX, setlocale_null_r,
33368         setlocale_null): Remove declarations.
33369         * lib/setlocale_null.c: Include setlocale_null.h.
33370         * lib/localename.c: Likewise.
33371         * modules/setlocale-null (Files): Add lib/setlocale_null.h.
33372         (Depends-on): Add snippet/arg-nonnull.
33373         (Include): Allow either "setlocale_null.h" or <locale.h>.
33375 2019-12-22  Bruno Haible  <bruno@clisp.org>
33377         strfmon_l: Fix test failures on FreeBSD and Cygwin.
33378         * m4/strfmon_l.m4 (gl_FUNC_STRFMON_L): Require gt_LOCALE_FR_UTF8. Add an
33379         AC_RUN_IFELSE test.
33380         * modules/strfmon_l (Files): Add locale-fr.m4, codeset.m4.
33381         * doc/posix-functions/strfmon_l.texi: Mention the FreeBSD and Cygwin
33382         problem.
33384 2019-12-22  Bruno Haible  <bruno@clisp.org>
33386         Prefer lib_SOURCES to unconditional AC_LIBOBJ.
33387         * modules/at-internal: Prefer a lib_SOURCES augmentation to an
33388         unconditional AC_LIBOBJ.
33389         * modules/selinux-at: Likewise.
33390         * modules/xmemdup0: Likewise.
33391         * modules/xstrtoll: Likewise.
33393 2019-12-22  Bruno Haible  <bruno@clisp.org>
33395         longlong: Mark module obsolete.
33396         * modules/longlong (Status, Notice): New sections.
33398         stdint: Assume that the compiler supports 'long long'.
33399         * lib/stdint.in.h (int64_t, uint64_t, intmax_t, uintmax_t, INT64_C,
33400         UINT64_C, INTMAX_C, UINTMAX_C): Assume HAVE_LONG_LONG_INT and
33401         HAVE_UNSIGNED_LONG_LONG_INT to be 1.
33402         * m4/stdint.m4 (gl_STDINT_H): Don't require AC_TYPE_LONG_LONG_INT,
33403         AC_TYPE_UNSIGNED_LONG_LONG_INT.
33404         * modules/stdint (Files): Remove longlong.m4.
33405         (Makefile.am): Don't substitute HAVE_LONG_LONG_INT,
33406         HAVE_UNSIGNED_LONG_LONG_INT.
33408         inttypes-incomplete: Assume that the compiler supports 'long long'.
33409         * lib/inttypes.in.h (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX,
33410         _SCNu64_PREFIX): Assume HAVE_LONG_LONG_INT and
33411         HAVE_UNSIGNED_LONG_LONG_INT to be 1.
33412         * m4/inttypes.m4 (gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION): Assume
33413         HAVE_LONG_LONG_INT to be 1.
33414         * modules/inttypes-incomplete (Makefile.am): Don't substitute
33415         HAVE_LONG_LONG_INT, HAVE_UNSIGNED_LONG_LONG_INT.
33417         malloca: Assume that the compiler supports 'long long'.
33418         * lib/malloca.h: Assume HAVE_LONG_LONG_INT to be 1.
33419         * m4/malloca.m4 (gl_MALLOCA): Don't require AC_TYPE_LONG_LONG_INT.
33420         * modules/malloca (Files): Remove longlong.m4.
33421         * modules/relocatable-prog-wrapper (Files): Likewise.
33423         atoll: Assume that the compiler supports 'long long'.
33424         * m4/atoll.m4 (gl_FUNC_ATOLL): Don't require AC_TYPE_LONG_LONG_INT.
33425         * modules/atoll (Files): Remove longlong.m4.
33427         strtoll: Assume that the compiler supports 'long long'.
33428         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Don't require AC_TYPE_LONG_LONG_INT.
33429         * modules/strtoll (Files): Remove longlong.m4.
33431         strtoull: Assume that the compiler supports 'long long'.
33432         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Don't require
33433         AC_TYPE_UNSIGNED_LONG_LONG_INT.
33434         * modules/strtoull (Files): Remove longlong.m4.
33436         strtoimax, strtoumax: Assume that the compiler supports 'long long'.
33437         * lib/strtoimax.c: Assume HAVE_LONG_LONG_INT and
33438         HAVE_UNSIGNED_LONG_LONG_INT to be 1.
33439         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Don't require
33440         AC_TYPE_LONG_LONG_INT.
33441         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't require
33442         AC_TYPE_UNSIGNED_LONG_LONG_INT.
33443         * modules/strtoimax (Files): Remove longlong.m4.
33444         * modules/strtoumax (Files): Likewise.
33446         xstrtoll: Assume that the compiler supports 'long long'.
33447         * lib/xstrtol.h (xstrtoll, xstrtoull): Declare unconditionally.
33448         * modules/xstrtoll (configure.ac): Don't invoke AC_TYPE_LONG_LONG_INT.
33450         vasnprintf: Assume that the compiler supports 'long long'.
33451         * lib/printf-args.h: Assume HAVE_LONG_LONG_INT to be 1.
33452         * lib/printf-args.c (PRINTF_FETCHARGS): Likewise.
33453         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
33454         * lib/vasnprintf.c (MAX_ROOM_NEEDED, VASNPRINTF): Likewise.
33455         * m4/intmax_t.m4 (gl_AC_TYPE_INTMAX_T, gt_AC_TYPE_INTMAX_T): Don't
33456         require AC_TYPE_LONG_LONG_INT.
33457         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
33458         gl_PREREQ_VASNPRINTF): Likewise.
33459         * modules/vasnprintf (Files): Remove longlong.m4.
33460         * modules/c-vasnprintf (Files): Likewise.
33461         * modules/unistdio/u8-vasnprintf (Files): Likewise.
33462         * modules/unistdio/u8-u8-vasnprintf (Files): Likewise.
33463         * modules/unistdio/u16-vasnprintf (Files): Likewise.
33464         * modules/unistdio/u16-u16-vasnprintf (Files): Likewise.
33465         * modules/unistdio/u32-vasnprintf (Files): Likewise.
33466         * modules/unistdio/u32-u32-vasnprintf (Files): Likewise.
33467         * modules/unistdio/ulc-vasnprintf (Files): Likewise.
33469         gethrxtime: Assume that the compiler supports 'long long'.
33470         * lib/xtime.h (xtime_t): Define to 'long long int' always.
33471         (XTIME_PRECISION): Define to 1000000000 always.
33472         (xtime_make, xtime_sec): Optimize accordingly.
33473         * m4/gethrxtime.m4 (gl_XTIME): Don't require AC_TYPE_LONG_LONG_INT.
33474         * modules/gethrxtime (Files): Remove longlong.m4.
33476         integer_length*: Assume that the compiler supports 'long long'.
33477         * lib/integer_length.h (integer_length_ll): Declare unconditionally.
33478         * modules/integer_length (Files): Remove longlong.m4.
33479         (configure.ac): Don't require AC_TYPE_UNSIGNED_LONG_LONG_INT.
33480         * modules/integer_length_l (Files): Remove longlong.m4.
33481         (configure.ac): Don't require AC_TYPE_UNSIGNED_LONG_LONG_INT.
33482         * modules/integer_length_ll (Files): Remove longlong.m4.
33483         (configure.ac): Don't require AC_TYPE_UNSIGNED_LONG_LONG_INT.
33485         count-one-bits: Assume that the compiler supports 'long long'.
33486         * lib/count-one-bits.h (count_one_bits_ll): Define unconditionally.
33487         * m4/count-one-bits.m4: Remove file.
33488         * modules/count-one-bits (Files): Remove it.
33489         (configure.ac): Don't invoke gl_COUNT_ONE_BITS.
33490         * tests/test-count-one-bits.c (main): Test count_one_bits_ll
33491         unconditionally.
33493         count-trailing-zeros: Assume that the compiler supports 'long long'.
33494         * lib/count-trailing-zeros.h (count_trailing_zeros_ll): Define
33495         unconditionally.
33496         * m4/count-trailing-zeros.m4: Remove file.
33497         * modules/count-trailing-zeros (Files): Remove it.
33498         (configure.ac): Don't invoke gl_COUNT_TRAILING_ZEROS.
33499         * tests/test-count-trailing-zeros.c (main): Test count_trailing_zeros_ll
33500         unconditionally.
33502         count-leading-zeros: Assume that the compiler supports 'long long'.
33503         * lib/count-leading-zeros.h (count_leading_zeros_ll): Define
33504         unconditionally.
33505         * m4/count-leading-zeros.m4: Remove file.
33506         * modules/count-leading-zeros (Files): Remove it.
33507         (configure.ac): Don't invoke gl_COUNT_LEADING_ZEROS.
33508         * tests/test-count-leading-zeros.c (main): Test count_leading_zeros_ll
33509         unconditionally.
33511 2019-12-22  Bruno Haible  <bruno@clisp.org>
33513         localcharset: Update support for OpenBSD.
33514         * lib/localcharset.c (alias_table): Map "US-ASCII" to "ASCII".
33516 2019-12-21  Bruno Haible  <bruno@clisp.org>
33518         pthread_sigmask: Avoid test failure on NetBSD 8.0.
33519         * tests/test-pthread_sigmask2.c (main): Skip the error handling test on
33520         NetBSD.
33521         * doc/posix-functions/pthread_sigmask.texi: Mention the NetBSD problem.
33523 2019-12-21  Bruno Haible  <bruno@clisp.org>
33525         threadlib: Improve code structure.
33526         * m4/threadlib.m4: Reorder macros. Add comments.
33528 2019-12-21  Bruno Haible  <bruno@clisp.org>
33530         threadlib: Fix LIBMULTITHREAD on FreeBSD with --enable-threads=isoc.
33531         * m4/threadlib.m4 (gl_STDTHREADLIB_BODY): New macro (some code moved
33532         here from m4/threads.m4).
33533         (gl_THREADLIB_BODY): Don't test whether mtx_lock and cnd_timedwait exist
33534         in libc. Instead, rely on gl_STDTHREADLIB_BODY.
33535         (gl_STDTHREADLIB): New macro.
33536         * m4/threads.m4 (gl_THREADS_H): Require gl_STDTHREADLIB instead of
33537         gl_THREADLIB_BODY and gl_YIELD. Don't set LIBSTDTHREAD here.
33539 2019-12-21  Bruno Haible  <bruno@clisp.org>
33541         sched_yield: Don't depend on threadlib and yield.
33542         * m4/threadlib.m4 (gl_PTHREADLIB): Document that it sets
33543         LIB_SCHED_YIELD.
33544         (gl_PTHREADLIB_BODY): Set LIB_SCHED_YIELD (code moved here from
33545         m4/yield.m4).
33546         * m4/sched_yield.m4 (gl_FUNC_SCHED_YIELD): Require gl_PTHREADLIB, not
33547         gl_THREADLIB and gl_YIELD.
33548         * m4/yield.m4 (gl_YIELD): Require gl_PTHREADLIB. Determine YIELD_LIB
33549         based on $(LIB_SCHED_YIELD).
33550         * m4/threads.m4 (gl_THREADS_H): Don't require gl_YIELD. Use
33551         $(LIB_SCHED_YIELD), not $(YIELD_LIB).
33552         * modules/sched_yield (Files): Remove yield.m4. Add threadlib.m4.
33553         (Depends-on): Remove threadlib.
33554         (Link): Mention $(LIB_SCHED_YIELD), not $(YIELD_LIB).
33555         * modules/threads-h (Files): Remove m4/yield.m4.
33556         * modules/pthread-cond-tests (Makefile.am): Link the programs against
33557         $(LIB_SCHED_YIELD), not $(YIELD_LIB).
33558         * modules/pthread-mutex-tests (Makefile.am): Likewise.
33559         * modules/pthread-once-tests (Makefile.am): Likewise.
33560         * modules/pthread-rwlock-tests (Makefile.am): Likewise.
33561         * modules/pthread-tss-tests (Makefile.am): Likewise.
33563 2019-12-21  Bruno Haible  <bruno@clisp.org>
33565         threads-h: Don't depend on threadlib.
33566         * modules/threads-h (configure.ac-early): Invoke gl_ANYTHREADLIB_EARLY,
33567         not gl_THREADLIB_EARLY.
33569 2019-12-21  Bruno Haible  <bruno@clisp.org>
33571         nl_langinfo tests: Fix link error (regression from 2019-12-18).
33572         * modules/nl_langinfo-tests (Makefile.am): Link also test-nl_langinfo
33573         with $(LIB_SETLOCALE).
33575 2019-12-21  Bruno Haible  <bruno@clisp.org>
33577         threadlib: Remove unused dependency (left over from 2019-07-06).
33578         * modules/threadlib (Depends-on): Remove havelib.
33580 2019-12-21  Bruno Haible  <bruno@clisp.org>
33582         New convention for multithread-safety tests.
33583         * tests/test-setlocale_null-mt-one.c: Renamed from
33584         tests/test-setlocale_null-one.c.
33585         * tests/test-setlocale_null-mt-all.c: Renamed from
33586         tests/test-setlocale_null-all.c.
33587         * modules/setlocale-null-tests (Files, Makefile.am): Update.
33589 2019-12-21  Bruno Haible  <bruno@clisp.org>
33591         quotearg tests: Fix conflict with hard-locale tests.
33592         * tests/testlocale: Renamed from tests/locale.
33593         * modules/quotearg-tests (Files): Update.
33594         * tests/test-quotearg.sh (LOCALEDIR): Likewise.
33596 2019-12-21  Bruno Haible  <bruno@clisp.org>
33598         pthread-thread, lock: On z/OS, use PTHREAD_RWLOCK_INITIALIZER_NP.
33599         Reported by Daniel Richard G. in
33600         <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00001.html>
33601         <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00167.html>
33602         * lib/pthread.in.h (PTHREAD_RWLOCK_INITIALIZER): Define to
33603         PTHREAD_RWLOCK_INITIALIZER_NP when possible.
33604         * lib/glthread/lock.h: Allow PTHREAD_RWLOCK_INITIALIZER_NP as an
33605         alternative to PTHREAD_RWLOCK_INITIALIZER.
33606         * lib/glthread/lock.c: Likewise.
33608 2019-12-21  Bruno Haible  <bruno@clisp.org>
33610         memcmp tests: Work around the clang bug.
33611         * tests/test-memcmp.c (main): Use a volatile function pointer to disable
33612         the clang optimization.
33614 2019-12-20  Bruno Haible  <bruno@clisp.org>
33616         localcharset: Add support for z/OS encoding names.
33617         * lib/localcharset.h: Mention which encodings are used as locale
33618         encodings on z/OS.
33620 2019-12-20  Bruno Haible  <bruno@clisp.org>
33622         iconv_open: Add support for z/OS encoding names.
33623         Reported by Daniel Richard G. in
33624         <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00172.html>.
33625         * lib/iconv_open-zos.gperf: New file.
33626         * modules/iconv_open (Files): Add iconv_open-zos.gperf.
33627         (Makefile.am): Add rules for generating iconv_open-zos.h from it.
33628         * lib/iconv_open.c (ICONV_FLAVOR_ZOS): New macro.
33629         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): On z/OS, use ICONV_FLAVOR_ZOS.
33630         * doc/posix-functions/iconv_open.texi: Mention z/OS.
33632 2019-12-20  Bruno Haible  <bruno@clisp.org>
33634         doc: Document the problem of the per-thread locale functions on z/OS.
33635         * doc/posix-functions/uselocale.texi: Document the z/OS problem.
33636         * doc/posix-functions/newlocale.texi: Likewise.
33637         * doc/posix-functions/duplocale.texi: Likewise.
33638         * doc/posix-functions/freelocale.texi: Likewise.
33640 2019-12-20  Bruno Haible  <bruno@clisp.org>
33642         localename, gettext: Fix host_os value for z/OS.
33643         * m4/intl-thread-locale.m4 (gt_FUNC_USELOCALE): Fix host_os value in
33644         cross-configuration code.
33646 2019-12-19  Jim Meyering  <meyering@fb.com>
33648         nstrftime: avoid a shadowing warning
33649         * lib/nstrftime.c (libc_hidden_def): Rename inner "i" to "j",
33650         to avoid shadowing an "i" declared hundreds of lines above.
33652 2019-12-19  Paul Eggert  <eggert@cs.ucla.edu>
33654         dfa: struct dfamust now uses flexible array
33655         * lib/dfa.c: Include flexmember.h.
33656         (dfamust, dfamustfree): Adjust to struct dfamust change.
33657         This saves a call to malloc+free.
33658         * lib/dfa.h (struct dfamust): Make the final member a
33659         flexible array member.
33660         * modules/dfa (Depends-on): Add flexmember.
33662         dfa: fast->small for array elements
33663         * lib/dfa.c (charclass_word): Use uint_least64_t not uint_fast64_t,
33664         since this type is used in arrays.  This change is more for
33665         documentation than for any practical effect, since the two types
33666         are the same on all known platforms.
33668 2019-12-19  Bruno Haible  <bruno@clisp.org>
33670         iconv tests: Test canonicalized, not system-dependent, encoding names.
33671         * tests/test-iconv.c (main): Revert part of the 2016-08-17 patch.
33672         * modules/iconv-tests (Depends-on): Add iconv_open.
33674 2019-12-18  Bruno Haible  <bruno@clisp.org>
33676         localename: Fix test failure on AIX 7.2.
33677         * m4/intl-thread-locale.m4 (gt_INTL_THREAD_LOCALE_NAME): Enable nameless
33678         locales on AIX.
33679         * lib/localename.c (gl_locale_name_thread_unsafe): Handle nameless
33680         locales on AIX.
33682 2019-12-18  Paul Eggert  <eggert@cs.ucla.edu>
33684         Improve port of AC_C_RESTRICT to Oracle C++
33685         Problem reported by Christian Biesinger in:
33686         https://lists.gnu.org/r/bug-gnulib/2019-12/msg00159.html
33687         * m4/gnulib-common.m4 (AC_C_RESTRICT): Port better to
33688         Oracle Developer Studio C++ 12.5 or later.
33690 2019-12-18  Bruno Haible  <bruno@clisp.org>
33692         wchar: Fix test failures on AIX and MSVC (regression from 2019-12-07).
33693         * lib/wchar.in.h (GNULIB_defined_mbstate_t): Do define on AIX and MSVC.
33695 2019-12-18  Bruno Haible  <bruno@clisp.org>
33697         localename: Ensure multithread-safety in future changes.
33698         * lib/localename.c (setlocale): Reference the system's setlocale().
33699         (get_locale_t_name): Invoke setlocale_null instead of setlocale.
33700         (gl_locale_name_posix): Likewise.
33701         * modules/localename (Depends-on): Add setlocale-null.
33703 2019-12-18  Bruno Haible  <bruno@clisp.org>
33705         setlocale-null: Make API more useful.
33706         * lib/locale.in.h (setlocale_null_r): Renamed from setlocale_null. All
33707         callers changed.
33708         (setlocale_null): New declaration.
33709         * lib/setlocale_null.c (setlocale_null_androidfix): New function,
33710         extracted from setlocale_null_unlocked.
33711         (setlocale_null_unlocked): Invoke it.
33712         (setlocale_null_r): Renamed from setlocale_null.
33713         (setlocale_null): New function, extracted from setlocale_mtsafe in
33714         setlocale.c.
33715         * lib/setlocale.c: Don't include <errno.h>.
33716         (setlocale_mtsafe): Invoke setlocale_null.
33717         * lib/setlocale-lock.c: Update comments.
33718         * doc/posix-functions/setlocale.texi: Mention both functions.
33720 2019-12-18  Bruno Haible  <bruno@clisp.org>
33722         localename: Optimize code for native Windows.
33723         * lib/localename.c (gl_locale_name_posix): Remove handling of LC_ALL
33724         category (not allowed here).
33726 2019-12-18  Bruno Haible  <bruno@clisp.org>
33728         setlocale: Make calls with NULL argument multithread-safe.
33729         * lib/setlocale.c: Include <errno.h>.
33730         (setlocale_mtsafe): New function.
33731         (setlocale_unixlike): Invoke setlocale_mtsafe instead of setlocale.
33732         (setlocale_improved): Renamed from rpl_setlocale.
33733         * m4/setlocale.m4 (gl_FUNC_SETLOCALE): Require gl_FUNC_SETLOCALE_NULL.
33734         Set and define NEED_SETLOCALE_IMPROVED and NEED_SETLOCALE_MTSAFE. Set
33735         LIB_SETLOCALE.
33736         * modules/setlocale (Depends-on): Add setlocale-null. Update conditions.
33737         (Link): New section.
33738         * tests/locale.c: Undefine setlocale.
33739         * tests/test-setlocale_null-one.c: Likewise.
33740         * tests/test-setlocale_null-all.c: Likewise.
33741         * modules/setlocale-tests (Makefile.am): Link the test programs with
33742         $(LIB_SETLOCALE).
33743         * modules/astrxfrm-tests (Makefile.am): Likewise.
33744         * modules/btowc-tests (Makefile.am): Likewise.
33745         * modules/c-ctype-tests (Makefile.am): Likewise.
33746         * modules/c-snprintf-tests (Makefile.am): Likewise.
33747         * modules/c-strcase-tests (Makefile.am): Likewise.
33748         * modules/c-vasprintf-tests (Makefile.am): Likewise.
33749         * modules/c-vsnprintf-tests (Makefile.am): Likewise.
33750         * modules/c-xvasprintf-tests (Makefile.am): Likewise.
33751         * modules/dfa-tests (Makefile.am): Likewise.
33752         * modules/duplocale-tests (Makefile.am): Likewise.
33753         * modules/hard-locale-tests (Makefile.am): Likewise.
33754         * modules/localcharset-tests (Makefile.am): Likewise.
33755         * modules/localename-tests (Makefile.am): Likewise.
33756         * modules/mbmemcasecmp-tests (Makefile.am): Likewise.
33757         * modules/mbmemcasecoll-tests (Makefile.am): Likewise.
33758         * modules/mbrtowc-tests (Makefile.am): Likewise.
33759         * modules/mbscasecmp-tests (Makefile.am): Likewise.
33760         * modules/mbscasestr-tests (Makefile.am): Likewise.
33761         * modules/mbschr-tests (Makefile.am): Likewise.
33762         * modules/mbscspn-tests (Makefile.am): Likewise.
33763         * modules/mbsinit-tests (Makefile.am): Likewise.
33764         * modules/mbsncasecmp-tests (Makefile.am): Likewise.
33765         * modules/mbsnrtowcs-tests (Makefile.am): Likewise.
33766         * modules/mbspbrk-tests (Makefile.am): Likewise.
33767         * modules/mbspcasecmp-tests (Makefile.am): Likewise.
33768         * modules/mbsrchr-tests (Makefile.am): Likewise.
33769         * modules/mbsrtowcs-tests (Makefile.am): Likewise.
33770         * modules/mbsspn-tests (Makefile.am): Likewise.
33771         * modules/mbsstr-tests (Makefile.am): Likewise.
33772         * modules/nl_langinfo-tests (Makefile.am): Likewise.
33773         * modules/quotearg-tests (Makefile.am): Likewise.
33774         * modules/regex-tests (Makefile.am): Likewise.
33775         * modules/strfmon_l-tests (Makefile.am): Likewise.
33776         * modules/strtod-tests (Makefile.am): Likewise.
33777         * modules/strtold-tests (Makefile.am): Likewise.
33778         * modules/unicase/locale-language-tests (Makefile.am): Likewise.
33779         * modules/unicase/ulc-casecmp-tests (Makefile.am): Likewise.
33780         * modules/unicase/ulc-casecoll-tests (Makefile.am): Likewise.
33781         * modules/unigbrk/ulc-grapheme-breaks-tests (Makefile.am): Likewise.
33782         * modules/unistdio/u8-vasnprintf-tests (Makefile.am): Likewise.
33783         * modules/unistdio/u16-vasnprintf-tests (Makefile.am): Likewise.
33784         * modules/unistdio/u32-vasnprintf-tests (Makefile.am): Likewise.
33785         * modules/unistdio/ulc-vasnprintf-tests (Makefile.am): Likewise.
33786         * modules/uniwbrk/ulc-wordbreaks-tests (Makefile.am): Likewise.
33787         * modules/vasnprintf-posix-tests (Makefile.am): Likewise.
33788         * modules/wcrtomb-tests (Makefile.am): Likewise.
33789         * modules/wcsnrtombs-tests (Makefile.am): Likewise.
33790         * modules/wcsrtombs-tests (Makefile.am): Likewise.
33791         * modules/wcwidth-tests (Makefile.am): Likewise.
33792         * doc/posix-functions/setlocale.texi: Mention that the multithread-
33793         safety fix is also available in module 'setlocale'.
33795 2019-12-18  Bruno Haible  <bruno@clisp.org>
33797         hard-locale: Make multithread-safe.
33798         * lib/hard-locale.h (hard_locale): Move documentation to here.
33799         * lib/hard-locale.c: Don't include <stdlib.h>.
33800         (GLIBC_VERSION): Remove macro.
33801         (hard_locale): Assume that all systems name the "C" and "POSIX" locales
33802         "C" or "POSIX". Invoke setlocale_null instead of setlocale.
33803         * modules/hard-locale (Depends-on): Remove strdup. Add setlocale-null.
33804         (configure.ac): Require gl_FUNC_SETLOCALE_NULL. Set LIB_HARD_LOCALE.
33805         (Link): New section.
33806         * modules/hard-locale-tests (Makefile.am): Link test-hard-locale against
33807         $(LIB_HARD_LOCALE).
33809 2019-12-18  Bruno Haible  <bruno@clisp.org>
33811         hard-locale: Avoid test failure on Haiku.
33812         * tests/test-hard-locale.c (test_one): Treat Haiku like recent OpenBSD.
33814 2019-12-18  Bruno Haible  <bruno@clisp.org>
33816         setlocale-null: Handle NULL result from setlocale.
33817         * lib/locale.in.h (setlocale_null): Document EINVAL return value.
33818         * lib/setlocale_null.c (setlocale_null_unlocked): Handle NULL result
33819         from setlocale or _wsetlocale.
33821 2019-12-18  Bruno Haible  <bruno@clisp.org>
33823         hard-locale: Add test.
33824         * tests/test-hard-locale.c: New file.
33825         * tests/locale.c: New file.
33826         * modules/hard-locale-tests: New file.
33828 2019-12-17  Paul Eggert  <eggert@cs.ucla.edu>
33830         dfa: do not match invalid UTF-8
33831         * lib/dfa.c (struct dfa): Grow utf8_anychar_classes member array
33832         from 5 to 9 tokens; this is needed due to the changes to
33833         add_utf8_anychar.
33834         (charclass_index): 2nd arg is now pointer-to-const.
33835         (add_utf8_anychar): Match only valid UTF-8 byte sequences
33836         instead of allowing overlong encodings or surrogate halves.
33838         dfa: simplify charclass by assuming C99
33839         * lib/dfa.c (CHARCLASS_WORD_BITS): Now always 64.
33840         (charclass_word): Now always uint_fast64_t.
33841         (CHARCLASS_PAIR): Remove.
33842         (CHARCLASS_INIT): Take 4 arguments instead of 8.  All uses changed.
33844         fts: tune via calloc
33845         * lib/fts.c (fts_open): Prefer calloc to malloc + memset.
33847         dfa: tune via xzalloc
33848         * lib/dfa.c (dfaoptimize): Prefer xzalloc to xmalloc + memset.
33850 2019-12-17  Bruno Haible  <bruno@clisp.org>
33852         localcharset: Fix multithread-safety bug on Windows and OS/2.
33853         * lib/localcharset.h (locale_charset): Clarify when the result becomes
33854         invalid.
33855         * lib/localcharset.c (locale_charset): Use a stack-allocated buffer to
33856         assemble the result.
33858 2019-12-17  Bruno Haible  <bruno@clisp.org>
33860         localcharset: Optimize code for native Windows.
33861         * lib/localcharset.c (locale_charset): Don't bother calling
33862         setlocale (LC_ALL, NULL) since we're not interested in its result.
33864 2019-12-17  Bruno Haible  <bruno@clisp.org>
33866         nl_langinfo: Fix multithread-safety bug on OpenBSD 3.8.
33867         * lib/nl_langinfo.c (ctype_codeset): Invoke setlocale_null instead of
33868         setlocale.
33869         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Require
33870         gl_FUNC_SETLOCALE_NULL. Set LIB_NL_LANGINFO.
33871         * modules/nl_langinfo (Depends-on): Add setlocale-null.
33873 2019-12-17  Bruno Haible  <bruno@clisp.org>
33875         nl_langinfo: Fix multithread-safety bug on mingw and MSVC.
33876         * lib/nl_langinfo.c (ctype_codeset, rpl_nl_langinfo): Use a
33877         stack-allocated buffer to assemble each result and different static
33878         buffers to return it.
33879         * tests/test-nl_langinfo-mt.c: New file.
33880         * modules/nl_langinfo-tests (Files): Add it.
33881         (Depends-on): Add thread, nanosleep.
33882         (Makefile.am): Build test-nl_langinfo-mt test.
33884 2019-12-17  Bruno Haible  <bruno@clisp.org>
33886         langinfo: Document more details.
33887         * doc/posix-headers/langinfo.texi: List platform details.
33888         * doc/posix-functions/nl_langinfo.texi: Likewise.
33890 2019-12-17  Bruno Haible  <bruno@clisp.org>
33892         mbsinit: Fix compilation error in mingw-w64 7.0 with _UCRT defined.
33893         Reported by Tom Kacvinsky <tom.kacvinsky@vector.com>
33894         and Martin Storsjö <martin@martin.st>
33895         in <https://savannah.gnu.org/bugs/?57406>.
33896         * lib/mbsinit.c: Accommodate an MSVC-like mbstate_t definition with
33897         mingw.
33899 2019-12-17  Bruno Haible  <bruno@clisp.org>
33901         glob: Avoid warning on mingw.
33902         Reported by Christian Biesinger <cbiesinger@google.com> in
33903         <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00122.html>.
33904         * lib/glob.c (__stat64): Undefine first.
33906 2019-12-17  Paul Eggert  <eggert@cs.ucla.edu>
33908         xalloc: tune xzalloc for fresh allocations
33909         * lib/xmalloc.c (xzalloc): Use xcalloc rather than xmalloc+memset,
33910         because when the memory is freshly allocated from the OS via sbrk
33911         or mmap, calloc can avoid doing the memset.
33913         dfa: new function dfacopysyntax
33914         * lib/dfa.c (struct dfa): Move syntax member later so
33915         that dfacopysyntax can easily clear earlier members.
33916         (dfacopysyntax): New function, used by Gawk.
33918 2019-12-16  Paul Eggert  <eggert@cs.ucla.edu>
33920         dfa: port _GL_ATTRIBUTE_MALLOC to Gawk
33921         Gawk does not use Gnulib, and does not define _GL_ATTRIBUTE_MALLOC.
33922         * lib/dfa.h (_GL_ATTRIBUTE_MALLOC): Define to empty
33923         if not already defined.
33925         dfa: remove one dependency on MB_CUR_MAX
33926         * lib/dfa.c (dfamust): No need to refer to MB_CUR_MAX here.
33928         dfa: remove struct lexer_state.cur_mb_len
33929         * lib/dfa.c (struct lexer_state): Remove cur_mb_len member,
33930         as it’s not needed and the code is simpler without it.
33931         All uses removed.
33933 2019-12-16  Bruno Haible  <bruno@clisp.org>
33935         setlocale-null: Remove need for -lpthread on musl libc, *BSD, Haiku.
33936         Reported by Arnold Robbins <arnold@skeeve.com>.
33937         * lib/setlocale_null.c (c11_threads_in_use, pthread_in_use): New macros,
33938         copied from lib/glthread/lock.h.
33939         (pthread_mutex_lock, pthread_mutex_unlock): Mark as weak.
33940         (setlocale_null_with_lock): If pthread_in_use() is false, use
33941         setlocale_null_unlocked directly.
33942         * m4/threadlib.m4 (gl_WEAK_SYMBOLS): New macro, extracted from
33943         gl_THREADLIB_BODY. Define HAVE_WEAK_SYMBOLS.
33944         (gl_THREADLIB_BODY): Invoke gl_WEAK_SYMBOLS.
33945         * m4/setlocale_null.m4 (gl_FUNC_SETLOCALE_NULL): Invoke gl_WEAK_SYMBOLS.
33946         Set LIB_SETLOCALE_NULL to empty if weak symbols are supported.
33947         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Add comment.
33949 2019-12-16  Paul Eggert  <eggert@cs.ucla.edu>
33951         dfa: make dfasyntax thread-safe
33952         Problem reported by Bruno Haible in:
33953         https://lists.gnu.org/r/bug-gnulib/2019-12/msg00099.html
33954         * lib/dfa.c: Do not include locale.h.
33955         (struct dfa): Remove simple_locale member.
33956         All uses replaced by localeinfo.simple.
33957         (using_simple_locale): Remove; now present (with some
33958         changes) in localeinfo.c.
33959         (dfasyntax): No need to initialize removed member.
33961         localeinfo: record whether locale is simple
33962         * lib/localeinfo.c (using_simple_locale): New function,
33963         copied here from lib/dfa.c but with a change: it uses
33964         strcoll for its heuristic, instead of using setlocale.
33965         This lets it be thread-safe.
33966         * lib/localeinfo.h (struct localeinfo): New member ‘simple’.
33968 2019-12-15  Bruno Haible  <bruno@clisp.org>
33970         duplocale: Fix multithread-safety bug on AIX.
33971         * lib/duplocale.c: Don't include <stdlib.h>.
33972         (rpl_duplocale): Invoke setlocale_null instead of setlocale.
33973         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Require gl_FUNC_SETLOCALE_NULL.
33974         Set LIB_DUPLOCALE.
33975         * modules/duplocale (Depends-on): Add setlocale-null.
33976         (Link): New section.
33977         * modules/duplocale-tests (Makefile.am): Link test-duplocale with
33978         $(LIB_DUPLOCALE).
33980 2019-12-15  Bruno Haible  <bruno@clisp.org>
33982         setlocale-null: Add tests.
33983         * tests/test-setlocale_null.c: New file.
33984         * tests/test-setlocale_null-one.c: New file.
33985         * tests/test-setlocale_null-all.c: New file.
33986         * modules/setlocale-null-tests: New file.
33988         setlocale-null: New module.
33989         * lib/locale.in.h (SETLOCALE_NULL_MAX, SETLOCALE_NULL_ALL_MAX,
33990         setlocale_null): New declarations.
33991         * lib/setlocale_null.c: New file.
33992         * lib/setlocale-lock.c: New file.
33993         * m4/threadlib.m4 (gl_PTHREADLIB_BODY): Define C macro HAVE_PTHREAD_API.
33994         * m4/setlocale_null.m4: New file.
33995         * m4/locale_h.m4 (gl_LOCALE_H_DEFAULTS): Initialize
33996         GNULIB_SETLOCALE_NULL.
33997         * modules/locale (Makefile.am): Substitute GNULIB_SETLOCALE_NULL.
33998         * modules/setlocale-null: New file.
33999         * doc/posix-functions/setlocale.texi: Mention the new module.
34001 2019-12-15  Bruno Haible  <bruno@clisp.org>
34003         lock tests: Skip test when no multithreading is enabled.
34004         * tests/test-rwlock1.c: Skip the test when no multithreading is enabled.
34006 2019-12-14  Bruno Haible  <bruno@clisp.org>
34008         locale, duplocale, localename: Fix last patch.
34009         Reported by Daniel Richard G. in
34010         <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00093.html>.
34011         * lib/locale.in.h (HAVE_WORKING_NEWLOCALE, HAVE_WORKING_DUPLOCALE):
34012         Don't define if locale_t does not exist.
34014 2019-12-13  Bruno Haible  <bruno@clisp.org>
34016         locale, duplocale, localename: Fix errors if locale_t does not exist.
34017         Reported by Daniel Richard G. in
34018         <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00078.html>.
34019         * lib/locale.in.h (HAVE_WORKING_NEWLOCALE, HAVE_WORKING_DUPLOCALE): New
34020         macros.
34021         * tests/test-locale.c: Test HAVE_WORKING_NEWLOCALE instead of
34022         HAVE_NEWLOCALE.
34023         * tests/test-localename.c: Likewise.
34024         * tests/test-duplocale.c: Test HAVE_WORKING_DUPLOCALE instead of
34025         HAVE_DUPLOCALE.
34026         * tests/test-locale-c++.cc: Likewise.
34028 2019-12-13  Bruno Haible  <bruno@clisp.org>
34030         wcstok: Fix test failure on HP-UX.
34031         * m4/wcstok.m4 (gl_FUNC_WCSTOK): Set REPLACE_WCSTOK to 1 on HP-UX.
34032         * doc/posix-functions/wcstok.texi: Mention the HP-UX bug.
34034 2019-12-12  Bruno Haible  <bruno@clisp.org>
34036         strtod, strtold tests: Avoid test failure on AIX 7.2.
34037         * tests/test-strtod1.c (main): Allow implementations in which ',' and
34038         '.' both are radix characters.
34039         * tests/test-strtold1.c (main): Likewise.
34041 2019-12-12  Paul Eggert  <eggert@cs.ucla.edu>
34043         dfa: prefer ptrdiff_t for API, too
34044         Also, use ‘idx_t’ for ptrdiff_t values that must be nonnegative,
34045         but do this only for internal use for now.
34046         * NEWS: Mention the API change.
34047         * lib/dfa.c (idx_t, IDX_MAX): New type and max value, for internal
34048         use for now.  Use them instead of ptrdiff_t and PTRDIFF_MAX for
34049         values known to be nonnegative.
34050         (dfaparse, dfaexec_mb, dfaexec_sb, dfaexec_noop, dfaexec):
34051         Prefer idx_t or ptrdiff_t to size_t for API.
34052         * lib/dfa.h (dfaparse, dfacomp, dfaexec):
34053         Prefer ptrdiff_t to size_t for API.
34055         stdalign: port to xlclang 16.01
34056         Problem reportd by Bruno Haible in:
34057         https://lists.gnu.org/r/bug-gnulib/2019-12/msg00064.html
34058         * lib/stdalign.in.h (_Alignas): Do not use __attribute__
34059         ((__aligned__ (...))) with xlclang, as a top-level
34060         ‘char __attribute__ ((__aligned__ (8))) c;’ does not work with
34061         xlclang version 16.01.0000.0001; the alignment directive is ignored.
34063 2019-12-12  Bruno Haible  <bruno@clisp.org>
34065         duplocale: Fix test failure on AIX 7.2 with xlclang.
34066         * lib/duplocale.c: Include <stdlib.h>.
34067         (rpl_duplocale): Use a heap-allocated copy of the first setlocale return
34068         value.
34070 2019-12-12  Bruno Haible  <bruno@clisp.org>
34072         stddef: Document the AIX xlc issue.
34073         * doc/posix-headers/stddef.texi: Document the NULL issue with AIX xlc.
34075 2019-12-12  Bruno Haible  <bruno@clisp.org>
34077         duplocale: Don't attempt to override if locale_t does not exist.
34078         Reported by Daniel Richard G. in
34079         <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00039.html>.
34080         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): If locale_t does not exist, set
34081         HAVE_DUPLOCALE to 0.
34083 2019-12-12  Bruno Haible  <bruno@clisp.org>
34085         wcwidth: Avoid test failure on AIX 7.2.
34086         * tests/test-wcwidth.c (main): Don't fail if wcwidth(0x200B) is
34087         negative.
34088         * doc/posix-functions/wcwidth.texi: Mention the AIX issue.
34090 2019-12-12  Bruno Haible  <bruno@clisp.org>
34092         ilogbl: Work around Cygwin bug.
34093         * m4/ilogbl.m4 (gl_FUNC_ILOGBL_WORKS): Test whether ilogbl(0.0L) is
34094         correct.
34095         * doc/posix-functions/ilogbl.texi: Mention the Cygwin bug.
34097 2019-12-12  Bruno Haible  <bruno@clisp.org>
34099         strtold: Work around Cygwin bug.
34100         * m4/strtold.m4 (gl_FUNC_STRTOLD): Add test for the underflow problem.
34101         If it is present, define STRTOLD_HAS_UNDERFLOW_BUG.
34102         * lib/strtod.c (HAVE_UNDERLYING_STRTOD): Set to 0 if
34103         STRTOLD_HAS_UNDERFLOW_BUG is defined.
34104         * doc/posix-functions/strtold.texi: Mention the Cygwin bug.
34106 2019-12-12  Bruno Haible  <bruno@clisp.org>
34108         strtold: Fix autoconf test.
34109         * m4/strtold.m4 (gl_FUNC_STRTOLD): Test strtold, not strtod.
34111 2019-12-11  Bruno Haible  <bruno@clisp.org>
34113         fsync tests: Skip test that is known to fail.
34114         * doc/posix-functions/fsync.texi: Update list of platforms.
34115         * tests/test-fsync.c (main): Skip test with read-only file descriptors
34116         that is known to fail on AIX and Cygwin.
34118 2019-12-11  Bruno Haible  <bruno@clisp.org>
34120         getaddrinfo: Fix calling convention in 32-bit mode on native Windows.
34121         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Test whether getaddrinfo has a
34122         non-POSIX signature. If so, set REPLACE_GETADDRINFO. Define
34123         HAVE_GETADDRINFO as a C macro.
34124         * lib/netdb.in.h (getaddrinfo, freeaddrinfo): If REPLACE_GETADDRINFO,
34125         declare as replacement functions.
34126         * lib/getaddrinfo.c (getaddrinfo, freeaddrinfo): If HAVE_GETADDRINFO,
34127         define as no-op overrides.
34128         * m4/netdb_h.m4 (gl_NETDB_H_DEFAULTS): Initialize REPLACE_GETADDRINFO.
34129         * modules/netdb (Makefile.am): Substitute REPLACE_GETADDRINFO.
34130         * modules/getaddrinfo (Depends-on, configure.ac): Test
34131         REPLACE_GETADDRINFO.
34132         * doc/posix-functions/getaddrinfo.texi: Mention calling convention
34133         problem.
34134         * doc/posix-functions/freeaddrinfo.texi: Mention header file and calling
34135         convention problems.
34137 2019-12-11  Paul Eggert  <eggert@cs.ucla.edu>
34139         dfa: prefer signed integers for internals
34140         Signed integers can be checked more easily for integer overflow.
34141         * lib/dfa.c (position, struct lexer_state, struct parser_state)
34142         (struct dfa, mbs_to_wchar, fetch_wc, parse_bracket_exp)
34143         (struct lexptr, lex, addtok_mb, add_utf8_anychar, atom)
34144         (nsubtoks, copytoks, closure, alloc_position_set, delete)
34145         (replace, state_index, epsclosure, charclass_context)
34146         (state_separate_contexts, merge_nfa_state, dfaoptimize)
34147         (dfaanalyze, build_state, dfaexec_main, dfa_supported)
34148         (maybe_disable_superset_dfa, dfassbuild, dfafree, enlist)
34149         (comsubs, inboth, allocmust):
34150         Prefer a signed to an unsigned integer when calculating indexes,
34151         unless the integer is part of the external API (a bigger deal,
34152         and to be done later).
34154         dfa: fix index overflow
34155         * lib/dfa.c (compare): Avoid integer overflow when analyzing
34156         very large regular expressions.
34158         dfa: update commentary for previous change
34159         * NEWS: Mention the change.
34160         * lib/dfa.c, lib/dfa.h (dfaparse, dfamust, dfacomp): Update comments.
34162 2019-12-11  Norihiro Tanaka  <noritnk@kcn.ne.jp>
34164         dfa: separate parse and compile phase
34165         ‘dfamust’ must be called after parsing and before tokens are
34166         reordered, but both are executed in the compilation phase.
34167         Token reordering was introduced in Gnulib commit
34168         2018-10-22T15:01:08Z!noritnk@kcn.ne.jp
34169         (5c7a0371823876cca7a1347fa09ca26bbbff0c98).
34170         * lib/dfa.c (dfaparse): Change it to global function.
34171         (dfacomp): If first argument is NULL, skip parse.
34172         * lib/dfa.h: (dfaparse): Add a prototype.
34174 2019-12-11  Bruno Haible  <bruno@clisp.org>
34176         unistd tests: Fix link error on MSVC.
34177         * modules/unistd-c++-tests (Makefile.am): Link test-unistd-c++ against
34178         $(LIB_GETLOGIN).
34180 2019-12-11  Bruno Haible  <bruno@clisp.org>
34182         doc: Document that ISO C or POSIX substitutes are supported in C++ mode.
34183         * doc/gnulib-intro.texi (Various Kinds of Modules): Document that ISO C
34184         and POSIX substitutes are supported in C++ mode.
34185         * NEWS: Likewise.
34187 2019-12-11  Bruno Haible  <bruno@clisp.org>
34189         stddef: Fix compilation error in C++ mode on MSVC.
34190         * lib/stddef.in.h (max_align_t): With MSVC in C++ mode, don't define it;
34191         instead, include <cstddef>.
34193 2019-12-11  Bruno Haible  <bruno@clisp.org>
34195         unistd: Fix compilation error in C++ mode on MSVC.
34196         * lib/unistd.in.h: Don't do include[_next] <unistd.h> if the platform
34197         does not have <unistd.h>.
34199 2019-12-11  Bruno Haible  <bruno@clisp.org>
34201         locale: Fix compilation error in C++ mode on MSVC.
34202         * m4/locale_h.m4 (gl_LOCALE_H): Don't set REPLACE_STRUCT_LCONV on MSVC.
34203         * lib/locale.in.h (int_p_cs_precedes, int_p_sign_posn,
34204         int_p_sep_by_space, int_n_cs_precedes, int_n_sign_posn,
34205         int_n_sep_by_space): Define as macros on MSVC.
34207 2019-12-11  Bruno Haible  <bruno@clisp.org>
34209         wchar: Fix compilation error in C++ mode on MSVC.
34210         * lib/wchar.in.h (mbstate_t): Don't override on MSVC.
34212 2019-12-11  Bruno Haible  <bruno@clisp.org>
34214         pthread-thread: Fix compilation error in C++ mode on MSVC.
34215         * lib/pthread.in.h (pthread_exit): Don't use _Noreturn in the
34216         _GL_CXXALIAS_RPL invocation.
34218 2019-12-08  Bruno Haible  <bruno@clisp.org>
34220         Fix compilation errors in C++ mode on Haiku.
34221         * lib/stdio.in.h (vdprintf): Disable _GL_CXXALIASWARN invocation on
34222         non-glibc systems.
34223         * lib/spawn.in.h (posix_spawnattr_getschedpolicy,
34224         posix_spawnattr_setschedpolicy, posix_spawnattr_getschedparam,
34225         posix_spawnattr_setschedparam): Likewise.
34226         * lib/stdlib.in.h (random, initstate_r, setstate_r): Use
34227         _GL_CXXALIAS_SYS_CAST instead of _GL_CXXALIAS_SYS.
34228         * lib/unistd.in.h (usleep): Likewise.
34230 2019-12-08  Bruno Haible  <bruno@clisp.org>
34232         Fix compilation errors in 32-bit C++ mode on HP-UX 11/ia64.
34233         * m4/largefile.m4 (gl_SET_LARGEFILE_SOURCE): New macro.
34234         * modules/fseeko (configure.ac-early): Require it instead of
34235         AC_FUNC_FSEEKO.
34236         * modules/ftello (configure.ac-early): Likewise.
34237         * modules/fflush (configure.ac-early): Likewise.
34239 2019-12-08  Bruno Haible  <bruno@clisp.org>
34241         Fix compilation error in C++ mode on HP-UX 11.
34242         * lib/unistd.in.h (getpagesize): Declare on HP-UX.
34243         * doc/glibc-functions/getpagesize.texi: Mention the HP-UX problem.
34245 2019-12-08  Bruno Haible  <bruno@clisp.org>
34247         Fix compilation errors on HP-UX 11/ia64.
34248         * lib/math.in.h (copysignf, fmaf, fma): Undefine before
34249         _GL_FUNCDECL_SYS.
34251 2019-12-08  Bruno Haible  <bruno@clisp.org>
34253         Fix compilation error in C++ mode on OpenBSD.
34254         * lib/signal.in.h (signal): Declare on OpenBSD.
34256 2019-12-08  Bruno Haible  <bruno@clisp.org>
34258         math tests: Don't fail if isfinite, isinf, isnan, signbit is a macro.
34259         * tests/test-math-c++.cc (isfinite, isinf, isnan, signbit): Use #warning
34260         instead of #error.
34262 2019-12-08  Bruno Haible  <bruno@clisp.org>
34264         Fix compilation errors in C++ mode on FreeBSD.
34265         * lib/pthread.in.h (pthread_exit): Remove _Noreturn from prototype.
34266         * tests/test-pthread-c++.cc (GNULIB_NAMESPACE::pthread_exit): Likewise.
34267         * lib/threads.in.h (thrd_exit): Likewise.
34268         * tests/test-threads-c++.cc (GNULIB_NAMESPACE::thrd_exit): Likewise.
34270 2019-12-08  Bruno Haible  <bruno@clisp.org>
34272         Fix compilation errors in C++ mode on macOS and FreeBSD.
34273         * lib/math.in.h (isfinite, isinf, isnan, signbit): In C++ mode on macOS
34274         or FreeBSD with clang, use the approach without C preprocessor macro.
34276 2019-12-07  Bruno Haible  <bruno@clisp.org>
34278         Fix compilation errors in C++ mode on AIX with xlclang++.
34279         Reported by Christian Biesinger <cbiesinger@google.com> in
34280         <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00009.html>.
34281         * lib/wchar.in.h (mbstate_t): Don't override on AIX.
34283 2019-12-07  Bruno Haible  <bruno@clisp.org>
34285         Document compilation error in C++ mode on NetBSD 8.0.
34286         * doc/posix-headers/monetary.texi: Mention the NetBSD bug.
34288 2019-12-07  Bruno Haible  <bruno@clisp.org>
34290         Fix compilation errors in C++ mode on Solaris 10.
34291         * m4/stdbool.m4 (AM_STDBOOL_H): Require AC_CANONICAL_HOST. Set STDBOOL_H
34292         to non-empty on Solaris with a non-GCC compiler.
34293         * doc/posix-headers/stdbool.texi: Mention the Solaris issue.
34295 2019-12-07  Bruno Haible  <bruno@clisp.org>
34297         Reword NEWS entry.
34298         * NEWS: Reword the latest NEWS entry.
34300 2019-12-05  Pino Toscano  <ptoscano@redhat.com>
34302         Move xstrtol_fatal to a new xstrtol-error module.
34303         * lib/xstrtol.h: Stop including <getopt.h>.
34304         (xstrtol_fatal): Move ...
34305         * lib/xstrtol-error.h: ... here.  New file.
34306         * lib/xstrtol-error.c: Include xstrtol-error.h instead of xstrtol.h.
34307         * tests/test-xstrtol.c: Likewise.
34308         * modules/xstrtol (Files): Remove lib/xstrtol-error.c.
34309         (Depends-on): Remove exitfail, error, getopt-gnu, and gettext-h.
34310         (Makefile.am): Remove xstrtol-error.c from lib_SOURCES.
34311         * modules/xstrtol-error: New file.
34312         * modules/xstrtol-tests (Depends-on): Add xstrtol-error.
34313         * MODULES.html.sh: Add xstrtol-error.
34314         * NEWS: Document the change.
34316 2019-12-06  Paul Eggert  <eggert@cs.ucla.edu>
34318         nstrftime: better width support for %N, %z
34319         * lib/nstrftime.c (width_add, width_add1, width_cpy):
34320         New macros, which generalize ‘add’, ‘add1’, ‘cpy’ by adding
34321         a new WIDTH parameter.
34322         (add, add1, cpy): Use these macros.
34323         (width_add): Do not treat digits == 0 as a special case,
34324         do not pad if padding is ‘-’, and do not use a negative width.
34325         (__strftime_internal): Redo formatting of nanoseconds and numeric
34326         timezones to avoid buffer misuse in unusual cases, and so that
34327         widths make more sense.  Add support for widths greater than 9 to
34328         the %N format; they are zero filled on the right.
34329         * tests/test-nstrftime.c (posixtm_test): Add a %12N test.
34331 2019-12-05  Bruno Haible  <bruno@clisp.org>
34333         Fix compilation errors in C++ mode on Solaris 10 and Solaris 11.
34334         * m4/isfinite.m4 (gl_ISFINITE): Require AC_CANONICAL_HOST. On Solaris,
34335         set REPLACE_ISFINITE to 1.
34336         * m4/isinf.m4 (gl_ISINF): Require AC_CANONICAL_HOST. On Solaris, set
34337         REPLACE_ISINF to 1.
34338         * m4/signbit.m4 (gl_SIGNBIT): On Solaris, set REPLACE_SIGNBIT to 1.
34339         * lib/pthread.in.h (pthread_create, pthread_once, pthread_key_create):
34340         Use _GL_CXXALIAS_SYS_CAST instead of _GL_CXXALIAS_SYS.
34341         * lib/threads.in.h (call_once): Likewise.
34342         * lib/iconv.in.h (iconv): Likewise.
34344 2019-12-05  Bruno Haible  <bruno@clisp.org>
34346         wchar: Add more C++ tests.
34347         Reported by Christian Biesinger <cbiesinger@google.com> in
34348         <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00009.html>.
34349         * tests/test-wchar-c++3.cc: New file.
34350         * modules/wchar-c++-tests (Files): Add it.
34351         (Makefile.am): Compile it.
34353 2019-12-05  Bruno Haible  <bruno@clisp.org>
34355         Add more C++ tests.
34357         assert-h: Add C++ tests.
34358         * tests/test-assert-h-c++.cc: New file.
34359         * tests/test-assert-h-c++2.cc: New file.
34360         * modules/assert-h-c++-tests: New file.
34361         * modules/assert-h-tests: New file.
34363         ctype: Add C++ tests.
34364         * tests/test-ctype-c++.cc: New file.
34365         * tests/test-ctype-c++2.cc: New file.
34366         * modules/ctype-c++-tests: New file.
34367         * modules/ctype-tests (Depends-on): Add ctype-c++-tests.
34369         errno: Add C++ tests.
34370         * tests/test-errno-c++.cc: New file.
34371         * tests/test-errno-c++2.cc: New file.
34372         * modules/errno-c++-tests: New file.
34373         * modules/errno-tests (Depends-on): Add errno-c++-tests.
34375         float: Add C++ tests.
34376         * tests/test-float-c++.cc: New file.
34377         * tests/test-float-c++2.cc: New file.
34378         * modules/float-c++-tests: New file.
34379         * modules/float-tests (Depends-on): Add float-c++-tests.
34381         inttypes: Add more C++ tests.
34382         * tests/test-inttypes-c++2.cc: New file.
34383         * modules/inttypes-c++-tests (Files): Add it.
34384         (Makefile.am): Compile it.
34386         limits-h: Add C++ tests.
34387         * tests/test-limits-h-c++.cc: New file.
34388         * tests/test-limits-h-c++2.cc: New file.
34389         * modules/limits-h-c++-tests: New file.
34390         * modules/limits-h-tests (Depends-on): Add limits-h-c++-tests.
34392         stdarg: Add C++ tests.
34393         * tests/test-stdarg-c++.cc: New file.
34394         * tests/test-stdarg-c++2.cc: New file.
34395         * modules/stdarg-c++-tests: New file.
34396         * modules/stdarg-tests: New file.
34398         stdbool: Add C++ tests.
34399         * tests/test-stdbool-c++.cc: New file.
34400         * tests/test-stdbool-c++2.cc: New file.
34401         * modules/stdbool-c++-tests: New file.
34402         * modules/stdbool-tests (Depends-on): Add stdbool-c++-tests.
34404         stddef: Add C++ tests.
34405         * tests/test-stddef-c++.cc: New file.
34406         * tests/test-stddef-c++2.cc: New file.
34407         * modules/stddef-c++-tests: New file.
34408         * modules/stddef-tests (Depends-on): Add stddef-c++-tests.
34410         stdint: Add C++ tests.
34411         * tests/test-stdint-c++.cc: New file.
34412         * tests/test-stdint-c++2.cc: New file.
34413         * modules/stdint-c++-tests: New file.
34414         * modules/stdint-tests (Depends-on): Add stdint-c++-tests.
34416         wchar: Add more C++ tests.
34417         * tests/test-wchar-c++2.cc: New file.
34418         * modules/wchar-c++-tests (Files): Add it.
34419         (Makefile.am): Compile it.
34421         wctype-h: Add more C++ tests.
34422         * tests/test-wctype-h-c++2.cc: New file.
34423         * modules/wctype-h-c++-tests (Files): Add it.
34424         (Makefile.am): Compile it.
34426 2019-12-04  Bruno Haible  <bruno@clisp.org>
34428         Fix compilation errors in C++ mode with xlclang++ on AIX.
34429         * lib/math.in.h (expm1l, fmal, remainderl, roundl): Don't redeclare in
34430         C++ mode on AIX.
34431         (isfinite, signbit): In C++ mode on AIX with clang, use the approach
34432         without C preprocessor macro.
34433         * lib/pthread.in.h (pthread_exit): Use _GL_CXXALIAS_SYS_CAST instead of
34434         _GL_CXXALIAS_SYS.
34435         * lib/threads.in.h (thrd_exit): Likewise.
34437 2019-12-04  Bruno Haible  <bruno@clisp.org>
34439         Fix compilation error in C++ mode on Solaris 11 OpenIndiana.
34440         * lib/wchar.in.h (wcsnrtombs): Force declaration in C++ mode on Solaris.
34441         * doc/posix-functions/wcsnrtombs.texi: Mention the issue.
34443 2019-12-04  Bruno Haible  <bruno@clisp.org>
34445         Disable more _GL_CXXALIASWARN on all platforms other than glibc systems.
34446         * lib/wchar.in.h (wcsnrtombs, wcwidth, wcswidth): Disable
34447         _GL_CXXALIASWARN invocation on non-glibc systems.
34448         * lib/wctype.in.h (iswalnum, iswalpha, iswcntrl, iswdigit, iswgraph,
34449         iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit, wctype,
34450         iswctype, towlower, towupper): Likewise.
34452 2019-12-03  Bruno Haible  <bruno@clisp.org>
34454         Avoid hassles caused by [[noreturn]] in C++.
34455         Reported by Christian Biesinger <cbiesinger@google.com> in
34456         <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00010.html>.
34457         * m4/gnulib-common.m4 (gl_COMMON_BODY): Disable the use of [[noreturn]].
34458         * lib/_Noreturn.h: Likewise.
34460 2019-12-02  Bruno Haible  <bruno@clisp.org>
34462         Fix mistakes in --enable-threads=isoc fixes from 2019-12-01.
34463         * m4/pthread-mutex.m4 (gl_PTHREAD_MUTEX): Use LIBPMULTITHREAD, not
34464         LIBMULTITHREAD.
34465         * m4/pthread-rwlock.m4 (gl_PTHREAD_RWLOCK): Likewise.
34466         * m4/pthread-thread.m4 (gl_PTHREAD_THREAD): Likewise.
34467         * m4/timer_time.m4 (gl_TIMER_TIME): Likewise. Require gl_PTHREADLIB, not
34468         gl_THREADLIB.
34469         * modules/timer-time (Depends-on): Add pthread-h. Remove threadlib.
34471 2019-12-02  Bruno Haible  <bruno@clisp.org>
34473         Fix some more link errors with --enable-threads=isoc.
34474         * modules/pthread-mutex (Depends-on): Test $gl_threads_api differently.
34475         * modules/pthread-rwlock (Depends-on): Likewise.
34477 2019-12-02  Bruno Haible  <bruno@clisp.org>
34479         Fix link errors with --enable-threads=posix on AIX.
34480         * modules/string-c++-tests (Makefile.am): Link the test-string-c++
34481         program with $(LIBTHREAD).
34482         * modules/wchar-c++-tests (Makefile.am): Link the test-wchar-c++
34483         program with $(LIBTHREAD).
34485 2019-12-02  Bruno Haible  <bruno@clisp.org>
34487         Fix link errors with --enable-threads=posix on AIX.
34488         * modules/mbrtowc (Link): New section.
34489         * modules/acl (Link): Likewise.
34490         * modules/argmatch (Link): Likewise.
34491         * modules/backup-rename (Link): Likewise.
34492         * modules/backupfile (Link): Likewise.
34493         * modules/closein (Link): Likewise.
34494         * modules/closeout (Link): Likewise.
34495         * modules/copy-file (Link): Likewise.
34496         * modules/csharpcomp (Link): Likewise.
34497         * modules/csharpexec (Link): Likewise.
34498         * modules/dfa (Link): Likewise.
34499         * modules/exclude (Link): Likewise.
34500         * modules/fnmatch (Link): Likewise.
34501         * modules/fnmatch-gnu (Link): Likewise.
34502         * modules/fnmatch-posix (Link): Likewise.
34503         * modules/glob (Link): Likewise.
34504         * modules/human (Link): Likewise.
34505         * modules/javacomp (Link): Likewise.
34506         * modules/javaexec (Link): Likewise.
34507         * modules/javaversion (Link): Likewise.
34508         * modules/mbfile (Link): Likewise.
34509         * modules/mbiter (Link): Likewise.
34510         * modules/mbmemcasecmp (Link): Likewise.
34511         * modules/mbmemcasecoll (Link): Likewise.
34512         * modules/mbrlen (Link): Likewise.
34513         * modules/mbscasecmp (Link): Likewise.
34514         * modules/mbscasestr (Link): Likewise.
34515         * modules/mbschr (Link): Likewise.
34516         * modules/mbscspn (Link): Likewise.
34517         * modules/mbsinit (Link): Likewise.
34518         * modules/mbslen (Link): Likewise.
34519         * modules/mbsncasecmp (Link): Likewise.
34520         * modules/mbsnlen (Link): Likewise.
34521         * modules/mbsnrtowcs (Link): Likewise.
34522         * modules/mbspbrk (Link): Likewise.
34523         * modules/mbspcasecmp (Link): Likewise.
34524         * modules/mbsrchr (Link): Likewise.
34525         * modules/mbsrtowcs (Link): Likewise.
34526         * modules/mbssep (Link): Likewise.
34527         * modules/mbsspn (Link): Likewise.
34528         * modules/mbsstr (Link): Likewise.
34529         * modules/mbstok_r (Link): Likewise.
34530         * modules/mbswidth (Link): Likewise.
34531         * modules/mbuiter (Link): Likewise.
34532         * modules/mkdir-p (Link): Likewise.
34533         * modules/propername (Link): Likewise.
34534         * modules/quote (Link): Likewise.
34535         * modules/quotearg (Link): Likewise.
34536         * modules/quotearg-simple (Link): Likewise.
34537         * modules/regex-quote (Link): Likewise.
34538         * modules/rpmatch (Link): Likewise.
34539         * modules/sh-quote (Link): Likewise.
34540         * modules/system-quote (Link): Likewise.
34541         * modules/trim (Link): Likewise.
34542         * modules/unistdio/ulc-asnprintf (Link): Likewise.
34543         * modules/unistdio/ulc-fprintf (Link): Likewise.
34544         * modules/unistdio/ulc-vasnprintf (Link): Likewise.
34545         * modules/unistdio/ulc-vasprintf (Link): Likewise.
34546         * modules/unistdio/ulc-vfprintf (Link): Likewise.
34547         * modules/unistdio/ulc-vsnprintf (Link): Likewise.
34548         * modules/unistdio/ulc-vsprintf (Link): Likewise.
34549         * modules/xfreopen (Link): Likewise.
34550         * modules/xmemcoll (Link): Likewise.
34551         * modules/yesno (Link): Likewise.
34552         * modules/acl-tests (Makefile.am): Link the programs with $(LIBTHREAD).
34553         * modules/argmatch-tests (Makefile.am): Likewise.
34554         * modules/closein-tests (Makefile.am): Likewise.
34555         * modules/copy-file-tests (Makefile.am): Likewise.
34556         * modules/dfa-tests (Makefile.am): Likewise.
34557         * modules/fnmatch-tests (Makefile.am): Likewise.
34558         * modules/glob-tests (Makefile.am): Likewise.
34559         * modules/mbmemcasecmp-tests (Makefile.am): Likewise.
34560         * modules/mbmemcasecoll-tests (Makefile.am): Likewise.
34561         * modules/mbrtowc-tests (Makefile.am): Likewise.
34562         * modules/mbscasecmp-tests (Makefile.am): Likewise.
34563         * modules/mbscasestr-tests (Makefile.am): Likewise.
34564         * modules/mbschr-tests (Makefile.am): Likewise.
34565         * modules/mbscspn-tests (Makefile.am): Likewise.
34566         * modules/mbsinit-tests (Makefile.am): Likewise.
34567         * modules/mbsncasecmp-tests (Makefile.am): Likewise.
34568         * modules/mbsnrtowcs-tests (Makefile.am): Likewise.
34569         * modules/mbspbrk-tests (Makefile.am): Likewise.
34570         * modules/mbspcasecmp-tests (Makefile.am): Likewise.
34571         * modules/mbsrchr-tests (Makefile.am): Likewise.
34572         * modules/mbsrtowcs-tests (Makefile.am): Likewise.
34573         * modules/mbsspn-tests (Makefile.am): Likewise.
34574         * modules/mbsstr-tests (Makefile.am): Likewise.
34575         * modules/quotearg-tests (Makefile.am): Likewise.
34576         * modules/quotearg-simple-tests (Makefile.am): Likewise.
34577         * modules/readtokens-tests (Makefile.am): Likewise.
34578         * modules/regex-quote-tests (Makefile.am): Likewise.
34579         * modules/sh-quote-tests (Makefile.am): Likewise.
34580         * modules/system-quote-tests (Makefile.am): Likewise.
34581         * modules/unistdio/ulc-asnprintf-tests (Makefile.am): Likewise.
34582         * modules/unistdio/ulc-vasnprintf-tests (Makefile.am): Likewise.
34583         * modules/unistdio/ulc-vasprintf-tests (Makefile.am): Likewise.
34584         * modules/unistdio/ulc-vsnprintf-tests (Makefile.am): Likewise.
34585         * modules/unistdio/ulc-vsprintf-tests (Makefile.am): Likewise.
34586         * modules/yesno-tests (Makefile.am): Likewise.
34588 2019-12-02  Bruno Haible  <bruno@clisp.org>
34590         Simplify link sections.
34591         * modules/threadlib (Link): Stop mentioning LTLIBTHREAD.
34592         * modules/lock (Link): Likewise.
34593         * modules/cond (Link): Likewise.
34594         * modules/tls (Link): Likewise.
34595         * modules/yield (Link): Likewise.
34596         * modules/regex (Link): Likewise.
34597         * modules/localename (Link): Likewise.
34598         * modules/unicase/locale-language (Link): Likewise.
34599         * modules/thread (Link): Stop mentioning LTLIBMULTITHREAD.
34601 2019-12-02  Bruno Haible  <bruno@clisp.org>
34603         thread tests: Avoid link error with --enable-threads=isoc+posix on AIX.
34604         * tests/test-thread_self.c (main): Disable test on AIX.
34606 2019-12-01  Bruno Haible  <bruno@clisp.org>
34608         pthread-h: Fix link errors with --enable-threads=isoc on AIX.
34609         * m4/threadlib.m4 (gl_ANYTHREADLIB_EARLY): New macro, extracted from
34610         gl_THREADLIB_EARLY_BODY.
34611         (gl_THREADLIB_EARLY_BODY): Invoke it.
34612         (gl_PTHREADLIB_BODY): New macro, extracted from gl_THREADLIB_BODY.
34613         (gl_THREADLIB_BODY): Invoke it.
34614         (gl_PTHREADLIB): New macro.
34615         * m4/pthread_h.m4 (gl_PTHREAD_H): Require gl_PTHREADLIB. Require
34616         gl_THREADLIB and test $gl_threads_api only if module 'threadlib' is
34617         present. Define LIB_PTHREAD using LIBPMULTITHREAD, not LIBMULTITHREAD.
34618         * modules/pthread-h (Files): Add threadlib.m4.
34619         (Depends-on): Remove threadlib.
34620         (configure.ac-early): Invoke gl_ANYTHREADLIB_EARLY. Don't set _REENTRANT
34621         and _THREAD_SAFE here.
34622         (Link): Use LIBPTHREAD, not LIBTHREAD.
34623         * modules/pthread-thread (Link): Use LIBPMULTITHREAD, not
34624         LIBMULTITHREAD.
34625         * modules/pthread-once (Link): Likewise.
34626         * modules/pthread-mutex (Link): Likewise.
34627         * modules/pthread-rwlock (Link): Likewise.
34628         * modules/pthread-cond (Link): Likewise.
34629         * modules/pthread-tss (Link): Likewise.
34630         * modules/pthread-spin (Link): Likewise.
34631         * modules/pthread (Link): Likewise.
34632         * modules/pthread-h-c++-tests (test_pthread_c___LDADD): Likewise.
34633         * modules/pthread-thread-tests (test_pthread_thread_LDADD): Likewise.
34634         * modules/pthread-once-tests (test_pthread_once1_LDADD,
34635         test_pthread_once2_LDADD): Likewise.
34636         * modules/pthread-mutex-tests (test_pthread_mutex_LDADD): Likewise.
34637         * modules/pthread-rwlock-tests (test_pthread_rwlock_LDADD): Likewise.
34638         * modules/pthread-cond-tests (test_pthread_cond_LDADD): Likewise.
34639         * modules/pthread-tss-tests (test_pthread_tss_LDADD): Likewise.
34641 2019-12-01  Bruno Haible  <bruno@clisp.org>
34643         cond: State linking requirements.
34644         * modules/cond (Link): New section.
34646 2019-12-01  Bruno Haible  <bruno@clisp.org>
34648         threadlib: Remove unnecessary file (left over from 2019-07-06).
34649         * modules/threadlib (Files): Remove config.rpath.
34651 2019-11-29  Tim Rühsen  <tim.ruehsen@gmx.de>
34653         gnulib-tool.py: Fix libgnu_la_LDFLAGS section in generated Makefile.am.
34654         Reported by Dagobert Michelsen <dam@opencsw.org> in
34655         <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00086.html>.
34656         * pygnulib/GLModuleSystem.py (getLink): Don't join the parts. Return a
34657         list of strings instead of one string.
34658         * pygnulib/GLEmiter.py (lib_Makefile_am): Adapt accordingly.
34659         * pygnulib/GLImport.py (execute): Likewise.
34661 2019-11-27  Bruno Haible  <bruno@clisp.org>
34663         openpty, forkpty: Fix build error on Solaris 11.4.
34664         * m4/pty_h.m4 (gl_PTY_H): Test for termios.h. Look for the declarations
34665         also in <termios.h>.
34666         * m4/pty.m4 (gl_FUNC_FORKPTY, gl_FUNC_OPENPTY): Look for the declaration
34667         of the function also in <termios.h>.
34668         * doc/glibc-functions/openpty.texi: Mention the Solaris 11.4 problems.
34669         * doc/glibc-functions/forkpty.texi: Likewise.
34671 2019-11-27  Bruno Haible  <bruno@clisp.org>
34673         New options --enable-threads=isoc and --enable-threads=isoc+posix.
34674         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Accept the options
34675         --enable-threads=isoc and --enable-threads=isoc+posix.
34676         (gl_THREADLIB_BODY): Test whether the ISO C threads API is available.
34677         When both the ISO C and the POSIX threads API are available, choose
34678         USE_ISOC_AND_POSIX_THREADS instead of USE_POSIX_THREADS if
34679         --enable-threads=isoc+posix was specified. When only the ISO C threads
34680         API is available and --enable-threads=iso was specified, choose
34681         USE_ISOC_THREADS.
34682         * lib/glthread/lock.h: Add new code for USE_ISOC_THREADS ||
34683         USE_ISOC_AND_POSIX_THREADS.
34684         * lib/glthread/lock.c: Likewise.
34685         * lib/glthread/cond.h: Likewise.
34686         * lib/glthread/cond.c: Likewise.
34687         * lib/glthread/tls.h: Likewise.
34688         * lib/glthread/tls.c: Likewise.
34689         * lib/glthread/yield.h: Likewise.
34690         * lib/glthread/thread.h: Add new code for USE_ISOC_THREADS. Treat
34691         USE_ISOC_AND_POSIX_THREADS like USE_POSIX_THREADS.
34692         * lib/glthread/thread.c: Likewise.
34693         * lib/glthread/threadlib.c: Likewise.
34694         * tests/test-lock.c: Save and restore the values of USE_ISOC_THREADS and
34695         USE_ISOC_AND_POSIX_THREADS.
34696         * tests/test-cond.c: Consider USE_ISOC_THREADS and
34697         USE_ISOC_AND_POSIX_THREADS.
34698         * tests/test-tls.c: Likewise.
34699         * tests/test-thread_create.c (main): Likewise.
34700         * tests/test-pthread-cond.c: Likewise.
34701         * tests/test-pthread-mutex.c: Likewise.
34702         * tests/test-pthread-once2.c: Likewise.
34703         * tests/test-pthread-rwlock.c: Likewise.
34704         * tests/test-pthread-tss.c: Likewise.
34705         * tests/test-pthread_sigmask2.c: Treat USE_ISOC_AND_POSIX_THREADS like
34706         USE_POSIX_THREADS.
34708 2019-11-24  Bruno Haible  <bruno@clisp.org>
34710         mbrtowc: Modernize autoconf test.
34711         * m4/mbrtowc.m4 (gl_MBRTOWC_INCOMPLETE_STATE): Require
34712         gt_LOCALE_FR_UTF8. If a traditional Japanese locale is not available,
34713         try a UTF-8 locale.
34714         * doc/posix-functions/mbrtowc.texi: Update info about AIX.
34716 2019-11-24  Bruno Haible  <bruno@clisp.org>
34718         Fix errors in C++ mode on mingw.
34719         * lib/arpa_inet.in.h (inet_ntop, inet_pton): Use _GL_CXXALIAS_SYS_CAST
34720         instead of _GL_CXXALIAS_SYS.
34721         * lib/signal.in.h (pthread_sigmask): Likewise.
34722         * lib/spawn.in.h (posix_spawn_file_actions_addopen,
34723         posix_spawn_file_actions_addclose, posix_spawn_file_actions_adddup2):
34724         Likewise.
34725         * lib/wchar.in.h (btowc): Likewise.
34727 2019-11-24  Bruno Haible  <bruno@clisp.org>
34729         sys_time: Fix errors in C++ mode on mingw.
34730         * lib/sys_time.in.h (timeval): Restore the redirection
34731         '#define timeval rpl_timeval', for when the symbol timeval is being used
34732         outside the 'gnulib' namespace.
34733         * lib/sys_select.in.h (select): In C++, write 'timeval', not
34734         'struct timeval'.
34736 2019-11-24  Bruno Haible  <bruno@clisp.org>
34738         iswctype: Fix errors in C++ mode on mingw.
34739         * lib/wctype.in.h (rpl_iswctype): Override if GNULIB_OVERRIDES_WINT_T
34740         is 1.
34741         * lib/iswctype.c (iswctype): Add another implementation, for the
34742         GNULIB_defined_wint_t case.
34743         * modules/iswctype (configure.ac): Compile iswctype.c also if
34744         GNULIB_OVERRIDES_WINT_T is 1.
34746 2019-11-24  Bruno Haible  <bruno@clisp.org>
34748         windows-timedmutex: Fix errors in C++ mode on mingw.
34749         * lib/windows-timedmutex.h: Add closing brace.
34751 2019-11-24  Bruno Haible  <bruno@clisp.org>
34753         Fix errors in C++ mode on Cygwin.
34754         * lib/sys_wait.in.h (waitpid): Use _GL_CXXALIAS_SYS_CAST instead of
34755         _GL_CXXALIAS_SYS.
34757 2019-11-24  Bruno Haible  <bruno@clisp.org>
34759         time_r: Fix for mingw (regression from 2019-11-16).
34760         * m4/time_r.m4 (gl_TIME_R): Revert to using AC_CHECK_FUNCS_ONCE. Use the
34761         AC_LINK_IFELSE test only if the function does not appear to exist.
34763 2019-11-24  Bruno Haible  <bruno@clisp.org>
34765         wcstok: Add tests.
34766         * tests/test-wcstok.c: New file.
34767         * modules/wcstok-tests: New file.
34769 2019-11-24  Bruno Haible  <bruno@clisp.org>
34771         wcstok: Work around wrong signature on native Windows.
34772         * lib/wchar.in.h (wcstok): Override when REPLACE_WCSTOK is 1.
34773         * m4/wcstok.m4 (gl_FUNC_WCSTOK): Check for signature of wcstok. Set
34774         REPLACE_WCSTOK.
34775         * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCSTOK.
34776         * modules/wchar (Makefile.am): Substitute REPLACE_WCSTOK.
34777         * modules/wcstok (Depends-on, configure.ac): Consider REPLACE_WCSTOK.
34778         * doc/posix-functions/wcstok.texi: Mention the problem.
34780 2019-11-22  Paul Eggert  <eggert@cs.ucla.edu>
34782         intprops: INT_MULTIPLY_WRAPV speedup for GCC 8.4+
34783         * lib/intprops.h (INT_MULTIPLY_WRAPV): If GCC 8.x where 4 <= x,
34784         remove workaround for GCC bug 91450 as the bug should be fixed
34785         there too.
34787 2019-11-21  Bruno Haible  <bruno@clisp.org>
34789         Disable many _GL_CXXALIASWARN on all platforms other than glibc systems.
34790         Reported by Christian Biesinger <cbiesinger@google.com> in
34791         <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00066.html>.
34792         * lib/fnmatch.in.h (fnmatch): Disable _GL_CXXALIASWARN invocation on
34793         non-glibc systems.
34794         * lib/locale.in.h (localeconv, setlocale): Likewise.
34795         * lib/math.in.h (cbrt, ceil, copysign, exp2, expm1, floor, fma, fmod,
34796         frexp, hypot, ilogb, log, log10, log1p, log2, logb, modf, remainder,
34797         rint, round, trunc): Likewise.
34798         * lib/monetary.in.h (strfmon_l): Likewise.
34799         * lib/pthread.in.h (pthread_mutexattr_getrobust,
34800         pthread_mutexattr_setrobust, pthread_mutex_lock, pthread_spin_init,
34801         pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock,
34802         pthread_spin_destroy): Likewise.
34803         * lib/signal.in.h (raise, signal): Likewise.
34804         * lib/stdio.in.h (fclose, fflush, fgetc, fgets, fopen, fprintf, fputc,
34805         fputs, fread, freopen, fscanf, fseek, ftell, fwrite, getc, getchar,
34806         perror, printf, putc, putchar, puts, remove, rename, scanf, sprintf,
34807         tmpfile, vfprintf, vprintf, vsprintf): Likewise.
34808         * lib/stdlib.in.h (calloc, malloc, mbtowc, realloc, strtod, wctomb):
34809         Likewise.
34810         * lib/string.in.h (memchr, strncat, strpbrk, strstr, strerror):
34811         Likewise.
34812         * lib/time.in.h (mktime, localtime, ctime, strftime): Likewise.
34813         * lib/wchar.in.h (btowc, wctob, mbsinit, mbrtowc, mbrlen, mbsrtowcs,
34814         wcrtomb, wcsrtombs, wmemchr, wmemcmp, wmemcpy, wmemmove, wmemset,
34815         wcslen, wcscpy, wcsncpy, wcscat, wcsncat, wcscmp, wcsncmp, wcscoll,
34816         wcsxfrm, wcschr, wcsrchr, wcscspn, wcsspn, wcspbrk, wcsstr, wcstok,
34817         wcsftime): Likewise.
34818         * lib/wctype.in.h (iswblank, wctrans, towctrans): Likewise.
34820 2019-11-21  Bruno Haible  <bruno@clisp.org>
34822         Fix various errors in _GL_CXXALIAS_SYS invocations.
34823         * lib/locale.in.h (freelocale): Use _GL_CXXALIAS_SYS_CAST instead of
34824         _GL_CXXALIAS_SYS.
34825         * lib/pthread.in.h (pthread_mutexattr_gettype,
34826         pthread_mutexattr_getrobust): Likewise.
34827         * lib/stdlib.in.h (srandom, initstate, setstate): Likewise.
34828         * lib/sys_socket.in.h (recv, send): Likewise.
34829         * lib/unistd.in.h (getdtablesize): Likewise.
34830         * lib/sys_select.in.h (select): In C++, write 'timeval' instead of
34831         'struct timeval'.
34833 2019-11-21  Bruno Haible  <bruno@clisp.org>
34835         math tests: Update after 2019-08-28 change.
34836         * tests/test-math-c++.cc (isfinite, isinf, isnan, signbit): Expect a
34837         return type of 'bool', not 'int'.
34839 2019-11-21  Bruno Haible  <bruno@clisp.org>
34841         pthread-spin: Fix errors in C++ mode.
34842         * m4/pthread-spin.m4 (gl_PTHREAD_SPIN): Mark the pthread_spin_*
34843         functions as nonexistent when <pthread.h> exists but does not define
34844         the pthread_spinlock_t type.
34846 2019-11-21  Bruno Haible  <bruno@clisp.org>
34848         pthread-mutex: Fix errors in C++ mode.
34849         * m4/pthread-mutex.m4 (gl_PTHREAD_MUTEX): Test whether
34850         pthread_mutexattr_getrobust exists. If not, define
34851         PTHREAD_MUTEXATTR_ROBUST_UNIMPLEMENTED.
34852         * lib/pthread-mutex.c (pthread_mutexattr_getrobust,
34853         pthread_mutexattr_setrobust): Define also if <pthread.h> exists but
34854         PTHREAD_MUTEXATTR_ROBUST_UNIMPLEMENTED.
34855         * modules/pthread-mutex (configure.ac): Compile pthread-mutex.c also
34856         when <pthread.h> exists but pthread_mutexattr_getrobust needs a gnulib
34857         definition.
34859 2019-11-19  Bruno Haible  <bruno@clisp.org>
34861         threads-h tests: Fix typo.
34862         * tests/test-threads-c++.cc: Fix references to undefined type 'mtx'.
34864 2019-11-19  Bruno Haible  <bruno@clisp.org>
34866         pthread-thread: Fix prototype of pthread_attr_getdetachstate.
34867         * lib/pthread.in.h (pthread_attr_getdetachstate): Change first parameter
34868         to 'const pthread_attr_t *'.
34869         * lib/pthread-thread.c (pthread_attr_getdetachstate): Likewise.
34870         * tests/test-pthread-c++.cc (pthread_attr_getdetachstate): Likewise.
34872 2019-11-19  Paul Eggert  <eggert@cs.ucla.edu>
34874         intprops: speed up INT_MULTIPLY_WRAPV in GCC 9.3
34875         * lib/intprops.h (INT_MULTIPLY_WRAPV): If GCC 9.3 or later, do not
34876         work around GCC bug 91450 as the bug should be fixed there.
34878 2019-11-18  Paul Eggert  <eggert@cs.ucla.edu>
34880         glob: get closer to glibc glob.c
34881         Omit differences from glibc when the differences don’t matter.
34882         * lib/glob.c [_LIBC]: Include shlib-compat.h.
34883         (__glob) [!_LIBC]: New macro.  All uses of glob changed to __glob.
34884         (glob_lstat): New function.
34885         (glob_in_dir): Use it.
34886         (GLOB_ATTRIBUTE): Define to empty if not already defined.
34887         Use changed.
34889 2019-11-18  Bruno Haible  <bruno@clisp.org>
34891         stdint: Define [u]intptr_t correctly on 64-bit native Windows.
34892         * lib/stdint.in.h (gl_intptr_t, gl_uintptr_t, INTPTR_MIN, INTPTR_MAX,
34893         UINTPTR_MAX): Consider _WIN64.
34894         * tests/test-stdint.c: Verify that [u]intptr_t is large enough to hold
34895         a pointer.
34897 2019-11-18  Bruno Haible  <bruno@clisp.org>
34899         stdint: Fix value of WINT_MAX when we override wint_t.
34900         * lib/stdint.in.h (WINT_MIN, WINT_MAX): Don't override a second time
34901         when GNULIB_OVERRIDES_WINT_T is 1.
34903 2019-11-18  Bruno Haible  <bruno@clisp.org>
34905         vcs-to-changelog: New module.
34906         * modules/vcs-to-changelog: New file.
34907         * MODULES.html.sh (func_all_modules): Add it.
34909 2019-11-01  Siddhesh Poyarekar  <siddhesh@gotplt.org>
34911         vcs-to-changelog: New script to generate ChangeLog-like output.
34912         Discussion:
34913         <https://lists.gnu.org/archive/html/bug-gnulib/2019-10/msg00062.html>
34914         * build-aux/vcs_to_changelog.py: New file.
34915         * build-aux/vcstocl/frontend_c.py: New file.
34916         * build-aux/vcstocl/misc_util.py: New file.
34917         * build-aux/vcstocl/vcs_git.py: New file.
34919 2019-11-18  Bruno Haible  <bruno@clisp.org>
34921         stdint: Avoid triggering a "conflicting types" error on mingw 5.22.
34922         Reported by Keith Marshall <keith@users.osdn.me> in
34923         <https://lists.gnu.org/archive/html/bug-gnulib/2019-10/msg00044.html>
34924         and <https://osdn.net/projects/mingw/ticket/39677>.
34925         * lib/stdint.in.h (intptr_t, uintptr_t): Don't define if the types have
34926         already been defined by mingw's <crtdefs.h>.
34928 2019-11-18  Bruno Haible  <bruno@clisp.org>
34930         gnulib-tool: Fix build error on macOS with --conditional-dependencies.
34931         * gnulib-tool (func_modules_add_dummy): Ignore modules that are
34932         conditionally enabled.
34934 2019-11-18  Bruno Haible  <bruno@clisp.org>
34936         gc: Mirror libgcrypt.m4 from libgcrypt.
34937         * config/srclistvars.sh (LIBGCRYPT): New variable.
34938         * config/srclist.txt: Use it to fetch m4/libgcrypt.m4.
34940 2019-11-17  Bruno Haible  <bruno@clisp.org>
34942         locale, localename: Improve z/OS support.
34943         Reported by Daniel Richard G. in
34944         <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00001.html>.
34945         * m4/locale_h.m4 (gl_LOCALE_T): New macro, partially extracted from
34946         gl_LOCALE_H.
34947         (gl_LOCALE_H): Require it.
34948         * m4/localename.m4 (gl_LOCALENAME): Likewise. If locale_t is not
34949         defined, don't even check for newlocale, duplocale, freelocale.
34950         * m4/intl-thread-locale.m4 (gt_FUNC_USELOCALE): Make the test fail when
34951         locale_t is not defined.
34953 2019-11-17  Bruno Haible  <bruno@clisp.org>
34955         havelib: Make libdirstems processing more flexible.
34956         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Set 3 libdirstem
34957         variables: Consider 'lib' always, also on Solaris. Look for lib32 in
34958         addition to lib64. Don't invoke /usr/bin/gcc (reverting the second
34959         patch from 2017-02-19).
34960         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Consider up to 3 additional
34961         libdirs, even when the first one exists as a directory.
34963 2019-11-17  Bruno Haible  <bruno@clisp.org>
34965         havelib: Match the bitness when searching for libraries.
34966         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Define a function
34967         acl_is_expected_elfclass.
34968         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): When testing whether a library
34969         file exists, in ELF, also test whether it has the ELF class that
34970         corresponds to the host's bitness.
34972 2019-11-17  Bruno Haible  <bruno@clisp.org>
34974         host-cpu-c-abi: Add support for unknown CPUs.
34975         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI_32BIT): Set
34976         gl_cv_host_cpu_c_abi_32bit to 'unknown' if we don't know whether it's
34977         32-bit or 64-bit.
34979 2019-11-17  Bruno Haible  <bruno@clisp.org>
34981         havelib: Remove redundant code.
34982         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Remove Solaris specific
34983         test for 64-bit host. Use gl_HOST_CPU_C_ABI_32BIT result instead.
34985 2019-11-17  Bruno Haible  <bruno@clisp.org>
34987         havelib: Fix a bug in dependency processing.
34988         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): During dependency processing
34989         of .la files, don't overwrite the value of additional_libdir for the
34990         next rounds.
34992 2019-11-16  Bruno Haible  <bruno@clisp.org>
34994         wctype-h: When overriding wint_t, override also the related functions.
34995         Reported by Christian Biesinger <cbiesinger@google.com> in
34996         <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00027.html>.
34997         * m4/wctype_h.m4 (gl_WCTYPE_H): When GNULIB_OVERRIDES_WINT_T is 1, set
34998         REPLACE_ISWCNTRL to 1.
34999         * lib/wctype.in.h (rpl_iswalnum, rpl_iswalpha, rpl_iswblank,
35000         rpl_iswcntrl, rpl_iswdigit, rpl_iswgraph, rpl_iswlower, rpl_iswprint,
35001         rpl_iswpunct, rpl_iswspace, rpl_iswupper, rpl_iswxdigit, rpl_towlower,
35002         rpl_towupper): New definitions when GNULIB_OVERRIDES_WINT_T is 1.
35003         * doc/posix-headers/wchar.texi: Mention that wint_t is also overridden
35004         on mingw.
35005         * doc/posix-headers/wctype.texi: Likewise.
35007 2019-11-16  Bruno Haible  <bruno@clisp.org>
35009         time_r: Fix for mingw.
35010         Reported by Christian Biesinger <cbiesinger@google.com> in
35011         <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00014.html>.
35012         * lib/time.in.h: On mingw, include <unistd.h>.
35013         * m4/time_r.m4 (gl_TIME_R): On mingw, include <unistd.h> before
35014         <time.h>. Test for localtime_r in a way that works when it is defined
35015         as an inline function.
35017 2019-11-13  Bruno Haible  <bruno@clisp.org>
35019         havelib: Revert last change.
35020         * build-aux/config.rpath: Revert last change. We can add msys2 support
35021         when it has been added to libtool.m4 upstream.
35023 2019-11-09  Paul Eggert  <eggert@cs.ucla.edu>
35025         config: add msys support
35026         Requested by Arnold Robbins in:
35027         https://lists.gnu.org/r/bug-gnulib/2019-11/msg00008.html
35028         He also requested a change to config.guess, which I’ll forward
35029         upstream.
35030         * build-aux/ar-lib (func_file_conv):
35031         * build-aux/compile (func_file_conv):
35032         * build-aux/config.rpath (wl, with_gnu_ld)
35033         (hardcode_libdir_flag_spec, libext, shrext, library_names_spec):
35034         Treat msys like cygwin.
35036 2019-11-06  Paul Eggert  <eggert@cs.ucla.edu>
35038         regex: now back in sync with glibc
35039         * config/srclist.txt: regcomp.c, regex_internal.c, regex_internal.h,
35040         regexec.c got merged into glibc and are now copies again.
35042 2019-10-27  Bruno Haible  <bruno@clisp.org>
35044         host-cpu-c-abi: Recognize i386 and a couple of other CPUs as 32-bit.
35045         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Include i386 in the case
35046         statement.
35047         (gl_HOST_CPU_C_ABI_32BIT): Likewise. Also recognize a couple of other
35048         32-bit CPUs.
35050 2019-10-24  Paul Eggert  <eggert@cs.ucla.edu>
35052         timespec-add, timespec-sub: simplify
35053         * lib/timespec-add.c (timespec_add):
35054         * lib/timespec-sub.c (timespec_sub):
35055         Simplify, now that INT_ADD_WRAPV and INT_SUBTRACT_WRAPV
35056         work on unsigned integers.
35058 2019-10-23  Paul Eggert  <eggert@cs.ucla.edu>
35060         nstrftime: speed up integer overflow checking
35061         * lib/nstrftime.c: Include intprops.h.
35062         (INT_STRLEN_BOUND): Remove, as we can use intprops.h’s defn.
35063         (__strftime_internal): Use INT_MULTIPLY_WRAPV and INT_ADD_WRAPV
35064         instead of doing it by hand.
35065         * modules/nstrftime (Depends-on): Add intprops.
35067         Port better to GCC under macOS
35068         Work around macOS header that has ‘#define __has_builtin(x) 0’
35069         when compiled by GCC.  Apple really, really doesn’t want you to
35070         use GCC, apparently.  Rroblem reported by Akim Demaille in:
35071         https://lists.gnu.org/r/bug-bison/2019-10/msg00071.html
35072         The fix is to not trust __has_builtin when being compiled by
35073         recent-enough GCC.
35074         * lib/intprops.h (__has_builtin)
35075         (_GL_HAS___builtin_add_overflow, _GL_TEMPDEF___has_builtin):
35076         * lib/verify.h (__has_builtin, _GL_HAS___builtin_unreachable)
35077         (_GL_HAS___builtin_trap, _GL_TEMPDEF___has_builtin):
35078         Remove.  All uses removed.
35079         * lib/intprops.h (_GL_HAS_BUILTIN_ADD_OVERFLOW): Use __has_builtin
35080         directly, if defined and if not newer GCC.
35081         * lib/verify.h (_GL_HAS_BUILTIN_TRAP, _GL_HAS_BUILTIN_UNREACHABLE):
35082         New macro, that use __has_builtin directly, if defined and if
35083         not newer GCC.
35084         (assume): Use them.
35086 2019-10-22  Akim Demaille  <akim@lrde.epita.fr>
35088         maintainer-makefile: update rule for argmatch.
35089         * top/maint.mk (sc_prohibit_argmatch_without_use): Add ARGMATCH_DEFINE_GROUP.
35091 2019-10-21  Akim Demaille  <akim@lrde.epita.fr>
35093         bitset: let freeing functions accept NULL.
35094         * lib/bitset.c (bitset_free, bitset_obstack_free): Do nothing if
35095         given NULL.
35096         * lib/bitset.h: Document that.
35097         * doc/bitset.texi: Fix the example, and demonstrate bitset_free.
35099 2019-10-15  Paul Eggert  <eggert@cs.ucla.edu>
35101         inttypes: use more-robust test for int range
35102         This fixes Bison 3.4.2 when built with Oracle Solaris Studio 12.3.
35103         Problem reported by Dagobert Michelsen in:
35104         https://lists.gnu.org/r/bug-gnulib/2019-10/msg00042.html
35105         * lib/inttypes.in.h: Rely only on limits.h when checking
35106         int range.
35108 2019-10-15  Bruno Haible  <bruno@clisp.org>
35110         libtextstyle-optional: Sync with current not-yet-released libtextstyle.
35111         * libtextstyle-optional (styled_ostream_get_hyperlink_ref,
35112         styled_ostream_get_hyperlink_id, styled_ostream_set_hyperlink,
35113         term_ostream_get_hyperlink_ref, term_ostream_get_hyperlink_id,
35114         term_ostream_set_hyperlink): New functions.
35115         (term_styled_ostream_get_hyperlink_ref,
35116         term_styled_ostream_get_hyperlink_id,
35117         term_styled_ostream_set_hyperlink): New function aliases.
35119 2019-10-14  Paul Eggert  <eggert@cs.ucla.edu>
35121         update-copyright: use en dashes in .texi ranges
35122         * build-aux/update-copyright: Match year ranges like "1998--2019",
35123         which are used in the Autoconf manual.  Also, update ranges in
35124         .tex, .texi, and .texinfo files to use en dashes instead of
35125         hyphens.
35127 2019-10-13  Paul Eggert  <eggert@cs.ucla.edu>
35129         * config/srclist.txt: Remove posix/regex_internal.c for now.
35131 2019-10-13  Bruno Haible  <bruno@clisp.org>
35133         git-version-gen: Allow 'snapshot' as .tarball-version contents.
35134         * build-aux/git-version-gen: Don't map non-numeric .tarball-version
35135         contents to the empty string.
35137 2019-10-12  Bruno Haible  <bruno@clisp.org>
35139         intprops tests: Fix compilation errors on HP-UX/ia64 with cc.
35140         * tests/test-intprops.c (main): Disable two more tests when using
35141         HP-UX cc.
35143 2019-10-11  Paul Eggert  <eggert@cs.ucla.edu>
35145         Simplify and regularize regex use of ‘assert’
35146         Also, tell GCC about the asserts even when compiling without
35147         debugging, to give it further optimization opportunities.
35148         * lib/regex_internal.h (DEBUG_ASSERT): New macro.
35149         * lib/regcomp.c (link_nfa_nodes, calc_eclosure)
35150         (parse_expression, parse_bracket_exp):
35151         * lib/regex_internal.c (build_wcs_buffer)
35152         (build_wcs_upper_buffer, re_string_reconstruct)
35153         (re_string_context_at):
35154         * lib/regexec.c (re_search_stub, re_copy_regs)
35155         (re_search_internal, prune_impossible_nodes, check_matching)
35156         (check_halt_state_context, set_regs, sift_states_backward)
35157         (build_sifted_states, transit_state_mb, transit_state_bkref)
35158         (check_arrival_add_next_nodes, check_arrival_expand_ecl)
35159         (match_ctx_add_subtop):
35160         Use it instead of plain ‘assert’.
35162 2019-10-09  Paul Eggert  <eggert@cs.ucla.edu>
35164         regex: omit debug assignment when not debugging
35165         * lib/regexec.c (re_search_internal) [!DEBUG]:
35166         Remove unnecessary assignment.
35168         regex: tell compiler there’s at most 256 arcs out
35169         Partly this is to help the reader (and maybe help GCC);
35170         partly this is to pacify Coverity.
35171         * lib/regex_internal.h: Include verify.h.
35172         * lib/regexec.c (group_nodes_into_DFAstates):
35173         Tell the compiler that ndests cannot exceed SBC_MAX.
35174         * modules/regex (Depends-on): Add ‘verify’.
35176         regex: simplify by assuming C99
35177         * config/srclist.txt: Comment out regex_internal.h and regexec.c
35178         temporarily.
35179         * lib/regex_internal.h (lock_define, re_match_context_t):
35180         Simplify by assuming C99 macros and const.
35181         * lib/regexec.c (re_search_internal): Simplify by assuming C99
35182         initializers.  Remove unnecessary assignment, as mctx is now
35183         safely initialized earlier.
35185         regex: avoid copying of uninitialized storage
35186         * config/srclist.txt: Comment out regcomp.c temporarily.
35187         * lib/regcomp.c (build_charclass_op, create_tree) [! (GCC_LINT||lint)]:
35188         Initialize even when not checking for lint, as the behavior is
35189         arguably undefined otherwise and Coverity warns about it.
35191 2019-10-06  Bruno Haible  <bruno@clisp.org>
35193         access tests: Fix test failure when run as root.
35194         * tests/test-access.c: Include root-uid.h.
35195         (geteuid): Define fallback.
35196         (main): Don't expect that writing to a read-only file would fail when
35197         running as root. Also, remove the created files at the end.
35198         * modules/access-tests (Depends-on): Add root-uid.
35199         (configure.ac): Test whether geteuid exists.
35201 2019-10-06  Benno Schulenberg  <bensberg@telfort.nl>  (tiny change)
35203         users.txt: add GNU nano
35204         Nano has been making use of gnulib since March 2017, version 2.8.0.
35206 2019-10-05  Paul Eggert  <eggert@cs.ucla.edu>
35208         bootstrap: simplify debugging of wget failures
35209         Problem reported by Tim Rühsen in:
35210         https://lists.gnu.org/r/bug-gnulib/2019-10/msg00000.html
35211         * build-aux/bootstrap (po_download_command_format):
35212         Invoke wget with -nv instead of -q, to make debugging easier.
35214 2019-09-29  Bruno Haible  <bruno@clisp.org>
35216         avltree-list: Fix compilation warning (introduced on 2014-09-16).
35217         * lib/gl_avltree_list.c (gl_avltree_list_check_invariants): Remove
35218         'const' attribute.
35220 2019-09-29  Bruno Haible  <bruno@clisp.org>
35222         fbufmode: Fix compilation error on glibc >= 2.28 systems.
35223         * lib/stdio-impl.h (_IO_UNBUFFERED): Define fallback on glibc >= 2.28.
35225 2019-09-28  Bruno Haible  <bruno@clisp.org>
35227         Update comments that refer to POSIX.
35228         * lib/creat.c, lib/fopen.c, lib/open.c, lib/openat.c: Cite the relevant
35229         sentence about trailing slashes.
35230         * lib/fflush.c: Clarify the reasoning.
35231         * tests/test-fflush2.c: Cite the relevant sentence.
35233 2019-09-28  Bruno Haible  <bruno@clisp.org>
35235         access: Document limitations on Windows.
35236         Suggested by Zaretskii <eliz@gnu.org>.
35237         * doc/posix-functions/access.texi: Mention two limitations on Windows.
35239 2019-09-28  Bruno Haible  <bruno@clisp.org>
35241         findprog-in: Fix comment.
35242         Reported by Eli Zaretskii <eliz@gnu.org>.
35243         * lib/findprog.h (find_in_given_path): Extend description of EACCES
35244         condition.
35245         * lib/stat.c (rpl_stat): Fix typo in comment.
35246         * lib/utime.c (_gl_utimens_windows): Likewise.
35248 2019-09-23  Paul Eggert  <eggert@cs.ucla.edu>
35250         Update URLs and associated text
35251         (Thanks to Bruno Haible for proofreading this patch.)
35252         Prefer https: to http: in URLs where either will do, for the usual
35253         security reasons.  I also updated broken and/or moved URLs
35254         discovered during the process. In a few places I had to resort to
35255         archive.org, since I didn't find the originals elsewhere.
35257 2019-09-15  Paul Smith  <psmith@gnu.org>
35258             Bruno Haible  <bruno@clisp.org>
35260         findprog-in: Set errno when the search fails.
35261         * lib/findprog-in.c: Include <errno.h>.
35262         (find_in_given_path): Set errno before returning NULL.
35263         * lib/findprog.h (find_in_given_path): Update comment accordingly.
35264         Define the term "slash".
35266 2019-09-15  Bruno Haible  <bruno@clisp.org>
35268         findprog, findprog-lgpl, findprog-in: Fix crash on MSVC.
35269         * modules/findprog (Depends-on): Add access.
35270         * modules/findprog-lgpl (Depends-on): Likewise.
35271         * modules/findprog-in (Depends-on): Likewise.
35273 2019-09-15  Bruno Haible  <bruno@clisp.org>
35275         access: Add tests.
35276         * tests/test-access.c: New file.
35277         * modules/access-tests: New file.
35279         access: New module.
35280         * lib/unistd.in.h (access): New declaration.
35281         * lib/access.c: New file.
35282         * m4/access.m4: New file.
35283         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether access is declared.
35284         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_ACCESS, REPLACE_ACCESS.
35285         * modules/unistd (Makefile.am): Substitute GNULIB_ACCESS,
35286         REPLACE_ACCESS.
35287         * modules/access: New file.
35288         * tests/test-unistd-c++.cc (access): Check signature.
35289         * doc/posix-functions/access.texi: Mention the new module.
35291 2019-09-15  Bruno Haible  <bruno@clisp.org>
35293         fcntl-h: Fix compilation error of creat.c on MSVC.
35294         * lib/fcntl.in.h: Include <io.h> also when __need_system_fcntl_h is
35295         defined.
35297 2019-09-15  Bruno Haible  <bruno@clisp.org>
35299         creat: Add tests.
35300         * tests/test-creat.c: New file, based on tests/test-open.h.
35301         * modules/creat-tests: New file.
35303         creat: New module.
35304         * lib/fcntl.in.h (creat): New declaration.
35305         * lib/creat.c: New file, based on lib/open.c.
35306         * m4/creat.m4: New file.
35307         * m4/open-slash.m4: New file, extracted from m4/open.m4.
35308         * m4/open.m4 (gl_FUNC_OPEN): Move trailing-slash test to open-slash.m4.
35309         Invoke gl_OPEN_TRAILING_SLASH_BUG.
35310         * modules/open (Files): Add m4/open-slash.m4.
35311         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Initialize GNULIB_CREAT,
35312         REPLACE_CREAT.
35313         * modules/fcntl-h (Makefile.am): Substitute GNULIB_CREAT, REPLACE_CREAT.
35314         * modules/creat: New file.
35315         * tests/test-fcntl-h-c++.cc (creat): Check signature.
35316         * doc/posix-functions/creat.texi: Mention the new module.
35318 2019-09-15  Bruno Haible  <bruno@clisp.org>
35320         open tests: Enhance test.
35321         * tests/test-open.h (test_open): Test the creation of an executable
35322         regular file. Also improve initial cleanup.
35324 2019-09-15  Bruno Haible  <bruno@clisp.org>
35326         intprops tests: Avoid build failure with HP-UX cc.
35327         * tests/test-intprops.c: Disable a check that makes HP cc choke with
35328         "error 4018: Macro param too large after substitution - use -H option.".
35330 2019-09-14  Bruno Haible  <bruno@clisp.org>
35332         Make autoconf tests work with -Werror=implicit-function-declaration.
35333         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Include <wctype.h>, for
35334         towupper() declaration.
35335         * m4/ptsname.m4 (gl_FUNC_PTSNAME): Include <stdlib.h>, for ptsname()
35336         declaration.
35338 2019-09-14  Bruno Haible  <bruno@clisp.org>
35340         findprog-in: Better mimic the system on native Windows.
35341         Reported by Paul Smith <psmith@gnu.org>.
35342         * lib/findprog-in.c (find_in_given_path): On native Windows, don't try
35343         non-empty suffixes when the file name already contains a '.'.
35345 2019-09-10  Bruno Haible  <bruno@clisp.org>
35347         wctob: Fix autoconf test.
35348         Based on patch by Florian Weimer <fweimer@redhat.com>.
35349         * m4/wctob.m4 (gl_FUNC_WCTOB): Include <stdlib.h> before using mbtowc.
35351 2019-09-09  Akim Demaille  <akim@lrde.epita.fr>
35353         xhash: provide hash_xinitialize.
35354         Suggested by Egor Pugin <egor.pugin@gmail.com>
35355         https://lists.gnu.org/archive/html/bison-patches/2019-09/msg00026.html
35356         * modules/xhash, lib/xhash.c: New.
35357         * lib/hash.h (hash_xinitialize): New.
35359 2019-09-09  Bruno Haible  <bruno@clisp.org>
35361         findprog-in: Make exec optimization optional.
35362         * lib/findprog.h: Add double-inclusion guard. Include <stdbool.h>.
35363         (find_in_given_path): Add optimize_for_exec parameter.
35364         * lib/findprog-in.c (find_in_given_path): Likewise.
35366 2019-09-08  Bruno Haible  <bruno@clisp.org>
35368         Add option to assume the best, not the worst, when cross-compiling.
35369         Suggested by Jonas Termansen <sortie@maxsi.org>.
35370         * m4/gnulib-common.m4 (gl_COMMON_BODY): Add --enable-cross-guesses=...
35371         option. Set gl_cross_guess_normal and gl_cross_guess_inverted.
35372         * m4/argz.m4 (gl_FUNC_ARGZ): Obey --enable-cross-guesses for
35373         lt_cv_sys_argz_works.
35374         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Obey --enable-cross-guesses for
35375         ac_cv_func_calloc_0_nonnull.
35376         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Obey
35377         --enable-cross-guesses for gl_cv_func_realpath_works.
35378         * m4/cbrtl.m4 (gl_FUNC_CBRTL): Obey --enable-cross-guesses for
35379         gl_cv_func_cbrtl_ieee.
35380         * m4/ceil.m4 (gl_FUNC_CEIL): Obey --enable-cross-guesses for
35381         gl_cv_func_ceil_ieee.
35382         * m4/ceilf.m4 (gl_FUNC_CEILF): Obey --enable-cross-guesses for
35383         gl_cv_func_ceilf_ieee.
35384         * m4/ceill.m4 (gl_FUNC_CEILL): Obey --enable-cross-guesses for
35385         gl_cv_func_ceill_ieee.
35386         * m4/chown.m4 (AC_FUNC_CHOWN): Obey --enable-cross-guesses for
35387         ac_cv_func_chown_works.
35388         (gl_FUNC_CHOWN): Obey --enable-cross-guesses for
35389         gl_cv_func_chown_slash_works, gl_cv_func_chown_ctime_works.
35390         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Obey
35391         --enable-cross-guesses for gl_cv_struct_dirent_d_ino.
35392         * m4/exp2l.m4 (gl_FUNC_EXP2L): Obey --enable-cross-guesses for
35393         gl_cv_func_exp2l_works, gl_cv_func_exp2l_ieee.
35394         * m4/expl.m4 (gl_FUNC_EXPL): Obey --enable-cross-guesses for
35395         gl_cv_func_expl_works.
35396         * m4/expm1.m4 (gl_FUNC_EXPM1): Obey --enable-cross-guesses for
35397         gl_cv_func_expm1_ieee.
35398         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Obey --enable-cross-guesses for
35399         gl_cv_func_expm1l_works.
35400         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Obey --enable-cross-guesses for
35401         gl_cv_func_open_directory_works.
35402         * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Obey
35403         --enable-cross-guesses for gl_cv_func_fchownat_nofollow_works.
35404         (gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG): Obey --enable-cross-guesses for
35405         gl_cv_func_fchownat_empty_filename_works.
35406         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Obey --enable-cross-guesses for
35407         gl_cv_func_fdopendir_works.
35408         * m4/floor.m4 (gl_FUNC_FLOOR): Obey --enable-cross-guesses for
35409         gl_cv_func_floor_ieee.
35410         * m4/floorf.m4 (gl_FUNC_FLOORF): Obey --enable-cross-guesses for
35411         gl_cv_func_floorf_ieee.
35412         * m4/fma.m4 (gl_FUNC_FMA_WORKS): Obey --enable-cross-guesses for
35413         gl_cv_func_fma_works.
35414         * m4/fmaf.m4 (gl_FUNC_FMAF_WORKS): Obey --enable-cross-guesses for
35415         gl_cv_func_fmaf_works.
35416         * m4/fmal.m4 (gl_FUNC_FMAL_WORKS): Obey --enable-cross-guesses for
35417         gl_cv_func_fmal_works.
35418         * m4/fmod.m4 (gl_FUNC_FMOD): Obey --enable-cross-guesses for
35419         gl_cv_func_fmod_ieee.
35420         * m4/fmodf.m4 (gl_FUNC_FMODF): Obey --enable-cross-guesses for
35421         gl_cv_func_fmodf_ieee.
35422         * m4/fmodl.m4 (gl_FUNC_FMODL): Obey --enable-cross-guesses for
35423         gl_cv_func_fmodl_ieee.
35424         * m4/fpurge.m4 (gl_FUNC_FPURGE): Obey --enable-cross-guesses for
35425         gl_cv_func_fpurge_works.
35426         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Obey
35427         --enable-cross-guesses for gl_cv_func_getcwd_path_max.
35428         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Obey --enable-cross-guesses for
35429         gl_cv_func_getcwd_null.
35430         (gl_FUNC_GETCWD): Update for getcwd-path-max.m4 change.
35431         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Obey --enable-cross-guesses for
35432         gl_cv_func_working_getdelim.
35433         * m4/getgroups.m4 (AC_FUNC_GETGROUPS): Obey --enable-cross-guesses for
35434         ac_cv_func_getgroups_works. Keep this macro also in Autoconf >= 2.70.
35435         (gl_FUNC_GETGROUPS): Obey --enable-cross-guesses for
35436         gl_cv_func_getgroups_works.
35437         * m4/getline.m4 (gl_FUNC_GETLINE): Obey --enable-cross-guesses for
35438         am_cv_func_working_getline.
35439         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Obey --enable-cross-guesses
35440         for gl_cv_func_getopt_gnu.
35441         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Obey
35442         --enable-cross-guesses for gl_cv_func_gettimeofday_clobber.
35443         * m4/hypot.m4 (gl_FUNC_HYPOT): Obey --enable-cross-guesses for
35444         gl_cv_func_hypot_ieee.
35445         * m4/hypotf.m4 (gl_FUNC_HYPOTF): Obey --enable-cross-guesses for
35446         gl_cv_func_hypotf_ieee.
35447         * m4/hypotl.m4 (gl_FUNC_HYPOTL): Obey --enable-cross-guesses for
35448         gl_cv_func_hypotl_ieee.
35449         * m4/iconv_open-utf.m4 (gl_FUNC_ICONV_OPEN_UTF_SUPPORT): Obey
35450         --enable-cross-guesses for gl_cv_func_iconv_supports_utf.
35451         * m4/link.m4 (gl_FUNC_LINK): Obey --enable-cross-guesses for
35452         gl_cv_func_link_works.
35453         * m4/linkat.m4 (gl_FUNC_LINKAT): Obey --enable-cross-guesses for
35454         gl_cv_func_linkat_slash.
35455         * m4/log.m4 (gl_FUNC_LOG): Obey --enable-cross-guesses for
35456         gl_cv_func_log_ieee.
35457         * m4/logf.m4 (gl_FUNC_LOGF): Obey --enable-cross-guesses for
35458         gl_cv_func_logf_ieee.
35459         * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Obey --enable-cross-guesses for
35460         gl_cv_func_logl_works.
35461         * m4/log10.m4 (gl_FUNC_LOG10): Obey --enable-cross-guesses for
35462         gl_cv_func_log10_ieee.
35463         * m4/log10f.m4 (gl_FUNC_LOG10F): Obey --enable-cross-guesses for
35464         gl_cv_func_log10f_ieee.
35465         * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Obey --enable-cross-guesses for
35466         gl_cv_func_log10l_works.
35467         * m4/log1p.m4 (gl_FUNC_LOG1P): Obey --enable-cross-guesses for
35468         gl_cv_func_log1p_ieee.
35469         * m4/log1pf.m4 (gl_FUNC_LOG1PF): Obey --enable-cross-guesses for
35470         gl_cv_func_log1pf_ieee.
35471         * m4/log1pl.m4 (gl_FUNC_LOG1PL): Obey --enable-cross-guesses for
35472         gl_cv_func_log1pl_ieee.
35473         * m4/log2.m4 (gl_FUNC_LOG2): Obey --enable-cross-guesses for
35474         gl_cv_func_log2_ieee.
35475         * m4/log2f.m4 (gl_FUNC_LOG2F): Obey --enable-cross-guesses for
35476         gl_cv_func_log2f_ieee.
35477         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Obey
35478         --enable-cross-guesses for
35479         gl_cv_func_lstat_dereferences_slashed_symlink.
35480         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Obey --enable-cross-guesses for
35481         ac_cv_func_malloc_0_nonnull. Keep this macro also in Autoconf >= 2.70.
35482         * m4/mbrtowc.m4 (gl_MBRTOWC_C_LOCALE): Obey --enable-cross-guesses for
35483         gl_cv_C_locale_sans_EILSEQ.
35484         * m4/memchr.m4 (gl_FUNC_MEMCHR): Obey --enable-cross-guesses for
35485         gl_cv_func_memchr_works.
35486         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): Obey --enable-cross-guesses for
35487         gl_cv_func_memmem_works_always.
35488         (gl_FUNC_MEMMEM): Obey --enable-cross-guesses for
35489         gl_cv_func_memmem_works_fast.
35490         * m4/mkdir.m4 (gl_FUNC_MKDIR): Obey --enable-cross-guesses for
35491         gl_cv_func_mkdir_trailing_slash_works,
35492         gl_cv_func_mkdir_trailing_dot_works.
35493         * m4/mkfifo.m4 (gl_FUNC_MKFIFO): Obey --enable-cross-guesses for
35494         gl_cv_func_mkfifo_works.
35495         * m4/mknod.m4 (gl_FUNC_MKNOD): Obey --enable-cross-guesses for
35496         gl_cv_func_mknod_works.
35497         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Obey --enable-cross-guesses for
35498         gl_cv_func_working_mkstemp.
35499         * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Obey --enable-cross-guesses for
35500         gl_cv_func_working_mktime.
35501         * m4/modf.m4 (gl_FUNC_MODF): Obey --enable-cross-guesses for
35502         gl_cv_func_modf_ieee.
35503         * m4/modff.m4 (gl_FUNC_MODFF): Obey --enable-cross-guesses for
35504         gl_cv_func_modff_ieee.
35505         * m4/modfl.m4 (gl_FUNC_MODFL): Obey --enable-cross-guesses for
35506         gl_cv_func_modfl_ieee.
35507         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Obey --enable-cross-guesses for
35508         gl_cv_func_nanosleep.
35509         * m4/perror.m4 (gl_FUNC_PERROR): Obey --enable-cross-guesses for
35510         gl_cv_func_perror_works.
35511         * m4/printf.m4 (gl_PRINTF_SIZES_C99): Obey --enable-cross-guesses for
35512         gl_cv_func_printf_sizes_c99.
35513         (gl_PRINTF_INFINITE): Obey --enable-cross-guesses for
35514         gl_cv_func_printf_infinite.
35515         (gl_PRINTF_INFINITE_LONG_DOUBLE): Obey --enable-cross-guesses for
35516         gl_cv_func_printf_infinite_long_double.
35517         (gl_PRINTF_DIRECTIVE_A): Obey --enable-cross-guesses for
35518         gl_cv_func_printf_directive_a.
35519         (gl_PRINTF_DIRECTIVE_F): Obey --enable-cross-guesses for
35520         gl_cv_func_printf_directive_f.
35521         (gl_PRINTF_FLAG_ZERO): Obey --enable-cross-guesses for
35522         gl_cv_func_printf_flag_zero.
35523         (gl_PRINTF_ENOMEM): Obey --enable-cross-guesses for
35524         gl_cv_func_printf_enomem.
35525         (gl_SNPRINTF_TRUNCATION_C99): Obey --enable-cross-guesses for
35526         gl_cv_func_snprintf_truncation_c99.
35527         (gl_SNPRINTF_RETVAL_C99): Obey --enable-cross-guesses for
35528         gl_cv_func_snprintf_retval_c99.
35529         (gl_SNPRINTF_DIRECTIVE_N): Obey --enable-cross-guesses for
35530         gl_cv_func_snprintf_directive_n.
35531         (gl_VSNPRINTF_ZEROSIZE_C99): Obey --enable-cross-guesses for
35532         gl_cv_func_vsnprintf_zerosize_c99.
35533         * m4/pselect.m4 (gl_FUNC_PSELECT): Obey --enable-cross-guesses for
35534         gl_cv_func_pselect_detects_ebadf.
35535         * m4/pthread_rwlock_rdlock.m4 (gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER):
35536         Obey --enable-cross-guesses for
35537         gl_cv_pthread_rwlock_rdlock_prefer_writer.
35538         * m4/ptsname.m4 (gl_FUNC_PTSNAME): Obey --enable-cross-guesses for
35539         gl_cv_func_ptsname_sets_errno.
35540         * m4/putenv.m4 (gl_FUNC_PUTENV): Obey --enable-cross-guesses for
35541         gl_cv_func_svid_putenv.
35542         * m4/readlink.m4 (gl_FUNC_READLINK): Obey --enable-cross-guesses for
35543         gl_cv_func_readlink_works.
35544         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Obey --enable-cross-guesses for
35545         ac_cv_func_realloc_0_nonnull. Keep this macro also in Autoconf >= 2.70.
35546         * m4/regex.m4 (gl_REGEX): Obey --enable-cross-guesses for
35547         gl_cv_func_re_compile_pattern_working.
35548         * m4/remainder.m4 (gl_FUNC_REMAINDER): Obey --enable-cross-guesses for
35549         gl_cv_func_remainder_ieee.
35550         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Obey --enable-cross-guesses for
35551         gl_cv_func_remainderf_ieee.
35552         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Obey --enable-cross-guesses for
35553         gl_cv_func_remainderl_ieee.
35554         * m4/rintl.m4 (gl_FUNC_RINTL): Obey --enable-cross-guesses for
35555         gl_cv_func_rintl_works.
35556         * m4/rmdir.m4 (gl_FUNC_RMDIR): Obey --enable-cross-guesses for
35557         gl_cv_func_rmdir_works.
35558         * m4/round.m4 (gl_FUNC_ROUND): Obey --enable-cross-guesses for
35559         gl_cv_func_round_ieee.
35560         * m4/roundf.m4 (gl_FUNC_ROUNDF): Obey --enable-cross-guesses for
35561         gl_cv_func_roundf_ieee.
35562         * m4/roundl.m4 (gl_FUNC_ROUNDL): Obey --enable-cross-guesses for
35563         gl_cv_func_roundl_ieee.
35564         * m4/select.m4 (gl_FUNC_SELECT): Obey --enable-cross-guesses for
35565         gl_cv_func_select_detects_ebadf.
35566         * m4/setenv.m4 (gl_FUNC_SETENV): Obey --enable-cross-guesses for
35567         gl_cv_func_setenv_works.
35568         (gl_FUNC_UNSETENV): Obey --enable-cross-guesses for
35569         gl_cv_func_unsetenv_works.
35570         * m4/signbit.m4 (gl_SIGNBIT): Obey --enable-cross-guesses for
35571         gl_cv_func_signbit, gl_cv_func_signbit_gcc.
35572         * m4/sleep.m4 (gl_FUNC_SLEEP): Obey --enable-cross-guesses for
35573         gl_cv_func_sleep_works.
35574         * m4/stat.m4 (gl_FUNC_STAT): Obey --enable-cross-guesses for
35575         gl_cv_func_stat_file_slash.
35576         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Obey --enable-cross-guesses for
35577         gl_cv_func_stpncpy.
35578         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Obey
35579         --enable-cross-guesses for gl_cv_func_strcasestr_works_always.
35580         (gl_FUNC_STRCASESTR): Obey --enable-cross-guesses for
35581         gl_cv_func_strcasestr_linear.
35582         * m4/strerror.m4 (gl_FUNC_STRERROR): Obey --enable-cross-guesses for
35583         gl_cv_func_working_strerror.
35584         (gl_FUNC_STRERROR_0): Obey --enable-cross-guesses for
35585         gl_cv_func_strerror_0_works.
35586         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS): Obey
35587         --enable-cross-guesses for gl_cv_func_strerror_r_works.
35588         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): Obey --enable-cross-guesses for
35589         gl_cv_func_strstr_works_always.
35590         (gl_FUNC_STRSTR): Obey --enable-cross-guesses for
35591         gl_cv_func_strstr_linear.
35592         * m4/strtod.m4 (gl_FUNC_STRTOD): Obey --enable-cross-guesses for
35593         gl_cv_func_strtod_works.
35594         * m4/strtold.m4 (gl_FUNC_STRTOLD): Obey --enable-cross-guesses for
35595         gl_cv_func_strtold_works.
35596         * m4/symlink.m4 (gl_FUNC_SYMLINK): Obey --enable-cross-guesses for
35597         gl_cv_func_symlink_works.
35598         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Obey --enable-cross-guesses for
35599         gl_cv_func_symlinkat_works.
35600         * m4/trunc.m4 (gl_FUNC_TRUNC): Obey --enable-cross-guesses for
35601         gl_cv_func_trunc_ieee.
35602         * m4/truncf.m4 (gl_FUNC_TRUNCF): Obey --enable-cross-guesses for
35603         gl_cv_func_truncf_ieee.
35604         * m4/truncl.m4 (gl_FUNC_TRUNCL): Obey --enable-cross-guesses for
35605         gl_cv_func_truncl_ieee.
35606         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Obey --enable-cross-guesses for
35607         gl_cv_func_tzset_clobber.
35608         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Obey --enable-cross-guesses for
35609         gl_cv_func_ungetc_works.
35610         * m4/unlink.m4 (gl_FUNC_UNLINK): Obey --enable-cross-guesses for
35611         gl_cv_func_unlink_honors_slashes, gl_cv_func_unlink_parent_fails.
35612         * m4/usleep.m4 (gl_FUNC_USLEEP): Obey --enable-cross-guesses for
35613         gl_cv_func_usleep_works.
35614         * m4/utimens.m4 (gl_UTIMENS): Obey --enable-cross-guesses for
35615         gl_cv_func_futimesat_works.
35616         * m4/utimes.m4 (gl_FUNC_UTIMES): Obey --enable-cross-guesses for
35617         gl_cv_func_working_utimes.
35618         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Obey --enable-cross-guesses for
35619         gl_cv_func_wcwidth_works.
35620         * m4/glob.m4 (gl_GLOB): When cross-compiling, don't create symlinks for
35621         testing. Obey --enable-cross-guesses for gl_cv_glob_lists_symlinks.
35622         * m4/rename.m4 (gl_FUNC_RENAME): When cross-compiling, don't create
35623         links for testing. Obey --enable-cross-guesses for
35624         gl_cv_func_rename_slash_dst_works, gl_cv_func_rename_slash_src_works,
35625         gl_cv_func_rename_link_works, gl_cv_func_rename_dest_works.
35627 2019-09-08  Bruno Haible  <bruno@clisp.org>
35629         Clarify that cross-compilation guesses are guesses.
35630         * m4/threads.m4 (gl_THREADS_H): Say "guessing yes" or "guessing no" when
35631         cross-compiling.
35633 2019-09-08  Bruno Haible  <bruno@clisp.org>
35635         chown: Fix configure output (regression from 2019-03-23).
35636         * m4/chown.m4 (gl_FUNC_CHOWN): Fix reference to
35637         gl_cv_func_chown_follows_symlink variable.
35639 2019-09-08  Bruno Haible  <bruno@clisp.org>
35641         findprog-in: New module.
35642         Suggested by Paul Smith <psmith@gnu.org>.
35643         * lib/findprog.h (find_in_given_path): New declaration.
35644         * lib/findprog-in.c: New file, based on lib/findprog.c.
35645         * m4/findprog-in.m4: New file, based on m4/findprog.m4.
35646         * modules/findprog-in: New file.
35648 2019-09-08  Bruno Haible  <bruno@clisp.org>
35650         findprog: Remove unused dependency.
35651         * modules/findprog (Depends-on): Remove strdup.
35653 2019-09-08  Bruno Haible  <bruno@clisp.org>
35655         findprog: Remove test that is obsolete since 2006-04-24.
35656         * m4/findprog.m4 (gl_FINDPROG): Don't test for unistd.h.
35658 2019-09-06  Akim Demaille  <akim@lrde.epita.fr>
35660         bitset: style changes
35661         * lib/bitset/vector.c (vbitset_resize): Factor computation.
35662         * lib/bitset.c, lib/bitset/stats.c, lib/bitsetv.c: Prefer
35663         xzalloc to xcalloc.
35664         Suggested by Paul Eggert.
35666 2019-09-06  Akim Demaille  <akim@lrde.epita.fr>
35668         bitset: check memory allocation
35669         Reported by 江 祖铭 (Zu-Ming Jiang).
35670         With help from Paul Eggert.
35671         https://lists.gnu.org/archive/html/bug-bison/2019-08/msg00016.html
35672         * lib/bitset/table.c (tbitset_resize): When growing, use xrealloc
35673         instead of realloc.
35674         When shrinking, accept failures.
35675         * lib/bitset/vector.c (vbitset_resize): Likewise.
35677 2019-09-07  Paul Eggert  <eggert@cs.ucla.edu>
35679         scratch_buffer: sync from glibc
35680         * config/srclist.txt: Add the scratch_buffer source
35681         code from glibc, since these should be in sync.
35682         Autoupdate.
35684 2019-09-07  Bruno Haible  <bruno@clisp.org>
35686         doc: Update for glibc 2.30.
35687         * doc/glibc-functions/gettid.texi: New file.
35688         * doc/glibc-functions/pthread_cond_clockwait.texi: New file.
35689         * doc/glibc-functions/pthread_mutex_clocklock.texi: New file.
35690         * doc/glibc-functions/pthread_rwlock_clockrdlock.texi: New file.
35691         * doc/glibc-functions/pthread_rwlock_clockwrlock.texi: New file.
35692         * doc/glibc-functions/sem_clockwait.texi: New file.
35693         * doc/glibc-functions/tgkill.texi: New file.
35694         * doc/glibc-functions/twalk_r.texi: New file.
35695         * doc/gnulib.texi: Include them.
35696         (Glibc semaphore.h): New section.
35697         * doc/pastposix-functions/h_errno.texi: Update.
35698         * doc/posix-functions/*.texi: Likewise.
35700 2019-09-06  Bruno Haible  <bruno@clisp.org>
35702         symlink tests: Avoid test failure on Linux with Lustre file system.
35703         Reported by Thomas C Oppe <Thomas.C.Oppe@erdc.dren.mil>
35704         at <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37312>.
35705         * tests/test-symlink.h (test_symlink): Accept errno value ENOENT.
35707 2019-09-01  Bruno Haible  <bruno@clisp.org>
35709         gitsub.sh: Add support for shallow-cloning of subdirectories.
35710         * top/gitsub.sh (func_usage): Document allowed git options with
35711         'git pull'.
35712         (func_pull): Accept GIT_OPTIONS argument.
35713         (pull): Parse git options before complaining about too many arguments.
35714         Pass the git options to func_pull.
35716 2019-08-29  Bruno Haible  <bruno@clisp.org>
35718         lock: Fix cross-compilation guesses.
35719         * m4/pthread_rwlock_rdlock.m4 (gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER):
35720         Require AC_CANONICAL_HOST. When cross-compiling, guess no on most
35721         platforms.
35723 2019-08-28  Bruno Haible  <bruno@clisp.org>
35725         isfinite, isinf, isnan, signbit: Fix error in C++ mode on mingw.
35726         Reported by Martin Storsjö <martin@martin.st> in
35727         <https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00075.html>.
35728         * lib/math.in.h (_GL_MATH_CXX_REAL_FLOATING_DECL_2): Add more arguments.
35729         (isfinite, isinf, isnan, signbit): On platforms that use C++ include
35730         files from GCC 6 or newer, use an override through '#define', because
35731         the inline definitions in the platform's <cmath> cannot be overridden
35732         in another way.
35734 2019-08-27  Paul Eggert  <eggert@cs.ucla.edu>
35736         Revert macOS INT_MULTIPLY_WRAPV patch
35737         Problem reported by Bruno Haible in:
35738         https://lists.gnu.org/r/bug-gnulib/2019-08/msg00076.html
35739         * lib/intprops.h (_GL_HAS___builtin_mul_overflow): Remove.
35740         (_GL_HAS_BUILTIN_MUL_OVERFLOW):
35741         Go back to working around the Clang bug on macOS.
35743 2019-08-27  Bruno Haible  <bruno@clisp.org>
35745         libtool-next-version: Fix error output.
35746         * build-aux/libtool-next-version (func_fatal_error): Fix the program
35747         name.
35749 2019-08-27  Paul Eggert  <eggert@cs.ucla.edu>
35751         Speed up INT_MULTIPLY_WRAPV on macOS
35752         Assume that __builtin_mul_overflow works OK with Clang on macOS.
35753         Mattias Engdegård says it’s safe to assume the relevant library
35754         is always available there.
35755         * lib/intprops.h (_GL_HAS___builtin_mul_overflow):
35756         New temporary internal macro.
35757         (_GL_HAS_BUILTIN_MUL_OVERFLOW):
35758         No need to work around the Clang bug on macOS.
35760 2019-08-25  Paul Eggert  <eggert@cs.ucla.edu>
35762         intprops.h, verify.h: port better to clang
35763         Improve code generated by INT_ADD_WRAPV and INT_SUBTRACT_WRAPV
35764         with Clang.  Problem reported privately by Mattias Engdegård.
35765         Also, insulate intprops.h and verify.h better against each other’s
35766         definitions of __has_builtin on non-Clang hosts.
35767         * lib/intprops.h (__has_builtin): Define a temporary substitute
35768         if __has_builtin is not already defined.
35769         (_GL_HAS___builtin_add_overflow, _GL_TEMPDEF___has_builtin):
35770         New temporary internal macros.
35771         (_GL_HAS_BUILTIN_ADD_OVERFLOW, _GL_HAS_BUILTIN_MUL_OVERFLOW):
35772         Now two separate macros, replacing the old
35773         _GL_HAS_BUILTIN_OVERFLOW, since we no longer assume that
35774         __builtin_mul_overflow is like the rest.  All uses changed.
35775         (INT_ADD_WRAPV, INT_SUBTRACT_WRAPV, INT_MULTIPLY_WRAPV):
35776         Adjust to above changes.
35777         (_GL_INT_OP_WRAPV): Remove ‘builtin’ arg, since it’s no
35778         longer relevant.  All uses changed.
35779         * lib/verify.h (__has_builtin): Treat like intprops.h,
35780         so that the two .h files do not collide with each other.
35781         (_GL_HAS___builtin_unreachable, _GL_HAS___builtin_trap)
35782         (_GL_TEMPDEF___has_builtin): New temporary internal macros.
35784 2019-08-24  Paul Eggert  <eggert@cs.ucla.edu>
35786         intprops: say why not Clang __builtin_add_overflow
35787         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW):
35788         Mention Clang in comment, responding to a query from
35789         Mattias Engdegård.
35791 2019-08-24  Bruno Haible  <bruno@clisp.org>
35793         doc: Document most of the files outside of modules.
35794         * doc/gnulib.texi (Build Infrastructure Files,
35795         Release Management Files): New chapters.
35797 2019-08-24  Bruno Haible  <bruno@clisp.org>
35799         bootstrap: Keep in sync with the 'gettext' module.
35800         Reported by Assaf Gordon in
35801         <https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00045.html>.
35802         * build-aux/po/Makefile.in.in: Update to gettext 0.20.
35803         * build-aux/po/remove-potcdate.sin: Likewise.
35805 2019-08-24  Bruno Haible  <bruno@clisp.org>
35807         crypto/gc-sha512: Add tests.
35808         * tests/test-gc-sha512.c: New file, based on tests/test-gc-sha1.c.
35809         * modules/crypto/gc-sha512-tests: New file.
35811         crypto/gc-sha256: Add tests.
35812         * tests/test-gc-sha256.c: New file, based on tests/test-gc-sha1.c.
35813         * modules/crypto/gc-sha256-tests: New file.
35815         crypto/gc-sha256, crypto/gc-sha512: New modules.
35816         * lib/gc.h (gc_sha256, gc_sha512): New declarations.
35817         * lib/gc-gnulib.c: Include sha256.h, sha512.h.
35818         (MAX_DIGEST_SIZE): Set to 64.
35819         (_gc_hash_ctx, gc_hash_open, gc_hash_digest_length, gc_hash_write,
35820         gc_hash_read, gc_hash_buffer): Add support for sha256 and sha512.
35821         (gc_sha256, gc_sha512): New functions.
35822         * lib/gc-libgcrypt.c (gc_sha256, gc_sha512): New functions.
35823         * modules/crypto/gc-sha256: New file, based on modules/crypto/gc-sha1.
35824         * modules/crypto/gc-sha512: New file, based on modules/crypto/gc-sha1.
35826 2019-08-24  Bruno Haible  <bruno@clisp.org>
35828         crypto/gc-sha1 tests: Improve output when the test fails.
35829         * tests/test-gc-sha1.c (main): In case of mismatch, print the entire
35830         output.
35832 2019-08-24  Bruno Haible  <bruno@clisp.org>
35834         crypto/gc-sm3: Fix compilation error with --with-libgcrypt.
35835         * m4/gc-sm3.m4 (gl_GC_SM3): Test whether libgcrypt supports SM3. Define
35836         LIBGCRYPT_HAS_MD_SM3.
35837         * lib/gc-libgcrypt.c: Include sm3.h.
35838         (_gc_hash_ctx, gc_hash_open, gc_hash_hmac_setkey, gc_hash_write,
35839         gc_hash_read, gc_hash_close, gc_hash_buffer, gc_sm3): Use the gnulib
35840         implementation if libgcrypt does not support SM3.
35842 2019-08-24  Bruno Haible  <bruno@clisp.org>
35844         crypto/gc-md2: Optimize and clarify code.
35845         * lib/gc-gnulib.c (gc_hash_open): Comment out md2_init_ctx invocation.
35846         * lib/gc-libgcrypt.c (gc_hash_open): Clarify why md2_init_ctx invocation
35847         is not needed.
35849 2019-08-24  Bruno Haible  <bruno@clisp.org>
35851         crypto/gc-md2: Add comment.
35852         * lib/gc-libgcrypt.c: Add comment.
35854 2019-08-24  Bruno Haible  <bruno@clisp.org>
35856         crypto/gc-{md[24],rijndael} tests: Fix link error with --with-libgcrypt.
35857         * modules/crypto/gc-md2-tests (test_gc_md2_LDADD): New variable.
35858         * modules/crypto/gc-md4-tests (test_gc_md4_LDADD): New variable.
35859         * modules/crypto/gc-rijndael-tests (test_gc_rijndael_LDADD): New
35860         variable.
35862 2019-08-24  Bruno Haible  <bruno@clisp.org>
35864         crypto/gc: Fix link error with --with-libgcrypt.
35865         * m4/gc.m4 (gl_GC): Set LIB_CRYPTO to the value found by the
35866         AC_LIB_HAVE_LINKFLAGS invocation.
35868 2019-08-24  Bruno Haible  <bruno@clisp.org>
35870         crypto/gc: Access the module indicators correctly.
35871         * lib/gc-gnulib.c: Use '#if GNULIB_GC_*', not '#ifdef GNULIB_GC_*'.
35872         * lib/gc-libgcrypt.c: Likewise.
35874 2019-08-24  Bruno Haible  <bruno@clisp.org>
35876         crypto/gc: Fix configuration with --with-libgcrypt.
35877         * m4/libgcrypt.m4: New file, copied from libgcrypt/src/libgcrypt.m4.
35878         * modules/crypto/gc (Files): Add it.
35879         * m4/gc.m4 (gl_GC): Assume AM_PATH_LIBGCRYPT is defined.
35881 2019-08-24  Bruno Haible  <bruno@clisp.org>
35883         Remove unused file.
35884         * m4/stat-macros.m4: Remove file.
35886 2019-08-21  Paul Eggert  <eggert@cs.ucla.edu>
35888         New strip-trailing-space option for srclist-update
35889         * config/srclist-update (fixfile): Support new option.
35890         * config/srclist.txt (texinfo.tex, maintain.texi, standards.texi):
35891         Use it.
35893 2019-08-20  Eric Blake  <eblake@redhat.com>
35895         accept4: Support SOCK_NONBLOCK, if defined
35896         * lib/accept4.c (accept4): If SOCK_NONBLOCK is defined, honor it.
35898         accept4: Fix compilation when native accept4() exists.
35899         Reported by Richard W.M. Jones <rjones@redhat.com> in
35900         https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00029.html
35901         * lib/accept4.c (accept4): Match witness symbol to m4 file update.
35903 2019-08-18  Bruno Haible  <bruno@clisp.org>
35905         Defeat -flto GCC optimization in math autoconf tests.
35906         Reported by Tomasz Kłoczko <kloczko.tomasz@gmail.com>
35907         at <https://savannah.gnu.org/bugs/?56109>.
35908         * m4/mathfunc.m4 (gl_MATHFUNC): Mark function pointer as 'volatile'.
35909         * m4/acosl.m4 (gl_FUNC_ACOSL): Likewise.
35910         * m4/asinl.m4 (gl_FUNC_ASINL): Likewise.
35911         * m4/atanl.m4 (gl_FUNC_ATANL): Likewise.
35912         * m4/cosl.m4 (gl_FUNC_COSL): Likewise.
35913         * m4/exp2.m4 (gl_FUNC_EXP2): Likewise.
35914         * m4/expl.m4 (gl_FUNC_EXPL): Likewise.
35915         * m4/expm1.m4 (gl_FUNC_EXPM1): Likewise.
35916         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Likewise.
35917         * m4/sinl.m4 (gl_FUNC_SINL): Likewise.
35918         * m4/sqrtl.m4 (gl_FUNC_SQRTL): Likewise.
35919         * m4/tanl.m4 (gl_FUNC_TANL): Likewise.
35921 2019-08-17  Bruno Haible  <bruno@clisp.org>
35923         windows-spin: Implement declared functions.
35924         Reported by Gisle Vanem <gisle.vanem@gmail.com> in
35925         <https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00024.html>.
35926         * lib/windows-spin.c (glwthread_spin_trylock): Fix typo in function
35927         name.
35929 2019-08-17  Paul Eggert  <eggert@cs.ucla.edu>
35931         intprops: port to Oracle Developer Studio 12.6
35932         * lib/intprops.h (_GL_INT_OP_WRAPV): Fix recently-introduced
35933         typos that were in a section not compiled by GCC.
35935 2019-08-14  Paul Eggert  <eggert@cs.ucla.edu>
35937         intprops: support uchar, ushort _WRAPV dests
35938         * lib/intprops.h (_GL_INT_OP_WRAPV_SMALLISH): New macro, defined
35939         when __builtin_add_overflow etc. and _Generic are not used.
35940         (_GL_INT_OP_WRAPV): Use it to support destinations that
35941         are unsigned char or unsigned short, even in compilers
35942         that lack __typeof__ and are not C11-compatible.
35944         intprops: pacify picky GCC
35945         * lib/intprops.h (_GL_BUILTIN_MUL_OVERFLOW):
35946         Pacify GCC’s complaints about ignoring __builtin_mul_overflow’s
35947         possibly-incorrect result.
35948         (_GL_INT_MULTIPLY_RANGE_OVERFLOW): Pacify GCC’s complaints
35949         about (A) used as a boolean, when A is an expression like 3 * 4.
35951         intprops: support unsigned *_WRAPV results
35952         Add support for unsigned, unsigned long, and unsigned long long
35953         results to INT_ADD_WRAPV, INT_SUBTRACT_WRAPV, and
35954         INT_MULTIPLY_WRAPV.  Also, work around GCC bug 91450, and fix a
35955         bug with unsigned inputs reported by Eli Zaretskii in:
35956         https://lists.gnu.org/r/bug-gnulib/2019-08/msg00012.html
35957         * config/srclist.txt: Break the glibc connection for intprops.h
35958         temporarily, while more testing is done in Gnulib-using apps.
35959         * lib/intprops.h (INT_ADD_WRAPV, INT_SUBTRACT_WRAPV)
35960         (INT_MULTIPLY_WRAPV, _GL_INT_OP_WRAPV, _GL_INT_OP_WRAPV_LONGISH):
35961         Support unsigned results no narrower than unsigned int.  Report
35962         overflow correctly if some arguments are unsigned.
35963         (_GL_BUILTIN_MUL_OVERFLOW): New macro, to work around GCC bug 91450.
35964         (_GL_INT_OP_CALC): Simplify now that the OVERFLOW argument does
35965         the right thing with narrow args.
35966         (_GL_INT_OP_CALC1): Remove.  All callers removed.
35967         (_GL_INT_ADD_RANGE_OVERFLOW, _GL_INT_SUBTRACT_RANGE_OVERFLOW)
35968         (_GL_INT_MULTIPLY_RANGE_OVERFLOW): New macros.
35969         * tests/test-intprops.c: Check for bugs and test new behavior.
35971 2019-08-14  Bruno Haible  <bruno@clisp.org>
35973         get_progname_of: New module.
35974         * lib/get_progname_of.h: New file.
35975         * lib/get_progname_of.c: New file, based on lib/getprogname.c.
35976         * lib/getprogname.c (getprogname): Tweak coding style.
35977         * lib/vma-iter.c (vma_iterate_bsd): Update comment.
35978         * modules/get_progname_of: New file.
35980 2019-08-14  Bruno Haible  <bruno@clisp.org>
35982         get_ppid_of: New module.
35983         * lib/get_ppid_of.h: New file.
35984         * lib/get_ppid_of.c: New file.
35985         * modules/get_ppid_of: New file.
35987 2019-08-13  Bruno Haible  <bruno@clisp.org>
35989         libtextstyle-optional tests: Support the NO_COLOR environment variable.
35990         * tests/test-libtextstyle.c (main): Do not emit styling when the
35991         environment variable NO_COLOR is set.
35993 2019-08-12  Paul Eggert  <eggert@cs.ucla.edu>
35995         verify: improve diagnostic quality in recent GCC
35996         If ‘verify’ fails in a deeply-nested macro, GCC does not output a
35997         useful line number containing the top-level caller of the macro.
35998         So, bring back the older way of issuing a diagnostic containing
35999         the top-level call’s arg, so that it is easier to diagnose
36000         ‘verify’ failures with recent GCC.
36001         * lib/verify.h (_GL_VERIFY_TRUE, _GL_VERIFY_TYPE):
36002         Bring back DIAGNOSTIC arg.  All callers changed.
36003         (verify): Just use _GL_VERIFY.
36005 2019-08-11  Bruno Haible  <bruno@clisp.org>
36007         localcharset: Add more aliases for OS/2.
36008         Based on patch by KO Myung-Hun <komh78@gmail.com> in
36009         <https://lists.gnu.org/archive/html/bug-gnu-libiconv/2019-08/msg00004.html>.
36010         * lib/localcharset.c (alias_table) [OS2]: Add more aliases.
36012 2019-08-10  Eric Blake  <eblake@redhat.com>
36014         configmake: Update advice on usage.
36015         * modules/configmake (Include): No longer necessary to include
36016         last, since configmake.h itself worries about collision avoidance.
36018 2019-08-10  Assaf Gordon <assafgordon@gmail.com>
36020         parse-datetime: fix 'T' military timezone handling
36021         * lib/parse-datetime.y (zone):
36022         follow-up to the previous commit: the 'T' case is handled outside the
36023         conversion table (used as either military timezone UTC-7 or ISO8601
36024         separator). Change it from "HOUR(7)" to "-HOUR(7)" to match other
36025         timezone letters.
36027 2019-08-09  Paul Eggert  <eggert@cs.ucla.edu>
36029         parse-datetime: fix military timezone letters
36030         Problem and trivial fix reported by Neil Hoggarth in:
36031         https://lists.gnu.org/r/bug-gnulib/2019-08/msg00005.html
36032         * lib/parse-datetime.y (military_table):
36033         Do it the right way, not the RFC 822 way.
36035 2019-08-08  Eric Blake  <eblake@redhat.com>
36037         configmake: Avoid namespace pollution issue on mingw.
36038         * modules/configmake (Makefile.am): If the project uses
36039         <winsock2.h>, include that header before defining DATADIR.
36041 2019-07-28  Bruno Haible  <bruno@clisp.org>
36043         mbrtowc tests: Fix regression on mingw (regression from 2018-02-24).
36044         * tests/test-mbrtowc.c (main): Fix expected value of wc.
36046 2019-07-24  Bruno Haible  <bruno@clisp.org>
36048         pthread-h: Fix definitions of types and macros on mingw.
36049         * lib/pthread.in.h (pthread_t, pthread_attr_t, PTHREAD_CREATE_JOINABLE,
36050         PTHREAD_CREATE_DETACHED): Define also when module 'pthread-thread' is
36051         not in use.
36052         (pthread_once_t, PTHREAD_ONCE_INIT): Define also when module
36053         'pthread-once' is not in use.
36054         (pthread_mutex_t, pthread_mutexattr_t, PTHREAD_MUTEX_INITIALIZER,
36055         PTHREAD_MUTEX_DEFAULT, PTHREAD_MUTEX_NORMAL, PTHREAD_MUTEX_ERRORCHECK,
36056         PTHREAD_MUTEX_RECURSIVE): Define also when module 'pthread-mutex' is not
36057         in use.
36058         (pthread_rwlock_t, pthread_rwlockattr_t, PTHREAD_RWLOCK_INITIALIZER):
36059         Define also when module 'pthread-rwlock' is not in use.
36060         (pthread_cond_t, pthread_condattr_t, PTHREAD_COND_INITIALIZER): Define
36061         also when module 'pthread-cond' is not in use.
36062         (pthread_key_t, PTHREAD_DESTRUCTOR_ITERATIONS): Define also when module
36063         'pthread-tss' is not in use.
36064         (pthread_spinlock_t): Define also when module 'pthread-spin' is not in
36065         use.
36067 2019-07-24  Simon Josefsson  <simon@josefsson.org>
36069         crypto/gc: Cope with libgcrypt without SM3.
36070         * lib/gc-libgcrypt.c (gc_hash_open): Guard SM3 usage.
36072 2019-07-23  Paul Eggert  <eggert@cs.ucla.edu>
36074         backupfile: fix resource leak on memory failure
36075         Problem found by Coverity (CID 1484214).
36076         * lib/backupfile.c (backupfile_internal): Don’t leak dirp.
36078 2019-07-22  Bruno Haible  <bruno@clisp.org>
36080         Avoid missing-declarations warning in various tests.
36081         * tests/test-argp.c (fail, test1, test2, test_file, test3, test4, test5,
36082         test6, test_optional, test7, test8, test9, test10, test11, test12,
36083         test13, test14, test15, test_fun): Declare static.
36084         * tests/test-cnd.c (test_cnd_wait): Likewise.
36085         * tests/test-cond.c (test_cond): Likewise.
36087 2019-07-22  Bernhard Voelker  <mail@bernhard-voelker.de>
36089         pthread tests: Avoid missing-declarations warning.
36090         * tests/test-pthread-cond.c (test_pthread_cond_wait): Declare static.
36092 2019-07-19  Bruno Haible  <bruno@clisp.org>
36094         parse-datetime: Avoid warnings from bison versions >= 3.3.
36095         Reported by Bernhard Voelker <mail@bernhard-voelker.de>.
36096         * modules/parse-datetime (Makefile.am): Don't pass option '-y' to bison.
36098 2019-07-19  Bruno Haible  <bruno@clisp.org>
36100         parse-datetime: Require Bison 2.4 or newer.
36101         * m4/parse-datetime.m4 (gl_PARSE_DATETIME): Set PARSE_DATETIME_BISON.
36102         Code taken from gettext's intl.m4.
36103         * modules/parse-datetime (Makefile.am): Use PARSE_DATETIME_BISON instead
36104         of YACC.
36106 2019-07-19  Bruno Haible  <bruno@clisp.org>
36108         areadlink-with-size, xgethostname, xgetdomainname: Fix GCC warning.
36109         * lib/areadlink-with-size.c: Include <string.h>.
36110         * lib/areadlinkat-with-size.c: Likewise.
36111         * lib/xgethostname.c: Likewise.
36112         * lib/xgetdomainname.c: Likewise.
36114 2019-07-19  Bernhard Voelker  <mail@bernhard-voelker.de>
36116         parse-datetime: avoid "%pure-parser" deprecation warning from Bison 3.4
36117         * lib/parse-datetime.y: Use "%define api.pure" rather than obsolescent
36118         "%pure-parser".  The former is available since Bison 2.3b (2008),
36119         while the latter is marked as obsolete since version 3.4 (May 2019).
36121 2019-07-16  Bruno Haible  <bruno@clisp.org>
36123         update-copyright: Make it work again (regression from 2019-06-15).
36124         Reported by Brian C. Lane <bcl@redhat.com>.
36125         * build-aux/update-copyright: Add back the -0777, -p, -i options.
36127 2019-07-14  Bruno Haible  <bruno@clisp.org>
36129         doc: Update info about <pthread.h>.
36130         * doc/posix-headers/pthread.texi: Mention the module 'pthread-h' instead
36131         of 'pthread'.
36133 2019-07-14  Bruno Haible  <bruno@clisp.org>
36135         pthread_sigmask tests: Use new multithread modules.
36136         * tests/test-pthread_sigmask2.c: Include <pthread.h> instead of
36137         glthread/thread.h.
36138         (main_thread, killer_thread): Change type to pthread_t.
36139         (main): Update accordingly.
36140         * modules/pthread_sigmask-tests (Depends-on): Add pthread-thread. Remove
36141         thread.
36143 2019-07-14  Bruno Haible  <bruno@clisp.org>
36145         pthread-tss: Add tests.
36146         * tests/test-pthread-tss.c: New file, based on tests/test-tls.c and
36147         tests/test-tss.c.
36148         * modules/pthread-tss-tests: New file.
36150 2019-07-14  Bruno Haible  <bruno@clisp.org>
36152         pthread-cond: Add tests.
36153         * tests/test-pthread-cond.c: New file, based on tests/test-cond.c and
36154         tests/test-cnd.c.
36155         * modules/pthread-cond-tests: New file.
36157 2019-07-14  Bruno Haible  <bruno@clisp.org>
36159         pthread-rwlock: Add tests.
36160         * tests/test-pthread-rwlock.c: New file, based on tests/test-lock.c.
36161         * modules/pthread-rwlock-tests: New file.
36163 2019-07-14  Bruno Haible  <bruno@clisp.org>
36165         pthread-mutex: Add tests.
36166         * tests/test-pthread-mutex.c: New file, based on tests/test-lock.c and
36167         tests/test-mtx.c.
36168         * modules/pthread-mutex-tests: New file.
36170 2019-07-14  Bruno Haible  <bruno@clisp.org>
36172         pthread-once: Add tests.
36173         * tests/test-pthread-once1.c: New file, based on tests/test-once.c and
36174         tests/test-call_once.c.
36175         * tests/test-pthread-once2.c: New file, based on tests/test-lock.c and
36176         tests/test-mtx.c.
36177         * modules/pthread-once-tests: New file.
36179 2019-07-14  Bruno Haible  <bruno@clisp.org>
36181         pthread-thread: Add tests.
36182         * tests/test-pthread-thread.c: New file, based on
36183         tests/test-thread_create.c and tests/test-thrd_create.c.
36184         * modules/pthread-thread-tests: New file.
36186 2019-07-14  Bruno Haible  <bruno@clisp.org>
36188         pthread: Turn into a convenience module.
36189         * lib/pthread.in.h: Remove declarations for extern inline functions.
36190         * lib/pthread.c: Remove file.
36191         * modules/pthread (Files): Remove it.
36192         (Depends-on): Add pthread-thread, pthread-once, pthread-mutex,
36193         pthread-rwlock, pthread-cond, pthread-tss, pthread-spin.
36194         (configure.ac): Don't compile lib/pthread.c. Don't set GNULIB_PTHREAD.
36195         * m4/pthread_h.m4 (gl_PTHREAD_H_DEFAULTS): Don't initialize
36196         GNULIB_PTHREAD.
36197         * modules/pthread-h (Makefile.am): Don't substitute GNULIB_PTHREAD.
36199 2019-07-14  Bruno Haible  <bruno@clisp.org>
36201         pthread-spin: New module.
36202         * lib/pthread.in.h (pthread_spin_init, pthread_spin_destroy,
36203         pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock): Remove
36204         inline definitions.
36205         * lib/pthread-spin.c: New file.
36206         * m4/pthread-spin.m4: New file.
36207         * modules/pthread-spin: New file.
36208         * doc/posix-functions/pthread_spin_init.texi: Mention the new module.
36209         * doc/posix-functions/pthread_spin_lock.texi: Likewise.
36210         * doc/posix-functions/pthread_spin_trylock.texi: Likewise.
36211         * doc/posix-functions/pthread_spin_unlock.texi: Likewise.
36212         * doc/posix-functions/pthread_spin_destroy.texi: Likewise.
36214 2019-07-14  Bruno Haible  <bruno@clisp.org>
36216         pthread-tss: New module.
36217         * lib/pthread-tss.c: New file.
36218         * m4/pthread-tss.m4: New file.
36219         * modules/pthread-tss: New file.
36220         * doc/posix-functions/pthread_key_create.texi: Mention the new module.
36221         * doc/posix-functions/pthread_setspecific.texi: Likewise.
36222         * doc/posix-functions/pthread_getspecific.texi: Likewise.
36223         * doc/posix-functions/pthread_key_delete.texi: Likewise.
36225 2019-07-14  Bruno Haible  <bruno@clisp.org>
36227         pthread-cond: New module.
36228         * lib/pthread.in.h (pthread_cond_destroy, pthread_cond_init,
36229         pthread_cond_signal, pthread_cond_wait): Remove inline definitions.
36230         * lib/pthread-cond.c: New file.
36231         * m4/pthread-cond.m4: New file.
36232         * modules/pthread-cond: New file.
36233         * doc/posix-functions/pthread_cond_init.texi: Mention the new module.
36234         * doc/posix-functions/pthread_condattr_init.texi: Likewise.
36235         * doc/posix-functions/pthread_condattr_destroy.texi: Likewise.
36236         * doc/posix-functions/pthread_cond_wait.texi: Likewise.
36237         * doc/posix-functions/pthread_cond_timedwait.texi: Likewise.
36238         * doc/posix-functions/pthread_cond_signal.texi: Likewise.
36239         * doc/posix-functions/pthread_cond_broadcast.texi: Likewise.
36240         * doc/posix-functions/pthread_cond_destroy.texi: Likewise.
36242 2019-07-14  Bruno Haible  <bruno@clisp.org>
36244         pthread-rwlock: New module.
36245         * lib/pthread-rwlock.c: New file, based on lib/glthread/lock.c.
36246         * m4/pthread-rwlock.m4: New file.
36247         * modules/pthread-rwlock: New file.
36248         * doc/posix-functions/pthread_rwlock_init.texi: Mention the new module
36249         and the Android problem.
36250         * doc/posix-functions/pthread_rwlockattr_init.texi: Likewise.
36251         * doc/posix-functions/pthread_rwlockattr_destroy.texi: Likewise.
36252         * doc/posix-functions/pthread_rwlock_rdlock.texi: Likewise.
36253         * doc/posix-functions/pthread_rwlock_wrlock.texi: Likewise.
36254         * doc/posix-functions/pthread_rwlock_tryrdlock.texi: Likewise.
36255         * doc/posix-functions/pthread_rwlock_trywrlock.texi: Likewise.
36256         * doc/posix-functions/pthread_rwlock_timedrdlock.texi: Likewise.
36257         * doc/posix-functions/pthread_rwlock_timedwrlock.texi: Likewise.
36258         * doc/posix-functions/pthread_rwlock_unlock.texi: Likewise.
36259         * doc/posix-functions/pthread_rwlock_destroy.texi: Likewise.
36261 2019-07-14  Bruno Haible  <bruno@clisp.org>
36263         pthread-mutex: New module.
36264         * lib/pthread.in.h (pthread_mutexattr_destroy, pthread_mutexattr_init,
36265         pthread_mutexattr_settype, pthread_mutex_destroy, pthread_mutex_init,
36266         pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_timedlock,
36267         pthread_mutex_unlock): Remove inline definitions.
36268         * lib/pthread-mutex.c: New file.
36269         * m4/pthread-mutex.m4: New file.
36270         * modules/pthread-mutex: New file.
36271         * doc/posix-functions/pthread_mutex_init.texi: Mention the new module.
36272         * doc/posix-functions/pthread_mutexattr_init.texi: Likewise.
36273         * doc/posix-functions/pthread_mutexattr_gettype.texi: Likewise.
36274         * doc/posix-functions/pthread_mutexattr_settype.texi: Likewise.
36275         * doc/posix-functions/pthread_mutexattr_getrobust.texi: Likewise.
36276         * doc/posix-functions/pthread_mutexattr_setrobust.texi: Likewise.
36277         * doc/posix-functions/pthread_mutexattr_destroy.texi: Likewise.
36278         * doc/posix-functions/pthread_mutex_lock.texi: Likewise.
36279         * doc/posix-functions/pthread_mutex_trylock.texi: Likewise.
36280         * doc/posix-functions/pthread_mutex_timedlock.texi: Likewise.
36281         * doc/posix-functions/pthread_mutex_unlock.texi: Likewise.
36282         * doc/posix-functions/pthread_mutex_destroy.texi: Likewise.
36284 2019-07-14  Bruno Haible  <bruno@clisp.org>
36286         pthread-once: New module.
36287         * lib/pthread-once.c: New file.
36288         * m4/pthread-once.m4: New file.
36289         * modules/pthread-once: New file.
36290         * doc/posix-functions/pthread_once.texi: Mention the new module.
36292 2019-07-14  Bruno Haible  <bruno@clisp.org>
36294         pthread-thread: New module.
36295         * lib/pthread.in.h (pthread_create, pthread_exit, pthread_join): Remove
36296         inline definitions.
36297         * lib/pthread-thread.c: New file.
36298         * m4/pthread-thread.m4: New file.
36299         * modules/pthread-thread: New file.
36300         * doc/posix-functions/pthread_create.texi: Mention the new module.
36301         * doc/posix-functions/pthread_attr_init.texi: Likewise.
36302         * doc/posix-functions/pthread_attr_getdetachstate.texi: Likewise.
36303         * doc/posix-functions/pthread_attr_setdetachstate.texi: Likewise.
36304         * doc/posix-functions/pthread_attr_destroy.texi: Likewise.
36305         * doc/posix-functions/pthread_self.texi: Likewise.
36306         * doc/posix-functions/pthread_equal.texi: Likewise.
36307         * doc/posix-functions/pthread_detach.texi: Likewise.
36308         * doc/posix-functions/pthread_join.texi: Likewise.
36309         * doc/posix-functions/pthread_exit.texi: Likewise.
36311 2019-07-14  Bruno Haible  <bruno@clisp.org>
36313         pthread-h: Prepare for adding new modules.
36314         * lib/pthread.in.h: Define the types and macros for each of the
36315         facilities separately.
36316         * m4/pthread_h.m4 (gl_PTHREAD_H): Set HAVE_PTHREAD_CREATE_DETACHED,
36317         HAVE_PTHREAD_MUTEX_RECURSIVE, HAVE_PTHREAD_MUTEX_ROBUST,
36318         HAVE_PTHREAD_PROCESS_SHARED.
36319         (gl_PTHREAD_H_DEFAULTS): Initialize HAVE_PTHREAD_CREATE_DETACHED,
36320         HAVE_PTHREAD_MUTEX_RECURSIVE, HAVE_PTHREAD_MUTEX_ROBUST,
36321         HAVE_PTHREAD_PROCESS_SHARED.
36322         * modules/pthread-h (Makefile.am): Substitute
36323         HAVE_PTHREAD_CREATE_DETACHED, HAVE_PTHREAD_MUTEX_RECURSIVE,
36324         HAVE_PTHREAD_MUTEX_ROBUST, HAVE_PTHREAD_PROCESS_SHARED.
36326 2019-07-14  Bruno Haible  <bruno@clisp.org>
36328         pthread-h: Add declarations of essential pthread functions.
36329         * lib/pthread.in.h: Include snippets.
36330         (pthread_create, pthread_attr_init, pthread_attr_getdetachstate,
36331         pthread_attr_setdetachstate, pthread_attr_destroy, pthread_self,
36332         pthread_equal, pthread_detach, pthread_join, pthread_exit, pthread_once,
36333         pthread_mutex_init, pthread_mutexattr_init, pthread_mutexattr_gettype,
36334         pthread_mutexattr_settype, pthread_mutexattr_getrobust,
36335         pthread_mutexattr_setrobust, pthread_mutexattr_destroy,
36336         pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_unlock,
36337         pthread_mutex_destroy, pthread_rwlock_init, pthread_rwlockattr_init,
36338         pthread_rwlockattr_destroy, pthread_rwlock_rdlock,
36339         pthread_rwlock_wrlock, pthread_rwlock_tryrdlock,
36340         pthread_rwlock_trywrlock, pthread_rwlock_timedrdlock,
36341         pthread_rwlock_timedwrlock, pthread_rwlock_unlock,
36342         pthread_rwlock_destroy, pthread_cond_init, pthread_condattr_init,
36343         pthread_condattr_destroy, pthread_cond_wait, pthread_cond_timedwait,
36344         pthread_cond_signal, pthread_cond_broadcast, pthread_cond_destroy,
36345         pthread_key_create, pthread_setspecific, pthread_getspecific,
36346         pthread_key_delete, pthread_spin_init, pthread_spin_lock,
36347         pthread_spin_trylock, pthread_spin_unlock, pthread_spin_destroy): New
36348         declarations.
36349         (pthread_mutex_timedlock): Move declaration.
36350         * m4/pthread_h.m4 (gl_PTHREAD_H): Check whether the new functions are
36351         declared.
36352         (gl_PTHREAD_H_DEFAULTS): Initialize GNULIB_PTHREAD_THREAD,
36353         GNULIB_PTHREAD_ONCE, GNULIB_PTHREAD_MUTEX, GNULIB_PTHREAD_RWLOCK,
36354         GNULIB_PTHREAD_COND, GNULIB_PTHREAD_TSS, GNULIB_PTHREAD_SPIN and the
36355         HAVE_* and REPLACE_* variables for the new functions.
36356         * modules/pthread-h (Depends-on): Add snippet/c++defs,
36357         snippet/_Noreturn, snippet/arg-nonnull, snippet/warn-on-use.
36358         (Makefile.am): Substitute GNULIB_PTHREAD_THREAD, GNULIB_PTHREAD_ONCE,
36359         GNULIB_PTHREAD_MUTEX, GNULIB_PTHREAD_RWLOCK, GNULIB_PTHREAD_COND,
36360         GNULIB_PTHREAD_TSS, GNULIB_PTHREAD_SPIN and the HAVE_* and REPLACE_*
36361         variables for the new functions. Split the sed script, to avoid the
36362         limit of 99 commands of HP-UX sed.
36363         * tests/test-pthread-c++.cc: Check the signature of the new functions.
36365 2019-07-14  Bruno Haible  <bruno@clisp.org>
36367         pthread-h: Respect --enable-threads={posix|windows} option on mingw.
36368         * m4/pthread_h.m4 (gl_PTHREAD_H): Require gl_THREADLIB. Set
36369         HAVE_PTHREAD_H if gl_threads_api is 'windows'.
36370         (LIB_PTHREAD): Rely on $LIBMULTITHREAD from threadlib.m4.
36371         * modules/pthread (Link): Change to $(LIBMULTITHREAD).
36372         * modules/pthread-h (Depends-on): Add threadlib.
36373         (Link): Change to $(LIBTHREAD).
36374         * modules/pthread-h-c++-tests (test_pthread_c___LDADD): Use
36375         $(LIBMULTITHREAD) instead of $(LIB_PTHREAD).
36377 2019-07-14  Bruno Haible  <bruno@clisp.org>
36379         pthread-h: Add C++ tests.
36380         * tests/test-pthread-c++.cc: New file.
36381         * modules/pthread-h-c++-tests: New file.
36383 2019-07-14  Bruno Haible  <bruno@clisp.org>
36385         pthread-h: Add tests.
36386         * tests/test-pthread.c: New file.
36387         * modules/pthread-h-tests: New file.
36389 2019-07-14  Bruno Haible  <bruno@clisp.org>
36391         pthread-h: New module.
36392         * lib/pthread.in.h: Define replacement functions only if GNULIB_PTHREAD
36393         is 1.
36394         * m4/pthread_h.m4: Renamed from m4/pthread.m4.
36395         (gl_PTHREAD_H): Renamed from gl_PTHREAD_CHECK. Don't test whether
36396         <pthread.h> pollutes the namespace; instead, prepare for generating a
36397         pthread.h always. Substitute HAVE_PTHREAD_H here.
36398         (gl_PTHREAD_H_DEFAULTS): Renamed from gl_PTHREAD_DEFAULTS. Initialize
36399         GNULIB_PTHREAD. Don't initialize HAVE_PTHREAD_H here.
36400         * modules/pthread-h: New file, based on modules/pthread.
36401         * modules/pthread: Rely on 'pthread-h'.
36402         * m4/pthread_mutex_timedlock.m4 (gl_FUNC_PTHREAD_MUTEX_TIMEDLOCK):
36403         Update.
36404         * modules/pthread_mutex_timedlock (Depends-on): Add pthread-h. Remove
36405         pthread.
36407 2019-07-14  Bruno Haible  <bruno@clisp.org>
36409         sched_yield: New module.
36410         * lib/sched.in.h: Add _GL_FUNCDECL_RPL, _GL_WARN_ON_USE placeholders.
36411         (sched_yield): New declaration.
36412         * lib/sched_yield.c: New file.
36413         * m4/sched_yield.m4: New file.
36414         * m4/sched_h.m4 (gl_SCHED_H): Require gl_SCHED_H_DEFAULTS. Arrange to
36415         provide a replacement sched.h always. Test whether sched_yield is
36416         declared.
36417         (gl_SCHED_MODULE_INDICATOR, gl_SCHED_H_DEFAULTS): New macros.
36418         * modules/sched (Depends-on): Add snippet/c++defs, snippet/warn-on-use.
36419         (Makefile.am): Provide a replacement sched.h always. Substitute
36420         GNULIB_SCHED_YIELD, HAVE_SCHED_YIELD, REPLACE_SCHED_YIELD,
36421         _GL_FUNCDECL_RPL, _GL_WARN_ON_USE.
36422         * modules/sched_yield: New file.
36423         * doc/posix-functions/sched_yield.texi: Mention the new module.
36425 2019-07-14  Bruno Haible  <bruno@clisp.org>
36427         windows-spin: New module.
36428         * lib/windows-spin.h: New file.
36429         * lib/windows-spin.c: New file.
36430         * modules/windows-spin: New file.
36432 2019-07-14  Bruno Haible  <bruno@clisp.org>
36434         windows-timedrwlock: New module.
36435         * lib/windows-timedrwlock.h: New file, based on windows-rwlock.h.
36436         * lib/windows-timedrwlock.c: New file, based on windows-rwlock.c and
36437         windows-cond.c.
36438         * lib/windows-cond.h (struct glwthread_waitqueue_link): Protect against
36439         redefinition conflict with windows-timedrwlock.h.
36440         * modules/windows-timedrwlock: New file.
36442 2019-07-14  Bruno Haible  <bruno@clisp.org>
36444         windows-rwlock: New module.
36445         * lib/windows-rwlock.h: New file, extracted from lib/glthread/lock.h.
36446         * lib/windows-rwlock.c: New file, extracted from lib/glthread/lock.c.
36447         * lib/glthread/lock.h: Include windows-rwlock.h. Don't include
36448         windows-initguard.h.
36449         (gl_rwlock_t): Define using glwthread_rwlock_t.
36450         (gl_rwlock_initializer): Define using GLWTHREAD_RWLOCK_INIT.
36451         (glthread_rwlock_init): Define using glwthread_rwlock_init.
36452         (glthread_rwlock_rdlock): Define using glwthread_rwlock_rdlock.
36453         (glthread_rwlock_wrlock): Define using glwthread_rwlock_wrlock.
36454         (glthread_rwlock_unlock): Define using glwthread_rwlock_unlock.
36455         (glthread_rwlock_destroy): Define using glwthread_rwlock_destroy.
36456         (glthread_rwlock_init_func, glthread_rwlock_rdlock_func,
36457         glthread_rwlock_wrlock_func, glthread_rwlock_unlock_func,
36458         glthread_rwlock_destroy_func): Remove declarations.
36459         * lib/glthread/lock.c (gl_waitqueue_t): Remove type.
36460         (gl_waitqueue_init, gl_waitqueue_add, gl_waitqueue_notify_first,
36461         gl_waitqueue_notify_all, glthread_rwlock_init_func,
36462         glthread_rwlock_rdlock_func, glthread_rwlock_wrlock_func,
36463         glthread_rwlock_unlock_func, glthread_rwlock_destroy_func): Remove
36464         functions.
36465         * modules/windows-rwlock: New file.
36466         * modules/lock (Depends-on): Add windows-rwlock.
36468 2019-07-14  Bruno Haible  <bruno@clisp.org>
36470         windows-thread: Add support for creating a thread in detached state.
36471         * lib/windows-thread.h (GLWTHREAD_ATTR_DETACHED): New macro.
36472         (glwthread_thread_create): Add attr argument.
36473         * lib/windows-thread.c (glwthread_thread_create): Likewise.
36474         * lib/glthread/thread.h (glthread_create): Update.
36475         * lib/thrd.c (thrd_create): Update.
36477 2019-07-14  Bruno Haible  <bruno@clisp.org>
36479         windows-*: Rename glwthread_spinlock_t to glwthread_initguard_t.
36480         * lib/windows-initguard.h: Renamed from lib/windows-spinlock.h.
36481         (glwthread_initguard_t): Renamed from glwthread_spinlock_t.
36482         (GLWTHREAD_INITGUARD_INIT): Renamed from GLWTHREAD_SPINLOCK_INIT.
36483         * lib/windows-mutex.h: Update.
36484         * lib/windows-recmutex.h: Likewise.
36485         * lib/windows-timedmutex.h: Likewise.
36486         * lib/windows-timedrecmutex.h: Likewise.
36487         * lib/windows-cond.h: Likewise.
36488         * lib/glthread/lock.h: Likewise.
36489         * modules/windows-mutex (Files): Add lib/windows-initguard.h. Remove
36490         lib/windows-spinlock.h.
36491         * modules/windows-recmutex (Files): Likewise.
36492         * modules/windows-timedmutex (Files): Likewise.
36493         * modules/windows-timedrecmutex (Files): Likewise.
36494         * modules/windows-cond (Files): Likewise.
36495         * modules/threads-h (Files): Likewise.
36497 2019-07-14  Bruno Haible  <bruno@clisp.org>
36499         doc: Fix info about pthread API in HP-UX.
36500         * doc/posix-functions/pthread_*.texi: Fix info about HP-UX 11.
36502 2019-07-14  Bruno Haible  <bruno@clisp.org>
36504         threads-h: Fix generation of threads.h.
36505         * modules/threads-h (Makefile.am): Insert the required header file
36506         snippets.
36508 2019-07-09  Bruno Haible  <bruno@clisp.org>
36510         striconveh test: Fix a compilation failure when iconv is not available.
36511         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
36512         * tests/test-striconveh.c (main): Move iconv_close invocations inside
36513         HAVE_ICONV.
36515 2019-07-07  Akim Demaille  <akim@lrde.epita.fr>
36517         argmatch: adjust columns for help2man.
36518         * lib/argmatch.h (argmatch_##Name##_doc_col): If some argument
36519         requires column 20 or more, return 20.
36521 2019-07-06  Paul Eggert  <eggert@cs.ucla.edu>
36523         areadlink-with-size: avoid realloc when size==0
36524         * lib/areadlink-with-size.c (areadlink_with_size):
36525         * lib/areadlinkat-with-size.c (areadlinkat_with_size):
36526         Reallocate at the end to the actual size, to avoid memory waste,
36527         as suggested by Bruno Haible.  But when the guessed size is zero -
36528         useful when the size is unknown - do the initial small readlink
36529         into the stack, to avoid that realloc in the usual case.
36531 2019-07-06  Pádraig Brady  <P@draigBrady.com>
36533         areadlink-with-size: guess a buffer size with 0 size
36534         The size is usually taken from st_size, which can be zero,
36535         resulting in inefficient operation.
36536         Instead let zero select an initial memory allocation
36537         of 128 bytes, which most symlinks fit within.
36538         * lib/areadlink-with-size.c (areadlink_with_size):
36539         Start with a 128 byte buffer, for SIZE == 0.
36540         * lib/areadlinkat-with-size.c (areadlinkat_with_size): Likewise.
36542 2019-07-06  Konstantin Kharlamov  <Hi-Angel@yandex.ru>
36544         Replace manually crafted hex regexes with [:xdigit:]
36545         * build-aux/gitlog-to-changelog (parse_amend_file)
36546         (git_dir_option):
36547         Replace various combinations of [0-9a-fA-F] with [[:xdigit:]].
36548         This patch is backported from Emacs (Bug#36167).
36550 2019-07-06  Bruno Haible  <bruno@clisp.org>
36552         error: Fix documentation.
36553         * doc/glibc-functions/error_at_line.texi: Document what the 'error'
36554         module provides.
36555         * doc/glibc-functions/error_message_count.texi: Likewise.
36556         * doc/glibc-functions/error_one_per_line.texi: Likewise.
36557         * doc/glibc-functions/error_print_progname.texi: Likewise.
36559 2019-07-06  Bruno Haible  <bruno@clisp.org>
36561         doc: Remove documentation of glibc <= 2.1.x as a supported platform.
36562         * doc/gnulib-intro.texi (Target Platforms): Mention that glibc 2.1.x
36563         and older is unsupported.
36564         * doc/**/*.texi: Update.
36566 2019-07-06  Bruno Haible  <bruno@clisp.org>
36568         doc: Remove documentation of Linux libc5 as a supported platform.
36569         * doc/posix-functions/iswalnum.texi: Don't mention workarounds specific
36570         to Linux libc5.
36571         * doc/posix-functions/iswalpha.texi: Likewise.
36572         * doc/posix-functions/iswblank.texi: Likewise.
36573         * doc/posix-functions/iswcntrl.texi: Likewise.
36574         * doc/posix-functions/iswdigit.texi: Likewise.
36575         * doc/posix-functions/iswgraph.texi: Likewise.
36576         * doc/posix-functions/iswlower.texi: Likewise.
36577         * doc/posix-functions/iswprint.texi: Likewise.
36578         * doc/posix-functions/iswpunct.texi: Likewise.
36579         * doc/posix-functions/iswspace.texi: Likewise.
36580         * doc/posix-functions/iswupper.texi: Likewise.
36581         * doc/posix-functions/iswxdigit.texi: Likewise.
36582         * doc/posix-functions/snprintf.texi: Likewise.
36583         * doc/posix-functions/vsnprintf.texi: Likewise.
36585 2019-07-06  Bruno Haible  <bruno@clisp.org>
36587         doc: Remove documentation of Tandem/NSK as a supported platform.
36588         * doc/posix-headers/stdlib.texi: Don't mention workarounds specific to
36589         Tandem/NSK.
36590         * doc/**/*.texi: Update.
36592 2019-07-06  Bruno Haible  <bruno@clisp.org>
36594         doc: Remove documentation of Mac OS X <= 10.4 as a supported platform.
36595         * doc/gnulib-intro.texi (Target Platforms): Mention that Mac OS X 10.4
36596         and older is unsupported.
36597         * doc/posix-functions/acosl.texi: Don't mention workarounds specific to
36598         Mac OS X 10.4 and older.
36599         * doc/posix-functions/asinl.texi: Likewise.
36600         * doc/posix-functions/atanl.texi: Likewise.
36601         * doc/posix-functions/cosl.texi: Likewise.
36602         * doc/posix-functions/expl.texi: Likewise.
36603         * doc/posix-functions/frexpl.texi: Likewise.
36604         * doc/posix-functions/gettimeofday.texi: Likewise.
36605         * doc/posix-functions/logl.texi: Likewise.
36606         * doc/posix-functions/mkstemp.texi: Likewise.
36607         * doc/posix-functions/sinl.texi: Likewise.
36608         * doc/posix-functions/sqrtl.texi: Likewise.
36609         * doc/posix-functions/tanl.texi: Likewise.
36610         * doc/posix-functions/wcswidth.texi: Likewise.
36611         * doc/**/*.texi: Update.
36613 2019-07-06  Bruno Haible  <bruno@clisp.org>
36615         doc: Remove documentation of AIX 4 as a supported platform.
36616         * doc/gnulib-intro.texi (Target Platforms): Mention that AIX 4 is
36617         unsupported.
36618         * doc/posix-functions/nanosleep.texi: Don't mention AIX 4 specific
36619         workarounds.
36620         * doc/posix-functions/strnlen.texi: Likewise.
36621         * doc/posix-headers/inttypes.texi: Likewise.
36622         * doc/**/*.texi: Update.
36624 2019-07-06  Bruno Haible  <bruno@clisp.org>
36626         doc: Remove documentation of HP-UX 10 as a supported platform.
36627         * doc/gnulib-intro.texi (Target Platforms): Mention that HP-UX 10 is
36628         unsupported.
36629         * doc/*-functions/*printf.texi: Don't mention HP-UX 10 specific
36630         workarounds.
36631         * doc/posix-functions/gmtime_r.texi: Likewise.
36632         * doc/posix-functions/localtime_r.texi: Likewise.
36633         * doc/posix-functions/mkstemp.texi: Likewise.
36634         * doc/**/*.texi: Update.
36636 2019-07-06  Bruno Haible  <bruno@clisp.org>
36638         doc: Remove documentation of Interix 3.5 as a supported platform.
36639         * doc/gnulib-intro.texi (Target Platforms): Mention that Interix is
36640         unsupported.
36641         * doc/posix-functions/select.texi: Don't mention Interix specific
36642         workarounds.
36643         * doc/posix-headers/signal.texi: Likewise.
36644         * doc/**/*.texi: Update.
36646 2019-07-06  Bruno Haible  <bruno@clisp.org>
36648         doc: Remove documentation of IRIX 6.4 and older as supported platforms.
36649         * doc/gnulib-intro.texi (Target Platforms): Mention that IRIX <= 6.4 is
36650         unsupported.
36651         * doc/pastposix-functions/usleep.texi: Don't mention IRIX specific
36652         workarounds.
36653         * doc/posix-functions/nl_langinfo.texi: Likewise.
36654         * doc/posix-functions/remainder.texi: Likewise.
36655         * doc/posix-functions/towlower.texi: Likewise.
36656         * doc/posix-functions/towupper.texi: Likewise.
36657         * doc/posix-functions/vsnprintf.texi: Likewise.
36658         * doc/posix-functions/wcscat.texi: Likewise.
36659         * doc/posix-functions/wcschr.texi: Likewise.
36660         * doc/posix-functions/wcscmp.texi: Likewise.
36661         * doc/posix-functions/wcscpy.texi: Likewise.
36662         * doc/posix-functions/wcscspn.texi: Likewise.
36663         * doc/posix-functions/wcslen.texi: Likewise.
36664         * doc/posix-functions/wcsncat.texi: Likewise.
36665         * doc/posix-functions/wcsncmp.texi: Likewise.
36666         * doc/posix-functions/wcsncpy.texi: Likewise.
36667         * doc/posix-functions/wcspbrk.texi: Likewise.
36668         * doc/posix-functions/wcsrchr.texi: Likewise.
36669         * doc/posix-functions/wcsspn.texi: Likewise.
36670         * doc/posix-headers/langinfo.texi: Likewise.
36671         * doc/posix-headers/signal.texi: Likewise.
36672         * doc/posix-headers/wchar.texi: Likewise.
36673         * doc/posix-headers/wctype.texi: Likewise.
36674         * doc/**/*.texi: Update.
36676 2019-07-05  Bruno Haible  <bruno@clisp.org>
36678         doc: Remove documentation of OSF/1 as supported platform.
36679         * doc/gnulib-intro.texi (Target Platforms): Mention that OSF/1 is
36680         unsupported.
36681         * doc/glibc-functions/getdomainname.texi: Don't mention OSF/1 specific
36682         workarounds.
36683         * doc/glibc-functions/pthread_setname_np.texi: Likewise.
36684         * doc/glibc-functions/ptsname_r.texi: Likewise.
36685         * doc/posix-functions/ceil.texi: Likewise.
36686         * doc/posix-functions/ceilf.texi: Likewise.
36687         * doc/posix-functions/ceill.texi: Likewise.
36688         * doc/posix-functions/fchdir.texi: Likewise.
36689         * doc/posix-functions/floor.texi: Likewise.
36690         * doc/posix-functions/floorf.texi: Likewise.
36691         * doc/posix-functions/fmod.texi: Likewise.
36692         * doc/posix-functions/fmodf.texi: Likewise.
36693         * doc/posix-functions/fmodl.texi: Likewise.
36694         * doc/posix-functions/log.texi: Likewise.
36695         * doc/posix-functions/logf.texi: Likewise.
36696         * doc/posix-functions/logl.texi: Likewise.
36697         * doc/posix-functions/log10.texi: Likewise.
36698         * doc/posix-functions/log10f.texi: Likewise.
36699         * doc/posix-functions/log10l.texi: Likewise.
36700         * doc/posix-functions/log2.texi: Likewise.
36701         * doc/posix-functions/log2f.texi: Likewise.
36702         * doc/posix-functions/log2l.texi: Likewise.
36703         * doc/posix-functions/mbrtowc.texi: Likewise.
36704         * doc/posix-functions/recv.texi: Likewise.
36705         * doc/posix-functions/recvfrom.texi: Likewise.
36706         * doc/posix-functions/remainder.texi: Likewise.
36707         * doc/posix-functions/remainderf.texi: Likewise.
36708         * doc/posix-functions/remainderl.texi: Likewise.
36709         * doc/posix-functions/round.texi: Likewise.
36710         * doc/posix-functions/roundf.texi: Likewise.
36711         * doc/posix-functions/roundl.texi: Likewise.
36712         * doc/posix-functions/send.texi: Likewise.
36713         * doc/posix-functions/sendto.texi: Likewise.
36714         * doc/posix-functions/setenv.texi: Likewise.
36715         * doc/posix-functions/snprintf.texi: Likewise.
36716         * doc/posix-functions/tcgetsid.texi: Likewise.
36717         * doc/posix-functions/trunc.texi: Likewise.
36718         * doc/posix-functions/truncf.texi: Likewise.
36719         * doc/posix-functions/truncl.texi: Likewise.
36720         * doc/posix-functions/ttyname_r.texi: Likewise.
36721         * doc/posix-functions/unsetenv.texi: Likewise.
36722         * doc/posix-functions/wcsrtombs.texi: Likewise.
36723         * doc/posix-headers/sys_select.texi: Likewise.
36724         * doc/posix-headers/wchar.texi: Likewise.
36725         * doc/posix-headers/wctype.texi: Likewise.
36726         * doc/**/*.texi: Update.
36728 2019-07-05  Bruno Haible  <bruno@clisp.org>
36730         doc: Remove documentation of BSDI and BSD/OS as supported platforms.
36731         * doc/**/*.texi: Update.
36733 2019-07-05  Bruno Haible  <bruno@clisp.org>
36735         doc: Remove documentation of Solaris 8 and older as supported platforms.
36736         * doc/gnulib-intro.texi (Target Platforms): Mention that Solaris <= 8 is
36737         unsupported.
36738         * doc/posix-functions/mbrtowc.texi: Don't mention Solaris specific
36739         workarounds.
36740         * doc/posix-functions/memcmp.texi: Likewise.
36741         * doc/posix-functions/rename.texi: Likewise.
36742         * doc/posix-functions/tzset.texi: Likewise.
36743         * doc/posix-headers/wctype.texi: Likewise.
36744         * doc/**/*.texi: Update.
36746 2019-07-05  Bruno Haible  <bruno@clisp.org>
36748         doc: Remove documentation of Interix 3.5 as a supported platform.
36749         * doc/**/*.texi: Update.
36751 2019-07-05  Bruno Haible  <bruno@clisp.org>
36753         doc: Remove documentation of BeOS as a supported platform.
36754         * doc/gnulib-intro.texi (Target Platforms): Mention that BeOS is
36755         unsupported.
36756         * doc/*-functions/*printf.texi: Don't mention BeOS specific workarounds.
36757         * doc/posix-functions/getdelim.texi: Likewise.
36758         * doc/**/*.texi: Update.
36760 2019-07-05  Bruno Haible  <bruno@clisp.org>
36762         thread, lock, cond, tls: Remove support for Pth threads.
36763         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Don't document
36764         --enable-threads=pth any more.
36765         (gl_THREADLIB_BODY): Don't set USE_PTH_THREADS any more.
36766         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Update comment.
36767         * m4/threads.m4 (gl_THREADS_H): Remove test for conflict between Pth
36768         threads and ISO C11 threads.
36769         * lib/glthread/thread.h: Remove code for USE_PTH_THREADS.
36770         * lib/glthread/lock.h: Likewise.
36771         * lib/glthread/lock.c: Likewise.
36772         * lib/glthread/cond.h: Likewise.
36773         * lib/glthread/cond.c: Likewise.
36774         * lib/glthread/tls.h: Likewise.
36775         * lib/glthread/tls.c: Likewise.
36776         * lib/glthread/yield.h: Likewise.
36777         * lib/regex_internal.h: Likewise.
36778         * tests/test-thread_create.c: Likewise.
36779         * tests/test-lock.c: Likewise.
36780         * tests/test-cond.c: Likewise.
36781         * tests/test-tls.c: Likewise.
36782         * tests/test-rwlock1.c: Don't include glthread/yield.h.
36783         (main): Sleep without calling gl_thread_yield.
36785 2019-07-05  Bruno Haible  <bruno@clisp.org>
36787         thread, lock, cond, tls: Remove support for old Solaris threads.
36788         Solaris >= 2.5.1 has POSIX threads.
36789         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Don't document
36790         --enable-threads=solaris any more.
36791         (gl_THREADLIB_BODY): Don't set USE_SOLARIS_THREADS any more.
36792         * lib/glthread/thread.c: Update comment.
36793         * lib/glthread/thread.h: Remove code for USE_SOLARIS_THREADS.
36794         * lib/glthread/lock.h: Likewise.
36795         * lib/glthread/lock.c: Likewise.
36796         * lib/glthread/cond.h: Likewise.
36797         * lib/glthread/cond.c: Likewise.
36798         * lib/glthread/tls.h: Likewise.
36799         * lib/glthread/tls.c: Likewise.
36800         * lib/glthread/yield.h: Likewise.
36801         * lib/regex_internal.h: Likewise.
36802         * tests/test-thread_create.c: Likewise.
36803         * tests/test-lock.c: Likewise.
36804         * tests/test-cond.c: Likewise.
36805         * tests/test-tls.c: Likewise.
36807 2019-07-05  Bruno Haible  <bruno@clisp.org>
36809         getcwd-lgpl, getcwd: Don't call realloc when it is pointless.
36810         * lib/getcwd-lgpl.c (rpl_getcwd): Don't call realloc if the result's
36811         needed size is equal to the allocated size.
36812         * lib/getcwd.c (__getcwd): Likewise.
36814 2019-07-05  Bruno Haible  <bruno@clisp.org>
36816         xgetdomainname: Don't return an excessive memory allocation.
36817         * lib/xgetdomainname.c (xgetdomainname): Shrink the domainname buffer
36818         before returning it.
36820 2019-07-05  Bruno Haible  <bruno@clisp.org>
36822         xgethostname: Don't return an excessive memory allocation.
36823         * lib/xgethostname.c (xgethostname): Shrink the hostname buffer before
36824         returning it.
36826 2019-07-05  Bruno Haible  <bruno@clisp.org>
36828         areadlinkat-with-size: Don't return an excessive memory allocation.
36829         * lib/areadlinkat-with-size.c (areadlinkat_with_size): Shrink the buffer
36830         before returning it.
36832 2019-07-05  Bruno Haible  <bruno@clisp.org>
36834         areadlink-with-size: Don't return an excessive memory allocation.
36835         Reported by Andreas Dilger <adilger@whamcloud.com>.
36836         * lib/areadlink-with-size.c (areadlink_with_size): Shrink the buffer
36837         before returning it.
36839 2019-07-03  Bruno Haible  <bruno@clisp.org>
36841         renameatu: Fix test failure on MSVC.
36842         * lib/at-func2.c (at_func2): Fail with ENOENT if file1 or file2 is the
36843         empty string.
36845 2019-07-03  Bruno Haible  <bruno@clisp.org>
36847         mbrtowc: Fix invalid use of mbtowc() on MSVC.
36848         * lib/mbrtowc.c: Include glthread/lock.h.
36849         (mbtowc_lock): New variable.
36850         (mbrtowc): Treat UTF-8 encoding without locking. For the other
36851         encodings, explicitly reset the internal state of mbtowc, and protect
36852         this through a lock.
36853         * modules/mbrtowc (Depends-on): Add lock.
36855 2019-07-03  Akim Demaille  <akim@lrde.epita.fr>
36857         argmatch: don't define _ in the header.
36858         Reported by Jim Meyering.
36859         * lib/argmatch.h (N_, _): Don't define.
36860         Use gettext instead.
36861         * lib/argmatch.h (_): Define.
36862         * tests/test-argmatch.c (N_): Define.
36864 2019-07-02  Paul Eggert  <eggert@cs.ucla.edu>
36866         verify: document ‘assume’ better
36867         * lib/verify.h: Reword doc (Bug#36370).
36869 2019-07-02  Bruno Haible  <bruno@clisp.org>
36871         localcharset, nl_langinfo: Fix return value for UTF-8 locales on MSVC.
36872         * lib/localcharset.c (locale_charset): Return "UTF-8" instead of
36873         "CPutf8".
36874         * lib/nl_langinfo.c (ctype_codeset): Likewise.
36876 2019-07-02  Bruno Haible  <bruno@clisp.org>
36878         getcwd: Fix crash when invoked with size = 0 on MSVC.
36879         * lib/getcwd.c: Include msvc-inval.h.
36880         (getcwd_nothrow): New function/macro.
36881         (getcwd_system): New macro.
36882         (__getcwd): Use it instead of getcwd.
36883         * modules/getcwd (Depends-on): Add msvc-inval.
36884         * doc/posix-functions/getcwd.texi: Mention the MSVC issue.
36886 2019-07-02  Bruno Haible  <bruno@clisp.org>
36888         nonblocking-pipe tests: Fix test failure on MSVC.
36889         * tests/test-nonblocking-pipe.h (PIPE_DATA_BLOCK_SIZE): Set to 10000 on
36890         native Windows.
36892 2019-07-02  Bruno Haible  <bruno@clisp.org>
36894         usleep: Implement with millisecond resolution on native Windows.
36895         * lib/usleep.c (usleep): On native Windows, implement using Sleep().
36896         * doc/pastposix-functions/usleep.texi: Update accordingly.
36898 2019-07-02  Bruno Haible  <bruno@clisp.org>
36900         lstat tests: Fix test failure on MSVC.
36901         * tests/test-lstat.h (test_lstat_func): Don't test SAME_INODE values on
36902         native Windows, unless _GL_WINDOWS_STAT_INODES is defined.
36904 2019-07-02  Bruno Haible  <bruno@clisp.org>
36906         stat tests: Fix test failure on MSVC.
36907         * tests/test-stat.h (test_stat_func): Don't test SAME_INODE values on
36908         native Windows, unless _GL_WINDOWS_STAT_INODES is defined.
36910 2019-07-02  Bruno Haible  <bruno@clisp.org>
36912         getaddrinfo tests: Fix test failure on MSVC.
36913         * tests/test-getaddrinfo.c: Include sockets.h.
36914         (main): Invoke gl_sockets_startup.
36915         * modules/getaddrinfo-tests (Depends-on): Add sockets.
36917 2019-07-01  Hannes Müller  <h.c.f.mueller@gmx.de>
36919         poll: Fix type of timeout pointer passed to select() on mingw x86_64.
36920         * lib/poll.c: Call Windows native select() with Windows native timeval.
36922 2019-06-30  Bruno Haible  <bruno@clisp.org>
36924         argmatch: Fix compilation errors.
36925         * lib/argmatch.h: Include <limits.h>, for INT_MAX.
36926         * tests/test-argmatch.c (main): Update after last-minute function names
36927         change.
36929 2019-06-30  Bruno Haible  <bruno@clisp.org>
36931         Include <stdlib.h> when needed.
36932         * lib/cnd.c: Include <stdlib.h>, needed for abort().
36933         * lib/fcntl.c: Likewise.
36934         * lib/mbscasestr.c: Likewise.
36935         * lib/mbssep.c: Likewise.
36936         * lib/mbsstr.c: Likewise.
36937         * lib/openat.c: Include <stdlib.h>, needed for free().
36938         * lib/windows-tls.c: Include <stdlib.h>, needed for malloc(), free(),
36939         abort().
36941 2019-06-30  Bruno Haible  <bruno@clisp.org>
36943         Include <stdlib.h> when needed.
36944         * lib/areadlinkat.c: Include <stdlib.h>, needed for free() in at-func.c.
36945         * lib/faccessat.c: Likewise.
36946         * lib/fchmodat.c: Likewise.
36947         * lib/fchownat.c: Likewise.
36948         * lib/fstatat.c: Likewise.
36949         * lib/mkfifoat.c: Likewise.
36950         * lib/mknodat.c: Likewise.
36951         * lib/readlinkat.c: Likewise.
36952         * lib/symlinkat.c: Likewise.
36953         * lib/utimensat.c: Likewise.
36954         * lib/mkdirat.c: Likewise. Include also the specification header.
36956 2019-06-30  Bruno Haible  <bruno@clisp.org>
36958         inet_ntop, inet_pton: Avoid conflict with native Windows functions.
36959         * m4/sys_socket_h.m4 (gl_PREREQ_SYS_H_WS2TCPIP): New macro, extracted
36960         from gl_PREREQ_SYS_H_SOCKET.
36961         (gl_PREREQ_SYS_H_SOCKET): Invoke it.
36962         * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Invoke
36963         gl_PREREQ_SYS_H_WS2TCPIP.
36964         * modules/arpa_inet (Files): Add m4/sys_socket_h.m4, m4/socklen.m4.
36965         (Makefile.am): Substitute HAVE_WS2TCPIP_H.
36966         * lib/arpa_inet.in.h: Include <ws2tcpip.h>.
36968 2019-06-30  Bruno Haible  <bruno@clisp.org>
36970         inet_ntop, inet_pton: Forward-compatibility with newer Windows versions.
36971         * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): On native Windows, set
36972         REPLACE_INET_NTOP to 1 always.
36973         * m4/inet_pton.m4 (gl_FUNC_INET_PTON): On native Windows, set
36974         REPLACE_INET_PTON to 1 always.
36976 2019-06-30  Bruno Haible  <bruno@clisp.org>
36978         inet_pton: Fix link error on mingw with _WIN32_WINNT >= 0x0600.
36979         * modules/inet_pton (Depends-on, configure.ac): Test REPLACE_INET_PTON,
36980         not REPLACE_INET_NTOP.
36982 2019-06-30  Bruno Haible  <bruno@clisp.org>
36984         poll: Add comment.
36985         * lib/poll.c: Add comment about WSAPoll.
36987 2019-06-30  Bruno Haible  <bruno@clisp.org>
36989         poll-h: Fix compilation error on mingw with _WIN32_WINNT >= 0x0600.
36990         Reported by Hannes Müller <h.c.f.mueller@gmx.de>.
36991         * lib/poll.in.h: Include <winsock2.h>.
36992         (POLL*, pollfd): Override on native Windows.
36993         * m4/poll_h.m4 (gl_POLL_H): Invoke gl_PREREQ_SYS_H_WINSOCK2.
36994         * modules/poll-h (Files): Add m4/sys_socket_h.m4.
36995         (Makefile.am): Substitute HAVE_WINSOCK2_H.
36997 2019-06-28  Bruno Haible  <bruno@clisp.org>
36999         accept4: Fix compilation error on OpenIndiana.
37000         Reported by Michal Nowak <mnowak@startmail.com>
37001         via Mark H Weaver <mhw@netris.org>.
37002         * m4/accept.m4 (gl_FUNC_ACCEPT4): Test whether accept4 is declared, not
37003         whether it exists as a function.
37005 2019-06-26  Paul Eggert  <eggert@cs.ucla.edu>
37007         strverscmp: sync from glibc
37008         * lib/strverscmp.c: Sync from glibc, except use UTF-8 encoding in
37009         comments, include libc-config.h, define __strverscmp to be
37010         strverscmp, and don’t assume types line uint8_t and int8_t that
37011         that C99 doesn’t guarantee.
37012         [!_LIBC]: Include libc-config.h; define __strverscmp.
37013         Include stdint.h.
37014         (__strverscmp): Assume C99.  Use uint_least8_t
37015         and int_least8_t instead of unsigned char and signed char.
37016         * modules/strverscmp (Depends-on): Add libc-config, stdint.
37018 2019-06-25  Bruno Haible  <bruno@clisp.org>
37020         tss tests: Add tests for destructors and races.
37021         * tests/test-tss.c (worker_thread): Fix typo in debug message.
37022         (test_tss_dtorcheck1, test_tss_dtorcheck2, test_tss_racecheck): New
37023         functions.
37024         (main): Invoke them.
37025         * modules/tls-tests (Depends-on): Add mtx.
37027 2019-06-25  Bruno Haible  <bruno@clisp.org>
37029         tls tests: Add tests for destructors and races.
37030         * tests/test-tls.c: Include glthread/lock.h.
37031         (test_tls_dtorcheck1, test_tls_dtorcheck2, test_tls_racecheck): New
37032         functions.
37033         (main): Invoke them.
37034         * modules/tls-tests (Depends-on): Add lock.
37036 2019-06-25  Bruno Haible  <bruno@clisp.org>
37038         windows-tls: Implement TLS key destructors for native Windows.
37039         * lib/windows-tls.h (glwthread_tls_process_destructors): New
37040         declaration.
37041         (GLWTHREAD_DESTRUCTOR_ITERATIONS): New macro.
37042         * lib/windows-tls.c: Include <limits.h>, windows-once.h.
37043         (dtor_table_init_once, dtor_table_lock: New variables.
37044         (struct dtor): New type.
37045         (dtor_table, dtors_count, dtors_used, dtors_allocated,
37046         dtor_processing_threads): New variables.
37047         (dtor_table_initialize, dtor_table_ensure_initialized,
37048         dtor_table_shrink_used, glwthread_tls_process_destructors): New
37049         functions.
37050         (glwthread_tls_key_create, glwthread_tls_key_delete): Rewritten to
37051         handle non-NULL destructors.
37052         * modules/windows-tls (Depends-on): Add windows-once.
37053         * lib/glthread/tls.h (glthread_tls_key_init, glthread_tls_key_destroy):
37054         Use the functions declared in windows-tls.h.
37055         * lib/threads.in.h (TSS_DTOR_ITERATIONS): Define using
37056         GLWTHREAD_DESTRUCTOR_ITERATIONS.
37057         * lib/windows-thread.c: Include windows-tls.h.
37058         (wrapper_func, glwthread_thread_exit): Invoke
37059         glwthread_tls_process_destructors.
37060         * modules/windows-thread (Depends-on): Add windows-tls.
37062 2019-06-25  Bruno Haible  <bruno@clisp.org>
37064         threadlib: Avoid autoconf warning "was expanded before it was required".
37065         * modules/threadlib (configure.ac): Require gl_THREADLIB.
37067 2019-06-25  Akim Demaille  <akim@lrde.epita.fr>
37069         argmatch: remove duplicate const qualifier
37070         * lib/argmatch.h (ARGMATCH_DEFINE_GROUP): Here.
37072 2019-06-24  Paul Eggert  <eggert@cs.ucla.edu>
37074         unistd: stddef.h and sys/types.h namespace cleanup
37075         * lib/unistd.in.h [__GLIBC__]:
37076         Do not include stddef.h or sys/types.h.
37077         [!__GLIBC__]: Always include sys/types.h, since unistd.h is
37078         supposed to declare off_t and ssize_t.  Problem found when looking
37079         at why @GNULIB_PWRITE@ was different from the newly-added
37080         @GNULIB_COPY_FILE_RANGE@ with respect to ssize_t.
37082 2019-06-22  Akim Demaille  <akim@lrde.epita.fr>
37084         maintainer-makefile: restore portability to non-GNU awks
37085         Reported by Tim Rühsen.
37086         * top/maint.mk (AWK): New variable.  Use it.
37087         (sc_prohibit_gnu_make_extensions): Skip if $(AWK) is not gawk.
37089 2019-06-23  Paul Eggert  <eggert@cs.ucla.edu>
37091         Document setvbuf _IOLBF problem
37092         * doc/posix-functions/setvbuf.texi (setvbuf):
37093         Document MS-Windows portability problem with _IOLBF.
37095         Document lseek SEEK_DATA/SEEK_HOLE
37096         * doc/posix-functions/lseek.texi (lseek):
37097         Document some systems that do not support SEEK_DATA and SEEK_HOLE.
37099 2019-06-22  Akim Demaille  <akim@lrde.epita.fr>
37101         argmatch: put all the docs member last.
37102         Reported by Bruno Haible.
37103         * lib/argmatch.h (argmatch_##Name##_group_type): Put the args
37104         member before the docs done.
37105         * doc/argmatch.texi, tests/test-argmatch.c: Adjust.
37107 2019-06-21  Akim Demaille  <akim@lrde.epita.fr>
37109         argmatch: add support to generate the usage message.
37110         * lib/argmatch.c: Move some #includes and gettext support to...
37111         * lib/argmatch.h: here.
37112         (ARGMATCH_DEFINE_GROUP): New macro.
37113         * tests/test-argmatch.c (argmatch_backup_docs, argmatch_backup_args)
37114         (argmatch_backup_group): New.
37115         (CHECK): New.
37116         (main): Check argmatch_backup_value, argmatch_backup_xvalue,
37117         argmatch_backup_argument and argmatch_backup_usage.
37118         * modules/argmatch: We depend on c99.
37119         * doc/argmatch.texi (Recognizing Option Arguments): New.
37120         * doc/gnulib.texi: Use it.
37122 2019-06-21  Bruno Haible  <bruno@clisp.org>
37124         thrd: Add comment.
37125         * lib/thrd.c (pthread_main_func): Add comment.
37127 2019-06-21  Bruno Haible  <bruno@clisp.org>
37129         threads-h: Define 'thread_local' if and only if it actually works.
37130         * m4/threads.m4 (gl_THREAD_LOCAL_DEFINITION): New macro.
37131         (gl_THREADS_H): Define _Thread_local to __thread also for ARM C, IBM C,
37132         Oracle Solaris Studio C. Compile a simple program, to see whether
37133         _Thread_local basically works. Set HAVE_THREAD_LOCAL and LIBTHREADLOCAL.
37134         (gl_THREADS_H_DEFAULTS): Initialize HAVE_THREAD_LOCAL.
37135         * lib/threads.in.h (thread_local): Undefine if it does not work.
37136         * modules/threads-h (Makefile.am): Substitute HAVE_THREAD_LOCAL.
37137         (Link): Mention LIBTHREADLOCAL.
37138         * tests/test-threads.c: Don't check that thread_local is defined.
37139         * tests/test-thread_local.c: New file.
37140         * modules/threads-h-tests (Files): Add it and macros.h.
37141         (Depends-on): Add thrd and stdint.
37142         (configure.ac): Test whether 'alarm' is declared.
37143         (Makefile.am): Arrange to build and link test-thread_local.
37144         * doc/posix-headers/threads.texi: Mention the platforms that don't
37145         support 'thread_local'.
37147 2019-06-20  Bruno Haible  <bruno@clisp.org>
37149         threads-h: Simplify link dependencies.
37150         * m4/threads.m4 (gl_THREADS_H): Bail out if Pth threading is requested.
37151         Don't set LTLIBSTDTHREAD.
37152         * modules/thrd (Link): Simplify accordingly.
37153         * modules/mtx (Link): Likewise.
37154         * modules/cnd (Link): Likewise.
37155         * modules/tss (Link): Likewise.
37156         * modules/threads (Link): Likewise.
37158 2019-06-20  Bruno Haible  <bruno@clisp.org>
37160         threads-h: Fix link error on FreeBSD 11.
37161         * m4/threads.m4 (gl_THREADS_H): When linking with -lstdthreads, link
37162         also with -lpthread.
37164 2019-06-20  Bruno Haible  <bruno@clisp.org>
37166         threadlib: Fix typo (regression from today).
37167         * m4/threadlib.m4 (gl_THREADLIB_BODY): Fix typo in comment marker.
37169 2019-06-20  Bruno Haible  <bruno@clisp.org>
37171         windows-thread, windows-tls: Fix compilation error on 32-bit mingw.
37172         * lib/windows-thread.c: Include <errno.h>.
37173         * lib/windows-tls.c: Likewise.
37175 2019-06-20  Bruno Haible  <bruno@clisp.org>
37177         tss tests: Small improvement.
37178         * tests/test-tss.c (test_tss): Pass a different id to each thread.
37180 2019-06-20  Bruno Haible  <bruno@clisp.org>
37182         threads: New module.
37183         * modules/threads: New file.
37185 2019-06-20  Bruno Haible  <bruno@clisp.org>
37187         tss: Add tests.
37188         * tests/test-tss.c: New file, based on tests/test-tls.c.
37189         * modules/tss-tests: New file.
37191 2019-06-20  Bruno Haible  <bruno@clisp.org>
37193         cnd: Add tests.
37194         * tests/test-cnd.c: New file, based on tests/test-cond.c.
37195         * modules/cnd-tests: New file.
37197 2019-06-20  Bruno Haible  <bruno@clisp.org>
37199         mtx: Add tests.
37200         * tests/test-mtx.c: New file, based on tests/test-lock.c.
37201         * tests/test-call_once.c: New file, based on tests/test-once.c.
37202         * modules/mtx-tests: New file.
37204 2019-06-20  Bruno Haible  <bruno@clisp.org>
37206         thrd: Add tests.
37207         * tests/test-thrd_create.c: New file, based on
37208         tests/test-thread_create.c.
37209         * tests/test-thrd_current.c: New file, based on
37210         tests/test-thread_self.c.
37211         * modules/thrd-tests: New file.
37213 2019-06-20  Bruno Haible  <bruno@clisp.org>
37215         tss: New module.
37216         * lib/tss.c: New file.
37217         * modules/tss: New file.
37218         * doc/posix-functions/tss_create.texi: Mention the new module.
37219         * doc/posix-functions/tss_set.texi: Likewise.
37220         * doc/posix-functions/tss_get.texi: Likewise.
37221         * doc/posix-functions/tss_delete.texi: Likewise.
37223 2019-06-20  Bruno Haible  <bruno@clisp.org>
37225         cnd: New module.
37226         * lib/cnd.c: New file.
37227         * modules/cnd: New file.
37228         * doc/posix-functions/cnd_init.texi: Mention the new module.
37229         * doc/posix-functions/cnd_wait.texi: Likewise.
37230         * doc/posix-functions/cnd_timedwait.texi: Likewise.
37231         * doc/posix-functions/cnd_signal.texi: Likewise.
37232         * doc/posix-functions/cnd_broadcast.texi: Likewise.
37233         * doc/posix-functions/cnd_destroy.texi: Likewise.
37235 2019-06-20  Bruno Haible  <bruno@clisp.org>
37237         mtx: New module.
37238         * lib/mtx.c: New file.
37239         * modules/mtx: New file.
37240         * doc/posix-functions/call_once.texi: Mention the new module.
37241         * doc/posix-functions/mtx_init.texi: Likewise.
37242         * doc/posix-functions/mtx_lock.texi: Likewise.
37243         * doc/posix-functions/mtx_trylock.texi: Likewise.
37244         * doc/posix-functions/mtx_timedlock.texi: Likewise.
37245         * doc/posix-functions/mtx_unlock.texi: Likewise.
37246         * doc/posix-functions/mtx_destroy.texi: Likewise.
37248 2019-06-20  Bruno Haible  <bruno@clisp.org>
37250         thrd: New module.
37251         * lib/thrd.c: New file.
37252         * m4/thrd.m4: New file.
37253         * modules/thrd: New file.
37254         * doc/posix-functions/thrd_current.texi: Mention the new module.
37255         * doc/posix-functions/thrd_detach.texi: Likewise.
37256         * doc/posix-functions/thrd_equal.texi: Likewise.
37257         * doc/posix-functions/thrd_exit.texi: Likewise.
37258         * doc/posix-functions/thrd_sleep.texi: Likewise.
37259         * doc/posix-functions/thrd_yield.texi: Likewise.
37260         * doc/posix-functions/thrd_create.texi: Mention the new module and the
37261         AIX bug.
37262         * doc/posix-functions/thrd_join.texi: Mention the new module and the
37263         AIX and Solaris bugs.
37265 2019-06-20  Bruno Haible  <bruno@clisp.org>
37267         threads-h: Add tests.
37268         * tests/test-threads.c: New file.
37269         * modules/threads-h-tests: New file.
37270         * tests/test-threads-c++.cc: New file.
37271         * modules/threads-h-c++-tests: New file.
37273 2019-06-20  Bruno Haible  <bruno@clisp.org>
37275         threads-h: New module.
37276         * lib/threads.in.h: New file.
37277         * m4/threads.m4: New file.
37278         * m4/yield.m4 (gl_YIELD): Update comment.
37279         * modules/threads-h: New file.
37280         * modules/yields (configure.ac): Use AC_REQUIRE.
37281         * doc/posix-headers/threads.texi: Mention the new module and the AIX
37282         bugs.
37284 2019-06-20  Bruno Haible  <bruno@clisp.org>
37286         windows-thread: New module.
37287         * lib/windows-thread.h: New file, based on lib/glthread/thread.h.
37288         * lib/windows-thread.c: New file, based on lib/glthread/thread.c.
37289         * lib/glthread/thread.h: Include windows-thread.h.
37290         (gl_thread_t): Define using glwthread_thread_t.
37291         (glthread_create): Define using glwthread_thread_create.
37292         (glthread_join): Define using glwthread_thread_join.
37293         (gl_thread_self): Define using glwthread_thread_self.
37294         (gl_thread_exit): Define using glwthread_thread_exit.
37295         (glthread_create_func, glthread_join_func, gl_thread_self_func,
37296         gl_thread_exit_func): Remove declarations.
37297         * lib/glthread/thread.c (self_key): Remove variable.
37298         (do_init_self_key, init_self_key): Remove functions.
37299         (struct gl_thread_struct): Remove type.
37300         (get_current_thread_handle, gl_thread_self_func, wrapper_func,
37301         glthread_create_func, glthread_join_func, gl_thread_exit_func): Remove
37302         functions.
37303         * modules/windows-thread: New file.
37304         * modules/thread (Depends-on): Add windows-thread.
37306 2019-06-20  Bruno Haible  <bruno@clisp.org>
37308         windows-tls: New module.
37309         * lib/windows-tls.h: New file, based on lib/glthread/tls.h.
37310         * lib/windows-tls.c: New file, based on lib/glthread/tls.h.
37311         * lib/glthread/tls.h: Include windows-tls.h.
37312         (gl_tls_key_t): Define using glwthread_tls_key_t.
37313         * modules/windows-tls: New file.
37314         * modules/tls (Depends-on): Add windows-tls.
37316 2019-06-20  Bruno Haible  <bruno@clisp.org>
37318         windows-cond: New module.
37319         * lib/windows-cond.h: New file, based on lib/glthread/cond.h.
37320         * lib/windows-cond.c: New file, based on lib/glthread/cond.c.
37321         * lib/glthread/cond.h: Include windows-cond.h.
37322         (struct gl_waitqueue_link, gl_linked_waitqueue_t): Remove types.
37323         (gl_cond_t): Define using glwthread_cond_t.
37324         (gl_cond_initializer): Define using GLWTHREAD_COND_INIT.
37325         (glthread_cond_init): Define using glwthread_cond_init.
37326         (glthread_cond_wait): Define using glwthread_cond_wait.
37327         (glthread_cond_timedwait): Define using glwthread_cond_timedwait.
37328         (glthread_cond_signal): Define using glwthread_cond_signal.
37329         (glthread_cond_broadcast): Define using glwthread_cond_broadcast.
37330         (glthread_cond_destroy): Define using glwthread_cond_destroy.
37331         (glthread_cond_init_func, glthread_cond_wait_func,
37332         glthread_cond_timedwait_func, glthread_cond_signal_func,
37333         glthread_cond_broadcast_func, glthread_cond_destroy_func): Remove
37334         declarations.
37335         * lib/glthread/cond.c (gl_waitqueue_t, gl_waitqueue_element): Remove
37336         types.
37337         (gl_waitqueue_init, gl_waitqueue_add, gl_waitqueue_remove,
37338         gl_waitqueue_notify_first, gl_waitqueue_notify_all,
37339         glthread_cond_init_func, glthread_cond_wait_func,
37340         glthread_cond_timedwait_func, glthread_cond_signal_func,
37341         glthread_cond_broadcast_func, glthread_cond_destroy_func): Remove
37342         functions.
37343         * modules/windows-cond: New file.
37344         * modules/cond (Depends-on): Add windows-cond. Remove gettimeofday.
37346 2019-06-20  Bruno Haible  <bruno@clisp.org>
37348         windows-timedrecmutex: New module.
37349         * lib/windows-timedrecmutex.h: New file, based on windows-recmutex.h.
37350         * lib/windows-timedrecmutex.c: New file, based on windows-recmutex.c.
37351         * modules/windows-timedrecmutex: New file.
37353 2019-06-20  Bruno Haible  <bruno@clisp.org>
37355         windows-timedmutex: New module.
37356         * lib/windows-timedmutex.h: New file, based on windows-mutex.h.
37357         * lib/windows-timedmutex.c: New file, based on windows-mutex.c.
37358         * modules/windows-timedmutex: New file.
37360 2019-06-20  Bruno Haible  <bruno@clisp.org>
37362         windows-recmutex: New module.
37363         * lib/windows-recmutex.h: New file, extracted from lib/glthread/lock.h.
37364         * lib/windows-recmutex.c: New file, extracted from lib/glthread/lock.c.
37365         * lib/glthread/lock.h: Include windows-recmutex.h.
37366         (gl_recursive_lock_t): Define using glwthread_recmutex_t.
37367         (gl_recursive_lock_initializer): Define using GLWTHREAD_RECMUTEX_INIT.
37368         (glthread_recursive_lock_init): Define using glwthread_recmutex_init.
37369         (glthread_recursive_lock_lock): Define using glwthread_recmutex_lock.
37370         (glthread_recursive_lock_unlock): Define using
37371         glwthread_recmutex_unlock.
37372         (glthread_recursive_lock_destroy): Define using
37373         glwthread_recmutex_destroy.
37374         (glthread_recursive_lock_init_func, glthread_recursive_lock_lock_func,
37375         glthread_recursive_lock_unlock_func,
37376         glthread_recursive_lock_destroy_func): Remove declarations.
37377         * lib/glthread/lock.c (glthread_recursive_lock_init_func,
37378         glthread_recursive_lock_lock_func, glthread_recursive_lock_unlock_func,
37379         glthread_recursive_lock_destroy_func): Remove functions.
37380         * modules/windows-recmutex: New file.
37381         * modules/lock (Depends-on): Add windows-recmutex.
37383 2019-06-20  Bruno Haible  <bruno@clisp.org>
37385         windows-mutex: New module.
37386         * lib/windows-mutex.h: New file, extracted from lib/glthread/lock.h.
37387         * lib/windows-mutex.c: New file, extracted from lib/glthread/lock.c.
37388         * lib/windows-spinlock.h: New file, extracted from lib/glthread/lock.h.
37389         * lib/glthread/lock.h: Include windows-spinlock.h, windows-mutex.h.
37390         (gl_spinlock_t): Remove type.
37391         (gl_lock_t): Define using glwthread_mutex_t.
37392         (gl_lock_initializer): Define using GLWTHREAD_MUTEX_INIT.
37393         (glthread_lock_init): Define using glwthread_mutex_init.
37394         (glthread_lock_lock): Define using glwthread_mutex_lock.
37395         (glthread_lock_unlock): Define using glwthread_mutex_unlock.
37396         (glthread_lock_destroy): Define using glwthread_mutex_destroy.
37397         (glthread_lock_init_func, glthread_lock_lock_func,
37398         glthread_lock_unlock_func, glthread_lock_destroy_func): Remove
37399         declarations.
37400         Use glwthread_spinlock_t instead of gl_spinlock_t.
37401         (gl_rwlock_initializer, gl_recursive_lock_initializer): Define using
37402         GLWTHREAD_SPINLOCK_INIT.
37403         * lib/glthread/lock.c (glthread_lock_init_func, glthread_lock_lock_func,
37404         glthread_lock_unlock_func, glthread_lock_destroy_func): Remove
37405         functions.
37406         * lib/glthread/cond.h: Use glwthread_spinlock_t instead of
37407         gl_spinlock_t.
37408         * modules/windows-mutex: New file.
37409         * modules/lock (Depends-on): Add windows-mutex.
37411 2019-06-20  Bruno Haible  <bruno@clisp.org>
37413         windows-once: New module.
37414         * lib/windows-once.h: New file, extracted from lib/glthread/lock.h.
37415         * lib/windows-once.c: New file, extracted from lib/glthread/lock.c.
37416         * lib/glthread/lock.h: Include windows-once.h.
37417         (gl_once_t): Define using glwthread_once_t.
37418         (gl_once_define): Define using GLWTHREAD_ONCE_INIT.
37419         (glthread_once): Define using glwthread_once.
37420         (glthread_once_func): Remove declaration.
37421         * lib/glthread/lock.c (glthread_once_func): Remove function.
37422         * modules/windows-once: New file.
37423         * modules/lock (Depends-on): Add windows-once.
37425 2019-06-20  Bruno Haible  <bruno@clisp.org>
37427         lock, cond: Avoid possible counter wraparound on Windows.
37428         * lib/glthread/lock.c (glthread_lock_lock_func): Leave the 'started'
37429         field of the guard unchanged if it was already positive.
37430         (glthread_rwlock_rdlock_func): Likewise.
37431         (glthread_rwlock_wrlock_func): Likewise.
37432         (glthread_recursive_lock_lock_func): Likewise.
37433         * lib/glthread/cond.c (glthread_cond_wait_func): Likewise.
37434         (glthread_cond_timedwait_func): Likewise.
37436 2019-06-20  Bruno Haible  <bruno@clisp.org>
37438         cond: Make glthread_cond_timedwait more reliable on Windows.
37439         * lib/glthread/cond.c (glthread_cond_timedwait_func): Initialize the
37440         condition variable before looking at the current time.
37442 2019-06-20  Bruno Haible  <bruno@clisp.org>
37444         pthread_mutex_timedlock: New module.
37445         * lib/pthread.in.h (pthread_mutex_timedlock): New dummy function and
37446         new declaration.
37447         * lib/pthread_mutex_timedlock.c: New file.
37448         * m4/pthread_mutex_timedlock.m4: New file.
37449         * m4/pthread.m4 (gl_PTHREAD_CHECK): Don't call AC_LIBOBJ here. Test
37450         whether pthread_mutex_timedlock is declared.
37451         (gl_PTHREAD_MODULE_INDICATOR): New macro.
37452         (gl_PTHREAD_DEFAULTS): Initialize GNULIB_PTHREAD_MUTEX_TIMEDLOCK,
37453         HAVE_PTHREAD_MUTEX_TIMEDLOCK.
37454         * modules/pthread (configure.ac): Call AC_LIBOBJ here.
37455         (Makefile.am): Substitute GNULIB_PTHREAD_MUTEX_TIMEDLOCK,
37456         HAVE_PTHREAD_MUTEX_TIMEDLOCK.
37457         * modules/pthread_mutex_timedlock: New file.
37458         * doc/posix-functions/pthread_mutex_timedlock.texi: Mention the new
37459         module.
37461 2019-06-20  Bruno Haible  <bruno@clisp.org>
37463         thread, lock, cond, tls: Recognize C11 multithreaded applications.
37464         * m4/threadlib.m4 (gl_THREADLIB_BODY): Test for <threads.h>.
37465         * lib/glthread/thread.h (c11_threads_in_use): New macro.
37466         (pthread_in_use, pth_in_use, thread_in_use): Use it.
37467         * lib/glthread/lock.h (c11_threads_in_use): New macro.
37468         (pthread_in_use, pth_in_use, thread_in_use): Use it.
37469         * lib/glthread/cond.h (c11_threads_in_use): New macro.
37470         (pthread_in_use, pth_in_use, thread_in_use): Use it.
37471         * lib/glthread/tls.h (c11_threads_in_use): New macro.
37472         (pthread_in_use, pth_in_use, thread_in_use): Use it.
37474 2019-06-20  Bruno Haible  <bruno@clisp.org>
37476         tls tests: Small improvements.
37477         * tests/test-tls.c: Include <stdint.h>.
37478         (worker_thread): Avoid gcc warning on 64-bit mingw.
37479         (test_tls): Pass a different id to each thread.
37480         * modules/tls-tests (Depends-on): Add stdint.
37482 2019-06-20  Bruno Haible  <bruno@clisp.org>
37484         cond tests: Simplify.
37485         * tests/test-cond.c (test_timedcond): Remove redundant assignment.
37487 2019-06-20  Bruno Haible  <bruno@clisp.org>
37489         lock tests: Avoid reference to undefined variable if !ENABLE_LOCKING.
37490         * tests/test-lock.c (test_once): Don't reference fire_signal if
37491         !ENABLE_LOCKING.
37493 2019-06-19  Bruno Haible  <bruno@clisp.org>
37495         nanosleep: Relicense under LGPLv2+.
37496         Approved by Jim Meyering, Paul Eggert, Eric Blake, Pádraig Brady.
37497         * modules/nanosleep (License): Change to LGPLv2+.
37499 2019-06-19  Bruno Haible  <bruno@clisp.org>
37501         Reorder pieces of header in perl scripts.
37502         The desired order is
37503         - Prologue part 1 (2 lines with #!)
37504         - Program short description
37505         - Copyright and license notice
37506         - Written-by notice
37507         - Program short description (optional)
37508         - Program long description (optional)
37509         - Prologue part 2
37510         - Time stamp
37511         - Code
37512         Reported by Paul Eggert.
37513         * build-aux/announce-gen: Reorder header.
37514         * build-aux/gitlog-to-changelog: Likewise.
37515         * build-aux/useless-if-before-free: Likewise.
37516         * build-aux/prefix-gnulib-mk: Add copyright notice and short
37517         description.
37518         * build-aux/update-copyright: Likewise. Add short description. Bump
37519         time-stamp-line-limit to 200.
37521 2019-06-18  Paul Eggert  <eggert@cs.ucla.edu>
37523         verify-tests: work around xlc bug
37524         Problem reported by Bruno Haible in:
37525         https://lists.gnu.org/r/bug-gnulib/2019-06/msg00049.html
37526         * tests/test-verify.c (item): Move the arithmetic inside the
37527         verify_expr, to avoid tickling a bug in IBM AIX xlc V12.1.
37529 2019-06-16  Bruno Haible  <bruno@clisp.org>
37531         Restore Emacs time-stamp hook applicability.
37532         Reported by Darshit Shah <darnir@gnu.org>.
37533         * build-aux/useless-if-before-free: Bump time-stamp-line-limit to 50.
37534         * build-aux/announce-gen: Likewise.
37535         * build-aux/gitlog-to-changelog: Likewise.
37536         * build-aux/prefix-gnulib-mk: Likewise.
37537         * build-aux/update-copyright: Likewise.
37539 2019-06-15  Bruno Haible  <bruno@clisp.org>
37541         Fix scripts to have valid executable format on Alpine Linux.
37542         Reported by Tim Rühsen <tim.ruehsen@gmx.de>.
37543         Idea by Paul Eggert.
37544         * build-aux/useless-if-before-free: Use a prologue that starts with
37545         '#!/bin/sh'.
37546         * build-aux/announce-gen: Likewise.
37547         * build-aux/gitlog-to-changelog: Likewise.
37548         * build-aux/prefix-gnulib-mk: Likewise.
37549         * build-aux/update-copyright: Likewise.
37550         * tests/test-update-copyright.sh: Update test program accordingly.
37552 2019-06-10  Bruno Haible  <bruno@clisp.org>
37554         nproc: Ensure nproc(NPROC_ALL) ≥ nproc(NPROC_CURRENT) with glibc ≥ 2.26.
37555         Reported by Nikita Ermakov <arei@altlinux.org> in
37556         <https://lists.gnu.org/archive/html/bug-gnulib/2019-06/msg00003.html>.
37557         * lib/nproc.c (num_processors_ignoring_omp): Treat a return value of
37558         sysconf (_SC_NPROCESSORS_CONF) == 2 like a return value == 1.
37560 2019-06-10  Bruno Haible  <bruno@clisp.org>
37562         posix_spawn_file_actions_addchdir: Fix possible use-after-free bug.
37563         * lib/spawn_int.h (struct __spawn_action): Remove 'const' from path.
37564         * lib/spawn_faction_addchdir.c (posix_spawn_file_actions_addchdir): Make
37565         a copy of the path argument.
37566         * lib/spawn_faction_destroy.c (posix_spawn_file_actions_destroy): Free
37567         it.
37569 2019-06-10  Bruno Haible  <bruno@clisp.org>
37571         posix_spawn_file_actions_addopen: Fix possible use-after-free bug.
37572         Reported at <https://sourceware.org/bugzilla/show_bug.cgi?id=17048>.
37573         * lib/spawn_int.h (struct __spawn_action): Remove 'const' from path.
37574         * lib/spawn_faction_addopen.c (posix_spawn_file_actions_addopen): Make
37575         a copy of the path argument.
37576         * lib/spawn_faction_destroy.c (posix_spawn_file_actions_destroy): Free
37577         it.
37579 2019-06-10  Bruno Haible  <bruno@clisp.org>
37581         posix_spawn_file_actions_addfchdir: Add tests.
37582         * tests/test-posix_spawn_file_actions_addfchdir.c: New file.
37583         * tests/test-posix_spawn5.c: New file.
37584         * modules/posix_spawn_file_actions_addfchdir-tests: New file.
37586 2019-06-10  Bruno Haible  <bruno@clisp.org>
37588         posix_spawn_file_actions_addfchdir: New module.
37589         * lib/spawn.in.h (posix_spawn_file_actions_addfchdir): New declaration.
37590         * lib/spawn_int.h (struct __spawn_action): Add tag 'spawn_do_fchdir' and
37591         union member 'fchdir_action'.
37592         * lib/spawn_faction_addfchdir.c: New file.
37593         * lib/spawni.c (__spawni): Implement the spawn_do_fchdir action.
37594         * m4/posix_spawn_faction_addfchdir.m4: New file.
37595         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Test whether module
37596         'posix_spawn_file_actions_addfchdir' is present and whether
37597         posix_spawn_file_actions_addfchdir_np exists. Set REPLACE_POSIX_SPAWN.
37598         * m4/spawn_h.m4 (gl_SPAWN_H): Test whether
37599         posix_spawn_file_actions_addfchdir is declared.
37600         (gl_SPAWN_H_DEFAULTS): Initialize
37601         GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR,
37602         HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR,
37603         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR.
37604         * modules/spawn (Makefile.am): Substitute
37605         GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR,
37606         HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR,
37607         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR.
37608         * modules/posix_spawn_file_actions_addfchdir: New file.
37609         * tests/test-spawn-c++.cc (posix_spawn_file_actions_addfchdir): Check
37610         signature.
37611         * doc/posix-functions/posix_spawn.texi: Mention the new module.
37612         * doc/posix-functions/posix_spawnp.texi: Likewise.
37613         * doc/glibc-functions/posix_spawn_file_actions_addfchdir_np.texi:
37614         Likewise.
37616 2019-06-10  Bruno Haible  <bruno@clisp.org>
37618         doc: Document existence of posix_spawn_file_actions_addchdir module.
37619         * doc/glibc-functions/posix_spawn_file_actions_addchdir_np.texi: Mention
37620         the posix_spawn_file_actions_addchdir module.
37622 2019-06-10  Bruno Haible  <bruno@clisp.org>
37624         posix_spawn-internal: Fix module description.
37625         * modules/posix_spawn (configure.ac): Move request to compile spawni.c
37626         from here...
37627         * modules/posix_spawnp (configure.ac): ... and here...
37628         * modules/posix_spawn-internal (configure.ac): ... to here.
37630 2019-06-10  Bruno Haible  <bruno@clisp.org>
37632         doc: Update and improve documentation of glibc functions.
37633         This is a series of commits that
37634         - updates the documentation to the state of glibc 2.29,
37635         - adds references to Linux man pages and glibc documentation,
37636         - marks Linux specific functions as such.
37637         These are the commits:
37638         doc: Update after removal of crypt functions from glibc 2.28.
37639         doc: Remove mention of function vm86 (does not exist on x86_64).
37640         doc: Remove mention of functions that are gone from glibc.
37641         doc: Mention that glibc no longer provides h_errno.
37642         doc: Mention the availability of specific functions in glibc versions.
37643         doc: Mention eaccess.
37644         doc: Add references to Linux man pages.
37645         doc: Add references to glibc documentation.
37646         doc: Mention inotify_* functions.
37647         doc: Mention ppoll.
37648         doc: Mention sched_getcpu.
37649         doc: Mention sync_file_range.
37650         doc: Mention epoll_pwait.
37651         doc: Mention eventfd, eventfd_read, eventfd_write.
37652         doc: Mention signalfd.
37653         doc: Mention timerfd_create, timerfd_gettime, timerfd_settime.
37654         doc: Mention epoll_create1.
37655         doc: Mention getauxval.
37656         doc: Mention pthread_getattr_default_np, pthread_setattr_default_np.
37657         doc: Mention nextdown, nextup.
37658         doc: Mention more ISO TS 18661-1 <math.h> functions.
37659         doc: Mention ISO TS 18661-1 <fenv.h> functions.
37660         doc: Mention getrandom, getentropy.
37661         doc: Mention strfromf, strfromd, strfroml.
37662         doc: Mention preadv2, pwritev2.
37663         doc: Mention copy_file_range.
37664         doc: Mention memfd_create.
37665         doc: Mention mlock2.
37666         doc: Mention pkey_alloc, pkey_set, pkey_get, pkey_free, pkey_mprotect.
37667         doc: Mention more ISO TS 18661-1 <math.h> functions.
37668         doc: Mention renameat2.
37669         doc: Mention statx.
37670         doc: Mention the ISO C11 multithreading header and functions.
37671         doc: Mention getcpu.
37672         doc: Mention posix_spawn_file_actions_add[f]chdir_np.
37673         doc: Some glibc functions also exist on IRIX 6.5 in 32-bit mode.
37674         doc: Some glibc functions also exist on FreeBSD, AIX, HP-UX, Solaris 11.
37675         doc: Some glibc functions also exist on FreeBSD, Solaris 11.
37676         doc: Some glibc functions also exist on Solaris 11.
37677         doc: Some glibc functions also exist on Solaris 11.4.
37678         doc: Some glibc functions also exist on FreeBSD.
37679         doc: Some glibc functions also exist on BeOS.
37680         doc: Some glibc functions also exist on Haiku.
37681         doc: Mark functions which exist only on Linux.
37682         doc: Mark functions which exist only on Linux and illumos.
37684 2019-06-06  Paul Eggert  <eggert@cs.ucla.edu>
37686         copy-file: fix typo
37687         * lib/copy-file.c (qcopy_file_preserving): Remove unused label.
37689         copy-file-range: simplify into a stub
37690         Based on a comment by Florian Weimer in:
37691         https://lists.gnu.org/r/bug-gnulib/2019-06/msg00007.html
37692         It turns out that Emacs (which will use this module) won’t need an
37693         emulation and I suspect other programs won’t either, because these
37694         programs will need to fall back on read+write anyway.  Perhaps I
37695         am wrong and other programs will be able to use an emulation; if
37696         so, this patch can be reverted.
37697         * lib/copy-file-range.c (COPY_FILE_RANGE): Replace with a stub.
37698         Just call it copy_file_range.
37699         * m4/copy-file-range.m4 (gl_FUNC_COPY_FILE_RANGE):
37700         Check via AC_LINK_IFELSE.
37701         * modules/copy-file-range (Depends-on): Remove modules no longer used.
37703 2019-06-04  Paul Eggert  <eggert@cs.ucla.edu>
37705         copy-file: prefer copy_file_range
37706         * lib/copy-file.c: Do not include xalloc.h.
37707         (qcopy_file_preserving): Allocate a buffer only if
37708         copy_file_range does not suffice.  If the allocation fails
37709         don't give up; just use a small stack-based buffer.
37710         Prefer copy_file_range if it works.
37711         * modules/copy-file (Depends-on): Add copy-file-range.
37712         Remove xalloc.
37714         copy-file-range: new module
37715         * MODULES.html.sh: Add copy-file-range.
37716         * lib/copy-file-range.c, m4/copy-file-range.m4:
37717         * modules/copy-file-range: New files.
37718         * lib/unistd.in.h (copy_file_range): Declare.
37719         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS):
37720         Set up GNULIB_COPY_FILE_RANGE and HAVE_COPY_FILE_RANGE.
37721         * modules/unistd (unistd.h): Substitute them.
37723 2019-05-28  Bruno Haible  <bruno@clisp.org>
37725         binary-io: Attempted use of O_BINARY on consoles no longer fails.
37726         Reported by KO Myung-Hun <komh78@gmail.com> in
37727         <https://lists.gnu.org/archive/html/bug-gnulib/2019-05/msg00124.html>.
37728         * lib/binary-io.h (__gl_setmode_check): Remove function.
37729         (set_binary_mode): Declare as notinline on DJGPP and EMX.
37730         * lib/binary-io.c (__gl_setmode_check): Remove function.
37731         (set_binary_mode): Define here on DJGPP and EMX. Inline
37732         __gl_setmode_check. In case of a tty, don't return an error code.
37734 2019-05-28  James Youngman  <jay@gnu.org>
37736         dirent-safer: Make opendir_safer usable from C++.
37737         * lib/dirent-safer.h: use extern "C".
37739 2019-05-28  James Youngman  <jay@gnu.org>
37741         canonicalize: Make canonicalize_filename_mode usable from C++.
37742         * lib/canonicalize.h: use extern "C".
37744 2019-05-26  Akim Demaille  <akim@lrde.epita.fr>
37746         prefix-gnulib-mk: Fix CPPFLAGS migration.
37747         * build-aux/prefix-gnulib-mk (prefix_assignment): Don't forget the
37748         _a part of the library name.
37750 2019-05-24  Paul Eggert  <eggert@cs.ucla.edu>
37752         flexmember: update comments again
37753         * lib/flexmember.h, m4/flexmember.m4: Improve comments further.
37755         flexmember: update comment
37756         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER): Improve comment.
37758 2019-05-20  Bruno Haible  <bruno@clisp.org>
37760         setlocale: Improve fallback on macOS.
37761         * lib/setlocale.c (search): Optimize away a redundant strcmp()
37762         invocation.
37763         (locales_with_principal_territory): New array.
37764         (langcmp, get_main_locale_with_same_language): New functions.
37765         (locales_with_principal_language): New array.
37766         (terrcmp, get_main_locale_with_same_territory): New functions.
37767         (rpl_setlocale): When setlocale_single failed, try again with a locale
37768         that is more likely to exist. Don't warn if the environment variable
37769         SETLOCALE_VERBOSE is not set.
37771 2019-05-19  Bruno Haible  <bruno@clisp.org>
37773         localename: Fix default on macOS.
37774         * m4/intlmacosx.m4 (gt_INTL_MACOSX): Don't test for CFLocaleCopyCurrent.
37775         * lib/localename.c: Remove includes for HAVE_CFLOCALECOPYCURRENT.
37776         (gl_locale_name_environ, gl_locale_name_default): Remove code for
37777         HAVE_CFLOCALECOPYCURRENT.
37778         * lib/localename.h (gl_locale_name_default): Update.
37780 2019-05-19  Karl Berry  <karl@freefriends.org>
37782         * config/srclistvars.sh (TEXINFOTEX): make ftp.gnu.org be the
37783         source for texinfo.tex, replacing TEXINFOSRC, per Texinfo maintainer.
37784         * config/srclist.txt (texinfo.tex): use it. (Also doc changes.)
37786 2019-05-18  Akim Demaille  <akim@lrde.epita.fr>
37788         maintainer-makefile: catch uses of $< in non-implicit rules
37789         * top/maint.mk (sc_prohibit_magic_number_exit): New.
37791 2019-05-18  Bruno Haible  <bruno@clisp.org>
37793         threadlib: Provide an easy way to avoid mingw's winpthreads library.
37794         * m4/threadlib.m4 (gl_AVOID_WINPTHREAD): New macro.
37795         (gl_THREADLIB_EARLY_BODY): Recognize when it was invoked, and set
37796         gl_use_threads accordingly.
37798 2019-05-18  Bruno Haible  <bruno@clisp.org>
37800         pthread_sigmask: Fix compilation error with --enable-threads=windows.
37801         Reported by Tim Rühsen in
37802         <https://lists.gnu.org/archive/html/bug-gnulib/2018-01/msg00018.html>
37803         and Michele Locati in
37804         <https://lists.gnu.org/archive/html/bug-gettext/2019-04/msg00057.html>.
37805         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Revert change from
37806         2015-06-01. Test whether pthread_sigmask is a macro, regardless of
37807         $LIBMULTITHREAD. Consider it regardless whether module 'threadlib' is
37808         in use and regardless which threads API is chosen.
37810 2019-05-14  Paul Eggert  <eggert@cs.ucla.edu>
37812         close-stream, closein, closeout: simplify
37813         I noticed this opportunity for simplification while drafting a
37814         new, related module that I haven’t had time to finish yet.
37815         * m4/close-stream.m4, m4/closein.m4, m4/closeout.m4: Remove.
37816         * modules/close-stream (Files): Remove m4/close-stream.m4.
37817         (configure.ac): Omit gl_CLOSE_STREAM.
37818         * modules/closein (Files): Remove m4/closein.m4
37819         (configure.ac): Omit gl_CLOSEIN.
37820         * modules/closeout (Files): Remove m4/closeout.m4.
37821         (configure.ac): Omit gl_CLOSEOUT.
37823 2019-05-12  Bruno Haible  <bruno@clisp.org>
37825         libtool-next-version: New program.
37826         * build-aux/libtool-next-version: New file.
37828 2019-05-11  John Darrington  <john@darrington.wattle.id.au>
37829             Bruno Haible  <bruno@clisp.org>
37831         version-etc: Ease translation.
37832         * lib/version-etc.c (version_etc_arn, emit_bug_reporting_address): Move
37833         URLs and formatting newlines out of translatable string.
37835 2019-05-11  Bruno Haible  <bruno@clisp.org>
37837         gnupload: Explain how to create symlinks.
37838         * build-aux/gnupload (usage): Add an example that creates symlinks.
37840 2019-05-11  Paul Eggert  <eggert@cs.ucla.edu>
37842         fpucw: port to gcc -pedantic
37843         * lib/fpucw.h (GET_FPUCW, SET_FPUCW):
37844         Use __extension__ if using ({ ... }).
37846         crypto/af_alg: port to strict C compilers
37847         * lib/af_alg.c: Include af_alg.h regardless, so that the
37848         compilation unit is nonempty.
37850 2019-05-10  Bruno Haible  <bruno@clisp.org>
37852         base64: Avoid false positive warning from Coverity.
37853         Reported by Kamil Dudka <kdudka@redhat.com>.
37854         Idea by Paul Eggert.
37855         * lib/base64.c (base64_encode_fast, base64_encode): Add a no-op
37856         '& 0x3f' to the array index expressions. This convinces Coverity that
37857         there is no out-of-bounds array reference, regardless of the input.
37859 2019-05-09  Bruno Haible  <bruno@clisp.org>
37861         gettext: Update to gettext 0.20.
37862         * modules/gettext (Files): Remove m4/codeset.m4, m4/fcntl-o.m4,
37863         m4/glibc2.m4, m4/glibc21.m4, m4/intdiv0.m4, m4/intl.m4, m4/intldir.m4,
37864         m4/intmax.m4, m4/inttypes_h.m4, m4/inttypes-pri.m4, m4/lcmessage.m4,
37865         m4/lock.m4, m4/longlong.m4, m4/printf-posix.m4, m4/size_max.m4,
37866         m4/stdint_h.m4, m4/threadlib.m4, m4/uintmax_t.m4, m4/visibility.m4,
37867         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4. Add m4/host-cpu-c-abi.m4.
37868         (configure.ac): Request infrastructure compatible with gettext 0.20.
37869         * m4/glibc2.m4: Remove file.
37870         * m4/intdiv0.m4: Remove file.
37871         * m4/intl.m4: Remove file.
37872         * m4/intldir.m4: Remove file.
37873         * m4/intmax.m4: Remove file.
37874         * m4/printf-posix.m4: Remove file.
37875         * m4/uintmax_t.m4: Remove file.
37876         * m4/gettext.m4: Update from gettext 0.20.
37877         * m4/po.m4: Likewise.
37879 2019-05-09  Paul Eggert  <eggert@cs.ucla.edu>
37881         verify: remove verify_true
37882         * NEWS: Mention this.
37883         * lib/verify.h (verify_true): Remove.
37884         * tests/test-verify.c (item): Test verify_expr, not verify_true.
37886         Support C2x and C++17 static_assert
37887         C2x and C++17 finally added support for a simple, single-argument
37888         ‘static_assert’ that implements what the Gnulib ‘verify’ macro was
37889         doing back in 2005.  Implement static_assert on older platforms.
37890         The only remaining advantage of ‘verify’ is a shorter name.
37891         * doc/posix-headers/assert.texi (assert.h):
37892         * doc/verify.texi (Compile-time Assertions):
37893         Modernize for C2x and C++17.
37894         * lib/verify.h (_GL_HAVE__STATIC_ASSERT1, _GL_HAVE_STATIC_ASSERT1):
37895         New macros.
37896         (_GL_HAVE__STATIC_ASSERT): Remove.
37897         (_GL_HAVE__STATIC_ASSERT): Rely more heavily on __STDC_VERSION__.
37898         (_GL_VERIFY_TRUE, _GL_VERIFY_TYPE): Remove 2nd arg, the diagnostic
37899         string.  All callers changed.
37900         (_GL_VERIFY): Require 3 or more args, of which only the first 2
37901         are used.  All callers changed.
37902         (_Static_assert): Allow either 1 or 2 args, and define if
37903         !_GL_HAVE__STATIC_ASSERT1 instead of defining if
37904         !_GL_HAVE__STATIC_ASSERT.
37905         (static_assert): Define if !_GL_HAVE_STATIC_ASSERT1 instead
37906         of defining if !_GL_HAVE_STATIC_ASSERT.
37907         (verify_expr, verify): Don’t bother trying to copy the expression
37908         into the diagnostic, since 1-argument static_assert doesn’t.
37909         (verify): Prefer 1-argument _Static_assert if it works.
37910         * m4/assert_h.m4 (gl_ASSERT_H): Check for 1-argument static_assert.
37912 2019-05-08  Paul Eggert  <eggert@cs.ucla.edu>
37914         Fix _GL_HAVE__STATIC_ASSERT typo
37915         * lib/verify.h (_Static_assert): For the FreeBSD workaround,
37916         use _GL_HAVE__STATIC_ASSERT, not _GL_HAVE_STATIC_ASSERT.
37918 2019-05-05  Bruno Haible  <bruno@clisp.org>
37920         wcwidth: Ensure width 1, not 2, for ambiguous characters.
37921         Reported by Kiyoshi KANAZAWA <yoi_no_myoujou@yahoo.co.jp>
37922         via Akim Demaille <akim.demaille@gmail.com>.
37923         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Check the width of U+2202. Use an
37924         en_US.UTF-8 locale, since that is more likely to be present than an
37925         fr_FR.UTF-8 locale.
37926         * tests/test-wcwidth.c (main): Check the width of U+2202.
37927         * doc/posix-functions/wcwidth.texi: Mention the issue.
37929 2019-05-03  Paul Eggert  <eggert@cs.ucla.edu>
37931         Port manywarnings to GCC 9
37932         * build-aux/gcc-warning.spec: Sort.  Add -Wattribute-alias,
37933         -Wc11-c2x-compat, -Wcast-result (for the D programming language),
37934         -Wclass-conversion, -Wdeprecated-copy, -Wdeprecated-copy-dtor,
37935         -Winit-list-lifetime, -Wpessimizing-move, -Wprio-ctor-dtor,
37936         -Wredundant-move.  Adjust to minor wording changes in GCC 9’s
37937         --help=warnings output.
37938         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -Wabsolute-value,
37939         -Waddress-of-packed-member, -Wattribute-warning, -Wcannot-profile,
37940         -Wmissing-profile.  Change -Wattribute-alias to -Wattribute-alias=2.
37942 2019-04-30  Paul Eggert  <eggert@cs.ucla.edu>
37944         Sync lib/mktime-internal.h from glibc
37945         * config/srclist.txt: Add entry for lib/mktime-internal.h.
37946         * lib/mktime-internal.h: Autoupdate.
37948 2019-04-28  Bruno Haible  <bruno@clisp.org>
37950         tls tests: Prevent that the test takes too long.
37951         * tests/test-tls.c: Include <signal.h>, <unistd.h>.
37952         (main): Let the test fail if it takes more than 10 minutes.
37953         * modules/tls-tests (configure.ac): Test whether 'alarm' is declared.
37955 2019-04-27  Bruno Haible  <bruno@clisp.org>
37957         lock tests: Prevent that the test takes too long.
37958         * tests/test-lock.c: Include <signal.h>, <unistd.h>.
37959         (main): Let the test fail if it takes more than 10 minutes.
37960         * modules/lock-tests (configure.ac): Test whether 'alarm' is declared.
37962 2019-04-27  Bruno Haible  <bruno@clisp.org>
37964         localename: Fix crash on mingw (regression from 2018-11-23).
37965         * lib/localename.c (gl_locale_name_posix): Don't attempt to convert a
37966         locale name that is null.
37968 2019-04-27  Bruno Haible  <bruno@clisp.org>
37970         Fix gcc warnings on 64-bit mode mingw.
37971         * lib/clean-temp.c: Include <stdint.h> instead of defining uintptr_t.
37972         * lib/gl_array_list.c: Likewise.
37973         * lib/gl_array_map.c: Likewise.
37974         * lib/gl_array_set.c: Likewise.
37975         * lib/gl_carray_list.c: Likewise.
37976         * lib/gl_sublist.c: Likewise.
37977         * lib/gl_avltreehash_list.c (uintptr_t): Remove definition.
37978         * lib/gl_rbtreehash_list.c (uintptr_t): Likewise.
37979         * lib/gl_hash_map.c (uintptr_t): Likewise.
37980         * lib/gl_hash_set.c (uintptr_t): Likewise.
37981         * lib/gl_linkedhash_list.c (uintptr_t): Likewise.
37982         * lib/gl_linkedhash_map.c (uintptr_t): Likewise.
37983         * lib/gl_linkedhash_set.c (uintptr_t): Likewise.
37984         * lib/iconv.c (uintptr_t): Likewise.
37985         * lib/iconv_close.c (uintptr_t): Likewise.
37986         * tests/test-lock.c: Include <stdint.h>.
37987         (once_contender_thread, test_once): Cast through 'intptr_t' instead of
37988         'long'.
37989         * modules/clean-temp (Depends-on): Add stdint.
37990         * modules/array-list (Depends-on): Likewise.
37991         * modules/array-map (Depends-on): Likewise.
37992         * modules/array-set (Depends-on): Likewise.
37993         * modules/carray-list (Depends-on): Likewise.
37994         * modules/sublist (Depends-on): Likewise.
37995         * modules/lock-tests (Depends-on): Likewise.
37997 2019-04-27  Bruno Haible  <bruno@clisp.org>
37999         error: Tweak indentation.
38000         * lib/error.c: Correct indentation.
38002 2019-04-27  Bruno Haible  <bruno@clisp.org>
38004         term-style-control: Fix gcc warning on mingw.
38005         * lib/term-style-control.c (ensure_other_signal_handlers): Reduce scope
38006         of i.
38008 2019-04-26  Bruno Haible  <bruno@clisp.org>
38010         pipe-filter-gi, pipe-filter-ii: Fix gcc warning.
38011         * lib/pipe-filter-aux.h (read): Undefine before redefinition.
38013 2019-04-26  Bruno Haible  <bruno@clisp.org>
38015         relocatable-prog: Fix gcc warning on mingw.
38016         * lib/progreloc.c (maybe_executable): Don't define on native Windows and
38017         on EMX.
38019 2019-04-02  Bruno Haible  <bruno@clisp.org>
38021         gitsub.sh: New file.
38022         * top/gitsub.sh: New file.
38024 2019-04-18  Akim Demaille  <akim@lrde.epita.fr>
38026         argmatch: use void* for raw memory pointers
38027         * lib/argmatch.h, lib/argmatch.c (argmatch, argmatch_valid)
38028         (__xargmatch_internal, argmatch_to_argument): Use void* for pointers
38029         to "values", keep char* for strings.
38031 2019-04-21  Akim Demaille  <akim@lrde.epita.fr>
38033         prefix-gnulib-mk: fix the support for gnulib-po
38034         * build-aux/prefix-gnulib-mk (prefix_assignment): Remove useless $res.
38035         Don't touch HAVE_* variables.
38036         Map AM_CPPFLAGS and AM_CPPFLAGS to the library's corresponding variables.
38038 2019-04-18  Bernhard Voelker  <mail@bernhard-voelker.de>
38040         di-set: allow free with 'ino_map' being NULL.
38041         * lib/di-set.c (di_set_free): Avoid ino_map_free() when dis->ino_map
38042         is NULL.  Bug introduced in commit 3703dbbe88dd.
38043         * tests/test-di-set.c: Add di_set_free() right after di_set_alloc()
38044         as a test.
38046 2019-04-14  Paul Eggert  <eggert@cs.ucla.edu>
38048         * lib/str-two-way.h: Fix comment typo.
38050 2019-04-13  Bruno Haible  <bruno@clisp.org>
38052         x-to-1: Restore ability to use original calling convention.
38053         * build-aux/x-to-1.in: Add comments. Accept the original form of
38054         HELP2MAN argument as well as the form expected since 2012-12-12.
38056 2019-04-13  Bruno Haible  <bruno@clisp.org>
38058         x-to-1: Avoid failure due to missing perl modules.
38059         * build-aux/x-to-1.in: Test whether all the perl modules that help2man
38060         needs are installed.
38062 2019-04-13  Bruno Haible  <bruno@clisp.org>
38064         openmp-init: New module.
38065         * modules/openmp-init: New file.
38066         * modules/openmp: (Files, Depends-on, configure.ac, Makefile.am): Revert
38067         the changes from 2019-04-09.
38069 2019-04-12  Bruno Haible  <bruno@clisp.org>
38071         signbit: Fix compilation error when gnulib's math.h exists twice.
38072         * lib/math.in.h (GNULIB_defined_signbit): New macro.
38074 2019-04-12  Bruno Haible  <bruno@clisp.org>
38076         openmp: Fix compilation error on platforms without OpenMP.
38077         * lib/omp-init.c: Include <omp.h> only if _OPENMP.
38079 2019-04-09  Bernhard Voelker  <mail@bernhard-voelker.de>
38081         mountlist: make parsing /proc/self/mountinfo more robust
38082         Cater for the following issues with mountinfo parsing (the first
38083         one was reported by Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
38084         in <https://bugs.gnu.org/35137>).
38085         1. The fields source, target, mntroot and fstype may contain characters
38086         like '\r'; sscanf(3) fails to read such values with the %s format
38087         specifier because it would stop at such characters.
38088         Example: "mount -t tmpfs tmpfs /foo^Mbar".
38089         The only true separator in that file is the ' ' character.
38090         2. The source field may be an empty string, which happens e.g. with
38091         "mount -t tmpfs '' /target".
38092         3. The fstype field may contain mangled characters as well which need
38093         unescaping.
38094         * lib/mountlist.c (terminate_at_blank): Add utility function.
38095         (read_file_system_list): In the block trying to read the mountinfo file,
38096         avoid using sscanf(3) with %s format; instead, parse the above fields
38097         separated by spaces one by one.
38098         This also handles the case when the source field is an empty string.
38099         Unescape the fstype field.
38101 2019-04-09  Bruno Haible  <bruno@clisp.org>
38103         openmp: Add workaround for 32-bit programs on AIX.
38104         * lib/omp.in.h: New file.
38105         * lib/omp-init.c: New file, based on lib/nproc.c.
38106         * m4/omp_h.m4: New file.
38107         * modules/openmp (Files): Add them.
38108         (Depends-on): Add include_next, c-ctype, setenv.
38109         (configure.ac): Invoke gl_OMP_H.
38110         (Makefile.am): Add rules to create omp.h and compile omp-init.c.
38111         (Include): Mention <omp.h>.
38113 2019-04-09  Bruno Haible  <bruno@clisp.org>
38115         nproc: Fix return value for privileged processes.
38116         * lib/nproc.c (num_processors_ignoring_omp): Test getuid(), not
38117         getpid().
38119 2019-04-07  Bruno Haible  <bruno@clisp.org>
38121         Add copyright notices in several files.
38122         Reported by <ineiev@gnu.org> in <https://savannah.gnu.org/bugs/?54809>.
38123         * lib/_Noreturn.h: Add LGPLv2+ copyright notice.
38124         * lib/libunistring.valgrind: Likewise.
38125         * lib/iconv_open-*.gperf: Add GPLv2+ copyright notice.
38126         * lib/uniname/gen-uninames.lisp: Add GPLv3+ copyright notice.
38127         * lib/memchr.valgrind: Likewise.
38128         * lib/memchr2.valgrind: Likewise.
38129         * lib/rawmemchr.valgrind: Likewise.
38130         * lib/relocatable.valgrind: Likewise.
38131         * lib/strchrnul.valgrind: Likewise.
38133 2019-03-25  Bruno Haible  <bruno@clisp.org>
38135         term-style-control tests: Fix link error.
38136         Reported by Tom G. Christensen in
38137         <https://lists.gnu.org/archive/html/bug-gnulib/2019-03/msg00108.html>.
38138         * modules/term-style-control-tests (Makefile.am): Link
38139         test-term-style-control-hello and test-term-style-control-yes against
38140         LIBINTL.
38142 2019-03-24  Bruno Haible  <bruno@clisp.org>
38144         term-style-control: Add tests.
38145         * tests/test-term-style-control-hello.c: New file.
38146         * tests/test-term-style-control-yes.c: New file.
38147         * modules/term-style-control-tests: New file.
38149         term-style-control: New module.
38150         * lib/term-style-control.h: New file, based on libtextstyle's
38151         term-ostream.oo.h and term-ostream.oo.c.
38152         * lib/term-style-control.c: New file, based on libtextstyle's
38153         term-ostream.oo.c.
38154         * modules/term-style-control: New file.
38156 2019-03-22  Akim Demaille  <akim@lrde.epita.fr>
38158         _Noreturn: beware of C's _Noreturn in C++ pre C++11.
38159         * lib/_Noreturn.h, m4/gnulib-common.m4: Using C's _Noreturn in
38160         C++98 appears to be supported by Clang, but not by GCC nor ICC.
38162 2019-03-23  Bruno Haible  <bruno@clisp.org>
38164         Support cross-compilation to musl libc.
38165         Reported by Necktwi Ozfguah <necktwi@ferryfair.com>.
38166         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Add cross-compilation guesses for
38167         musl libc.
38168         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Likewise.
38169         * m4/cbrtl.m4 (gl_FUNC_CBRTL): Likewise.
38170         * m4/ceil.m4 (gl_FUNC_CEIL): Likewise.
38171         * m4/ceilf.m4 (gl_FUNC_CEILF): Likewise.
38172         * m4/ceill.m4 (gl_FUNC_CEILL): Likewise.
38173         * m4/chown.m4 (gl_FUNC_CHOWN): Likewise.
38174         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
38175         * m4/exp2l.m4 (gl_FUNC_EXP2L): Likewise.
38176         * m4/expl.m4 (gl_FUNC_EXPL): Likewise.
38177         * m4/expm1.m4 (gl_FUNC_EXPM1): Likewise.
38178         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Likewise.
38179         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Likewise.
38180         * m4/floor.m4 (gl_FUNC_FLOOR): Likewise.
38181         * m4/floorf.m4 (gl_FUNC_FLOORF): Likewise.
38182         * m4/fmod.m4 (gl_FUNC_FMOD): Likewise.
38183         * m4/fmodf.m4 (gl_FUNC_FMODF): Likewise.
38184         * m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
38185         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Likewise.
38186         * m4/fpurge.m4 (gl_FUNC_FPURGE): Likewise.
38187         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Likewise.
38188         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise.
38189         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
38190         * m4/getgroups.m4 (AC_FUNC_GETGROUPS, gl_FUNC_GETGROUPS): Likewise.
38191         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
38192         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Likewise.
38193         * m4/hypot.m4 (gl_FUNC_HYPOT): Likewise.
38194         * m4/hypotf.m4 (gl_FUNC_HYPOTF): Likewise.
38195         * m4/hypotl.m4 (gl_FUNC_HYPOTL): Likewise.
38196         * m4/iconv_open-utf.m4 (gl_FUNC_ICONV_OPEN_UTF_SUPPORT): Likewise.
38197         * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Likewise.
38198         * m4/log.m4 (gl_FUNC_LOG): Likewise.
38199         * m4/logf.m4 (gl_FUNC_LOGF): Likewise.
38200         * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Likewise.
38201         * m4/log10.m4 (gl_FUNC_LOG10): Likewise.
38202         * m4/log10f.m4 (gl_FUNC_LOG10F): Likewise.
38203         * m4/log10l.m4 (gl_FUNC_LOG10L): Likewise.
38204         * m4/log1p.m4 (gl_FUNC_LOG1P): Likewise.
38205         * m4/log1pf.m4 (gl_FUNC_LOG1PF): Likewise.
38206         * m4/log1pl.m4 (gl_FUNC_LOG1PL): Likewise.
38207         * m4/log2.m4 (gl_FUNC_LOG2): Likewise.
38208         * m4/log2f.m4 (gl_FUNC_LOG2F): Likewise.
38209         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Likewise.
38210         * m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise.
38211         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise.
38212         * m4/modf.m4 (gl_FUNC_MODF): Likewise.
38213         * m4/modff.m4 (gl_FUNC_MODFF): Likewise.
38214         * m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
38215         * m4/perror.m4 (gl_FUNC_PERROR): Likewise.
38216         * m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_INFINITE,
38217         gl_PRINTF_INFINITE_LONG_DOUBLE, gl_PRINTF_DIRECTIVE_A,
38218         gl_PRINTF_DIRECTIVE_F, gl_PRINTF_FLAG_ZERO, gl_SNPRINTF_TRUNCATION_C99,
38219         gl_SNPRINTF_RETVAL_C99, gl_SNPRINTF_DIRECTIVE_N,
38220         gl_VSNPRINTF_ZEROSIZE_C99): Likewise.
38221         * m4/ptsname.m4 (gl_FUNC_PTSNAME): Likewise.
38222         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
38223         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Likewise.
38224         * m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise.
38225         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise.
38226         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Likewise.
38227         * m4/rintl.m4 (gl_FUNC_RINTL): Likewise.
38228         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
38229         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
38230         * m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise.
38231         * m4/setenv.m4 (gl_FUNC_SETENV): Likewise.
38232         * m4/signbit.m4 (gl_SIGNBIT): Likewise.
38233         * m4/sleep.m4 (gl_FUNC_SLEEP): Likewise.
38234         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
38235         * m4/strerror.m4 (gl_FUNC_STRERROR, gl_FUNC_STRERROR_0): Likewise.
38236         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
38237         * m4/strtold.m4 (gl_FUNC_STRTOLD): Likewise.
38238         * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
38239         * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
38240         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
38241         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
38242         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise.
38243         * m4/usleep.m4 (gl_FUNC_USLEEP): Likewise.
38244         * m4/utimes.m4 (gl_FUNC_UTIMES): Likewise.
38245         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
38247 2019-03-23  Bruno Haible  <bruno@clisp.org>
38249         posix_spawn_file_actions_*: Document musl libc bugs.
38250         * doc/posix-functions/posix_spawn_file_actions_addclose.texi: Mention
38251         the bug.
38252         * doc/posix-functions/posix_spawn_file_actions_adddup2.texi: Likewise.
38253         * doc/posix-functions/posix_spawn_file_actions_addopen.texi: Likewise.
38254         * m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE): When
38255         cross-compiling to a musl system, guess no.
38256         (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2): Likewise.
38257         (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN): Likewise.
38259 2019-03-23  Bruno Haible  <bruno@clisp.org>
38261         futimens: Document musl libc bug.
38262         * doc/posix-functions/futimens.texi: Mention the bug.
38263         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Require AC_CANONICAL_HOST. When
38264         cross-compiling, guess no on glibc and musl systems.
38266 2019-03-23  Bruno Haible  <bruno@clisp.org>
38268         Clarify that cross-compilation guesses are guesses.
38269         * m4/chown.m4 (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): When cross-compiling, add
38270         prefix 'guessing ' to gl_cv_func_chown_follows_symlink.
38271         * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): When cross-compiling, add
38272         prefix 'guessing ' to gl_cv_func_fchownat_nofollow_works.
38273         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): When
38274         cross-compiling, add prefix 'guessing ' to gl_cv_func_getcwd_abort_bug.
38275         * m4/glob.m4 (gl_GLOB): When cross-compiling, add prefix 'guessing ' to
38276         gl_cv_glob_lists_symlinks.
38277         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): When cross-compiling, add prefix
38278         'guessing ' to ac_cv_func_malloc_0_nonnull.
38279         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): When cross-compiling, add prefix
38280         'guessing ' to ac_cv_func_realloc_0_nonnull.
38281         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, add prefix
38282         'guessing ' to gl_cv_func_poll.
38283         * m4/iconv_open-utf.m4 (gl_FUNC_ICONV_OPEN_UTF_SUPPORT): When cross-
38284         compiling, add prefix 'guessing ' to gl_cv_func_iconv_supports_utf.
38285         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Update accordingly.
38287 2019-03-23  Bruno Haible  <bruno@clisp.org>
38289         strtold: Fix typo.
38290         * m4/strtold.m4 (gl_FUNC_STRTOLD): Fix typo in variable name.
38292 2019-03-23  Bruno Haible  <bruno@clisp.org>
38294         noreturn: In C++ mode with clang, use _Noreturn as fallback.
38295         Reported by Akim Demaille.
38296         * lib/noreturn.h (_GL_NORETURN_FUNC): In C++ mode with clang, when
38297         [[noreturn]] would not work, use _Noreturn instead.
38299 2019-03-22  Akim Demaille  <akim@lrde.epita.fr>
38301         libtextstyle-optional: Fix compiler warnings.
38302         * lib/textstyle.in.h (html_styled_ostream_create): Flag arguments
38303         as unused.
38305 2019-03-19  Akim Demaille  <akim@lrde.epita.fr>
38307         bitset: fix memory leaks
38308         Reported by Bruno Haible.
38309         https://lists.gnu.org/archive/html/bug-gnulib/2019-03/msg00027.html
38310         * lib/bitset/vector.c (vbitset_free): New.
38311         (vbitset_vtable): Use it.
38313 2019-03-19  Akim Demaille  <akim@lrde.epita.fr>
38315         bitset: minor changes
38316         * lib/bitset/base.h (bitset_alloc_type): Remove, unused.
38317         * lib/bitset/table.c: Formatting changes.
38318         Remove useless braces.
38319         Prefer using else in cascades of if/else-if with returns.
38320         * lib/bitset/vector.c: Reduce scopes.
38322 2019-03-19  Akim Demaille  <akim@lrde.epita.fr>
38324         bitset: expose bitset_resize
38325         * lib/bitset.h (bitset_resize): Bounce on the polymorphic implementation.
38326         * tests/test-bitset.c (check_attributes): Check bitset_resize.
38327         (main): Use a variable bitset as reference, since fixed does not support resize.
38329 2019-03-19  Bruno Haible  <bruno@clisp.org>
38331         doc: Document the 'stdnoreturn' and 'noreturn' modules.
38332         Reported by Akim Demaille.
38333         * doc/noreturn.texi: New file.
38334         * doc/gnulib.texi: Include it.
38336 2019-03-19  Bruno Haible  <bruno@clisp.org>
38338         doc: Document how to use 'static inline'.
38339         * doc/static-inline.texi: New file.
38340         * doc/gnulib.texi: Include it.
38342 2019-03-19  Bruno Haible  <bruno@clisp.org>
38344         libtextstyle-optional: Add tests.
38345         * tests/test-libtextstyle.c: New file, based on libtextstyle's
38346         adhoc-tests/hello.c.
38347         * tests/test-libtextstyle-default.css: New file, copied from
38348         libtextstyle's adhoc-tests/hello-default.css.
38349         * modules/libtextstyle-optional-tests: New file.
38351         libtextstyle-optional: New module.
38352         * lib/textstyle.in.h: New file, based on libtextstyle's textstyle.h.
38353         * m4/libtextstyle-optional.m4: New file, based on m4/libtextstyle.m4.
38354         * modules/libtextstyle-optional: New file.
38356 2019-03-19  Bruno Haible  <bruno@clisp.org>
38358         c-stack: Make signal handlers more reliable.
38359         * lib/c-stack.c (progname): New variable.
38360         (die): Use it.
38361         (c_stack_action): Initialize it.
38362         (segv_handler): Save and restore errno.
38364 2019-03-19  Bruno Haible  <bruno@clisp.org>
38366         Help making signal handlers more reliable.
38367         * m4/gnulib-common.m4 (gl_COMMON_BODY): Emit definition of
38368         _GL_ASYNC_SAFE into config.h.
38369         * lib/nanosleep.c (sighandler): Mark as _GL_ASYNC_SAFE.
38370         * lib/fatal-signal.h (at_fatal_signal): Add _GL_ASYNC_SAFE marker to
38371         argument.
38372         * lib/fatal-signal.c (action_t, uninstall_handlers,
38373         fatal_signal_handler): Mark as _GL_ASYNC_SAFE.
38374         * lib/clean-temp.c (cleanup_action): Mark as _GL_ASYNC_SAFE.
38375         * lib/wait-process.c (cleanup_slaves, cleanup_slaves_action): Mark as
38376         _GL_ASYNC_SAFE.
38377         * lib/c-stack.h (c_stack_action): Add _GL_ASYNC_SAFE marker to argument.
38378         * lib/c-stack.c: Add _GL_ASYNC_SAFE markers.
38380 2019-03-18  Bruno Haible  <bruno@clisp.org>
38382         _Noreturn: clang and MSVC do support [[noreturn]] in C++11 mode.
38383         * lib/_Noreturn.h: Use [[noreturn]] if __GNUC__ and __GNUC_MINOR__
38384         indicate clang, or if _MSC_VER indicates MSVC++ 14.0 or newer.
38386 2019-03-17  Akim Demaille  <akim@lrde.epita.fr>
38388         _Noreturn: GCC 4.7 does not support [[noreturn]] in C++11 mode
38389         * lib/_Noreturn.h, m4/gnulib-common.m4: Don't use [[noreturn]] before
38390         GCC 4.8.
38392 2019-03-17  Paul Eggert  <eggert@cs.ucla.edu>
38394         fts: minor simplification
38395         * lib/fts.c (fts_safe_changedir): Remove redundant assignment.
38397 2019-03-17  Akim Demaille  <akim@lrde.epita.fr>
38399         bitset, timevar: Depend on c99.
38400         Reported by Bruno Haible.
38401         * modules/bitset, modules/timevar (Depends-on): Add c99.
38403 2019-03-16  Akim Demaille  <akim@lrde.epita.fr>
38405         bitset: a bit (...) more tests
38406         * tests/test-bitset.c (check_attributes): Check zero and ones.
38408 2019-03-16  Akim Demaille  <akim@lrde.epita.fr>
38410         bitset: fix overflows.
38411         Reported by Bruno Haible.
38412         https://lists.gnu.org/archive/html/bug-gnulib/2019-03/msg00017.html
38413         * lib/bitset/table.c (tbitset_test): last_bit is the position of
38414         the bit in the array of bitset_word, so be sure to take its modulo
38415         number-of-bits-in-bitset-word (i.e., EBITSET_ELT_WORDS).
38416         * lib/bitset/list.c (lbitset_unused_clear): Likewise.
38418 2019-03-14  Akim Demaille  <akim@lrde.epita.fr>
38420         bitset: style changes.
38421         * lib/bitset/table.c: Use NULL, not 0, for pointers.
38422         Formatting changes.
38423         (tbitset_list): Reduce scopes.
38425 2019-03-16  Bruno Haible  <bruno@clisp.org>
38427         fatal-signal: Pass the signal number to the action.
38428         * lib/fatal-signal.h (at_fatal_signal): Change the signature.
38429         * lib/fatal-signal.c (action_t): Take the signal number as parameter.
38430         (fatal_signal_handler): Pass the signal number to the action.
38431         * lib/clean-temp.c (cleanup_action): Renamed from cleanup. Take the
38432         signal number as parameter.
38433         (create_temp_dir): Update.
38434         * lib/wait-process.c (cleanup_slaves_action): New function.
38435         (register_slave_subprocess): Update at_fatal_signal invocation.
38436         * NEWS: Mention the change.
38438 2019-03-16  Bruno Haible  <bruno@clisp.org>
38440         fatal-signal: Add function that lists the fatal signals.
38441         * lib/fatal-signal.h (get_fatal_signals): New declaration.
38442         * lib/fatal-signal.c (get_fatal_signals): New function.
38444 2019-03-14  Bruno Haible  <bruno@clisp.org>
38446         isatty: Make it return true in Cygwin consoles on native Windows.
38447         * lib/isatty.c: Include <string.h>.
38448         (GetProcAddress): New macro.
38449         (GetNamedPipeClientProcessIdFuncType): New type.
38450         (GetNamedPipeClientProcessIdFunc): New variable.
38451         (QueryFullProcessImageNameFuncType): New type.
38452         (QueryFullProcessImageNameFunc): New variable.
38453         (initialized): New variable.
38454         (initialize): New function.
38455         (IsCygwinConsoleHandle): New function.
38456         (isatty): Invoke it.
38457         * doc/posix-functions/isatty.texi: Mention the issue.
38459 2019-03-14  Bruno Haible  <bruno@clisp.org>
38461         all: Update URLs to msdn.microsoft.com.
38462         * lib/stat-w32.c et al.: Update URLs after most of msdn.microsoft.com
38463         was moved to docs.microsoft.com.
38465 2019-03-13  Bruno Haible  <bruno@clisp.org>
38467         gnulib-tool: Clarify the coding style.
38468         Suggested by Pavel Raiskup <praiskup@redhat.com>.
38469         * gnulib-tool: Add comment about coding style.
38471 2019-03-11  Paul Eggert  <eggert@cs.ucla.edu>
38473         strtod: fix clash with strtold
38474         Problem reported for RHEL 5 by Jesse Caldwell (Bug#34817).
38475         * lib/strtod.c (compute_minus_zero, minus_zero):
38476         Simplify by remving the macro / external variable,
38477         and having just a function.  User changed.  This avoids
38478         the need for an external variable that might clash.
38480 2019-03-10  Bruno Haible  <bruno@clisp.org>
38482         alloca-opt: Fix conflict mingw's new <alloca.h> file.
38483         Reported by Eli Zaretskii <eliz@gnu.org>.
38484         * lib/alloca.in.h: On mingw systems that have <alloca.h>, include that.
38485         * m4/alloca.m4 (gl_FUNC_ALLOCA): Set HAVE_ALLOCA_H.
38486         * modules/alloca-opt (Makefile.am): Substitute HAVE_ALLOCA_H.
38488 2019-03-10  Bruno Haible  <bruno@clisp.org>
38490         tests: Avoid havoc with "gcc -fcheck-pointer-bounds".
38491         * tests/test-fprintf-posix2.c: Skip the test when -fcheck-pointer-bounds
38492         is in use.
38493         * tests/test-printf-posix2.c: Likewise.
38495 2019-03-10  Bruno Haible  <bruno@clisp.org>
38497         uninorm tests: Free allocated memory.
38498         * tests/uninorm/test-u32-normalize-big.h
38499         (struct normalization_test_file): Remove 'const' from allocated member.
38500         (free_normalization_test_file): New declaration.
38501         * tests/uninorm/test-u32-normalize-big.c (test_other): Free allocated
38502         memory.
38503         (free_normalization_test_file): New function.
38504         * tests/uninorm/test-u32-nfc-big.c (main): Free allocated
38505         'struct normalization_test_file' contents.
38506         * tests/uninorm/test-u32-nfd-big.c (main): Likewise.
38507         * tests/uninorm/test-u32-nfkc-big.c (main): Likewise.
38508         * tests/uninorm/test-u32-nfkd-big.c (main): Likewise.
38510 2019-03-10  Bruno Haible  <bruno@clisp.org>
38512         di-set: Fix memory leak.
38513         * lib/di-set.c (di_set_free): Free the ino_map through ino_map_free(),
38514         not free().
38516 2019-03-10  Bruno Haible  <bruno@clisp.org>
38518         tests: Free allocated memory.
38519         Reported by <deltatau@protonmail.com> via Assaf Gordon.
38520         * tests/test-astrxfrm.c (main): Free allocated memory.
38521         * tests/test-bitset.c (compare, check_attributes): Free allocated
38522         bitsets.
38523         * tests/test-filenamecat.c (main): Free allocated memory.
38524         * tests/test-freadahead.c (main): Free allocated memory and close stdin.
38525         * tests/test-freadptr.c (main): Likewise.
38526         * tests/test-freadptr2.c (main): Free allocated memory.
38527         * tests/test-freadseek.c (main): Likewise.
38528         * tests/test-gc-arcfour.c (main): Close allocated context.
38529         * tests/test-gc-arctwo.c (main): Likewise.
38530         * tests/test-gc-des.c (main): Close all allocated contexts.
38531         * tests/test-pipe-filter-gi1.c (main): Free allocated memory.
38532         * tests/test-pipe-filter-ii1.c (main): Likewise.
38533         * tests/test-posix_spawn_file_actions_addchdir.c (main): Destroy the
38534         allocated file actions.
38535         * tests/test-posix_spawn_file_actions_addclose.c (main): Likewise.
38536         * tests/test-posix_spawn_file_actions_adddup2.c (main): Likewise.
38537         * tests/test-posix_spawn_file_actions_addopen.c (main): Likewise.
38538         * tests/test-sameacls.c (main): Free allocated memory and ACLs.
38539         * tests/test-strfmon_l.c (main): Free allocated locales.
38540         * tests/test-striconveh.c (main): Free allocated iconv_t objects.
38541         * tests/uniconv/test-u8-conv-to-enc.c (main): Free allocated memory.
38542         * tests/uniconv/test-u16-conv-to-enc.c (main): Likewise.
38543         * tests/uniconv/test-u32-conv-to-enc.c (main): Likewise.
38544         * tests/unistr/test-chr.h (main): Free input32.
38545         * tests/unistr/test-strchr.h (test_strchr): Likewise.
38547 2019-03-10  Bruno Haible  <bruno@clisp.org>
38549         tests: Prepare for using valgrind.
38550         * tests/*.sh: Invoke all test programs through ${CHECKER}.
38551         * tests/*/*.sh: Likewise.
38552         * tests/test-freadptr.c (main): Update accordingly.
38553         * tests/test-freadseek.c (main): Likewise.
38555 2019-03-09  Bruno Haible  <bruno@clisp.org>
38557         get-rusage-as, pthread_sigmask tests: Fix -fsanitize=thread findings.
38558         * lib/get-rusage-as.c (get_rusage_as): When compiled by
38559         "gcc -fsanitize=thread", don't try get_rusage_as_via_setrlimit.
38560         * tests/test-pthread_sigmask2.c (main): Clean up the killer_thread
38561         before exiting.
38563 2019-03-09  Jim Meyering  <meyering@fb.com>
38565         test-userspec.c: don't print NULL
38566         * tests/test-userspec.c (main): A test release of gcc,
38567         9.0.1 20190310, warned that this test would attempt to
38568         print a NULL pointer via a %s printf format.  Fix that
38569         and remove the unnecessary preceding "!diag" conjunct.
38570         Also add a comment.
38572 2019-03-03  Bruno Haible  <bruno@clisp.org>
38574         getloadavg: Write NULL for the null pointer.
38575         Reported by Michal Privoznik <mprivozn@redhat.com>.
38576         * lib/getloadavg.c (getloadavg): Write NULL instead of 0.
38578 2019-02-28  Michal Privoznik  <mprivozn@redhat.com>
38580         alloca, tsearch-tests: Write NULL for the null pointer.
38581         * lib/alloca.c (i00afunc): Write NULL instead of 0.
38582         * tests/test-tsearch.c (mangle_tree): Likewise.
38584 2019-03-09  Bruno Haible  <bruno@clisp.org>
38586         strfmon_l: Fix -fsanitize=address finding.
38587         * lib/strfmon_l.c: Include <errno.h>, <stdbool.h>, <stdlib.h>,
38588         <string.h>.
38589         (MAX_ARGS): Renamed from MAX_ARG_WORDS.
38590         (directive_t, directives_t): New types.
38591         (fmon_parse): New function.
38592         (rpl_strfmon_l): Don't call va_arg more often than needed for the
38593         format string. Consume 'long double' arguments in places where the
38594         format string indicates so.
38595         * modules/strfmon_l (Depends-on): Add 'stdbool'.
38597 2019-03-09  Bruno Haible  <bruno@clisp.org>
38599         crypto/des: Fix undefined behaviour.
38600         * lib/des.c (READ_64BIT_DATA): Cast bytes to 'unsigned int', to avoid
38601         shift operations on 'int'.
38603 2019-03-09  Bruno Haible  <bruno@clisp.org>
38605         Fix undefined behaviour.
38606         * lib/bitrotate.h (rotl16, rotr16, rotl8, rotr8): Cast x to
38607         'unsigned int', to avoid shift operations on 'int'.
38608         * lib/xmemdup0.c (xmemdup0): Don't invoke memcpy with a zero size.
38609         * tests/test-count-leading-zeros.c (main): Use a random number that has
38610         as many bits as TYPE, not only 2*15 or 2*31 bits.
38611         * tests/test-count-trailing-zeros.c (main): Likewise.
38612         * tests/test-count-one-bits.c (main): Likewise.
38613         * tests/test-memmem.c: Don't include "null-ptr.h".
38614         (main): Use zerosize_ptr() instead of null_ptr().
38615         * modules/memmem-tests (Files): Remove tests/null-ptr.h.
38617 2019-03-08  Bruno Haible  <bruno@clisp.org>
38619         unilbrk/u*-possible-linebreaks: Fix undefined behaviour.
38620         Reported by Jeffrey Walton <noloader@gmail.com>.
38621         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks): Don't
38622         invoke memset with a zero size.
38623         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
38624         Likewise.
38625         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
38626         Adjust accordingly.
38628 2019-03-08  Bruno Haible  <bruno@clisp.org>
38630         unistr/*, uniconv/*: Fix undefined behaviour.
38631         Reported by Jeffrey Walton <noloader@gmail.com>.
38632         * lib/unistr/u-cpy.h (FUNC): Don't invoke memcpy with a zero size.
38633         * lib/unistr/u-cpy-alloc.h (FUNC): Likewise.
38634         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Likewise.
38635         * lib/uniconv/u8-conv-to-enc.c (u8_conv_to_encoding): Likewise.
38637 2019-03-08  Bruno Haible  <bruno@clisp.org>
38639         unistr/u8-cmp: Fix undefined behaviour.
38640         Reported by Jeffrey Walton <noloader@gmail.com>.
38641         * lib/unistr/u8-cmp.c (u8_cmp): Don't invoke memcmp if n is zero.
38643 2019-03-08  Bruno Haible  <bruno@clisp.org>
38645         unictype/numeric: Fix undefined behaviour.
38646         Reported by Jeffrey Walton <noloader@gmail.com>.
38647         * lib/unictype/numeric.c (uc_numeric_value): Avoid undefined behaviour
38648         on shift overflow, caught by "gcc -fsanitize=undefined".
38649         * lib/unictype/bidi_of.c (uc_bidi_class): Add cast, for clarity.
38650         * lib/unictype/categ_of.c (lookup_withtable): Likewise.
38651         * lib/unictype/joininggroup_of.c (uc_joining_group): Likewise.
38653 2019-03-05  Paul Eggert  <eggert@cs.ucla.edu>
38655         git-version-gen: fix --version copyright year
38656         * build-aux/git-version-gen, build-aux/move-if-change (version):
38657         --version output copyright year is now taken from script year,
38658         so that it no longer needs to be updated by hand.
38660 2019-03-04  Bruno Haible  <bruno@clisp.org>
38662         relocatable-prog: Use wrapper-free installation on Mac OS X, take 2.
38663         This approach supports relocatable installation of shared libraries
38664         which depend on other shared libraries from the same package.
38665         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Determine use_macos_tools.
38666         If use_macos_tools is true, use reloc-ldflags and set LIBTOOL to be a
38667         wrapper around the original LIBTOOL.
38668         * build-aux/reloc-ldflags: Add support for Mac OS X, which uses the
38669         token '@loader_path' instead of '$ORIGIN'.
38670         * build-aux/libtool-reloc: New file.
38671         * modules/relocatable-prog (Files): Add it.
38672         * doc/relocatable-maint.texi (Supporting Relocation): Update to match
38673         the recent changes. Document the need to set the *_LDFLAGS of libraries.
38674         RELOCATABLE_LIBRARY_PATH and RELOCATABLE_CONFIG_H_DIR should be set in
38675         Makefile.am, not in configure.ac.
38677 2019-03-04  Bruno Haible  <bruno@clisp.org>
38679         relocatable-prog: Revert "Use wrapper-free installation on Mac OS X."
38680         * build-aux/install-reloc: Revert change.
38681         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Likewise.
38683 2019-02-24  Paul Eggert  <eggert@cs.ucla.edu>
38685         nstrftime: support the ‘+’ flag
38686         * lib/nstrftime.c (add, __strftime_internal):
38687         Add support for the ‘+’ flag introduced in POSIX.1-2017.
38688         (__strftime_internal): New arg ‘width’.  All uses changed.
38689         (DO_YEARISH, DO_MAYBE_SIGNED_NUMBER): New macros.
38691 2019-02-24  Bruno Haible  <bruno@clisp.org>
38693         relocatable-prog: Improve verbose output.
38694         * build-aux/install-reloc (func_verbose): Escape characters that would
38695         be interpreted by the shell.
38697 2019-02-24  Bruno Haible  <bruno@clisp.org>
38699         stat, lstat: Fix conflict with relocatable-prog-wrapper module.
38700         * lib/stat.c: On platforms other than OSF/1, include <sys/stat.h>, not
38701         "sys/stat.h".
38702         * lib/lstat.c: Likewise.
38703         * lib/fstat.c: Likewise.
38704         * lib/fstatat.c: Likewise.
38706 2019-02-23  Bernhard Voelker  <mail@bernhard-voelker.de>
38708         long-options: add parse_gnu_standard_options_only
38709         Discussed in https://bugs.gnu.org/33468 .
38711         * lib/long-options.c (parse_long_options): Use EXIT_SUCCESS instead of 0
38712         (parse_gnu_standard_options_only): Add function to process
38713         the GNU default options --help and --version and fail for
38714         any other unknown long or short option. See
38715         https://gnu.org/prep/standards/html_node/Command_002dLine-Interfaces.html
38716         * lib/long-options.h (parse_gnu_standard_options_only): Declare it.
38717         * modules/long-options (depends-on): Add stdbool, exitfail.
38718         * top/maint.mk (sc_prohibit_long_options_without_use): Update
38719         syntax-check rule, add new function name.
38721 2019-02-23  Bruno Haible  <bruno@clisp.org>
38723         relocatable-prog: Update documentation.
38724         * doc/relocatable-maint.texi (Supporting Relocation): Update to match
38725         the recent changes.
38727 2019-02-23  Paul Eggert  <eggert@cs.ucla.edu>
38729         nstrftime: tweak arg order
38730         * lib/nstrftime.c (__strftime_internal): Interchange arg order.
38731         All callers changed.  Suggested by TAMUKI Shoichi in:
38732         https://lists.gnu.org/r/bug-gnulib/2019-02/msg00052.html
38734 2019-02-23  Bruno Haible  <bruno@clisp.org>
38736         relocatable-prog: Use wrapper-free installation also on Mac OS X.
38737         Reported by Paul Smith <psmith@gnu.org>.
38738         * build-aux/install-reloc: Accept a 'mode' argument as first argument.
38739         (func_relativize): New function, from gnulib-tool.
38740         Handle mode 'macosx' through invocations of 'otool' and
38741         'install_name_tool'.
38742         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Determine use_macos_tools.
38743         If use_macos_tools is true, set INSTALL_PROGRAM_ENV to an
38744         'install-reloc' invocation with mode 'macosx'.
38746 2019-02-23  Bruno Haible  <bruno@clisp.org>
38748         relocatable-prog: Use $ORIGIN trick also on GNU/Hurd.
38749         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Use $ORIGIN trick also on
38750         Hurd with glibc >= 2.27.
38752 2019-02-21  Paul Eggert  <eggert@cs.ucla.edu>
38754         nstrftime: merge glibc strftime changes
38755         This incorporates:
38756         2019-02-11 Fix a few whitespace arrangement inconsistencies
38757         2019-01-24 strftime: Pass flags from "%EY" to "%Ey" [BZ #24096]
38758         2019-01-24 Set the default width of "%Ey" to 2 [BZ #23758]
38759         2019-01-11 strftime: use the "L_" macro with character literals
38760         * lib/nstrftime.c (__strftime_internal): New arg yr_spec.  All
38761         callers changed.  Default width of %Ey is now 2.  This is needed
38762         for proper handling of Japanese dates starting on 2019-05-01.
38764 2019-02-19  Bruno Haible  <bruno@clisp.org>
38766         relocatable-prog: Use $ORIGIN trick on more platforms.
38767         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Use $ORIGIN trick also on
38768         FreeBSD >= 7.3, DragonFly >= 3.0, NetBSD >= 8.0, OpenBSD >= 5.4,
38769         Solaris >= 10, Haiku. But don't use it on Android.
38770         * build-aux/reloc-ldflags: Allow the use of the $ORIGIN trick also on
38771         Hurd, FreeBSD, DragonFly, NetBSD, OpenBSD, Solaris, Haiku.
38773 2019-02-19  Bruno Haible  <bruno@clisp.org>
38775         progreloc: Speed up executable lookup on various platforms.
38776         * lib/progreloc.c: Include <errno.h>.
38777         (safe_read, full_read): New functions.
38778         (find_executable): On GNU/kFreeBSD, FreeBSD, DragonFly, NetBSD, Solaris,
38779         prefer the information from the /proc file system to a PATH search.
38781 2019-02-19  Bruno Haible  <bruno@clisp.org>
38783         progreloc: Simplify code for Android.
38784         * lib/progreloc.c (executable_fd): Don't define on Android.
38785         (maybe_executable, find_executable): Don't use executable_fd on Android.
38787 2019-02-15  Bruno Haible  <bruno@clisp.org>
38789         gnulib-tool: Support --import with just a few tests, not --with-tests.
38790         * gnulib-tool (func_import): New variable 'gentests'. Use it instead of
38791         'inctests' when generating files; use 'inctests' only for computing the
38792         transitive closure.
38794 2019-02-14  Bruno Haible  <bruno@clisp.org>
38796         gnulib-tool: Improve handling of multiple --local-dir options.
38797         * doc/gnulib.texi (Extending Gnulib): Explain how multiple --local-dir
38798         options work.
38799         * gnulib-tool (func_path_prepend): Remove function.
38800         (func_path_foreach): Make IFS handling more robust.
38801         (local_gnulib_path): Collect --local-dir values using func_path_append,
38802         not func_path_prepend.
38803         (func_determine_path_separator): Make IFS handling more robust.
38804         (func_lookup_file_cb): New function.
38805         (func_lookup_file): Rewritten to use func_lookup_file_cb instead of
38806         func_lookup_local_file. Apply the patches in the reverse order of their
38807         origin in $local_gnulib_path.
38808         (func_count_relative_local_gnulib_path): Make IFS handling more robust.
38809         * NEWS: Mention that the first --local-dir option is the one with
38810         highest priority.
38812 2019-02-10  Bruno Haible  <bruno@clisp.org>
38814         libtextstyle: New module.
38815         * m4/libtextstyle.m4: New file.
38816         * modules/libtextstyle: New file.
38818 2019-02-05  Bruno Haible  <bruno@clisp.org>
38820         declared.sh: Fix bug with variables of pointer type.
38821         * build-aux/declared.sh (sed_extract_extern_declared): Allow the space
38822         before the symbol to be omitted if the preceding character is a '*'.
38824 2019-02-04  Bruno Haible  <bruno@clisp.org>
38826         Add script for running tests under valgrind.
38827         * build-aux/run-test: New file, from GNU libunistring.
38828         * doc/valgrind-tests.texi: Rewritten to mention alternative approaches
38829         as well.
38831 2019-02-04  Bruno Haible  <bruno@clisp.org>
38833         declared.sh: Fix --version output.
38834         * build-aux/declared.sh (func_version): Update package name.
38836 2019-02-03  Bruno Haible  <bruno@clisp.org>
38838         Add script for determining the set of symbols to export from a library.
38839         * build-aux/declared.sh: New file, from GNU libunistring.
38840         * doc/lib-symbol-visibility.texi (Exported Symbols of Shared Libraries):
38841         Mention it.
38843 2019-02-02  Paul Eggert  <eggert@cs.ucla.edu>
38845         vla: add commentary about VLA_ELEMS
38846         * lib/vla.h (VLA_ELEMS): Add commentary,
38847         some inspired by Bruno Haible’s proposal in:
38848         https://lists.gnu.org/r/bug-gnulib/2019-01/msg00109.html
38850         dtoastr,ftoastr,ldtoastr: port to c-strtod changes
38851         Decouple these modules from c-strtod.  Nowadays it’s reasonable to
38852         assume the C99 signatures for strtod and strtold.  Programs that
38853         require stricter adherence to C99 should also use the strtod and
38854         strtold modules as needed, and we no longer need the
38855         HAVE_C99_STRTOLD macro.
38856         * NEWS: Mention this.
38857         * lib/ftoastr.c (STRTOF) [LENGTH == 3]: Assume strtold.
38858         * m4/c-strtod.m4 (gl_C_STRTOLD): Do not define HAVE_C99_STRTOLD.
38859         * modules/dtoastr, modules/ftoastr, modules/ldtoastr:
38860         (Files): Remove m4/c-strtod.m4.
38861         (configure.ac): Do not require gl_C99_STRTOLD, which no longer
38862         exists.
38864 2019-02-02  Bruno Haible  <bruno@clisp.org>
38866         fma: Improve code style.
38867         * lib/fma.c: Include <limits.h>, for CHAR_BIT.
38869 2019-02-02  Colin Watson  <cjwatson@debian.org>
38871         *-map tests: Fix compilation error.
38872         * tests/test-array_map.c: Include <limits.h>, for CHAR_BIT.
38873         * tests/test-hash_map.c: Likewise.
38874         * tests/test-linkedhash_map.c: Likewise.
38876 2019-01-31  Bruno Haible  <bruno@clisp.org>
38878         c-strtod, c-strtold: Use the bug fixes for strtod, strtold.
38879         * lib/stdlib.in.h (GNULIB_defined_strtod_function,
38880         GNULIB_defined_strtold_function): New macros.
38881         * lib/c-strtod.c (HAVE_GOOD_STRTOD_L): New macro.
38882         (STRTOD): Ignore HAVE_C99_STRTOLD.
38883         (c_locale): Don't define it on platforms where strtod_l/strtold_l is
38884         deemed buggy. But do use it on platforms where uselocale exists and is
38885         usable.
38886         (C_STRTOD): Don't use STRTOD_L on platforms where strtod_l/strtold_l is
38887         deemed buggy. On platforms where uselocale exists and is usable, use
38888         uselocale and strtod/strtold.
38889         * m4/c-strtod.m4 (gl_C99_STRTOLD): Remove macro.
38890         (gl_C_STRTOD): Require gt_FUNC_USELOCALE.
38891         (gl_C_STRTOLD): Likewise. Define HAVE_C99_STRTOLD unconditionally.
38892         * modules/c-strtod (Files): Add m4/intl-thread-locale.m4.
38893         (Depends-on): Add strtod.
38894         * modules/c-strtold (Files): Add m4/intl-thread-locale.m4.
38895         (Depends-on): Add strtold.
38897 2019-01-31  Bruno Haible  <bruno@clisp.org>
38899         strtod, strtold: Use the locale's decimal point.
38900         * lib/strtod.c: Include <locale.h>, <stdio.h>, <langinfo.h>.
38901         (decimal_point_char): New function, copied from lib/vasnprintf.c.
38902         (parse_number): Add a radixchar argument. Use it instead of '.'.
38903         (STRTOD): Invoke decimal_point_char and pass the result to parse_number.
38904         * m4/strtod.m4 (gl_PREREQ_STRTOD): Test whether nl_langinfo exists.
38905         * m4/strtold.m4 (gl_PREREQ_STRTOLD): Likewise.
38906         * tests/test-strtod1.c: New file.
38907         * tests/test-strtod1.sh: New file.
38908         * modules/strtod-tests (Files): Add test-strtod1.{sh,c}. Add
38909         locale-fr.m4 and its dependencies.
38910         (configure.ac): Invoke gt_LOCALE_FR, gt_LOCALE_FR_UTF8.
38911         (Makefile.am): Arrange to compile test-strtod1.c and run
38912         test-strtod1.sh.
38913         * tests/test-strtold1.c: New file.
38914         * tests/test-strtold1.sh: New file.
38915         * modules/strtold-tests (Files): Add test-strtold1.{sh,c}. Add
38916         locale-fr.m4 and its dependencies.
38917         (configure.ac): Invoke gt_LOCALE_FR, gt_LOCALE_FR_UTF8.
38918         (Makefile.am): Arrange to compile test-strtold1.c and run
38919         test-strtold1.sh.
38921 2019-01-31  Bruno Haible  <bruno@clisp.org>
38923         strtod, strtold tests: Simplify tests.
38924         * tests/test-strtod.c (main): Assume no rounding errors for 0.5.
38925         * tests/test-strtold.c (main): Likewise.
38927 2019-01-31  Bruno Haible  <bruno@clisp.org>
38929         strtod, strtold: Avoid unnecessary rounding errors.
38930         * lib/strtod.c (parse_number): Drop trailing zeroes before doing the
38931         decimal to DOUBLE conversion.
38933 2019-01-31  Bruno Haible  <bruno@clisp.org>
38935         strtod, strtold: Work around HP-UX 11.31/ia64 bug.
38936         * lib/strtod.c (STRTOD): When there is an extra character after the
38937         exponent marker 'p', reparse the number.
38938         * doc/posix-functions/strtod.texi: Document the HP-UX 11.31 bug.
38939         * doc/posix-functions/strtold.texi: Likewise.
38941 2019-01-29  Bruno Haible  <bruno@clisp.org>
38943         strtold: Add tests.
38944         * tests/test-strtold.c: New file, based on tests/test-strtod.c.
38945         * modules/strtold-tests: New file.
38947 2019-01-29  Bruno Haible  <bruno@clisp.org>
38949         strtold: New module.
38950         * lib/stdlib.in.h (strtold): New declaration.
38951         * lib/strtold.c: New file.
38952         * lib/strtod.c: Consider USE_LONG_DOUBLE.
38953         (STRTOD, LDEXP, HAVE_UNDERLYING_STRTOD, DOUBLE, MIN, MAX, L_,
38954         USE_LDEXP): New macros.
38955         (LDEXP, scale_radix_exp, parse_number, STRTOD): Adapt for
38956         USE_LONG_DOUBLE.
38957         (underlying_strtod): Remove function. Replace with some macros.
38958         Re-add the code for a missing underlying function that was removed on
38959         2013-02-19.
38960         * m4/strtold.m4: New file.
38961         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether strtold is declared.
38962         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_STRTOLD, HAVE_STRTOLD,
38963         REPLACE_STRTOLD.
38964         * modules/stdlib (Makefile.am): Substitute GNULIB_STRTOLD, HAVE_STRTOLD,
38965         REPLACE_STRTOLD.
38966         * modules/strtold: New file.
38967         * doc/posix-functions/strtold.texi: Document the new module.
38969 2019-01-29  Bruno Haible  <bruno@clisp.org>
38971         strtod: Fix compilation error on IRIX 6.5.
38972         * modules/strtod (Depends-on): Add 'math'.
38974 2019-01-28  Bruno Haible  <bruno@clisp.org>
38976         Fix build error when building a shared libunistring on Android.
38977         * tests/uninorm/test-nfc.c (n): Don't define on Android.
38978         (main): Add 'volatile', to defeat a GCC optimization that would
38979         eliminate the reference.
38980         * tests/uninorm/test-nfd.c (n): Don't define on Android.
38981         (main): Add 'volatile', to defeat a GCC optimization that would
38982         eliminate the reference.
38983         * tests/uninorm/test-nfkc.c (n): Don't define on Android.
38984         (main): Add 'volatile', to defeat a GCC optimization that would
38985         eliminate the reference.
38986         * tests/uninorm/test-nfkd.c (n): Don't define on Android.
38987         (main): Add 'volatile', to defeat a GCC optimization that would
38988         eliminate the reference.
38990 2019-01-27  Bruno Haible  <bruno@clisp.org>
38992         Avoid build errors due to wrong references between modules.
38993         * lib/uninorm/canonical-decomposition.c: Include
38994         "uninorm/decomposition-table.h", not "decomposition-table.h".
38995         * lib/uninorm/decomposition.c: Likewise.
38996         * lib/uninorm/u8-normalize.c: Include "uninorm/decompose-internal.h",
38997         not "decompose-internal.h".
38998         * lib/uninorm/u16-normalize.c: Likewise.
38999         * lib/uninorm/u32-normalize.c: Likewise.
39000         * lib/uninorm/uninorm-filter.c: Likewise.
39001         * lib/uninorm/nfkc.c: Likewise.
39002         * lib/uninorm/nfkd.c: Likewise.
39003         * lib/unicase/u8-casemap.c: Include "unicase/caseprop.h", not
39004         "caseprop.h".
39005         * lib/unicase/u8-ct-totitle.c: Likewise.
39006         * lib/unicase/u8-prefix-context.c: Likewise.
39007         * lib/unicase/u8-suffix-context.c: Likewise.
39008         * lib/unicase/u16-casemap.c: Likewise.
39009         * lib/unicase/u16-ct-totitle.c: Likewise.
39010         * lib/unicase/u16-prefix-context.c: Likewise.
39011         * lib/unicase/u16-suffix-context.c: Likewise.
39012         * lib/unicase/u32-casemap.c: Likewise.
39013         * lib/unicase/u32-ct-totitle.c: Likewise.
39014         * lib/unicase/u32-prefix-context.c: Likewise.
39015         * lib/unicase/u32-suffix-context.c: Likewise.
39016         * lib/unicase/u8-tolower.c: Include "unicase/unicasemap.h", not
39017         "unicasemap.h".
39018         * lib/unicase/u8-toupper.c: Likewise.
39019         * lib/unicase/u8-ct-tolower.c: Likewise.
39020         * lib/unicase/u8-ct-toupper.c: Likewise.
39021         * lib/unicase/u16-tolower.c: Likewise.
39022         * lib/unicase/u16-toupper.c: Likewise.
39023         * lib/unicase/u16-ct-tolower.c: Likewise.
39024         * lib/unicase/u16-ct-toupper.c: Likewise.
39025         * lib/unicase/u32-tolower.c: Likewise.
39026         * lib/unicase/u32-toupper.c: Likewise.
39027         * lib/unicase/u32-ct-tolower.c: Likewise.
39028         * lib/unicase/u32-ct-toupper.c: Likewise.
39029         * lib/unicase/u8-ct-casefold.c: Include "unicase/unicasemap.h", not
39030         "unicasemap.h", and "unicase/casefold.h", not "casefold.h".
39031         * lib/unicase/u16-ct-casefold.c: Likewise.
39032         * lib/unicase/u32-ct-casefold.c: Likewise.
39034 2019-01-27  Bruno Haible  <bruno@clisp.org>
39036         gperf: Fix error when this module is required by some test module.
39037         * modules/gperf (Applicability): Set to 'all'.
39039 2019-01-27  Bruno Haible  <bruno@clisp.org>
39041         tmpfile: Add support for Android.
39042         * m4/tmpfile.m4 (gl_FUNC_TMPFILE): Add a runtime test whether tmpfile()
39043         works.
39044         * lib/tmpfile.c (tmpfile): Add an alternative implementation for
39045         Android.
39046         * modules/tmpfile (Depends-on): Add 'stdbool'.
39047         * doc/posix-functions/tmpfile.texi: Mention the Android bug.
39048         * modules/argv-iter-tests (Depends-on): Add 'tmpfile'.
39050 2019-01-27  Akim Demaille  <akim@lrde.epita.fr>
39052         bitsetv: allow free on NULL.
39053         * lib/bitsetv.c (bitsetv_free): Do nothing when the bitsetv is NULL.
39055 2019-01-27  Bruno Haible  <bruno@clisp.org>
39057         test-framework-sh: Improve maintainability.
39058         * tests/init.sh: Clarify what belongs together. Reorder definitions.
39060 2019-01-27  Bruno Haible  <bruno@clisp.org>
39062         tests: Don't assume that /tmp exists.
39063         * tests/test-set-mode-acl-1.sh: Skip the test if /tmp does not exist.
39064         * tests/test-copy-acl-1.sh: Likewise.
39065         * tests/test-file-has-acl-1.sh: Likewise.
39066         * tests/test-copy-file-1.sh: Likewise.
39068 2019-01-27  Bruno Haible  <bruno@clisp.org>
39070         tests: Accommodate a shell that is not in /bin/sh.
39071         * tests/init.sh (setup_): Set srcdir and builddir.
39072         (BOURNE_SHELL): New variable.
39073         * modules/acl-tests (Depends-on): Add 'test-framework-sh'.
39074         * modules/file-has-acl-tests (Depends-on): Likewise.
39075         * modules/copy-file-tests (Depends-on): Likewise.
39076         * tests/test-set-mode-acl-1.sh: Use the test framework. Invoke shell
39077         scripts through $BOURNE_SHELL.
39078         * tests/test-set-mode-acl-2.sh: Likewise.
39079         * tests/test-copy-acl-1.sh: Likewise.
39080         * tests/test-copy-acl-2.sh: Likewise.
39081         * tests/test-file-has-acl-1.sh: Likewise.
39082         * tests/test-file-has-acl-2.sh: Likewise.
39083         * tests/test-copy-file-1.sh: Likewise.
39084         * tests/test-copy-file-2.sh: Likewise.
39085         * tests/test-set-mode-acl.sh (builddir): Consider value set by the
39086         invoker.
39087         * tests/test-copy-acl.sh (builddir): Likewise.
39088         * tests/test-file-has-acl.sh (builddir): Likewise.
39089         * tests/test-copy-file.sh (builddir): Likewise.
39090         * tests/test-vc-list-files-cvs.sh: Don't create shims for executables in
39091         build-aux/. Instead, invoke shell scripts through $BOURNE_SHELL.
39092         * tests/test-vc-list-files-git.sh: Likewise.
39094 2019-01-27  Bruno Haible  <bruno@clisp.org>
39096         tests: Fix some "unused variable" warnings.
39097         * tests/test-fts.c (fts_dealloc): Remove unused variable.
39098         * tests/unigbrk/test-uc-grapheme-breaks.c (main): Likewise.
39099         * tests/test-striconveh.c (main): Move some variable into the
39100         '#if HAVE_ICONV'.
39101         * tests/test-striconveha.c (main): Likewise.
39102         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
39103         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
39104         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
39105         * tests/uniconv/test-u8-conv-to-enc.c (main): Likewise.
39106         * tests/uniconv/test-u16-conv-to-enc.c (main): Likewise.
39107         * tests/uniconv/test-u32-conv-to-enc.c (main): Likewise.
39108         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
39109         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
39110         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
39111         * tests/uniconv/test-u8-strconv-to-enc.c (main): Likewise.
39112         * tests/uniconv/test-u16-strconv-to-enc.c (main): Likewise.
39113         * tests/uniconv/test-u32-strconv-to-enc.c (main): Likewise.
39114         * tests/test-tsearch.c (main): Move some variable into the
39115         '#if HAVE_INITSTATE'.
39117 2019-01-27  Bruno Haible  <bruno@clisp.org>
39119         unigbrk/uc-grapheme-breaks: Fix build failure.
39120         * lib/unigbrk/uc-grapheme-breaks.c: Don't include unistr.h.
39121         * modules/unigbrk/uc-grapheme-breaks (Makefile.am): Fix typo.
39123 2019-01-27  Bruno Haible  <bruno@clisp.org>
39125         mountlist: Merge two .m4 files.
39126         * m4/mountlist.m4 (gl_MOUNTLIST): Inline gl_LIST_MOUNTED_FILE_SYSTEMS.
39127         (AC_FUNC_GETMNTENT): Move to here, from m4/ls-mntd-fs.m4.
39128         * m4/ls-mntd-fs.m4: Remove file.
39129         * modules/mountlist (Files): Remove m4/ls-mntd-fs.m4.
39131 2019-01-27  Bruno Haible  <bruno@clisp.org>
39133         tests: Enable Linux specific tests on Android.
39134         * tests/test-flock.c (main): Treat Android like Linux.
39135         * tests/test-openat-safer.c (main): Likewise.
39137 2019-01-27  Bruno Haible  <bruno@clisp.org>
39139         relocatable-prog: Use Linux code on Android.
39140         * lib/progreloc.c: Treat Android like Linux.
39142 2019-01-26  Bruno Haible  <bruno@clisp.org>
39144         getloadavg: Add support for Android.
39145         * lib/getloadavg.c: Treat Android like Linux.
39147 2019-01-26  Bruno Haible  <bruno@clisp.org>
39149         vma-iter: Add support for Android.
39150         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define on Android as well.
39151         * lib/vma-iter.c: Treat Android like Linux.
39152         * lib/get-rusage-data.c (get_rusage_data): Likewise.
39154 2019-01-26  Bruno Haible  <bruno@clisp.org>
39156         fts: Optimize on Android.
39157         * lib/fts.c: Treat Android like Linux.
39159 2019-01-26  Bruno Haible  <bruno@clisp.org>
39161         fts: Add support for Android.
39162         * m4/fts.m4 (gl_FUNC_FTS_CORE): Avoid conflicts between the symbols
39163         defined by this module and the ones in libc.
39164         * tests/test-fts.c (main): Treat mkdir error EMLINK like EMFILE.
39166 2019-01-26  Bruno Haible  <bruno@clisp.org>
39168         mountlist: Use Linux code on Android.
39169         * lib/mountlist.c (setmntent, endmntent): Define fallbacks.
39170         (unescape_tab, read_file_system_list): Enable Linux code on Android
39171         as well.
39172         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Test for setmntent
39173         and endmntent.
39174         * modules/mountlist (Depends-on): Add 'getline'.
39176 2019-01-26  Bruno Haible  <bruno@clisp.org>
39178         localename tests: Fix test failure on Android.
39179         * modules/localename-tests (Depends-on): Add 'setlocale'.
39181 2019-01-26  Bruno Haible  <bruno@clisp.org>
39183         mountlist: Port better to Android.
39184         * lib/mountlist.c (MOUNTED): Redefine on Android.
39185         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Redefine MOUNTED on
39186         Android.
39188 2019-01-26  Bruno Haible  <bruno@clisp.org>
39190         striconveh: Fix use of uninitialized iconv_t.
39191         Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
39192         <https://lists.gnu.org/archive/html/bug-libunistring/2019-01/msg00000.html>.
39193         * lib/striconveh.c (iconveh_open): Correct the iconv_close argument.
39195 2019-01-26  Bruno Haible  <bruno@clisp.org>
39197         nonblocking-socket-tests: Fix test failure on Android 4.3.
39198         * tests/test-nonblocking-socket.h (SOCKET_HAS_LARGE_BUFFER): Define to 1
39199         also on Android.
39201 2019-01-26  Bruno Haible  <bruno@clisp.org>
39203         sh-filename: Add support for Android 4.3.
39204         * m4/sh-filename.m4 (gl_SH_FILENAME): Set to "sh" on Android.
39206 2019-01-26  Bruno Haible  <bruno@clisp.org>
39208         ptsname_r: Work around bug on Android 4.3.
39209         * m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): Define
39210         HAVE_ESSENTIALLY_WORKING_PTSNAME_R. Test whether the return value is
39211         correct.
39212         * lib/ptsname_r.c (__ptsname_r): If HAVE_ESSENTIALLY_WORKING_PTSNAME_R
39213         is defined, just fix the return value.
39214         * doc/glibc-functions/ptsname_r.texi: Mention the Android bug. Reword:
39215         The behaviour of musl libc is nothing to be "fixed", since it is
39216         compliant with the next POSIX standard.
39218 2019-01-26  Bruno Haible  <bruno@clisp.org>
39220         ttyname_r: Work around bug on Android 4.3.
39221         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Test whether ttyname_r is a stub.
39222         * lib/ttyname_r.c (ttyname_r): Implement for Android.
39223         * doc/posix-functions/ttyname_r.texi: Mention the Android bug.
39224         * doc/posix-functions/ttyname.texi: Likewise.
39226 2019-01-25  Bruno Haible  <bruno@clisp.org>
39228         getprogname: Port to Android 4.3.
39229         * lib/getprogname.c (getprogname): On Android, take only the last
39230         component of __progname.
39232 2019-01-25  Bruno Haible  <bruno@clisp.org>
39234         wcrtomb: Work around bug on Android 4.3.
39235         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Test also whether wcrtomb works in
39236         the C locale.
39237         * lib/wcrtomb.c (wcrtomb): Provide alternate implementation for Android,
39238         which does not have the 'wctomb' function.
39239         * doc/posix-functions/wcrtomb.texi: Mention the Android bug.
39240         * tests/test-wcrtomb.c (main): Accept argument '5'.
39241         * tests/test-wcrtomb.sh: Add tests in the POSIX locale.
39243 2019-01-25  Bruno Haible  <bruno@clisp.org>
39245         setlocale: Work around bug on Android 4.3.
39246         * m4/setlocale.m4 (gl_FUNC_SETLOCALE): Test whether setlocale supports
39247         the "C" locale.
39248         * lib/setlocale.c (setlocale_unixlike): New wrapper for Android.
39249         * doc/posix-functions/setlocale.texi: Mention the Android bug.
39251 2019-01-24  Bruno Haible  <bruno@clisp.org>
39253         memchr: Work around bug on Android <= 5.0.
39254         * m4/memchr.m4 (gl_FUNC_MEMCHR): Add test against the Android bug.
39255         * doc/posix-functions/memchr.texi: Mention the Android bug.
39257 2019-01-24  Bruno Haible  <bruno@clisp.org>
39259         random: Fix compilation error on Android 4.3.
39260         * lib/stdlib.in.h (random, srandom): Test also REPLACE_RANDOM.
39261         (initstate): Test REPLACE_INITSTATE and HAVE_INITSTATE, not HAVE_RANDOM.
39262         (setstate): Test REPLACE_SETSTATE and HAVE_SETSTATE, not HAVE_RANDOM.
39263         * m4/random.m4 (gl_FUNC_RANDOM): Set HAVE_INITSTATE, HAVE_SETSTATE,
39264         REPLACE_RANDOM, REPLACE_INITSTATE, REPLACE_SETSTATE.
39265         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_INITSTATE,
39266         HAVE_SETSTATE, REPLACE_RANDOM, REPLACE_INITSTATE, REPLACE_SETSTATE.
39267         * modules/stdlib (Makefile.am): Substitute HAVE_INITSTATE, HAVE_SETSTATE,
39268         REPLACE_RANDOM, REPLACE_INITSTATE, REPLACE_SETSTATE.
39269         * modules/random (Depends-on, configure.ac): Test also REPLACE_RANDOM,
39270         REPLACE_INITSTATE, REPLACE_SETSTATE.
39271         * doc/posix-functions/random.texi: Correct the description of the
39272         situation on Android.
39273         * doc/posix-functions/srandom.texi: Likewise.
39274         * doc/posix-functions/rand.texi: Likewise.
39275         * doc/posix-functions/srand.texi: Likewise.
39277 2019-01-24  Bruno Haible  <bruno@clisp.org>
39279         mbtowc: Fix compilation error on Android 4.3.
39280         * lib/stdlib.in.h (mbtowc): Test also HAVE_MBTOWC.
39281         * m4/mbtowc.m4 (gl_FUNC_MBTOWC): Test whether mbtowc exists. Set
39282         HAVE_MBTOWC.
39283         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether mbtowc is declared.
39284         (gl_STDLIB_H_DEFAULTS): Initialize HAVE_MBTOWC.
39285         * modules/stdlib (Makefile.am): Substitute HAVE_MBTOWC.
39286         * modules/mbtowc (Depends-on, configure.ac): Test also HAVE_MBTOWC.
39287         * doc/posix-functions/mbtowc.texi: Mention the change.
39289 2019-01-24  Bruno Haible  <bruno@clisp.org>
39291         fdatasync: Fix compilation error on Android 4.3.
39292         * m4/fdatasync.m4 (gl_FUNC_FDATASYNC): On platforms other than Solaris,
39293         test whether fdatasync() exists.
39295 2019-01-24  Bruno Haible  <bruno@clisp.org>
39297         unlinkat: Fix compilation error on Android 4.3.
39298         * lib/unistd.in.h: Include <fcntl.h> when module 'unlinkat' is in use
39299         also on Android.
39300         * doc/posix-functions/unlinkat.texi: Mention the issue.
39302 2019-01-24  Bruno Haible  <bruno@clisp.org>
39304         renameat: Fix compilation error on Android 4.3.
39305         * lib/stdio.in.h: Include <sys/stat.h> when module 'renameat' is in use.
39306         * doc/posix-functions/renameat.texi: Mention the issue.
39308 2019-01-24  Bruno Haible  <bruno@clisp.org>
39310         fchownat: Fix compilation error on Android 4.3.
39311         * lib/unistd.in.h: Include <sys/stat.h> when module 'fchownat' is in
39312         use.
39313         * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG,
39314         gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG): Include also <sys/stat.h>.
39315         * doc/posix-functions/fchownat.texi: Mention the issue.
39317 2019-01-23  Bruno Haible  <bruno@clisp.org>
39319         gnulib-tool: Support running testdirs on Android.
39320         * build-aux/test-driver.diff: New file.
39321         * gnulib-tool (func_create_testdir, func_create_megatestdir): Patch
39322         build-aux/test-driver after running automake.
39324 2019-01-23  Akim Demaille  <akim@lrde.epita.fr>
39326         relocatable-prog: avoid warnings from Automake
39327         * modules/relocatable-prog: Don't declare PHONY dependencies in
39328         Automake conditionals.
39330 2019-01-23  Akim Demaille  <akim@lrde.epita.fr>
39332         array-list: Pacify warnings about unused arguments (-Wunused-parameter).
39333         * lib/gl_array_list.c (gl_array_iterator_free): "Use" the argument.
39335 2019-01-23  Bruno Haible  <bruno@clisp.org>
39337         threadlib: Revert commit from 2018-06-25. We now have a better fix.
39338         * m4/threadlib.m4 (gl_THREADLIB_BODY): Don't attempt to defeat a
39339         preceding -Wl,--as-needed option. Don't check whether the linker
39340         supports --as-needed/--no-as-needed and --push-state/--pop-state.
39342 2019-01-23  Bruno Haible  <bruno@clisp.org>
39344         thread: Force linking with -lpthread, even when --as-needed is in use.
39345         Reported by Richard W.M. Jones <rjones@redhat.com> in
39346         <https://lists.gnu.org/archive/html/bug-gnulib/2019-01/msg00123.html>.
39347         * lib/glthread/thread.h (pthread_create): Don't declare weak.
39349 2019-01-23  Akim Demaille  <akim.demaille@gmail.com>
39350             Bruno Haible  <bruno@clisp.org>
39352         relocatable: avoid compiler warnings (-Wshadow)
39353         * lib/relocatable.c (compute_curr_prefix): Rename local variables
39354         to avoid name collisions with global variables.
39356 2019-01-22  Bruno Haible  <bruno@clisp.org>
39358         vasnprintf: Don't use %n on Android.
39359         Reported and fix suggested by Hugo Beauzée-Luyssen <hugo@beauzee.fr> in
39360         <https://lists.gnu.org/archive/html/bug-gnulib/2018-12/msg00123.html>.
39361         * lib/vasnprintf.c (VASNPRINTF): Don’t use %n on Android.
39363 2019-01-22  Bruno Haible  <bruno@clisp.org>
39365         *printf: Support cross-compilation to Android.
39366         * m4/printf.m4: Add cross-compilation guesses for Android.
39368 2019-01-21  Bruno Haible  <bruno@clisp.org>
39370         diacrit: Mark deprecated.
39371         * modules/diacrit (Status, Notice): Mark as deprecated.
39372         * NEWS: Mention it.
39374 2019-01-20  Bruno Haible  <bruno@clisp.org>
39376         rintl: Override broken implementation on NetBSD.
39377         * lib/math.in.h (rintl): Test also REPLACE_RINTL.
39378         * m4/rintl.m4 (gl_FUNC_RINTL): Add test for negative arguments. Set
39379         REPLACE_RINTL.
39380         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_RINTL.
39381         * modules/math (Makefile.in): Substitute REPLACE_RINTL.
39382         * modules/rintl (Depends-on, configure.ac): Test REPLACE_RINTL.
39383         * doc/posix-functions/rintl.texi: Mention the NetBSD bug.
39385 2019-01-20  Bruno Haible  <bruno@clisp.org>
39387         log10l: Work around inaccurate implementation on NetBSD.
39388         * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Add test for a certain accuracy.
39389         * lib/log10l.c: Comment out too simplistic override.
39390         * doc/posix-functions/log10l.texi: Mention the NetBSD bug.
39392 2019-01-20  Bruno Haible  <bruno@clisp.org>
39394         logl: Work around inaccurate implementation on NetBSD.
39395         * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Add test for a certain accuracy.
39396         * lib/logl.c: Comment out unused code.
39397         * doc/posix-functions/logl.texi: Mention the NetBSD bug.
39399 2019-01-20  Bruno Haible  <bruno@clisp.org>
39401         expm1l: Work around inaccurate implementation on NetBSD.
39402         * lib/math.in.h (expm1l): Test also REPLACE_EXPM1L.
39403         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Add test for a certain accuracy. Set
39404         REPLACE_EXPM1L.
39405         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXPM1L.
39406         * modules/math (Makefile.in): Substitute REPLACE_EXPM1L.
39407         * modules/expm1l (Depends-on, configure.ac): Test REPLACE_EXPM1L.
39408         * doc/posix-functions/expm1l.texi: Mention the NetBSD bug.
39410 2019-01-20  Bruno Haible  <bruno@clisp.org>
39412         expl: Work around inaccurate implementation on NetBSD.
39413         * lib/math.in.h (expl): Test also REPLACE_EXPL.
39414         * m4/expl.m4 (gl_FUNC_EXPL): Add test for a certain accuracy. Set
39415         REPLACE_EXPL.
39416         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXPL.
39417         * modules/math (Makefile.in): Substitute REPLACE_EXPL.
39418         * modules/expl (Depends-on, configure.ac): Test REPLACE_EXPL.
39419         * doc/posix-functions/expl.texi: Mention the NetBSD bug.
39421 2019-01-20  Bruno Haible  <bruno@clisp.org>
39423         exp2l: Work around inaccurate implementation on NetBSD.
39424         * m4/exp2l.m4 (gl_FUNC_EXP2L): Add test for a certain accuracy.
39425         * doc/posix-functions/exp2l.texi: Mention the NetBSD bug.
39427 2019-01-20  Bruno Haible  <bruno@clisp.org>
39429         floor, floorl: Avoid autoconf warnings.
39430         * modules/floor (configure.ac): Use AC_REQUIRE.
39431         * modules/floorl (configure.ac): Likewise.
39433 2019-01-20  Bruno Haible  <bruno@clisp.org>
39435         Defeat current GCC optimizations in math autoconf tests.
39436         * m4/cbrtl.m4 (gl_FUNC_CBRTL): Mark function pointer as 'volatile'.
39437         * m4/ceil.m4 (gl_FUNC_CEIL): Likewise.
39438         * m4/ceilf.m4 (gl_FUNC_CEILF): Likewise.
39439         * m4/ceill.m4 (gl_FUNC_CEILL): Likewise.
39440         * m4/exp2l.m4 (gl_FUNC_EXP2L): Likewise.
39441         * m4/expm1.m4 (gl_FUNC_EXPM1): Likewise.
39442         * m4/floor.m4 (gl_FUNC_FLOOR): Likewise.
39443         * m4/floorf.m4 (gl_FUNC_FLOORF): Likewise.
39444         * m4/fmod.m4 (gl_FUNC_FMOD): Likewise.
39445         * m4/fmodf.m4 (gl_FUNC_FMODF): Likewise.
39446         * m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
39447         * m4/hypot.m4 (gl_FUNC_HYPOT): Likewise.
39448         * m4/hypotf.m4 (gl_FUNC_HYPOTF): Likewise.
39449         * m4/hypotl.m4 (gl_FUNC_HYPOTL): Likewise.
39450         * m4/ilogb.m4 (gl_FUNC_ILOGB_WORKS): Likewise.
39451         * m4/ilogbf.m4 (gl_FUNC_ILOGBF_WORKS): Likewise.
39452         * m4/ilogbl.m4 (gl_FUNC_ILOGBL_WORKS): Likewise.
39453         * m4/log.m4 (gl_FUNC_LOG): Likewise.
39454         * m4/logf.m4 (gl_FUNC_LOGF): Likewise.
39455         * m4/log10.m4 (gl_FUNC_LOG10): Likewise.
39456         * m4/log10f.m4 (gl_FUNC_LOG10F): Likewise.
39457         * m4/log1p.m4 (gl_FUNC_LOG1P): Likewise.
39458         * m4/log1pf.m4 (gl_FUNC_LOG1PF): Likewise.
39459         * m4/log1pl.m4 (gl_FUNC_LOG1PL): Likewise.
39460         * m4/log2.m4 (gl_FUNC_LOG2): Likewise.
39461         * m4/log2f.m4 (gl_FUNC_LOG2F): Likewise.
39462         * m4/modf.m4 (gl_FUNC_MODF): Likewise.
39463         * m4/modff.m4 (gl_FUNC_MODFF): Likewise.
39464         * m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
39465         * m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise.
39466         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise.
39467         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Likewise.
39468         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
39469         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
39470         * m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise.
39471         * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
39472         * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
39473         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
39475 2019-01-19  Pádraig Brady  <P@draigBrady.com>
39477         gettext: support disabling use of VLAs
39478         * lib/gettext.h: Disable use of VLAs if GNULIB_NO_VLA is defined
39480 2019-01-17  KO Myung-Hun  <komh78@gmail.com>
39482         sys_stat: Fix 'implicit declaration of function' warning on OS/2 kLIBC.
39483         * lib/sys_stat.in.h [kLIBC]: Include <unistd.h>.
39485 2019-01-17  KO Myung-Hun  <komh78@gmail.com>
39487         fcntl: Fix syntax error (regression from 2018-10-05).
39488         * lib/fcntl.c (klibc_fcntl): Remove mis-placed ';'.
39490 2019-01-13  Akim Demaille  <akim@lrde.epita.fr>
39492         relocatable: improve documentation.
39493         * doc/relocatable-maint.texi (Supporting Relocation): For
39494         substitutions performed by config.status, we need more variables
39495         (for instance datarootdir defaults to '${prefix}/share' so we need
39496         prefix).
39498 2019-01-13  Akim Demaille  <akim@lrde.epita.fr>
39500         backup: update dependencies
39501         * modules/backup-rename (Depends-on): It now depends on opendirat
39502         instead of opendir.  It also uses stdint, and xalloc-oversized.
39503         But no longer dirfd.
39504         * modules/backupfile (Depends-on): Add xalloc-oversized.
39506 2019-01-13  Bruno Haible  <bruno@clisp.org>
39508         getcwd: Fix test failure when building on a Linux 9p file system.
39509         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): On Linux, treat error
39510         EINVAL from mkdir like ENAMETOOLONG.
39511         * tests/test-getcwd.c (test_long_name): Likewise.
39513 2019-01-12  Tim Rühsen  <tim.ruehsen@gmx.de>
39515         Fix typos found by codespell.
39516         * lib/*.[hc]: Fix typos in comments.
39517         * pygnulib/*.py: Fix typos in error messages and comments.
39519 2019-01-12  Bruno Haible  <bruno@clisp.org>
39521         doc: Fix documentation about container data types.
39522         Reported by Werner Lemberg <wl@gnu.org>.
39523         * doc/containers.texi (Container data types): Fix typo.
39525 2019-01-10  Bruno Haible  <bruno@clisp.org>
39527         verify: Enable _GL_HAVE_STATIC_ASSERT for recent G++ versions.
39528         Reported by Reuben Thomas <rrt@sc3d.org>.
39529         * lib/verify.h (_GL_HAVE_STATIC_ASSERT): Define for g++ versions >= 6.
39531 2019-01-06  Bruno Haible  <bruno@clisp.org>
39533         maintainer-makefile: Make the configure.ac section optional.
39534         * top/maint.mk (GREP, SED): Define if not defined.
39536 2019-01-06  Bruno Haible  <bruno@clisp.org>
39538         localename: Assume setlocale function.
39539         * lib/localename.c (gl_locale_name_posix): Assume setlocale exists.
39540         * m4/localename.m4 (gl_LOCALENAME): Don't test whether setlocale exists.
39542 2019-01-06  Bruno Haible  <bruno@clisp.org>
39544         doc: Add documentation about container data types.
39545         * doc/containers.texi: New file.
39546         * doc/gnulib.texi (Particular Modules): Include it.
39548 2019-01-06  Bruno Haible  <bruno@clisp.org>
39550         doc: Update documentation about 'progname' module.
39551         * doc/progname.texi: Rename from doc/error.texi. Change node name and
39552         title. Rewrite.
39553         * doc/gnulib.texi (Particular Modules): Update.
39555 2019-01-06  Bruno Haible  <bruno@clisp.org>
39557         doc: Document the xstdopen and *-safer modules.
39558         * doc/xstdopen.texi: New file.
39559         * doc/gnulib.texi (Particular Modules): Include it.
39561 2019-01-06  Bruno Haible  <bruno@clisp.org>
39563         xstdopen: Add tests.
39564         * tests/test-xstdopen.c: New file.
39565         * tests/test-xstdopen.sh: New file.
39566         * modules/xstdopen-tests: New file.
39568         xstdopen: New module.
39569         * lib/xstdopen.h: New file.
39570         * lib/xstdopen.c: New file.
39571         * modules/xstdopen: New file.
39573 2019-01-06  Bruno Haible  <bruno@clisp.org>
39575         stdopen: Fix compilation error with IRIX cc.
39576         * lib/stdopen.c (stdopen): Do not use C99-style decl in loop.
39578 2019-01-05  Paul Eggert  <eggert@cs.ucla.edu>
39580         xfreopen need not include stdio--.h
39581         * lib/xfreopen.c: Do not include stdio--.h.
39583         xfreopen need not depend on freopen-safer
39584         * modules/xfreopen (Depends-on):
39585         Depend on freopen, not freopen-safer.
39587         stdopen: modernize and simplify
39588         * lib/stdopen.c: Update copyright date
39589         Do not include sys/types.h; no longer needed these days.
39590         (stdopen): Use C99-style decl in loop.  Return int errno
39591         value, rather than just a bool.  Do not worry about fd mismatches,
39592         since the caller cares only if 0, 1, 2 are occupied.
39593         * lib/stdopen.h: No need to include <stdbool.h>.
39594         * m4/stdopen.m4: Remove.
39595         * modules/stdopen: New file.
39597         stdopen: copy from last use in coreutils
39598         * lib/stdopen.c, lib/stdopen.h, m4/stdopen.m4:
39599         New files, taken from their last commit in coreutils
39600         2007-07-23T12:35:58Z!jim@meyering.net
39601         71aa3ea88084d17bcb4fc1031ad7b66f8647115e.
39603 2019-01-05  Bruno Haible  <bruno@clisp.org>
39605         argp: Don't pass an invalid argument to dgettext().
39606         Reported by He X <xw897002528@gmail.com>.
39607         * lib/argp-help.c (print_header, argp_doc): Don't pass a NULL doc to
39608         dgettext().
39610 2019-01-05  Bruno Haible  <bruno@clisp.org>
39612         argp: Don't pass an invalid argument to dgettext().
39613         Reported by He X <xw897002528@gmail.com>.
39614         * lib/argp.h (struct argp): Clarify that the args_doc field may be NULL.
39615         * lib/argp-help.c (argp_args_usage): Don't pass a NULL args_doc to
39616         dgettext().
39618 2018-12-22  Paul Eggert  <eggert@cs.ucla.edu>
39620         stdioext: port to newer 32-bit Android
39621         Problem reported by Tom Yan in:
39622         https://lists.gnu.org/archive/html/bug-gnulib/2018-07/msg00014.html
39623         * lib/stdio-impl.h (_gl_FILE_flags_t) [__ANDROID__]: New macro.
39624         (fp_) [__ANDROID__]: Use it.
39626 2019-01-04  Bruno Haible  <bruno@clisp.org>
39628         lock: Fix link error with --enable-threads=pth.
39629         * lib/glthread/lock.h (pth_cond_init, pth_cond_await, pth_cond_notify):
39630         Mark as weak.
39632 2019-01-04  Bruno Haible  <bruno@clisp.org>
39634         Fix link errors in unit tests.
39635         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
39636         * modules/bitset-tests (Makefile.am): Link test-bitset against libintl.
39637         * modules/array-map-tests (Makefile.am): Link test-array_map against
39638         libintl.
39639         * modules/array-set-tests (Makefile.am): Link test-array_set against
39640         libintl.
39641         * modules/hash-map-tests (Makefile.am): Link test-hash_map against
39642         libintl.
39643         * modules/hash-set-tests (Makefile.am): Link test-hash_set against
39644         libintl.
39645         * modules/linkedhash-map-tests (Makefile.am): Link test-linkedhash_map
39646         against libintl.
39647         * modules/linkedhash-set-tests (Makefile.am): Link test-linkedhash_set
39648         against libintl.
39650 2019-01-04  Bruno Haible  <bruno@clisp.org>
39652         Fix incorrect 'Link' sections.
39653         * modules/regex (Link): Mention the link requirement of module 'lock'.
39654         * modules/regex-tests (Makefile.am): Don't use LIB_PTHREAD.
39656 2019-01-04  Bruno Haible  <bruno@clisp.org>
39658         Fix some 'Link' sections.
39659         * modules/c-stack (Link): Add link directive from the 'gettext-h'
39660         dependency.
39661         * modules/getaddrinfo (Link): Likewise.
39663 2019-01-04  Bruno Haible  <bruno@clisp.org>
39665         Remove redundant 'Link' sections.
39666         * modules/canon-host (Link): Remove section.
39667         * modules/timevar (Link): Likewise.
39669 2019-01-04  Bruno Haible  <bruno@clisp.org>
39671         Remove incorrect 'Link' sections.
39672         * modules/acl (Link): Remove section. Use combined 'Link' sections from
39673         the dependencies instead.
39674         * modules/crypto/md5 (Link): Likewise.
39675         * modules/crypto/sha1 (Link): Likewise.
39676         * modules/crypto/sha256 (Link): Likewise.
39677         * modules/crypto/sha512 (Link): Likewise.
39678         * modules/faccessat (Link): Likewise.
39679         * modules/fdutimensat (Link): Likewise.
39680         * modules/iconv_open-utf (Link): Likewise.
39681         * modules/propername (Link): Likewise.
39682         * modules/qacl (Link): Likewise.
39683         * modules/unicodeio (Link): Likewise.
39684         * modules/utimecmp (Link): Likewise.
39685         * modules/utimensat (Link): Likewise.
39686         * modules/xstriconv (Link): Likewise.
39687         * modules/xstriconveh (Link): Likewise.
39689 2019-01-04  Bruno Haible  <bruno@clisp.org>
39691         gnulib-tool: New option --extract-recursive-link-directive.
39692         * gnulib-tool (func_usage): Document the new options
39693         --extract-recursive-dependencies, --extract-recursive-link-directive.
39694         (func_verify_module): Document output variables.
39695         (func_get_dependencies_recursively): New function.
39696         (func_get_link_directive_recursively): New function.
39697         Use them to implement the new options
39698         --extract-recursive-dependencies, --extract-recursive-link-directive.
39699         * doc/gnulib-tool.texi (Link-time requirements): New section.
39701 2019-01-04  Bruno Haible  <bruno@clisp.org>
39703         Clarify meaning of 'Link' section in module description.
39704         * doc/gnulib.texi (Module description): Clarify the meaning of the
39705         'Link' section versus the one of the dependencies.
39706         * NEWS: Mention the change.
39708 2019-01-04  Bruno Haible  <bruno@clisp.org>
39710         pselect: Fix module description.
39711         * modules/pselect (Link): Put one link option per line.
39713 2019-01-04  Bruno Haible  <bruno@clisp.org>
39715         cosl: Fix module description.
39716         * modules/cosl (Link): Fix typo.
39717         * modules/mathl (configure.ac): Likewise.
39719 2019-01-04  Bruno Haible  <bruno@clisp.org>
39721         c-xvasprintf: Fix module dependencies.
39722         * modules/c-xvasprintf (Depends-on): Add 'xalloc-die'.
39724 2019-01-04  Akim Demaille  <akim@lrde.epita.fr>
39726         bootstrap: die when some submodules are not initialized
39727         * build-aux/bootstrap: Make sure all submodules are initialized.
39729 2019-01-04  Bruno Haible  <bruno@clisp.org>
39731         bitsetv: Fix module dependencies.
39732         * lib/bitsetv.c: Include xalloc.h.
39733         * modules/bitsetv (Depends-on): Add 'xalloc'.
39735 2019-01-04  Bruno Haible  <bruno@clisp.org>
39737         xmemdup0: Remove redundant code.
39738         * lib/xmemdup0.h (xalloc_die): Remove declaration.
39740 2019-01-04  Bruno Haible  <bruno@clisp.org>
39742         backupfile: Fix module dependencies.
39743         * modules/backupfile (Depends-on): Add 'xalloc'.
39745 2019-01-03  Paul Eggert  <eggert@cs.ucla.edu>
39747         bitset, crypto/gc: fix conflicts with Solaris 11
39748         * lib/bitset.h (_GL_BITSET_H): Rename from _BITSET_H, to
39749         avoid clash with Solaris 11 <sys/bitset.h>.
39750         * lib/gc.h (_GL_GC_H): Rename from GC_H, to avoid clash
39751         with Solaris 11 <xorg/gc.h>.
39753 2019-01-04  Bruno Haible  <bruno@clisp.org>
39755         safe-read, safe-write: Fix conflict with Illumos-Joyent <sys/limits.h>.
39756         Reported by Andy Fiddaman <andy@omniosce.org>.
39757         * lib/sys-limits.h: Add a '_GL' prefix to the guard symbol.
39759 2019-01-03  Eric Blake  <eblake@redhat.com>
39761         maintainer-makefile: fix typo in previous patch
39762         * top/maint.mk (_sc_search_regexp): Fix my accidental corruption
39763         of Roman's work.
39765 2019-01-02  Roman Bolshakov <r.bolshakov@yadro.com>  (tiny change)
39767         maintainer-makefile: prefer $(GREP) over grep
39768         * modules/maintainer-makefile (configure.ac): Ensure $(GREP) is
39769         defined.
39770         * top/maint.mk: Use it everywhere.
39772         maintainer-makefile: split long argument lines
39773         * top/maint.mk: Use xargs to split $(VC_LIST_EXCEPT) usage where
39774         it would be too long for exec limits on BSD.
39776 2018-12-27  Paul Eggert  <eggert@cs.ucla.edu>
39778         mkfifo: bring back HAVE_MKFIFO macro
39779         * m4/mkfifo.m4 (gl_FUNC_MKFIFO): #define HAVE_MKFIFO as needed.
39780         Problem reported by Andrew Janke in:
39781         https://lists.gnu.org/r/bug-gnulib/2018-12/msg00147.html
39783 2018-12-21  Bruno Haible  <bruno@clisp.org>
39785         Assume Autoconf >= 2.63.
39786         * modules/stdarg (configure.ac-early): Remove comment about Autoconf
39787         versions < 2.60.
39789 2018-12-21  Bruno Haible  <bruno@clisp.org>
39791         memcmp: Mention the clang bug.
39792         * tests/test-memcmp.c: Add comment about a known test failure.
39793         * doc/posix-functions/memcmp.texi: Mention the clang bug.
39795 2018-12-20  Jim Meyering  <meyering@fb.com>
39797         revert v0.1-2213-gae4b73e28 and part of v0.1-2281-g95cd86dd7
39798         v0.1-2213-gae4b73e28 caused a regression in grep-3.2 (no match):
39799           echo '123-x'|LC_ALL=C grep -E '.\bx'
39800         The goal is to revert the first, but reverting it requires to restore
39801         the function deleted in the second. I ran this to restore the deleted
39802         function:
39803           git show v0.1-2281-g95cd86dd7 lib/dfa.c \
39804             | perl -0777 -pe 's/^@@[^\n]*dfaan.*//ms' \
39805             | patch -R -p1
39806         * lib/dfa.c (charclass_context): Restore deleted function.
39807         Reverting the primary commit removes this change:
39808         dfa: Simplify a building state
39809         * lib/dfa.c (build_state): Simplify a building state.
39811 2018-12-20  Paul Eggert  <eggert@cs.ucla.edu>
39813         version-etc: allow zero authors
39814         * lib/version-etc.c (version_etc_arn): If no authors are given,
39815         omit authorship info instead of dumping core.
39817 2018-12-19  Bruno Haible  <bruno@clisp.org>
39819         lchown tests: Be more permissive regarding errno values.
39820         Reported by Ivan Zakharyaschev <imz@altlinux.org>.
39821         * tests/test-lchown.h (test_lchown): Recognize EOPNOTSUPP as an
39822         alternative to ENOSYS.
39823         * modules/lchown-tests (Depends-on): Add 'errno'.
39824         * modules/fchownat-tests (Depends-on): Likewise.
39826 2018-12-18  Bruno Haible  <bruno@clisp.org>
39828         duplocale: Avoid test failure on AIX 7.
39829         * modules/duplocale-tests (Files): Add m4/intl-thread-locale.m4.
39830         (configure.ac): Invoke gt_FUNC_USELOCALE.
39831         * tests/test-duplocale.c: Test HAVE_WORKING_USELOCALE instead of
39832         HAVE_USELOCALE. Assume that nl_langinfo_l only works when uselocale
39833         works.
39835 2018-12-18  Bruno Haible  <bruno@clisp.org>
39837         localename: Fix test failure on AIX 7.
39838         Reported by Assaf Gordon in
39839         <https://lists.gnu.org/archive/html/sed-devel/2018-12/msg00019.html>.
39840         * m4/intl-thread-locale.m4 (gt_FUNC_USELOCALE): New macro.
39841         (gt_INTL_THREAD_LOCALE_NAME): Invoke it. Test gt_cv_func_uselocale_works
39842         instead of ac_cv_func_uselocale.
39843         * lib/localename.c: Test HAVE_WORKING_USELOCALE instead of
39844         HAVE_USELOCALE.
39845         * lib/localename-table.h: Likewise.
39846         * lib/localename-table.c: Likewise.
39847         * tests/test-localename.c: Likewise.
39848         * doc/posix-functions/uselocale.texi: Mention the AIX problem.
39850 2018-12-18  Bruno Haible  <bruno@clisp.org>
39852         localename: Update comments regarding Cygwin.
39853         * lib/localename.c: Update comment.
39854         * doc/posix-functions/uselocale.texi: Update platforms list.
39855         * doc/posix-functions/newlocale.texi: Likewise.
39856         * doc/posix-functions/duplocale.texi: Likewise.
39857         * doc/posix-functions/freelocale.texi: Likewise.
39859 2018-12-16  Bruno Haible  <bruno@clisp.org>
39861         c-stack: Fix for Linux/sparc.
39862         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Set
39863         ac_cv_sys_xsi_stack_overflow_heuristic to 'no' on Linux/sparc.
39865 2018-12-16  Bruno Haible  <bruno@clisp.org>
39867         localename: Avoid test failure on some glibc systems.
39868         * tests/test-localename.c (test_locale_name, test_locale_name_posix):
39869         Unset environment variables that might disturb the first setlocale call,
39870         and verify that this setlocale call succeeds.
39872 2018-12-16  Assaf Gordon  <assafgordon@gmail.com>
39874         random: Fix build error on native Windows (regression from 2018-06-21).
39875         * lib/random.c (__srandom, __initstate, __setstate, __random,
39876         __srandom_r, __initstate_r, __setstate_r, __random_r) [!_LIBC]: Redirect
39877         to the symbols without '__' prefix.
39879 2018-12-16  Bruno Haible  <bruno@clisp.org>
39881         obstack, libc-config: Support HP-UX cc in C99 mode.
39882         * lib/obstack.h (__FLEXIBLE_ARRAY_MEMBER): Treat HP-UX cc as a pre-C99
39883         compiler, even when in C99 mode.
39884         * lib/cdefs.h (__flexarr): Likewise.
39885         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Update comment.
39887 2018-12-16  Bruno Haible  <bruno@clisp.org>
39889         localename: Fix test failure on OpenBSD >= 6.2.
39890         * m4/intl-thread-locale.m4 (gt_INTL_THREAD_LOCALE_NAME): Test for fake
39891         locale system. Define HAVE_FAKE_LOCALES in this case.
39892         * lib/localename.c (HAVE_GOOD_USELOCALE): New macro. Use it instead of
39893         HAVE_USELOCALE.
39894         * tests/test-localename.c (HAVE_GOOD_USELOCALE): New macro. Use it
39895         instead of HAVE_NEWLOCALE && HAVE_USELOCALE.
39896         * doc/posix-functions/uselocale.texi: Mention OpenBSD problem. Update
39897         platforms list.
39898         * doc/posix-functions/newlocale.texi: Likewise.
39899         * doc/posix-functions/duplocale.texi: Update platforms list.
39900         * doc/posix-functions/freelocale.texi: Likewise.
39902 2018-12-16  Bruno Haible  <bruno@clisp.org>
39904         duplocale tests: Re-enable the test on platforms without <monetary.h>.
39905         * tests/test-duplocale.c: Use more fine-grained #ifs to re-enable most
39906         of the test, on platforms without <monetary.h>.
39908 2018-12-16  Bruno Haible  <bruno@clisp.org>
39910         localename: Update comments.
39911         * lib/localename.c (HAVE_USELOCALE): Update list of platforms.
39913 2018-12-15  Jim Meyering  <meyering@fb.com>
39915         regex: fix indentation
39916         * m4/regex.m4 (gl_REGEX): Indent with spaces, not TABs.
39918 2018-12-15  Bruno Haible  <bruno@clisp.org>
39920         openat-safer tests: Avoid test failure on NetBSD 8.
39921         * tests/test-openat-safer.c (main): Execute a Linux specific test only
39922         on Linux.
39924 2018-12-15  Jim Meyering  <meyering@fb.com>
39926         regex: work around a bug in glibc-2.27 and prior
39927         * m4/regex.m4 (gl_REGEX): Reject any system regexp that gets a failed
39928         assertion for /0|()0|\1|0/.
39929         * tests/test-regex.c (main): Add the same test here.
39931 2018-12-15  Bruno Haible  <bruno@clisp.org>
39933         localename: Fix use of uninitialized shell variable.
39934         * m4/intl-thread-locale.m4 (gt_INTL_THREAD_LOCALE_NAME): Initialize
39935         gt_cv_locale_solaris114 always before use. Remove assignment without
39936         effect.
39938 2018-12-15  Bruno Haible  <bruno@clisp.org>
39940         dfa tests: Avoid test failure on Alpine Linux.
39941         * tests/dfa-match.sh (timeout_10): Accommodate the BusyBox 'timeout'
39942         command found on Alpine Linux.
39944 2018-12-15  Jim Meyering  <meyering@fb.com>
39946         dfa: avoid new warnings from gcc
39947         These would prevent building with -Werror and a Dec snapshot of gcc.
39948         * lib/dfa.c (dfaanalyze): Avoid shadowing warnings for "pos".
39949         Rename each inner instance to "p".
39950         (charclass_context): Remove unused static function.
39952 2018-12-14  Paul Eggert  <eggert@cs.ucla.edu>
39954         mkdir-p: improve diagnostic for FUSE mounts
39955         Problem reported by Niklas Hambüchen in:
39956         https://lists.gnu.org/r/bug-gnulib/2018-12/msg00074.html
39957         * lib/mkdir-p.c (make_dir_parents): In diagnostic, prefer stat
39958         errno to mkdir errno if the stat errno is likely more interesting.
39960 2018-12-14  Bruno Haible  <bruno@clisp.org>
39962         hash-map: Add tests.
39963         * tests/test-hash_map.c: New file.
39964         * modules/hash-map-tests: New file.
39966         linkedhash-map: Add tests.
39967         * tests/test-linkedhash_map.c: New file.
39968         * modules/linkedhash-map-tests: New file.
39970         array-map: Add tests.
39971         * tests/test-array_map.c: New file.
39972         * modules/array-map-tests: New file.
39974         xmap: New module.
39975         * lib/gl_xmap.h: New file.
39976         * lib/gl_xmap.c: New file.
39977         * modules/xmap: New file.
39979         hash-map: New module.
39980         * lib/gl_hash_map.h: New file.
39981         * lib/gl_hash_map.c: New file.
39982         * modules/hash-map: New file.
39984         linkedhash-map: New module.
39985         * lib/gl_linkedhash_map.h: New file.
39986         * lib/gl_linkedhash_map.c: New file.
39987         * lib/gl_anyhash1.h: Update comments.
39988         * lib/gl_anyhash2.h: Likewise.
39989         * modules/linkedhash-map: New file.
39991         array-map: New module.
39992         * lib/gl_array_map.h: New file.
39993         * lib/gl_array_map.c: New file.
39994         * modules/array-map: New file.
39996         map: New module.
39997         * lib/gl_map.h: New file.
39998         * lib/gl_map.c: New file.
39999         * lib/gl_omap.h (gl_mapkey_dispose_fn, gl_mapvalue_dispose_fn): Avoid
40000         conflict with gl_map.h.
40001         * modules/map: New file.
40003 2018-12-13  Bruno Haible  <bruno@clisp.org>
40005         select tests: Avoid test failure on Cygwin.
40006         * tests/test-select.h (test_bad_fd): Use an fd < FD_SETSIZE.
40008 2018-12-13  Bruno Haible  <bruno@clisp.org>
40010         localtime-buffer: Avoid endless recursion in localtime and gmtime.
40011         * lib/localtime-buffer.c: Undefine localtime and gmtime before use.
40013 2018-12-13  Bruno Haible  <bruno@clisp.org>
40015         localeconv tests: Avoid test failure on Cygwin.
40016         * tests/test-localeconv.c (main): On Cygwin, skip the 'grouping' and
40017         'mon_grouping' tests.
40019 2018-12-11  Bruno Haible  <bruno@clisp.org>
40021         omap: Don't dispose the old value when the function returns it.
40022         * lib/gl_array_omap.c (gl_array_remove_at): Don't invoke the vdispose_fn
40023         here.
40024         * lib/gl_avltree_omap.c (NODE_PAYLOAD_DISPOSE): Likewise.
40025         * lib/gl_rbtree_omap.c (NODE_PAYLOAD_DISPOSE): Likewise.
40026         * lib/gl_omap.h (gl_omap_nx_put, gl_omap_remove): Invoke the vdispose_fn
40027         here.
40029         array-omap, avltree-omap, rbtree-omap: Tweak style.
40030         * lib/gl_anytree_omap.h (gl_tree_nx_getput): Return 1 or 0, not true or
40031         false.
40032         * lib/gl_array_omap.c (gl_array_nx_getput): Likewise.
40034         rbtree-omap: Add tests.
40035         * tests/test-rbtree_omap.c: New file.
40036         * modules/rbtree-omap-tests: New file.
40038         avltree-omap: Add tests.
40039         * tests/test-avltree_omap.c: New file.
40040         * modules/avltree-omap-tests: New file.
40042         array-omap: Add tests.
40043         * tests/test-array_omap.c: New file.
40044         * modules/array-omap-tests: New file.
40046         xomap: New module.
40047         * lib/gl_xomap.h: New file.
40048         * lib/gl_xomap.c: New file.
40049         * modules/xomap: New file.
40051         rbtree-omap: New module.
40052         * lib/gl_rbtree_omap.h: New file.
40053         * lib/gl_rbtree_omap.c: New file.
40054         * lib/gl_rbtree_ordered.h: Code moved to here from lib/gl_rbtree_oset.c.
40055         Parameterize.
40056         * lib/gl_rbtree_oset.c: Include gl_rbtree_ordered.h.
40057         * modules/rbtree-omap: New file.
40058         * modules/rbtree-oset (Files): Add lib/gl_rbtree_ordered.h.
40059         (Makefile.am): Add gl_rbtree_ordered.h to lib_SOURCES.
40061         avltree-omap: New module.
40062         * lib/gl_avltree_omap.h: New file.
40063         * lib/gl_avltree_omap.c: New file.
40064         * lib/gl_avltree_ordered.h: Code moved to here from
40065         lib/gl_avltree_oset.c. Parameterize.
40066         * lib/gl_avltree_oset.c: Include gl_avltree_ordered.h.
40067         * lib/gl_anytree_omap.h: New file.
40068         * modules/avltree-omap: New file.
40069         * modules/avltree-oset (Files): Add lib/gl_avltree_ordered.h.
40070         (Makefile.am): Add gl_avltree_ordered.h to lib_SOURCES.
40072         array-omap: New module.
40073         * lib/gl_array_omap.h: New file.
40074         * lib/gl_array_omap.c: New file.
40075         * modules/array-omap: New file.
40077         omap: New module.
40078         * lib/gl_omap.h: New file.
40079         * lib/gl_omap.c: New file.
40080         * modules/omap: New file.
40082 2018-12-11  Bruno Haible  <bruno@clisp.org>
40084         hash-set, linkedhash-set: Reduce code duplication.
40085         * lib/gl_anyhash1.h: Rename from lib/gl_anyhash_list1.h and
40086         lib/gl_anyhash_set1.h.
40087         * lib/gl_anyhash2.h: Rename from lib/gl_anyhash_list2.h and
40088         lib/gl_anyhash_set2.h. Parameterize.
40089         (hash_resize_after_add): New function, from lib/gl_anyhash_set2.h.
40090         * lib/gl_anytreehash_list1.h (hash_resize_after_add): Remove function.
40091         * lib/gl_avltreehash_list.c: Include gl_anyhash1.h instead of
40092         gl_anyhash_list1.h. Include gl_anyhash2.h instead of gl_anyhash_list2.h.
40093         * lib/gl_rbtreehash_list.c: Likewise.
40094         * lib/gl_linkedhash_list.c: Likewise.
40095         (hash_resize_after_add): Remove function.
40096         * lib/gl_linkedhash_set.c: Include gl_anyhash1.h instead of
40097         gl_anyhash_set1.h. Include gl_anyhash2.h instead of gl_anyhash_set2.h.
40098         * gl_hash_set.c: Likewise.
40099         * modules/avltreehash-list (Files, Makefile.am): Update file list.
40100         * modules/rbtreehash-list (Files, Makefile.am): Likewise.
40101         * modules/linkedhash-list (Files, Makefile.am): Likewise.
40102         * modules/linkedhash-set (Files, Makefile.am): Likewise.
40103         * modules/hash-set (Files, Makefile.am): Likewise.
40105 2018-12-11  Bruno Haible  <bruno@clisp.org>
40107         array-set: Optimize.
40108         * lib/gl_array_set.c (gl_array_search, gl_array_remove): Test equals_fn
40109         outside the loop, not inside the loop.
40111 2018-12-11  Bruno Haible  <bruno@clisp.org>
40113         times: Fix tests.
40114         * tests/test-times.c (doublecmp): Implement a total order.
40116 2018-12-11  Bruno Haible  <bruno@clisp.org>
40118         array-set, linkedhash-set, hash-set: Fix tests.
40119         * tests/test-array_set.c (cmp_objects_in_array): New function.
40120         (check_equals): Use it.
40121         * tests/test-hash_set.c: Likewise.
40122         * tests/test-linkedhash_set.c: Likewise.
40124 2018-12-08  Bruno Haible  <bruno@clisp.org>
40126         Fix comments.
40127         * lib/gl_list.h (gl_list_free): Clarify what it does.
40128         * lib/gl_oset.h (gl_oset_free): Likewise.
40129         * lib/gl_set.h (gl_set_free): Likewise.
40130         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Fix typo in comment.
40131         * lib/gl_array_oset.c (gl_array_search_atleast): Likewise.
40132         * lib/gl_anyavltree_list1.h (MAXHEIGHT): Likewise.
40133         * lib/gl_avltree_oset.c (MAXHEIGHT): Likewise.
40135 2018-12-03  Bruno Haible  <bruno@clisp.org>
40137         hash-set: Add tests.
40138         * tests/test-hash_set.c: New file.
40139         * modules/hash-set-tests: New file.
40141         linkedhash-set: Add tests.
40142         * tests/test-linkedhash_set.c: New file.
40143         * modules/linkedhash-set-tests: New file.
40145         array-set: Add tests.
40146         * tests/test-array_set.c: New file.
40147         * modules/array-set-tests: New file.
40149         xset: New module.
40150         * lib/gl_xset.h: New file.
40151         * lib/gl_xset.c: New file.
40152         * modules/xset: New file.
40154         hash-set: New module.
40155         * lib/gl_hash_set.h: New file.
40156         * lib/gl_hash_set.c: New file.
40157         * modules/hash-set: New file.
40159         linkedhash-set: New module.
40160         * lib/gl_linkedhash_set.h: New file.
40161         * lib/gl_linkedhash_set.c: New file.
40162         * lib/gl_anyhash_set1.h: New file, based on lib/gl_anyhash_list1.h.
40163         * lib/gl_anyhash_set2.h: New file, based on lib/gl_anyhash_list2.h.
40164         * lib/gl_anyhash_primes.h: New file, extracted from
40165         lib/gl_anyhash_list2.h.
40166         * lib/gl_anyhash_list2.h: Include it.
40167         (primes, next_prime): Remove definitions.
40168         * modules/linkedhash-set: New file.
40169         * modules/avltreehash-list (Files): Add lib/gl_anyhash_primes.h.
40170         (Makefile.am): Add gl_anyhash_primes.h to lib_SOURCES.
40171         * modules/linkedhash-list (Files): Add lib/gl_anyhash_primes.h.
40172         (Makefile.am): Add gl_anyhash_primes.h to lib_SOURCES.
40173         * modules/rbtreehash-list (Files): Add lib/gl_anyhash_primes.h.
40174         (Makefile.am): Add gl_anyhash_primes.h to lib_SOURCES.
40176         array-set: New module.
40177         * lib/gl_array_set.h: New file.
40178         * lib/gl_array_set.c: New file.
40179         * modules/array-set: New file.
40181         set: New module.
40182         * lib/gl_set.h: New file.
40183         * lib/gl_set.c: New file.
40184         * lib/gl_oset.h (gl_setelement_dispose_fn): Avoid conflict with
40185         gl_set.h.
40186         * modules/set: New file.
40188 2018-12-07  Akim Demaille  <akim@lrde.epita.fr>
40190         bison: don't force the Yacc mode
40191         Passing -y forces Bison into POSIX YACC mode.  This includes reporting
40192         errors when Bison features are used in the grammar file.  Some of
40193         these features (such as %expect) were flagged non-yacc recently.  Most
40194         of the time, -y is actually used to please Automake's ylwrap which
40195         expects the output to be y.tab.c.
40196         * m4/bison.m4 (gl_BISON): Use `-o y.tab.c` rather than `-y`.
40198 2018-12-01  Bruno Haible  <bruno@clisp.org>
40200         gnupload: Document short options.
40201         * build-aux/gnupload (usage): Document the short options.
40203 2018-11-28  Ben Elliston  <bje@gnu.org>
40205         gnupload: Support option -h as alias of --help.
40206         * build-aux/gnupload: Support -h.
40208 2018-11-30  Paul Eggert  <eggert@cs.ucla.edu>
40210         memrchr: port better to clang
40211         * lib/memrchr.c (__memrchr): Cast to void * instead of to
40212         longword *, to pacify clang -Wcast-align (Bug#33544).
40214 2018-11-29  Eric Blake  <eblake@redhat.com>
40216         docs: mention printf %m considerations
40217         * doc/glibc-functions/asprintf.texi (asprintf): Document that %m
40218         is not portable, and is easy enough to work around.
40219         * doc/glibc-functions/obstack_printf.texi (obstack_printf): Likewise.
40220         * doc/glibc-functions/obstack_vprintf.texi (obstack_vprintf): Likewise.
40221         * doc/glibc-functions/vasprintf.texi (vasprintf): Likewise.
40222         * doc/posix-functions/dprintf.texi (dprintf): Likewise.
40223         * doc/posix-functions/fprintf.texi (fprintf): Likewise.
40224         * doc/posix-functions/fwprintf.texi (fwprintf): Likewise.
40225         * doc/posix-functions/printf.texi (printf): Likewise.
40226         * doc/posix-functions/snprintf.texi (snprintf): Likewise.
40227         * doc/posix-functions/sprintf.texi (sprintf): Likewise.
40228         * doc/posix-functions/swprintf.texi (swprintf): Likewise.
40229         * doc/posix-functions/vdprintf.texi (vdprintf): Likewise.
40230         * doc/posix-functions/vfprintf.texi (vfprintf): Likewise.
40231         * doc/posix-functions/vfwprintf.texi (vfwprintf): Likewise.
40232         * doc/posix-functions/vprintf.texi (vprintf): Likewise.
40233         * doc/posix-functions/vsnprintf.texi (vsnprintf): Likewise.
40234         * doc/posix-functions/vsprintf.texi (vsprintf): Likewise.
40235         * doc/posix-functions/vswprintf.texi (vswprintf): Likewise.
40236         * doc/posix-functions/vwprintf.texi (vwprintf): Likewise.
40237         * doc/posix-functions/wprintf.texi (wprintf): Likewise.
40239 2018-11-29  Akim Demaille  <akim@lrde.epita.fr>
40241         bitset: rename ebitset/expandable.* as tbitset/table.*
40242         See
40243         https://lists.gnu.org/archive/html/bug-gnulib/2018-11/msg00096.html.
40244         * lib/bitset/expandable.h, lib/bitset/expandable.c: Rename as...
40245         * lib/bitset/table.h, lib/bitset/table.c: these.
40246         Rename all the ebitset* symbols as tbitset*.
40247         Adjust dependencies.
40249 2018-11-28  Akim Demaille  <akim@lrde.epita.fr>
40251         bitset: check the operations
40252         * tests/test-bitset.c (bitset_random): New.
40253         Use it.
40254         * lib/bitset/expandable.c (ebitset_not): Fix typo.
40256 2018-11-28  Akim Demaille  <akim@lrde.epita.fr>
40258         bitset: properly use false/true instead of 0/1 for Booleans
40259         * lib/bitset/expandable.c, lib/bitset/vector.c: Use false/true, not
40260         0/1, as Booleans.
40262 2018-11-28  Akim Demaille  <akim@lrde.epita.fr>
40264         bitset: rename BITSET_VARRAY as BITSET_VECTOR
40265         For consistency with the name of the file.
40266         * doc/bitset.texi, lib/bitset.c, lib/bitset/base.h,
40267         * lib/bitset/stats.c, lib/bitset/vector.c
40268         (BITSET_VARRAY): Rename as...
40269         (BITSET_VECTOR): this.
40271 2018-11-28  Paul Eggert  <eggert@cs.ucla.edu>
40273         strerror_r-posix: memmove, not memcpy
40274         * lib/strerror_r.c (safe_copy): Use memmove, not memcpy,
40275         since the source and destination might overlap in the call
40276         ‘safe_copy (buf, buflen, strerror_r (errnum, buf, buflen))’.
40277         Simplify.
40279 2018-11-25  Akim Demaille  <akim@lrde.epita.fr>
40281         bitsetv: new module
40282         * lib/bitsetv.c, lib/bitsetv.h, modules/bitsetv: New.
40284 2018-11-25  Akim Demaille  <akim@lrde.epita.fr>
40286         bitset: add tests and doc
40287         First stabs at providing a documentation and test for the bitset
40288         module.
40289         * doc/bitset.texi, modules/test-bitset, tests/bitset-tests.c: New.
40291 2018-11-25  Akim Demaille  <akim@lrde.epita.fr>
40293         bitset: new module
40294         * lib/bitset.c, lib/bitset.h, lib/bitset/array.c,
40295         * lib/bitset/array.h, lib/bitset/base.h, lib/bitset/expandable.c,
40296         * lib/bitset/expandable.h, lib/bitset/list.c, lib/bitset/list.h,
40297         * lib/bitset/stats.c, lib/bitset/stats.h, lib/bitset/vector.c,
40298         * lib/bitset/vector.h, modules/bitset:
40299         New.
40301 2018-11-23  Bruno Haible  <bruno@clisp.org>
40303         localename: Fix gettext test failures on mingw.
40304         * lib/localename.c (gl_locale_name_posix): Convert the result of
40305         gl_locale_name_environ to XPG syntax.
40307 2018-11-23  Karl Berry  <karl@freefriends.org>
40309         * config/srclistvars.txt,
40310         * config/srclist.txt: remove all gettext references;
40311         the gettext maintainers will sync as needed.
40313 2018-11-21  Paul Eggert  <eggert@cs.ucla.edu>
40315         mktime: add libc-config dependency
40316         I missed this when we synced from glibc.
40317         * modules/mktime (Depends-on): Add libc-config.
40319 2018-11-13  Paul Eggert  <eggert@cs.ucla.edu>
40321         longlong: fix comment typo
40322         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Fix typo.
40324 2018-11-11  Bruno Haible  <bruno@clisp.org>
40326         havelib: Remove the need to include asm-underscore.m4.
40327         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI_32BIT): New macro.
40328         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Use it instead of
40329         gl_HOST_CPU_C_ABI.
40330         * modules/havelib (Files): Add host-cpu-c-abi.m4.
40331         (Depends-on): Remove host-cpu-c-abi.
40333 2018-11-03  Paul Eggert  <eggert@cs.ucla.edu>
40335         parse-datetime: simplify test for mktime failure
40336         * lib/parse-datetime.y (mktime_ok): Simplify.
40337         Remove args TZ and T; no longer needed.  Callers changed.
40339         posixtm: simplify test for mktime failure
40340         * lib/posixtm.c (posixtime): Simplify.
40342         nstrftime: simplify test for mktime failure
40343         * lib/nstrftime.c (__strftime_internal): Simplify.
40345 2018-11-02  Paul Eggert  <eggert@cs.ucla.edu>
40347         gnulib-common.m4: port _Noreturn to C++
40348         Problem reported by Akim Demaille in:
40349         https://lists.gnu.org/r/bug-bison/2018-10/msg00067.html
40350         * m4/gnulib-common.m4 (gl_COMMON_BODY): If C++, use [[noreturn]].
40351         Merge adjustments from _Noreturn.h and from glibc into the non-C++
40352         version.
40353         * lib/_Noreturn.h: Match gnulib-common.
40355 2018-10-30  Bruno Haible  <bruno@clisp.org>
40357         gnu-make: Fix for NetBSD 8 'make'.
40358         Reported by Reuben Thomas in
40359         <https://lists.gnu.org/archive/html/bug-gnulib/2018-10/msg00135.html>.
40360         * m4/gnu-make.m4 (gl_GNU_MAKE): Use a heuristic based on the --version
40361         output, ignoring exit codes.
40363 2018-10-28  Bernhard Voelker  <mail@bernhard-voelker.de>
40365         maintainer-makefile: fix syntax-check rule for "same.h"
40366         * top/maint.mk (sc_prohibit_same_without_use): Adjust regex to check
40367         for 'same_nameat', too.
40369 2018-10-25  Paul Eggert  <eggert@cs.ucla.edu>
40371         havelib: fix nested ‘configure’ chatter
40372         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Don’t nest
40373         AC_CACHE_CHECK calls, which resulted in confusing output like
40374         “checking for the common suffixes of directories in the library
40375         search path... checking for 64-bit host... no lib,lib”.
40377         backupfile: tweak for better code
40378         * lib/backupfile.c: Sort include directives, and remove
40379         unnecessary <limits.h> include.
40380         (FALLTHROUGH): New macro, copied from other modules.
40381         (backupfile_internal): Use it to avoid code duplication.
40382         This lets GCC 8.2.1 generate better code by inlining the
40383         call to check_extension.
40385 2018-10-23  Paul Eggert  <eggert@cs.ucla.edu>
40387         backupfile: new dir_fd args
40388         New module opendirat with code taken from fts.
40389         Use this module to let backupfile use a directory file descriptor.
40390         * NEWS: Document the incompatible change.
40391         * lib/backup-find.c (find_backup_file_name):
40392         * lib/backup-rename.c (backup_file_rename):
40393         New arg DIR_FD.
40394         * lib/backupfile.c: Include stdint.h, for SIZE_MAX.
40395         (SIZE_MAX): Remove.
40396         Include opendirat.h rather than dirent--.h.
40397         (check_extension): New args DIR_FD and BASE_MAX.  All callers changed.
40398         (numbered_backup): New args DIR_FD and PNEW_FD.  All callers changed.
40399         (backupfile_internal): New arg DIR_FD.  All callers changed.
40400         * lib/fts.c: Include opendirat.h.
40401         (opendirat): Move to opendirat.c.
40402         * lib/opendirat.c, lib/opendirat.h, modules/opendirat: New files.
40403         * modules/backupfile (Depends-on): Remove dirfd, opendir.
40404         Add opendirat.
40405         * modules/fts (Depends-on): Remove fdopendir, openat-safer.
40406         Add opendirat.
40408 2018-10-23  Bruno Haible  <bruno@clisp.org>
40410         localename: Simplify support for per-thread locales on Solaris 11.4.
40411         * m4/intl-thread-locale.m4: Renamed from m4/intlsolaris.m4.
40412         (gt_INTL_THREAD_LOCALE_NAME): Renamed from gt_INTL_SOLARIS. Define
40413         HAVE_SOLARIS114_LOCALES instead of HAVE_NAMELESS_LOCALES.
40414         * lib/localename.c: Handle HAVE_SOLARIS114_LOCALES through Solaris
40415         specific code.
40416         * lib/localename-table.h: Update comments.
40417         * lib/localename-table.c: Update comments.
40418         * m4/localename.m4 (gl_LOCALENAME): Require gt_INTL_THREAD_LOCALE_NAME.
40419         Test for 'uselocale'. Don't invoke gt_INTL_SOLARIS.
40420         * m4/intl.m4 (AM_INTL_SUBDIR): Require gt_INTL_THREAD_LOCALE_NAME. Test
40421         for 'uselocale'. Set HAVE_NAMELESS_LOCALES.
40422         (gt_INTL_SUBDIR_CORE): Don't invoke gt_INTL_SOLARIS. Don't set
40423         HAVE_NAMELESS_LOCALES here.
40424         * modules/localename (Files): Add m4/intl-thread-locale.m4. Remove
40425         m4/intlsolaris.m4.
40426         * modules/gettext (Files): Likewise.
40428 2018-10-22  Bruno Haible  <bruno@clisp.org>
40430         std-gnu11: Support Autoconf versions < 2.64.
40431         * m4/std-gnu11.m4 (AC_PROG_CC, AC_PROG_CXX): Use _AC_DO as fallback
40432         when _AC_DO_LIMIT does not exist.
40434 2018-10-22  Bruno Haible  <bruno@clisp.org>
40436         Assume Autoconf >= 2.63.
40437         * DEPENDENCIES: Mention the requirement.
40439         * gnulib-tool (DEFAULT_AUTOCONF_MINVERSION): Bump to 2.63.
40440         (func_get_filelist): Don't list m4/onceonly.m4 any more.
40441         * pygnulib/GLModuleSystem.py (getFiles): Likewise.
40442         * m4/onceonly.m4: Remove file.
40444         * m4/openmp.m4: Remove file.
40445         * modules/openmp (Files): Remove m4/openmp.m4.
40447         * m4/configmake.m4 (gl_CONFIGMAKE_PREP): Don't set datarootdir, docdir,
40448         htmldir, dvidir, pdfdir, psdir, localedir.
40449         * m4/po.m4 (AM_PO_SUBDIRS): Don't set localedir.
40451         * m4/gnulib-common.m4 (m4_foreach_w): Remove fallback for
40452         Autoconf < 2.60.
40453         (AC_PROG_MKDIR_P): Remove definition for Autoconf < 2.62.
40454         (AC_PROG_SED): Remove fallback for Autoconf < 2.60.
40456         * m4/errno_h.m4 (AC_COMPUTE_INT): Remove fallback for Autoconf < 2.61.
40457         * m4/size_max.m4 (AC_COMPUTE_INT): Likewise.
40458         * m4/stdint.m4 (AC_COMPUTE_INT): Likewise.
40460         * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Assume AC_USE_SYSTEM_EXTENSIONS
40461         exists.
40462         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Likewise,
40464         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Remove workaround for
40465         Autoconf < 2.61.
40467         * m4/lib-prefix.m4 (AC_LIB_ARG_WITH): Remove macro.
40468         (AC_LIB_PREFIX): Use AC_ARG_WITH, assuming semantics of
40469         Autoconf >= 2.52.
40471         * m4/longlong.m4: Require Autoconf >= 2.62. Update comments.
40472         * m4/ls-mntd-fs.m4: Require Autoconf >= 2.60. Update comments.
40473         * m4/gettext.m4 (AM_GNU_GETTEXT): Update comment.
40475 2018-10-22  Bruno Haible  <bruno@clisp.org>
40477         Assume Automake >= 1.11.
40478         * m4/configmake.m4: Update comments.
40479         * m4/lib-link.m4 (AC_LIB_RPATH): Assume AC_REQUIRE_AUX_FILE exists.
40480         * m4/po.m4 (AM_PO_SUBDIRS, AM_POSTPROCESS_PO_MAKEFILE): Eliminate uses
40481         of 'eval'.
40482         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am,
40483         func_create_testdir, func_create_megatestdir): Emit a Makefile.am that
40484         requires Automake >= 1.11.
40486 2018-10-22  Bruno Haible  <bruno@clisp.org>
40488         localename: Fix typo in comment.
40489         * tests/test-locale-c++.cc (newlocale): Fix typo in comment.
40491 2018-10-22  Bruno Haible  <bruno@clisp.org>
40493         Fix failure of 'gnulib-tool --create-testdir' with all modules.
40494         * gnulib-tool (func_create_testdir): Exclude 'timevar' module.
40496 2018-10-21  Bruno Haible  <bruno@clisp.org>
40498         locale: Ease integration with GNU libintl.
40499         * lib/locale.in.h (GNULIB_defined_newlocale, GNULIB_defined_duplocale,
40500         GNULIB_defined_freelocale): New macros.
40502 2018-10-21  Bruno Haible  <bruno@clisp.org>
40504         localename: Fine-tune support for per-thread locales on Solaris 11.4.
40505         * lib/localename-table.h: New file, extracted from lib/localename.c.
40506         * lib/localename-table.c: Likewise.
40507         * lib/localename.c: Include localename-table.h.
40508         (get_locale_t_name, newlocale, duplocale, freelocale): Invoke
40509         locale_hash_function instead of pointer_hash.
40510         * modules/localename (Files): Add lib/localename-table.h,
40511         lib/localename-table.c.
40512         (lib_SOURCES): Add localename-table.c.
40513         * m4/intlsolaris.m4 (gt_INTL_SOLARIS): Require AC_CANONICAL_HOST. Test
40514         for Solaris 11.4 locale system only on Solaris. Test for it
40515         independently whether getlocalename_l exists.
40516         * m4/intl.m4 (gt_INTL_SUBDIR_CORE): Don't test for 'uselocale' and
40517         'getlocalename_l'. Instead, invoke gt_INTL_SOLARIS. Set
40518         HAVE_NAMELESS_LOCALES.
40519         * modules/gettext (Files): Add m4/intlsolaris.m4.
40521 2018-10-21  Bruno Haible  <bruno@clisp.org>
40523         Small update from gettext.
40524         * m4/intl.m4: Update from gettext:
40525         - 2018-01-02: Fix 'ar' invocation when cross-compiling and in 64-bit
40526         mode on AIX.
40527         - 2018-01-02: Don't use -lc explicitly when linking with libtool.
40528         - 2017-05-19: (AM_INTL_SUBDIR): Require AC_C_FLEXIBLE_ARRAY_MEMBER.
40530 2018-10-16  Bruno Haible  <bruno@clisp.org>
40532         mountlist: Remove support for Cray with UNICOS 9.
40533         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't define
40534         MOUNTED_LISTMNTENT.
40535         * lib/mountlist.c: Remove MOUNTED_LISTMNTENT case.
40537 2018-10-16  Bruno Haible  <bruno@clisp.org>
40539         fsusage, mountlist, getloadavg, getgroups: Remove support for Ultrix.
40540         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't define
40541         STAT_STATFS2_FS_DATA.
40542         * lib/fsusage.c: Remove STAT_STATFS2_FS_DATA case.
40543         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't define
40544         MOUNTED_GETMNT.
40545         * lib/mountlist.c: Remove MOUNTED_GETMNT case.
40546         * lib/getloadavg.c (decstation): Remove definition and case.
40547         * m4/getgroups.m4 (AC_FUNC_GETGROUPS): Mention NeXTstep, not Ultrix.
40548         * lib/getgroups.c: Likewise.
40549         * doc/posix-functions/getgroups.texi: Likewise.
40550         * lib/time.in.h: Update comments.
40552 2018-10-16  Bruno Haible  <bruno@clisp.org>
40554         getloadavg: Remove support for ConvexOS.
40555         * lib/getloadavg.c: Remove convex case.
40557 2018-10-16  Bruno Haible  <bruno@clisp.org>
40559         getloadavg: Remove support for Sony NEWS.
40560         * lib/getloadavg.c: Remove sony_news case.
40562 2018-10-16  Bruno Haible  <bruno@clisp.org>
40564         fsusage, mountlist, getloadavg: Remove support for Dynix/ptx.
40565         * lib/fsusage.c: Remove _SEQUENT_ case.
40566         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Update comments.
40567         * lib/mountlist.c: Don't test for MNTTABNAME.
40568         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Don't test for libseq.
40569         (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't test for MNTTABNAME.
40570         * lib/getloadavg.c: Remove _SEQUENT_ and sequent cases.
40571         * lib/stat-size.h: Don't mention the Sequent bug.
40572         * doc/posix-functions/utime.texi: Don't mention the Dynix bug.
40574 2018-10-16  Bruno Haible  <bruno@clisp.org>
40576         fsusage: Remove support for AIX 3.
40577         * lib/fsusage.c: Remove code for AIX 3.
40578         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Update comments.
40580 2018-10-16  Bruno Haible  <bruno@clisp.org>
40582         fsusage, stat-size, getloadavg: Remove support for AIX PS/2.
40583         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for dustat.h.
40584         * lib/fsusage.c: Remove code for AIX PS/2.
40585         * lib/stat-size.h (ST_NBLOCKSIZE): Likewise.
40586         * lib/getloadavg.c: Likewise.
40588 2018-10-16  Bruno Haible  <bruno@clisp.org>
40590         getloadavg: Remove support for HP-UX on m68k.
40591         * lib/getloadavg.c: Remove hp9000s300 case.
40593 2018-10-16  Bruno Haible  <bruno@clisp.org>
40595         fsusage, mountlist: Remove support for DolphinOS (an SVR3 variant).
40596         * lib/fsusage.c: Remove DOLPHIN case.
40597         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Update comments.
40598         * lib/mountlist.c: Remove MOUNTED_GETMNTTBL case.
40600 2018-10-16  Bruno Haible  <bruno@clisp.org>
40602         getloadavg: Remove support for Alliant FX/2800.
40603         * lib/getloadavg.c: Remove alliant case.
40605 2018-10-16  Bruno Haible  <bruno@clisp.org>
40607         getloadavg: Remove support for tek4300.
40608         * lib/getloadavg.c: Remove tek4300 case.
40610 2018-10-16  Bruno Haible  <bruno@clisp.org>
40612         getloadavg: Remove support for Ardent.
40613         * lib/getloadavg.c: Remove ardent case.
40615 2018-10-16  Bruno Haible  <bruno@clisp.org>
40617         mountlist: Remove support for SVR2.
40618         Reported by Andrew Borodin <aborodin@vmail.ru> in
40619         <https://lists.gnu.org/archive/html/bug-gnulib/2018-10/msg00101.html>.
40620         * lib/mountlist.c: Remove MOUNTED_FREAD case.
40621         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't define
40622         MOUNTED_FREAD.
40624 2018-10-15  Paul Eggert  <eggert@cs.ucla.edu>
40626         libc-config: merge from glibc
40627         * lib/cdefs.h (__glibc_has_attribute): New macro.
40629         regex: depend on libc-config
40630         * modules/regex (Depends-on): Add libc-config.
40631         This is needed after the recent autoupdate from glibc.
40633 2018-10-14  Bruno Haible  <bruno@clisp.org>
40635         localename: Add support for per-thread locales on Solaris 11.4.
40636         * lib/locale.in.h (newlocale, freelocale): New declarations.
40637         (duplocale): Declare also when the 'localename' module requests it.
40638         * lib/localename.c (struniq_hash_node): Renamed from hash_node.
40639         (STRUNIQ_HASH_TABLE_SIZE): Renamed from HASH_TABLE_SIZE.
40640         (struniq): Update.
40641         (struct locale_categories_names, struct locale_hash_node): New types.
40642         (LOCALE_HASH_TABLE_SIZE): New constant.
40643         (locale_hash_table, locale_lock): New variables.
40644         (pointer_hash, get_locale_t_name): New functions.
40645         (newlocale, duplocale, freelocale): New overridden functions.
40646         (gl_locale_name_thread_unsafe): Use get_locale_t_name.
40647         * m4/intlsolaris.m4: New file.
40648         * m4/localename.m4 (gl_LOCALENAME): Require gl_LOCALE_H_DEFAULTS. Invoke
40649         gt_INTL_SOLARIS. Set HAVE_NEWLOCALE, HAVE_DUPLOCALE, HAVE_FREELOCALE,
40650         REPLACE_NEWLOCALE, REPLACE_DUPLOCALE, REPLACE_FREELOCALE.
40651         * m4/locale_h.m4 (gl_LOCALE_H): Test whether newlocale, freelocale are
40652         declared.
40653         (gl_LOCALE_H_DEFAULTS): Initialize GNULIB_LOCALENAME, HAVE_NEWLOCALE,
40654         HAVE_FREELOCALE, REPLACE_NEWLOCALE, REPLACE_FREELOCALE.
40655         * modules/locale (Makefile.am): Substitute GNULIB_LOCALENAME,
40656         HAVE_NEWLOCALE, HAVE_FREELOCALE, REPLACE_NEWLOCALE, REPLACE_FREELOCALE.
40657         * modules/localename (Files): Add intlsolaris.m4.
40658         (Depends-on): Add 'locale'.
40659         (configure.ac): Invoke gl_LOCALE_MODULE_INDICATOR.
40660         * tests/test-locale-c++.cc (newlocale, freelocale): Prepare for checking
40661         the signatures.
40663 2018-10-14  Akim Demaille  <akim@lrde.epita.fr>
40665         timevar: use gethrxtime to get wall clock time
40666         clock_gettime is not portable.  gethrxtime takes the best available
40667         option to get the wall clock time, including clock_gettime (monotonic
40668         clock), and gettime (non monotonic).
40669         Also, using xtime_t instead of float preserves the precision.
40670         Suggested by Bruno Haible.
40671         * lib/xtime.h (xtime_make): Handle overflows of nanoseconds.
40672         * modules/timevar (Depends-on): We need gethrxtime.
40673         We no longer use times().
40674         (Link): Update.
40675         * lib/timevar.h (timevar_time_def): Use xtime_t.
40676         * lib/timevar.c (set_to_current_time): Use gethrxtime.
40677         (timevar_print): Instead of checking whether the timings themselves
40678         are large enough for the timevar to be printed, check the percentages.
40680 2018-10-14  Bruno Haible  <bruno@clisp.org>
40682         wcsnrtombs: Work around Solaris 11.4 bug.
40683         * m4/wcsnrtombs.m4 (gl_WCSNRTOMBS_WORKS_IN_TRADITIONAL_LOCALE): New
40684         macro.
40685         (gl_FUNC_WCSNRTOMBS): Invoke it.
40686         * doc/posix-functions/wcsnrtombs.texi: Mention the Solaris bug.
40688 2018-10-14  Bruno Haible  <bruno@clisp.org>
40690         mbsnrtowcs: Work around Solaris 11.4 bug.
40691         * m4/mbsnrtowcs.m4 (gl_MBSNRTOWCS_WORKS_IN_TRADITIONAL_LOCALE): New
40692         macro.
40693         (gl_FUNC_MBSNRTOWCS): Invoke it.
40694         * doc/posix-functions/mbsnrtowcs.texi: Mention the Solaris bug.
40696 2018-10-14  Bruno Haible  <bruno@clisp.org>
40698         doc: Update for Solaris 11.4.
40699         * doc/**/*.texi: For bugs that exist in both Solaris 11.3 and 11.4,
40700         mention Solaris 11.4.
40701         * m4/printf.m4: Update comments about Solaris.
40702         * m4/log.m4: Likewise.
40703         * m4/log10.m4: Likewise.
40704         * m4/logb.m4: Likewise.
40705         * m4/logbf.m4: Likewise.
40706         * m4/logbl.m4: Likewise.
40707         * m4/rename.m4: Likewise.
40708         * m4/wcrtomb.m4: Likewise.
40709         * m4/hostent.m4: Likewise.
40710         * m4/servent.m4: Likewise.
40712 2018-10-14  Bruno Haible  <bruno@clisp.org>
40714         floor, ceil, trunc, truncf, truncl: Defeat GCC optimizations.
40715         * m4/floor.m4 (gl_FUNC_FLOOR_LIBS): Use 'floor' also through a function
40716         pointer.
40717         * m4/ceil.m4 (gl_FUNC_CEIL_LIBS): Use 'ceil' also through a function
40718         pointer.
40719         * m4/trunc.m4 (gl_FUNC_TRUNC): Use 'trunc' also through a function
40720         pointer.
40721         * m4/truncf.m4 (gl_FUNC_TRUNCF): Use 'truncf' also through a function
40722         pointer.
40723         * m4/truncl.m4 (gl_FUNC_TRUNCL): Use 'truncl' also through a function
40724         pointer.
40726 2018-10-13  Akim Demaille  <akim@lrde.epita.fr>
40728         bootstrap: fix wget command for po files.
40729         * build-aux/bootstrap (po_download_command_format): Fix comment,
40730         and adjust callers.
40732 2018-10-13  Akim Demaille  <akim@lrde.epita.fr>
40734         timevar: improve the output format
40735         Suggested by Bruno Haible.
40736         See https://lists.gnu.org/archive/html/bug-gnulib/2018-10/msg00040.html.
40737         * lib/timevar.c (timevar_print): Use %7.3f for usr/sys and %11.6f for
40738         wall, since its resolution is much higher.
40740 2018-10-13  Akim Demaille  <akim@lrde.epita.fr>
40742         timevar: expect that getrusage is available.
40743         Don't keep both times and getrusage as backend: both are guaranteed by
40744         gnulib, a single one suffices.  Using getrusage is open to possibly
40745         tracking other types of resources in the future.
40746         * modules/timevar (Depends-on): Add getrusage.
40747         (configure.ac): Remove gl_TIMEVAR.
40748         (Files): Remove m4/timevar.m4.
40749         * m4/timevar.m4: Remove, rely on gnulib for getrusage.
40750         * lib/timevar.h (timevar_enabled): Clarify documentation.
40751         * lib/timevar.c: Remove all the code about times.
40752         Remove all the CPP guards about getrusage: expect it to be present
40753         (courtesy of gnulib).
40755 2018-10-12  Bruno Haible  <bruno@clisp.org>
40757         mountlist: Improve support for Solaris in 64-bit mode.
40758         Reported by David Wood <David.Wood@deshaw.com> in
40759         <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=6816>.
40760         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): On Solaris 8 or
40761         newer, define MOUNTED_GETEXTMNTENT instead of MOUNTED_GETMNTENT2.
40762         * lib/mountlist.c: Add code for MOUNTED_GETEXTMNTENT case.
40764 2018-10-12  Bruno Haible  <bruno@clisp.org>
40766         mountlist: Add support for Minix.
40767         Reported by Assaf Gordon in
40768         <https://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00074.html>.
40769         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use
40770         AC_CHECK_FUNCS to check for 'getmntinfo'.
40771         * lib/mountlist.c: Update comments.
40773 2018-10-12  Bruno Haible  <bruno@clisp.org>
40775         Make better use of Autoconf.
40776         * m4/environ.m4: Use AC_CACHE_CHECK where possible.
40777         * m4/manywarnings.m4: Likewise.
40778         * m4/manywarnings-c++.m4: Likewise.
40779         * m4/socklen.m4: Likewise.
40780         * m4/sockpfaf.m4: Likewise.
40781         * m4/stdarg.m4: Likewise.
40782         * m4/visibility.m4: Likewise.
40783         * m4/fsusage.m4: Use AC_CACHE_CHECK where possible. Modernize
40784         indentation.
40785         * m4/ls-mntd-fs.m4: Likewise.
40787 2018-10-11  Bruno Haible  <bruno@clisp.org>
40789         mountlist: Modernize platform lists.
40790         * m4/ls-mntd-fs.m4: Clarify which MOUNTED_* symbol applies to which
40791         platforms, deemphasizing the obsolete ones.
40792         * lib/mountlist.c: Likewise.
40794 2018-10-11  Bruno Haible  <bruno@clisp.org>
40796         getprogname: Add support for 32-bit programs on HP-UX.
40797         * lib/getprogname.c (getprogname) [HP-UX]: If pstat_getproc fails,
40798         try the similar functions 32-bit programs on 64-bit HP-UX.
40800 2018-10-11  Bruno Haible  <bruno@clisp.org>
40802         getprogname: Work around program name truncation when possible.
40803         * lib/getprogname.c (getprogname) [HP-UX]: When pst_ucomm is truncated,
40804         possibly use pst_cmd instead.
40806 2018-10-08  Paul Eggert  <eggert@cs.ucla.edu>
40808         fts: cleanup after FTS_NOATIME removal
40809         * lib/fts_.h (FTS_VERBATIM, FTS_OPTIONMASK, FTS_NAMEONLY)
40810         (FTS_STOP): Shrink to minimal values.  We don’t need to
40811         worry about binary compatibility in Gnulib, and the old way
40812         of doing things had a hole in the user options that caused
40813         FTS_OPTIONMASK to not work as desired.
40815 2018-10-08  Bernhard Voelker  <mail@bernhard-voelker.de>
40817         fts: remove FTS_NOATIME
40818         This reverts commit da4d6974013c822af1498941e32db774b2031765.
40819         We cannot guarantee that O_NOATIME works: e.g. openat fails
40820         with EPERM if the effective user ID of the caller does not match
40821         the owner of the file and the caller is not privileged.
40822         Downstream findutils has never picked up FTS_NOATIME.  Discussed at
40823         <https://lists.gnu.org/r/bug-gnulib/2018-09/msg00122.html>.
40824         * lib/fts_.h (FTS_NOATIME): Remove bit flag.
40825         (FTS_OPTIONMASK): Adjust.
40826         * lib/fts.c (diropen, fts_open, fts_build): Likewise.
40827         (fd_ring_check): Likewise.
40829 2018-10-08  Bruno Haible  <bruno@clisp.org>
40831         csharpcomp*, csharpexec*: Remove support for pnet.
40832         * m4/csharpcomp.m4 (gt_CSHARPCOMP): Don't test for cscc. Don't set
40833         HAVE_CSCC.
40834         * build-aux/csharpcomp.sh.in (options_cscc): Remove variable.
40835         Don't test HAVE_CSCC.
40836         * lib/csharpcomp.c (compile_csharp_using_pnet): Remove function.
40837         (compile_csharp_class): Don't invoke it.
40838         * m4/csharpexec.m4 (gt_CSHARPEXEC): Don't test for ilrun. Don't set
40839         HAVE_ILRUN.
40840         * build-aux/csharpexec.sh.in (options_ilrun): Remove variable.
40841         Don't test HAVE_ILRUN.
40842         * lib/csharpexec.c (execute_csharp_using_pnet): Remove function.
40843         (execute_csharp_program): Don't invoke it.
40844         * m4/csharp.m4 (gt_CSHARP_CHOICE): Don't recognize --enable-csharp=pnet
40845         any more.
40847 2018-10-07  Andreas Henriksson  <andreas@fatal.se>  (tiny change)
40849         renameatu: prefer renameat2 to syscall
40850         * lib/renameatu.c (renameatu) [HAVE_RENAMEAT2]:
40851         Use renameat2 instead of syscall (Bug#32796).
40852         * m4/renameat.m4 (gl_FUNC_RENAMEAT): Check for renameat2.
40854 2018-10-07  Benno Schulenberg  <bensberg@telfort.nl>
40856         bootstrap, gnulib-tool: use https instead of insecure rsync
40857         * build-aux/bootstrap (download_po_files, po_download_command_format):
40858         Don't try using rsync; always use wget over https to fetch PO files.
40859         * gnulib-tool (func_import): Likewise.
40860         * pygnulib/GLImport.py (GLImport.execute): Likewise.
40862 2018-10-07  Benno Schulenberg  <bensberg@telfort.nl>
40864         bootstrap, gnulib-tool: correct the translations wget command
40865         * build-aux/bootstrap (po_download_command_format2): Restrict
40866         recursion to a single level.
40867         * gnulib-tool (func_import): Likewise.
40868         * pygnulib/GLImport.py (GLImport.execute): Likewise.
40870 2018-10-07  Akim Demaille  <akim@lrde.epita.fr>
40872         doc: the gnulib snapshots are not maintained
40873         * doc/gnulib-intro.texi (Steady Development): Don't mention them.
40875 2018-10-07  Akim Demaille  <akim@lrde.epita.fr>
40877         timevar: add to lib_SOURCES
40878         * modules/timevar (lib_SOURCES): Add timevar.c and timevar.def.
40880 2018-10-07  Bruno Haible  <bruno@clisp.org>
40882         dirent: Update documentation.
40883         * doc/posix-headers/dirent.texi: The MSVC issue is fixed by Gnulib.
40885 2018-10-05  Bruno Haible  <bruno@clisp.org>
40887         strpbrk: Make it possible to namespace the defined symbol.
40888         * lib/strpbrk.c (strpbrk): Don't undefine outside of glibc.
40890 2018-10-05  Bruno Haible  <bruno@clisp.org>
40892         strcspn: Make it possible to namespace the defined symbol.
40893         * lib/strcspn.c (strcspn): Don't undefine outside of glibc.
40895 2018-10-05  Bruno Haible  <bruno@clisp.org>
40897         raise: Make it possible to namespace the defined symbol.
40898         * lib/raise.c (raise): Undefine only after the replacement function has
40899         been defined.
40900         (raise): Renamed from rpl_raise.
40901         (raise_nothrow): Move to the end of the compilation unit.
40903 2018-10-05  Bruno Haible  <bruno@clisp.org>
40905         memcmp: Make it possible to namespace the defined symbol.
40906         * lib/memcmp.c (memcmp): Don't undefine outside of glibc.
40908 2018-10-05  Bruno Haible  <bruno@clisp.org>
40910         explicit_bzero: Make it possible to namespace the defined symbol.
40911         * lib/explicit_bzero.c (explicit_bzero): Don't undefine outside of
40912         glibc.
40914 2018-10-05  Bruno Haible  <bruno@clisp.org>
40916         mkdir-p: Depend on 'mkdir'.
40917         * modules/mkdir-p (Depends-on): Add 'mkdir'.
40919 2018-10-05  Bruno Haible  <bruno@clisp.org>
40921         tempname: Depend on 'mkdir'.
40922         Reported by Maarten Bosmans <mkbosmans@gmail.com>
40923         at <https://savannah.gnu.org/bugs/?33379>.
40924         * modules/tempname (Depends-on): Add 'mkdir'.
40926 2018-10-05  Akim Demaille  <akim@lrde.epita.fr>
40928         timevar: rely on gnulib modules for time portability.
40929         * modules/timevar (Depends-on): Add sys_time, sys_times, and times.
40930         * m4/timevar.m4: Don't check for clock_t and struct tms,
40931         guaranteed by gnulib.
40932         * lib/timevar.h: Use extern "C" protection.
40933         Include <stdio.h> for FILE.
40934         * lib/timevar.c: Include sys/time.h, sys/times.h unconditionally,
40935         they are guaranteed by gnulib.
40936         Remove uses of clock as (now useless) fallback.
40938 2018-10-04  Bruno Haible  <bruno@clisp.org>
40940         sh-filename: New module.
40941         * m4/sh-filename.m4: New file.
40942         * modules/sh-filename: New file.
40943         * lib/spawni.c (_PATH_BSHELL): Use BOURNE_SHELL instead of hardcoding
40944         "/bin/sh".
40945         * tests/test-posix_spawn1.c (main): Likewise.
40946         * tests/test-posix_spawn2.c (main): Likewise.
40947         * lib/javacomp.c (compile_using_envjavac, is_envjavac_gcj,
40948         is_envjavac_gcj43): Likewise.
40949         * lib/javaexec.c (execute_java_class): Likewise.
40950         * modules/posix_spawn-internal (Depends-on): Add sh-filename.
40951         * modules/posix_spawnp-tests (Depends-on): Likewise.
40952         * modules/javacomp (Depends-on): Likewise.
40953         * modules/javaexec (Depends-on): Likewise.
40955 2018-10-04  Bruno Haible  <bruno@clisp.org>
40957         spawn-pipe tests: Avoid test failure on native Windows.
40958         * tests/test-spawn-pipe-child.c (main): On native Windows, don't expect
40959         that fd 2 is closed.
40961 2018-10-04  Bruno Haible  <bruno@clisp.org>
40963         fcntl: Make it possible to namespace the defined symbol.
40964         * lib/fcntl.c (fcntl): Undefine only after the replacement function has
40965         been defined.
40966         (fcntl): Renamed from rpl_fcntl.
40967         (rpl_fcntl_DUPFD, rpl_fcntl_DUPFD_CLOEXEC): New functions, extracted
40968         from fcntl.
40969         (klibc_fcntl): Move to the end of the compilation unit.
40971 2018-10-02  Bruno Haible  <bruno@clisp.org>
40973         vasnprintf tests: Avoid test failure on HP-UX/hppa and IRIX.
40974         * tests/test-vasnprintf.c (test_function): Change the test added on
40975         2018-09-23 to check only the 18 most significant digits.
40977         vasnprintf tests: Avoid test failure on Cygwin.
40978         * tests/test-vasnprintf.c (test_function): Change the test added on
40979         2018-09-23 to check only the 42 most significant digits.
40981 2018-10-01  Bruno Haible  <bruno@clisp.org>
40983         mkostemp, mkostemps: Update documentation.
40984         * doc/glibc-functions/mkostemp.texi: Mention the Mac OS X issue.
40985         * doc/glibc-functions/mkostemps.texi: Likewise.
40987 2018-10-01  Tom Tromey  <tom@tromey.com>
40989         mkostemp, mkostemps: Fix compilation error in C++ mode on Mac OS X.
40990         * lib/stdlib.in.h: Include <unistd.h> for mkostemp and mkostemps
40991         on OS X.
40993 2018-09-30  Pádraig Brady  <P@draigBrady.com>
40995         hmac-*: refactor to remove repetitive code
40996         * lib/hmac.c: A new parameterized single implementation.
40997         * lib/hmac-md5.c: Define parameters and include implementation.
40998         * lib/hmac-sha1.c: Likewise.
40999         * lib/hmac-sha256.c: Likewise.
41000         * lib/hmac-sha512.c: Likewise.
41001         * modules/crypto/hmac-md5: Reference the new implementation file.
41002         * modules/crypto/hmac-sha1: Likewise.
41003         * modules/crypto/hmac-sha256: Likewise.
41004         * modules/crypto/hmac-sha512: Likewise.
41005         * tests/test-hmac-md5.c: Refactor common code to a single function.
41006         * tests/test-hmac-sha1.c: Likewise.
41007         * tests/test-hmac-sha256.c: Likewise.
41008         * tests/test-hmac-sha512.c: Likewise.
41010 2018-09-30  Zhang Qing  <zhangqingl@126.com>
41012         hmac-sha512: fix hash for keys > blocksize (128 bytes)
41013         * lib/hmac-sha512.c (hmac_sha512): Set the computed/shortened
41014         key length to that output by sha512, not the blocksize.
41015         Otherwise uninitialized data from the stack
41016         is used when computing the hash.
41017         * tests/test-hmac-sha512.c: Add a shortened key test case.
41018         Reported at https://github.com/coreutils/gnulib/pull/5
41020 2018-09-30  Bruno Haible  <bruno@clisp.org>
41022         vasnprintf: Avoid warnings from GCC's -Wsign-compare.
41023         Reported by Bjarni Ingi Gislason <bjarniig@rhi.hi.is> in
41024         <https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00105.html>.
41025         * lib/vasnprintf.c (VASNPRINTF): Cast 'count' from 'int' to
41026         'unsigned int' before comparison with an unsigned value.
41028 2018-09-30  Bruno Haible  <bruno@clisp.org>
41030         grantpt: Remove unnecessary dependency.
41031         * modules/grantpt (Depends-on): Remove 'builtin-expect'.
41033 2018-09-30  Bruno Haible  <bruno@clisp.org>
41035         timevar: Small tweaks.
41036         * lib/timevar.h: Fix comments. Add parameter names to function
41037         declarations.
41038         * lib/timevar.c: Include timevar.h immediately after config.h.
41039         * lib/timevar.def: Fix comments.
41040         * modules/timevar (Maintainer): List Akim Demaille.
41042 2018-09-30  Bruno Haible  <bruno@clisp.org>
41044         timevar: Include documentation in gnulib manual.
41045         * doc/timevar.texi: Change node and section name to 'Profiling of
41046         program phases'.
41047         In the code snippets, tweak the #includes and use GNU coding style.
41048         * doc/gnulib.texi: Include timevar.texi.
41050 2018-09-27  Akim Demaille  <akim@lrde.epita.fr>
41052         timevar: import from Bison.
41053         * m4/timevar.m4, modules/timevar, lib/timevar.h, lib/timevar.c:
41054         New files.
41055         * lib/timevar.def: New file.
41056         * doc/timevar.texi: New file.
41058 2018-09-26  Bruno Haible  <bruno@clisp.org>
41060         javacomp-script, javacomp: Add preliminary support for Java 12..17.
41061         * m4/javacomp.m4 (gt_JAVACOMP): Treat Java versions 12..17 like 11.
41062         * lib/javacomp.c (default_target_version): Likewise.
41064 2018-09-26  Bruno Haible  <bruno@clisp.org>
41066         javacomp-script, javacomp: Add support for Java 11.
41067         * m4/javacomp.m4 (gt_JAVACOMP): Accept source-version 11 and
41068         target-version 11.
41069         * lib/javaversion.h: Update comments.
41070         * lib/javacomp.c (default_target_version, SOURCE_VERSION_BOUND,
41071         source_version_index, get_goodcode_snippet, get_failcode_snippet,
41072         TARGET_VERSION_BOUND, target_version_index,
41073         corresponding_classfile_version): Accept source_version 11 and
41074         target_version 11.
41075         * lib/javacomp.h: Update comments accordingly.
41077 2018-09-23  Bruno Haible  <bruno@clisp.org>
41079         vasnprintf: Fix heap memory overrun bug.
41080         Reported by Ben Pfaff <blp@cs.stanford.edu> in
41081         <https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00107.html>.
41082         * lib/vasnprintf.c (convert_to_decimal): Allocate one more byte of
41083         memory.
41084         * tests/test-vasnprintf.c (test_function): Add another test.
41086 2018-09-19  Paul Eggert  <eggert@cs.ucla.edu>
41088         maint: mktime.c now shared with glibc
41089         * config/srclist.txt: intprops.h, timegm.c and mktime.c
41090         are now the same in Gnulib and glibc.
41092         mktime: fix _LIBC typo
41093         * lib/mktime.c (mktime): Fix typo (misspelled "_LIBC").
41095 2018-09-19  Norihiro Tanaka  <noritnk@kcn.ne.jp>
41097         dfa: optimization for state merge
41098         * lib/dfa.c (merge2): New function.
41099         (merge_nfa_state): Use it.
41101 2018-09-18  Jim Meyering  <meyering@fb.com>
41103         dfa: trivial comment fix: s/is/if/
41104         * lib/dfa.c (maybe_disable_superset_dfa): Fix comment typo.
41106 2018-09-18  Paul Eggert  <eggert@cs.ucla.edu>
41108         dfa: use more-informative function name
41109         * lib/dfa.c (maybe_disable_superset_dfa):
41110         Rename from dfautf8noss.  Use change.
41112         dfa: tweak allocation performance
41113         * lib/dfa.c (merge_nfa_state, dfaoptimize):
41114         Prefer ptrdiff_t for indexes some more.
41115         Use char for flags, as it’s wide enough.
41116         Allocate queue and flags together, with one malloc call.
41117         No need to use xnmalloc since the multiplication and
41118         addition cannot overflow (it’s already been checked by
41119         earlier allocation).  Prefer memset to open-coding.
41121         dfa: prune states as we go
41122         * lib/dfa.c (prune): Remove.
41123         dfa: reorder enum for efficiency
41124         (merge_nfa_state): Prune as we go instead of at the end.
41125         Prefer ptrdiff_t for indexes, as this helps the compiler a bit.
41127         * lib/dfa.c (END): Now -1 again.  Reorder other elements
41128         of the enumeration to make it easier for GCC to generate
41129         efficient code by using fewer comparisons to check for
41130         ranges of values.
41131         (atom): Take advantage of the reordering.
41133 2018-09-18  Norihiro Tanaka  <noritnk@kcn.ne.jp>
41135         dfa: optimize alternation in NFA
41136         Even when similar states exist in alternation, the DFA treats them
41137         as separate items, which may complicate the transition in NFA and
41138         cause slowdown.  This change assembles the states into one.  For
41139         example, ab|ac is changed into a(b|c).  This change speeds-up
41140         matching for many branched patterns.  For example, grep speeds up
41141         more than 30× in:
41143           seq 10000 | sed 's/$/ abcdefghijklmnopqrstuvwxyz/; s/$/./' >in
41144           time -p env LC_ALL=C grep -vf in in
41146         * lib/dfa.c (prune): New function.
41147         (merge_nfa_state): New function.  It merges similar NFA states.
41148         (dfaoptimize): New function.  It seeks merged and removed nodes.
41149         (dfaanalyze): Call new function.
41150         (dfautf8noss): Change name from dfaoptimize because of addition of new
41151         function.
41152         (dfacomp): Update caller.
41154         dfa: simplify initial state
41155         Simplifying the initial state enables easier optimization of the NFA.
41156         * lib/dfa.c (enum token): Add new element BEG.
41157         (prtok): Adjust due to adding element BEG.
41158         (dfaparse): Put BEG at a head of tokens.
41159         (state_index): Adjust due to adding element BEG.
41160         (dfaanalyze): Concatenate BEG to other tokens, and simplify to
41161         build initial state.
41162         (dfamust): Adjust due to adding element BEG.  DFAMUST ignores it.
41164 2018-09-18  Bruno Haible  <bruno@clisp.org>
41166         file-has-acl: Fix test failure on Cygwin 2.9.
41167         * m4/acl.m4 (gl_FUNC_ACL): Update comments regarding Cygwin.
41168         * lib/acl-internal.h: Likewise.
41169         (HAVE_ACL_EXTENDED_FILE): Undefine on Cygwin.
41170         * lib/acl-internal.c: Update comments regarding Cygwin.
41171         * lib/acl_entries.c: Likewise.
41172         * lib/file-has-acl.c: Likewise.
41173         (file_has_acl): For Cygwin, use a different way to determine whether
41174         the "default" ACL of a directory is nontrivial.
41175         * lib/get-permissions.c: Update comments regarding Cygwin.
41176         * lib/set-permissions.c: Likewise.
41178 2018-09-18  Bruno Haible  <bruno@clisp.org>
41180         stat-time tests: Fix test failure on Cygwin.
41181         * tests/nap.h (nap_get_stat): Treat Cygwin like native Windows.
41183 2018-09-18  Paul Eggert  <eggert@cs.ucla.edu>
41185         doc: OS X 10.11 lacked ns time functions
41186         According to <https://github.com/zeromq/libzmq/issues/2175>,
41187         nanosecond-resolution timestamp functions were introduced
41188         in macOS 10.12, so document the last version (OS X 10.11)
41189         where they were absent.
41191         gettime: nanotime never existed
41192         Problem reported by Bruno Haible in:
41193         https://lists.gnu.org/r/bug-gnulib/2018-09/msg00082.html
41194         * lib/gettime.c (gettime) [HAVE_NANOTIME]: Remove unused code.
41195         * m4/gettime.m4 (gl_GETTIME): Don’t check for nanotime.
41197 2018-09-18  Bruno Haible  <bruno@clisp.org>
41199         doc: Update statement about target platforms.
41200         Reported by Simon Sobisch.
41201         * doc/gnulib-intro.texi (Target Platforms): Update. Mention
41202         restrictions on MSVC versions.
41204 2018-09-18  Bruno Haible  <bruno@clisp.org>
41206         posix_spawn tests: Fix link error on 64-bit Cygwin.
41207         * tests/test-posix_spawn1.c (environ): Remove declaration.
41208         * tests/test-posix_spawn2.c (environ): Likewise.
41209         * tests/test-posix_spawn3.c (environ): Likewise.
41210         * tests/test-posix_spawn4.c (environ): Likewise.
41211         * modules/posix_spawn-tests (Depends-on): Add 'environ'.
41212         * modules/posix_spawnp-tests (Depends-on): Likewise.
41214 2018-09-16  Paul Eggert  <eggert@cs.ucla.edu>
41216         timespec: new function current_timespec
41217         * lib/gettime.c (gettime): Prefer clock_gettime to nanotime,
41218         and don’t worry about it failing on a CLOCK_REALTIME arg.
41219         POSIX requires it to succeed and I don’t know of any
41220         counterexamples where the fallbacks would work.
41221         (current_timespec): New function, taken from Emacs.  It is more
41222         convenient than gettime, and can help register allocation.
41223         * lib/timespec.h: Include arg-nonnull.h.
41224         (current_timespec): New declaration.
41225         (gettime, settime): Declare args to be nonnull.
41226         * modules/timespec (Depends-on): Add snippet/arg-nonnull.
41228 2018-09-16  Bruno Haible  <bruno@clisp.org>
41230         setlocale: Improve locale handling on macOS 10.12 or newer.
41231         * lib/setlocale.c: Include header files for CoreFoundation. Declare
41232         gl_locale_name_canonicalize.
41233         (libintl_setlocale): Try harder to set a locale for categories LC_CTYPE
41234         and LC_MESSAGES.
41235         * m4/setlocale.m4 (gl_PREREQ_SETLOCALE): Add comment.
41237 2018-09-16  Bruno Haible  <bruno@clisp.org>
41239         Update list of locale names with scripts on macOS.
41240         * lib/localename.c (gl_locale_name_canonicalize): Update tables to
41241         match Mac OS X 10.13 and recent glibc.
41243 2018-09-16  Bruno Haible  <bruno@clisp.org>
41245         gettext: Use newer macOS APIs when possible.
41246         * m4/intlmacosx.m4 (gt_INTL_MACOSX): Check for
41247         CFLocaleCopyPreferredLanguages.
41249 2018-09-16  Bruno Haible  <bruno@clisp.org>
41251         localename: Revisit macOS specific code.
41252         * lib/localename.c (gl_locale_name_default): Reduce code duplication.
41253         Fix comments about Mac OS X versions.
41255 2018-09-15  Bruno Haible  <bruno@clisp.org>
41257         setlocale: Improve support for locales not supported by libc.
41258         Reported by Dapeng Gao <peter@dpgao.cc> at
41259         <https://savannah.gnu.org/bugs/?54479>.
41260         * gettext-runtime/intl/setlocale.c: Include <stdio.h>.
41261         (libintl_setlocale): Use a more error-tolerant strategy when the locale
41262         to be set is not supported by libc: Emit warnings instead of failing.
41264 2018-09-15  Bruno Haible  <bruno@clisp.org>
41266         strstr, strcasestr: Add workaround against glibc-2.28 bug.
41267         Reported by Michael Brunnbauer via Siddhesh Poyarekar and Eric Blake.
41268         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): Set
41269         gl_cv_func_strstr_works_always to 'no' on glibc 2.28.
41270         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Set
41271         gl_cv_func_strcasestr_works_always to 'no' on glibc 2.28.
41272         * doc/posix-functions/strstr.texi: Document the glibc 2.28 bug.
41273         * doc/glibc-functions/strcasestr.texi: Likewise.
41275 2018-09-14  Bruno Haible  <bruno@clisp.org>
41277         doc: Fix bottom of top-level page.
41278         Reported by Akim Demaille <akim.demaille@gmail.com> in
41279         <https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00072.html>.
41280         * doc/pastposix-functions/index.texi: Rename node to '_index' in HTML
41281         mode.
41282         * doc/gnulib.texi (Legacy Function Substitutes): Update menu
41283         accordingly.
41285 2018-09-12  Bruno Haible  <bruno@clisp.org>
41287         Add test case from a recent glibc bug.
41288         * tests/test-strstr.c (main): Add test of long needle.
41289         * tests/test-strcasestr.c (main): Likewise.
41290         * tests/test-c-strstr.c (main): Likewise.
41291         * tests/test-c-strcasestr.c (main): Likewise.
41292         * tests/test-memmem.c (main): Likewise.
41294 2018-09-12  Bruno Haible  <bruno@clisp.org>
41296         Apply Eric Blake's improvements from 2011-02-25 to more tests.
41297         * tests/test-c-strstr.c (main): Add the same tests here as well.
41299 2018-09-12  Bruno Haible  <bruno@clisp.org>
41301         Apply Jim Meyering's fix from 2015-01-11 to more tests.
41302         * tests/test-memmem.c (main): Free haystack.
41303         * tests/test-strcasestr.c (main): Likewise.
41304         * tests/test-c-strcasestr.c (main): Likewise.
41306 2018-09-11  Paul Eggert  <eggert@cs.ucla.edu>
41308         xstrtol: fix missing-TYPE_SIGNED typo
41309         * lib/xstrtol.c (TYPE_SIGNED): New macro, duplicating intprops.h.
41311 2018-09-10  Paul Eggert  <eggert@cs.ucla.edu>
41313         timespec: fix resolution confusion
41314         In normal usage, clock resolution is given in seconds, but the
41315         code was mistakenly using inverse seconds and calling it
41316         “resolution”.  Fix this, partly by renaming two identifiers.
41317         The old names will be kept for a bit, to ease transition.
41318         * lib/timespec.h (TIMESPEC_HZ, LOG10_TIMESPEC_HZ):
41319         New constants, replacing TIMESPEC_RESOLUTION and
41320         LOG10_TIMESPEC_RESOLUTION, which are now obsolescent.
41321         All uses changed.
41323 2018-09-09  Paul Eggert  <eggert@cs.ucla.edu>
41325         mktime: simplify in prep for glibc merge
41326         * lib/mktime.c, lib/timegm.c [_LIBC]:
41327         Include mktime-internal.h (a small file just for glibc)
41328         instead of using a typedef.
41330 2018-09-07  Paul Eggert  <eggert@cs.ucla.edu>
41332         intprops: minor clarification of code
41333         * lib/intprops.h (_GL_BINARY_OP_OVERFLOW):
41334         Use _GL_INT_CONVERT rather than reinventing it.
41336 2018-09-07  Bruno Haible  <bruno@clisp.org>
41338         Fix a comment.
41339         * tests/test-posix_spawn3.c (parent_main): Fix typo in comment.
41341 2018-09-07  Bruno Haible  <bruno@clisp.org>
41343         posix_spawn_file_actions_addchdir: Add tests.
41344         * tests/test-posix_spawn_file_actions_addchdir.c: New file.
41345         * tests/test-posix_spawn4.c: New file.
41346         * modules/posix_spawn_file_actions_addchdir-tests: New file.
41348 2018-09-07  Bruno Haible  <bruno@clisp.org>
41350         posix_spawn_file_actions_addchdir: New module.
41351         Suggested by Eric Blake in
41352         <https://lists.gnu.org/archive/html/bug-findutils/2018-09/msg00007.html>.
41353         * lib/spawn.in.h (posix_spawn_file_actions_addchdir): New declaration.
41354         * lib/spawn_int.h (struct __spawn_action): Add tag 'spawn_do_chdir' and
41355         union member 'chdir_action'.
41356         * lib/spawn_faction_addchdir.c: New file.
41357         * lib/spawni.c (__spawni): Implement the spawn_do_chdir action.
41358         * lib/spawn_faction_addclose.c: Test REPLACE_POSIX_SPAWN instead of
41359         HAVE_WORKING_POSIX_SPAWN.
41360         * lib/spawn_faction_adddup2.c: Likewise.
41361         * lib/spawn_faction_addopen.c: Likewise.
41362         * m4/posix_spawn_faction_addchdir.m4: New file.
41363         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Test whether module
41364         'posix_spawn_file_actions_addchdir' is present and whether
41365         posix_spawn_file_actions_addchdir_np exists. Define REPLACE_POSIX_SPAWN
41366         instead of HAVE_WORKING_POSIX_SPAWN.
41367         * m4/spawn_h.m4 (gl_SPAWN_H): Test whether
41368         posix_spawn_file_actions_addchdir is declared.
41369         (gl_SPAWN_H_DEFAULTS): Initialize
41370         GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR,
41371         HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR,
41372         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR.
41373         * modules/spawn (Makefile.am): Substitute
41374         GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR,
41375         HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR,
41376         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR.
41377         * modules/posix_spawn_file_actions_addchdir: New file.
41378         * modules/posix_spawn_file_actions_addclose (Depends-on,
41379         configure.ac): Test also REPLACE_POSIX_SPAWN.
41380         * modules/posix_spawn_file_actions_adddup2 (Depends-on,
41381         configure.ac): Likewise.
41382         * modules/posix_spawn_file_actions_addopen (Depends-on,
41383         configure.ac): Likewise.
41384         * tests/test-spawn-c++.cc (posix_spawn_file_actions_addchdir): Check
41385         signature.
41386         * doc/posix-functions/posix_spawn.texi: Mention the new module.
41387         * doc/posix-functions/posix_spawnp.texi: Likewise.
41389 2018-09-06  Bruno Haible  <bruno@clisp.org>
41391         stddef: Override max_align_t on NetBSD 8.0/x86.
41392         * m4/stddef_h.m4 (gl_STDDEF_H): When testing for max_align_t, test also
41393         the value of __alignof__ (max_align_t).
41394         * doc/posix-headers/stddef.texi: Mention the issue.
41396 2018-09-06  Bruno Haible  <bruno@clisp.org>
41398         fcntl: Fix F_DUPFD_CLOEXEC behaviour on Haiku.
41399         * lib/fcntl.c (rpl_fcntl): For F_DUPFD_CLOEXEC, don't even try the
41400         system fcntl.
41401         * doc/posix-functions/fcntl.texi: Document the issue.
41403 2018-09-06  Bruno Haible  <bruno@clisp.org>
41405         count-trailing-zeros tests: Rely on limits-h module.
41406         * tests/test-count-trailing-zeros.c (ULLONG_MAX): Remove fallback
41407         definition.
41408         * modules/count-trailing-zeros-tests (Depends-on): Add 'limits-h'.
41410 2018-09-06  Bruno Haible  <bruno@clisp.org>
41412         count-leading-zeros tests: Rely on limits-h module.
41413         * tests/test-count-leading-zeros.c (ULLONG_MAX): Remove fallback
41414         definition.
41415         * modules/count-leading-zeros-tests (Depends-on): Add 'limits-h'.
41417 2018-09-06  Bruno Haible  <bruno@clisp.org>
41419         count-one-bits tests: Rely on limits-h module.
41420         * tests/test-count-one-bits.c (ULLONG_MAX): Remove fallback definition.
41421         * modules/count-one-bits-tests (Depends-on): Add 'limits-h'.
41423 2018-09-06  Bruno Haible  <bruno@clisp.org>
41425         xstrtoll: Rely on limits-h module.
41426         * lib/xstrtol.c: Don't include intprops.h.
41427         (ULLONG_MAX, LLONG_MAX, LLONG_MIN): Remove fallback definitions.
41428         * modules/xstrtol (Depends-on): Remove 'intprops'.
41429         * modules/xstrtoll (Depends-on): Add 'limits-h'.
41431 2018-09-06  Bruno Haible  <bruno@clisp.org>
41433         strtoll, strtoull: Rely on limits-h module.
41434         * lib/strtol.c (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove macros.
41435         (ULLONG_MAX, LLONG_MAX, LLONG_MIN): Remove fallback definitions.
41436         * modules/strtoll (Depends-on): Add limits-h.
41437         * modules/strtoull (Depends-on): Likewise.
41439 2018-09-06  Bruno Haible  <bruno@clisp.org>
41441         intprops tests: Fix compilation error with pre-C99 compiler.
41442         * tests/test-intprops.c (verify_stmt): New macro.
41443         (VERIFY, main): Use it.
41445 2018-09-06  Bruno Haible  <bruno@clisp.org>
41447         limits-h: Provide numerical limits macros.
41448         * lib/limits.in.h (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Define also for
41449         IRIX and for GCC.
41450         (WORD_BIT, LONG_BIT): Define.
41451         * m4/limits-h.m4 (gl_LIMITS_H): Set LIMITS_H to non-empty also when
41452         <limits.h> does not define LLONG_MAX or WORD_BIT.
41453         * tests/test-limits-h.c (TYPE_SIGNED, TYPE_WIDTH, TYPE_MINIMUM,
41454         TYPE_MAXIMUM): New macros, from intprops.h.
41455         Add tests for CHAR_BIT, WORD_BIT, LONG_BIT, <type>_MIN, and <type>_MAX.
41456         * doc/posix-headers/limits.texi: Document what the 'limits-h' module
41457         provides.
41459 2018-09-05  Bruno Haible  <bruno@clisp.org>
41461         fcntl: Don't access nonexistent optional argument.
41462         Reported by Frank Busse <f.busse@imperial.ac.uk> in
41463         <https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00018.html>.
41464         * lib/fcntl.c (rpl_fcntl): For actions that don't take an argument,
41465         don't consume an argument. For actions that take an 'int' argument,
41466         consume an 'int' argument.
41468 2018-09-05  Eric Blake  <eblake@redhat.com>
41470         doc: mention environ pitfall
41471         * doc/posix-functions/environ.texi (environ): Assigning NULL to
41472         environ is a glibc extension.
41474 2018-09-03  Bruno Haible  <bruno@clisp.org>
41476         gnulib-tool: Fix build order when $testsbase is a subdir of $sourcebase.
41477         Reported by Antoine Luong <antoine.luong@c-s.fr> in
41478         <https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00008.html>.
41479         * gnulib-tool (func_import): For the tests, set a dotfirst flag.
41480         (func_emit_lib_Makefile_am): Consider the dotfirst flag.
41481         (func_emit_tests_Makefile_am): Don't consider the dotfirst flag.
41483 2018-09-02  Paul Eggert  <eggert@cs.ucla.edu>
41485         mktime: fix unlikely race+overflow bug
41486         Problem reported by Alexandre Oliva in:
41487         https://sourceware.org/bugzilla/show_bug.cgi?id=16346
41488         * lib/mktime.c (__mktime_internal): Access *OFFSET only once,
41489         to avoid an unlikely race if the compiler delays a load and
41490         if this cascades into a signed integer overflow.
41492 2018-08-31  Paul Eggert  <eggert@cs.ucla.edu>
41494         mktime, timegm: simplify glibc time64_t
41495         * lib/mktime.c, lib/timegm.c (mktime_offset_t) [_LIBC]:
41496         Now long int, not time_t, since long int is the longstanding type
41497         for this in glibc and there is no need to change it even if time_t
41498         becomes 64 bits - even int would do, though this would be a change
41499         to the glibc generated code.  When this change is merged into
41500         glibc, it should simplify the time_t vs time64_t situation.
41502         mktime, timegm: simplify merge to glibc
41503         Move code around to make a merge to glibc easier to audit.
41504         This should not change behavior.
41505         * lib/mktime.c (NEED_MKTIME_INTERNAL, NEED_MKTIME_WINDOWS)
41506         (NEED_MKTIME_WORKING): Give default values to pacify -Wundef,
41507         which glibc uses.  Default NEED_MKTIME_WORKING to DEBUG_MKTIME, to
41508         simplify later conditionals; default the others to zero.  In uses
41509         of these conditionals, explicitly spell out how _LIBC affects
41510         things, so it’s easier to review from a glibc viewpoint.
41511         (my_tzset, __tzset) [!_LIBC]: New function and macro, to better
41512         compartmentalize tzset issues.  Move system-dependent tzsettish
41513         code here from mktime.
41514         (mktime): Move tzsettish code to my_tzset, and move
41515         localtime_offset to within mktime so that it doesn’t
41516         need a separate ifdef.
41518 2018-08-27  Paul Eggert  <eggert@cs.ucla.edu>
41520         intprops: avoid evaluation of some expressions
41521         This makes EXPR_SIGNED (e) easier to use, as it no longer
41522         evaluates the expression E.  Formerly, E was required to be free
41523         of side effects.
41524         * lib/intprops.h (_GL_INT_CONVERT, _GL_INT_NEGATE_CONVERT)
41525         (EXPR_SIGNED, TYPE_WIDTH, _GL_INT_MINIMUM, _GL_INT_MAXIMUM)
41526         (_GL_SIGNED_INT_MAXIMUM): Do not evaluate the expression arg.
41528 2018-08-23  Bruno Haible  <bruno@clisp.org>
41530         getcwd: Add cross-compilation guesses.
41531         Reported by Sergio Durigan Junior <sergiodj@redhat.com> in
41532         <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00130.html>.
41533         Based on a patch by Paul Eggert.
41534         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Add cross-compilation
41535         guesses for all GNU systems.
41537 2018-08-19  Bruno Haible  <bruno@clisp.org>
41539         glob-h: Formalize side effects from other modules.
41540         * m4/glob_h.m4 (gl_REPLACE_GLOB_H): New macro.
41541         * m4/glob.m4 (gl_GLOB): Invoke it.
41543         fnmatch-h: Formalize side effects from other modules.
41544         * m4/fnmatch_h.m4 (gl_REPLACE_FNMATCH_H): New macro.
41545         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Invoke it.
41547         limits-h: Formalize side effects from other modules.
41548         * m4/limits-h.m4 (gl_REPLACE_LIMITS_H): New macro.
41549         * m4/stdint.m4 (gl_STDINT_H): Invoke it.
41551 2018-08-19  Bruno Haible  <bruno@clisp.org>
41553         getpass: Move declaration to <unistd.h>.
41554         * lib/unistd.in.h (getpass): New declaration.
41555         * lib/getpass.h: Replace with a stub that just includes <unistd.h>.
41556         * m4/getpass.m4 (gl_FUNC_GETPASS): Declare through AC_DEFUN_ONCE.
41557         Require gl_UNISTD_H_DEFAULTS. Don't test whether getpass is declared.
41558         (gl_FUNC_GETPASS_GNU): Require gl_UNISTD_H_DEFAULTS and gl_FUNC_GETPASS.
41559         On glibc systems, don't set REPLACE_GETPASS to 1.
41560         * modules/getpass (Depends-on): Add 'unistd'.
41561         (configure.ac): Test also REPLACE_GETPASS. Define a module indicator.
41562         (Include): Specify <unistd.h> instead of "getpass.h".
41563         * modules/getpass-gnu (Depends-on): Merely depend on 'getpass'.
41564         (configure.ac): Sync with the configure.ac section of modules/getpass.
41565         (Include): Specify <unistd.h> instead of "getpass.h".
41566         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether getpass is declared.
41567         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GETPASS, HAVE_GETPASS,
41568         REPLACE_GETPASS.
41569         * modules/unistd (Makefile.am): Substitute GNULIB_GETPASS, HAVE_GETPASS,
41570         REPLACE_GETPASS.
41571         * tests/test-unistd-c++.cc: Test also the declaration of 'getpass'.
41572         * doc/glibc-functions/getpass.texi: A length limit exists also on uClibc
41573         and musl.
41574         * NEWS: Mention the change.
41576 2018-08-19  Bruno Haible  <bruno@clisp.org>
41578         glob: Fix over-optimization due to attribute __nonnull__.
41579         * lib/glob.c (_GL_ARG_NONNULL): Define to empty.
41581 2018-08-19  Bruno Haible  <bruno@clisp.org>
41583         glob: Fix another compilation error when glob.h is not replaced.
41584         Reported by Reuben Thomas <rrt@sc3d.org> in
41585         <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00112.html>.
41586         * m4/glob.m4 (gl_GLOB): Set GLOB_H to non-empty when needed.
41587         * m4/glob_h.m4 (gl_GLOB_H): Define through AC_DEFUN_ONCE.
41589 2018-08-18  Bruno Haible  <bruno@clisp.org>
41591         fnmatch: Avoid conflicting macro definitions of 'fnmatch'.
41592         Reported by Reuben Thomas <rrt@sc3d.org> in
41593         <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00108.html>.
41594         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH): Don't define 'fnmatch' as a macro
41595         in config.h.
41597 2018-08-18  Bruno Haible  <bruno@clisp.org>
41599         Avoid -Wcast-function-type warnings from casts after GetProcAddress.
41600         Reported by Andy Moreton <andrewjmoreton@gmail.com> in
41601         <https://lists.gnu.org/archive/html/emacs-devel/2018-08/msg00468.html>.
41602         Solution proposed by Eli Zaretskii.
41603         * lib/getaddrinfo.c (GetProcAddress): Cast result to 'void *' first.
41604         * lib/gettimeofday.c (GetProcAddress): Likewise.
41605         * lib/link.c (GetProcAddress): Likewise.
41606         * lib/physmem.c (GetProcAddress): Likewise.
41607         * lib/poll.c (GetProcAddress): Likewise.
41608         * lib/select.c (GetProcAddress): Likewise.
41609         * lib/stat-w32.c (GetProcAddress): Likewise.
41611 2018-08-18  Bruno Haible  <bruno@clisp.org>
41613         glob: Fix another compilation error when glob.h is not replaced.
41614         Reported and fix proposed by Reuben Thomas <rrt@sc3d.org> again.
41615         * lib/globfree.c: Include <libc-config.h>.
41617 2018-08-18  Bruno Haible  <bruno@clisp.org>
41619         glob: Fix compilation error when glob.h is not replaced.
41620         Reported and fix proposed by Reuben Thomas <rrt@sc3d.org> in
41621         <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00096.html>.
41622         * lib/glob_pattern_p.c: Include <libc-config.h>.
41623         * modules/glob (Depends-on): Add libc-config.
41625 2018-08-18  Bruno Haible  <bruno@clisp.org>
41627         scratch_buffer: Add tests.
41628         * tests/test-scratch-buffer.c: New file.
41629         * modules/scratch_buffer-tests: New file.
41631 2018-08-18  Bruno Haible  <bruno@clisp.org>
41633         scratch_buffer: Fix include file.
41634         Reported by Reuben Thomas <rrt@sc3d.org> in
41635         <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00082.html>.
41636         * lib/scratch_buffer.h: Include <libc-config.h> first. Add
41637         double-inclusion guard.
41639 2018-08-18  Bruno Haible  <bruno@clisp.org>
41641         glob-h: Revert Paul Eggert's revert.
41642         * m4/glob_h.m4: Revert to previous state.
41643         * modules/glob-h: Likewise.
41645 2018-08-18  Paul Eggert  <eggert@cs.ucla.edu>
41647         glob-h: always build glob.h
41648         This works around a problem reported by Reuben Thomas in:
41649         http://lists.gnu.org/r/bug-gnulib/2018-08/msg00079.html
41650         This workaround always builds glob.h, even on platforms that
41651         do not need it; perhaps this could be improved someday.
41652         * m4/glob_h.m4 (gl_GLOB_H): Do not set or use GLOB_H, since glob.h
41653         is always created now.
41654         * modules/glob-h (BUILT_SOURCES, glob.h): Always build glob.h.
41656 2018-08-13  Bruno Haible  <bruno@clisp.org>
41658         monetary: Simplify m4 code.
41659         * m4/monetary_h.m4 (gl_MONETARY_H): Define through AC_DEFUN_ONCE.
41660         (gl_MONETARY_H_BODY): Inline into gl_MONETARY_H. Remove macro.
41662 2018-08-13  Bruno Haible  <bruno@clisp.org>
41664         fnmatch, fnmatch-gnu: Fix compilation error on Mac OS X.
41665         Reported by Jeroen Meijer <jjgmeijer@gmail.com> in
41666         <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00046.html>
41667         and by Paul J. Lucas <paul@lucasmail.org> in
41668         <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00069.html>.
41669         * m4/fnmatch_h.m4 (gl_FNMATCH_H): Define through AC_DEFUN_ONCE.
41671 2018-08-11  Bruno Haible  <bruno@clisp.org>
41673         setlocale: Trivial simplification.
41674         * lib/setlocale.c (setlocale_unixlike): Remove redundant #if.
41676 2018-08-11  Paul Eggert  <eggert@cs.ucla.edu>
41678         verify: port 'assume' to traditional tools
41679         * lib/verify.h (assume): Port better to Oracle Studio 12.6
41680         and other tools that use /*NOTREACHED*/ comments.
41682 2018-08-10  Bruno Haible  <bruno@clisp.org>
41684         fnmatch-gnu: Fix compilation error in C++ namespace mode on Mac OS X.
41685         * modules/fnmatch-gnu (configure.ac): Invoke gl_MODULE_INDICATOR.
41686         * lib/fnmatch.in.h (fnmatch): Skip _GL_CXXALIASWARN if module
41687         'fnmatch-gnu' is in use.
41689 2018-08-07  Bruno Haible  <bruno@clisp.org>
41691         glob-h: Add tests.
41692         * tests/test-glob-h.c: New file, partially based on tests/test-glob.c.
41693         * tests/test-glob.c: Reorder #includes. Remove tests that are moved to
41694         tests/test-glob-h.c.
41695         * modules/glob-h-tests: New file.
41696         * tests/test-glob-h-c++.cc: Renamed from tests/test-glob-c++.cc. Add
41697         conditions.
41698         * modules/glob-h-c++-tests: Renamed from modules/glob-c++-tests.
41699         * modules/glob-tests (Depends-on): Remove glob-c++-tests.
41701 2018-08-07  Bruno Haible  <bruno@clisp.org>
41703         glob-h: New module.
41704         * lib/glob.in.h: Use nearly the usual gnulib idioms for header file
41705         replacements.
41706         * lib/glob.c: Include <config.h>.
41707         * m4/glob_h.m4: New file.
41708         * m4/glob.m4 (gl_GLOB): Require gl_GLOB_H. Remove code that is moved to
41709         glob_h.m4. Set HAVE_GLOB, REPLACE_GLOB, HAVE_GLOB_PATTERN_P,
41710         REPLACE_GLOB_PATTERN_P as appropriate.
41711         (gl_PREREQ_GLOB): Don't require AC_C_RESTRICT and
41712         AC_USE_SYSTEM_EXTENSIONS, now done through module 'glob-h'.
41713         * modules/glob-h: New file.
41714         * modules/glob (Files): Remove lib/glob.in.h, lib/glob-libc.h.
41715         (Dependencies): Add glob-h. Remove extensions, snippet/*, libc-config,
41716         lstat, sys_stat. Change conditions.
41717         (configure.ac): Test HAVE_GLOB, REPLACE_GLOB, HAVE_GLOB_PATTERN_P,
41718         REPLACE_GLOB_PATTERN_P. Set module indicator.
41719         (Makefile.am): Remove code that is moved to glob-h.
41720         * doc/posix-headers/glob.texi: Mention the 'glob-h' module.
41721         * modules/posixcheck (Depends-on): Add glob-h.
41723 2018-08-06  Bruno Haible  <bruno@clisp.org>
41725         Force generation of substitute .h file when C++ support is enabled.
41726         * m4/ansi-c++.m4 (gl_ANSI_CXX): New macro.
41727         * modules/ansi-c++-opt (configure.ac): Just require gl_ANSI_CXX.
41728         * m4/fnmatch_h.m4 (gl_FNMATCH_H): If C++ support is enabled, set
41729         FNMATCH_H to non-empty.
41730         * m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS): If C++ support is enabled, set
41731         ICONV_H to non-empty.
41732         * m4/monetary_h.m4 (gl_MONETARY_H_BODY): If C++ support is enabled, set
41733         MONETARY_H to non-empty.
41734         * m4/utime_h.m4 (gl_UTIME_H): If C++ support is enabled, set UTIME_H to
41735         non-empty.
41737 2018-08-06  Bruno Haible  <bruno@clisp.org>
41739         fnmatch-h: Fix test compilation error on mingw (regression from today).
41740         * lib/fnmatch.in.h: Fix conditions.
41742 2018-08-06  Bruno Haible  <bruno@clisp.org>
41744         sys_resource: Relicense under LGPLv2+.
41745         John Malmberg's approval is in
41746         <https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00031.html>.
41747         * modules/sys_resource (License): Change to LGPLv2+.
41749 2018-08-06  Bruno Haible  <bruno@clisp.org>
41751         fnmatch-h: Add tests.
41752         * tests/test-fnmatch-h.c: New file.
41753         * modules/fnmatch-h-tests: New file.
41754         * tests/test-fnmatch-h-c++.cc: New file.
41755         * modules/fnmatch-h-c++-tests: New file.
41757 2018-08-06  Bruno Haible  <bruno@clisp.org>
41759         fnmatch-h: New module.
41760         * lib/fnmatch.in.h: Use the usual gnulib idioms for header file
41761         replacements.
41762         (FNM_*): Don't redefine if fnmatch exists and we are not overriding it.
41763         (fnmatch): Use the usual gnulib idiom for function declarations. Enable
41764         'posixcheck' warning.
41765         * m4/fnmatch_h.m4: New file.
41766         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Require gl_FNMATCH_H. Remove
41767         code that is moved to fnmatch_h.m4. When fnmatch does not exist, don't
41768         bother testing whether it is working. Set HAVE_FNMATCH, REPLACE_FNMATCH
41769         as appropriate.
41770         * modules/fnmatch-h: New file.
41771         * modules/fnmatch (Files): Remove lib/fnmatch.in.h.
41772         (Dependencies): Add fnmatch-h. Remove extensions, snippet/*. Change
41773         conditions.
41774         (configure.ac): Test HAVE_FNMATCH and REPLACE_FNMATCH. Set module
41775         indicator.
41776         (Makefile.am): Remove code that is moved to fnmatch-h.
41777         * modules/fnmatch-gnu (configure.ac): Test HAVE_FNMATCH and
41778         REPLACE_FNMATCH.
41779         * doc/posix-headers/fnmatch.texi: Mention the 'fnmatch-h' module.
41780         * modules/posixcheck (Depends-on): Add fnmatch-h.
41782 2018-08-06  Bruno Haible  <bruno@clisp.org>
41784         Enable more C++ tests.
41785         * modules/inttypes-tests (Depends-on): Add inttypes-c++-tests.
41786         * modules/monetary-tests (Depends-on): Add monetary-c++-tests.
41787         * modules/strings-tests (Depends-on): Add strings-c++-tests.
41788         * modules/sys_resource-tests (Depends-on): Add sys_resource-c++-tests.
41789         * modules/utime-h-tests (Depends-on): Add utime-h-c++-tests.
41791 2018-08-06  Bruno Haible  <bruno@clisp.org>
41793         getopt-posix, utime-h: Ensure the .h file gets regenerated when needed.
41794         * modules/getopt-posix (Makefile.am): Add Makefile dependency for
41795         getopt.h.
41796         * modules/utime-h (Makefile.am): Add Makefile dependency for utime.h.
41798 2018-08-05  Bruno Haible  <bruno@clisp.org>
41800         utime-h: Generate header file when module 'posixcheck' is in use.
41801         * m4/utime_h.m4 (gl_UTIME_H): If module 'posixcheck' is in use, set
41802         UTIME_H to non-empty.
41804 2018-08-05  Bruno Haible  <bruno@clisp.org>
41806         monetary: Generate header file when module 'posixcheck' is in use.
41807         * m4/monetary_h.m4 (gl_MONETARY_H_BODY): If module 'posixcheck' is in
41808         use, set MONETARY_H to non-empty.
41810 2018-08-05  Bruno Haible  <bruno@clisp.org>
41812         iconv-h: Generate header file when module 'posixcheck' is in use.
41813         * m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS): If module 'posixcheck' is in use,
41814         set ICONV_H to non-empty.
41816 2018-08-05  Bruno Haible  <bruno@clisp.org>
41818         Optimize the "checking whether ... is declared without a macro" checks.
41819         Suggested by Paul Eggert in
41820         <https://lists.gnu.org/archive/html/bug-gnulib/2011-01/msg00339.html>.
41821         * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Expand to nothing if the
41822         Gnulib module 'posixcheck' is not in use.
41824 2018-08-05  Bruno Haible  <bruno@clisp.org>
41826         iconv-h: Enable 'posixcheck' warnings.
41827         * m4/iconv_h.m4 (gl_ICONV_H): Check for declarations of iconv and
41828         iconv_open.
41829         * lib/iconv.in.h (iconv_open, iconv): Use _GL_WARN_ON_USE.
41831 2018-08-05  Bruno Haible  <bruno@clisp.org>
41833         Fix link error regarding 'rpl_environ' (regression from 2012-11-21).
41834         * m4/extern-inline.m4: Add more comments.
41835         * lib/warn-on-use.h (_GL_WARN_ON_USE_ATTRIBUTE): New macro.
41836         * lib/unistd.in.h (rpl_environ): Use it instead of _GL_WARN_ON_USE.
41837         * lib/math.in.h (_GL_WARN_REAL_FLOATING_DECL): Likewise.
41839 2018-08-04  Bruno Haible  <bruno@clisp.org>
41841         New module 'posixcheck'.
41842         * modules/posixcheck: New file.
41843         * m4/posixcheck.m4: New file.
41844         * doc/gnulib-tool.texi (Finding POSIX substitutes): New section.
41845         (Which modules?): Reference it.
41847 2018-08-01  Assaf Gordon  <assafgordon@gmail.com>
41849         dfa: fix memory leak
41850         * lib/dfa.c (dfafree): Add missing free() on dfa->superset.
41852 2018-08-01  Paul Eggert  <eggert@cs.ucla.edu>
41854         ieee754-h: new module
41855         It looks like Emacs can use this for some NaN processing.
41856         Emacs uses it only on double NaNs so it should be safe.
41857         * MODULES.html.sh (func_all_modules): Add ieee754-h.
41858         * config/srclist.txt: Mention ieee754.h in a comment.
41859         * doc/glibc-headers/ieee754.texi (ieee754.h):
41860         Gnulib now has a substitute that should work
41861         except for long double and for non-IEEE platforms.
41862         * lib/ieee754.in.h, m4/ieee754-h.m4, modules/ieee754-h:
41863         * modules/ieee754-h-tests, tests/test-ieee754-h.c: New files.
41865 2018-07-27  Bruno Haible  <bruno@clisp.org>
41867         iswcntrl: Mention minor problem on macOS.
41868         * doc/posix-functions/iswcntrl.texi: Mention oddity on macOS.
41870 2018-07-26  Colin Watson  <cjwatson@debian.org>
41872         bootstrap, gnulib-tool: fix translations rsync
41873         Previously, we created files such as $pobase/Makefile.in.in and then the
41874         subsequent rsync would immediately delete them.
41875         * build-aux/bootstrap (po_download_command_format): Avoid deleting
41876         non-.po files in target directory when rsyncing translations.
41877         * gnulib-tool (func_import): Likewise.
41878         * pygnulib/GLImport.py (GLImport.execute): Likewise.
41880 2018-07-25  Jim Meyering  <meyering@fb.com>
41882         bootstrap: reinstate definition fo gnulib_mk.
41883         That variable is used at least by cppi.
41884         * build-aux/bootstrap (gnulib_mk): Restore definition.
41885         This reverts the deletion from v0.1-1844-gc66dba9ba.
41887 2018-07-23  Bruno Haible  <bruno@clisp.org>
41889         doc: For module names, use texinfo markup @code{} or @samp{}.
41890         * doc/alloca.texi: Mark gnulib module names with @code.
41891         * doc/alloca-opt.texi: Likewise.
41892         * doc/quote.texi: Likewise.
41893         * doc/posix-functions/freopen.texi: Likewise.
41894         * doc/posix-functions/open.texi: Likewise.
41895         * doc/posix-functions/readlink.texi: Likewise.
41896         * doc/posix-functions/readlinkat.texi: Likewise.
41897         * doc/posix-functions/stdout.texi: Likewise.
41898         * doc/posix-functions/stderr.texi: Likewise.
41899         * doc/posix-functions/unlink.texi: Likewise.
41900         * doc/posix-functions/unlinkat.texi: Likewise.
41901         * doc/posix-functions/utime.texi: Likewise.
41902         * doc/posix-functions/utimensat.texi: Likewise.
41903         * doc/posix-functions/utimes.texi: Likewise.
41904         * doc/posix-headers/stdint.texi: Likewise.
41905         * doc/glibc-functions/futimesat.texi: Likewise.
41906         * doc/glibc-functions/lutimes.texi: Likewise.
41907         * doc/glibc-functions/memmem.texi: Likewise.
41909 2018-07-23  Werner LEMBERG  <wl@gnu.org>
41911         doc: Avoid some overfull lines in the TeX output.
41912         * doc/glibc-functions/futimesat.texi: Replace a long @code with a
41913         @example.
41914         * doc/pastposix-functions/pthread_attr_getstackaddr.texi: Insert a
41915         newline before the long URL.
41916         * doc/pastposix-functions/pthread_attr_setstackaddr.texi: Likewise.
41917         * doc/relocatable-maint.texi: Use @smallexample instead of @example.
41918         Add line breaks in code snippets.
41920 2018-07-17  Paul Eggert  <eggert@cs.ucla.edu>
41922         hard-locale: simplify by removing hard-locale.m4
41923         * m4/hard-locale.m4: Remove.
41924         * modules/hard-locale (Files): Remove m4/hard-locale.m4.
41925         (configure.ac): Do not call gl_HARD_LOCALE.
41927         gnulib-tool: limit line length for git send-email
41928         * gnulib-tool (func_import): Break actioncmd log line
41929         into multiple lines.
41931 2018-07-16  Bruno Haible  <bruno@clisp.org>
41933         ffs: Ensure declaration on mingw.
41934         Reported by Daniel P. Berrangé <berrange@redhat.com>
41935         in https://lists.gnu.org/archive/html/bug-gnulib/2018-07/msg00061.html.
41936         * m4/ffs.m4 (gl_FUNC_FFS): Check whether ffs() not only exists but is
41937         also declared.
41939 2018-07-13  Paul Eggert  <eggert@cs.ucla.edu>
41941         regex-tests: add dependency
41942         * modules/regex-tests (Depends-on): Add gettext-h.
41943         This is needed given the recent changes to regex,
41944         which no longer depends on gettext-h.
41946 2018-07-06  Paul Eggert  <eggert@cs.ucla.edu>
41948         regex: now in sync with glibc
41949         * config/srclist.txt: Gnulib and glibc regex code
41950         are synchronized again.
41952 2018-07-05  Paul Eggert  <eggert@cs.ucla.edu>
41954         renameatu: rename from renameat2
41955         It's looking like Glibc will add a renameat2 function
41956         that is incompatible with Gnulib renameat2; see:
41957         https://sourceware.org/ml/libc-alpha/2018-07/msg00064.html
41958         To help avoid future confusion, rename renameat2 to something else.
41959         Use the name 'renameatu', as the Gnulib function is close to the
41960         Glibc function.  Perhaps someday there will also be a renameat2
41961         Gnulib module, which mimicks the future glibc renameat2, but that
41962         can wait as nobody seems to need such a module now.
41963         * NEWS: Mention this.
41964         * lib/renameatu.c: Rename from lib/renameat2.c.
41965         * lib/renameatu.h: Rename from lib/renameat2.h.
41966         * modules/renameatu: Rename from modules/renameat2.
41967         * modules/renameatu-tests: Rename from modules/renameat2-tests.
41968         All uses of "renameat2" in identifiers or file name
41969         changed to "renameatu", except for two instances in
41970         lib/renameatu.c that deal with the Linux kernel's
41971         renameat2 syscall.
41973 2018-07-04  Paul Eggert  <eggert@cs.ucla.edu>
41975         gnulib-tool: minor tweaks for --gnu-make
41976         * gnulib-tool: Do not allow --gnu-make in test modes,
41977         since they all require automake.
41978         (func_emit_lib_Makefile_am): Don’t emit automake comment
41979         if --gnu-make.
41981         regex: work around conditional-dependencies glitch
41982         * modules/regex (Depends-on): Add langinfo.
41983         Without this change, I had problems building an experimental
41984         version of GNU Emacs.  The symptom of the bug was a message
41985         ‘./configure: line 12726: test: =: unary operator expected’.
41986         This was due to a line in gl_FUNC_NL_LANGINFO that invokes
41987         ‘test $HAVE_LANGINFO_CODESET = 1’ even though HAVE_LANGINFO_CODESET
41988         was unset.  Although gl_FUNC_NL_LANGINFO has
41989         ‘AC_REQUIRE([gl_LANGINFO_H])’ and gl_LANGINFO_H always sets
41990         HAVE_LANGINFO_CODESET to 0 or 1, gnulib-tool with
41991         --conditional-dependencies sometimes arranges for the
41992         gl_FUNC_NL_LANGINFO code to be executed before the gl_LANGINFO_H
41993         code.  Since the regex code includes <langinfo.h> it should be
41994         depending on the langinfo module anyway, and this happens to work
41995         around the bug, so install that as a workaround for now.  To
41996         reproduce the original problem, run the following shell script on
41997         the version of Gnulib just before this patch was installed.
41998                 rm -fr foo
41999                 mkdir foo
42000                 cat >foo/configure.ac <<'EOF'
42001                 AC_INIT(GNU Emacs, 27.0.50, bug-gnu-emacs@gnu.org, , https://www.gnu.org/software/emacs/)
42002                 gl_EARLY
42003                 gl_INIT
42004                 AC_OUTPUT
42005                 EOF
42006                 ./gnulib-tool --import --conditional-dependencies --gnu-make --dir foo regex
42007                 ./gnulib-tool --copy build-aux/install-sh foo/install-sh
42008                 ./gnulib-tool --copy build-aux/config.sub foo/config.sub
42009                 ./gnulib-tool --copy build-aux/config.guess foo/config.guess
42010                 cd foo
42011                 aclocal -I m4
42012                 autoconf
42013                 ./configure --with-included-regex
42015 2018-07-01  Paul Eggert  <eggert@cs.ucla.edu>
42017         wchar: fix bug when checking for ‘inline’
42018         I discovered this when looking into using the regex module
42019         with Emacs.
42020         * m4/wchar_h.m4 (gl_WCHAR_H_INLINE_OK): Fix bug introduced in
42021         2016-08-17T23:09:38Z!skunk@iSKUNK.ORG; the code compiled
42022         conftest1.c and conftest2.c but these files were not created.
42023         As far as I can see, this check never worked and nobody reported
42024         it until now, which is a bit worrisome.
42026 2018-06-30  Jim Meyering  <meyering@fb.com>
42028         bootstrap: s/--option val/--option=val/
42029         * build-aux/bootstrap (gnulib_tool_options): Change the
42030         spelling of "--option val" pairs to "--option=val", for
42031         aesthetics, and also so that this file no longer triggers
42032         a common help2man syntax-check warning when copied into
42033         projects like grep, gzip, etc.
42035 2018-07-01  Paul Eggert  <eggert@cs.ucla.edu>
42037         manywarnings: omit -Wswitch-default
42038         This should make things more consistent, as we already ignore
42039         -Wswitch-enum.  Problem reported by Reuben Thomas; see:
42040         https://lists.gnu.org/r/bug-gnulib/2018-05/msg00179.html
42041         * build-aux/g++-warning.spec, build-aux/gcc-warning.spec:
42042         Add -Wswitch-default.
42043         * m4/manywarnings-c++.m4 (gl_MANYWARN_ALL_GCC_CXX_IMPL):
42044         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
42045         Remove -Wswitch-default.
42047         regex: revert most trimming
42048         Problems reported by Bruno Haible in:
42049         https://lists.gnu.org/r/bug-gnulib/2018-07/msg00001.html
42050         * modules/regex (Depends-on): Add lock, memcmp, memmove,
42051         and wctype back in.  lock because regex users shouldn’t
42052         need to know that regex needs locking, and the rest because
42053         gnulib-tool should ordinarily ignore them anyway.
42055 2018-06-30  Paul Eggert  <eggert@cs.ucla.edu>
42057         regex: trim module dependencies
42058         * modules/regex (Depends-on): Remove gettext-h and lock,
42059         since the regex code should work OK without these modules,
42060         and Emacs uses it that way.  Also remove memcmp, memmove,
42061         and wctype, as these modules are obsolete and should not be
42062         needed any more.
42064 2018-06-29  Paul Eggert  <eggert@cs.ucla.edu>
42066         regex: glibc does not use intprops.h
42067         Maybe we can talk glibc into using intprops.h someday, but
42068         now doesn’t seem to be a good time.
42069         * lib/regcomp.c (TYPE_SIGNED): Remove; regex_internal.h now defines.
42070         * lib/regex_internal.h [_LIBC]: Do not include intprops.h.
42071         (TYPE_SIGNED, INT_ADD_WRAPV): New macros.
42073 2018-06-28  Paul Eggert  <eggert@cs.ucla.edu>
42075         regex: port to recently proposed glibc regex merge
42076         This patch is inspired by Adhemerval Zanella's recent proposal
42077         https://www.sourceware.org/ml/libc-alpha/2018-06/msg00905.html
42078         to merge glibc and Gnulib regex.  It aims to simplify the merge on
42079         the glibc side, without keeping Gnulib portable.
42080         * lib/regex.h: Fix a problem with glibc installed-header checking,
42081         as follows:
42082         (_Restrict_): Prefer __restrict if defined or if GCC 2.95 or later.
42083         (_Restrict_arr_): Prefer __restrict_arr if defined,
42084         otherwise prefer _Restrict_ if C99 or GCC 3.1 or later (but not C++).
42085         * lib/regex_internal.c (re_string_realloc_buffers, build_wcs_buffer)
42086         (build_wcs_upper_buffer, build_upper_buffer)
42087         (re_string_translate_buffer, re_string_context_at):
42088         Move decls here from lib/regex_internal.h, for glibc internal tests.
42089         (build_wcs_upper_buffer): Use __wcrtomb, not wcrtomb, fixing
42090         glibc BZ #18496.
42091         * lib/regex_internal.h (lock_fini) [_LIBC]: Cast to 0 to pacify
42092         -Wunused-value.
42093         (bitset_set, bitset_clear, bitset_contain, bitset_empty)
42094         (bitset_set_all, bitset_copy, bitset_not, bitset_merge)
42095         (bitset_mask): Now static inline, and without any __attribute__
42096         ((unused)) decoration, for glibc internal tests.
42098 2018-06-25  Bruno Haible  <bruno@clisp.org>
42100         threadlib: Fix LIBMULTITHREAD on platforms where --as-needed is enabled.
42101         Reported by Erik Auerswald <auerswal@unix-ag.uni-kl.de>
42102         in <https://lists.gnu.org/archive/html/coreutils/2018-06/msg00063.html>.
42103         * m4/threadlib.m4 (gl_THREADLIB_BODY): Check whether the linker supports
42104         --as-needed/--no-as-needed and --push-state/--pop-state. When defining
42105         USE_POSIX_THREADS_WEAK or USE_SOLARIS_THREADS_WEAK or
42106         USE_PTH_THREADS_WEAK, define LIBMULTITHREAD in such a way that -lpthread
42107         / -lthread / -lpth does not get optimized away by a preceding
42108         --as-needed option.
42110 2018-06-25  Bruno Haible  <bruno@clisp.org>
42112         Continue to use spaces for indentation, not tabs.
42113         * MODULES.html.sh: Untabify.
42114         * doc/regex.texi: Likewise.
42115         * lib/acl-internal.c: Likewise.
42116         * lib/dfa.c: Likewise.
42117         * lib/exclude.c: Likewise.
42118         * lib/exclude.h: Likewise.
42119         * lib/get-permissions.c: Likewise.
42120         * lib/gettimeofday.c: Likewise.
42121         * lib/parse-datetime.y: Likewise.
42122         * lib/pselect.c: Likewise.
42123         * lib/set-permissions.c: Likewise.
42124         * lib/time.in.h: Likewise.
42125         * m4/canonicalize.m4: Likewise.
42126         * m4/gc.m4: Likewise.
42127         * m4/gnulib-common.m4: Likewise.
42128         * m4/pthread_sigmask.m4: Likewise.
42129         * m4/vararrays.m4: Likewise.
42130         * tests/test-digest.h: Likewise.
42131         * tests/test-fcntl-h.c: Likewise.
42132         * tests/test-timespec.c: Likewise.
42133         * tests/uniwbrk/test-uc-wordbreaks.c: Likewise.
42135 2018-06-25  Bruno Haible  <bruno@clisp.org>
42137         manywarnings: Don't enable -Wjump-misses-init warnings by default.
42138         * build-aux/gcc-warning.spec: Add -Wjump-misses-init.
42139         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)): Remove
42140         -Wjump-misses-init.
42142 2018-06-25  Jim Meyering  <meyering@fb.com>
42144         acl-internal.h: remove _GL_ATTRIBUTE_CONST on void function
42145         * lib/acl-internal.h (free_permission_context): Remove that
42146         attribute directive.  Otherwise, it would provoke this from GCC 9:
42147         lib/acl-internal.h:300:3: error: 'const' attribute on function \
42148           returning 'void' [-Werror=attributes]
42150 2018-06-24  Jim Meyering  <meyering@fb.com>
42152         parse-datetime: accommodate gcc-4.8.5
42153         Bruno Haible reported the build failure in
42154         https://lists.gnu.org/r/bug-gnulib/2018-06/msg00066.html
42155         * lib/parse-datetime.y (parse_datetime2): Remove leading "static"
42156         on declaration of new local.
42158 2018-06-24  Bruno Haible  <bruno@clisp.org>
42160         af_alg: Fail in continuable manner on Linux/powerpc64le.
42161         Reported by Assaf Gordon <assafgordon@gmail.com>
42162         in <https://lists.gnu.org/archive/html/coreutils/2018-06/msg00034.html>.
42163         * lib/af_alg.c (afalg_stream): On non-seekable streams, try a single-
42164         byte send() as the first round.
42166 2018-06-24  Bruno Haible  <bruno@clisp.org>
42168         af_alg: Fix state of stream after sendfile() succeeds.
42169         * lib/af_alg.c (afalg_stream): Invoke fflush and lseek, to ensure that
42170         the stream is correctly positioned afterwards.
42171         * modules/crypto/af_alg (Depends-on): Add fflush.
42172         * tests/test-digest.h (test_digest_on_files): Verify that after the
42173         operation the stream is positioned at end of file.
42175 2018-06-24  Jim Meyering  <meyering@fb.com>
42177         canon-host: take GCC9's advice rather than ignoring warning
42178         Pádraig Brady suggested not to ignore this GCC9 advice.
42179         * lib/canon-host.c: Undo preceding change.
42180         * lib/canon-host.h: Instead, declare with _GL_ATTRIBUTE_MALLOC.
42182         parse-datetime.y: avoid spurious GCC 9 warning
42183         * lib/parse-datetime.y (parse_datetime2): Save RELATIVE_TIME_0 into
42184         a function local prior to the first "goto fail".  The prior use would
42185         evoke this:
42186         parse-datetime.y: In function 'parse_datetime2':
42187         parse-datetime.y:1791:19: error: jump skips variable initialization \
42188           [-Werror=jump-misses-init]
42189         parse-datetime.y:2385:2: note: label 'fail' defined here
42190         parse-datetime.y:188:43: note: '({anonymous})' declared here
42191         parse-datetime.y:1841:12: note: in expansion of macro 'RELATIVE_TIME_0'
42193         canon-host.c: avoid spurious GCC 9 warning
42194         * lib/canon-host.c: Suppress GCC9's -Wsuggest-attribute=malloc.
42196         manywarnings: accommodate GCC 9.0-pre: remove -Wchkp and -Wabi
42197         * build-aux/gcc-warning.spec: Add them here, each with an explanation.
42198         * m4/manywarnings.m4: Remove them.
42199         Otherwise, building coreutils, I would see this:
42200         cc1: error: deprecated command line option '-Wchkp' [-Werror]
42201         cc1: error: -Wabi won't warn about anything [-Werror=abi]
42202         cc1: note: -Wabi warns about differences from the most up-to-date ABI,\
42203           which is also used by default
42204         cc1: note: use e.g. -Wabi=11 to warn about changes from GCC 7
42206 2018-06-24  Bruno Haible  <bruno@clisp.org>
42208         af_alg tests: Add another test.
42209         * tests/test-digest.h (test_digest_on_files): Also check a large file
42210         with a skipped header.
42211         * tests/test-md5.c: Include macros.h.
42212         * tests/test-sha1.c: Likewise.
42213         * tests/test-sha256.c: Likewise.
42214         * tests/test-sha512.c: Likewise.
42215         * modules/crypto/md5-tests (Files): Add tests/macros.h.
42216         * modules/crypto/sha1-tests (Files): Likewise.
42217         * modules/crypto/sha256-tests (Files): Likewise.
42218         * modules/crypto/sha512-tests (Files): Likewise.
42220 2018-06-24  Pádraig Brady  <P@draigBrady.com>
42222         maint: clarify comments about sticky EOF
42223         * lib/af_alg.c: Be more direct that we can't
42224         assume stickiness of EOF for portability reasons.
42225         * lib/md5.c: Clarify that this isn't just a glibc issue.
42226         * lib/sha1.c: Likewise.
42227         * lib/sha256.c: Likewise.
42228         * lib/sha512.c: Likewise.
42230 2018-06-24  Bruno Haible  <bruno@clisp.org>
42232         af_alg: Comment and style improvements.
42233         * lib/af_alg.c (alg_socket): Use 'size_t' as index into a string.
42234         (afalg_buffer, afalg_stream): Improve comments.
42236 2018-06-24  Pádraig Brady  <P@draigBrady.com>
42238         af_alg: disable kernel hash functions by default
42239         All the kernel routines were seen to be significantly slower
42240         with these relatively recent components on an i3-2310M system:
42241           kernel-4.10.6-200.fc25.x86_64
42242           openssl-1.0.2m-1.fc25.x86_64
42243         sha1 was nearly twice as slow in the kernel for example.
42244         Further considerations why this should not be the default, at:
42245         https://lists.gnu.org/r/coreutils/2018-06/msg00034.html
42247         * m4/af_alg.m4: Require --with-linux-crypto to enable.
42248         * m4/gl-openssl.m4: Tweak accordingly.
42250 2018-06-24  Pádraig Brady  <P@draigBrady.com>
42252         af_alg: avoid hangs when reading from streams
42253         * lib/af_alg.c (afalg_stream): Don't assume EOF is sticky,
42254         and thus avoid doing a fread() when feof() is set.
42255         * lib/md5.c: Ensure feof() is called before fread().
42256         * lib/sha1.c: Likewise.
42257         * lib/sha256.c: Likewise.
42258         * lib/sha512.c: Likewise.
42260 2018-06-24  Pádraig Brady  <P@draigBrady.com>
42262         af_alg: fix error handling when hash not returned
42263         * lib/af_alg.c (afalg_stream): Handle the case where we've
42264         successfully written data to the kernel in the read/write loop,
42265         but the kernel doesn't respond with the hash.
42267 2018-06-24  Paul Eggert  <eggert@cs.ucla.edu>
42269         libc-config: merge from glibc
42270         * lib/cdefs.h (__inline, __restrict):
42271         Copy from current glibc.  This fixes glibc bug 17721,
42272         which Gnulib had already fixed in a different way.
42273         (__nonnull): Lessen the distance from glibc by using the
42274         glibc definition inside an ‘#ifndef __nonnull’.
42275         (__attribute_nonstring__): New macro, copied from
42276         current glibc.
42277         * lib/libc-config.h (__attribute_nonstring__): New undef.
42278         (__restrict): Remove; workaround no longer needed.
42279         Keep the __inline workaround, though, as it uses HAVE___INLINE to
42280         support more compilers than the glibc __inline can.
42282 2018-06-24  Bruno Haible  <bruno@clisp.org>
42284         mbrtowc, wcwidth: Fix MT-safety bug (regression from 2018-06-23).
42285         * lib/mbrtowc.c (enc_t): New enum type.
42286         (locale_enc, locale_enc_cached): New functions.
42287         (mbrtowc): Eliminate static variables. Use locale_enc_cached instead.
42288         * lib/wcwidth.c (is_locale_utf8, is_locale_utf8_cached): New functions.
42289         (wcwidth): Eliminate static variables. Use is_locale_utf8_cached
42290         instead.
42291         * m4/mbrtowc.m4 (gl_PREREQ_MBRTOWC): Require AC_C_INLINE.
42292         * m4/wcwidth.m4 (gl_PREREQ_WCWIDTH): New macro.
42293         * modules/wcwidth (configure.ac): Invoke it.
42295 2018-06-24  Bruno Haible  <bruno@clisp.org>
42297         wchar-single: Fix test failure in wcwidth tests.
42298         * tests/test-wcwidth.c (main): If the wchar-single module is present,
42299         skip the tests in the C locale.
42301 2018-06-23  Pádraig Brady  <P@draigBrady.com>
42303         crypto: mention --without-linux-crypto in --with-openssl --help
42304         * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Mention that linux crypto
42305         routines take precedence in --with-openssl help output.
42307 2018-06-23  Pádraig Brady  <P@draigBrady.com>
42309         wchar-single: a new module to enable optimizations in wchar replacements
42310         * lib/mbrtowc.c (mbrtowc): Only check locale_charset() once if
42311         GNULIB_WCHAR_SINGLE is enabled.
42312         * lib/wcwidth.c (wcwidth): Likewise.
42314 2018-06-23  Bruno Haible  <bruno@clisp.org>
42316         libc-config: Fix conflict with FreeBSD include files.
42317         * lib/cdefs.h (__nonnull): Remove definition.
42318         * lib/libc-config.h (__nonnull): Remove undefinition.
42320 2018-06-21  Paul Eggert  <eggert@cs.ucla.edu>
42322         random_r: do not crash if state is unaligned
42323         Problem reported by Bruce Korb in:
42324         https://lists.gnu.org/r/bug-gnulib/2018-06/msg00030.html
42325         I reproduced the crash on 32-bit sparc with Oracle Studio 12.6
42326         with 'cc -O2 -xmemalign=8s'.
42327         * lib/random_r.c: Include string.h, for memcpy.
42328         (get_int32, set_int32): New functions.
42329         (__srandom_r, __initstate_r, __setstate_r, __random_r):
42330         Use them to avoid assumption that state pointer is aligned.
42331         (__random_r): Avoid integer overflow if INT_MAX == UINT32_MAX.
42332         * tests/test-random_r.c (test_failed): New function.
42333         (main): Use it, to test for alignment bugs.
42335         random_r: omit unnecessary include
42336         * lib/random_r.c: Do not include limits.h.
42338         random, random_r: merge from glibc
42339         * lib/random.c, lib/random_r.c:
42340         Include libc-config.h if !_LIBC, not config.h unilaterally.
42341         * lib/random.c:
42342         Do not include stdint.h or time.h; not needed.
42343         Include libc-lock.h if _LIBC, and define substitute macros otherwise.
42344         (unsafe_state): Rename from generator.  All uses changed.
42345         Use C99-style initializers.
42346         (__random, __srandom, __initstate, __setstate): Rename from
42347         non-underscored version, but define it to non-underscored version
42348         on Gnulib.  Add a lock.
42349         * lib/random_r.c (__srandom_r, __initstate_r, __setstate_r, __random_r):
42350         Likewise.
42351         Do not include <stdint.h>; not needed since stdlib.h defines int32_t.
42352         (weak_alias, __set_errno) [!_LIBC]: Remove; now done by libc-config.
42353         (__srandom_r): Use int32_t instead of long int where int32_t will do.
42354         (__random_r): Use uint32 to fix glibc bug 17343.
42355         * modules/random, modules/random_r (Depends-on): Add libc-config.
42356         Depend on stdint only if $HAVE_RANDOM = 0.
42358 2018-06-19  Jim Meyering  <meyering@fb.com>
42360         README-release: also run any check-very-expensive tests
42361         * top/README-release: Adjust instructions so they run the
42362         check-very-expensive tests when there is such a target.
42364 2018-06-18  Bruno Haible  <bruno@clisp.org>
42366         pthread_rwlock_rdlock: Add comments regarding glibc behaviour.
42367         * m4/pthread_rwlock_rdlock.m4: Add comment.
42368         * doc/posix-functions/pthread_rwlock_rdlock.texi: Mention that rwlocks
42369         are reader-preferring in glibc.
42370         * doc/posix-functions/pthread_rwlock_tryrdlock.texi: Likwise.
42371         * doc/posix-functions/pthread_rwlock_timedrdlock.texi: Likewise.
42373 2018-06-17  Paul Eggert  <eggert@cs.ucla.edu>
42375         crypto: use byteswap
42376         * lib/md4.c, lib/md5.c, lib/sha1.c, lib/sha256.c, lib/sha512.c:
42377         * lib/sm3.c: Include <byteswap.h>.
42378         (SWAP): Use its macros rather than reinventing the wheel.
42379         * modules/crypto/md4, modules/crypto/md5-buffer:
42380         * modules/crypto/sha1-buffer, modules/crypto/sha256-buffer:
42381         * modules/crypto/sha512-buffer, modules/crypto/sm3:
42382         (Depends-on): Add byteswap.
42384 2018-06-17  Pádraig Brady  <P@draigBrady.com>
42386         gendocs.sh: fix support for legacy --texi2html
42387         * build-aux/gendocs.sh: Restrict use of TOP_NODE_UP_URL
42388         to the default makeinfo invocation.
42389         Reported by Bruce Korb
42391 2018-06-17  Bruno Haible  <bruno@clisp.org>
42393         gettext po infrastructure: Update from current gettext git.
42394         Reported by Akim Demaille <akim@lrde.epita.fr>.
42395         * build-aux/po/Makefile.in.in: Update from current gettext git.
42396         * build-aux/po/remove-potcdate.sin: Likewise.
42397         * config/srclist.txt: Temporarily disable sync for these files.
42399 2018-06-17  Bruno Haible  <bruno@clisp.org>
42401         getloadavg: Return 0 on Windows without Cygwin.
42402         * lib/getloadavg.c: Don't assume that the symbol WINDOWS32 is defined.
42404 2018-06-17  Paul Smith  <psmith@gnu.org>
42406         getloadavg: Allow building on Windows without Cygwin
42407         * lib/getloadavg.c: Reinstate ifdef for HAVE_UNISTD_H.
42408         * m4/getloadavg.m4: Check for unistd.h.
42410 2018-06-03  Paul Eggert  <eggert@cs.ucla.edu>
42412         Port crypto/af_alg to GCC 4.8.4
42413         Problem reported by Peter Simons in:
42414         https://lists.gnu.org/r/bug-gnulib/2018-06/msg00002.html
42415         * modules/crypto/af_alg (Depends-on): Add c99 if USE_AF_ALG.
42417 2018-05-27  Colin Watson  <cjwatson@debian.org>
42419         bootstrap: document source fetching in --help
42420         * build-aux/bootstrap (usage): Document how Gnulib sources are fetched.
42422 2018-04-09  Colin Watson  <cjwatson@debian.org>
42424         bootstrap: allow non-submodule control of gnulib
42425         * build-aux/bootstrap: Honour GNULIB_URL and GNULIB_REVISION in
42426         bootstrap.conf when fetching gnulib using "git clone" or via
42427         GNULIB_SRCDIR.
42429 2018-05-21  Paul Eggert  <eggert@cs.ucla.edu>
42431         crypto: omit stream ops Emacs doesn’t need
42432         * lib/md5.c (md5_stream):
42433         * lib/sha1.c (sha1_stream):
42434         * lib/sha256.c (shaxxx_stream, sha256_stream, sha224_stream):
42435         * lib/sha512.c (shaxxx_stream, sha512_stream, sha384_stream):
42436         Compile stream functions only if GL_COMPILE_CRYPTO_STREAM is
42437         defined.  Emacs needs this, as it does not use the stream
42438         operations and doesn’t need all the af_alg stuff we’ve recently
42439         added.  Perhaps a similar change is needed to the other crypto
42440         modules, but this patch changes only those needed for Emacs.
42441         * modules/crypto/md5-buffer, modules/crypto/sha1-buffer:
42442         * modules/crypto/sha256-buffer, modules/crypto/sha512-buffer:
42443         New modules, used by Emacs.
42444         * modules/crypto/md5, modules/crypto/sha1, modules/crypto/sha256:
42445         * modules/crypto/sha512: Rewrite to depend on the new modules.
42447 2018-05-20  Pádraig Brady  <P@draigBrady.com>
42449         fts: avoid a memory leak edge case
42450         * lib/fts.c (fts_open): Set an appropriate fts_level
42451         so that an immediate fts_close() will free the allocation.
42452         * tests/test-fts.c (fts_dealloc): Add a test case which
42453         will trigger under valgrind or address sanitizer.
42454         Fixes https://bugs.gnu.org/31439
42456 2018-05-20  Bruno Haible  <bruno@clisp.org>
42458         wcwidth tests: Fix link error.
42459         * modules/wcwidth-tests (Makefile.am): Link test-wcwidth against
42460         $(LIBUNISTRING).
42462 2018-05-20  Bruno Haible  <bruno@clisp.org>
42464         regex: Fix "error: possibly undefined macro: gl_GLIBC21".
42465         * modules/regex (Files): Add m4/glibc21.m4.
42467 2018-05-20  Bruno Haible  <bruno@clisp.org>
42469         localcharset: Optimize.
42470         * lib/localcharset.c (alias_table): Comment out no-op mappings for
42471         platforms where these don't matter. This reduces the table size,
42472         which in turn reduces the lookup time.
42474 2018-05-19  Bruno Haible  <bruno@clisp.org>
42476         localcharset: Map the locale encodings found in newer OSes.
42477         * lib/localcharset.c (alias_table): Add mapping for locale encodings
42478         found in FreeBSD 11, NetBSD 7, Solaris 10, Openindiana, HP-UX 11.31,
42479         IRIX 6.5, Minix 3.3.
42480         * lib/localcharset.h: Update comments accordingly. Also for Cygwin 2.9.
42482 2018-05-19  Bruno Haible  <bruno@clisp.org>
42484         localcharset: Move mapping tables into the code. Use a binary search.
42485         * lib/localcharset.h: Document the GNU canonical names for character
42486         encodings here.
42487         * lib/localcharset.c: Don't include <fcntl.h>, <unistd.h>,
42488         relocatable.h, configmake.h.
42489         (O_NOFOLLOW, ISSLASH, DIRECTORY_SEPARATOR, getc, volatile): Remove
42490         macros.
42491         (charset_aliases): Remove variable.
42492         (get_charset_aliases): Remove function.
42493         (struct table_entry): New type.
42494         (alias_table, locale_table): New constants.
42495         (locale_charset): Use the alias_table or locale_table to get the
42496         canonicalized encoding name.
42497         * lib/config.charset: Remove file.
42498         * lib/ref-add.sin: Remove file.
42499         * lib/ref-del.sin: Remove file.
42500         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't require gl_FCNTL_O_FLAGS,
42501         AC_CANONICAL_HOST, gl_GLIBC21. Don't check for getc_unlocked.
42502         * modules/localcharset (Notice): Remove.
42503         (Files): Remove config.charset, ref-add.sin, ref-del.sin, fcntl-o.m4,
42504         glibc21.m4.
42505         (Depends-on): Remove configmake.
42506         (configure.ac): Define LOCALCHARSET_TESTS_ENVIRONMENT to empty.
42507         (Makefile.am): Simplify.
42508         * build-aux/prefix-gnulib-mk: Remove special code for the removed files.
42510 2018-05-19  Bruno Haible  <bruno@clisp.org>
42512         localcharset: Add a manual test.
42513         * tests/test-localcharset.c: New file.
42514         * modules/localcharset-tests: New file.
42516 2018-05-19  Bruno Haible  <bruno@clisp.org>
42518         localcharset: Remove support for obsolete platforms.
42519         * lib/config.charset: Remove support for Linux/libc5, glibc-2.0.x, and
42520         Mac OS X 10.2. Comment out dubious entry for Solaris.
42522 2018-05-19  Jim Meyering  <meyering@fb.com>
42524         gnupload: adjust comment
42525         * build-aux/gnupload: Add FIXME-2020 comment, to make it slightly
42526         more likely we'll remove the just-added code in a year or two.
42528 2018-05-19  Bruno Haible  <bruno@clisp.org>
42530         gnupload: Fix "gpg-agent is not available in this session" error.
42531         * build-aux/gnupload (GPG): Pick the right GNUPG executable to use.
42533 2018-05-16  Paul Eggert  <eggert@cs.ucla.edu>
42535         crypto/af_alg: fix --help
42536         * m4/af_alg.m4: Avoid spurious newline in --help output.
42538 2018-05-13  Bruno Haible  <bruno@clisp.org>
42540         nl_langinfo: Fix compilation error on Android.
42541         * lib/nl_langinfo.c (nl_langinfo): Define values for the items GROUPING,
42542         INT_CURR_SYMBOL, etc. only if these items are defined.
42544 2018-05-13  Bruno Haible  <bruno@clisp.org>
42546         truncate: Fix compilation error on Android.
42547         * m4/truncate.m4 (gl_FUNC_TRUNCATE): Test also whether 'truncate' is
42548         declared. Set HAVE_DECL_TRUNCATE, not HAVE_TRUNCATE.
42549         * lib/unistd.in.h (truncate): Test HAVE_DECL_TRUNCATE, not
42550         HAVE_TRUNCATE.
42551         * modules/truncate: Likewise.
42552         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize HAVE_DECL_TRUNCATE,
42553         not HAVE_TRUNCATE.
42554         * modules/unistd (Makefile.am): Substitute HAVE_DECL_TRUNCATE, not
42555         HAVE_TRUNCATE.
42556         * doc/posix-functions/truncate.texi: Mention the issue.
42558 2018-05-13  Bruno Haible  <bruno@clisp.org>
42560         pthread: Fix compilation error on Android.
42561         * lib/pthread.in.h: Use _GL_ALREADY_INCLUDING_PTHREAD_H to shortcut
42562         recursive inclusion of this file.
42564 2018-05-13  Bruno Haible  <bruno@clisp.org>
42566         posix_spawn: Fix compilation error on Android.
42567         * lib/spawn.in.h (posix_spawnattr_t): Consider also the case
42568         HAVE_POSIX_SPAWNATTR_T = 1 && HAVE_POSIX_SPAWN = 0.
42569         (posix_spawn_file_actions_t): Consider also the case
42570         HAVE_POSIX_SPAWN_FILE_ACTIONS_T = 1 && HAVE_POSIX_SPAWN = 0.
42572 2018-05-13  Bruno Haible  <bruno@clisp.org>
42574         tsearch: Move from K&R C to ANSI C.
42575         * lib/tsearch.c (tfind): Convert definition to ANSI C.
42577 2018-05-13  Bruno Haible  <bruno@clisp.org>
42579         tsearch: Fix compilation error on Android.
42580         * lib/search.in.h (twalk): Declare when HAVE_TWALK, not HAVE_TSEARCH,
42581         is 0.
42582         (GNULIB_defined_tsearch, GNULIB_defined_twalk): New macros.
42583         * lib/tsearch.c (tsearch, tfind, tdelete): Define only if
42584         GNULIB_defined_tsearch is true.
42585         (twalk): Define only if GNULIB_defined_twalk is true.
42586         * modules/tsearch (configure.ac): Compile tsearch.c also if HAVE_TWALK
42587         is 0.
42588         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Set HAVE_TWALK.
42589         * m4/search_h.m4 (gl_SEARCH_H_DEFAULTS): Initialize HAVE_TWALK.
42590         * modules/search (Makefile.am): Substitute HAVE_TWALK.
42592 2018-05-13  Bruno Haible  <bruno@clisp.org>
42594         imaxdiv: Fix compilation error on Android.
42595         * m4/imaxdiv.m4 (gl_FUNC_IMAXDIV): Set HAVE_IMAXDIV_T to 0 if imaxdiv_t
42596         is not defined.
42597         * lib/inttypes.in.h (imaxdiv_t): Define if HAVE_IMAXDIV_T, not
42598         HAVE_DECL_IMAXDIV, is 0.
42599         * m4/inttypes.m4 (gl_INTTYPES_H_DEFAULTS): Initialize HAVE_IMAXDIV_T.
42600         * modules/inttypes-incomplete (Makefile.am): Substitute HAVE_IMAXDIV_T.
42602 2018-05-13  Bruno Haible  <bruno@clisp.org>
42604         Support selective inclusion mechanism of recent mingw.org header files.
42605         Reported by Eli Zaretskii <eliz@gnu.org>.
42606         * lib/sys_types.in.h: On mingw, when __need_off_t, __need___off64_t,
42607         __need_ssize_t, or __need_time_t is defined, just include the system's
42608         <sys/types.h>.
42609         * lib/locale.in.h: On mingw, when __need_locale_t is defined, just
42610         include the system's <locale.h>.
42612 2018-05-13  Bruno Haible  <bruno@clisp.org>
42614         Avoid compilation error due to 'mmap' on Android.
42615         * lib/vma-iter.c (_FILE_OFFSET_BITS): Undefine on Android.
42616         * lib/get-rusage-as.c (_FILE_OFFSET_BITS): Likewise.
42617         * tests/zerosize-ptr.h (_FILE_OFFSET_BITS, __USE_FILE_OFFSET64):
42618         Undefine on Android.
42620 2018-05-13  Bruno Haible  <bruno@clisp.org>
42622         Add cross-compilation guesses for Linux systems without glibc.
42623         * m4/chown.m4 (AC_FUNC_CHOWN): Add cross-compilation guess for Linux.
42624         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
42625         * m4/link.m4 (gl_FUNC_LINK): Likewise.
42626         * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise.
42627         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Likewise.
42628         * m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise.
42629         * m4/mkfifo.m4 (gl_FUNC_MKFIFO): Likewise.
42630         * m4/mknod.m4 (gl_FUNC_MKNOD): Likewise.
42631         * m4/pselect.m4 (gl_FUNC_PSELECT): Likewise.
42632         * m4/readlink.m4 (gl_FUNC_READLINK): Likewise.
42633         * m4/rename.m4 (gl_FUNC_RENAME): Likewise.
42634         * m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise.
42635         * m4/select.m4 (gl_FUNC_SELECT): Likewise.
42636         * m4/stat.m4 (gl_FUNC_STAT): Likewise.
42637         * m4/symlink.m4 (gl_FUNC_SYMLINK): Likewise.
42638         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Likewise.
42639         * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise.
42640         * m4/utimens.m4 (gl_UTIMENS): Likewise.
42642 2018-05-13  Bruno Haible  <bruno@clisp.org>
42644         getpagesize: Fix compilation error on Android.
42645         * m4/getpagesize.m4 (gl_CHECK_FUNC_GETPAGESIZE): New macro.
42646         (gl_FUNC_GETPAGESIZE): Invoke it instead of AC_CHECK_FUNC.
42647         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Don't invoke
42648         AC_CHECK_FUNC. Instead, invoke gl_CHECK_FUNC_GETPAGESIZE and define
42649         HAVE_GETPAGESIZE accordingly.
42650         * modules/getcwd (Files): Add m4/getpagesize.m4.
42652 2018-05-13  Bruno Haible  <bruno@clisp.org>
42654         tcgetsid: Fix compilation error on Android.
42655         * m4/tcgetsid.m4 (gl_FUNC_TCGETSID): Use AC_LINK_IFELSE instead of
42656         AC_CHECK_FUNC.
42658 2018-05-13  Bruno Haible  <bruno@clisp.org>
42660         getpass: Fix configure test for Android.
42661         * m4/getpass.m4 (gl_PREREQ_GETPASS): Use AC_LINK_IFELSE instead of
42662         AC_CHECK_FUNC.
42664 2018-05-13  Bruno Haible  <bruno@clisp.org>
42666         ffs: Fix compilation error on Android.
42667         * m4/ffs.m4 (gl_FUNC_FFS): Use AC_LINK_IFELSE instead of AC_CHECK_FUNC.
42669 2018-05-13  Bruno Haible  <bruno@clisp.org>
42671         mkfifo: Fix compilation error on Android.
42672         * m4/mkfifo.m4 (gl_FUNC_MKFIFO): Use AC_LINK_IFELSE instead of
42673         AC_CHECK_FUNC.
42675 2018-05-13  Bruno Haible  <bruno@clisp.org>
42677         c-strtod: Fix configure test for Android.
42678         * m4/c-strtod.m4 (gl_C_STRTOD): Use AC_LINK_IFELSE instead of
42679         AC_CHECK_FUNC.
42681 2018-05-13  Bruno Haible  <bruno@clisp.org>
42683         random: Fix compilation error on Android.
42684         * m4/random.m4 (gl_FUNC_RANDOM): Use AC_LINK_IFELSE instead of
42685         AC_CHECK_FUNC.
42687 2018-05-13  Bruno Haible  <bruno@clisp.org>
42689         grantpt: Fix compilation error on Android.
42690         * m4/grantpt.m4 (gl_FUNC_GRANTPT): Use AC_LINK_IFELSE instead of
42691         AC_CHECK_FUNC.
42693 2018-05-13  Bruno Haible  <bruno@clisp.org>
42695         stdioext: Fix compilation errors with newer Android headers.
42696         * lib/stdio-impl.h (fp_, fp_ub): Define differently for Android.
42697         (__SLBF, __SNBF, __SRD, __SWR, __SRW, __SEOF, __SERR, __SOFF): Define
42698         fallbacks for Android.
42699         * lib/fpending.c: Update comments.
42700         * lib/fpurge.c: Likewise.
42701         * lib/freadable.h: Likewise.
42702         * lib/freadable.c: Likewise.
42703         * lib/freadahead.c: Likewise.
42704         * lib/freading.h: Likewise.
42705         * lib/freadptr.c: Likewise.
42706         * lib/fseterr.c: Likewise.
42707         * lib/fwritable.h: Likewise.
42708         * lib/fwritable.c: Likewise.
42709         * lib/fwriting.h: Likewise.
42710         * lib/fwriting.c: Likewise.
42712 2018-05-13  Bruno Haible  <bruno@clisp.org>
42714         doc: Add info about Android versions 2.0 to 8.1.
42715         * doc/**/*.texi: Add info about functions in all released versions of
42716         Bionic.
42718 2018-05-12  Bruno Haible  <bruno@clisp.org>
42720         fseeko: On mingw, don't use the hidden function _fseeki64.
42721         Reported by Eli Zaretskii <eliz@gnu.org>.
42722         * m4/fseeko.m4 (gl_PREREQ_FSEEKO): Test whether _fseeki64 is declared.
42723         * lib/fseeko.c (fseeko): Use _fseeki64 only if it is declared.
42725 2018-05-12  Bruno Haible  <bruno@clisp.org>
42727         glob: Choose 'dirent_type' in a way that works better on mingw.
42728         Reported and suggested by Eli Zaretskii <eliz@gnu.org>.
42729         * lib/glob.c (dirent_type): Define as uint_fast32_t.
42731 2018-05-12  Bruno Haible  <bruno@clisp.org>
42733         execute, spawn-pipe: Avoid warning about redefining 'close'.
42734         Reported by Eli Zaretskii <eliz@gnu.org>.
42735         * lib/execute.c: Undefine 'close' before redefining it.
42736         * lib/spawn-pipe.c: Likewise.
42738 2018-05-12  Bruno Haible  <bruno@clisp.org>
42740         nanosleep: Avoid test failure on mingw when it has nanosleep.
42741         Reported by Eli Zaretskii <eliz@gnu.org>.
42742         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check whether alarm() exists.
42743         If it does not exist, use a simpler test program that does not call
42744         alarm().
42746 2018-05-10  Bruno Haible  <bruno@clisp.org>
42748         lock, cond, thread, tls: Use a different symbol as libpthread witness.
42749         Reported by Devin Hussey <husseydevin@gmail.com>.
42750         Based on a patch by Paul Eggert.
42751         * lib/glthread/lock.h (pthread_in_use): Use 'pthread_mutexattr_gettype'
42752         as witness of libpthread.
42753         * lib/glthread/cond.h (pthread_in_use): Likewise.
42754         * lib/glthread/thread.h (pthread_in_use): Likewise.
42755         * lib/glthread/tls.h (pthread_in_use): Likewise.
42757 2018-05-10  Bruno Haible  <bruno@clisp.org>
42759         cond tests: Fix compilation error on Solaris.
42760         * tests/test-cond.c: Include <unistd.h> before defining 'yield' as a
42761         macro.
42763 2018-05-10  Bruno Haible  <bruno@clisp.org>
42765         doc: Add partial info about Android 4.3.
42766         * doc/*-functions/*.texi: Add info about functions that were added
42767         to Bionic between Android 4.3 and Android 9.0.
42769 2018-05-10  Bruno Haible  <bruno@clisp.org>
42771         doc: Add info about Android 9.0.
42772         * doc/**/*.texi: Add info about functions and headers in Bionic from
42773         Android 9.0.
42775 2018-05-09  Paul Eggert  <eggert@cs.ucla.edu>
42777         af_alg: fix my typo in afalg_buffer
42778         * lib/af_alg.c (afalg_buffer): Fix typo I recently introduced.
42779         (afalg_stream): Simplify and avoid the need for a runtime test
42780         at the end.
42782         af_alg: recover better from crypto failures
42783         * lib/af_alg.c (afalg_stream): Recover from crypto failures if the
42784         input stream is seekable, by repositioning the stream back to
42785         where it was, possibly by just calling sendfile with an offset
42786         arg.  This lets us return -EAFNOSUPPORT instead of -EIO in some
42787         cases, which lets our callers try again with user-mode code.
42788         * modules/crypto/af_alg (Depends-on): Depend on fseeko and ftello
42789         instead of on fflush and lseek.
42791         af_alg: distiguish I/O errors better
42792         * lib/af_alg.c (afalg_buffer, afalg_stream): Return -EAFNOSUPPORT,
42793         not -EIO, if it’s OK for the caller to try again with user-mode code.
42794         (afalg_stream) [!_WIN32 || __CYGWIN__]: Return -EIO (not possibly
42795         some other error number) if fflush fails, as the caller should not
42796         try again that case.
42798         af_alg: avoid gotos
42799         * lib/af_alg.c (afalg_buffer, afalg_stream): Rewrite to avoid
42800         gotos, as they were a source of unreliability and made the code a
42801         bit harder to follow.
42803         af_alg: don’t leak file descriptors into children
42804         * lib/af_alg.c (alg_socket): Use SOCK_CLOEXEC when creating sockets.
42805         This code should be compiled only on recent GNU/Linux platforms
42806         so we shouldn’t have to also depend on the accept4 module.
42808         af_alg: coalesce socket creation
42809         * lib/af_alg.c (alg_socket): New function.
42810         (afalg_buffer, afalg_stream): Use it.  This avoids some
42811         code duplication and gotos.
42813         af_alg: fix file descriptor leak
42814         * lib/af_alg.c (afalg_stream): Close leak.
42816         af_alg: Pacify --enable-gcc-warnings on GCC 8
42817         * lib/af_alg.c (afalg_buffer, afalg_stream): Reorder local decls
42818         and checking to pacify gcc -Wjump-misses-init on GCC 8.
42820 2018-05-07  Paul Eggert  <eggert@cs.ucla.edu>
42822         af_alg: Pacify --enable-gcc-warnings
42823         Problem reported by Assaf Gordon in:
42824         https://lists.gnu.org/r/bug-gnulib/2018-05/msg00041.html
42825         * lib/af_alg.c (afalg_buffer): Move local decls to pacify
42826         gcc -Wjump-misses-init.
42827         * lib/sha512.c (shaxxx_stream): Now static.
42829 2018-05-06  Bruno Haible  <bruno@clisp.org>
42831         af_alg: Add ability to use Linux kernel crypto API on data in memory.
42832         * lib/af_alg.h (afalg_buffer): New declaration.
42833         * lib/af_alg.c (afalg_buffer): New function.
42835 2018-05-06  Bruno Haible  <bruno@clisp.org>
42837         af_alg: Avoid warnings.
42838         * lib/af_alg.h (afalg_stream): Mark fallback declaration as inline.
42839         * m4/af_alg.m4 (gl_AF_ALG): Require AC_C_INLINE.
42841 2018-05-06  Bruno Haible  <bruno@clisp.org>
42843         crypto/{md5,sha1,sha256,sha512} tests: Add benchmarks.
42844         * tests/bench-digest.h: New file.
42845         * tests/bench-md5.c: New file.
42846         * tests/bench-sha1.c: New file.
42847         * tests/bench-sha224.c: New file.
42848         * tests/bench-sha256.c: New file.
42849         * tests/bench-sha384.c: New file.
42850         * tests/bench-sha512.c: New file.
42851         * modules/crypto/md5-tests (Files): Add tests/bench-md5.c,
42852         tests/bench-digest.h.
42853         (Depends-on): Add getrusage, gettimeofday.
42854         (Makefile.am): Add variables to build bench-md5.
42855         * modules/crypto/sha1-tests (Files): Add tests/bench-sha1.c,
42856         tests/bench-digest.h.
42857         (Depends-on): Add getrusage, gettimeofday.
42858         (Makefile.am): Add variables to build bench-sha1.
42859         * modules/crypto/sha256-tests (Files): Add tests/bench-sha224.c,
42860         tests/bench-sha256.c, tests/bench-digest.h.
42861         (Depends-on): Add getrusage, gettimeofday.
42862         (Makefile.am): Add variables to build bench-sha224, bench-sha256.
42863         * modules/crypto/sha512-tests (Files): Add tests/bench-sha384.c,
42864         tests/bench-sha512.c, tests/bench-digest.h.
42865         (Depends-on): Add getrusage, gettimeofday.
42866         (Makefile.am): Add variables to build bench-sha384, bench-sha512.
42868 2018-05-06  Bruno Haible  <bruno@clisp.org>
42870         af_alg: Fix a resource leak.
42871         * lib/af_alg.c (afalg_stream): Close socket before returning -EINVAL.
42872         New local variable 'result'.
42874 2018-05-06  Bruno Haible  <bruno@clisp.org>
42876         af_alg: Fix bug with streams that are not at position 0.
42877         * lib/af_alg.c (afalg_stream): Before sendfile, invoke fflush. Don't
42878         assume that the stream is positioned at position 0.
42879         * lib/af_alg.h (afalg_stream): Mention restriction regarding the state
42880         of the stream.
42881         * lib/md5.h (md5_stream): Likewise.
42882         * lib/sha1.h (sha1_stream): Likewise.
42883         * lib/sha256.h (sha256_stream, sha224_stream): Likewise.
42884         * lib/sha512.h (sha512_stream, sha384_stream): Likewise.
42885         * modules/crypto/af_alg (Depends-on): Add fflush, lseek.
42887         crypto/{md5,sha1,sha256,sha512} tests: Enhance test.
42888         * tests/test-digest.h (test_digest_on_files): Add a test with a FILE
42889         stream that is not positioned at the beginning.
42891 2018-05-06  Bruno Haible  <bruno@clisp.org>
42893         af_alg: Add configure option to enable/disable use of Linux crypto API.
42894         Suggested by Assaf Gordon <assafgordon@gmail.com>.
42895         * m4/af_alg.m4 (gl_AF_ALG): Add AC_ARG_WITH invocation. Define C macro
42896         USE_LINUX_CRYPTO_API.
42897         * lib/af_alg.h: Test USE_LINUX_CRYPTO_API, not HAVE_LINUX_IF_ALG_H.
42898         * lib/af_alg.c: Likewise.
42900 2018-05-06  Bruno Haible  <bruno@clisp.org>
42902         Followup to 'af_alg: New module.'.
42903         * modules/crypto/md5 (Depends-on): Remove sys_socket, sys_stat.
42904         * modules/crypto/sha1 (Depends-on): Likewise.
42905         * modules/crypto/sha256 (Depends-on): Likewise.
42906         * modules/crypto/sha512 (Depends-on): Likewise.
42908 2018-05-05  Paul Eggert  <eggert@cs.ucla.edu>
42910         crypto/{md5,sha1,sha256,sha512}: simplify
42911         * lib/md5.c (md5_stream):
42912         * lib/sha1.c (sha1_stream):
42913         * lib/sha256.c (shaxxx_stream):
42914         Simplify, partly by assuming C99.
42915         * lib/sha256.c (shaxxx_stream):
42916         New function, which implements both sha256 and sha224.
42917         Simplify, partly by assuming C99.
42918         (sha256_stream, sha224_stream):
42919         Use it to avoid code duplication, removing a FIXME.
42920         * lib/sha512.c (shaxxx_stream, sha512_stream, sha384_stream):
42921         Likewise.
42923         af_alg: Improve comments.
42924         * lib/af_alg.h: Use imperatives and tighten up wording.
42926 2018-05-05  Bruno Haible  <bruno@clisp.org>
42928         af_alg: Improve comments.
42929         * lib/af_alg.c (afalg_stream): Improve comment about kernel bug.
42931 2018-05-05  Bruno Haible  <bruno@clisp.org>
42933         af_alg: New module.
42934         * lib/af_alg.h: Test HAVE_* macro through '#if', not '#ifdef'.
42935         * lib/af_alg.c: Include "af_alg.h" before the other header files.
42936         * lib/md5.c: Include "af_alg.h" unconditionally.
42937         (md5_stream): Invoke afalg_stream unconditionally.
42938         * lib/sha1.c: Include "af_alg.h" unconditionally.
42939         (sha1_stream): Invoke afalg_stream unconditionally.
42940         * lib/sha256.c: Include "af_alg.h" unconditionally.
42941         (sha256_stream, sha224_stream): Invoke afalg_stream unconditionally.
42942         * lib/sha512.c: Include "af_alg.h" unconditionally.
42943         (sha512_stream, sha384_stream): Invoke afalg_stream unconditionally.
42944         * m4/af_alg.m4: Renamed from m4/linux-if-alg.m4.
42945         (gl_AF_ALG): Renamed from gl_LINUX_IF_ALG_H.
42946         * modules/crypto/af_alg: New file.
42947         * modules/crypto/md5 (Files): Remove files that are now in the
42948         'crypto/af_alg' module.
42949         (Depends-on): Add crypto/af_alg.
42950         (configure.ac): Remove gl_LINUX_IF_ALG_H invocation.
42951         (Makefile.am): Don't mention af_alg.c here.
42952         * modules/crypto/sha1 (Files): Remove files that are now in the
42953         'crypto/af_alg' module.
42954         (Depends-on): Add crypto/af_alg.
42955         (configure.ac): Remove gl_LINUX_IF_ALG_H invocation.
42956         (Makefile.am): Don't mention af_alg.c here.
42957         * modules/crypto/sha256 (Files): Remove files that are now in the
42958         'crypto/af_alg' module.
42959         (Depends-on): Add crypto/af_alg.
42960         (configure.ac): Remove gl_LINUX_IF_ALG_H invocation.
42961         (Makefile.am): Don't mention af_alg.c here.
42962         * modules/crypto/sha512 (Files): Remove files that are now in the
42963         'crypto/af_alg' module.
42964         (Depends-on): Add crypto/af_alg.
42965         (configure.ac): Remove gl_LINUX_IF_ALG_H invocation.
42966         (Makefile.am): Don't mention af_alg.c here.
42968 2018-05-05  Paul Eggert  <eggert@cs.ucla.edu>
42970         crypto tests: pacify GCC
42971         * tests/test-digest.h (test_digest_on_files):
42972         Don’t assume digest size fits in int (!).
42974         af_alg: minor style improvements
42975         * lib/af_alg.c (afalg_stream): Prefer C99 style
42976         decl-after-statement, since we’re already assuming C99.  Clarify
42977         by strengthening the bind test and omit unnecessary assignment.
42979 2018-05-05  Bruno Haible  <bruno@clisp.org>
42981         af_alg: Fix bug on empty files.
42982         * lib/af_alg.c (afalg_stream): Ignore the kernel's result if the input
42983         stream is empty.
42985 2018-05-05  Paul Eggert  <eggert@cs.ucla.edu>
42987         sys-limits.h: new file for crypto and safe I/O
42988         * lib/af_alg.c: Include sys-limits.h.
42989         (MAX_RW_COUNT): Remove.  Use replaced by SYS_BUFSIZE_MAX.
42990         (afalg_stream): Also reject negative sizes for sendfile; they
42991         should not happen and the code is a bit cleaner and faster this way.
42992         * lib/safe-read.c: Include sys-limits.h.
42993         (BUGGY_READ_MAXIMUM): Remove.  All uses replaced by SYS_BUFSIZE_MAX.
42994         * lib/sys-limits.h: New file, with values and commentary derived
42995         from the old safe-read.c and from GNU Emacs sysdep.c.
42996         * modules/crypto/md5, modules/crypto/sha1, modules/crypto/sha256:
42997         * modules/crypto/sha512, modules/safe-read, modules/safe-write:
42998         Add lib/sys-limits.h to Files section.
43000 2018-05-05  Bruno Haible  <bruno@clisp.org>
43002         af_alg: Improve function signature.
43003         * lib/af_alg.h (afalg_stream): Swap second and third argument.
43004         * lib/af_alg.c (afalg_stream): Likewise.
43005         * lib/md5.c, lib/sha1.c, lib/sha256.c, lib/sha512.c: Callers changed.
43007 2018-05-05  Bruno Haible  <bruno@clisp.org>
43009         crypto/{md5,sha1,sha256,sha512}: Fix compilation error (S_TYPEISTMO).
43010         * modules/crypto/md5 (Depends-on): Add 'sys_stat'.
43011         * modules/crypto/sha1 (Depends-on): Likewise.
43012         * modules/crypto/sha256 (Depends-on): Likewise.
43013         * modules/crypto/sha512 (Depends-on): Likewise.
43015 2018-05-05  Bruno Haible  <bruno@clisp.org>
43017         crypto/{md5,sha1,sha256,sha512}: Fix module description.
43018         * modules/crypto/md5 (Depends-on): Add 'sys_socket'.
43019         * modules/crypto/sha1 (Depends-on): Likewise.
43020         * modules/crypto/sha256 (Depends-on): Likewise.
43021         * modules/crypto/sha512 (Depends-on): Likewise.
43023 2018-05-05  Bruno Haible  <bruno@clisp.org>
43025         af_alg: Add documentation.
43026         * lib/af_alg.h: Add comments.
43028 2018-05-05  Bruno Haible  <bruno@clisp.org>
43030         sha512: Add tests.
43031         * tests/test-sha512.c: New file.
43032         * modules/crypto/sha512-tests: New file.
43034 2018-05-05  Bruno Haible  <bruno@clisp.org>
43036         sha256: Add tests.
43037         * tests/test-sha256.c: New file.
43038         * modules/crypto/sha256-tests: New file.
43040 2018-05-05  Bruno Haible  <bruno@clisp.org>
43042         sha1 tests: Add test for sha1_stream.
43043         * tests/test-sha1.c: Include test-digest.h.
43044         (main): Invoke test_digest_on_files on 'sha1_stream'.
43045         * modules/crypto/sha1-tests (Files): Add tests/test-digest.h.
43047 2018-05-05  Bruno Haible  <bruno@clisp.org>
43049         md5 tests: Add test for md5_stream.
43050         * tests/test-digest.h: New file.
43051         * tests/test-md5.c: Include test-digest.h.
43052         (main): Invoke test_digest_on_files on 'md5_stream'.
43053         * modules/crypto/md5-tests (Files): Add tests/test-digest.h.
43055 2018-04-28  Matteo Croce  <mcroce@redhat.com>
43057         md5sum: Use AF_ALG when available.
43058         * lib/md5.c: Include af_alg.h.
43059         (md5_stream): Use afalg_stream when available.
43060         * modules/crypto/md5 (Files): Add the af_alg files.
43061         (configure.ac): Invoke gl_LINUX_IF_ALG_H.
43062         (Makefile.am): Add af_alg.c.
43064 2018-04-28  Matteo Croce  <mcroce@redhat.com>
43066         sha512sum: Use AF_ALG when available.
43067         * lib/sha512.c: Include af_alg.h.
43068         (sha512_stream, sha384_stream): Use afalg_stream when available.
43069         * modules/crypto/sha512 (Files): Add the af_alg files.
43070         (configure.ac): Invoke gl_LINUX_IF_ALG_H.
43071         (Makefile.am): Add af_alg.c.
43073 2018-04-28  Matteo Croce  <mcroce@redhat.com>
43075         sha256sum: Use AF_ALG when available.
43076         * lib/sha256.c: Include af_alg.h.
43077         (sha256_stream, sha224_stream): Use afalg_stream when available.
43078         * modules/crypto/sha256 (Files): Add the af_alg files.
43079         (configure.ac): Invoke gl_LINUX_IF_ALG_H.
43080         (Makefile.am): Add af_alg.c.
43082 2018-04-28  Matteo Croce  <mcroce@redhat.com>
43084         sha1sum: Use AF_ALG when available.
43085         * lib/af_alg.h: New file.
43086         * lib/af_alg.c: New file.
43087         * lib/sha1.c: Include af_alg.h.
43088         (sha1_stream): Use afalg_stream when available.
43089         * m4/linux-if-alg.m4: New file.
43090         * modules/crypto/sha1 (Files): Add the new files.
43091         (configure.ac): Invoke gl_LINUX_IF_ALG_H.
43092         (Makefile.am): Add af_alg.c.
43094 2018-05-05  Bruno Haible  <bruno@clisp.org>
43096         all: Replace more http URLs by https URLs.
43097         * lib/localename.c: Use https: URL.
43098         * lib/timespec.h: Likewise.
43100 2018-05-03  Paul Eggert  <eggert@cs.ucla.edu>
43102         maint: port more modules to GCC 8
43103         * lib/dirname.h (base_name):
43104         * lib/exclude.h (new_exclude):
43105         * lib/xstrndup.h (xstrndup):
43106         Add malloc attribute.
43107         * lib/readutmp.c: Pacify GCC 8 about safe use of strncpy.
43108         * lib/sig-handler.h (get_handler) [SA_SIGINFO]: Simplify.
43109         This pacifies GCC 8.
43110         * m4/gnulib-common.m4 (gl_COMMON_BODY):
43111         Define _GL_ATTRIBUTE_MALLOC here.  All other definitions removed.
43113 2018-05-03  Bruno Haible  <bruno@clisp.org>
43115         Simplify code. Drop support for Borland C++ on Windows.
43116         Reported by Gisle Vanem <gisle.vanem@gmail.com>.
43117         * lib/accept4.c: Simplify 'defined _WIN32 || defined __WIN32__' to just
43118         'defined _WIN32'.
43119         * lib/canonicalize-lgpl.c: Likewise.
43120         * lib/classpath.c: Likewise.
43121         * lib/clean-temp.c: Likewise.
43122         * lib/csharpexec.c: Likewise.
43123         * lib/ctime.c: Likewise.
43124         * lib/dosname.h: Likewise.
43125         * lib/dup2.c: Likewise.
43126         * lib/errno.in.h: Likewise.
43127         * lib/error.c: Likewise.
43128         * lib/euidaccess.c: Likewise.
43129         * lib/execute.c: Likewise.
43130         * lib/fcntl.in.h: Likewise.
43131         * lib/fcntl.c: Likewise.
43132         * lib/filename.h: Likewise.
43133         * lib/findprog.c: Likewise.
43134         * lib/flock.c: Likewise.
43135         * lib/fopen.c: Likewise.
43136         * lib/freopen.c: Likewise.
43137         * lib/fstat.c: Likewise.
43138         * lib/fsync.c: Likewise.
43139         * lib/gc-gnulib.c: Likewise.
43140         * lib/get-rusage-data.c: Likewise.
43141         * lib/getaddrinfo.c: Likewise.
43142         * lib/getdelim.c: Likewise.
43143         * lib/getdtablesize.c: Likewise.
43144         * lib/gethostname.c: Likewise.
43145         * lib/getlogin.c: Likewise.
43146         * lib/getlogin_r.c: Likewise.
43147         * lib/getopt.c: Likewise.
43148         * lib/getpagesize.c: Likewise.
43149         * lib/getpass.c: Likewise.
43150         * lib/getrusage.c: Likewise.
43151         * lib/gettimeofday.c: Likewise.
43152         * lib/glob.c: Likewise.
43153         * lib/inttypes.in.h: Likewise.
43154         * lib/isapipe.c: Likewise.
43155         * lib/javaexec.c: Likewise.
43156         * lib/link.c: Likewise.
43157         * lib/localcharset.c: Likewise.
43158         * lib/localename.h: Likewise.
43159         * lib/localename.c: Likewise.
43160         * lib/localtime.c: Likewise.
43161         * lib/lseek.c: Likewise.
43162         * lib/mbsinit.c: Likewise.
43163         * lib/mkdir.c: Likewise.
43164         * lib/msvc-nothrow.h: Likewise.
43165         * lib/nanosleep.c: Likewise.
43166         * lib/nl_langinfo.c: Likewise.
43167         * lib/nonblocking.c: Likewise.
43168         * lib/nproc.c: Likewise.
43169         * lib/open.c: Likewise.
43170         * lib/openpty.c: Likewise.
43171         * lib/pathmax.h: Likewise.
43172         * lib/pipe-filter-aux.c: Likewise.
43173         * lib/pipe-filter-gi.c: Likewise.
43174         * lib/pipe-filter-ii.c: Likewise.
43175         * lib/pipe.c: Likewise.
43176         * lib/pipe2.c: Likewise.
43177         * lib/poll.c: Likewise.
43178         * lib/popen.c: Likewise.
43179         * lib/posix_openpt.c: Likewise.
43180         * lib/printf-parse.c: Likewise.
43181         * lib/progreloc.c: Likewise.
43182         * lib/putenv.c: Likewise.
43183         * lib/read.c: Likewise.
43184         * lib/relocatable.c: Likewise.
43185         * lib/rename.c: Likewise.
43186         * lib/same-inode.h: Likewise.
43187         * lib/secure_getenv.c: Likewise.
43188         * lib/select.c: Likewise.
43189         * lib/sethostname.c: Likewise.
43190         * lib/setlocale.c: Likewise.
43191         * lib/sigaction.c: Likewise.
43192         * lib/sigprocmask.c: Likewise.
43193         * lib/sleep.c: Likewise.
43194         * lib/spawn-pipe.h: Likewise.
43195         * lib/spawn-pipe.c: Likewise.
43196         * lib/spawni.c: Likewise.
43197         * lib/stat-time.h: Likewise.
43198         * lib/stat-w32.c: Likewise.
43199         * lib/stat.c: Likewise.
43200         * lib/stdio.in.h: Likewise.
43201         * lib/stdio-impl.h: Likewise.
43202         * lib/stdio-read.c: Likewise.
43203         * lib/stdio-write.c: Likewise.
43204         * lib/stdlib.in.h: Likewise.
43205         * lib/strerror_r.c: Likewise.
43206         * lib/strftime-fixes.c: Likewise.
43207         * lib/sys_stat.in.h: Likewise.
43208         * lib/sys_types.in.h: Likewise.
43209         * lib/sys_wait.in.h : Likewise.
43210         * lib/system-quote.h: Likewise.
43211         * lib/system-quote.c: Likewise.
43212         * lib/tmpdir.c: Likewise.
43213         * lib/tzset.c: Likewise.
43214         * lib/uname.c: Likewise.
43215         * lib/unistd.in.h: Likewise.
43216         * lib/utime.in.h: Likewise.
43217         * lib/utime.c: Likewise.
43218         * lib/utimecmp.c: Likewise.
43219         * lib/utimens.c: Likewise.
43220         * lib/vasnprintf.c: Likewise.
43221         * lib/vma-iter.h: Likewise.
43222         * lib/vma-iter.c: Likewise.
43223         * lib/wait-process.c: Likewise.
43224         * lib/wcsftime.c: Likewise.
43225         * lib/wctype.in.h: Likewise.
43226         * lib/write.c: Likewise.
43227         * tests/nap.h: Likewise.
43228         * tests/test-cloexec.c: Likewise.
43229         * tests/test-dup-safer.c: Likewise.
43230         * tests/test-dup2.c: Likewise.
43231         * tests/test-dup3.c: Likewise.
43232         * tests/test-fcntl.c: Likewise.
43233         * tests/test-get-rusage-data.c: Likewise.
43234         * tests/test-getaddrinfo.c: Likewise.
43235         * tests/test-getlogin.h: Likewise.
43236         * tests/test-isatty.c: Likewise.
43237         * tests/test-localename.c: Likewise.
43238         * tests/test-mbrtowc-w32.c: Likewise.
43239         * tests/test-nonblocking.c: Likewise.
43240         * tests/test-nonblocking-pipe-main.c: Likewise.
43241         * tests/test-nonblocking-socket-main.c: Likewise.
43242         * tests/test-nonblocking-socket.h: Likewise.
43243         * tests/test-pipe.c: Likewise.
43244         * tests/test-pipe2.c: Likewise.
43245         * tests/test-poll.c: Likewise.
43246         * tests/test-pthread_sigmask1.c: Likewise.
43247         * tests/test-select.h: Likewise.
43248         * tests/test-sethostname2.c: Likewise.
43249         * tests/test-sigprocmask.c: Likewise.
43250         * tests/test-spawn-pipe-child.c: Likewise.
43251         * tests/test-stat-time.c: Likewise.
43252         * tests/test-system-quote-main.c: Likewise.
43253         * tests/test-utimens-common.h: Likewise.
43254         * tests/test-wcrtomb-w32.c: Likewise.
43255         * m4/csharpexec.m4 (gt_CSHARPEXEC): Likewise.
43256         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Likewise.
43257         * m4/javacomp.m4 (gt_JAVACOMP): Likewise.
43258         * m4/javaexec.m4 (gt_JAVAEXEC): Likewise.
43259         * m4/locale-ar.m4 (gt_LOCALE_AR): Likewise.
43260         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Likewise.
43261         * m4/locale-ja.m4 (gt_LOCALE_JA): Likewise.
43262         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.
43263         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
43264         * m4/malloc.m4 (gl_CHECK_MALLOC_POSIX): Likewise.
43265         * m4/nocrash.m4 (GL_NOCRASH): Likewise.
43266         * m4/pathmax.m4 (gl_PATHMAX_SNIPPET): Likewise.
43267         * m4/ptsname_r.m4 (gl_PREREQ_PTSNAME_R): Likewise.
43268         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
43269         * m4/tmpfile.m4 (gl_FUNC_TMPFILE): Likewise.
43270         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
43272 2018-05-02  Bruno Haible  <bruno@clisp.org>
43274         localename: Fix test failures on mingw.
43275         * lib/localename.c (gl_locale_name_thread): Remove code specific to
43276         native Windows.
43277         (gl_locale_name_posix): Move code specific to native Windows here.
43278         * tests/test-localename.c (test_locale_name, test_locale_name_posix):
43279         Accept result without charset suffix, as it appears on mingw.
43281 2018-04-28  Paul Smith  <psmith@gnu.org>
43283         bootstrap: Avoid gnulib operations if not needed
43284         * build-aux/bootstrap: Remove unused variable gnulib_mk.
43285         Set $gnulib_extra_files early so it can be overridden in .conf.
43286         Remove redundant --import flag from $gnulib_tool_options.
43287         Set $use_gnulib to false if no gnulib modules or files are needed.
43288         If $use_gnulib is false, don't do anything related to gnulib.
43289         A lot of this is just whitespace (indentation) changes.
43291 2018-04-27  Paul Eggert  <eggert@cs.ucla.edu>
43293         manywarnings: port to GCC 8.0
43294         * build-aux/gcc-warning.spec: Add -Wcatch-value,
43295         -Wclass-memaccess, -Wdo-subscript, -Wextra-semi.  Adjust to the
43296         fact that the GCC help message now mentions operands for
43297         -Warray-bounds, -Wformat, -Wformat-overflow, -Wformat-truncation,
43298         -Wimplicit-fallthrough, -Wplacement-new, -Wshift-overflow,
43299         -Wstrict-aliasing, -Wstrict-overflow, -Wstringop-overflow,
43300         and -Wunused-const-variable.
43301         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -Wattribute-alias,
43302         -Wcast-align=strict, -Wcast-function-type, -Wif-not-aligned,
43303         -Wmissing-attributes, -Wmultistatement-macros,
43304         -Wpacked-not-aligned, -Wsizeof-pointer-div, -Wstringop-truncation,
43305         -Wsuggest-attribute=cold, -Wsuggest-attribute=malloc.
43307 2018-04-24  Bruno Haible  <bruno@clisp.org>
43309         sys_socket: Make SO_REUSEPORT available across platforms.
43310         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
43311         * lib/sys_socket.in.h (SO_REUSEPORT): New macro.
43312         * doc/posix-headers/sys_socket.texi: Mention the issue.
43313         * tests/test-poll.c (SO_REUSEPORT): Remove.
43314         * tests/test-select.h: Include <sys/socket.h>.
43315         (SO_REUSEPORT): Remove.
43316         * modules/select-tests (Depends-on): Add 'sys_socket'.
43318 2018-04-21  Benno Schulenberg  <bensberg@telfort.nl>  (tiny change)
43320         localcharset: short-circuit the search for an alias on a Mac
43321         * lib/localcharset.c (get_charset_aliases): Add a tautological
43322         UTF-8 entry to speed up the search for this case.
43323         Most machines default to a UTF-8 locale nowadays, so begin the
43324         list of aliases with a dummy UTF-8 entry so it will be found
43325         immediately and a time-consuming search through the rest of
43326         the list is avoided.
43328 2018-04-11  Paul Eggert  <eggert@cs.ucla.edu>
43330         fts: add comment
43331         * lib/fts.c (fts_build): Explain why ==, not >.
43332         See remark by Bernhard Voelker in:
43333         https://lists.gnu.org/r/bug-gnulib/2018-04/msg00041.html
43335         fts: fix bug in find across filesystems
43336         This fixes a bug I introduced last summer.
43337         Problem reported by Kamil Dudka in:
43338         https://lists.gnu.org/r/bug-gnulib/2018-04/msg00033.html
43339         * lib/fts.c (filesystem_type, dirent_inode_sort_may_be_useful)
43340         (leaf_optimization):
43341         New arg for file descriptor.  All callers changed.
43342         (fts_build): Check for whether inodes should be sorted
43343         before closing the directory.
43345 2018-04-07  Bruno Haible  <bruno@clisp.org>
43347         unicase/u*-context: Fix link errors with libunistring <= 0.9.9.
43348         Reported by Genki Sky <sky@genki.is>.
43349         * modules/unicase/u8-prefix-context (configure.ac): Require libunistring
43350         version 0.9.10 or newer.
43351         * modules/unicase/u8-suffix-context (configure.ac): Likewise.
43352         * modules/unicase/u16-prefix-context (configure.ac): Likewise.
43353         * modules/unicase/u16-suffix-context (configure.ac): Likewise.
43354         * modules/unicase/u32-prefix-context (configure.ac): Likewise.
43355         * modules/unicase/u32-suffix-context (configure.ac): Likewise.
43357 2018-04-07  Bruno Haible  <bruno@clisp.org>
43359         execute: Update comment.
43360         * lib/execute.h (execute): Refer to spawn-pipe.h, not pipe.h.
43362 2018-04-05  Paul Eggert  <eggert@cs.ucla.edu>
43364         fts: treat CIFS like NFS
43365         Problem reported by Kamil Dudka in:
43366         https://lists.gnu.org/r/bug-gnulib/2018-04/msg00015.html
43367         * lib/fts.c (S_MAGIC_CIFS): New macro.
43368         (dirent_inode_sort_may_be_useful, leaf_optimization):
43369         Treat CIFS like NFS.
43371 2018-03-28  Bruno Haible  <bruno@clisp.org>
43373         c-stack: Fix possible build failure on some platforms.
43374         * lib/c-stack.c (die): Define whenever this function is referenced.
43376 2018-03-28  Paul Eggert  <eggert@cs.ucla.edu>
43378         time_rz: fix workaround for Mac OS X 10.6 infloop
43379         Problems reported by Charles A. Roelli (Bug#27736#117).
43380         * m4/time_rz.m4 (gl_TIME_RZ): Use a slightly different timestamp.
43381         Also, discard output, which clutters the 'configure' log.
43383 2018-03-27  Paul Eggert  <eggert@cs.ucla.edu>
43385         havelib: port to Solaris 10 /bin/sh
43386         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Use 'test ! EXPR'
43387         instead of '! test EXPR'.
43389 2018-03-26  Paul Eggert  <eggert@cs.ucla.edu>
43391         time_rz: work around Mac OS X 10.6 infloop
43392         * doc/posix-functions/localtime.texi:
43393         * doc/posix-functions/localtime_r.texi: Mention the bug.
43394         * lib/time_rz.c (localtime_rz): Work around the bug.  It’d be
43395         better to fix localtime and localtime_r instead, but that would be
43396         more work and is not needed to fix the Emacs problem.
43397         * m4/time_rz.m4 (gl_TIME_RZ): Detect the bug.
43399 2018-03-24  Jim Meyering  <meyering@fb.com>
43401         test-version-etc.sh: don't use diff directly: use init.sh's compare
43402         We'd rather not sacrifice readable "diff -u" output even for
43403         "diff -c" output (not supported by busybox) or for even less
43404         readable ed-style "diff" output.  So use init.sh's compare function
43405         * tests/test-version-etc.sh: Source init.sh and add "." to path.
43406         Remove "./" from invocation of test-version-etc, so we use path.
43407         And s/diff/compare/.
43408         * modules/version-etc-tests (Depends-on): Add test-framework-sh,
43409         to get init.sh.
43410         Prompted by Eric Blake's comments in
43411         https://lists.gnu.org/r/sed-devel/2018-03/msg00015.html
43413 2018-03-24  Bruno Haible  <bruno@clisp.org>
43415         javacomp-script, javacomp: Add support for Java 10.
43416         * m4/javacomp.m4 (gt_JAVACOMP): Accept source-version 10 and
43417         target-version 10.
43418         * lib/javaversion.h: Update comments.
43419         * lib/javacomp.c (default_target_version, SOURCE_VERSION_BOUND,
43420         source_version_index, get_goodcode_snippet, get_failcode_snippet,
43421         TARGET_VERSION_BOUND, target_version_index,
43422         corresponding_classfile_version): Accept source_version 10 and
43423         target_version 10.
43424         * lib/javacomp.h: Update comments accordingly.
43426 2018-03-24  Bruno Haible  <bruno@clisp.org>
43428         javacomp-script, javacomp: Update comments.
43429         * m4/javacomp.m4: Update comments regarding gcj.
43430         * lib/javacomp.h: Likewise.
43432 2018-03-24  Bruno Haible  <bruno@clisp.org>
43434         javacomp-script, javacomp: Fix support for Java 7, 8, 9.
43435         * lib/javaversion.h: Update comments.
43436         * lib/javacomp.h: Likewise.
43437         * lib/javacomp.c (default_target_version, source_version_index,
43438         get_goodcode_snippet, get_failcode_snippet): Recognize "9" instead of
43439         "1.9".
43440         (TARGET_VERSION_BOUND): Bump to 9.
43441         (target_version_index, corresponding_classfile_version): Recognize "9"
43442         instead of "1.9".
43443         (get_source_version_for_javac): New function.
43444         (is_envjavac_nongcj_usable, is_javac_usable): Add
43445         source_version_for_javac argument.
43446         (compile_java_class): Determine and pass source_version_for_javac.
43447         * m4/javacomp.m4: Recognize version '9' instead of '1.9'. When invoking
43448         $JAVAC or javac, pass '-source 1.6' instead of '-source 1.5' when
43449         appropriate.
43451 2018-03-23  Jim Meyering  <meyering@fb.com>
43453         test-version-etc.sh: port to diff without -c
43454         * tests/test-version-etc.sh: Don't use diff's -c option.
43455         This caused spurious test failure on Alpine Linux, which
43456         uses busybox's diff. Reported by Assaf Gordon in
43457         https://lists.gnu.org/r/sed-devel/2018-03/msg00013.html
43459 2018-03-23  Paul Eggert  <eggert@cs.ucla.edu>
43461         c-stack: port to recent GCC build
43462         Problem reported by The Fireplace (Bug#30913).
43463         * lib/c-stack.c (die): Define only if used.
43465 2018-03-20  Bruno Haible  <bruno@clisp.org>
43467         euidaccess: Port to native Windows.
43468         * lib/euidaccess.c (euidaccess): On native Windows, just use _access().
43469         * posix-modules (exclude_for_mingw): Remove 'euidaccess'.
43471 2018-03-19  Bruno Haible  <bruno@clisp.org>
43473         javacomp: Add support for Java 7, 8, 9.
43474         * lib/javacomp.c (default_target_version, SOURCE_VERSION_BOUND,
43475         source_version_index, get_goodcode_snippet, get_failcode_snippet,
43476         corresponding_classfile_version): Accept source_version 1,7, 1.8, 1.9
43477         and target_version 1,7, 1.8, 1.9.
43478         * lib/javacomp.h: Update comments accordingly.
43480 2018-03-19  Bruno Haible  <bruno@clisp.org>
43482         javacomp-script: Add support for Java 9.
43483         * m4/javacomp.m4 (gt_JAVACOMP): Accept source-version 1.9 and
43484         target-version 1.9.
43486 2018-03-16  Bruno Haible  <bruno@clisp.org>
43488         glob: Don't compile replacements on recent glibc systems.
43489         * lib/glob.in.h: Use the usual idiom for the double-inclusion guard. If
43490         REPLACE_GLOB is 0, include the system's <glob.h> and use
43491         _GL_CXXALIAS_SYS.
43492         * m4/glob.m4 (gl_GLOB): Set REPLACE_GLOB instead of GLOB_H. Accept
43493         _GNU_GLOB_INTERFACE_VERSION 2 as well. Delete the file conf$$-globtest
43494         inside the AC_RUN_IFELSE block. Remove GL_GENERATE_GLOB_H conditional.
43495         * modules/glob (Dependencies): Test REPLACE_GLOB instead of GLOB_H.
43496         Remove snippet/warn-on-use.
43497         (configure.ac): Test REPLACE_GLOB instead of GLOB_H.
43498         (Makefile.am): Create glob.h always. Update list of substitutions in
43499         glob.h. Don't depend on $(WARN_ON_USE_H).
43501 2018-03-16  Bruno Haible  <bruno@clisp.org>
43503         glob: Fix link error on native Windows.
43504         * modules/glob (Depends-on): Add 'lstat'.
43506 2018-03-15  Bruno Haible  <bruno@clisp.org>
43508         glob: Fix compilation error in C++ mode.
43509         * lib/glob.in.h (_Restrict_): Define, like in regex.h and spawn.in.h.
43511 2018-03-15  Bruno Haible  <bruno@clisp.org>
43513         host-cpu-c-abi: Support for RISC-V CPU.
43514         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Recognize the various
43515         riscv32 and riscv64 ABIs.
43516         References:
43517         https://github.com/riscv/riscv-toolchain-conventions
43518         https://gcc.gnu.org/onlinedocs/gcc-7.3.0/gcc/RISC-V-Options.html
43519         https://gnu-mcu-eclipse.github.io/toolchain/riscv/
43521 2018-03-08  Paul Eggert  <eggert@cs.ucla.edu>
43523         fflush: be more paranoid about libio.h change
43524         Suggested by Eli Zaretskii in:
43525         https://lists.gnu.org/r/emacs-devel/2018-03/msg00270.html
43526         * lib/fbufmode.c (fbufmode):
43527         * lib/fflush.c (clear_ungetc_buffer_preserving_position)
43528         (disable_seek_optimization, rpl_fflush):
43529         * lib/fpending.c (__fpending):
43530         * lib/fpurge.c (fpurge):
43531         * lib/freadable.c (freadable):
43532         * lib/freadahead.c (freadahead):
43533         * lib/freading.c (freading):
43534         * lib/freadptr.c (freadptr):
43535         * lib/freadseek.c (freadptrinc):
43536         * lib/fseeko.c (fseeko):
43537         * lib/fseterr.c (fseterr):
43538         * lib/fwritable.c (fwritable):
43539         * lib/fwriting.c (fwriting):
43540         Look at _IO_ftrylockfile as well as at _IO_EOF_SEEN.
43542 2018-03-07  Paul Eggert  <eggert@cs.ucla.edu>
43544         maint: write-file-hooks -> before-save-hook
43545         write-file-hooks is obsolete since Emacs 22.1 (released June 2007) and
43546         it's time to use the recommended replacement.
43547         Problem reported by Glenn Morris in:
43548         https://lists.gnu.org/r/bug-gnulib/2018-03/msg00008.html
43549         * build-aux/announce-gen, build-aux/bootstrap:
43550         * build-aux/do-release-commit-and-tag, build-aux/gendocs.sh:
43551         * build-aux/git-version-gen, build-aux/gitlog-to-changelog:
43552         * build-aux/gnu-web-doc-update, build-aux/gnupload:
43553         * build-aux/move-if-change, build-aux/prefix-gnulib-mk:
43554         * build-aux/update-copyright, build-aux/useless-if-before-free:
43555         * build-aux/vc-list-files:
43556         Update hook usage for files where Gnulib is the canonical source.
43558 2018-03-05  Paul Eggert  <eggert@cs.ucla.edu>
43560         binary-io: pacify gcc -Wunused-parameter
43561         Problem reported by Reuben Thomas in:
43562         https://lists.gnu.org/r/bug-gnulib/2018-03/msg00005.html
43563         * lib/binary-io.h (__gl_setmode, __gl_setmode_check):
43564         Use _GL_UNUSED where appropriate.
43566         fflush: adjust to glibc 2.28 libio.h removal
43567         Problem reported by Daniel P. Berrangé in:
43568         https://lists.gnu.org/r/bug-gnulib/2018-03/msg00000.html
43569         * lib/fbufmode.c (fbufmode):
43570         * lib/fflush.c (clear_ungetc_buffer_preserving_position)
43571         (disable_seek_optimization, rpl_fflush):
43572         * lib/fpending.c (__fpending):
43573         * lib/fpurge.c (fpurge):
43574         * lib/freadable.c (freadable):
43575         * lib/freadahead.c (freadahead):
43576         * lib/freading.c (freading):
43577         * lib/freadptr.c (freadptr):
43578         * lib/freadseek.c (freadptrinc):
43579         * lib/fseeko.c (fseeko):
43580         * lib/fseterr.c (fseterr):
43581         * lib/fwritable.c (fwritable):
43582         * lib/fwriting.c (fwriting):
43583         Check _IO_EOF_SEEN instead of _IO_ftrylockfile.
43584         * lib/stdio-impl.h (_IO_IN_BACKUP) [_IO_EOF_SEEN]:
43585         Define if not already defined.
43587 2018-02-27  Paul Eggert  <eggert@cs.ucla.edu>
43589         environ: fix link error on 32-bit Cygwin
43590         Problem reported for GNU Emacs by Ken Brown in:
43591         https://lists.gnu.org/r/emacs-devel/2018-02/msg00765.html
43592         * lib/unistd.in.h (environ) [__i386__]: Do not redeclare.
43594 2018-02-24  Bruno Haible  <bruno@clisp.org>
43596         mbrtowc tests: Fix regression on glibc.
43597         Reported by Bernhard Voelker.
43598         * tests/test-mbrtowc.c (main): Fix expected value of wc.
43600 2018-02-24  Bruno Haible  <bruno@clisp.org>
43602         striconveha, uniconv/*: Avoid test failures on musl libc.
43603         * tests/iconvsupport.c: New file.
43604         * tests/test-striconveha.c (main): Skip autodetect_jp tests if iconv()
43605         does not support the ISO-2022-JP-2 encoding.
43606         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
43607         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
43608         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
43609         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
43610         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
43611         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
43612         * modules/striconveha-tests (Files): Add tests/iconvsupport.c.
43613         (Makefile.am): Link test-striconveha with iconvsupport.o.
43614         * modules/uniconv/u8-conv-from-enc-tests (Files): Add
43615         tests/iconvsupport.c.
43616         (Makefile.am): Link test-u8-conv-from-enc with iconvsupport.o.
43617         * modules/uniconv/u8-strconv-from-enc-tests (Files): Add
43618         tests/iconvsupport.c.
43619         (Makefile.am): Link test-u8-strconv-from-enc with iconvsupport.o.
43620         * modules/uniconv/u16-conv-from-enc-tests (Files): Add
43621         tests/iconvsupport.c.
43622         (Makefile.am): Link test-u16-conv-from-enc with iconvsupport.o.
43623         * modules/uniconv/u16-strconv-from-enc-tests (Files): Add
43624         tests/iconvsupport.c.
43625         (Makefile.am): Link test-u16-strconv-from-enc with iconvsupport.o.
43626         * modules/uniconv/u32-conv-from-enc-tests (Files): Add
43627         tests/iconvsupport.c.
43628         (Makefile.am): Link test-u32-conv-from-enc with iconvsupport.o.
43629         * modules/uniconv/u32-strconv-from-enc-tests (Files): Add
43630         tests/iconvsupport.c.
43631         (Makefile.am): Link test-u32-strconv-from-enc with iconvsupport.o.
43633 2018-02-24  Bruno Haible  <bruno@clisp.org>
43635         localename: Add support for musl libc.
43636         * m4/localename.m4 (gl_LOCALENAME): Check for <langinfo.h>.
43637         * lib/localename.c (gl_locale_name_thread_unsafe): Use NL_LOCALE_NAME
43638         on Linux platforms which define NL_LOCALE_NAME.
43640 2018-02-24  Bruno Haible  <bruno@clisp.org>
43642         mbrtowc tests: Don't make assumptions about the charset the C locale.
43643         * tests/test-mbrtowc.c (main): For bytes >= 0x80, don't assume a
43644         particular mapping in the C locale.
43646 2018-02-24  Bruno Haible  <bruno@clisp.org>
43648         ptsname_r: Don't expect that this function sets errno.
43649         * tests/test-ptsname_r.c (test_errors): Don't test errno after return
43650         from ptsname_r().
43651         * doc/glibc-functions/ptsname_r.texi: Mention the issue.
43653 2018-02-23  Bruno Haible  <bruno@clisp.org>
43655         xmalloca: pacify gcc -Wbad-function-cast
43656         * lib/xmalloca.h (xmalloca): Insert intermediate cast here as well.
43658 2018-02-23  Paul Eggert  <eggert@cs.ucla.edu>
43660         nl_langinfo: pacify gcc -Wunused-function
43661         * lib/nl_langinfo.c (ctype_codeset): Do not define if
43662         REPLACE_NL_LANGINFO && !GNULIB_defined_CODESET, as it is unused in
43663         this case.  Without this change, I got a diagnostic when building
43664         coreutils on Fedora 27 with gcc 7.3.1 20180130.
43666         same: pacify gcc -Wunused-variable
43667         * lib/same.c (same_nameat) [!CHECK_TRUNCATION]:
43668         Omit unused variable.
43670         malloca: pacify gcc -Wbad-function-cast
43671         * lib/malloca.h (malloca): Pacify gcc -Wbad-function-cast
43672         diagnostic that I got on Fedora 27 with gcc 7.3.1 20180130.
43673         To pacify GCC, I had to cast alloca’s result to some type other
43674         than void * before casting that to uintptr_t.
43676 2018-02-20  Paul Eggert  <eggert@cs.ucla.edu>
43678         utimecmp: new function utimecmpat
43679         * lib/utimecmp.c: Include fcntl.h, sys/stat.h and dirname.h.
43680         Do not include utimens.h.
43681         (utimecmpat): New function, generalizing utimecmp.
43682         (utimecmp): Now a thin layer around utimecmpat.
43683         * modules/utimecmp (Depends-on): Depend on dirname-lgpl, fstatat,
43684         utimensat instead of on lstat and utimens.
43686         same: new function same_nameat
43687         * lib/same.c: Include fcntl.h.
43688         * lib/same.c (same_nameat): New function, generalizing same_name.
43689         (same_name): Now a thin layer around same_nameat.
43690         * m4/same.m4 (gl_SAME): Check for fpathconf, not pathconf.
43691         * modules/same (Depends-on): Depend on fstatat, openat.
43693 2018-02-18  Eric Gallager  <egall@gwmail.gwu.edu>  (tiny change)
43695         warnings: Add support for Objective C.
43696         * m4/warnings.m4 (gl_UNKNOWN_WARNINGS_ARE_ERRORS(Objective C)): New
43697         macro.
43699 2018-02-17  Bruno Haible  <bruno@clisp.org>
43701         lock: Fix test-once1 crash on FreeBSD11.
43702         * lib/glthread/lock.h: On FreeBSD, test the weak value of the symbol
43703         'pthread_create', not 'pthread_cancel'.
43705 2018-02-17  Bruno Haible  <bruno@clisp.org>
43707         lock: Add test of gl_once.
43708         * tests/test-once.c: New file.
43709         * modules/lock-tests (Files): Add it.
43710         (Makefile.am): Build and test programs 'test-once1' and 'test-once2'.
43712 2018-02-17  Bruno Haible  <bruno@clisp.org>
43714         thread: Fix compilation error on IRIX.
43715         * lib/glthread/thread.h: Include <unistd.h>. Include <signal.h> when
43716         needed; include it outside the C++ extern "C" {} block.
43717         * doc/posix-headers/pthread.texi: Mention the problem with
43718         pthread_atfork on IRIX.
43720 2018-02-04  Bruno Haible  <bruno@clisp.org>
43722         nl_langinfo: Override the system's nl_langinfo() when needed.
43723         Reported by Jim Meyering.
43724         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Set REPLACE_NL_LANGINFO=1
43725         also when HAVE_LANGINFO_T_FMT_AMPM or HAVE_LANGINFO_ALTMON is 0.
43727 2018-02-04  Bruno Haible  <bruno@clisp.org>
43729         signal-h, monetary, strings: Fix build failure in some cases.
43730         Reported by Tim Rühsen <tim.ruehsen@gmx.de>.
43731         * modules/signal-h (Makefile.am): In the GNULIB_* substitutions, use '/'
43732         as delimiter in sed command, not '|'.
43733         * modules/monetary (Makefile.am): Likewise.
43734         * modules/strings (Makefile.am): Likewise.
43736 2018-02-03  Jim Meyering  <meyering@fb.com>
43738         maint.mk: exempt "/proc/filesystems" from "file system" syntax check
43739         * top/maint.mk (sc_file_system): Don't complain about
43740         "/proc/filesystems".
43742 2018-02-03  Bruno Haible  <bruno@clisp.org>
43744         stdlib: Fix compilation error on OpenIndiana.
43745         * lib/stdlib.in.h: Before including <sys/loadavg.h>, include
43746         <sys/time.h>.
43747         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
43748         * m4/getloadavg.m4 (gl_GETLOADAVG): Likewise.
43750 2018-02-03  Bruno Haible  <bruno@clisp.org>
43752         host-cpu-c-abi: Avoid use of 'grep -E' on OpenIndiana.
43753         * m4/asm-underscore.m4 (gl_ASM_SYMBOL_PREFIX): Require AC_PROG_EGREP,
43754         and use $EGREP instead of 'grep -E'.
43755         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Use 'grep' instead of
43756         'grep -E'.
43758 2018-02-02  Paul Eggert  <eggert@cs.ucla.edu>
43760         malloca: Add a compile-time verification.
43761         * lib/malloca.c (small_t): Verify that it is wide enough.
43762         * modules/malloca (Depends-on): Add verify.
43764 2018-02-02  Bruno Haible  <bruno@clisp.org>
43766         malloca: Add an argument check.
43767         Suggested by Paul Eggert.
43768         * lib/malloca.c (freea): Check against an invalid argument.
43770 2018-02-02  Bruno Haible  <bruno@clisp.org>
43772         localename: Add support for OpenIndiana.
43773         * lib/localename.c (gl_locale_name_thread_unsafe): Add code for
43774         Solaris 11 variants with uselocale() but without getlocalename_l().
43776 2018-02-02  Bruno Haible  <bruno@clisp.org>
43778         malloca, xmalloca: Make multithread-safe.
43779         Reported by Florian Weimer <fweimer@redhat.com>.
43780         Implements an idea by Ondřej Bílka <neleai@seznam.cz>.
43781         * lib/malloca.h (malloca): In the stack allocation case, return a
43782         pointer that is a multiple of 2 * sa_alignment_max.
43783         (sa_increment): Remove enum item.
43784         * lib/xmalloca.h (xmalloca): In the stack allocation case, return
43785         a pointer that is a multiple of 2 * sa_alignment_max.
43786         * lib/malloca.c (NO_SANITIZE_MEMORY): Remove macro.
43787         (MAGIC_NUMBER, MAGIC_SIZE, preliminary_header, HEADER_SIZE, header,
43788         HASH_TABLE_SIZE, mmalloca_results): Remove.
43789         (small_t): New type.
43790         (mmalloca, free): Rewritten.
43791         * lib/malloca.valgrind: Remove file.
43792         * modules/malloca (Files): Remove it.
43793         (Depends-on): Remove verify.
43795 2018-01-31  Bruno Haible  <bruno@clisp.org>
43797         environ: Fix link error on 64-bit Cygwin.
43798         * lib/unistd.in.h (environ): On Cygwin, redeclare with the
43799         __declspec(dllimport) attribute.
43800         * doc/posix-functions/environ.texi: Mention the Cygwin problem.
43802 2018-01-30  Bruno Haible  <bruno@clisp.org>
43804         get-rusage-data: Add support for Minix 3.
43805         * lib/get-rusage-data.c (get_rusage_data): Return 0 on Minix.
43807 2018-01-30  Bruno Haible  <bruno@clisp.org>
43809         vma-iter: Add support for Minix 3.
43810         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define on Minix.
43811         * lib/vma-iter.c: On Minix, read /proc/<pid>/map.
43813 2018-01-27  Bruno Haible  <bruno@clisp.org>
43815         Fix malfunction of socket functions on HP-UX in 64-bit mode.
43816         * m4/socketlib.m4 (gl_SOCKETLIB): Add comment.
43817         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Define
43818         _HPUX_ALT_XOPEN_SOCKET_API.
43819         * modules/accept (Depends-on): Add 'extensions'.
43820         * modules/getpeername (Depends-on): Likewise.
43821         * modules/getsockname (Depends-on): Likewise.
43822         * modules/getsockopt (Depends-on): Likewise.
43823         * modules/recvfrom (Depends-on): Likewise.
43824         * doc/posix-functions/accept.texi: Mention the HP-UX socklen_t problem.
43825         * doc/posix-functions/getpeername.texi: Likewise.
43826         * doc/posix-functions/getsockname.texi: Likewise.
43827         * doc/posix-functions/getsockopt.texi: Likewise.
43828         * doc/posix-functions/recvfrom.texi: Likewise.
43830 2018-01-27  Bruno Haible  <bruno@clisp.org>
43832         getsockname tests: More tests.
43833         * tests/test-getsockname.c (open_server_socket): New function, mostly
43834         copied from test-poll.c.
43835         (main): Check that getsockname fills in addr.
43836         * modules/getsockname-tests (Depends-on): Add the necessary
43837         dependencies.
43838         (test_getsockname_LDADD): Link with $(INET_PTON_LIB).
43840 2018-01-26  Paul Eggert  <eggert@cs.ucla.edu>
43842         manywarnings: fix maintainer comment
43843         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Fix comment so that
43844         it does not mistakenly think that ‘-1)’ is an option.
43846 2018-01-26  Bruno Haible  <bruno@clisp.org>
43848         langinfo: Fix last commit.
43849         Reported by Tim Rühsen <tim.ruehsen@gmx.de>.
43850         * modules/langinfo (Makefile.am): Substitute HAVE_LANGINFO_ALTMON.
43852 2018-01-24  Bruno Haible  <bruno@clisp.org>
43854         langinfo, nl_langinfo: Add support for alternative month names.
43855         * m4/langinfo_h.m4 (gl_LANGINFO_H): Define HAVE_LANGINFO_ALTMON.
43856         * lib/langinfo.in.h (ALTMON_1...ALTMON_12): New macros.
43857         * lib/nl_langinfo.c (rpl_nl_langinfo): Treat ALTMON_i like MON_i.
43858         * tests/test-nl_langinfo.c (main): Test ALTMON_*.
43859         * doc/posix-headers/langinfo.texi: Document support of ALTMON_*.
43860         * doc/posix-functions/nl_langinfo.texi: Likewise.
43862 2018-01-23  Paul Eggert  <eggert@cs.ucla.edu>
43864         Merge strftime.c changes from glibc
43865         This incorporates:
43866         2017-11-14 [BZ #10871] Implement alternative month names
43867         2017-11-14 [BZ #10871] Abbreviated alternative month names (%Ob)
43868         2017-06-20 Use locale_t, not __locale_t, throughout glibc
43869         * lib/nstrftime.c (ABALTMON_1) [!COMPILE_WIDE]: New macro.
43870         (LOCALE_PARAM) [_LIBC && USE_IN_EXTENDED_LOCALE_MODEL]:
43871         Use locale_t, not __locale_t.
43872         (a_altmonth, f_altmonth, aam_len) [_NL_CURRENT]: New macros.
43873         (__strftime_internal): Add support for alternate months.
43875 2018-01-23  Bruno Haible  <bruno@clisp.org>
43877         doc: Mention another prerequisite for using Gnulib.
43878         Reported at <https://stackoverflow.com/questions/48378214/>.
43879         * doc/gnulib-tool.texi (Initial import): Mention requirement to use
43880         AC_CONFIG_HEADERS.
43882 2018-01-22  Mathieu Lirzin  <mthl@gnu.org>
43884         build: GuixSD doesn't have /bin/bash
43885         * Makefile (SHELL): Search 'bash' in the PATH environment variable.
43887 2018-01-21  Bruno Haible  <bruno@clisp.org>
43889         Avoid test failures on Microsoft Windows Subsystem for Linux.
43890         * tests/test-fcntl.c (main): Allow a different errno.
43891         * tests/test-rename.h (test_rename): Likewise.
43892         * tests/test-renameat.c (main): Likewise.
43893         * tests/test-renameat2.c (main): Likewise.
43895 2018-01-14  Paul Eggert  <eggert@cs.ucla.edu>
43897         filenamecat: make base a suffix of result
43898         * lib/filenamecat-lgpl.c (longest_relative_suffix): Remove.
43899         (mfile_name_concat): Always make BASE a suffix of the result, as
43900         cp expects this.  To implement this, separate with '.' instead of
43901         '/' in some rare cases.  Clarify spec to say ./BASE not BASE.
43902         * tests/test-filenamecat.c (main): Adjust tests to match
43903         current behavior.  Check that BASE_IN_RESULT points to
43904         a copy of BASE and is a suffix of the resultk, and that DIR
43905         is a prefix of the result that is no longer than the prefix
43906         indicated by BASE_IN_RESULT.
43908 2018-01-04  Mathieu Lirzin  <mthl@gnu.org>
43910         update-copyright: Handle use of ©
43911         * build-aux/update-copyright ($circle_c_re): Update regex to
43912         handle use of © in headers.
43914 2018-01-04  Tim Rühsen  <tim.ruehsen@gmx.de>
43916         Fix -Wundef warning in user-included header lib/cdefs.h.
43917         * lib/cdefs.h: Check if defined before using __USE_FORTIFY_LEVEL.
43919 2018-01-04  Bruno Haible  <bruno@clisp.org>
43921         pthread_sigmask: Avoid compilation error on mingw.
43922         Reported by Tim Rühsen <tim.ruehsen@gmx.de>.
43923         * lib/signal.in.h (pthread_sigmask): Don't declare it it's defined as a
43924         macro.
43926 2018-01-03  Paul Eggert  <eggert@cs.ucla.edu>
43928         test-framework-sh: ‘ps -ef’, not ‘ps ef’
43929         * tests/init.sh (rand_bytes_): Put ‘-’ before new-style ps options.
43930         Suggested by Bob Proulx (Bug#29968).
43931         * build-aux/mktempd (rand_bytes): Make it like tests/init.sh.
43933 2018-01-02  Eric Blake  <eblake@redhat.com>
43935         stat-time: silence -Wunused-parameter regression
43936         * lib/stat-time.h (get_stat_birthtime_ns, get_stat_birthtime):
43937         Prefer attribute over cast-to-void.
43938         (stat_time_normalize): Mark st as potentially unused.
43940 2018-01-02  Paul Eggert  <eggert@cs.ucla.edu>
43942         test-framework-sh: avoid netstat
43943         Problem reported by Kristýna Streitová (Bug#29947).
43944         * tests/init.sh (rand_bytes_): Stop using netstat, as it's
43945         deprecated on SuSE and it's not that important anyway.
43947 2018-01-01  Jim Meyering  <meyering@fb.com>
43949         update-copyright: add code to handle more special cases
43950         After running "make update-copyright" this year, five files
43951         required additional manual changes.  Automate those adjustments
43952         for next year.
43953         * Makefile (_year_and_prev): Define.
43954         (update-copyright): Add perl commands to induce this year's post-
43955         update-copyright adjustments.
43957 2018-01-01  Paul Eggert  <eggert@cs.ucla.edu>
43959         version-etc: new year
43960         * build-aux/gendocs.sh (version):
43961         * doc/gendocs_template:
43962         * doc/gendocs_template_min:
43963         * doc/gnulib.texi:
43964         * lib/version-etc.c (COPYRIGHT_YEAR):
43965         Update copyright dates by hand in templates and the like.
43967         maint: fix 'make update-copyright'
43968         * Makefile (update-copyright): Adjust to 2016-11-23 change
43969         to config/srclist-update, which changed the format of srclist.txt.
43971 2017-12-30  Paul Eggert  <eggert@cs.ucla.edu>
43973         chdir-safer: remove this module
43974         * MODULES.html.sh (func_all_modules): Remove chdir-safer.
43975         * NEWS: Document removal.
43976         * lib/chdir-safer.c, lib/chdir-safer.h, m4/afs.m4, m4/chdir-safer.m4:
43977         * modules/chdir-safer: Remove these files.
43979 2017-12-29  Samuel Thibault  <samuel.thibault@gnu.org>
43981         Add cross-compilation results for GNU/Hurd.
43982         * m4/calloc.m4: Add GNU/Hurd guess.
43983         * m4/cbrtl.m4: Likewise.
43984         * m4/ceil.m4: Likewise.
43985         * m4/ceilf.m4: Likewise.
43986         * m4/ceill.m4: Likewise.
43987         * m4/chown.m4: Likewise.
43988         * m4/duplocale.m4: Likewise.
43989         * m4/exp2l.m4: Likewise.
43990         * m4/expm1.m4: Likewise.
43991         * m4/fchdir.m4: Likewise.
43992         * m4/floor.m4: Likewise.
43993         * m4/floorf.m4: Likewise.
43994         * m4/fmod.m4: Likewise.
43995         * m4/fmodf.m4: Likewise.
43996         * m4/fmodl.m4: Likewise.
43997         * m4/getcwd.m4: Likewise.
43998         * m4/getgroups.m4: Likewise.
43999         * m4/gettimeofday.m4: Likewise.
44000         * m4/hypot.m4: Likewise.
44001         * m4/hypotf.m4: Likewise.
44002         * m4/hypotl.m4: Likewise.
44003         * m4/link-follow.m4: Likewise.
44004         * m4/link.m4: Likewise.
44005         * m4/linkat.m4: Likewise.
44006         * m4/log.m4: Likewise.
44007         * m4/log10.m4: Likewise.
44008         * m4/log10f.m4: Likewise.
44009         * m4/log1p.m4: Likewise.
44010         * m4/log1pf.m4: Likewise.
44011         * m4/log1pl.m4: Likewise.
44012         * m4/log2.m4: Likewise.
44013         * m4/log2f.m4: Likewise.
44014         * m4/logf.m4: Likewise.
44015         * m4/lstat.m4: Likewise.
44016         * m4/malloc.m4: Likewise.
44017         * m4/mbrlen.m4: Likewise.
44018         * m4/mbrtowc.m4: Likewise.
44019         * m4/mkdir.m4: Likewise.
44020         * m4/mkfifo.m4: Likewise.
44021         * m4/mknod.m4: Likewise.
44022         * m4/mkstemp.m4: Likewise.
44023         * m4/modf.m4: Likewise.
44024         * m4/modff.m4: Likewise.
44025         * m4/modfl.m4: Likewise.
44026         * m4/printf.m4: Likewise.
44027         * m4/pselect.m4: Likewise.
44028         * m4/ptsname.m4: Likewise.
44029         * m4/putenv.m4: Likewise.
44030         * m4/readlink.m4: Likewise.
44031         * m4/realloc.m4: Likewise.
44032         * m4/remainder.m4: Likewise.
44033         * m4/remainderf.m4: Likewise.
44034         * m4/remainderl.m4: Likewise.
44035         * m4/rmdir.m4: Likewise.
44036         * m4/round.m4: Likewise.
44037         * m4/roundf.m4: Likewise.
44038         * m4/roundl.m4: Likewise.
44039         * m4/select.m4: Likewise.
44040         * m4/setenv.m4: Likewise.
44041         * m4/signbit.m4: Likewise.
44042         * m4/sleep.m4: Likewise.
44043         * m4/stat.m4: Likewise.
44044         * m4/strerror.m4: Likewise.
44045         * m4/strtok_r.m4: Likewise.
44046         * m4/symlink.m4: Likewise.
44047         * m4/symlinkat.m4: Likewise.
44048         * m4/trunc.m4: Likewise.
44049         * m4/truncf.m4: Likewise.
44050         * m4/truncl.m4: Likewise.
44051         * m4/tzset.m4: Likewise.
44052         * m4/ungetc.m4: Likewise.
44053         * m4/usleep.m4: Likewise.
44054         * m4/wcwidth.m4: Likewise.
44056 2017-12-28  Bruno Haible  <bruno@clisp.org>
44058         gnulib-tool: Make --conditional-dependencies work better.
44059         Reported by Dmitry Selyutin <ghostman.sd@gmail.com>.
44060         * gnulib-tool (Options): Don't reject the combination of
44061         --conditional-dependencies with --with-tests.
44062         (func_emit_autoconf_snippets): Add argument referenceable_modules.
44063         Don't reference $modules.
44064         (func_import, func_create_testdir): Pass it.
44066 2017-12-19  Paul Eggert  <eggert@cs.ucla.edu>
44068         regex: use re_malloc etc. consistently
44069         Problem and original patch reported by Arnold Robbins in:
44070         https://sourceware.org/ml/libc-alpha/2017-12/msg00241.html
44071         * lib/regcomp.c (re_comp):
44072         * lib/regexec.c (push_fail_stack, build_trtable, match_ctx_clean):
44073         Use re_malloc/re_realloc/re_free instead of malloc/realloc/free.
44075 2017-12-15  Tim Rühsen  <tim.ruehsen@gmx.de>
44076             Paul Eggert  <eggert@cs.ucla.edu>
44078         glob: Silence warning about void pointer arithmetic.
44079         * lib/glob.c (glob): Use a 'char *', not a 'void *', in pointer
44080         arithmetic.
44082 2017-12-15  Bruno Haible  <bruno@clisp.org>
44084         spawn-pipe: Silence a clang warning.
44085         Reported by Tim Rühsen <tim.ruehsen@gmx.de>.
44086         * lib/spawn-pipe.c: Disable clang -Wconditional-uninitialized warnings
44087         in this file.
44089 2017-12-12  Paul Eggert  <eggert@cs.ucla.edu>
44091         explicit_bzero: port to macOS + Clang 9.0.0
44092         Problem reported by Marcus Johnson (Bug#29658).
44093         * lib/explicit_bzero.c (explicit_bzero) [__clang__]:
44094         Don’t use asm.
44096 2017-12-11  Reuben Thomas  <rrt@sc3d.org>
44098         doc: Improve explanation of supporting relocatable libraries.
44099         * doc/relocatable-maint.texi (Supporting Relocation): Explain
44100         properly how to build the relocatable module for
44101         libraries. (Method and example code from Bruno Haible.)
44103 2017-12-11  Reuben Thomas  <rrt@sc3d.org>
44105         doc: Use better texinfo tags in a few cases.
44106         * doc/gnulib.texi (Extending Gnulib): Use @option or @command
44107         instead of @samp in a few places.
44109 2017-12-11  Bruno Haible  <bruno@clisp.org>
44111         unistr/base: Update comment.
44112         * lib/unistr.in.h: Update comment about u*_mbtouc_unsafe functions.
44114 2017-12-10  Pádraig Brady  <P@draigBrady.com>
44116         test-faccessat.c: unlink temp file to avoid subsequent test failure
44117         * tests/test-faccessat.c: Remove the file to avoid failure
44118         to open the file on subsequent runs due to being created
44119         with no permissions.
44121 2017-12-10  Bruno Haible  <bruno@clisp.org>
44123         doc: New sect. "Modifying the build rules of a Gnulib import directory".
44124         * doc/gnulib-tool.texi (Modified build rules): New node.
44126 2017-12-10  Bruno Haible  <bruno@clisp.org>
44128         doc: Tweak wording.
44129         * doc/gnulib-tool.texi (Multiple instances): Talk about "programs", not
44130         "binaries".
44132 2017-12-05  Sam Steingold  <sds@gnu.org>
44133             Bruno Haible  <bruno@clisp.org>
44135         no-c++: Avoid "egrep: repetition-operator operand invalid" error.
44136         * m4/no-c++.m4 (gt_NO_CXX): Don't use '+' characters nor spaces in the
44137         AC_EGREP_CPP pattern.
44139 2017-12-03  Bruno Haible  <bruno@clisp.org>
44141         all: Replace more http URLs by https URLs.
44142         * lib/sm3.h, lib/sm3.c, tests/test-sm3.c: Use https: URL.
44143         * lib/unigbrk/u-grapheme-breaks.h: Likewise.
44144         * lib/unigbrk/uc-grapheme-breaks.c: Likewise.
44145         * tests/unigbrk/test-uc-grapheme-breaks.c: Likewise.
44147 2017-11-28  Paul Eggert  <eggert@cs.ucla.edu>
44149         Port better to CentOS 5
44150         Problems reported by Tom G. Christensen in:
44151         https://lists.gnu.org/r/bug-gnulib/2017-11/msg00053.html
44152         * doc/glibc-functions/strverscmp.texi (strverscmp):
44153         Document strverscmp bug with glibc 2.9 and earlier.
44154         * doc/posix-functions/tzset.texi (tzset):
44155         Document that TZ with angle brackets is POSIX-2001 and later.
44156         * tests/test-nstrftime.c: Include unistd.h.
44157         (TZ_ANGLE_BRACKETS_SHOULD_WORK): New macro.
44158         (TZ): Use it to skip tests with angle brackets in TZ,
44159         for older systems.
44161         stat: add missing module dependencies
44162         * modules/lstat, modules/stat, modules/utimensat (Depends-on):
44163         Add stat-time.
44165 2017-11-28  Benno Schulenberg  <bensberg@telfort.nl>
44167         stat: fix compilation failure on macOS Sierra
44168         Reported by Marius Schamschula <mschamschula@gmail.com> in:
44169         https://savannah.gnu.org/bugs/?52546
44170         * lib/stat.c: Add missing include of stat-time.h.
44172 2017-11-28  Jim Meyering  <meyering@fb.com>
44174         test-faccessat.c: correct BASE definition to avoid parallel test failure
44175         * tests/test-faccessat.c (BASE): Define using this file's name, not
44176         that of test-lstat.c.  Using the latter caused this test to fail
44177         sometimes when run concurrently with test-lstat.
44179 2017-11-27  Daiki Ueno  <ueno@gnu.org>
44181         unicase: fix VPATH build
44182         * modules/unicase/special-casing (Makefile.am): Ensure that the
44183         base directory is created when generating
44184         unicase/special-casing.h.
44186 2017-11-27  Daiki Ueno  <ueno@gnu.org>
44188         libunistring: update to Unicode 9.0.0
44189         * lib/gen-uni-tables.c (fill_properties): Recognize
44190         Sentence_Terminal and Prepended_Concatenation_Mark.
44191         (is_property_default_ignorable_code_point): Exclude U+08E2.
44192         (fill_arabicshaping): Allow missing whitespace when parsing;
44193         recognize "AFRICAN FEH", "AFRICAN QAF", and "AFRICAN MOON".
44194         (output_blocks): Increase the element size of the level1 table to
44195         accommodate more blocks.
44196         (get_lbp): Recognize ZWJ, E_Base, and E_Modifier characters;
44197         Update each class according to the standard.
44198         (get_wbp): Recognize ZWJ, E_Base, E_Modifier, Glue_After_Zwj, and
44199         E_Base_GAZ characters.
44200         (output_gbp_table): Recognize ZWJ, E_Base, E_Modifier,
44201         Glue_After_Zwj, and E_Base_GAZ characters.
44202         * lib/unictype.in.h (UC_JOINING_GROUP_AFRICAN_FEH)
44203         (UC_JOINING_GROUP_AFRICAN_QAF, UC_JOINING_GROUP_AFRICAN_MOON): New
44204         enum value.
44205         * lib/unilbrk/lbrktables.h (LBP_ZWJ, LBP_EB, LBP_EM): New enum
44206         value.
44207         * lib/unilbrk/lbrktables.c (unilbrk_table): Extend the table with
44208         LBP_ZWJ, LBP_EB, and LBP_EM.
44209         * lib/uniwbrk.in.h (WBP_ZWJ, WBP_EB, WBP_EM, WBP_GAZ, WBP_EBG): New
44210         enum value.
44211         * lib/uniwbrk/u-wordbreaks.h: Implement WB3c, WB15, and WB16.
44212         * lib/uniwbrk/wbrktable.h (uniwbrk_prop_index): New variable
44213         declaration.
44214         * lib/uniwbrk/wbrktable.c (uniwbrk_prop_index): New variable.
44215         (uniwbrk_table): Implement WB14.
44216         * tests/uniwbrk/test-uc-wordbreaks.c (wordbreakproperty_to_string):
44217         Check WBP_ZWJ, WBP_EB, WBP_EM, WBP_GAZ, and WBP_EBG.
44218         * modules/unigbrk/u{32,16,8}-grapheme-breaks: No longer depend on
44219         uc-is-grapheme-break.
44220         * modules/unigbrk/uc-grapheme-breaks: New module.
44221         * modules/unigbrk/uc-grapheme-breaks-tests: New module.
44222         * lib/unigbrk.in.h (GBP_ZWJ, GBP_EB, GBP_EM, GBP_GAZ, GBP_EBG): New
44223         enum value.
44224         (uc_grapheme_breaks): New function, replacing uc_is_grapheme_break.
44225         * lib/unigbrk/u-grapheme-breaks.h: New file.
44226         * lib/unigbrk/u{32,16,8}-grapheme-breaks.c: Rewrite using
44227         u-grapheme-breaks.h instead of uc_is_grapheme_break.
44228         * lib/unigbrk/uc-grapheme-breaks.c: New file.
44229         * lib/unigbrk/uc-is-grapheme-break.c: Partially update to TR29 rev
44230         29.
44231         * tests/unigbrk/test-uc-gbrk-prop.c
44232         (graphemebreakproperty_to_string): Check GBP_ZWJ, GBP_EB, GBP_EM,
44233         GBP_GAZ, and GBP_EBG.
44234         * tests/unigbrk/test-uc-grapheme-breaks.c: New test.
44235         * tests/unigbrk/test-uc-is-grapheme-break.c
44236         (graphemebreakproperty_to_string): Check GBP_ZWJ, GBP_EB, GBP_EM,
44237         GBP_GAZ, and GBP_EBG.
44238         (main): Skip unsupported rules involving 3 or more characters,
44239         namely GB10, GB12, and GB13.
44240         * lib/uniwidth/width.c (nonspacing_table_data): Update.
44241         * all generated files under lib/uni* and tests/uni*: Regenerate.
44242         * all the affected modules: Bump version.
44244 2017-11-26  Bruno Haible  <bruno@clisp.org>
44246         strfmon_l: Fix compilation error with glibc 2.5.
44247         Reported by Tom G. Christensen <tgc@jupiterrise.com>
44248         in <https://lists.gnu.org/r/bug-gnulib/2017-11/msg00051.html>.
44249         * lib/monetary.in.h: Include also <locale.h>.
44251 2017-11-24  Paul Eggert  <eggert@cs.ucla.edu>
44253         posixtm: remove PDS_LEADING_YEAR
44254         This changes the API slightly, in a hopefully-innocuous way.
44255         Without this change the code had undefined behavior when a
44256         caller specified neither PDS_LEADING_YEAR nor PDS_TRAILING_YEAR.
44257         Problem reported by Pádraig Brady in:
44258         https://lists.gnu.org/r/bug-gnulib/2017-11/msg00048.html
44259         * NEWS: Mention this.
44260         * lib/posixtm.c (posix_time_parse): Treat the absence of
44261         PDS_TRAILING_YEAR as if PDS_LEADING_YEAR were present.
44262         * lib/posixtm.h (PDS_LEADING_YEAR): Remove (actually, leave it
44263         present, but define it as zero, for compatibility with existing
44264         source code).  All other PDS_* values moved up.
44265         * tests/test-posixtm.c (LY): New macro.
44266         (T): Use it.  Do not expect a particular numeric encoding
44267         for PDS_CENTURY etc.
44269 2017-11-23  Paul Eggert  <eggert@cs.ucla.edu>
44271         stat: work around Solaris bug with tv_nsec < 0
44272         * doc/posix-functions/fstat.texi (fstat):
44273         * doc/posix-functions/fstatat.texi (fstatat):
44274         * doc/posix-functions/lstat.texi (lstat):
44275         * doc/posix-functions/stat.texi (stat):
44276         Mention Solaris 11 bug.
44277         * lib/fstat.c, lib/fstatat.c, lib/lstat.c: Include stat-time.h.
44278         * lib/fstat.c (rpl_fstat) [!WINDOWS_NATIVE]:
44279         * lib/lstat.c (rpl_lstat):
44280         * lib/stat.c (rpl_stat):
44281         Normalize resulting timestamps.
44282         * lib/fstatat.c (normal_fstatat): New function.
44283         (rpl_fstatat): Use it.
44284         * lib/stat-time.h: Include intprops.h, errno.h, stddef.h.
44285         (stat_time_normalize): New function.
44286         * m4/fstat.m4 (gl_FUNC_FSTAT):
44287         * m4/fstatat.m4 (gl_FUNC_FSTATAT):
44288         * m4/lstat.m4 (gl_FUNC_LSTAT):
44289         * m4/stat.m4 (gl_FUNC_STAT):
44290         Replace on Solaris.
44291         * modules/fstat (Depends-on):
44292         * modules/fstatat (Depends-on):
44293         Add stat-time.
44294         * modules/stat-time (Depends-on): Add errno, intprops.
44296 2017-11-22  Paul Eggert  <eggert@cs.ucla.edu>
44298         regex: merge from glibc
44299         * lib/regcomp.c (init_word_char): Add comments.
44301 2017-11-20  Paul Eggert  <eggert@cs.ucla.edu>
44303         regex: merge from glibc
44304         * lib/regcomp.c (__regcomp, __regfree) [_LIBC]: Now hidden.
44305         * lib/regex_internal.h (internal_function): Remove.
44306         All uses removed.
44308 2017-11-20  Bruno Haible  <bruno@clisp.org>
44310         crypto/gc-sm3: Fix buffer overrun.
44311         * lib/gc-gnulib.c (MAX_DIGEST_SIZE): Bump to 32.
44312         Reported by Coverity.
44314 2017-11-12  Jim Meyering  <meyering@fb.com>
44316         maint: shorten https://lists.gnu.org/archive/html/... links
44317         Each /archive/html/ part can be replace with /r/.
44318         Run this to induce the change:
44319         git grep -l archive/html|xargs perl -pi -e 's,/archive/html/,/r/,g'
44320         * ChangeLog: Perform that substitution.
44321         * Makefile: Likewise.
44322         * STATUS-libposix: Likewise.
44323         * build-aux/bootstrap: Likewise.
44324         * doc/maintain.texi: Likewise.
44325         * gnulib-tool: Likewise.
44326         * lib/allocator.h: Likewise.
44327         * lib/argp-ba.c: Likewise.
44328         * lib/argp-pv.c: Likewise.
44329         * lib/canon-host.c: Likewise.
44330         * lib/canonicalize-lgpl.c: Likewise.
44331         * lib/float.in.h: Likewise.
44332         * lib/fstat.c: Likewise.
44333         * lib/getdelim.c: Likewise.
44334         * lib/getprogname.c: Likewise.
44335         * lib/glthread/thread.h: Likewise.
44336         * lib/intprops.h: Likewise.
44337         * lib/mbsrtowcs-state.c: Likewise.
44338         * lib/safe-read.c: Likewise.
44339         * lib/signal.in.h: Likewise.
44340         * lib/stat.c: Likewise.
44341         * lib/stdbool.in.h: Likewise.
44342         * lib/stdio-impl.h: Likewise.
44343         * lib/stdio.in.h: Likewise.
44344         * lib/sysexits.in.h: Likewise.
44345         * lib/timespec.h: Likewise.
44346         * lib/wcsrtombs-state.c: Likewise.
44347         * m4/alloca.m4: Likewise.
44348         * m4/extern-inline.m4: Likewise.
44349         * m4/fstatat.m4: Likewise.
44350         * m4/gnulib-common.m4: Likewise.
44351         * m4/lib-ignore.m4: Likewise.
44352         * m4/printf.m4: Likewise.
44353         * m4/regex.m4: Likewise.
44354         * m4/stat-size.m4: Likewise.
44355         * m4/std-gnu11.m4: Likewise.
44356         * m4/stdbool.m4: Likewise.
44357         * m4/sys_types_h.m4: Likewise.
44358         * m4/threadlib.m4: Likewise.
44359         * m4/vararrays.m4: Likewise.
44360         * pygnulib/GLImport.py: Likewise.
44361         * tests/test-exp.h: Likewise.
44362         * tests/test-exp2.h: Likewise.
44363         * tests/test-expm1.h: Likewise.
44364         * tests/test-fflush2.c: Likewise.
44365         * tests/test-getopt_long.h: Likewise.
44366         * tests/test-intprops.c: Likewise.
44367         * tests/test-log.h: Likewise.
44368         * tests/test-log10.h: Likewise.
44369         * tests/test-log1p.h: Likewise.
44370         * tests/test-log2.h: Likewise.
44371         * tests/test-printf-posix.h: Likewise.
44372         * tests/test-regex.c: Likewise.
44373         * tests/test-snprintf-posix.h: Likewise.
44374         * tests/test-sprintf-posix.h: Likewise.
44375         * tests/test-stdalign.c: Likewise.
44376         * tests/test-stdbool.c: Likewise.
44377         * tests/test-vasnprintf-posix.c: Likewise.
44378         * tests/test-vasprintf-posix.c: Likewise.
44379         * top/maint.mk: Likewise.
44381 2017-11-12  Bruno Haible  <bruno@clisp.org>
44383         faccessat: Make the last change more robust.
44384         * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Require
44385         gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK. Treat "guessing yes" like "yes".
44387 2017-11-11  Paul Eggert  <eggert@cs.ucla.edu>
44389         faccessat: port to macOS (Bug#29231)
44390         macOS faccessat has the same bug that lstat does: if the file
44391         name ends in '/' it ignores the trailing slash.
44392         Problem reported for Emacs by Vincent Zhang.
44393         * doc/posix-functions/faccessat.texi (faccessat): Document this.
44394         * lib/faccessat.c (_GL_INCLUDING_UNISTD_H): Define and undef
44395         around the initial includes.  Include errno.h, string.h, sys/stat.h.
44396         (orig_faccessat) [HAVE_FACCESSAT]: New function.
44397         Include "unistd.h" after defining it.
44398         (rpl_faccessat) [HAVE_FACCESSAT]: New implementation.
44399         * lib/unistd.in.h (faccessat) [REPLACE_FACCESSAT]:
44400         Handle in the usual way.
44401         * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Replace faccessat if
44402         lstat dereferences symlinks, since faccessat is likely to
44403         have the same problem.
44404         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Default REPLACE_ACCESSAT.
44405         * modules/faccessat (Depends-on): Add fstatat.
44406         Depend if REPLACE_FACCESSAT is 1, too.
44407         (configure.ac): Link if REPLACE_FACCESSAT is 1.
44408         * modules/faccessat-tests (Depends-on): Add symlink.
44409         * modules/unistd (unistd.h): Substitute REPLACE_FACCESSAT.
44410         * tests/test-faccessat.c (main): Test for the bug.
44412 2017-11-11  Bruno Haible  <bruno@clisp.org>
44414         getprogname: Fix compilation error on IRIX.
44415         * lib/getprogname.c (getprogname) [__sgi]: Fix type of local variable
44416         'namesize'.
44418 2017-11-11  Bruno Haible  <bruno@clisp.org>
44420         year2038: Tweak last patch.
44421         * m4/year2038.m4 (gl_YEAR2038): Correct indentation.
44423 2017-11-06  Paul Eggert  <eggert@cs.ucla.edu>
44425         year2038: be more insistent about 64-bit time_t
44426         Applications requiring access to arbitrary files should not be
44427         built with 32-bit time_t on hosts that have 64-bit timestamps,
44428         as this can lead to real trouble at runtime.
44429         * m4/year2038.m4 (gl_YEAR2038): Do not require AC_CANONICAL_HOST.
44430         Check on all systems, not just MinGW.  Use a heuristic involving
44431         TIME_T_32_BIT_OK, cross_compiling, and the touch command to
44432         output a failure or just a warning, to make it more likely that
44433         builders will select 64-bit time_t.
44435 2017-11-05  Paul Eggert  <eggert@cs.ucla.edu>
44437         havelib: fix typo in previous change
44438         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Fix typo.
44440         Don’t use AC_EGREP_CPP if affected by CFLAGS
44441         * m4/float_h.m4 (gl_FLOAT_H):
44442         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI):
44443         * m4/lib-ld.m4 (AC_LIB_PROG_LD):
44444         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB):
44445         * m4/year2038.m4 (gl_YEAR2038):
44446         Prefer AC_COMPILE_IFELSE to AC_EGREP_CPP when testing conditions
44447         likely to be affected by the choice of CFLAGS, since CFLAGS are
44448         not used by AC_EGREP_CPP.  Without this patch, ‘./configure
44449         CFLAGS="-m32"’ fails on gzip with GNU/Linux x86-64.
44451         fstatat: pacify GCC on unusual platform
44452         * lib/fstatat.c (orig_fstatat) [!HAVE_WORKING_FSTATAT_ZERO_FLAG]:
44453         Omit, as it’s unused in this case.
44455 2017-10-29  Paul Eggert  <eggert@cs.ucla.edu>
44457         timespec: prefer ‘assume’ to ‘assure’
44458         This avoids some runtime tests.  The rest of the module makes
44459         similar assumptions and there is little point to testing here.
44460         * lib/timespec.h: Include verify.h instead of assure.h.
44461         (timespec_cmp): Use ‘assume’, not ‘assure’.
44462         Also, remove an unnecessary cast to ‘int’, as lots of other
44463         code in this module now causes -Wconversion to complain, and
44464         this is a problem with -Wconversion not with the code.
44466         * modules/timespec (Depends-on): Depend on ‘verify’, not ‘assure’.
44468         Port recent gnulib-tool change to Dash
44469         * gnulib-tool (func_create_testdir): Don't assume that the shell
44470         retokenizes after expanding "$@" inside the call to
44471         func_execute_command.  Dash 0.5.8-2.1ubuntu2 does not.
44473 2017-10-27  Jim Meyering  <meyering@fb.com>
44475         timespec.h: use "assure" to avoid a spurious warning
44476         * lib/timespec.h: Include "assure.h" and use it to help
44477         gcc7's -Wstrict-overflow avoid a false positive warning
44478         for a use in coreutils' ls.c.  Suggested by Paul Eggert in
44479         https://lists.gnu.org/r/bug-gnulib/2017-10/msg00007.html
44480         * modules/timespec (Depends-on): Add assure.
44482 2017-10-29  Bruno Haible  <bruno@clisp.org>
44484         Avoid several test failures with traditional locales on Haiku.
44485         * m4/locale-ar.m4 (gt_LOCALE_AR): On BeOS and Haiku, set LOCALE_AR=none.
44486         * m4/locale-fr.m4 (gt_LOCALE_FR): On BeOS and Haiku, set LOCALE_FR=none.
44487         * m4/locale-ja.m4 (gt_LOCALE_JA): On BeOS and Haiku, set LOCALE_JA-none.
44488         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): On BeOS and Haiku, set
44489         LOCALE_ZH_CN=none.
44491 2017-10-29  Bruno Haible  <bruno@clisp.org>
44493         strerror_r-posix: Fix behaviour and test failure on Haiku.
44494         * lib/strerror_r.c (strerror_r): Don't assume that valid error numbers
44495         are positive. Work around return value 0 instead of ERANGE on Haiku.
44496         For unknown error numbers, use a format string consistent with perror().
44497         * doc/posix-functions/strerror_r.texi: Mention the Haiku problem.
44498         * tests/test-strerror_r.c (main): Don't assume that valid error numbers
44499         are positive.
44501 2017-10-29  Bruno Haible  <bruno@clisp.org>
44503         get-rusage-data: Avoid crash on Haiku.
44504         * lib/get-rusage-data.c: Avoid the setlimit-based implementation.
44506 2017-10-29  Bruno Haible  <bruno@clisp.org>
44508         get-rusage-as: Avoid crash on Haiku.
44509         * lib/get-rusage-as.c: Avoid the setlimit-based implementation.
44511 2017-10-29  Bruno Haible  <bruno@clisp.org>
44513         ilogbl: Ensure replacement on Haiku.
44514         * m4/ilogbl.m4 (gl_FUNC_ILOGBL): Invoke gl_FUNC_ILOGBL_WORKS and set
44515         REPLACE_ILOGBL if ilogbl does not work.
44516         (gl_FUNC_ILOGBL_WORKS): New macro.
44517         * lib/math.in.h (ilogbl): Replace if REPLACE_ILOGBL is 1.
44518         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_ILOGBL.
44519         * modules/math (Makefile.am): Substitute REPLACE_ILOGBL.
44520         * modules/ilogbl (Depends-on, configure.ac): Consider REPLACE_ILOGBL.
44521         * doc/posix-functions/ilogbl.texi: Mention the Haiku problem.
44523 2017-10-29  Bruno Haible  <bruno@clisp.org>
44525         expl: Ensure replacement on Haiku.
44526         * m4/expl.m4 (gl_FUNC_EXPL): Test whether an expl() return value is
44527         zero.
44528         * doc/posix-functions/expl.texi: Mention the Haiku problem.
44530 2017-10-29  Bruno Haible  <bruno@clisp.org>
44532         math: Fix test failure on Haiku.
44533         * lib/math.in.h (FP_ILOGB0, FP_ILOGBNAN): Override on Haiku.
44534         * m4/ilogb.m4 (gl_FUNC_ILOGB_WORKS): Update accordingly.
44535         * m4/ilogbf.m4 (gl_FUNC_ILOGBF_WORKS): Likewise.
44536         * doc/posix-headers/math.texi: Mention the Haiku problem.
44538 2017-10-29  Bruno Haible  <bruno@clisp.org>
44540         gnulib-tool: Avoid unnecessary config.h.in remaking in testdirs.
44541         * gnulib-tool (func_create_testdir): Use workaround against 'autoheader'
44542         bug reported at <https://savannah.gnu.org/support/index.php?109406>.
44544 2017-10-29  Bruno Haible  <bruno@clisp.org>
44546         crypto/*: Verify that the header file is self-contained.
44547         * tests/test-gc-*.c: Include the module's header file immediately after
44548         <config.h>.
44549         * tests/test-hmac-*.c: Likewise.
44550         * tests/test-arcfour.c: Likewise.
44551         * tests/test-arctwo.c: Likewise.
44552         * tests/test-des.c: Likewise.
44553         * tests/test-md2.c: Likewise.
44554         * tests/test-md4.c: Likewise.
44555         * tests/test-md5.c: Likewise.
44556         * tests/test-rijndael.c: Likewise.
44557         * tests/test-sha1.c: Likewise.
44558         * tests/test-sm3.c: Likewise.
44560 2017-10-29  Jia Zhang  <qianyue.zj@alibaba-inc.com>
44561             Bruno Haible  <bruno@clisp.org>
44563         crypto/gc: fix build failure with -Werror=suggest-attribute=const
44564         * lib/gc.h (gc_hash_digest_length): Mark with 'const' attribute.
44566 2017-10-29  Jia Zhang  <qianyue.zj@alibaba-inc.com>
44568         New module: crypto/gc-sm3
44569         * lib/gc.h: Declare SM3-related stuffs.
44570         * lib/gc-gnulib.c: Support sm3 in internal functions.
44571         * lib/gc-libgcrypt.c: Support sm3 with libgcrypt.
44572         * m4/gc-sm3.m4: m4 file for gc-sm3 module.
44573         * modules/crypto/gc-sm3: Define gc-sm3 module.
44574         * tests/test-gc-sm3.c: Implement SM3 test case with libgcrypt.
44575         * modules/crypto/gc-sm3-tests: Define gc-sm3 test module.
44576         * MODULES.html.sh: List gc-sm3 module.
44578 2017-10-29  Bruno Haible  <bruno@clisp.org>
44580         random, random_r: Mention different prototypes on Haiku.
44581         * doc/posix-functions/random.texi: Mention different prototype on Haiku.
44582         * doc/glibc-functions/random_r.texi: Likewise.
44583         * doc/glibc-functions/initstate_r.texi: Likewise.
44584         * doc/glibc-functions/setstate_r.texi: Likewise.
44586 2017-10-28  Bruno Haible  <bruno@clisp.org>
44588         posix_spawn: Avoid spurious message in configure output.
44589         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Discard stderr output from
44590         'cmp' command.
44592 2017-10-28  Bruno Haible  <bruno@clisp.org>
44594         inet_ntop, inet_pton: Determine needed library correctly on Haiku.
44595         * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): Search also in libnetwork.
44596         * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Likewise.
44598 2017-10-28  Bruno Haible  <bruno@clisp.org>
44600         ioctl: Override non-POSIX declaration on Haiku.
44601         * m4/ioctl.m4 (gl_FUNC_IOCTL): Include also <unistd.h>.
44602         * lib/sys_ioctl.in.h: Add comment about Haiku.
44603         * doc/posix-functions/ioctl.texi: Mention Haiku problem.
44604         * doc/glibc-headers/sys_ioctl.texi: Likewise.
44606 2017-10-28  Bruno Haible  <bruno@clisp.org>
44608         crypto/sm3: Add overview documentation to the .h file.
44609         * lib/sm3.h: Add comments.
44611 2017-10-28  Jia Zhang  <qianyue.zj@alibaba-inc.com>
44613         New module: crypto/sm3
44614         This new module can be used to compute SM3 message digest of files or
44615         memory blocks according to the specification GM/T 004-2012
44616         Cryptographic Hash Algorithm SM3, published by State Cryptography
44617         Administration, China.
44618         The official SM3 cryptographic hash algorithm specification is
44619         available at
44620         http://www.sca.gov.cn/sca/xwdt/2010-12/17/content_1002389.shtml
44621         * lib/sm3.h: Declare the APIs of sm3 module.
44622         * lib/sm3.c: Implement SM3 hash algorithm.
44623         * m4/sm3.m4: m4 file for sm3 module.
44624         * modules/crypto/sm3: Define sm3 module.
44625         * tests/test-sm3.c: Implement SM3 test case.
44626         * modules/crypto/sm3-tests: Define sm3 test module.
44627         * MODULES.html.sh: List sm3 module.
44629 2017-10-28  Jia Zhang  <qianyue.zj@alibaba-inc.com>
44631         gc-libgcrypt: fix undefined enum type in switch statement
44632         Resolve the following build failure:
44633         lib/gc-libgcrypt.c: In function 'gc_hash_open':
44634         lib/gc-libgcrypt.c:317:5: error: case value '0' not in enumerated type
44635         'Gc_hash_mode {aka enum Gc_hash_mode}' [-Werror=switch]
44636              case 0:
44637              ^~~~
44638         * lib/gc.h (enum Gc_hash_mode): Add value GC_NULL.
44639         * lib/gc-libgcrypt.c (gc_hash_open): Use this enum value instead of 0.
44641 2017-10-28  Jia Zhang  <qianyue.zj@alibaba-inc.com>
44643         gc-libgcrypt: fix assignment error due to -Werror=pointer-sign
44644         Resolve the following build failure:
44645         lib/gc-libgcrypt.c: In function 'gc_hash_read':
44646         lib/gc-libgcrypt.c:460:14: error: pointer targets in assignment differ
44647         in signedness [-Werror=pointer-sign]
44648             digest = gcry_md_read (ctx->gch, 0);
44649                    ^
44650         * lib/gc-libgcrypt.c (gc_hash_read): Cast result of gcry_md_read.
44652 2017-10-26  Bruno Haible  <bruno@clisp.org>
44654         havelib: Fix value of LD for 32-bit compilation on NetBSD/sparc64.
44655         * m4/lib-ld.m4 (AC_LIB_PROG_LD): On NetBSD/sparc64 with CC="gcc -m32",
44656         set LD to '/usr/bin/ld -m elf32_sparc', not '/usr/bin/ld'.
44658 2017-10-21  Paul Eggert  <eggert@cs.ucla.edu>
44660         glob: fix another heap buffer overflow
44661         Problem reported by Tim Rühsen in:
44662         https://sourceware.org/bugzilla/show_bug.cgi?id=22332
44663         * lib/glob.c (glob): Avoid buffer overrun when unescaping.
44665 2017-10-19  Paul Eggert  <eggert@cs.ucla.edu>
44667         quotearg: pacify compiler re unsigned
44668         * lib/quotearg.c (quotearg_n_options):
44669         Rewrite to avoid diagnostic from overly-picky compiler.
44670         Problem reported by Sami Kerola in:
44671         https://lists.gnu.org/r/bug-gnulib/2017-10/msg00060.html
44673         glob: fix heap buffer overflow
44674         * lib/glob.c (glob): Fix off-by-one error introduced into
44675         glibc in commit dd7d45e838a42b0ed470c44b55901ea98d0c2bab
44676         dated 1997-10-29 20:33:40.  Problem reported by Tim Rühsen in:
44677         https://sourceware.org/bugzilla/show_bug.cgi?id=22320
44678         Fix suggested by Bruno Haible.
44680 2017-10-18  Paul Eggert  <eggert@cs.ucla.edu>
44682         glob: pacify fuzzer for mempcpy
44683         Problem reported by Tim Rühsen in:
44684         https://lists.gnu.org/r/bug-gnulib/2017-10/msg00054.html
44685         * lib/glob.c (glob): Do not pass NULL to mempcpy.
44687 2017-10-12  Bruno Haible  <bruno@clisp.org>
44689         doc: Fix syntax error (regression from 2017-10-03).
44690         * doc/posix-functions/strncpy.texi: Fix syntax error.
44692 2017-10-12  Bruno Haible  <bruno@clisp.org>
44694         doc: Update for Solaris 11.3.
44695         * doc/**/*.texi: For bugs that exist in both Solaris 11.0 and 11.3,
44696         mention Solaris 11.3.
44697         * m4/log2.m4: Fix comments.
44698         * m4/log2f.m4: Likewise.
44699         * m4/printf.m4: Update comments.
44700         * m4/rename.m4: Likewise.
44701         * m4/strncat.m4: Likewise.
44703         all: Write "Solaris 11.0" instead of "Solaris 11 2011-11".
44705 2017-10-10  Bruno Haible  <bruno@clisp.org>
44707         doc: Improve doc about ioctl.
44708         * doc/posix-functions/ioctl.texi: Fix list of platforms with non-POSIX
44709         prototype.
44711 2017-10-09  Bruno Haible  <bruno@clisp.org>
44713         wcwidth: Don't use obsolete syntax of 'test'.
44714         Reported by Eric Blake.
44715         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Don't optimize two 'test'
44716         invocations into one, as POSIX marks '-a' and '-o' as "obsolescent".
44718 2017-10-09  Bruno Haible  <bruno@clisp.org>
44720         getopt-posix: Fix build failure when using ac_cv_header_getopt_h=no.
44721         Reported by Christian Ehrhardt <christian.ehrhardt@canonical.com>
44722         and Daniel P. Berrange <berrange@redhat.com>.
44723         * lib/unistd.in.h (getopt): Don't attempt to avoid namespace pollution
44724         on glibc systems. The getopt-pfx-core.h file declares exactly what
44725         unistd.h needs, nothing more.
44727 2017-10-08  Bruno Haible  <bruno@clisp.org>
44729         vma-iter: Improve support for FreeBSD.
44730         * lib/vma-iter.c (vma_iterate_proc): New function, extracted from
44731         vma_iterate.
44732         (vma_iterate): Use it. For FreeBSD, try vma_iterate_bsd first.
44734 2017-10-08  Bruno Haible  <bruno@clisp.org>
44736         vma-iter: Fix truncated result on NetBSD (regression from 2017-10-07).
44737         * lib/vma-iter.c (MIN_LEFTOVER): Define to 1, not 0.
44739 2017-10-07  KO Myung-Hun  <komh@chollian.net>
44741         test-framework-sh: Fix 'invalid path dir' error.
44742         On OS/2, a path separator is ';' not ':'. And ':' is used as a
44743         separator between a drive letter and directory parts.
44744         As a result, an absolute path such as x:/path/to/dir on OS/2 is
44745         treated as an invalid path dir.
44746         * tests/init.sh (PATH_SEPARATOR): Set at startup.
44747         (path_prepend_): '?:*' is also an absolute path. Use $PATH_SEPARATOR
44748         instead of hard coded ':'.
44750 2017-10-07  Bruno Haible  <bruno@clisp.org>
44752         vma-iter: Fix truncated result on Linux (regression from 2017-09-26).
44753         * lib/vma-iter.c (MIN_LEFTOVER): New macro.
44754         (STACK_ALLOCATED_BUFFER_SIZE): Set to a minimal value if not needed.
44755         (rof_open): On Linux, do multiple read() calls and make sure
44756         MIN_LEFTOVER bytes are left when read() returns.
44758 2017-10-07  Bruno Haible  <bruno@clisp.org>
44760         vma-iter: Improve support for GNU/Hurd.
44761         * lib/vma-iter.c (vma_iterate): On GNU/Hurd, use the Mach vm_region()
44762         API, not the /proc file system.
44764 2017-10-07  Bruno Haible  <bruno@clisp.org>
44766         test-framework-sh: Don't require bash on Windows and OS/2.
44767         Reported by KO Myung-Hun.
44768         * tests/test-init.sh: Use 'shopt' only when running in bash.
44770 2017-10-06  KO Myung-Hun  <komh@chollian.net>
44772         wcwidth: check a macro version of wcwidth () as well
44773         * lib/wchar.in.h: Revert commit from 2016-01-14.
44774         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Test if wcwidth is a macro.
44776 2017-10-06  Bruno Haible  <bruno@clisp.org>
44778         getopt-posix: Clarify copyright header.
44779         * lib/getopt.in.h: Don't state that gnulib is under LGPL.
44780         * lib/getopt-pfx-core.h: Likewise.
44781         * lib/getopt-pfx-ext.h: Likewise.
44782         * lib/getopt-cdefs.in.h: Likewise.
44784 2017-10-03  Bruno Haible  <bruno@clisp.org>
44786         Fix warning "`gl_HOST_CPU_C_ABI' was expanded before it was required".
44787         * modules/host-cpu-c-abi (configure.ac): Require, don't invoke
44788         gl_HOST_CPU_C_ABI.
44790 2017-10-03  Bruno Haible  <bruno@clisp.org>
44792         doc: warn about misuse of strncpy and wcsncpy.
44793         * doc/posix-functions/strcpy.texi: Describe requirements on prior
44794         memory allocation.
44795         * doc/posix-functions/wcscpy.texi: Likewise.
44796         * doc/posix-functions/strncpy.texi: Describe what this function is not
44797         useful for.
44798         * doc/posix-functions/wcsncpy.texi: Likewise.
44800 2017-10-02  Paul Eggert  <eggert@cs.ucla.edu>
44802         fsuage: fix typo in previous change
44803         * lib/fsusage.c: Remove stray include of full-read.h.
44804         Problem reported by Sam Steingold for macOS (Bug#28669).
44806 2017-10-01  Paul Eggert  <eggert@cs.ucla.edu>
44808         fsusage: remove SVR2 support
44809         SVR2 was obsolete by 1986 and is no longer supported by anybody,
44810         and its code was getting in the way of use of this module by
44811         Emacs, which has its own ‘read’ function anyway.
44812         * lib/fsusage.c: Do not include sys/filsys.h.
44813         (get_fs_usage): Remove SVR2-specific code.
44814         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE):
44815         Do not test for sys/filsys.h or set STAT_READ_FILSYS.
44816         * modules/fsusage (Depends-on): Do not depend on full-read.
44818         Simplify autoupdate of licenses
44819         * config/srclistvars.sh (GNUWWWLICENSES): Move to a more-typical
44820         place.
44822 2017-10-01  Bruno Haible  <bruno@clisp.org>
44824         vma-iter: Add support for GNU/Hurd.
44825         * lib/vma-iter.c: Treat GNU/Hurd like Linux.
44826         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on GNU/kFreeBSD.
44828 2017-09-30  Bruno Haible  <bruno@clisp.org>
44830         vma-iter: Make it work on 32-bit Solaris with module 'largefile'.
44831         * modules/vma-iter: Don't test for sys/procfs.h, as this test would
44832         fail when module 'largefile' is in use.
44833         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Don't test HAVE_SYS_PROCFS_H.
44834         * lib/vma-iter.c: Undefine _FILE_OFFSET_BITS early.
44835         Don't test HAVE_SYS_PROCFS_H.
44837 2017-09-30  Bruno Haible  <bruno@clisp.org>
44839         havelib: Make it work for CC="gcc -m32" (regression from 2017-02-19).
44840         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Require gl_HOST_CPU_C_ABI.
44841         When $CC produces 32-bit code, set acl_libdirstem to 'lib', not 'lib64'.
44842         * modules/havelib (Depends-on): Add host-cpu-c-abi.
44844 2017-09-30  Bruno Haible  <bruno@clisp.org>
44846         uniname/uniname: Don't assume C99 compiler (regression from 2015-02-16).
44847         * lib/uniname/uniname.c (unicode_name_character): Add braces around
44848         scope of local variables.
44850 2017-09-28  Bruno Haible  <bruno@clisp.org>
44852         string: code style
44853         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Reorder list of
44854         substitutable variables.
44855         * modules/string (Makefile.am): Likewise.
44857 2017-09-26  Bruno Haible  <bruno@clisp.org>
44859         uniname/uniname-tests: Tighten code.
44860         * tests/uniname/test-uninames.c (fill_names, fill_aliases): Merge two
44861         local variables into one.
44863 2017-09-26  Bruno Haible  <bruno@clisp.org>
44865         vma-iter: Improvements for Linux and BSD platforms.
44866         - Add support for DragonFly BSD.
44867         - Make it more reliable on Linux, GNU/kFreeBSD, FreeBSD, NetBSD.
44868         * lib/vma-iter.c (struct rofile, rof_open, rof_peekchar, rof_close):
44869         Read the entire file into memory in a single system call.
44870         (vma_iterate): Update. Read from /proc on DragonFly BSD like on FreeBSD.
44871         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on DragonFly BSD.
44873 2017-09-26  Bruno Haible  <bruno@clisp.org>
44875         vma-iter: Provide the protection flags on FreeBSD.
44876         * lib/vma-iter.c (vma_iterate) [FreeBSD]: When reading from /proc,
44877         skip three fields between the addresses and the protection flags.
44879 2017-09-26  Paul Eggert  <eggert@cs.ucla.edu>
44881         glob: remove bogus extern decl
44882         * lib/glob.c (__glob_pattern_type): Remove now-spurious
44883         extern declaration.  Problem reported by Adhemerval Zanella in:
44884         https://sourceware.org/ml/libc-alpha/2017-09/msg00972.html
44886 2017-09-25  Paul Eggert  <eggert@cs.ucla.edu>
44888         uniname/uniname-tests: integer overflow fix
44889         * tests/uniname/test-uninames.c (fill_names, fill_aliases):
44890         Check for integer overflow.
44892         duplocale-tests: fix unlikely crash
44893         * tests/test-duplocale.c (get_locale_dependent_values):
44894         Don’t crash with absurdly long month names.
44896         maint: fix overflow checking in nap.h
44897         * modules/chown-tests:
44898         * modules/fchownat-tests, modules/fdutimensat-tests:
44899         * modules/futimens-tests, modules/lchown-tests:
44900         * modules/stat-time-tests, modules/utime-tests:
44901         * modules/utimens-tests, modules/utimensat-tests:
44902         Depend on intprops.
44903         * tests/nap.h: Include intprops.h.
44904         (diff_timespec): Handle overflow properly.
44906         sys_types: update URL
44907         * m4/sys_types_h.m4: Use https: URL.
44909         parse-datetime: fix dependency
44910         * modules/parse-datetime (Depends-on): Depend
44911         on nstrftime, not strftime.
44913         parse-datetime, posixtm: avoid uninit access
44914         * lib/parse-datetime.y (parse_datetime2):
44915         * lib/posixtm.c (posixtime):
44916         Do not access uninitialized storage, even though the resulting
44917         value is never used.
44919 2017-09-25  Bruno Haible  <bruno@clisp.org>
44921         vma-iter: Improvements for BSD platforms.
44922         - Add support for GNU/kFreeBSD.
44923         - Make it work on FreeBSD and NetBSD even when /proc is not mounted.
44924         - Speed up on OpenBSD.
44925         * lib/vma-iter.c (struct rofile, rof*): Define also on GNU/kFreeBSD.
44926         (vma_iterate_bsd): New function.
44927         (vma_iterate): Use it as fallback on FreeBSD and NetBSD. Use it as
44928         first choice on OpenBSD. Treat GNU/kFreeBSD like Linux.
44929         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on GNU/kFreeBSD.
44930         * modules/vma-iter (configure.ac): Require AC_C_INLINE.
44932 2017-09-23  Bruno Haible  <bruno@clisp.org>
44934         strfmon_l: New module.
44935         * modules/strfmon_l: New file.
44936         * lib/strfmon_l.c: New file.
44937         * m4/strfmon_l.m4: New file.
44938         * doc/posix-functions/strfmon_l.texi: Mention the new module.
44939         * modules/strfmon_l-tests: New file.
44940         * tests/test-strfmon_l.c: New file.
44942         monetary: New module.
44943         * modules/monetary: New file.
44944         * lib/monetary.in.h: New file.
44945         * m4/monetary_h.m4: New file.
44946         * doc/posix-headers/monetary.texi: Mention the new module.
44947         * modules/monetary-tests: New file.
44948         * tests/test-monetary.c: New file.
44949         * modules/monetary-c++-tests: New file.
44950         * tests/test-monetary-c++.cc: New file.
44951         * modules/duplocale-tests (configure.ac): Use AC_CHECK_HEADERS_ONCE.
44953 2017-09-23  Bruno Haible  <bruno@clisp.org>
44955         duplocale tests: Fix test crash on Linux/x86.
44956         * tests/test-duplocale.c (test_with_uselocale): Disconnect the mixed2
44957         locale from the current thread before freeing it.
44959 2017-09-21  Paul Eggert  <eggert@cs.ucla.edu>
44961         mktime: port to OpenVMS
44962         Problem reported by John E. Malmberg in:
44963         https://lists.gnu.org/r/bug-gnulib/2017-09/msg00100.html
44964         * m4/mktime.m4 (TIME_T_IS_SIGNED): Default to 0.
44966 2017-09-16  Paul Eggert  <eggert@cs.ucla.edu>
44968         manywarnings: port to GCC on 64-bit MS-Windows
44969         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Work better if
44970         LONG_MAX < PTRDIFF_MAX.  Problem reported by Richard Copley in:
44971         https://lists.gnu.org/r/emacs-devel/2017-09/msg00392.html
44973 2017-09-13  Bruno Haible  <bruno@clisp.org>
44975         all: Replace many more http URLs by https URLs. Update stale URLs.
44976         * users.txt: Remove mention of 'newts'.
44977         * lib/localename.c: Update comment about LANG_SOTHO.
44979 2017-09-13  Paul Eggert  <eggert@cs.ucla.edu>
44981         all: Replace many http URLs by https URLs.
44983 2017-09-12  Bruno Haible  <bruno@clisp.org>
44985         doc: Prefer https URLs where possible.
44986         * doc/**/*.texi: Use https URLs instead of http URLs where possible.
44987         * doc/ld-output-def.texi: Remove unavailable URL.
44989 2017-09-12  Paul Eggert  <eggert@cs.ucla.edu>
44991         maintainer-makefile: FTP -> HTTPS
44992         * top/maint.mk (url_dir_list, ftp-gnu): Use HTTPS protocol instead
44993         of FTP, which is planned to be decommissioned on 2017-11-01.
44995 2017-09-12  Tim Rühsen  <tim.ruehsen@gmx.de>  (tiny change)
44997         libc-config: Fix __GNUC_PREREQ macro.
44998         * lib/libc-config.h (__GNUC_PREREQ): Use __GNUC_MINOR__, not
44999         __GNUC_MINOR.
45001 2017-09-09  Bruno Haible  <bruno@clisp.org>
45003         gnulib-tool: Simplify commit from 2015-08-20.
45004         * gnulib-tool (func_add_or_update): Remove local variable
45005         is_binary_file.
45007 2017-09-08  Bruno Haible  <bruno@clisp.org>
45009         stddef: Avoid conflict with system-defined max_align_t.
45010         The configure-determined HAVE_MAX_ALIGN_T may not always be accurate.
45011         Reported by Werner Lemberg <wl@gnu.org> in
45012         <https://lists.gnu.org/r/bug-gnulib/2017-08/msg00185.html>.
45013         * lib/stddef.in.h (rpl_max_align_t): Renamed from max_align_t.
45014         (max_align_t): Define as a macro.
45015         (GNULIB_defined_max_align_t): New macro. Guards against multiple
45016         definitions of rpl_max_align_t in different copies of gnulib-generated
45017         <stddef.h>.
45019 2017-09-05  Paul Eggert  <eggert@cs.ucla.edu>
45021         libc-config: port to MSVC
45022         Problems reported by Gisle Vanem in:
45023         http://lists.gnu.org/r/bug-gnulib/2017-09/msg00016.html
45024         * lib/libc-config.h (__inline): Don't define if HAVE___INLINE.
45025         (libc_hidden_proto): Stick to Standard C syntax for varargs macro.
45026         * m4/__inline.m4: New file.
45027         * modules/libc-config (Files): Add it.
45028         (Depends-on): Use it.
45030         glob: Use enum for __glob_pattern_type result
45031         From a patch proposed by Adhemerval Zanella in:
45032         https://sourceware.org/ml/libc-alpha/2017-09/msg00212.html
45033         * lib/glob_internal.h (GLOBPAT_NONE, GLOBPAT_SPECIAL)
45034         (GLOBPAT_BACKSLASH, GLOBPAT_BRACKET): New constants.
45035         * lib/glob_internal.h (__glob_pattern_type):
45036         * lib/glob.c (glob):
45037         * lib/glob_pattern_p.c (__glob_pattern_p):
45038         Use them.
45040         glob: fix for use in glibc
45041         Problem reported by Adhemerval Zanella in:
45042         https://sourceware.org/ml/libc-alpha/2017-09/msg00213.html
45043         * lib/glob.c (DT_UNKNOWN, DT_DIR, DT_LINK):
45044         Do not redefine if _LIBC.
45046 2017-09-02  Paul Eggert  <eggert@cs.ucla.edu>
45048         glob: fix bugs with long login names
45049         Problem reported by Adhemerval Zanella in:
45050         https://sourceware.org/ml/libc-alpha/2017-08/msg00455.html
45051         * lib/glob.c (GET_LOGIN_NAME_MAX): Remove.
45052         (glob): Use the same scratch buffer for both getlogin_r and
45053         getpwnam_r.  Don’t require preallocation of the login name.  This
45054         simplifies storage allocation, and corrects the handling of
45055         long login names.
45057 2017-09-02  Bruno Haible  <bruno@clisp.org>
45059         dirent: Update doc.
45060         * doc/posix-headers/dirent.texi: More concrete list of platforms.
45062 2017-09-02  Paul Eggert  <eggert@cs.ucla.edu>
45064         glob: fix getpwnam_r errno typo
45065         * lib/glob.c (glob): Fix longstanding misuse of errno after
45066         getpwnam_r, which returns an error number rather than setting
45067         errno.
45069         glob: fix typo in recent change
45070         * lib/glob.c (glob) [!HAVE_GETPWNAM_R && !_LIBC]:
45071         Fix recently-introduced typo.
45073 2017-09-02  Paul Eggert  <eggert@cs.ucla.edu>
45075         glob: don't save and restore errno unnecessarily
45076         * lib/glob.c (glob): Don't save and restore errno
45077         merely because we have getpwnam_r.
45079         glob: don't assume getpwnam_r
45080         * lib/glob.c (glob): Port recent patches to platforms
45081         lacking getpwnam_r.
45083         scratch_buffer: don’t use private glibc API
45084         Suggested by Florian Weimer in:
45085         http://lists.gnu.org/r/bug-gnulib/2017-09/msg00004.html
45086         * lib/scratch_buffer.h: Rename to lib/malloc/scratch_buffer.h.
45087         * lib/scratch_buffer_grow.c: Rename to
45088         lib/malloc/scratch_buffer_grow.c.
45089         * lib/scratch_buffer_grow_preserve.c: Rename to
45090         lib/malloc/scratch_buffer_grow_preserve.c.
45091         * lib/scratch_buffer_set_array_size.c: Rename to
45092         lib/malloc/scratch_buffer_set_array_size.c.
45093         * lib/scratch_buffer.h: New file.
45094         * modules/scratch_buffer (Files, Makefile.am):
45095         Adjust to source-file renaming.
45097 2017-09-01  Paul Eggert  <eggert@cs.ucla.edu>
45099         glob: use scratch_buffer instead of extend_alloca
45100         Much of the lib/glob.c part of this patch comes from a glibc patch
45101         proposed by Adhemerval Zanella in:
45102         https://sourceware.org/ml/libc-alpha/2017-08/msg00456.html
45103         * lib/glob.c: Do not include <config.h>, since <libc-config.h>,
45104         included via glob.h, does this for us now.
45105         (__set_errno): Remove, as libc-config does this for us now.
45106         Include <scratch_buffer.h>.
45107         (GETPW_R_SIZE_MAX): Remove.
45108         (glob): Use struct scratch_buffer instead of extend_alloca.
45109         * lib/glob.in.h: Include libc-config.h rather than
45110         including <sys/cdefs.h> conditionally.
45111         (__BEGIN_DECLS, __END_DECLS, __THROW, __THROWNL, attribute_hidden)
45112         (__glibc_unlikely, __restrict, weak_alias):
45113         Remove, as libc-config does this for us now.
45114         * m4/glob.m4 (gl_PREREQ_GLOB):
45115         Remove sys/cdefs.h tests; no longer needed.
45116         * modules/glob (Depends-on): Add libc-config, scratch_buffer.
45117         (glob.h): Do not replace HAVE_SYS_CDEFS_H.
45119         scratch_buffer: new module
45120         * lib/scratch_buffer.h, lib/scratch_buffer_grow.c:
45121         * lib/scratch_buffer_grow_preserve.c:
45122         * lib/scratch_buffer_set_array_size.c:
45123         New files, copied from glibc with very minor changes that can be
45124         copied back.
45125         * modules/scratch_buffer: New file.
45127         libc-config: new module
45128         * MODULES.html.sh: Add libc-config.
45129         * lib/cdefs.h: New file, copied from the GNU C Library with very
45130         minor changes that can be copied back.
45131         * lib/libc-config.h, modules/libc-config: New files.
45133 2017-08-31  Paul Eggert  <eggert@cs.ucla.edu>
45135         glob: match dangling symlinks
45136         This fixes a bug I inadvertently introduced to Gnulib when I
45137         merged glibc glob back into gnulib on 2007-10-16.  This fix is
45138         inspired by a patch proposed for glibc by Adhemerval Zanella in:
45139         https://sourceware.org/ml/libc-alpha/2017-08/msg00446.html
45140         * doc/posix-functions/glob.texi: Update list of affected platforms.
45141         * lib/glob.c (__lstat64): New macro.
45142         (is_dir): New function.
45143         (glob, glob_in_dir): Match symlinks even if they are dangling.
45144         (link_stat, link_exists_p): Remove.  All uses removed.
45145         * lib/glob.in.h (__attribute_noinline__): Remove; no longer used.
45146         * m4/glob.m4 (gl_PREREQ_GLOB): Do not check for fstatat.
45147         * modules/glob-tests (Depends-on): Add symlink.
45148         * tests/test-glob.c: Include errno.h, unistd.h.
45149         (BASE): New macro.
45150         (main): Test dangling symlinks, if symlinks are supported.
45152         glob, backupfile: inode 0 is a valid inode number
45153         * doc/posix-functions/readdir.texi (readdir):
45154         * doc/posix-headers/dirent.texi (dirent.h):
45155         Document more readdir portability issues.
45156         * lib/backupfile.c (REAL_DIR_ENTRY): Remove.
45157         (numbered_backup): Don’t treat inode 0 any differently from
45158         other inode values.
45159         * lib/glob.c (struct readdir_result): Remove skip_entry member.
45160         (readdir_result_skip_entry, D_INO_TO_RESULT): Remove.
45161         All uses removed.
45162         * modules/glob (Depends-on): Remove d-ino.
45164         glob: simplify symlink detection
45165         * lib/glob.c (dirent_type): New type.  Use uint_fast8_t not
45166         uint8_t, as C99 does not require uint8_t.
45167         (struct readdir_result): Use it.  Do not define skip_entry unless
45168         it is needed; this saves a byte on platforms lacking d_ino.
45169         (readdir_result_type, readdir_result_skip_entry):
45170         New functions, replacing ...
45171         (readdir_result_might_be_symlink, readdir_result_might_be_dir):
45172         ... these functions, which were removed.  This makes the callers
45173         easier to read.  All callers changed.
45174         (D_INO_TO_RESULT): Now empty if there is no d_ino.
45176 2017-08-30  Pádraig Brady  <P@draigBrady.com>
45178         fts-tests: tag as a longrunning-test so not included by default
45179         * modules/fts-tests: This test takes about 20s on current systems,
45180         and uses about 285M of space on ext4.
45182 2017-08-30  Pádraig Brady  <P@draigBrady.com>
45184         renameat2: fix compilation on alpine linux
45185         * m4/renameat.m4: Check for <linux/fs.h> presence.
45186         * lib/renameat2.h: Only include <linux/fs.h> if present.
45187         Reported by Assaf Gordon on Alpine Linux.
45189 2017-08-24  Paul Eggert  <eggert@cs.ucla.edu>
45191         glob: try to port recent changes to MS-Windows
45192         Problem reported by Bruno Haible in:
45193         http://lists.gnu.org/r/bug-gnulib/2017-08/msg00170.html
45194         * lib/glob.c (__glob_pattern_p) [!_LIBC]: Move from here ...
45195         * lib/glob.in.h (__glob_pattern_p): ... to here.
45197 2017-08-24  Eric Blake  <eblake@redhat.com>
45199         warnings: fix compilation with old autoconf
45200         * m4/warnings.m4 (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C))
45201         (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)): Use m4_defun rather than
45202         AC_DEFUN.
45203         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C))
45204         (gl_MANYWARN_ALL_GCC(C++)): Likewise.
45206 2017-08-24  Bruno Haible  <bruno@clisp.org>
45208         glob: Fix compilation error on NetBSD 7.0 and OpenBSD 6.0.
45209         * modules/glob (Depends-on): Add c99.
45211 2017-08-24  Paul Eggert  <eggert@cs.ucla.edu>
45213         glob: fix typo that broke platforms lacking d_ino
45214         This typo also hurt performance on GNU/Linux and similar hosts.
45215         * lib/glob.c (D_INO_TO_RESULT): Fix typo (reversed ifdef)
45216         in previous change.
45218 2017-08-23  Paul Eggert  <eggert@cs.ucla.edu>
45220         glob: merge from glibc with Zanella glob changes
45221         Merge glob from glibc, with changes for glob proposed
45222         by Adhemerval Zanella in the thread starting here:
45223         https://sourceware.org/ml/libc-alpha/2017-08/msg01079.html
45224         plus some fixes for this merge.
45225         * lib/glob_internal.h, lib/glob_pattern_p.c, lib/globfree.c:
45226         New files, ported from glibc.
45227         * lib/glob-libc.h (_Restrict_): Remove.  All uses replaced
45228         with __restrict.
45229         (__size_t): Remove.  All uses replaced by size_t.
45230         (size_t): Define by defining __need_size_t and including <stddef.h>.
45231         This should work even in non-glibc platforms, where any name
45232         pollution is OK.
45233         Use __USE_MISC instead of __USE_BSD || __USE_GNU.
45234         (struct stat64): Don’t worry about __GLOB_GNULIB.
45235         (glob, globfree, glob_pattern_p): Remove macros for
45236         __USE_FILE_OFFSET64 && __GNUC__ < 2 && !defined __GLOB_GNULIB
45237         case.  Remove _GL_ARG_NONNULL as GNU behavior is to accept NULL
45238         but set errno.
45239         * lib/glob.c (_GL_ARG_NONNULL) [!_LIBC]: Remove.  All uses
45240         removed since the glibc behavior works on null pointers.
45241         Do not include stdio.h; old SunOS is irrelevant now.
45242         Do not worry about GLOB_ONLY_P as we now mimic glibc here.
45243         Include glob_internal.h.
45244         (D_INO_TO_RESULT): Depend on (_LIBC || D_INO_IN_DIRENT), not
45245         ((POSIX || WINDOWS32) && !__GNU_LIBRARY__).  The latter probably
45246         worked only coincidentally.
45247         (attribute_hidden, __attribute_noinline__, __glibc_unlikely):
45248         Remove macros; now done in glob.in.h.
45249         (size_add_wrapv): Do not use __builtin_add_overflow if __ICC.
45250         (glob): Properly initialize glob structure with
45251         GLOB_BRACE|GLOB_DOOFFS (bug 20707).
45252         Remove old code using SHELL since Bash no longer
45253         uses this.
45254         (glob, prefix_array): Separate MS code better.
45255         (glob, glob_in_dir): Use C99 decls before statements when glibc
45256         does.
45257         (glob_in_dir): Remove old Amiga and VMS code.
45258         (globfree, __glob_pattern_type, __glob_pattern_p): Move to
45259         separate files.
45260         * lib/glob.in.h (attribute_hidden, __attribute_noinline__)
45261         (__glibc_unlikely):
45262         Move here from glob.c.
45263         (__restrict): New macro here, replacing the _Restrict_ in glob.c.
45264         (weak_alias): New macro.
45265         (__size_t): Remove.  All uses replaced by size_t.
45266         * modules/d-ino (License): Now LGPLv2+, for compatibility with glob.
45267         * modules/glob (Files): Add +lib/glob_internal.h,
45268         lib/glob_pattern_p.c, lib/globfree.c.
45269         (Depends-on): Remove snippet/arg-nonnull.
45271 2017-08-22  Paul Eggert  <eggert@cs.ucla.edu>
45273         glob: port to clang's Undefined Sanitizer
45274         Problem reported by Tim Rühsen in:
45275         http://lists.gnu.org/r/bug-gnulib/2017-08/msg00144.html
45276         * lib/glob.c (FLEXIBLE_ARRAY_MEMBER) [_LIBC]: Define to empty.
45277         (glob_in_dir): Do not rely on undefined behavior in accessing
45278         struct members beyond their bounds.  Use a flexible array member
45279         instead.
45281 2017-08-21  Paul Eggert  <eggert@cs.ucla.edu>
45283         vc-list-files: port to Solaris 10
45284         * build-aux/vc-list-files: Don't assume test -e works.
45286 2017-08-21  Karl Berry  <karl@freefriends.org>
45288         * doc/posix-functions/srandom.texi (srandom): typo }.
45290 2017-08-20  Paul Eggert  <eggert@cs.ucla.edu>
45292         git-version-gen: port to Solaris 10
45293         Problem reported by Dagobert Michelsen in:
45294         http://lists.gnu.org/r/grep-devel/2017-08/msg00002.html
45295         * build-aux/git-version-gen (v_from_git):
45296         Use expr instead of shell substitution.
45298 2017-08-19  Bruno Haible  <bruno@clisp.org>
45300         host-cpu-c-abi: Improve detection of MIPS ABI.
45301         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): For MIPS, test the value of
45302         _MIPS_SIM.
45304 2017-08-17  Bruno Haible  <bruno@clisp.org>
45306         hypot tests: Fix test failure on FreeBSD 11.0/x86.
45307         * tests/test-hypot.h (test_function): Declare z as 'volatile'.
45309 2017-08-17  Bruno Haible  <bruno@clisp.org>
45311         float: Fix LDBL_MIN value on FreeBSD/x86.
45312         * lib/float.in.h (LDBL_MIN) [__FreeBSD__]: Add more precision.
45314 2017-08-17  Bruno Haible  <bruno@clisp.org>
45316         random: Fix test compilation failure on Cygwin 1.5.25.
45317         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_DECL_INITSTATE,
45318         HAVE_DECL_SETSTATE.
45319         * m4/random.m4 (gl_FUNC_RANDOM): Test whether initstate and setstate are
45320         declared.
45321         * modules/stdlib (Makefile.am): Substitute HAVE_DECL_INITSTATE,
45322         HAVE_DECL_SETSTATE.
45323         * lib/stdlib.in.h (initstate): Declare also if HAVE_DECL_INITSTATE is 0.
45324         (setstate): Declare also if HAVE_DECL_SETSTATE is 0.
45325         * doc/posix-functions/initstate.texi: Mention the Cygwin 1.5.x problem.
45326         * doc/posix-functions/random.texi: Likewise.
45327         * doc/posix-functions/setstate.texi: Likewise.
45328         * doc/posix-functions/srandom.texi: Likewise.
45330 2017-08-16  Bruno Haible  <bruno@clisp.org>
45332         stdnoreturn: Fix test compilation failure on Cygwin.
45333         * m4/stdnoreturn.m4 (gl_STDNORETURN_H): On Cygwin, use gnulib's
45334         <stdnoreturn.h> replacement.
45335         * lib/stdnoreturn.in.h (noreturn): Treat Cygwin like MSVC.
45336         * doc/posix-headers/stdnoreturn.texi: Mention the Cygwin problem.
45338 2017-08-16  Bruno Haible  <bruno@clisp.org>
45340         thread: Fix conflict with pthread_sigmask module.
45341         * lib/glthread/thread.h (pthread_sigmask): Don't declare it weak if
45342         it's defined as a macro.
45343         * modules/thread (Depends-on): Add pthread_sigmask.
45345 2017-08-16  Paul Eggert  <eggert@cs.ucla.edu>
45347         rename: port better to NetBSD
45348         * doc/posix-functions/rename.texi (rename): NetBSD 7
45349         does not have the link-count bug.
45350         * m4/rename.m4 (gl_FUNC_RENAME): Don’t consider NetBSD to be
45351         broken merely because rename ("a", "b") removes "a" when the two
45352         names are hard links to the same file.
45354 2017-08-16  Bruno Haible  <bruno@clisp.org>
45356         iconv_open, uni*: Add support for VPATH builds with OpenBSD 'make'.
45357         * modules/iconv_open (Makefile.am): In the rules that use gperf, prefix
45358         the target file names with '$(srcdir)/'.
45359         * modules/unicase/locale-language (Makefile.am): Likewise.
45360         * modules/unicase/special-casing (Makefile.am): Likewise.
45361         * modules/unictype/bidiclass-byname (Makefile.am): Likewise.
45362         * modules/unictype/category-byname (Makefile.am): Likewise.
45363         * modules/unictype/combining-class-byname (Makefile.am): Likewise.
45364         * modules/unictype/joininggroup-byname (Makefile.am): Likewise.
45365         * modules/unictype/joiningtype-byname (Makefile.am): Likewise.
45366         * modules/unictype/property-byname (Makefile.am): Likewise.
45367         * modules/unictype/scripts (Makefile.am): Likewise.
45368         * modules/uninorm/composition (Makefile.am): Likewise.
45370 2017-08-16  Bruno Haible  <bruno@clisp.org>
45372         nonblocking-socket tests: Fix failure on OpenBSD 6.0.
45373         * tests/test-nonblocking-socket.h (SOCKET_DATA_BLOCK_SIZE): Increase
45374         value for OpenBSD.
45376 2017-08-16  Bruno Haible  <bruno@clisp.org>
45378         rename, renameat: Update doc regarding NetBSD.
45379         * doc/posix-functions/rename.texi: Clarify that when using
45380         -D_XOPEN_SOURCE=500 on NetBSD 7.0, the hard link bug is gone.
45381         * doc/posix-functions/renameat.texi: Be more precise about NetBSD
45382         version.
45384 2017-08-15  Paul Eggert  <eggert@cs.ucla.edu>
45386         renameat2: port better to macOS
45387         * lib/renameat2.c (renameat2): Use renameatx_np if available.
45389         futimens: don’t assume struct timespec layout
45390         * m4/futimens.m4 (gl_FUNC_FUTIMENS):
45391         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT):
45392         * tests/test-fdutimensat.c (main):
45393         * tests/test-futimens.h (test_futimens):
45394         * tests/test-lutimens.h (test_lutimens):
45395         * tests/test-utimens.h (test_utimens):
45396         * tests/test-utimensat.c (main):
45397         Don’t assume that struct timespec is a two-member structure in
45398         tv_sec, tv_nsec order.  Although this is true on all platforms we
45399         know about, POSIX does not guarantee it.
45401         rename: document+test NetBSD rename
45402         Test failure reported by Bruno Haible in:
45403         http://lists.gnu.org/r/bug-gnulib/2017-08/msg00104.html
45404         This is an area where NetBSD is better-behaved than POSIX,
45405         so allow the NetBSD behavior in tests.
45406         * doc/posix-functions/rename.texi:
45407         * doc/posix-functions/renameat.texi: Document NetBSD behavior.
45408         * tests/test-rename.h (test_rename): Allow NetBSD behavior.
45410 2017-08-15  Bruno Haible  <bruno@clisp.org>
45412         renameat: Ensure declaration in <stdio.h> on NetBSD.
45413         * lib/stdio.in.h: Include <unistd,h> also on NetBSD.
45414         * doc/posix-functions/renameat.texi: Mention this problem.
45416 2017-08-15  Bruno Haible  <bruno@clisp.org>
45418         duplocale: Work around NetBSD 7.0 bug.
45419         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Test against the NetBSD 7.0 bug.
45420         * lib/duplocale.c: Add comment about NetBSD problem.
45421         * doc/posix-functions/duplocale.texi: Mention the NetBSD problem.
45423 2017-08-15  Bruno Haible  <bruno@clisp.org>
45425         duplocale tests: Verify use with *_l functions.
45426         * modules/duplocale-tests (configure.ac): Test for uselocale and
45427         some *_l functions.
45428         * tests/test-duplocale.c (test_with_uselocale): New function, extracted
45429         from main.
45430         (get_locale_dependent_values_from, test_with_locale_parameter): New
45431         functions.
45432         (main): Test both test_with_uselocale and test_with_locale_parameter.
45434 2017-08-15  Bruno Haible  <bruno@clisp.org>
45436         extensions: Enable NetBSD specific extensions.
45437         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Define _NETBSD_SOURCE.
45439 2017-08-14  Bruno Haible  <bruno@clisp.org>
45441         open, openat: Update doc about O_CLOEXEC.
45442         * doc/posix-functions/open.texi: More concrete list of platforms.
45443         * doc/posix-functions/openat.texi: Likewise.
45445 2017-08-14  Paul Eggert  <eggert@cs.ucla.edu>
45447         open: support O_CLOEXEC
45448         * NEWS, doc/posix-functions/open.texi:
45449         * doc/posix-functions/openat.texi: Document this.
45450         * lib/fcntl.in.h (O_CLOEXEC): Default to a nonzero value.
45451         (GNULIB_defined_O_CLOEXEC): New symbol.
45452         * lib/open.c: Include cloexec.h.
45453         (open): Support O_CLOEXEC.
45454         * lib/openat.c: Include cloexec.h.
45455         (rpl_openat): Support O_CLOEXEC.
45456         * lib/popen-safer.c: Do not include cloexec.h.
45457         (open_noinherit): Remove.
45458         (popen_safer): Use O_CLOEXEC instead of set_cloexec_flag.
45459         * lib/save-cwd.c: Do not include cloexec.h.
45460         (save_cwd): Use O_CLOEXEC instead of set_cloexec_flag.
45461         * m4/open-cloexec.m4: New file.
45462         * m4/open.m4 (gl_FUNC_OPEN): Require gl_PREPROC_O_CLOEXEC.
45463         Replace 'open' if O_CLOEXEC is not present.
45464         * m4/openat.m4 (gl_FUNC_OPENAT): Require gl_PREPROC_O_CLOEXEC.
45465         Replace 'openat' if O_CLOEXEC is not present.
45466         * modules/freopen (Depends-on): Depend on 'open' if replacing freopen.
45467         * modules/open (Files): Add m4/open-cloexec.m4.
45468         (Depends-on): Depend on cloexec if replacing 'open'.
45469         * modules/openat (Files): Add m4/open-cloexec.m4.
45470         (Depends-on): Depend on cloexec if replacing openat.
45471         * modules/popen-safer (Depends-on): Remove cloexec.
45472         * modules/save-cwd (Depends-on): Remove cloexec, and add
45473         fd-safer-flag and 'open'.
45475 2017-08-13  Paul Eggert  <eggert@cs.ucla.edu>
45477         reallocarray: minor fixes
45478         * doc/glibc-functions/reallocarray.texi: Update version numbers.
45479         * m4/reallocarray.m4 (gl_FUNC_REALLOCARRAY): Don't trust _cv_ contents.
45480         * modules/reallocarray (License): Change from GPL to LGPL.
45481         * tests/test-reallocarray.c (main): Fix ENOMEM typo.
45482         Indent properly and don't use tabs.
45484 2017-08-13  Darshit Shah  <darnir@gnu.org>
45486         reallocarray: New module
45487         reallocarray is a new function in glibc 2.26 to safely allocate an array
45488         of memory locations with integer overflow protection.
45489         * MODULES.html.sh: Add reallocarray.
45490         * doc/glibc-functions/reallocarray.texi: Documentation for reallocarray.
45491         * lib/reallocarray.c: New file to implement module reallocarray.
45492         * lib/stdlib.in.h: Add function declarations for reallocarray.
45493         * m4/reallocarray.m4: New file.
45494         * m4/stdlib_h.m4: Declare reallocarray.
45495         * modules/reallocarray: New file.
45496         * modules/reallocarray-test: New file.
45497         * modules/stdlib: Coerce stdlib.h to export reallocarray.
45498         * tests/test-reallocarray.c: New test.
45500 2017-08-12  Paul Eggert  <eggert@cs.ucla.edu>
45502         dirent-safer: fix cloexec race
45503         * lib/opendir-safer.c: Include fcntl.h instead of unistd-safer.h.
45504         (opendir_safer): Use F_DUPFD_CLOEXEC.
45505         * modules/dirent-safer (Depends-on): Add fcntl.  Remove unistd-safer.
45506         * tests/test-dirent-safer.c: Do not include unistd-safer.h,
45507         as it is no longer a prerequisite.  Use F_DUPFD_CLOEXEC
45508         instead of dup_safer.
45510         fts: fix cloexec races
45511         * lib/fts.c [!_LIBC]: Do not include dirent--.h, unistd--.h, cloexec.h.
45512         (opendirat, diropen): Use O_CLOEXEC instead of set_cloexec_flag.
45513         (fts_build): Use F_DUPD_CLOEXEC rinstad of set_cloexec_flag.
45514         (fd_ring_check): Set cloexec flag on new file descriptors.
45515         (fts_build, fd_ring_check): While we’re at it, make sure the
45516         resulting file descriptor is not 0, 1, or 2, since that is easy.
45518 2017-08-11  Bruno Haible  <bruno@clisp.org>
45520         fts tests: Fix link error.
45521         Reported by Tom G. Christensen in
45522         https://lists.gnu.org/r/bug-gnulib/2017-08/msg00078.html
45523         * modules/fts-tests (Makefile.am): Link test-fts against LIBINTL.
45525 2017-08-10  Paul Eggert  <eggert@cs.ucla.edu>
45527         fts: port recent changes to CentOS 6
45528         Problem reported by Tom G. Christensen in:
45529         http://lists.gnu.org/r/bug-gnulib/2017-08/msg00064.html
45530         * lib/fts.c (fsword): New type.
45531         (struct dev_type, filesystem_type): Use it.
45532         * m4/fts.m4 (gl_FUNC_FTS_CORE): Check for __fsword_t.
45533         Also, check for f_type only if fstatfs and sys/vfs.h work.
45535 2017-08-09  Paul Eggert  <eggert@cs.ucla.edu>
45537         tempname: do not depend on secure_getenv
45538         Excess dependency noted by Eli Zaretskii (Bug#28023#17).
45539         * lib/tempname.c (__secure_getenv) [!_LIBC]: Remove; unused.
45540         * modules/tempname (Depends-on): Remove secure_getenv.
45542 2017-08-08  Paul Eggert  <eggert@cs.ucla.edu>
45544         extensions: add _OPENBSD_SOURCE
45545         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Define _OPENBSD_SOURCE.
45547 2017-08-06  Reuben Thomas  <rrt@sc3d.org>
45548             Bruno Haible  <bruno@clisp.org>
45550         manywarnings: Add support for C++.
45551         * build-aux/g++-warning.spec: New file.
45552         * m4/manywarnings-c++.m4: New file.
45553         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C++)): New macro, that
45554         redirects to manywarnings-c++.m4.
45555         * modules/manywarnings (Files): Add m4/manywarnings-c++.m4.
45557 2017-08-06  Paul Eggert  <eggert@cs.ucla.edu>
45559         git-version-gen: another fix for tags with "-"
45560         * build-aux/git-version-gen: Improve fix for tags containing "-".
45561         Suggested by Markus Armbruster in:
45562         http://lists.gnu.org/r/bug-gnulib/2017-08/msg00034.html
45564 2017-08-06  Bruno Haible  <bruno@clisp.org>
45566         warnings, manywarnings: Add support for multiple languages, not just C.
45567         * warnings.m4 (gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL): Renamed from
45568         gl_UNKNOWN_WARNINGS_ARE_ERRORS.
45569         (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C)): New macro.
45570         (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)): New macro.
45571         (gl_UNKNOWN_WARNINGS_ARE_ERRORS): Dispatch to
45572         gl_UNKNOWN_WARNINGS_ARE_ERRORS(_AC_LANG).
45573         (gl_WARN_ADD): Require the gl_UNKNOWN_WARNINGS_ARE_ERRORS specialization
45574         of the current language. If C++ is the current language, modify
45575         WARN_CXXFLAGS instead of WARN_CFLAGS.
45576         * manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)): New macro, extracted from
45577         gl_MANYWARN_ALL_GCC.
45578         (gl_MANYWARN_ALL_GCC): Dispatch to gl_MANYWARN_ALL_GCC(_AC_LANG).
45580 2017-08-06  Markus Armbruster  <armbru@pond.sub.org>
45582         git-version-gen: Fix for tags containing '-'
45584         Really old versions of git-describe (before v1.5.0, Feb 2007)
45585         don't have the number of commits in their long format output,
45586         i.e. where modern 'git describe --abbrev=4 --match="v*"' prints
45587         "v0.1-1494-g124b9", they print "v0.1-1494-g124b9".  git-version-gen
45588         recognizes both patterns, and normalizes the old format to the new one.
45590         Unfortunately, this normalization code gets confused when the tag
45591         contains '-'.  Reproducer:
45593             $ git-tag -m test v0.2-rc1
45594             $ build-aux/git-version-gen .tarball-version; echo
45595             build-aux/git-version-gen: WARNING: git rev-list failed
45596             UNKNOWN
45598         We take exact tag "v0.2-rc1" for the old format, extract the presumed
45599         tag "v0.2" from it, then run "git rev-list v0.2..HEAD" to count
45600         commits since tha tag.  Fails, because tag "v0.2" does not exist.
45602         * git-version-gen: We could perhaps drop support for versions from
45603         more than a decade ago.  But tightening the pattern match is easy
45604         enough, so do that.  Still breaks when you use version tags ending in
45605         something matching -g????, but you arguably get what you deserve then.
45607 2017-08-05  Paul Eggert  <eggert@cs.ucla.edu>
45609         valgrind-tests: use ls, and cache
45610         * m4/valgrind-tests.m4: Test ls, not bash.
45611         Problem reported by Reuben Thomas.
45612         Also, cache the result so that it can be overridden.
45614 2017-08-04  Paul Eggert  <eggert@cs.ucla.edu>
45616         manywarnings: port to 64-bit GCC builds of Emacs
45617         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Compute max safe
45618         object size rather than hardwiring 2147483647.  This is needed to
45619         build GNU Emacs, which has one conditional (and used
45620         only-in-theory) call to malloc with a literal greater than
45621         2147483647.
45623 2017-08-04  Bruno Haible  <bruno@clisp.org>
45625         Relax the license of some modules with no runtime code.
45626         * modules/std-gnu11 (License): Set to 'unlimited'.
45627         * modules/c99 (License): Likewise.
45628         Reported by Reuben Thomas <rrt@sc3d.org>.
45629         * modules/d-ino (License): Set to 'LGPL'.
45630         * modules/host-os (License): Likewise.
45631         * modules/longlong (License): Likewise.
45633 2017-08-03  Paul Eggert  <eggert@cs.ucla.edu>
45635         renameat2: port to RHEL 7 + NFS
45636         * lib/renameat2.c (renameat2) [SYS_renameat2]:
45637         Port to RHEL 7 + NFS.  Problem reported by Ted Zlatanov in:
45638         http://lists.gnu.org/r/emacs-devel/2017-08/msg00082.html
45640 2017-08-02  Paul Eggert  <eggert@cs.ucla.edu>
45642         renameat2: port to non-renameat platforms
45643         Problem reported for MSVC-2015 by Gisle Vanem in:
45644         http://lists.gnu.org/r/bug-gnulib/2017-08/msg00001.html
45645         * lib/renameat2.c [!HAVE_RENAMEAT]: Include <sys/stat.h> here too.
45646         (renameat2) [!HAVE_RENAMEAT]: Fix typo in arg passing.
45648 2017-08-01  Paul Eggert  <eggert@cs.ucla.edu>
45650         manywarnings: port to 32-bit GCC bug
45651         Problem reported by Pino Toscano in:
45652         http://lists.gnu.org/r/bug-gnulib/2017-07/msg00150.html
45653         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Use 2**31 - 1,
45654         not 2**63 - 1, to work around the following GCC bug:
45655         https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81650
45657 2017-07-30  Paul Eggert  <eggert@cs.ucla.edu>
45659         backupfile: new function to validate backup suffix
45660         * lib/backupfile.c (set_simple_backup_suffix): New function.
45661         (backupfile_internal): Use it.
45663         canonicalize: fix EOVERFLOW commentary
45664         Problem reported by Bruno Haible in:
45665         http://lists.gnu.org/r/bug-gnulib/2017-07/msg00147.html
45666         * lib/canonicalize.c (canonicalize_filename_mode):
45667         * lib/canonicalize-lgpl.c (__realpath): Fix comments.
45669         Don't interpret EOVERFLOW to mean nonexistence
45670         * lib/fts.c (fts_stat): If lstat fails, report its errno, which
45671         may be EOVERFLOW; this is likely more useful than reporting the
45672         stat errno.
45673         * lib/glob.c (link_stat): Rename from link_exists2_p and
45674         return -1/0 instead of 0/1.  Caller changed.
45675         * lib/glob.c (link_exists_p):
45676         * lib/renameat2.c (rename_noreplace, renameat2):
45677         * lib/tempname.c (try_nocreate):
45678         If errno == EOVERFLOW then the directory entry exists, so do not
45679         act as if it does not exist.
45681         backup-rename: new module
45682         It is like backupfile, except it avoids some race conditions,
45683         and it does not output to stderr or exit.
45684         * MODULES.html.sh: Add backup-rename.
45685         * lib/backup-find.c, lib/backup-internal.h, lib/backup-rename.c:
45686         * modules/backup-rename: New files.
45687         * lib/backupfile.c: Turn this into an internals file, which
45688         contains code common to backupfile and backup_rename.  Include
45689         backupfile-internal.h instead of backupfile.h.  Do not include
45690         argmatch.h or xalloc.h: include xalloc-oversized.h.  Include
45691         renameat2.h and fcntl.h.
45692         (BACKUP_NOMEM): New constant.
45693         (numbered_backup): New args BASE_OFFSET and *DIRPP.  Do not exit
45694         on memory exhaustion; just return BACKUP_NOMEM.  Caller changed.
45695         (backupfile_internal): Rename from find_backup_file_name.
45696         Support new arg RENAME.
45697         (backup_args, backup_types, get_version, xget_version):
45698         Move to lib/backup-find.c.
45699         * lib/backupfile.h (backup_file_rename): New decl.
45700         * modules/backupfile (Files): Add lib/backup-internal.h,
45701         lib/backup-find.c.
45702         (Depends-on): Add dirfd, fcntl, renameat2.
45703         (lib_SOURCES): Add backup-find.c.
45705         renameat2: port better to older Solaris
45706         * lib/renameat2.c (renameat2): Set ret_val properly on old Solaris.
45707         Add goto to use a label, to silence picky compilers.
45709         fts-tests: port to gcc -Wwrite-strings
45710         * tests/test-fts.c (base, base_d): New static vars.
45711         (argv, remove_tree, main): Use them.
45713 2017-07-26  Reuben Thomas  <rrt@sc3d.org>
45715         relocatable-lib{,-lgpl}: improve documentation
45716         * doc/relocatable-maint.texi: Document use of relocatable-lib{,-lgpl}.
45717         Various other updates.
45719 2017-07-30  Reuben Thomas  <rrt@sc3d.org>
45720             Bruno Haible  <bruno@clisp.org>
45722         relocatable-lib{,-lgpl}: add Valgrind suppressions
45723         * lib/relocatable.valgrind: New file.
45724         * modules/relocatable-lib (Files): Add relocatable.valgrind.
45725         * modules/relocatable-lib-lgpl: Likewise.
45727 2017-07-26  Reuben Thomas  <rrt@sc3d.org>
45729         relocatable: Make the license on the sources the GPL.
45730         * lib/relocatable.h, lib/relocatable.c: Change the copyright notice from
45731         LGPL, which was a special case so that the relocatable source files
45732         could be used without gnulib-tool, to GPL. They can still be used under
45733         the LGPL, using the --lgpl option to gnulib-tool.
45735 2017-07-30  Bruno Haible  <bruno@clisp.org>
45737         host-cpu-c-abi: Detect ILP32 ABI on IA-64 HP-UX.
45738         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Distinguish ia64-ilp32
45739         from ia64. For arm64, test only __aarch64__, as __ARM_64BIT_STATE and
45740         __ARM_PCS_AAPCS64 are not reliable indicators: they are not defined on
45741         Ubuntu 14.04 (gcc 4.8.4) and Debian 8 (gcc 4.9.2).
45743 2017-07-27  Paul Eggert  <eggert@cs.ucla.edu>
45745         faccessat: document AT_SYMLINK_NOFOLLOW issue
45746         * doc/posix-functions/faccessat.texi: Modernize platform list.
45747         Document AT_SYMLINK_NOFOLLOW limitation.
45749         renameat2: port to Solaris 10
45750         * lib/renameat2.c (rename_noreplace): Use lstat, not faccessat
45751         with AT_SYMLINK_NOFOLLOW (which is not portable).
45752         (renameat): Undef before using, to avoid endless recursion when
45753         the replacement renameat calls renameat2 which calls the
45754         replacement renameat.
45755         (renameat2): Use lstatat, not faccessat with AT_SYMLINK_NOFOLLOW.
45756         * modules/renameat2 (Depends-on): Remove faccessat.
45757         * modules/renameat-tests (test_renameat_LDADD):
45758         * modules/renameat2-tests (test_renameat2_LDADD):
45759         Remove $(LIB_EACCESS).
45761         renameat2: new module
45762         Although the Linux syscall renameat2 is not in glibc (yet?), it is
45763         useful to have access to its RENAME_NOREPLACE flag.
45764         * MODULES.html.sh (func_all_modules): Add renameat2.
45765         * lib/renameat2.c, lib/renameat2.h, modules/renameat2:
45766         * modules/renameat2-tests, tests/test-renameat2.c: New files.
45767         * lib/renameat.c (renameat): Move most of the implementation
45768         to renameat2, and just call renameat2.
45769         * modules/renameat (Files): Remove lib/at-func2.c.
45770         (Depends-on): Depend only on renameat2.
45771         (Include): Remove <fcntl.h>.
45772         * modules/renameat-tests (test_renameat_LDADD): Add $(LIB_EACCESS),
45773         since renameat (via renameat2) might use faccessat.
45775 2017-07-27  Erik Skultety <eskultet@redhat.com>  (tiny change)
45777         vc-list-files: Adjust the script to support git worktrees
45778         * build-aux/vc-list-files: Require existence, not directory.
45780 2017-07-26  Paul Eggert  <eggert@cs.ucla.edu>
45782         doc: bring MODULES.html.sh up to date
45783         Somehow a few months ago we stopped updating MODULES.html.sh.
45784         I don’t recall explicitly deciding this, so I updated it now.
45785         Alternatively I suppose we could remove it.
45786         * MODULES.html.sh: Add builtin-expect, c99, ctime, explicit_bzero,
45787         localtime, localtime-buffer, noreturn, nstrftime, strftime-fixes,
45788         truncate, utime, utime-h, windows-stat-inodes,
45789         windows-stat-override, windows-stat-timespec, year2038.  Sort.
45791 2017-07-26  Jim Meyering  <meyering@fb.com>
45793         fprintftime: fix build-break caused by recent renaming
45794         * lib/fprintftime.c: Include "nstrftime.c", not the now-renamed
45795         "strftime.c".
45796         * modules/fprintftime: Depend directly on nstrftime.
45798 2017-07-26  Paul Eggert  <eggert@cs.ucla.edu>
45800         regex: work with GCC7's -Werror=implicit-fallthrough=
45801         * lib/regex_internal.h (FALLTHROUGH): New macro.
45802         * lib/regcomp.c (peek_token_bracket, parse_expression):
45803         * lib/regexec.c (check_node_accept): Use it.
45805 2017-07-24  Paul Eggert  <eggert@cs.ucla.edu>
45807         fts: simplify fts_build
45808         * lib/fts.c (fts_build): Simplify, and be lazier about
45809         calling leaf_optimization.
45811         fts: three levels of leaf optimization
45812         * lib/fts.c (enum leaf_optimization): New type with three values.
45813         (S_MAGIC_AFS): New macro.  Sort them.
45814         (leaf_optimization): Rename from leaf_optimization_applies, and
45815         return enum leaf_optimization instead of bool.  All uses changed.
45816         Add cases for unknown type and for AFS.
45817         (fts_build): Don’t rely on link counts if NO_LEAF_OPTIMIZATION.
45819         fts: cache dirent_inode_sort_may_be_useful too
45820         * lib/fts.c (struct dev_type): New struct.
45821         (DEV_TYPE_HT_INITIAL_SIZE): New constant.
45822         (dev_type_hash, dev_type_compare, filesystem_type): New functions.
45823         (dirent_inode_sort_may_be_useful, leaf_optimization_applies):
45824         Now takes FTSENT const *, not int.  All uses changed.  Use
45825         filesystem_type to cache.
45826         (link_count_optimize_ok): Remove.  Caller changed to use
45827         leaf_optimization_applies, which now uses shared cache.
45829         fts: introduce MIN_DIR_NLINK
45830         * lib/fts.c (MIN_DIR_NLINK): New constant.
45831         Use it instead of 2, whenever we are talking about link counts.
45833         fts: nlink_t signedness fixups
45834         * lib/fts.c (fts_open): Set rootparent n_dirs_remaining to -1
45835         so that root need not be a special case later.
45836         (fts_read): Remove now-redundant test for fts_level.
45837         Do not assume that nlink_t is signed.
45838         (fts_build): Remove useless decrement of nlinks.
45839         (fts_stat): Avoid unlikely signed integer overflow later, if
45840         nlink_t is signed.
45842         fts-tests: new module
45843         * modules/fts-tests, tests/test-fts.c: New files.
45845 2017-07-23  Bruno Haible  <bruno@clisp.org>
45847         Rename module 'strftime' to 'nstrftime'.
45848         * m4/nstrftime.m4: Renamed from m4/strftime.m4.
45849         * lib/nstrftime.c: Renamed from lib/strftime.c.
45850         * modules/nstrftime: Renamed from modules/strftime.
45851         (Files, Makefile.am): Update.
45852         * tests/test-nstrftime.c: Renamed from tests/test-strftime.c.
45853         Fix comment.
45854         * modules/nstrftime-tests: Renamed from modules/strftime-tests.
45855         (Files, Makefile.am): Update.
45856         * modules/strftime: New file, an obsolete indirection.
45857         * doc/posix-functions/strftime.texi: Update reference.
45858         * config/srclist.txt: Update info.
45859         * NEWS: Mention the change.
45861 2017-07-21  Tim Rühsen  <tim.ruehsen@gmx.de>
45863         malloca: Silence a warning from clang's memory sanitizer.
45864         * lib/malloca.c (NO_SANITIZE_MEMORY): New macro.
45865         (freea): Use it.
45867 2017-07-18  Bruno Haible  <bruno@clisp.org>
45869         host-cpu-c-abi: Fix detection of MIPS ABI.
45870         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): For MIPS, really test the
45871         ABI, not the CPU instruction set.
45873 2017-07-16  Paul Eggert  <eggert@cs.ucla.edu>
45875         explicit_bzero: new module
45876         The explicit_bzero function has been added to glibc.
45877         This module is intended to supports its use in GNU programs.
45878         * doc/glibc-functions/explicit_bzero.texi, lib/explicit_bzero.c:
45879         * m4/explicit_bzero.m4, modules/explicit_bzero:
45880         New files.
45881         * doc/gnulib.texi (Glibc string.h): Link to new doc.
45882         * lib/string.in.h (explicit_bzero): Declare.
45883         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Add defaults for it.
45884         * modules/string (string.h): Substitute its vars.
45886 2017-07-16  Bruno Haible  <bruno@clisp.org>
45888         threadlib: Support static linking.
45889         * m4/threadlib.m4 (gl_THREADLIB_BODY): When static linking is in use,
45890         set gl_cv_have_weak to 'no'.
45892 2017-07-16  Bruno Haible  <bruno@clisp.org>
45894         unicase/locale-language: Fix link dependencies.
45895         * modules/unicase/locale-language (Link): New section.
45896         * modules/unicase/locale-language-tests (Makefile.am): Link
45897         test-locale-language program with $(LIBTHREAD).
45899 2017-07-15  John E. Malmberg  <wb8tyw@gmail.com>
45901         sys_socket: Add support for OpenVMS.
45902         * lib/sys_socket.in.h [__VMS]: Define CMSG_SPACE, CMSG_LEN.
45903         * doc/posix-headers/sys_socket.texi: Mention OpenVMS issues.
45905 2017-07-15  John E. Malmberg  <wb8tyw@gmail.com>
45907         sys_resource: Add support for OpenVMS.
45908         * lib/resource.in.h [__VMS]: Define RUSAGE_SELF, RUSAGE_CHILDREN.
45909         * doc/posix-headers/sys_resource.texi: Mention OpenVMS issues.
45911 2017-07-15  John E. Malmberg  <wb8tyw@gmail.com>
45912             Bruno Haible  <bruno@clisp.org>
45914         math: Add support for OpenVMS.
45915         * lib/math.in.h [__VMS]: Include <fp.h>.
45916         * doc/posix-headers/math.texi: Mention OpenVMS issues.
45918 2017-07-15  Bruno Haible  <bruno@clisp.org>
45920         getdtablesize: Add minimal support for OpenVMS.
45921         Reported by John E. Malmberg <wb8tyw@qsl.net>.
45922         * modules/getdtablesize (Description): Fix.
45923         * lib/getdtablesize.c: Fix comment.
45924         * m4/getdtablesize.m4 (gl_FUNC_GETDTABLESIZE): Don't replace the
45925         getdtablesize() function, even though the test fails.
45926         * doc/glibc-functions/getdtablesize.texi: Reference SUSv2. Describe
45927         limitation on OpenVMS.
45929 2017-07-13  Bruno Haible  <bruno@clisp.org>
45931         Revisit cross-compilation guesses.
45932         * m4/wctype_h.m4 (gl_WCTYPE_H): Add comment.
45934 2017-07-13  Bruno Haible  <bruno@clisp.org>
45936         Improve cross-compilation guesses for native Windows.
45937         * m4/btowc.m4 (gl_FUNC_BTOWC): Add cross-compilation guess for native
45938         Windows.
45939         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Likewise.
45940         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Likewise.
45941         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Likewise.
45942         * m4/cbrtf.m4 (gl_FUNC_CBRTF_WORKS): Likewise.
45943         * m4/cbrtl.m4 (gl_FUNC_CBRTL, gl_FUNC_CBRTL_WORKS): Likewise.
45944         * m4/ceil.m4 (gl_FUNC_CEIL): Likewise.
45945         * m4/ceilf.m4 (gl_FUNC_CEILF): Likewise.
45946         * m4/ceill.m4 (gl_FUNC_CEILL): Likewise.
45947         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
45948         * m4/dup.m4 (gl_FUNC_DUP): Likewise.
45949         * m4/expl.m4 (gl_FUNC_EXPL): Likewise.
45950         * m4/exp2.m4 (gl_FUNC_EXP2_WORKS): Likewise.
45951         * m4/exp2l.m4 (gl_FUNC_EXP2L): Likewise.
45952         * m4/expm1.m4 (gl_FUNC_EXPM1): Likewise.
45953         * m4/expm1f.m4 (gl_FUNC_EXPM1F_WORKS): Likewise.
45954         * m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Likewise.
45955         * m4/fabsl.m4 (gl_FUNC_FABSL_WORKS): Likewise.
45956         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
45957         * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Likewise.
45958         * m4/float_h.m4 (gl_FLOAT_H): Likewise.
45959         * m4/floor.m4 (gl_FUNC_FLOOR): Likewise.
45960         * m4/floorf.m4 (gl_FUNC_FLOORF): Likewise.
45961         * m4/fma.m4 (gl_FUNC_FMA_WORKS): Likewise.
45962         * m4/fmaf.m4 (gl_FUNC_FMAF_WORKS): Likewise.
45963         * m4/fmal.m4 (gl_FUNC_FMAL_WORKS): Likewise.
45964         * m4/fmod.m4 (gl_FUNC_FMOD): Likewise.
45965         * m4/fmodf.m4 (gl_FUNC_FMODF): Likewise.
45966         * m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
45967         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Likewise.
45968         * m4/frexpf.m4 (gl_FUNC_FREXPF_WORKS): Likewise.
45969         * m4/ftello.m4 (gl_FUNC_FTELLO): Likewise.
45970         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Likewise.
45971         * m4/hypot.m4 (gl_FUNC_HYPOT): Likewise.
45972         * m4/hypotf.m4 (gl_FUNC_HYPOTF, gl_FUNC_HYPOTF_WORKS): Likewise.
45973         * m4/hypotl.m4 (gl_FUNC_HYPOTL, gl_FUNC_HYPOTL_WORKS): Likewise.
45974         * m4/ilogb.m4 (gl_FUNC_ILOGB_WORKS): Likewise.
45975         * m4/ilogbf.m4 (gl_FUNC_ILOGBF_WORKS): Likewise.
45976         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Likewise.
45977         * m4/isinf.m4 (gl_ISINFL_WORKS): Likewise.
45978         * m4/isnanf.m4 (gl_ISNANF_WORKS): Likewise.
45979         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Likewise.
45980         * m4/ldexpl.m4 (gl_FUNC_LDEXPL_WORKS): Likewise.
45981         * m4/log.m4 (gl_FUNC_LOG, gl_FUNC_LOG_WORKS): Likewise.
45982         * m4/logf.m4 (gl_FUNC_LOGF, gl_FUNC_LOGF_WORKS): Likewise.
45983         * m4/logl.m4 (gl_FUNC_LOGL_WORKS): Likewise.
45984         * m4/log10.m4 (gl_FUNC_LOG10, gl_FUNC_LOG10_WORKS): Likewise.
45985         * m4/log10f.m4 (gl_FUNC_LOG10F, gl_FUNC_LOG10F_WORKS): Likewise.
45986         * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Likewise.
45987         * m4/log1p.m4 (gl_FUNC_LOG1P): Likewise.
45988         * m4/log1pf.m4 (gl_FUNC_LOG1PF, gl_FUNC_LOG1PF_WORKS): Likewise.
45989         * m4/log1pl.m4 (gl_FUNC_LOG1PL): Likewise.
45990         * m4/log2.m4 (gl_FUNC_LOG2, gl_FUNC_LOG2_WORKS): Likewise.
45991         * m4/log2f.m4 (gl_FUNC_LOG2F, gl_FUNC_LOG2F_WORKS): Likewise.
45992         * m4/log2l.m4 (gl_FUNC_LOG2L_WORKS): Likewise.
45993         * m4/logb.m4 (gl_FUNC_LOGB_WORKS): Likewise.
45994         * m4/logbf.m4 (gl_FUNC_LOGBF_WORKS): Likewise.
45995         * m4/logbl.m4 (gl_FUNC_LOGBL_WORKS): Likewise.
45996         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Likewise.
45997         * m4/mbrtowc.m4 (gl_MBRTOWC_EMPTY_INPUT, gl_MBRTOWC_C_LOCALE): Likewise.
45998         * m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise.
45999         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise.
46000         * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Likewise.
46001         * m4/modf.m4 (gl_FUNC_MODF): Likewise.
46002         * m4/modff.m4 (gl_FUNC_MODFF): Likewise.
46003         * m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
46004         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
46005         * m4/perror.m4 (gl_FUNC_PERROR): Likewise.
46006         * m4/popen.m4 (gl_FUNC_POPEN): Likewise.
46007         * m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE,
46008         gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2,
46009         gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN): Likewise.
46010         * m4/ptsname_r.m4 (gl_PREREQ_PTSNAME_R): Likewise.
46011         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
46012         * m4/regex.m4 (gl_REGEX): Likewise.
46013         * m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise.
46014         * m4/remainderf.m4 (gl_FUNC_REMAINDERF,
46015         gl_FUNC_REMAINDERF_WORKS): Likewise.
46016         * m4/remainderl.m4 (gl_FUNC_REMAINDERL,
46017         gl_FUNC_REMAINDERL_WORKS): Likewise.
46018         * m4/rename.m4 (gl_FUNC_RENAME): Likewise.
46019         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
46020         * m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise.
46021         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
46022         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
46023         * m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise.
46024         * m4/signbit.m4 (gl_SIGNBIT): Likewise.
46025         * m4/sleep.m4 (gl_FUNC_SLEEP): Likewise.
46026         * m4/sqrtl.m4 (gl_FUNC_SQRTL_WORKS): Likewise.
46027         * m4/stdint.m4 (gl_STDINT_H): Likewise.
46028         * m4/strerror.m4 (gl_FUNC_STRERROR_0): Likewise.
46029         * m4/strncat.m4 (gl_FUNC_STRNCAT): Likewise.
46030         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
46031         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
46032         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
46033         * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
46034         * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
46035         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
46036         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Likewise.
46037         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
46038         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise.
46039         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
46040         * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise.
46041         * m4/usleep.m4 (gl_FUNC_USLEEP): Likewise.
46042         * m4/utimes.m4 (gl_FUNC_UTIMES): Likewise.
46043         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.
46044         * m4/wcsrtombs.m4 (gl_WCSRTOMBS_TERMINATION, gl_WCSRTOMBS_NULL):
46045         Likewise.
46046         * m4/wctob.m4 (gl_FUNC_WCTOB): Likewise.
46047         * m4/chown.m4 (AC_FUNC_CHOWN): Add cross-compilation guess for native
46048         Windows. Enable also on Autoconf 2.70.
46049         * m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_LONG_DOUBLE,
46050         gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE,
46051         gl_PRINTF_DIRECTIVE_A, gl_PRINTF_DIRECTIVE_F, gl_PRINTF_DIRECTIVE_N,
46052         gl_PRINTF_DIRECTIVE_LS, gl_PRINTF_FLAG_LEFTADJUST, gl_PRINTF_FLAG_ZERO,
46053         gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_RETVAL_C99,
46054         gl_SNPRINTF_DIRECTIVE_N, gl_SNPRINTF_SIZE1): Add cross-compilation guess
46055         for native Windows.
46056         (gl_PRINTF_POSITIONS, gl_PRINTF_FLAG_GROUPING,
46057         gl_VSNPRINTF_ZEROSIZE_C99): Add comment.
46059 2017-07-13  Bruno Haible  <bruno@clisp.org>
46061         Improve cross-compilation guesses for native Windows.
46062         * m4/memchr.m4 (gl_FUNC_MEMCHR): Add cross-compilation guess for native
46063         Windows.
46064         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): Don't use internals of
46065         memchr.m4.
46066         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Likewise.
46068 2017-07-13  Bruno Haible  <bruno@clisp.org>
46070         Improve cross-compilation guesses for native Windows.
46071         * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): Add cross-compilation guess for
46072         native Windows.
46073         (gl_FUNC_FFLUSH): Update accordingly.
46074         * m4/fclose.m4 (gl_FUNC_FCLOSE): Likewise.
46075         * m4/fseeko.m4 (gl_FUNC_FFLUSH_STDIN): Likewise.
46077 2017-07-11  Bruno Haible  <bruno@clisp.org>
46079         More systematic m4 quoting and indentation.
46080         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Quote systematically.
46081         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
46082         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
46083         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
46084         * m4/host-os.m4 (gl_HOST_OS): Likewise.
46085         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H,
46086         gl_WINSIZE_IN_PTEM): Likewise.
46087         * m4/mbrtowc.m4 (AC_FUNC_MBRTOWC): Likewise.
46088         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Likewise.
46089         * m4/pselect.m4 (gl_FUNC_PSELECT): Likewise.
46090         * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Quote systematically.
46091         Correct indentation.
46092         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise.
46093         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
46094         * m4/jm-winsz2.m4 (gl_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL): Likewise.
46095         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
46096         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
46097         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
46099 2017-07-10  Bruno Haible  <bruno@clisp.org>
46101         round, roundf: Avoid compiler warning in configure test.
46102         * m4/round.m4 (gl_FUNC_ROUND): Use 'return' instead of exit().
46103         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
46105 2017-07-10  Bruno Haible  <bruno@clisp.org>
46107         getlogin tests: Avoid #ifdefs when sharing code between modules.
46108         * modules/getlogin_r-tests (Files): Add tests/test-getlogin.h.
46109         * modules/getlogin-tests (Files): Likewise. Remove
46110         tests/test-getlogin_r.c.
46111         * tests/test-getlogin.h: Extracted from tests/test-getlogin_r.c.
46112         * tests/test-getlogin.c: Extracted from tests/test-getlogin_r.c.
46113         * tests/test-getlogin_r.c: Include test-getlogin.h. Omit code that tests
46114         getlogin().
46116 2017-07-10  Paul Eggert  <eggert@cs.ucla.edu>
46118         getlogin: don’t assume one name per uid
46119         Problem reported by Wolfgang F. Muthmann (Bug#27640).
46120         * modules/getlogin-tests (Files): Add tests/test-getlogin_r.c.
46121         (ttyname): Remove test.
46122         * modules/getlogin_r-tests (ttyname): Remove test.
46123         * tests/test-getlogin.c: Replace this near-clone of test-getlogin_r.c
46124         with ‘#define TEST_LOGIN’ followed by ‘#include "test-getlogin_r.c"’.
46125         * tests/test-getlogin_r.c: If TEST_GETLOGIN is defined, test
46126         getlogin rather than getlogin_r.  This avoids code duplication.
46127         (main): Use isatty and fstat rather than ttyname and stat.
46128         Use getpwnam instead of getpwuid, to be portable to test platforms
46129         that have multiple login names for the same uid.
46131 2017-07-10  Tim Rühsen  <tim.ruehsen@gmx.de>
46132             Bruno Haible  <bruno@clisp.org>
46134         glob: Fix more memory leaks.
46135         * lib/glob.c (glob): Use 'goto out' in order to free dirname before
46136         returning.
46137         Reported by Tim Rühsen.
46139 2017-07-10  Bruno Haible  <bruno@clisp.org>
46141         Make sure $host and $host_os are defined when used.
46142         * m4/argz.m4 (gl_FUNC_ARGZ): Require AC_CANONICAL_HOST.
46143         * m4/closedir.m4 (gl_FUNC_CLOSEDIR): Likewise.
46144         * m4/csharpexec.m4 (gt_CSHARPEXEC): Likewise.
46145         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
46146         * m4/expl.m4 (gl_FUNC_EXPL): Likewise.
46147         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Likewise.
46148         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Likewise.
46149         * m4/opendir.m4 (gl_FUNC_OPENDIR): Likewise.
46150         * m4/poll.m4 (gl_FUNC_POLL): Likewise.
46151         * m4/pselect.m4 (gl_FUNC_PSELECT): Likewise.
46152         * m4/ptsname.m4 (gl_FUNC_PTSNAME): Likewise.
46153         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Likewise.
46154         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Likewise.
46155         * m4/ceill.m4 (gl_FUNC_CEILL): Require AC_CANONICAL_HOST outside the
46156         m4_ifdef block.
46158 2017-07-09  Bruno Haible  <bruno@clisp.org>
46160         *printf: Fix cross-compilation guess for Solaris.
46161         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): Fix copy-and-paste mistake from
46162         2010-12-21.
46164 2017-07-07  Paul Eggert  <eggert@cs.ucla.edu>
46165             Bruno Haible  <bruno@clisp.org>
46167         vasnprintf: port to macOS 10.13
46168         Problem reported by comex in:
46169         http://lists.gnu.org/r/bug-gnulib/2017-07/msg00056.html
46170         * lib/vasnprintf.c (VASNPRINTF): Don’t use %n on macOS.
46172 2017-07-06  Bruno Haible  <bruno@clisp.org>
46174         imaxdiv tests: Fix logic.
46175         * tests/test-imaxdiv.c (main): Use == instead of =.
46176         Reported by Coverity.
46178 2017-07-06  Bruno Haible  <bruno@clisp.org>
46180         uninorm/filter: Fix use-after-free bug.
46181         * lib/uninorm/uninorm-filter.c (uninorm_filter_write): Maintain
46182         sortbuf == filter->sortbuf invariant.
46183         Reported by Coverity.
46185 2017-07-06  Bruno Haible  <bruno@clisp.org>
46187         glob: Fix more memory leaks.
46188         * lib/glob.c (glob): Free dirname before returning.
46189         Reported by Coverity and Tim Rühsen.
46191 2017-07-06  Paul Eggert  <eggert@cs.ucla.edu>
46193         parse-datetime: fix uninit var bug
46194         Reported by Bruno Haible in:
46195         http://lists.gnu.org/r/bug-gnulib/2017-07/msg00038.html
46196         * lib/parse-datetime.y (parse_datetime2): Do not use
46197         uninitialized.
46199 2017-07-05  Bruno Haible  <bruno@clisp.org>
46201         doc: Update for MSVC 14.
46202         * doc/posix-headers/*.texi: Add info about MSVC 14.
46203         * doc/posix-functions/*.texi: Likewise.
46204         * doc/pastposix-functions/*.texi: Likewise.
46205         * doc/glibc-headers/*.texi: Likewise.
46206         * doc/glibc-functions/*.texi: Likewise.
46208 2017-07-05  Bruno Haible  <bruno@clisp.org>
46210         sched: Fix build failure on native Windows (regression from 2017-06-19).
46211         * m4/sched_h.m4 (gl_SCHED_H): Set HAVE_STRUCT_SCHED_PARAM always.
46213 2017-07-03  John E. Malmberg  <wb8tyw@gmail.com>
46215         stdioext: Port to OpenVMS.
46216         * lib/stdio-impl.h: OpenVMS uses struct _iobuf for FILE information.
46217         * lib/fpending.c (fpending): Remove non-working VMS specific code.
46218         * lib/fbufmode.c (fbufmode): Fix _IOLBF test to use fp_ macro.
46219         * lib/fflush.c (clear_ungetc_buffer): Add OpenVMS to comments.
46220         * lib/fpurge.c (fpurge): Likewise.
46221         * lib/freadable.c (freadable): Likewise.
46222         * lib/freadahead.c (freadahead): Likewise.
46223         * lib/freading.c (freading): Likewise.
46224         * lib/freadptr.c (freadptr): Likewise.
46225         * lib/freadseek.c (freadseek): Likewise.
46226         * lib/fseeko.c (fseeko): Likewise.
46227         * lib/fseterr.c (fseterr): Likewise.
46228         * lib/fwritable.c (fwriteable): Likewise.
46229         * lib/fwriting.c (fwriting): Likewise.
46231 2017-07-01  Benno Schulenberg  <bensberg@telfort.nl>
46233         glob: Declare variables at the very start of their scope.
46234         * lib/glob.c (convert_dirent, convert_dirent64): Give each fragment
46235         its separate scope, so the functions will compile on Haiku.
46237 2017-07-01  Bruno Haible  <bruno@clisp.org>
46239         logbl: Work around a glibc bug on PowerPC64LE.
46240         * m4/logbl.m4 (gl_FUNC_LOGBL_WORKS): Test also negative subnormal
46241         numbers.
46242         * doc/posix-functions/logbl.texi: Update.
46244 2017-06-29  Bruno Haible  <bruno@clisp.org>
46246         stat, fstat: Compile stat-w32.c only on platforms that need it.
46247         Suggested by Paul Eggert.
46248         * modules/stat (configure.ac): Request stat-w32.o only on native
46249         Windows.
46250         * modules/fstat (configure.ac): Likewise.
46252 2017-06-25  Bruno Haible  <bruno@clisp.org>
46254         stat: Improve last change.
46255         * lib/stat-w32.c: Revert last change. Use generic idiom instead.
46257 2017-06-25  Paul Eggert  <eggert@cs.ucla.edu>
46259         stat: port to xlc 12.01
46260         * lib/stat-w32.c: Always include <sys/types.h>.  Otherwise, xlc
46261         12.01 complains "Compilation unit is empty."
46263 2017-06-24  Paul Eggert  <eggert@cs.ucla.edu>
46265         xalloc-oversized: port to icc
46266         * lib/xalloc-oversized.h (xalloc_oversized): Do not use
46267         __builtin_mul_overflow if ICC is defined, as this results in
46268         "undefined reference to `__builtin_mul_overflow'" with icc 17.0.2
46269         20170213.
46271 2017-06-19  Bruno Haible  <bruno@clisp.org>
46273         classpath: Avoid including config.h twice, as it produces warnings.
46274         Reported by John E. Malmberg <wb8tyw@gmail.com>.
46275         * lib/classpath.h: Conditionalize the include of config.h.
46277 2017-06-19  Bruno Haible  <bruno@clisp.org>
46278             John E. Malmberg  <wb8tyw@gmail.com>  (tiny change)
46280         sched: Fix compilation failure on OpenVMS.
46281         * m4/sched_h.m4 (gl_SCHED_H): Require AC_CANONICAL_HOST. On OpenVMS,
46282         test whether <pthread.h> exists and defines struct sched_param.
46283         * lib/sched.in.h: On OpenVMS, include <pthread.h>.
46285 2017-06-17  Paul Eggert  <eggert@cs.ucla.edu>
46287         diffseq: port to GCC 7 with --enable-gcc-warnings
46288         * lib/diffseq.h (diag): Use an if, not an ifdef, for most of the
46289         heuristic check.  This way, GCC 7 with --enable-gcc-warnings does
46290         not complain about big_snake being defined but not used.
46292 2017-06-15  Bruno Haible  <bruno@clisp.org>
46294         gettext-h: Update theoretical condition for use of variable size arrays.
46295         Reported by Paul Eggert.
46296         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Extend comment
46297         to include the theoretical condition for availability of variable size
46298         arrays, if we could trust the value of __STDC_VERSION__.
46300 2017-06-12  Bruno Haible  <bruno@clisp.org>
46302         Relicense some modules under LGPLv2+.
46303         Daiki Ueno's approval is in
46304         https://lists.gnu.org/r/bug-gnulib/2017-06/msg00058.html.
46305         * modules/uniwidth/base (License): Change to LGPLv2+.
46306         * modules/uniwidth/width (License): Likewise.
46308 2017-06-11  Bruno Haible  <bruno@clisp.org>
46310         localename: Fix test failure on DragonFly BSD.
46311         * lib/localename.c (gl_locale_name_thread_unsafe): Treat DragonFly BSD
46312         like FreeBSD.
46314 2017-06-11  Bruno Haible  <bruno@clisp.org>
46316         float: Fix 'float' and 'isinf' failures on DragonFly BSD.
46317         * m4/float_h.m4 (gl_FLOAT_H): Treat DragonFly BSD like FreeBSD.
46318         * lib/float.in.h: Likewise.
46319         * m4/fmal.m4, m4/frexpl.m4, m4/logbl.m4: Update accordingly.
46321 2017-06-11  Bruno Haible  <bruno@clisp.org>
46323         gnulib-tool: Clean up after autotools.
46324         * gnulib-tool (func_create_testdir, func_create_megatestdir): Remove
46325         useless directory left over by the Autotools.
46327 2017-06-11  Paul Eggert  <eggert@cs.ucla.edu>
46329         getopt-posix: port to glibc 2.25.90
46330         Problem reported by Daniel P. Berrange in:
46331         http://lists.gnu.org/r/bug-gnulib/2017-06/msg00003.html
46332         * lib/getopt-pfx-core.h (_GETOPT_CORE_H):
46333         * lib/getopt-pfx-ext.h (_GETOPT_EXT_H):
46334         #undef if __GETOPT_PREFIX is defined.
46336 2017-06-11  Bruno Haible  <bruno@clisp.org>
46338         strtod-obsolete: Fix license.
46339         * modules/strtod-obsolete (License): Change to LGPL.
46341 2017-06-10  Jim Meyering  <meyering@fb.com>
46343         maint: update to work with GCC7's -Werror=implicit-fallthrough=
46344         * lib/savewd.c (FALLTHROUGH): Define.
46345         (savewd_save, savewd_restore): Use this, rather than a comment,
46346         whenever one switch case falls through into the next.
46348 2017-06-08  Bruno Haible  <bruno@clisp.org>
46350         host-cpu-c-abi: Support for aarch64 ILP32 ABI.
46351         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Recognize the aarch64 ILP32
46352         ABI. Set HOST_CPU_C_ABI=arm64-ilp32 and define __arm64_ilp32__ in this
46353         case.
46355 2017-06-08  Paul Eggert  <eggert@cs.ucla.edu>
46357         doc: remove robots, add prereqs
46358         * doc/build-automation.texi, doc/gnulib.texi: Mention prereqs for
46359         builds.  Simon's robot site does not seem to be up, so remove
46360         mentions of it for now.
46362 2017-06-08  Bruno Haible  <bruno@clisp.org>
46364         gnulib-tool: Fix bug in func_symlink_if_changed, from 2006-11-13.
46365         * gnulib-tool (func_symlink_target): New function, extracted from
46366         func_symlink.
46367         (func_symlink, func_symlink_if_changed): Use it.
46369 2017-06-08  Bruno Haible  <bruno@clisp.org>
46371         gnulib-tool: Fix bug in func_ln_s, from 2016-01-15.
46372         * gnulib-tool (func_ln_s): Determine cp_src correctly.
46374 2017-06-07  Bruno Haible  <bruno@clisp.org>
46376         canonicalize-lgpl: Avoid conflict with gnulib 'getcwd' module on VMS.
46377         Reported by John E. Malmberg <wb8tyw@gmail.com> in
46378         <https://lists.gnu.org/r/bug-gnulib/2017-06/msg00029.html>.
46379         * lib/canonicalize-lgpl.c (__getcwd): On VMS, when using gnulib's getcwd
46380         override, pass 2 arguments to getcwd, not 3.
46382 2017-06-04  Paul Eggert  <eggert@cs.ucla.edu>
46384         same-inode: port better to VMS 8.2 and later
46385         Problem reported by John E. Malmberg in:
46386         http://lists.gnu.org/r/bug-gnulib/2017-06/msg00005.html
46387         * lib/same-inode.h (SAME_INODE) [__VMS && 80200000 <= __CRTL_VER]:
46388         Use the usual POSIX definition.
46389         * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Define _USE_STD_STAT.
46391 2017-06-01  Paul Eggert  <eggert@cs.ucla.edu>
46393         error: fix POSIX violation for va_end
46394         Problem reported by Bruno Haible in:
46395         http://lists.gnu.org/r/bug-gnulib/2017-06/msg00001.html
46396         * lib/error.c (error_tail): Do not call va_end here.
46397         (error, error_at_line): Call it here instead.
46399 2017-05-28  Bruno Haible  <bruno@clisp.org>
46401         c-strtod: Make it usable in C++ mode.
46402         * lib/c-strtod.h: Add 'extern "C"' marker for C++.
46404 2017-05-25  Jim Meyering  <meyering@fb.com>
46406         quotearg: fix compilation failure due to FALLTHROUGH misuse
46407         * lib/quotearg.c (quotearg_buffer_restyled): Revert one FALLTHROUGH
46408         macro back to /* fall through */ comment.  The macro can apply only
46409         to a following case statement.  Reported by Assaf Gordon.
46411 2017-05-25  Paul Eggert  <eggert@cs.ucla.edu>
46413         intprops: port to recent icc
46414         Port to icc (ICC) 17.0.4 20170411, which defines __GNUC__ to be 5
46415         but does not support __builtin_add_overflow etc.
46416         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW) [__ICC]:
46417         Define to 0.
46419 2017-05-23  Karl Berry  <karl@freefriends.org>
46421         * config/srclist.txt (iconv.m4): sync broken, comment out
46422         until (hopefully) the next gettext release.
46424 2017-05-22  Bjarni Ingi Gislason  <bjarniig@rhi.hi.is>
46426         Remove repeated words in comments.
46428 2017-05-22  Bernhard Voelker  <mail@bernhard-voelker.de>
46430         fallthrough: reinstate a FALLTHROUGH instance in quotearg
46431         quotearg.c: Reinstate this instance which is significant
46432         when the if branch is not taken.
46434 2017-05-21  Bruno Haible  <bruno@clisp.org>
46436         gnulib-tool: Add options to create hard links.
46437         * gnulib-tool (func_usage): Document options --hardlink,
46438         --local-hardlink, --more-hardlinks.
46439         (func_symlink): Renamed from func_ln.
46440         (func_symlink_if_changed): Renamed from func_ln_if_changed.
46441         (func_hardlink): New function.
46442         (copymode, lcopymode): New variables.
46443         (symbolic, lsymbolic): Remove variables.
46444         (Options): Implement options --hardlink, --local-hardlink,
46445         --more-hardlinks.
46446         (func_should_link): Renamed from func_should_symlink. Set copyaction.
46447         (func_add_file, func_update_file): Update invocation of
46448         func_should_link. Invoke func_hardlink when appropriate.
46449         (func_import): Update comments.
46450         (func_create_testdir): Update invocation of func_should_link. Invoke
46451         func_hardlink when appropriate.
46452         Finally, invoke 'git update-index --refresh' to mitigate the effects of
46453         the hard links on git.
46455 2017-05-20  Bruno Haible  <bruno@clisp.org>
46457         argp: Simplify bit manipulation.
46458         * lib/argp-parse.c (parser_parse_opt): Use &, |, ~ instead of shifts
46459         on a signed integer type.
46461 2017-05-20  Bruno Haible  <bruno@clisp.org>
46463         Avoid wrong configure results with gcc -fsanitize=address.
46464         This completes the work done on 2016-02-06 on this topic.
46465         * m4/memmem.m4 (gl_FUNC_MEMMEM): Free allocated memory before returning.
46466         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Likewise.
46467         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
46468         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
46469         * m4/fopen.m4 (gl_FUNC_FOPEN): Close allocated FILE streams before
46470         returning.
46471         * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): Likewise.
46472         * m4/fpurge.m4 (gl_FUNC_FPURGE): Likewise.
46473         * m4/ftello.m4 (gl_FUNC_FTELLO): Likewise.
46474         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
46475         * m4/signbit.m4 (gl_FLOATTYPE_SIGN_LOCATION): Likewise.
46476         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise.
46477         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Close allocated FILE streams and
46478         free allocated memory before returning.
46479         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
46480         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Close allocated DIR
46481         objects before returning.
46482         * m4/iconv.m4 (AM_ICONV_LINK): Close allocated iconv_t handles before
46483         returning.
46485 2017-05-20  Bruno Haible  <bruno@clisp.org>
46487         gnulib-tool: Don't create hard links between gnulib and its testdirs.
46488         * gnulib-tool (func_create_testdir): Don't invoke 'ln'.
46490 2017-05-20  Bruno Haible  <bruno@clisp.org>
46492         argp, tsearch tests: Fix file list.
46493         * modules/argp-tests (Files): Add tests/macros.h.
46494         * modules/tsearch-tests (Files): Likewise.
46496 2017-05-20  Bruno Haible  <bruno@clisp.org>
46498         getopt-posix tests: Remove redundant include.
46499         * tests/test-getopt.h: Don't include "macros.h". It's already included
46500         by tests/test-getopt-main.h.
46502 2017-05-19  Jim Meyering  <meyering@fb.com>
46504         dfa: two small simplifications
46505         * lib/dfa.c (build_state): Avoid repeating longer expressions.
46507 2017-05-18  Jim Meyering  <meyering@fb.com>
46509         fallthrough: update for GCC 7/8
46510         * lib/quotearg.c (FALLTHROUGH): New macro.
46511         Use it whenever one switch case falls through into the next,
46512         replacing "/* Fall through */" comments.  This exposed one
46513         instance of an unwarranted "fall through" comment: unwarranted
46514         because it preceded a "goto" label not a case statement.
46515         * lib/freopen-safer.c (freopen_safer): Likewise.
46516         * lib/fts.c (leaf_optimization_applies): Likewise.
46517         * lib/unistr/u8-uctomb-aux.c (u8_uctomb_aux): Likewise.
46518         * tests/test-getopt_long.h (getopt_long_loop): Likewise.
46519         * tests/test-tsearch.c (mangle_tree): Likewise.  Also include
46520         tests/macros.h for the definition.
46521         * tests/test-argp.c (group1_parser): Likewise.
46522         * tests/test-getopt.h (getopt_loop): Likewise.
46524 2017-05-19  Paul Eggert  <eggert@cs.ucla.edu>
46526         argp: fix shift bug
46527         * lib/argp-parse.c (parser_parse_opt): Rework to avoid undefined
46528         behavior on shift overflow, caught by gcc -fsanitize=undefined.
46530         argp: fix pointer-subtraction bug
46531         * lib/argp-help.c (hol_append): Don’t subtract pointers to
46532         different arrays, as this can run afoul of -fcheck-pointer-bounds.
46533         See the thread containing Bruno Haible’s report in:
46534         http://lists.gnu.org/r/bug-gnulib/2017-05/msg00171.html
46536 2017-05-19  Bruno Haible  <bruno@clisp.org>
46538         printf-posix tests: Avoid test failure with "gcc --coverage".
46539         Reported by Tim Rühsen <tim.ruehsen@gmx.de>.
46540         * tests/test-printf-posix2.c (main): Test a width of 10000000 rather
46541         than 5000000.
46542         * tests/test-fprintf-posix2.c (main): Likewise.
46544 2017-05-19  Paul Eggert  <eggert@cs.ucla.edu>
46546         closeout: don’t close stderr when sanitizing
46547         * NEWS: Document this.
46548         * lib/closeout.c (__has_feature): New macro, if not already defined.
46549         (SANITIZE_ADDRESS): New constant.
46550         (close_stdout): Don’t close stderr if sanitizing addresses.
46552 2017-05-19  Bruno Haible  <bruno@clisp.org>
46554         get-rusage-data tests: Avoid failure on Linux/glibc.
46555         * tests/test-get-rusage-data.c (main): Don't expect a strict increase
46556         on glibc systems.
46558 2017-05-18  Bruno Haible  <bruno@clisp.org>
46560         localename: Include necessary header files on Cygwin.
46561         * lib/localename.c [__CYGWIN__]: Include <langinfo.h>, since this is
46562         where NL_LOCALE_NAME is defined.
46564 2017-05-18  Bruno Haible  <bruno@clisp.org>
46566         gettext: Update macros from gettext git.
46567         * m4/intldir.m4: Require Autoconf >= 2.60.
46568         * m4/progtest.m4: Fix typos in copyright notice.
46570 2017-05-18  Bruno Haible  <bruno@clisp.org>
46572         copy-file tests: Fix link error (regression from 2017-05-01).
46573         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
46574         * modules/copy-file-tests (Makefile.am): Link test-copy-file with
46575         $(LIB_CLOCK_GETTIME).
46577 2017-05-18  Bruno Haible  <bruno@clisp.org>
46579         unicase/special-casing: Fix incompatibility with gperf-3.0.4
46580         (regression from 2017-02-13).
46581         * lib/unicase/special-casing.in.h: Renamed from
46582         lib/unicase/special-casing.h.
46583         * modules/unicase/special-casing (Files): Add
46584         lib/unicase/special-casing.in.h. Remove lib/unicase/special-casing.h.
46585         (Makefile.am): Add rule for generating unicase/special-casing.h.
46586         Update BUILT_SOURCES and MOSTLYCLEANFILES accordingly.
46587         * lib/unicase/special-casing.c: Include "unicase/special-casing.h",
46588         not "special-casing.h".
46589         * lib/unicase/u*.c: Likewise.
46591 2017-05-17  Bruno Haible  <bruno@clisp.org>
46593         README: Don't ask people to read a TeXinfo file.
46594         Reported by Tim Rühsen <tim.ruehsen@gmx.de>.
46595         * README: Tell people how to read the HTML formatted manual.
46597 2017-05-16  Tim Rühsen  <tim.ruehsen@gmx.de>
46599         parse-datetime: Fix memleak
46600         * lib/parse-datetime.y (parse_datetime2): Cleanup on
46601         localtime_rz() failure.
46603 2017-05-16  Bruno Haible  <bruno@clisp.org>
46605         javacomp: Fix handle leak.
46606         Found by Coverity.
46607         * lib/javacomp.c (get_classfile_version): Close fd before returning.
46609 2017-05-16  Bruno Haible  <bruno@clisp.org>
46611         relocate: Make it easier to reclaim allocated memory.
46612         * lib/relocatable.h (relocate2): New declaration/macro.
46613         * lib/relocatable.c (relocate2): New function.
46614         * doc/relocatable-maint.texi (Supporting Relocation): Mention the
46615         relocate2 function.
46616         * lib/localcharset.c (relocate2): Define fallback.
46617         (get_charset_aliases): Invoke relocate2 instead of relocate. Free the
46618         allocated memory.
46619         * lib/javaversion.c (relocate2): Define fallback.
46620         (javaexec_version): Invoke relocate2 instead of relocate. Free the
46621         allocated memory.
46623 2017-05-16  Bruno Haible  <bruno@clisp.org>
46625         relocate: Simplify EMX specific code.
46626         * lib/relocatable.c (relocate): Assume pathname is non-NULL. Use
46627         ISSLASH macro consistently. Avoid dangerous string concatenation idiom.
46629 2017-05-16  Bruno Haible  <bruno@clisp.org>
46631         sigpipe tests: Fix file list.
46632         * modules/sigpipe-tests (Files): Add tests/macros.h.
46634 2017-05-16  Paul Eggert  <eggert@cs.ucla.edu>
46636         manywarnings: update for GCC 7
46637         * build-aux/gcc-warning.spec:
46638         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
46639         Add GCC 7 warnings, notably -Wimplicit-fallthrough=5, which
46640         requires a non-comment fallthrough attribute.  This is a bit
46641         cleaner than the comment versions.
46642         * lib/strftime.c, lib/dfa.c, lib/fnmatch.c, lib/mbrtowc.c:
46643         * lib/vasnprintf.c, tests/macros.h (FALLTHROUGH): New macro.
46644         Use it whenever one switch case falls through into the next.
46645         * lib/fnmatch_loop.c, tests/test-mbrtowc.c, tests/test-sigpipe.c:
46646         Use FALLTHROUGH macro.
46648 2017-05-15  Bruno Haible  <bruno@clisp.org>
46650         gnulib-tool: Fix generated code when libtests contains module 'alloca'.
46651         * gnulib-tool (func_emit_tests_Makefile_am): For libtests.a, use
46652         @ALLOCA@, not @LTALLOCA@.
46654 2017-05-15  Bruno Haible  <bruno@clisp.org>
46656         sys_select: Avoid "was expanded before it was required" warning.
46657         * modules/sys_select (configure.ac): Require, not invoke,
46658         gl_HEADER_SYS_SELECT.
46660 2017-05-14  Paul Eggert  <eggert@cs.ucla.edu>
46662         gnulib-tool: improve GNU Make debugging
46663         * gnulib-tool (func_emit_lib_Makefile_am): Omit unnecessary echo.
46664         Report autoconf diagnostics when it fails, in the output makefile.
46666 2017-05-14  Bruno Haible  <bruno@clisp.org>
46668         stat-time tests: Improve comment.
46669         * tests/test-stat-time.c: Add hyperlink, from Paul Eggert.
46671 2017-05-14  Bruno Haible  <bruno@clisp.org>
46673         same-inode: Adapt for windows-stat-inodes.
46674         * lib/same-inode.h: Include <sys/types.h>.
46675         (SAME_INODE) [_GL_WINDOWS_STAT_INODES]: Define specifically.
46676         * modules/same-inode (Depends-on): Add sys_types.
46678 2017-05-14  Bruno Haible  <bruno@clisp.org>
46680         windows-stat-inodes: New module.
46681         * m4/windows-stat-inodes.m4: New file.
46682         * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Set WINDOWS_STAT_INODES.
46683         * modules/sys_types (Makefile.am): Substitute WINDOWS_STAT_INODES.
46684         * lib/sys_types.in.h [WINDOWS_STAT_INODES]: Override dev_t and ino_t.
46685         (_GL_WINDOWS_STAT_INODES): New macro.
46686         * lib/stat-w32.c: Set _WIN32_WINNT. Include <string.h>, verify.h.
46687         (GetFileInformationByHandleExFunc): New variable.
46688         (initialize): Initialize it.
46689         (_gl_fstat_by_handle) [_GL_WINDOWS_STAT_INODES]: Initialize st_dev and
46690         st_ino appropriately.
46691         * lib/stat.c (rpl_stat): Use the directory entry based approach only as
46692         a fallback, because it does not provide st_dev and st_ino values.
46693         * modules/fstat (Depends-on): Add 'verify'.
46694         * modules/windows-stat-inodes: New file.
46695         * doc/windows-stat-inodes.texi: New file.
46696         * doc/gnulib.texi: Include it.
46697         * doc/posix-headers/sys_stat.texi: Mention the new module.
46699 2017-05-14  Bruno Haible  <bruno@clisp.org>
46701         stat-time tests: Workaround for native Windows.
46702         * tests/test-stat-time.c: Include <stdio.h>, <time.h>.
46703         (filename_stamp1, filename_testfile, filename_stamp2, filename_stamp3):
46704         New variables.
46705         (initialize_filenames): New function.
46706         (main): Invoke it.
46707         (cleanup, prepare_test): Update.
46709 2017-05-14  Bruno Haible  <bruno@clisp.org>
46711         stat-time: Adapt for windows-stat-timespec.
46712         * lib/stat-time.h (get_stat_birthtime) [_GL_WINDOWS_STAT_TIMESPEC]: Use
46713         entire st_ctim field.
46715 2017-05-13  Jim Meyering  <meyering@fb.com>
46717         maint.mk: update regex to reflect 2013 addition of "assume" to verify.h
46718         * top/maint.mk (sc_prohibit_verify_without_use): Don't reject a source
46719         file that uses the assume macro, claiming that verify.h is unused.
46721 2017-05-13  Bruno Haible  <bruno@clisp.org>
46723         Use symbolic values for _WIN32_WINNT.
46724         * lib/ftruncate.c (_WIN32_WINNT): Use symbolic value _WIN32_WINNT_WIN2K.
46725         * lib/sethostname.c (_WIN32_WINNT): Likewise.
46727 2017-05-13  Bruno Haible  <bruno@clisp.org>
46729         year2038: New module.
46730         * m4/year2038.m4: New file.
46731         * modules/year2038: New file.
46732         * doc/year2038.texi: New file.
46733         * doc/gnulib.texi: Include it.
46735 2017-05-13  Bruno Haible  <bruno@clisp.org>
46737         largefile: Simplify.
46738         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Remove unused definition
46739         of _GL_WINDOWS_64_BIT_ST_SIZE.
46741 2017-05-13  Bruno Haible  <bruno@clisp.org>
46743         largefile: Improve and document.
46744         * m4/largefile.m4 (gl_LARGEFILE): Set WINDOWS_64_BIT_ST_SIZE to 0 if
46745         the mingw headers already define 'stat' appropriately.
46746         * modules/largefile (Description): Clarify.
46747         * doc/largefile.texi: New file.
46748         * doc/gnulib.texi: Include it.
46749         * doc/posix-headers/sys_types.texi: Update.
46751 2017-05-13  Bruno Haible  <bruno@clisp.org>
46753         truncate: New module.
46754         * lib/unistd.in.h (truncate): New declaration.
46755         * lib/truncate.c: New file.
46756         * m4/truncate.m4: New file.
46757         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether 'truncate' is declared.
46758         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_TRUNCATE, HAVE_TRUNCATE,
46759         REPLACE_TRUNCATE.
46760         * modules/unistd (Makefile.am): Substitute GNULIB_TRUNCATE,
46761         HAVE_TRUNCATE, REPLACE_TRUNCATE.
46762         * modules/truncate: New file.
46763         * tests/test-unistd-c++.cc (truncate): Test signature.
46764         * doc/posix-functions/truncate.texi: Mention the new module.
46766         * tests/test-truncate.c: New file.
46767         * modules/truncate-tests: New file.
46769 2017-05-13  Bruno Haible  <bruno@clisp.org>
46771         windows-stat-timespec: New module.
46772         * modules/windows-stat-timespec: New file.
46773         * m4/windows-stat-timespec.m4: New file.
46774         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Set WINDOWS_STAT_TIMESPEC.
46775         * modules/sys_stat (Makefile.am): Substitute WINDOWS_STAT_TIMESPEC.
46776         * lib/sys_stat.in.h (struct stat) [WINDOWS_STAT_TIMESPEC]: Declare with
46777         fields st_atim, st_mtim, st_ctim.
46778         (st_atime, st_mtime, st_ctime): Define as macros.
46779         (_GL_WINDOWS_STAT_TIMESPEC): New macro.
46780         * lib/stat-w32.h (_gl_convert_FILETIME_to_timespec)
46781         [_GL_WINDOWS_STAT_TIMESPEC]: New declaration.
46782         * lib/stat-w32.c (_gl_convert_FILETIME_to_timespec)
46783         [_GL_WINDOWS_STAT_TIMESPEC]: New function.
46784         (_gl_convert_FILETIME_to_POSIX): Adjust coding style.
46785         (_gl_fstat_by_handle): If _GL_WINDOWS_STAT_TIMESPEC, convert the
46786         FILETIME to 'struct timespec', not 'time_t'.
46787         * lib/stat.c (rpl_stat): If _GL_WINDOWS_STAT_TIMESPEC, convert the
46788         FILETIME to 'struct timespec', not 'time_t'.
46789         * lib/stat-time.h (STAT_TIMESPEC): Define also if
46790         _GL_WINDOWS_STAT_TIMESPEC.
46791         * doc/windows-stat-timespec.texi: New file.
46792         * doc/gnulib.texi: Include it.
46794 2017-05-13  Bruno Haible  <bruno@clisp.org>
46796         windows-stat-override: New module.
46797         * lib/sys_stat.in.h (stat) [GNULIB_OVERRIDES_STRUCT_STAT]: Provide own
46798         definition. Define GNULIB_defined_struct_stat.
46799         (fstat, fstatat, lstat, stat) [GNULIB_OVERRIDES_STRUCT_STAT]: Provoke
46800         link error if this symbol is used and the corresponding module is not
46801         in use.
46802         (_stat64, _stat32i64, _stati64, _stat32, _stat64i32): Don't redefine if
46803         GNULIB_OVERRIDES_STRUCT_STAT.
46804         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize
46805         GNULIB_OVERRIDES_STRUCT_STAT.
46806         * modules/sys_stat (Makefile.am): Substitute
46807         GNULIB_OVERRIDES_STRUCT_STAT.
46808         * modules/windows-stat-override: New file.
46810 2017-05-13  Bruno Haible  <bruno@clisp.org>
46812         fstat: Fix module dependency conditions.
46813         * modules/fstat (Depends-on): Fix typo.
46815 2017-05-13  Bruno Haible  <bruno@clisp.org>
46817         stat, fstat: Complete removal of old native Windows code.
46818         * lib/stat.c: Remove old macrology for WINDOWS_NATIVE.
46819         * lib/fstat.c: Likewise.
46820         * lib/stat-w32.c: Likewise.
46822 2017-05-13  Bruno Haible  <bruno@clisp.org>
46824         stat: Complete removal of REPLACE_FUNC_STAT_DIR code.
46825         * lib/stat.c: Remove all REPLACE_FUNC_STAT_DIR code.
46827 2017-05-11  Paul Eggert  <eggert@cs.ucla.edu>
46829         getopt-posix: port to mingw
46830         * lib/getopt.c (flockfile, funlockfile): Define on mingw.
46831         Problem reported by Daniel P. Berrage in:
46832         http://lists.gnu.org/r/bug-gnulib/2017-05/msg00086.html
46834 2017-05-11  Bruno Haible  <bruno@clisp.org>
46836         gettimeofday: Increase precision on mingw.
46837         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Require AC_CANONICAL_HOST.
46838         Set REPLACE_GETTIMEOFDAY to 1 on mingw.
46839         * lib/gettimeofday.c (gettimeofday): On native Windows, use the
46840         GetSystemTimePreciseAsFileTime based implementation always.
46841         * doc/posix-functions/gettimeofday.texi: Mention precision problem on
46842         mingw.
46844 2017-05-11  Bruno Haible  <bruno@clisp.org>
46846         poll: Fix confusion between SOCKETs and FDs on native Windows.
46847         Fix proposed by Daniel P. Berrange <berrange@redhat.com>.
46848         * lib/poll.c [WINDOWS_NATIVE]: Undefine select.
46850 2017-05-11  Bruno Haible  <bruno@clisp.org>
46852         doc: Clarify doc about socket functions on native Windows.
46853         This reworks doc that was added on 2008-09-29.
46854         * doc/posix-functions/select.texi: Fix copy-and-paste mistake and use
46855         clearer wording.
46856         * doc/posix-functions/accept.texi: Use clearer wording.
46857         * doc/posix-functions/bind.texi: Likewise.
46858         * doc/posix-functions/connect.texi: Likewise.
46859         * doc/posix-functions/getpeername.texi: Likewise.
46860         * doc/posix-functions/getsockname.texi: Likewise.
46861         * doc/posix-functions/getsockopt.texi: Likewise.
46862         * doc/posix-functions/ioctl.texi: Likewise.
46863         * doc/posix-functions/listen.texi: Likewise.
46864         * doc/posix-functions/recv.texi: Likewise.
46865         * doc/posix-functions/recvfrom.texi: Likewise.
46866         * doc/posix-functions/send.texi: Likewise.
46867         * doc/posix-functions/sendto.texi: Likewise.
46868         * doc/posix-functions/setsockopt.texi: Likewise.
46869         * doc/posix-functions/shutdown.texi: Likewise.
46870         * doc/posix-functions/socket.texi: Likewise.
46872 2017-05-10  Bruno Haible  <bruno@clisp.org>
46874         poll: Fix link error on native Windows.
46875         * lib/poll.c [WINDOWS_NATIVE]: Undefine recv.
46877 2017-05-10  Bruno Haible  <bruno@clisp.org>
46879         time: Fix missing initialization of HAVE_TIMEZONE_T.
46880         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize HAVE_TIMEZONE_T
46881         here...
46882         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_DEFAULTS): ... not here.
46883         * m4/time_rz.m4 (gl_TIME_RZ): Require gl_HEADER_TIME_H_DEFAULTS, not
46884         gl_HEADER_SYS_TIME_H_DEFAULTS.
46885         * modules/time_rz (Depends-on): Add 'time'. Remove useless quoting.
46886         (configure.ac): Remove useless quoting.
46888 2017-05-10  Bruno Haible  <bruno@clisp.org>
46890         Implement a way to opt out from MSVC support, part 2.
46891         * modules/msvc-inval (Include): Document recommended idiom.
46892         * modules/msvc-nothrow (Include): Likewise.
46894         Implement a way to opt out from MSVC support.
46895         This is useful for Emacs.
46896         * modules/msvc-nothrow (configure.ac): Invoke gl_MODULE_INDICATOR.
46897         * lib/accept4.c: Include <io.h> as an alternative to msvc-nothrow.h.
46898         * lib/error.c: Likewise.
46899         * lib/fcntl.c: Likewise.
46900         * lib/flock.c: Likewise.
46901         * lib/fstat.c: Likewise.
46902         * lib/fsync.c: Likewise.
46903         * lib/ioctl.c: Likewise.
46904         * lib/isapipe.c: Likewise.
46905         * lib/lseek.c: Likewise.
46906         * lib/nonblocking.c: Likewise.
46907         * lib/poll.c: Likewise.
46908         * lib/select.c: Likewise.
46909         * lib/sockets.h: Likewise.
46910         * lib/sockets.c: Likewise.
46911         * lib/stdio-read.c: Likewise.
46912         * lib/stdio-write.c: Likewise.
46913         * lib/utimens.c: Likewise.
46914         * lib/w32sock.h: Likewise.
46915         * lib/w32spawn.h: Likewise.
46916         * tests/test-cloexec.c: Likewise.
46917         * tests/test-dup-safer.c: Likewise.
46918         * tests/test-dup2.c: Likewise.
46919         * tests/test-dup3.c: Likewise.
46920         * tests/test-fcntl.c: Likewise.
46921         * tests/test-pipe.c: Likewise.
46922         * tests/test-pipe2.c: Likewise.
46923         * lib/ftruncate.c: Likewise.
46924         (chsize_nothrow): Renamed from chsize.
46925         * lib/msvc-nothrow.c: Don't include msvc-inval.h if
46926         HAVE_MSVC_INVALID_PARAMETER_HANDLER is not defined.
46927         * lib/close.c: Likewise.
46928         * lib/dup.c: Likewise.
46929         * lib/fclose.c: Likewise.
46930         * lib/raise.c: Likewise.
46931         * tests/test-fgetc.c: Likewise.
46932         * tests/test-fputc.c: Likewise.
46933         * tests/test-fread.c: Likewise.
46934         * tests/test-fwrite.c: Likewise.
46935         * lib/getdtablesize.c: Likewise.
46936         (_setmaxstdio_nothrow): Renamed from _setmaxstdio.
46937         * lib/isatty.c: Don't include msvc-inval.h if
46938         HAVE_MSVC_INVALID_PARAMETER_HANDLER is not defined.
46939         Include <io.h> as an alternative to msvc-nothrow.h.
46940         * lib/read.c: Likewise.
46941         * lib/write.c: Likewise.
46942         * lib/dup2.c: Likewise.
46943         (dup2_nothrow): New function.
46944         (ms_windows_dup2): Use it.
46945         * m4/close.m4 (gl_FUNC_CLOSE): Invoke gl_MSVC_INVAL and test
46946         HAVE_MSVC_INVALID_PARAMETER_HANDLER only if gl_MSVC_INVAL is defined.
46947         * m4/dup.m4 (gl_FUNC_DUP): Likewise.
46948         * m4/fdopen.m4 (gl_FUNC_FDOPEN): Likewise.
46949         * m4/raise.m4 (gl_FUNC_RAISE): Likewise.
46950         * m4/read.m4 (gl_FUNC_READ): Likewise.
46951         * m4/write.m4 (gl_FUNC_WRITE): Likewise.
46952         * doc/windows-without-msvc.texi: New file.
46953         * doc/gnulib.texi (Native Windows Support without MSVC Support): New
46954         section.
46956 2017-05-10  Bruno Haible  <bruno@clisp.org>
46958         wait-process: Adjust native Windows support.
46959         * lib/wait-process.c: Use the usual condition for recognizing a native
46960         Windows platform.
46962 2017-05-10  Bruno Haible  <bruno@clisp.org>
46964         doc: New chapter "Native Windows Support".
46965         * doc/gnulib.texi (Native Windows Support): New chapter.
46966         * doc/windows-libtool.texi: Small wording changes.
46967         * doc/windows-sockets.texi: Small wording and formatting changes.
46969 2017-05-10  Bruno Haible  <bruno@clisp.org>
46971         doc: Move section "Library version handling".
46972         * doc/gnulib.texi: Move section "Library version handling"
46973         from chapter "Miscellaneous Notes" to chapter "Particular Modules".
46975 2017-05-10  Bruno Haible  <bruno@clisp.org>
46977         doc: Move section "Running self-tests under valgrind".
46978         * doc/gnulib.texi: Move section "Running self-tests under valgrind"
46979         from chapter "Particular Modules" to chapter "Miscellaneous Notes".
46981 2017-05-10  Bruno Haible  <bruno@clisp.org>
46983         doc: New chapter "Build Infrastructure Modules".
46984         * doc/gnulib.texi (Build Infrastructure Modules): New chapter.
46986 2017-05-10  Bruno Haible  <bruno@clisp.org>
46988         Prepare for reordering sections in the manual.
46989         * doc/gnulib.texi: Move several sections to separate files. Include
46990         these files.
46991         * doc/out-of-memory.texi: New file, extracted from doc/gnulib.texi.
46992         * doc/obsolete.texi: Likewise.
46993         * doc/extra-tests.texi: Likewise.
46994         * doc/transversal.texi: Likewise.
46995         * doc/namespace.texi: Likewise.
46996         * doc/check-version.texi: Likewise.
46997         * doc/windows-sockets.texi: Likewise.
46998         * doc/windows-libtool.texi: Likewise.
46999         * doc/licenses-texi.texi: Likewise.
47000         * doc/build-automation.texi: Likewise.
47001         * doc/c-locale.texi: Likewise.
47003 2017-05-10  Bruno Haible  <bruno@clisp.org>
47005         Fix instructions how to update manual on www.gnu.org.
47006         * doc/README: Add -I option, so that texi2dvi finds texinfo.tex.
47008 2017-05-09  Bruno Haible  <bruno@clisp.org>
47010         tzset: Expand comment about TZ problem on native Windows.
47011         * lib/tzset.c (tzset): Elaborate comment, based on explanations by
47012         Paul Eggert.
47013         * lib/ctime.c (rpl_ctime): Likewise.
47014         * lib/localtime.c (rpl_localtime): Likewise.
47015         * lib/mktime.c (mktime): Likewise.
47016         * lib/strftime-fixes.c (rpl_strftime): Likewise.
47017         * lib/wcsftime.c (rpl_wcsftime): Likewise.
47019 2017-05-08  Paul Eggert  <eggert@cs.ucla.edu>
47021         intprops: don’t depend on ‘verify’
47022         Problem reported by Ævar Arnfjörð Bjarmason in:
47023         http://lists.gnu.org/r/bug-gnulib/2017-05/msg00054.html
47024         * lib/intprops.h: Do not include verify.h, and move compile-time
47025         checks from here ...
47026         * tests/test-intprops.c (main): ... to here, if they’re not here
47027         already.  Check widths of other standard integer types.
47028         * modules/intprops (Depends-on): Remove ‘verify’.
47030 2017-05-07  Bruno Haible  <bruno@clisp.org>
47032         utimens: On native Windows, support 100ns resolution also if fd < 0.
47033         * lib/utime.in.h: Include <time.h>.
47034         (_gl_utimens_windows): New declaration.
47035         * lib/utime.c (_gl_utimens_windows): New function, based on utime.
47036         (utime): Invoke it.
47037         * lib/utimens.c (fdutimens): On native Windows, call _gl_utimens_windows
47038         instead of utime.
47039         * modules/utime (Depends-on): Add 'time'.
47041 2017-05-07  Bruno Haible  <bruno@clisp.org>
47043         utimens: Improve error code on native Windows.
47044         * lib/utimens.c (fdutimens): If fd was not opened with O_RDWR, fail with
47045         error code EACCES, not EINVAL.
47047 2017-05-07  Bruno Haible  <bruno@clisp.org>
47049         utime: Handle more Windows error codes.
47050         * lib/utime.c (utime): Handle ERROR_BAD_NETPATH.
47051         Based on explanations by Billy O'Neal.
47053 2017-05-05  Bruno Haible  <bruno@clisp.org>
47055         crypto/rijndael: Fix "strict-aliasing rules" warnings, alignment issues.
47056         * lib/rijndael-api-fst.c (rijndaelBlockEncrypt): Declare 'block' as a
47057         union.
47058         (rijndaelPadEncrypt, rijndaelBlockDecrypt): Likewise.
47059         (rijndaelPadDecrypt): Likewise. Use local variable 'iv' to cache the
47060         value of cipher->IV.
47062 2017-05-05  Bruno Haible  <bruno@clisp.org>
47064         wctype-h-c++-tests: Update.
47065         * tests/test-wctype-h-c++.cc: Reorder to match lib/wchar.in.h.
47067 2017-05-05  Bruno Haible  <bruno@clisp.org>
47069         wchar-c++-tests: Update.
47070         * tests/test-wchar-c++.cc (wcsftime): Declare, missing since 2017-04-30.
47072 2017-05-05  Bruno Haible  <bruno@clisp.org>
47074         utime-h-c++-tests: New module.
47075         * tests/test-utime-h-c++.cc: New file.
47076         (utime): Declare, missing since 2017-04-30.
47077         * modules/utime-h-c++-tests: New file.
47079 2017-05-05  Bruno Haible  <bruno@clisp.org>
47081         unistd-c++-tests: Update.
47082         * tests/test-unistd-c++.cc (isatty): Declare, missing since 2012-01-03.
47083         (read): Declare, missing since 2011-04-15.
47084         (sethostname): Declare, missing since 2011-12-03.
47086 2017-05-05  Bruno Haible  <bruno@clisp.org>
47088         time-c++-tests: Update.
47089         * tests/test-time-c++.cc (tzset): Declare, missing since 2017-05-01.
47090         (localtime, gmtime): Declare, missing since 2017-04-30.
47091         (ctime): Declare, missing since 2017-04-30.
47092         (strftime): Declare, missing since 2017-04-30.
47093         (tzalloc, tzfree, localtime_rz, mktime_z): Declare, missing since
47094         2015-07-24.
47096 2017-05-05  Bruno Haible  <bruno@clisp.org>
47098         sys_resource-c++-tests: New module.
47099         * tests/test-sys_resource-c++.cc: New file.
47100         (getrusage): Declare, missing since 2012-04-13.
47101         * modules/sys_resource-c++-tests: New file.
47103 2017-05-05  Bruno Haible  <bruno@clisp.org>
47105         strings-c++-tests: New module.
47106         * tests/test-strings-c++.cc: New file.
47107         (ffs): Declare, missing since 2011-07-12.
47108         * modules/strings-c++-tests: New file.
47110 2017-05-05  Bruno Haible  <bruno@clisp.org>
47112         string-c++-tests: Update.
47113         * tests/test-string-c++.cc (ffsl): Declare, missing since 2011-07-15.
47114         (ffsll): Declare, missing since 2011-07-15.
47116 2017-05-05  Bruno Haible  <bruno@clisp.org>
47118         stdlib-c++-tests: Update.
47119         * tests/test-stdlib-c++.cc (posix_openpt): Declare, missing since
47120         2011-10-18.
47121         (ptsname_r): Declare, missing since 2011-11-07.
47122         (qsort_r): Declare, missing since 2014-08-29.
47123         (random, srandom, initstate, setstate): Declare, missing since
47124         2012-01-14.
47125         (secure_getenv): Declare, missing since 2013-02-05.
47127 2017-05-05  Bruno Haible  <bruno@clisp.org>
47129         stdio-c++-tests: Update.
47130         * tests/test-stdio-c++.cc (pclose): Declare, missing since 2011-09-18.
47132 2017-05-05  Bruno Haible  <bruno@clisp.org>
47134         signal-h-c++-tests: Update.
47135         * tests/test-signal-h-c++.cc (raise): Remove redundant declaration.
47137 2017-05-05  Bruno Haible  <bruno@clisp.org>
47139         math-c++-tests: Update.
47140         * tests/test-math-c++.cc (fmaf): Declare, missing since 2011-10-17.
47141         (fma): Declare, missing since 2011-10-17.
47142         (fmal): Declare, missing since 2011-10-17.
47144 2017-05-05  Bruno Haible  <bruno@clisp.org>
47146         locale-c++-tests: Update.
47147         * tests/test-locale-c++.cc (localeconv): Declare, missing since
47148         2012-03-25.
47150 2017-05-05  Bruno Haible  <bruno@clisp.org>
47152         inttypes-c++-tests: New module.
47153         * tests/test-inttypes-c++.cc: New file.
47154         (strtoimax): Declare, missing since 2012-01-05.
47155         (strtoumax): Declare, missing since 2012-01-05.
47156         * modules/inttypes-c++-tests: New file.
47158 2017-05-05  Bruno Haible  <bruno@clisp.org>
47160         dirent-c++-tests: Update.
47161         * tests/test-dirent-c++.cc (readdir): Declare, missing since 2011-09-13.
47162         (rewinddir): Declare, missing since 2011-09-13.
47163         (dirfd): Declare, missing since 2010-03-08.
47165 2017-05-04  Bruno Haible  <bruno@clisp.org>
47167         argp: Fix mistake in 2017-04-23 commit.
47168         * lib/argp-help.c (__argp_failure): If GNULIB_STRERROR_R_POSIX is set,
47169         assume that strerror_r returns 'int', not 'char *'.
47171 2017-05-04  Reuben Thomas  <rrt@sc3d.org>
47173         argp: Fix typo.
47174         * lib/argp-help.c (argp_doc): Fix spelling mistake in comment.
47176 2017-05-02  Paul Eggert  <eggert@cs.ucla.edu>
47178         utimens: port to Emacs + MS-Windows
47179         Skip the new MS-Windows-specific code if Emacs.
47180         * lib/utimens.c [EMACS_CONFIGUATION]:
47181         Avoid new MS-Windows-specific code.
47182         (USE_SETFILETIME): New macro.
47183         (fdutimens): Use it.
47185 2017-05-01  Paul Eggert  <eggert@cs.ucla.edu>
47187         tzset: update doc for TZ problems on MS-Windows
47188         * doc/posix-functions/ctime.texi,  doc/posix-functions/daylight.texi:
47189         * doc/posix-functions/localtime.texi, doc/posix-functions/mktime.texi:
47190         * doc/posix-functions/strftime.texi, doc/posix-functions/timezone.texi:
47191         * doc/posix-functions/tzname.texi, doc/posix-functions/tzset.texi:
47192         * doc/posix-functions/wcsftime.texi:
47193         Mention some issues with TZ under MS-Windows.
47195 2017-05-01  Bruno Haible  <bruno@clisp.org>
47197         copy-file: Fix build error on mingw.
47198         * modules/copy-file (Depends-on): Add 'close'.
47200 2017-05-01  Bruno Haible  <bruno@clisp.org>
47202         tzset: Work around TZ problem on native Windows.
47203         * m4/tzset.m4 (gl_FUNC_TZSET): Require AC_CANONICAL_HOST. On native
47204         Windows, set REPLACE_TZSET to 1.
47205         * lib/tzset.c (tzset): On native Windows, fix TZ if necessary, and
47206         invoke '_tzset' instead of 'tzset'.
47207         * doc/posix-functions/tzset.texi: Mention the native Windows workaround.
47209         * modules/time_rz (Depends-on): Add tzset.
47210         * lib/time_rz.c (tzset): Remove fallback definition.
47211         * m4/time_rz.m4 (gl_TIME_RZ): Don't test for tzset.
47213 2017-05-01  Bruno Haible  <bruno@clisp.org>
47215         mktime: Fix dependencies.
47216         * modules/mktime (Depends-on): Add 'time'.
47218 2017-05-01  Bruno Haible  <bruno@clisp.org>
47220         New module 'localtime-buffer', split off from module 'gettimeofday'.
47221         * lib/localtime-buffer.h: New file.
47222         * lib/localtime-buffer.c: New file, extracted from lib/gettimeofday.c.
47223         * lib/time.in.h (tzset): New declaration.
47224         (localtime, gmtime): Don't test GNULIB_GETTIMEOFDAY.
47225         * lib/tzset.c: New file, extracted from lib/gettimeofday.c.
47226         * lib/gettimeofday.c: Include localtime-buffer.h. Remove code that was
47227         moved to lib/localtime-buffer.c or lib/tzset.c.
47228         * m4/localtime-buffer.m4: New file.
47229         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_TZSET,
47230         HAVE_TZSET, REPLACE_TZSET.
47231         * m4/tzset.m4 (gl_FUNC_TZSET): Move code from m4/gettimeofday.m4 to
47232         here, with modifications. Set HAVE_TZSET, REPLACE_TZSET. Invoke
47233         gl_LOCALTIME_BUFFER_NEEDED.
47234         (gl_FUNC_TZSET_CLOBBER): Don't require gl_HEADER_SYS_TIME_H; not needed
47235         since 2007-01-18.
47236         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Remove code that deals with
47237         tzset.
47238         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Require gl_LOCALTIME_BUFFER_DEFAULTS.
47239         Invoke gl_LOCALTIME_BUFFER_NEEDED instead of
47240         gl_GETTIMEOFDAY_REPLACE_LOCALTIME.
47241         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Remove macro.
47242         * modules/localtime-buffer: New file.
47243         * modules/time (Depends-on): Remove 'gettimeofday'.
47244         (Makefile.am): Substitute GNULIB_TZSET, HAVE_TZSET,
47245         REPLACE_TZSET. Don't substitute GNULIB_GETTIMEOFDAY.
47246         * modules/tzset (Description): Enable hyperlink to POSIX spec.
47247         (Files): Add lib/tzset.c.
47248         (Depends-on): Remove gettimeofday. Add localtime-buffer, time.
47249         (configure.ac): Arrange to conditionally compile lib/tzset.c. Invoke
47250         gl_TIME_MODULE_INDICATOR.
47251         * modules/gettimeofday (Depends-on): Add localtime-buffer.
47253 2017-05-01  Bruno Haible  <bruno@clisp.org>
47255         copy-file: Preserve sub-second time stamps.
47256         * lib/copy-file.c: Include stat-time.h, utimens.h instead of <utime.h>.
47257         (qcopy_file_preserving): Use 'struct timespec' and utimens() to
47258         transport the time stamps from the original file to the destination
47259         file.
47260         * m4/copy-file.m4 (gl_COPY_FILE): Don't test for utime, utimes.
47261         * modules/copy-file (Depends-on): Add stat-time, utimns instead of
47262         utime-h.
47264 2017-05-01  Bruno Haible  <bruno@clisp.org>
47266         wctype-t: Fix problems if <wchar.h> gets included after <wctype.h>.
47267         * lib/wctype.in.h: Include not only <ctype.h> but also <wchar.h>. Do so
47268         also on MSVC.
47269         Reported by Eli Zaretskii <eliz@gnu.org>.
47271 2017-05-01  Bruno Haible  <bruno@clisp.org>
47273         wchar: Fix compilation error with the original mingw.org mingw.
47274         * lib/wchar.in.h (rpl_wint_t): If <crtdefs.h> does not exist, include
47275         <stddef.h> instead.
47276         * m4/wint_t.m4 (gl_TYPE_WINT_T_PREREQ): New macro, extracted from
47277         gl_WCTYPE_H.
47278         * m4/wctype_h.m4 (gl_WCTYPE_H): Don't set HAVE_CRTDEFS_H here; require
47279         gl_TYPE_WINT_T_PREREQ instead.
47280         * m4/wchar_h.m4 (gl_WCHAR_H): Require gl_TYPE_WINT_T_PREREQ.
47281         * modules/wchar (Makefile.am): Substitute HAVE_CRTDEFS_H.
47282         Reported by Eli Zaretskii <eliz@gnu.org>.
47284 2017-04-30  Bruno Haible  <bruno@clisp.org>
47286         utimecmp: Add support for native Windows.
47287         * lib/utimecmp.c (SYSCALL_RESOLUTION): Set to 100 on native Windows.
47289 2017-04-30  Bruno Haible  <bruno@clisp.org>
47291         utimens: Add support for native Windows.
47292         * lib/utimens.c: Include <windows.h>, msvc-nothrow.h.
47293         (fdutimens): Provide a native Windows implementation, like utime.c with
47294         added tv_nsec support.
47295         * modules/utimens (Depends-on): Add msvc-nothrow, utime.
47296         Suggested by Tim Rühsen <tim.ruehsen@gmx.de>.
47298 2017-04-30  Bruno Haible  <bruno@clisp.org>
47300         wcsftime: New module.
47301         * lib/wchar.in.h (wcsftime): New declaration.
47302         * lib/wcsftime.c: New file.
47303         * m4/wcsftime.m4: New file.
47304         * m4/wchar_h.m4 (gl_WCHAR_H): Test for wcsftime declaration.
47305         (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_WCSFTIME,
47306         HAVE_WCSFTIME, REPLACE_WCSFTIME.
47307         * modules/wchar (Makefile.am): Substitute GNULIB_WCSFTIME,
47308         HAVE_WCSFTIME, REPLACE_WCSFTIME.
47309         * modules/wcsftime: New file.
47310         * doc/posix-functions/wcsftime.texi: Mention the new module.
47312 2017-04-30  Bruno Haible  <bruno@clisp.org>
47314         strftime-fixes: New module.
47315         * lib/time.in.h (strftime): New declaration.
47316         * lib/strftime-fixes.c: New file.
47317         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Inline gl_FUNC_STRFTIME macro.
47318         (gl_FUNC_STRFTIME): Remove macro.
47319         * m4/strftime-fixes.m4: New file.
47320         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_STRFTIME,
47321         REPLACE_STRFTIME.
47322         * modules/time (Makefile.am): Substitute GNULIB_STRFTIME,
47323         REPLACE_STRFTIME.
47324         * modules/strftime-fixes: New file.
47325         * doc/posix-functions/strftime.texi: Mention the new module.
47327 2017-04-30  Bruno Haible  <bruno@clisp.org>
47329         mktime: Work around TZ problem on native Windows.
47330         * lib/mktime.c: Add #ifs to make the algorithmic workaround independent
47331         from the native Windows workaround.
47332         * m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): New macro, extracted from
47333         gl_FUNC_MKTIME. If guessing, set gl_cv_func_working_mktime to
47334         'guessing no'.
47335         (gl_FUNC_MKTIME): Require it. Require AC_CANONICAL_HOST.
47336         Set REPLACE_MKTIME to 1 on native Windows. Define NEED_MKTIME_WORKING,
47337         NEED_MKTIME_WINDOWS.
47338         (gl_FUNC_MKTIME_INTERNAL): Require gl_FUNC_MKTIME_WORKS, not
47339         gl_FUNC_MKTIME. Set WANT_MKTIME_INTERNAL, not REPLACE_MKTIME. Define
47340         NEED_MKTIME_INTERNAL.
47341         * m4/timegm.m4 (gl_FUNC_TIMEGM): Require gl_FUNC_MKTIME_WORKS, not
47342         gl_FUNC_MKTIME. Cope with 'guessing yes' value.
47343         * modules/mktime-internal (configure.ac): Test WANT_MKTIME_INTERNAL,
47344         not REPLACE_MKTIME.
47345         * doc/posix-functions/mktime.texi: Mention the native Windows
47346         workaround.
47348 2017-04-30  Bruno Haible  <bruno@clisp.org>
47350         localtime: New module.
47351         * lib/time.in.h (localtime): Declare also if requested by module
47352         'localtime'.
47353         * lib/localtime.c: New file.
47354         * m4/localtime.m4: New file.
47355         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_LOCALTIME.
47356         * modules/time (Makefile.am): Substitute GNULIB_LOCALTIME.
47357         * modules/localtime: New file.
47358         * doc/posix-functions/localtime.texi: Mention the new module.
47360 2017-04-30  Bruno Haible  <bruno@clisp.org>
47362         ctime: New module.
47363         * lib/time.in.h (ctime): New declaration.
47364         * lib/ctime.c: New file.
47365         * m4/ctime.m4: New file.
47366         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_CTIME,
47367         REPLACE_CTIME.
47368         * modules/time (Makefile.am): Substitute GNULIB_CTIME, REPLACE_CTIME.
47369         * modules/ctime: New file.
47370         * doc/posix-functions/ctime.texi: Mention the new module.
47372 2017-04-30  Bruno Haible  <bruno@clisp.org>
47374         gettimeofday: Provide higher resolution on native Windows.
47375         * lib/gettimeofday.c: Don't include <sys/timeb.h>.
47376         (GetSystemTimePreciseAsFileTimeFuncType): New variable.
47377         (initialize): Initialize it.
47378         (gettimeofday) [WINDOWS_NATIVE]: Use it, and convert from FILETIME to
47379         'struct timeval'. Don't use _ftime().
47380         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): Don't test for
47381         <sys/timeb.h> and _ftime.
47383 2017-04-30  Bruno Haible  <bruno@clisp.org>
47385         Document the problem with the Cygwin environment variable TZ.
47386         * doc/posix-functions/tzset.texi: Add note about TZ.
47387         * doc/posix-functions/ctime.texi: Likewise.
47388         * doc/posix-functions/localtime.texi: Likewise.
47389         * doc/posix-functions/mktime.texi: Likewise.
47390         * doc/posix-functions/strftime.texi: Likewise.
47391         * doc/posix-functions/wcsftime.texi: Likewise.
47392         * doc/pastposix-functions/ftime.texi: Likewise.
47394 2017-04-30  Bruno Haible  <bruno@clisp.org>
47396         utime-tests: New module.
47397         * tests/test-utime.c: New file, based on tests/test-utimens.h.
47398         * tests/test-utimens-common.h: Include <sys/stat.h>.
47399         * modules/utime-tests: New file.
47401 2017-04-29  Bruno Haible  <bruno@clisp.org>
47403         utime: New module.
47404         * lib/utime.in.h: Add comment for snippets.
47405         (utime): New declaration.
47406         * lib/utime.c: New file.
47407         * m4/utime.m4: New file.
47408         * m4/utime_h.m4 (gl_UTIME_H): Test for utime declaration.
47409         (gl_UTIME_H_DEFAULTS): Initialize GNULIB_UTIME, HAVE_UTIME,
47410         REPLACE_UTIME.
47411         * modules/utime-h (Depends-on): Add snippets.
47412         (Makefile.am): Substitute GNULIB_UTIME, HAVE_UTIME, REPLACE_UTIME.
47413         Insert snippets.
47414         * modules/utime: New file.
47415         * doc/posix-functions/utime.texi: Mention the new module.
47417 2017-04-29  Bruno Haible  <bruno@clisp.org>
47419         utime-h: Modernize handling of 'struct utimbuf'.
47420         * lib/utime.in.h: Include next <utime.h> if it exists.
47421         (utimbuf): Define to _utimbuf on native Windows.
47422         * m4/utime_h.m4 (gl_UTIME_H): Check for prerequisites of include_next.
47423         Set UTIME_H on native Windows.
47424         (gl_UTIME_MODULE_INDICATOR, gl_HEADER_UTIME_H_DEFAULTS): New macros.
47425         * modules/utime-h (Depends-on): Add include_next.
47426         (Makefile.am): Substitute also HAVE_UTIME_H, INCLUDE_NEXT,
47427         PRAGMA_SYSTEM_HEADER, PRAGMA_COLUMNS, NEXT_UTIME_H.
47429         * lib/utimens.c (utimbuf): Remove fallback definition.
47430         * m4/utimens.m4 (gl_UTIMENS): Don't require
47431         gl_CHECK_TYPE_STRUCT_UTIMBUF.
47432         * m4/utimbuf.m4: Remove file.
47433         * modules/utimens (Files): Remove m4/utimbuf.m4.
47435 2017-04-29  Bruno Haible  <bruno@clisp.org>
47437         Make use of module 'utime-h'.
47438         * modules/copy-file (Depends-on): Add utime-h.
47439         * lib/copy-file.c: Assume that <utime.h> exists.
47440         * m4/copy-file.m4 (gl_COPY_FILE): Don't test for <utime.h>.
47442         * modules/utimens (Depends-on): Add utime-h.
47443         * lib/utimens.c: Assume that <utime.h> exists.
47445 2017-04-29  Bruno Haible  <bruno@clisp.org>
47447         utime-h: New module.
47448         * m4/utime_h.m4: New file.
47449         * lib/utime.in.h: New file.
47450         * modules/utime-h: New file.
47451         * doc/posix-headers/utime.texi: Mention the new module.
47453         * tests/test-utime-h.c: New file.
47454         * modules/utime-h-tests: New file.
47456 2017-04-30  Bruno Haible  <bruno@clisp.org>
47458         Fix a few typos.
47459         * m4/fstat.m4 (gl_FUNC_FSTAT): Require AC_CANONICAL_HOST.
47460         * m4/stat.m4 (gl_FUNC_STAT): Fix comment.
47461         * doc/posix-functions/fstat.texi: Fix a plural typo.
47462         * doc/posix-functions/stat.texi: Likewise.
47463         * m4/include_next.m4: Update comments.
47465 2017-04-29  Bruno Haible  <bruno@clisp.org>
47467         error: Fix mistake in 2017-04-23 commit.
47468         * lib/error.c (print_errno_message): If GNULIB_STRERROR_R_POSIX is set,
47469         assume that strerror_r returns 'int', not 'char *'.
47471 2017-04-29  Bruno Haible  <bruno@clisp.org>
47473         stat: Fix time_t values and other problems on native Windows platforms.
47474         * doc/posix-functions/stat.texi: Mention the problem with the Microsoft
47475         implementations of stat().
47476         * lib/stat.c: Include filename.h instead of dosname.h. Include
47477         malloca.h, stat-w32.h.
47478         (is_unc_root): New function.
47479         (rpl_stat): New implementation for native Windows. Remove
47480         REPLACE_FUNC_STAT_DIR code.
47481         * m4/stat.m4 (gl_FUNC_STAT): On native Windows, set REPLACE_STAT always.
47482         Don't define REPLACE_FUNC_STAT_DIR.
47483         (gl_PREREQ_STAT): Require gl_HEADER_SYS_STAT_H.
47484         * modules/stat (Files): Add lib/stat-w32.h, lib/stat-w32.c.
47485         (Depends-on): Remove dosname. Add filename, malloca.
47486         (configure.ac): Also compile lib/stat-w32.c.
47488 2017-04-29  Bruno Haible  <bruno@clisp.org>
47490         fstat: Fix time_t values on native Windows platforms.
47491         * doc/posix-functions/fstat.texi: Mention the problem with st_*time.
47492         * lib/stat-w32.h: New file.
47493         * lib/stat-w32.c: New file.
47494         * lib/fstat.c: Don't include msvc-inval.h. Include msvc-nothrow.h,
47495         stat-w32.h instead.
47496         (fstat_nothrow): Remove function.
47497         (rpl_fstat): Implement by means of _gl_fstat_by_handle.
47498         * m4/fstat.m4 (gl_FUNC_FSTAT): On native Windows, set REPLACE_FSTAT
47499         always.
47500         (gl_PREREQ_FSTAT): Require gl_HEADER_SYS_STAT_H.
47501         * modules/fstat (Files): Add lib/stat-w32.h, lib/stat-w32.c.
47502         (Depends-on): Remove msvc-inval. Add pathmax, msvc-nothrow.
47503         (configure.ac): Also compile lib/stat-w32.c.
47505 2017-04-29  Paul Eggert  <eggert@cs.ucla.edu>
47507         getopt: port to Solaris 10 with circa-1997 glibc getopt.h
47508         Problem reported by Assaf Gordon and Gavin Smith in:
47509         http://lists.gnu.org/r/bug-gnulib/2017-04/msg00157.html
47510         * lib/getopt-pfx-ext.h (_getopt_internal) [__GETOPT_PREFIX]:
47511         #define this, too.
47513 2017-04-29  Bruno Haible  <bruno@clisp.org>
47515         strerror_r-posix: Fixes for MSVC 14.
47516         * lib/strerror_r.c: Include <stdarg.h>.
47517         (strerror_r): Provide error messages for errno values 100...140.
47518         * doc/posix-functions/strerror_r.texi: Mention the MSVC 14 problem.
47520 2017-04-28  Bruno Haible  <bruno@clisp.org>
47522         noreturn: New module.
47523         * lib/noreturn.h: New file.
47524         * modules/noreturn: New file.
47525         * tests/test-noreturn.c: New file.
47526         * modules/noreturn-tests: New file.
47527         * tests/test-noreturn-c++.cc: New file.
47528         * modules/noreturn-c++-tests: New file.
47530 2017-04-27  Bruno Haible  <bruno@clisp.org>
47532         wctype-h: Fix compilation error with the original mingw.org mingw.
47533         * m4/wctype_h.m4 (gl_WCTYPE_H): Test for <crtdefs.h>. Set
47534         HAVE_CRTDEFS_H.
47535         * modules/wctype-h (Makefile.am): Substitute HAVE_CRTDEFS_H.
47536         * lib/wctype.in.h (rpl_wint_t): If <crtdefs.h> does not exist, include
47537         <stddef.h> instead.
47538         Reported and proposed by Eli Zaretskii <eliz@gnu.org>.
47540 2017-04-26  Pádraig Brady  <P@draigBrady.com>
47542         nap.h: Fix compilation on non windows platforms
47543         * tests/nap.h: Move misplaced endif.
47545 2017-04-26  Pádraig Brady  <P@draigBrady.com>
47546         and Paul Eggert  <eggert@cs.ucla.edu>
47548         time_rz: fix heap buffer overflow vulnerability
47549         Reported and analyzed at https://bugzilla.redhat.com/CVE-2017-7476
47550         * lib/time_rz.c (save_abbr): Rearrange the calculation determining
47551         whether there is enough buffer space available, thus avoiding
47552         the problematic promotion of signed to unsigned causing an invalid
47553         comparison when zone_copy is more than ABBR_SIZE_MIN bytes beyond
47554         the start of the buffer.
47555         * tests/test-parse-datetime.c (main): Add a test case written by
47556         Paul Eggert, which overwrites enough of the heap so that
47557         standard glibc will fail with "free(): invalid pointer"
47558         without the patch applied.
47560 2017-04-26  Paul Eggert  <eggert@cs.ucla.edu>
47562         xalloc: add missing integer overflow check
47563         * lib/xalloc.h (x2nrealloc): Also check for multiplication
47564         overflow when P is null.
47566 2017-04-25  Paul Eggert  <eggert@cs.ucla.edu>
47568         parse-datetime: make it standalone
47569         * lib/parse-datetime.y: Include <stdarg.h>, for va_start etc.
47570         (_GL_ATTRIBUTE_FORMAT): New macro.
47571         These are needed to get './gnulib-tool --test parse-datetime' to work.
47573 2017-04-23  Bruno Haible  <bruno@clisp.org>
47575         nap.h: Port to native Windows.
47576         * tests/nap.h (nap_get_stat): Renamed from get_stat. Remove argument fd;
47577         use nap_fd instead. On native Windows, close and reopen nap_fd.
47578         (nap_works): Don't compare the ctimes, because on native Windows, these
47579         are the creation times.
47580         (nap): Update.
47582 2017-04-23  Bruno Haible  <bruno@clisp.org>
47584         nap.h: Fix logic.
47585         * tests/nap.h (nap): Avoid signed integer overflow in loop.
47587 2017-04-23  Bruno Haible  <bruno@clisp.org>
47589         Fix conflict between strerror_r-posix module and AC_FUNC_STRERROR_R.
47590         * modules/strerror_r-posix (configure.ac): Invoke gl_MODULE_INDICATOR.
47591         * lib/error.c: Test GNULIB_STRERROR_R_POSIX before testing
47592         HAVE_DECL_STRERROR_R, HAVE_STRERROR_R, or STRERROR_R_CHAR_P.
47593         * lib/argp-help.c (__argp_failure): Likewise.
47595 2017-04-23  Bruno Haible  <bruno@clisp.org>
47597         strerror_r-posix: Revert commits from 2016-10-16,2016-11-04,2016-11-14.
47598         * m4/strerror_r.m4: Revert changes since 2016-10-16.
47599         * lib/strerror_r.c: Likewise.
47601 2017-04-23  Paul Eggert  <eggert@cs.ucla.edu>
47603         Target a C99 subset, not a C89 subset
47604         For many years Gnulib has targeted C89 and has resisted using C99
47605         features, as some Gnulib-using programs still wanted to target
47606         C89.  As this no longer seems to be the case, relax the porting
47607         requirements to allow some C99 features.  This is merely a change
47608         to the documentation, to give other Gnulib developers a chance to
47609         weigh in on the topic.
47610         * doc/extern-inline.texi (extern inline):
47611         * doc/gnulib-readme.texi (Portability guidelines):
47612         * doc/gnulib-tool.texi (Initial import):
47613         * doc/gnulib.texi (Header files):
47614         Modernize to talk about C99 and C11 instead of C89 and C99.
47615         * doc/gnulib-readme.texi (Portability guidelines):
47616         Now a section, not merely a subsection, so that it
47617         can be split up.  Modernize a bit.
47618         (C language versions, C99 features assumed)
47619         (C99 features avoided):
47620         New sections.
47622 2017-04-23  Bruno Haible  <bruno@clisp.org>
47624         doc: New section "Modules that modify the way other modules work".
47625         * doc/gnulib.texi (Modules that modify the way other modules work): New
47626         section.
47628 2017-04-23  Bruno Haible  <bruno@clisp.org>
47630         stat-time: Update comments.
47631         * lib/stat-time.h: Fix reference regarding st_ctime on Windows.
47632         * tests/test-utimens-common.h: Add reference regarding st_ctime on
47633         Windows.
47635 2017-04-01  Bruno Haible  <bruno@clisp.org>
47637         glob: Fix more memory leaks.
47638         * lib/glob.c (glob): Free allocated memory before returning.
47639         Reported by Coverity via Tim Rühsen.
47641 2017-04-22  Paul Eggert  <eggert@cs.ucla.edu>
47643         poll: improve fast check for out-of-range NFD
47644         * lib/poll.c: Do not include intprops.h.
47645         (poll): Compare NFD to INT_MAX, not to TYPE_MAXIMUM (nfds_t) / 2.
47646         * modules/poll (Depends-on): Remove intprops.
47648         ftoastr: cite a newer paper
47649         * lib/ftoastr.c (FTOASTR): In comment, cite Andrysco et al. 2016
47650         instead of Loitsch 2010.
47652 2017-04-22  Bruno Haible  <bruno@clisp.org>
47654         poll: Enable argument check also in the Windows implementation.
47655         * lib/poll.c (poll) [WINDOWS_NATIVE]: Check value of nfd correctly.
47656         Reported by Paul Eggert.
47658 2017-04-22  Bruno Haible  <bruno@clisp.org>
47660         getlogin_r: Work around bug in Mac OS X 10.12.
47661         * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Test also against the Mac OS X
47662         bug.
47663         * lib/getlogin_r.c (getlogin_r): When getlogin_r returns a string of the
47664         given size minus 1, call getlogin_r a second time, on a larger buffer.
47665         * modules/getlogin_r (Depends-on): Add malloca.
47666         * doc/posix-functions/getlogin_r.texi: Mention the Mac OS X bug.
47668 2017-04-22  Paul Eggert  <eggert@cs.ucla.edu>
47670         parse-datetime: fix %z and prefer signed int
47671         %z problem reported by Pádraig Brady in:
47672         http://lists.gnu.org/r/bug-gnulib/2017-04/msg00103.html
47673         While fixing it, I decided to prefer signed ints to size_t, as
47674         they are less error-prone (e.g., ubsan catches overflow).
47675         * lib/parse-datetime.y (textint, parser_control, lookup_word, yylex)
47676         (parse_datetime2): Prefer ptrdiff_t to size_t for sizes and object
47677         counts, since signed integers make for better debugging.
47678         (date): Don’t assume %z works in printf formats.
47679         (debug_strfdatetime, debug_strfdate, debug_strftime): Use int for
47680         sizes of buffers known to be small, e.g., because we’re using snprintf.
47681         (parse_datetime2): Simplify call to debug_mktime_not_ok.
47683 2017-04-22  Bruno Haible  <bruno@clisp.org>
47685         *printf: Work around rounding bug on Mac OS X.
47686         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Test for Mac OS X 10.12 bug.
47687         * doc/posix-functions/*printf.texi: Mention the rounding bugs of
47688         Mac OS X and FreeBSD.
47689         * doc/glibc-functions/*printf.texi: Likewise.
47691 2017-04-22  Bruno Haible  <bruno@clisp.org>
47693         vasnprintf tests: Avoid warnings.
47694         * tests/test-vasnprintf-posix3.c (test_function, my_asnprintf,
47695         test_vasnprintf, test_asnprintf): Don't define if there's nothing to
47696         test.
47698 2017-04-22  Bruno Haible  <bruno@clisp.org>
47700         sys_file tests: Avoid warning.
47701         * tests/test-sys_file.c (main): Add a default clause to the switch
47702         statement.
47704 2017-04-22  Bruno Haible  <bruno@clisp.org>
47706         sethostname: Update doc.
47707         * doc/glibc-functions/sethostname.texi: Mention differing prototype on
47708         Mac OS X.
47710 2017-04-22  Bruno Haible  <bruno@clisp.org>
47712         quotearg tests: Avoid warnings.
47713         * tests/test-quotearg.c: Don't include test-quotearg.h if ENABLE_NLS is
47714         false.
47716 2017-04-22  Bruno Haible  <bruno@clisp.org>
47718         poll: Enable argument check.
47719         * lib/poll.c: Include intprops.h.
47720         (poll): Check value of nfd correctly.
47721         * modules/poll (Depends-on): Add intprops.
47723 2017-04-22  Bruno Haible  <bruno@clisp.org>
47725         get-rusage-data: Avoid warnings on Mac OS X.
47726         * lib/get-rusage-data.c: On Mac OS X, don't define
47727         get_rusage_data_via_setrlimit nor get_rusage_data_via_iterator.
47728         (get_rusage_data) [Mac OS X]: Just return 0.
47730 2017-04-22  Bruno Haible  <bruno@clisp.org>
47732         xbinary-io: Fix build error.
47733         * modules/xbinary-io (Depends-on): Add gettext-h.
47734         * lib/xbinary-io.c: Include gettext.h and define _().
47735         Reported by Gisle Vanem <gisle.vanem@gmail.com> in
47736         <https://lists.gnu.org/r/bug-gnulib/2017-04/msg00089.html>.
47738 2017-04-22  Paul Eggert  <eggert@cs.ucla.edu>
47740         parse-datetime: overflow and debug cleanups
47741         This long patch was triggered by this bug report from Ruediger Meier:
47742         http://lists.gnu.org/r/bug-gnulib/2017-04/msg00028.html
47743         I fixed the bug he noted, then found some others nearby, and then
47744         still others.  Oh my goodness, there were a lot of bugs.  I cleaned
47745         up some of the code to follow GNU standards while I was at it.
47746         * lib/parse-datetime.y (ISDIGIT): Remove; all callers changed to
47747         use c_isdigit.
47748         (EPOCH_YEAR): Remove; unused.
47749         (TM_YEAR_BASE): Now an enum rather than a macro.
47750         (HOUR, debug_strfdatetime): Multiply hour by 3600, not 60, to get
47751         time zone offset, since timezones now are in terms of seconds and
47752         not minutes.
47753         (long_time_t): Remove.  All uses replaced by time_t or intmax_t as
47754         appropriate.  Verify that intmax_t is wide enough.
47755         (time_overflow, time_zone_str): New functions, used to deal
47756         more reliably with overflow.
47757         (dbg_printf): Add printf attribute, to help catch integer width errors.
47758         (textint, relative_time, parser_control, time_zone_hhmm, set_hhmmss)
47759         (%union, to_hour, yylex, parse_datetime2):
47760         Use intmax_t instead of long int and/or long_time_t.
47761         All uses changed.
47762         (DBGBUFSIZE): Move earlier.
47763         (relative_time, set_hhmmss, parser_control):
47764         Just use int for nanoseconds and for time zones; that’s wide enough.
47765         (parser_control): Use bool for members like year_seen that can
47766         be booleans instead of counters.  All uses changed.
47767         Remove debug_default_input_timezone; no longer needed.
47768         All uses removed.
47769         (apply_relative_time): Return a bool overflow flag.
47770         All uses changed to check for overflow.
47771         (apply_relative_time, zone, date, relunit, relunit_snumber)
47772         (signed_seconds, unsigned_seconds, yylex, parse_datetime2):
47773         Check for integer overflow portably.
47774         (str_days): Use just int for N, as it’s wide enough.
47775         Prefer 2D char arrays to arrays of char * when it looks like
47776         2D is a win on typical platforms.
47777         Prefer snprintf to strncpy/strncat, for simplicity;
47778         all buffers are smaller than INT_MAX so this is safe.
47779         (TIME_ZONE_BUFSiZE, TM_YEAR_BUFSIZE): New constants.
47780         (debug_print_current_time): Don’t assume tv_nsec is of type long,
47781         as this is not true on x32.  Output "." before any nanoseconds.
47782         (debug_print_current_time, parse_datetime2):
47783         Output local zones using a more-consistent format.
47784         (debug_print_current_time, date, parse_datetime2):
47785         (main) [TEST]:
47786         Don’t assume time_t is the same width as long.
47787         (print_rel_part): New function, replacing ...
47788         (PRINT_REL_PART): ... this macro, which was removed.  All uses changed.
47789         (debug_print_relative_time): Use bool for boolean.
47790         (local_zone): dsts_seen now counts only tDST instances.
47791         (date): Fix printf of size_t to use %z.  Do not assume numeric
47792         tokens have negative values merely because the context suggests
47793         a syntax with "-" separating tokens.
47794         (time_zone_hhmm): Return bool success indicator, which checks for
47795         overflow.  Store result into PC->time_zone instead.  All callers
47796         changed.
47797         (tm_year_str): New function.  Return a bool success indicator and
47798         store the result into a buffer.  All callers changed.  Output the
47799         numerically correct string even if adding 1900 to the year would
47800         overflow.
47801         (to_tm_year): New function, replacing the old to_year.  All
47802         callers changed.
47803         (tm_diff): Sync with glibc.
47804         (lookup_word): Use to_uchar instead of doing it by hand.
47805         (TZBUFSIZE): Now local to the only function that needs it.
47806         (debug_strfdatetime): Simplify now that time zones are int seconds.
47807         (debug_strfdate): Work even if tm_year + 1900 would overflow.
47808         (get_effective_timezone): Remove.  All uses removed.
47809         (parse_datetime2): Use fprintf in pieces instead of snprintfing
47810         to a fixed-size buffer.  Don’t assume that gmtime succeeds iff
47811         localtime succeeds.  Use tm_gmtoff if available.  Simplify how
47812         ‘goto fail;’ works in conjunction with the ‘ok’ flag.
47813         * m4/parse-datetime.m4 (gl_PARSE_DATETIME): Don’t define
47814         TIME_T_FITS_IN_LONG_INT, as it is no longer needed.
47815         * modules/parse-datetime (Depends-on): Add inttypes.
47817 2017-04-21  Bruno Haible  <bruno@clisp.org>
47819         gettext-h: Avoid -Wundef warning.
47820         * lib/gettext.h: Test the value of ENABLE_NLS only if it is defined.
47821         Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
47822         <https://lists.gnu.org/r/bug-gnulib/2017-04/msg00022.html>.
47824 2017-04-05  Tim Rühsen  <tim.ruehsen@gmx.de>
47826         error: Avoid "function declaration isn't a prototype" warning.
47827         * lib/error.c (strerror_r): Turn K&R C prototype to an ANSI C prototype.
47829 2017-04-21  Bruno Haible  <bruno@clisp.org>
47831         vasnprintf: Fix for MSVC 14.
47832         * lib/vasnprintf.c (USE_MSVC__SNPRINTF): New macro.
47833         Everywhere, use !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF instead
47834         of !HAVE_SNPRINTF_RETVAL_C99.
47836 2017-04-21  Bruno Haible  <bruno@clisp.org>
47838         mbrtowc tests: Fix test failures on MSVC 14.
47839         * tests/test-mbrtowc-w32.c (test_one_locale): Accept MSVC's conversion
47840         behaviour for invalid input.
47842 2017-04-21  Bruno Haible  <bruno@clisp.org>
47844         mbsinit: Fix for MSVC 14.
47845         * lib/mbsinit.c (mbsinit): If GNULIB_defined_mbstate_t, provide an
47846         implementation that is in sync with mbrtowc.c. On other platforms, use
47847         an adequate ad-hoc implementation.
47849 2017-04-21  Bruno Haible  <bruno@clisp.org>
47851         Fix test-mbrtowc5.sh failure on native Windows.
47852         * lib/setlocale.c (setlocale_unixlike): Accept "POSIX" as an alias for
47853         "C".
47855 2017-04-21  Bruno Haible  <bruno@clisp.org>
47857         Avoid accidental use of native Windows APIs on Cygwin.
47858         * lib/getaddrinfo.c (WINDOWS_NATIVE): Don't define on Cygwin.
47859         * lib/localcharset.c (WINDOWS_NATIVE): Likewise.
47860         * lib/localename.c (WINDOWS_NATIVE): Likewise.
47862 2017-04-20  Bruno Haible  <bruno@clisp.org>
47864         Remove red warnings from the generated MODULES.html.
47865         * modules/fcntl (Description): Disambiguate function references.
47866         * modules/getcwd-lgpl (Description): Likewise.
47867         * modules/hostent (Description): Likewise.
47868         * modules/servent (Description): Likewise.
47869         * modules/tempname (Description): Likewise.
47871 2017-04-20  Bruno Haible  <bruno@clisp.org>
47873         verify tests: Fix spurious failure with parallel make.
47874         * gnulib-tool (func_emit_tests_Makefile_am): Emit initialization of
47875         EXTRA_PROGRAMS.
47876         * tests/test-verify.sh: Build test-verify-try.o, not test-verify.o.
47877         * tests/test-verify-try.c: New file.
47878         * modules/verify-tests (Files): Add it.
47879         (EXTRA_PROGRAMS): Add test-verify-try.
47880         (MOSTLYCLEANFILES): Update accordingly.
47881         Reported by Adam James Stewart <ajstewart@anl.gov>.
47883 2017-04-18  Bruno Haible  <bruno@clisp.org>
47885         vma-iter: Fix compilation error on Solaris 7.
47886         * lib/vma-iter.c (vma_iterate): Treat missing MAP_ANONYMOUS on Solaris
47887         like on IRIX, OSF/1.
47888         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
47890 2017-04-18  Bruno Haible  <bruno@clisp.org>
47892         vma-iter: Fix conflict with module 'largefile' on 32-bit Solaris 9.
47893         * modules/vma-iter (configure.ac): Test whether <sys/procfs.h> can be
47894         included.
47895         * lib/vma-iter.c: On Solaris, test HAVE_SYS_PROCFS_H before including
47896         <sys/procfs.h>.
47897         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Don't define on Solaris when
47898         <sys/procfs.h> cannot be included.
47899         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
47901 2017-04-18  Bruno Haible  <bruno@clisp.org>
47903         getopt-gnu: Add comments.
47904         * m4/getopt.m4 (gl_FUNC_GETOPT_GNU): Add comments.
47905         * modules/getopt-gnu (configure.ac): Likewise.
47907 2017-04-16  Paul Eggert  <eggert@cs.ucla.edu>
47909         regex: port better to Solaris 10
47910         Solaris 10 <locale.h> includes <libintl.h>, which #defines
47911         gettext, and this causes a double #define.
47912         Problem reported by Gavin Smith in:
47913         http://lists.gnu.org/r/bug-gnulib/2017-04/msg00056.html
47914         * lib/regex_internal.h (gettext): #undef before #defining.
47916 2017-04-15  Paul Eggert  <eggert@Penguin.CS.UCLA.EDU>
47918         intprops: improve comments
47919         * lib/intprops.h: Improve and shorten commentary.
47920         For the record, if we ever run into a pedantic compiler that
47921         behaves differently from GCC when converting an out-of-range value
47922         to a signed integer, we can work around the problem with something
47923         like the following code, where UCT is the signed counterpart of T
47924         (UCT is sometimes narrower than UT) and all callers are changed
47925         accordingly:
47926         #if __SUNPRO_C <= 0x5120
47927         # define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, uct, ut, t) \
47928            ((t) ((ut) (a) op (ut) (b)))
47929         #else
47930         # define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, uct, ut, t) \
47931            (TYPE_MINIMUM (t) <= (uct) ((ut) (a) op (ut) (b)) \
47932             ? ((t) (uct) (((ut) (a) op (ut) (b)) - TYPE_MINIMUM (t)) \
47933                + TYPE_MINIMUM (t)) \
47934             : (t) (uct) ((ut) (a) op (ut) (b)))
47935         #endif
47937 2017-04-14  Paul Eggert  <eggert@Penguin.CS.UCLA.EDU>
47939         intprops: try to avoid tickling similar bugs
47940         * lib/intprops.h (_GL_INT_OP_CALC): Document that UT no longer
47941         needs to be the same width as T; it can be wider.
47942         Change callers so that UT is at least as wide as unsigned int,
47943         as I suspect that this is less likely to run into compiler bugs.
47945         intprops: port to Oracle Studio 12.3 x86
47946         Problem reported by Gavin Smith in:
47947         http://lists.gnu.org/r/bug-gnulib/2017-04/msg00049.html
47948         * lib/intprops.h (_GL_INT_OP_WRAPV_VIA_UNSIGNED):
47949         Convert unsigned to signed via the usual rather than the standard way,
47950         to avoid a compiler bug in Oracle Studio 12.3 x86.
47952 2017-04-08  Paul Eggert  <eggert@cs.ucla.edu>
47954         getopt: prefer - to _ in new file names
47955         * lib/getopt-cdefs.in.h: Rename from lib/getopt_cdefs.in.h.
47956         * lib/getopt-core.h: Rename from lib/getopt_core.h.
47957         * lib/getopt-ext.h: Rename from lib/getopt_ext.h.
47958         * lib/getopt-pfx-core.h: Rename from lib/getopt_pfx_core.h.
47959         * lib/getopt-pfx-ext.h: Rename from lib/getopt_pfx_ext.h.
47960         All uses changed.
47962         getopt: port recent getopt changes to macOS
47963         Problem reported by Harald Maier (Bug#26398).
47964         The macOS C compiler uses __nonnull for its own purposes and that
47965         clashes with glibc's __nonnull.
47966         * lib/getopt.in.h: Add comment for _GL_ARG_NONNULL snippet.
47967         * lib/getopt_cdefs.in.h (__nonnull): Remove.
47968         * lib/getopt_core.h (getopt):
47969         * lib/getopt_ext.h (getopt_long, getopt_long_only):
47970         Use _GL_ARG_NONNULL, not __nonnull.
47971         * lib/unistd.in.h: Move snippet hooks to before where the getopt
47972         .h files are included, so that _GL_ARG_NONNULL is defined in time.
47973         * modules/getopt-posix (Depends-on): Add snippet/arg-nonnull.
47974         (getopt.h): Interpolate _GL_ARG_NONNULL snippet.
47976 2017-04-06  Paul Eggert  <eggert@cs.ucla.edu>
47978         getopt-gnu: omit some duplicate code
47979         * m4/getopt.m4 (gl_FUNC_GETOPT_GNU): Don’t require
47980         gl_FUNC_GETOPT_POSIX, as the configure.ac code generated by
47981         gnulib-tool already does this.
47982         * modules/getopt-gnu (configure.ac): Omit code duplicated from
47983         getopt-posix, which we depend on.
47985         getopt-posix: use angle-bracket include
47986         * lib/getopt1.c: Include <config.h>, not "config.h".
47988 2017-04-06  Zack Weinberg  <zackw@panix.com>
47990         getopt: annotate files with relationship to glibc
47992         As the final act in this patchset, adjust the message at the top of
47993         each file to indicate which files are synced with glibc.  (This has
47994         already been done for most of the headers.)
47996         * lib/getopt.c, lib/getopt1.c, lib/getopt_int.h:
47997         Mention in top-of-file boilerplate that these files are shared
47998         between glibc and gnulib.
48001         getopt: split up getopt.in.h and eliminate __need_getopt
48003         Over in glibc, all of the __need macros are being phased out in favor
48004         of small headers that declare only the necessary components, as this
48005         is much simpler and less prone to bugs.  As getopt is shared with
48006         glibc, gnulib needs to do the same for __need_getopt.
48008         __need_getopt is misnamed; what it really means is "we want only the
48009         getopt features specified in POSIX, not the GNU extensions".  glibc
48010         placed the "meat" of getopt.h into getopt_core.h and getopt_ext.h;
48011         these files can be shared verbatim with gnulib.  The portability
48012         wrapper, on the other hand, they have renounced altogether; glibc's
48013         getopt.h will no longer be shared with gnulib at all.  In exchange,
48014         certain glibc-specific quirks (having to do with __posix_getopt) no
48015         longer need appear in gnulib's headers at all.
48017         This patch merges getopt_core.h and getopt_ext.h from glibc, and
48018         splits up the current gnulib-side portability wrapper into three
48019         additional headers: getopt_pfx_core.h and getopt_pfx_ext.h handle
48020         __GETOPT_PREFIX for their respective headers, getopt_cdefs.in.h
48021         handles things like __BEGIN_DECLS and __THROW, and getopt.in.h and
48022         unistd.in.h just use them.  All new files are clearly marked with
48023         whether they are shared with glibc.
48025         * lib/getopt.in.h: Eliminate __need_getopt.  Break up into ...
48026         * lib/getopt_core.h, lib/getopt_ext.h: ... these new files shared
48027         with glibc, and ...
48028         * lib/getopt_cdefs.in.h, lib/getopt_pfx_core.h
48029         * lib/getopt_pfx_ext.h: ... these new files not shared with glibc.
48030         * lib/unistd.in.h: Include getopt_cdefs.h and getopt_pfx_core.h,
48031         instead of defining __need_getopt and including the full getopt.h.
48033         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): Check for sys/cdefs.h.
48034         Define substitution variables GETOPT_CDEFS_H and HAVE_SYS_CDEFS_H.
48035         * modules/getopt-posix (Files): Add new headers and sort list.
48036         (Depends-on): No longer need snippet/arg-nonnull.
48037         (Makefile.am): Generate getopt_cdefs.h.
48040         getopt: better handling of ambiguous options
48042         glibc's getopt uses alloca to construct a linked list of possibilities
48043         for an "ambiguous" long option.  In gnulib, malloc should be used
48044         instead.  Providing for both cases complicates things a fair bit.
48046         This patch rewrites ambiguous-option handling to use a boolean vector
48047         instead of a linked list.  There is then only one allocation that
48048         might need freeing; in glibc it can honor __libc_use_alloca as usual,
48049         and in gnulib we define __libc_use_alloca to always be false, so we
48050         don't need ifdefs in the middle of the function.  This should also be
48051         slightly more efficient in the normal case of long options being fully
48052         spelled out -- I think most people aren't even aware they _can_
48053         sometimes abbreviate long options.
48055         One interesting consequence is that the list of possibilities is now
48056         printed in exactly the order they appear in the list of long options,
48057         instead of the first possibility being shuffled to the end.
48059         (The patch looks bigger than it really is because there's a fair bit
48060         of reindentation and code rearrangement.)
48062         * lib/getopt.c: When used standalone, define __libc_use_alloca
48063         as always false and alloca to abort if called.
48064         (process_long_option): Rewrite handling of ambiguous long options
48065         to use a single boolean vector, not a linked list; use
48066         __libc_use_alloca to decide whether to allocate this using alloca.
48069         getopt: refactor long-option handling
48071         There were two copies of the bulk of the code to handle long options.
48072         Now there is only one.
48074         This change temporarily removes the logic to avoid using alloca when
48075         standalone; the next patch in the series will restore it.
48077         * lib/getopt.c (process_long_option): New function split out
48078         from _getopt_internal_r.
48079         (_getopt_internal_r): Replace both copies of the long-option
48080         processing code with calls to process_long_option.
48083         getopt: tidy up _getopt_initialize a bit
48085         _getopt_data.__posixly_correct is completely redundant to
48086         _getopt_data.__ordering, and some work that logically belongs in
48087         _getopt_initialize was being done by _getopt_internal_r, making the
48088         code harder to understand.
48090         As a side effect, getenv will no longer be called if the first
48091         character of the options string is '+' or '-', which is probably a
48092         Good Thing.  (Perhaps we should have a flag character that
48093         specifically asks for the permutation behavior?)
48095         * lib/getopt_int.h (_getopt_data): Remove __posixly_correct field.
48096         * lib/getopt.c (_getopt_internal_r): Move some initialization code...
48097         (_getopt_initialize): ...here. Don't set d->__posixly_correct.
48100         getopt: merge from glibc: repetition reduction
48102         The definitions of the entry point functions 'getopt' and
48103         '__posix_getopt' can be made substantially less repetitive with a
48104         helper macro.
48106         While I was merging the const-correctness changes from gnulib into
48107         glibc I noticed there are still some unnecessary casts in
48108         _getopt_internal_r.
48110         * lib/getopt.c (getopt, __posix_getopt): Eliminate repetition with
48111         a macro.  Consistently cast 'argv' to 'char **' when calling
48112         _getopt_internal.
48113         (_getopt_internal_r): Remove unnecessary casts when calling exchange.
48116         getopt: clean up error reporting
48118         getopt can print a whole bunch of error messages, and when used
48119         standalone (from gnulib) it uses fprintf to do that.  But fprintf is a
48120         cancellation point and getopt isn't, and also applying fprintf to a
48121         stream in wide-character mode is not allowed.  So every single error
48122         reporting case has an #ifdef _LIBC block in which it calls internal
48123         libc functions instead.  The counterpart patch series in glibc makes
48124         it possible to simplify all of that down to a set of #defines at the
48125         top of the file; core code is written as if it is safe to just call
48126         fprintf, flockfile, and funlockfile.  (One caveat: it's *not* safe to
48127         call any *other* stdio functions.)
48129         * lib/getopt.c: When _LIBC is defined, define fprintf to
48130         __fxprintf_nocancel, flockfile to _IO_flockfile, and funlockfile
48131         to _IO_funlockfile.  When neither _LIBC nor
48132         _POSIX_THREAD_SAFE_FUNCTIONS is defined, define flockfile and
48133         funlockfile as no-ops.
48134         (_getopt_internal_r): Remove all internal #ifdef _LIBC blocks; the
48135         standalone error-printing code can now be used for libc as well.
48136         Add an flockfile/funlockfile pair around one case where the error
48137         message is printed in several chunks.  Don't use fputc.
48140         getopt: fix fencepost error in ambiguous-W-option handling
48142         getopt_long contains an undocumented (AFAICT) feature in which, if you
48143         put "W;" in the short-options list, then '-W foo' and '-Wfoo' are
48144         treated as equivalent to '--foo'.  This is implemented with a partial
48145         second copy of the code for handling long options, and that code
48146         increments optind one too many times when recovering from an ambiguous
48147         abbreviated option, which can cause the main loop to walk past the end
48148         of argv and crash.
48150         I discovered this while writing a test case that tries to exercise all
48151         of getopt's error reporting paths; I wouldn't be surprised to learn
48152         that this feature is never used by real applications.
48154         * lib/getopt.c (_getopt_internal_r): Don't increment
48155         d->optind a second time when reporting ambiguous -W options.
48158         getopt: clean up getopt.c and getopt1.c file headers
48160         In getopt.c, there is no need to include wchar.h at all, and it is
48161         safe nowadays to assume that stdlib.h does declare getenv (several
48162         other gnulib modules make this assumption).
48164         In getopt1.c, the #ifdef _LIBC block at the top can be simplified
48165         by using "" inclusions consistently, and there is no actual need to
48166         include stdlib.h (except in the #ifdef TEST block, where it should be
48167         unconditional), nor to provide a backup definition of NULL at all.
48169         * lib/getopt1.c: Simplify #ifdeffage at top of file.
48170         Move inclusion of stdlib.h to #ifdef TEST block and make
48171         unconditional.  Do not define NULL.
48172         * lib/getopt.c: Don't include wchar.h. No need to declare getenv.
48173         * m4/getopt.m4 (gl_PREREQ_GETENV): Delete.
48174         * modules/getopt-gnu, modules/getopt-posix: Don't call
48175         gl_PREREQ_GETENV.
48178         getopt: harmonize comments with glibc
48180         The comments explaining how the behavior of 'getopt' varies depending
48181         on whether it's the standalone version and whether there are special
48182         characters at the beginning of the options string were inconsistent
48183         between gnulib and glibc, and also out of sync with the code.
48185         * lib/getopt.c, lib/getopt_int.h: Harmonize comments with glibc.
48188         getopt: remove USE_NONOPTION_FLAGS
48190         getopt includes code to parse an environment variable named
48191         _XXX_GNU_nonoption_argv_flags_ (where XXX is the current process's PID
48192         in decimal); but all of it has been #ifdefed out since 2001, with no
48193         official way to turn it back on.
48195         According to commentary in glibc's config.h.in, bash version 2.0
48196         set this environment variable to indicate argv elements that were
48197         the result of glob expansion and therefore should not be treated
48198         as options, but the feature was "disabled later" because "it
48199         caused problems".  According to bash's CHANGES file, "later" was
48200         release 2.01; it gives no more detail about what the problems
48201         were.
48203         Version 2.0 of bash was released on the last day of 1996, and version
48204         2.01 in June of 1997.  Twenty years later, I think it is safe to
48205         assume that this environment variable isn't coming back.
48207         * lib/getopt_int.h: Remove all #ifdef USE_NONOPTION_FLAGS blocks.
48208         * lib/getopt.c: Likewise. Also remove SWAP_FLAGS and the
48209         __libc_argc and __libc_argv externs, which were only used by
48210         #ifdef USE_NONOPTION_FLAGS blocks.
48213         getopt: tabify, in preparation for merge with glibc
48215         glibc sticks to the GNU default of indenting with a mix of
48216         8-column tabs and spaces; make the gnulib copy match.
48218         getopt.h is not included because it is *not* going to be merged in its
48219         present form.
48221         * getopt.c, getopt1.c, getopt_int.h: Tabify.
48223 2017-04-02  Bruno Haible  <bruno@clisp.org>
48225         relocatable-lib-lgpl: Fix link error (regression from 2011-06-16).
48226         * modules/relocatable-lib-lgpl (configure.ac): Add AC_LIBOBJ invocation,
48227         like it was done in modules/relocatable-lib on 2011-05-21 and in
48228         modules/relocatable-prog on 2011-08-15.
48229         Reported by Reuben Thomas <rrt@sc3d.org>.
48231 2017-03-31  Bruno Haible  <bruno@clisp.org>
48233         glob: Fix invalid free() call.
48234         * lib/glob.c (glob): Reset malloc_home_dir when assigning a pointer to
48235         static storage to home_dir.
48236         Reported by Coverity via Tim Rühsen.
48238 2017-03-31  Bruno Haible  <bruno@clisp.org>
48240         glob: Fix memory leaks.
48241         * lib/glob.c (glob): Free allocated memory before returning.
48242         Reported by Coverity via Tim Rühsen.
48244 2017-03-31  Bruno Haible  <bruno@clisp.org>
48246         md5, sha1, sha256, sha512: Add comments regarding correctness.
48247         * lib/md5.h (buflen): Add comments regarding range.
48248         * lib/sha1.h (buflen): Likewise.
48249         * lib/sha256.h (buflen): Likewise.
48250         * lib/sha512.h (buflen): Likewise.
48251         * lib/md5.c (md5_process_bytes): Add comment why memmove is not needed.
48252         * lib/sha1.c (sha1_process_bytes): Likewise.
48253         * lib/sha256.c (sha256_process_bytes): Likewise.
48254         * lib/sha512.c (sha512_process_bytes): Likewise.
48255         Reported by Coverity via Tim Rühsen.
48257 2017-03-22  Paul Eggert  <eggert@cs.ucla.edu>
48259         getopt: merge from glibc
48260         This does not change anything substantial; it merely simplifies
48261         hypothetical merges back to glibc.
48262         * lib/getopt.c, lib/getopt.in.h, lib/getopt1.c, lib/getopt_int.h:
48263         Change copyright notice to match what is in glibc.
48264         * lib/getopt.c: Reorder includes to match glibc.  Remove uses of
48265         USE_IN_LIBIO.  Remove 'register'.  In __LIBC code, use
48266         __open_memstream rather than open_memstream and __glibc_likely
48267         instead of __builtin_expect.
48268         * lib/getopt.in.h (__posix_getopt) [!__GETOPT_PREFIX]: New decl.
48270 2017-03-21  Paul Eggert  <eggert@cs.ucla.edu>
48272         dfa: make [0-9] faster in non-C locales
48273         Problem reported by John P. Linderman (Bug#26193).
48274         * lib/dfa.c (parse_bracket_exp): Remove redundant assignment.
48275         If both ends of the range are ASCII digits, do not worry about
48276         multi-character collating sequences and the like.  Be consistent
48277         about using isalpha as a precondition for setbit_case_fold_c.
48279 2017-03-19  Bruno Haible  <bruno@clisp.org>
48281         lock: Fix compilation error with HP-UX IA64 cc.
48282         * lib/glthread/lock.h (pthread_rwlockattr_setkind_np): Don't declare
48283         weak on non-glibc platforms.
48285 2017-03-19  Paul Eggert  <eggert@cs.ucla.edu>
48287         stdalign: tweak version# and test for HP-UX IA64
48288         Problems reported by Bruno Haible in:
48289         http://lists.gnu.org/r/bug-gnulib/2017-03/msg00078.html
48290         * lib/stdalign.in.h (_Alignas):
48291         * m4/stdalign.m4 (gl_STDALIGN_H):
48292         Use octal, not decimal, for __HP_cc version.  Perhaps HP formerly
48293         used octal (as that is how they document it), but it is decimal in
48294         practice now and the ancient implementations no longer matter.
48295         * tests/test-stdalign.c (main) [__HP_cc && __ia64]: Skip test.
48297 2017-03-19  Bruno Haible  <bruno@clisp.org>
48299         vma-iter: Add support for Solaris.
48300         * lib/vma-iter.c (vma_iterate): On Solaris, use the /proc filesystem
48301         approach.
48302         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on Solaris.
48303         * lib/get-rusage-as.c: Update comment about Solaris.
48304         * lib/get-rusage-data.c: Likewise.
48306 2017-03-19  Bruno Haible  <bruno@clisp.org>
48308         vma-iter: Prefer HP-UX specific API on HP-UX.
48309         * lib/vma-iter.c (vma_iterate): Move HP-UX specific implementation up.
48310         * lib/vma-iter.h: Update.
48311         Just in case HP-UX ever implements mquery().
48313 2017-03-18  Paul Eggert  <eggert@cs.ucla.edu>
48315         stdalign: restore previous behavior for HP-UX IA64
48316         See Bruno Haible's email in:
48317         http://lists.gnu.org/r/bug-gnulib/2017-03/msg00066.html
48318         which cites p 150 of a manual saying that 'aligned' works on Itanium.
48319         * lib/stdalign.in.h (_Alignas):
48320         Assume the '061200' applies to Itanium, not to PA-RISC.
48321         * m4/stdalign.m4 (gl_STDALIGN_H): Adjust to match stdalign.in.h.
48323 2017-03-17  Bruno Haible  <bruno@clisp.org>
48325         stat-time, timespec: Support use of the header files in C++ mode.
48326         * lib/stat-time.h: Add "C" linkage declaration.
48327         * lib/timespec.h: Likewise.
48329 2017-03-17  Bruno Haible  <bruno@clisp.org>
48331         stdalign: Make it work with HP-UX cc.
48332         * lib/stdalign.in.h (_Alignas): Don't define for HP-UX cc.
48333         * m4/stdalign.m4 (gl_STDALIGN_H): No need to enable the extra test
48334         for HP-UX cc.
48336 2017-03-17  Paul Eggert  <eggert@cs.ucla.edu>
48338         flexmember: try to detect HP-UX 11.31 cc bug
48339         Problem reported by Bruno Haible in:
48340         http://lists.gnu.org/r/bug-gnulib/2017-03/msg00066.html
48341         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
48342         Attempt to detect bug in HP-UX 11.31 cc.
48344 2017-03-16  Bruno Haible  <bruno@clisp.org>
48346         stdint: Fix test compilation failure with HP-UX 11 cc.
48347         * lib/stdint.in.h (_STDINT_MIN): Remove macro.
48348         (_STDINT_UNSIGNED_MIN, _STDINT_SIGNED_MIN): New macros.
48349         (PTRDIFF_MIN, SIG_ATOMIC_MIN, WCHAR_MIN, WINT_MIN): Define using
48350         _STDINT_UNSIGNED_MIN, _STDINT_SIGNED_MIN.
48352 2017-03-14  Bruno Haible  <bruno@clisp.org>
48354         gnulib-tool: Don't produce a tests directory with only snippet .h files.
48355         * gnulib-tool (func_modules_transitive_closure_separately): If
48356         testsrelated_modules ends up with no "real" modules, aside from
48357         modules with applicability 'all', set it to empty.
48359 2017-03-14  Bruno Haible  <bruno@clisp.org>
48361         vma-iter: Add support for HP-UX.
48362         * modules/vma-iter (configure.ac): Check for 'pstat_getprocvm'.
48363         * lib/vma-iter.c (vma_iterate): On HP-UX, use pstat_getprocvm().
48364         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on HP-UX.
48365         * lib/get-rusage-as.c: Update comment about HP-UX.
48366         * lib/get-rusage-data.c: Likewise.
48367         (get_rusage_data): Use get_rusage_data_via_setrlimit.
48369 2017-03-14  Bruno Haible  <bruno@clisp.org>
48371         limits-h: Make it work with HP-UX cc.
48372         * lib/limits.in.h (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Define if not
48373         defined.
48375 2017-03-14  Bruno Haible  <bruno@clisp.org>
48377         Fix test failures on DragonFlyBSD.
48378         * tests/test-localeconv.c (main): Treat DragonFlyBSD like FreeBSD.
48379         * tests/test-select.h (test_bad_fd): Likewise.
48380         * tests/test-get-rusage-data.c (main): Treat DragonFlyBSD like OpenBSD.
48382 2017-03-14  Bruno Haible  <bruno@clisp.org>
48384         freadahead: Silence warning on DragonFlyBSD.
48385         * lib/freadahead.c (__sreadahead): Declare ourselves.
48387 2017-03-14  Bruno Haible  <bruno@clisp.org>
48389         vma-iter: Add comment about AIX.
48390         * lib/vma-iter.c: Add comment about why this module is not implemented
48391         on AIX.
48393 2017-03-14  Paul Eggert  <eggert@cs.ucla.edu>
48395         snippets: move unadjusted snippet sources to lib
48396         Problem reported by Michal Privoznik in:
48397         http://lists.gnu.org/r/bug-gnulib/2017-03/msg00039.html
48398         * lib/_Noreturn.h: Rename from build-aux/snippet/_Noreturn.h.
48399         * lib/arg-nonnull.h: Rename from build-aux/snippet/arg-nonnull.h.
48400         * lib/c++defs.h: Rename from build-aux/snippet/c++defs.h.
48401         * lib/unused-parameter.h: Rename from
48402         build-aux/snippet/unused-parameter.h.
48403         * lib/warn-on-use.h: Rename from build-aux/snippet/warn-on-use.h.
48404         * modules/snippet/_Noreturn (Files:, _NORETURN_H):
48405         * modules/snippet/arg-nonnull (Files:, ARG_NONNULL_H):
48406         * modules/snippet/c++defs (Files:, CXXDEFS_H):
48407         * modules/snippet/unused-parameter (Files:, UNUSED_PARAMETER_H):
48408         * modules/snippet/warn-on-use (Files: WARN_ON_USE_H):
48409         Adjust to file renamings.
48411 2017-03-14  Mathieu Lirzin  <mthl@gnu.org>
48413         gnulib-tool: don't automatically distribute files from top/
48414         * gnulib-tool (func_get_automake_snippet_unconditional): To be able to
48415         not distribute top/README-release by default, don't distribute files
48416         from top/ unconditionally.
48417         * modules/gnumakefile (Makefile.am): Distribute top/GNUmakefile.
48418         * modules/maintainer-makefile (Makefile.am): Distribute top/maint.mk.
48420 2017-03-14  Paul Eggert  <eggert@cs.ucla.edu>
48422         gnulib-tool: fix typo in comment output
48423         * gnulib-tool (func_import): Fix typo with previous change.
48425         snippets: work around GNU Make 3.82 VPATH
48426         When using 'gnulib-tool --gnu-make' on Emacs, and building
48427         the resulting tarball on Solaris 10 which bundles GNU Make 3.82,
48428         an out-of-source (VPATH) build failed because the sans-copyright
48429         snippet file was not built before the file that used it.
48430         Presumably this is some sort of VPATH thing.  Work around the
48431         problem by using the original snippet, i.e., don’t bother to
48432         remove its copyright notice.
48433         * modules/snippet/_Noreturn, modules/snippet/link-warning:
48434         Don’t assume Automake in comments.  Omit long-incorrect comment.
48435         * modules/snippet/arg-nonnull (BUILT_SOURCES, arg-nonnull.h)
48436         (MOSTLYCLEANFILES):
48437         * modules/snippet/c++defs (BUILT_SOURCES, c++defs.h)
48438         (MOSTLYCLEANFILES):
48439         * modules/snippet/unused-parameter (BUILT_SOURCES, unused-parameter.h)
48440         (MOSTLYCLEANFILES):
48441         * modules/snippet/warn-on-use (BUILT_SOURCES, warn-on-use.h)
48442         (MOSTLYCLEANFILES):
48443         Remove.
48444         * modules/snippet/arg-nonnull (ARG_NONNULL_H):
48445         * modules/snippet/c++defs (CXXDEFS_H):
48446         * modules/snippet/unused-parameter (UNUSED_PARAMETER_H):
48447         * modules/snippet/warn-on-use (WARN_ON_USE_H):
48448         Don’t bother to remove the copyright notice; just use the
48449         original snippet as-is.
48451 2017-03-13  Paul Eggert  <eggert@cs.ucla.edu>
48453         gnulib-tool: minor --gnu-make fixups
48454         * gnulib-tool (func_emit_lib_Makefile_am):
48455         Remove useless code that was a blind alley during implementation.
48456         Problem reported by Thien-Thi Nguyen in:
48457         http://lists.gnu.org/r/bug-gnulib/2017-03/msg00029.html
48458         (func_import): Note the "--gnu-make" option in the output comment.
48460 2017-03-12  Paul Eggert  <eggert@cs.ucla.edu>
48462         gnulib-tool: new option --gnu-make
48463         This is for applications like GNU Emacs that use GNU Make
48464         features instead of Automake.
48465         * doc/gnulib-tool.texi (Initial import): Mention --gnu-make.
48466         * doc/gnulib.texi (Unit test modules, Build robot for gnulib):
48467         Do not assume Automake.
48468         * gnulib-tool (func_determine_path_separator)
48469         (func_modules_transitive_closure, func_update_file)
48470         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am)
48471         (func_import): Add support for --gnu-make.
48473 2017-03-11  Paul Eggert  <eggert@cs.ucla.edu>
48475         gnulib-common.m4: avoid aclocal.m4 bloat
48476         * m4/gnulib-common.m4 (gl_PROG_AR_RANLIB):
48477         Hide AM_PROG_AR from aclocal, so that aclocal does not
48478         install irrelevant macro definitions into aclocal.m4.
48480 2017-03-10  Bruno Haible  <bruno@clisp.org>
48482         vma-iter: Let callers know about error.
48483         * lib/vma-iter.h (vma_iterate): Return 'int', not 'void'.
48484         * lib/vma-iter.c (vma_iterate): Return -1 in case of error.
48486 2017-03-05  Bruno Haible  <bruno@clisp.org>
48488         Fix value of LD for 64-bit compilers on AIX.
48489         * m4/lib-ld.m4 (AC_LIB_PROG_LD): For 64-bit compilers on AIX
48490         ("gcc -maix64" and "xlc -q64"), add option -b64 to $LD.
48492 2017-03-04  Paul Eggert  <eggert@cs.ucla.edu>
48494         dtotimespec: simplify
48495         * lib/dtotimespec.c (dtotimespec): Simplify.
48497 2017-03-04  Bruno Haible  <bruno@clisp.org>
48499         test-calloc-gnu: Reenable test also for GCC 7.
48500         * tests/test-calloc-gnu.c (eight): New function.
48501         (main): Don't skip test; use eight() instead.
48503 2017-03-04  Jim Meyering  <meyering@fb.com>
48505         test-calloc-gnu: port to GCC7
48506         * tests/test-calloc-gnu.c (main) [__GNUC__ >= 7]: Skip a test
48507         that attempts to calloc more than SIZE_MAX bytes, because GCC7
48508         and newer would detect that at compilation time.
48510 2017-03-04  Bruno Haible  <bruno@clisp.org>
48512         tests: Avoid compiler warning about uses of null_ptr.
48513         * tests/null-ptr.h: New file.
48514         * tests/test-canonicalize.c: Include null-ptr.h.
48515         (null_ptr): Remove function.
48516         * tests/test-canonicalize-lgpl.c: Likewise.
48517         * tests/test-memmem.c: Likewise.
48518         * tests/test-ptsname_r.c: Likewise.
48519         * modules/canonicalize-tests (Files): Add tests/null-ptr.h.
48520         * modules/canonicalize-lgpl-tests: Likewise.
48521         * modules/memmem-tests: Likewise.
48522         * modules/ptsname_r-tests: Likewise.
48523         Reported by Jim Meyering.
48525 2017-03-03  Bruno Haible  <bruno@clisp.org>
48527         doc: Mention Mac OS X deficiencies regarding semaphores.
48528         * doc/posix-functions/sem_init.texi: Mention status on Mac OS X.
48529         * doc/posix-functions/sem_destroy.texi: Likewise.
48530         * doc/posix-functions/sem_getvalue.texi: Likewise.
48532 2017-03-03  Bruno Haible  <bruno@clisp.org>
48534         lock tests: Fix test failure on Mac OS X (regression from 2017-01-05).
48535         Reported by Assaf Gordon <assafgordon@gmail.com> via
48536         Pádraig Brady <P@draigBrady.com>.
48537         * tests/test-lock.c: On Mac OS X, use named semaphores, not unnamed
48538         semaphores.
48539         (USE_NAMED_SEMAPHORE, USE_UNNAMED_SEMAPHORE): New macros.
48540         (atomic_int_semaphore): New macro.
48542 2017-02-28  Bruno Haible  <bruno@clisp.org>
48544         perror tests: Tweak for z/OS.
48545         Reported by Daniel Richard G. <skunk@iskunk.org>.
48546         * tests/test-perror.sh: Don't fail z/OS style perror output.
48548 2017-02-26  Bruno Haible  <bruno@clisp.org>
48550         nproc: Refactor large function.
48551         * lib/nproc.c (num_processors_ignoring_omp): New function, extracted
48552         from num_processors.
48553         (num_processors): In this function, only deal with OMP.
48555 2017-02-26  Pádraig Brady  <P@draigBrady.com>
48557         nproc: adjust handling of OpenMP environment variables
48558         to match the return value from omp_get_num_threads(), i.e.:
48559          - honor OMP_THREAD_LIMIT without OMP_NUM_THREADS
48560          - Treat 0 as an invalid value and ignore
48561         Also remove the call to omp_get_num_threads() because
48562         it's ineffective without the omp pragmas in place.
48563         * lib/nproc.c (parse_omp_threads): Return 0 if specified,
48564         so that it can be ignored.
48565         (num_processors): Honor OMP_THREAD_LIMIT even without
48566         OMP_NUM_THREADS being set.  Also fix a typo in the environment
48567         variable being checked, from the previous recent commit.
48569 2017-02-26  Pádraig Brady  <P@draigBrady.com>
48571         nproc: support nested OMP_NUM_THREADS, and OMP_THREAD_LIMIT
48572         * lib/nproc.c (parse_omp_threads): A new function refactored
48573         from num_processors() to support parsing both of the
48574         above environment variables.
48575         (num_processors): Prefer using omp_get_num_threads() with [_OPENMP]
48576         to accurately reflect the current OpenMP nesting level.
48577         Also support the OMP_THREAD_LIMIT environment variable
48578         to limit the max value determined from OMP_NUM_THREADS.
48579         * modules/nproc: Depend on minmax header.
48580         Suggested by Oliver Heimlich.
48582 2017-02-25  Bruno Haible  <bruno@clisp.org>
48584         maintainer-makefile: Fix AC_PROG_SED with autoconf cache.
48585         * m4/gnulib-common.m4 (AC_PROG_SED): Fix AC_CACHE_CHECK invocation.
48587 2017-02-24  Paul Eggert  <eggert@cs.ucla.edu>
48589         ftoastr: port to -Wdouble-promotion
48590         Work around -Wdouble-promotion false alarm in recent GCCs.
48591         * lib/ftoastr.c (PROMOTED_FLOAT): New macro.
48592         (ftoastr_snprintf, FTOASTR): Use it.
48594 2017-02-21  Bruno Haible  <bruno@clisp.org>
48596         lock tests: Fix build failure on GNU/Hurd (regression from 2017-01-05).
48597         Reported by Rene Saavedra <rennes@openmailbox.org> in
48598         https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25821 via Paul Eggert.
48599         * lib/glthread/lock.h: On glibc systems without
48600         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP, use the fallback
48601         implementation of rwlocks.
48602         * lib/glthread/lock.c: Likewise.
48604 2017-02-20  Bruno Haible  <bruno@clisp.org>
48606         lock tests: Fix build failure on z/OS.
48607         Reported by Daniel Richard G. <skunk@iskunk.org>.
48608         * modules/lock-tests (configure.ac): Test for <semaphore.h>.
48609         * tests/test-lock.c (USE_SEMAPHORE): Don't set if <semaphore.h> does not
48610         exist.
48612 2017-02-19  Bruno Haible  <bruno@clisp.org>
48614         havelib: Prefer the search path of /usr/bin/gcc over the one of $CC.
48615         This helps when CC=clang.
48616         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Prefer the search path
48617         of /usr/bin/gcc.
48619         havelib: Support overriding the result of AC_LIB_PREPARE_MULTILIB.
48620         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Use AC_CACHE_CHECK.
48622 2017-02-19  Bruno Haible  <bruno@clisp.org>
48624         gnulib-tool: Avoid conflict of havelib-tests with --single-configure.
48625         * gnulib_tool (func_create_testdir): Avoid havelib-tests when
48626         --with-tests --single-configure is specified.
48628 2017-02-16  Tim Rühsen  <tim.ruehsen@gmx.de>
48630         users.txt: Update links, use HTTPS where possible
48631         * users.txt: Updated to HTTPS where possible,
48632         fixed some links to new locations.
48634 2017-02-16  Bruno Haible  <bruno@clisp.org>
48636         xbinary-io: Fix inlining.
48637         * lib/xbinary-io.c: Set XBINARY_IO_INLINE, not XSETMODE_INLINE.
48639 2017-02-16  Paul Eggert  <eggert@cs.ucla.edu>
48641         xbinary-io: rename from xsetmode
48642         This patch is taken from suggestions by Bruno Haible in:
48643         http://lists.gnu.org/r/bug-gnulib/2017-02/msg00060.html
48644         http://lists.gnu.org/r/bug-gnulib/2017-02/msg00061.html
48645         * lib/binary-io.c (__gl_setmode_check): Set errno to EINVAL,
48646         not ENOTTY, when it is an inappropriate device.
48647         * lib/binary-io.h (SET_BINARY): Resurrect.
48648         * lib/xbinary-io.c: Rename from lib/xsetmode.c.
48649         (xset_binary_mode_error): Rename from xsetmode_error.
48650         * lib/xbinary-io.h: Rename from lib/xsetmode.h.
48651         (xset_binary_mode): Rename from xsetmode.
48652         All uses changed.
48653         * modules/xbinary-io: Rename from modules/xsetmode.
48654         Update file names.
48655         * tests/test-binary-io.sh (tmpfiles): Remove no-longer-used file name.
48656         * NEWS: Update to match revised behavior.
48658 2017-02-15  Paul Eggert  <eggert@cs.ucla.edu>
48660         tests: Adjust to recent SET_BINARY change
48661         * tests/test-binary-io.c (main):
48662         * tests/test-binary-io.sh: Remove test for SET_BINARY.
48663         * tests/test-closein.c, tests/test-fflush2.c, tests/test-ftell.c:
48664         * tests/test-ftello.c, tests/test-nonblocking-pipe-child.c:
48665         * tests/test-yesno.c: Use set_binary_mode, not SET_BINARY.
48667         xsetmode: new module
48668         This is to fix a problem noted by Eric Blake.
48669         Code was using xfreopen to change files to binary mode, but this
48670         fails for stdout when in append mode.  Such code should use
48671         xsetmode instead.
48672         * NEWS: Document incompatible changes to binary-io module.
48673         * lib/binary-io.c (__gl_setmode_check) [__DJGPP__ || __EMX__]:
48674         New function.
48675         * lib/binary-io.h (__gl_setmode): Rename from set_binary_mode.
48676         (set_binary_mode): New function, which also checks for tty.
48677         * lib/xsetmode.c, lib/xsetmode.h, modules/xsetmode: New files.
48679 2017-02-14  Paul Eggert  <eggert@cs.ucla.edu>
48681         headers: fix begin-end typos
48682         * lib/mbfile.h, lib/se-selinux.in.h: Fix typos by replacing
48683         _GL_INLINE_HEADER_BEGIN with _GL_INLINE_HEADER_END.
48685         selinux-h: port to PGI 16.10
48686         * lib/se-selinux.in.h: Don't assume that include_next skips over
48687         duplicate -I DIR options.
48689         argp: port to PGI 16.10
48690         * lib/argp-pin.c (dummy): Declare as needed to make file nonempty.
48692 2017-02-13  Darshit Shah  <darnir@gnu.org>
48694         unicase: Update function protoype to match definition.
48695         * lib/unicase/special-casing.h (gl_unicase_special_lookup): Gperf 3.1
48696         uses 'size_t' as the datatype for the 'len' parameter in the functions
48697         it generates. Update the prototype specified here to match the newly
48698         generated function.
48700 2017-02-12  Bruno Haible  <bruno@clisp.org>
48702         times test: Avoid gcc warnings on Linux/x32.
48703         * tests/test-times.c (main): Really cast printf arguments from clock_t
48704         to 'long int'.
48706 2017-02-12  Paul Eggert  <eggert@cs.ucla.edu>
48708         glob: port better to emscripten
48709         Problem reported by Bruno Haible in:
48710         http://lists.gnu.org/r/bug-gnulib/2017-02/msg00031.html
48711         * lib/glob.c (glob): Don't assume HAVE_GETPWNAM_R || _LIBC.
48713 2017-02-11  Bruno Haible  <bruno@clisp.org>
48715         host-cpu-c-abi: Support for 64-bit AIX, 32-bit armhf on arm64, hppa64.
48716         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Define also HOST_CPU.
48717         For the x32 ABI on x86_64, set HOST_CPU_C_ABI to 'x86_64-x32' and define
48718         both __x86_64__ and __x86_64_x32__. For the ELFv2 ABI on powerpc64,
48719         define both __powerpc64__ and __powerpc64_elfv2__. Recognize 64-bit
48720         compilation on AIX. Recognize 32-bit compilation on arm64/Linux.
48721         Distinguish hppa64 from hppa.
48723 2017-02-10  Bruno Haible  <bruno@clisp.org>
48725         search: Don't assume that tsearch() exists if 'VISIT' is defined.
48726         * m4/search_h.m4 (gl_SEARCH_H): Determine HAVE_TYPE_VISIT.
48727         * modules/search (Makefile.am): Substitute HAVE_TYPE_VISIT.
48728         * lib/search.in.h (VISIT): Define if HAVE_TYPE_VISIT is 0.
48730 2017-02-09  Bruno Haible  <bruno@clisp.org>
48732         doc: Don't mention obsolete AC_LIBTOOL_WIN32_DLL macro.
48733         * doc/gnulib.texi (Libtool and Windows): Recommend
48734         LT_INIT([win32-dll]) instead of AC_LIBTOOL_WIN32_DLL.
48735         Reported by Reuben Thomas <rrt@sc3d.org>.
48737 2017-02-08  Paul Eggert  <eggert@cs.ucla.edu>
48739         stddef-tests: port to SIZE_MAX <= INT_MAX
48740         * tests/test-stddef.c: Include <limits.h>, for INT_MAX.
48741         Do not assume that INT_MAX < SIZE_MAX.
48743 2017-02-01  Bruno Haible  <bruno@clisp.org>
48745         lock tests: Fix link error.
48746         * modules/lock-tests (test_rwlock1_LDADD): Add @YIELD_LIB@.
48747         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
48749 2017-01-31  Bruno Haible  <bruno@clisp.org>
48751         lock: Fix link error (regression from 2017-01-05).
48752         * lib/glthread/lock.h [USE_POSIX_THREADS_WEAK]: Declare also
48753         pthread_rwlockattr_init, pthread_rwlockattr_setkind_np,
48754         pthread_rwlockattr_destroy weak.
48755         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
48757 2017-01-30  Paul Eggert  <eggert@cs.ucla.edu>
48759         Port to PGI 16.10 x86-64
48760         This patch fixes one real bug in gl_anylinked_list2.h, along with
48761         some minor glitches that are not bugs.  It does not silence PGI’s
48762         thousands of bogus warnings when compiling test-intprops.c.
48763         Fortunately, the warnings do not cause a failure.
48764         * lib/c-ctype.h (_C_CTYPE_LOWER_A_THRU_F_N, _C_CTYPE_LOWER_N):
48765         Rename parameter to avoid PGI warning about ‘#define f(n) 'n'’.
48766         My goodness, PGI goes back a long ways - this predates C89!
48767         * lib/gl_anylinked_list2.h (ASYNCSAFE): Fix bug caught by PGI.
48768         For example, ASYNCSAFE (const void *) should expand to
48769         ‘const void *volatile’, not to ‘volatile const void *’.
48770         * lib/spawn.in.h (POSIX_SPAWN_USEVFORK): Don't define if already defined.
48771         * lib/verify.h (verify) [!__GNUC__]:
48772         Use shorter albeit meaningless string to bypass silly compiler limits.
48773         * tests/infinity.h (Infinityf, Infinityd, Infinityl) [__PGI]:
48774         * tests/nan.h (NaNf, NaNd, NaNl):
48775         Use static functions to avoid misguided compiler diagnostics.
48776         Is there some reason we don’t use static functions on all platforms?
48778 2017-01-20  Paul Eggert  <eggert@cs.ucla.edu>
48780         parse-datetime: handle timezones reentrantly
48781         This API change was prompted by a report by Pádraig Brady in:
48782         https://bug.debian.org/851934#10
48783         To help fix the bug, make parse_datetime2 more reentrant.
48784         * NEWS: Document this incompatible change.
48785         * lib/parse-datetime.h, lib/parse-datetime.y (parse_datetime2):
48786         Add two arguments, the timezone and the timezone name.
48787         All callers changed.  If TZ="..." is specified, use it for
48788         calculating defaults.
48789         * lib/parse-datetime.y: Don't include xalloc.h or use xmalloc, as
48790         this code should be usable in a library.
48791         (mktime_ok, get_effective_timezone):
48792         Accept timezone arg too.  All callers changed.
48793         (get_tz): Remove.
48794         (get_effective_timezone): Check for failures.
48796 2017-01-20  Eric Blake  <eblake@redhat.com>
48798         localename: port to cygwin 2.6
48799         * lib/localename.c (gl_locale_name_thread_unsafe): Add clause for
48800         Cygwin.
48801         * modules/localename (Depends-on): Add extensions, since
48802         NL_LOCALE_NAME() is not visible without it.
48804 2017-01-17  Pádraig Brady  <P@draigBrady.com>
48806         parse-datetime: fix dependence on AC_PROG_SED
48807         * modules/parse-datetime: Use `sed` directly like all other modules.
48808         Reported by J William Piggott
48810 2017-01-16  Paul Eggert  <eggert@cs.ucla.edu>
48812         intprops: update doc URLs
48813         * doc/intprops.texi (Integer Range Overflow): Update URLs.
48815 2017-01-16  Bruno Haible  <bruno@clisp.org>
48817         host-cpu-c-abi: Add support for armhf, arm64, x32, s390x.
48818         * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Require gl_C_ASM. On x86_64
48819         systems, distinguish x86_64 and x32. On arm systems, distinguish arm,
48820         armhf, arm64, and no longer distinguish arm and armel. On s390x systems,
48821         distinguish s390 and s390x.
48822         * modules/host-cpu-c-abi (Files): Add m4/asm-underscore.m4.
48823         * NEWS: Mention the change regarding 'armel'.
48825 2017-01-15  Paul Eggert  <eggert@cs.ucla.edu>
48827         localeinfo: case_folded_counterparts and WEOF
48828         * NEWS: Document this.
48829         * lib/localeinfo.c (case_folded_counterparts):
48830         First arg is now wint_t, not wchar_t.  This generalizes the
48831         function to also work on WEOF, where it returns 0.
48833         dfa: port to gcc -fsanitize=undefined
48834         * lib/dfa.c (copy): Don’t pass NULL with size 0 to memcpy,
48835         as this runs afoul of gcc -fsanitize=undefined.
48837 2017-01-14  Paul Eggert  <eggert@cs.ucla.edu>
48839         strftime: %z is -00 if unknown
48840         * lib/strftime.c (DO_TZ_OFFSET): Omit arg 'negative'; it's now
48841         the caller's responsibility to set 'negative_number'.  All uses changed.
48842         (__strftime_internal): Put '-' before a zero UTC offset if the time
48843         zone abbreviation starts with "-", which is the recently-introduced
48844         tzdb convention for an unknown UTC offset that is arbitrarily set to 0.
48845         * tests/test-strftime.c: Test for this.
48847 2017-01-10  Paul Eggert  <eggert@cs.ucla.edu>
48849         dfa: port to older GCC
48850         Problem reported by Assaf Gordon in:
48851         http://lists.gnu.org/r/bug-gnulib/2017-01/msg00103.html
48852         * modules/c99: New module.  This merely attempts to use the latest
48853         C version, which should be enough to solve this particular problem.
48854         The idea is to document which Gnulib modules assume C99 or later.
48855         * modules/dfa (Depends-on): Add it.
48857 2017-01-10  Bruno Haible  <bruno@clisp.org>
48859         Update DEPENDENCIES.
48860         * DEPENDENCIES: List only https URLs. Update recommended version for
48861         autoconf, automake, gperf.
48863 2017-01-10  Jim Meyering  <meyering@fb.com>
48865         maint.mk: enforce spelling of "timestamp" (i.e., no space)
48866         * top/maint.mk (prohibit_undesirable_word_seq_RE_): Also
48867         disallow /\btime\s+stamps?\b/.  Prefer "timestamp".
48869 2017-01-10  Paul Eggert  <eggert@cs.ucla.edu>
48871         dfa: minor simplification with emptyset
48872         * lib/dfa.c (build_state): Simplify by using emptyset.
48874 2017-01-09  Paul Eggert  <eggert@cs.ucla.edu>
48876         dfa: shrink constraints from 4 bits to 3
48877         * lib/dfa.c (newline_constraint, letter_constraint)
48878         (other_constraint, prev_newline_dependent)
48879         (prev_letter_dependent, NO_CONSTRAINT, BEGLINE_CONSTRAINT)
48880         (ENDLINE_CONSTRAINT, BEGWORD_CONSTRAINT, ENDWORD_CONSTRAINT)
48881         (LIMWORD_CONSTRAINT, NOTLIMWORD_CONSTRAINT):
48882         Constraints need only 3 bits, not 4.  Using smaller integers
48883         shrinks the code a bit and makes grep a tad faster on x86-64.
48885         dfa: omit unnecessary ptrdiff_t check
48886         * lib/dfa.c (alloc_position_set): Do not worry about ptrdiff_t
48887         overflow, since xnmalloc does that now.
48889         dfa: omit unnecessary allocation
48890         * lib/dfa.c (dfaanalyze): Do not allocate follow set, since
48891         an all-zero follow set works just fine.
48893         dfa: omit unused local
48894         * lib/dfa.c (build_state): Fix up recent change.
48896         maint: remove stray .texi files
48897         Although these were superseded by other files like
48898         doc/posix-functions/ctime.texi, the old files were not removed.
48899         * doc/ctime.texi, doc/inet_ntoa.texi: Remove.
48901 2017-01-08  Paul Eggert  <eggert@cs.ucla.edu>
48903         getprogname: fix port to IRIX
48904         * lib/getprogname.c (getprogname) [__sgi]:
48905         Don't dump core if malloc returns NULL.
48907         dfa: fix reallocation bug when matching newlines
48908         Problem reported for sed by S. Gilles (Bug#25390).
48909         * lib/dfa.c (realloc_trans_if_necessary): Move earlier.
48910         (dfastate): Reallocate before moving any newline transition ...
48911         (build_state): ... instead of reallocating here, where it is too late.
48913 2017-01-07  Tim Rühsen  <tim.ruehsen@gmx.de>  (tiny change)
48915         Avoid -Wundef warning about undefined WINDOWS_SOCKETS.
48916         * lib/sockets.h: Test if WINDOWS_SOCKETS is defined.
48918 2017-01-07  Tim Rühsen  <tim.ruehsen@gmx.de>  (tiny change)
48920         Avoid -Wundef warning about undefined __USE_FILE_OFFSET64.
48921         * lib/glob-libc.h: Test if __USE_FILE_OFFSET64 is defined.
48923 2017-01-07  Bruno Haible  <bruno@clisp.org>
48925         stdioext: Port to Minix 3.2 and newer.
48926         * lib/stdio-impl.h: Treat __minix like the newest NetBSD.
48927         * lib/fseeko.c (fseeko): Likewise.
48928         Reported by Nelson Beebe via Paul Eggert.
48930 2017-01-06  Paul Eggert  <eggert@cs.ucla.edu>
48932         getprogname: port to IRIX
48933         * lib/getprogname.c (getprogname): Port to IRIX.
48934         Based on an idea by Bastien Roucariès at:
48935         http://lists.gnu.org/r/bug-gnulib/2010-12/msg00096.html
48936         via code from Bruno Haible at:
48937         https://lists.gnu.org/r/bug-gnulib/2010-12/msg00249.html
48939         localename-tests: port to NetBSD 7
48940         Problem reported by Nelson H. F. Beebe.
48941         * tests/test-localename.c:
48942         Test newlocale and uselocale only if both exist.
48944         glob, intprops, xalloc: work around Clang bug
48945         Work around LLVM bug 16404, which is still not fixed.
48946         https://llvm.org/bugs/show_bug.cgi?id=16404
48947         Problem reported by Nelson H. F. Beebe.
48948         * lib/glob.c, lib/intprops.h, lib/xalloc-oversized.h (__has_builtin):
48949         Remove.
48950         * lib/glob.c (size_add_wrapv):
48951         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW, _GL_HAS_BUILTIN_OVERFLOW_P):
48952         * lib/xalloc-oversized.h (xalloc_oversized):
48953         Do not use overflow builtins if Clang.
48955         dfa: fix 'return' typo
48956         Problem reported by Nelson H. F. Beebe.
48957         * lib/dfa.c (merge): Fix typo that Sun compilers rejected.
48959 2017-01-05  Pádraig Brady  <P@draigBrady.com>
48961         parse-datetime: fix generated paths for coverage files
48962         * modules/parse-datetime: Adjust the paths for parse-datetime.y
48963         within parse-datetime.c, so that gcc generates appropriate .gcno
48964         files, allowing lcov to proceed without error.  Previously it
48965         would error trying to find "lib/lib/parse-datetime.y".
48967 2017-01-05  Pádraig Brady  <P@draigBrady.com>
48969         maint.mk: support parallel execution of coverage
48970         * top/maint.mk (coverage): Run dependencies serially,
48971         thus supporting parallel processing of each one,
48972         particularly build-coverage, which builds and runs tests.
48974 2017-01-05  Bruno Haible  <bruno@clisp.org>
48976         lock tests: Prefer semaphore over mutex.
48977         * tests/test-lock.c (USE_SEMAPHORE): New constant.
48978         (struct atomic_int, init_atomic_int, get_atomic_int_value,
48979         set_atomic_int_value) [USE_SEMAPHORE]: Define using a POSIX semaphore.
48980         Suggested by Torvald Riegel <triegel@redhat.com>.
48982 2017-01-05  Bruno Haible  <bruno@clisp.org>
48984         lock: Provide guarantee to avoid writer starvation for rwlocks.
48985         The rationale is: 1) Read-preferring read-write locks are prone to
48986         writer starvation if the number of reader threads multiplied by the
48987         percentage of time they have the lock held is too high. 2) Write-
48988         preferring read-write locks are the only reliable way to avoid this.
48989         3) There have been reports of 'test-lock' hanging on glibc systems
48990         http://lists.gnu.org/r/bug-gnulib/2017-01/msg00009.html,
48991         and glibc indeed implements read-preferring rwlocks by default, see
48992         http://man7.org/linux/man-pages/man3/pthread_rwlockattr_setkind_np.3.html
48993         and https://sourceware.org/bugzilla/show_bug.cgi?id=13701 .
48994         * m4/pthread_rwlock_rdlock.m4: New file.
48995         * m4/lock.m4 (gl_LOCK): Invoke gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER.
48996         * lib/glthread/lock.h [USE_POSIX_THREADS]: Test
48997         HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER. Use a different implementation
48998         of rwlock initialization on glibc systems without
48999         HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER. Use a different implementation
49000         of rwlocks altogether on non-glibc systems without
49001         HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER.
49002         [USE_PTH_THREADS]: Use a different implementation of rwlocks altogether.
49003         * lib/glthread/lock.c [USE_POSIX_THREADS]
49004         (glthread_rwlock_init_for_glibc): New function.
49005         [USE_POSIX_THREADS] (glthread_rwlock_rdlock_multithreaded): Update
49006         comment.
49007         [USE_PTH_THREADS]: New implementation of rwlocks.
49008         [USE_WINDOWS_THREADS] (glthread_rwlock_rdlock_func): Prefer writers over
49009         readers.
49010         * modules/lock (Files): Add m4/pthread_rwlock_rdlock.m4.
49011         (Depends-on): Add 'extensions'.
49012         * tests/test-rwlock1.c: New file.
49013         * lock-tests (Files): Add it.
49014         (Depends-on): Add usleep.
49015         (Makefile.am): Add test-rwlock1 to the tests.
49017 2017-01-05  Bruno Haible  <bruno@clisp.org>
49019         thread: Fix pth port.
49020         * lib/glthread/thread.h (pth_init): Declare weak.
49021         (glthread_create, glthread_sigmask, glthread_join, gl_thread_self,
49022         gl_thread_exit): Make sure Pth is initialized before invoking any Pth
49023         function.
49025 2017-01-04  Assaf Gordon  <assafgordon@gmail.com>
49027         parse-datetime: fix debug message on lone year number
49028         Input dates such as
49029           date -d "Apr 11 22:59:00 2011"
49030         are parsed as date (Apr 11, with default year 2016), then time, then a
49031         number (2011). Based on the combination of previously seen tokens,
49032         'digits_to_date_time' determines 2011 to be a year value.
49033         This fixes the debug messages to correctly show the updated year.
49034         Before:
49035             $ date --debug -d 'Apr 11 22:59:00 2011'
49036             date: parsed date part: (Y-M-D) 2016-04-11
49037             date: parsed time part: 22:59:00
49038             date: parsed number part: today/this/now
49039         After:
49040             $ ./src/date --debug -d 'Apr 11 22:59:00 2011'
49041             date: parsed date part: (Y-M-D) 2016-04-11
49042             date: parsed time part: 22:59:00
49043             date: parsed number part: year: 2011
49044         * lib/parse-datetime.y (struct parser_control): Add 'year_seen',
49045         'debug_year_seen' member fields.
49046         (digits_to_date_time): Update 'year_seen' as needed.
49047         (debug_print_current_time): Inform about year updates.
49048         (parse_datetime2): Initialize year_seen,debug_year_seen member fields.
49050         parse-datetime: fix local timezone debug messages
49051         "Local timezones" are strings that affect only DST relative to the
49052         default timezone. The debug messages in parse-datetime.y printed
49053         wrong information when encountering local timezones.
49054         Examples:
49055         Here EET/EEST are time zones ('zone' token, with values +02:00/+03:00):
49056              TZ=Asia/Tokyo ./src/date --debug -d '2011-12-11 EET'
49057              TZ=Asia/Tokyo ./src/date --debug -d '2011-06-11 EEST'
49058         When the default timezone relates to the zone strings, EET/EEST are
49059         parsed as local timezones (tLOCAL_ZONE), and only change the DST
49060         value (0/1, respectively):
49061              TZ=Europe/Helsinki ./src/date --debug -d '2011-12-11 EET'
49062              TZ=Europe/Helsinki ./src/date --debug -d '2011-06-11 EEST'
49063         * lib/parse-datetime.y (debug_print_current_time): If local timezone
49064         was seen, inform about DST change, don't print actual timezone.
49065         (debug_strfdatetime): If local timezone was seen, use default timezone
49066         (and adjust as needed) instead of using incorrect timezone.
49067         (parse_datetime2): Use correct time-zone source string, and adjust
49068         default timezone as needed.
49070         parse-datetime: add debug warning about DST changes
49071         Incorrect date arithmetic due to daylight saving time (DST) are a
49072         common (false) bug report in coreutils.
49073         Detect two such cases and print a warning:
49074         1. year/month/day adjustments (performed on 'struct tm'),
49075            where 'mktime' returns a different isdst value.
49076         2. hour/minute/seconds/ns adjustments (performed on 'time_t'),
49077            where the result of 'localtime(3)' on the value will return a
49078            different isdst value.
49079         Note: DST changes could be harmless or unnoticeable.
49080         Examples (with 'TZ=America/New_York'):
49081         Unnoticeable: result is 2016-Dec-14
49082            $ date -d '2016-06-15 EDT + 6 months' +%b
49083            Dec
49084         Unnoticeable: result is 2016-Dec-15 11:00:00
49085            $ date -d '2016-06-15 12:00:00 EDT + 6 months' +%F
49086            2016-12-15
49087         This is unexpected:
49088            $ date -d '2016-06-01 EDT + 6 months' +%F
49089            2016-11-30
49090         The new debug warnings will show:
49091            $ ./src/date --debug -d '2016-06-01 EDT + 6 months' +%F
49092            ...
49093            date: warning: daylight saving time changed after date adjustment
49094            ...
49095         * lib/parse-datetime.y (parse_datetime2): Detect DST changes, and
49096         print an appropriate warning message.
49098         parse-datetime: add debug warning about date arithmetic
49099         Date arithmetic are done directly on the fields of 'struct tm',
49100         which can result in invalid dates. Normalization with 'mktime(3)'
49101         will then produce a different date - which might cause unexpected
49102         results.
49103         Examples:
49104           '2016-10-31 - 1 month' => 2016-09-31 normalized to 2016-10-01.
49105           '2016-02-29 + 1 year'  => 2017-02-29 normalized to 2017-03-01.
49106         Note that date normalization is not inherently wrong and not rejected,
49107         as it has legitimate uses:
49108           '2016-12-29 + 5 days' => 2016-12-34 noramlized to 2017-01-03.
49109         If the user asked to adjust months but 'mday' changed,
49110         or user asked to adjust years but 'month' changed - warn about it.
49111             $ ./src/date --debug -d '2016-10-31 - 1 month'
49112             ...
49113             date: warning: when adding relative months/years, \
49114                            it is recommended to specify the 15th of the month
49115             ...
49116             date: warning: month/year adjustment resulted in shifted dates:
49117             date:      adjusted Y M D: 2016 09 31
49118             date:    normalized Y M D: 2010 10 01
49119             ...
49120         * lib/parse-datetime.y (parse_datetime2): Detect such cases and print
49121         a warning message. Improve recommendation of when to use 15 of the
49122         month or noon for date arithmetic.
49124         parse-datetime: fix debug message of relative part after timezone
49125         Relative part (e.g '+8 days') after a timezone string was not
49126         reported (was only reported after a timezone number). Due to the
49127         parser's structure, timezone strings with numbers were handled
49128         separately.
49129         before:
49130              # Timezone number + relative part: OK
49131              $ ./src/date --debug +%F -d '2013-10-30 00:00:00 +00:00 -8 days'
49132              ...
49133              date: parsed relative part: -8 day(s)
49134              # Timezone string + relative part: missing
49135              $ ./src/date --debug +%F -d '2013-10-30 00:00:00 UTC -8 days'
49136              [ missing message ]
49137         After: messages are printed in both cases.
49138         * lib/parse-datetime.y ('zone' token): Call debug_print_relative_time.
49140         parse-datetime: fix incorrect debug message on lone number
49141         A lone number is an absolute value, not a relative time part.
49142         before:
49143            $ date --debug -d '20130101'
49144            date: parsed number part: today/this/now
49145         After:
49146            $ ./src/date --debug -d '20130101'
49147            date: parsed number part: (Y-M-D) 2013-01-01
49148         * lib/parse-datetime.y ('item'/'number' tokens): Call
49149         'debug_print_current_time' instead of 'debug_print_relative_time'.
49151 2017-01-02  Paul Eggert  <eggert@cs.ucla.edu>
49153         doc: modernize for C11 etc.
49154         * doc/gnulib-readme.texi (Portability guidelines): Modernize a bit
49155         for C11, MinGW, etc.  This responds to Paul Smith's question in:
49156         http://lists.gnu.org/r/bug-gnulib/2017-01/msg00014.html
49158         dfa: prefer functions to FETCH_WC macro
49159         * lib/dfa.c (FETCH_WC): Remove, replacing with ...
49160         (fetch_wc, bracket_fetch_wc): ... new functions.  These store the
49161         wint_t result into DFA->lex.wctok instead of to a separate arg.
49162         All callers changed.  Move more local decls closer to where
49163         they're used.
49165         dfa: narrow more local var scopes
49166         * lib/dfa.c: Move more local decls to be more local.
49168         dfa: remove duplicate assignment
49169         Problem reported by Bruno Haible in:
49170         http://lists.gnu.org/r/bug-gnulib/2017-01/msg00007.html
49171         * lib/dfa.c (parse_bracket_exp): Simplify.
49173 2017-01-01  Paul Eggert  <eggert@cs.ucla.edu>
49175         dfa: simplify constraint-dependency checking
49176         * lib/dfa.c (prev_newline_constraint, prev_letter_constraint)
49177         (prev_other_constraint): Remove.
49178         (prev_newline_dependent, prev_letter_dependent):
49179         Simplify, to avoid an unnecessary bitwise AND operation.
49181         dfa: prefer functions and constants to macros
49182         * lib/dfa.c: Prefer constants to macros where either will do.
49183         (streq, isasciidigit, newline_constraint)
49184         (letter_constraint, other_constraint, succeeds_in_context)
49185         (prev_newline_constraint, prev_letter_constraint)
49186         (prev_other_constraint, prev_newline_dependent)
49187         (prev_letter_dependent, accepting, accepts_in_context):
49188         Now static functions instead of function-like macros.
49189         Use lower-case names accordingly.  All uses changed.
49191         dfa: narrow more local var scopes
49192         * lib/dfa.c: Move some more local decls down to nearer where
49193         they're needed.
49195 2016-12-31  Jim Meyering  <meyering@fb.com>
49197         dfa: narrow the scope of many local variables
49198         * lib/dfa.c: Now that we are no longer constrained to c89, move
49199         declarations of many variables (often indices) "down" into the
49200         scope(s) where used or to the point of definition.  This is a
49201         no-semantic-change diff.
49203 2017-01-01  Paul Eggert  <eggert@cs.ucla.edu>
49205         version-etc: new year
49206         * build-aux/gendocs.sh (version):
49207         * doc/gendocs_template:
49208         * doc/gendocs_template_min:
49209         * doc/gnulib.texi:
49210         * lib/version-etc.c (COPYRIGHT_YEAR):
49211         Update copyright dates by hand in templates and the like.
49212         * all files: Run 'make update-copyright'.
49214 2016-12-31  Eric Blake  <eblake@redhat.com>
49216         do-release-commit-and-tag: avoid shell syntax error
49217         * build-aux/do-release-commit-and-tag (curr_br): $branch can
49218         contain spaces when rebasing.
49220         maint.mk: hoist gnulib_dir definition earlier
49221         * top/maint.mk (gnulib_dir): Move near top of file.
49223 2016-12-31  Jim Meyering  <meyering@fb.com>
49225         maint.mk: do not always evaluate intprops-related shell
49226         * top/maint.mk (_intprops_names): Change := to just "=" to avoid
49227         using gnulib_dir undefined (gnulib_dir is defined later in the
49228         file, which will be fixed separately), and besides, there is no
49229         need to incur the cost of this shell invocation for every single
49230         use of this .mk file.  Reported by Eric Blake in
49231         https://lists.gnu.org/r/bug-gnulib/2016-12/msg00137.html
49233 2016-12-30  Jim Meyering  <meyering@fb.com>
49235         maint.mk: improve sc_prohibit_intprops_without_use
49236         * top/maint.mk (_intprops_names): Don't hard-code the list of
49237         symbol names.  Instead, derive it on the fly.
49239 2016-12-30  Paul Eggert  <eggert@cs.ucla.edu>
49241         dfa: shorten sbit, success
49242         * lib/dfa.c (struct regex_syntax.sbit):
49243         (struct dfa.success): Use char, not int, for array elements, since
49244         they are all in the range 0..7.
49246         dfa: simplify multibyte_prop etc.
49247         This follows up on a change made when dfa.c was in grep, namely grep
49248         commit c797046c7c13c2647182b919a79a4c5b4ecf82b1
49249         dated 2015-08-12 07:35:03 -0700, which removed unused multibyte support.
49250         That earlier simplification allows for some more simplification
49251         and trimming down here.
49252         * lib/dfa.c (struct mb_char_classes): New member nchars_alloc.
49253         (struct lexer_state): New mamber brack.
49254         (struct dfa, addtok_mb): multibyte_prop elements are now char, not int,
49255         since they must be in the range 0..3 now.
49256         Remove members mbcsets, nmbcsets, mbcsets_alloc, since
49257         the brack member now supersedes them.
49258         (parse_bracket_exp): Update dfa->lex.brack instead of dfa->mbcsets.
49259         (addtok): Use dfa->lex.brack instead of dfa->mbcsets.
49260         (dfaparse): Remove unnecessary initializations of already-0 storage.
49261         (free_mbdata): Free d->lex.brack.chars instead of d->mbcsets.
49262         (dfassbuild): No need to clear sup->mbcsets.
49264         dfa: minor performance tweak
49265         * lib/dfa.c (setbit_wc): Test < 0, not == EOF.
49267         dfa: wrap charclass inside a struct
49268         On my platform (gcc Ubuntu 5.4.0-6ubuntu1~16.04.4 x86-64,
49269         en_US.utf8 locale) this makes 'grep -Fi -f list.txt list.txt >out'
49270         about 5% faster, where list.txt is generated by 'aspell dump
49271         master | head -n 100000 >list.txt'.  See Bug#22239.
49272         * lib/dfa.c (charclass): Wrap inside a struct.  All uses changed.
49273         (CHARCLASS_INIT, tstbit, setbit, clrbit, zeroset, fillset, notset)
49274         (equal, emptyset, charclass_index, setbit_wc, setbit_case_fold_c):
49275         Adjust to this, e.g., by using charclass * rather than charclass.
49276         All callers changed as needed.
49277         (copyset): Remove.  All uses changed to simple assignment.
49278         (parse_bracket_exp): Use zeroset instead of memset.
49280 2016-12-30  Jim Meyering  <meyering@fb.com>
49282         maint.mk: update list of intprops.h symbol names
49283         * top/maint.mk (_intprops_names): Regenerate the list of symbol names.
49284         This avoids a false failure of the sc_prohibit_intprops_without_use
49285         rule in grep.
49287 2016-12-29  Eric Blake  <eblake@redhat.com>
49289         getopt: fix parallel test failure
49290         * tests/test-getopt-posix.c (TEST_GETOPT_TMP_NAME): Set name.
49291         * tests/test-getopt-gnu.c (TEST_GETOPT_TMP_NAME): Likewise.
49292         * tests/test-getopt-main.h (main): Use different file names
49293         in case test-getopt-gnu and test-getopt-posix run in parallel.
49295 2016-12-29  Paul Eggert  <eggert@cs.ucla.edu>
49297         xalloc: x2nrealloc check for ptrdiff_t overflow
49298         * lib/xalloc.h (x2nrealloc): Check for ptrdiff_t overflow, too.
49299         * modules/xalloc, modules/xvasprintf (Depends-on): Add stdint.
49301 2016-12-24  Bruno Haible  <bruno@clisp.org>
49303         lock test: Fix performance problem on multi-core machines.
49304         * tests/test-lock.c (USE_VOLATILE): New macro.
49305         (struct atomic_int): New type.
49306         (init_atomic_int, get_atomic_int_value, set_atomic_int_value): New
49307         functions.
49308         (lock_checker_done, rwlock_checker_done, reclock_checker_done): Define
49309         as 'struct atomic_int'.
49310         (lock_checker_thread, test_lock, rwlock_checker_thread, test_rwlock,
49311         reclock_checker_thread, test_recursive_lock): Use the new functions.
49312         Reported by Eric Blake in
49313         https://www.redhat.com/archives/libvir-list/2012-March/msg00854.html
49314         and by Pádraig Brady in
49315         http://lists.gnu.org/r/bug-gnulib/2016-12/msg00117.html.
49317 2016-12-19  Bruno Haible  <bruno@clisp.org>
49319         vma-iter: Fix endless loop on 64-bit Windows.
49320         * lib/vma-iter.c (vma_iterate): On Windows, use 'uintptr_t' instead of
49321         'unsigned long'.
49323 2016-12-19  Bruno Haible  <bruno@clisp.org>
49325         stdint: Fix WINT_MAX to match the gnulib provided wint_t on minw.
49326         * m4/wint_t.m4 (gt_TYPE_WINT_T): Define GNULIB_OVERRIDES_WINT_T here.
49327         * m4/stdint.m4 (gl_STDINT_H): Don't define GNULIB_OVERRIDES_WINT_T.
49328         Invoke gt_TYPE_WINT_T instead.
49329         (gl_STDINT_TYPE_PROPERTIES): Test GNULIB_OVERRIDES_WINT_T.
49330         * modules/stdint (Files): Add m4/wint_t.m4.
49331         * modules/wchar (Makefile.am): Substitute GNULIB_OVERRIDES_WINT_T.
49332         * modules/wctype-h (Makefile.am): Likewise.
49333         * lib/wchar.in.h (wint_t): Override if GNULIB_OVERRIDES_WINT_T is set,
49334         not only on MSVC.
49335         * lib/wctype.in.h (wint_t): Likewise.
49337 2016-12-19  Paul Eggert  <eggert@cs.ucla.edu>
49339         getopt-posix-tests: fix Makefile typo
49340         * modules/getopt-posix-tests (test_getopt_posix_LDADD):
49341         Fix typo: the last ‘_’ was missing in the name.
49342         I suspect that the typo explains this build failure:
49343         https://buildfarm.opencsw.org/buildbot/builders/ggrep-solaris10-sparc/builds/39
49344         although I can’t reproduce the problem on Solaris 10 sparc.
49346 2016-12-18  Paul Eggert  <eggert@cs.ucla.edu>
49348         dfa: improve worst-case 'replace' performance
49349         See my note in Bug#22357#71.
49350         * lib/dfa.c (insert, delete): Rework to avoid duplicate test.
49351         (merge_constrained): New function, which is like
49352         the old 'merge' function, except with a new argument C2.
49353         Simplify the body by avoiding the need for different sections
49354         of code depending on whether one input is exhausted.
49355         (merge): Use the new function.
49356         (delete): Return the constraint of the deleted position,
49357         not the entire position.  Caller changed.
49358         (replace): Change from O(N*(N + log N)) to O(N log N) algorithm.
49360 2016-12-18  Norihiro Tanaka  <noritnk@kcn.ne.jp>
49362         dfa: performance improvement for removal of epsilon closure
49363         See Bug#22357#32.
49364         * lib/dfa.c (delete): Use binary search to find deleted index.
49365         (replace): New function.  It replaces a position with the followed set.
49366         (epsclosure): Replace it with a new algorithm.  Update caller.
49368 2016-12-18  Bruno Haible  <bruno@clisp.org>
49370         Split tests for getopt-posix and getopt-gnu.
49371         * tests/test-getopt-posix.c: New file.
49372         * tests/test-getopt-gnu.c: New file, with code from test-getopt.c.
49373         * tests/test-getopt-main.h: Renamed from tests/test-getopt.c. Remove
49374         stuff moved to test-getopt-gnu.c. Test TEST_GETOPT_GNU instead of
49375         GNULIB_TEST_GETOPT_GNU.
49376         * modules/getopt-posix-tests (Files): Add test-getopt-posix.c,
49377         test-getopt-main.h. Remove test-getopt.c, test-getopt_long.h.
49378         (Makefile.am): Test test-getopt-posix instead of test-getopt.
49379         * modules/getopt-gnu-tests: New file.
49380         * modules/getopt-gnu (configure.ac): Don't define GNULIB_TEST_GETOPT_GNU.
49382 2016-12-18  Bruno Haible  <bruno@clisp.org>
49384         posix-modules: Add options for specific platforms.
49385         * posix-modules (func_usage): Document options --for-mingw, --for-msvc.
49386         (exclude_for_mingw, exclude_for_msvc, exclude): New variables.
49387         Invoke func_tmpdir. Filter out the excludes.
49389 2016-12-18  Bruno Haible  <bruno@clisp.org>
49391         getopt: Fix link error for users of getopt() in <unistd.h>.
49392         * lib/getopt.in.h (getopt etc.): Do the macro definitions also when
49393         __need_getopt is defined. Undefine all macros before defining them.
49394         * modules/getopt (Include): Clarify that including <unistd.h> is also
49395         OK.
49396         * tests/test-getopt.c: Add comment.
49398 2016-12-17  Bruno Haible  <bruno@clisp.org>
49400         getaddrinfo tests: Avoid compilation error on MSVC.
49401         * tests/test-getaddrinfo.c: Don't check the prototypes of freeaddrinfo,
49402         getaddrinfo on native Windows.
49404 2016-12-17  Bruno Haible  <bruno@clisp.org>
49406         getlogin, getlogin_r: Fix link errors on MSVC.
49407         * m4/getlogin.m4 (gl_LIB_GETLOGIN): New macro.
49408         * modules/getlogin (configure.ac): Require gl_LIB_GETLOGIN.
49409         (Link): New section.
49410         * modules/getlogin_r (Files): Add m4/getlogin.m4.
49411         (configure.ac): Require gl_LIB_GETLOGIN.
49412         (Link): New section.
49413         * NEWS: Mention the new link requirements.
49414         * modules/getlogin-tests (test_getlogin_LDADD): New variable.
49415         * modules/getlogin_r-tests (test_getlogin_r_LDADD): New variable.
49417 2016-12-17  Bruno Haible  <bruno@clisp.org>
49419         Un-deprecate the 'progname' module.
49420         * NEWS: Describe the appropriate use-cases of 'progname' versus
49421         'getprogname'. Based on discussion summary at
49422         http://lists.gnu.org/r/bug-gnulib/2016-10/msg00105.html
49424 2016-12-17  Bruno Haible  <bruno@clisp.org>
49426         Reorganize NEWS a bit.
49427         * NEWS: Move some not so important changes away from section
49428         "Important Notes".
49430 2016-12-17  Bruno Haible  <bruno@clisp.org>
49432         tanhf: Avoid redefinition error on MSVC.
49433         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_TANHF.
49434         * m4/tanhf.m4 (gl_FUNC_TANHF): Set REPLACE_TANHF to 1 if the function
49435         may be defined as an inline function.
49436         * modules/math (Makefile.am): Substitute REPLACE_TANHF.
49437         * lib/math.in.h (tanhf): Override if REPLACE_TANHF is 1.
49439 2016-12-17  Bruno Haible  <bruno@clisp.org>
49441         tanf: Avoid redefinition error on MSVC.
49442         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_TANF.
49443         * m4/tanf.m4 (gl_FUNC_TANF): Set REPLACE_TANF to 1 if the function
49444         may be defined as an inline function.
49445         * modules/math (Makefile.am): Substitute REPLACE_TANF.
49446         * lib/math.in.h (tanf): Override if REPLACE_TANF is 1.
49448 2016-12-17  Bruno Haible  <bruno@clisp.org>
49450         sqrtf: Avoid redefinition error on MSVC.
49451         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_SQRTF.
49452         * m4/sqrtf.m4 (gl_FUNC_SQRTF): Set REPLACE_SQRTF to 1 if the function
49453         may be defined as an inline function.
49454         * modules/math (Makefile.am): Substitute REPLACE_SQRTF.
49455         * lib/math.in.h (sqrtf): Override if REPLACE_SQRTF is 1.
49457 2016-12-17  Bruno Haible  <bruno@clisp.org>
49459         sinhf: Avoid redefinition error on MSVC.
49460         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_SINHF.
49461         * m4/sinhf.m4 (gl_FUNC_SINHF): Set REPLACE_SINHF to 1 if the function
49462         may be defined as an inline function.
49463         * modules/math (Makefile.am): Substitute REPLACE_SINHF.
49464         * lib/math.in.h (sinhf): Override if REPLACE_SINHF is 1.
49466 2016-12-17  Bruno Haible  <bruno@clisp.org>
49468         sinf: Avoid redefinition error on MSVC.
49469         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_SINF.
49470         * m4/sinf.m4 (gl_FUNC_SINF): Set REPLACE_SINF to 1 if the function
49471         may be defined as an inline function.
49472         * modules/math (Makefile.am): Substitute REPLACE_SINF.
49473         * lib/math.in.h (sinf): Override if REPLACE_SINF is 1.
49475 2016-12-17  Bruno Haible  <bruno@clisp.org>
49477         logf: Avoid redefinition error on MSVC.
49478         * m4/logf.m4 (gl_FUNC_LOGF): Set REPLACE_LOGF to 1 if the function
49479         may be defined as an inline function.
49481 2016-12-17  Bruno Haible  <bruno@clisp.org>
49483         log10l: Avoid redefinition error on MSVC.
49484         * m4/log10l.m4 (gl_FUNC_LOG10L): Set REPLACE_LOG10L to 1 if the function
49485         may be defined as an inline function.
49487 2016-12-17  Bruno Haible  <bruno@clisp.org>
49489         log10f: Avoid redefinition error on MSVC.
49490         * m4/log10f.m4 (gl_FUNC_LOG10F): Set REPLACE_LOG10F to 1 if the function
49491         may be defined as an inline function.
49493 2016-12-17  Bruno Haible  <bruno@clisp.org>
49495         hypotl: Avoid redefinition error on MSVC.
49496         * m4/hypotl.m4 (gl_FUNC_HYPOTL): Set REPLACE_HYPOTL to 1 if the function
49497         may be defined as an inline function.
49499 2016-12-17  Bruno Haible  <bruno@clisp.org>
49501         hypotf: Avoid redefinition error on MSVC.
49502         * m4/hypotf.m4 (gl_FUNC_HYPOTF): Set REPLACE_HYPOTF to 1 if the function
49503         may be defined as an inline function.
49505 2016-12-17  Bruno Haible  <bruno@clisp.org>
49507         fmodl: Avoid redefinition error on MSVC.
49508         * m4/fmodl.m4 (gl_FUNC_FMODL): Set REPLACE_FMODL to 1 if the function
49509         may be defined as an inline function.
49511 2016-12-17  Bruno Haible  <bruno@clisp.org>
49513         fmodf: Avoid redefinition error on MSVC.
49514         * m4/fmodf.m4 (gl_FUNC_FMODF): Set REPLACE_FMODF to 1 if the function
49515         may be defined as an inline function.
49517 2016-12-17  Bruno Haible  <bruno@clisp.org>
49519         expf: Avoid redefinition error on MSVC.
49520         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_EXPF.
49521         * m4/expf.m4 (gl_FUNC_EXPF): Set REPLACE_EXPF to 1 if the function
49522         may be defined as an inline function.
49523         * modules/math (Makefile.am): Substitute REPLACE_EXPF.
49524         * lib/math.in.h (expf): Override if REPLACE_EXPF is 1.
49526 2016-12-17  Bruno Haible  <bruno@clisp.org>
49528         coshf: Avoid redefinition error on MSVC.
49529         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_COSHF.
49530         * m4/coshf.m4 (gl_FUNC_COSHF): Set REPLACE_COSHF to 1 if the function
49531         may be defined as an inline function.
49532         * modules/math (Makefile.am): Substitute REPLACE_COSHF.
49533         * lib/math.in.h (coshf): Override if REPLACE_COSHF is 1.
49535 2016-12-17  Bruno Haible  <bruno@clisp.org>
49537         cosf: Avoid redefinition error on MSVC.
49538         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_COSF.
49539         * m4/cosf.m4 (gl_FUNC_COSF): Set REPLACE_COSF to 1 if the function
49540         may be defined as an inline function.
49541         * modules/math (Makefile.am): Substitute REPLACE_COSF.
49542         * lib/math.in.h (cosf): Override if REPLACE_COSF is 1.
49544 2016-12-17  Bruno Haible  <bruno@clisp.org>
49546         atan2f: Avoid redefinition error on MSVC.
49547         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_ATAN2F.
49548         * m4/atan2f.m4 (gl_FUNC_ATAN2F): Set REPLACE_ATAN2F to 1 if the function
49549         may be defined as an inline function.
49550         * modules/math (Makefile.am): Substitute REPLACE_ATAN2F.
49551         * lib/math.in.h (atan2f): Override if REPLACE_ATAN2F is 1.
49553 2016-12-17  Bruno Haible  <bruno@clisp.org>
49555         atanf: Avoid redefinition error on MSVC.
49556         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_ATANF.
49557         * m4/atanf.m4 (gl_FUNC_ATANF): Set REPLACE_ATANF to 1 if the function
49558         may be defined as an inline function.
49559         * modules/math (Makefile.am): Substitute REPLACE_ATANF.
49560         * lib/math.in.h (atanf): Override if REPLACE_ATANF is 1.
49562 2016-12-17  Bruno Haible  <bruno@clisp.org>
49564         asinf: Avoid redefinition error on MSVC.
49565         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_ASINF.
49566         * m4/asinf.m4 (gl_FUNC_ASINF): Set REPLACE_ASINF to 1 if the function
49567         may be defined as an inline function.
49568         * modules/math (Makefile.am): Substitute REPLACE_ASINF.
49569         * lib/math.in.h (asinf): Override if REPLACE_ASINF is 1.
49571 2016-12-17  Bruno Haible  <bruno@clisp.org>
49573         acosf: Avoid redefinition error on MSVC.
49574         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_ACOSF.
49575         * m4/acosf.m4 (gl_FUNC_ACOSF): Set REPLACE_ACOSF to 1 if the function
49576         may be defined as an inline function.
49577         * modules/math (Makefile.am): Substitute REPLACE_ACOSF.
49578         * lib/math.in.h (acosf): Override if REPLACE_ACOSF is 1.
49580 2016-12-17  Bruno Haible  <bruno@clisp.org>
49582         Avoid redefinition errors on MSVC.
49583         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): Set REPLACE_SNPRINTF to 1 if
49584         the function may be defined as an inline function.
49585         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): Set REPLACE_VSNPRINTF to 1 if
49586         the function may be defined as an inline function.
49588 2016-12-17  Bruno Haible  <bruno@clisp.org>
49590         Avoid redefinition errors on MSVC.
49591         * lib/stdio.in.h: Include <stdlib.h> and <io.h> when necessary.
49592         * lib/unistd.in.h: Include <stdio.h> when necessary.
49594 2016-12-17  Bruno Haible  <bruno@clisp.org>
49596         stdint: Fix WINT_MAX to match the gnulib provided wint_t on MSVC.
49597         * m4/stdint.m4 (gl_STDINT_H): Define GNULIB_OVERRIDES_WINT_T.
49598         * modules/stdint (Makefile.am): Substitute GNULIB_OVERRIDES_WINT_T.
49599         * lib/stdint.in.h [GNULIB_OVERRIDES_WINT_T]: Redefine WINT_MIN and
49600         WINT_MAX.
49602 2016-12-17  Bruno Haible  <bruno@clisp.org>
49604         Avoid autoconf warning.
49605         * modules/frexpl (configure.ac): Require, not invoke, gl_FUNC_FREXPL.
49606         * modules/frexp (configure.ac): Require, not invoke, gl_FUNC_FREXP.
49608 2016-12-17  Bruno Haible  <bruno@clisp.org>
49610         fpending: Revert workaround against Emacs bug.
49611         * lib/stdio-impl.h [__MINGW32__]: Revert conditional.
49612         The Emacs bug is fixed by Eli Zaretskii in
49613         http://lists.gnu.org/r/emacs-devel/2016-12/msg00715.html
49615 2016-12-17  Bruno Haible  <bruno@clisp.org>
49617         getlogin_r tests: Port to mingw.
49618         * tests/test-getlogin_r.c: Don't include <pwd.h> on native Windows. Fixes
49619         regression introduced on 2014-05-19.
49621 2016-12-17  Bruno Haible  <bruno@clisp.org>
49623         getlogin: Port to newer mingw.
49624         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize HAVE_DECL_GETLOGIN.
49625         * m4/getlogin.m4 (gl_FUNC_GETLOGIN): Set HAVE_DECL_GETLOGIN.
49626         * modules/unistd (Makefile.am): Substitute HAVE_DECL_GETLOGIN, not
49627         HAVE_GETLOGIN.
49628         * lib/unistd.in.h (getlogin): Test HAVE_DECL_GETLOGIN, not
49629         HAVE_GETLOGIN.
49630         * doc/posix-functions/getlogin.texi: Mention the issue.
49631         * tests/test-getlogin.c: Don't include <pwd.h> on native Windows. Fixes
49632         regression introduced on 2014-05-14.
49634 2016-12-16  Paul Eggert  <eggert@cs.ucla.edu>
49636         builtin-expect: improve port to IBM XL C
49637         Problem reported for z/OS by Daniel Richard G. in:
49638         http://lists.gnu.org/r/bug-gnulib/2016-12/msg00079.html
49639         * m4/builtin-expect.m4 (gl___BUILTIN_EXPECT):
49640         Test for <builtins.h> directly.
49642         builtin-expect: port to IBM XL C
49643         Problem reported for z/OS by Daniel Richard G. in:
49644         http://lists.gnu.org/r/bug-gnulib/2016-12/msg00074.html
49645         * m4/builtin-expect.m4 (gl___BUILTIN_EXPECT):
49646         Also allow __builtin_expect defined via a standard include file.
49648         regex: fix dependency
49649         Problem reported by Bruno Haible in:
49650         http://lists.gnu.org/r/bug-gnulib/2016-12/msg00073.html
49651         * modules/regex: Depend on builtin-expect.
49653         builtin-expect: new module
49654         Fix fnmatch to use it.
49655         Problem reported for z/OS by Daniel Richard G.
49656         * lib/fnmatch.c (__builtin_expect):
49657         * lib/glob.c (__builtin_expect):
49658         * lib/grantpt.c (__builtin_expect) [!_LIBC]:
49659         * lib/memmem.c (__builtin_expect) [!_LIBC]:
49660         * lib/scandir.c (__builtin_expect):
49661         * lib/strstr.c (__builtin_expect) [!_LIBC]:
49662         Remove macro; config.h now does this.
49663         * lib/gl_anytreehash_list1.h (add_to_bucket):
49664         * lib/regex_internal.h (BE):
49665         Assume __builtin_expect.
49666         * m4/builtin-expect.m4, modules/builtin-expect: New files.
49667         * modules/avltreehash-list, modules/fnmatch, modules/glob:
49668         * modules/grantpt, modules/memmem-simple, modules/rbtreehash-list:
49669         * modules/scandir, modules/strstr-simple:
49670         Depend on builtin-expect.
49672 2016-12-15  Bruno Haible  <bruno@clisp.org>
49674         init.sh: Add possibility to not delete temporary files.
49675         * tests/init.sh (remove_tmp_): If the environment variable KEEP is set
49676         to yes, don't erase the temporary directory.
49678 2016-12-16  Paul Eggert  <eggert@cs.ucla.edu>
49680         regex: fix integer-overflow bug in never-used code
49681         Problem reported by Clément Pit–Claudel in:
49682         http://lists.gnu.org/r/emacs-devel/2016-12/msg00654.html
49683         * lib/regex_internal.h: Include intprops.h.
49684         * lib/regexec.c (re_search_2_stub): Use it to avoid undefined
49685         behavior on integer overflow.
49686         * modules/regex (Depends-on): Add intprops.
49688         fpending: fix port to MinGW on Emacs
49689         * lib/stdio-impl.h [__MINGW32__]: Do not include errno.h.
49690         Problem reported by Eli Zaretskii in:
49691         http://lists.gnu.org/r/emacs-devel/2016-12/msg00642.html
49692         Is Plan 9 still a valid porting target, anyway?
49694 2016-12-15  Paul Eggert  <eggert@cs.ucla.edu>
49696         safe-alloc: use xalloc-oversized
49697         * lib/safe-alloc.c: Include xalloc-oversized.h.
49698         (safe_alloc_oversized): Remove.  All uses changed to xalloc_oversized.
49699         * modules/safe-alloc (Depends-on): Add xalloc-oversized.
49701         xalloc: do not exceed PTRDIFF_MAX
49702         * lib/xmalloc.c (xcalloc) [HAVE_GNU_CALLOC]: Do not omit
49703         xalloc_oversized check, since objects larger than PTRDIFF_MAX
49704         bytes have pointer-subtraction problems.
49706         malloca: do not exceed PTRDIFF_MAX
49707         * lib/malloca.h: Include xalloc-oversized.
49708         (nmalloca): Use xalloc_oversized instead of rolling our own.
49709         * modules/malloca (Depends-on):
49710         * modules/relocatable-prog-wrapper (Depends-on):
49711         Add xalloc-oversized.
49713         quotearg: pacify GCC better
49714         * modules/quotearg (Depends-on): Add minmax, stdint.
49715         * lib/quotearg.c: Include minmax.h, stdint.h.
49716         (nslots): Now int, as there seems little point to going to extra
49717         work merely to support the INT_MAX slot, which nobody ever uses.
49718         (quotearg_n_options): Redo size-overflow checks to pacify GCC
49719         and to catch (mostly-theoretical) ptrdiff_t problems too.
49720         This can be done via one comparison.
49722 2016-12-14  Paul Eggert  <eggert@cs.ucla.edu>
49724         xalloc-oversized: check for PTRDIFF_MAX too
49725         This avoids undefined behavior when subtracting pointers to
49726         objects containing more than PTRDIFF_MAX bytes.
49727         * lib/xalloc-oversized.h (__xalloc_oversized, xalloc_oversized):
49728         Also return 1 if the result would exceed PTRDIFF_MAX>
49729         * modules/xalloc-oversized (Depends-on):
49730         Add stdint.
49732         dfa: fix glitches in previous commit
49733         Sorry, I don't know how I managed to commit the wrong version.
49734         * lib/dfa.c (MIN): Move up.
49735         (xpalloc): Now static.
49737         dfa: fix some unlikely integer overflows
49738         I found these while reviewing the recent Coverity-related fix.
49739         This patch changes part of dfa.c to prefer ptrdiff_t instead of
49740         size_t for object counts.  Using ptrdiff_t is the style typically
49741         used in Emacs; although it wastes a sign bit as sizes can never be
49742         negative, it makes -fsanitize=undefined more likely to catch
49743         integer overflows in index calculation, and nowadays the upside is
49744         typically more important than the downside.  Although perhaps the
49745         rest of dfa.c should be changed to prefer ptrdiff_t as well (much
49746         of dfa.c already does, since it uses state_num which is signed),
49747         that is a bigger change and is not needed to fix the bugs I found.
49748         * lib/dfa.c: Include stdint.h and intprops.h.
49749         (TOKEN_MAX): New macro.
49750         (position_set, struct mb_char_classes, struct dfa, maybe_realloc)
49751         (charclass_index, parse_bracket_exp, addtok, insert, merge)
49752         (realloc_trans_if_necessary, free_mbdata):
49753         Use ptrdiff_t instead of size_t for object counts related to xpalloc.
49754         This is safe because xpalloc checks that the sizes do not exceed
49755         either SIZE_MAX or PTRDIFF_MAX.
49756         (xpalloc): New function, mostly taken from Emacs.
49757         (maybe_realloc, copy, realloc_trans_if_necessary): Use it.
49758         (maybe_realloc): Add NITEMS_MAX to signature.  All callers changed.
49759         (charclass_index): Check for integer overflow in computing
49760         charclass index; it must not exceed TOKEN_MAX - CSET, as CSET is
49761         added to it later.
49762         (alloc_position_set): Check for integer overflow.  On typical
49763         platforms this check has zero overhead, since the constant
49764         expression is false.
49765         (realloc_trans_if_necessary):
49766         Remove assertion, which I hope Coverity no longer needs.
49768         * modules/dfa (Depends-on): Add intprops, stdint.
49770 2016-12-12  Jim Meyering  <meyering@fb.com>
49772         dfa: add an assertion to avoid coverity false positive
49773         * lib/dfa.c (realloc_trans_if_necessary): Otherwise, coverity
49774         warned that "newalloc1 - 2" could overflow.
49776 2016-12-13   Arnold D. Robbins  <arnold@skeeve.com>
49778         dfa: remove DFA_CASE_FOLD flag in favor of RE_ICASE
49779         * dfa.h (DFA_CASE_FOLD): Remove.
49780         * dfa.c (dfasyntax): Set dfa->syntax.case_fold based on RE_ICASE.
49782 2016-12-13  John W. Eaton  <gnu@jweaton.org>
49784         link: fix test to declare use of rename()
49785         * m4/link.m4 (gl_FUNC_LINK): Include <stdio.h> needed with
49786         -Werror=implicit-function-declaration
49788 2016-12-12  Bruno Haible  <bruno@clisp.org>
49790         fpending: Port to native Windows with MSVC.
49791         * lib/fpending.c: Include stdio-impl.h.
49792         (__fpending): Include all known implementations. Err out if it's not
49793         ported.
49794         * m4/fpending.m4 (gl_PREREQ_FPENDING): Remove macro.
49795         * modules/fpending (Files): Add lib/stdio-impl.h.
49796         (configure.ac): Don't invoke gl_PREREQ_FPENDING.
49798 2016-12-12  Bruno Haible  <bruno@clisp.org>
49800         stdioext: Port to native Windows with MSVC.
49801         * lib/stdio-impl.h (WINDOWS_OPAQUE_FILE): New macro.
49802         (struct _gl_real_FILE): New type.
49803         (fp_, _IOREAD, _IOWRT, _IORW, _IOEOF, _IOERR): New macros, for native
49804         Windows.
49805         * lib/fbufmode.c (fbufmode): Add code for native Windows.
49806         * lib/fflush.c (clear_ungetc_buffer): Treat native Windows like the
49807         other SystemV derived implementations.
49808         * lib/fpurge.c (fpurge): Likewise.
49809         * lib/freadable.c (freadable): Likewise.
49810         * lib/freadahead.c (freadahead): Likewise.
49811         * lib/freading.c (freading): Likewise.
49812         * lib/freadptr.c (freadptr): Likewise.
49813         * lib/freadseek.c (freadptrinc): Likewise.
49814         * lib/fseeko.c (fseeko): Likewise.
49815         * lib/fseterr.c (fseterr): Likewise.
49816         * lib/fwritable.c (fwritable): Likewise.
49817         * lib/fwriting.c (fwriting): Likewise.
49818         Reported by Gisle Vanem <gvanem@yahoo.no>.
49820 2016-12-11  Jim Meyering  <meyering@fb.com>
49822         non-recursive-gnulib-prefix-hack.m4: remove leading "(" in case stmt
49823         * m4/non-recursive-gnulib-prefix-hack.m4: That leading "(" happens
49824         to work with most shells, but not with the one provided by many
49825         Solaris 10 systems, so running configure with such a /bin/sh evokes
49826         e.g., "./configure: syntax error at line 33602: `(' unexpected".
49827         Reported by Assaf Gordon in
49828         https://lists.gnu.org/r/sed-devel/2016-12/msg00002.html
49830 2016-12-10  Bruno Haible  <bruno@clisp.org>
49832         threadlib: Optimize out runtime test on Solaris >= 10.
49833         * m4/threadlib.m4 (gl_THREADLIB_BODY): Don't set
49834         PTHREAD_IN_USE_DETECTION_HARD if configuring on Solaris 10 or newer.
49835         Reported by Peter Felecan at <https://savannah.gnu.org/bugs/?32087>.
49837 2016-12-10  Bruno Haible  <bruno@clisp.org>
49839         stdint: Update doc about Solaris 9.
49840         * doc/posix-headers/stdint.texi: Add info about Solaris 9.
49842 2016-12-09  Bruno Haible  <bruno@clisp.org>
49844         c-ctype tests: Fix link error on Solaris 9.
49845         * modules/c-ctype-tests (Depends-on): Add 'isblank'.
49846         Reported at <https://savannah.gnu.org/bugs/?46827>.
49848 2016-12-09  Paul Eggert  <eggert@cs.ucla.edu>
49850         dfa: fix performance bug that recomputes trans
49851         * lib/dfa.c (build_state): Fix performance bug introduced in Nov
49852         25 on-demand changes.  The bug caused build_state to reset all
49853         d->trans elements to -2 even when d->trans was already non-null.
49854         Use C99 style decls after statements in this function.
49856         same-inode: port to MinGW
49857         Here st_ino is always 0, so change the definition of SAME_INODE so
49858         that 1 means the two files are the same, 0 with st_ino != 0 means
49859         they differ, and 0 with st_ino == 0 means we don’t know.  Problem
49860         reported by Bruno Haible (Bug#25146).
49861         * doc/posix-headers/sys_stat.texi (sys/stat.h): Update.
49862         * lib/same-inode.h (SAME_INODE): Return 0 on MinGW.
49864 2016-12-04  Bruno Haible  <bruno@clisp.org>
49866         javacomp-script: Support Java 7 and 8.
49867         * m4/javacomp.m4 (gt_JAVACOMP): Accept source-version 1.7, 1.8 and
49868         target-version 1.7, 1.8.
49870 2016-12-02  Daiki Ueno  <ueno@gnu.org>
49872         * gnulib-tool (func_import): Relax the regex used for "LGPLv3+ or
49873         GPLv2" rewriting.
49875 2016-12-02  Nikos Mavrogiannopoulos  <nmav@gnutls.org>
49877         * gnulib-tool (func_import): Adhere to the license guideline when
49878         rewriting the license text to "LGPLv3+ or GPLv2":
49879         https://www.gnu.org/prep/maintain/maintain.html#Licensing-of-GNU-Packages
49881 2016-12-02  Bruno Haible  <bruno@clisp.org>
49883         localcharset: Avoid theoretical buffer overrun.
49884         * lib/localcharset.c (locale_charset) [WINDOWS_NATIVE]: Don't use the
49885         return value from setlocale if it would lead to a buffer overrun.
49887 2016-12-01  Bruno Haible  <bruno@clisp.org>
49889         Relicense some modules under LGPLv2+.
49890         Kevin Cernekee's approval is in
49891         http://lists.gnu.org/r/bug-gnulib/2016-11/msg00090.html.
49892         * modules/fseterr (License): Change to LGPLv2+.
49893         * modules/mbchar (License): Likewise.
49894         * modules/mbiter (License): Likewise.
49895         * modules/mbsnlen (License): Likewise.
49896         * modules/wcwidth (License): Likewise.
49898 2016-12-01  KO Myung-Hun  <komh78@gmail.com>
49900         scandir: Fix _D_ALLOC_NAMLEN() on OS/2 kLIBC
49901         * lib/scandir.c (_D_ALLOC_NAMLEN): Consider the fields after d_name on
49902         OS/2 kLIBC.
49904 2016-12-01  KO Myung-Hun  <komh78@gmail.com>
49906         alphasort, scandir: Port to OS/2 kLIBC
49907         * lib/alphasort.c (alphasort): Implement according to OS/2 kLIBC
49908         declaration.
49909         * lib/scandir.c (scandir): Add declaration for OS/2 kLIBC.
49911 2016-12-01  KO Myung-Hun  <komh78@gmail.com>
49913         relocatable: Fix that /@unixroot prefix is not working on OS/2 kLIBC
49914         * lib/relocatable.c (relocate): Do not touch pathname if it is started
49915         with '/@unixroot'.
49917 2016-12-01  KO Myung-Hun  <komh78@gmail.com>
49919         sys_socket: typedef sa_family_t correctly on OS/2 kLIBC
49920         * lib/sys_socket.in.h (sa_family_t): Typedef to unsigned char on
49921         OS/2 kLIBC unless TCPV40HDRS is defined.
49923 2016-11-29  Jim Meyering  <meyering@fb.com>
49925         dfa: avoid new infinite loop
49926         This would infloop: echo cx | LC_ALL=C grep -E 'c\b[x ]'
49927         * lib/dfa.c (dfastate): When constructing a new state table, we could
49928         initially declare that we had found a match, and later find that
49929         constraints eliminate that possibility, yet continue to use the
49930         now stale "matched" indicator.  That would lead to an infinite loop.
49931         The solution is to update "matched" when necessary.
49932         Introduced by commit v0.1-983-g403adf1.
49934 2016-11-27  Norihiro Tanaka  <noritnk@kcn.ne.jp>
49936         dfa: avoid match middle in multibyte character
49937         * lib/dfa.c (transit_state): If fails in matching single byte characters
49938         on a state including period expression in non-UTF8 multibyte locales,
49939         skip trailing bytes.
49940         (dfa_supported): Revert previous change.
49942 2016-11-27  Jim Meyering  <meyering@fb.com>
49944         dfa: avoid false match in non-UTF8 multibyte locales
49945         * lib/dfa.c (dfa_supported): Treat any non-UTF8 multibyte locale
49946         as "not supported" so that callers will resort to using regex-based
49947         matcher.  This will surely hurt performance, but correctness trumps
49948         performance here, and the affected locales are less and less relevant,
49949         these days.  See grep's bug report https://bugs.gnu.org/24975.
49951 2016-11-27  Mike Frysinger  <vapier@gentoo.org>
49953         ptsname_r: leverage AC_HEADER_MAJOR to provide major()
49954         * lib/ptsname_r.c: Include the appropriate headers.
49955         [__sun]: Delete sys/sysmacros.h include.
49956         [_AIX || __osf__]: Likewise.
49957         * m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): Depend on AC_HEADER_MAJOR.
49959 2016-11-27  Pádraig Brady  <P@draigBrady.com>
49961         md4,md5,sha*: allow _STRING_INLINE_unaligned enable unaligned operation
49962         * lib/md4.c (md4_process_bytes): The existing define is made internal
49963         in recent versions of glibc, so also use this new public define.
49964         * lib/md5.c (md5_process_bytes): Likewise.
49965         * lib/sha1.c (sha1_process_bytes): Likewise.
49966         * lib/sha256.c (sha256_process_bytes): Likewise.
49967         * lib/sha512.c (sha512_process_bytes): Likewise.
49969 2016-11-27  Pádraig Brady  <P@draigBrady.com>
49971         maint: use a more standard return from mbrtowc test
49972         * m4/mbrtowc.m4 (gl_MBRTOWC_C_LOCALE): Don't return 1
49973         from the test program as this often indicates an
49974         unhandled case in the test program.
49975         (gl_MBRTOWC_INCOMPLETE_STATE): Likewise.
49976         (gl_MBRTOWC_SANITYCHECK): Likewise.
49977         (gl_MBRTOWC_NULL_ARG2): Likewise.
49978         (gl_MBRTOWC_NUL_RETVAL): Likewise.
49980 2016-11-26  Paul Eggert  <eggert@cs.ucla.edu>
49982         freopen: work around glibc bug with closed fd
49983         Work around glibc bug#15589, where freopen mishandles the case
49984         where stdin etc. are already closed.
49985         * doc/posix-functions/freopen.texi (freopen): Document the bug.
49986         * lib/freopen.c (_GL_ALREADY_INCLUDING_STDIO_H): Define this
49987         instead of __need_FILE, as the latter does not work with glibc.
49988         Include <fcntl.h>, for open flags.
49989         (rpl_freopen): Work around glibc bug.
49990         * m4/freopen.m4 (gl_FUNC_FREOPEN): Check for bug.
49991         * modules/freopen (Depends-on): Add fcntl-h.
49992         * tests/test-freopen.c (main): Test for bug.
49994 2016-11-25  Paul Eggert  <eggert@cs.ucla.edu>
49996         fnmatch: fix typo introduced on 2016-08-17
49997         This fixes the port to non-GCC compilers that lack __builtin_expect.
49998         * lib/fnmatch.c (__builtin_expect): Change A&&B to !A||B.
50000         dfa: simplify with new function fillset
50001         * lib/dfa.c (fillset): New function.
50002         Use it for clarity when applicable.
50004         dfa: fix glitches with on-demand states
50005         Also, adjust commentary to better match new code.
50006         Some of these glitches predate the recent change.
50007         * lib/dfa.c (dfaanalyze): Clear trcount here, so that it counts
50008         only non-initial states.
50009         (dfastate): Rename locals to better match new roles.
50010         Move them into nested scopes if this is easy.
50011         Omit unnecessary calls to zeroset.
50012         Simplify test for whether to throw in the positions of state 0.
50013         Omit C99-ism (decl after statement) since Gawk still wants C89.
50014         (build_state): Omit unnecessary test and assignment.
50015         Fix some confusion that counted transition tables inaccurately
50016         and could cause a memory leak.
50017         (dfaexec_main): Redo to make it clearer to the compiler that
50018         -1 and -2 are the only negative state numbers here.
50020 2016-11-25  Norihiro Tanaka  <noritnk@kcn.ne.jp>
50022         dfa: addition of new state on demand
50023         * src/dfa.c (dfastate): Add argument UC, the current input character.
50024         Fill only a group including the character in transition table.
50025         (realloc_trans_if_necessary): Add the dummy state which means that a
50026         transition table is assigned but the next state is not assigned.
50027         (build_state): Return the next state.  All callers updated.
50028         (transit_state_singlebyte): If we get the dummy state,
50029         fill the transition table.
50030         (dfaexec_main): Handle the dummy state.
50031         (free_mbdata, dfafree): Consider the dummy state.
50033 2016-11-24  Daiki Ueno  <ueno@gnu.org>
50035         srclist: sync with released gettext
50036         * config/srclist.txt: Set "release" option to the files under
50037         $GETTEXT.
50039 2016-11-24  Daiki Ueno  <ueno@gnu.org>
50041         srclist: add "release" option
50042         * config/srclist.txt: Change the format so that the first column
50043         of each line points to the top-level directory of the source
50044         archive.
50045         * config/srclist-update: Accept "release" option that checks files
50046         from the most recently tagged revision in the source archive.
50048 2016-11-21  Bruno Haible  <bruno@clisp.org>
50050         snippet/c++defs: Simplify _GL_CXXALIAS_* macros.
50051         * build-aux/snippet/c++defs.h [__cplusplus && GNULIB_NAMESPACE]
50052         (_GL_CXXALIAS_RPL_1, _GL_CXXALIAS_RPL_CAST_1,
50053         _GL_CXXALIAS_SYS, _GL_CXXALIAS_SYS_CAST, _GL_CXXALIAS_SYS_CAST2):
50054         Inline and remove member function 'rpl ()' of the wrapper struct.
50056 2016-11-20  Paul Eggert  <eggert@cs.ucla.edu>
50058         dfa: fix logic typo
50059         Problem reported by Stephane Chazelas (Bug#24973).
50060         * lib/dfa.c (using_simple_locale): Fix typo that caused some
50061         non-simple locales like fr_FR to be treated as simple.
50063 2016-11-20  Jim Meyering  <meyering@fb.com>
50065         fix test driver leaks: exclude, malloc, realloc
50066         * tests/test-exclude.c (main): Fix trivial leak.
50067         * tests/test-malloc-gnu.c (main): Likewise.
50068         * tests/test-realloc-gnu.c (main): Likewise.
50069         With these changes, grep's tests are now leak free.
50070         I.e., running them with ASAN elicits no failure:
50071           make CFLAGS='-O0 -ggdb3' AM_CFLAGS=-fsanitize=address \
50072             AM_LDFLAGS='-fsanitize=address -static-libasan' check
50074 2016-11-11  Bruno Haible  <bruno@clisp.org>
50076         libunistring: Relicense under dual "LGPLv3+ or GPLv2" license.
50077         * modules/libunistring: (License): Change from LGPL to
50078         "LGPLv3+ or GPLv2".
50079         * modules/libunistring-optional: Likewise.
50080         * modules/unicase/*: Likewise.
50081         * modules/uniconv/*: Likewise.
50082         * modules/unictype/*: Likewise.
50083         * modules/unigbrk/*: Likewise.
50084         * modules/unilbrk/*: Likewise.
50085         * modules/uniname/*: Likewise.
50086         * modules/uninorm/*: Likewise.
50087         * modules/unistdio/*: Likewise.
50088         * modules/unistr/*: Likewise.
50089         * modules/uniwbrk/*: Likewise.
50090         * modules/uniwidth/*: Likewise.
50092 2016-11-12  Bruno Haible  <bruno@clisp.org>
50094         Relicense some modules under LGPLv2+.
50095         Paul Eggert's approval is in
50096         http://lists.gnu.org/r/bug-gnulib/2016-11/msg00037.html.
50097         Eric Blake's approval is in
50098         http://lists.gnu.org/r/bug-gnulib/2016-11/msg00042.html.
50099         Ludovic Courtès's approval is in
50100         http://lists.gnu.org/r/bug-gnulib/2016-11/msg00038.html.
50101         * modules/isnand-nolibm (License): Change to LGPLv2+.
50102         * modules/isnanf-nolibm (License): Likewise.
50103         * modules/isnanl-nolibm (License): Likewise.
50105 2016-11-19  Bruno Haible  <bruno@clisp.org>
50107         Relicense some modules under LGPLv2+.
50108         lib/float+.h is already under LGPLv2+ since 2007-07-13, per
50109         modules/vasnprintf.
50110         Paolo Bonzini's approval for lib/frexp.c and lib/frexpl.c is in
50111         http://lists.gnu.org/r/bug-gnulib/2016-11/msg00074.html.
50112         All other significant changes to the files in lib/ of these modules
50113         are from me.
50114         * modules/memcmp2 (License): Change to LGPLv2+.
50115         * modules/amemxfrm (License): Likewise.
50116         * modules/fpieee (License): Likewise.
50117         * modules/fpucw (License): Likewise.
50118         * modules/frexp-nolibm (License): Likewise.
50119         * modules/frexpl-nolibm (License): Likewise.
50120         * modules/printf-frexp (License): Likewise.
50121         * modules/printf-frexpl (License): Likewise.
50122         * modules/printf-safe (License): Likewise.
50123         * modules/signbit (License): Likewise.
50125 2016-11-17  Bruno Haible  <bruno@clisp.org>
50127         Enable Unicode decoder safety unconditionally.
50128         * lib/unistr.in.h (u32_mbtouc_unsafe): Assume CONFIG_UNICODE_SAFETY.
50129         * lib/unistr/u8-mblen.c (u8_mblen): Likewise.
50130         * lib/unistr/u8-mbtouc-unsafe.c (u8_mbtouc_unsafe): Likewise.
50131         * lib/unistr/u8-mbtouc-unsafe-aux.c (u8_mbtouc_unsafe_aux): Likewise.
50132         * lib/unistr/u8-prev.c (u8_prev): Likewise.
50133         * lib/unistr/u8-strmblen.c (u8_strmblen): Likewise.
50134         * lib/unistr/u8-strmbtouc.c (u8_strmbtouc): Likewise.
50135         * lib/unistr/u16-mblen.c (u16_mblen): Likewise.
50136         * lib/unistr/u16-mbtouc-unsafe.c (u16_mbtouc_unsafe): Likewise.
50137         * lib/unistr/u16-mbtouc-unsafe-aux.c (u16_mbtouc_unsafe_aux): Likewise.
50138         * lib/unistr/u16-prev.c (u16_prev): Likewise.
50139         * lib/unistr/u16-strmblen.c (u16_strmblen): Likewise.
50140         * lib/unistr/u16-strmbtouc.c (u16_strmbtouc): Likewise.
50141         * lib/unistr/u32-mblen.c (u32_mblen): Likewise.
50142         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Likewise.
50143         * lib/unistr/u32-prev.c (u32_prev): Likewise.
50144         * lib/unistr/u32-next.c (u32_next): Likewise.
50145         * lib/unistr/u32-strmblen.c (u32_strmblen): Likewise.
50146         * lib/unistr/u32-strmbtouc.c (u32_strmbtouc): Likewise.
50147         * lib/uniconv/u8-conv-to-enc.c (u8_conv_to_encoding): Likewise.
50148         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
50149         * tests/unistr/test-u16-prev.c (check_invalid): Enable the
50150         CONFIG_UNICODE_SAFETY tests unconditionally.
50151         * tests/unistr/test-u32-mblen.c (main): Likewise.
50152         * tests/unistr/test-u32-mbtouc.h (test_function): Likewise.
50153         * tests/unistr/test-u32-prev.c (check_invalid): Likewise.
50154         * tests/unistr/test-u32-next.c (main): Likewise.
50155         * tests/unistr/test-u32-strmblen.c (main): Likewise.
50156         * tests/unistr/test-u32-strmbtouc.c (main): Likewise.
50157         * tests/unistr/test-u32-mbtouc.c (FULL_SAFETY): Remove macro.
50158         * lib/unistr/u8-check.c (u8_check): Remove old dead code.
50159         * lib/unistr/u8-mbtouc.c (u8_mbtouc): Likewise.
50160         * lib/unistr/u8-mbtouc-aux.c (u8_mbtouc_aux): Likewise.
50161         * lib/unistr/u8-mbtoucr.c (u8_mbtoucr): Likewise.
50162         * lib/unistr/u8-uctomb.c (u8_uctomb): Likewise.
50163         * lib/unistr/u8-uctomb-aux.c (u8_uctomb_aux): Likewise.
50164         * lib/unistr/u16-check.c (u16_check): Update comment.
50165         * NEWS: Mention the changes that callers should be aware of.
50167 2016-11-19  Bruno Haible  <bruno@clisp.org>
50169         relocatable-prog-wrapper: Fix breakage on Cygwin.
50170         * modules/relocatable-prog-wrapper (Files): Add lib/stat.c, lib/lstat.c.
50171         (Depends-on): Remove intprops.
50172         * lib/relocwrapper.c: Update dependency tree.
50173         (strerror): Undefine.
50174         * build-aux/install-reloc (func_create_wrapper): Do not compile
50175         strerror.c and strerror-override.c. Erase stat.o and lstat.o.
50177 2016-11-19  Bruno Haible  <bruno@clisp.org>
50179         strerror: Make it compile in C++ mode.
50180         * lib/strerror.c (strerror): Ignore the return value of memcpy().
50182 2016-11-15  Pedro Alves  <palves@redhat.com>
50184         sys_time: add gnulib::timeval for C++
50185         * lib/sys_time.in.h [__cplusplus && defined GNULIB_NAMESPACE]:
50186         Define "timeval" in the GNULIB_NAMESPACE namespace, and #undef any
50187         timeval macro.
50189 2016-11-14  Pedro Alves  <palves@redhat.com>
50191         snippet/c++defs: fix real-floating arg functions in C++ mode
50192         Also, define isfinite, isinf, isnan, signbit in the gnulib
50193         namespace instead of in the global namespace.
50194         * build-aux/snippet/c++defs.h (_GL_BEGIN_NAMESPACE)
50195         (_GL_END_NAMESPACE): New.
50196         * lib/math.in.h (_GL_MATH_CXX_REAL_FLOATING_DECL_2): Use them.
50197         (isfinite, isinf, isnan, signbit) [__cplusplus &&
50198         GNULIB_NAMESPACE]: Define them in the GNULIB_NAMESPACE namespace
50199         instead of in the global namespace.
50200         * tests/test-math-c++.cc: Check that the isfinite, isinf, isnan,
50201         signbit overloads exist in the GNULIB_NAMESPACE namespace, instead
50202         of in the global namespace.
50204 2016-11-13  Jim Meyering  <meyering@fb.com>
50206         strftime: don't use __THROW
50207         Each use of __THROW would provoke this from gcc-7-to-be:
50209           lib/strftime.c:371:1: warning: '__leaf__' attribute has no effect \
50210             on unit local functions [-Wattributes]
50211           static int iso_week_days (int, int) __THROW;
50212           ^~~~~~
50213         * lib/strftime.c (__THROW): Don't define.
50214         Remove each use of __THROW.
50215         * lib/strftime.c (memcpy_lowcase, memcpy_uppcase): Remove __THROW.
50216         (tm_diff, iso_week_days, __strftime_internal): Likewise.
50218 2016-11-14  Paul Eggert  <eggert@union>
50220         obstack: port to gcc -fcheck-pointer-bounds
50221         Problem found by 'make check' failure on bleeding-edge coreutils
50222         on an MPX-enabled CPU (Intel Core i3-7100U) running GCC (Ubuntu
50223         6.2.0-5ubuntu12), configured via "./configure
50224         --enable-gcc-warnings CFLAGS='-mmpx -fcheck-pointer-bounds -g3
50225         -O2' LDFLAGS='-static-libmpx -static-libmpxwrappers'".
50226         * lib/obstack.h (__FLEXIBLE_ARRAY_MEMBER):
50227         New macro, copied from fts_.h.
50228         (struct _obstack_chunk.contents): Use it.
50230 2016-11-14  Eric Blake  <eblake@redhat.com>
50232         strerror_r-posix: Another fix, for HAVE_DECL_STRERROR_R on mingw.
50233         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R, gl_FUNC_STRERROR_R_WORKS):
50234         Avoid _ONCE variants, which may supply a conflicting AC_DEFINE().
50236 2016-11-14  Pádraig Brady  <P@draigBrady.com>
50238         strptime: fix compile error in recent change
50239         * lib/strptime.c (__strptime_internal): Fix ported code.
50241 2016-11-11  Bruno Haible  <bruno@clisp.org>
50243         gnulib-tool: Support for the dual "LGPLv3+ or GPLv2" license.
50244         * gnulib-tool (--lgpl): Accept value 3orGPLv2.
50245         (func_import): Extend determination of license_incompatibilities.
50246         (func_create_testdir): Extend table of license compatibility. Handle
50247         also the licenses GPLv3+, GPL, LGPLv3+.
50249 2016-11-12  Paul Eggert  <eggert@cs.ucla.edu>
50251         strftime: tune %q
50252         * lib/strftime.c (__strftime_internal): Assume tp->tm_mon is in range.
50254         Merge strftime.c changes from glibc
50255         This incorporates:
50256         2007-10-16 [BZ #5184] Add tzset_called argument
50257         2008-06-13 [BZ #6612] pass reference to tzset_called around
50258         2009-10-30 Implement Burmese language locale for Myanmar
50259         2010-01-09 Add support for XPG7 testing
50260         2015-09-26 [BZ #18985] out of range data to strftime() causes a segfault
50261         2015-10-20 Convert miscellaneous function definitions to prototype style
50262         * lib/strftime.c: Copy glibc license, since gnulib-tool rewrites
50263         it anyway and this lessens the difference between gnulib and glibc.
50264         (USE_IN_EXTENDED_LOCALE_MODEL) [_LIBC]: Define.
50265         (__THROW): Define if standard headers do not.
50266         (LOCALE_PARAM): Rename from LOCALE_PARAM_PROTO.  All uses changed.
50267         (memcpy_locase, memcpy_uppcase, tm_diff, __strftime_internal):
50268         Declare with __THROW.
50269         (__strftime_internal): Rename from strftime_case_. Add arg for
50270         whether tzset is called.  All uses changed.  Call tzset at most
50271         once.  Allow %OC, for Burmese.
50272         (a_wkday, f_wkday, a_month, f_month) [_NL_CURRENT]:
50273         Don't assume values are in range.
50275 2016-11-12  Eric Blake  <eblake@redhat.com>
50277         strerror_r-posix: Fix override of AC_FUNC_STRERROR_R
50278         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): New override.
50279         (gl_FUNC_STRERROR_R): Don't reuse AC_DEFINE() with a potentially
50280         different value.
50282 2006-11-12  Pedro Alves  <palves@redhat.com>
50284         Fix gnulib C++ namespace support and std::frexp
50285         * lib/math.in.h (frexp): Use _GL_CXXALIASWARN1 instead of
50286         _GL_CXXALIASWARN.
50288 2006-11-12  Pedro Alves  <palves@redhat.com>
50290         GNULIB_NAMESPACE::func need not pull in rpl_func
50291         * build-aux/snippet/c++defs.h [__cplusplus && GNULIB_NAMESPACE]
50292         (_GL_CXXALIAS_RPL_1, _GL_CXXALIAS_RPL_CAST_1, _GL_CXXALIAS_SYS)
50293         (_GL_CXXALIAS_SYS_CAST, _GL_CXXALIAS_SYS_CAST2): Define a wrapper
50294         struct instead of a function pointer.
50296 2016-11-09  Frediano Ziglio  <fziglio@redhat.com>
50298         manywarnings: fix -Wno-missing-field-initializers detection
50299         * m4/manywarnings.m4: Fix -Wno-missing-field-initializers detection
50300         to be independent of -Wunused-variable.  I.E. ensure the latter
50301         warning doesn't occur so that detection of the former is accurate.
50303 2016-11-05  Pádraig Brady  <pbrady@fb.com>
50305         strftime,strptime: support %q to represent the quarter
50306         * lib/strftime.c (strftime_case_): Add %q case.
50307         * lib/strptime.c (__strptime_internal): Likewise.
50308         * tests/test-strftime.c (quarter_test): A new test case.
50310 2016-11-03  Eric Blake  <eblake@redhat.com>
50312         bootstrap: Fix get_version() for AIX 5.3
50313         * build-aux/bootstrap (get_version): Factor out sed script, since
50314         indented comments choke AIX 5.3 sed.
50315         Reported-by: Michael Felt <aixtools@gmail.com>
50317 2016-11-03  Paul Eggert  <eggert@cs.ucla.edu>
50319         intprops: port to older XL C
50320         Problem reported by Alexander Samoilov in:
50321         http://lists.gnu.org/r/bug-gnulib/2016-10/msg00166.html
50322         http://savannah.nongnu.org/bugs/?49448
50323         * lib/intprops.h (_GL_HAVE___TYPEOF__) [__IBM__TYPEOF__]:
50324         Define to 1 only for XL C 12.1 or later, since this bug
50325         occurs in XL C for AIX 6.0 but not in 12.1.
50327 2016-11-02  Pádraig Brady  <P@draigBrady.com>
50329         backupfile: initialize default suffix within the implementation
50330         * lib/backupfile.c (find_backup_file_name): Initialize the
50331         global variable here, to simplify usage, and to only call
50332         getenv() when needed.
50334 2016-11-01  Paul Eggert  <eggert@cs.ucla.edu>
50336         futimens: remove FIXME for old Linux kernels
50337         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Belatedy do a "simplify
50338         this in 2012" FIXME, like that for utimensat.
50340         utimensat: remove FIXME for old Linux kernels
50341         * lib/utimensat.c (rpl_utimensat): Update FIXME comment.
50342         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Belatedy do a "simplify
50343         this in 2012" FIXME, by assuming the file system bug is absent
50344         unless demonstrated to be present.  We no longer need to worry
50345         about Linux kernel 2.6.32 when building with newer kernels.
50347 2016-10-16  Bruno Haible  <bruno@clisp.org>
50349         qsort_r: Fix macrology for platforms that lack the function.
50350         * m4/stdlib_h.m4 (gl_STDLIB_H): Check for qsort_r.
50351         (gl_STDLIB_H_DEFAULTS): Initialize HAVE_QSORT_R.
50352         * modules/stdlib (Makefile.am): Substitute HAVE_QSORT_R.
50353         * lib/stdlib.in.h (qsort_r): Provide declaration if the function does
50354         not exist.
50355         * m4/qsort_r.m4 (gl_FUNC_QSORT_R): Use AC_CHECK_FUNCS to test whether
50356         the function exists.
50357         * modules/qsort_r: Add comments.
50359 2016-10-26  Paul Eggert  <eggert@cs.ucla.edu>
50361         sys_types: fix Texinfo typos
50362         * doc/glibc-functions/gnu_dev_major.texi:
50363         * doc/glibc-functions/gnu_dev_makedev.texi:
50364         * doc/glibc-functions/gnu_dev_minor.texi: Fix typos.
50366 2016-10-26  John David Anglin  <dave.anglin@bell.net>
50368         getprogname: port to HP-UX
50369         See Bug#24805.
50370         * lib/getprogname.c (getprogname) [__hpux]: Port.
50371         * tests/test-getprogname.c (STREQ) [__hpux]:
50372         Special-case for HP-UX limitations on program name length.
50374 2016-10-20  Bruno Haible  <bruno@clisp.org>
50376         Update doc about target platforms.
50377         * doc/gnulib-intro.texi (Target Platforms): Update list.
50379 2016-10-15  Bruno Haible  <bruno@clisp.org>
50381         opendir, readdir, closedir: Relicense under LGPLv2+.
50382         * modules/opendir (License): Change to LGPLv2+.
50383         * modules/readdir (License): Likewise.
50384         * modules/closedir (License): Likewise.
50386 2016-10-16  Bruno Haible  <bruno@clisp.org>
50388         Fix conflict between strerror_r-posix module and AC_FUNC_STRERROR_R.
50389         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Override the values set by the
50390         AC_FUNC_STRERROR_R macro. Define HAVE_DECL_STRERROR_R_ORIG.
50391         * lib/strerror_r.c: Use HAVE_DECL_STRERROR_R_ORIG instead of
50392         HAVE_DECL_STRERROR_R.
50394 2016-10-16  Bruno Haible  <bruno@clisp.org>
50396         Make the 'argp' module work without the 'error' module.
50397         * m4/argp.m4 (gl_ARGP): Require AC_FUNC_STRERROR_R.
50399 2016-10-25  Paul Eggert  <eggert@cs.ucla.edu>
50401         diffseq: restore TOO_EXPENSIVE heuristic
50402         * lib/diffseq.h: Problem with diffutils reported by Andreas Schwab
50403         (Bug#24715).  The simplest solution is to restore the
50404         TOO_EXPENSIVE heuristic that I added to GNU diff in 1993, while
50405         using a higher threshold to avoid Bug#16848 on smaller files.
50406         * lib/diffseq.h (struct context): Restore member too_expensive.
50407         (struct partition): Restore members lo_minimal, hi_minimal.
50408         (diag, compareseq): Restore arg find_minimal.  All uses changed.
50409         (diag): Restore the TOO_EXPENSIVE heuristic that I added back in
50410         1993 to make 'diff' run faster (but not as well) on large inputs,
50411         but use a threshold of 4096 instead of the old 256.
50412         * lib/fstrcmp.c (strcmp_bounded):
50413         * lib/git-merge-changelog.c (compute_differences):
50414         Adjust to diffseq.h changes.
50416 2016-10-22  Bruno Haible  <bruno@clisp.org>
50418         iconv: Avoid compilation error when bootstrapping GNU libiconv.
50419         * m4/iconv.m4 (AM_ICONV): When the system does not have an iconv()
50420         declaration yet, define ICONV_CONST to empty.
50422 2016-10-15  Bruno Haible  <bruno@clisp.org>
50424         Avoid gnulib-tool warnings about the dependencies of 'parse-datetime'.
50425         * gnulib-tool (func_get_license): Special-case the 'parse-datetime'
50426         module.
50428 2016-10-16  Bruno Haible  <bruno@clisp.org>
50430         system-quote tests: Avoid compiler warning on AIX.
50431         * tests/test-system-quote-child.c (fopen): Redefine like the system's
50432         <stdio.h> does.
50434 2016-10-16  Bruno Haible  <bruno@clisp.org>
50436         Fix some "gcc -Wall" warnings.
50437         * tests/test-ffsl.c (main): Use variable x, not i.
50438         * tests/test-posix_spawn3.c (parent_main): Consider the return value of
50439         freopen.
50440         * tests/test-sethostname1.c (main): Explicitly ignore the return value
50441         of sethostname.
50443 2016-10-16  Bruno Haible  <bruno@clisp.org>
50445         gnulib-tool: Make --create-testdir on all modules work again.
50446         * gnulib-tool (func_create_testdir): Don't include the
50447         non-recursive-gnulib-prefix-hack module.
50449 2016-10-21  Daiki Ueno  <ueno@gnu.org>
50451         libunistring: change the maintainer to 'all'
50452         * modules/gen-uni-tables, modules/libunistring:
50453         * modules/ucs4-utf16, modules/ucs4-utf8, modules/unicodeio:
50454         * modules/unitypes, modules/utf16-ucs4, modules/utf16-ucs4-unsafe:
50455         * modules/utf8-ucs4, modules/utf8-ucs4-unsafe:
50456         * modules/unicase/*, modules/uniconv/*, modules/unictype/*:
50457         * modules/unilbrk/*, modules/uniname/*, modules/uninorm/*:
50458         * modules/unistdio/*, modules/unistr/*, modules/uniwbrk/*:
50459         * modules/uniwidth/*: Change the maintainer to 'all'.
50461 2016-10-16  Bruno Haible  <bruno@clisp.org>
50463         Simplify "configure: checking ..." messages.
50464         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use AC_MSG_CHECKING instead of
50465         AC_MSG_NOTICE.
50466         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Likewise.
50468 2016-10-20  Paul Eggert  <eggert@cs.ucla.edu>
50470         quotearg-tests: pacify gcc -Wall
50471         Problem reported by Bruno Haible in:
50472         http://lists.gnu.org/r/bug-gnulib/2016-10/msg00066.html
50473         * tests/test-quotearg-simple.c (use_quote_double_quotes): Move here ...
50474         * tests/test-quotearg.h: ... from here.
50476 2016-10-20  Pádraig Brady  <P@draigBrady.com>
50478         canonicalize-lgpl: fix for missing SIZE_MAX on older systems
50479         * lib/canonicalize-lgpl.c [SIZE_MAX]: Define if needed.
50480         Needed on Centos <= 4.
50482 2016-10-20  Jim Meyering  <meyering@fb.com>
50484         printf.m4: fix a bug in detecting printf %j support
50485         * m4/printf.m4 (gl_PRINTF_SIZES_C99): Fail any system for which
50486         uintmax_t is defined in neither stdint.h nor inttypes.h.
50487         Before, this macro might have mistakenly set
50488         gl_cv_func_printf_sizes_c99=yes on such a system.
50489         Spotted by Zev Weiss.
50491 2016-10-19  Paul Eggert  <eggert@cs.ucla.edu>
50493         sched: substitute HAVE_SYS_CDEFS_H too
50494         Problem reported by Tom G. Christensen in:
50495         http://lists.gnu.org/r/bug-gnulib/2016-10/msg00084.html
50496         * m4/sched_h.m4 (gl_SCHED_H): Set and substitute HAVE_SYS_CDEFS_H.
50497         * modules/sched (Depends-on): Substitute HAVE_SYS_CDEFS_H.
50499 2016-10-19  Pádraig Brady  <P@draigBrady.com>
50501         quotearg: never write beyond the returned length
50502         * lib/quotearg.c (quotearg_buffer_restyled): Switch to a read-only
50503         scan of the string when we initially encounter a single quote when
50504         shell quoting, so that if we then switch to a more concise quoting method
50505         we will not have written beyond that returned length.
50506         This is significant for sh-quote, which has separate routines
50507         to determine the length and do the actual quoting.
50508         * tests/test-quotearg.h: Reinstate the buffer bounds checking
50509         now that we never write more than the returned length.
50511 2016-10-18  Bruno Haible  <bruno@clisp.org>
50513         getprogname tests: Avoid failure in packages that use libtool.
50514         * tests/test-getprogname.c (main): Strip "lt-" prefix.
50515         Based on a patch by Jim Meyering.
50517 2016-10-16  Bruno Haible  <bruno@clisp.org>
50519         getprogname: Fix test failure on Cygwin. Comments.
50520         * lib/getprogname.h: Add comments.
50521         * lib/getprogname.c: Add comments. Fix #elif indentation.
50522         * tests/test-getprogname.c (main): On Cygwin, expect a result without
50523         ".exe" suffix.
50525 2016-10-16  Bruno Haible  <bruno@clisp.org>
50527         Make sure the libunistring detection rejects older versions with a
50528         known bug.
50529         * modules/unistr/u8-strtok (configure.ac): Bump required version.
50530         * modules/unistr/u16-strtok (configure.ac): Likewise.
50531         * modules/unistr/u32-strtok (configure.ac): Likewise.
50533 2016-10-18  Bruno Haible  <bruno@clisp.org>
50535         sh-quote, system-quote: revert regression of unit test.
50536         * tests/test-sh-quote.c (check_one): Do detect buffer overruns.
50537         * tests/test-system-quote-main.c (check_one): Likewise.
50539 2016-10-16  Pádraig Brady  <P@draigBrady.com>
50541         quotearg: fix stale tests
50542         * tests/test-quotearg.c [locale_results]: Add the missing str7
50543         entries to the expected results.
50544         * tests/test-system-quote-main.c (check_one): Don't enforce that we
50545         don't write beyond the returned length, since that's no longer the
50546         case if we switch to a more concise quoting style.
50547         * tests/test-sh-quote.c (check_one): Likewise.
50548         (main): Adjust for the new more concise quoting style.
50549         Reported by Bruno Haible.
50551 2016-10-16  Jim Meyering  <meyering@fb.com>
50553         non-recursive-gnulib-prefix-hack: fix inconsequential typo
50554         * m4/non-recursive-gnulib-prefix-hack.m4: Change a hard-coded "lib"
50555         to "$1".  This macro is always invoked with $1 == lib.
50556         Spotted by Bruno Haible
50558 2016-10-16  Bruno Haible  <bruno@clisp.org>
50560         Fix a test crash.
50561         * tests/test-duplocale.c (main): Skip the test if the 'newlocale' call
50562         fails.
50564 2016-10-16  Pádraig Brady  <P@draigBrady.com>
50566         test-limits-h: suppress -Woverlength-strings
50567         * tests/test-limits-h.c [__GNUC__]: Ignore -Woverlength-strings.
50569 2016-10-15  Bruno Haible  <bruno@clisp.org>
50571         gettime, timespec, utimens: Relicense under LGPL.
50572         * modules/gettime (License): Change to LGPL.
50573         * modules/timespec (License): Likewise.
50574         * modules/utimens (License): Likewise.
50576 2016-10-14  Bruno Haible  <bruno@clisp.org>
50577             Pádraig Brady  <P@draigBrady.com>
50579         canonicalize-lgpl: Support the case path_max > INT_MAX.
50580         * lib/canonicalize-lgpl.c (__realpath): Declare n as ssize_t, not int.
50581         Fix overflow check, for platforms where 'size_t' is larger than 'long'.
50583 2016-10-13  Jim Meyering  <meyering@fb.com>
50585         getprogname: IBM z/OS: avoid NULL-dereference
50586         * lib/getprogname.c (getprogname) [__MVS__]: Don't dereference NULL
50587         upon strdup failure.
50589 2016-10-12  Jim Meyering  <meyering@fb.com>
50591         test-stdint: use _GL_VERIFY rather than "verify" for some tests
50592         * tests/test-stdint.c (verify_width): Implement with _GL_VERIFY
50593         and an abbreviated diagnostic rather than verify with the full one,
50594         because the full-length strings would evoke warnings from gcc with
50595         -Woverlength-strings.
50597 2016-10-13  Paul Eggert  <eggert@cs.ucla.edu>
50599         stdint: port SIZE_MAX to glibc s390
50600         Problem reported by Eric Blake in:
50601         http://lists.gnu.org/r/bug-gnulib/2016-10/msg00031.html
50602         * doc/posix-headers/stdint.texi (stdint.h): Document the fix.
50603         * m4/stdint.m4 (gl_STDINT_H): Check that SIZE_MAX has the
50604         correct type, if possible.
50606 2016-10-13  Daniel Richard G.  <skunk@iSKUNK.ORG>
50608         getprogname: port to IBM z/OS
50609         * lib/getprogname.c (getprogname): Use w_getpsent() to get the name.
50611 2016-10-11  Jim Meyering  <meyering@fb.com>
50613         maint: remove stray space after "." in AC_DEFINE comment.
50614         * m4/st_dm_mode.m4 (AC_STRUCT_ST_DM_MODE): Remove space-after-".".
50615         * m4/utimes.m4 (gl_FUNC_UTIMES): Likewise.
50617 2016-10-05  Jim Meyering  <meyering@fb.com>
50619         long-options: avoid new GCC 7 warning from -Wimplicit-fallthrough
50620         * lib/long-options.c (parse_long_options): Add a break statement
50621         to avoid this new warning/failure:
50622         $ CFLAGS='-O -Werror=implicit-fallthrough' ./gnulib-tool \
50623           --create-testdir --dir=/t/x --with-tests --test long-options
50624         ../../gllib/long-options.c: In function 'parse_long_options':
50625         ../../gllib/long-options.c:66:12: error: this statement may \
50626           fall through [-Werror=implicit-fallthrough]
50627                    (*usage_func) (EXIT_SUCCESS);
50628                    ~^~~~~~~~~~~~~~~~~~~~~~~~~~~
50630 2016-10-05  Jim Meyering  <meyering@fb.com>
50632         utimecmp: avoid new GCC 7 warning from -Wbool-operation
50633         Testing this module would fail when using GCC 7 like this:
50634         $ CFLAGS='-O -Werror=bool-operation' ./gnulib-tool --create-testdir \
50635           --dir=/tmp/x --with-tests --test utimecmp
50636         ../../gllib/utimecmp.c: In function ‘utimecmp’:
50637         ../../gllib/utimecmp.c:291:36: error: ‘~’ on a boolean expression \
50638           [-Werror=bool-operation]
50639                          time_t s = src_s & ~ (res == 2 * BILLION);
50640                                             ^
50641         ../../gllib/utimecmp.c:370:16: error: ‘~’ on a boolean expression \
50642           [-Werror=bool-operation]
50643                src_s &= ~ (res == 2 * BILLION);
50644                         ^
50645         * lib/utimecmp.c (utimecmp): Do not apply "~" to a boolean.
50646         Instead, make it explicit that we intend to apply it to 0 or 1.
50648 2016-10-10  Norihiro Tanaka  <noritnk@kcn.ne.jp>
50650         dfa: save memory for states
50651         * src/dfa (dfaexec_main): Beginning of dfa execution, release caches of
50652         states if dfa has a lot of caches.
50654 2016-10-10  Eli Zaretskii  <eliz@gnu.org>
50656         wchar, wctype-h: fix for MinGW 3.22.2
50657         * lib/wchar.in.h [__MINGW32__]: Add one more condition for
50658         special invocation, to fix issues with MinGW 3.22.2 wchar.h
50659         when included from <string.h>.
50660         * lib/wctype.in.h [__MINGW32__]: Add special invocation
50661         convention for MinGW 3.22.2, to solve issues with their
50662         wctype.h when included from <ctype.h>.
50664 2016-10-05  Jim Meyering  <meyering@fb.com>
50666         long-options: avoid new GCC 7 warning from -Wimplicit-fallthrough
50667         * lib/long-options.c (parse_long_options): Add a break statement
50668         to avoid this new warning/failure:
50669         $ CFLAGS='-O -Werror=implicit-fallthrough' ./gnulib-tool \
50670           --create-testdir --dir=/t/x --with-tests --test long-options
50671         ../../gllib/long-options.c: In function ‘parse_long_options’:
50672         ../../gllib/long-options.c:66:12: error: this statement may \
50673           fall through [-Werror=implicit-fallthrough]
50674                    (*usage_func) (EXIT_SUCCESS);
50675                    ~^~~~~~~~~~~~~~~~~~~~~~~~~~~
50677         utimecmp: avoid new GCC 7 warning from -Wbool-operation
50678         Testing this module would fail when using GCC 7 like this:
50679         $ CFLAGS='-O -Werror=bool-operation' ./gnulib-tool --create-testdir \
50680           --dir=/tmp/x --with-tests --test utimecmp
50681         ../../gllib/utimecmp.c: In function ‘utimecmp’:
50682         ../../gllib/utimecmp.c:291:36: error: ‘~’ on a boolean expression \
50683           [-Werror=bool-operation]
50684                          time_t s = src_s & ~ (res == 2 * BILLION);
50685                                             ^
50686         ../../gllib/utimecmp.c:370:16: error: ‘~’ on a boolean expression \
50687           [-Werror=bool-operation]
50688                src_s &= ~ (res == 2 * BILLION);
50689                         ^
50690         * lib/utimecmp.c (utimecmp): Do not apply "~" to a boolean.
50691         Instead, make it explicit that we intend to apply it to 0 or 1.
50693 2016-10-03  Pádraig Brady  <P@draigBrady.com>
50695         quotearg: minimize shell quoting using double quotes
50696         * lib/quotearg.c (quotearg_buffer_restyled): If an ASCII single
50697         quote in encountered then use double quotes (c style quoting)
50698         when possible, as it simplifies the quoting.
50699         * tests/test-quotearg-simple.c: Add test cases.
50700         * tests/test-quotearg.h (use_quotearg_buffer): Adjust to account
50701         for the fact we now may write beyond the returned length.
50703 2016-10-02  Jim Meyering  <meyering@fb.com>
50705         vasnprintf.c: avoid spurious warning from GCC 7
50706         The presence of cpp directives renders this "FALLTHROUGH" comment
50707         ineffective, so does not suppress the -Wimplicit-fallthrough warning
50708         from GCC 7 built from git on 2016-10-02.
50709         * lib/vasnprintf.c (VASNPRINTF): Move comment down past two cpp
50710         directives, so that it takes effect once again.  This is clearly
50711         not a proper change, and I will revert it once this bug is fixed:
50712         https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77817
50714 2016-10-01  Jim Meyering  <meyering@fb.com>
50716         getprogname: correct the test for a __progname variable
50717         * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Use AC_CACHE_CHECK
50718         and AC_LINK_IFELSE to check for a global __progname.  If found,
50719         define HAVE_VAR___PROGNAME.
50720         * lib/getprogname.c (getprogname): Reflect the new name of the
50721         feature- checked preprocessor symbol:
50722         s/HAVE_DECL___PROGNAME/HAVE_VAR___PROGNAME/
50724 2016-09-28  Jim Meyering  <meyering@fb.com>
50726         u8-uctomb-aux.c: build: placate GCC 7's new -Wimplicit-fallthrough
50727         * lib/unistr/u8-uctomb-aux.c (u8_uctomb_aux): Mark each end of
50728         fall-through case with a /* fallthrough */ comment.
50730         dfa: build: avoid warning from GCC 7's new -Wimplicit-fallthrough
50731         * lib/dfa.c (dfassbuild): Mark the end of this case with a
50732         /* fallthrough */ comment.
50734         getprogname: avoid __progname vs program_invocation_short_name pitfall
50735         I.e., don't let the OpenBSD 5.1 fix induce failure when using newer
50736         glibc.  Would have caused failure with Fedora 25's glibc-2.24-3, but
50737         not with Fedora 24's glibc-2.23.1-10.
50738         * lib/getprogname.c (__progname): Move this declaration down...
50739         (getprogname): ... into the #elif block where used, and make it
50740         explicitly "extern".
50742         getprogname: port to OpenBSD 5.1
50743         * lib/getprogname.c (__progname) [HAVE_DECL___PROGNAME]: Declare.
50744         (getprogname) [HAVE_DECL___PROGNAME]: Return __progname or "?".
50745         * modules/getprogname (configure.ac): Move most of this code...
50746         * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): ... to this function,
50747         increment serial number, and add a test for __progname.
50748         https://bugs.gnu.org/24562
50749         Reported by Nelson H. F. Beebe.
50751 2016-09-24  Paul Eggert  <eggert@cs.ucla.edu>
50753         sched: port to GCC 6.2.1 on macOS Sierra
50754         Problem reported by Denis Davydov in:
50755         http://lists.gnu.org/r/bug-gnulib/2016-09/msg00056.html
50756         * lib/sched.in.h [HAVE_SYS_CDEFS_H]:
50757         Include <sys/cdefs.h> before <sched.h>.
50758         * m4/nproc.m4 (gl_PREREQ_NPROC): Include errno.h before sched.h,
50759         so that we needn’t worry about the sched.h include bug here.
50760         * m4/sched_h.m4 (gl_SCHED_H): Check for sys/cdefs.h,
50761         and include it before <sched.h> if it exists, when
50762         checking for <sched.h>.
50764         tests/init.sh: port Alpine fix to AIX 7.1
50765         * tests/init.sh (compare_): When attempting to use diff -U3,
50766         prefer diff -u to -U3 to -c to plain diff.  Do not insist on
50767         diff -u not outputting a space after leading '+', as the users
50768         of 'compare' should not be that picky about its output format.
50769         In the AIX 7.1 case, return with diff exit status (or with 2 if
50770         trouble), instead of some random nonzero exit status.
50771         * tests/test-init.sh (test_compare): Remove space after leading
50772         '+', so that AIX 7.1 'diff' passes the test.
50774 2016-09-22  Paul Eggert  <eggert@cs.ucla.edu>
50776         nl_langinfo: pacify GCC
50777         * lib/nl_langinfo.c (ctype_codeset): Remove unused local.
50778         (rpl_nl_langinfo): Cast string literals to char *, to pacify GCC.
50780         stdint: also set GL_GENERATE_LIMITS_H
50781         Problem reported by Jim Meyering in:
50782         http://lists.gnu.org/r/bug-gnulib/2016-09/msg00052.html
50783         * m4/stdint.m4 (gl_STDINT_H): Also redo the AM_CONDITIONAL.
50785         limits-h, stdint: Don't assume extensions, fix typo
50786         * m4/limits-h.m4 (gl_LIMITS_H):
50787         * m4/stdint.m4 (gl_STDINT_H):
50788         Don't assume AC_USE_SYSTEM_EXTENSIONS.
50789         * m4/stdint.m4 (gl_STDINT_H): Fix typo in setting of LIMITS_H,
50790         reported by Jim Meyering in:
50791         http://lists.gnu.org/r/bug-gnulib/2016-09/msg00050.html
50793 2016-09-21  Jim Meyering  <meyering@fb.com>
50795         getprogname: port to AIX
50796         * lib/getprogname.c (getprogname) [_AIX]: Use getpid, getprocs64
50797         and strdup to obtain a short program name string.  Using code from
50798         Bruno Haible and an idea from Bastien ROUCARIÈS, in
50799         https://lists.gnu.org/r/bug-gnulib/2010-12/msg00249.html
50800         Assaf Gordon reported that this new file would fail to compile on
50801         AIX-7.1 32bit.
50803 2016-09-16  Paul Eggert  <eggert@cs.ucla.edu>
50805         extensions: fix typo in comment
50806         * m4/extensions.m4: Sync from Autoconf master.
50808         stdint: support new _WIDTH macros
50809         * doc/posix-headers/stdint.texi: Document this.
50810         * lib/stdint.in.h: Add support for INTMAX_WIDTH. etc.
50811         * m4/stdint.m4 (gl_STDINT_H): Require gl_LIMITS_H.  Check for
50812         support for INTMAX_WIDTH, etc. as well as for support for just C99.
50813         * modules/stdint (Depends-on): Add limits-h.
50814         (Makefile.am): Substitute HAVE_C99_STDINT_H.
50815         * modules/stdint-tests (Depends-on): Add extensions, so that
50816         INTMAX_MAX etc. are defined.
50817         * tests/test-stdint.c: Verify the new macros.
50819         limits-h: new module
50820         This adds ISO/IEC TS 18661-1:2014 support to limits.h.
50821         * MODULES.html.sh: Add limits-h,and move size_max to stdint section.
50822         * doc/posix-headers/limits.texi: Document new module.
50823         * lib/limits.in.h, m4/limits-h.m4, modules/limits-h:
50824         * modules/limit-h-tests, tests/test-limits-h.c: New files.
50826         stdio: don't redefine __USE_MINGW_ANSI_STDIO
50827         * m4/stdio_h.m4 (gl_STDIO_H): Don't define __USE_MINGW_ANSI_STDIO
50828         if it is already defined.  Apparently GNU Emacs relies on this.  See:
50829         http://lists.gnu.org/r/emacs-devel/2016-09/msg00416.html
50831 2016-09-15  Eric Blake  <eblake@redhat.com>
50833         sys_types: avoid glibc 2.25 warnings about major()
50834         * m4/sys_types_h.m4 (AC_HEADER_MAJOR): Replace broken version in
50835         older autoconf.
50836         * doc/posix-headers/sys_types.texi (sys/types.h): Document fix.
50837         * doc/glibc-functions/gnu_dev_major.texi (gnu_dev_major): Likewise.
50838         * doc/glibc-functions/gnu_dev_makedev.texi (gnu_dev_makedev): Likewise.
50839         * doc/glibc-functions/gnu_dev_minor.texi (gnu_dev_minor): Likewise.
50841         mountlist: include sysmacros.h for glibc
50842         * m4/mountlist.m4 (gl_PREREQ_MOUTLIST_EXTRA): Include
50843         AC_HEADER_MAJOR.
50844         * lib/mountlist.c (includes): Use correct headers.
50846 2016-09-15  Paul Eggert  <eggert@cs.ucla.edu>
50848         extensions: port to more ISO C TSes
50849         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Sync from Autoconf
50850         master, to add support for more recent ISO C TRs and TSes.
50852 2016-09-13  Paul Eggert  <eggert@cs.ucla.edu>
50854         intprops: new macro TYPE_WIDTH
50855         * lib/intprops.h (TYPE_WIDTH): New macro.
50856         (TYPE_MAXIMUM, _GL_SIGNED_INT_MAXIMUM, INT_STRLEN_BOUND):
50857         * lib/ftoastr.h (_GL_FLOAT_DIG_BITS_BOUND):
50858         * lib/parse-datetime.y (parse_datetime2):
50859         Use it.
50861         extensions: port to recent ISO C TRs
50862         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS):
50863         Sync from Autoconf master, to add support for recent ISO C TRs.
50864         * m4/stdio_h.m4 (gl_STDIO_H): Define __USE_MINGW_ANSI_STDIO here,
50865         since AC_USE_SYSTEM_EXTENSIONS no longer does that as
50866         the MinGW option is not an extension.
50868 2016-09-11  Paul Eggert  <eggert@cs.ucla.edu>
50870         dfa: port to Solaris 9
50871         Problems reported by Tom G. Christensen in:
50872         http://lists.gnu.org/r/bug-gnulib/2016-09/msg00031.html
50873         * modules/dfa (Depends-on): Add isblank.
50874         * modules/dfa-tests (dfa_match_aux_LDADD):
50875         Rename from test_stat_LDADD, to fix typo.
50876         * tests/dfa-match.sh: Don't require 'timeout'; use it if available.
50878 2016-09-10  Jim Meyering  <meyering@fb.com>
50880         strverscmp: avoid link failure on OS X
50881         * lib/strverscmp.c [!weak_alias]: Define __strverscmp to strverscmp.
50882         Reported by Assaf Gordon in https://bugs.gnu.org/24256#26
50884 2016-08-16  Jim Meyering  <meyering@fb.com>
50886         dfa: new module, importing grep's DFA matcher
50887         Since grep's DFA matcher is now being used by two gnulib-enabled
50888         projects, grep and sed, it makes sense to version-control its
50889         sources and unit tests in one place: here.
50890         * modules/dfa: New module.
50891         * modules/dfa-tests: New file.
50892         * lib/dfa.c: New file, from grep.
50893         * lib/dfa.h: Likewise.
50894         * lib/localeinfo.c: Likewise.
50895         * lib/localeinfo.h: Likewise.
50896         * tests/dfa-match-aux.c: Likewise.
50897         * tests/dfa-invalid-char-class.sh: Likewise.
50898         * tests/dfa-match.sh: Likewise, with minor changes.
50899         * MODULES.html.sh (Misc): Add "dfa" to this list.
50901 2016-09-09  Jim Meyering  <meyering@fb.com>
50903         getprogname-tests: don't depend on assert-h
50904         * modules/getprogname-tests (Depends-on): Remove assert-h.
50905         It was not needed, and in fact would cause build failure for
50906         coreutils on some systems.  Reported by Assaf Gordon in https:
50907         //lists.gnu.org/r/coreutils/2016-09/msg00016.html
50909 2016-09-07  Jim Meyering  <meyering@fb.com>
50911         getprogname-tests: work also when EXEEXT is nonempty
50912         * modules/getprogname-tests (Makefile.am): Define EXEEXT.
50913         * tests/test-getprogname.c (main): Use it.
50914         Suggested by Gisle Vanem.
50916 2016-09-07  Gisle Vanem  <gvanem@yahoo.no>
50918         getprogname: fix errors in previous change
50919         * lib/getprogname.c (getprogname) [HAVE_GETEXECNAME]:
50920         s/program_invocation_name/base/
50921         [HAVE_DECL___ARGV]: Handle NULL __argv or __argv[0].
50923 2016-09-08  Pádraig Brady  <P@draigBrady.com>
50925         parse-datetime: restrict debug output to input string
50926         * lib/parse-datetime.y (parse_datetime2): If we parse
50927         all of the input but determine it's invalid, ensure
50928         we don't output the now invalid input pointer.
50929         This issue was seen with `date -d 'now +1'`.
50931 2016-09-07  Paul Eggert  <eggert@cs.ucla.edu>
50933         flexmember: new macro FLEXALIGNOF
50934         * lib/flexmember.h: Include <stddef.h>, for offsetof.
50935         (FLEXALIGNOF): Rename from _GL_XALLOC_ALIGNOF, as Emacs can use
50936         this macro.  Update comments.
50938 2016-09-07  Jim Meyering  <meyering@fb.com>
50940         getprogname: port to systems with __argv (mingw, msvc)
50941         * lib/getprogname.c (getprogname): Include "dirname.h" and use
50942         last_component: more general than open coding it with hard-coded "/".
50943         * lib/getprogname.h (getprogname): Prefer "char const *" consistently.
50944         * modules/getprogname (Depends-on): Add dirname-lgpl.
50945         (configure.ac): Check for __argv in <stdlib.h>.
50946         * modules/getprogname-tests: New file.
50947         * tests/test-getprogname.c: New file.
50948         Suggested by Gisle Vanem in
50949         https://lists.gnu.org/r/bug-gnulib/2016-09/msg00014.html
50951 2016-09-07  Paul Eggert  <eggert@cs.ucla.edu>
50953         flexmember: port better to GCC + valgrind
50954         With a char[] flexible array member in a struct with nontrivial
50955         alignment, GCC-generated code can access past the end of the
50956         array, because GCC assumes there are padding bytes to get the
50957         struct aligned.  So the common idiom of malloc (offsetof (struct
50958         s, m), n) does not properly allocate an n-byte trailing member, as
50959         malloc’s argument should be the next multiple of alignof (struct s).
50960         See GCC Bug#66661: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66661
50961         Although C11 apparently permits this GCC optimization (i.e., there
50962         was a bug in Gnulib not in GCC), possibly this is a defect in C11.
50963         See the thread containing:
50964         https://gcc.gnu.org/ml/gcc-patches/2016-09/msg00317.html
50965         * lib/flexmember.h: New file.
50966         * lib/fnmatch.c, lib/fts.c, lib/glob.c, lib/idcache.c:
50967         * lib/localename.c, lib/time_rz.c:
50968         Include flexmember.h.
50969         * lib/fnmatch_loop.c (struct patternlist):
50970         * lib/localename.c (struct hash_node):
50971         Use FLEXIBLE_ARRAY_MEMBER.
50972         * lib/fnmatch_loop.c (EXT):
50973         * lib/fts.c (fts_alloc):
50974         * lib/glob.c (glob_in_dir):
50975         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
50976         * lib/localename.c (gl_lock_define_initialized):
50977         * lib/time_rz.c (tzalloc):
50978         Use FLEXSIZEOF instead of offsetof.
50979         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
50980         Check that the size of the struct can be taken.
50981         * modules/flexmember (Files): Add lib/flexmember.h.
50982         * modules/fnmatch, modules/glob, modules/localename (Depends-on):
50983         Add flexmember.
50985 2016-09-06  Paul Eggert  <eggert@cs.ucla.edu>
50987         getprogname: port to Solaris 10
50988         * lib/getprogname.c: Include stdlib.h, for getexecname decl.
50989         (getprogname) [HAVE_GETEXECNAME]: Use that, for Solaris 10.
50990         * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Check for getexecname.
50992         stdalign: correct mistake in alignof doc
50993         Problem reported by Joseph Myers in:
50994         https://gcc.gnu.org/ml/gcc-patches/2016-09/msg00340.html
50995         * doc/posix-headers/stdalign.texi: Do not imply that C11 prohibits
50996         alignof(S) where S is a structure containing a flexible array
50997         member.  The Gnulib substitute does not support this, but C11 does.
50999 2016-08-18  Pino Toscano  <ptoscano@redhat.com>
51001         main.mk: remove sc_program_name, since there is no more need to
51002         use set_program_name in tools (getprogname is enough for most
51003         of the cases).
51004         * cfg.mk (local-checks-to-skip): Remove sc_program_name.
51005         * top/maint.mk (sc_program_name): Remove.
51007 2016-08-18  Pino Toscano  <ptoscano@redhat.com>
51009         Port tests away from progname, since modules that need the
51010         program name already depend on getprogname.
51011         * modules/acl-tests (Depends-on): Remove progname.
51012         * modules/argmatch (Depends-on): Likewise.
51013         * modules/argmatch-tests (Depends-on): Likewise.
51014         * modules/argp-tests (Depends-on): Likewise.
51015         * modules/argp-version-etc-tests (Depends-on): Likewise.
51016         * modules/array-list-tests (Depends-on): Likewise.
51017         * modules/array-oset-tests (Depends-on): Likewise.
51018         * modules/avltree-list-tests (Depends-on): Likewise.
51019         * modules/avltree-oset-tests (Depends-on): Likewise.
51020         * modules/avltreehash-list-tests (Depends-on): Likewise.
51021         * modules/carray-list-tests (Depends-on): Likewise.
51022         * modules/copy-file-tests (Depends-on): Likewise.
51023         * modules/exclude-tests (Depends-on): Likewise.
51024         * modules/fchownat-tests (Depends-on): Likewise.
51025         * modules/fdopendir-tests (Depends-on): Likewise.
51026         * modules/filenamecat-tests (Depends-on): Likewise.
51027         * modules/fstatat-tests (Depends-on): Likewise.
51028         * modules/fstrcmp-tests (Depends-on): Likewise.
51029         * modules/linked-list-tests (Depends-on): Likewise.
51030         * modules/linkedhash-list-tests (Depends-on): Likewise.
51031         * modules/mkdirat-tests (Depends-on): Likewise.
51032         * modules/nonblocking-pipe-tests (Depends-on): Likewise.
51033         * modules/nonblocking-socket-tests (Depends-on): Likewise.
51034         * modules/obstack-printf-tests (Depends-on): Likewise.
51035         * modules/openat-tests (Depends-on): Likewise.
51036         * modules/parse-datetime-tests (Depends-on): Likewise.
51037         * modules/pipe-filter-gi-tests (Depends-on): Likewise.
51038         * modules/pipe-filter-ii-tests (Depends-on): Likewise.
51039         * modules/quotearg-simple-tests (Depends-on): Likewise.
51040         * modules/quotearg-tests (Depends-on): Likewise.
51041         * modules/rbtree-list-tests (Depends-on): Likewise.
51042         * modules/rbtree-oset-tests (Depends-on): Likewise.
51043         * modules/rbtreehash-list-tests (Depends-on): Likewise.
51044         * modules/spawn-pipe-tests (Depends-on): Likewise.
51045         * modules/system-quote-tests (Depends-on): Likewise.
51046         * modules/uniname/uniname-tests (Depends-on): Likewise.
51047         * modules/uninorm/nfc-tests (Depends-on): Likewise.
51048         * modules/uninorm/nfd-tests (Depends-on): Likewise.
51049         * modules/uninorm/nfkc-tests (Depends-on): Likewise.
51050         * modules/uninorm/nfkd-tests (Depends-on): Likewise.
51051         * modules/unistdio/u16-vsnprintf-tests (Depends-on): Likewise.
51052         * modules/unistdio/u16-vsprintf-tests (Depends-on): Likewise.
51053         * modules/unistdio/u32-vsnprintf-tests (Depends-on): Likewise.
51054         * modules/unistdio/u32-vsprintf-tests (Depends-on): Likewise.
51055         * modules/unistdio/u8-vsnprintf-tests (Depends-on): Likewise.
51056         * modules/unistdio/u8-vsprintf-tests (Depends-on): Likewise.
51057         * modules/unistdio/ulc-vsnprintf-tests (Depends-on): Likewise.
51058         * modules/unistdio/ulc-vsprintf-tests (Depends-on): Likewise.
51059         * modules/unlinkat-tests (Depends-on): Likewise.
51060         * modules/version-etc-tests (Depends-on): Likewise.
51061         * modules/xalloc-die-tests (Depends-on): Likewise.
51062         * modules/xmemdup0-tests (Depends-on): Likewise.
51063         * modules/xprintf-posix-tests (Depends-on): Likewise.
51064         * modules/xvasprintf-tests (Depends-on): Likewise.
51065         * tests/test-argmatch.c: Do not include progname.h.
51066         (main) Stop calling set_program_name.
51067         * tests/test-argp-version-etc.c: Likewise.
51068         * tests/test-argp.c: Likewise.
51069         * tests/test-argv-iter.c: Likewise.
51070         * tests/test-array_list.c: Likewise.
51071         * tests/test-array_oset.c: Likewise.
51072         * tests/test-avltree_list.c: Likewise.
51073         * tests/test-avltree_oset.c: Likewise.
51074         * tests/test-avltreehash_list.c: Likewise.
51075         * tests/test-carray_list.c: Likewise.
51076         * tests/test-copy-acl.c: Likewise.
51077         * tests/test-copy-file.c: Likewise.
51078         * tests/test-exclude.c: Likewise.
51079         * tests/test-fchownat.c: Likewise.
51080         * tests/test-fdopendir.c: Likewise.
51081         * tests/test-filenamecat.c: Likewise.
51082         * tests/test-fstatat.c: Likewise.
51083         * tests/test-fstrcmp.c: Likewise.
51084         * tests/test-linked_list.c: Likewise.
51085         * tests/test-linkedhash_list.c: Likewise.
51086         * tests/test-mkdirat.c: Likewise.
51087         * tests/test-nonblocking-pipe-main.c: Likewise.
51088         * tests/test-nonblocking-socket-main.c: Likewise.
51089         * tests/test-obstack-printf.c: Likewise.
51090         * tests/test-openat.c: Likewise.
51091         * tests/test-parse-datetime.c: Likewise.
51092         * tests/test-pipe-filter-gi1.c: Likewise.
51093         * tests/test-pipe-filter-gi2-main.c: Likewise.
51094         * tests/test-pipe-filter-ii1.c: Likewise.
51095         * tests/test-pipe-filter-ii2-main.c: Likewise.
51096         * tests/test-quotearg-simple.c: Likewise.
51097         * tests/test-quotearg.c: Likewise.
51098         * tests/test-rbtree_list.c: Likewise.
51099         * tests/test-rbtree_oset.c: Likewise.
51100         * tests/test-rbtreehash_list.c: Likewise.
51101         * tests/test-sameacls.c: Likewise.
51102         * tests/test-set-mode-acl.c: Likewise.
51103         * tests/test-spawn-pipe-main.c: Likewise.
51104         * tests/test-system-quote-main.c: Likewise.
51105         * tests/test-unlinkat.c: Likewise.
51106         * tests/test-version-etc.c: Likewise.
51107         * tests/test-xalloc-die.c: Likewise.
51108         * tests/test-xfprintf-posix.c: Likewise.
51109         * tests/test-xmemdup0.c: Likewise.
51110         * tests/test-xprintf-posix.c: Likewise.
51111         * tests/test-xvasprintf.c: Likewise.
51112         * tests/uniname/test-uninames.c: Likewise.
51113         * tests/uninorm/test-u32-nfc-big.c: Likewise.
51114         * tests/uninorm/test-u32-nfd-big.c: Likewise.
51115         * tests/uninorm/test-u32-nfkc-big.c: Likewise.
51116         * tests/uninorm/test-u32-nfkd-big.c: Likewise.
51117         * tests/unistdio/test-u16-vsnprintf1.c: Likewise.
51118         * tests/unistdio/test-u16-vsprintf1.c: Likewise.
51119         * tests/unistdio/test-u32-vsnprintf1.c: Likewise.
51120         * tests/unistdio/test-u32-vsprintf1.c: Likewise.
51121         * tests/unistdio/test-u8-vsnprintf1.c: Likewise.
51122         * tests/unistdio/test-u8-vsprintf1.c: Likewise.
51123         * tests/unistdio/test-ulc-vsnprintf1.c: Likewise.
51124         * tests/unistdio/test-ulc-vsprintf1.c: Likewise.
51125         * tests/test-c-stack.c: (program_name): Do not define.
51126         (main): Do not set program_name.
51127         * tests/test-closein.c: Likewise.
51128         * tests/test-xstrtol.c: Likewise.
51129         * tests/test-yesno.c: Likewise.
51131 2016-08-18  Pino Toscano  <ptoscano@redhat.com>
51133         Port modules to use getprogname explicitly, instead of requiring
51134         progname to be used (or program_name to be provided).
51135         * lib/argmatch.c: Do not include progname.h.
51136         [TEST] (program_name): Do not define.
51137         [TEST] (main): Call getprogname instead of using program_name.
51138         * lib/c-stack.c: Do not include progname.h.
51139         (program_name): Do not define.
51140         (die): Call getprogname instead of using program_name.
51141         * lib/chdir-long.c: Do not include progname.h.
51142         [TEST_CHDIR] (main): Do not set program_name.
51143         * lib/error.c [!_LIBC]: Include progname.h.
51144         [!_LIBC] (program_name): Define using getprogname.
51145         * lib/euidaccess.c: Do not include progname.h.
51146         [TEST] (main): Do not set program_name.
51147         * lib/git-merge-changelog.c: Include getprogname.h instead of
51148         progname.h.
51149         (usage): Call getprogname instead of using program_name.
51150         (main): Likewise.  Stop calling set_program_name.
51151         * lib/group-member.c: Do not include progname.h.
51152         [TEST] (main): Do not set program_name.
51153         * modules/argmatch (Depends-on): Add getprogname.
51154         * modules/c-stack (Depends-on): Likewise.
51155         * modules/error (Depends-on): Likewise.
51156         * modules/git-merge-changelog (Depends-on): Likewise.
51157         Also remove progname.
51159 2016-09-05  Pino Toscano  <ptoscano@redhat.com>
51161         * NEWS: Document the deprecation of the 'progname' module.
51163 2016-08-18  Pino Toscano  <ptoscano@redhat.com>
51165         getprogname: new module
51166         This provides a LGPL module for getting the name of the current
51167         program, using the same API found on *BSD systems.
51168         * lib/getprogname.c, lib/getprogname.h, m4/getprogname.m4:
51169         * modules/getprogname: New files.
51170         * MODULES.html.sh (Misc): Add getprogname.
51172 2016-09-02  Jim Meyering  <meyering@fb.com>
51174         manywarnings: add -fno-common
51175         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -fno-common
51176         to the list.  Quoting the manual, "Compiling with -fno-common is
51177         useful on targets for which it provides better performance, or if
51178         you wish to verify that the program will work on other systems that
51179         always treat uninitialized variable declarations this way [putting
51180         it in the data section]."  If diffutils had been using this sooner,
51181         it would have prevented this duplicate declaration issue:
51182         http://git.sv.gnu.org/cgit/diffutils.git/commit/?id=v3.4-10-gc2dc91f
51184 2016-08-31  Simon Josefsson  <simon@josefsson.org>
51186         parse-datetime: Fix typo.
51187         * lib/parse-datetime.y (parse_datetime2): Fix typo.
51189 2016-08-30  Paul Eggert  <eggert@cs.ucla.edu>
51191         intprops: tune INT_NEGATE_OVERFLOW for GCC 5 and 6
51192         * lib/intprops.h (INT_NEGATE_OVERFLOW): Tune for platforms like
51193         GCC 5 and 6 that have __builtin_sub_overflow but not
51194         __builtin_sub_overflow_p.  With the recent changes, these
51195         platforms are a tiny bit faster with the INT_NEGATE_RANGE_OVERFLOW
51196         implementation than with INT_SUBTRACT_OVERFLOW implementation,
51197         since the former needs just one runtime comparison whereas the
51198         latter needs two.
51200         strverscmp: sync with glibc
51201         Although this doesn't exactly synchronize with glibc
51202         byte-for-byte, it makes the code behave the same as glibc.
51203         * lib/strverscmp.c (S_I, S_F, S_Z): Now masks, not powers of 2.
51204         (ISDIGIT): Remove, as glibc is sticking with isdigit, and the
51205         difference shouldn't matter in practical use.  All uses changed
51206         back to isdigit.
51207         (__strverscmp, strverscmp): Use new glibc method for weak aliases.
51208         (next_state): Now unsigned char array; redo elements.
51209         (result_type): Now signed char array; redo elements.
51210         (__strverscmp): Fix glibc bug 9913 by using new states.
51211         * tests/test-strverscmp.c (main): Test glibc bug 9913.
51213 2016-08-29  Jim Meyering  <meyering@fb.com>
51215         xalloc-oversized.h: port __builtin_mul_overflow change to GCC 6.2.0
51216         * lib/xalloc-oversized.h: Port this change to GCC 6.2.0, too,
51217         similarly to how it was done to intprops.h.
51219 2016-08-29  Paul Eggert  <eggert@cs.ucla.edu>
51221         intprops.h: port recent changes to GCC 6.2.0
51222         * lib/intprops.h (__has_builtin): Move earlier.
51223         (_GL_HAS_BUILTIN_OVERFLOW): Rename from
51224         _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL and don't worry about whether
51225         the last argument can be null.  All uses changed.
51226         (_GL_HAS_BUILTIN_OVERFLOW_P): Also test __has_builtin.
51227         (_GL_ADD_OVERFLOW, _GL_SUBTRACT_OVERFLOW, _GL_MULTIPLY_OVERFLOW):
51228         Don't try to use 3rd arg null, as this doesn't work on GCC 6.2.0
51229         and it's not clear which GCC versions it works for.
51230         (_GL_INT_OP_WRAPV): Use _GL_HAS_BUILTIN_OVERFLOW instead of
51231         its definiens.
51233         intprops.h: use __typeof__ with GCC 7
51234         * lib/intprops.h (_GL_ADD_OVERFLOW, _GL_SUBTRACT_OVERFLOW)
51235         (_GL_MULTIPLY_OVERFLOW): Use __typeof__ as in the GCC manual.
51236         This avoids computing the expression's value (which might overflow!).
51238 2016-08-29  Jim Meyering  <meyering@fb.com>
51240         intprops.h, xalloc-oversized.h: work with gcc 7
51241         In gcc 6, __builtin_add_overflow, __builtin_sub_overflow and
51242         __builtin_mul_overflow each accept a NULL pointer as the third
51243         argument.  However in gcc 7, that is no longer accepted.
51244         Instead, one must use the "_p"-suffixed names, with which, the
51245         third parameter is no longer a pointer.
51246         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_WITH_NULL): Correct
51247         the definition: not true for gcc 7 and subsequent.
51248         (_GL_HAS_BUILTIN_OVERFLOW_P): Define.
51249         (_GL_ADD_OVERFLOW, _GL_SUBTRACT_OVERFLOW, _GL_MULTIPLY_OVERFLOW):
51250         Provide new definitions for gcc 7 and subsequent.
51251         * lib/xalloc-oversized.h (xalloc_oversized): Provide a definition
51252         that works with gcc-7.
51254         intprops.h: fix missing-backslash problems
51255         * lib/intprops.h (_GL_ADD_OVERFLOW): Add backslash.
51256         (_GL_SUBTRACT_OVERFLOW,_GL_MULTIPLY_OVERFLOW): Likewise.
51258 2016-08-24  Paul Eggert  <eggert@cs.ucla.edu>
51260         intprops: fix paren typo on old platforms
51261         Problem reported by John E. Malmberg in: https://bugs.gnu.org/24300#13
51262         * lib/intprops.h (_GL_INT_OP_WRAPV_LONGISH)
51263         [__GNUC__ < 5 && !__has_builtin (__builtin_add_overflow)
51264         && (__STDC_VERSION__ < 201112 || _GL__GENERIC_BOGUS)
51265         && !defined LLONG_MAX]:
51266         Remove stray paren.
51268         intprops: port to OpenVMS
51269         Problem reported by John E. Malmberg in: https://bugs.gnu.org/24300
51270         * doc/posix-headers/limits.texi: Document the problem.
51271         * lib/intprops.h (LLONG_MAX, LLONG_MIN) [__INT64_MAX]:
51272         Define if not already defined.
51274 2016-08-19  Assaf Gordon  <assafgordon@gmail.com>
51276         parse-datetime: improve debug implementation
51277         Follow-up to commit 12ad79069 ("add optional debug printing").
51278         Improve parse-datetime's debug implementation: remove macros,
51279         replace global debug flag variable with a function parameter,
51280         use nstrftime for formatting.
51281         See: https://lists.gnu.org/r/bug-gnulib/2016-08/msg00021.html
51282         * lib/parse-datetime.h: (parse_datetime_debug): Remove global extern.
51283         (parse_datetime2): New function, accepts 'flags' parameter, supporting
51284         debug flag. Existing interface 'parse_datetime' left unmodified.
51285         * lib/parse-datetime.c: (parse_datetime_debug): Remove global variable.
51286         (struct parser_control): add 'parse_datetime_debug' member variable.
51287         (parse_datetime): Call new function 'parse_datetime2' without debug.
51288         (parse_datetime2): Adapted from previous 'parse_datetime', initialize
51289         pc.parse_datetime_debug variable as needed.
51290         (to_year): Accept new flags parameter, instead of using global variable.
51291         (debug_print_current_time,debug_print_relative_time,debug_mktime_not_ok):
51292         use struct 'debug' variable instead of global variable.
51293         (DEBUG,DEBUG_PRINT_CURRENT_TIME,DEBUG_PRINT_RELATIVE_TIME,
51294         DEBUG_MKTIME_NOT_OK,PROGRESS,PROGRESS0): Remove macros. Call
51295         correspnding functions directly instead of using macros.
51296         * modules/parse-datetime: Add gnulib's strftime module.
51298 2016-08-19  Daniel Richard G.  <skunk@iSKUNK.ORG>
51300         c-strcase-tests: port to EBCDIC
51301         * tests/test-c-strncasecmp.c: Allow two c_strncasecmp calls
51302         which assume ASCII encoding semantics to run only in ASCII
51303         mode, as they fail in EBCDIC.
51305         sigpipe-tests: fix typo
51306         * tests/test-sigpipe.sh: C, not B.
51308 2016-08-18  Paul Eggert  <eggert@cs.ucla.edu>
51310         canonicalize-lgpl: fix errno after malloca fails
51311         This fixes a typo I recently introduced.  Suggested by Bruno Haible in:
51312         http://lists.gnu.org/r/bug-gnulib/2016-08/msg00039.html
51313         * lib/canonicalize-lgpl.c (__realpath):
51314         Don't assume malloca sets errno on failure.
51316 2016-08-17  Paul Eggert  <eggert@cs.ucla.edu>
51318         strtod: port errno handling to z/OS
51319         * lib/strtod.c (strtod): Save and restore errno more reliably.
51321 2016-08-17  Daniel Richard G.  <skunk@iSKUNK.ORG>
51323         strtod: port to z/OS
51324         * lib/strtod.c (strtod): Address a couple quirks in the z/OS
51325         implementation.
51327 2016-08-17  Paul Eggert  <eggert@cs.ucla.edu>
51329         strtod: port to z/OS
51330         * lib/strtod.c (strtod): Address a couple quirks in the z/OS
51331         implementation.
51333         regex, string: rename to avoid '__string'
51334         * lib/regex.h, lib/string.in.h: Do not use the identifier
51335         '__string', as it is effectively reserved by string.h on z/OS.
51337         c-strcase-tests, wcwidth-tests: depend on c-ctype
51338         * modules/c-strcase-tests, modules/wcwidth-tests (Depends-on):
51339         Add c-ctype.
51341 2016-08-17  Daniel Richard G.  <skunk@iSKUNK.ORG>
51343         thread: port to z/OS
51344         * lib/glthread/thread.c, lib/glthread/thread.h:
51345         Rudimentary gl_thread support for z/OS.
51347         maint: port tests to z/OS errno behavior
51348         * tests/test-nonblocking-reader.h:
51349         * tests/test-nonblocking-writer.h:
51350         Accommodate z/OS errno code preferences. (I believe this should
51351         still be within spec; IBM is good at following the letter if not
51352         the spirit of such things.)
51354         maint: preprocessor changes to support z/OS
51355         * lib/alloca.in.h, lib/fnmatch.c, lib/get-rusage-as.c:
51356         * lib/glob.c, lib/math.in.h, lib/ptsname_r.c:
51357         * tests/infinity.h, tests/nan.h, tests/test-canonicalize-lgpl.c:
51358         * tests/test-nonblocking-pipe.h:
51360         fclose, strstr-simple, wchar: port to z/OS
51361         * m4/fclose.m4, m4/strstr.m4, m4/wchar_h.m4:
51362         Changes to the Autoconf M4 code to support z/OS.  Note that
51363         fclose() is broken in a different way on z/OS than it is on other
51364         systems, thus the special-case in fclose.m4.
51366         iconv_open-utf-tests, iconv-tests: port to EBCDIC
51367         * tests/test-iconv-utf.c, tests/test-iconv.c:
51368         Added appropriately conditional #pragmas so that the test strings
51369         in test-iconv-utf.c are correctly interpreted in ASCII instead of
51370         EBCDIC (i.e. 'J' == 0x4A and not 0xD1). This issue could be
51371         addressed in a more portable way by simply rewriting all the ASCII
51372         literal characters as octal escapes, but then you would lose the
51373         partial readability that the strings have now. Also, iconv_open()
51374         on z/OS does not recognize "ISO-8859-1", but "ISO8859-1" works.
51376         c-strcase-tests, wcwidth-tests: port to EBCDIC
51377         * tests/test-c-strcasecmp.c: Include c-ctype.h.
51378         (main) [!C_CTYPE_ASCII]: Skip tests that assume ASCII.
51379         * tests/test-wcwidth.c: Likewise.
51381 2016-08-17  Paul Eggert  <eggert@cs.ucla.edu>
51383         stdbool: don't require _Bool for C++
51384         Problem reported by David Seifert in:
51385         http://lists.gnu.org/r/bug-gnulib/2016-06/msg00005.html
51386         * NEWS, doc/posix-headers/stdbool.texi (stdbool.h): Document this.
51387         * m4/stdbool.m4 (AC_CHECK_HEADER_STDBOOL): Make the check
51388         more-forgiving for C++, in that it requires only 'bool'.  Be a bit
51389         stricter about checking that bool and _Bool are compatible in C.
51391 2016-08-16  Paul Eggert  <eggert@cs.ucla.edu>
51393         getdelim: remove dependency on realloc-posix
51394         * lib/canonicalize-lgpl.c (alloc_failed)
51395         [!FUNC_REALPATH_WORKS || defined _LIBC]: New function,
51396         (__realpath) [!FUNC_REALPATH_WORKS || defined _LIBC]: Use it.
51397         Use __set_errno where needed, for consistency.
51398         * lib/getdelim.c (alloc_failed): New function.
51399         (getdelim): Use it.
51401 2016-08-09  Assaf Gordon  <assafgordon@gmail.com>
51403         parse-datetime: add optional debug printing
51404         Print parsing information, warnings, and errors to stderr.
51405         * lib/parse-datetime.h (parse_datetimte_debug): New global variable.
51406         * lib/parse-datetime.y:
51407         (DEBUG_*):  Macros calling debug functions if debugging is enabled.
51408         (PROGRESS*): Same as DEBUG, for progress reporting.
51409         (dbg_printf): Print message to stderr, with 'date' prefix.
51410         (struct parser_control): Add 'debug_*_seen' variables.
51411         (str_days): Converts day ordinal/number to string (e.g. 'last wed').
51412         (debug_print_current_time, debug_print_relateive_time): Prints the
51413         current/relative date/time value of parser_control.
51414         (YACC parser syntax): Print parsed parts with DEBUG_* macros.
51415         (to_year): Warn about 2-digit year parsing.
51416         (yylex):   Warn about unrecognized words.
51417         (get_effective_timezone): Returns current timezone in minutes.
51418         (debug_strf{time,date,datetime}): Convert 'struct tm' to string as
51419         clearly and unambigiously as possible.
51420         (debug_mktime_not_ok): Print detailed information about failed
51421         date/time values.
51422         (parse_datetime): Add DEBUG messages for failures, warnings. Add
51423         PROGRESS messages for status messages.
51424         * modules/parse-datetime: Add 'timegm', 'gettext-h' dependencies.
51426 2016-08-06  Jim Meyering  <meyering@fb.com>
51428         tests/init.sh: exclude dash with bad "local" semantics
51429         * tests/init.sh (gl_shell_test_script_): Add a function to
51430         eliminate a shell like "dash" (unlike bash, zsh) that has
51431         surprising/risky "local var='...'" semantics.  Inspired by
51432         the problem and discussion in https://bugs.gnu.org/24116#11.
51434 2016-08-02  Ján Tomko  <jtomko@redhat.com>
51436         maint.mk: expand the prohibit_doubled_word regex
51437         This check has a static list of words that are checked for
51438         repetitions.  Expand it before running the perl script to
51439         avoid using expensive captures.  This decreases the cost
51440         for libvirt from 1.66s to 0.66s.
51441         * top/maint.mk (prohibit_doubled_word_expanded_): Define.
51442         (sc_prohibit_doubled_word): Use it.
51444 2016-07-26  Ján Tomko  <jtomko@redhat.com>
51446         useless-if-before-free: skip non-matching lines early
51447         * build-aux/useless-if-before-free: First match each line with the
51448         simple/quick /\bif\b/ and reject if there is no match. This often
51449         saves the cost of the much more involved regular expression.
51450         For libvirt, this decreases the cost from 1.44s to 1.02s.
51452 2016-07-26  Ján Tomko  <jtomko@redhat.com>
51454         maint.mk: speed up sc_po_check
51455         sc_po_check would skip files based on their names, or on the
51456         existence of files with derived names. Rewrite it to use perl
51457         instead of shell to make the check faster.
51458         * top/maint.mk (perl_translatable_files_list_): Define.
51459         (sc_po_check): Use it.
51461 2016-07-30  Ján Tomko  <jtomko@redhat.com>
51463         maint.mk: speed up require_config_h_first
51464         Instead of spawning three processes per file,
51465         rewrite the check in perl and run it once for all the files.
51466         * top/maint.mk (perl_config_h_first_): Define.
51467         (sc_require_config_h_first): Use it in place of shell code.
51469 2016-07-26  Ján Tomko  <jtomko@redhat.com>
51471         maint.mk: speed up sc_po_check
51472         sc_po_check would skip files based on their names, or on the
51473         existence of files with derived names. Rewrite it to use perl
51474         instead of shell to make the check faster.
51475         * top/maint.mk (perl_translatable_files_list_): Define.
51476         (sc_po_check): Use it.
51478 2016-07-15  Paul Eggert  <eggert@cs.ucla.edu>
51480         obstack: pacify GCC 6 with -Wnull-dereference
51481         Problem reported by Assaf Gordon in:
51482         http://lists.gnu.org/r/bug-gnulib/2016-07/msg00028.html
51483         * lib/obstack.c, lib/obstack.h (obstack_alloc_failed_handler):
51484         Declare with __attribute_noreturn__.
51485         * lib/obstack.h (__attribute_noreturn__): New macro.
51487 2016-07-13  Eric Blake  <eblake@redhat.com>
51489         doc: mention glibc, OS X, Cygwin [S]SIZE_MAX buglet
51490         * doc/posix-headers/stdint.texi (stdint.h): Document the bugs.
51491         * doc/posix-headers/limits.texi (limits.h): Document the bugs.
51493 2016-07-13  Paul Eggert  <eggert@cs.ucla.edu>
51495         doc: mention glibc SSIZE_MAX buglet
51496         * doc/posix-headers/limits.texi (limits.h): Document the bug.
51498 2016-07-04  Martin Kletzander  <mkletzan@redhat.com>
51500         printf-posix: Fix mingw build
51501         Commit 54615b95ff238e235e806855efc46a9abad09f2e changed the regular
51502         expression for detecting C symbol prefixes but forgot to qoute square
51503         brackets in the command line arguments for grep.  That way when
51504         building with mingw the condition was false although it ought to be
51505         true instead.  In particular scenarios this led to the following
51506         compile error:
51508             Cannot export rpl_printf: symbol not found
51509             Cannot export rpl_scanf: symbol not found
51510             collect2: error: ld returned 1 exit status
51512         Fix this by properly quoting square brackets.
51514 2016-07-03  Paul Eggert  <eggert@cs.ucla.edu>
51516         mktime: call tzset as per POSIX
51517         Problem reported by Ludovic Courtès in:
51518         http://lists.gnu.org/r/bug-gnulib/2016-06/msg00068.html
51519         * lib/mktime.c (mktime) [!_LIBC && HAVE_TZSET]: Call tzset.
51520         * m4/mktime.m4 (gl_FUNC_MKTIME): Check for tzset.
51522 2016-06-26  Pádraig Brady  <P@draigBrady.com>
51524         fts: handle readdir() errors
51525         * lib/fts.c (fts_build): readdir(3) returns NULL when finished,
51526         but also upon error when it will also set errno.  Therefore
51527         flag the error case from readdir().  We treat the case where
51528         no items are read the same as if the dir can't be accessed,
51529         i.e. by setting fts_errno to FTS_DNR.
51531 2016-06-24  Paul Eggert  <eggert@cs.ucla.edu>
51533         intprops: port better to GCC 7
51534         GCC 7 __builtin_add_overflow supports a new usage form, where the
51535         last argument is a null pointer, and which merely returns 1 if an
51536         overflow would occur.  This is a constant expression if all
51537         arguments are constants, and should generate faster code when code
51538         needs to be generated.
51539         * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_WITH_NULL): New macro.
51540         (_GL_ADD_OVERFLOW, _GL_SUBTRACT_OVERFLOW, _GL_MULTIPLY_OVERFLOW):
51541         Use builtin operations if available.
51542         (INT_NEGATE_OVERFLOW): Prefer INT_SUBTRACT_OVERFLOW if builtin
51543         operations are available, as it's almost surely faster.
51545 2016-06-23  Paul Eggert  <eggert@cs.ucla.edu>
51547         intprops-test: port to GCC 6
51548         * tests/test-intprops.c: Ignore -Woverflow if any GCC version,
51549         since the bug is not fixed in GCC 6.1.
51551 2016-06-13  Paul Eggert  <eggert@cs.ucla.edu>
51553         xalloc-oversized: port to GCC 7; fewer warnings
51554         GCC 7 will have a better way to deal with integer overflow.
51555         Plus, fix a warnings problem reported by Tim Ruehsen in:
51556         http://lists.gnu.org/r/bug-gnulib/2016-06/msg00022.html
51557         * lib/xalloc-oversized.h (__xalloc_oversized): New macro.
51558         (xalloc_oversized): Use plain __builtin_mul_overflow if GCC 7 or later.
51559         For GCC 5, use __xalloc_oversized if both args are constants,
51560         or if pedantic.
51562 2016-06-08  Paul Eggert  <eggert@cs.ucla.edu>
51564         regex: port to Sun C
51565         Reported by Daiki Ueno.
51566         * lib/regcomp.c (regcomp, regerror): Use _Restrict_, not
51567         __restrict, in prototype.  This fixes a problem I introduced in
51568         the 2016-02-19 merge from glibc.
51570 2016-05-31  Paul Eggert  <eggert@cs.ucla.edu>
51572         stdbool: Restore __bool_true_false_are_defined check
51573         * m4/stdbool.m4 (AC_CHECK_HEADER_STDBOOL):
51574         __bool_true_false_are_defined is still defined, even with C++11.
51576 2016-05-31  David Seifert  <soap@gentoo.org>  (tiny change)
51578         stdbool: Port AC_CHECK_HEADER_STDBOOL to C++11
51579         * m4/stdbool.m4 (AC_CHECK_HEADER_STDBOOL): Port to C++11.
51581 2016-05-30  Paul Eggert  <eggert@cs.ucla.edu>
51583         Use GCC_LINT, not lint
51584         FreeBSD and Cygwin #define _Noreturn to empty if 'lint' is defined.
51585         Problem reported by Ken Brown in: http://bugs.gnu.org/23640
51586         * doc/posix-headers/stdnoreturn.texi (stdnoreturn.h):
51587         Document problem with lint and _Noreturn.
51588         * lib/diffseq.h (IF_LINT, IF_LINT2):
51589         * lib/fts.c (sccsid):
51590         * lib/getndelim2.c (IF_LINT):
51591         * lib/gl_anylinked_list2.h (gl_linked_iterator)
51592         (gl_linked_iterator_from_to):
51593         * lib/gl_anytree_list2.h (gl_tree_iterator)
51594         (gl_tree_iterator_from_to):
51595         * lib/gl_anytree_oset.h (gl_tree_iterator):
51596         * lib/gl_array_list.c (gl_array_iterator)
51597         (gl_array_iterator_from_to):
51598         * lib/gl_array_oset.c (gl_array_iterator):
51599         * lib/gl_carray_list.c (gl_carray_iterator)
51600         (gl_carray_iterator_from_to):
51601         * lib/idcache.c:
51602         * lib/inet_ntop.c (IF_LINT):
51603         * lib/regcomp.c (build_charclass_op, create_tree):
51604         * lib/regex_internal.c (re_acquire_state)
51605         (re_acquire_state_context):
51606         * lib/trigl.c (rcsid):
51607         * lib/trim.c (IF_LINT):
51608         * lib/vasnprintf.c (IF_LINT):
51609         * lib/verify.h (assume):
51610         Treat GCC_LINT like lint.
51612 2016-05-29  Bruno Haible  <bruno@clisp.org>
51614         secure_getenv: Port to many more platforms.
51615         * m4/secure_getenv.m4 (gl_PREREQ_SECURE_GETENV): Also check for get*id
51616         functions.
51617         * lib/secure_getenv.c (secure_getenv): Add alternate implementations
51618         for non-BSD Unix platforms and for native Windows.
51619         * doc/glibc-functions/secure_getenv.texi: Remove known issue.
51620         Prompted by a request from Nikos Mavrogiannopoulos.
51622 2016-05-27  Eric Blake  <eblake@redhat.com>
51624         canonicalize: Fix broken probe for realpath.
51625         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Fix regression
51626         in logic introduced in 54615b95.
51628 2016-05-26  Eric Blake  <eblake@redhat.com>
51630         unsetenv: relax to LGPLv2+
51631         * modules/unsetenv (License): Match setenv license.
51633 2016-05-20  Ludovic Courtès  <ludo@gnu.org>
51635         gendocs.sh: Set default TOP_NODE_UP_URL in HTML output.
51636         Suggested by Gavin Smith <gavinsmith0123@gmail.com>.
51637         Reported by myglc2 <myglc2@gmail.com> in <http://bugs.gnu.org/22651>.
51638         * build-aux/gendocs.sh (MANUAL_TITLE, PACKAGE, EMAIL)
51639         (commonarg, dirargs, dirs, infoarg, generate_ascii)
51640         (generate_html, generate_info, generate_tex, outdir)
51641         (source_extra, split, srcfile, texarg): Move above 'version'.
51642         (htmlarg): Likewise, and add "-c TOP_NODE_UP_URL=/manual".
51644 2016-05-17  Paul Eggert  <eggert@cs.ucla.edu>
51646         manywarnings: update for GCC 6.1
51647         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
51648         Add GCC 6.1 options that apply to C.
51649         * build-aux/gcc-warning.spec: Add GCC 6.1 options that
51650         do not apply to C, are obsolescent, etc.
51652 2016-05-12  Paul Eggert  <eggert@cs.ucla.edu>
51654         glob: size_t overflow checks
51655         * lib/glob.c (__has_builtin): New macro.
51656         (size_add_wrapv, glob_use_alloca): New static functions.
51657         (glob, glob_in_dir): Check for size_t overflow in several places,
51658         and fix some size_t checks that were not quite right.
51660         glob: don't assume INT_MAX < SIZE_MAX
51661         * lib/glob.c (glob): Prefer SIZE_MAX to ~((size_t) 0), as the
51662         latter is not portable to (probably theoretical) hosts where
51663         SIZE_MAX <= INT_MAX.
51665 2016-05-09  Bruno Haible  <bruno@clisp.org>
51667         Fix undefined behaviour in gettext.h.
51668         * lib/gettext.h (dcpgettext_expr, dcnpgettext_expr): Avoid accessing a
51669         pointer's value after the storage it points to has been freed.
51670         Reported by Michael Pyne in https://savannah.gnu.org/bugs/?47847.
51671         Spotted by Coverity.
51673 2016-05-08  Paul Eggert  <eggert@cs.ucla.edu>
51675         git-version-gen: avoid undefined shift
51676         Problem reported by Mosè Giordano in:
51677         http://lists.gnu.org/r/bug-gnulib/2016-05/msg00012.html
51678         * build-aux/git-version-gen: Avoid undefined behavior if invoked
51679         with --prefix or --fallback but without a later argument.  While
51680         we're at it, omit unnecessary quotes.
51682 2016-05-04  Paul Eggert  <eggert@cs.ucla.edu>
51684         glob: merge glibc changes into lib/glob.c
51685         * lib/glob.c (glob_in_dir): Sync with glibc/posix/glob.c,
51686         dated 2016-05-04 12:09:35 2016 +0200.  Here are the changes:
51687         2016-05-04 CVE-2016-1234: glob: Do not copy d_name field of
51688           struct dirent [BZ #19779]
51689         2016-04-29 glob: Simplify the interface for the GLOB_ALTDIRFUNC
51690           callback gl_readdir
51691         2015-10-20 Convert miscellaneous function definitions to prototype style
51692         2015-10-20 Convert 113 more function definitions to prototype style
51693           (files with assertions)
51694         2015-06-12 Fix getlogin_r namespace (bug 18527).
51695         2014-02-10 Use glibc_likely instead __builtin_expect.
51696         2013-10-20 When glob pattern contains a trailing slash match only
51697           directories. Fixes bug 10278.
51698         2013-09-04 glob: silence -Wattribute warnings
51699         2013-06-07 Avoid use of "register" as optimization hint.
51700         2012-09-25 Use size_t instead of int for internal variables in glob
51701           (bug 14621)
51702         2011-07-20 Check for overflows in expressions
51703         2011-05-28 Remove unused variable
51704         2011-05-22 Add a few more alloca size checks
51705         2010-03-27 Whitespace fixes
51706         2010-03-27 Fix one more issue with the glob patch
51707         2010-03-24 Fix glob with empty pattern
51708         2008-05-27 Remove useless more "if" tests before "free"
51709         * modules/glob (Depends-on): Add stdint.
51711 2016-05-01  Paul Eggert  <eggert@cs.ucla.edu>
51713         mktime: port to stricter signed overflow checking
51714         * lib/mktime.c: Omit 'pragma GCC optimize ("wrapv")'.
51715         (long_int): Require width for INT_MAX * 3 * (seconds per year),
51716         instead of merely for INT_MAX * 2.  In practice platforms that
51717         do the latter also do the former.
51718         (TIME_T_MIN, TIME_T_MAX, TIME_T_MIDPOINT, SHR): Remove.
51719         (shr): New static function, replacing SHR.  All uses changed.
51720         (mktime_min, mktime_max): New constants, replacing TIME_T_MIN
51721         and TIME_T_MAX.  All uses changed.
51722         (ydhms_diff, guess_time_tm, ranged_convert, __mktime_internal):
51723         Use long_int, not time_t.
51724         (long_int_avg): New static function, replacing time_t_avg.
51725         All uses changed.  Round toward positive infinity, as that
51726         generates slightly better code.
51727         (time_t_add_ok, time_t_int_add_ok): Remove.  All uses replaced
51728         by INT_ADD_WRAPV.
51729         (guess_time_tm): Accept time, not a pointer to it.  All uses changed.
51730         (convert_time): New static function.
51731         (ranged_convert): Use it
51732         (ranged_convert): Check for *T out of [mktime_min, mktime_max] range.
51733         Use simpler test for loop exit.
51734         (__mktime_internal): Store negative of guessed offset, to simplify
51735         overflow checking.  Remove no-longer-needed test for small time_t
51736         overflows.
51738         mktime: speed up DEBUG_MKTIME benchmarks
51739         Call tzset just once, at the start, rather than for every test
51740         case.  This lets us measure the CPU cost of mktime as opposed to
51741         that of tzset.  This is relevant when TZ is not set and glibc is
51742         being used.  This speeds up tests by a factor of 40 on my Fedora
51743         23 x86-64 platform.
51744         * lib/mktime.c (main) [DEBUG_MKTIME]: Call localtime at the start,
51745         to call tzset and as a sanity check.  Later on, use localtime_r
51746         instead of localtime.
51748         mktime: resurrect DEBUG_MKTIME testing
51749         * lib/mktime.c [DEBUG_MKTIME]: Do not include <config.h>.
51750         Include <string.h>, for strcmp.
51752         mktime: simplify DEBUG_MKTIME
51753         * lib/mktime.c (DEBUG_MKTIME): Define to 0 if not defined.
51754         Simplify later usage accordingly.
51756         Port mktime_internal offset to unsigned time_t
51757         This avoids some assumptions about wraparound arithmetic on
51758         signed integer overflow.
51759         * lib/mktime-internal.h (mktime_offset_t): New type.
51760         (mktime_internal): Use it in decl.
51761         * lib/mktime.c, lib/timegm.c (mktime_offset_t) [_LIBC]: New type.
51763         * lib/mktime.c (__mktime_internal, localtime_offset):
51764         * lib/timegm.c (timegm): Use it.
51765         * m4/mktime.m4 (gl_TIME_T_IS_SIGNED): New macro.
51766         (gl_FUNC_MKTIME): Require it.
51768 2016-04-27  Paul Eggert  <eggert@cs.ucla.edu>
51770         xstrtol: prohibit monstrosities like "1bB"
51771         Problem reported by Young Mo Kang in: http://bugs.gnu.org/23388
51772         * lib/xstrtol.c (__xstrtol): Allow trailing second suffixes like
51773         "B" only if the first suffix needs a base.
51774         * tests/test-xstrtol.sh: Test this.
51776 2016-04-21  Pádraig Brady  <P@draigBrady.com>
51778         xstrtod: reinstate setting of *result upon ERANGE
51779         * lib/xstrtod.c (XSTRTOD): The user may decide to use
51780         the returned limits upon ERANGE, so allow and document that.
51782 2016-04-20  Tino Calancha  <f92capac@gmail.com>  (tiny change)
51784         xstrtod: modify *result only if no errors
51785         * lib/xstrtod.c (XSTRTOD).
51787 2016-04-19  Paul Eggert  <eggert@cs.ucla.edu>
51789         btowc: document problems in C locale
51790         * doc/posix-functions/btowc.texi (btowc): Mention incompatibility
51791         with mbrtowc.  See: http://bugs.gnu.org/23269#32
51793 2016-04-13  Paul Eggert  <eggert@cs.ucla.edu>
51795         mktime: improve integer overflow checking
51796         * lib/mktime.c: Include stdbool.h, intprops.h, verify.h.
51797         (WRAPV): Remove; no longer needed.
51798         (verify): Remove.  Replace all uses with call to verify.h 'verify'.
51799         (TYPE_IS_INTEGER, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
51800         Remove.  Use intprops.h defns instead.
51801         (leapyear, isdst_differ, time_t_add_ok, time_t_int_ok):
51802         Use bool for Boolean, for clarity.
51803         (time_t_add_ok, time_t_int_add_ok): Use INT_ADD_WRAPV to
51804         detect integer overflow.
51805         * modules/mktime (Depends-on): Add intprops, stdbool, verify.
51807         intprops: check two's complement assumption
51808         Suggested by Eric Blake in:
51809         http://lists.gnu.org/r/bug-gnulib/2016-04/msg00016.html
51810         * lib/intprops.h: Include <verify.h>.  Verify that signed char,
51811         short, int, long, and (if available) long long are two's complement.
51812         * modules/intprops (Depends-on): Add 'verify'.
51814         intprops, mktime, strtol: assume two's complement
51815         These macros were not portable to every conforming C11 ones'
51816         complement platform.  It's not worth the hassle of porting to some
51817         platforms that use ones' complement or signed magnitude, as such
51818         platforms are almost purely theoretical nowadays and porting even
51819         to some of them makes the code harder to review for little
51820         practical benefit.  Problem reported by Florian Weimer in:
51821         https://sourceware.org/ml/libc-alpha/2016-04/msg00295.html
51822         * lib/intprops.h (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT)
51823         (TYPE_SIGNED_MAGNITUDE, _GL_INT_TWOS_COMPLEMENT):
51824         * lib/mktime.c (TYPE_TWOS_COMPLEMENT):
51825         * lib/strtol.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT)
51826         (TYPE_SIGNED_MAGNITUDE):
51827         Remove.  All uses rewritten to assume two's complement, which is
51828         all we can reasonably test nowadays anyway.
51829         * top/maint.mk (_intprops_names): Remove the removed macros.
51831 2016-04-11  Paul Eggert  <eggert@cs.ucla.edu>
51833         stdint: port to strict C11 left shift
51834         * lib/stdint.in.h (_STDINT_MIN, _STDINT_MAX):
51835         Pacify clang -Wshift-negative-value, which should be an issue only
51836         on clang setups where stdint.h does not conform to C11 or to C++11.
51837         Problem reported by Philipp Stephani in: http://bugs.gnu.org/23261
51839 2016-04-09  Paul Eggert  <eggert@penguin.cs.ucla.edu>
51841         mbrtowc: work around glibc bug#19932
51842         Fix mbrtowc so that it never returns -1 in the C locale,
51843         as this conflicts with a future version of POSIX
51844         http://austingroupbugs.net/view.php?id=663#c2738
51845         and causes problems with GNU grep: http://bugs.gnu.org/23234
51846         See glibc bug 19932:
51847         https://sourceware.org/bugzilla/show_bug.cgi?id=19932
51848         * doc/posix-functions/mbrlen.texi (mbrlen):
51849         * doc/posix-functions/mbrtowc.texi (mbrtowc):
51850         Document the glibc bug.
51851         * lib/mbrtowc.c [C_LOCALE_MAYBE_EILSEQ]:
51852         Include hard-locale.h, locale.h.
51853         (rpl_mbrtowc): Work around the C_LOCALE_MAYBE_EILSEQ bug,
51854         if the bug is possible.
51855         * m4/mbrtowc.m4 (gl_MBRTOWC_C_LOCALE): New macro.
51856         (gl_FUNC_MBRTOWC): Use it, and define C_LOCALE_MAYBE_EILSEQ as needed.
51857         * modules/hard-locale (License): Now LGPLv2+, for mbrtowc.
51858         * modules/mbrtowc (Depends-on): Add hard-locale.
51859         * modules/mbrtowc-tests (Files, TESTS): Add tests/test-mbrtowc5.sh.
51860         * tests/test-mbrtowc.c (main): Test for bug fix if arg is '5'.
51861         * tests/test-mbrtowc5.sh: New file.
51863 2016-04-03  Pedro Alves  <palves@redhat.com>
51865         stdint: detect good enough pre-C++11 stdint.h in C++ mode
51866         When gnulib is configured in C++ mode for a system with a working C99
51867         implementation of stdint.h that predates C++11, gnulib ends up
51868         substituting stdint.h anyway.  This works on most targets, but on e.g.,
51869         64-bit MinGW, it doesn't, as gnulib's substitute assumes LP64, while
51870         MinGW is LLP64.  Instead of trying to detect the right types, detect
51871         good-enough-pre-C++11 stdint.h and in such case define
51872         __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS in config.h.
51873         * m4/stdint.m4 (gl_STDINT_H): Always define __STDC_CONSTANT_MACROS
51874         / __STDC_LIMIT_MACROS while checking whether the system stdint.h
51875         conforms to C99.  If it does, check whether it hides symbols
51876         behind the __STDC_{CONSTANT|LIMIT}_MACROS macros.  Then if it
51877         does, define those macros in config.h.
51879 2016-04-03  Paul Eggert  <eggert@cs.ucla.edu>
51881         argp: merge changes from glibc
51882         Among other things, this should fix problems found by a Coverity
51883         scan and reported by Andrei Borzenkov:
51884         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00015.html
51885         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00016.html
51886         * lib/argp-ba.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h:
51887         * lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h:
51888         * lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c:
51889         * lib/argp.h:
51890         Merge changes from glibc.
51891         * tests/test-argp-2.sh: Adjust to match new behavior.
51893 2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
51895         stddef: support configuring with g++
51896         Problem reported by Ángel González in:
51897         http://lists.gnu.org/r/bug-gnulib/2016-04/msg00003.html
51898         * lib/stddef.in.h (_GL_STDDEF_ALIGNAS, max_align_t):
51899         Do not define if _GCC_MAX_ALIGN_T is defined.
51901 2016-03-25  Paul Eggert  <eggert@cs.ucla.edu>
51903         test-framework-sh: minor cleanups
51904         * tests/init.sh (testdir_prefix_): Output a trailing newline,
51905         since strictly speaking POSIX requires this.
51906         (setup_): Do not use the variable 'fail', as that makes the
51907         trace output harder to read ('fail' is typically used by
51908         tests to mean the test failed).  Treat // portably.
51909         Check that new directory is not merely a sibling of the tmp dir.
51910         Avoid unnecessary invocation of tr.
51912         test-framework-sh: revert port to NetBSD 7.0
51913         It was a false alarm; I misinterpreted Assaf Gordon's report.
51914         * tests/init.sh (testdir_prefix_, pfx_, template_length_):
51915         Restore.
51916         (test_dir_): Adjust to mktempd_ change.
51917         (mktempd_): Restore 2nd arg.  Use -t again.
51918         (base_template_, template_, nx_): Resurrect old code.
51920         Port better to Alpine Linux
51921         Its diff implementation does not support -c, but does support -U3.
51922         Problem reported by Assaf Gordon in: http://bugs.gnu.org/23107#13
51923         * tests/init.sh (diff_opt_): New var.
51924         (compare_): Prefer diff -U3 to diff -c to plain diff.
51926 2016-03-24  Paul Eggert  <eggert@cs.ucla.edu>
51928         test-framework-sh: port to NetBSD 7.0
51929         Problem reported by Assaf Gordon in: http://bugs.gnu.org/23107#13
51930         * tests/init.sh (testdir_prefix_, pfx_, template_length_):
51931         Remove.  All uses removed.
51932         (test_dir_): Adjust to mktempd_ change.
51933         (mktempd_): Omit 2nd arg.  Stop using -t, as it is not portable.
51934         (base_template_, template_, nx_): Simplify by hardcoding.
51936 2016-03-22  Paul Eggert  <eggert@cs.ucla.edu>
51938         gitlog-to-changelog: suppress ignored chatter
51939         * build-aux/gitlog-to-changelog: Do not warn about skipping
51940         an SHA if it would have been ignored anyway.
51942 2016-03-22  Geert Janssens  <janssens-geert@telenet.be>
51944         setlocale: add "sv" to Windows language table
51945         * lib/setlocale.c (language_table) [W32]: Add "sv".
51946         Reported in <https://savannah.gnu.org/bugs/?44588>.
51948 2016-03-21  Paul Eggert  <eggert@cs.ucla.edu>
51950         sys_select: port to new Cygwin
51951         Problem reported by Ken Brown in:
51952         https://lists.gnu.org/r/bug-gnulib/2016-03/msg00054.html
51953         * lib/sys_select.in.h [__CYGWIN__]: Avoid "unknown type name"
51954         diagnostics.
51956 2016-03-17  Jim Meyering  <meyering@fb.com>
51958         test-userspec.c: do not trigger gcc's new -Wmisleading-indentation
51959         * tests/test-userspec.c (main): Remove unnecessary braces and fix
51960         misleading indentation. Here is the diagnostic gcc-6.0-to-be issued:
51961           test-userspec.c:176:9: error: statement is indented as if it were \
51962             guarded by... [-Werror=misleading-indentation]
51963                    {
51964                    ^
51965           test-userspec.c:173:7: note: ...this 'if' clause, but it is not
51966                  if (!diag && !T[i].result)
51967                  ^~
51969 2016-03-15  Paul Eggert  <eggert@cs.ucla.edu>
51971         time_rz: port to clang -Wunused-const-variable
51972         * lib/time_rz.c (TZ): Remove.  All uses removed.
51974         std-gnu11: improve clang support
51975         * m4/std-gnu11.m4: Sync with autoconf, incorporating:
51976         2016-03-15 Also try clang
51977         2016-03-15 Port C11 and C++11 testing to clang
51979         select: port more to Intel 2016.1.150 compiler
51980         Problem reported by Balázs Hajgató in:
51981         http://lists.gnu.org/r/bug-gnulib/2016-03/msg00036.html
51982         * m4/select.m4 (gl_FUNC_SELECT): Require AC_C_RESTRICT.
51984 2016-03-14  Paul Eggert  <eggert@cs.ucla.edu>
51986         select: try to port to 2016.1.150 compiler
51987         Problem reported by Balázs Hajgató in:
51988         http://lists.gnu.org/r/bug-gnulib/2016-03/msg00026.html
51989         * lib/sys_select.in.h (select): Use 'restrict' on arguments where
51990         POSIX specifies 'restrict'.
51992 2016-03-13  Paul Eggert  <eggert@cs.ucla.edu>
51994         localename-tests: memory allocation fixes
51995         * tests/test-localename.c (test_locale_name)
51996         (test_locale_name_thread): Don't call freelocale on a locale
51997         that was the base of a successful newlocale, as that
51998         results in a double free.  Problem reported by Assaf Gordon.
51999         (test_locale_name_thread): Free saved names after use, to pacify
52000         gcc -fsanitize=address.
52002 2016-03-08  Paul Eggert  <eggert@cs.ucla.edu>
52004         intprops: make .h file license match module
52005         * lib/intprops.h: Change the license wording to match glibc format.
52006         This is what is in modules/intprops anyway.  See:
52007         https://sourceware.org/bugzilla/show_bug.cgi?id=19738#c8
52009 2016-03-08  Eric Blake  <eblake@redhat.com>
52011         acl: fix missing return on Cygwin
52012         * lib/set-permissions.c (set_acls) [HAVE_FACL && GETACL]: Don't
52013         fall off end of function. Fixes http://bugs.gnu.org/22949
52015 2016-03-05  Bruno Haible  <bruno@clisp.org>
52017         extern-inline: port to PGI CC
52018         * m4/extern-inline.m4 (gl_EXTERN_INLINE): For PGI CC, don't use the
52019         keyword 'inline'.
52020         Reported by Adam James Stewart in:
52021         http://lists.gnu.org/r/bug-gnulib/2016-03/msg00006.html
52023 2016-02-20  Paul Eggert  <eggert@cs.ucla.edu>
52025         signbit: port back to pre-C++11 GCC
52026         * lib/math.in.h (signbit): Do previous change only if
52027         __cplusplus < 201103.  See Jonathan Wakely in:
52028         https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/UY3VX3W7XEXYTUKHG5BALU4ACUD7ZLGE/
52030 2016-02-19  Kamil Dudka  <kdudka@redhat.com>
52032         mountlist: recognize autofs-mounted remote file systems, too
52033         Originally reported at: https://bugzilla.redhat.com/1309247
52034         * lib/mountlist.c (ME_REMOTE): Return true if a file system is named
52035         "-hosts" because it is used by autofs to mount remote file systems.
52037 2016-02-19  Paul Eggert  <eggert@cs.ucla.edu>
52039         signbit: port to C++ with GCC 6
52040         * lib/math.in.h (signbit) [__cplusplus]:
52041         Do not replace with GCC builtin.  Reported by Orion Poplawski in:
52042         http://lists.gnu.org/r/bug-gnulib/2016-02/msg00005.html
52044         * lib/regex_internal.h (IDX_MAX) [_REGEX_LARGE_OFFSETS]: Now SSIZE_MAX.
52046         regex: make it closer to libc
52047         Make Idx a signed type, rather than possibly unsigned.
52048         The unsignedness was not really buying us anything, since the code
52049         overflows for other reasons before getting to PTRDIFF_MAX.  Making
52050         it signed allows us to use -1 and -2 with abandon, like libc does,
52051         thus lessening the number of differences between gnulib and libc.
52052         Also, it should help avoid gratuitous warnings like the one
52053         reported by Nelson H. F. Beebe in: http://bugs.gnu.org/22702
52054         * lib/regex.h (__re_idx_t): Remove.  All uses changed to regoff_t.
52057         regex: merge patches from libc
52059         2015-10-21  Joseph Myers  <joseph@codesourcery.com>
52060         2015-10-20  Joseph Myers  <joseph@codesourcery.com>
52061         Convert miscellaneous function definitions to prototype style.
52062         * lib/regcomp.c (re_compile_pattern, re_set_syntax)
52063         (re_compile_fastmap, regcomp, regerror, regfree, re_comp):
52064         * lib/regexec.c (regexec, re_match, re_search, re_match_2, re_search_2)
52065         (re_search_2_stub, re_search_stub, re_set_registers, re_exec)
52066         (re_search_internal):
52067         Convert to prototype-style function definition.
52068         Use internal_function for internal functions.
52070 2016-02-10  Paul Eggert  <eggert@cs.ucla.edu>
52072         stdalign: port to older HP and IBM cc
52073         * lib/stdalign.in.h (_Alignas): Port better to older HP and IBM
52074         C compilers, by checking their version numbers.  These version
52075         numbers appear in MariaDB and in Qt code that dates way back and
52076         that conditiionally uses the 'aligned' attribute.
52078 2016-02-09  Paul Eggert  <eggert@cs.ucla.edu>
52080         stdalign: port to clang 3.7.0
52081         Problem reported by Herbert J. Skuhra in:
52082         http://lists.gnu.org/r/emacs-devel/2016-02/msg00476.html
52083         * lib/stdalign.in.h (alignas): Fix typo that prevented 'alignas'
52084         from being defined on clang 3.7.0, which has a buggy stdalign.h.  See:
52085         https://llvm.org/bugs/show_bug.cgi?id=26547
52087 2016-02-08  Paul Eggert  <eggert@cs.ucla.edu>
52089         readdir_r: now obsolescent
52090         * doc/posix-functions/readdir_r.texi (readdir_r): Now obsolescent.
52091         * lib/mountlist.c (read_file_system_list): Add a FIXME.
52093 2016-02-06  Paul Eggert  <eggert@cs.ucla.edu>
52095         misc: port better to gcc -fsanitize=address
52096         Without these patches, ./configure CFLAGS='-fsanitize=address'
52097         would compute incorrect values.  This patch fixes some (but not all)
52098         test failures with recent glibc, with this configuration.
52099         * m4/acl.m4 (gl_ACL_GET_FILE):
52100         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF):
52101         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS):
52102         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO):
52103         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE):
52104         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
52105         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
52106         * m4/getgroups.m4 (gl_FUNC_GETGROUPS):
52107         * m4/getline.m4 (gl_FUNC_GETLINE):
52108         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF):
52109         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF):
52110         * m4/regex.m4 (gl_REGEX):
52111         * m4/strndup.m4 (gl_FUNC_STRNDUP):
52112         * tests/test-calloc-gnu.c (main):
52113         * tests/test-duplocale.c (main):
52114         * tests/test-getgroups.c (main):
52115         * tests/test-getline.c (main):
52116         * tests/test-inttostr.c (main):
52117         * tests/test-localename.c (test_locale_name)
52118         (test_locale_name_thread, test_locale_name_environ)
52119         (test_locale_name_default):
52120         * tests/test-regex.c (main):
52121         * tests/test-setlocale1.c (main):
52122         * tests/test-stat.h (test_stat_func):
52123         Free heap-allocated storage before exiting.
52124         * m4/asm-underscore.m4 (gl_ASM_SYMBOL_PREFIX):
52125         Don't match *_foo symbols inserted by AddressSanitizer.
52126         * tests/test-regex.c, tests/test-stat.c: Include stdlib.h, for 'free'.
52128 2016-02-02  Jim Meyering  <meyering@fb.com>
52130         verify-tests: also remove stray test-verify.Tpo
52131         * modules/verify-tests (Makefile.am): Arrange for "make clean"
52132         to remove the test-verify.Tpo file that is left behind by
52133         the automake-generated rule upon compilation failure.
52134         Otherwise, that .Tpo file would cause a failed "make distcheck"
52135         at least for grep.
52137 2016-02-02  Paul Eggert  <eggert@cs.ucla.edu>
52139         std-gnu11: new module
52140         This makes it easier for applications to prefer C11 and C++11
52141         to older variants, when compiling C and C++ code.
52142         Unlike most m4/*.m4 files, m4/std-gnu11.m4 is GPLed, as it copies
52143         a nontrivial chunk of GPLed Autoconf source code.
52144         * COPYING: Mention the m4/*.m4 copyright situation.
52145         * MODULES.html.sh (std-gnu11): New module.
52146         * m4/std-gnu11.m4, modules/std-gnu11: New files.
52148 2016-01-25  Paul Eggert  <eggert@cs.ucla.edu>
52150         get-permissions, strftime: fix grammar in comments
52151         * lib/get-permissions.c, lib/strftime.c: Merge into the comments
52152         some grammar fixes Alan Mackenzie made to GNU Emacs.
52154 2016-01-25  Daiki Ueno  <ueno@gnu.org>
52156         gettext: mark as obsolete
52157         Suggested by Paul Eggert in:
52158         https://lists.gnu.org/r/bug-gnulib/2016-01/msg00101.html
52159         * modules/gettext (Status): Mark as obsolete.
52160         (Notice): Suggest to use 'gettext-h' instead.
52161         * modules/gettext-h (Description): Suggest GNU gettext, instead of
52162         the 'gettext' module.
52164 2016-01-24  Paul Eggert  <eggert@cs.ucla.edu>
52166         gnulib-tool: don't give up on ln -s so easily
52167         * gnulib-tool (func_ln_s): Don't give up on a later ln -s merely
52168         because an earlier one failed.  The targets could be on different
52169         file systems.  Problem reported by KO Myung-Hun in:
52170         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00081.html
52172         closedir: fix OS/2-related typos
52173         Problem reported by KO Myung-Hun in:
52174         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00107.html
52175         * m4/closedir.m4 (gl_FUNC_CLOSEDIR): Fix a couple of typos
52176         in the last couple of changes.
52178 2016-01-24  KO Myung-Hun  <komh78@gmail.com>
52180         openat_proc_name: fix that last '/' is overwritten on OS/2 kLIBC
52181         * lib/openat-proc.c (openat_proc_name): Increase dirlen by 1 after
52182         copying a directory.
52184 2016-01-24  Paul Eggert  <eggert@cs.ucla.edu>
52186         regex: treat [x] as x if x is a unibyte encoding error
52187         Problem reported by Aharon Robbins in:
52188         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00091.html
52189         * lib/regcomp.c (parse_byte) [!_LIBC && RE_ENABLE_I18N]: New function.
52190         (build_range_exp) [!_LIBC && RE_ENABLE_I18N]: Use it.
52192         closedir, dirfd, opendir: port to OpenSolaris 5.10
52193         * m4/closedir.m4 (gl_FUNC_CLOSEDIR):
52194         * m4/dirfd.m4 (gl_FUNC_DIRFD):
52195         * m4/opendir.m4 (gl_FUNC_OPENDIR):
52196         Don't use ${word##pat} substitution, as it doesn't work in
52197         OpenSolaris 5.10 /bin/sh.  Problem reported by Assaf Gordon in:
52198         http://bugs.gnu.org/22443#11
52200 2016-01-23  Paul Eggert  <eggert@cs.ucla.edu>
52202         bootstrap: use American spelling
52203         * build-aux/bootstrap: Honor American spelling.
52205 2016-01-22  Karl Berry  <karl@freefriends.org>
52207         * doc/posix-functions/localtime.texi,
52208         * doc/posix-functions/localtime_r.texi: @item needed for @itemize text.
52210 2016-01-21  Bruno Haible  <bruno@clisp.org>
52212         hash-pjw-bare: fix comment
52213         * lib/hash-pjw-bare.h (hash_pjw_bare): Fix comment.
52215         wcwidth: Replace also on OpenBSD 5.8
52216         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Check the value of wcwidth(0xFF1A).
52217         * doc/posix-functions/wcwidth.texi: Update.
52219 2016-01-20  Pádraig Brady  <P@draigBrady.com>
52221         gnu-web-doc-update: fix addition of new files
52222         If there were already added (emnpty) dirs,
52223         then cvs aborts the add with the message:
52224           cvs [add aborted]: there is a version in <./dirname> already
52225         * build-aux/gnu-web-doc-update: Add directories separately
52226         to the addition of files, to avoid the above issue
52227         impacting the addition of files.
52229 2016-01-19  Daiki Ueno  <ueno@gnu.org>
52231         utimens-tests: avoid pulling gettext .m4 files
52232         Although this is not the right fix to the original problem:
52233         http://lists.gnu.org/r/bug-gnulib/2013-01/msg00086.html
52234         it makes it possible again for consumer projects to use arbitrary
52235         version of gettext, through the steps described at:
52236         http://www.gnu.org/software/gnulib/manual/html_node/gettextize-and-autopoint.html
52237         See here for details:
52238         https://lists.gnu.org/r/bug-gnulib/2016-01/msg00079.html
52239         * modules/futimens-tests (Depends-on): Add 'gettext-h' in place of
52240         'gettext'.
52241         * modules/utimens-tests (Depends-on): Add 'gettext-h' in place of
52242         'gettext'.
52244 2016-01-18  Paul Eggert  <eggert@cs.ucla.edu>
52246         regex: pacify static checkers
52247         Problem and draft fix reported by Aharon Robbins in:
52248         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00082.html
52249         * lib/regcomp.c (build_charclass_op, create_tree) [lint]:
52250         Clear memory to pacify static checkers.
52252         regex: fix [ diagnostic
52253         Problem and fix reported by Aharon Robbins in:
52254         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00082.html
52255         * lib/regcomp.c (REG_EBRACK_IDX): Fix misleading diagnostic about [.
52257         regex: fix memory leaks
52258         Problem and draft fix reported by Aharon Robbins in:
52259         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00082.html
52260         * lib/regcomp.c (build_range_exp, build_charclass_op)
52261         * lib/regex_internal.c (re_dfa_add_node):
52262         Fix memory leak on failure.
52264 2016-01-18  Pádraig Brady  <P@draigBrady.com>
52266         fts: don't unconditionally use leaf optimization for NFS
52267         NFS st_nlink are not accurate on all implementations,
52268         leading to aborts() if that assumption is made.
52269         See <https://bugzilla.redhat.com/1299169>
52270         * lib/fts.c (leaf_optimization_applies): Remove NFS from
52271         the white list, and document the issue.
52273 2016-01-15  Paul Eggert  <eggert@cs.ucla.edu>
52274             KO Myung-Hun  <komh@chollian.net>
52276         gnulib-tool: don't assume ln -s works
52277         * gnulib-tool (func_ln_s): New function.
52278         (func_ln): Use it.
52280 2016-01-15  KO Myung-Hun  <komh@chollian.net>
52282         utimes: detect utimes() correctly on OS/2 kLIBC
52283         utimes() of OS/2 kLIBC has some limitations.
52284         1. OS/2 itself supports a file date since 1980 year in local time.
52285         2. OS/2 itself supports only even seconds for a file time.
52286         3. utimes() of OS/2 kLIBC does not work on an opened file.
52287         * m4/utimes.m4: Detect utimes() correctly on OS/2 kLIBC.
52288         * doc/posix-functions/utimes.texi: Document the above limitations of
52289         utimes() on OS/2 kLIBC.
52291 2016-01-15  Paul Eggert  <eggert@cs.ucla.edu>
52292             KO Myung-Hun  <komh@chollian.net>
52294         openat_proc_name: port to OS/2 kLIBC
52295         OS/2 kLIBC provides a function to retrive a path from a fd. Use it
52296         instead of /proc/self/fd.
52297         * lib/openat-proc.c (openat_proc_name):
52298         Don't assume file name length is less than INT_MAX.
52299         Port to OS/2 kLIBC with __libc_Back_ioFHToPath().
52301 2016-01-14  KO Myung-Hun  <komh@chollian.net>
52303         stdint: check _INTPTR_T_DECLARED for intptr_t etc.
52304         OS/2 kLIBC's stdint.h defines _INTPTR_T_DECLARED and needs its own
52305         definitions of intptr_t and uintptr_t (which use int and unsigned)
52306         to avoid clashes with declarations of system functions like sbrk.
52307         * lib/stdint.in.h (intptr_t, uintptr_t): Check
52308         _INTPTR_T_DECLARED before defining them.
52310         opendir, closedir, dirfd, fdopendir: port to OS/2 kLIBC
52311         * lib/closedir.c (closedir): Unregister fd if closedir() succeeds.
52312         * lib/dirent.in.h (_gl_register_dirp_fd, _gl_unregister_dirp_fd):
52313         Declare on kLIBC.
52314         * lib/dirfd.c (struct dirp_fd_list): New. Structures to keep track of
52315         fd associated with dirp.
52316         (_gl_register_dirp_fd): New. Register fd associated with dirp to
52317         dirp_fd_list.
52318         (_gl_unregister_dirp_fd): New. Unregister fd with closing it.
52319         (dirfd): Implemented for kLIBC.
52320         * lib/fdopendir.c (fdopendir): Implemented for kLIBC.
52321         * lib/opendir.c (opendir): New. Register fd and dirp pair if open()
52322         succeeds.
52323         * m4/closedir.m4 (gl_FUNC_CLOSEDIR): Replace if OS/2.
52324         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
52325         (REPLACE_DIRFD): Define to 1 if replaced.
52326         * m4/opendir.m4 (gl_FUNC_OPENDIR): Likewise.
52327         * modules/closedir (Depends-on): Add dirfd.
52328         * modules/dirfd (Depends-on): Add 'test $REPLACE_DIRFD = 1' to errno
52329         condition.
52330         (configure.ac): Add dirfd to LIBOBJS if $REPLACE_DIRFD = 1 as well.
52331         * modules/opendir (Depends-on): Add dirfd.
52333         dup, dup2, fcntl: support a directory fd on OS/2 kLIBC
52334         On OS/2 kLIBC, dup(), dup2() and fcntl() do not work on a directory fd.
52335         * lib/dup.c (dup_nothrow): New.
52336         * lib/dup2.c (klibc_dup2dirfd): New. dup2() for a directory fd.
52337         (klibc_dup2): New.
52338         * lib/fcntl.c (klibc_fcntl): New.
52339         * m4/dup.m4 (gl_FUNC_DUP): Check if dup() works on a directory fd.
52340         * m4/dup2.m4 (gl_FUNC_DUP2): Check if dup2() works on a directory fd.
52341         * m4/fcntl.m4 (gl_FUNC_FCNTL): Check if F_DUPFD works on a directory
52342         fd.
52344         pipe_filter_ii_execute: port to OS/2 kLIBC
52345         Pipes on kLIBC do not support O_NONBLOCK like Win32.
52346         * lib/pipe-filter-ii.c (start_wrapper, _beginthreadex, CloseHandle,
52347         WaiForSingleObject, WaitForMultipleObjects): New on OS/2 kLIBC.
52348         Reuse Win32 code on OS/2 kLIBC.
52349         * lib/spawn-pipe.c: Reuse Win32 code on OS/2 kLIBC.
52350         * lib/w32spawn.h: Do not include windows.h on OS/2 kLIBC.
52352         wchar: fix "conflicting types" error for __wcwidth on OS/2 kLIBC
52353         On OS/2 kLIBC, wcwidth is a macro that expands to the name of a
52354         static inline function.  The implementation of wcwidth in wcwidth.c
52355         causes a "conflicting types" error.
52356         * lib/wchar.in.h: Undefine wcwidth on OS/2 kLIBC.
52358         w32spawn: clear SHELL_SPECIAL_CHARS and SHELL_SPACE_CHAR on OS/2 kLIBC
52359         spawn() on OS/2 kLIBC is not silly like one on Windows
52360         * libc/w32spawn.h (SHELL_SPECIAL_CHARS, SHELL_SPACE_CHAR): Set both to
52361         empty string on OS/2 kLIBC.
52363         pipe-filter-aux: undefine HAVE_SELECT on KLIBC
52364         On OS/2 kLIBC, select() works only on sockets.
52365         * lib/pipe-filter-aux.h (HAVE_SELECT): Undefine on OS/2 kLIBC.
52367         binary-io: don't put fd in binary mode if it is a console on EMX
52368         * lib/binary-io.h (SET_BINARY): Don't put fd in binary mode if it is
52369         a console on EMX.
52371 2016-01-15  Pádraig Brady  <P@draigBrady.com>
52373         doc: mention unfixed issues with unsupported localtime() values
52374         * doc/posix-functions/localtime.texi: Mention that FreeBSD 10
52375         returns nonsense for localtime(2^56).
52376         * doc/posix-functions/localtime_r.texi: Likewise.
52378 2016-01-14  Pádraig Brady  <P@draigBrady.com>
52380         doc: mention setlocale() issues on OpenBSD
52381         * doc/posix-functions/setlocale.texi: Mention setlocale(LC_ALL,"")
52382         never fails, and the need to check categories individually.
52384 2016-01-14  Pádraig Brady  <P@draigBrady.com>
52386         sig2str: list all signals on FreeBSD >= 7
52387         FreeBSD >= 7 is contravening POSIX by not defining NSIG
52388         to the maximal statically defined signal value.
52389         It does define _SIG_MAXSIG though, so base SIGNUM_BOUND on that.
52390         * lib/sig2str.h (SIGNUM_BOUND): Define to (_SIG_MAXSIG - 2)
52391         where available, even when NSIG is defined.
52393 2016-01-13  Paul Eggert  <eggert@cs.ucla.edu>
52395         acl-permissions: port to USE_ACL==0 platforms
52396         I ran into this problem when building bleeding-edge GNU Emacs
52397         with gcc -fsanitize=address on Fedora 23.  On this platform
52398         the ACL library does not pass the 'configure' test and Emacs
52399         then does not build due in part to what appear to be typos in the
52400         ACL part of Gnulib.
52401         * lib/acl-internal.c (free_permission_context):
52402         * lib/acl-internal.h (struct permission_context):
52403         Test whether USE_ACL is nonzero, not whether it is defined.
52405 2016-01-12  Martin Sebor  <msebor@redhat.com>
52407         mktime: rename macro to avoid glibc clash
52408         * lib/mktime.c [DEBUG] (DEBUG): Rename to DEBUG_MKTIME.  See:
52409         https://sourceware.org/ml/libc-alpha/2016-01/msg00267.html
52411 2016-01-12  Paul Eggert  <eggert@cs.ucla.edu>
52413         Port "$@" to OpenIndiana ksh93
52414         In http://lists.gnu.org/r/bug-autoconf/2015-12/msg00000.html
52415         Pavel Raiskup reports that ${1+"$@"} runs afoul of a bug in /bin/sh
52416         (derived from ksh 93t+ 2010-03-05).  ${1+"$@"} works around an ancient
52417         bug long-dead shells, so remove the workaround.
52418         * build-aux/announce-gen, build-aux/do-release-commit-and-tag:
52419         * build-aux/gitlog-to-changelog, build-aux/gnu-web-doc-update:
52420         * build-aux/prefix-gnulib-mk, build-aux/update-copyright:
52421         * build-aux/useless-if-before-free, tests/test-update-copyright.sh:
52422         Use "$@" instead of ${1+"$@"}.
52424         Port Universal Time settings to strict POSIX
52425         * build-aux/announce-gen, build-aux/bootstrap:
52426         * build-aux/do-release-commit-and-tag, build-aux/git-version-gen:
52427         * build-aux/gitlog-to-changelog, build-aux/gnu-web-doc-update:
52428         * build-aux/gnupload, build-aux/mkinstalldirs:
52429         * build-aux/move-if-change, build-aux/prefix-gnulib-mk:
52430         * build-aux/update-copyright, build-aux/useless-if-before-free:
52431         * build-aux/vc-list-files, tests/test-strftime.c:
52432         Use TZ="UTC0", not TZ="UTC".  Either works on GNU platforms,
52433         but POSIX says the behavior of TZ="UTC" is undefined.
52435 2016-01-02  Paul Eggert  <eggert@cs.ucla.edu>
52437         msvc-inval: fix problem with unset shell var
52438         Problem reported by Karl Berry in:
52439         http://lists.gnu.org/r/bug-gnulib/2016-01/msg00004.html
52440         * modules/msvc-inval (Depends-on):
52441         AC_REQUIRE gl_MSVC_INVAL instead of merely calling it.
52442         * modules/msvc-nothrow (Depends-on): Likewise for gl_MSVC_NOTHROW.
52444 2016-01-01  Pádraig Brady  <P@draigBrady.com>
52446         tests: for compare_(), use cmp -s where available
52447         * tests/init.sh (compare_): Only fall back to cmp without
52448         the POSIX defined -s option, where this is not available.
52450 2016-01-01  Paul Eggert  <eggert@cs.ucla.edu>
52452         version-etc: new year
52453         * build-aux/gendocs.sh (version):
52454         * doc/gendocs_template:
52455         * doc/gendocs_template_min:
52456         * doc/gnulib.texi:
52457         * lib/version-etc.c (COPYRIGHT_YEAR):
52458         Update copyright dates by hand in templates and the like.
52459         * all files: Run 'make update-copyright'.
52461 2015-12-31  Paul Eggert  <eggert@cs.ucla.edu>
52463         human: fix output buffer overrun by 1
52464         * lib/human.c (human_readable): Fix off-by-one typo in buffer
52465         calculation that could lead to a one-byte buffer overrun.
52467 2015-12-28  Daiki Ueno  <ueno@gnu.org>
52469         maint: fix operator precedence in mbrtowc test
52470         This is a fix for test breakage introduced by commit 45228d96; the
52471         equality expression must be parenthesized when negated with '!',
52472         otherwise we always get:
52474           test-mbrtowc.c:49: assertion 'ret == (size_t)(-2)' failed
52476         * m4/mbrtowc.m4 (gl_MBRTOWC_EMPTY_INPUT): Negate the entire expression.
52477         * m4/mbrlen.m4 (gl_MBRLEN_EMPTY_INPUT): Likewise.
52479 2015-12-23  James Youngman  <jay@gnu.org>
52481         regexprops-generic: update from regex.h
52482         * doc/regexprops-generic.texi: update by running the regexprops binary
52483         from findutils (the command line is 'regexprops "Regular Expressions"
52484         generic').  The recent (ish) change (5a5a9388) to regex.h aligning
52485         gnulib with GNU grep had made this document out-of-date.
52487 2015-12-23  Pádraig Brady  <P@draigBrady.com>
52489         strftime-tests: avoid false failure on OS X
52490         * tests/test-strftime.c (struct localtime_rz_test): Add an
52491         ahistorical member which is used to warn rather than fail
52492         when tm_isdst isn't set for such entries.  This is the case for
52493         "1970-01-01 13:00:00 +1300 (NZDT)" on Darwin 13/14 at least.
52495 2015-12-20  Kamil Dudka  <kdudka@redhat.com>
52497         fts: ensure leaf optimization is used for NFS
52498         NFS provides usable dirent.d_type but not necessarily for all entries
52499         of large directories.  See <https://bugzilla.redhat.com/1252549>
52500         * lib/fts.c (leaf_optimization_applies): Append NFS on the white list.
52502 2015-12-20  Pádraig Brady  <P@draigBrady.com>
52504         fts: enable leaf optimization for XFS
52505         XFS provides usable dirent.d_type only for DT_DIR,
52506         but the noleaf optimization still applies.
52507         * lib/fts.c (leaf_optimization_applies): Add XFS to the white list.
52509 2015-12-17  Paul Eggert  <eggert@cs.ucla.edu>
52511         intprops: comment fix
52512         * lib/intprops.h: Fix comment.  Reported by Pádraig Brady in:
52513         http://lists.gnu.org/r/bug-gnulib/2015-12/msg00013.html
52515         intprops-test: work around GCC bug 68971
52516         Problem reported by Pádraig Brady in:
52517         http://lists.gnu.org/r/bug-gnulib/2015-12/msg00011.html
52518         * tests/test-intprops.c: Ignore -Woverflow in GCC 6 and earlier.
52519         (main): Add a case that better tests 64-bit long in this area.
52521 2015-12-09  Pavel Raiskup  <praiskup@redhat.com>
52523         gnulib-tool: allow multiple --local-dir usage
52524         * gnulib-tool: Use --local-dir to construct compound
52525         $local_gnulib_path path instead of $local_gnulib_dir.  Determine
52526         PATH_SEPARATOR early.
52527         (local_gnulib_dir): Rename into $local_gnulib_path everywhere.
52528         (func_gnulib_dir): Cut out PATH_SEPARATOR detection code into
52529         func_determine_path_separator because that needs to be detected
52530         earlier now.
52531         (func_determine_path_separator): New function.
52532         (func_path_foreach, func_path_foreach_inner): New functions.
52533         (func_path_prepend, func_path_append): Likewise.
52534         (func_lookup_local_file, func_lookup_local_file_cb): Likewise.
52535         (func_lookup_file, func_all_modules): Use new functions to work
52536         with local_gnulib_path.
52537         (func_modules_in_dir, func_exists_module): New callbacks for
52538         func_path_foreach.
52539         (func_exists_module, func_get_tests_module): Likewise.
52540         (func_is_local_file, func_should_symlink): New helper methods.
52541         (func_add_file, func_update_file): Use new func_should_symlink
52542         instead, DRY.
52543         (func_reconstruct_cached_local_gnulib_path): New helper.
52544         (func_reconstruct_cached_dir): New callback.
52545         (func_import): The cached_local_gnulib_dir renamed to
52546         cached_local_gnulib_path similarly to local_gnulib_dir.
52547         Use new func_reconstruct_cached_local_gnulib_path.
52548         (func_count_relative_local_gnulib_path): New sub-method.
52549         (func_create_testdir): Use func_should_symlink, DRY.
52550         (func_create_megatestdir): Use new functions to work with
52551         local_gnulib_path correctly.
52552         (func_append_local_dir): New helper.
52554 2015-12-08  Pádraig Brady  <P@draigBrady.com>
52556         fix freadptr to work with ungetc on all uClibc configs
52557         Reported at https://bugs.busybox.net/show_bug.cgi?id=4099
52558         where GNU coreutils cut(1) generates invalid output on uClibc
52559         when __UCLIBC_HAS_STDIO_GETC_MACRO__ is not defined.
52560         * lib/freadptr.c (freadptr): Return NULL if there are
52561         ungotten chars.  In this case freadseek() will iterate
52562         again to process the ungotten character.
52564 2015-11-13  Paul Eggert  <eggert@cs.ucla.edu>
52566         xalloc-oversized: improve performance with GCC 5
52567         * lib/xalloc-oversized.h (xalloc_oversized):
52568         Improve performance with GCC 5 by using __builtin_mul_overflow.
52570 2015-11-10  Paul Eggert  <eggert@cs.ucla.edu>
52572         intprops: new public macro EXPR_SIGNED
52573         Emacs can use this macro, so make it public.
52574         * doc/intprops.texi (Arithmetic Type Properties): Rename from
52575         'Integer Type Determination', since some of these macros apply
52576         to non-integer types.  Clarify what kinds of constant expressions
52577         these macros return.  Say when the arguments can be non-integers.
52578         Mention newly published macro EXPR_SIGNED.
52579         * lib/intprops.h (EXPR_SIGNED): Rename from _GL_INT_SIGNED, to
52580         make it public.  All uses changed.
52582         intprops: fix typo in clang port
52583         * lib/intprops.h (_GL_INT_OP_WRAPV): Fix misspelling of
52584         '__builtin_add_overflow' that is not caught by compiler.
52586 2015-11-05  Paul Eggert  <eggert@cs.ucla.edu>
52588         test-timespec: fix typo in previous change
52589         * tests/test-timespec.c (main): Fix typo that reduced test quality.
52591         timespec-sub: fix overflow bug; add tests
52592         * lib/timespec-add.c (timespec_add):
52593         * lib/timespec-sub.c (timespec_sub):
52594         Work even if time_t is narrower than int (a theoretical
52595         possibility).  Redo code for a bit more clarity.
52596         * lib/timespec-sub.c (timespec_sub):
52597         Fix off-by-2 bug if a.tv_sec == TYPE_MINIMUM (time_t) and 0 < b.tv_sec.
52598         * modules/timespec-tests, tests/test-timespec.c: New files.
52600         intprops-test: suppress -Woverlength-strings
52601         Problem reported by Pádraig Brady in:
52602         http://lists.gnu.org/r/bug-gnulib/2015-11/msg00008.html
52603         It is not worth the hassle to port this test to compilers that
52604         cannot handle long strings in diagnostics.
52605         * tests/test-intprops.c [__GNUC__]: Ignore -Woverlength-strings.
52607 2015-11-03  Pádraig Brady  <P@draigBrady.com>
52609         quotearg: add quotearg_n_style_colon()
52610         This quotes with default options of the specified style,
52611         but with quoting enabled for instances of ':'.
52612         * lib/quotearg.h (quotearg_n_style_colon): Description and declaration.
52613         * lib/quotearg.c (quotearg_n_style_colon): New function implementation.
52615 2015-11-04  Paul Eggert  <eggert@cs.ucla.edu>
52617         intprops: revise _WRAPV macros, revert _OVERFLOW
52618         The incompatible changes to the _OVERFLOW macros were too much of
52619         a hassle in practice, so revert them.  Instead, change the new
52620         _WRAPV macros to make them closer in behavior to GCC 5's new
52621         builtin_add_overflow etc. functions.  No other software was using
52622         these newly-added macros yet, so this should be OK.
52623         * NEWS: Revert previous change, since the incompatible change
52624         has been reverted, and nobody used the incompatible version.
52625         * doc/intprops.texi (Wraparound Arithmetic, Integer Type Overflow):
52626         Document revised behavior.
52627         (Integer Range Overflow): Adjust example to match above revisions.
52628         * lib/intprops.h (INT_ADD_OVERFLOW, INT_SUBTRACT_OVERFLOW)
52629         (INT_MULTIPLY_OVERFLOW): Revert previous change, so that
52630         these can be used in integer constant expressions again.
52631         (INT_CONST_ADD_OVERFLOW, INT_CONST_SUBTRACT_OVERFLOW)
52632         (INT_CONST_MULTIPLY_OVERFLOW): Remove, as these are no longer
52633         needed.
52634         (INT_CONST_ADD_WRAPV, INT_CONST_SUBTRACT_WRAPV)
52635         (INT_NEGATE_WRAPV, INT_CONST_MULTIPLY_WRAPV, INT_DIVIDE_WRAPV)
52636         (INT_REMAINDER_WRAPV, INT_LEFT_SHIFT_WRAPV):
52637         Remove, as they did not seem that useful.
52638         (INT_ADD_WRAPV, INT_SUBTRACT_WRAPV, INT_MULTIPLY_WRAPV)
52639         (_GL_INT_OP_WRAPV, _GL_INT_OP_WRAPV_LONGISH)
52640         (_GL_INT_OP_WRAPV_VIA_UNSIGNED):
52641         Support new semantics.
52642         (__has_builtin): New macro, if not alreay defined.
52643         (_GL__GENERIC_BOGUS, _GL_INT_OP_CALC, _GL_INT_OP_CALC1): New macros.
52644         * tests/test-intprops.c (INT_CONST_DIVIDE_OVERFLOW)
52645         (INT_CONST_REMAINDER_OVERFLOW, INT_CONST_LEFT_SHIFT_OVERFLOW)
52646         (INT_CONST_DIVIDE_WRAPV, INT_CONST_REMAINDER_WRAPV)
52647         (INT_CONST_LEFT_SHIFT_WRAPV): Remove.
52648         (CHECK_SBINOP, CHECK_SSUM, CHECK_SUM1, CHECK_SSUM1)
52649         (CHECK_SDIFFERENCE, CHECK_SPRODUCT, CHECK_PRODUCT1, CHECK_SPRODUCT1):
52650         New macros.
52651         (CHECK_BINOP, CHECK_UNOP, main, CHECK_SUM): Test new behavior.
52653 2015-11-03  Jim Meyering  <meyering@fb.com>
52655         intprops: add parentheses for when OP has precedence lower than "-"
52656         * lib/intprops.h (_GL_INT_OP_WRAPV_VIA_UNSIGNED): In "a OP b - c",
52657         "a OP b" must be parenthesized for when OP is like "<<", which has
52658         lower precedence than the following "-". Reported by Pádraig Brady.
52660 2015-11-03  Pádraig Brady  <P@draigBrady.com>
52662         quotearg: constify get_quoting_style parameters
52663         * lib/quotearg.h (get_quoting_style): Mark parameter as const.
52664         * lib/quotearg.c (get_quoting_style): Likewise.
52666 2015-11-02  Pádraig Brady  <P@draigBrady.com>
52668         quotearg: add support for $'' shell escaping
52669         * lib/quotearg.h: Add "shell-escape" and "shell-escape-always"
52670         items and descriptions.
52671         * lib/quotearg.c (quotearg_buffer_restyled): Add support for the
52672         above types by quoting like "shell", but using $'...' syntax
52673         for non printable characters, which should provide unambiguous
52674         printable output for any input.
52675         * tests/test-quotearg-simple.c: Update accordingly.
52677 2015-11-02  Pádraig Brady  <P@draigBrady.com>
52679         maint: use a more standard return from mbrtowc test
52680         * m4/mbrtowc.m4 (gl_MBRTOWC_EMPTY_INPUT): Don't return 1
52681         from the test program as this is non standard and often
52682         indicates an unhandled case in the test program.
52683         * m4/mbrlen.m4 (gl_MBRLEN_EMPTY_INPUT): Likewise.
52685 2015-10-30  Paul Eggert  <eggert@cs.ucla.edu>
52687         intprops: add WRAPV and const flavors for GCC 5
52688         If available, use GCC 5's builtin functions for efficient integer
52689         overflow checking.  Also, add macros like INT_ADD_WRAPV efficently
52690         and safely compute the low-order bits of the correct answer.
52691         A downside of these efficient functions is that they cannot be
52692         used in constant expressions, so add macros like INT_CONST_ADD_OVERFLOW
52693         and INT_CONST_ADD_WRAPV that can be used even in constant expressions.
52694         * NEWS: Document the incompatible changes to INT_ADD_OVERFLOW etc.
52695         * doc/intprops.texi (Integer Properties, Integer Type Overflow):
52696         Document the changes.
52697         (Wraparound Arithmetic): New section.
52698         (Integer Range Overflow):
52699         Put this subsection last, since it's least useful.
52700         * lib/intprops.h (INT_CONST_ADD_OVERFLOW)
52701         (INT_CONST_SUBTRACT_OVERFLOW, INT_CONST_MULTIPLY_OVERFLOW):
52702         New macros, with the meaning that INT_ADD_OVERFLOW etc. used to have.
52703         (INT_CONST_ADD_WRAPV, INT_CONST_SUBTRACT_WRAPV)
52704         (INT_NEGATE_WRAPV, INT_CONST_MULTIPLY_WRAPV, INT_DIVIDE_WRAPV)
52705         (INT_REMAINDER_WRAPV, _GL_INT_OP_WRAPV, _GL_EXPR_CAST)
52706         (_GL_INT_OP_WRAPV_LONGISH, INT_ADD_WRAPV, INT_SUBTRACT_WRAPV)
52707         (INT_MULTIPLY_WRAPV, _GL_OP_OVERFLOW, _GL_OP_WRAPV, _GL_OP_WRAPV_GENSYM):
52708         New macros.
52709         (INT_ADD_OVERFLOW, INT_SUBTRACT_OVERFLOW, INT_MULTIPLY_OVERFLOW):
52710         Generate calls to GCC builtins if available, for speed.
52711         * tests/test-intprops.c (INT_CONST_DIVIDE_OVERFLOW)
52712         (INT_CONST_REMAINDER_OVERFLOW, INT_CONST_LEFT_SHIFT_OVERFLOW)
52713         (INT_CONST_DIVIDE_WRAPV, INT_CONST_REMAINDER_WRAPV)
52714         (INT_CONST_LEFT_SHIFT_WRAPV): New macros.
52715         (main, CHECK_BINOP, CHECK_UNOP, CHECK_SUM, CHECK_PRODUCT)
52716         (CHECK_QUOTIENT, CHECK_REMAINDER):
52717         Test WRAPV and CONST flavors (when available) too.
52719 2015-10-30  Pádraig Brady  <P@draigBrady.com>
52721         doc: use extended timezone format in iso-8601 example
52722         * doc/parse-datetime.texi: The standard states that extended format
52723         is to be used consistently throughout.
52724         Note that lib/parse-datetime.y can handle either tz format.
52726 2015-10-25  Paul Eggert  <eggert@cs.ucla.edu>
52728         stdalign: port to Sun C 5.9
52729         * doc/posix-headers/stdalign.texi: Document this.
52730         * lib/stdalign.in.h (_Alignas): Sun C 5.9 also supports
52731         __attribute__ ((__aligned__ (...))).
52733 2015-10-20  Paul Eggert  <eggert@cs.ucla.edu>
52735         time_rz: fix comment about tzalloc
52736         * lib/time_rz.c (tzalloc): Fix comment.
52738 2015-10-18  Paul Eggert  <eggert@cs.ucla.edu>
52740         stdalign: work around pre-4.9 GCC x86 bug
52741         * lib/stdalign.in.h (_Alignof): Work around bug in pre-4.9 GCC on
52742         x86, when -std=gnu11 is used.  Problem reported by Jim Meyering in:
52743         http://lists.gnu.org/r/bug-gnulib/2015-10/msg00038.html
52745 2015-10-18  Pádraig Brady  <P@draigBrady.com>
52747         maint.mk: sc_tight_scope: remove extraneous expressions
52748         * top/maint.mk (tight_scope): This is not really required since
52749         commit 3ef58f46 as sed_wrap ensures we don't get an empty expression
52750         that matches all nm entries.  But it does remove extraneous entries
52751         that may be confusing or cause issue in future maintenance.
52753 2015-10-18  Paul Eggert  <eggert@cs.ucla.edu>
52755         time_rz: return NULL if localtime_r fails
52756         * lib/time_rz.c (localtime_rz): Return NULL if localtime_r fails,
52757         while still attempting to pacify bleeding-edge GCC.
52759         fts: port to C11 alignof
52760         * doc/posix-headers/stdalign.texi (stdalign.h):
52761         Document the C11 restriction.
52762         * lib/fts.c: Include stddef.h, for max_align_t.
52763         (fts_alloc): Align using max_align_t, not FTSENT.
52764         * modules/fts (Depends-on): Add stddef.
52766 2015-10-18  Jim Meyering  <meyering@fb.com>
52768         time_rz: avoid warning from bleeding-edge gcc's -Wnonnull
52769         Compiling with gcc version 6.0.0 20151017 (experimental) (GCC), I
52770         would see this:
52772         lib/time_rz.c: In function 'localtime_rz':
52773         lib/time_rz.c:292:15: error: nonnull argument 'tm' compared to NULL \
52774           [-Werror=nonnull]
52775                    if (tm && !save_abbr (tz, tm))
52776                        ^
52778         That was complaining about "tm" because it is a parameter that was
52779         declared with the __nonnull__ attribute.
52780         * lib/time_rz.c (localtime_rz): Don't bother setting "tm" to the
52781         result of localtime_r.
52783 2015-10-17  Jim Meyering  <meyering@fb.com>
52785         maint.mk: _gl_TS_function_match: fix "extern" name extracting regexp
52786         * top/maint.mk (_gl_TS_function_match): This heuristic extern-function-
52787         name-extraction regexp mistakenly used \S+, and would mistakenly
52788         extract "*F" from "extern int *F()" rather than the desired "F".
52789         Use \w+ instead.
52791 2015-10-17  Jim Meyering  <meyering@fb.com>
52793         maint.mk: sc_tight_scope: factor and support OS X
52794         * top/maint.mk (_gl_tight_scope): Address three issues:
52795         - factor out four instances of code that wraps a string in "^...$"
52796         - allow nm-reported symbol names to have an optional leading "_"
52797         - add "main" to the list of ignored variable names, because on os x,
52798         "main" has nm-reported type "S" in the variable-checking section.
52800 2015-10-16  Dmitry Smirnov  <onlyjob@member.fsf.org>
52802         safe-alloc-tests: fix typo in license header
52803         * tests/test-safe-alloc.c: Mention LGPL 2.1, not 3.1
52805 2015-10-15  Simon Reinhardt  <simon@keinstein.org>
52807         copy-file: fix mem leak in error case
52808         * lib/copy-file.c (qcopy_file_preserving): Free the 32KiB buffer
52809         upon error opening or performing I/O to the src and dest files.
52811 2015-10-15  Mike Frysinger  <vapier@chromium.org>
52813         localename: control langinfo.h inclusion
52814         This header is only used to work around buggy behavior in old
52815         versions of glibc, so do not include it all the time.  Otherwise
52816         we get build failures on systems that do not provide langinfo.h.
52817         * lib/localename.c: Wrap langinfo.h include with same ifdefs used
52818         in the source later on.
52819         The patch was originally submitted to gettext as:
52820         https://lists.gnu.org/r/bug-gettext/2015-10/msg00011.html
52822 2015-10-13  Paul Eggert  <eggert@cs.ucla.edu>
52824         binary-io, math, pthread, sys_socket, u64, unistd: port to strict C
52825         * lib/binary-io.c, lib/math.c, lib/pthread.c, lib/sys_socket.c:
52826         * lib/u64.c, lib/unistd.c:
52827         Append 'typedef int dummy;', to pacify compilers that are picky
52828         about empty translation units.
52830 2015-10-12  Pino Toscano  <ptoscano@redhat.com>
52832         accept4-tests: fix to avoid non portable flags
52833         * tests/test-accept4.c (main): Pass only SOCK_* flags to accept4(),
52834         as they are the only documented ones, and passing others may trigger
52835         EINVAL (seen on FreeBSD 10.1-RELEASE).
52836         * doc/glibc-functions/accept4.texi: Mention that we don't provide
52837         the SOCK_CLOEXEC or SOCK_NONBLOCK defines.
52839 2015-10-06  Pavel Raiskup  <praiskup@redhat.com>
52841         gnulib-tool: fix tests of 'extensions' module
52842         This complements f8fe25fab60e3c687a124 commit.
52843         * gnulib-tool (func_emit_pre_early_macros): New function, it wraps
52844         emitting of initial gl_EARLY macros.
52845         (func_import, func_create_testdir): All dumps of gl_PROG_AR_RANLIB
52846         replaced with func_emit_pre_early_macros call.
52848 2015-10-06  Paul Eggert  <eggert@cs.ucla.edu>
52850         unicase/locale-language: fix typo in utf-8 cookie
52851         * lib/unicase/locale-languages.gperf: Fix gperf input file format.
52852         Problem reported by Zbigniew Jędrzejewski-Szmek.
52854 2015-10-02  Paul Eggert  <eggert@cs.ucla.edu>
52856         xalloc: do not worry about GCC 5 warning on 32 bit
52857         * lib/xalloc.h: Revert previous change.
52858         I found a better way to fix this in coreutils.
52860 2015-10-02  Pádraig Brady  <P@draigBrady.com>
52862         xalloc: avoid GCC 5.1 warning on 32 bit
52863         * lib/xalloc.h: Disable -Wstrict-overflow for uses of
52864         xalloc_oversized(), which was seen to give this warning
52865         on GCC 5.1 on 32 bit: "assuming signed overflow does not occur
52866         when simplifying conditional".
52868 2015-10-02  Daiki Ueno  <ueno@gnu.org>
52870         uniname/uniname-tests: avoid compiler warnings
52871         * tests/uniname/test-uninames.c (fill_names, fill_aliases): Remove
52872         unused local variables.
52873         (test_alias_lookup): Fix alias name display in failure cases.
52875 2015-09-26  Paul Eggert  <eggert@cs.ucla.edu>
52877         c-ctype: do not worry about EBCDIC + char signed
52878         Drop support for EBCDIC with char being signed, as this breaks too
52879         many programs.  Problem reported by Ben Pfaff in:
52880         http://lists.gnu.org/r/bug-gnulib/2015-09/msg00053.html
52881         * lib/c-ctype.h: Verify that we are not using EBCDIC with
52882         char being signed.
52883         (_C_CTYPE_LOWER_A_THRU_F_N): New macro.
52884         (_C_CTYPE_LOWER_N, _C_CTYPE_A_THRU_F): Use it.
52885         (_C_CTYPE_DIGIT, _C_CTYPE_LOWER, _C_CTYPE_PUNCT, _C_CTYPE_UPPER):
52886         (c_isascii, c_isgraph, c_isprint, c_ispunct, c_tolower, c_toupper):
52887         * tests/test-c-ctype.c (test_all):
52888         Simplify by assuming standard char values cannot be negative.
52889         * tests/test-c-ctype.c (NCHARS, to_char): Remove; all uses removed.
52891 2015-09-25  Paul Eggert  <eggert@cs.ucla.edu>
52893         c-ctype: port better to z/OS EBCDIC
52894         Problems reported by Daniel Richard G. in:
52895         http://lists.gnu.org/r/bug-gnulib/2015-09/msg00050.html
52896         * lib/c-ctype.h (_C_CTYPE_CNTRL): Rewrite in terms of
52897         the C standard escapes and _C_CTYPE_OTHER_CNTRL.
52898         (_C_CTYPE_OTHER_CNTRL): New macro.
52899         * tests/test-c-ctype.c (test_all): Test from CHAR_MIN, not
52900         from SCHAR_MIN, as the functions are defined only from values
52901         promoted from char or from unsigned char, not necessarily from
52902         signed char.
52904 2015-09-25  Pavel Raiskup  <praiskup@redhat.com>
52906         gnulib-common.m4: fix gl_PROG_AR_RANLIB/AM_PROG_AR clash
52908         The gl_PROG_AR_RANLIB (it is always called by gl_EARLY) sets AR
52909         and ARFLAGS variables.  Doing this unconditionally could break
52910         later Automake's AM_PROG_AR invocation (at least it's
52911         AC_CHECK_TOOLS call to detect correct 'ar' binary).
52913         Original purpose of the gl_PROG_AR_RANLIB was only to handle the
52914         Amsterdam Compiler Kit, so make the previous code to have effects
52915         only on ACK, and rather automatically call the Automake's
52916         AM_PROG_AR as soon as possible to decide other cases.
52918         References:
52919         http://lists.gnu.org/r/bug-gnulib/2015-07/msg00001.html
52921         * m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): AC_BEFORE AM_PROG_AR.
52922         Set the AR/ARFLAGS to ACK defaults OR call AM_PROG_AR.  If neither
52923         is possible, keep setting AR/ARFLAGS to reasonable defaults.
52924         * gnulib-tool (func_import): Put the gl_USE_SYSTEM_EXTENSIONS
52925         right before gl_PROG_AR_RANLIB into gnulib-comp.m4 (if the
52926         'extensions' module is used.
52927         * modules/extensions (configure.ac-early): Remove as this snippet
52928         is added to gnulib-comp.m4 earlier anyway.
52930 2015-09-25  Paul Eggert  <eggert@cs.ucla.edu>
52932         sockets: MS Windows initalization fixes
52933         Problem reported by Test User in:
52934         http://lists.gnu.org/r/help-shishi/2015-09/msg00001.html
52935         * lib/sockets.h (SOCKETS_1_0, SOCKETS_2_0, SOCKETS_2_1):
52936         Correct the endianness.
52937         * lib/sockets.c (gl_sockets_startup): Return 2 on any version
52938         number mismatch, not just on <.  Cleanup before any such failure.
52940 2015-09-25  Mats Erik Andersson  <gnu@gisladisker.se>
52942         gc: fix detection of installed libgcrypt version
52943         * m4/gc.m4: Use AM_PATH_LIBCRYPT to test for libcrypt versions
52944         at least as recent as 1.4.4.  The previously used macro is not
52945         available now, since modules were removed in version 1.6.0.
52947 2015-09-25  Paul Eggert  <eggert@cs.ucla.edu>
52949         c-ctype: rewrite to use inline functions
52950         This simplifies maintenance, since it makes for just one
52951         implementation of each function, letting the compiler have the fun
52952         of optimization.  In practice this works well nowadays with GCC.
52953         E.g., c_isascii might need only three instructions even though the
52954         source code lists every ASCII character individually in a large
52955         switch statement.
52956         Also, fix some z/OS porting bugs reported by Daniel Richard G. in:
52957         http://lists.gnu.org/r/bug-gnulib/2015-09/msg00037.html
52958         * NEWS: Document the API change.
52959         * lib/c-ctype.c: Drastically simplify, since this now just expands
52960         inline functions.
52961         * lib/c-ctype.h: Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
52962         (C_CTYPE_INLINE): New macro.
52963         (C_CTYPE_CONSECUTIVE_DIGITS, C_CTYPE_CONSECUTIVE_LOWERCASE)
52964         (C_CTYPE_CONSECUTIVE_UPPERCASE): Remove.
52965         Verify that either ASCII or EBCDIC is being used.
52966         (_C_CTYPE_SIGNED_EBCDIC, _C_CTYPE_CNTRL, _C_CTYPE_A_THRU_F_N)
52967         (_C_CTYPE_DIGIT_N, _C_CTYPE_LOWER_N, _C_CTYPE_UPPER_N)
52968         (_C_CTYPE_CASES, _C_CTYPE_A_THRU_F, _C_CTYPE_DIGIT, _C_CTYPE_LOWER)
52969         (_C_CTYPE_UPPER, _C_CTYPE_PUNCT_PLAIN):
52970         New private macros.
52971         (_C_CTYPE_CNTRL): In EBCDIC, '\x07' is a control, not '\xff'.
52972         (c_isalnum, c_isalpha, c_isascii, c_isblank, c_iscntrl, c_isdigit)
52973         (c_isgraph, c_islower, c_isprint, c_ispunct, c_isspace, c_isupper)
52974         (c_isxdigit, c_tolower, c_toupper): Now inline functions.
52975         (c_tolower, c_toupper): When converting, return the unsigned char,
52976         as that is what z/OS does.
52977         * lib/c-strcaseeq.h (CASEEQ): Simplify in the light of the removal
52978         of some c-ctype.h macros.
52979         * modules/c-ctype (Depends-on): Add extern-inline; remove verify.
52980         * tests/test-c-ctype.c (test_all): Fix test for c_toupper and
52981         c_tolower promotion to be compatible with z/OS.
52983 2015-09-24  Pavel Raiskup  <praiskup@redhat.com>
52985         gitlog-to-changelog: trim only trailing whitespaces
52986         This is fix for --format regression introduced by commit
52987         2b93079a5d1baa4d;  it caused that --format='%s%n%n%b%n' (see the
52988         doubled %n string) had no effect anymore.  This format
52989         specification has been used e.g. by GNU paxuitils (commit
52990         edfd8bcc3).
52992         * build-aux/gitlog-to-changelog (main): Stop squashing multiple
52993         newlines in commmit messages.
52995 2015-09-23  Paul Eggert  <eggert@cs.ucla.edu>
52997         Test that c_iscntrl agrees with iscntrl, etc.
52998         Suggested by Daniel Richard G. in:
52999         http://lists.gnu.org/r/bug-gnulib/2015-09/msg00034.html
53000         * modules/c-ctype-tests (Depends-on): Add ctype.
53001         * tests/test-c-ctype.c: Include <ctype.h>.
53002         (NCHARS): New constant.
53003         (test_agree_with_C_locale): New function.
53004         (main): Use it.
53005         (test_all): Use named constants.
53007         c-ctype: improve c_isascii testing
53008         * tests/test-c-ctype.c (test_all): Port c_isascii test to EBCDIC.
53009         Add a test to count the number of ASCII characters.
53011 2015-09-22  Paul Eggert  <eggert@cs.ucla.edu>
53013         savewd: remove SAVEWD_CHDIR_READABLE
53014         It was problematic in the light of file systems that ignore umask.
53015         Problem reported by Sebastian Unger in: http://bugs.gnu.org/21534
53016         * NEWS: Document this.
53017         * lib/mkancesdirs.c (mkancesdirs): MAKE_DIR now returns 0 if
53018         successful, -1 (setting errno) on failure, rather than something
53019         more complicated than that.
53020         * lib/mkdir-p.c (make_dir_parents):
53021         Do not use SAVEWD_CHDIR_READABLE.
53022         * lib/savewd.c (savewd_chdir):
53023         Remove support for SAVEWD_CHDIR_READABLE.
53024         * lib/savewd.h (SAVEWD_CHDIR_READABLE): Remove.
53026         c-ctype: port better to EBCDIC
53027         Problems reported by Daniel Richard G. in
53028         http://lists.gnu.org/r/bug-gnulib/2015-09/msg00020.html
53029         * lib/c-ctype.c: Include <limits.h>, for CHAR_MIN and CHAR_MAX.
53030         Include "verify.h".
53031         (C_CTYPE_ASCII, C_CTYPE_CONSECUTIVE_DIGITS)
53032         (C_CTYPE_CONSECUTIVE_LOWERCASE, C_CTYPE_CONSECUTIVE_UPPERCASE):
53033         Define as enum constants with value false, if not defined, so that
53034         code can use 'if' instead of 'ifdef'.  Using 'if' helps make the
53035         code more portable, as both branches of the 'if' are compiled on
53036         all platforms.
53037         (C_CTYPE_EBCDIC): New constant.
53038         Verify that the character set is either ASCII or EBCDIC.
53039         (to_char): New static function.
53040         (c_isascii, c_iscntrl):
53041         Assume standard control-character assignments for EBCDIC.
53042         (c_isalnum, c_isalpha, c_isdigit, c_islower, c_isgraph, c_isprint)
53043         (c_ispunct, c_isupper, c_isxdigit, c_tolower, c_toupper):
53044         Rewrite to use 'if' instead of 'ifdef'.
53045         Use to_char if non-ASCII.  Prefer <= to >=.
53046         Prefer true and false to 1 and 0, for booleans.
53047         (c_iscntrl): Use 'if', not 'ifdef'.
53048         * modules/c-ctype (Depends-on): Add verify.
53049         * tests/test-c-ctype.c: Include <limits.h>, for CHAR_MIN
53050         (to_char): New function.
53051         (test_all): Port to EBCDIC.  Add some more tests, e.g., for c_ispunct.
53053 2015-09-21  Pádraig Brady  <P@draigBrady.com>
53055         nanosleep: fix return code for interrupted replacement
53056         * lib/nanosleep.c (nanosleep): In the replaced nanosleep, ensure
53057         that we return -1 in the case the call is interrupted by a signal,
53058         rather than the current value of 1.
53059         Diagnosed and tested by Daniel Richard G.
53061 2015-09-19  Paul Eggert  <eggert@cs.ucla.edu>
53063         Diagnose ERE '()|\1'
53064         Problem reported by Hanno Böck in: http://bugs.gnu.org/21513
53065         * lib/regcomp.c (parse_reg_exp): While parsing alternatives, keep
53066         track of the set of previously-completed subexpressions available
53067         before the first alternative, and restore this set just before
53068         parsing each subsequent alternative.  This lets us diagnose the
53069         invalid back-reference in the ERE '()|\1'.
53071         regex: merge patches from libc
53073         2015-09-08  Joseph Myers  <joseph@codesourcery.com>
53074         Move bits/libc-lock.h and bits/libc-lockP.h out of bits/ (bug 14912).
53075         * lib/regex_internal.h:
53076         Include <libc-lock.h> instead of <bits/libc-lock.h>.
53078         2015-06-09  Joseph Myers  <joseph@codesourcery.com>
53079         Fix regcomp wcscoll, wcscmp namespace (bug 18497).
53080         * lib/regcomp.c (build_range_exp): Call __wcscoll instead of
53081         wcscoll.
53082         * lib/regexec.c (check_node_accept_bytes): Likewise.
53084         2015-06-05  Joseph Myers  <joseph@codesourcery.com>
53085         Fix regex wcrtomb namespace (bug 18496).
53086         * lib/regex_internal.c (build_wcs_upper_buffer): Call __wcrtomb
53087         instead of wcrtomb.
53089         2015-06-05  Joseph Myers  <joseph@codesourcery.com>
53090         Fix regex wctype namespace (bug 18495).
53091         * lib/regcomp.c (re_compile_fastmap_iter): Call __towlower
53092         instead of towlower.
53093         * lib/regex_internal.c (build_wcs_upper_buffer): Call __iswlower
53094         instead of iswlower.  Call __towupper instead of towupper.
53095         * lib/regex_internal.h (IS_WIDE_WORD_CHAR): Call __iswalnum
53096         instead of iswalnum.
53098         2015-01-07  Chris Metcalf  <cmetcalf@ezchip.com>
53099         * lib/regcomp.c (parse_bracket_exp): Initialize type to
53100         COLL_SYM in a couple of places to avoid uninitialized variable
53101         wanings on tilegx gcc 4.8.2.
53103         2014-11-24  Siddhesh Poyarekar  <siddhesh@redhat.com>
53104         * lib/regex_internal.h: Remove NOT_IN_libc.
53106         2014-11-17  Andreas Schwab  <schwab@suse.de>
53107         * lib/regex_internal.h: Don't include <locale/elem-hash.h>.
53109         2014-09-11  Roland McGrath  <roland@hack.frob.com>
53110         Move findidx nested functions to top-level.
53111         * lib/regcomp.c [_LIBC]: #include <locale/weight.h>.
53112         (build_equiv_class) [_LIBC]: Don't #include it inside the function.
53113         Pass new arguments to findidx.
53114         * lib/regexec.c [RE_ENABLE_I18N] [_LIBC]: #include <locale/weight.h>.
53115         [RE_ENABLE_I18N] (check_node_accept_bytes) [_LIBC]:
53116         Don't #include it inside the function.  Pass new arguments to findidx.
53117         * lib/regex_internal.h:
53118         [!NOT_IN_libc] [_LIBC]: #include <locale/weight.h>.
53119         (re_string_elem_size_at): Don't #include it inside the function.
53120         Pass new arguments to findidx.
53122         2014-08-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
53123         Check if DEBUG is defined in regex_internal.c
53124         * lib/regex_internal.c: Check if DEBUG is defined and is set.
53126 2015-09-08   Assaf Gordon  <assafgordon@gmail.com>
53128         ceill: detect buggy OpenBSD implementation
53129         * m4/ceill.m4 (gl_FUNC_CEILL): Detect buggy openBSD implementation
53130         which returns zero for small values.  Discussed here:
53131         http://lists.gnu.org/r/bug-gnulib/2015-08/msg00010.html
53133 2015-09-08  Dave Chiluk  <chiluk@canonical.com>
53135         mountlist: add me_mntroot field on Linux machines
53136         * lib/mountlist.c (read_file_system_list): Populate me_mntroot in
53137         mount_entry so Linux machines based on /proc/self/mountinfo can
53138         distinguish between bind mounts and original mounts.  In reality bind
53139         mounts aren't treated differently than mountroot=/ mounts by the
53140         kernel, but the user often wants these bind mounts distinguished.
53141         * lib/mountlist.h (struct mount_entry): Add me_mntroot element.
53142         More details at https://pad.lv/1432871
53144 2015-09-08  Christian Egli  <christian.egli@sbs.ch>
53146         doc: Describe to use multiple instances of gnulib
53147         * doc/gnulib-tool.texi: Add a section to the manual outlining how two
53148         instances of gnulib with different modules can be used, for example one
53149         for a lib and another one for associated tools.
53151 2015-09-01  Pádraig Brady  <P@draigBrady.com>
53153         base32: mark function as __attribute__ const
53154         * lib/base32.h (isbase32): Mark __attribute__ const as
53155         suggested by GCC, and consistent with the base64 module.
53157 2015-08-20  Daiki Ueno  <ueno@gnu.org>
53159         gnulib-tool: don't transform binary files with sed
53160         * gnulib-tool (func_add_or_update): Don't apply sed_transform_* to
53161         .mo and .class files.
53162         Reported by Denis Denisov.
53164 2015-08-10  Daiki Ueno  <ueno@gnu.org>
53166         gperf: respect silent rules
53167         * modules/gperf (Makefile.am): Define V_GPERF, V_GPERF_, and
53168         V_GPERF_0 for silent rules.
53169         * modules/iconv_open (Makefile.am): Use V_GPERF.
53170         * modules/unicase/locale-language (Makefile.am): Likewise.
53171         * modules/unicase/special-casing (Makefile.am): Likewise.
53172         * modules/unictype/category-byname (Makefile.am): Likewise.
53173         * modules/unictype/combining-class-byname (Makefile.am): Likewise.
53174         * modules/unictype/joininggroup-byname (Makefile.am): Likewise.
53175         * modules/unictype/joiningtype-byname (Makefile.am): Likewise.
53176         * modules/unictype/property-byname (Makefile.am): Likewise.
53177         * modules/unictype/scripts (Makefile.am): Likewise.
53178         * modules/uninorm/composition (Makefile.am): Likewise.
53180 2015-08-03  Paul Eggert  <eggert@cs.ucla.edu>
53182         Improve port of stdalign to C++11
53183         Problem reported by Sundaram in:
53184         http://lists.gnu.org/r/bug-gnulib/2015-08/msg00003.html
53185         * lib/stdalign.in.h (alignof, alignas): Don't define if C++11 or newer.
53186         (__alignas_is_defined): Define if C++11 or newer.
53188 2015-08-01  Assaf Gordon  <assafgordon@gmail.com>  (tiny change)
53190         pmccabe2html: fix gawk regex escaping
53191         * build-aux/pmccabe2html: Add one more backslash to properly
53192         escape the gsub replacement value.  Fixes this error:
53193         gawk: ./build-aux/pmccabe2html:425: \
53194         warning: escape sequence `\&' treated as plain `&'
53196 2015-07-29  Paul Eggert  <eggert@cs.ucla.edu>
53198         time_rz: port to pedantic memcpy
53199         * lib/time_rz.c (tzalloc): Pacify pedantic memcpy implementations
53200         that reject memcpy (..., NULL, 0).
53202 2015-07-27  Paul Eggert  <eggert@cs.ucla.edu>
53204         time_rz: port better to MinGW
53205         Don't change tzname, as this makes MinGW dump core (Bug#21020).
53206         Instead, store the tzname copy in the struct tm_zone object.
53207         Problem reported by Eli Zaretskii in: http://bugs.gnu.org/21020#48
53208         * lib/strftime.c [!_LIBC]:
53209         * lib/time_rz.c: Include time-internal.h.
53210         * lib/strftime.c (strftime_case_) [!HAVE_TM_ZONE]: Infer the zone
53211         name from *TZ rather than from TZNAME, doable because *TZ now has
53212         a tzname_copy member.
53213         * lib/time-internal.h: New file, with contents taken from
53214         lib/time_rz.c.  It's separate because strftime.c now accesses
53215         struct tm_zone members.
53216         (struct tm_zone) [HAVE_TZNAME && !HAVE_TM_ZONE]:
53217         New member tzname_copy.
53218         * lib/time_rz.c (struct tm_zone): Move to time-internal.h.
53219         (tzalloc) [HAVE_TZNAME && !HAVE_TM_ZONE]:
53220         Initialize tzname_copy member.
53221         (save_abbr) [HAVE_TZNAME && !HAVE_TM_ZONE]: Save abbreviation
53222         in tzname_copy member.
53223         (revert_tz) [HAVE_TZNAME]: Remove no-longer-needed tzname saving.
53224         (restore_tzname): Remove; no longer needed.  All calls removed.
53225         * modules/time_rz (Files): Add lib/time-internal.h.
53227         time: port __need_time_t to MinGW
53228         * lib/time.in.h (__need_time_t): Do not treat specially on MinGW.
53229         Fix reported by Eli Zaretskii in: http://bugs.gnu.org/21020#36
53231 2015-07-25  Paul Eggert  <eggert@cs.ucla.edu>
53233         strftime: fix newly-introduced bug on Solaris
53234         * lib/strftime.c (strftime_case_): Set the local variable 'zone'
53235         consistently at the start, rather than doing some of the setup at
53236         the start and some in the %Z format spec.  This is cleaner, and
53237         works better with time_rz on platforms like Solaris where struct
53238         tm lacks a tm_zone member, as when !HAVE_TM_GMTOFF %z's calls to
53239         mktime_z and localtime_rz can mess up the tzname cache.
53241         test-strftime: test for Solaris bug
53242         * modules/strftime-tests (Depends-on): Add strerror.
53243         * tests/test-strftime.c: Include <errno.h>.
53244         (posixtm_test): New function, containing the old 'main'.
53245         (struct tzalloc_test, struct localtime_rz_test): New types.
53246         (TZ, LT): New static vars.
53247         (tzalloc_test): New function.
53248         (main): Rewrite in terms of posixtm_test and tzalloc_test.
53250         time_rz: port to Solaris etc.
53251         Works around a tzname problem on platforms like Solaris that have
53252         tzname but not tm_zone, by setting tzname at the appropriate time
53253         and restoring it later.
53254         * lib/time_rz.c (tzname_address, tzname_value) [HAVE_TZNAME]:
53255         New static vars.
53256         (save_abbr) [HAVE_TZNAME]: Set them.
53257         (revert_tz) [HAVE_TZNAME]: Clear or use them.
53258         (restore_tzname): New function.
53259         (localtime_rz, mktime_z): Use it.
53261         time_rz: now LGPL
53262         * modules/time_rz (License): Now LGPL, because strftime depends on it.
53264         time_rz: make a constant 'const'
53265         * lib/time_rz.c (local_tz): Now const.
53267         time_rz: fix off-by-one typo
53268         * lib/time_rz.c (extend_abbrs): Fix off-by-one typo.
53270 2015-07-23  Paul Eggert  <eggert@cs.ucla.edu>
53272         fprintftime, strftime: use timezone_t args
53273         * NEWS: Document the change.
53274         * lib/fprintftime.h (fprintftime):
53275         * lib/strftime.c (extra_args) [my_strftime]:
53276         * lib/strftime.h (nstrftime):
53277         Time zone arg is now of type timezone_t, not int.
53278         * lib/strftime.c (mktime_z) [_LIBC]: New macro.
53279         (__gmtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: Remove; no longer used.
53280         (my_strftime) [emacs && !my_strftime]:
53281         (emacs_strftimeu) [emacs && !FPRINTFTIME]:
53282         Remove; Emacs doesn't need this any more.
53283         (HAVE_TZSET) [my_strftime]: Unset, since we no longer want
53284         fprintftime and nstrftime to call tzset.
53285         (ut) [!my_strftime]: Remove, replacing with ...
53286         (tz) [!my_stftime]: ... this new macro.  All uses changed.
53287         (strftime_case_): Use localtime_rz and mktime_z instead
53288         of localtime_r and mktime.
53289         * modules/fprintftime (Depends-on): Add time_rz.
53290         * modules/strftime (Depends-on): Add time_rz.  Remove time_r.
53291         * tests/test-strftime.c (main): Adjust to new nstrftime API.
53293         time_rz: new module
53294         * MODULES.html.sh: Add time_rz.
53295         * lib/time_rz.c, m4/time_rz.m4, modules/time_rz: New files.
53296         * lib/time.in.h (timezone_t, tzalloc, tzfree, localtime_rz, mktime_z):
53297         New decls if _GNU_SOURCE && @GNULIB_TIME_RZ@ && ! @HAVE_TIMEZONE_T@.
53298         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_DEFAULTS):
53299         New var HAVE_TIMEZONE_T (default 0).
53300         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS):
53301         New var GNULIB_TIME_RZ (default 0).
53302         * modules/time (time.h): Substitute the new vars.
53304         flexmember: license is now unlimited
53305         * modules/flexmember (License): Change to unlimited,
53306         since its only source file gives an unlimited license.
53308 2015-07-15  Eric Blake  <eblake@redhat.com>
53310         maint: update copyright paper procedures
53311         * config/srclist.txt: Drop outdated files.
53312         * doc/Copyright/conditions.txt: Update to latest.
53313         * doc/Copyright/assign.changes.manual: Delete.
53314         * doc/Copyright/assign.future.manual: Likewise.
53315         * doc/Copyright/assign.manual: Likewise.
53316         * doc/Copyright/assign.translation.manual: Likewise.
53317         * doc/Copyright/disclaim.changes.manual: Likewise.
53318         * doc/Copyright/disclaim.manual: Likewise.
53319         * doc/Copyright/disclaim.program: Likewise.
53321 2015-07-07  Daiki Ueno  <ueno@gnu.org>
53323         localename: fix link error on Illumos
53324         Illumos defines __sun, but does not have getlocalename_l nor the
53325         equivalent.  This partially reverts commit 387c214.
53326         * m4/localename.m4 (gl_LOCALENAME): Check if getlocalename_l is
53327         available, as well as uselocale.
53328         * lib/localename.c [HAVE_USELOCALE && __sun]: Don't fallback to
53329         use getlocalename_l if it is not available.
53331 2015-07-07  Daiki Ueno  <ueno@gnu.org>
53333         unistr/uN-strtok-tests: avoid a trivial leak
53334         * tests/unistr/test-u-strtok.h (test_u_strtok): Untabify.  Free
53335         input and delim after the multibyte delimiter tests.
53337 2015-07-04  Paul Eggert  <eggert@cs.ucla.edu>
53339         file-has-acl, acl-permissions: fix HP-UX typos
53340         Problem reported by John David Anglin in: http://bugs.gnu.org/20979
53341         * lib/file-has-acl.c (file_has_acl):
53342         * lib/set-permissions.c (context_acl_from_mode)
53343         (context_aclv_from_mode, set_acls):
53344         Fix some obvious typos when HAVE_GETCL /* HP-UX */.
53345         They were introduced by the recent ACL changes.
53347         regex: match current GNU grep behavior
53348         These symbols have not matched GNU grep behavior for quite some time.
53349         Fix prompted by Balazs Kezes bug report at: http://bugs.gnu.org/20974
53350         * lib/regex.h (RE_SYNTAX_GREP, RE_SYNTAX_EGREP):
53351         Change to match current GNU behavior.
53352         Simplify by expressing it as differences from POSIX BREs and EREs.
53353         (RE_SYNTAX_POSIX_EGREP): No longer differs from GNU behavior.
53355 2015-07-03  Jim Meyering  <meyering@fb.com>
53357         set-permissions.c: adjust acl_from_mode's cpp guard
53358         * lib/set-permissions.c (acl_from_mode): Guard with #ifdef
53359         directives identical to those guarding the sole use.
53360         Otherwise, on some systems, we'd get a warning about
53361         the function being defined but not used.
53362         Also, filter through cppi to correct misleading indentation
53363         of cpp directives.
53365 2015-07-03  Pádraig Brady  <P@draigBrady.com>
53367         tests: restrict shells to those that support 'local'
53368         The local keyword is very widely supported and used
53369         in tests in coreutils and grep at least.  Therefore
53370         restrict to testing with shells that support it.
53371         This mainly excludes /bin/sh on Solaris.
53372         * tests/init.sh (gl_shell_test_script_): Add a test for 'local'.
53374 2015-07-03  Seiya Kawashima  <skawashima@uchicago.edu>  (tiny change)
53375         and Daiki Ueno  <ueno@gnu.org>
53377         unistr/uN-strtok: handle multibyte delimiters
53378         Previously, uN_strtok moved PTR to the next unit to the token end.
53379         When DELIM contained a multibyte character, the new position could
53380         be a middle of a multibyte character.
53381         * lib/unistr/u-strtok.h (FUNC): Place PTR at the next character
53382         after the token.
53383         * lib/unistr/u8-strtok.c (U_STRMBLEN): New macro.
53384         * lib/unistr/u16-strtok.c (U_STRMBLEN): New macro.
53385         * lib/unistr/u32-strtok.c (U_STRMBLEN): New macro.
53386         * modules/unistr/u8-strtok (Depends-on): Depend on
53387         unistr/u8-strmblen.
53388         * modules/unistr/u16-strtok (Depends-on): Depend on
53389         unistr/u16-strmblen.
53390         * modules/unistr/u32-strtok (Depends-on): Depend on
53391         unistr/u32-strmblen.
53392         * tests/unistr/test-u-strtok.h: New file.
53393         * tests/unistr/test-u8-strtok.c: New file.
53394         * tests/unistr/test-u16-strtok.c: New file.
53395         * tests/unistr/test-u32-strtok.c: New file.
53396         * modules/unistr/u8-strtok-tests: New file.
53397         * modules/unistr/u32-strtok-tests: New file.
53398         * modules/unistr/u16-strtok-tests: New file.
53400 2015-07-02  Friedrich Haubensak  <hsk@fli-leibniz.de>
53402         update-copyright: fix test failure with perl >= 5.22 (trivial)
53403         * build-aux/update-copyright: Escape a literal left curly bracket,
53404         required with perl >= 5.22
53406 2015-07-02  Daiki Ueno  <ueno@gnu.org>
53408         u{16,32}-strstr-tests: relax timeout condition
53409         On slower platforms (e.g., Solaris 10/SPARC), u{16,32}-strstr
53410         tests can take longer than 5 seconds to complete.
53411         Reported by Dagobert Michelsen in:
53412         https://lists.gnu.org/r/bug-libunistring/2015-06/msg00006.html
53413         * tests/unistr/test-u16-strstr.c (main): Increase timeout from 5
53414         seconds to 10 seconds.
53415         * tests/unistr/test-u32-strstr.c (main): Likewise.
53417 2015-07-01  Pavel Raiskup  <praiskup@redhat.com>
53419         gnulib-common.m4: change the ARFLAGS default to 'cr'
53420         In some GNU/Linux distributions people started to compile 'ar'
53421         binary with --enable-deterministic-archives (binutils project).
53422         That, however, in combination with previous autotools long time
53423         working default AR{_,}FLAGS=cru causes warnings on such
53424         installations:
53425         ar: `u' modifier ignored since `D' is the default (see `U')
53426         * m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): Set ARFLAGS='cr' if not
53427         set already.
53429 2015-07-01  Pavel Raiskup  <praiskup@redhat.com>
53431         selinux-h: avoid double free after *getfilecon()
53432         Originally reported by Ben Shelton on bug-tar:
53433         http://lists.gnu.org/r/bug-tar/2015-04/msg00009.html
53434         * lib/getfilecon.c (map_to_failure): Set the already freed '*con'
53435         pointer to NULL.  Man getfilecon(3) says that any non-NULL '*con'
53436         param should be freed by freecon(3) (regardless the return value).
53438 2015-07-01  Pavel Fedin  <p.fedin@samsung.com>
53440         fix pty related tests issues on Windows (trivial)
53441         * lib/grantpt.c (grantpt): grantpt.c seems to be never used on Windows,
53442         however it's still present in tests/ subdirectory of the final project.
53443         Therefore avoid it to pass `make check`.
53444         * tests/test-openpty.c (main): Windows has no PTYs and gnulib's openpty()
53445         will just return -ENOSYS, so avoid this non applicable test allowing
53446         the build to proceed.
53448 2015-07-01  Pádraig Brady  <P@draigBrady.com>
53450         acl: fix definition of acl_from_mode on FreeBSD
53451         This was causing basic coreutils copy operations to fail
53452         with ENOTSUP or ENOENT error messages.
53453         * lib/acl-internal.h (acl_from_mode): Only define when
53454         ! defined HAVE_ACL_FROM_TEXT.  That allows the version
53455         of acl_from_mode() defined in lib/set-permissions.c to
53456         be used on FreeBSD at least.
53457         * lib/set-permissions.c: Fix up comment spelling,
53458         and a redundant variable assignment; noticed in passing.
53460 2015-06-30  Pádraig Brady  <P@draigBrady.com>
53462         readutmp: port to FreeBSD >= 9
53463         * lib/readutmp.h: Map utmpxname() to setutxdb().
53464         With that coreutils who(1) and pinky(1) tests pass.
53466 2015-06-30  Paul Eggert  <eggert@cs.ucla.edu>
53468         mgetgroups: port to strict OS X
53469         The previous fix wasn't working, so use a bigger hammer (Bug#20923).
53470         * lib/mgetgroups.c: Ignore -Wpointer-sign diagnostics.
53471         (getgrouplist_gids) [HAVE_GETGROUPLIST]: Remove.  All uses removed.
53472         * m4/mgetgroups.m4 (gl_MGETGROUPS): Revert recent changes.
53474 2015-06-29  Paul Eggert  <eggert@cs.ucla.edu>
53476         mgetgroups: port to strict OS X
53477         * doc/glibc-functions/getgrouplist.texi (getgrouplist):
53478         Document the getgrouplist problem.
53479         * lib/mgetgroups.c (getgrouplist_gids) [HAVE_GETGROUPLIST]:
53480         New macro.
53481         (mgetgroups): Use it.
53482         * m4/mgetgroups.m4 (gl_MGETGROUPS):
53483         Check for OS X signature for getgrouplist.
53485 2015-06-29  Jim Meyering  <meyering@fb.com>
53487         linkat: fix invalid definition of LINKAT_SYMLINK_NOTSUP on OS X
53488         It started like this when building coreutils' latest on OS X,
53489         invoking ./configure with a nonempty --cache=.cache:
53491           lib/linkat.c:46:42: error: operator '||' has no right operand
53492           lib/linkat.c: In function 'rpl_linkat':
53493           lib/linkat.c:330:27: error: #if with no expression
53495         Here's linkat.c's line 46:
53497           #if !HAVE_LINKAT || LINKAT_SYMLINK_NOTSUP
53499         Here's some context:
53501           $ grep linkat_nofoll .cache
53502           gl_cv_func_linkat_nofollow=${gl_cv_func_linkat_nofollow=no}
53503           $ grep LINKAT_SYM lib/config.h
53504           #define LINKAT_SYMLINK_NOTSUP
53506         The problem is that m4/linkat.m4's gl_FUNC_LINKAT
53507         uses AC_CACHE_CHECK to set LINKAT_SYMLINK_NOTSUP,
53508         but that violates a tenet of AC_CACHE_CHECK: it must
53509         have no side effect other than setting its cache variable.
53511         What happens is that when the cache is set, we'd skip the
53512         code in that AC_CACHE_CHECK call, and leave LINKAT_SYMLINK_NOTSUP
53513         defined to whatever value it happened to have in configure's
53514         environment.  In my case, it was not defined, so this later code:
53516           AC_DEFINE_UNQUOTED([LINKAT_SYMLINK_NOTSUP], [$LINKAT_SYMLINK_NOTSUP],
53517             [Define to 1 if linkat can create hardlinks to symlinks])
53519         would emit code with an empty RHS.
53521         * m4/linkat.m4 (gl_FUNC_LINKAT): Move the setting of
53522         $LINKAT_SYMLINK_NOTSUP out of the AC_CACHE_CHECK code block.
53524 2015-06-28  Jim Meyering  <meyering@fb.com>
53526         mountlist: avoid an unused-label warning on OS X
53527         * lib/mountlist.c (read_file_system_list) [MOUNTED_GETMNTINFO]:
53528         Building on OS X, I saw a warning about the "free_then_fail" label
53529         being unused.  Give it the _GL_UNUSED_LABEL attribute.
53531         error.c: correct printf-style format: %d -> %u
53532         * lib/error.c (error_at_line): Correct __fxprintf format to use %u,
53533         rather than %d, to match the type of "line_number", unsigned int.
53535 2015-06-25  Pádraig Brady  <P@draigBrady.com>
53537         fts: avoid reading beyond the heap allocation
53538         GCC 5.1.1 with -O2 and -fsanitize=address reports
53539         a read of size 4 from a heap object of size 3 is indeed invalid,
53540         though this may be due to incorrect padding assumptions by GCC, see:
53541         https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66661
53542         * lib/fts.c (fts_alloc): Increase allocation to alignof(FTSENT).
53543         * modules/fts: Depend on stdalign.
53545 2015-06-24  Pádraig Brady  <P@draigBrady.com>
53547         savedir: avoid undefined behavior in qsort call
53548         GCC 5.1.1 -fsanitize=undefined with glibc 2.21 is returning:
53549         "runtime error: null pointer passed as argument 1,
53550          which is declared to never be null"
53551         * lib/savedir.c (streamsavedir): Avoid the call with no entries.
53553 2015-06-24  Pádraig Brady  <P@draigBrady.com>
53555         userspec: avoid undefined behavior in gettext call
53556         GCC 5.1.1 -fsanitize=undefined with glibc 2.21 is returning:
53557         "runtime error: null pointer passed as argument 2,
53558          which is declared to never be null"
53559         * lib/userspec.c (parse_with_separator): Avoid passing NULL to gettext()
53561 2015-06-20  Glenn Morris  <rgm@gnu.org>
53563         gitlog-to-changelog: improve gitmerge.el commits
53564         Let the Emacs ChangeLog generation process exclude "skipped"
53565         messages from merge commits (Bug#20717).
53566         * build-aux/gitlog-to-changelog: Handle gitmerge.el skipped commits.
53568 2015-06-20  Paul Eggert  <eggert@cs.ucla.edu>
53570         wchar: fix MinGW compilation warnings
53571         This lets Texinfo compile cleanly.  See Eli Zaretskii in:
53572         http://lists.gnu.org/r/bug-gnulib/2015-06/msg00050.html
53573         * lib/wchar.in.h: Do not use special invocation convention on MinGW.
53575 2015-06-20  Daiki Ueno  <ueno@gnu.org>
53577         uniname/uniname-tests: use pristine data files
53578         For copyright and maintenance reasons, use the data files from UCD
53579         without modification.
53580         * tests/uniname/test-uninames.c (FIELDLEN): Remove.
53581         (getfield): Remove.
53582         (aliases_count): New global variable.
53583         (fill_names): Skip comments and empty lines in the input.  Don't
53584         use getfield.
53585         (fill_aliases): Likewise.
53586         (main): Change the expected command line arguments to:
53587         NAMES... ["--" ALIASES...].
53588         * tests/uniname/test-uninames.sh: Adjust to the change in
53589         test-uninames.c.
53590         * tests/uniname/UnicodeDataNames.txt: Remove.
53591         * tests/uniname/UnicodeData.txt: New file, from Unicode 8.0.0.
53592         * tests/uniname/NameAliases.txt: Use the pristine copy of the data
53593         file from Unicode 8.0.0.
53595 2015-06-19  Pádraig Brady  <P@draigBrady.com>
53597         linked-list, linkedhash-list: avoid compiler warnings
53598         * lib/gl_anytree_list2.h: Add _GL_ATTRIBUTE_PURE to avoid
53599         -Werror=suggest-attribute=pure (from GCC 5.1.1).
53601 2015-06-19  Daiki Ueno  <ueno@gnu.org>
53603         libunistring: bump minimum version to 0.9.6
53604         * all modules depending on updated Unicode data: Regenerate.
53605         The modules are listed by a script that does:
53606         - for each file listed by: git show --oneline --name-only 705f4efc
53607           - deduce the containing modules, based on "Files:"
53608         - deduce the modules which depend on the containing modules, based
53609           on "Depends-on:"
53611 2015-06-18  Daiki Ueno  <ueno@gnu.org>
53613         uniname/uniname: update to Unicode 8.0.0
53614         * lib/uniname/uninames.h: Regenerate.
53615         * tests/uniname/NameAliases.txt: Update from Unicode 8.0.0.
53616         * tests/uniname/UnicodeDataNames.txt: Update from Unicode 8.0.0.
53618 2015-06-18  Daiki Ueno  <ueno@gnu.org>
53620         libunistring: update to Unicode 8.0.0
53621         * lib/gen-uni-tables.c (SIZEOF): New macro.
53622         (output_numeric): Increase the maximum number of fractions from
53623         128 to 160.  Increase the level3 value width from 7 bits to 8
53624         bits.  Use SIZEOF instead of a hard-coded integer.
53625         (output_blocks): Decrease the cut-off threshold from 0x30000 to
53626         0x28000.
53627         (fill_blocks): Increase the maximum number of blocks from 256 to
53628         384.  Use SIZEOF instead of a hard-coded integer.
53629         (get_lbp): Adjust to new characters added in Unicode 8.0.0.
53630         * lib/unictype/numeric.c (uc_numeric_value): Adjust the level3
53631         value width.
53632         * lib/unilbrk/lbrktables.c (unilbrk_table): Implement LBP21b and
53633         a new case added to LBP22.
53634         * lib/uniwidth/width.c (nonspacing_table_data): Add U+08E3,
53635         U+A69E, U+FE2E..U+FE2F, U+111CA..U+111CC, U+11300,
53636         U+115DC..U+115DD, U+1171D..U+1171F, U+11722..U+11725,
53637         U+11727..U+1172B, U+1DA00..U+1DA36, U+1DA3B..U+1DA6C, U+1DA75,
53638         U+1DA84, U+1DA9B..U+1DA9F, and U+1DAA1..U+1DAAF.
53639         * tests/uniwidth/test-uc_width2.sh: Same updates as in
53640         lib/uniwidth/width.c.
53641         * all generated files under lib/uni* and tests/uni*: Regenerate.
53643 2015-06-16  Pádraig Brady  <P@draigBrady.com>
53645         gnu-web-doc-update: add --mirror to remove stale files
53646         * build-aux/gnu-web-doc-update: Add a --mirror option to remove
53647         out of date files from the CVS server.  Since this is usually
53648         appropriate, a prompt is given when the option is not specified,
53649         along with the `cvs remove` command that would be run.
53651 2015-06-06  Paul Eggert  <eggert@cs.ucla.edu>
53653         acl-permissions: pacify -Wsuggest-attribute=const
53654         Problem reported by Masanari Iida in: http://bugs.gnu.org/20753
53655         * lib/acl-internal.h (free_permission_context):
53656         Declare with attribute const if ! (defined USE_ACL &&
53657         (HAVE_ACL_GET_FILE || defined GETACL)).
53659         fsync: document AIX misbehavior
53660         * doc/posix-functions/fsync.texi (fsync):
53661         Document failure on AIX with read-only file descriptor.
53663 2015-06-05  Jonathan Perkin  <jperkin@joyent.com>  (tiny change)
53665         stdio: Don't redefine gets when using C++
53666         * lib/stdio.in.h (gets): Disable warning on C++.
53668 2015-06-05  Paul Eggert  <eggert@cs.ucla.edu>
53670         acl-permissions: port to AIX, C89 HP-UX
53671         Problems reported by Michael Felt.
53672         * lib/file-has-acl.c (file_has_acl) [HAVE_STATACL]:
53673         * lib/get-permissions.c (get_permissions) [USE_ACL && HAVE_STATACL]:
53674         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]:
53675         * lib/set-permissions.c (set_acls) [HAVE_ACLX_GET && ACL_AIX_WIP]:
53676         Add cast for AIX, whose system calls are declared to accept
53677         char * even though the arguments are really char const *.
53678         * lib/get-permissions.c (get_permissions):
53679         If USE_ACL && HAVE_GETACL /* HP-UX */, don't assume C99.
53680         If USE_ACL && HAVE_STATACL /* older AIX */, add missing decl
53681         that broke a build.
53682         * lib/mountlist.c (read_file_system_list) [MOUNTED_VMOUNT]:
53683         Rework types to pacify xlc.
53685 2015-06-03  Pádraig Brady  <P@draigBrady.com>
53687         vasprintf-posix: avoid compiling vasnprintf where possible
53688         * modules/vasprintf-posix: Avoid compiling the large vasnprintf
53689         module where not required.  For example on a GNU/Linux system
53690         when gnulib-tool is run with the --conditional-dependencies option.
53692 2015-06-02  Pádraig Brady  <P@draigBrady.com>
53694         file-has-acl: fix build on Mac OS X 10
53695         This reverts commit f1b37e3a which doesn't work on Mac OS X >= 10.4
53696         which has an incompatible 6 parameter getxattr() call.
53697         * doc/glibc-functions/getxattr.texi: Mention the divergent getxattr()
53698         call on Mac OS X >= 10.4.
53699         * doc/glibc-functions/fgetxattr.texi: Likewise.
53700         * lib/file-has-acl.c: Revert to more complete combined check.
53701         * m4/acl.m4 (gl_FILE_HAS_ACL): Likewise.
53702         Reported by Jack Howarth.
53704 2015-06-02  Pádraig Brady  <P@draigBrady.com>
53706         prefix-gnulib-mk: remove no longer needed special case
53707         * build-aux/prefix-gnulib-mk (prefix): Since commit e3704b9c,
53708         continued lib_SOURCES lines are no longer present,
53709         so special case handling of such entries is not required.
53711 2015-06-01  Pádraig Brady  <P@draigBrady.com>
53713         acl: don't depend on the deprecated qacl module
53714         * modules/acl (Depends-on): Use q{copy,set}-acl instead.
53716 2015-06-01  Pádraig Brady  <P@draigBrady.com>
53718         gnulib-tool: concatenate lib_SOURCES to a single line
53719         * gnulib-tool: Refactor the line merging sed logic,
53720         and use that to output a single lib_SOURCES line for each module.
53721         gnulib using projects often postprocess this output to prepend
53722         subdir paths to each item, and having a single line simplifies this
53723         processing allowing better decoupling from the gnulib-tool output.
53725 2015-06-01  Pavel Fedin  <p.fedin@samsung.com>
53727         pthread_sigmask: discount system version if a simple macro (trivial)
53728         MinGW64 has: #define pthread_sigmask(H, S1, S2) 0
53729         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Call the
53730         function to ensure it's available.
53732 2015-05-31  Pádraig Brady  <P@draigBrady.com>
53734         readlinkat: avoid OS X 10.10 trailing slash bug
53735         * doc/posix-functions/readlink.texi: Mention that OS X 10.10
53736         has this bug.
53737         * doc/posix-functions/readlinkat.texi: Likewise.  Also mention
53738         that OS X 10.10 has this function.
53739         * lib/readlinkat.c (rpl_readlinkat): Handle the trailing slash bug,
53740         as done for readlink().
53741         * m4/readlinkat.m4 (gl_FUNC_READLINKAT): Check for the readlink()
53742         trailing slash bug, and assume readlinkat() has the same issue.
53743         Also fix a typo where $gl_cv_decl_readlink_works was tested,
53744         rather than the correct $gl_cv_decl_readlinkat_works.
53746 2015-05-29  Andreas Gruenbacher  <andreas.gruenbacher@gmail.com>
53748         acl-permissions: Fix build on Mac OS X and older AIX (Bug#20681)
53749         * lib/set-permissions.c (set_acls): Fix more errors introduced in the acl
53750         module rewrite.
53752         acl-permissions: Fix build on Solaris and Cygwin
53753         Reported by Tom G. Christensen <tgc@jupiterrise.com>:
53754         * lib/set-permissions.c (set_acls): The count, entries, ace_count, and
53755         ace_entries variables have moved into struct permission_context but
53756         they were still accessed as local variables here.
53758 2015-05-29  Pádraig Brady  <P@draigBrady.com>
53760         linkat: avoid OS X 10.10 trailing slash with symlink bug
53761         On Darwin 14.3.0 linkat(,"path1",,"dangling_symlink/",)
53762         causes the symlink to be dereferenced, and if it points
53763         to a non existent file, that file will be created as
53764         a hard link to "path1".
53765         This fixes a test failure in test-linkat.c.
53766         * m4/linkat.m4 (gl_FUNC_LINKAT): Augment the test with
53767         this case.  The existing workaround in linkat.c for
53768         trailing slash issues, suffices for this case.
53769         * doc/posix-functions/linkat.texi: Add OS X 10.10 to
53770         the list of platforms with trailing slash issues.
53772 2015-05-28  Pádraig Brady  <P@draigBrady.com>
53774         unlinkat: handle ignoring of ".." on Darwin 14
53775         * lib/unlinkat.c: unlinkat() has the same bug as unlink()
53776         on Mac OS X 10.10, where it ignores paths with a trailing "..",
53777         so handle in the same manner.
53778         * m4/unlinkat.m4: Comment on this Darwin issue.
53779         * doc/posix-functions/unlink.texi: Update the latest version
53780         where the issue was seen.
53781         * doc/posix-functions/unlinkat.texi: Mention this issue.
53782         Fixes a test failure in test-unlinkat.c.
53784 2015-05-27  Paul Eggert  <eggert@cs.ucla.edu>
53786         qacl: split into qcopy-acl and qset-acl
53787         Emacs needs the former, but not the latter.
53788         * modules/acl-permissions: New file, containing most of the old qacl.
53789         * modules/file-has-acl (Depends-on): Depend on acl-permissions, not qacl.
53790         * modules/qacl: Now merely depends on qcopy-acl and qset-acl.
53791         * modules/qcopy-acl, modules/qset-acl: New files.
53792         * MODULES.html.sh (File system functions):
53793         Mention the new modules, and mention qacl while we're at it.
53795 2015-05-27  Glenn Morris  <rgm@gnu.org>
53797         gitlog-to-changelog: new option --ignore-line
53798         (This patch is imported from the GNU Emacs master.)
53799         This option ignores individual commit lines matching a pattern.
53800         * build-aux/gitlog-to-changelog: Add --ignore-line option.
53802 2015-05-27  Andreas Gruenbacher  <agruenba@redhat.com>
53804         qacl: Reimplement qset_acl and qcopy_acl (Bug#20666)
53805         Implement get_permissions and set_permissions primitives for getting all
53806         the permissions of a file, storing them, and later setting them. (In the
53807         minimal case, the permissions consist only of a file mode.) Reimplement
53808         qset_acl and qcopy_acl based on these new primitives: this avoids code
53809         duplication and makes error handling more consistent.
53810         The Solaris and Cygwin code still uses duplicate code paths for setting
53811         a file mode while making sure that no acls exist and setting an explicit
53812         acl; this is no worse than before, but could be cleaned up.  The AIX
53813         code still doesn't read ACLs, it only makes sure that acls don't get in
53814         the way when setting a file mode.
53815         * lib/acl-internal.h (struct permission_context): New data structure.
53816         (get_permissions, set_permissions, free_permission_context): Declare.
53817         * lib/acl-internal.c (free_permission_context): New helper function.
53818         * lib/get-permissions.c (get_permissions): New helper function split off
53819         from qcopy_acl.
53820         * lib/set-permissions.c: (set_acls_from_mode): On Solaris, Cygwin, and
53821         AIX, set a file's permissions based only on a file mode.
53822         (acl_from_mode, context_acl_from_mode, context_aclv_from_mode): All
53823         other platforms construct a temporary acl from the file mode and set
53824         that acl in the same way as setting an acl read from the source file.
53825         This should help avoid code duplication and inconsistent / buggy
53826         behavior.
53827         (set_acls): New helper function Split off from qcopy_acl.
53828         (chmod_or_fchmod): Moved here from qset-acl.c.
53829         (set_permissions): New helper function.
53830         * lib/qcopy-acl.c (qcopy_acl): Rewrite using get_permissions and
53831         set_permissions.
53832         * lib/qset-acl.c (qset_acl): Rewrite using set_permissions.
53833         * modules/qacl: Add get-permissions.c and set-permissions.c.
53835         file-has-acl: Split feature tests again (Bug#20667)
53836         * lib/file-has-acl.c: Instead of testing for
53837         XATTR_NAME_POSIX_ACL_ACCESS and XATTR_NAME_POSIX_ACL_DEFAULT,
53838         define them when needed.
53839         * m4/acl.m4 (gl_FILE_HAS_ACL): With that, Paul's
53840         GETXATTR_WITH_POSIX_ACLS change shouldn't be needed anymore.
53842 2015-05-27  Pádraig Brady  <P@draigBrady.com>
53844         string: fix build failure on BSD/OSX with FORTIFY_SOURCE
53845         This avoids a conflict with "FORTIFY_SOURCE" variants
53846         of the string functions when they're replaced on NetBSD-6.0.1
53847         and Darwin-14.3.0 at least.
53848         * lib/string.in.h: Avoid including our "lib/string.h" while
53849         including the system <string.h>.
53851 2015-05-26  Eric Blake  <eblake@redhat.com>
53853         stdio: limit __gnu_printf__ witness to gcc 4.4+
53854         * lib/error.h (_GL_ATTRIBUTE_SPEC_PRINTF): Move gcc version probe...
53855         * m4/stdio_h.m4 (gl_STDIO_H): ...here.
53857         error: use correct printf attributes on mingw
53858         * lib/stdio.in.h (_GL_ATTRIBUTE_SPEC_PRINTF): New define.
53860         inttypes: force correct mingw PRIdMAX even without <stdio.h>
53861         * modules/inttypes (Depends-on): Require extensions, so that mingw
53862         always uses GNU style inttypes.
53863         * lib/inttypes.in.h: On mingw, include <stdio.h>.
53865         stdio: fix probe on mingw under gcc 5.1
53866         * m4/stdio_h.m4 (gl_STDIO_H): Change to compile test, to work
53867         around new gcc preprocessor rules.
53869 2015-05-07  Glenn Morris  <rgm@gnu.org>
53871         gitlog-to-changelog: parse "Tiny-change"
53872         * build-aux/gitlog-to-changelog: Treat "Tiny-change" like
53873         "Copyright-paperwork-exempt".  (Bug#20324)
53875 2015-05-06  Pádraig Brady  <P@draigBrady.com>
53877         doc: document glibc posix_fallocate() issues
53878         * doc/posix-functions/posix_fallocate.texi: Mention the
53879         glibc efficiency problems and issues with NFS.
53881 2015-05-05  Karl Berry  <karl@freefriends.org>
53883         * build-aux/gendocs.sh (usage): document new css default
53884         for HTML (--htmlarg).
53886 2015-04-29  Paul Eggert  <eggert@cs.ucla.edu>
53888         extern-inline: no need for workaround in GCC 5.1
53889         * doc/extern-inline.texi (extern inline):
53890         * m4/extern-inline.m4 (gl_EXTERN_INLINE):
53891         GCC bugs 54113 and 63877 are fixed in GCC 5.1, so don't work
53892         around these bugs in GCC 5.1 and later.  Maybe in a decade or
53893         two we can remove these workarounds.
53895 2015-04-28  Pádraig Brady  <P@draigBrady.com>
53897         eealloc, pagealign_alloc, xalloc: avoid clang warnings
53898         Avoid [-Wunknown-attributes] warnings like:
53899         warning: unknown attribute '__alloc_size__' ignored
53900         * lib/xalloc.h: Don't use the __alloc_size__  attribute
53901         with clang, as support has been fully removed as of clang 3.5:
53902         https://github.com/llvm-mirror/clang/commit/c047507a
53903         * lib/eealloc.h: Likewise.
53904         * lib/pagealign_alloc.h: Likewise.
53906 2015-04-27  Paul Eggert  <eggert@cs.ucla.edu>
53908         tests: pacify GCC 5.1's stricter printf checking
53909         * tests/test-dirname.c (main):
53910         * tests/test-getaddrinfo.c (simple):
53911         * tests/test-getlogin.c (main):
53912         * tests/test-getndelim2.c (main):
53913         * tests/test-inttostr.c (CK):
53914         * tests/test-md5.c (main):
53915         * tests/test-read-file.c (main):
53916         * tests/test-sha1.c (main):
53917         Fix mismatches between printf format and value signedness.
53918         * tests/test-inttostr.c (FMT, CAST_VAL, V_min, V_max):
53919         Remove, as CAST_VAL always returned a value of type uintmax_t.
53921         fts: port to GCC 5.1 with --enable-gcc-warnings
53922         Without this fix, GCC 5.1 (correctly) warns about a subscript
53923         error on the fts_name component of FTSENT.  It's actually a
53924         flexible member, so define it that way on C99 or later hosts.
53925         * lib/fts.c (fts_alloc): Use offsetof, not sizeof, for a
53926         structure that now has a flexible array member.
53927         * lib/fts_.h (__FLEXIBLE_ARRAY_MEMBER): New macro.
53928         (FTSENT): fts_name is now flexible on C99-or-later platforms.
53929         * modules/fts (Depends-on): Add flexmember.
53931 2015-04-26  Paul Eggert  <eggert@cs.ucla.edu>
53933         file-has-acl: port to CentOS 6
53934         Problem reported by Tom G. Christensen in:
53935         http://lists.gnu.org/r/bug-gnulib/2015-04/msg00074.html
53936         * lib/file-has-acl.c: Use GETXATTR_WITH_POSIX_ACLS instead of a
53937         combination of HAVE_SYS_XATTR_H, HAVE_LINUX_XATTR_H, and
53938         HAVE_GETXATTR.
53939         * m4/acl.m4 (gl_FILE_HAS_ACL): Test fot the entire combination of
53940         linux/xattr.h, sys/xattr.h, getxattr, XATTR_NAME_POSIX_ACL_ACCESS,
53941         and XATTR_NAME_POSIX_ACL_DEFAULT, since that's what
53942         file-has-acl.c actually needs.
53944 2015-04-26  Pádraig Brady  <P@draigBrady.com>
53946         file-has-acl: always return false when ACLs aren't supported
53947         * lib/file-has-acl.c (file_has_acl): Consistent with other paths,
53948         change the GNU/Linux getxattr path, to transform "not supported"
53949         errors to a false return rather than an error.  This is handled
53950         within file_has_acl() due to the platform specific tests to
53951         determine if ACLs are not supported.
53953 2015-04-25  Paul Eggert  <eggert@cs.ucla.edu>
53955         gettext: propagate po/Makefile.in.in too
53956         * build-aux/po/Makefile.in.in: Copy from latest gettext.
53957         * config/srclist.txt: In build-aux/po, copy Makefile.in.in and
53958         remove-potcdate.sin from $GETTEXT.  This fixes a version mismatch
53959         between Makefile.in.in and the gettext-runtime m4 files.
53961 2015-04-24  Paul Eggert  <eggert@cs.ucla.edu>
53963         file-has-acl: new module, split from acl
53964         And add a new module file-has-acl-tests to match.
53965         I ran into a problem with the recent changes to the acl module,
53966         as they introduced a typo 'test use_xattrs = 0' into 'configure'.
53967         When using the fixed version with Emacs, I discovered that
53968         file-has-acl wasn't separated out well enough for Emacs (e.g., it
53969         had multiple libraries, but needed only one), so I fixed that too.
53970         * NEWS: Document this incompatible change.
53971         * modules/file-has-acl, modules/file-has-acl-tests: New files.
53972         * m4/acl.m4 (gl_FUNC_ACL_ARG): New macro, split from gl_FUNC_ACL.
53973         Initialize gl_need_lib_has_acl.
53974         (gl_FUNC_ACL): Require it.
53975         Simplify use of 'test'.  Set LIB_HAS_ACL if gl_need_lib_has_acl.
53976         Move the file-has-acl.c-relevant stuff to ...
53977         (gl_FILE_HAS_ACL): ... this new macro.  Rewrite to fix 'test
53978         use_xattrs = 0' typo, and omit some needless work.  Set
53979         gl_need_lib_has_acl=1 if we'll need LIB_HAS_ACL to be set
53980         when gl_FUNC_ACL is called.
53981         * modules/acl (Files, lib_SOURCES): Remove lib/file-has-acl.c.
53982         (Link): Remove $(LIB_HAS_ACL).
53983         * modules/acl-tests (Files, Depends-on, configure.ac, TESTS)
53984         (check_PROGRAMS): Move stuff relevant to file-has-acl to
53985         modules/file-has-acl-tests.
53986         (test_file_has_acl_LDADD): Move to modules/file-has-acl-tests.
53988         manywarnings: add GCC 5.1 warnings
53989         * build-aux/gcc-warning.spec: Add -Wabi=, -Warray-bounds,
53990         -Warray-bounds=, -Wc++14-compat, -Wc90-c99-compat,
53991         -Wc99-c11-compat, -Wshadow-ivar, -Wsized-deallocation,
53992         -Wsuggest-override, -Wuse-without-only.  Change
53993         -Wnormalized=... operands to match 5.1.
53994         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -Wbool-compare,
53995         -Wchkp, -Wdesignated-init, -Wdiscarded-array-qualifiers,
53996         -Wdiscarded-qualifiers, -Wformat-signedness,
53997         -Wincompatible-pointer-types, -Wint-conversion,
53998         -Wlogical-not-parentheses, -Wmemset-transposed-args, -Wodr,
53999         -Wshift-count-negative, -Wshift-count-overflow,
54000         -Wsizeof-array-argument, -Wsuggest-final-methods,
54001         -Wsuggest-final-types, -Wswitch-bool.  Remove -Warray-bounds,
54002         and add -Warray-bounds=2 as a special case.
54004 2015-04-21  Simon Josefsson  <simon@josefsson.org>
54006         doc: update FDL template to match FDL examples.
54007         * doc/alloca-opt.texi:
54008         * doc/alloca.texi:
54009         * doc/c-ctype.texi:
54010         * doc/c-strcase.texi:
54011         * doc/c-strcaseeq.texi:
54012         * doc/c-strcasestr.texi:
54013         * doc/c-strstr.texi:
54014         * doc/c-strtod.texi:
54015         * doc/c-strtold.texi:
54016         * doc/ctime.texi:
54017         * doc/error.texi:
54018         * doc/gcd.texi:
54019         * doc/gnulib-tool.texi:
54020         * doc/inet_ntoa.texi:
54021         * doc/intprops.texi:
54022         * doc/lib-symbol-visibility.texi:
54023         * doc/maintain.texi:
54024         * doc/parse-datetime.texi:
54025         * doc/quote.texi:
54026         * doc/regexprops-generic.texi:
54027         * doc/standards.texi: Remove spurious 'with' in FDL license
54028         template.
54030 2015-04-21  Paul Eggert  <eggert@cs.ucla.edu>
54032         lstat: fix cross-compilation 'ln -s' problem
54033         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK):
54034         Have the test program call 'symlink' rather than a separate
54035         script run 'ln -s'; this is more likely to work in
54036         cross-compilation environments.  Reported by Pavel Fedin in:
54037         http://lists.gnu.org/r/bug-gnulib/2015-04/msg00060.html
54039 2015-04-16  Ludovic Courtès  <ludo@gnu.org>
54041         gendocs.sh: default to a common CSS style sheet for HTML output
54042         * build-aux/gendocs.sh (htmlarg): Change default value.
54044 2015-04-15  Mats Erik Andersson  <gnu@gisladisker.se>
54046         gnulib-tool: output bold attribute more portably
54047         * gnulib-tool (func_show_module_list): Change hexadecimal
54048         numbers to octal in BOLD_ON and BOLD_OFF.  The use of hex
54049         encoded numbers as arguments to `printf' is not portable,
54050         and is not claimed by POSIX.  This is the case with FreeBSD.
54052 2015-04-15  Andreas Gruenbacher  <andreas.gruenbacher@gmail.com>
54054         qacl: Simplify HP-UX acl_nontrivial check
54055         * lib/acl-internal.c: Remove struct stat parameter from HP-UX's version of
54056         acl_nontrivial. Check if the acl has at most three entries instead (it must
54057         have exactly three entries according to the HP-UX documentation). Ignore
54058         uids and gids as long as an entry is either for a user (i.e., the owner),
54059         a group (i.e., the owning group), or others.
54060         * lib/acl-internal.h: Change HP-UX's acl_nontrivial prototype.
54061         * lib/qcopy-acl.c (qcopy_acl): With that, we no longer need to stat the file.
54063 2015-04-15  Andreas Gruenbacher   <andreas.gruenbacher@gmail.com>
54065         acl: On Linux, check for acls without libacl
54066         On Linux, use the getxattr syscall instead of the acl_extended_file libacl
54067         library function to check for the presence of acls, avoiding a library.
54068         * lib/file-has-acl.c: Include xattr headers if we have them.
54069         (file_has_acl): On Linux, use getxattr().
54070         * m4/acl.m4 (gl_FUNC_ACL): Define LIB_HAS_ACL as the libraries to link with for
54071         file_has_acl(). Check for xattr headers and getxattr().
54073 2015-04-14  Ángel González  <keisial@gmail.com>
54075         tempname: avoid unused parameter warnings (trivial)
54076         * lib/tempname.c (try_dir): Tag with __GL_UNUSED.
54077         (try_nocreate): Likewise.
54079 2015-04-14  HIRAMATSU Yoshifumi  <hiramatu@boreas.dti.ne.jp>
54081         fseeko: fix build failure on NetBSD >= 6 (trivial)
54082         * lib/fseeko.c (feeko): NetBSD 6 changed the definition of _offset
54083         from 'fpos_t struct' to __off_t, which is a typedef of __int64_t.
54085 2015-04-09  Paul Eggert  <eggert@cs.ucla.edu>
54087         gitlog-to-changelog: port to MS-Windows
54088         * build-aux/gitlog-to-changelog (git_dir_option):
54089         Use strftime with "%Y-%m-%d", not "%F", to avoid a bug in
54090         MS-Windows Perl.  Reported by Eli Zaretskii in:
54091         http://lists.gnu.org/r/emacs-devel/2015-04/msg00504.html
54093 2015-04-07  Karl Berry  <karl@gnu.org>
54095         gendocs: new option --tex for passing args to texi2dvi.
54096         * build-aux/gendocs.sh: new option --tex, default -t @finalout.
54097         (TEXI2DVI): cut to just command name.
54098         (usage): mention new option, and update copyright.
54099         <generate_tex>: use it.
54101 2015-04-07  Karl Berry  <karl@gnu.org>
54103         * config/srclistvars.sh (GETTEXT): new definition.
54104         * config/srclist.txt: use it for gettext .m4 files.
54105         Thread starting at http://lists.gnu.org/r/bug-gnulib/201
54106         and confirmed at http://lists.gnu.org/r/bug-gnulib/2015-02/msg00146.html
54107         and continuing into April.
54109 2015-04-07  Daiki Ueno  <ueno@gnu.org>
54111         uniname/uniname-tests: fix failure due to alias
54112         Reported by Jack Howarth in:
54113         <https://lists.gnu.org/r/bug-libunistring/2015-04/msg00000.html>.
54114         * tests/uniname/test-uninames.c (name_has_alias): New function.
54115         (test_inverse_lookup): Exclude character name with valid alias,
54116         from randomly generated character names.
54117         (main): Fill unicode_aliases before calling test functions.
54119 2015-04-03  Giuseppe Scrivano  <gscrivan@redhat.com>
54121         hash: remove deprecated hash_insert0 function
54122         * lib/hash.h (hash_insert0): Remove deprecated function.
54123         * lib/hash.c (hash_insert0): Likewise.
54125 2015-04-02  Pádraig Brady  <P@draigBrady.com>
54127         mountlist: remove dependency on libmount
54128         * lib/mountlist.c (read_file_system_list): Parse /proc/self/mountinfo
54129         directly, rather than depending on libmount, which has many
54130         dependencies due to its dependence on libselinux, as detailed at:
54131         http://lists.gnu.org/r/bug-gnulib/2015-01/msg00063.html
54132         Note we restrict this to __linux__ as that's probably where this
54133         interface will remain.  If ever porting, it would be best
54134         to first pull the makedev() wrapper from coreutils to a gnulib module.
54135         Note also we don't add a getline dependency to the mountlist module,
54136         as all Linux versions are sufficient.
54138 2015-04-02  Paul Eggert  <eggert@cs.ucla.edu>
54140         stddef: port to pre-C11 GCC on x86
54141         On this platform, max_align_t should have an alignment of 8 even
54142         though the storage alignments of double, long, etc. max out at 4.
54143         Inspired by a comment of Andreas Schwab's here:
54144         https://sourceware.org/ml/libc-alpha/2015-04/msg00017.html
54145         * lib/stddef.in.h (_GL_STDDEF_ALIGNAS) [!HAVE_MAX_ALIGN_T]: New macro.
54146         (max_align_t) [!HAVE_MAX_ALIGN_T]: Use it.
54147         * tests/test-stddef.c: Test __alignof__ too, if available.
54149 2015-03-24  Pádraig Brady  <P@draigBrady.com>
54151         quotearg-simple-tests: add missing gl_FUNC_MMAP_ANON dependency
54152         * modules/quotearg-simple-tests: Reference m4/mmap-anon.m4
54154 2015-03-24  Tobias Stoeckmann  <tobias@stoeckmann.org>
54156         yesno: make EOL optional in ENABLE_NLS case also (trival)
54157         * lib/yesno.c (yesno): Check for EOL before replacing.
54158         * tests/test-yesno.sh: Add a test case (test along with gettext).
54160 2015-03-22  Paul Eggert  <eggert@cs.ucla.edu>
54162         fdopendir-tests: test it does not close its arg
54163         * tests/test-fdopendir.c (main): Test that fdopendir does not
54164         close its argument.  From a suggestion by David Grayson in:
54165         http://lists.gnu.org/r/bug-gnulib/2015-03/msg00039.html
54167 2015-03-20  Paul Eggert  <eggert@cs.ucla.edu>
54169         gitlog-to-changelog: trim trailing white space
54170         * build-aux/gitlog-to-changelog (main):
54171         Trim trailing white space from commit message lines.
54172         This is helpful for processing the GNU Emacs repository,
54173         which dates back to 1985 and contains a lot of such lines.
54175         gitlog-to-changelog: new option --ignore-matching
54176         * build-aux/gitlog-to-changelog (usage, git_dir_option, main):
54177         Support new option --ignore-matching=PAT, which ignores all
54178         commit messages whose first line matches PAT.
54180 2015-03-19  Paul Eggert  <eggert@cs.ucla.edu>
54182         fdopendir: port better to MinGW
54183         * lib/fdopendir.c (fd_clone_opendir) [REPLACE_FCHDIR]:
54184         Use 'dup' if dirfd fails.  Suggested by Eli Zaretskii in:
54185         http://lists.gnu.org/r/bug-gnulib/2015-03/msg00033.html
54186         * modules/fdopendir (Depends-on): Add dirfd.
54188 2015-03-18  Paul Eggert  <eggert@cs.ucla.edu>
54190         fdopendir: fix typo in comment
54191         * lib/fdopendir.c (fdopendir_with_dup): REPLACE_FCHDIR was misspelled.
54193 2015-03-09  Eric Blake  <eblake@redhat.com>
54195         error: document all entry points provided
54196         * doc/glibc-functions/error_print_progname.texi
54197         (error_print_progname): Mention the error module.
54198         * doc/glibc-functions/error_at_line.texi (error_at_line):
54199         Likewise.
54200         * doc/glibc-functions/error_message_count.texi
54201         (error_message_count): Likewise.
54202         * doc/glibc-functions/error_one_per_line.texi
54203         (error_one_per_line): Likewise.
54205 2015-03-03  Paul Eggert  <eggert@cs.ucla.edu>
54207         vasnprintf: pacify clang 3.5.0
54208         Problem reported by Werner Lemberg in:
54209         http://lists.gnu.org/r/bug-gnulib/2015-03/msg00000.html
54210         * lib/vasnprintf.c (VASNPRINTF): Omit casts that clang objects to.
54211         The casts aren't needed, since the characters in question are ASCII.
54213 2015-02-24  Paul Eggert  <eggert@cs.ucla.edu>
54215         glob, etc.: port to MSVC v18 on MS-Windows 8.1
54216         * lib/dirent--.h (GNULIB_defined_opendir):
54217         * lib/dirent.in.h (GNULIB_defined_opendir)
54218         (GNULIB_defined_closedir):
54219         * lib/getcwd.c, lib/glob.c, lib/mountlist.c (opendir, closedir):
54220         #undef only if Gnulib defined it.
54222         poll: port to MSVC v18 on MS-Windows 8.1
54223         Problem reported by Gisle Vanem in:
54224         http://lists.gnu.org/r/bug-gnulib/2015-02/msg00139.html
54225         * lib/poll.c: Always include <sys/select.h> and <sys/socket.h>.
54226         * modules/poll (Depends-on) [!HAVE_POLL || REPLACE_POLL]:
54227         Add sys_socket.
54229 2015-02-24  Pádraig Brady  <P@draigBrady.com>
54231         tests: support stderr verification with returns_()
54232         * tests/init.sh (returns_): Disable tracing for this wrapper
54233         function, so that stderr of the wrapped command is unchanged,
54234         allowing for verification of the contents.
54236 2015-02-24  Pavel Hrdina  <phrdina@redhat.com>
54238         passfd: avoid valgrind uninitalised data warning
54239         * lib/passfd.c (sendfd): Reset the msg_controllen of msghdr,
54240         to include just the fd we've initialized, rather than including
54241         the extra space used for alignment.
54243 2015-02-23  Paul Eggert  <eggert@cs.ucla.edu>
54245         uniwbrk/u32-wordbreaks-tests: fix copyright
54246         * tests/uniwbrk/test-uc-wordbreaks.c: Fix copyright date.
54248         dup2: doc and test for Android bug
54249         Reported by Kevin Cernekee in:
54250         http://lists.gnu.org/r/bug-gnulib/2015-02/msg00125.html
54251         * doc/posix-functions/dup2.texi (dup2): Document the bug.
54252         * m4/dup2.m4 (gl_FUNC_DUP2): Test for the bug.
54254 2015-02-23  Kevin Cernekee  <cernekee@google.com>
54256         Replace dup2() on Android
54257         * m4/dup2.m4 (gl_FUNC_DUP2): Android implements dup2() using dup3().
54258         Since dup3(fd, fd) fails but dup2(fd, fd) should pass, test-dup2
54259         fails.  Using rpl_dup2() fixes this because it has an explicit test
54260         for this condition.
54262 2015-02-22  Paul Eggert  <eggert@cs.ucla.edu>
54264         Android doesn't define RLIM_SAVED_*
54265         Portability problem reported by Kevin Cernekee in:
54266         http://lists.gnu.org/r/bug-gnulib/2015-02/msg00122.html
54267         * doc/posix-headers/sys_resource.texi (sys/resource.h):
54268         Mention the portability problem.
54269         * lib/getdtablesize.c (RLIM_SAVED_CUR, RLIM_SAVED_MAX):
54270         Define if not defined.
54271         * m4/dup2.m4 (gl_FUNC_DUP2):
54272         * m4/fcntl.m4 (gl_FUNC_FCNTL):
54273         Likewise.
54275 2015-02-21  Paul Eggert  <eggert@cs.ucla.edu>
54277         vasnprintf-posix-tests: use consistent test
54278         * tests/test-vasnprintf-posix.c (test_function):
54279         Use "<" in assert instead of "<=", for consistency with other tests.
54281 2015-02-20  Paul Eggert  <eggert@cs.ucla.edu>
54283         printf, isinf, etc.: noncanonical != NaN
54284         Do not require that isinf, printf, etc. treat noncanonical
54285         values as NaNs.  Instead, require only that they do not crash.
54286         Problem reported by Joseph Myers in:
54287         https://sourceware.org/ml/libc-alpha/2015-02/msg00244.html
54288         * doc/posix-functions/dprintf.texi (dprintf):
54289         * doc/posix-functions/fprintf.texi (fprintf):
54290         * doc/posix-functions/isfinite.texi (isfinite):
54291         * doc/posix-functions/isinf.texi (isinf):
54292         * doc/posix-functions/isnan.texi (isnan):
54293         * doc/posix-functions/printf.texi (printf):
54294         * doc/posix-functions/snprintf.texi (snprintf):
54295         * doc/posix-functions/sprintf.texi (sprintf):
54296         * doc/posix-functions/vdprintf.texi (vdprintf):
54297         * doc/posix-functions/vfprintf.texi (vfprintf):
54298         * doc/posix-functions/vprintf.texi (vprintf):
54299         * doc/posix-functions/vsnprintf.texi (vsnprintf):
54300         * doc/posix-functions/vsprintf.texi (vsprintf):
54301         Document this.
54302         * m4/isfinite.m4 (gl_ISFINITEL_WORKS):
54303         * m4/isinf.m4 (gl_ISINFL_WORKS):
54304         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS):
54305         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE):
54306         * tests/test-isfinite.c (test_isfinitel):
54307         * tests/test-isinf.c (test_isinfl):
54308         * tests/test-isnan.c (test_long_double):
54309         * tests/test-isnanl.h (main):
54310         * tests/test-snprintf-posix.h (test_function):
54311         * tests/test-sprintf-posix.h (test_function):
54312         * tests/test-vasnprintf-posix.c (test_function):
54313         * tests/test-vasprintf-posix.c (test_function):
54314         Test only that noncanonical values do not cause crashes, not that
54315         they are treated as NaNs.  In some cases this means a larger
54316         output buffer is needed.
54318 2015-02-20  Jaroslav Skarvada  <jskarvad@redhat.com>
54320         fts: remove redundant close() (trivial)
54321         * lib/fts.c (fts_read): Remove redundant call to close().
54322         Spotted by coverity.
54324 2015-02-20  Paul Eggert  <eggert@cs.ucla.edu>
54326         getdtablesize: port better for Android
54327         Problem reported by Kevin Cernekee in:
54328         http://lists.gnu.org/r/bug-gnulib/2015-02/msg00112.html
54329         * doc/glibc-functions/getdtablesize.texi (getdtablesize): Mention bug.
54330         * lib/getdtablesize.c (getdtablesize): Don't fall back on _SC_OPEN_MAX.
54331         Instead, just use getrlimit, taking care to avoid Cygwin bug.
54333         poll: fixes for large fds
54334         * lib/poll.c (poll): Don't check directly for NFD too large.
54335         Don't rely on undefined behavior in FD_SET when an arg exceeds
54336         FD_SETSIZE.  Always set revents afterwards, even if to zero.
54337         * tests/test-poll.c (poll1): Set revents to -1 instead of 0,
54338         as that makes the test a bit stricter.
54340 2015-02-19  Kevin Cernekee  <cernekee@google.com>
54342         fcntl: Fix cross compiling
54343         * m4/fcntl.m4 (gl_FUNC_FCNTL): Assign the guessed result to the
54344         correct variable name (gl_cv_func_fcntl_f_dupfd_works).
54346 2015-02-18  Paul Eggert  <eggert@cs.ucla.edu>
54348         dup2, fcntl: cross-compile better for Android
54349         Problem reported by Kevin Cernekee in:
54350         http://lists.gnu.org/r/bug-gnulib/2015-02/msg00109.html
54351         * m4/dup2.m4 (gl_FUNC_DUP2): Don't guess no when cross-compiling
54352         for a Linux kernel.  That kernel bug was fixed on 2009-05-11, and
54353         there's little need to cross-compile for older kernels nowadays.
54354         * m4/fcntl.m4 (gl_FUNC_FCNTL): When cross-compiling, guess no only
54355         for systems where the bug is known to occur (AIX, Cygwin, Haiku).
54357 2015-02-18  Pádraig Brady  <P@draigBrady.com>
54359         getopt: don't crash on memory exhaustion
54360         * lib/getopt.c (_getopt_internal_r): Use degraded diagnostics on
54361         memory exhaustion.  In the _LIBC case we use alloca() as is
54362         already done in glibc, so we don't need to consider the separate
54363         error path in that awkward case.  Also fix a memory leak when
54364         ambiguous options are present.
54365         Reported by Tobias Stoeckmann
54367 2015-02-17  Mike Miller  <mtmiller@ieee.org>
54369         tempname: allow compilation with C++ (trivial)
54370         * lib/tempname.h [C++]: Specify extern "C" linkage.
54371         * lib/tempname.h (try_tempname):
54372         * lib/tempname.c (__try_tempname, __gen_tempname):
54373         Rename 'try' to 'tryfunc'.
54375 2015-02-17  Paul Eggert  <eggert@cs.ucla.edu>
54377         dup2, fcntl: port to AIX
54378         * m4/dup2.m4 (gl_FUNC_DUP2):
54379         * m4/fcntl.m4 (gl_FUNC_FCNTL):
54380         Prefer getrusage (RLIM_NOFILE ...)/rlim_cur to sysconf (_SC_OPEN_MAX).
54381         The former works on AIX 7.1 but the latter does not.
54382         Also, this may work better with Android; see:
54383         http://lists.gnu.org/r/bug-gnulib/2015-02/msg00100.html
54385 2015-02-16  Paul Eggert  <eggert@cs.ucla.edu>
54387         getdtablesize, dup2, fcntl: port to Android
54388         Problem reported by Kevin Cernekee in:
54389         http://lists.gnu.org/r/bug-gnulib/2015-02/msg00092.html
54390         * doc/glibc-functions/getdtablesize.texi (getdtablesize):
54391         Mention that getdtablesize doesn't work on Android.
54392         * lib/getdtablesize.c: Use getrlimit substitute only if
54393         getdtablesize is declared.  This should suffice for Cygwin
54394         while not breaking Android.
54395         * m4/dup2.m4 (gl_FUNC_DUP2):
54396         * m4/fcntl.m4 (gl_FUNC_FCNTL):
54397         Prefer sysconf (_SC_OPEN_MAX) to getdtablesize, as the former is
54398         standardized but the latter is not, and sysconf works on Android.
54399         * m4/getdtablesize.m4 (gl_FUNC_GETDTABLESIZE):
54400         Also check that getdtablesize is declared.
54401         This removes the need for a special case for Android.
54403 2015-02-16  Kevin Cernekee  <cernekee@google.com>
54405         localename: Implement gl_locale_name_thread_unsafe for Android
54406         * lib/localename.c: Android API level >= 21 supports two hardcoded
54407         locales: C (POSIX) and C.UTF-8.  Distinguish them by checking
54408         the internal __locale_t struct.
54410 2015-02-16  Kamil Dudka  <kdudka@redhat.com>
54412         fts: avoid crash when a cycle is added while traversing
54413         This could be triggered by auto-mounting a recursive bind mount.
54414         Reported by Michael Chapman in: https://bugzilla.redhat.com/1188498
54415         * lib/fts.c (fts_read): Avoid removing the original hash table item
54416         when leaving a directory that caused a cycle, and preserve the FTS_DC
54417         flag.
54419 2015-02-16  Daiki Ueno  <ueno@gnu.org>
54421         uniname/uniname: support character alias
54422         * lib/uniname/gen-uninames.lisp (main): New argument ALIASFILE.
54423         Generate one-way mapping from aliases to codepoints in the
54424         generated tables.  Special case variation selectors to reduce
54425         table size.
54426         * lib/uniname/uniname.c (unicode_character_name): Special case
54427         variation selectors.
54428         (unicode_name_character): Special case variation selectors and
54429         their aliases.
54430         * lib/uniname/uninames.h: Regenerate.
54431         * tests/uniname/NameAliases.txt: New file, taken from UCD 7.0.0.
54432         * modules/uniname/uniname-tests (Files): Add
54433         tests/uniname/NameAliases.txt.
54434         * tests/uniname/test-uninames.c: Mark as static.
54435         (ALIASLEN): Define.
54436         (struct unicode_alias): New struct.
54437         (unicode_aliases): New variable.
54438         (fill_aliases): New function.
54439         (test_alias_lookup): New test function.
54440         (main): Run the 'test_alias_lookup' test if the second argument is
54441         given.
54442         * tests/uniname/test-uninames.sh: Supply NameAliases.txt as the
54443         second argument.
54445 2015-02-11  Kevin Cernekee  <cernekee@google.com>
54447         Fix FILE struct compatibility with Android API level >= 21
54448         * lib/stdio-impl.h: Test explicitly for __ANDROID__ instead of
54449         __sferror.  Recent versions of Bionic's stdio.h no longer define
54450         __sferror.
54451         * lib/fbufmode.c: Likewise.
54452         * lib/fflush.c: Likewise.
54453         * lib/fpurge.c: Likewise.
54454         * lib/freadable.c: Likewise.
54455         * lib/freadahead.c: Likewise.
54456         * lib/freading.c: Likewise.
54457         * lib/freadptr.c: Likewise.
54458         * lib/freadseek.c: Likewise.
54459         * lib/fseeko.c: Likewise.
54460         * lib/fseterr.c: Likewise.
54461         * lib/fwritable.c: Likewise.
54463         Assume unbroken ungetc() on Android
54464         * m4/ungetc.m4: Add Android case to host OS check.  The ungetc()
54465         test case passed when running on an Android host, and the code
54466         hasn't really changed since 2009.
54468         getdtablesize: Fix Android build
54469         * m4/getdtablesize.m4: Add Android case to host OS check.  Recent NDK
54470         versions have this symbol in the .so library (at least 32-bit
54471         platforms) but are missing the declaration in the header file,
54472         causing the m4 logic to guess incorrectly.
54474         localename: Fix Android build
54475         * modules/localename (Depends-on): Add langinfo.
54477         getugroups: Fix Android build
54478         * lib/getugroups.c: Don't reference unsupported {get,set,end}grent
54479         functions.
54481         euidaccess: Fix Android build
54482         * modules/euidaccess (Depends-on): Add fcntl-h to ensure that
54483         AT_EACCESS gets declared.
54485         linkat_nofollow: Add fallback case for cross compiling
54486         * m4/linkat.m4: Guess no for Darwin, yes otherwise.
54488         net_if: Handle content-free <net/if.h> system headers
54489         * m4/net_if_h.m4: Check to make sure <net/if.h> actually defines
54490         struct if_nameindex.  If not, enable the replacement header.
54492         signal_h: Fix Android build
54493         * lib/signal.in.h: Add Android to the list of platforms that declare
54494         pthread_sigmask() in <pthread.h> instead of <signal.h>.
54496         duplocale: Fix Android build of duplocale-tests
54497         * modules/duplocale-tests (Depends-on): Add langinfo, as the header
54498         is included by test-duplocale.c (but not by duplocale.c).
54499         * modules/duplocale-tests (configure.ac): Check for monetary.h.
54500         * tests/test-duplocale.c: Skip test if monetary.h is absent.
54501         * doc/posix-headers/monetary.texi: Add Android to the list of
54502         platforms missing monetary.h.
54504 2015-02-11  Pádraig Brady  <P@draigBrady.com>
54506         tests: avoid recent -Werror=unused-variable regression in test-locale
54507         * tests/test-locale.c (main): Reference the variable to avoid the
54508         "unused variable" warning.
54510 2015-02-11  Pádraig Brady  <P@draigBrady.com>
54512         maint: various whitespace cleanups in tempname
54513         * lib/tempname.c: Normalize spacing and line length.
54514         * lib/tempname.h: Likewise.
54515         * modules/tempname: Likewise.
54517 2015-02-11  Pádraig Brady  <P@draigBrady.com>
54519         tests: provide returns_() to simplify exit status checking
54520         * tests/init.sh (returns_): A new function for use in tests,
54521         to allow for easier checking of return values, where you expect
54522         a command to exit with failure status.  By checking for a particular
54523         exit code, you don't hide any crashes for example.
54525 2015-02-11  Pádraig Brady  <P@draigBrady.com>
54527         mountlist: only use libmount when specified
54528         There are currently many shared libs dependencies introduced by
54529         libmount with associated runtime and virt mem overhead.
54530         Therefore don't enable by default.
54531         * m4/ls-mntd-fs.m4: Use --with-libmount to enable at build time.
54533 2015-02-08  Daiki Ueno  <ueno@gnu.org>
54535         uniname/unimame-tests: don't link with -lunistring
54536         * modules/uniname/uniname-tests (Makefile.am): Don't link against
54537         $(LIBUNISTRING).  Document the rationale why we need to
54538         conditionalize the test.
54540 2015-02-07  Paul Eggert  <eggert@cs.ucla.edu>
54542         fstrcmp: don't assume strlen < INT_MAX
54543         * lib/fstrcmp.c: Include stddef.h and stdint.h.
54544         (uintptr_t): Remove, as we're now assuming stdint.
54545         (OFFSET, EXTRA_CONTEXT_FIELDS, fstrcmp_bounded):
54546         Prefer ptrdiff_t to int when the value could exceed INT_MAX
54547         if the input string is long.
54548         (fstrcmp_bounded): Check for size-calculation overflow.  Prefer
54549         uintptr_t to size_t when the underlying value is a pointer casted
54550         to an unsigned integer.  Avoid unnecessary 'buffer != NULL' test.
54551         * modules/fstrcmp (Depends-on): Add stdint.
54553         diffseq: prefer ptrdiff_t to ssize_t
54554         * lib/diffseq.h: In commentary, prefer ptrdiff_t to ssize_t.
54555         ptrdiff_t is the natural type for signed indexes.
54556         On a few older platforms, ssize_t is narrower than size_t.
54558         xalloc: fix typo that suppressed warnings
54559         * lib/xalloc.h: Add missing _GL_INLINE_HEADER_END.
54560         This typo, introduced a couple of years ago, mistakenly suppressed
54561         some -Wsuggest-attribute=const, -Wmissing-prototypes, and
54562         -Wmissing-declarations warnings.
54564         full-read: fix license notice typo
54565         * lib/full-read.h: Remove a stray line in the license notice.
54566         Reported by Sam Ellis in: http://bugs.gnu.org/19808
54568         crypto/gc: fix a -Wswitch warning
54569         Reported by Bruce Korb in:
54570         http://lists.gnu.org/r/bug-gnulib/2015-02/msg00046.html
54571         * lib/gc-gnulib.c (gc_hash_open): Fail faster if MODE is nonzero.
54573 2015-02-03  Pádraig Brady  <P@draigBrady.com>
54575         gnulib-tool: fix handling of patch(1) diagnostics
54576         * gnulib-tool: Send diagnostics from patch(1) to stderr,
54577         as otherwise gnulib-tool will reparse that output and attempt
54578         to lookup modules.
54580 2015-02-03  Pádraig Brady  <P@draigBrady.com>
54582         bootstrap: exit immediately upon gnulib-tool failure
54583         * build-aux/bootstrap: Exit immediately if gnulib-tool fails.
54584         This was noticed when gnulib-tool exited early due to failure
54585         to apply a patch in coreutils at http://hydra.nixos.org/eval/1172233,
54586         but various confusing errors were then given as the build proceeded.
54588 2015-02-02  Andreas Gruenbacher  <agruen@gnu.org>
54590         symlinkat: include all required header files
54591         * lib/symlinkat.c (HAVE_SYMLINK_AT): Add <sys/stat.h> for fstatat(),
54592         and string.h for strlen(), required at least on OS X 10.10 (Yosemite).
54593         Reported at https://savannah.gnu.org/bugs/index.php?44151
54594         and by Jack Howarth.
54596 2015-01-29  Pádraig Brady  <P@draigBrady.com>
54598         localename: support Solaris 12 and illumos
54599         * lib/localename.c (gl_locale_name_thread_unsafe): call
54600         getlocalename_l() on newer __sun platforms.
54601         Reported by Alexander Pyhalov.
54602         Fix suggested by Rich Burridge.
54604 2015-01-29  Alexander Pyhalov  <alp@rsu.ru>
54606         locale: fix tests on illumos (trivial)
54607         * tests/test-locale.c: LC_GLOBAL_LOCALE is a function call on illumos,
54608         so move from global scope to main().
54610 2015-01-24  Daiki Ueno  <ueno@gnu.org>
54612         unictype: avoid undefined left-shift behavior
54613         * lib/unictype/bidi_of.c (uc_bidi_class): Building libunistring with
54614         gcc's -fsanitize=shift and running its tests triggered:
54615           unictype/bidi_of.c:43:60: runtime error: left shift of 40167 by 16 \
54616             places cannot be represented in type 'int'
54617         Cast LHS to 'unsigned int' after integer promotion.
54618         * lib/unictype/categ_of.c (lookup_withtable): Likewise.
54619         * lib/unictype/joininggroup_of.c (uc_joining_group): Likewise.
54621 2015-01-20  Daiki Ueno  <ueno@gnu.org>
54623         libunistring: bump version of unitypes dependants
54624         Due to the header file search order, all the headers which depend
54625         on unitypes.h need to be generated, when the preinstalled
54626         libunistring is older.
54627         * modules/unicase/base (configure.ac): Bump minimum version to
54628         0.9.4.
54629         * modules/uniconv/base (configure.ac): Likewise.
54630         * modules/unilbrk/base (configure.ac): Likewise.
54631         * modules/uninorm/base (configure.ac): Likewise.
54632         * modules/unistdio/base (configure.ac): Likewise.
54633         * modules/unistr/base (configure.ac): Likewise.
54634         * modules/uniwbrk/base (configure.ac): Likewise.
54635         * modules/uniwidth/base (configure.ac): Likewise.
54637 2015-01-20  Daiki Ueno  <ueno@gnu.org>
54639         unictype/category-none: fix link with libunistring
54640         Since _UC_CATEGORY_NONE is not a public symbol, it will be
54641         prefixed with "libstring_" when compiled as part of libunistring.
54642         To avoid undefined symbol at link time, increase the minimum
54643         version when the dependant modules are updated.
54644         * modules/unictype/category-none (configure.ac): Bump minimum
54645         version to 0.9.5.
54647 2015-01-20  Daiki Ueno  <ueno@gnu.org>
54649         unitypes: fix build with installed libunistring
54650         The minimum version has not bumped after _UC_ATTRIBUTE_CONST and
54651         _UC_ATTRIBUTE_PURE were added to unitypes.in.h.
54652         * modules/unitypes (configure.ac): Bump minimum version to 0.9.4.
54654 2015-01-15  Paul Eggert  <eggert@cs.ucla.edu>
54656         time: port to MinGW32 3.21
54657         Problem reported by Eli Zaretskii in:
54658         http://lists.gnu.org/r/bug-gnulib/2015-01/msg00042.html
54659         * lib/time.in.h:
54660         * m4/time_h.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC):
54661         * modules/time (Depends-on):
54662         Fall back on unistd.h if the other include files don't define
54663         struct timespec.
54665         update-copyright: apply to self
54666         * build-aux/update-copyright: Fix copyright date.  How ironic!
54668 2015-01-15  Daiki Ueno  <ueno@gnu.org>
54670         libunistring: update to Unicode 7.0.0
54671         * lib/unictype/joininggroup_byname.gperf: Add Straight Waw and
54672         Manichaean names.
54673         * lib/unictype/joininggroup_name.h: Likewise.
54674         * lib/unictype.in.h (UC_JOINING_GROUP_STRAIGHT_WAW)
54675         (UC_JOINING_GROUP_MANICHAEAN_ALEPH): New enumeration values.
54676         * lib/gen-uni-tables.c (UC_JOINING_GROUP_STRAIGHT_WAW)
54677         (UC_JOINING_GROUP_MANICHAEAN_*): New enumeration values.
54678         (fill_arabicshaping, joining_group_as_c_identifier): Support those
54679         enum values.
54680         (is_property_alphabetic): Accept newly added characters to
54681         cuneiform numeric signs.
54682         (is_property_default_ignorable_code_point): Reject U+0605.
54683         (FIELDLEN): Increase from 120 to 160.
54684         * lib/uniwidth/width.c (nonspacing_table_data): Add U+0605,
54685         U+08FF, U+0C00, U+0C81, U+0D01, U+1AB0..U+1ABE, U+1BAC..U+1BAD,
54686         U+1CF8..U+1CF9, U+1DE7..U+1DF5, U+A9E5, U+AA7C, U+FE27..U+FE2D,
54687         U+102E0, U+10376..U+1037A, U+10AE5..U+10AE6, U+1107F, U+11173,
54688         U+1122F..U+11231, U+11234, U+11236..U+11237, U+112DF,
54689         U+112E3..U+112EA, U+11301, U+1133C, U+11340, U+11366..U+1136C,
54690         U+11370..U+11374, U+114B3..U+114B8, U+114BA, U+114BF..U+114C0,
54691         U+114C2..U+114C3, U+115B2..U+115B5, U+115BC..U+115C0,
54692         U+11633..U+1163A, U+1163D, U+1163F..U+11640, U+16AF0..U+16AF4,
54693         U+16B30..U+16B36, U+1BC9D..U+1BC9E, U+1BCA0..U+1BCA3, and
54694         U+1E8D0..U+1E8D6.
54695         (uc_width): Adjust nonspacing_table_ind boundary from 240 to 248.
54696         * tests/uniwidth/test-uc_width2.sh: Same updates as in
54697         lib/uniwidth/width.c.
54698         * all generated files under lib/uni* and tests/uni*: Regenerate.
54700 2015-01-14  Daiki Ueno  <ueno@gnu.org>
54702         libunistring: update to Unicode 6.3.0
54703         * lib/uniwbrk.in.h (WBP_DQ, WBP_SQ, WBP_HL): New enumeration values.
54704         * lib/uniwbrk/u-wordbreaks.h (FUNC): Support WB7a, WB7b, and WB7c.
54705         Update WB5, WB6, WB7, WB9, WB11, WB12, WB13a, and WB13b.
54706         * lib/uniwbrk/wbrktable.h (uniwbrk_table): Adjust table size.
54707         * lib/uniwbrk/wbrktable.c (uniwbrk_table): Support rule WB7a.
54708         Update WB5, WB9, WB10, WB13a, and WB13b.
54709         * tests/uniwbrk/test-uc-wordbreaks.c
54710         (wordbreakproperty_to_string): Support WBP_DQ, WBP_SQ, and WBP_HL.
54711         * lib/gen-uni-tables.c (UC_BIDI_LRI, UC_BIDI_RLI, UC_BIDI_FSI)
54712         (UC_BIDI_PDI): New enumeration values.
54713         (bidi_category_byname): Support those enum values.
54714         (is_WBP_MIDNUMLET): Exclude 0x0027 (SINGLE QUOTE), which is now a
54715         dedicated property assigned.
54716         (is_property_case_ignorable): Check 0x0027.
54717         (WBP_DQ, WBP_SQ, WBP_HL): New enumeration values.
54718         (get_wbp, debug_output_wbp, fill_org_wbp, debug_output_org_wbp)
54719         (output_wbp): Support those enum values.
54720         * lib/unictype.in.h (UC_BIDI_LRI, UC_BIDI_RLI, UC_BIDI_FSI)
54721         (UC_BIDI_PDI): New enumeration values.
54722         * lib/unictype/bidi_byname.gperf: Add those property names.
54723         * lib/uniwidth/width.c (nonspacing_table_data): Add U+061C,
54724         U+180E, U+1A1B, and U+2066..U+2069.
54725         * tests/uniwidth/test-uc_width2.sh: Same updates as in
54726         lib/uniwidth/width.c.
54727         * all generated files under lib/uni* and tests/uni*: Regenerate.
54729 2015-01-14  Daiki Ueno  <ueno@gnu.org>
54731         libunistring: update to Unicode 6.2.0
54732         * lib/unilbrk/lbrktables.h (LBP_RI): New enumeration value.
54733         (unilbrk_table): Adjust table size.
54734         * lib/unilbrk/lbrktables.c (unilbrk_table): Add a row and column
54735         for LBP_RI.
54736         * lib/uniwbrk.in.h (WBP_RI): New enumeration value.
54737         * lib/uniwbrk/u-wordbreaks.h (FUNC): Support rule WB13c.
54738         Normalize table index skipping ignored properties.
54739         * lib/uniwbrk/wbrktable.c (uniwbrk_table): Support WBP_RI.  Remove
54740         WBP_EXTEND and WBP_FORMAT, which are now computed without using
54741         the table.
54742         * lib/uniwbrk/wbrktable.h: Adjust table size.
54743         * lib/unigbrk.in.h (GBP_RI): New enumeration value.
54744         * lib/unigbrk/uc-is-grapheme-break.c (UC_IS_GRAPHEME_BREAK):
54745         Support rule GB8a.
54746         (UC_GRAPHEME_BREAKS_FOR, gb_table): Support GBP_RI.
54747         * tests/unigbrk/test-uc-is-grapheme-break.c
54748         (graphemebreakproperty_to_string): Support GBP_RI.
54749         * tests/uniwbrk/test-uc-wordbreaks.c
54750         (wordbreakproperty_to_string): Support WBP_RI.
54751         * lib/gen-uni-tables.c (LBP_RI): New enumeration value.
54752         (get_lbp, debug_output_lbp, fill_org_lbp, debug_output_org_lbp)
54753         (output_lbp): Support LBP_RI.  Adjust some characters changed from
54754         LBP_AL to LBP_ID.
54755         (output_lbp): Support LBP_RI.
54756         (WBP_RI): New enumeration value.
54757         (debug_output_wbp, fill_org_wbp, debug_output_org_wbp)
54758         (output_wbp): Support WBP_RI.
54759         (GBP_RI): New enumeration value.
54760         (output_gbp_test, fill_org_gbp): Support GBP_RI.
54761         * all generated files under lib/uni* and tests/uni*: Regenerate.
54763 2015-01-14  Daiki Ueno  <ueno@gnu.org>
54765         libunistring: update to Unicode 6.1.0
54766         * lib/gen-uni-tables.c (output_joining_group): Switch to
54767         3-level table to accommodate joining groups defined with higher
54768         codepoint value.  Since there are only 88 groups defined in
54769         Unicode 7.0.0, use 7-bit packed format for level3 entries.
54770         (get_lbp): Update for Unicode 6.1.0.
54771         * lib/unictype/joininggroup_of.c (uc_joining_group): Adjust to use
54772         3-level table.
54773         * lib/unictype/joininggroup_byname.gperf: Add Rohingya Yeh
54774         joining group name.
54775         * lib/unictype/joininggroup_name.h: Likewise.
54776         * lib/unilbrk/lbrktables.h (LBP_HL): New enumeration value.
54777         (unilbrk_table): Adjust table size.
54778         * lib/unilbrk/lbrktables.c (unilbrk_table): Add a row and column
54779         for LBP_HL.
54780         * lib/uniwidth/width.c (nonspacing_table_data): Add U+0604,
54781         U+08E4..U+08FE, U+1BAB, U+1CF4, U+A674..U+A67B, U+A69F,
54782         U+AAEC..U+AAED, U+AAF6, U+11100..U+11102, U+11127..U+1112B,
54783         U+1112D..U+11134, U+11180..U+11181, U+111B6..U+111BE, U+116AB,
54784         U+116AD, U+116B0..U+116B5, U+116B7, U+16F8F..U+16F92.  Remove
54785         U+302E..U+302F.
54786         * tests/uniwidth/test-uc_width2.sh: Same updates as in
54787         lib/uniwidth/width.c.
54788         * all generated files under lib/uni* and tests/uni*: Regenerate.
54789         * modules/uni*/* (configure.ac): Bump minimum version to 0.9.5.
54791 2015-01-15  Daiki Ueno  <ueno@gnu.org>
54793         uniwbrk/u32-wordbreaks-tests: add conformance test
54794         * modules/uniwbrk/u32-wordbreaks-tests (Files): Add
54795         tests/uniwbrk/test-uc-wordbreaks.c,
54796         tests/uniwbrk/test-uc-wordbreaks.sh, and
54797         tests/uniwbrk/WordBreakTest.txt.
54798         (Makefile.am): Add uniwbrk/test-uc-wordbreaks.sh to $(TESTS), add
54799         test-uc-wordbreaks to $(check_PROGRAMS), and define
54800         test_uc_wordbreaks_SOURCES and test_uc_wordbreaks_LDADD.
54801         * tests/uniwbrk/test-uc-wordbreaks.sh: New file.
54802         * tests/uniwbrk/test-uc-wordbreaks.c: New file.
54804 2015-01-15  Daiki Ueno  <ueno@gnu.org>
54806         uniwbrk: ignore Extended/Format characters at BOL not BOS
54807         * lib/uniwbrk/u-wordbreaks.h (FUNC): Ignore Extend and Format
54808         characters if the previous character property is one of
54809         WBP_NEWLINE, WBP_CR, and WBP_LF.
54811 2015-01-11  Jim Meyering  <meyering@fb.com>
54813         test-strstr.c: avoid a trivial leak
54814         * tests/test-strstr.c (main): Free haystack.
54816         update-copyright: recognize groff's \(co marker
54817         * build-aux/update-copyright (circle_c_re): Also accept
54818         uses of \(co, as found in gzip.1.
54820 2015-01-08  Pádraig Brady  <P@draigBrady.com>
54822         maint.mk: fix compatibility with OS X nm
54823         * top/maint.mk (_gl_tight_scope): Use the -g option to
54824         show exported items rather than the -e option which is
54825         ignored on all platforms except OS X where it gives an error.
54826         Reported by Assaf Gordon.
54828 2015-01-07  KO Myung-Hun  <komh@chollian.net>
54830         localcharset: improve charset detection on OS/2
54831         Use system codepage when appropriate.  Map OS/2 codepages to
54832         GNU canonical charset names if possible.
54833         * lib/config.charset: Don't output aliases if "$os" is os2*.
54834         * lib/localcharset.c (get_charset_aliases) [OS2]: Hardcode the
54835         result for OS/2.
54836         (locale_charset) [OS2]: Use system codepage if codeset is omitted
54837         from the locale name which is neither "C" nor "POSIX".
54839 2015-01-06  Paul Eggert  <eggert@cs.ucla.edu>
54841         count-leading-zeros: use 64-bit intrinsics on 32-bit Windows
54842         This reverts the last patch but one, as it shouldn't be needed now
54843         that the typo is fixed.
54844         * lib/count-leading-zeros.h (count_leading_zeros_ll):
54845         * lib/count-trailing-zeros.h:
54846         * lib/count-one-bits.h:
54847         Go back to using 64-bit intrinsics.
54849         count-leading-zeros: fix pragma typos
54850         * lib/count-leading-zeros.h (_BitScanReverse, _BitScanReverse64):
54851         Fix typos in declaration of intrinsics when _MSC_VER.
54853 2015-01-06  Pádraig Brady  <P@draigBrady.com>
54855         count-leading-zeros: avoid 64-bit intrinsics on 32-bit Windows
54856         * lib/count-leading-zeros.h (count_leading_zeros_ll): Use 32 bit
54857         intrinsics in this case.
54858         * lib/count-trailing-zeros.h: Likewise.
54859         * lib/count-one-bits.h: Likewise.
54861 2015-01-06  Daiki Ueno  <ueno@gnu.org>
54863         uniname/uniname: update to Unicode 7.0.0
54864         To accommodate new characters added since Unicode 5.1.0, this
54865         changes the internal representation of codepoint ranges.
54866         Previously, we grouped codepoint ranges by manually assigned 4-bit
54867         tag, which only allowed 16 groups.  This removes the limitation by
54868         switching to binary search on a table.  For the detail rationale
54869         and the benchmark results, see:
54870         https://lists.gnu.org/r/bug-libunistring/2014-06/msg00001.html
54871         * lib/uniname/gen-uninames.lisp (unicode-char): Rename CODE member
54872         to INDEX, as it no longer represents a codepoint.
54873         (range): New struct.
54874         (main): Switch to intervals list from a bit-pattern based
54875         classification.
54876         * lib/uniname/uninames.h: Regenerate.
54877         * tests/uniname/UnicodeDataNames.txt: Update to Unicode 7.0.0.
54878         * modules/uniname/base (configure.ac): Bump minimum version to
54879         0.9.5.
54880         * modules/uniname/uniname (configure.ac): Bump minimum version to
54881         0.9.5.
54883 2015-01-05  Eric Blake  <eblake@redhat.com>
54885         doc: update INSTALL from autoconf
54886         * doc/install.texi: Resync from autoconf.
54887         * doc/INSTALL: Reflect recent autoconf update.
54888         * doc/INSTALL.ISO: Likewise.
54889         * doc/INSTALL.UTF-8: Likewise.
54891         stdio: fix use of PRIdMAX on modern mingw
54892         * m4/stdio_h.m4 (gl_STDIO_H): Probe for printf flavor via inttypes.
54893         * lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM): Use result
54894         to work with modern mingw.
54896 2015-01-05  Daniel P. Berrange  <berrange@redhat.com>  (tiny change)
54898         pthread: detect git mingw builds with only partial pollution
54899         * m4/pthread.m4 (gl_PTHREAD_CHECK): Check for additional
54900         pollution, as seen temporarily in Fedora 21.
54902 2015-01-04  Paul Eggert  <eggert@cs.ucla.edu>
54904         lib-symbol-versions: cache script check
54905         * m4/ld-version-script.m4 (gl_LD_VERSION_SCRIPT):
54906         Cache the check for linker version scripts.
54907         From a suggestion by Christophe Curis in:
54908         http://lists.gnu.org/r/bug-gnulib/2015-01/msg00011.html
54910 2015-01-04  Benno Schulenberg  <bensberg@justemail.net>
54912         maint: fix grammar nits in propername (trivial change)
54913         * lib/propername.h: Remove a mistaken comma and a duplicate "from",
54914         and use an adequate verb and tense.
54916 2015-01-02  Ludovic Courtès  <ludo@gnu.org>
54918         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
54919         * module/gendocs: Add 'doc/gendocs_template_min'.
54921         * build-aux/gendocs.sh: Change email addresses and upstream URLs
54922         from to Gnulib's.
54923         (scripturl, templateurl): Adjust accordingly.
54925 2015-01-01  Paul Eggert  <eggert@cs.ucla.edu>
54927         gendocs: copyright date and version fix
54928         Reported by Karl Berry in:
54929         http://lists.gnu.org/r/bug-gnulib/2015-01/msg00002.html
54930         * build-aux/gendocs.sh, doc/gendocs_template, doc/gendocs_template_min:
54931         Fix copyright date.
54932         * build-aux/gendocs.sh (scriptversion): Update.
54934 2015-01-01  Karl Berry  <karl@gnu.org>
54936         * doc/install.texi,
54937         * build-aux/mdate-sh,
54938         * build-aux/depcomp,
54939         * build-aux/config.guess,
54940         * build-aux/config.sub,
54941         * build-aux/ar-lib,
54942         * build-aux/compile: revert copyright updates (some from last
54943         year) in slaved files.
54945 2015-01-01  Paul Eggert  <eggert@cs.ucla.edu>
54947         version-etc: new year
54948         * doc/gnulib.texi:
54949         * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date.
54950         * all files: Run 'make update-copyright'.
54952 2014-12-30  Pádraig Brady  <P@draigBrady.com>
54954         xstrtol: ensure errno is reset
54955         Since commit 3bf75404, on 26-09-1998, errno may not have been reset.
54956         Noticed with a spurious coreutils test failure on Darwin 14.0.0.
54958         * lib/xstrtol.c (__xstrtol): Always reset errno before returning.
54960 2014-12-28  Paul Eggert  <eggert@cs.ucla.edu>
54962         utimens: fix dependency typo
54963         * modules/utimens (Depends-on): Remove 'assure'.
54964         This bug was introduced in the recent 'assure' patch.
54966 2014-12-22  Eric Blake  <eblake@redhat.com>
54968         docs: mention why libgen.h is bad
54969         * doc/posix-headers/libgen.texi (libgen.h): Refer to dirname module.
54971 2014-12-20  Paul Eggert  <eggert@cs.ucla.edu>
54973         assure: new module
54974         This works better than 'assert' when compiling with -DNDEBUG,
54975         as it avoids some compiler diagnostics in that case.
54976         Reported by Norihiro Tanaka in:
54977         http://lists.gnu.org/r/bug-gnulib/2014-12/msg00215.html
54978         * MODULES.html.sh (func_all_modules): Add 'assure'.
54979         * lib/assure.h, modules/assure: New files.
54980         * lib/chdir-long.c, lib/cycle-check.c, lib/fchdir.c, lib/fts.c:
54981         * lib/poll.c, lib/savewd.c, lib/xstrtol.c:
54982         Prefer 'assure' to 'assert'.
54983         * lib/utimens.c: Stop using 'assert'; it wasn't helpful.
54984         * modules/chdir-long, modules/cycle-check, modules/fchdir:
54985         * modules/poll, modules/savewd, modules/utimens, modules/xstrtol:
54986         Depend on 'assure'.
54988 2014-12-16  Paul Eggert  <eggert@cs.ucla.edu>
54990         stdalign: port better to HP compilers
54991         * m4/stdalign.m4 (gl_STDALIGN_H): Try the test if __HP_cc or
54992         __HP_aCC are nonzero, to be consistent with the 2014-01-20 patch.
54994         stdalign: work around Apple GCC 4.0 bug
54995         Reported by David Fang in:
54996         http://lists.gnu.org/r/bug-gnulib/2014-12/msg00194.html
54997         * lib/stdalign.in.h (_Alignas):
54998         * m4/stdalign.m4 (gl_STDALIGN_H):
54999         Do not use aligned attribute with GCC 4.0 on Apple.
55001 2014-12-16  Pádraig Brady  <P@draigBrady.com>
55003         getcwd: fix test failure on OS X 10.9
55004         * m4/getcwd-path-max.m4: Avoid the replacement if it
55005         won't be effective due to the PATH_MAX limitation of lstat().
55006         (gl_cv_func_getcwd_path_max): Adjust to indicate this case.
55007         * m4/getcwd.m4 (gl_FUNC_GETCWD): Define HAVE_GETCWD_SHORTER
55008         for this case for use in tests, and also exclude this
55009         case when setting REPLACE_GETCWD.
55010         * tests/test-getcwd.c (test_long_name): Restrict the
55011         tested path length so that lstat() will not be passed
55012         a path greater than PATH_MAX.
55013         Also key a test condition on HAVE_OPENAT_SUPPORT rather
55014         than AT_FDCWD, since the latter is set unconditionally
55015         since Sep 2009 in commit 52c658e9.
55017 2014-12-14  Tim Rühsen  <tim.ruehsen@gmx.de>
55019         parse-datetime: avoid a compiler warning with byacc (trivial)
55020         * lib/parse-datetime.y (yylex): Use the same prototype in the
55021         function definition as the declaration, to avoid a -Wstrict-prototypes
55022         warning seen when using byacc.
55024 2014-12-12  Daiki Ueno  <ueno@gnu.org>
55026         unicase/locale-language-tests: fix LOCALE_FR test
55027         * tests/unicase/test-locale-language.sh: Really use $LOCALE_FR for
55028         a French locale with traditional encoding.
55029         Reported by umerqayam in:
55030         http://lists.gnu.org/r/bug-libunistring/2014-12/msg00000.html
55032 2014-12-12  Paul Eggert  <eggert@cs.ucla.edu>
55034         stddef: support C11's max_align_t
55035         * doc/posix-headers/stddef.texi (stddef.h): Document max_align_t.
55036         * lib/stddef.in.h (_@GUARD_PREFIX@_STDDEF_H) [__need_wint_t]:
55037         Do not undef, as that might cause max_align_t to be defined twice.
55038         Instead, change use to check for _GL_STDDEF_WINT_T too.
55039         (max_align_t) [!HAVE_MAX_ALIGN_T]: New decl.
55040         * m4/stddef_h.m4 (gl_STDDEF_H, gl_STDDEF_H_DEFAULTS):
55041         Check for max_align_t.
55042         * modules/stddef (stddef.h): Substitute HAVE_MAX_ALIGN_T.
55043         * modules/stddef-tests (Depends-on): Add stdalign.
55044         * tests/test-stddef.c: Test max_align_t.
55046 2014-12-11  Daiki Ueno  <ueno@gnu.org>
55048         unistd: fix iOS check conditional
55049         On Mac OS X 10.8, the TARGET_* macros are unconditonally defined
55050         as 0 or 1 in <TargetConditionals.h>, and the previous check always
55051         yielded true on non-iOS environment.
55052         * lib/unistd.in.h (environ) [__APPLE__]: Check the values of
55053         TARGET_OS_IPHONE and TARGET_IPHONE_SIMULATOR, instead of whether
55054         they are defined.
55056 2014-12-09  Paul Eggert  <eggert@cs.ucla.edu>
55058         posixtm: avoid compiler warning in a better way
55059         * lib/posixtm.c (IF_LINT): Remove.
55060         (year, posix_time_parse):
55061         Return true (not 0) if successful.  All callers changed.
55062         (posix_time_parse): Simplify to pacify GCC without need for IF_LINT.
55064 2014-12-08  KO Myung-Hun  <komh78@gmail.com>
55066         * lib/relocatable.c (relocate): Prepend $UNIXROOT to pathname if it is
55067         started with '/' on EMX.
55069 2014-12-08  KO Myung-Hun  <komh78@gmail.com>
55071         freopen: workaround freopen() on OS/2 kLIBC
55072         * lib/freopen.c (rpl_freopen): Workaround.
55073         * m4/freopen.m4: Add os2* case.
55075         get_shared_library_fullname: port to EMX
55076         * lib/relocatable.c: Define strcmp and strncmp to stricmp and strnicmp
55077         on EMX, respectively.
55078         (_DLL_InitTerm): New on EMX.
55079         (get_shared_library_fullname): Implement on EMX.
55081         find_executable: port to EMX
55082         * lib/progreloc.c (find_executable): Implement on EMX.
55084         sched: check struct sched_param in spawn.h as well
55085         * lib/sched.in.h: Include spawn.h on kLIBC.
55086         * lib/sched_h.m4: Check struct sched_param in spawn.h as well.
55088 2014-12-08  Martin Kletzander  <mkletzan@redhat.com>  (tiny change)
55090         bootstrap: Allow perl modules in $buildreq
55091         * build-aux/bootstrap: Add case for perl modules.
55093 2014-12-08  Pádraig Brady  <P@draigBrady.com>
55095         apply _GL_ATTRIBUTE_PURE to some inline functions
55096         clang 3.4.2 flagged these inline functions as pure
55097         * lib/savewd.h (savewd_errno): Set _GL_ATTRIBUTE_PURE.
55098         * lib/sig-handler.h (get_handler): Likewise.
55099         * lib/stat-time.h (get_stat_{a,c,m,birth}time{,_ns}): Likewise.
55100         * lib/timespec.h (timespec_cmp, timespec_sign): Likewise.
55102 2014-12-06  Pádraig Brady  <P@draigBrady.com>
55104         vasnprintf: fix potential use after free
55105         * lib/vasnprintf.c (VASNPRINTF): Fix free-memory read,
55106         flagged by clang-analyzer 3.4.2.
55108 2014-12-05  Pádraig Brady  <P@draigBrady.com>
55110         filevercmp, posixtm: avoid compiler warnings with -O3
55111         * lib/filevercmp.h (filevercmp): Tag with _GL_ATTRIBUTE_PURE
55112         * lib/posixtm.c: (IF_LINT): Define.
55113         (posix_time_parse): Use it to void a "may be used uninitialized"
55114         warning, seen only with -O3.
55116 2014-12-05  Bruno Haible  <bruno@clisp.org>
55118         Fix LDBL80_WORDS macro on big endian platforms.
55119         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Add missing parenthesis in
55120         LDBL80_WORDS macro.
55121         * m4/isinf.m4 (gl_ISINFL_WORKS): Likewise.
55122         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Likewise.
55123         * tests/test-isfinite.c (test_isfinitel): Likewise.
55124         * tests/test-isinf.c (test_isinfl): Likewise.
55125         * tests/test-isnan.c (test_long_double): Likewise.
55126         * tests/test-isnanl.h (main): Likewise.
55127         * tests/test-snprintf-posix.h (LDBL80_WORDS): Add missing parenthesis.
55128         * tests/test-sprintf-posix.h (LDBL80_WORDS): Likewise.
55129         * tests/test-vasnprintf-posix.c (LDBL80_WORDS): Likewise.
55130         * tests/test-vasprintf-posix.c (LDBL80_WORDS): Likewise.
55131         Reported by Pádraig Brady.
55133 2014-12-02  KO Myung-Hun  <komh78@gmail.com>
55135         git-version-gen: do not print new line characters
55136         * build-aux/git-version-gen: Use printf instead of echo and tr.
55138         gnulib-tool: recognize x:* as an absolute path
55139         * gnulib-tool (func_gnulib_dir): Add ?:* case.
55140         (func_relconcat): Likewise.
55142 2014-12-02  Andrei Borzenkov  <arvidjaar@gmail.com>
55144         argp: avoid extraneous translation and mem leak with empty pre doc
55145         * lib/argp-help.c (argp_doc): Never translate the empty string,
55146         when "\v" is the first or last character of the string, as that
55147         has a reserved meaning to return the header info from a po file.
55148         This also fixes a small memory leak in the !post case.
55149         The issue can be seen with this command for example:
55150         LC_MESSAGES=en_US grub2-mknetdir --help
55152 2014-11-27  Daiki Ueno  <ueno@gnu.org>
55154         uniname/uniname-tests: skip if system's libunistring is used
55155         * modules/uniname/uniname-tests (Makefile.am): Skip test if
55156         uniname/uniname module is not compiled.
55158 2014-11-27  Pádraig Brady  <P@draigBrady.com>
55160         printf: fix configure check on big endian systems
55161         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Add missing bracket.
55163 2014-11-22  Daiki Ueno  <ueno@gnu.org>
55165         pipe-filter-gi, pipe-filter-ii: port to AIX
55166         On AIX 7.1, 'select' is defined as static and cannot be referred
55167         to from inline function.
55168         * lib/pipe-filter-aux.h (nointr_select): Remove, manually expand
55169         the definition...
55170         * lib/pipe-filter-gi.c (filter_loop): ...here, and...
55171         * lib/pipe-filter-ii.c (pipe_filter_ii_execute): ...here.
55173 2014-11-20  Paul Eggert  <eggert@cs.ucla.edu>
55175         gitlog-to-changelog: add --until
55176         * build-aux/gitlog-to-changelog: Support new --until option.
55177         Need described by Eli Zaretskii in: http://bugs.gnu.org/19113
55179 2014-11-14  Paul Eggert  <eggert@cs.ucla.edu>
55181         extern-inline: update commentary about GCC bugs
55182         * m4/extern-inline.m4: Add another GCC bug number to comments.
55184 2014-11-13  Daiki Ueno  <ueno@gnu.org>
55186         gen-uni-tables: untabify
55187         * lib/gen-uni-tables.c: Untabify.
55189 2014-11-13  Daiki Ueno  <ueno@gnu.org>
55191         gen-uni-tables: check out-of-range values added to 3-level tables
55192         * lib/gen-uni-tables.c (output_category, output_bidi_category)
55193         (output_joining_type, output_ident_category): Check out-of-range
55194         values added to 3-level tables.
55196 2014-11-13  Daiki Ueno  <ueno@gnu.org>
55198         gen-uni-tables: utilize 'assert'
55199         * lib/gen-uni-tables.c: Include <assert.h>.
55200         (output_category, output_combclass, output_decimal_digit_test)
55201         (output_decimal_digit, output_digit_test, output_digit)
55202         (output_numeric, get_mirror_value, fill_properties)
55203         (fill_property30, is_property_alphabetic)
55204         (is_property_default_ignorable_code_point)
55205         (is_property_uppercase, is_property_lowercase)
55206         (is_property_cased, is_property_case_ignorable)
55207         (is_property_changes_when_lowercased, is_property_iso_control)
55208         (is_property_math, fill_arabicshaping, output_joining_group)
55209         (fill_scripts, fill_blocks, output_lbp, fill_org_wbp)
55210         (output_wbp, fill_org_gbp, get_decomposition)
55211         (output_decomposition, fill_composition_exclusions)
55212         (debug_output_composition_tables, output_composition_tables)
55213         (redistribute_casefolding_rules, output_casing_rules): Use
55214         'assert (EXPR);' instead of 'if (!EXPR) abort ();' for better error
55215         reporting.
55217 2014-11-13  Daiki Ueno  <ueno@gnu.org>
55219         gen-uni-tables: cosmetic improvements
55220         * lib/gen-uni-tables.c: Escape newlines in the Emacs file local
55221         variables specification.
55222         (is_outdigit): Remove unused function.
55224 2014-11-12  Jeroen Roovers  <jer@gentoo.org>  (tiny change)
55226         fcntl-h-tests: port to PA-RISC GNU/Linux
55227         * tests/test-fcntl-h.c (main): Check O_SYNC is different from O_DSYNC.
55229 2014-11-10  Paul Eggert  <eggert@cs.ucla.edu>
55231         fts: port to C89
55232         Problem reported for MSVC 16 by Gisle Vanem in:
55233         http://lists.gnu.org/r/bug-gnulib/2014-11/msg00027.html
55234         * lib/fts.c (fts_build): Avoid declaration before statement.
55236 2014-11-06  Paul Eggert  <eggert@cs.ucla.edu>
55238         unistd: port to iOS
55239         Problem reported by André Klitzing in:
55240         http://lists.gnu.org/r/bug-gnulib/2014-11/msg00013.html
55241         * lib/unistd.in.h (environ): Do not include crt_externs.h on iOS.
55243 2014-11-05  Paul Eggert  <eggert@cs.ucla.edu>
55245         obstack: do not reject malloc-style obstack_chunkfun, obstack_freefun
55246         Problem reported by Alan Modra in:
55247         http://lists.gnu.org/r/bug-gnulib/2014-11/msg00007.html
55248         * lib/obstack.h (obstack_chunkfun, obstack_freefun):
55249         Always cast the function arg, reverting this part of the previous
55250         change.
55252 2014-11-04  Paul Eggert  <eggert@cs.ucla.edu>
55254         obstack: avoid potentially-nonportable function casts
55255         * lib/obstack.c (CALL_CHUNKFUN, CALL_FREEFUN):
55256         Remove, replacing with ...
55257         (call_chunkfun, call_freefun): New static functions.
55258         All uses changed.  Avoid potentially-nonportable casts.
55259         (chunkfun_type, freefun_type): Remove typedefs; no longer used.
55260         (_obstack_begin_worker): Omit last two args, since they
55261         rely on potentially-nonportable casts.  All callers changed.
55262         * lib/obstack.h (_OBSTACK_CAST): New macro.
55263         Use it everywhere the old API used a potentially-nonportable cast.
55264         The new API doesn't cast.
55265         (struct obstack): Use unions rather than requiring
55266         potentially-nonportable casts.
55267         (obstack_chunkfun, obstack_freefun): Return void.
55269 2014-11-03  Alan Modra  <amodra@gmail.com>
55271         obstack: fix macro return values
55272         * lib/obstack.h (obstack_next_free): Return void *.
55273         (obstack_1grow_fast, obstack_blank_fast): Return void.
55274         For __GNUC__ macros:
55275         (obstack_1grow, obstack_blank): Remove now unnecessary (void) 0.
55276         For !__GNUC__ macros:
55277         (obstack_make_room, obstack_grow, obstack_grow0)
55278         (obstack_ptr_grow_fast, obstack_int_grow_fast): Return void.
55280 2014-11-03  Paul Eggert  <eggert@cs.ucla.edu>
55282         obstack: do not assume system-supplied obstack is size_t safe
55283         * m4/obstack.m4: New file.
55284         * modules/obstack (Files): Add it.
55286         obstack: port to platforms that #define __alignof__
55287         * lib/obstack.c: Include <alignof.h> if !defined __alignof__,
55288         not if !_LIBC.  We don't know of any platforms that #define
55289         __alignof__, but it might be useful in tests.  Conversely,
55290         glibc assumes GCC.
55292 2014-11-03  Pádraig Brady  <P@draigBrady.com>
55294         linkat: don't unconditionally replace on GNU/Linux
55295         * m4/linkat.m4 (gl_FUNC_LINKAT): The compile check for AT_SYMLINK_FOLLOW
55296         was redundant for a few reasons.  It was present to support compiling
55297         on new systems but running on the old narrow window of Linux 2.6.1[67].
55298         It setup and cleaned up test files which weren't actually used.
55299         On non __linux__ it compile tested AT_SYMLINK_FOLLOW, but that is
55300         implicit in the following check.
55302 2014-11-03  Pádraig Brady  <P@draigBrady.com>
55304         linkat: wrap to handle symlinks on OS X 10.10
55305         * m4/linkat.m4 (gl_FUNC_LINKAT): linkat() is available on Yosemite
55306         but not usable because it doesn't support creating hardlinks
55307         to symlinks.  Therefore add a generic test for this capability
55308         and fallback to our emulation if linkat() fails with ENOTSUP.
55310 2014-11-02  Paul Eggert  <eggert@cs.ucla.edu>
55312         open, openat: document nonstandard FreeBSD, NetBSD O_NOFOLLOW errno
55313         * doc/posix-functions/open.texi (open):
55314         * doc/posix-functions/openat.texi (openat):
55315         Document that these functions do not set errno to ELOOP when
55316         a symlink is opened with O_NOFOLLOW.
55318 2014-10-31  Paul Eggert  <eggert@cs.ucla.edu>
55320         obstack: add NEWS entry for recent incompatible changes
55321         * NEWS: Describe recent changes.
55323 2014-10-30  Pádraig Brady  <P@draigBrady.com>
55325         mountlist: don't use libmount to decide on dummy/remote
55326         * lib/mountlist.c (read_file_system_list): Don't use the libmount
55327         routines to determine whether a file system is dummy or remote,
55328         as they're not currently compatible.  For example the remoteness
55329         is determined on file system type (for which the list seems incomplete),
55330         rather than simply checking for a ':' in the device name.
55331         Also libmount currently determines that 'tmpfs' is a dummy file system
55332         even though it has associated storage.
55334 2014-10-29  Paul Eggert  <eggert@cs.ucla.edu>
55336         obstack: prefer __alignof__ to alignof
55337         This is for portability to pre-4.7 GCC when compiling glibc.
55338         See Joseph S. Myers in:
55339         http://sourceware.org/ml/libc-alpha/2014-10/msg00703.html
55340         * lib/obstack.c (__alignof__) [!_LIBC && !__GNUC__]:
55341         New macro, defined by including and using <alignof.h>.
55342         (MAX): New macro.
55343         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Redefine in terms of these.
55344         Do not use enums as they are not portable to some broken compilers.
55345         * modules/obstack (Depends-on): Depend on alignof, not stdalign.
55347         obstack: prefer alignof to calculating alignments by hand
55348         * lib/obstack.c: Include <stdalign.h>.
55349         (struct fooalign): Remove.
55350         (DEFAULT_ALIGNMENT): Use alignof rather than the old offsetof hack.
55351         * modules/obstack (Depends-on): Add stdalign.
55353 2014-10-28  Paul Eggert  <eggert@cs.ucla.edu>
55355         obstack: use size_t alignments and check for overflow
55356         * lib/obstack.c, lib/obstack.h (_obstack_begin, _obstack_begin_1):
55357         * lib/obstack.c (_obstack_begin_worker, _obstack_newchunk):
55358         * lib/obstack.h (struct obstack.alignment_mask):
55359         Use _OBSTACK_SIZE_T, not int, for alignments.
55360         * lib/obstack.c (_obstack_newchunk): Fail if the size calculation
55361         overflows, e.g., when adding the alignment.
55363 2014-10-29  Alan Modra  <amodra@gmail.com>
55365         obstack: 64-bit obstack support, part 3
55366         This finally enables full 64-bit obstack support.  The glibc
55367         shared library specific code is removed from obstack.c too, and
55368         the error handling code conditionally compiled under control of
55369         another macro, _OBSTACK_NO_ERROR_HANDLER.
55370         * lib/obstack.h: Include string.h earlier.
55371         (_OBSTACK_INTERFACE_VERSION): Define.
55372         (_OBSTACK_SIZE_T, _CHUNK_SIZE_T): Define as size_t for version 2.
55373         * lib/obstack.c: Don't include shlib-compat.h.
55374         (OBSTACK_INTERFACE_VERSION): Delete.
55375         (_OBSTACK_ELIDE_CODE): Rename from ELIDE_CODE.  Define when version 1
55376         glibc code is compatible with version 2.  Don't include stdio.h for
55377         __GNU_LIBRARY.
55378         (obstack_exit_failure, print_and_abort, obstack_alloc_failed_handler):
55379         Omit when _OBSTACK_NO_ERROR_HANDLER defined.  Include stdio.h here.
55380         (_obstack_compat, _obstack, _obstack_newchunk, obstack_free): Delete
55381         glibc shared library specific source.
55383         obstack: 64-bit obstack support, part 2
55384         This gets us 4G obstack support, without changing ABI
55385         compatibility, apart from possibly introducing some
55386         signed/unsigned comparison warnings in code that uses obstack.h.
55387         a) Replace "int" size parameters, return values, and macro local vars
55388            with _OBSTACK_SIZE_T, an "unsigned int" for now.
55389         b) Make obstack.chunk_size a _CHUNK_SIZE_T, an "unsigned long" for now.
55390         c) Make all obstack macros checking available room use obstack_room.
55391            "next_free + desired > chunk_limit" may wrap the lhs for chunks
55392            allocated near the top of memory.
55393         d) Use unsigned comparisons, and macro locals to support >2G on 32-bit.
55394         * lib/obstack.h (_OBSTACK_SIZE_T): Define.  Use throughout
55395         in place of "int" size parameters, return values and local vars.
55396         (_CHUNK_SIZE_T): Define.
55397         (struct obstack): Make chunk_size a _CHUNK_SIZE_T.  Make temp
55398         union use an _OBSTACK_SIZE_T integer type.
55399         For __GNUC__ versions of the following macros...
55400         (obstack_room): Rename local var.
55401         (obstack_make_room): Use obstack_room.
55402         (obstack_grow, obstack_grow0, obstack_1grow, obstack_ptr_grow,
55403         obstack_int_grow, obstack_blank): Likewise.
55404         (obstack_finish): Use unsigned comparison when comparing aligned
55405         next_free against chunk_limit.
55406         (obstack_free): Cast OBJ to remove possible const qualifier.
55407         For !__GNUC__ versions of the following macros...
55408         (obstack_make_room): Use obstack_room.
55409         (obstack_grow, obstack_grow0, obstack_1grow, obstack_ptr_grow,
55410         obstack_int_grow, obstack_blank): Likewise.
55411         (obstack_finish): Use unsigned comparision when comparing aligned
55412         next_free against chunk_limit.
55413         (obstack_free): Use temp.p and same comparisons as __GNUC__ version.
55414         * lib/obstack.c (_obstack_begin_worker): Make "size" parameter
55415         _OBSTACK_SIZE_T.
55416         (_obstack_begin, _obstack_begin_1): Likewise.
55417         (_obstack_newchunk): Likewise for length parameter.  Use size_t locals.
55418         (_obstack_memory_used): Return and use _OBSTACK_SIZE_T local.
55420         obstack: 64-bit obstack support, part 1
55421         a) Correct calls to alloc function, to use a size_t arg.  "long" is
55422            just wrong on targets like x86_64-mingw64 where "long" is 32 bits
55423            and "size_t" 64 bits.
55424         b) Consolidate _obstack_begin and _obstack_begin1 code.
55425         * lib/obstack.h (struct obstack <chunkfun>): Correct prototype to
55426         use "size_t" rather than "long".
55427         (_obstack_begin, _obstack_begin1): Likewise.
55428         (obstack_init, obstack_begin, obstack_specify_allocation_with_arg,
55429         obstack_chunkfun): Update alloc function casts.
55430         * lib/obstack.c (CALL_CHUNKFUN): Update chunkfun cast.
55431         (chunkfun_type, freefun_type): New typdefs.
55432         (_obstack_begin_worker): Split out from ..
55433         (_obstack_begin, _obstack_begin_1): ..here.
55435         obstack: tidy part 2
55436         a) Don't be concerned about "not polluting the namespace with stddef.h
55437            symbols" in obstack.h, since gnulib string.h includes stddef.h
55438            anyway, and it seems unlikely that anyone would care.
55439         b) Don't roll our own slow memcpy in _obstack_newchunk.
55440         c) Rename obstack_free to _obstack_free.  This makes the naming
55441            consistent with other obstack functions and obviates the need for
55442            __obstack_free.  Ancient obstack.c defined both obstack_free and
55443            _obstack_free.  We continue to do that for _LIBC via an alias.
55444         d) Miscellaneous macro fixes.  The expression used to test for gcc-2.8
55445            is clever, but nowadays gcc warns on undefined macros.  You'll get
55446            an undefined macro warning if simulating an old gcc with -U__GNUC__
55447            -U__GNUC_MINOR__ -D__GNUC__=1.
55448         * lib/obstack.h: Include stddef.h unconditionally.  Formatting fixes.
55449         (PTR_INT_TYPE): Delete, replace with ptrdiff_t.
55450         (__obstack_free): Delete, update refs.
55451         (_obstack_free): Rename from obstack_free.
55452         (__extension__): Avoid undefined macro warning for __GNUC_MINOR__.
55453         (obstack_object_size, obstack_room): Parenthesise !__GNUC__ versions.
55454         * lib/obstack.c: Don't include stddef.h.
55455         (COPYING_UNIT): Delete.
55456         (_obstack_begin): Formatting fix.
55457         (_obstack_newchunk): Use memcpy to move existing object to new chunk.
55458         (_obstack_free): Rename from __obstack_free, update alias.  Move
55459         undef of obstack_free to where it is needed.
55461         obstack: tidy part 1
55462         a) Rename temp fields.  temp.tempint and temp.tempptr just looks ugly
55463            to me, and result in overlong lines after later patches.
55464         b) Move error handling code, to avoid a forward declaration and to
55465            simplify later patches in this series.
55466         * lib/obstack.h (struct obstack <temp>): Rename fields of union
55467         and update all uses.
55468         * lib/obstack.c: Include stdlib.h earlier.
55469         (obstack_exit_failure, obstack_alloc_failed_handler): Move later
55470         in file.
55471         (print_and_abort): Remove now redundant forward declaration.
55473 2014-10-24  Paul Eggert  <eggert@cs.ucla.edu>
55475         socketlib, sockets, sys_socket: Use AC_REQUIRE to pacify autoconf.
55476         Without this change, in bleeding-edge fileutils Autoconf complains
55477         that gl_SOCKETLIB etc. are AC_REQUIREd after being invoked.
55478         * modules/socketlib (configure.ac): AC_REQUIRE gl_SOCKETLIB.
55479         * modules/sockets (configure.ac): AC_REQUIRE gl_SOCKETS.
55480         * modules/sys_socket (configure.ac): AC_REQUIRE gl_HEADER_SYS_SOCKET.
55482 2014-10-24  Daiki Ueno  <ueno@gnu.org>
55484         iconv: avoid false detection of non-working iconv
55485         The INBUF arguments of iconv can be either 'const char **'
55486         or 'char **'.  If CC is g++, the difference causes a compile error
55487         and thus leads to a false detection of non-working iconv.
55488         Reported by Eli Zaretskii and Werner LEMBERG in:
55489         <https://lists.gnu.org/r/bug-gnulib/2014-10/msg00023.html>.
55490         * m4/iconv.m4 (AM_ICONV_LINK): Try all possible argument types of
55491         iconv.  Bump serial number.
55493 2014-10-23  Pádraig Brady  <P@draigBrady.com>
55495         bootstrap: print more diagnostics for missing programs
55496         * build-aux/bootstrap: only suppress stderr when checking for
55497         alternative program names.  This supports programs issuing non
55498         standard error messages.
55500 2014-10-23  Pádraig Brady  <P@draigBrady.com>
55502         bootstrap: only update the gnulib submodule
55503         * build-aux/bootstrap: Restrict the "submodule update" command
55504         to the gnulib path.
55506 2014-10-18  Paul Eggert  <eggert@cs.ucla.edu>
55508         symlinkat: port to AIX 7.1
55509         * doc/posix-functions/symlinkat.texi (symlinkat):
55510         Mention AIX porting problem.
55511         * lib/symlinkat.c: Always include errno.h.
55512         (rpl_symlinkat) [HAVE_SYMLINKAT]: New function.
55513         * lib/unistd.in.h (symlinkat): Add replacement machinery.
55514         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Check symlinkat behavior.
55515         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add REPLACE_SYMLINKAT.
55516         * modules/symlinkat (Depends-on): Add fstatat if REPLACE_SYMLINKAT.
55517         (configure.ac): Also compile replacement if REPLACE_SYMLINKAT.
55518         * modules/unistd (unistd.h): Substitute REPLACE_SYMLINKAT.
55520         readlinkat: port to AIX 7.1
55521         * doc/posix-functions/readlink.texi (readlink):
55522         * doc/posix-functions/readlinkat.texi (readlinkat):
55523         Mention AIX porting problem.
55524         * lib/readlinkat.c (rpl_readlinkat) [HAVE_READLINKAT]:
55525         New function.
55526         * lib/unistd.in.h (readlinkat): Add replacement machinery.
55527         * m4/readlinkat.m4 (gl_FUNC_READLINKAT): Check readlinkat signature.
55528         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add REPLACE_READLINKAT.
55529         * modules/readlinkat (configure.ac): Also compile replacement
55530         if REPLACE_READLINKAT.
55531         * modules/unistd (unistd.h): Substitute REPLACE_READLINKAT.
55533 2014-10-12  Karl Berry  <karl@gnu.org>
55535         * doc/posix-functions/dirname.texi: remove spurious {.
55537 2014-09-28  Ben Pfaff  <blp@cs.stanford.edu>
55539         basename, dirname: Improve documentation.
55540         * doc/posix-functions/basename.texi: Mention dirname module and
55541         base_name() function.
55542         * doc/posix-functions/dirname.texi: Mention dir_name() and
55543         mdir_name() functions.
55544         Suggested by Werner LEMBERG <wl@gnu.org>.
55546 2014-09-24  Jim Meyering  <meyering@fb.com>
55548         exclude: declare exclude_patopts static
55549         * lib/exclude.c (exclude_patopts): Declare static,
55550         to avoid triggering a -Wmissing-prototypes warning.
55551         The alternative (declaring it in the .h file) would
55552         require publicizing the private "struct patopts".
55554 2014-09-21  Werner Lemberg  <wl@gnu.org>
55556         dirname: support compilation with C++
55557         * lib/dirname.h: Add necessary C linkage declarations.
55559 2014-09-16  Paul Eggert  <eggert@cs.ucla.edu>
55561         qsort_r: include <config.h>
55562         Problem reported by Tom G. Christensen in:
55563         http://lists.gnu.org/r/bug-gnulib/2014-09/msg00071.html
55564         * lib/qsort.c [!_LIBC]: Include <config.h> first.
55566 2014-09-16  Dylan Cali  <calid1984@gmail.com>
55568         avltree-list: avoid compiler warnings (trivial)
55569         * lib/gl_anytree_list2.h: Add _GL_ATTRIBUTE_PURE to avoid
55570         -Werror=suggest-attribute=pure.
55571         * lib/gl_array_list.c: Likewise.
55572         * lib/gl_avltree_list.c (gl_avltree_list_check_invariants): Add extern
55573         declaration to avoid -Werror=missing-prototypes.  This is not added
55574         to a header as only exported for tests.  Add (void) to the
55575         check_invariants() call to indicate we're discarding the result
55576         in this context which avoids -Werror=unused-value.  Note we don't
55577         use ignore_value here to avoid a dependency as we know we'll not
55578         be adding __attribute__((warn_unused_result)) to check_invariants().
55579         Add _GL_ATTRIBUTE_CONST to avoid -Werror=suggest-attribute=const.
55581 2014-09-15  Paul Eggert  <eggert@cs.ucla.edu>
55583         qsort_r: new module, for GNU-style qsort_r
55584         * m4/qsort_r.m4: New file.  Forgot to add this earlier.
55586 2014-09-15  Werner LEMBERG  <wl@gnu.org>
55588         strerror_r-posix: support compilation with C++
55589         * lib/strerror_r.c: Add necessary C linkage declarations.
55591 2014-09-11  Johannes Zarl  <johannes.zarl@jku.at>
55593         fcntl-h: fix compilation with Intel C++ compiler (trivial)
55594         * lib/fcntl.in.h: ICC has the same issue as GCC <= 4.2.
55596 2014-09-09  Fridolin Pokorny  <fpokorny@redhat.com>
55598         mountlist: use /proc/self/mountinfo when available
55599         Use libmount to propagate device IDs provided by Linux in
55600         /proc/self/mountinfo.  This will give more accurate output when
55601         using df in chroot'ed environments as the device IDs are not
55602         determined by stat() which may be inaccurate within the chroot.
55603         * lib/mountlist.c (read_file_system_list): Use the libmount routines
55604         from util-linux to parse "/proc/self/mountinfo" or fall back to
55605         standard getmntent() processing.
55606         * m4/ls-mntd-fs.m4: Check for libmount only when 1-argument
55607         getmntent() is used, as is the case on GNU/Linux.
55609 2014-09-07  Eric Wong  <normalperson@yhbt.net>
55611         users.txt: add cmogstored
55612         cmogstored has used gnulib since the beginning in 2012 to support
55613         GNU/Linux, FreeBSD, and GNU/kFreeBSD.
55615 2014-09-05  Mathieu Anquetin  <mathieu@anquetin.eu>
55617         Trivial change.
55618         * gnulib-tool: Use same options as build-aux/bootstrap to download
55619         PO files.
55621 2014-09-05  Mathieu Anquetin  <mathieu@anquetin.eu>
55623         Trivial change.
55624         * gnulib-tool: Fallback to wget when rsync of PO files fails.
55626 2014-09-04  Eric Blake  <eblake@redhat.com>
55628         maintainer-makefile: add syntax check for useless ';;'
55629         * top/maint.mk (sc_prohibit_double_semicolon): New rule.
55631 2014-09-04  Paul Eggert  <eggert@cs.ucla.edu>
55633         pthread, pthread_sigmask, threadlib: port to Ubuntu 14.04
55634         Problem reported by Assaf Gordon in:
55635         http://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
55636         Apparently Ubuntu is doing some fancy link-time optimization
55637         that doesn't work with -lpthread but does work with -pthread.
55638         Work around the bug by preferring -pthread to -lpthread.
55639         * m4/pthread.m4 (gl_PTHREAD_CHECK):
55640         * m4/threadlib.m4 (gl_THREADLIB_BODY): Prefer -pthread to -lpthread.
55641         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK):
55642         Treat -pthread like -lpthread.
55644 2014-09-04  Eric Blake  <eblake@redhat.com>
55646         error: drop spurious semicolon
55647         * lib/error.c (__error_at_line): Fix ';;'.
55649 2014-09-02  Paul Eggert  <eggert@cs.ucla.edu>
55651         gnulib-common.m4: port to GCC 4.2.1 and Sun Studio 12 C++
55652         * m4/gnulib-common.m4 (AC_C_RESTRICT):
55653         Override AC_C_RESTRICT unconditionally.
55654         Update from autoconf, incorporating:
55655         2014-09-02 autoconf: port 'restrict' to GCC 4.2.1
55656         2009-01-28 Fix AC_C_RESTRICT for Sun Studio 12 C++.
55658 2014-09-01  Paul Eggert  <eggert@cs.ucla.edu>
55660         manywarnings: add GCC 4.9 warnings
55661         Also, make it easier to maintain this in the future.
55662         * build-aux/gcc-warning.spec: Add -Wabi-tag,
55663         -Wconditionally-supported, -Wdelete-incomplete,
55664         -Winherited-variadic-ctor, -Wvirtual-move-assign, -Wzerotrip.
55665         Remove duplicates.  Use tabs uniformly, as that's what 'cut' wants.
55666         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -Wdate-time,
55667         -Wopenmp-simd.  Use -fdiagnostics-show-option and -funit-at-a-time
55668         only for older GCC versions that need them.  Handle
55669         -Wnormalized=nfc specially, so that the 'comm' command used
55670         for maintenance doesn't get confused.
55672 2014-08-31  Paul Eggert  <eggert@cs.ucla.edu>
55674         vasnprintf: fix bugs in width computation
55675         * lib/vasnprintf.c (VASNPRINTF):
55676         Rework previous change, which introduced a bug,
55677         to avoid the warning in a different way.
55678         Avoid undefined behavior if the width arg is less than -INT_MAX.
55679         Avoid unnecessary use of HAS_WIDTH local.
55681 2014-08-31  Thien-Thi Nguyen  <ttn@gnu.org>  (tiny change)
55683         vasnprintf: Avoid signed/unsigned comparison warning.
55684         * lib/vasnprintf.c (VASNPRINTF): To calculate padding,
55685         compare end addr of generated string w/ maximum end addr.
55687 2013-08-30  Mats Erik Andersson  <gnu@gisladisker.se>  (tiny change)
55689         parse-datetime: Avoid pointer difference.
55690         * lib/parse-datetime.y (yylex): Compare pointer to end of buffer,
55691         instead of calculating difference of pointers.  This removes an
55692         annoying warning, devoid of any use.
55694 2014-08-29  Paul Eggert  <eggert@cs.ucla.edu>
55696         qsort_r: new module, for GNU-style qsort_r
55697         This works even on FreeBSD, which has an incompatible qsort_r API.
55698         * MODULES.html.sh: Add it.
55699         * doc/glibc-functions/qsort_r.texi: It's now supported.
55700         * lib/qsort.c: New file, taken from glibc with minor changes
55701         inside "#ifndef _LIBC" and with an unnecessary "#include <alloca.h>"
55702         removed.
55703         * lib/qsort_r.c: New file, compiled only on FreeBSD.
55704         * lib/stdlib.in.h (qsort_r): Declare in the usual way.
55705         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS):
55706         * modules/qsort_r, modules/qsort_r-tests: New files.
55707         * modules/stdlib (Makefile): Set up its defaults.
55708         * tests/test-qsort_r.c: New file.
55710 2014-08-08  Paul Eggert  <eggert@cs.ucla.edu>
55712         vla: new module
55713         GNU RCS can use this, mostly for documentation I expect.  See:
55714         http://lists.gnu.org/r/bug-gnulib/2014-08/msg00025.html
55715         * MODULES.html.sh: Add vla.
55716         * lib/vla.h, modules/vla: New files.
55718 2014-08-07  Daiki Ueno  <ueno@gnu.org>
55720         localename: make gl_locale_name_thread really thread-safe on Windows
55721         * lib/localename.c [WINDOWS_NATIVE && !IN_LIBINTL]: Include
55722         "glthread/lock.h".
55723         (get_lcid_lock) [WINDOWS_NATIVE]: New variable.
55724         (get_lcid) [WINDOWS_NATIVE]: Lock while looking for an LCID.
55726 2014-08-07  Paul Eggert  <eggert@cs.ucla.edu>
55728         getpass: don't assume struct termios
55729         Problem report and trivial fix by Jonas 'Sortie' Termansen in:
55730         http://lists.gnu.org/r/bug-gnulib/2014-08/msg00015.html
55731         * lib/getpass.c (getpass): Port to systems lacking struct termios.
55733         getdtablesize: fall back on sysconf (_SC_OPEN_MAX)
55734         Problem reported by Jonas 'Sortie' Termansen in:
55735         http://lists.gnu.org/r/bug-gnulib/2014-08/msg00023.html
55736         * lib/getdtablesize.c (getdtablesize) [_SC_OPEN_MAX]:
55737         Implement via sysconf for platforms that lack getdtablesize.
55739         vararrays: modernize AC_C_VARARRAYS for C11
55740         This backports a change I recently made to Autoconf.
55741         * m4/vararrays.m4 (AC_C_VARARRAYS): Define __STDC_NO_VLA__ if
55742         VLAs are not supported, as this is what C11 does.  The old macro
55743         HAVE_C_VARARRAYS is still defined if they are supported, but is
55744         now obsolescent.  Also, check for VLA bug in GCC 3.4.3.
55746 2014-08-07  Alessandro Degano  <degano@cern.ch>  (tiny change)
55748         relocatable-prog-wrapper: port gettext to OS X 10.8 + GCC 4.8.1
55749         * build-aux/install-reloc (func_create_wrapper): Also wrap
55750         strerror-override, stat, stat.
55752 2014-08-05  Paul Eggert  <eggert@cs.ucla.edu>
55754         sys_select: fix FD_ZERO problem on Solaris 10
55755         * lib/sys_select.in.h: Fix Solaris 10 bug where "#include
55756         <sys/time.h>" followed by "#include <sys/select.h>" caused FD_ZERO
55757         to expand to an expression that invoked memset without necessarily
55758         including <string.h>.  The problem was that the first include
55759         defined _SYS_TIME_H, causing the second include to short-circuit.
55760         Fix a similar problem with <sys/types.h> followed by <sys/select.h>.
55761         Also, fix what appears to be a cut-and-paste typo, by replacing
55762         _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H with
55763         _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H.
55765         accept: document Solaris 10 type glitch
55766         * doc/posix-functions/accept.texi (accept): Mention that
55767         Solaris 10 'accept' takes void * last arg, not socklen_t *.
55769 2014-08-04  Paul Eggert  <eggert@cs.ucla.edu>
55771         extern-inline: port to FreeBSD, DragonFly
55772         * m4/extern-inline.m4 (gl_EXTERN_INLINE): Also assume the bug
55773         is present if either __DragonFly__ or __FreeBSD__ is defined.
55774         FreeBSD problem reported by Andrey Borzenkov in:
55775         http://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html
55776         Also, worry about __APPLE__ only if __MACH__ is also defined,
55777         as this is more consistent with the rest of gnulib.
55778         (_GL_EXTERN_INLINE_STDHEADER_BUG): Rename this internal macro from
55779         _GL_EXTERN_INLINE_APPLE_BUG, since the bug is not limited to Apple.
55781 2014-08-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
55783         regex: Make #if/#ifdef usage consistent for DEBUG
55784         * lib/regex_internal.c: Use "#if defined DEBUG && DEBUG" instead
55785         of the inconsistent usage of #if and #ifdef as that works with
55786         both Glibc and Gnulib's style.
55788 2014-07-31  Eric Blake  <eblake@redhat.com>
55790         openat-die: use _Noreturn markup
55791         * modules/openat-die (Depends-on): Add snippet/_Noreturn.
55792         * lib/openat-die.c (openat_save_fail, openat_restore_fail): Mark
55793         _Noreturn.
55795 2014-07-30  Eric Blake  <eblake@redhat.com>
55797         test-open: port to cygwin, which lacks Fortify
55798         * tests/test-open.h (ALWAYS_INLINE): New macro.
55799         (__always_inline): Don't abuse internal symbol on non-glibc.
55801 2014-07-19  Eli Zaretskii  <eliz@gnu.org>
55803         localename: Enforce declarations before statements.
55804         * localename.c (gl_locale_name_thread): Declare 'lcid' before the
55805         first statement.
55807 2014-07-18  Jim Meyering  <meyering@fb.com>
55809         test-userspec: don't look up numeric user names
55810         * tests/test-userspec.c: I found a system for which getpwnam("0")
55811         returned a pointer to a non-root user's entry, and that made the
55812         test fail.
55813         (T): Prefix each numeric input with "+", to inhibit lookup.
55815 2014-07-15  Eli Zaretskii  <eliz@gnu.org>
55817         localcharset, localename: MS-Windows support for non-default locales
55818         * lib/localcharset.c (locale_charset) [WINDOWS_NATIVE]: Before
55819         falling back on the default system codepage, try extracting
55820         the codepage from what 'setlocale' returns.  This allows to
55821         take into account changes of the codeset due to non-default
55822         locale set by a previous call to 'setlocale'.
55823         * lib/localename.c (LOCALE_NAME_MAX_LENGTH) [WINDOWS_NATIVE]:
55824         Define if not already defined.
55825         (enum_locales_fn, get_lcid) [WINDOWS_NATIVE]: New functions.
55826         (gl_locale_name_thread) [WINDOWS_NATIVE]: Produce the
55827         current locale by calling 'setlocale', then converting the
55828         locale name into LCID by calling 'get_lcid'.  This allows to
55829         take into account changes in the current locale from the
55830         default one, in contrast to GetThreadLocale.
55832 2014-07-14  Daiki Ueno  <ueno@gnu.org>
55834         announce-gen: avoid failure when Digest::SHA is installed
55835         When Digest::SHA is available, Digest::SHA1 is not loaded and thus
55836         Digest::SHA1->new in print_checksums fails.
55837         * build-aux/announce-gen (digest_classes): New associative array
55838         for available message digest implementations.
55839         (print_locations): Use it.
55841 2014-07-13  Pádraig Brady  <P@draigBrady.com>
55843         gettext: revert "update macros to version 0.19"
55844         This reverts commit 9b9370ca, as it currently requires that
55845         developers of any project that explicitly uses the gettext module
55846         or implicitly uses it through the utimens-tests or
55847         futimens-tests modules, use gettext >= 0.19.
55848         However there are some stability and availablity issues with
55849         that version at present.  We can reinstate this soon, when stability
55850         is addressed and packages are more readily available.
55852 2014-07-12  Jim Meyering  <meyering@fb.com>
55854         regex: don't deref NULL upon heap allocation failure
55855         * lib/regcomp.c (parse_dup_op): Handle duplicate_tree
55856         failure in one more place.
55857         To trigger the segfault, configure grep -with-included-regex,
55858         build it, and run these commands:
55859         ( ulimit -v 300000; echo a|src/grep -E a+++++++++++++++++++++ )
55860         I discovered this while replying to a private report from
55861         Jens Schleusener about excessive memory consumption by grep
55862         when using a regular expression like the one above.
55864 2014-07-11  Paul Eggert  <eggert@cs.ucla.edu>
55866         regex: fix memory leak in compiler
55867         Fix by Andreas Schwab in:
55868         https://sourceware.org/ml/libc-alpha/2014-06/msg00503.html
55869         * lib/regcomp.c (parse_reg_exp): Deallocate partially
55870         constructed tree before returning error.
55872 2014-07-10  Assaf Gordon  <assafgordon@gmail.com>
55874         announce-gen: avoid perl warnings
55875         * build-aux/announce-gen: add two minor checks to avoid
55876         "use of uninitialized value" warnings when command-line parameters are
55877         missing.
55879 2014-07-10  Assaf Gordon  <assafgordon@gmail.com>
55881         localename: avoid -Wsuggest-attribute={const,pure} warnings
55882         * lib/localename.c (string_has): Tag internal function as pure.
55883         * lib/localename.h (gl_locale_name_default): Tag extern declaration
55884         as const when appropriate.
55886 2014-07-10  Eli Zaretskii  <eliz@gnu.org>
55888         nl_langinfo: Fix last change.
55889         * lib/nl_langinfo.c (includes): Drop redundant include.
55891 2014-07-10  Siddhesh Poyarekar  <siddhesh@redhat.com>
55893         error: Fix -Wundef warnings in glibc
55894         * lib/error.c [_LIBC]: Define default macros for
55895         glibc.
55896         (print_errno_message) [defined HAVE_STRERROR_R || _LIBC]:
55897         Check _LIBC before STRERROR_R_CHAR_P.
55899         error: Sync from glibc master
55900         * lib/error.c [_LIBC]: Remove INTUSE usage.
55901         (error_tail): Remove unused macro ALLOCA_LIMIT.
55902         Fix potential buffer overflow.  Fix potential NULL dereference
55903         in strcmp.
55905 2014-07-09  Pavel Hrdina  <phrdina@redhat.com> (tiny change)
55907         nl_langinfo: fix build under mingw
55908         * lib/nl_langinfo.c (includes): Pick up <windows.h> for GetACP().
55910 2014-07-09  Andrew D Warshall  <warshall@99main.com>
55912         mountlist: do not classify a bind-mounted dir entry as "dummy"
55913         * m4/ls-mntd-fs.m4: Check for hasmntopt() on platforms with
55914         1-argument getmntent() (instead of assuming absence).
55916 2014-07-08  Eric Blake  <eblake@redhat.com>
55918         maint.mk: less syntax-check noise when SIGPIPE is ignored
55919         * top/maint.mk (_sc_header_without_use)
55920         (sc_require_config_h_first): Parse full list.
55922 2014-07-07  Eli Zaretskii  <eliz@gnu.org>
55923             Paul Eggert  <eggert@cs.ucla.edu>
55925         nl_langinfo: CODESET on MS-Windows and more items from localeconv
55926         * lib/langinfo.in.h (DECIMAL_POINT, THOUSANDS_SEP, GROUPING)
55927         (CURRENCY_SYMBOL, INT_CURR_SYMBOL, MON_DECIMAL_POINT)
55928         (MON_THOUSANDS_SEP, MON_GROUPING, POSITIVE_SIGN, NEGATIVE_SIGN)
55929         (FRAC_DIGITS, INT_FRAC_DIGITS, P_CS_PRECEDES, N_CS_PRECEDES)
55930         (P_SEP_BY_SPACE, N_SEP_BY_SPACE, P_SIGN_POSN, N_SIGN_POSN): Define.
55931         * lib/nl_langinfo.c: Include <locale.h> and <string.h> early.
55932         Include <stdio.h> if Microsoft Windows.
55933         Include <time.h> if !REPLACE_NL_LANGINFO.
55934         (ctype_codeset): New function, taken from rpl_nl_langinfo,
55935         and with improvements for Microsoft Windows.
55936         (rpl_nl_langinfo): Use it.
55937         (nl_langinfo) [!REPLACE_NL_LANGINFO]: Likewise.
55938         Compute the values of RADIXCHAR, THOUSEP, GROUPING, CRNCYSTR,
55939         INT_CURR_SYMBOL, MON_DECIMAL_POINT, MON_THOUSANDS_SEP,
55940         MON_GROUPING, POSITIVE_SIGN, NEGATIVE_SIGN, FRAC_DIGITS,
55941         INT_FRAC_DIGITS, P_CS_PRECEDES, N_CS_PRECEDES, P_SEP_BY_SPACE,
55942         N_SEP_BY_SPACE, P_SIGN_POSN, and N_SIGN_POSN from the
55943         corresponding values returned by 'localeconv'.  Compute the values
55944         of AM_STR, PM_STR, DAY_n, ABDAY_n, MON_n, and ABMON_n by calling
55945         'strftime' with a suitable struct tm value.
55947 2014-07-05  Paul Eggert  <eggert@cs.ucla.edu>
55949         Bruno Haible has stepped down as maintainer.
55950         See Karl Berry in:
55951         http://lists.gnu.org/r/bug-gnulib/2014-07/msg00004.html
55952         Daiki Ueno has volunteered to maintain libunistring; see:
55953         http://lists.gnu.org/r/bug-gnulib/2014-07/msg00005.html
55954         * modules/gen-uni-tables, modules/libunistring:
55955         * modules/libunistring-optional, modules/ucs4-utf16, modules/ucs4-utf8:
55956         * modules/unicase/base, modules/unicase/cased:
55957         * modules/unicase/empty-prefix-context:
55958         * modules/unicase/empty-suffix-context, modules/unicase/ignorable:
55959         * modules/unicase/locale-language, modules/unicase/special-casing:
55960         * modules/unicase/tocasefold, modules/unicase/tolower:
55961         * modules/unicase/totitle, modules/unicase/toupper:
55962         * modules/unicase/u16-casecmp, modules/unicase/u16-casecoll:
55963         * modules/unicase/u16-casefold, modules/unicase/u16-casemap:
55964         * modules/unicase/u16-casexfrm, modules/unicase/u16-ct-casefold:
55965         * modules/unicase/u16-ct-tolower, modules/unicase/u16-ct-totitle:
55966         * modules/unicase/u16-ct-toupper, modules/unicase/u16-is-cased:
55967         * modules/unicase/u16-is-casefolded, modules/unicase/u16-is-invariant:
55968         * modules/unicase/u16-is-lowercase, modules/unicase/u16-is-titlecase:
55969         * modules/unicase/u16-is-uppercase, modules/unicase/u16-prefix-context:
55970         * modules/unicase/u16-suffix-context, modules/unicase/u16-tolower:
55971         * modules/unicase/u16-totitle, modules/unicase/u16-toupper:
55972         * modules/unicase/u32-casecmp, modules/unicase/u32-casecoll:
55973         * modules/unicase/u32-casefold, modules/unicase/u32-casemap:
55974         * modules/unicase/u32-casexfrm, modules/unicase/u32-ct-casefold:
55975         * modules/unicase/u32-ct-tolower, modules/unicase/u32-ct-totitle:
55976         * modules/unicase/u32-ct-toupper, modules/unicase/u32-is-cased:
55977         * modules/unicase/u32-is-casefolded, modules/unicase/u32-is-invariant:
55978         * modules/unicase/u32-is-lowercase, modules/unicase/u32-is-titlecase:
55979         * modules/unicase/u32-is-uppercase, modules/unicase/u32-prefix-context:
55980         * modules/unicase/u32-suffix-context, modules/unicase/u32-tolower:
55981         * modules/unicase/u32-totitle, modules/unicase/u32-toupper:
55982         * modules/unicase/u8-casecmp, modules/unicase/u8-casecoll:
55983         * modules/unicase/u8-casefold, modules/unicase/u8-casemap:
55984         * modules/unicase/u8-casexfrm, modules/unicase/u8-ct-casefold:
55985         * modules/unicase/u8-ct-tolower, modules/unicase/u8-ct-totitle:
55986         * modules/unicase/u8-ct-toupper, modules/unicase/u8-is-cased:
55987         * modules/unicase/u8-is-casefolded, modules/unicase/u8-is-invariant:
55988         * modules/unicase/u8-is-lowercase, modules/unicase/u8-is-titlecase:
55989         * modules/unicase/u8-is-uppercase, modules/unicase/u8-prefix-context:
55990         * modules/unicase/u8-suffix-context, modules/unicase/u8-tolower:
55991         * modules/unicase/u8-totitle, modules/unicase/u8-toupper:
55992         * modules/unicase/ulc-casecmp, modules/unicase/ulc-casecoll:
55993         * modules/unicase/ulc-casexfrm, modules/unicodeio:
55994         * modules/uniconv/base, modules/uniconv/u16-conv-from-enc:
55995         * modules/uniconv/u16-conv-to-enc:
55996         * modules/uniconv/u16-strconv-from-enc:
55997         * modules/uniconv/u16-strconv-from-locale:
55998         * modules/uniconv/u16-strconv-to-enc:
55999         * modules/uniconv/u16-strconv-to-locale:
56000         * modules/uniconv/u32-conv-from-enc, modules/uniconv/u32-conv-to-enc:
56001         * modules/uniconv/u32-strconv-from-enc:
56002         * modules/uniconv/u32-strconv-from-locale:
56003         * modules/uniconv/u32-strconv-to-enc:
56004         * modules/uniconv/u32-strconv-to-locale:
56005         * modules/uniconv/u8-conv-from-enc, modules/uniconv/u8-conv-to-enc:
56006         * modules/uniconv/u8-strconv-from-enc:
56007         * modules/uniconv/u8-strconv-from-locale:
56008         * modules/uniconv/u8-strconv-to-enc:
56009         * modules/uniconv/u8-strconv-to-locale, modules/unictype/base:
56010         * modules/unictype/bidicategory-all:
56011         * modules/unictype/bidicategory-byname:
56012         * modules/unictype/bidicategory-name, modules/unictype/bidicategory-of:
56013         * modules/unictype/bidicategory-test, modules/unictype/bidiclass-all:
56014         * modules/unictype/bidiclass-byname:
56015         * modules/unictype/bidiclass-longname, modules/unictype/bidiclass-name:
56016         * modules/unictype/bidiclass-of, modules/unictype/bidiclass-test:
56017         * modules/unictype/block-all, modules/unictype/block-list:
56018         * modules/unictype/block-of, modules/unictype/block-test:
56019         * modules/unictype/category-C, modules/unictype/category-Cc:
56020         * modules/unictype/category-Cf, modules/unictype/category-Cn:
56021         * modules/unictype/category-Co, modules/unictype/category-Cs:
56022         * modules/unictype/category-L, modules/unictype/category-LC:
56023         * modules/unictype/category-Ll, modules/unictype/category-Lm:
56024         * modules/unictype/category-Lo, modules/unictype/category-Lt:
56025         * modules/unictype/category-Lu, modules/unictype/category-M:
56026         * modules/unictype/category-Mc, modules/unictype/category-Me:
56027         * modules/unictype/category-Mn, modules/unictype/category-N:
56028         * modules/unictype/category-Nd, modules/unictype/category-Nl:
56029         * modules/unictype/category-No, modules/unictype/category-P:
56030         * modules/unictype/category-Pc, modules/unictype/category-Pd:
56031         * modules/unictype/category-Pe, modules/unictype/category-Pf:
56032         * modules/unictype/category-Pi, modules/unictype/category-Po:
56033         * modules/unictype/category-Ps, modules/unictype/category-S:
56034         * modules/unictype/category-Sc, modules/unictype/category-Sk:
56035         * modules/unictype/category-Sm, modules/unictype/category-So:
56036         * modules/unictype/category-Z, modules/unictype/category-Zl:
56037         * modules/unictype/category-Zp, modules/unictype/category-Zs:
56038         * modules/unictype/category-all, modules/unictype/category-and:
56039         * modules/unictype/category-and-not, modules/unictype/category-byname:
56040         * modules/unictype/category-longname, modules/unictype/category-name:
56041         * modules/unictype/category-none, modules/unictype/category-of:
56042         * modules/unictype/category-or, modules/unictype/category-test:
56043         * modules/unictype/category-test-withtable:
56044         * modules/unictype/combining-class:
56045         * modules/unictype/combining-class-all:
56046         * modules/unictype/combining-class-byname:
56047         * modules/unictype/combining-class-longname:
56048         * modules/unictype/combining-class-name, modules/unictype/ctype-alnum:
56049         * modules/unictype/ctype-alpha, modules/unictype/ctype-blank:
56050         * modules/unictype/ctype-cntrl, modules/unictype/ctype-digit:
56051         * modules/unictype/ctype-graph, modules/unictype/ctype-lower:
56052         * modules/unictype/ctype-print, modules/unictype/ctype-punct:
56053         * modules/unictype/ctype-space, modules/unictype/ctype-upper:
56054         * modules/unictype/ctype-xdigit, modules/unictype/decimal-digit:
56055         * modules/unictype/digit, modules/unictype/joininggroup-all:
56056         * modules/unictype/joininggroup-byname:
56057         * modules/unictype/joininggroup-name, modules/unictype/joininggroup-of:
56058         * modules/unictype/joiningtype-all:
56059         * modules/unictype/joiningtype-byname:
56060         * modules/unictype/joiningtype-longname:
56061         * modules/unictype/joiningtype-name, modules/unictype/joiningtype-of:
56062         * modules/unictype/mirror, modules/unictype/numeric:
56063         * modules/unictype/property-all, modules/unictype/property-alphabetic:
56064         * modules/unictype/property-ascii-hex-digit:
56065         * modules/unictype/property-bidi-arabic-digit:
56066         * modules/unictype/property-bidi-arabic-right-to-left:
56067         * modules/unictype/property-bidi-block-separator:
56068         * modules/unictype/property-bidi-boundary-neutral:
56069         * modules/unictype/property-bidi-common-separator:
56070         * modules/unictype/property-bidi-control:
56071         * modules/unictype/property-bidi-embedding-or-override:
56072         * modules/unictype/property-bidi-eur-num-separator:
56073         * modules/unictype/property-bidi-eur-num-terminator:
56074         * modules/unictype/property-bidi-european-digit:
56075         * modules/unictype/property-bidi-hebrew-right-to-left:
56076         * modules/unictype/property-bidi-left-to-right:
56077         * modules/unictype/property-bidi-non-spacing-mark:
56078         * modules/unictype/property-bidi-other-neutral:
56079         * modules/unictype/property-bidi-pdf:
56080         * modules/unictype/property-bidi-segment-separator:
56081         * modules/unictype/property-bidi-whitespace:
56082         * modules/unictype/property-byname:
56083         * modules/unictype/property-case-ignorable:
56084         * modules/unictype/property-cased:
56085         * modules/unictype/property-changes-when-casefolded:
56086         * modules/unictype/property-changes-when-casemapped:
56087         * modules/unictype/property-changes-when-lowercased:
56088         * modules/unictype/property-changes-when-titlecased:
56089         * modules/unictype/property-changes-when-uppercased:
56090         * modules/unictype/property-combining:
56091         * modules/unictype/property-composite:
56092         * modules/unictype/property-currency-symbol:
56093         * modules/unictype/property-dash:
56094         * modules/unictype/property-decimal-digit:
56095         * modules/unictype/property-default-ignorable-code-point:
56096         * modules/unictype/property-deprecated:
56097         * modules/unictype/property-diacritic:
56098         * modules/unictype/property-extender:
56099         * modules/unictype/property-format-control:
56100         * modules/unictype/property-grapheme-base:
56101         * modules/unictype/property-grapheme-extend:
56102         * modules/unictype/property-grapheme-link:
56103         * modules/unictype/property-hex-digit:
56104         * modules/unictype/property-hyphen:
56105         * modules/unictype/property-id-continue:
56106         * modules/unictype/property-id-start:
56107         * modules/unictype/property-ideographic:
56108         * modules/unictype/property-ids-binary-operator:
56109         * modules/unictype/property-ids-trinary-operator:
56110         * modules/unictype/property-ignorable-control:
56111         * modules/unictype/property-iso-control:
56112         * modules/unictype/property-join-control:
56113         * modules/unictype/property-left-of-pair:
56114         * modules/unictype/property-line-separator:
56115         * modules/unictype/property-logical-order-exception:
56116         * modules/unictype/property-lowercase, modules/unictype/property-math:
56117         * modules/unictype/property-non-break:
56118         * modules/unictype/property-not-a-character:
56119         * modules/unictype/property-numeric:
56120         * modules/unictype/property-other-alphabetic:
56121         * modules/unictype/property-other-default-ignorable-code-point:
56122         * modules/unictype/property-other-grapheme-extend:
56123         * modules/unictype/property-other-id-continue:
56124         * modules/unictype/property-other-id-start:
56125         * modules/unictype/property-other-lowercase:
56126         * modules/unictype/property-other-math:
56127         * modules/unictype/property-other-uppercase:
56128         * modules/unictype/property-paired-punctuation:
56129         * modules/unictype/property-paragraph-separator:
56130         * modules/unictype/property-pattern-syntax:
56131         * modules/unictype/property-pattern-white-space:
56132         * modules/unictype/property-private-use:
56133         * modules/unictype/property-punctuation:
56134         * modules/unictype/property-quotation-mark:
56135         * modules/unictype/property-radical:
56136         * modules/unictype/property-sentence-terminal:
56137         * modules/unictype/property-soft-dotted:
56138         * modules/unictype/property-space:
56139         * modules/unictype/property-terminal-punctuation:
56140         * modules/unictype/property-test, modules/unictype/property-titlecase:
56141         * modules/unictype/property-unassigned-code-value:
56142         * modules/unictype/property-unified-ideograph:
56143         * modules/unictype/property-uppercase:
56144         * modules/unictype/property-variation-selector:
56145         * modules/unictype/property-white-space:
56146         * modules/unictype/property-xid-continue:
56147         * modules/unictype/property-xid-start:
56148         * modules/unictype/property-zero-width, modules/unictype/scripts:
56149         * modules/unictype/scripts-all, modules/unictype/syntax-c-ident:
56150         * modules/unictype/syntax-c-whitespace:
56151         * modules/unictype/syntax-java-ident:
56152         * modules/unictype/syntax-java-whitespace, modules/unigbrk/base:
56153         * modules/unigbrk/u16-grapheme-breaks:
56154         * modules/unigbrk/u16-grapheme-next, modules/unigbrk/u16-grapheme-prev:
56155         * modules/unigbrk/u32-grapheme-breaks:
56156         * modules/unigbrk/u32-grapheme-next, modules/unigbrk/u32-grapheme-prev:
56157         * modules/unigbrk/u8-grapheme-breaks, modules/unigbrk/u8-grapheme-next:
56158         * modules/unigbrk/u8-grapheme-prev, modules/unigbrk/uc-gbrk-prop:
56159         * modules/unigbrk/uc-is-grapheme-break:
56160         * modules/unigbrk/ulc-grapheme-breaks, modules/unilbrk/base:
56161         * modules/unilbrk/tables, modules/unilbrk/u16-possible-linebreaks:
56162         * modules/unilbrk/u16-width-linebreaks:
56163         * modules/unilbrk/u32-possible-linebreaks:
56164         * modules/unilbrk/u32-width-linebreaks:
56165         * modules/unilbrk/u8-possible-linebreaks:
56166         * modules/unilbrk/u8-width-linebreaks, modules/unilbrk/ulc-common:
56167         * modules/unilbrk/ulc-possible-linebreaks:
56168         * modules/unilbrk/ulc-width-linebreaks, modules/uniname/base:
56169         * modules/uniname/uniname, modules/uninorm/base:
56170         * modules/uninorm/canonical-decomposition:
56171         * modules/uninorm/compat-decomposition, modules/uninorm/composition:
56172         * modules/uninorm/decompose-internal, modules/uninorm/decomposing-form:
56173         * modules/uninorm/decomposition, modules/uninorm/decomposition-table:
56174         * modules/uninorm/filter, modules/uninorm/nfc, modules/uninorm/nfd:
56175         * modules/uninorm/nfkc, modules/uninorm/nfkd:
56176         * modules/uninorm/u16-normalize, modules/uninorm/u16-normcmp:
56177         * modules/uninorm/u16-normcoll, modules/uninorm/u16-normxfrm:
56178         * modules/uninorm/u32-normalize, modules/uninorm/u32-normcmp:
56179         * modules/uninorm/u32-normcoll, modules/uninorm/u32-normxfrm:
56180         * modules/uninorm/u8-normalize, modules/uninorm/u8-normcmp:
56181         * modules/uninorm/u8-normcoll, modules/uninorm/u8-normxfrm:
56182         * modules/unistdio/base, modules/unistdio/u-printf-args:
56183         * modules/unistdio/u16-asnprintf, modules/unistdio/u16-asprintf:
56184         * modules/unistdio/u16-printf-parse, modules/unistdio/u16-snprintf:
56185         * modules/unistdio/u16-sprintf, modules/unistdio/u16-u16-asnprintf:
56186         * modules/unistdio/u16-u16-asprintf, modules/unistdio/u16-u16-snprintf:
56187         * modules/unistdio/u16-u16-sprintf:
56188         * modules/unistdio/u16-u16-vasnprintf:
56189         * modules/unistdio/u16-u16-vasprintf:
56190         * modules/unistdio/u16-u16-vsnprintf:
56191         * modules/unistdio/u16-u16-vsprintf, modules/unistdio/u16-vasnprintf:
56192         * modules/unistdio/u16-vasprintf, modules/unistdio/u16-vsnprintf:
56193         * modules/unistdio/u16-vsprintf, modules/unistdio/u32-asnprintf:
56194         * modules/unistdio/u32-asprintf, modules/unistdio/u32-printf-parse:
56195         * modules/unistdio/u32-snprintf, modules/unistdio/u32-sprintf:
56196         * modules/unistdio/u32-u32-asnprintf:
56197         * modules/unistdio/u32-u32-asprintf, modules/unistdio/u32-u32-snprintf:
56198         * modules/unistdio/u32-u32-sprintf:
56199         * modules/unistdio/u32-u32-vasnprintf:
56200         * modules/unistdio/u32-u32-vasprintf:
56201         * modules/unistdio/u32-u32-vsnprintf:
56202         * modules/unistdio/u32-u32-vsprintf, modules/unistdio/u32-vasnprintf:
56203         * modules/unistdio/u32-vasprintf, modules/unistdio/u32-vsnprintf:
56204         * modules/unistdio/u32-vsprintf, modules/unistdio/u8-asnprintf:
56205         * modules/unistdio/u8-asprintf, modules/unistdio/u8-printf-parse:
56206         * modules/unistdio/u8-snprintf, modules/unistdio/u8-sprintf:
56207         * modules/unistdio/u8-u8-asnprintf, modules/unistdio/u8-u8-asprintf:
56208         * modules/unistdio/u8-u8-snprintf, modules/unistdio/u8-u8-sprintf:
56209         * modules/unistdio/u8-u8-vasnprintf, modules/unistdio/u8-u8-vasprintf:
56210         * modules/unistdio/u8-u8-vsnprintf, modules/unistdio/u8-u8-vsprintf:
56211         * modules/unistdio/u8-vasnprintf, modules/unistdio/u8-vasprintf:
56212         * modules/unistdio/u8-vsnprintf, modules/unistdio/u8-vsprintf:
56213         * modules/unistdio/ulc-asnprintf, modules/unistdio/ulc-asprintf:
56214         * modules/unistdio/ulc-fprintf, modules/unistdio/ulc-printf-parse:
56215         * modules/unistdio/ulc-snprintf, modules/unistdio/ulc-sprintf:
56216         * modules/unistdio/ulc-vasnprintf, modules/unistdio/ulc-vasprintf:
56217         * modules/unistdio/ulc-vfprintf, modules/unistdio/ulc-vsnprintf:
56218         * modules/unistdio/ulc-vsprintf, modules/unistr/base:
56219         * modules/unistr/u16-check, modules/unistr/u16-chr:
56220         * modules/unistr/u16-cmp, modules/unistr/u16-cmp2:
56221         * modules/unistr/u16-cpy, modules/unistr/u16-cpy-alloc:
56222         * modules/unistr/u16-endswith, modules/unistr/u16-mblen:
56223         * modules/unistr/u16-mbsnlen, modules/unistr/u16-mbtouc:
56224         * modules/unistr/u16-mbtouc-unsafe, modules/unistr/u16-mbtoucr:
56225         * modules/unistr/u16-move, modules/unistr/u16-next:
56226         * modules/unistr/u16-prev, modules/unistr/u16-set:
56227         * modules/unistr/u16-startswith, modules/unistr/u16-stpcpy:
56228         * modules/unistr/u16-stpncpy, modules/unistr/u16-strcat:
56229         * modules/unistr/u16-strchr, modules/unistr/u16-strcmp:
56230         * modules/unistr/u16-strcoll, modules/unistr/u16-strcpy:
56231         * modules/unistr/u16-strcspn, modules/unistr/u16-strdup:
56232         * modules/unistr/u16-strlen, modules/unistr/u16-strmblen:
56233         * modules/unistr/u16-strmbtouc, modules/unistr/u16-strncat:
56234         * modules/unistr/u16-strncmp, modules/unistr/u16-strncpy:
56235         * modules/unistr/u16-strnlen, modules/unistr/u16-strpbrk:
56236         * modules/unistr/u16-strrchr, modules/unistr/u16-strspn:
56237         * modules/unistr/u16-strstr, modules/unistr/u16-strtok:
56238         * modules/unistr/u16-to-u32, modules/unistr/u16-to-u8:
56239         * modules/unistr/u16-uctomb, modules/unistr/u32-check:
56240         * modules/unistr/u32-chr, modules/unistr/u32-cmp:
56241         * modules/unistr/u32-cmp2, modules/unistr/u32-cpy:
56242         * modules/unistr/u32-cpy-alloc, modules/unistr/u32-endswith:
56243         * modules/unistr/u32-mblen, modules/unistr/u32-mbsnlen:
56244         * modules/unistr/u32-mbtouc, modules/unistr/u32-mbtouc-unsafe:
56245         * modules/unistr/u32-mbtoucr, modules/unistr/u32-move:
56246         * modules/unistr/u32-next, modules/unistr/u32-prev:
56247         * modules/unistr/u32-set, modules/unistr/u32-startswith:
56248         * modules/unistr/u32-stpcpy, modules/unistr/u32-stpncpy:
56249         * modules/unistr/u32-strcat, modules/unistr/u32-strchr:
56250         * modules/unistr/u32-strcmp, modules/unistr/u32-strcoll:
56251         * modules/unistr/u32-strcpy, modules/unistr/u32-strcspn:
56252         * modules/unistr/u32-strdup, modules/unistr/u32-strlen:
56253         * modules/unistr/u32-strmblen, modules/unistr/u32-strmbtouc:
56254         * modules/unistr/u32-strncat, modules/unistr/u32-strncmp:
56255         * modules/unistr/u32-strncpy, modules/unistr/u32-strnlen:
56256         * modules/unistr/u32-strpbrk, modules/unistr/u32-strrchr:
56257         * modules/unistr/u32-strspn, modules/unistr/u32-strstr:
56258         * modules/unistr/u32-strtok, modules/unistr/u32-to-u16:
56259         * modules/unistr/u32-to-u8, modules/unistr/u32-uctomb:
56260         * modules/unistr/u8-check, modules/unistr/u8-chr:
56261         * modules/unistr/u8-cmp, modules/unistr/u8-cmp2, modules/unistr/u8-cpy:
56262         * modules/unistr/u8-cpy-alloc, modules/unistr/u8-endswith:
56263         * modules/unistr/u8-mblen, modules/unistr/u8-mbsnlen:
56264         * modules/unistr/u8-mbtouc, modules/unistr/u8-mbtouc-unsafe:
56265         * modules/unistr/u8-mbtoucr, modules/unistr/u8-move:
56266         * modules/unistr/u8-next, modules/unistr/u8-prev:
56267         * modules/unistr/u8-set, modules/unistr/u8-startswith:
56268         * modules/unistr/u8-stpcpy, modules/unistr/u8-stpncpy:
56269         * modules/unistr/u8-strcat, modules/unistr/u8-strchr:
56270         * modules/unistr/u8-strcmp, modules/unistr/u8-strcoll:
56271         * modules/unistr/u8-strcpy, modules/unistr/u8-strcspn:
56272         * modules/unistr/u8-strdup, modules/unistr/u8-strlen:
56273         * modules/unistr/u8-strmblen, modules/unistr/u8-strmbtouc:
56274         * modules/unistr/u8-strncat, modules/unistr/u8-strncmp:
56275         * modules/unistr/u8-strncpy, modules/unistr/u8-strnlen:
56276         * modules/unistr/u8-strpbrk, modules/unistr/u8-strrchr:
56277         * modules/unistr/u8-strspn, modules/unistr/u8-strstr:
56278         * modules/unistr/u8-strtok, modules/unistr/u8-to-u16:
56279         * modules/unistr/u8-to-u32, modules/unistr/u8-uctomb, modules/unitypes:
56280         * modules/uniwbrk/base, modules/uniwbrk/table:
56281         * modules/uniwbrk/u16-wordbreaks, modules/uniwbrk/u32-wordbreaks:
56282         * modules/uniwbrk/u8-wordbreaks, modules/uniwbrk/ulc-wordbreaks:
56283         * modules/uniwbrk/wordbreak-property, modules/uniwidth/base:
56284         * modules/uniwidth/u16-strwidth, modules/uniwidth/u16-width:
56285         * modules/uniwidth/u32-strwidth, modules/uniwidth/u32-width:
56286         * modules/uniwidth/u8-strwidth, modules/uniwidth/u8-width:
56287         * modules/uniwidth/width, modules/utf16-ucs4:
56288         * modules/utf16-ucs4-unsafe, modules/utf8-ucs4:
56289         * modules/utf8-ucs4-unsafe:
56290         Change maintainer from Bruno Haible to Daiki Ueno.
56291         This is my guess at the libunistring modules; please feel free
56292         to fix if I guessed incorrectly.
56293         * modules/accept4, modules/acl, modules/acos, modules/acosf:
56294         * modules/alignof, modules/amemxfrm, modules/ansi-c++-opt:
56295         * modules/areadlink, modules/array-list, modules/array-mergesort:
56296         * modules/array-oset, modules/asin, modules/asinf, modules/astrxfrm:
56297         * modules/atan, modules/atan2, modules/atan2f, modules/atanf:
56298         * modules/avltree-list, modules/avltree-oset, modules/avltreehash-list:
56299         * modules/binary-io, modules/bison-i18n, modules/btowc:
56300         * modules/c-ctype, modules/c-strcase, modules/c-strcaseeq:
56301         * modules/c-strcasestr, modules/c-strstr, modules/calloc-posix:
56302         * modules/canonicalize-lgpl, modules/careadlinkat, modules/carray-list:
56303         * modules/cbrt, modules/cbrt-ieee, modules/cbrtf, modules/cbrtf-ieee:
56304         * modules/cbrtl, modules/cbrtl-ieee, modules/ceil, modules/ceil-ieee:
56305         * modules/ceilf, modules/ceilf-ieee, modules/ceill, modules/ceill-ieee:
56306         * modules/chdir, modules/classpath, modules/clean-temp, modules/close:
56307         * modules/closedir, modules/concat-filename, modules/copy-file:
56308         * modules/copysign, modules/copysignf, modules/copysignl, modules/cos:
56309         * modules/cosf, modules/cosh, modules/coshf, modules/csharpcomp:
56310         * modules/csharpcomp-script, modules/csharpexec:
56311         * modules/csharpexec-script, modules/ctype, modules/diffseq:
56312         * modules/dprintf, modules/dprintf-posix, modules/dup:
56313         * modules/dup2-obsolete, modules/dup3, modules/duplocale:
56314         * modules/eealloc, modules/environ, modules/erf, modules/erfc:
56315         * modules/errno, modules/execute, modules/exp, modules/exp-ieee:
56316         * modules/exp2, modules/exp2-ieee, modules/exp2f, modules/exp2f-ieee:
56317         * modules/exp2l, modules/exp2l-ieee, modules/expf, modules/expf-ieee:
56318         * modules/expl, modules/expl-ieee, modules/expm1, modules/expm1-ieee:
56319         * modules/expm1f, modules/expm1f-ieee, modules/expm1l:
56320         * modules/expm1l-ieee, modules/fabs, modules/fabs-ieee, modules/fabsf:
56321         * modules/fabsf-ieee, modules/fabsl, modules/fabsl-ieee:
56322         * modules/fatal-signal, modules/fbufmode, modules/fchdir:
56323         * modules/fclose, modules/fd-hook, modules/fdopen, modules/filename:
56324         * modules/findprog, modules/findprog-lgpl, modules/floor:
56325         * modules/floor-ieee, modules/floorf, modules/floorf-ieee:
56326         * modules/floorl, modules/floorl-ieee, modules/fma, modules/fma-ieee:
56327         * modules/fmaf, modules/fmaf-ieee, modules/fmal, modules/fmal-ieee:
56328         * modules/fmod, modules/fmod-ieee, modules/fmodf, modules/fmodf-ieee:
56329         * modules/fmodl, modules/fmodl-ieee, modules/fopen, modules/fpieee:
56330         * modules/fprintf-posix, modules/fpucw, modules/fpurge:
56331         * modules/freadable, modules/freadahead, modules/freadptr:
56332         * modules/freadseek, modules/freopen, modules/frexp:
56333         * modules/frexp-ieee, modules/frexp-nolibm, modules/frexpf:
56334         * modules/frexpf-ieee, modules/frexpl, modules/frexpl-ieee:
56335         * modules/frexpl-nolibm, modules/fseek, modules/fseeko:
56336         * modules/fseterr, modules/fstat, modules/fstrcmp, modules/ftell:
56337         * modules/ftello, modules/full-read, modules/full-write:
56338         * modules/fwritable, modules/fwriteerror, modules/gcd:
56339         * modules/get-rusage-as, modules/get-rusage-data:
56340         * modules/getdtablesize, modules/getrusage, modules/gettext:
56341         * modules/gettext-h, modules/git-merge-changelog, modules/gperf:
56342         * modules/grantpt, modules/havelib, modules/host-cpu-c-abi:
56343         * modules/hostent, modules/hypot, modules/hypot-ieee, modules/hypotf:
56344         * modules/hypotf-ieee, modules/hypotl, modules/hypotl-ieee:
56345         * modules/iconv, modules/iconv-h, modules/iconv_open:
56346         * modules/iconv_open-utf, modules/idpriv-drop, modules/idpriv-droptemp:
56347         * modules/ilogb, modules/ilogbf, modules/ilogbl, modules/imaxabs:
56348         * modules/imaxdiv, modules/integer_length, modules/integer_length_l:
56349         * modules/integer_length_ll, modules/ioctl, modules/isatty:
56350         * modules/isblank, modules/isnand, modules/isnand-nolibm:
56351         * modules/isnanf, modules/isnanf-nolibm, modules/isnanl:
56352         * modules/isnanl-nolibm, modules/iswblank, modules/iswctype:
56353         * modules/j0, modules/j1, modules/javacomp, modules/javacomp-script:
56354         * modules/javaexec, modules/javaexec-script, modules/javaversion:
56355         * modules/jn, modules/langinfo, modules/ldd, modules/ldexp:
56356         * modules/ldexp-ieee, modules/ldexpf, modules/ldexpf-ieee:
56357         * modules/ldexpl, modules/ldexpl-ieee, modules/lgamma:
56358         * modules/lib-symbol-visibility, modules/libsigsegv:
56359         * modules/linked-list, modules/linkedhash-list, modules/list:
56360         * modules/localcharset, modules/locale, modules/localeconv:
56361         * modules/localename, modules/lock, modules/log, modules/log-ieee:
56362         * modules/log10, modules/log10-ieee, modules/log10f:
56363         * modules/log10f-ieee, modules/log10l, modules/log10l-ieee:
56364         * modules/log1p, modules/log1p-ieee, modules/log1pf:
56365         * modules/log1pf-ieee, modules/log1pl, modules/log1pl-ieee:
56366         * modules/log2, modules/log2-ieee, modules/log2f, modules/log2f-ieee:
56367         * modules/log2l, modules/log2l-ieee, modules/logb, modules/logb-ieee:
56368         * modules/logbf, modules/logbf-ieee, modules/logbl, modules/logbl-ieee:
56369         * modules/logf, modules/logf-ieee, modules/login_tty:
56370         * modules/logl-ieee, modules/malloc-posix, modules/malloca:
56371         * modules/mbchar, modules/mbfile, modules/mbiter, modules/mbmemcasecmp:
56372         * modules/mbmemcasecoll, modules/mbrlen, modules/mbrtowc:
56373         * modules/mbscasecmp, modules/mbscasestr, modules/mbschr:
56374         * modules/mbscspn, modules/mbsinit, modules/mbslen:
56375         * modules/mbsncasecmp, modules/mbsnlen, modules/mbsnrtowcs:
56376         * modules/mbspbrk, modules/mbspcasecmp, modules/mbsrchr:
56377         * modules/mbsrtowcs, modules/mbssep, modules/mbsspn, modules/mbsstr:
56378         * modules/mbstok_r, modules/mbswidth, modules/mbtowc, modules/mbuiter:
56379         * modules/memchr-obsolete, modules/memcmp2, modules/minmax:
56380         * modules/mkdtemp, modules/mkostemp, modules/mktime-internal:
56381         * modules/modf, modules/modf-ieee, modules/modff, modules/modff-ieee:
56382         * modules/modfl, modules/modfl-ieee, modules/msvc-inval:
56383         * modules/msvc-nothrow, modules/multiarch, modules/nextafter:
56384         * modules/nl_langinfo, modules/no-c++, modules/nocrash:
56385         * modules/nonblocking, modules/open, modules/opendir, modules/openmp:
56386         * modules/oset, modules/pclose, modules/pipe, modules/pipe-filter-gi:
56387         * modules/pipe-filter-ii, modules/pipe2, modules/poll-h:
56388         * modules/posix_spawn, modules/posix_spawn-internal:
56389         * modules/posix_spawn_file_actions_addclose:
56390         * modules/posix_spawn_file_actions_adddup2:
56391         * modules/posix_spawn_file_actions_addopen:
56392         * modules/posix_spawn_file_actions_destroy:
56393         * modules/posix_spawn_file_actions_init:
56394         * modules/posix_spawnattr_destroy, modules/posix_spawnattr_getflags:
56395         * modules/posix_spawnattr_getpgroup:
56396         * modules/posix_spawnattr_getschedparam:
56397         * modules/posix_spawnattr_getschedpolicy:
56398         * modules/posix_spawnattr_getsigdefault:
56399         * modules/posix_spawnattr_getsigmask, modules/posix_spawnattr_init:
56400         * modules/posix_spawnattr_setflags, modules/posix_spawnattr_setpgroup:
56401         * modules/posix_spawnattr_setschedparam:
56402         * modules/posix_spawnattr_setschedpolicy:
56403         * modules/posix_spawnattr_setsigdefault:
56404         * modules/posix_spawnattr_setsigmask, modules/posix_spawnp:
56405         * modules/pow, modules/powf, modules/printf-frexp:
56406         * modules/printf-frexpl, modules/printf-posix, modules/printf-safe:
56407         * modules/progname, modules/propername, modules/pselect:
56408         * modules/pthread_sigmask, modules/ptsname, modules/ptsname_r:
56409         * modules/qacl, modules/quotearg-simple, modules/raise, modules/random:
56410         * modules/rbtree-list, modules/rbtree-oset, modules/rbtreehash-list:
56411         * modules/read, modules/readdir, modules/readlink:
56412         * modules/realloc-posix, modules/regex-quote, modules/relocatable-lib:
56413         * modules/relocatable-lib-lgpl, modules/relocatable-perl:
56414         * modules/relocatable-prog, modules/relocatable-prog-wrapper:
56415         * modules/relocatable-script, modules/remainder:
56416         * modules/remainder-ieee, modules/remainderf, modules/remainderf-ieee:
56417         * modules/remainderl, modules/remainderl-ieee, modules/rewinddir:
56418         * modules/rint, modules/rint-ieee, modules/rintf, modules/rintf-ieee:
56419         * modules/rintl, modules/rintl-ieee, modules/round-ieee:
56420         * modules/roundf-ieee, modules/roundl-ieee, modules/safe-read:
56421         * modules/safe-write, modules/sched, modules/servent, modules/setenv:
56422         * modules/setlocale, modules/sh-quote, modules/shutdown:
56423         * modules/signal, modules/signbit, modules/sigpipe:
56424         * modules/sigpipe-die, modules/sigprocmask, modules/sin, modules/sinf:
56425         * modules/sinh, modules/sinhf, modules/size_max, modules/sleep:
56426         * modules/snippet/arg-nonnull, modules/snippet/c++defs:
56427         * modules/snippet/link-warning, modules/snippet/unused-parameter:
56428         * modules/snprintf, modules/snprintf-posix, modules/spawn:
56429         * modules/spawn-pipe, modules/sprintf-posix, modules/sqrt:
56430         * modules/sqrt-ieee, modules/sqrtf, modules/sqrtf-ieee:
56431         * modules/sqrtl-ieee, modules/stdalign, modules/stdarg:
56432         * modules/stdbool, modules/stpcpy, modules/stpncpy, modules/strcase:
56433         * modules/strcasestr, modules/strcasestr-simple, modules/strcspn:
56434         * modules/streq, modules/strerror_r-posix, modules/striconv:
56435         * modules/striconveh, modules/striconveha, modules/strncat:
56436         * modules/strnlen1, modules/strpbrk, modules/strtod-obsolete:
56437         * modules/sublist, modules/sys_resource, modules/sys_utsname:
56438         * modules/sys_wait, modules/system-posix, modules/system-quote:
56439         * modules/tan, modules/tanf, modules/tanh, modules/tanhf:
56440         * modules/tcgetsid, modules/termios, modules/threadlib, modules/tls:
56441         * modules/tmpdir, modules/towctrans, modules/trunc, modules/trunc-ieee:
56442         * modules/truncf, modules/truncf-ieee, modules/truncl:
56443         * modules/truncl-ieee, modules/ttyname_r, modules/uname:
56444         * modules/unlockpt, modules/unsetenv, modules/vasnprintf:
56445         * modules/vasnprintf-posix, modules/vasprintf, modules/vasprintf-posix:
56446         * modules/vdprintf, modules/vdprintf-posix, modules/vfprintf-posix:
56447         * modules/vfscanf, modules/vma-iter, modules/vprintf-posix:
56448         * modules/vscanf, modules/vsnprintf-posix, modules/vsprintf-posix:
56449         * modules/wait-process, modules/waitpid, modules/wcpcpy:
56450         * modules/wcpncpy, modules/wcrtomb, modules/wcscasecmp, modules/wcscat:
56451         * modules/wcschr, modules/wcscmp, modules/wcscoll, modules/wcscpy:
56452         * modules/wcscspn, modules/wcsdup, modules/wcslen, modules/wcsncasecmp:
56453         * modules/wcsncat, modules/wcsncmp, modules/wcsncpy, modules/wcsnlen:
56454         * modules/wcsnrtombs, modules/wcspbrk, modules/wcsrchr:
56455         * modules/wcsrtombs, modules/wcsspn, modules/wcsstr, modules/wcstok:
56456         * modules/wcswidth, modules/wcsxfrm, modules/wctob, modules/wctomb:
56457         * modules/wctrans, modules/wctype, modules/wcwidth, modules/wmemchr:
56458         * modules/wmemcmp, modules/wmemcpy, modules/wmemmove, modules/wmemset:
56459         * modules/write, modules/xconcat-filename, modules/xlist:
56460         * modules/xmalloca, modules/xoset, modules/xprintf-posix:
56461         * modules/xreadlink, modules/xsetenv, modules/xsize, modules/xstriconv:
56462         * modules/xstriconveh, modules/xsublist, modules/xvasprintf-posix:
56463         * modules/y0, modules/y1, modules/yn:
56464         Remove Bruno Haible as maintainer; if he's the sole maintainer,
56465         change the maintainer to 'all'.  Let's hope someone volunteers.
56467 2014-06-27  Paul Eggert  <eggert@cs.ucla.edu>
56469         mktime: merge #if/#ifdef usage from glibc
56470         * lib/mktime.c: Use "#if defined DEBUG && DEBUG", not "#if DEBUG",
56471         as that works with both Glibc's and Gnulib's style.
56472         See thread starting at Siddhesh Poyarekar's bug report at:
56473         http://lists.gnu.org/r/bug-gnulib/2014-06/msg00102.html
56475 2014-06-20  Alfred M. Szmidt  <ams@gnu.org>
56477         git-version-gen: improve option descriptions
56478         * build-aux/git-version-gen: Mention that --prefix and --fallback
56479         have a mandatory argument.
56481 2014-06-19  Paul Eggert  <eggert@penguin.cs.ucla.edu>
56483         regex: fix memory leak in compiler
56484         Fix by Andreas Schwab in:
56485         https://sourceware.org/ml/libc-alpha/2014-06/msg00462.html
56486         * lib/regcomp.c (parse_expression): Deallocate partially
56487         constructed tree before returning error.
56489         regex: merge patch from libc
56490         2014-02-12  Joseph Myers  <joseph@codesourcery.com>
56491         Combine __USE_BSD and __USE_SVID into __USE_MISC.
56492         * lib/regex.h [__USE_BSD]: Change condition to [__USE_MISC].
56494 2014-06-17  Paul Eggert  <eggert@cs.ucla.edu>
56496         acl: port to gcc -Wredundant-decls
56497         From a request by Dmitry Antipov in:
56498         http://lists.gnu.org/r/emacs-devel/2014-06/msg00263.html
56499         * lib/acl.h (_GL_ACL_H): New macro.  Protect entire contents with
56500         "#ifndef _GL_ACL_H".
56502 2014-06-11  Bruce Korb  <bkorb@gnu.org>
56503         Jim Meyering  <meyering@fb.com>
56505         parse-duration: eliminate 68-year duration limit
56506         * lib/parse-duration.c: Include "intprops.h".
56507         (TIME_MAX): Rename to MAX_DURATION and define to
56508         TYPE_MAXIMUM(time_t).
56509         * modules/parse-duration (Depends-on): Add intprops.
56510         Reported by Jonas 'Sortie' Termansen.
56512 2014-06-14  Paul Eggert  <eggert@cs.ucla.edu>
56514         pthread: don't assume AC_CANONICAL_HOST, port better to Solaris, etc.
56515         * modules/pthread (Depends-on): Add 'extensions', as it defines
56516         _POSIX_PTHREAD_SEMANTICS, which is needed on Solaris.
56517         (configure.ac-early): New section.
56518         * m4/pthread.m4 (gl_PTHREAD_CHECK): Revert previous change, as
56519         it is no longer needed.
56521 2014-06-14  Pádraig Brady  <P@draigBrady.com>
56523         pthread: define thread-safe macros on some platforms
56524         * m4/pthread.m4 (gl_PTHREAD_CHECK): Define macros needed
56525         for thread-safe operation on some platforms.
56527 2014-06-13  Paul Eggert  <eggert@cs.ucla.edu>
56529         regex: don't be multithreaded if USE_UNLOCKED_IO.
56530         Problem reported by Michael Felt in: http://bugs.gnu.org/17773
56531         * lib/regex_internal.h: Do not use multithreaded version if
56532         USE_UNLOCKED_IO is defined.  This is a hack, but it works
56533         around a porting bug with coreutils 8.22 on AIX 7.1.
56535 2014-06-11  Daiki Ueno  <ueno@gnu.org>
56537         gettext: update macros to version 0.19
56538         * m4/intl.m4, m4/po.m4: Update from gettext-0.19.  In particular,
56539         depend on gl_EXTERN_INLINE and drop support for older Bison
56540         versions.
56542 2014-06-10  Pádraig Brady  <P@draigBrady.com>
56544         select,poll: fix console handle check on windows 8
56545         lib/poll.c (IsConsoleHandle): Change from testing the lower
56546         2 bits of the handle to the more expensive but accurate syscall.
56547         lib/select.c: Likewise.
56549 2014-06-10  Eli Zaretskii  <eliz@gnu.org>
56551         select: fix waiting on anonymous pipes on MS-Windows
56552         * lib/select.c (rpl_select): Fall back to polling when select()
56553         indicates there is nothing to check, while due to the timeout not
56554         expiring, activity is indicated on one of the handles.
56555         Also clear the TIMEOUT argument if the timer does expire.
56557 2014-06-10  Eli Zaretskii  <eliz@gnu.org>
56559         times: fix to return non constant value on MS-Windows
56560         * lib/times.c (times): Don't use the process creation time,
56561         rather clock() which on windows returns the number of
56562         clock ticks since the process started.
56564 2014-06-09  Michael Goffioul  <michael.goffioul@gmail.com>
56566         isatty: fix to work on windows 8
56567         * lib/isatty.c (IsConsoleHandle): Change from testing the lower
56568         2 bits of the handle to the more expensive but accurate syscall.
56570 2014-06-07  Paul Eggert  <eggert@cs.ucla.edu>
56572         maint: fix typo in fdl.texi
56573         * doc/fdl.texi: Fix typo (missing '@').
56574         Somehow this was in fdl.texi but not fdl-1.3.texi.
56576 2014-06-06  Ben Walton  <bdwalton@gmail.com>
56578         mountlist: avoid hasmntopt const type warning on solaris
56579         * lib/mountlist.c: Solaris defines the OPT param of hasmntopt()
56580         with char * instead of const char *.  Passing the constant string
56581         "ignore" generates a compiler warning.  For Solaris cast MNT_IGNORE
56582         to avoid the warning.
56584 2014-06-04  Eric Blake  <eblake@redhat.com>
56586         maintainer-makefile: delete obsolete code
56587         * top/maint.mk (build_aux): Drop old code, as threatened.
56589         maintainer-makefile: avoid spurious error messages
56590         * top/maint.mk (syntax-check): Guard definition and use of
56591         $(shell) by whether Makefile is present.
56593 2014-06-03  Ben Walton  <bdwalton@gmail.com>
56595         rename: avoid unused-but-set-variable compiler warning
56596         * lib/rename.c (rpl_rename):  In the non-Win32 variant of rpl_rename,
56597         it is possible that dst_exists may be set but not used.  Mark it with
56598         the unused attribute to avoid compiler warnings.
56600 2014-06-02  Ben Walton  <bdwalton@gmail.com>
56602         rename: mark a label as potentially unused
56603         * lib/rename.c (rpl_rename): Avoid compiler warnings seen on Solaris,
56604         by marking the out label as potentially unused.
56605         * m4/gnulib-common.m4: Mention the need for the trailing ; for C++.
56607 2014-06-01  Paul Eggert  <eggert@cs.ucla.edu>
56609         gnulib-common.m4: Fix typo in _GL_UNUSED_LABEL.
56610         * m4/gnulib-common.m4 (_GL_UNUSED_LABEL): Omit trailing semicolon.
56612 2014-06-02  Ben Walton  <bdwalton@gmail.com>
56614         acl: apply pure attribute to two functions
56615         * lib/acl-internal.h (acl_nontrivial, acl_ace_nontrivial):
56616         Mark as "pure" as flagged by gcc 4.9 on Solaris 10.
56618 2014-06-01  Pádraig Brady  <P@draigBrady.com>
56620         gnulib-common.m4: add _GL_UNUSED_LABEL
56621         * m4/gnulib-common.m4: Add _GL_UNUSED_LABEL which is similar to
56622         _GL_UNUSED, but handles g++ < 4.5 not supporting this syntax.
56624 2014-05-31  Paul Eggert  <eggert@cs.ucla.edu>
56626         dup2, fcntl, fcntl-h: port to AIX 7.1
56627         This fixes some porting problems discovered when testing the latest
56628         grep snapshot on AIX 7.1.  I don't think if fixes any bugs
56629         in grep but it could be important for other applications.
56630         * doc/posix-functions/dup2.texi:
56631         * doc/posix-functions/fcntl.texi:
56632         * doc/posix-headers/fcntl.texi:
56633         Document AIX bugs.
56634         * lib/fcntl.in.h (O_CLOEXEC, O_NOFOLLOW, O_TTY_INIT) [_AIX]:
56635         Define to 0 if outside 'int' range.
56636         * m4/dup2.m4 (gl_FUNC_DUP2):
56637         * m4/fcntl.m4 (gl_FUNC_FCNTL):
56638         Check for getdtablesize.  If it's available, test a value just
56639         outside its range instead of testing 1000000.  When cross-compiling,
56640         guess that AIX will fail this improved test.
56642 2014-05-30  Paul Eggert  <eggert@cs.ucla.edu>
56644         printf, config.rpath: Port to FreeBSD 10.
56645         Problem reported by Tijl Coosemans in:
56646         http://lists.gnu.org/r/bug-gnulib/2014-05/msg00078.html
56647         * build-aux/config.rpath (hardcode_libdir_flag_spec)
56648         (hardcode_direct): Simplify FreeBSD configuration.
56649         (library_names_spec): Don't mishandle FreeBSD 10+.
56650         * m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_LONG_DOUBLE)
56651         (gl_PRINTF_INFINITE_LONG_DOUBLE, gl_PRINTF_DIRECTIVE_F)
56652         (gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_RETVAL_C99)
56653         (gl_SNPRINTF_DIRECTIVE_N, gl_VSNPRINTF_ZEROSIZE_C99):
56654         Don't mishandle FreeBSD 10+ when cross-compiling.
56656         ftoastr: work around compiler bug in IBM xlc 12.1
56657         * lib/ftoastr.h (_GL_FLT_PREC_BOUND, _GL_DBL_PREC_BOUND)
56658         (_GL_LDBL_PREC_BOUND): Make these macros, not enums, to work
56659         around a compiler bug in IBM xlc 12.1.0.0: it complains
56660         '"ftoastr.c", line 80.37: 1506-045 (S) Undeclared identifier
56661         _GL_FLT_PREC_BOUND.'
56663 2014-05-30  Kieran Colford  <colfordk@gmail.com>
56665         valgrind-tests: fixed misleading help message
56666         * m4/valgrind-tests.m4: The help message generated by configure
56667         implied that valgrind was disabled by default, which it wasn't.
56668         Adjusted the help message using s/enable/disable/ to clarify.
56670 2014-05-30  Ulrich Weigand  <uweigand@de.ibm.com>
56672         isfinite, isinf, isnan tests: fix for little-endian PowerPC
56673         * tests/test-isfinite.c (test_isfinitel): Only manipulate the
56674         first double of a PowerPC "double double" pair.
56675         * tests/test-isinf.c (test_isinfl): Likewise.
56676         * tests/test-isnan.c (test_long_double): Likewise.
56677         * tests/test-isnanl.h (main): Likewise.
56678         * tests/test-signbit.c (test_signbitl): Likewise.
56680 2014-05-29  Paul Eggert  <eggert@cs.ucla.edu>
56682         exclude-tests: port to AIX 7.1
56683         * modules/exclude-tests (test_exclude_LDADD): Add $(LIBTHREAD).
56684         Needed on AIX 7.1 with xlc V12.1, otherwise it won't link because
56685         the regex code uses locks.
56687 2014-05-28  Paul Eggert  <eggert@cs.ucla.edu>
56689         pthread_sigmask, timer-time: use gl_THREADLIB only if needed
56690         Without this fix, Emacs would sometimes call sigprocmask instead
56691         of pthread_sigmask, which is a no-no in multithreaded applications.
56692         Problem reported by Jorgen Schaefer in <http://bugs.gnu.org/17561>.
56693         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK):
56694         Suppress check for pthread_sigmask working without -lpthread if
56695         the application always links with -lpthread.  Do not link with
56696         $LIBMULTITHREAD if gl_THREADLIB is not defined.
56697         * m4/timer_time.m4 (gl_TIMER_TIME):
56698         Require gl_THREADLIB only if it is defined.  Do not append
56699         $LIBMULTITHREAD to LIB_TIMER_TIME if gl_THREADLIB is not defined.
56701 2014-05-27  Sylvain Beucler  <beuc@beuc.net>.
56703         gnulib-tool: wget translations using --no-verbose rather than --quiet
56704         This allows the user to see error messages if any (--quiet hides them)
56705         * gnulib-tool: Invoke wget with --no-verbose, rather than --quiet.
56707 2014-05-27  Sylvain Beucler  <beuc@beuc.net>
56709         gnulib-tool: adjust translation wget to avoid a https redirection
56710         Context: http://translationproject.org/latest/gnulib redirects to
56711            https://translationproject.org/latest/gnulib/
56712         Rationale: if the user falls back to wget, she doesn't have rsync and
56713         is probably in a minimal build environment, where packages such as
56714         'ca-certificates' are missing as well, resulting in a failed (and
56715         difficult to detect since ignored) translation initial fetch.
56716         Consequently let's avoid https if possible, and add the missing
56717         trailing slash.  This also avoids an unnecessary 302 redirection.
56718         * gnulib-tool: Add trailing slash to gnulib URL.
56720 2014-05-22  Pádraig Brady  <P@draigBrady.com>
56722         getlogin_r-tests: check return value rather than errno
56723         * tests/test-getlogin_r.c (main): As per POSIX we should be
56724         verifying the return value from getlogin_r() rather than errno.
56726 2014-05-22  Pádraig Brady  <P@draigBrady.com>
56728         getlogin_r-tests: fix various issues in recent change
56729         * tests/test-getlogin_r.c: Include required headers that were
56730         missed in recent commit eec20b4e.
56731         Also consistently check the errno rather than the return value from
56732         getlogin_r as POSIX only specifies that non zero is returned on error.
56733         * modules/getlogin_r-tests (configure.ac): Add the check for ttyname().
56735 2014-05-21  Paul Eggert  <eggert@cs.ucla.edu>
56737         fchdir: port 'open' and 'close' redefinitions to AIX 7.1
56738         * lib/chown.c, lib/clean-temp.c, lib/copy-file.c, lib/execute.c:
56739         * lib/fsusage.c, lib/gc-gnulib.c, lib/javacomp.c, lib/mountlist.c:
56740         * lib/openat-proc.c, lib/pagealign_alloc.c, lib/progreloc.c:
56741         * lib/spawn-pipe.c:
56742         Do not #undef 'open' and 'close'.  AIX 7 does '#define open open64'
56743         and then 'int open64(const char *, int, ...);', which means the
56744         declaration for 'open' gets lost if we later '#undef open'.
56745         Discovered while building grep pretest 2.18.151-1c770 on AIX 7.1,
56746         where the compilation reported the non-fatal error "In function
56747         'openat_proc_name' ... warning: implicit declaration of function
56748         'open'".  In this case the error is relatively harmless, but in
56749         other cases it might not be so minor.
56751 2014-05-20  Paul Eggert  <eggert@cs.ucla.edu>
56753         xalloc: don't potentially generate invalid code for xmemdup calls
56754         * lib/xalloc.h (xmemdup): Do not mark with _GL_ATTRIBUTE_ALLOC, as
56755         this function can initialize the newly-allocated storage with new
56756         pointers, which means this function is not malloc-like.  See:
56757         https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56955
56759 2014-05-19  Pádraig Brady  <P@draigBrady.com>
56761         getlogin_r-tests: avoid false failure under sudo/ssh etc.
56762         * tests/test-getlogin_r.c (main): Sync up with test-getlogin.c
56763         changes from commit 97249cf29 to not depend on environment variables.
56765 2014-05-18  Pádraig Brady  <P@draigBrady.com>
56767         getlogin-tests: avoid false failure under cron
56768         * tests/test-getlogin.c (main): Avoid verifying errnos from ttyname()
56769         since that's not what's under test.  Centos 6 was seen to return
56770         EINVAL for ttyname() when run from cron.
56772 2014-05-16  Jim Meyering  <meyering@fb.com>
56774         mbrtowc.m4: fix a comment typo
56775         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Fix typo s/2/-2/ in
56776         emitted documentation string.
56778 2014-05-16  Paul Eggert  <eggert@cs.ucla.edu>
56780         mbrlen, mbrtowc: fix bug with empty input
56781         * lib/mbrtowc.c (rpl_mbrtowc) [MBRTOWC_EMPTY_INPUT_BUG]: Fix the bug.
56782         * m4/mbrlen.m4 (gl_MBRLEN_EMPTY_INPUT): New macro.  It's not used,
56783         so this is mainly for documentation.
56784         * m4/mbrtowc.m4 (gl_MBRTOWC_EMPTY_INPUT): New macro.
56785         (gl_FUNC_MBRTOWC): Use it.
56786         * tests/test-mbrtowc.c (main): Test for the bug.
56788 2014-05-15  Paul Eggert  <eggert@cs.ucla.edu>
56790         doc: document mbrtowc and mbrlen problem with empty input
56791         * doc/posix-functions/mbrlen.texi (mbrlen):
56792         * doc/posix-functions/mbrtowc.texi (mbrtowc):
56793         Document portability problem when the input string is empty.  See:
56794         https://sourceware.org/bugzilla/show_bug.cgi?id=16950
56796         doc: document exec* = spawn+exit bug with non-Cygwin Windows platforms
56797         Problem reported by Eli Zaretskii in:
56798         http://lists.gnu.org/r/bug-grep/2014-05/msg00118.html
56799         * doc/posix-functions/execl.texi (execl):
56800         * doc/posix-functions/execle.texi (execle):
56801         * doc/posix-functions/execlp.texi (execlp):
56802         * doc/posix-functions/execv.texi (execv):
56803         * doc/posix-functions/execve.texi (execve):
56804         * doc/posix-functions/execvp.texi (execvp):
56805         Mention spawn+exit problem on non-Cygwin Windows platforms.
56807 2014-05-14  Guilherme de Almeida Suckevicz  <guito.linux@gmail.com>
56809         getlogin-tests: avoid false failure under sudo/ssh etc.
56810         * modules/getlogin-tests (configure.ac): Check for ttyname().
56811         * tests/test-getlogin.c (main): Don't depend on environment variables
56812         to correlate with getlogin(), since sudo and ssh etc. can tamper
56813         with the LOGNAME and USER env vars.  Instead lookup the name from
56814         the uid associated with the stdin tty.
56816 2014-05-11  Paul Eggert  <eggert@cs.ucla.edu>
56818         mbsstr, quotearg, xstrtol: pacify IRIX 6.5 cc
56819         These were found when building the latest grep snapshot on IRIX 6.5.
56820         * lib/mbsstr.c (knuth_morris_pratt_multibyte): Break "a=b=c;" into
56821         "b=c; a=b;", since IRIX 6.5 cc complains about the former if b is
56822         never used later.
56823         * lib/quotearg.c (quoting_options_from_style):
56824         * lib/xstrtol.c (__xstrtol):
56825         Use enum instead of 0, to pacify IRIX 6.5 cc.
56827 2014-04-18  Pádraig Brady  <P@draigBrady.com>
56829         gitlog-to-changelog: revert inclusion of git-log-fix file
56830         * build-aux/git-log-fix: Delete dummy file.
56831         * modules/gitlog-to-changelog: Don't reference (overwrite)
56832         the project specific git-log-fix file.
56834 2014-04-18  Assaf Gordon  <agordon@wi.mit.edu>
56836         maint.mk: Relax the copyright check to cater for non FSF projects
56837         * top/maint.mk (sc_copyright_check): Relax the check for $PACKAGE.texi
56838         to not require the "Free" suffix after the copyright years.
56840 2014-04-18  Natanael Copa  <ncopa@alpinelinux.org>
56842         physmem: use sysinfo on linux-gnu if _SC_PHYS_PAGES unavailable
56843         * lib/physmem.c (physmem_total): Some systems like musl libc don't yet
56844         support _SC_PHYS_PAGES.  Use the linux syscall sysinfo as fallback
56845         if _SC_PHYS_PAGES or _SC_PAGESIZE fails.
56846         (physmem_available): Likewise for _SC_AVPHYS_PAGES.
56848 2014-04-18  Paul Eggert  <eggert@cs.ucla.edu>
56850         exclude: port to strict C99
56851         Strict C does not allow converting a function pointer to void *
56852         and vice versa.  Pass a pointer to a function pointer instead.
56853         * lib/exclude.c (add_exclude_file):
56854         Pass the address of the function pointer.
56855         (call_addfn): And deference the address here, to match.
56857 2014-04-17  Paul Eggert  <eggert@cs.ucla.edu>
56859         regex: do not depend on malloc-gnu
56860         * modules/regex (Depends-on): Remove malloc-gnu.
56861         It's no longer needed, because of the 2012-12-29 patch
56862         "regex: port to hosts where malloc (0) == NULL".
56863         Reported by Nathan Kennedy in:
56864         http://lists.gnu.org/r/bug-gnulib/2014-04/msg00026.html
56866 2014-04-16  Assaf Gordon  <agordon@wi.mit.edu>
56868         expl: avoid incorrect expl(small_value) on OpenBSD 5.4
56869         * m4/expl.m4 (gl_FUNC_EXPL): Add a check for this condition.
56870         * doc/posix-functions/expl.texi: Mention the workaround.
56872 2014-04-12  Paul Eggert  <eggert@cs.ucla.edu>
56874         xalloc: allow x2nrealloc (P, PN, S) where P && !*PN
56875         * lib/xalloc.h (x2nrealloc): Extend slightly, to allow the current
56876         size to be zero even when the pointer is nonnull.  This
56877         accommodates the use case where P is malloc (0) and *PN is 0 on a
56878         host where malloc (0) yields nonnull.
56880 2014-04-09  Eric Blake  <eblake@redhat.com>
56882         fts: avoid unnecessary strlen calls
56883         * lib/fts.c (_D_EXACT_NAMLEN): Restore definition when needed.
56885 2014-04-09  Paul Eggert  <eggert@cs.ucla.edu>
56887         fts: avoid unnecessary strlen calls
56888         * lib/fts.c (fts_build): Go back to using _D_EXECT_NAMLEN
56889         when that can be faster than strlen.
56891 2014-03-26  Bernhard Voelker  <mail@bernhard-voelker.de>
56893         fts: avoid unnecessary strlen calls
56894         * lib/fts.c (_D_EXACT_NAMLEN): Remove macro.
56895         (fts_build): Store the length of the dp->d_name entry in a local variable
56896         instead of calling strlen() several times via the above, removed macro.
56897         For 'rm -rf some-dir' with e.g. 1M directory entries, this speeds up the
56898         run by ~4%, yet this reduces the execution time by about a third if run
56899         via "ltrace -c rm -rf some-dir".
56901 2014-03-27  Paul Eggert  <eggert@cs.ucla.edu>
56903         obstack: Remove ancient NeXTSTEP gcc support conditional
56904         This change will ease merging with glibc.  The "#if ... __NEXT__"
56905         causes a warning with -Wundef which glibc now enables by default.
56906         Problem reported by Will Newton in
56907         <http://lists.gnu.org/r/bug-gnulib/2014-03/msg00032.html>.
56908         glibc <sys/cdefs.h> now uses __extension__ for GCC 2.8 or later,
56909         so go with that.
56910         * lib/obstack.h (__extension__):
56912 2014-03-27  Paul Eggert  <eggert@cs.ucla.edu>
56914         obstack: merge with glibc changes
56915         * lib/obstack.c, lib/obstack.h: Merge from glibc.
56916         This is mostly indenting and commentary changes.
56917         Instances of 'register' have been removed.
56919 2014-03-26  Bernhard Voelker  <mail@bernhard-voelker.de>
56921         strftime: wrap macros in "do {...} while(0)"
56922         * lib/strftime.c (DO_NUMBER): Wrap multi-statement code block of
56923         this macro in "do {...} while(0)" to prevent false use as a
56924         single statement, e.g., in an un-braced "{}" else-block.
56925         (DO_SIGNED_NUMBER, DO_TZ_OFFSET, DO_NUMBER_SPACEPAD): Likewise.
56926         (strftime_case_): Remove 'else' after 'goto' - which was the
56927         only non-fatal, un-braced use of one of the above macros.
56928         Spotted by coverity (NESTING_INDENT_MISMATCH).
56930 2014-03-26  Bernhard Voelker  <mail@bernhard-voelker.de>
56932         modechange: avoid memory leaks for invalid octal modes
56933         * lib/modechange.c (mode_compile): During the parsing of
56934         notations like +40, free the 'mc' buffer for invalid mode
56935         strings like +17777 (greater than the maximum octal mode),
56936         =18 (bad octal mode characters) or u=1 ('affected' with
56937         octal modes).
56938         Reproducer, e.g.:
56939             $ valgrind --leak-check=full chmod +17777 file
56940         Introduced via the 2012-03-09 commit, 4730c3e3, "modechange:
56941         add notations +40, 00440, etc.".
56942         Spotted by coverity (RESOURCE_LEAK).
56944 2014-03-24  Paul Eggert  <eggert@cs.ucla.edu>
56946         gitlog-to-changelog: include a dummy git-log-fix file
56947         Problem reported by Nathan Stratton Treadway in:
56948         http://lists.gnu.org/r/bug-tar/2014-03/msg00082.html
56949         * build-aux/git-log-fix: New file.
56951 2014-03-13  Jim Meyering  <meyering@fb.com>
56953         gitlog-to-changelog: also include the file, git-log-fix
56954         * modules/gitlog-to-changelog (Files): Add git-log-fix.
56955         Reported by Assaf Gordon.
56957 2014-03-06  Paul Eggert  <eggert@cs.ucla.edu>
56959         regex: port to OS X 10.8.5 en_US.UTF-8 locale
56960         This fixes a bug when ignoring case and when comparing the
56961         titlecase letter 'Lj' (U+01C8 LATIN CAPITAL LETTER L WITH SMALL
56962         LETTER J) to the corresponding uppercase letter 'LJ' (U+01C7 LATIN
56963         CAPITAL LETTER LJ).  In the OS X 10.8.5 en_US.UTF-8 locale, the
56964         titlecase letter is neither lowercase nor uppercase, but
56965         uppercasing the titlecase letter (via towupper) yields the
56966         uppercase letter, so the two letters should match when ignoring case.
56967         Problem reported by Jim Meyering in <http://debbugs.gnu.org/16911#16>.
56968         * lib/regex_internal.c (build_wcs_upper_buffer, build_upper_buffer):
56969         Don't test whether a character is lowercase before uppercasing it.
56971 2014-03-04  Kevin Cernekee  <cernekee@gmail.com>
56973         stdint, read-file: fix missing SIZE_MAX on Android (tiny change)
56974         This is basically one of the options Bruno Haible proposed in:
56975         http://lists.gnu.org/r/bug-gnulib/2012-01/msg00282.html
56976         * lib/sys_types.in.h (_GL_INCLUDING_UNISTD_H): New macro.
56977         * lib/stdint.in.h: Use it.
56978         * modules/stdint (Depends-on): Add sys_types.
56980 2014-02-26  Pádraig Brady  <P@draigBrady.com>
56982         parse-datetime: fix crash or infloop in TZ="" parsing
56983         * lib/parse-datetime.y (parse_datetime): Break out of the
56984         TZ="" parsing loop once the second significant " is found.
56985         Also skip over any subsequent whitespace to be consistent
56986         with the non TZ= case.
56987         * tests/test-parse-datetime.c: Add test cases for TZ="" parsing.
56989 2014-02-26  Paul Eggert  <eggert@cs.ucla.edu>
56991         savedir: new symbol for fast-read version
56992         * lib/savedir.h (SAVEDIR_SORT_FASTREAD): New symbol, for programs
56993         like GNU cp that want to use SAVEDIR_SORT_INODE if available,
56994         SAVEDIR_SORT_NONE otherwise.  Problem reported by Bernhard Voelker in:
56995         http://lists.gnu.org/r/coreutils/2014-02/msg00037.html
56997 2014-02-25  Paul Eggert  <eggert@penguin.cs.ucla.edu>
56999         unistd: port readlink to Mac OS X 10.3.9
57000         * lib/unistd.in.h (_GL_INCLUDING_UNISTD_H): New macro, to work
57001         around self-include problem in Mac OS X 10.3.9 when combined with
57002         readlink module.  Problem reported by Klaus Zietler in
57003         <http://bugs.gnu.org/16825>.
57005 2014-02-23  Paul Eggert  <eggert@cs.ucla.edu>
57007         diffseq: remove TOO_EXPENSIVE heuristic
57008         Problem with diffutils reported by Vincent Lefevre in
57009         <http://bugs.gnu.org/16848>.  The simplest solution is to remove
57010         the TOO_EXPENSIVE heuristic that I added to GNU diff in 1993.
57011         Although appropriate for circa-1993 hardware, these days the heuristic
57012         seems to be more trouble than it's worth.
57013         * lib/diffseq.h: Modernize citations.
57014         (struct context): Remove member too_expensive.
57015         All uses changed.
57016         (struct partition): Remove members lo_minimal, hi_minimal.
57017         All uses changed.
57018         (diag, compareseq): Remove arg find_minimal.  All uses changed.
57019         (diag): Remove the TOO_EXPENSIVE heuristic that I added back in
57020         1993 to make 'diff' run faster (but not as well) on large inputs.
57021         These days, computers are fast enough that it's typically better
57022         to run slower but more accurately.
57023         * lib/fstrcmp.c: Remove duplicate comment.
57024         * lib/fstrcmp.c (strcmp_bounded):
57025         * lib/git-merge-changelog.c (compute_differences):
57026         Adjust to diffseq.h changes.
57027         * NEWS: Document the change.
57029         savedir: simplify by using stpcpy
57030         * lib/savedir.c (direntry_t): Remove size member.  All uses removed.
57031         (streamsavedir): Use stpcpy instead.
57032         * modules/savedir (Depends-on): Add stpcpy.
57034 2014-02-21  Pádraig Brady  <P@draigBrady.com>
57036         spawn: fix link error on uclibc
57037         * m4/spawn_h.m4 (gl_HAVE_POSIX_SPAWN): use AC_SEARCH_LIBS,
57038         to incorporate -lrt if needed (on uclibc for example).
57039         * modules/posix_spawn: Reference the substituted LIB.
57041 2014-02-21  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>  (tiny change)
57042         timer: fix uClibc detection of threading
57043         * m4/time_time.m4 (gl_TIMER_TIME): Detect whether threads are
57044         enabled in uClibc.
57046 2014-02-21  Eric Blake  <eblake@redhat.com>
57048         maintainer-makefiles: provide AC_PROG_SED for older autoconf
57049         * m4/gnulib-common.m4 (AC_PROG_SED): Copy from newer autoconf.
57051 2014-02-21  Sergey Poznyakoff  <gray@gnu.org.ua>
57053         exclude: add support for posix regexps
57055         This commit adds support for POSIX extended regular expressions
57056         and fixes a long-standing memory leak (pattern buffer was never
57057         freed).  It also implements a new interface function to read
57058         exclude patterns from a FILE, which passes an additional parameter
57059         to its callback function, thereby allowing to preserve its state
57060         between invocations.
57062         * lib/exclude.c (struct patopts): Pack regex and pattern into union.
57063         (pattern_buffer): New struct.
57064         (exclude): New member patbuf.
57065         (exclude_add_pattern_buffer): New function.
57066         (free_exclude_segment): Free regexps.
57067         (free_exclude): Free allocated pattern buffers.
57068         (exclude_patopts): New function.
57069         (file_pattern_matches): Use exclude_patopts.
57070         (add_exclude): support regexps.
57071         (add_exclude_fp): New function.
57072         (add_exclude_file): Rewrite using add_exclude_fp.
57073         (fnmatch_pattern_has_wildcards): Support posix extended regexps.
57074         * lib/exclude.h (EXCLUDE_REGEX, EXCLUDE_ALLOC): New flags.
57075         (add_exclude_fp)
57076         (add_exclude_file): Rewrite using add_exclude_fp.
57077         (fnmatch_pattern_has_wildcards): Support posix extended regexps.
57078         * lib/exclude.h (EXCLUDE_REGEX, EXCLUDE_ALLOC): New flags.
57079         (add_exclude_fp)
57080         (exclude_add_pattern_buffer): New prototypes.
57081         * modules/exclude: Depends on regex and filename.
57083 2014-02-20  Eric Blake  <eblake@redhat.com>
57085         maintainer-makefiles: use $(SED) for syntax check
57086         * modules/maintainer-makefile (configure.ac): Check for sane sed.
57087         * top/maint.mk: Change sed to $(SED).
57089 2014-02-11  Sergey Poznyakoff  <gray@gnu.org.ua>
57090             Paul Eggert  <eggert@cs.ucla.edu>
57092         savedir: add sorting arg to savedir, streamsavedir; remove fdsavedir
57093         Patch based on an idea by Dick Streefland in
57094         <https://savannah.gnu.org/patch/?7892>.
57095         * NEWS: Document this.
57096         * lib/savedir.c (NAME_SIZE_DEFAULT): Remove.
57097         (direntry_t, comparison_function): New types.
57098         (direntry_cmp_name): New function.
57099         (direntry_cmp_inode) [D_INO_IN_DIRENT]: New function.
57100         (streamsavedir, savedir): New arg OPTION.
57101         (streamsavedir): Simplify memory allocation.
57102         (fdsavedir): Remove.
57103         * lib/savedir.h (enum savedir_option): New type.
57104         (streamsavedir, savedir): New arg OPTION.
57105         (fdsavedir): Remove.
57107 2014-02-05  Paul Eggert  <eggert@cs.ucla.edu>
57109         file-type: add support for doors and other less-common file types
57110         Problem with S_ISDOOR reported by Rich Burridge.
57111         * lib/file-type.c (file_type): Do S_ISLNK early too.  Do S_TYPEIS*
57112         macros before the rest.  Add S_ISCTG, S_ISDOOR, S_ISMPB, S_ISMPC,
57113         S_ISMPX, S_ISNAM, S_ISNWK, S_ISOFD, S_ISOFL, S_ISPORT, S_ISWHT.
57115 2014-01-23  Eric Blake  <eblake@redhat.com>
57117         pthread: work around winpthread header pollution on mingw
57118         * lib/time.in.h: Move pthread workarounds...
57119         * lib/pthread.in.h: ...here.
57120         * m4/pthread.m4 (gl_PTHREAD_CHECK): Also build pthread.h when we
57121         detect macro pollution on mingw.
57122         * doc/posix-headers/pthread.texi (pthread.h): Document the problems.
57124 2014-01-22  Paul Eggert  <eggert@cs.ucla.edu>
57126         qacl: check for fchmod
57127         * m4/acl.m4 (gl_FUNC_ACL): Check for fchmod, since acl-internal.h
57128         and qset-acl.c both use HAVE_FCHMOD.
57130 2014-01-20  Paul Eggert  <eggert@cs.ucla.edu>
57132         fdopen-tests: port to Tru64
57133         * tests/test-fdopen.c (main): Don't invoke fdopen on a file
57134         descriptor that is not open, as POSIX doesn't specify the
57135         resulting behavior and the test does not work on Tru64.
57136         Problem reported by Steven M. Schweda in:
57137         http://lists.gnu.org/r/bug-gnulib/2014-01/msg00079.html
57139         stdalign: port to HP-UX compilers
57140         * lib/stdalign.in.h (_Alignas): Use __attribute__ (__aligned__ (x))
57141         if __HP_cc or __HP_aCC are nonzero.
57143 2014-01-16  Paul Eggert  <eggert@cs.ucla.edu>
57145         strtoimax: port to platforms lacking 'long long'
57146         VMS's pre-C99 compiler lacks 'long long', so 'configure' doesn't
57147         check whether strtoll is declared, which causes the C file to
57148         wrongly report an error.  Problem reported by Steven M. Schweda in:
57149         http://lists.gnu.org/r/bug-diffutils/2014-01/msg00003.html
57150         * lib/strtoimax.c (strtoull):
57151         Declare only if HAVE_UNSIGNED_LONG_LONG_INT.
57152         (strtoll): Declare only if HAVE_LONG_LONG_INT.
57154 2014-01-16  Daniel Albers  <daniel@lbe.rs>  (tiny change)
57156         relocatable-perl: fix texi syntax
57157         * doc/relocatable-maint.texi: Escape braces.
57159 2014-01-09  Reuben Thomas  <rrt@sc3d.org>
57161         relocatable-perl: like relocatable-script, but for Perl scripts
57162         * build-aux/relocatable.pl.in: Add.
57163         * doc/relocatable-maint.texi: Add documentation.
57164         * modules/relocatable-perl: Add.
57166 2014-01-07  Paul Eggert  <eggert@cs.ucla.edu>
57168         tests: fix export bug in previous patch
57169         Problem reported by Jim Meyering.
57170         * tests/init.sh (re_shell): New var, which is exported instead of
57171         re_shell_.
57173         tests: simplify porting to Solaris 10 /bin/sh
57174         Some test cases in 'grep' need a shell that groks '$(';
57175         export re_shell_ for their benefit.  Problem reported for 'grep'
57176         by Dagobert Michelsen in <http://bugs.gnu.org/16380>.
57177         * tests/init.sh (re_shell_): Export if it's used.
57179 2014-01-06  Eric Blake  <eblake@redhat.com>
57181         md5, sha1, sha256, sha512: support older autoconf
57182         * m4/00gnulib.m4 (m4_divert_push): Wrap diversion stack
57183         for autoconf < 2.63b.
57185         include_next: port to autoconf 2.63
57186         * m4/gnulib-common.m4 (AS_VAR_COPY): Define if missing.
57188 2014-01-04  Jim Meyering  <meyering@fb.com>
57190         maint: add a gnulib-local rule to keep non-ascii out of .texi files
57191         * cfg.mk (sc_keep_gnulib_texi_files_mostly_ascii): New rule,
57192         so that "make sc_maint" will ding anyone who puts non-ascii
57193         in any of gnulib's .texi files.
57195 2014-01-03  Jim Meyering  <meyering@fb.com>
57197         freadable, fwritable, fwriting: declare with the "pure" attribute
57198         * lib/freadable.h (freadable): Declare with the "pure" attribute.
57199         * lib/fwritable.h (fwritable): Likewise.
57200         * lib/fwriting.h (fwriting): Likewise.
57201         Suggested by Bruno Haible.
57203         maint.mk: adapt openat.h-include-without-use test
57204         * top/maint.mk (sc_prohibit_openat_without_use): Also check for
57205         FCHMODAT_INLINE, FCHOWNAT_INLINE and STATAT_INLINE, to avoid
57206         failing on gnulib's own lib/{chmod,chown,stat}at.c files.
57207         With this change, running "make sc_maint" in gnulib's top-level
57208         directory now passes for me.
57210 2014-01-03  Paul Eggert  <eggert@cs.ucla.edu>
57212         doc: use ASCII in .texi files where UTF-8 isn't needed
57213         * doc/posix-functions/crypt.texi, doc/posix-functions/encrypt.texi:
57214         * doc/posix-functions/setkey.texi, doc/regex.texi:
57215         Use ASCII input, not UTF-8.
57217 2014-01-02  Jim Meyering  <meyering@fb.com>
57219         freading: declare with the "pure" attribute
57220         * lib/freading.h (freading): Declare with the "pure" attribute.
57222         manywarnings: remove -Wmudflap
57223         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Remove -Wmudflap, since
57224         it is no longer supported in gcc-4.9-to-be.
57226 2014-01-01  Paul Eggert  <eggert@cs.ucla.edu>
57228         relocatable-script: remove unused code
57229         Problem reported by Reuben Thomas in:
57230         http://lists.gnu.org/r/bug-gnulib/2013-12/msg00117.html
57231         * build-aux/relocatable.sh.in (func_tmpdir): Remove unused function.
57233 2014-01-01  Jim Meyering  <meyering@fb.com>
57235         maint: fix public-submodule-commit to work with newer git
57236         * top/maint.mk (public-submodule-commit): Remove excess quoting.
57237         We were over-quoting the test arguments, and somewhere prior to
57238         version 1.8.5.2.229, git stopped removing those excess quotes,
57239         which made the test fail, since the unexpanded strings would
57240         always differ; using GIT_TRACE=1 confirmed that the git merge-base
57241         command wasn't even being run.
57243 2014-01-01  Paul Eggert  <eggert@cs.ucla.edu>
57245         doc: update main copyright year
57246         * doc/gnulib.texi: Update copyright date.
57248 2014-01-01  Eric Blake  <eblake@redhat.com>
57250         version-etc: new year
57251         * lib/version-etc.c (COPYRIGHT_YEAR): Bump to 2014.
57252         * all files: run 'make update-copyright'
57254 2013-12-24  Eric Blake  <eblake@redhat.com>
57256         passfd: give nicer error for recvfd at eof
57257         * lib/passfd.c (recvfd): Fake ENOTCONN if other end closes early.
57258         * tests/test-passfd.c (main): Enhance test to cover this.
57260 2013-12-17  Paul Eggert  <eggert@cs.ucla.edu>
57262         gettimeofday: port recent C++ fix to Emacs
57263         Without this further patch, Emacs won't build due to
57264         the portcheck failing.  Also, this simplifies the patch a bit.
57265         * lib/time.in.h (localtime, gmtime): Don't replace unless
57266         GNULIB_GETTIMEOFDAY.  Treat them more like mktime.
57267         * lib/time.in.h (localtime, gmtime):
57268         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME):
57269         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS):
57270         * modules/time (time.h):
57271         Don't worry about the possibility of localtime and gmtime
57272         being absent; they're present in all C libraries we know about.
57273         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS):
57274         Don't assume sys_time is present and has been initialized.
57275         Instead, use a hack that should work even if it hasn't been.
57276         Don't use a portcheck for gmtime or localtime; this supports
57277         the hack.
57278         * modules/time (time.h): Substitute GNULIB_GETTIMEOFDAY.
57280 2013-12-17  John W. Eaton  <jwe@gnu.org>
57282         gettimeofday: fix C++ crosscompilation
57284         Never replace gmtime and localtime by macros when compiling with
57285         C++, this prevents <ctime> from being included.
57287         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Do not
57288         define gmtime and localtime as preprocessor macros.  Instead
57289         define some HAVE_GMTIME, HAVE_LOCALTIME, REPLACE_GMTIME, and
57290         REPLACE_LOCALTIME substitutions.
57291         * lib/time.in.h: Declare gmtime and localtime when needed.
57292         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): AC_SUBST HAVE_GMTIME,
57293         HAVE_LOCALTIME, REPLACE_GMTIME, and REPLACE_LOCALTIME.
57294         * modules/time: Depend on gettimeofday, and substitute the above
57295         variables in time.h.
57297 2013-12-17  Paul Eggert  <eggert@cs.ucla.edu>
57299         qacl: port to Windows better
57300         See Eli Zaretskii in
57301         <http://lists.gnu.org/r/emacs-devel/2013-12/msg00593.html>.
57302         * lib/file-has-acl.c (acl_access_nontrivial):
57303         Return -1 and set errno if !HAVE_ACL_FIRST_ENTRY &&
57304         !HAVE_ACL_TO_SHORT_TEXT && !HAVE_ACL_FREE_TEXT.
57306 2013-12-12  Alexander V. Lukyanov  <lav@netis.ru>
57308         md5, sha1, sha256, sha512: fix (trivial) compile error in c++ mode.
57309         * lib/gl_openssl.h: Cast void pointers to a specific type.
57311 2013-12-07  Pádraig Brady  <P@draigBrady.com>
57313         open-tests: fix build failure with -Werror=old-style-declaration
57314         * tests/test-open.h: Reorder the inline to avoid the issue.
57316 2013-12-07  Pádraig Brady  <P@draigBrady.com>
57318         md5, sha1, sha256, sha512: fix link error with partial libcrypto
57319         * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Only clear LIB_CRYPTO at
57320         init time, so that if early checks find crypto routines,
57321         while the last does not, then @LIB_CRYPTO@ is replaced correctly,
57322         avoiding link failures.
57324 2013-12-07  Paul Eggert  <eggert@cs.ucla.edu>
57326         md5, sha1, sha256, sha512: add gl_SET_CRYPTO_CHECK_DEFAULT
57327         This provides a new way to specify the default for
57328         gl_CRYPTO_CHECK, one that is reflected in the --help message.
57329         Emacs uses this, as well as the old way.
57330         This attempts to implement a suggestion by Pádraig Brady in
57331         <http://lists.gnu.org/r/coreutils/2013-12/msg00080.html>.
57332         * m4/gl-openssl.m4(gl_SET_CRYPTO_CHECK_DEFAULT): New macro.
57333         (gl_CRYPTO_CHECK): Use it.  Mention the default in --help output.
57335         md5, sha1, sha256, sha512: add 'auto', and a way to specify default
57336         * m4/gl-openssl.m4 (gl_CRYPTO_CHECK):
57337         Add support for a new option, --with-openssl=auto, which causes
57338         the library to be used if available and silently ignored if not.
57339         Add support to allow configure.ac to specify its own
57340         default, by setting with_openssl_default before invoking gl_INIT.
57342 2013-12-05  Paul Eggert  <eggert@cs.ucla.edu>
57344         open-tests: port to glibc with _FORTIFY_SOURCE and -O1
57345         Problem reported by Daiki Ueno in:
57346         http://lists.gnu.org/r/bug-gnulib/2013-06/msg00052.html
57347         * tests/test-open.h (__always_inline):
57348         New macro, if not already defined.
57349         (test_open): Use it.
57351 2013-12-04  Eric Blake  <eblake@redhat.com>
57353         include_next: minimize code duplication
57354         * modules/include_next (Depends-on): Add absolute-header.
57355         * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Reuse
57356         gl_ABSOLUTE_HEADER_ONE instead of open-coding it.
57358 2013-12-04  Pádraig Brady  <P@draigBrady.com>
57360         getcwd: fix compile error in configure check
57361         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Include errno.h
57363 2013-12-04  Pádraig Brady  <P@draigBrady.com>
57365         regex: suppress core dumps from detection code
57366         * m4/regex.m4 (gl_REGEX): Catch the SIGABRT and convert to SIGTERM
57367         to suppress core dumps that may well occur on glibc systems.
57368         These core dumps might not be cleaned up automatically, or could
57369         trigger some system core dump handling logic.
57371 2013-12-03  Pádraig Brady  <P@draigBrady.com>
57373         md5, sha1, sha256, sha512: support mandating use of openssl
57374         * m4/gl-openssl.m4 (gl_crypto_check): Adjust the --with-openssl
57375         description, to list the now 3 separate options.  also don't
57376         mention the default=no, since this is implicit given the option
57377         is described as --with-openssl rather than --without-openssl.
57378         If projects change the default they're free to document that.
57379         with --with-openssl[=yes] we now error out when the specified
57380         hash algorithm is not available in libcrypto.
57382 2013-12-03  Ivailo  <xakepa10@gmail.com>
57384         test-xvasprintf: (trivial) fix to disable some -Wformat-security diags
57385         * tests/test-xvasprintf.c: Disable -Wformat-zero-length and
57386         -Wformat-nonliteral checks, as these edge cases are part of the test.
57388 2013-12-03  Eric Blake  <eblake@redhat.com>
57390         regex: avoid glibc deadlock during configure
57391         * m4/regex.m4 (gl_REGEX): Avoid recursive malloc deadlock when
57392         glibc bug 15078 in turn triggers bug 16159.
57393         Reported by Michal Privoznik.
57395 2013-12-02  Pádraig Brady  <P@draigBrady.com>
57397         md5, sha1, sha256, sha512: use openssl routines if available.
57398         --with-openssl the libcrypto md5, sha1, sha224, sha256, sha384, sha256
57399         routines will be used if available, requiring apps to link @LIB_CRYPTO@
57400         * lib/gl_openssl.h: Provide wrappers for specified openssl hash.
57401         * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): New function to lookup libcrypto
57402         in the standard system location.
57403         * m4/sha1.m4: Call gl_CRYPTO_CHECK() for SHA1.
57404         * m4/sha256.m4: Likewise with SHA256.
57405         * m4/sha512.m4: Likewise with SHA512.
57406         * m4/md5.m4: Likewise with MD5.
57407         * m4/gc.m4: Ensure @LIB_CRYPTO@ set for tests.
57408         * lib/sha1.h: Include wrappers if HAVE_OPENSSL_SHA1.
57409         * lib/sha256.h: Likewise with SHA256.
57410         * lib/sha512.h: Likewise with SHA512.
57411         * lib/md5.h: Likewise with MD5.
57412         * lib/sha1.c: Exlude functionality if HAVE_OPENSSL_SHA1.
57413         * lib/sha256.c: Likewise with SHA256.
57414         * lib/sha512.c: Likewise with SHA512.
57415         * lib/md5.c: Likewise with MD5.
57416         * modules/crypto/sha1 (Link:): Add the new optional lib.
57417         (Depends-on:): Add dependency on extern-inline.
57418         * modules/crypto/sha256: Likewise.
57419         * modules/crypto/sha512: Likewise.
57420         * modules/crypto/md5: Likewise.
57421         * modules/crypto/sha1-tests: Reference the lib here too.
57422         * modules/crypto/md5-tests: Likewise.
57423         * modules/crypto/gc-des-tests: Likewise.
57424         * modules/crypto/gc-hmac-md5-tests: Likewise.
57425         * modules/crypto/gc-hmac-sha1-tests: Likewise.
57426         * modules/crypto/gc-hmac-sha256-tests: Likewise.
57427         * modules/crypto/gc-hmac-sha512-tests: Likewise.
57428         * modules/crypto/gc-md5-tests: Likewise.
57429         * modules/crypto/gc-pbkdf2-sha1-tests: Likewise.
57430         * modules/crypto/gc-sha1-tests: Likewise.
57431         * modules/crypto/gc-tests: Likewise.
57432         * modules/crypto/hmac-md5-tests: Likewise.
57433         * modules/crypto/hmac-sha1-tests: Likewise.
57434         * modules/crypto/hmac-sha256-tests: Likewise.
57435         * modules/crypto/hmac-sha512-tests: Likewise.
57437 2013-11-29  RV1971  <rv1971@web.de>
57439         base64: (trivial) fix compilation regression on some compilers
57440         * lib/base64.c: Don't return the void function,
57441         instead split to a separate return statement.
57443 2013-11-28  Paul Eggert  <eggert@cs.ucla.edu>
57445         ignore-value: revert previous code change
57446         * lib/ignore-value.h (ignore_value): Use __extension__ and
57447         __typeof__ only for GCC 3.4 and later.  Reported by Eric Blake in
57448         <http://lists.gnu.org/r/bug-gnulib/2013-11/msg00102.html>.
57449         Change the comment to try to explain this better.
57451 2013-11-27  Pádraig Brady  <P@draigBrady.com>
57453         selinux-h: improve stub types and add more stub functions
57455         * lib/se-selinux.in.h: Change security_context_t to a typedef
57456         rather than a define, as it's a pointer type and so is better
57457         as a typedef to avoid issues declaring multiple variables
57458         with the comma operator.  Also add stub for string_to_security_class().
57459         * lib/se-context.in.h: Add stub functions for
57460         context_{type,range,role,user}_get().
57462 2013-11-27  Paul Eggert  <eggert@cs.ucla.edu>
57464         ignore-value: prefer GCC version back through 2.0
57465         The code didn't match the comments, so I did a bit of software
57466         archaeology.  GCC 2.0 seems to support __extension__ and
57467         __typeof__, so fix both code and comments to use 2.0.
57468         * lib/ignore-value.h (ignore_value): Use __extension__ and
57469         __typeof__ for GCC 2.0 through 3.3, too.
57471 2013-11-25  Mats Erik Andersson  <gnu@gisladisker.se>
57473         pty: Activate the signature wrapper of forkpty.
57474         The intended preprocessor macro HAVE_FORKPTY is
57475         never defined, yet `lib/forkpty.c' depends on it.
57477         * m4/pty.m4 (gl_FUNC_FORKPTY): At completed analysis,
57478         apply AC_DEFINE_UNQUOTED to HAVE_FORKPTY with value
57479         $HAVE_FORKPTY for access to wrapper in `lib/forkpty.c'.
57481 2013-11-18  Jim Meyering  <meyering@fb.com>
57482         and Paul Eggert  <eggert@cs.ucla.edu>
57484         quotearg: don't attempt to store 1 << 31 into an "int"
57485         * lib/quotearg.c (quotearg_buffer_restyled): Building coreutils with
57486         gcc's new -fsanitize=undefined and running its tests triggered some
57487         new test failures due to undefined behavior, all with this diagnostic:
57488           lib/quotearg.c:629:62: runtime error: left shift of 1 by 31 places \
57489             cannot be represented in type int
57490         Rather than shifting "1" left to form a mask, shift the bits right and
57491         simply use "1" as the mask.
57493 2013-11-21  Paul Eggert  <eggert@cs.ucla.edu>
57495         error: depend on stdio
57496         Problem reported by Nikos Mavrogiannopoulos in
57497         <http://lists.gnu.org/r/bug-gnulib/2013-11/msg00084.html>
57498         * modules/error (Depends-on): Add stdio.
57500 2013-11-18  Ben Pfaff  <blp@cs.stanford.edu>
57502         * doc/relocatable-maint.texi (Supporting Relocation): Improve
57503         wording.
57504         Reported by Reuben Thomas <rrt@sc3d.org>.
57506 2013-11-13  Paul Eggert  <eggert@cs.ucla.edu>
57508         * lib/getgroups.c (posix_getgroups, getgroups) [__APPLE__]:
57509         New function and macro, to work around _DARWIN_C_SOURCE problem.
57510         Reported by Jack Howarth in <http://bugs.gnu.org/14463>.
57512 2013-11-11  Pádraig Brady  <P@draigBrady.com>
57514         base64: provide a fast path for encoding well sized buffers
57515         Avoid conditionals in the base64 encoding loop,
57516         which was seen to give 60% better throughput.
57517         * lib/base64.c (base64_encode_fast): A new function to be called
57518         when we don't want to NUL terminate, and we have enough space
57519         in the output to encode the given input.
57520         (base64_encode): Call the _fast() version when appropriate.
57521         Also remove a redundant mask with 0x3F on the first encoded byte.
57523 2013-11-08  Paul Eggert  <eggert@cs.ucla.edu>
57525         extern-inline: port better to OS X 10.9
57526         * m4/extern-inline.m4: Omit serial number; this file doesn't use them.
57527         (gl_EXTERN_INLINE): Do not suppress the use of extern inline on
57528         OS X 10.9, except for g++ where the bug is still present.
57529         See <http://trac.macports.org/ticket/41033>.
57531 2013-11-08  Eric Blake  <eblake@redhat.com>
57533         fpending: fix regression on DragonFly BSD
57534         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for declaration.
57535         * lib/fpending.h (__fpending): Don't declare twice.
57536         Reported by GW in
57537         <https://lists.gnu.org/r/bug-m4/2013-11/msg00000.html>
57539 2013-11-05  Jim Meyering  <meyering@fb.com>
57541         hash: relax license to LGPLv2+, for libguestfs
57542         * modules/hash (License): Change from GPL to LGPLv2+.
57544 2013-11-03  Paul Eggert  <eggert@cs.ucla.edu>
57546         intprops: port to Oracle Studio c99
57547         * lib/intprops.h (_GL_HAVE___TYPEOF__) [__SUNPRO_C && __STDC__]:
57548         Define to 0, to avoid diagnostics when Oracle Studio is pedantic.
57550 2013-10-31  Paul Eggert  <eggert@cs.ucla.edu>
57552         obstack: pacify HP C
57553         * lib/obstack.h (obstack_free) [!__GNUC__]: Rewrite to avoid
57554         warning "conversion from pointer to smaller integer" from HP
57555         C-ANSI-C - cc version B9007AA/B3910B A.06.26.  It's safe to assume
57556         C89 or later nowadays, so cast to void instead of int.  Privately
57557         reported by H.Merijn Brand.  Also, change header to match glibc's,
57558         to make checking against glibc easier.
57560 2013-10-29  Jim Meyering  <meyering@fb.com>
57562         maint.mk: prefer gpgv2 over gpgv
57563         * top/maint.mk (gpgv): Use gpgv2 if present, else gpgv.
57564         (gpg_key_ID): Use $(gpgv), rather than hard-coding "gpgv".
57565         Reported by Gary Vaughan.
57567 2013-10-30  Paul Eggert  <eggert@cs.ucla.edu>
57569         isnan: port to VAX
57570         Reported by John Klos for NetBSD-5/VAX in
57571         <http://lists.gnu.org/r/bug-gnulib/2013-10/msg00133.html>.
57572         * lib/isnan.c (IEEE_FLOATING_POINT): New macro, stolen from Emacs.
57573         (FUNC): Use it.
57575 2013-10-28  Jim Meyering  <meyering@fb.com>
57577         gnulib-tool: protect against CDPATH
57578         * gnulib-tool: Many "cd" built-in functions print a directory name
57579         to stdout when CDPATH is set, e.g.,
57580           $ bash -c 'CDPATH=/; cd tmp'
57581           /tmp
57582         Unset it, when possible.  Prompted by a comment from Bruce Korb.
57584         maint.mk: restore functionality removed by recent change...
57585         Sunday's change, v0.0-8062-g6b24f60, may have appeared correct from
57586         the context of a shallow-cloned gnulib repository: "git describe"
57587         would fail in such a directory.  However, that change made it so
57588         the reported gnulib revision no longer includes the version number
57589         or a commit count, even when run from a full clone.
57590         * top/maint.mk (gnulib-version): Use the full "git describe"
57591         output when possible, e.g., the form above, rather than the
57592         abbreviated, no-tag, no-commit-count string, and fall back to
57593         using a 10-byte hash, rather than the default minimal-length
57594         hash prefix, since while the minimal-length one may be fine today,
57595         it is likely not to be unique for very long.
57597 2013-10-26  Jim Meyering  <meyering@fb.com>
57599         maint.mk: fix "release" target to build _version
57600         This fixes a bug in README-release whereby following the outlined
57601         steps, one would publish a tarball whose programs would report
57602         --version output not consistent with the package version number.
57603         This bug caused grep-2.15 to produce a grep program whose
57604         --version option made it print 2.14.56-1e3d rather than 2.15.
57605         * top/maint.mk (release): Making this target build "_version"
57606         ensures that the new version number is reflected in configure.
57608 2013-10-21  Ben Pfaff  <blp@cs.stanford.edu>
57610         install-reloc: Support multi-binary installation.
57611         * build-aux/install-reloc: Support installing multiple programs in
57612         one invocation, as done by Automake starting with commit
57613         4295fe33eb23f (Multi-file install for PROGRAMS.).  From Bruno
57614         Haible <bruno@clisp.org>, archived at
57615         http://lists.debian.org/debian-bsd/2012/05/msg00032.html.
57616         Reported by Sylvain <beuc@gnu.org>.
57618 2013-10-21  Michael Haubenwallner  <michael.haubenwallner@salomon.at>
57620         selinux-h: Really build without selinux when library is missing.
57621         * m4/selinux-selinux-h.m4: When the selinux library is missing, really
57622         continue without selinux, as already told in the warning message.
57624 2013-10-21  Jim Meyering  <meyering@fb.com>
57626         regex: also remove dependency on HAVE_WCSCOLL
57627         * lib/regex_internal.h: Remove final vestige of the wcscoll dependency.
57629 2013-10-21  Reuben Thomas  <rrt@sc3d.org>
57631         xfreopen: Fix typo. s/frepoen/freopen/
57632         * lib/xfreopen.c: Fix description.
57633         * modules/xfreopen: Likewise.
57635 2013-10-21  Jim Meyering  <meyering@fb.com>
57637         regex: don't depend on wcscoll
57638         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wcscoll.
57639         It is no longer used.
57641 2013-10-20  Jim Meyering  <meyering@fb.com>
57643         error: add the printf attribute to a static function
57644         * lib/error.c (error_tail): Add the printf attribute, to placate
57645         gcc's -Werror=suggest-attribute=format option.
57647 2013-09-30  Jim Meyering  <meyering@fb.com>
57649         fpending, obstack, strerror-override: use pure+const function attrs
57650         * lib/fpending.h (__fpending): Declare with the "pure" attribute.
57651         * lib/obstack.c (_obstack_allocated_p): Likewise.
57652         * lib/obstack.h (_obstack_memory_used): Likewise.
57653         (_obstack_memory_used): Likewise.
57654         * lib/strerror-override.h (strerror_override): Declare with
57655         the "const" attribute.
57657 2013-10-18  Eric Blake  <eblake@redhat.com>
57659         extern-inline: make safe for -Wundef usage
57660         Reported by Vladimir 'phcoder' Serbinenko in
57661         https://lists.gnu.org/r/bug-gnulib/2013-10/msg00078.html
57662         * m4/extern-inline.m4 (gl_EXTERN_INLINE): Port to older gcc.
57664 2013-10-16  Paul Eggert  <eggert@cs.ucla.edu>
57666         mkfifo-tests, etc.: allow HP-UX 11.11 bug
57667         Problem reported by Daniel Richard G. in
57668         <http://lists.gnu.org/r/bug-gnulib/2013-10/msg00068.html>.
57669         * doc/posix-functions/mkfifo.texi (mkfifo):
57670         * doc/posix-functions/mkfifoat.texi (mkfifoat):
57671         * doc/posix-functions/mknod.texi (mknod):
57672         * doc/posix-functions/mknodat.texi (mknodat):
57673         Document the HP-UX 11.11 bug.
57674         * tests/test-mkfifo.h (test_mkfifo):
57675         Allow the HP-UX 11.11 bug.
57677 2013-10-14  Paul Eggert  <eggert@cs.ucla.edu>
57679         acl: allow cross-compilation to Gentoo
57680         Problem reported by Gabriel Marcano in
57681         <http://lists.gnu.org/r/bug-gnulib/2013-10/msg00058.html>.
57682         * m4/acl.m4 (gl_ACL_GET_FILE): When cross-compiling,
57683         test only whether it links.
57685 2013-10-13  Paul Eggert  <eggert@cs.ucla.edu>
57687         mgetgroups: remove dependency on realloc-gnu
57688         The dependency violates the comment in realloc-gnu, which
57689         says that tests can't depend on realloc-gnu; some tests depend
57690         on mgetgroups, so mgetgroups can't depend on realloc-gnu.
57691         Problem reported by Daniel Richard G. in
57692         <http://lists.gnu.org/r/bug-gnulib/2013-10/msg00056.html>.
57693         * lib/mgetgroups.c (mgetgroups): Don't call realloc (NULL, 0).
57694         * modules/mgetgroups (Depends-on): Depend on realloc-posix,
57695         not realloc-gnu.
57697 2013-10-12  Paul Eggert  <eggert@cs.ucla.edu>
57699         regex-tests: port to HP-UX 11.11
57700         Problem reported by Daniel Richard G. in
57701         <http://lists.gnu.org/r/bug-gnulib/2013-10/msg00052.html>.
57702         * modules/regex-tests (test_regex_LDADD): Add LIBTHREAD, LIB_PTHREAD.
57704 2013-10-10  Paul Eggert  <eggert@cs.ucla.edu>
57706         verify: document some 'assume' pitfalls
57707         * doc/verify.texi (Compile-time Assertions):
57708         Mention that 'assume (E)' can sometimes slow things down.
57709         Use CHAR_MAX + 1, not UCHAR_MAX + 1.
57711 2013-10-10  Eric Blake  <eblake@redhat.com>
57713         strtoumax: fix typo in previous commit.
57714         * modules/strtoumax (Depends-on): Fix typo.
57715         * modules/strtoimax (Depends-on): Likewise.
57717 2013-10-10  Paul Eggert  <eggert@cs.ucla.edu>
57719         strtoumax: port to Solaris 8
57720         This problem was introduced in the recent HP-UX patch.
57721         Reported by Tom G. Christensen in
57722         <http://lists.gnu.org/r/bug-gnulib/2013-10/msg00037.html>.
57723         * modules/strtoumax (Depends-on): Test HAVE_STRTOUMAX
57724         and REPLACE_STRTOUMAX rather than ac_cv_func_strtoumax.
57726 2013-10-09  Paul Eggert  <eggert@cs.ucla.edu>
57728         strtoimax, strtoumax: port to HP-UX 11.11
57729         Problem reported by Daniel Richard G. in
57730         <http://lists.gnu.org/r/bug-gnulib/2013-10/msg00023.html>.
57731         * lib/inttypes.in.h (strtoumax): Replace strtoumax if
57732         REPLACE_STRTOUMAX, thus treating it consistently with strtoimax.
57733         * m4/inttypes.m4 (gl_INTTYPES_H_DEFAULTS): Add default for
57734         REPLACE_STRTOUMAX.
57735         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX):
57736         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX):
57737         Replace the function if defined as a macro but not as a function.
57738         * modules/inttypes-incomplete (inttypes.h): Substitute
57739         REPLACE_STRTOUMAX.
57740         * modules/strtoumax (configure.ac): Replace strtoumax if
57741         REPLACE_STRTOUMAX.
57743 2013-10-08  Paul Eggert  <eggert@cs.ucla.edu>
57745         strtoimax: port to HP-UX 11.11
57746         Problem reported by Daniel Richard G.
57747         * lib/strtoimax.c (Strtoimax, Strtol, Strtoll): New macros.
57748         (strtoimax, strtol, strtoll) [UNSIGNED]: Remove, since
57749         they might clash with inttypes.h.
57751 2013-10-06  Paul Eggert  <eggert@cs.ucla.edu>
57753         New module 'count-trailing-zeros'.
57754         * MODULES.html.sh: Mention it.
57755         * lib/count-trailing-zeros.c, lib/count-trailing-zeros.h:
57756         * m4/count-trailing-zeros.m4, modules/count-trailing-zeros:
57757         * modules/count-trailing-zeros-tests:
57758         * tests/test-count-trailing-zeros.c:
57759         New files.
57761         count-leading-zeros: port to MSC; support types wider than 64 bits
57762         The ideas behind the MSC port are stolen from Emacs.
57763         * lib/count-leading-zeros.h:
57764         Don't include verify.h: it's no longer needed, as types wider than
57765         64 bits are now supported.
57766         (COUNT_LEADING_ZEROS): New arg MSC_BUILTIN, for better
57767         performance with MSC.  All uses changed.  Do not assume that TYPE
57768         has at most 64 bits.
57769         (count_leading_zeros_32): Assume 0 < X < 2**32, for speed.
57770         All uses changed.  Fold the subtraction from 31 into the table.
57772         count-one-bits: port to MSC; support types wider than 64 bits
57773         The ideas behind the MSC port are stolen from Emacs.
57774         * lib/count-one-bits.c (popcount_support) [_MSC_VER]: New variable.
57775         * lib/count-one-bits.h: Include limits.h, for CHAR_BIT.
57776         Don't include verify.h: it's no longer needed, as types wider than
57777         64 bits are now supported.
57778         (COUNT_ONE_BITS_GENERIC): New macro.
57779         (popcount_supported) [_MSC_VER]: New inline function.
57780         (COUNT_ONE_BITS): Use it.  New arg MSC_BUILTIN, for better
57781         performance with MSC.  All uses changed.  Do not assume that TYPE
57782         has at most 64 bits.
57783         * modules/count-one-bits (Depends-on): Do not depend on 'verify'.
57785 2013-10-06  Andrew Borodin  <aborodin@vmail.ru>
57787         mountlist: fix resource leak with MOUNTED_INTERIX_STATVFS
57788         * lib/mountlist.c (read_file_system_list): fix leak of directory
57789         streams in case of #ifdef MOUNTED_INTERIX_STATVFS.
57791 2013-10-06  Paul Eggert  <eggert@cs.ucla.edu>
57793         tests: improve diagnostic when an assertion fails
57794         * tests/macros.h (ASSERT): Report the assertion that failed.
57796 2013-10-02  Paul Eggert  <eggert@cs.ucla.edu>
57798         verify: new macro 'assume'
57799         This is taken from Emacs, and should be generally useful.
57800         * doc/verify.texi (assume): Document it.
57801         * lib/verify.h (assume): New macro.
57802         (__has_builtin): Expand to 0 if not defined.
57804 2013-09-26  Eric Blake  <eblake@redhat.com>
57806         dup2, dup3: work around another cygwin crasher
57807         * m4/dup2.m4 (gl_FUNC_DUP2): Expose the bug.
57808         * m4/dup3.m4 (gl_FUNC_DUP3): Likewise.
57809         * tests/test-dup2.c (main): Likewise.
57810         * lib/dup2.c (rpl_dup2): Use setdtablesize to avoid it.
57811         * lib/dup3.c (dup3): Likewise.
57812         * doc/posix-functions/dup2.texi (dup2): Document it.
57813         * doc/glibc-functions/dup3.texi (dup3): Likewise.
57815         getdtablesize: work around cygwin issue
57816         * m4/getdtablesize.m4 (gl_FUNC_GETDTABLESIZE): Detect problem.
57817         * modules/getdtablesize (configure.ac): Build replacement.
57818         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set up a witness.
57819         * modules/unistd (Makefile.am): Expose the witness.
57820         * lib/unistd.in.h (getdtablesize): Declare replacement.
57821         * lib/getdtablesize.c (rpl_getdtablesize): Work around it.
57822         * tests/test-getdtablesize.c (main): Test it.
57823         * doc/glibc-functions/getdtablesize.texi (getdtablesize): Document it.
57825 2013-09-25  Mats Erik Andersson  <gnu@gisladisker.se>
57827         pmccabe2html: escaping of special characters
57828         Escape all '<', '>', and '&' in HTML output.
57829         * build-aux/pmccabe2html (html_fnc): Call gsub()
57830         instead of sub() to capture all '<', '>', and '&'.
57831         Neither of '<' and '>' is special in a regexp,
57832         so first arguments to gsub() are corrected. Also,
57833         in replacement strings, ampersand must be escaped.
57834         Finally, '&' must be handled first, then '<' and '>'.
57836 2013-09-24  Eric Blake  <eblake@redhat.com>
57838         manywarnings: enable nicer gcc warning messages
57839         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Older gcc requires
57840         some -f options for optimal warnings.
57842 2013-09-21  Jim Meyering  <meyering@fb.com>
57844         timespec: use the new TIMESPEC_RESOLUTION in a few more places
57845         * lib/timespec-add.c (timespec_add): Also replace 999999999
57846         with TIMESPEC_RESOLUTION - 1.
57847         * lib/timespec-sub.c (timespec_sub): Likewise.
57849 2013-09-23  Paul Eggert  <eggert@cs.ucla.edu>
57851         warnings: port --enable-gcc-warnings to Solaris Studio 12.3
57852         Problem reported by Dagobert Michelsen via Eric Blake in
57853         <http://lists.gnu.org/r/bug-gnulib/2013-09/msg00052.html>.
57854         * m4/warnings.m4 (gl_COMPILER_OPTION_IF): Use AC_LINK_IFELSE,
57855         not AC_COMPILE_IFELSE.
57857 2013-09-23  Eric Blake  <eblake@redhat.com>
57859         configmake: support new --runstatedir option
57860         * m4/configmake.m4 (gl_CONFIGMAKE_PREP): Substitute runstatedir
57861         even if autoconf was too old to provide the command line option.
57862         * modules/configmake (Makefile.am): Propagate it to .h file.
57864 2013-09-22  Paul Eggert  <eggert@cs.ucla.edu>
57866         ctype, string: depend on extern-inline
57867         This is needed to complete the recent OS X fixes.
57868         Also, fix related documentation as suggested by Eric Blake.
57869         * doc/posix-functions/isalnum.texi, doc/posix-functions/isalpha.texi:
57870         * doc/posix-functions/isascii.texi, doc/posix-functions/iscntrl.texi:
57871         * doc/posix-functions/isdigit.texi, doc/posix-functions/isgraph.texi:
57872         * doc/posix-functions/islower.texi, doc/posix-functions/isprint.texi:
57873         * doc/posix-functions/ispunct.texi, doc/posix-functions/isspace.texi:
57874         * doc/posix-functions/isupper.texi, doc/posix-functions/isxdigit.texi:
57875         * doc/posix-functions/toascii.texi, doc/posix-functions/tolower.texi:
57876         * doc/posix-functions/toupper.texi:
57877         List the 'ctype' gnulib module.
57878         * doc/posix-functions/strcat.texi, doc/posix-functions/strcpy.texi:
57879         * doc/posix-functions/strncpy.texi:
57880         List the 'string' gnulib module.
57881         * modules/memcpy, modules/memmove, modules/memset (Depends-on):
57882         Add string.
57883         * modules/ctype, modules/string (Depends-on): Add extern-inline.
57885 2013-09-19  Pádraig Brady  <P@draigBrady.com>
57887         userspec: support optional parameters to parse_user_spec()
57888         * lib/userspec.c (parse_user_spec): If the GID param is NULL,
57889         then avoid group processing and treat the full spec as a user.
57890         (parse_with_separator): Allow the USERNAME and GROUPNAME to
57891         be optional params (NULL), in which case they're ignored.
57893 2013-09-19  Paul Eggert  <eggert@cs.ucla.edu>
57895         timespec: new function make_timespec, and new constants
57896         * lib/timespec.h: Incorporate recent changes on the Emacs trunk.
57897         (TIMESPEC_RESOLUTION, LOG10_TIMESPEC_RESOLUTION): New constants.
57898         (make_timespec): New function.
57899         * lib/dtotimespec.c (dtotimespec):
57900         * lib/timespec-add.c (timespec_add):
57901         * lib/timespec-sub.c (timespec_sub):
57902         * lib/utimens.c (validate_timespec):
57903         * lib/utimensat.c (rpl_utimensat):
57904         Use these new constants and functions.
57906         stdio: OS X port of putc_unlocked + extern inline
57907         * lib/stdio.in.h (putc_unlocked): #undef on problematic Apple platforms.
57908         * doc/posix-functions/putc_unlocked.texi:
57909         * doc/posix-functions/putchar_unlocked.texi:
57910         Document this portability problem.
57912         signal: OS X port of sigaddset etc. + extern inline
57913         * lib/signal.in.h (sigaddset, sigdelset, sigemptyset, sigfillset)
57914         (sigismember): #undef on problematic Apple platforms.
57915         * doc/posix-functions/sigaddset.texi:
57916         * doc/posix-functions/sigdelset.texi:
57917         * doc/posix-functions/sigemptyset.texi:
57918         * doc/posix-functions/sigfillset.texi:
57919         * doc/posix-functions/sigismember.texi:
57920         Document this portability problem.
57922         extern-inline: do not always suppress extern inline on OS X
57923         * m4/extern-inline.m4 (gl_EXTERN_INLINE): Suppress the use of
57924         extern inline on Apple only if the particular compile-time
57925         configuration is known to have the problem.
57926         (_GL_EXTERN_INLINE_APPLE_BUG): New private macro, to implement this.
57927         (_GL_EXTERN_INLINE_IN_USE): New macro, intended for use by
57928         other Gnulib modules.
57930         extern-inline: document fixes for ctype and wctype macros
57931         * doc/posix-functions/isalnum.texi, doc/posix-functions/isalpha.texi:
57932         * doc/posix-functions/isascii.texi, doc/posix-functions/isblank.texi:
57933         * doc/posix-functions/iscntrl.texi, doc/posix-functions/isdigit.texi:
57934         * doc/posix-functions/isgraph.texi, doc/posix-functions/islower.texi:
57935         * doc/posix-functions/isprint.texi, doc/posix-functions/ispunct.texi:
57936         * doc/posix-functions/isspace.texi, doc/posix-functions/isupper.texi:
57937         * doc/posix-functions/iswalnum.texi, doc/posix-functions/iswalpha.texi:
57938         * doc/posix-functions/iswcntrl.texi, doc/posix-functions/iswctype.texi:
57939         * doc/posix-functions/iswdigit.texi, doc/posix-functions/iswgraph.texi:
57940         * doc/posix-functions/iswlower.texi, doc/posix-functions/iswprint.texi:
57941         * doc/posix-functions/iswpunct.texi, doc/posix-functions/iswspace.texi:
57942         * doc/posix-functions/iswupper.texi, doc/posix-functions/iswxdigit.texi:
57943         * doc/posix-functions/isxdigit.texi, doc/posix-functions/toascii.texi:
57944         * doc/posix-functions/memcpy.texi, doc/posix-functions/memmove.texi:
57945         * doc/posix-functions/memset.texi, doc/posix-functions/stpcpy.texi:
57946         * doc/posix-functions/stpncpy.texi, doc/posix-functions/strcat.texi:
57947         * doc/posix-functions/strcpy.texi, doc/posix-functions/strncat.texi:
57948         * doc/posix-functions/strncpy.texi:
57949         * doc/posix-functions/tolower.texi, doc/posix-functions/toupper.texi:
57950         * doc/posix-functions/towlower.texi, doc/posix-functions/towupper.texi:
57951         Document that Gnulib fixes portability problems with these
57952         functions on OS X 10.8 and earlier when called from plain inline
57953         or extern inline functions.
57955 2013-09-17  Kevin Cernekee  <cernekee@gmail.com>
57957         fflush, freadahead, fseeko: Fix for Android
57958         Suggested by Bruno Haible in:
57959         <http://lists.gnu.org/r/bug-gnulib/2012-01/msg00306.html>
57960         * lib/stdio-impl.h: Use local __sfileext definition.
57962 2013-09-17  Mats Erik Andersson  <gnu@gisladisker.se>
57964         pmccabe2html: Portability to other awk versions.
57965         The functions systime() and strftime() are available
57966         in Gawk only.  Properly close two HTML-tags 'style'
57967         and 'span'.
57968         * build-aux/pmccabe2html (BEGIN): Store timing
57969         strings in EPOCH_TIME and CHRONOS_TIME.  Replace
57970         systime() in HTML_COMMENT.
57971         (html_header): Correctly close tag 'style'.
57972         (END): Replace strftime() by CHRONOS_TIME.  Close
57973         tag 'span' correctly, not as 'div'.
57975 2013-09-17  Mats Erik Andersson  <gnu@gisladisker.se>  (tiny change)
57977         getgroups: statement without effect
57978         * lib/getgroups.c (rpl_getgroups) [HAVE_GETGROUPS]:
57979         Change equality conditional to expected assignment.
57981 2013-09-09  Eric Blake  <eblake@redhat.com>
57983         glob: fix compilation
57984         * lib/glob.in.h (__THROW): Fix missing line in previous commit.
57986 2013-09-07  Eric Blake  <eblake@redhat.com>
57988         glob: fix build for platforms without __THROW
57989         * lib/glob.in.h (__THROW): Add definition again.
57991 2013-09-04  Anton Ovchinnikov  <revolver112@gmail.com>  (tiny change)
57993         regex-quote: fix buffer access out of bounds
57994         http://lists.gnu.org/r/bug-gnulib/2013-09/msg00001.html
57995         * lib/regex-quote.c (regex_quote_spec_pcre):
57996         Fix typo that resulted in an out-of-bounds read.
57998 2013-09-04  Eric Blake  <eblake@redhat.com>
58000         glob: avoid -Wattribute warnings on glibc
58001         * lib/glob.c (next_brace_sub, prefix_array, collated_compare): Use
58002         __THROWNL, not __THROW, on static functions.
58003         * lib/glob.in.h (__THROW): Adjust...
58004         (__THROWNL): ...accordingly.
58006 2013-08-28  Paul Eggert  <eggert@cs.ucla.edu>
58008         headers: check that _GL_INLINE_HEADER_BEGIN is defined
58009         Suggested by Bruce Korb in:
58010         http://lists.gnu.org/r/bug-gnulib/2013-08/msg00070.html
58011         * doc/extern-inline.texi (extern inline):
58012         Suggest checking that _GL_INLINE_HEADER_BEGIN is defined.
58013         * lib/acl-internal.h, lib/argp-fmtstream.h, lib/argp.h:
58014         * lib/binary-io.h, lib/bitrotate.h, lib/count-leading-zeros.h:
58015         * lib/count-one-bits.h, lib/eealloc.h, lib/execinfo.in.h:
58016         * lib/gethrxtime.h, lib/gl_list.h, lib/gl_oset.h, lib/gl_xlist.h:
58017         * lib/gl_xoset.h, lib/gl_xsublist.h, lib/glthread/cond.h:
58018         * lib/glthread/thread.h, lib/math.in.h, lib/mbchar.h, lib/mbfile.h:
58019         * lib/mbiter.h, lib/mbuiter.h, lib/openat.h, lib/pipe-filter-aux.h:
58020         * lib/priv-set.h, lib/pthread.in.h, lib/savewd.h, lib/se-context.in.h:
58021         * lib/se-selinux.in.h, lib/sig-handler.h, lib/stat-time.h:
58022         * lib/sys_socket.in.h, lib/timespec.h, lib/u64.h, lib/unistd.in.h:
58023         * lib/utimens.h, lib/wctype.in.h, lib/xalloc.h, lib/xsize.h:
58024         * lib/xtime.h:
58025         Check that _GL_INLINE_HEADER_BEGIN is defined.
58027 2013-08-29  Pádraig Brady  <P@draigBrady.com>
58029         bootstrap: remove the --version requirement from ancillary tools
58030         * build-aux/bootstrap (check_exists): A new refactored function to
58031         determine if a command exists.
58032         (find_tool): Use the new function which does not require the
58033         --version option to be supported.
58034         (check_versions): Use the new function.
58036 2013-08-26  Simon Josefsson  <simon@josefsson.org>
58038         gc: support HMAC-SHA256 and HMAC-SHA512.
58039         * lib/gc.h: Add gc_hmac_sha256 and gc_hmac_sha512.
58040         * lib/gc-libgcrypt.c (gc_hmac_sha256, gc_hmac_sha512): New
58041         functions.
58042         (gc_hmac_md5): Use symbolic constant.
58043         * lib/gc-gnulib.c: Include hmac.h for HMAC-SHA256/512 too.
58044         (gc_hmac_sha256, gc_hmac_sha512): New functions.
58045         * lib/hmac.h: Add hmac_sha256 and hmac_sha512 prototypes.
58046         * m4/sha256.m4: Protect against empty expansion.
58047         * m4/sha512.m4: Likewise.
58048         * lib/hmac-sha256.c: New file.
58049         * lib/hmac-sha512.c: Likewise.
58050         * m4/gc-hmac-sha256.m4: Likewise.
58051         * m4/gc-hmac-sha512.m4: Likewise.
58052         * m4/gc-sha256.m4: Likewise.
58053         * m4/gc-sha512.m4: Likewise.
58054         * modules/crypto/gc-hmac-sha256: Likewise.
58055         * modules/crypto/gc-hmac-sha256-tests: Likewise.
58056         * modules/crypto/gc-hmac-sha512: Likewise.
58057         * modules/crypto/gc-hmac-sha512-tests: Likewise.
58058         * modules/crypto/hmac-sha256: Likewise.
58059         * modules/crypto/hmac-sha256-tests: Likewise.
58060         * modules/crypto/hmac-sha512: Likewise.
58061         * modules/crypto/hmac-sha512-tests: Likewise.
58062         * tests/test-gc-hmac-sha256.c: Likewise.
58063         * tests/test-gc-hmac-sha512.c: Likewise
58064         * tests/test-hmac-sha256.c: Likewise.
58065         * tests/test-hmac-sha512.c: Likewise
58067 2013-08-24  Daiki Ueno  <ueno@gnu.org>
58069         * m4/intl.m4: Update from gettext-0.18.3.1, which fixes a misuse
58070         of AC_CHECK_DECLS.
58072 2013-08-23  Paul Eggert  <eggert@cs.ucla.edu>
58074         selinux-at: omit unnecessary include
58075         * lib/selinux-at.c: Don't include dosname.h; not needed, since
58076         this source file doesn't use its macros, and subsidiary files that
58077         use the macros already include it.
58079 2013-08-21  Eric Blake  <eblake@redhat.com>
58081         d-ino: avoid false negative on symlink
58082         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use lstat.
58083         Reported by Stephane Chazelas.
58085 2013-08-12  Mike Miller  <mtmiller@ieee.org>  (tiny change)
58087         bootstrap: port to OpenBSD sed
58088         * build-aux/bootstrap (insert_if_absent): Port to OpenBSD sed which
58089         does not interpret `-' as a file argument to mean stdin.
58091 2013-08-15  Eric Blake  <eblake@redhat.com>
58093         warnings: minor optimization
58094         * m4/warnings.m4 (gl_COMPILER_OPTION_IF): Use fewer processes.
58096         warnings: check -Wfoo rather than -Wno-foo
58097         * m4/warnings.m4 (gl_COMPILER_OPTION_IF): If name begins with
58098         -Wno-, test if the compiler recognizes the positive form instead.
58100 2013-08-15  Karl Berry  <karl@gnu.org>
58102         * config/srclist-update: add option "doclicense" to placate
58103         pulling *.texi files from Emacs.  Write terse usage
58104         documentation at the top.
58106 2013-08-13  Paul Eggert  <eggert@cs.ucla.edu>
58108         xvasprintf-tests: port to GCC with hardening flags
58109         * tests/test-xvasprintf.c (test_xasprintf): Pass another arg to
58110         xasprintf, to pacify GCC.  Reported by Santiago Vila in:
58111         http://lists.gnu.org/r/bug-diffutils/2013-08/msg00002.html
58113 2013-08-11  Paul Eggert  <eggert@cs.ucla.edu>
58115         fpending: port to recent Cygwin change to stdio_ext.h
58116         Reported by LRN in
58117         <http://lists.gnu.org/r/bug-gnulib/2013-08/msg00028.html>.
58118         * lib/fpending.h: Don't worry about HAVE_DECL___FPENDING;
58119         just declare __fpending unless it's a macro.
58120         A duplicate decl shouldn't hurt.
58121         * m4/fpending.m4 (gl_FUNC_FPENDING): Check that an __fpending
58122         call compiles and links, instead of separately checking for
58123         decl and lib function.
58124         * modules/fpending (configure-ac):
58125         Adjust to fpending.m4's renaming of shell variable.
58127 2013-08-10  Paul Eggert  <eggert@cs.ucla.edu>
58129         sys_time: port to OpenBSD
58130         * lib/sys_time.in.h: Simply delegate to the system's header
58131         in the BSDish cases as well.  Problem reported by Mike Miller in
58132         <http://lists.gnu.org/r/bug-gnulib/2013-08/msg00016.html>.
58133         * tests/test-sys_select.c, tests/test-sys_time.c (verify_tv_sec_type):
58134         Allow platforms like 64-bit OpenBSD where timeval's tv_sec is
58135         wider than time_t.
58137 2013-08-09  Pádraig Brady  <P@draigBrady.com>
58139         bootstrap: support checksum utils having -c but not --status
58140         * build-aux/bootstrap: Only look for sha1sum if updating po files.
58141         Add sha1 to the list of supported checksum utils since it's now
58142         supported through adjustments below.
58143         (update_po_files): Remove the use of --status
58144         in a way that will suppress all error messages, but since this is
58145         only used to minimize updates, it shouldn't cause an issue.
58146         Exit early if there is a problem updating the po file checksums.
58147         (find_tool): Remove the check for --version support as this
58148         is optional as per commit 86186b17.  Don't even check for the
58149         presence of the command as if that is needed, it's supported
58150         through configuring prerequisites in bootstrap.conf.
58151         Prompt that when a tool isn't found, one can define an environment
58152         variable to add to the hardcoded search list.
58154 2013-08-05  Jim Meyering  <meyering@fb.com>
58156         regex: port to non-glibc/lock-using systems
58157         Since 29-05-2013 commit, 55ba71f4, compilation on a non-glibc
58158         system with GNULIB_LOCK would fail due to absence of the
58159         included "glthread/lock.h".  This would affect any package
58160         for which the "lock" module is used only by the regex module,
58161         and not explicitly used.
58162         * m4/regex.m4 (gl_PREREQ_REGEX): Require gl_GLIBC21.
58163         * modules/regex (Depends-on) [!GLIBC && $ac_use_included_regex]:
58164         Add a dependency on the "lock" module.
58166 2013-07-20  Daiki Ueno  <ueno@gnu.org>
58168         localecharset: make locale_charset thread-safe on Mac OS X
58169         * lib/localcharset.c (locale_charset) [DARWIN7]: Use MB_CUR_MAX_L
58170         instead of MB_CUR_MAX.
58172 2013-07-20  Daiki Ueno  <ueno@gnu.org>
58174         gettext: update to version 0.18.3
58175         * m4/intl.m4, m4/po.m4: Update from gettext-0.18.3.  In particular,
58176         require AC_PROG_SED to allow user to specify custom sed command when
58177         generating en@quot PO file.
58179 2013-07-18  Werner Lemberg  <wl@gnu.org>  (tiny change)
58181         bootstrap: use correct source when copying build-aux files
58182         * build-aux/bootstrap (gnulib_extra_files): This variable is
58183         relative to upstream gnulib layout, not downstream.
58185 2013-07-17  Paul Eggert  <eggert@cs.ucla.edu>
58187         tmpdir: fix bug in VMS port
58188         * lib/tmpdir.c (path_search) [__VMS]: Never add slash.
58189         See Steven M. Schweda in
58190         <http://lists.gnu.org/r/bug-gnulib/2013-07/msg00026.html>.
58192 2013-07-15  Paul Eggert  <eggert@cs.ucla.edu>
58194         tmpdir: port to VMS, to // != /, and to long dirs
58195         * lib/tmpdir.c (__libc_secure_getenv) [!_LIBC]: Rename from
58196         __secure_getenv, so that we're more like the glibc version.
58197         All uses changed.
58198         (path_search): Don't put slash after directory if __VMS.
58199         Problem reported by Steven M. Schweda in
58200         <http://lists.gnu.org/r/bug-gnulib/2013-07/msg00019.html>.
58201         Simplify code to add slash; no need for a loop.
58202         Do not remove trailing slash from "//".
58203         Do not assume dlen <= INT_MAX.
58205 2013-07-09  Paul Eggert  <eggert@cs.ucla.edu>
58207         regex: port to --with-included-regex --enable-gcc-warnings non-threaded
58208         * lib/regex_internal.h (lock_fini, lock_lock): Rework to avoid
58209         gcc warnings in the non-threaded case.  Reported by Charlie Brown in
58210         <http://lists.gnu.org/r/bug-gnulib/2013-07/msg00015.html>.
58212         accept4, dup3, pipe2: port to Cygwin
58213         Problem reported for Emacs by Ken Brown in <http://bugs.gnu.org/14821>.
58214         * lib/accept4.c (accept4) [O_BINARY]:
58215         * lib/dup3.c (dup3) [O_BINARY]:
58216         * lib/pipe2.c (pipe2) [O_BINARY]:
58217         Use set_binary_mode, not setmode.
58218         * lib/pipe2.c [!GNULIB_BINARY_IO]: Include binary-io.h.
58219         * modules/binary-io (Depends-on): Remove module indicator.
58220         These last two bits undo the previous change to pipe2 and binary-io.
58222 2013-07-09  Pádraig Brady  <P@draigBrady.com>
58224         mountlist: add support for deallocating returned list entries
58225         * lib/mountlist.c (free_mount_entry): A new exported function
58226         to deallocate a mount list entry.
58227         (read_file_system_list): Refactor to use the new deallocation function.
58228         Suggested by Anton Ovchinnikov.
58230 2013-07-07  Paul Eggert  <eggert@cs.ucla.edu>
58232         stdalign, verify: port to FreeBSD 9.1, to C11, and to C++11
58233         Problem reported by Ulrich Mueller in <http://bugs.gnu.org/14812>.
58234         * lib/stdalign.in.h (_Alignas, _Alignof):
58235         Port to FreeBSD 9.1, and to C11 and C++11.
58236         (_Alignas): Also support ICC.
58237         * lib/verify.h (_Static_assert): Undef if <stddef.h> defines it.
58238         * m4/stdalign.m4 (gl_STDALIGN_H): Port to ICC and to C++11.
58240 2013-07-06  Paul Eggert  <eggert@cs.ucla.edu>
58242         fnmatch: don't goto over declaration
58243         * lib/fnmatch_loop.c (FCT): Hoist local up one level, to avoid
58244         undefined behavior for goto over a declaration.
58245         Problem reported by Charlie Brown in
58246         <http://lists.gnu.org/r/bug-gnulib/2013-07/msg00009.html>.
58248         pipe2: decouple from binary-io a bit
58249         This is for Emacs, which needs pipe2 but not binary-io.
58250         * lib/pipe2.c [!GNULIB_BINARY_IO]: Don't include binary-io.h.
58251         * modules/binary-io (Depends-on): Add module indicator.
58253 2013-07-03  Eric Blake  <eblake@redhat.com>
58255         mgetgroups: relax license to LGPLv2+
58256         * modules/getugroups (License): Change from GPLv3+.
58257         * modules/mgetgroups (License): Likewise.
58258         * modules/getgroups (License): Change from LGPLv3+.
58260         xalloc-oversized: relax license to LGPLv2+
58261         * modules/xalloc-oversized (License): Change from GPLv3+.
58263         nproc: relax license to LGPLv2+
58264         * modules/nproc (License): Change from LGPLv3+.
58266         bootstrap: honor --no-git
58267         * build-aux/bootstrap: Don't even try to use git when user is
58268         pointing to a static checkout.
58270 2013-06-23  Paul Eggert  <eggert@cs.ucla.edu>
58272         ignore-value: port to gcc -pedantic
58273         * lib/ignore-value.h (ignore_value):
58274         Port to gcc -pedantic, by using __extension__.
58275         Reindent as per usual gnulib style nowadays.
58276         Simplify GCC version check.
58278 2013-06-21  Paul Eggert  <eggert@cs.ucla.edu>
58280         extern-inline: port to gcc -std=c89
58281         * m4/extern-inline.m4 (gl_EXTERN_INLINE):
58282         Do not use __gnu_inline__ if pedantic and pre-C99.
58284 2013-06-18  Paul Eggert  <eggert@cs.ucla.edu>
58286         doc: document extern-inline
58287         * doc/extern-inline.texi: New file.
58288         * doc/gnulib.texi (alloca-opt): Include it.
58289         * m4/extern-inline.m4: Move some comments to documentation,
58290         and others closer to what they describe.
58292         doc: chatter less
58293         * doc/Makefile (NEWEST_GNULIB_TEXI_FILE): New macro.
58294         (updated-stamp): Use it.  This causes 'make' to output just
58295         one file name rather than zillions.
58297         fflush, fseeko: port to musl cross-compiles
58298         * lib/fseeko.c (fseeko): Assume that fflushing stdin works if
58299         on some implementation that (1) is not known to be buggy,
58300         (2) claims conformance to POSIX.1-2008 or later, and (3) is being
58301         cross-compiled to so we can't easily check for lack of
58302         conformance.  This is for cross-compiling to musl.
58303         Reported by Rich Felker in
58304         <http://lists.gnu.org/r/bug-gnulib/2013-06/msg00043.html>.
58305         * m4/fclose.m4 (gl_FUNC_FCLOSE):
58306         * m4/fflush.m4 (gl_FUNC_FFLUSH):
58307         * m4/fseeko.m4 (gl_FUNC_FSEEKO):
58308         Adjust to above change.
58309         * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): Set gl_cv_func_fflush_stdin
58310         to 'cross', not to 'no', when cross-compiling.  AC_DEFINE
58311         FUNC_FFLUSH_STDIN to 1, 0, -1 if fflushing stdin is known to work,
58312         known not to work, or unknown.
58314 2013-06-15  Paul Eggert  <eggert@cs.ucla.edu>
58316         msvc-inval: port to mingw-w64
58317         * lib/msvc-inval.c (gl_msvc_invalid_parameter_handler):
58318         Use __cdecl, not cdecl, for mingw-w64.  Reported by LRN in
58319         <http://lists.gnu.org/r/bug-gnulib/2013-06/msg00039.html>.
58321 2013-06-11  Paul Eggert  <eggert@cs.ucla.edu>
58323         getcwd-lgpl: port to Tru64
58324         * lib/getcwd-lgpl.c: Include <stdlib.h>, for malloc etc.
58325         Problem reported by Steven M. Schweda in
58326         <http://lists.gnu.org/r/bug-gzip/2013-06/msg00010.html>.
58328         tests: port large-fd POSIX spawn tests to OS X
58329         Problem reported by Daiki Ueno in
58330         <http://lists.gnu.org/r/bug-gnulib/2013-06/msg00031.html>.
58331         * tests/test-posix_spawn_file_actions_addclose.c:
58332         * tests/test-posix_spawn_file_actions_adddup2.c:
58333         * tests/test-posix_spawn_file_actions_addopen.c:
58334         Include <limits.h>, for OPEN_MAX, if available.
58335         (big_fd): New static function.
58336         (main): Use it.
58338 2013-06-04  Bernhard Voelker  <mail@bernhard-voelker.de>
58340         tests/nap.h: use an adaptive delay to avoid ctime update issues
58341         The recent change in nap.h (5191133e) decreased the probability of lost
58342         races to about a third, however such problems could still be observed
58343         in virtual machines and openSUSE's OBS.
58344         Before, nap() detected the needed time once empirically and then used
58345         that delay (together with a small correction multiplier) in further
58346         calls.  This problem has been reported and discussed several times,
58347         including guesses about possible kernel issues:
58348         https://lists.gnu.org/r/bug-gnulib/2013-04/msg00071.html
58349         http://lists.gnu.org/r/coreutils/2012-03/msg00088.html
58350         https://lists.gnu.org/r/bug-gnulib/2011-11/msg00226.html
58351         http://bugs.gnu.org/12820
58352         https://lists.gnu.org/r/bug-gnulib/2010-11/msg00113.html
58353         https://lists.gnu.org/r/bug-gnulib/2009-11/msg00007.html
58354         Now, nap() avoids the race alltogether by verifying on a reference
58355         file whether a timestamp difference has happened.
58356         * tests/nap.h (nap_fd): Define file descriptor variable for the
58357         witness file.
58358         (nap_works): Change return value to bool.  Change passing
58359         the old file's status by value instead of by reference as this function
58360         does no longer update that timestamp; rename the function argument from
58361         st to old_st.  Remove the local variables cdiff and mdiff because that
58362         function now returns true/false instead of the precise delay.
58363         (guess_delay): Remove function.
58364         (clear_tmp_file): Add new function to close and unlink the witness file.
58365         (nap): Instead of re-using the delay which has been calculated during
58366         the first call, avoid the race by actually verifying that a timestamp
58367         difference can be observed on the current file system.  Use an adaptive
58368         approach for the delay to minimize execution time.  Assert that the
58369         maximum delay is <= ~2 seconds, more precisely sum(2^n) from 0 to 30
58370         = 2^31 - 1 = 2.1s.
58371         Use atexit to call clear_tmp_file when the process terminates.
58373 2013-06-02  Paul Eggert  <eggert@cs.ucla.edu>
58375         sig2str: port to C++
58376         * lib/sig2str.h (sig2str, str2sig): Declare as extern "C".
58377         Reported by Daniel J Sebald in
58378         <http://lists.gnu.org/r/bug-gnulib/2013-06/msg00000.html>.
58380 2013-05-30  Eric Blake  <eblake@redhat.com>
58382         docs: mention cygwin shortcoming in <sys/un.h>
58383         * doc/posix-headers/sys_un.texi (sys/un.h): Mention problem.
58385         vasnprintf: silence mingw compiler warning
58386         * lib/vasnprintf.c (VASNPRINTF): Avoid unused variable warning.
58388 2013-05-29  Paul Eggert  <eggert@cs.ucla.edu>
58390         c-ctype, regex, verify: port to gcc -std=c90 -pedantic
58391         Avoid constructions that are rejected by gcc -std=c90 -pedantic.
58392         This fixes a porting bug I recently reintroduced in regex, and
58393         some other instances that I discovered while testing the fix.
58394         * lib/c-ctype.h [__STRICT_ANSI__]: Avoid ({ ... }).
58395         * lib/regcomp.c (utf8_sb_map) [__STRICT_ANSI__]: Avoid [0 ... N] = E.
58396         * lib/regex_internal.h [!_LIBC && GNULIB_LOCK]: Do not use a macro
58397         with an empty argument if this is a pedantic pre-C99 GCC.
58398         * lib/verify.h: Do not use _Static_assert if this is a pedantic
58399         pre-C11 GCC.
58401         regex: adapt to locking regime instead of depending on pthread
58402         Instead of depending on pthread, adapt to whatever thread
58403         modules are in use.  Problem reported by Ludovic Courtès in
58404         <http://lists.gnu.org/r/bug-gnulib/2013-05/msg00082.html>
58405         and by Mats Erik Andersson in
58406         <http://lists.gnu.org/r/bug-gnulib/2013-05/msg00100.html>.
58407         * lib/regex_internal.h (lock_define, lock_init, lock_fini):
58408         Support either the 'lock' module, or the 'pthread' module, or
58409         no module.
58410         (lock_lock, lock_unlock): New macros.
58411         * lib/regexec.c (regexec, re_search_stub): Use the new macros.
58412         * modules/lock, modules/pthread (configure.ac): Add module indicator.
58413         * modules/regex (Depends-on): Remove pthread.
58415 2013-05-22  Eric Blake  <eblake@redhat.com>
58417         getgroups: document portability issues
58418         * doc/glibc-functions/initgroups.texi (initgroups): Mention
58419         multithread safety.
58420         * doc/posix-functions/getpwuid.texi (getpwuid): Likewise.
58421         * doc/posix-functions/getpwuid_r.texi (getpwuid_r): Likewise.
58422         * doc/glibc-functions/getgrouplist.texi (getgrouplist): Mention
58423         getugroups.
58424         * doc/posix-functions/getgroups.texi (getgroups): Mention
58425         multithread safety and mgetgroups.
58427 2013-05-22  Bernhard Voelker  <mail@bernhard-voelker.de>
58429         test-lchown, test-chown: also skip test if chown fails with EPERM
58430         * tests/test-lchown.h (test_lchown): Add EPERM to the condition to
58431         skip this test, to handle FAT file systems.
58432         * tests/test-chown.h (test_chown): Likewise.
58434 2013-05-19  Paul Eggert  <eggert@cs.ucla.edu>
58436         regex: fix dfa race in multithreaded uses
58437         Problem reported by Ludovic Courtès in
58438         <http://lists.gnu.org/r/bug-gnulib/2013-05/msg00058.html>.
58439         * lib/regex_internal.h (lock_define, lock_init, lock_fini):
58440         New macros.  All uses of __libc_lock_define, __libc_lock_init
58441         changed to use the first two of these.
58442         (__libc_lock_lock, __libc_lock_unlock): New macros, for
58443         non-glibc platforms.
58444         (struct re_dfa_t): Define the lock unconditionally.
58445         * lib/regexec.c (regexec, re_search_stub): Remove some now-incorrect
58446         '#ifdef _LIBC"s.
58447         * modules/regex (Depends-on): Add pthread, if we use the
58448         included regex.
58450         * lib/regcomp.c: Do actions that are not needed for glibc,
58451         but may be needed elsewhere.
58452         (regfree, re_compile_internal): Destroy the lock.
58453         (re_compile_internal): Check for lock-initialization failure.
58455         malloca: port to compilers that reject size-zero arrays
58456         This fixes a bug introduced in my previous patch.
58457         * lib/malloca.c (struct preliminary_header): Use an int
58458         rather than a character array of size int; that's simpler.
58459         (struct header): Remove, replacing with ...
58460         (union header): New type.  This avoids the need for declaring a
58461         character array of size zero, which is not allowed on some platforms.
58462         All uses changed.
58464 2013-05-18  Paul Eggert  <eggert@cs.ucla.edu>
58466         parse-datetime, tests: don't use "string" + int
58467         Recent versions of 'clang' complain about C source code that
58468         uses expressions of the form '"string literal" + integer',
58469         I guess on the theory that it's confusing for readers who are
58470         used to C++.  On those grounds I suppose it's OK to make this
58471         minor style change.
58472         * lib/parse-datetime.y (parse_datetime):
58473         * tests/test-fchdir.c (main):
58474         * tests/test-snprintf-posix.h (test_function):
58475         * tests/test-snprintf.c (main):
58476         * tests/test-vasnprintf-posix.c (test_function):
58477         * tests/test-vasnprintf.c (test_function):
58478         * tests/test-vsnprintf.c (main):
58479         * tests/unistdio/test-ulc-asnprintf1.h (test_function):
58480         Rewrite '"str" + E' to '&"str"[E]'.
58482 2013-05-17  Alexandre Duret-Lutz  <adl@lrde.epita.fr>
58484         argmatch: port to C++
58485         * lib/argmatch.h [__cplusplus]: Add extern "C".
58487         argp: typo fix
58488         * lib/argp-help.c: Typo in comment.
58490 2013-05-15  Paul Eggert  <eggert@cs.ucla.edu>
58492         manywarnings: update for GCC 4.8.0
58493         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
58494         Add -Waggressive-loop-optimizations, -Wreturn-local-addr, which
58495         are new to GCC 4.8.  Remove -Wformat=2, -Wmissing-format-attribute,
58496         -Wmissing-noreturn, as they are duplicates of other warnings.
58497         Remove -Wunreachable-code, as it is removed in GCC 4.8 and
58498         was documented to be flaky in earlier versions of GCC.
58500         spawn-tests, sys_socket-tests, sys_wait-tests: port to clang
58501         * tests/test-spawn.c (main):
58502         * tests/test-sys_socket.c (main):
58503         * tests/test-sys_wait.c (main):
58504         Don't have a switch value that isn't covered by a case.
58506         getaddrinfo-tests: port --enable-gcc-warnings to clang
58507         * tests/test-getaddrinfo.c (simple):
58508         Avoid casts from looser to stricter-aligned pointers.
58510         thread: port --enable-gcc-warnings to clang
58511         * lib/glthread/thread.h [__clang__ && USE_POSIX_THREADS_WEAK]:
58512         Include <signal.h>, to pacify a warning about pthread_sigmask.
58514         stdio: use __REDIRECT for fwrite, fwrite_unlocked
58515         * lib/stdio.in.h (fwrite):
58516         When working around bug 11959, use __REDIRECT rather than '#define
58517         fwrite(...) ... fwrite (...) ...'.  This is a more-targeted way to
58518         fix the -Wunused-value issue with clang, and it works with GCC too.
58519         Problem with targeting reported by Eric Blake in
58520         <http://lists.gnu.org/r/bug-gnulib/2013-05/msg00067.html>.
58521         (fwrite_unlocked): Treat like fwrite.  I ran into this issue while
58522         debugging the fwrite issue.
58524         stdio: port --enable-gcc-warnings to clang
58525         * lib/stdio.in.h (fwrite) [__clang__]: Ignore -Wunused-value entirely,
58526         since the GCC workaround for fwrite does not pacify clang.
58528         sig2str: port --enable-gcc-warnings to clang
58529         * lib/sig2str.c (sig2str): Avoid warning about unused printf argument.
58531         obstack: port --enable-gcc-warnings to clang
58532         * lib/obstack.h (obstack_ptr_grow_fast, obstack_int_grow_fast):
58533         Avoid casts from looser to stricter-aligned pointers.
58535         memchr2: port --enable-gcc-warnings to clang
58536         * lib/memchr2.c (memchr2):
58537         Avoid casts from looser to stricter-aligned pointers.
58539         mbsstr: port --enable-gcc-warnings to clang
58540         * lib/mbsstr.c (knuth_morris_pratt_multibyte):
58541         Avoid casts from looser to stricter-aligned pointers.
58543         malloca: port --enable-gcc-warnings to clang
58544         * lib/malloca.c (struct header): New member 'magic', to avoid casts.
58545         (mmalloca): Avoid casts from looser to stricter-aligned pointers.
58547         inttostr: port --enable-gcc-warnings to clang
58548         * lib/anytostr.c [__clang__]: Ignore -Wtautological-compare.
58550         warnings: port to clang
58551         Problem reported by Daniel P. Berrange via Eric Blake in
58552         <http://lists.gnu.org/r/bug-gnulib/2013-05/msg00055.html>.
58553         * m4/warnings.m4 (gl_UNKNOWN_WARNINGS_ARE_ERRORS): New macro.
58554         (gl_WARN_ADD): Use it.
58556 2013-05-11  Jim Meyering  <meyering@fb.com>
58558         quotearg: do not read beyond end of buffer
58559         * lib/quotearg.c (quotearg_buffer_restyled): Do not read beyond the
58560         end of an ARG for which no length was specified.  With an N-byte
58561         quote string, (e.g., N is 3 in the fr_FR.UTF-8 locale), this function
58562         would read N-2 bytes beyond ARG's trailing NUL.  This was triggered
58563         via coreutils' misc/sort-debug-keys.sh test and detected by running
58564         the test against a binary compiled with gcc-4.8.0's -fsanitize=address.
58565         * tests/test-quotearg-simple.c (main): Add a test to trigger the bug.
58566         * modules/quotearg-simple-tests (Files): Add tests/zerosize-ptr.h.
58567         Introduced via the 2000-01-15 commit, c4b7f3f8, "Quote multibyte
58568         characters correctly."
58570 2013-05-11  Daiki Ueno  <ueno@gnu.org>
58572         lock: work around pthread recursive mutexes bug in Mac OS X 10.6
58573         * m4/lock.m4: Don't define HAVE_PTHREAD_MUTEX_RECURSIVE if the
58574         compilation target is Mac OS X 10.6.
58575         Problem reported by parafin and Andoni Morales in
58576         <http://savannah.gnu.org/bugs/?37844> and
58577         <http://lists.gnu.org/r/bug-gettext/2013-05/msg00007.html>.
58579 2013-05-11  Paul Eggert  <eggert@cs.ucla.edu>
58581         mkdir-p: remove assumptions about umask and mode
58582         * lib/mkdir-p.c (make_dir_parents): Do not assume that the current
58583         umask is 0, or that MODE is a subset of MODE_BITS.
58585 2013-05-10  Eric Blake  <eblake@redhat.com>
58587         maint.mk: catch more abuse of HAVE_DECL in syntax-check
58588         * top/maint.mk (sc_prohibit_defined_have_decl_tests): Relax regex.
58590 2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
58592         deps: require Automake >= 1.9.6 in generated Makefile fragments
58594         That is the same minimal version required in the DEPENDENCIES file.
58595         Moreover, the old code generated a requirement of Automake >= 1.5,
58596         and that is an insanely outdated version.
58598         * gnulib-tool: Bump minimal version requirement in AUTOMAKE_OPTIONS.
58599         * tests/havelib/rpathlx/Makefile.am: Likewise.
58600         * tests/havelib/rpathly/Makefile.am: Likewise.
58601         * tests/havelib/rpathlyx/Makefile.am: Likewise.
58602         * tests/havelib/rpathlz/Makefile.am: Likewise.
58603         * tests/havelib/rpathlzyx/Makefile.am: Likewise.
58604         * tests/havelib/rpathx/Makefile.am: Likewise.
58605         * tests/havelib/rpathy/Makefile.am: Likewise.
58606         * tests/havelib/rpathz/Makefile.am: Likewise.
58608 2013-05-08  Eric Blake  <eblake@redhat.com>
58610         bootstrap: AC_INIT may have more than four parameters
58611         * build-aux/bootstrap (extract_package_name): Correctly extract
58612         non-empty tarname field.  Avoid range in regex.
58613         Based on a report by Sami Kerola <kerolasa@iki.fi>.
58615 2013-05-07  Paul Eggert  <eggert@cs.ucla.edu>
58617         qacl: port to MS-Windows port of GNU Emacs
58618         * lib/acl-errno-valid.c (acl_errno_valid) [ENOTSUP == ENOSYS]:
58619         Omit the duplicate ENOTSUP case.  Needed for the MS-Windows
58620         port of GNU Emacs.  Problem reported by Eli Zaretskii in
58621         <http://bugs.gnu.org/14295#14>.
58623 2013-05-07  Mike Frysinger  <vapier@gentoo.org>
58625         acl: include quote.h
58626         * lib/copy-acl.c: Include quote.h.
58627         * lib/set-acl.c: Likewise.
58629 2013-05-06  Mike Frysinger  <vapier@gentoo.org>
58631         fchownat, renameat, unlinkat: update statat dependencies
58632         These modules use statat and lstatat, not fstatat; so depend on
58633         the statat module, which was split out recently from fstatat.
58634         * modules/fchownat, modules/unlinkat: Change fstatat to statat.
58635         * modules/renameat: Likewise.  Also delete fstat.
58636         URL: http://bugs.gentoo.org/468790
58638 2013-05-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
58640         Assume gnulib is checked out from Git, not CVS
58642         In fact, access to the gnulib repository through CVS has been
58643         disabled, or more precisely, got broken and was never restored; see:
58644         <http://lists.gnu.org/r/bug-gnulib/2013-05/msg00008.html>
58646         Note that support for CVS is not removed completely and unthinkingly
58647         by this change: only support for CVS checkouts of gnulib itself is
58648         removed.  For example, the 'bootstrap' script still cater to .cvsingore
58649         files and CVS directories, for the benefit of those poor gnulib clients
58650         still stuck with CVS.  Ditto for the 'gnulib-tool' script itself.
58652         * gnulib-tool: Simplify accordingly.
58653         * posix-modules: Likewise.
58654         * MODULES.html.sh: Likewise.
58655         * doc/gnulib.texi: No longer mention the decommissioned CVS gnulib
58656         repository.
58657         * doc/gnulib-intro.texi: Likewise.
58658         * doc/gnulib-readme.texi: Likewise.
58659         * doc/gnulib-tool.texi: In the examples and explanations, refer to a
58660         sample '.gitignore' file rather than a sample '.cvsignore'.
58661         * NEWS: Update.
58662         * m4/extensions.m4: While at it, remove a comment mistakenly referring
58663         to "CVS Autoconf" rather than "git Autoconf".
58665 2013-04-30  Paul Eggert  <eggert@cs.ucla.edu>
58667         utimensat-tests, etc.: try to fix some races
58668         Problem reported by Bernhard Voelker in
58669         <http://lists.gnu.org/r/bug-gnulib/2013-04/msg00071.html>.
58670         I don't know whether this patch fixes that race condition, but it
58671         fixes *some* race conditions, so it should be a win.
58672         * modules/chown-tests (Depends-on):
58673         * modules/fchownat-tests (Depends-on):
58674         * modules/fdutimensat-tests (Depends-on):
58675         * modules/futimens-tests (Depends-on):
58676         * modules/lchown-tests (Depends-on):
58677         * modules/stat-time-tests (Depends-on):
58678         * modules/utimens-tests (Depends-on):
58679         * modules/utimensat-tests (Depends-on):
58680         Depend on nanosleep, not usleep.
58681         * modules/chown-tests (test_chown_LDADD):
58682         * modules/lchown-tests (test_lchown_LDADD):
58683         * modules/stat-time-tests (test_stat_time_LDADD):
58684         New macro.
58685         * modules/fchownat-tests (test_fchownat_LDADD):
58686         * modules/fdutimensat-tests (test_fdutimensat_LDADD):
58687         * modules/futimens-tests (test_futimens_LDADD):
58688         * modules/utimens-tests (test_utimens_LDADD):
58689         * modules/utimensat-tests (test_utimensat_LDADD):
58690         Add $(LIB_NANOSLEEP).
58691         * modules/stat-time-tests (Files): Add tests/nap.h.
58692         * tests/nap.h: Include <limits.h>, for INT_MAX.
58693         (lt_mtime): Remove.
58694         (diff_timespec): New function.
58695         (get_stat): Rename from get_mtime.  All callers changed.
58696         (nap_works): Determine the needed delay by inspecting the
58697         file system's timestamp jumps; this should be more reliable.
58698         Look at both mtime and ctime, and take the maximum of the two jumps.
58699         (nap_works, guess_delay):
58700         Return a nanosecond count, not a microsecond count.
58701         All callers changed.
58702         (nap_works, nap): Use nanosleep, not usleep.  Check for nanosleep
58703         failure.
58704         (nap): Multiply the guess by 1.125, to accommodate the case where
58705         the file system's clock is a bit slower than nanosleep's clock.
58706         * tests/test-stat-time.c (BASE): New macro.
58707         Include nap.h.
58708         (nap): Remove; nap.h now defines this.  This removes a duplicate
58709         implementation of 'nap'.
58711         utimens, utimensat: work around Solaris UTIME_OMIT bug
58712         Solaris 11.1 and Solaris 10 have the same UTIME_OMIT bug that
58713         Linux kernel 2.6.32 does.  Work around it in the same way.
58714         * doc/posix-functions/futimens.texi (futimens):
58715         * doc/posix-functions/utimensat.texi (utimensat): Document the bug.
58716         * lib/utimens.c (fdutimens, lutimens):
58717         * lib/utimensat.c (rpl_utimensat): Work around the bug.
58719         gettext: now it's your responsibility to add -I$(top_builddir)/intl
58720         Formerly, it was your responsibility to do this for all Makefile.ams
58721         other than Gnulib's.  Now it's your responsibility to do it for
58722         Gnulib's Makefile.am, too.
58723         * NEWS: Document this.
58724         * modules/gettext (AM_CPPFLAGS): Don't append -$(top_builddir)/intl.
58726         acl: include errno.h to get errno
58727         Reported by Daiki Ueno in
58728         <http://lists.gnu.org/r/bug-gnulib/2013-04/msg00073.html>.
58729         * lib/copy-acl.c, lib/set-acl.c: Include errno.h.
58731 2013-04-29  Paul Eggert  <eggert@cs.ucla.edu>
58733         tests: don't assume getdtablesize () <= 10000000
58734         * modules/cloexec-tests:
58735         * modules/dup2-tests:
58736         * modules/dup3-tests:
58737         * modules/nonblocking-tests:
58738         * modules/posix_spawn_file_actions_addclose-tests:
58739         * modules/posix_spawn_file_actions_adddup2-tests:
58740         * modules/posix_spawn_file_actions_addopen-tests:
58741         * modules/unistd-safer-tests:
58742         Depend on the getdtablesize module.
58743         * tests/test-cloexec.c:
58744         * tests/test-dup-safer.c:
58745         * tests/test-dup2.c:
58746         * tests/test-dup3.c:
58747         * tests/test-fcntl.c:
58748         * tests/test-nonblocking.c:
58749         * tests/test-posix_spawn_file_actions_addclose.c:
58750         * tests/test-posix_spawn_file_actions_adddup2.c:
58751         * tests/test-posix_spawn_file_actions_addopen.c:
58752         Don't assume getdtablesize () <= 10000000.
58754 2013-04-28  Paul Eggert  <eggert@cs.ucla.edu>
58756         extern-inline: work around bug in Sun c99
58757         * m4/extern-inline.m4 (_GL_INLINE, _GL_EXTERN_INLINE):
58758         Work around bug in Sun C 5.12 c99's implementation of 'inline'.
58760 2013-04-27  Paul Eggert  <eggert@cs.ucla.edu>
58762         qacl: new module, broken out from the acl module
58763         This is for GNU Emacs, which wants the acl functions but does
58764         not want 'error' invoked when they fail.
58765         * lib/acl-internal.h: Do not include error.h, quote.h.
58766         (ENOSYS, ENOTSUP): Remove; no longer needed.
58767         (ACL_NOT_WELL_SUPPORTED): Remove; replaced by acl_errno_valid.
58768         * lib/acl.h: Include <stdbool.h>.
58769         (acl_errno_valid): New function.
58770         * lib/copy-acl.c, lib/set-acl.c: Include errno,h, not acl-internal.h.
58771         * lib/copy-acl.c (qcopy_acl): Move to lib/qcopy-acl.c.
58772         * lib/set-acl.c: Rename from lib/set-mode-acl.c.
58773         (chmod_or_fchmod, qset_acl): Move to lib/qset-acl.c.
58774         (ACL_INTERNAL_INLINE): Remove; no longer needed.
58775         * lib/file-has-acl.c (file_has_acl):
58776         * lib/qcopy-acl.c (qcopy_acl):
58777         * lib/qset-acl.c (qset_acl):
58778         Use acl_errno_valid instead of ACL_NOT_WELL_SUPPORTED.
58779         * modules/acl (Files): Move lib/acl.h, lib/acl-internal.h,
58780         lib/acl_entries.c, lib/set-mode-acl.c (renamed to lib/set-acl.c),
58781         lib/file-has-acl.c, m4/acl.m4 to qacl module.
58782         Add lib/set-acl.c.
58783         (Depends-on): Move extern-inline, fstat, sys_stat to qacl module.
58784         Add qacl.
58785         (configure.ac): Move gl_FUNC_ACL to qacl module.
58786         (lib_SOURCES): Remove file-has-acl.c (moved to qacl module).
58787         Rename set-mode-acl.c to set-acl.c.
58788         * lib/acl-errno-valid.c: New file.
58789         * lib/qcopy-acl.c: New file, moved from the old lib/copy-acl.c; the
58790         copy_acl function remains in copy-acl.c.
58791         * lib/qcopy-acl.c, lib/qset-acl.c: Do not include gettext.h.
58792         (_): Remove; not needed.
58793         * lib/qset-acl.c: New file, moved from the old lib/set-mode-acl.c; the
58794         set_acl function remains in set-acl.c (renamed from set-mode-acl.c).
58795         * modules/qacl: New file, moved from the old modules/acl.
58796         (Files, lib_SOURCES): Add acl-errno-valid.c, qcopy-acl.c, qset-acl.c.
58797         Remove set-mode-acl.c, copy-acl.c.
58798         (Depends-on): Remove error, gettext-h, quote.  Add stdbool.
58800         alignof, intprops, malloca: port better to IBM's C compiler
58801         * lib/alignof.h (alignof_type) [__IBM_ALIGNOF__]: Use __alignof__.
58802         * lib/intprops.h (_GL_HAVE___TYPEOF__) [__IBM_TYPEOF__]: Now 1.
58803         * lib/malloca.h (sa_alignof): [__IBM_ALIGNOF__]: Use __alignof__.
58805 2013-04-25  Daiki Ueno  <ueno@gnu.org>
58807         wctype-h: fix gettext link error on mingw
58808         Reported by Josue Andrade Gomes and Takayuki Tsunakawa in
58809         <https://lists.gnu.org/r/bug-gettext/2013-03/msg00086.html>.
58810         * lib/wctype.in.h [__MINGW32__]: Include <ctype.h> before defining
58811         rpl_towupper and rpl_towupper.
58813 2013-04-11  Dmitry V. Levin  <ldv@altlinux.org>
58815         regex-tests, regex: allow glibc re_search behavior
58816         * tests/test-regex.c (main): In test for glibc bug 15078, reformat
58817         re_search input data to make the multi-character collating element
58818         in it clearly visible, and treat re_search return code 0 as valid.
58819         * m4/regex.m4 (gl_REGEX): Likewise.
58821 2013-03-30  Paul Eggert  <eggert@cs.ucla.edu>
58823         stdalign: doc fix
58824         * doc/posix-headers/stdalign.texi (stdalign.h):
58825         Gnulib doesn't support '_Alignof expr'.
58827 2013-03-29  Paul Eggert  <eggert@cs.ucla.edu>
58829         stdalign: port to stricter ISO C11
58830         ISO C11 says that _Alignof's operand must be a parenthesized type.
58831         Problem reported by Eli Zaretskii in
58832         <http://lists.gnu.org/r/emacs-devel/2013-03/msg00960.html>.
58833         * doc/posix-headers/stdalign.texi (stdalign.h): Document this.
58834         * m4/stdalign.m4 (gl_STDALIGN_H): Don't use _Alignof (expr).
58836 2013-03-21  Paul Eggert  <eggert@cs.ucla.edu>
58838         sys_select, sys_time: port 2013-01-30 Solaris 2.6 fix to Cygwin
58839         Problem reported by Marco Atzeri in
58840         <http://lists.gnu.org/r/bug-gnulib/2013-03/msg00000.html>.
58841         * lib/sys_select.in.h [HAVE_SYS_SELECT_H && _CYGWIN_SYS_TIME_H]:
58842         Simply delegate to the system <sys/select.h> in this case too.
58843         Also, pay attention to _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H only
58844         if OSF/1, since otherwise Cygwin breaks, and it doesn't seem to
58845         be needed on Solaris either.
58846         * lib/sys_time.in.h [_CYGWIN_SYS_TIME_H]:
58847         Simply delegate to the system <sys/time.h> in this case.
58849 2013-03-19  Karl Berry  <karl@gnu.org>
58851         * build-aux/gnupload: check for erroneous (with gnupload) use of
58852         ftp-upload.gnu.org, tweak help.
58854 2013-03-19  Paul Eggert  <eggert@cs.ucla.edu>
58856         copy-file, rpmatch: fix problems found by cppcheck
58857         Reported by Arno Onken in
58858         <http://lists.gnu.org/r/bug-gnulib/2013-03/msg00069.html>.
58859         * lib/rpmatch.c (try): Fix memory leak.
58860         * lib/copy-file.c: Include "ignore-value.h".
58861         (qcopy_file_preserving): Ignore chown value.
58862         * modules/copy-file (Depends-on): Add ignore-value.
58864 2013-01-27  Jim Meyering  <jim@meyering.net>
58866         prefix-gnulib-mk: give better diagnostics
58867         * build-aux/prefix-gnulib-mk: Don't just "die".
58868         Give better diagnostics upon failure.
58870 2013-03-13  Paul Eggert  <eggert@cs.ucla.edu>
58872         putenv: port to Solaris 10
58873         * lib/putenv.c (_unsetenv, putenv): Use HAVE_DECL__PUTENV, not
58874         HAVE__PUTENV.  Solaris 10 has a _putenv that's not declared and
58875         is not what is wanted here.
58876         * m4/putenv.m4 (gl_PREREQ_PUTENV): Check for _putenv's
58877         declaration, not for its existence.
58879 2013-03-12  Paul Eggert  <eggert@cs.ucla.edu>
58881         mktime: fix configure typo
58882         * m4/mktime.m4 (gl_FUNC_MKTIME): Fix typo in previous change.
58884 2013-03-12  Eric Blake  <eblake@redhat.com>
58886         regex-tests: skip UTF-8 test on mingw
58887         * modules/regex-tests (Depends-on): Add localcharset.
58888         * tests/test-regex.c (main): Use it to skip test on mingw.
58890 2013-03-11  Eric Blake  <eblake@redhat.com>
58892         tests: make it easier to bypass alarm time in debugger
58893         * tests/test-file-has-acl.c (main): Allow gdb to override alarm.
58894         * tests/test-memmem.c (main): Likewise.
58895         * tests/test-passfd.c (main): Likewise.
58896         * tests/test-ptsname.c (main): Likewise.
58897         * tests/test-ptsname_r.c (main): Likewise.
58898         * tests/test-strcasestr.c (main): Likewise.
58899         * tests/test-strstr.c (main): Likewise.
58901         regex: port to mingw's recent addition of undeclared alarm
58902         * doc/posix-functions/alarm.texi (alarm): Document that alarm
58903         exists but still doesn't work in newer mingw.
58904         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Check for alarm declaration,
58905         not existence.  Ensure SIGALRM is not trapped.
58906         * m4/mktime.m4 (gl_FUNC_MKTIME): Likewise.
58907         * m4/regex.m4 (gl_REGEX): Likewise.
58908         * m4/remainderf.m4 (gl_FUNC_REMAINDERF_WORKS): Likewise.
58909         * tests/test-regex.c (main): Use correct probe for alarm.
58911         putenv: avoid compilation warning on mingw
58912         * lib/putenv.c (_unsetenv): Protect variable declaration.
58913         (putenv): Fix indentation.
58915 2013-03-11  Gary V. Vaughan  <gary@gnu.org>
58917         unistd: don't prevent Tru64 Unix from using gnulib strtod.
58918         * lib/unistd.in.h: be careful not to include un-needed system
58919         stdlib.h from here, because that prevents gnulib stdlib.h from
58920         defining rpl_strtod correctly.
58922 2013-03-09  Gary V. Vaughan  <gary@gnu.org>
58924         vasprintf-posix-tests: allow rounding 1.51 to 1, per the previous
58925         changesets, but for the 'precision 0' test.
58926         * tests/test-vasprintf-posix.c (test_function): Don't insist on
58927         round-to-even, since POSIX says rounding is implementation-defined
58928         and OS X 10.8.2 rounds 1.51 to 1 here.
58930         vasprintf-posix-tests: allow rounding 1.5 to 1, per the previous
58931         changeset.
58932         * tests/test-vasprintf-posix.c (test_function): Don't insist on
58933         round-to-even, since POSIX says rounding is implementation-defined
58934         and OS X 10.8.2 rounds 1.5 to 1 here.
58936 2013-03-08  Paul Eggert  <eggert@cs.ucla.edu>
58938         vasnprintf-posix-tests: allow rounding 1.5 to 1
58939         * tests/test-vasnprintf-posix.c (test_function): Don't insist on
58940         round-to-even, since POSIX says rounding is implementation-defined
58941         and OS X 10.8.2 rounds 1.5 to 1 here.  Reported by Gary V. Vaughan in
58942         <http://lists.gnu.org/r/bug-gnulib/2013-03/msg00019.html>.
58944         bootstrap: port to FreeBSD
58945         * build-aux/bootstrap (bootstrap_sync): Port sh -c usage to shells
58946         that treat '--' differently.  Reported by Mats Erik Andersson in
58947         <http://lists.gnu.org/r/bug-gnulib/2013-03/msg00012.html>.
58949 2013-03-08  Gary V. Vaughan  <gary@gnu.org>
58951         regex: rename remaining __attribute calls to __attribute__.
58952         2012-02-25 changed definition of __attribute, but left some uses
58953         unchanged, preventing compilation of regex module on most non-gcc
58954         environments.
58955         * lib/regcomp.c (re_set_fastmap, seek_collating_symbol_entry)
58956         (lookup_collation_sequence_value, build_range_exp)
58957         (build_collating_symbol): Set attributes with newly renamed
58958         __attribute__ decorator.
58959         * lib/regex_internal.c (re_string_peek_byte_case)
58960         (re_node_set_compare, re_node_set_contains): Likewise.
58961         * lib/regexec.c (acquire_init_state_context): Likewise.
58963 2013-03-06  Bruno Haible  <bruno@clisp.org>
58965         execute: Revert last change, but use a different condition.
58966         * lib/execute.c (nonintr_close, nonintr_open): Reintroduce, but only
58967         on Windows.
58969 2013-03-05  Eric Blake  <eblake@redhat.com>
58971         execute: drop dead code
58972         * lib/execute.c (nonintr_close, nonintr_open): Delete.
58974 2013-03-04  Paul Eggert  <eggert@cs.ucla.edu>
58976         non-recursive-gnulib-prefix-hack: port coreutils 8.21 to HP NonStop
58977         * m4/non-recursive-gnulib-prefix-hack.m4
58978         (gl_NON_RECURSIVE_GNULIB_PREFIX_HACK): Don't mess with ALLOCA.
58979         Problem reported for HP NonStop + coreutils 8.21 by Joachim Schmitz in
58980         <http://bugs.gnu.org/10305#237>.
58982 2013-03-04  Eric Blake  <eblake@redhat.com>
58984         test-getsockopt: avoid compiler warning
58985         * tests/test-getsockopt.c (includes): Ensure close is declared.
58987 2013-03-02  Bruno Haible  <bruno@clisp.org>
58989         sys_types: Avoid autoconf warning about gl_SYS_TYPES_H.
58990         * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Define through AC_DEFUN_ONCE.
58992 2013-03-02  Bruno Haible  <bruno@clisp.org>
58994         gettext: Update to version 0.18.2.
58995         * m4/intl.m4, m4/po.m4: Update from gettext-0.18.2. In particular:
58996         2012-12-07  Stefano Lattarini  <stefano.lattarini@gmailcom>
58997                 * intl.m4, po.m4: Bump requirement in AC_PREREQ to 2.60.
58999 2013-02-25  Paul Eggert  <eggert@cs.ucla.edu>
59001         regex: merge patches from libc
59003         2013-02-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
59004         * lib/regex_internal.h (__attribute__): Rename from __attribute.
59005         All uses changed.
59006         (bitset_not, bitset_merge, bitset_mask, re_string_char_size_at)
59007         (re_string_wchar_at, re_string_elem_size_at):
59008         Mark function as possibly unused.
59010         2013-02-12  Andreas Schwab  <schwab@suse.de>  [BZ #11561]
59011         * lib/regcomp.c (parse_bracket_exp) [_LIBC]: When looking up collating
59012         elements compare against the byte sequence of it, not its name.
59014 2013-02-21  Paul Eggert  <eggert@cs.ucla.edu>
59016         putenv: port better to native Windows
59017         * lib/putenv.c [(_WIN32 || __WIN32__) && ! __CYGWIN__]:
59018         Define WIN32_LEAN_AND_MEAN and include <windows.h>.
59019         (_unsetenv): Use _putenv if available.
59020         (putenv): Temporarily set NAME=' ' rather than NAME='x' as that's
59021         a bit less likely to cause damage.
59022         (putenv) [(_WIN32 || __WIN32__) && ! __CYGWIN__]:
59023         Fix the wrong value with SetEnvironmentVariable.
59024         (putenv) [!HAVE__PUTENV]: Simplify and match the HAVE__PUTENV
59025         code better.
59027 2013-02-20  Paul Eggert  <eggert@cs.ucla.edu>
59029         regex: ignore old-style-definition warnings
59030         * lib/regex.c: Add pragma to ignore these warnings.
59031         Problem reported for GNU tar by Pavel Raiskup.
59033 2013-02-19  Paul Eggert  <eggert@cs.ucla.edu>
59035         getcwd: support coreutils better
59036         Like strtod, getcwd incorrectly referred to HAVE_RAW_DECL_GETCWD,
59037         but this might not be correct in coreutils, which disables
59038         the raw decl checks.  Problem reported by Nagendra in
59039         <http://bugs.gnu.org/10305#192>.
59040         * lib/getcwd.c (__getcwd): Do not depend on HAVE_RAW_DECL_GETCWD.
59041         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
59042         Test the getcwd function, not any macro, since getcwd.c wants the
59043         function.
59044         * m4/getcwd.m4 (gl_FUNC_GETCWD):
59045         Don't define HAVE_MINIMALLY_WORKING_GETCWD if the code doesn't
59046         compile, as might happen if there's a macro but no function.
59048         strtod: support coreutils better
59049         * lib/strtod.c (underlying_strtod): Just invoke the underlying strtod.
59050         HAVE_RAW_DECL_STRTOD might not be correct in coreutils, which
59051         disables the raw decl checks.  This assumes there is an underlying
59052         strtod, but that's a safe assumption these days.
59053         (HAVE_RAW_DECL_STRTOD): Remove; no longer used.
59055         mountlist: port to HP NonStop
59056         Reported by Joachim Schmitz in
59057         <http://lists.gnu.org/r/bug-gnulib/2013-02/msg00084.html>.
59058         * lib/mountlist.c (hasmntopt) [!HAVE_HASMNTOPT]: New function.
59059         (MNT_IGNORE) [MNTOPT_IGNORE]: Use it.
59061 2013-02-18  Paul Eggert  <eggert@cs.ucla.edu>
59063         extern-inline: avoid compilation error with HP-UX cc
59064         Reported by Richard Lloyd in
59065         <http://lists.gnu.org/r/bug-texinfo/2013-02/msg00030.html>.
59066         * m4/extern-inline.m4 (_GL_INLINE, _GL_EXTERN_INLINE):
59067         Suppress extern inline with HP-UX cc.  This should be safe,
59068         though it may hurt performance.  Perhaps someone with some HP-UX
59069         experience can come up with a higher-performance fix.
59071 2013-02-14  Paul Eggert  <eggert@cs.ucla.edu>
59073         putenv: fix heap corruption with mixed putenv/_putenv
59074         Problem reported by Michael Goffioul in
59075         <http://lists.gnu.org/r/bug-gnulib/2013-02/msg00061.html>.
59076         * lib/putenv.c (putenv) [HAVE__PUTENV]:
59077         Rely on _putenv to allocate the new environment.
59078         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
59079         * modules/putenv (configure.ac): Use it.
59081 2013-02-11  Paul Eggert  <eggert@cs.ucla.edu>
59083         unsetenv etc.: port to Solaris 11 + GNU Emacs
59084         * lib/canonicalize-lgpl.c, lib/getaddrinfo.c, lib/getdelim.c:
59085         * lib/glob.c, lib/random_r.c, lib/setenv.c, lib/tsearch.c:
59086         * lib/unsetenv.c (_GL_ARG_NONNULL): Define before including <config.h>.
59087         GNU Emacs's <config.h> includes <stdlib.h> (which is not a great
59088         idea but is too painful to fix right now), and without this gnulib
59089         change <stdlib.h> was defining _GL_ARG_NONNULL incorrectly when
59090         compiling unsetenv.c on Solaris 11.  Fix the problem for
59091         unsetenv.c, and fix other similar occurrences.
59093 2013-02-09  Paul Eggert  <eggert@cs.ucla.edu>
59095         secure_getenv: fix C++ declaration typo
59096         * lib/stdlib.in.h (secure_getenv): Fix typo with return type
59097         in _GL_CXXALIAS_SYS macro.  Reported by John W. Eaton in
59098         <http://lists.gnu.org/r/bug-gnulib/2013-02/msg00057.html>.
59100 2013-02-08  Paul Eggert  <eggert@cs.ucla.edu>
59102         careadlinkat: stop exporting careadlinkatcwd
59103         Only Emacs used it directly, and Emacs no longer needs it.
59104         * NEWS: Document this simplification.
59105         * lib/areadlink.c (careadlinkatcwd): Move here from careadlinkat.c,
59106         and make it static.  Include <stdlib.h>, for abort, and unistd.h,
59107         for readlink.
59108         * lib/careadlinkat.c (careadlinkatcwd): Move to areadlink.c.
59109         Don't include stdlib.h; no longer needed.
59110         * lib/careadlinkat.h (careadlinkatcwd): Remove decl.
59111         * lib/relocwrapper.c: Adjust comment to match new dependencies.
59112         * modules/areadlink (Depends-on): Add readlink.
59113         (Maintainer): Add self.
59114         * modules/careadlinkat (Depends-on): Remove readlink.
59116         extensions: port better to HP-UX
59117         This is merged from git Autoconf.
59118         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS):
59119         On hosts that need _XOPEN_SOURCE, define it when configuring, too,
59120         so that it's compatible with the value used when compiling.
59122         openpty: fix bug where HAVE_OPENPTY is mistakenly 1
59123         Problem reported by Mats Erik Andersson in
59124         <http://lists.gnu.org/r/bug-gnulib/2013-02/msg00051.html>.
59125         * m4/pty.m4 (gl_FUNC_OPENPTY): Define HAVE_OPENPTY when the
59126         openpty function exists, not merely when we intend to replace it.
59127         This corrects the 2013-01-31 patch, which mistakenly defined
59128         HAVE_OPENPTY even on hosts that lacked it.
59130 2013-02-07  Paul Eggert  <eggert@cs.ucla.edu>
59132         secure_getenv: fix include typo
59133         * lib/secure_getenv.c: Include config.h.  Somehow I forgot!
59135         secure_getenv: port better to FreeBSD and Solaris
59136         * lib/secure_getenv.c [!HAVE___SECURE_GETENV]:
59137         Include unistd.h if HAVE_ISSETUGID, otherwise define a dummy issetugid.
59138         (secure_getenv) [!HAVE___SECURE_GETENV]: Use getenv if not issetugid.
59139         This works better on BSDish platforms.
59140         * m4/secure_getenv.m4 (gl_PREREQ_SECURE_GETENV):
59141         Test for issetugid if __secure_getenv is missing.
59143 2013-02-06  Paul Eggert  <eggert@cs.ucla.edu>
59145         extensions: port better to MINIX 3, HP-UX, autoheader 2.62
59146         Some of these changes are merged in from git Autoconf.
59147         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS):
59148         When deciding whether to define _XOPEN_SOURCE, inspect the
59149         preprocessor macro __hpux instead of the more-heavyweight
59150         operation of requiring AC_CANONICAL_HOST.  Define _NETBSD_HOST on
59151         MINIX, for MINIX 3.  Use USE_SYSTEM_EXTENSIONS, not __EXTENSIONS__,
59152         as the key for __EXTENSIONS__.
59154         unistd: avoid namespace pollution on non-glibc systems
59155         * lib/unistd.in.h: #define __need_getopt before including <getopt.h>.
59156         This avoids namespace pollution on non-glibc systems, by causing
59157         gnulib unistd.h to behave more like glibc unistd.h.  I also hope
59158         that this fixes a bug on FreeBSD, reported by Mats Erik Andersson in
59159         <http://lists.gnu.org/r/bug-gnulib/2013-02/msg00027.html>.
59161 2013-02-04  Paul Eggert  <eggert@cs.ucla.edu>
59163         tmpdir: use secure_getenv
59164         * lib/tmpdir.c (__secure_getenv) [!LIBC]:
59165         Define to secure_getenv, not getenv.
59166         * m4/tmpdir.m4 (gt_TMPDIR): Don't check for __secure_getenv,
59167         as that's now secure_getenv's job.
59168         * modules/tmpdir (Depends-on): Add secure_getenv.
59170         tempname: use secure_getenv
59171         * lib/tempname.c (__secure_getenv) [!_LIBC]:
59172         Define to secure_getenv, not getenv.
59173         * modules/tempname (Depends-on):
59174         Add secure_getenv.
59176         secure_getenv: new module
59177         * MODULES.html.sh (Extra functions based on ANSI C 89):
59178         Add secure_getenv.
59179         * doc/glibc-functions/secure_getenv.texi: New file.
59180         * doc/gnulib.texi: Include it.
59181         * lib/secure_getenv.c, m4/secure_getenv.m4, modules/secure_getenv:
59182         New files.
59183         * lib/stdlib.in.h (secure_getenv): New decl.
59184         * m4/stdlib_h.m4 (gl_STDLIB_H, gl_STDLIB_H_DEFAULTS):
59185         * modules/stdlib (stdlib.h):
59186         Add secure_getenv checks.
59188 2013-02-03  Paul Eggert  <eggert@cs.ucla.edu>
59190         getcwd: break fdopendir + save_cwd recursive loop (Bug#13516)
59191         Reported for OS X 10.8.2 by Assaf Gordon in
59192         <http://bugs.gnu.org/13516>.
59193         * lib/getcwd.c (HAVE_OPENAT_SUPPORT): Do not define if
59194         !HAVE_OPENAT && !HAVE_FDOPENDIR.
59195         * m4/getcwd-abort-bug.m4: Reformat to match test-getcwd.c
59196         so that they can be kept in sync more easily.  Avoid PATH_MAX
59197         test on the Hurd.  Sync from test-getcwd.c for errno tests after
59198         mkdir or chdir failure.
59199         * tests/test-getcwd.c (HAVE_OPENAT_SUPPORT): New macro, from
59200         lib/getcwd.c.
59201         (test_abort_bug): Do not test for the deep directory bug unless we
59202         have openat support.  Avoid PATH_MAX test on the Hurd.
59204         regex-tests, regex: fix bug: memset undeclared
59205         * tests/test-regex.c: Don't include regex.h twice.  Include
59206         string.h, to declare memset.  Christensen's report also mentioned
59207         this issue.
59208         * m4/regex.m4 (gl_REGEX): Keep test program more in sync with
59209         test-regex.c, to avoid future problems like this.  Remove
59210         AC_INCLUDES_DEFAULT.  Include <string.h>.  Don't include <regex.h>
59211         twice.
59213         regex-tests: fix link errors on older Solaris
59214         These need to link with @LIBINTL@ to get libintl_gettext.
59215         Problem reported by Tom G. Christensen in
59216         <http://lists.gnu.org/r/bug-gnulib/2013-02/msg00003.html>.
59217         * modules/regex-tests (test_regex_LDADD): New macro.
59219 2013-01-31  Paul Eggert  <eggert@cs.ucla.edu>
59221         regex-tests: new module
59222         * modules/regex-tests, tests/test-regex.c: New files.
59224         regex: fix off-by-one error in configure test
59225         * m4/regex.m4 (gl_REGEX): Test should return 21, not 20.
59227 2013-01-31  Eric Blake  <eblake@redhat.com>
59229         regex: avoid infinite configure test
59230         * m4/regex.m4 (gl_REGEX): Add an alarm escape hatch.
59232 2013-01-31  Reuben Thomas  <rrt@sc3d.org>
59234         openpty: fix bug where HAVE_OPENPTY wasn't defined
59235         See the thread starting at:
59236         http://lists.gnu.org/r/bug-gnulib/2013-01/msg00185.html
59237         * m4/pty.m4 (gl_FUNC_OPENPTY): Define HAVE_OPENPTY when the
59238         openpty function exists, not merely when we intend to replace it.
59240 2013-01-30  Paul Eggert  <eggert@cs.ucla.edu>
59242         sys_time: port to Solaris 2.6
59243         There is a circularity problem on Solaris 2.6, where <time.h> includes
59244         <sys/time.h> for struct timespec.  The include nesting is gnulib
59245         <time.h>, system <time.h>, gnulib <sys/time.h>, system
59246         <sys/time.h>, gnulib <sys/types.h>, system <sys/types.h>, gnulib
59247         <sys/select.h>, gnulib <signal.h>, system <sys/signal.h>, system
59248         <sys/siginfo.h>; the last, innermost file needs struct
59249         timestruc_t, which is defined in <sys/time.h>, which has not been
59250         fully parsed.  Problem reported by Tom G. Christensen in
59251         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00113.html>.
59252         * lib/sys_select.in.h: Treat Solaris 2.6's problem with
59253         <sys/time.h> and <sys/types.h> like OSF/1's similar problem.
59254         * lib/sys_time.in.h: Redo to resemble sys_select.in.h, which
59255         uses split double-inclusion guards.
59257 2013-01-29  Paul Eggert  <eggert@cs.ucla.edu>
59259         regex: test for buffer overrun
59260         * m4/regex.m4 (gl_REGEX): Add test case, by Andreas Schwab,
59261         for the just-fixed regex bug.
59263 2013-01-29  Andreas Schwab  <schwab@suse.de>
59265         regex: fix buffer overrun in regexp matcher [BZ #15078]
59266         * lib/regexec.c (extend_buffers): Add parameter min_len.
59267         (check_matching): Pass minimum needed length.
59268         (clean_state_log_if_needed): Likewise.
59269         (get_subexp): Likewise.
59271 2013-01-28  Pádraig Brady  <P@draigBrady.com>
59273         mountlist: don't consider "devtmpfs" as dummy
59274         * lib/mountlist.c (ME_DUMMY_0): Remove "devtmpfs"
59275         as there is storage associcated with it.
59277 2013-01-27  Paul Eggert  <eggert@cs.ucla.edu>
59279         futimens-tests, utimens-tests: Depend on gettext.
59280         This works around a problem introduced in my 2013-01-12 patch,
59281         which added @LIBINTL@ to these modules.
59282         * modules/futimens-tests (Depends-on):
59283         * modules/utimens-tests (Depends-on): Add gettext.
59285 2013-01-26  Eric Blake  <eblake@redhat.com>
59287         test-getpeername: fix typo
59288         * tests/test-getpeername.c: Fix typo introduced in fd cleanup.
59290 2013-01-20  Bernhard Voelker  <mail@bernhard-voelker.de>
59292         bootstrap: remove the need for a sorted .gitignore file
59293         * build-aux/bootstrap (insert_sorted_if_absent): Adjust and
59294         rename to insert_if_absent(), so that we don't need or generate
59295         a sorted .gitignore file.  We do require a .gitignore with no
59296         existing duplicate entries and enforce that.
59297         (sort_patterns): Remove this function as we now use the simpler
59298         technigue of inserting blacklist entries at the top of the file,
59299         assuming gnulib won't be inserting !whitelist entries.
59301 2013-01-23  Paul Eggert  <eggert@cs.ucla.edu>
59303         readlinkat: don't depend on gl_FUNC_OPENAT
59304         * m4/readlinkat.m4 (gl_FUNC_READLINKAT): Don't require gl_FUNC_OPENAT.
59305         Perhaps a similar change needs to be made for linkat.m4, mkfifoat.m4,
59306         renameat.m4, symlinkat.m4; but one thing at a time.
59308         statat: new module, split out from fstatat
59309         GNU Emacs needs the POSIX-specified fstatat, but not the
59310         gnulib-specified statat and lstat.  Split the latter two into a
59311         new module 'statat'.
59312         * lib/openat.h: Depend on GNULIB_STATAT, not GNULIB_FSTATAT.
59313         * lib/openat.h, lib/statat.c (STATAT_INLINE):
59314         Rename from FSTATAT_INLINE. All uses changed.
59315         * modules/fstatat (Files): Remove lib/statat.c.
59316         (gl_MODULE_INDICATOR([fstatat])): Remove.
59317         (lib_SOURCES): Remove.
59318         (Maintainer): Add self.
59319         * modules/statat, modules/statat-tests, tests/test-statat.c: New files.
59320         * tests/test-fstatat.c (BASE): Don't define if already defined.
59321         (do_stat, do_lstat) [!TEST_STATAT]: Test fstatat instead.
59323 2013-01-22  Paul Eggert  <eggert@cs.ucla.edu>
59325         tests: don't assume fd 99 is closed
59326         * tests/test-accept.c, tests/test-accept4.c, tests/test-bind.c:
59327         * tests/test-close.c, tests/test-connect.c, tests/test-dprintf.c:
59328         * tests/test-dup.c, tests/test-dup2.c, tests/test-faccessat.c:
59329         * tests/test-fchdir.c, tests/test-fchmod.c, tests/test-fchmodat.c:
59330         * tests/test-fchown.c, tests/test-fchownat.c, tests/test-fclose.c:
59331         * tests/test-fdatasync.c, tests/test-fdopen.c, tests/test-fdopendir.c:
59332         * tests/test-fflush.c, tests/test-fgetc.c, tests/test-fputc.c:
59333         * tests/test-fread.c, tests/test-freopen.c, tests/test-fseeko4.c:
59334         * tests/test-fstat.c, tests/test-fstatat.c, tests/test-fsync.c:
59335         * tests/test-ftello4.c, tests/test-ftruncate.c, tests/test-futimens.h:
59336         * tests/test-fwrite.c, tests/test-getpeername.c:
59337         * tests/test-getsockname.c, tests/test-getsockopt.c:
59338         * tests/test-grantpt.c, tests/test-ioctl.c, tests/test-isatty.c:
59339         * tests/test-linkat.c, tests/test-listen.c, tests/test-lseek.c:
59340         * tests/test-mkdirat.c, tests/test-mkfifoat.c, tests/test-openat.c:
59341         * tests/test-pread.c, tests/test-pwrite.c, tests/test-read.c:
59342         * tests/test-readlinkat.c, tests/test-recv.c, tests/test-recvfrom.c:
59343         * tests/test-renameat.c, tests/test-select.h, tests/test-send.c:
59344         * tests/test-sendto.c, tests/test-setsockopt.c, tests/test-shutdown.c:
59345         * tests/test-symlinkat.c, tests/test-ttyname_r.c:
59346         * tests/test-unlinkat.c, tests/test-unlockpt.c:
59347         * tests/test-utimensat.c, tests/test-vdprintf.c, tests/test-write.c:
59348         Close file descriptor 99, instead of assuming it's already closed.
59350 2013-01-21  Paul Eggert  <eggert@cs.ucla.edu>
59352         stpncpy: port to OS X 10.8
59353         * lib/stpncpy.c (__stpncpy): Parenthesize name when defining function.
59354         Problem reported by Assaf Gordon in <http://bugs.gnu.org/13495>.
59356 2013-01-16  Paul Eggert  <eggert@cs.ucla.edu>
59358         unistd: port to recent mingw
59359         * lib/unistd.in.h: Remove special invocation convention for mingw,
59360         which breaks for the latest mingw version.  See John W. Eaton in
59361         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00100.html>.
59363         largefile: port better to Mac OS X 10.5
59364         This patch is backported from Autoconf git.
59365         * m4/largefile.m4 (AC_SYS_LARGEFILE): Use AC_DEFINE, not
59366         AH_VERBATIM, to define _DARWIN_USE_64_BIT_INODE, to avoid problems
59367         with ino_t size being different for configuration time versus
59368         build/run time.  Problem reported by PHO in
59369         <http://lists.gnu.org/r/bug-autoconf/2013-01/msg00040.html>.
59371 2013-01-15  Paul Eggert  <eggert@cs.ucla.edu>
59373         doc: clarify -Werror
59374         * doc/warnings.texi (warnings): -Werror is not always a bad idea;
59375         clarify that it's intended for developers, not for ordinary builds,
59376         and mention --enable-gcc-warnings as one possible use.
59378 2013-01-15  Andoni Morales Alastruey  <ylatuya@gmail.com>  (tiny change)
59380         stdint: fix build with Android's Bionic fox x86
59381         * lib/stdint.in.h: fix check to test if included-fixed/sys/types.h
59382         was already included as _SSIZE_T_DEFINED_ might also be defined
59383         in include/machine/_types.h, which is included by stdio.h
59385 2013-01-13  Paul Eggert  <eggert@cs.ucla.edu>
59387         net_if-tests: port to Solaris 7 + GCC 3.4.6
59388         Problem reported by Tom G. Christensen in
59389         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00091.html>.
59390         * tests/test-net_if.c (ni): Move to next the code that uses it,
59391         so that it's declared only if needed.
59393 2013-01-12  Paul Eggert  <eggert@cs.ucla.edu>
59395         net_if-tests: port to older Solaris
59396         Problem reported by Tom G. Christensen in
59397         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00086.html>.
59398         * modules/net_if-tests (NET_IF_LIB): New substitution.
59399         (test_net_if_LDADD): New makefile macro, which uses NET_IF_LIB.
59400         (HAVE_IF_NAMEINDEX): New C macro.
59401         * tests/test-net_if.c: Bypass most of the test if !HAVE_IF_NAMEINDEX.
59403         system-quote-tests: port to older Solaris
59404         Problem reported by Tom G. Christensen in
59405         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00086.html>.
59406         * tests/test-system-quote-child.c (fopen, fread): Undef.
59408         c-xvasprintf etc.: fix link errors on older Solaris
59409         These need to link with @LIBINTL@ to get libintl_gettext.
59410         Problem reported by Tom G. Christensen in
59411         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00086.html>.
59412         * modules/c-xvasprintf-tests (test_c_xvasprintf_LDADD):
59413         * modules/readtokens-tests (test_readtokens_LDADD): New macros.
59414         * modules/futimens-tests (test_futimens_LDADD):
59415         * modules/utimens-tests (test_utimens_LDADD): Add @LIBINTL@.
59417 2013-01-10  Paul Eggert  <eggert@cs.ucla.edu>
59419         locale: port to Solaris 2.6 and 7 + GNU gettext
59420         * lib/locale.in.h: Just include_next <locale.h> when
59421         being invoked recursively.  This prevents problems on Solaris 2.6 and 7
59422         when combining the localename module with GNU gettext 0.18.2.
59423         Problem reported by Tom G. Christensen in
59424         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00084.html>.
59426 2013-01-09  Paul Eggert  <eggert@cs.ucla.edu>
59428         stdlib: port to Solaris 2.6
59429         Also, the code worked on Solaris 7 through 9 only by accident.
59430         Problem reported by Tom G. Christensen in
59431         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00059.html>.
59432         * lib/stdlib.in.h: If __need_system_stdlib_h is defined,
59433         simply include the system stdlib.h.
59434         * lib/getopt.in.h (__need_system_stdlib_h):
59435         * lib/pthread.in.h (__need_system_stdlib_h):
59436         * lib/unistd.in.h (__need_system_stdlib_h) [!__GLIBC__]:
59437         Define when including <stdlib.h>, to avoid problems at least for
59438         the pthread case on Solaris 2.6 and 7.  These .h files can get by
59439         with the system stdlib.h.
59441 2013-01-06  Paul Eggert  <eggert@cs.ucla.edu>
59443         doc: update main copyright year
59444         * doc/gnulib.texi: Update copyright date.
59446         doc: improve ISO 8601 discussion
59447         * doc/parse-datetime.texi (Combined date and time of day items):
59448         Specify more carefully what formats are supported and what is
59449         done with excess precision.
59451 2013-01-05  Paul Eggert  <eggert@cs.ucla.edu>
59453         doc: avoid small caps
59454         * doc/parse-datetime.texi, doc/regex.texi: Don't use small caps;
59455         they're more trouble than they're worth.  Suggested by Karl Berry
59456         in <http://bugs.gnu.org/13360>.
59458         regex: conform to strict C
59459         * lib/regcomp.c (parse_bracket_exp): Add cast to conform to strict C.
59460         From Aharon Robbins.
59462         gnulib-tool: fix incompatibility with autopoint 0.18.2
59463         * gnulib-tool: Don't indent AM_GNU_GETTEXT_VERSION line.
59464         Problem reported by Tom G. Christensen in
59465         <http://lists.gnu.org/r/bug-gnulib/2013-01/msg00053.html>.
59467 2013-01-04  Paul Eggert  <eggert@cs.ucla.edu>
59469         fprintftime: bring back and reword fwrite comment
59470         * lib/strftime.c (cpy) [FPRINTFTIME]: Re-add reworded comment.
59472         stdio: remove now-unnecessary stdio.c
59473         Since stdio.in.h no longer uses inline functions, we no longer
59474         need to compile the extern versions.
59475         * lib/stdio.c: Remove.
59476         * modules/stdio (Files): Remove lib/stdio.c.
59477         (lib_SOURCES): Remove.
59479         unicodeio: depend on stdio, not ignore-value
59480         * lib/unicodeio.c: Do not include ignore-value.h.
59481         (fwrite_success_callback): Use plain fwrite, not ignore_value + fwrite.
59482         * modules/unicodeio (Depends-on): Depend on stdio, not ignore-value.
59484         fprintftime: depend on stdio, not ignore-value
59485         * lib/strftime.c [FPRINTFTIME]: Do not include ignore-value.h.
59486         (cpy) [FPRINTFTIME]: Use plain fwrite, not ignore_value of fwrite,
59487         since the stdio module arranges to silence that warning now.
59488         * modules/fprintftime (Depends-on): Depend on stdio, not ignore-value.
59490 2012-10-04  Simon Josefsson  <simon@josefsson.org>
59492         stdint-tests: Fix expanded-before-required-warning.
59493         * modules/stdint-tests (Depends-on): Use AC_REQUIRE.
59495 2013-01-03  Paul Eggert  <eggert@cs.ucla.edu>
59497         fwrite: silence __wur only for older glibc versions
59498         * lib/stdio.in.h (fwrite): Limit workaround to glibc 2.4 through 2.15.
59499         This will help us remove this workaround some time in the far future.
59501 2013-01-03  Eric Blake  <eblake@redhat.com>
59503         fwrite: silence __wur without using inline
59504         * lib/stdio.in.h (fwrite): Limit warn_unused_result workaround to
59505         just gcc, and in a way that avoids inline issues.
59506         * modules/stdio (Depends-on): Drop extern-inline.
59508 2013-01-03  Jim Meyering  <jim@meyering.net>
59510         update-copyright: avoid copyright notice date corruption
59511         Given a sequence of copyright year numbers in which the final
59512         one was a two-digit number that happened to be a substring of
59513         a preceding four-digit year number, we would mistakenly update
59514         the substring (from two- to four-digit) rather than the two-digit
59515         number at the end, which, combined with the addition of the current
59516         4-digit year number would yield two 5-digit year numbers, e.g.,
59517         here, it would convert the first "99" to "1999, 2013" rather than
59518         the final one:
59519           1991, 99
59520           11999, 20131, 1999
59521         * build-aux/update-copyright: Tighten a regexp.
59522         * tests/test-update-copyright.sh: Add a test case to trigger the bug.
59523         Reported by Joseph Myers in
59524         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/32281
59526 2013-01-01  Paul Eggert  <eggert@cs.ucla.edu>
59528         regex: omit needless signed-pointer casts
59529         * lib/regcomp.c (build_charclass, build_charclass_op):
59530         Use char *, not unsigned char *, for class name and extra.
59531         The char values are always nonnegative so there's no need to
59532         insist on unsigned char * here, and using char * removes the need
59533         for casts.  Reported by Aharon Robbins in
59534         <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
59536         regex: support Gawk, which never uses alloca
59537         * lib/regex_internal.h [!_LIBC && !HAVE_ALLOCA]:
59538         Do not include in this case.  Gawk doesn't supply a substitute
59539         alloca.h and doesn't need one.
59541         regex: port __libc_lock_define usage to C89
59542         * lib/regex_internal.h (__libc_lock_define) [!_LIBC]: Remove.
59543         (struct re_dfa_t): Use #ifdef instead.  '__libc_lock_define (, lock)'
59544         does not conform to C89, as it has an empty macro argument.
59545         Reported by Aharon Robbins in
59546         <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
59548 2013-01-01  Eric Blake  <eblake@redhat.com>
59550         maint: update all copyright year number ranges
59551         Run "make update-copyright".
59553         version-etc: bump copyright year reported in --version
59554         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2013.
59556 2012-12-31  Eric Blake  <eblake@redhat.com>
59558         sigprocmask-tests: skip test if pid is unexpectedly large
59559         * tests/test-sigprocmask.c (main): Add range check.
59561         git-version-gen: avoid test -z portability glitch
59562         * build-aux/git-version-gen: Prefer portable test spelling, since
59563         git-version-gen is run on more than just developer machines.
59565 2012-12-31  Peter Rosin  <peda@lysator.liu.se>  (tiny change)
59567         git-version-gen: add --fallback option to use if git is not present
59568         * build-aux/git-version-gen: Add support for the new option --fallback,
59569         which comes into play when there is no $tarball_version_file and
59570         git is not working.
59571         (scriptversion): Update.
59573         maint.mk: handle missing git with more grace
59574         * top/maint.mk (no-submodule-changes, public-submodule-commit):
59575         Quietly proceed if git is not present.
59577 2012-12-31  Eric Blake  <eblake@redhat.com>
59579         dup2: work around cygwin bug
59580         * m4/dup2.m4 (gl_FUNC_DUP2): Flush out cygwin core dump.
59581         * lib/dup2.c (rpl_dup2): Work around it.
59582         * doc/posix-functions/dup2.texi (dup2): Document it.
59584 2012-12-30  Paul Eggert  <eggert@cs.ucla.edu>
59586         regex: remove unnecessary dependency on localcharset.h
59587         * lib/regex_internal.h [!_LIBC]: Don't include localcharset.h;
59588         hasn't been needed for years.
59589         * modules/regex (Depends-on): Remove localcharset.
59591         regex: revert single-byte change
59592         * lib/regexec.c (check_node_accept_bytes): Revert previous change
59593         to this function.  This was alredy fixed in a different way, at
59594         bdb56bacd57070eced9998569ffe3f3c37ef5964 in the glibc git; see
59595         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=510219> and
59596         <http://sourceware.org/bugzilla/show_bug.cgi?id=9697>.
59598         regex: simplify based on Gawk version
59599         * lib/regex_internal.c (re_dfa_add_node): Simplify.
59600         Reported by Aharon Robbins in
59601         <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
59603 2012-12-29  Paul Eggert  <eggert@cs.ucla.edu>
59605         regex: check that pattern char is single-byte
59606         Reported by Aharon Robbins in
59607         <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
59608         * lib/regexec.c (check_node_accept_bytes):
59609         Return 0 if the pattern string has a multibyte character here.
59611         regex: implement rational ranges
59612         Reported by Aharon Robbins in
59613         <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
59614         * lib/regcomp.c (build_range_exp) [!_LIBC]:
59615         * lib/regexec.c (check_node_accept_bytes) [!_LIBC]:
59616         Implement rational ranges.
59618         regex: avoid redefining __wctype
59619         Reported by Aharon Robbins in
59620         <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
59621         * lib/regex_internal.h (__wctype, __iswctype) [!_LIBC]:
59622         #undef before defining.
59624         regex: port to hosts where malloc (0) == NULL
59625         Reported by Aharon Robbins in
59626         <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
59627         * lib/regex_internal.c (re_node_set_alloc):
59628         Don't assume that malloc (0) yields nonnull.
59629         * lib/regex_internal.h (MALLOC_0_IS_NONNULL): New macro.
59630         * m4/regex.m4 (gl_PREREQ_REGEX): Require gl_EEMALLOC.
59631         * modules/regex (Files): Add m4/eealloc.m4.
59633         regex: port to C89
59634         Reported by Aharon Robbins in
59635         <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
59636         * lib/regcomp.c (init_word_char): Declaration before statement.
59638         regex: merge glibc changes
59639         Also, copy the license wording from glibc.  This simplifies
59640         merging changes.  gnulib-tool will change the wording to GPL as
59641         appropriate, when importing it to other packages.  The only
59642         glibc change made since the last merge, which needs merging, is:
59643         2012-05-24 Andreas Schwab <schwab@linux-m68k.org>
59644         * lib/regex_internal.h (gettext): Remove use of INTUSE.
59646         * users.txt: Add Emacs.
59648         doc: omit mention of version when not needed
59649         * doc/gnulib-intro.texi (Portability and Application Code):
59650         * doc/gnulib.texi (Brief Overview, Legacy Function Substitutes):
59651         Don't mention particular dates or versions when not necessary, so
59652         that the documentation won't go out of date so quickly.
59654         * doc/intprops.texi (Integer Properties): Fix Texinfo typo.
59656 2012-12-28  Akim Demaille  <akim@lrde.epita.fr>
59658         bootstrap: pass --force to autoreconf.
59659         * build-aux/bootstrap (AUTORECONFFLAGS): New.
59660         Add "--force" so that Automake's ylwrap and other such tools
59661         be updated at each bootstrap invocation.
59662         Use it.
59664 2012-12-27  Paul Eggert  <eggert@cs.ucla.edu>
59666         argp: fix port of port new 'inline' approach to Sun C 5.12 + Solaris 10
59667         The earlier patch forgot to update one of the #if conditions, causing
59668         a problem on Debian testing i386 reported by Mats Erik Andersson
59669         <http://lists.gnu.org/r/bug-gnulib/2012-12/msg00124.html>.
59670         * lib/argp-fmtstream.h (__argp_fmtstream_putc, argp_fmtstream_putc)
59671         (__argp_fmtstream_puts, argp_fmtstream_puts)
59672         (__argp_fmtstream_write, argp_fmtstream_write)
59673         [!_LIBC && !__OPTIMIZE__]: Declare as ARGP_FS_EI, not as extern.
59675         * doc/gnulib-readme.texi: Minor fixups.
59676         (Portability guidelines): Modernize URLs.  Remove some repetition.
59677         (Indent with spaces not TABs): Reword to avoid too-long lines.
59678         Remove some '@ifset standalone' stuff that isn't used.
59680         * doc/gnulib-readme.texi (Portability guidelines):
59681         ctype.h, not ctime.h.
59683         Correct name of POSIX.1-2001.
59684         * doc/posix-functions/fgetc.texi (fgetc):
59685         * doc/posix-functions/fgets.texi (fgets):
59686         * doc/posix-functions/fread.texi (fread):
59687         * doc/posix-functions/fscanf.texi (fscanf):
59688         * doc/posix-functions/getc.texi (getc):
59689         * doc/posix-functions/getchar.texi (getchar):
59690         * doc/posix-functions/scanf.texi (scanf):
59691         POSIX.1-2001, not POSIX-2001.
59693         doc: move README into manual
59694         * README: Move contents to new file doc/gnulib-readme.texi.
59695         Replace with a one-line summary.
59696         * doc/gnulib.texi (Brief Overview): New section,
59697         with old intro preface.  Include gnulib-readme.texi for contents.
59698         (Philosophy): Rename from "Introduction", since this
59699         section no longer introduces the rest.  Write a new preface.
59700         * doc/gnulib-readme.texi: New file, with the old contents of
59701         README texinfo-ized.  This way, the README info appears
59702         in the online and printed manual.
59704 2012-12-25  Ben Pfaff  <blp@cs.stanford.edu>
59706         c-xvasprintf: Fix "implicit declaration of function" GCC warning.
59707         * lib/c-xvasprintf.c: Add missing #include "c-vasprintf.h", for
59708         c_vasprintf() prototype.
59710 2012-12-24  Ben Pfaff  <blp@cs.stanford.edu>
59712         c-vasprintf: Fix "empty declaration" warning reported by GCC.
59713         * lib/c-vasprintf.h: Remove stray semicolon.
59715 2012-12-23  Paul Eggert  <eggert@cs.ucla.edu>
59717         gettext: avoid obsolete macro AM_PROG_MKDIR_P
59718         It is obsolete and is planned to be removed from Automake 1.14; see
59719         <http://lists.gnu.org/r/automake/2012-12/msg00029.html>.
59720         * build-aux/po/Makefile.in.in (install-data, install-data-yes)
59721         (installdirs-data, installdirs-data-yes):
59722         Use $(MKDIR_P), not $(mkdir_p).
59723         * m4/intl.m4 (AM_INTL_SUBDIR):
59724         * m4/po.m4 (AM_PO_SUBDIRS):
59725         Require AC_PROG_MKDIR_P, not AM_PROG_MKDIR_P.
59727 2012-12-22  Paul Eggert  <eggert@cs.ucla.edu>
59729         argp: port new 'inline' approach to Sun C 5.12 + Solaris 10
59730         On this platform, we are not optimizing but we are using
59731         the substitute for extern inlines, so compile as if
59732         C99-style extern inline, or a substitute, is available.
59733         * lib/argp-fmtstream.h (argp_fmtstream_set_lmargin)
59734         (__argp_fmtstream_set_lmargin, argp_fmtstream_set_rmargin)
59735         (__argp_fmtstream_set_rmargin, argp_fmtstream_set_wmargin)
59736         (__argp_fmtstream_set_wmargin, argp_fmtstream_point)
59737         (__argp_fmtstream_point) [!_LIBC && !__OPTIMIZE__]:
59738         Declare as ARGP_FS_EI, not as extern.
59739         * lib/argp.h (argp_usage, __argp_usage, _option_is_short)
59740         (__option_is_short, _option_is_end, __option_is_end)
59741         [!_LIBC && __USE_EXTERN_INLINES]:
59742         Declare as ARGP_EI, not as extern.
59744 2012-12-21  Paul Eggert  <eggert@cs.ucla.edu>
59746         AC_PROG_MKDIR_P: port workaround to pre-2.62 Autoconf
59747         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P, AC_C_RESTRICT):
59748         Use m4_ifndef([AC_AUTOCONF_VERSION], ...), not
59749         m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]),[2.62]),[-1],
59750         ...), as the latter is fatal with older Autoconfs.
59751         Problem reported and fix suggested by Eric Blake in thread starting at
59752         <http://lists.gnu.org/r/bug-gnulib/2012-12/msg00097.html>.
59754 2012-12-20  Paul Eggert  <eggert@cs.ucla.edu>
59756         AC_PROG_MKDIR_P: don't workaround if not buggy
59757         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P):
59758         Define only for Autoconf versions before 2.62.
59759         (AC_C_RESTRICT): Use documented AC_AUTOCONF_VERSION, not
59760         undocumented m4_PACKAGE_VERSION, for consistency with the
59761         abovementioned change to AC_PROG_MKDIR_P.  This should suffice
59762         since we're checking for 2.62 or later, and AC_AUTOCONF_VERSION
59763         was introduced in 2.62.
59765 2012-12-15  Ben Pfaff  <blp@cs.stanford.edu>
59767         New 'c-*printf' modules for formatted output in C locale.
59769         New module 'c-vasnprintf'.
59770         * modules/c-vasnprintf: New file.
59771         * lib/c-vasnprintf.c: New file.
59772         * lib/c-vasnprintf.h: New file.
59774         New module 'c-snprintf'.
59775         * modules/c-snprintf: New file.
59776         * modules/c-snprintf-tests: New file.
59777         * lib/c-snprintf.c: New file.
59778         * lib/c-snprintf.h: New file.
59779         * tests/test-c-snprintf.c: New file.
59780         * tests/test-c-snprintf.sh: New file.
59782         New module 'c-vsnprintf'.
59783         * modules/c-vsnprintf: New file.
59784         * modules/c-vsnprintf-tests: New file.
59785         * lib/c-vsnprintf.c: New file.
59786         * lib/c-vsnprintf.h: New file.
59787         * tests/test-c-vsnprintf.c: New file.
59788         * tests/test-c-vsnprintf.sh: New file.
59790         New module 'c-vasprintf'.
59791         * modules/c-vasprintf: New file.
59792         * modules/c-vasprintf-tests: New file.
59793         * lib/c-asprintf.c: New file.
59794         * lib/c-vasprintf.c: New file.
59795         * lib/c-vasprintf.h: New file.
59796         * tests/test-c-vasprintf.c  +: New file.
59797         * tests/test-c-vasprintf.sh: New file.
59799         New module 'c-xvasprintf'.
59800         * modules/c-xvasprintf: New file.
59801         * modules/c-xvasprintf-tests: New file.
59802         * lib/c-xasprintf.c: New file.
59803         * lib/c-xvasprintf.c: New file.
59804         * lib/c-xvasprintf.h: New file.
59805         * tests/test-c-xvasprintf.c: New file.
59806         * tests/test-c-xvasprintf.sh: New file.
59808 2012-12-18  Paul Eggert  <eggert@cs.ucla.edu>
59810         argp: better 'inline'
59811         Use extern-inline module to declare extern inline functions.
59812         This avoids some bogus warning diagnostics.  Problem discovered
59813         when modifying GNU tar to use the manywarnings module.
59814         * lib/argp.h, lib/argp-xinl.c (ARGP_EI) [!_LIBC]:
59815         * lib/argp-fmtstream.h, lib/argp-fs-xinl.c (ARGP_FS_EI) [!_LIBC]:
59816         Define based on extern-inline.
59817         * modules/argp (Depends-on): Add extern-inline.
59819 2012-12-17  Paul Eggert  <eggert@cs.ucla.edu>
59821         filemode, sys_stat: Handle MPX files a la AIX.
59822         * lib/filemode.c (ftypelet): Report 'm' for MPX files.
59823         * lib/sys_stat.in.h (S_ISMPX): New macro.
59824         * tests/test-sys_stat.c: Add tests for MPX files.
59826 2012-12-16  Alexandre Duret-Lutz  <adl@lrde.epita.fr>
59828         x-to-1: honor $PERL
59829         * build-aux/x-to-1.in: Run $HELP2MAN via $PERL so that the user gets
59830         a chance to use his preferred version of Perl.  This is typically
59831         required by Darwin users whose default /usr/bin/perl does not have all
59832         the libraries required by help2man, and who need to use their MacPorts
59833         installation of Perl instead.
59835 2012-12-16  Akim Demaille  <akim@lrde.epita.fr>
59837         gnu-web-doc-update: add all the new files, even in new directories
59838         See http://lists.gnu.org/r/bug-gnulib/2012-12/msg00057.html
59839         * build-aux/gnu-web-doc-update (--dry-run, $dryrun): New.
59840         Use it.
59841         (main): Don't use cvsutils to get the list of unknown files,
59842         just add all the existing files and directories.
59844 2012-12-16  Akim Demaille  <akim@lrde.epita.fr>
59846         gnu-web-doc-update: improve --help
59847         * build-aux/gnu-web-doc-update: Move comments into --help.
59849 2012-12-07  Eric Wong  <normalperson@yhbt.net>
59851         mountlist: recognize more "dummy" file systems
59852         * lib/mountlist.c (ME_DUMMY_0):
59853         Add these dummy FS names to the list:
59854         - "debugfs" virtual filesystem for kernel debugging
59855         - "devpts" PTY slave filesystem
59856         - "devtmpfs" device filesystem on top of tmpfs/ramfs
59857         - "fusectl" control filesystem for FUSE
59858         - "mqueue" enumerates POSIX message queues
59859         - "rpc_pipefs" kernel <-> userspace bridge for NFS
59860         - "sysfs" is for exporting kernel objects
59861         - "devfs" device filesystem for Linux 2.4 and FreeBSD
59863 2012-12-11  Paul Eggert  <eggert@cs.ucla.edu>
59865         extern-inline: avoid incompatibility with Darwin Libc
59866         * m4/extern-inline.m4 (_GL_INLINE, _GL_EXTERN_INLINE): Do not use
59867         extern inline if __APPLE__.  Use _GL_UNUSED in the non-inline branch.
59868         Problem reported by Akim Demaille in
59869         <http://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html>.
59871 2012-12-11  Simon Josefsson  <simon@josefsson.org>
59873         gnupload: Work with GnuPG using gpg-agent (for smartcards).
59874         * build-aux/gnupload: If GnuPG is configured to use gpg-agent,
59875         let it handle password prompting.
59877 2012-12-10  Eli Zaretskii  <eliz@gnu.org>
59879         canonicalize, canonicalize-lgpl: Microsoft Windows prefix fixes
59880         * lib/canonicalize.c (canonicalize_filename_mode):
59881         * lib/canonicalize-lgpl.c (__realpath): Recompute prefix_len after
59882         fetching the current directory.  Don't overrun the beginning of
59883         rpath if there's no slashes after the MS-Windows drive letter.
59885 2012-12-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
59887         maint.mk: avoid extra forks
59888         * top/maint.mk (_cfg_mk): The GNU make manual documents that
59889         "$(wildcard FILE)" expands to empty if FILE doesn't exist.
59890         So use that instead of "$(shell test -f FILE && echo FILE)".
59892 2012-12-07  Paul Eggert  <eggert@cs.ucla.edu>
59894         vasnprintf: fix ASCII_ONLY typo
59895         * lib/unistdio/u8-vasnprintf.c (FCHAR_T_ONLY_ASCII):
59896         * lib/unistdio/u16-vasnprintf.c (FCHAR_T_ONLY_ASCII):
59897         * lib/unistdio/u32-vasnprintf.c (FCHAR_T_ONLY_ASCII):
59898         New macro, replacing ASCII_ONLY.  This fixes a typo.  See thread at
59899         <http://lists.gnu.org/r/bug-gnulib/2012-12/msg00021.html>.
59901 2012-12-05  Paul Eggert  <eggert@cs.ucla.edu>
59903         list, oset, xlist, xoset: fix extern inline issue with C99
59904         This was introduced by my recent changes for 'inline'.
59905         Problem reported for gettext by Daiki Ueno in
59906         <http://lists.gnu.org/r/bug-gnulib/2012-12/msg00000.html>.
59907         * lib/gl_list.h (gl_list_nx_create_empty, gl_list_create)
59908         (gl_list_nx_create, gl_list_size, gl_list_node_value)
59909         (gl_list_node_set_value, gl_list_node_nx_set_value, gl_list_next_node)
59910         (gl_list_previous_node, gl_list_get_at)
59911         (gl_list_nx_set_at, gl_list_search, gl_list_search_from)
59912         (gl_list_search_from_to, gl_list_indexof, gl_list_indexof_from)
59913         (gl_list_indexof_from_to, gl_list_nx_add_first, gl_list_nx_add_last)
59914         (gl_list_nx_add_before, gl_list_nx_add_after, gl_list_nx_add_at)
59915         (gl_list_remove_node, gl_list_remove_at, gl_list_remove, gl_list_free)
59916         (gl_list_iterator, gl_list_iterator_from_to, gl_list_iterator_next)
59917         (gl_list_iterator_free, gl_sortedlist_search)
59918         (gl_sortedlist_search_from_to, gl_sortedlist_indexof)
59919         (gl_sortedlist_indexof_from_to, gl_sortedlist_add, gl_sortedlist_nx_add)
59920         (gl_sortedlist_remove):
59921         * lib/gl_oset.h (go_oset_nx_create_empty, gl_oset_size, gl_oset_search)
59922         (gl_oset_search_atleast, gl_oset_nx_add, gl_oset_remove, gl_oset_free)
59923         (gl_oset_iterator, gl_oset_iterator_next, gl_oset_iterator_free):
59924         * lib/gl_xlist.h (gl_list_create_empty, gl_list_create)
59925         (gl_list_node_set_value, gl_list_set_at, gl_list_add_first)
59926         (gl_list_add_last, gl_list_add_before, gl_list_add_after)
59927         (gl_list_add_at, gl_sortedlist_add):
59928         * lib/gl_xoset.h (gl_oset_create_empty, gl_oset_add):
59929         Wrap these extern decls inside "#if 0", because they are implemented
59930         as inline functions, and extern inline is not what's wanted here.
59931         It would simplify these .h files to remove the extern decls entirely,
59932         although a downside would be less-clear separation between
59933         specification and implementation.
59935 2012-11-29  Paul Eggert  <eggert@cs.ucla.edu>
59937         sys_stat: no 'static inline'
59938         * lib/sys_stat.in.h (rpl_mkdir): Now static, not static inline.
59939         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Do not require AC_C_INLINE.
59941         extern-inline: no 'static inline'
59942         * m4/extern-inline.m4 (gl_EXTERN_INLINE):
59943         Do not require AC_C_INLINE.
59944         (_GL_INLINE, _GL_EXTERN_INLINE): Define as 'static', not as
59945         'static inline', for older compilers.
59947         snippet/warn-on-use: no 'static inline'
59948         * build-aux/snippet/warn-on-use.h:
59949         Remove unnecessary 'inline' in comment.
59951         rbtree-list, rbtreehash-list: no 'static inline'
59952         * lib/gl_anyrbtree_list2.h (rotate_left, rotate_right):
59953         * lib/gl_anytree_list2.h (node_at):
59954         * lib/gl_anytreehash_list1.h (hash_resize_after_add)
59955         (gl_oset_first, add_nodes_to_buckets):
59956         Now static, not static inline.
59958         regex: no 'static inline'
59959         * lib/regex_internal.c (calc_state_hash):
59960         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain)
59961         (bitset_empty, bitset_set_all, bitset_copy, bitset_not, bitset_merge)
59962         (bitset_mask, re_string_char_size_at, re_string_wchar_at):
59963         Now static, not static inline.
59964         (inline) [__GNUC__ < 3 && _LIBC]:
59965         Remove macro; no longer needed.
59967         xvasprintf: no 'static inline'
59968         * lib/xvasprintf.c (xstrcat):
59969         Now static, not static inline.
59970         * m4/xvasprintf.m4 (gl_XVASPRINTF):
59971         Do not require AC_C_INLINE.
59973         parse-datetime, parse-duration: no 'static inline'
59974         * lib/parse-datetime.y (to_uchar):
59975         * lib/parse-duration.c (str_const_to_ul, str_const_to_l)
59976         (scale_n_add):
59977         Now static, not static inline.
59978         * m4/parse-datetime.m4 (gl_PARSE_DATETIME):
59979         * modules/parse-duration (configure.ac):
59980         Do not require AC_C_INLINE.
59982         getaddrinfo: no 'static inline'
59983         * lib/getaddrinfo.c (validate_family):
59984         Now static, not static inline.
59985         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO):
59986         Do not require AC_C_INLINE.
59988         ftruncate, fts, lstat, openat, raise: no 'static inline'
59989         * lib/ftruncate.c (chsize_nothrow):
59990         * lib/fts.c (opendirat, diropen):
59991         * lib/lstat.c (orig_lstat):
59992         * lib/openat.c (orig_openat):
59993         * lib/raise.c (raise_nothrow):
59994         Now static, not static inline.
59995         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE):
59996         * m4/fts.m4 (gl_FUNC_FTS_CORE):
59997         * m4/lstat.m4 (gl_PREREQ_LSTAT):
59998         * m4/openat.m4 (gl_PREREQ_OPENAT):
59999         * m4/raise.m4 (gl_PREREQ_RAISE):
60000         Do not require AC_C_INLINE.
60002         fflush, stat: no 'static inline'
60003         * lib/fflush.c (clear_ungetc_buffer_preserving_position)
60004         (clear_ungetc_buffer, disable_seek_optimization)
60005         (restore_seek_optimization, update_fpos_cache):
60006         * lib/stat.c (orig_stat):
60007         Now static, not static inline.
60008         * lib/fflush.c (disable_seek_optimization, restore_seek_optimization)
60009         (update_fpos_cache):
60010         Define only if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1).
60011         * m4/fflush.m4 (gl_PREREQ_FFLUSH):
60012         * m4/stat.m4 (gl_PREREQ_STAT):
60013         Do not require AC_C_INLINE.
60015         error, filevercmp: no 'static inline'
60016         * lib/error.c (is_open, flush_stdout):
60017         * lib/filevercmp.c (order):
60018         Now static, not static inline.
60019         * m4/error.m4 (gl_PREREQ_ERROR):
60020         * modules/filevercmp (configure.ac):
60021         Do not require AC_C_INLINE.
60023         dup, execute, fatal-signal, etc.: no 'static inline'
60024         * lib/dup.c (dup_nothrow):
60025         * lib/execute.c (nonintr_close, nonintr_open):
60026         * lib/fatal-signal.c (uninstall_handlers, install_handlers):
60027         * lib/fopen.c (orig_fopen):
60028         * lib/freadseek.c (freadptrinc):
60029         * lib/freopen.c (orig_freopen):
60030         * lib/fstat.c (orig_fstat, fstat_nothrow):
60031         * lib/get-rusage-as.c (get_rusage_as_via_setrlimit)
60032         (get_rusage_as_via_iterator):
60033         * lib/get-rusage-data.c (get_rusage_data_via_setrlimit):
60034         * lib/getdtablesize.c (_setmaxstdio_nothrow):
60035         * lib/isatty.c (_isatty_nothrow):
60036         * lib/open.c (orig_open):
60037         * lib/read.c (read_nothrow):
60038         * lib/sigprocmask.c (signal_nothrow):
60039         * lib/spawn-pipe.c (nonintr_close, nonintr_open):
60040         * lib/vasnprintf.c (MAX_ROOM_NEEDED):
60041         * lib/wait-process.c (unregister_slave_subprocess):
60042         * lib/write.c (write_nothrow):
60043         Now static, not static inline.
60044         * lib/spawn-pipe.c (nonintr_open): Define only if
60045         (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__.
60046         * m4/dup.m4 (gl_PREREQ_DUP):
60047         * m4/execute.m4 (gl_EXECUTE):
60048         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL):
60049         * m4/fopen.m4 (gl_PREREQ_FOPEN):
60050         * m4/freadseek.m4 (gl_FUNC_FREADSEEK):
60051         * m4/freopen.m4 (gl_PREREQ_FREOPEN):
60052         * m4/fstat.m4 (gl_PREREQ_FSTAT):
60053         * m4/getdtablesize.m4 (gl_PREREQ_GETDTABLESIZE):
60054         * m4/isatty.m4 (gl_PREREQ_ISATTY):
60055         * m4/open.m4 (gl_PREREQ_OPEN):
60056         * m4/read.m4 (gl_PREREQ_READ):
60057         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK):
60058         * m4/spawn-pipe.m4 (gl_SPAWN_PIPE):
60059         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF):
60060         * m4/wait-process.m4 (gl_WAIT_PROCESS):
60061         * m4/write.m4 (gl_PREREQ_WRITE):
60062         * modules/get-rusage-as, modules/get-rusage-data (configure.ac):
60063         Do not require AC_C_INLINE.
60065         c-strtod, memcoll, readutmp: no 'static inline'
60066         * lib/c-strtod.c (c_locale):
60067         * lib/memcoll.c (strcoll_loop):
60068         * lib/readutmp.c (desirable_utmp_entry):
60069         Now static, not static inline.
60070         * m4/c-strtod.m4 (gl_C_STRTOD, gl_C_STRTOLD):
60071         * m4/memcoll.m4 (gl_MEMCOLL):
60072         * m4/readutmp.m4 (gl_READUTMP):
60073         Do not require AC_C_INLINE.
60075         arctwo, md4, md5, sha1, sha256, sha512: no 'static inline'
60076         * lib/arctwo.c (to_uchar):
60077         * lib/md4.c (set_uint32):
60078         * lib/md5.c (set_uint32):
60079         * lib/sha1.c (set_uint32):
60080         * lib/sha256.c (set_uint32):
60081         * lib/sha512.c (set_uint64):
60082         Now static, not static inline.  This is a bit simpler, and doesn't
60083         affect performance with GCC and default optimization.
60084         * m4/arctwo.m4 (gl_ARCTWO):
60085         * m4/md4.m4 (gl_MD4):
60086         * m4/md5.m4 (gl_MD5):
60087         * m4/sha1.m4 (gl_SHA1):
60088         * m4/sha256.m4 (gl_SHA256):
60089         * m4/sha512.m4 (gl_SHA512):
60090         Do not require AC_C_INLINE.
60092         cond, lock, thread: better 'inline'
60093         * lib/glthread/cond.c, lib/glthread/cond.h (_GLTHREAD_COND_INLINE):
60094         * lib/glthread/thread.c, lib/glthread/thread.h (_GLTHREAD_THREAD_INLINE):
60095         New macros.  Use them instead of static inline, for header functions.
60096         * lib/glthread/cond.c (gl_waitqueue_init, gl_waitqueue_remove)
60097         (gl_waitqueue_notify_first, gl_waitqueue_notify_all):
60098         * lib/glthread/lock.c (gl_waitqueue_init)
60099         (gl_waitqueue_notify_first, gl_waitqueue_notify_all):
60100         * lib/glthread/thread.c (get_current_thread_handle):
60101         Change 'static inline' to 'inline'.
60102         * lib/glthread/cond.h, lib/glthread/thread.h:
60103         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
60104         * m4/cond.m4 (gl_COND):
60105         * m4/lock.m4 (gl_PREREQ_LOCK):
60106         * m4/thread.m4 (gl_THREAD):
60107         Do not require AC_C_INLINE.
60108         * modules/cond, modules/thread (Depends-on): Add extern-inline.
60110         chdir-long, cycle-check, savewd: better 'inline'
60111         * lib/chdir-long.c (cdb_init, cdb_fchdir, cdb_free)
60112         (find_non_slash):
60113         * lib/cycle-check.c (is_zero_or_power_of_two):
60114         * lib/savewd.c (savewd_delegating):
60115         Change 'static inline' to 'inline'.
60116         * lib/savewd.c, lib/savewd.h (SAVEWD_INLINE): New macro.
60117         Replace all remaining uses of 'static inline' with it.
60118         * lib/savewd.h:
60119         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
60120         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG):
60121         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
60122         * m4/savewd.m4 (gl_SAVEWD):
60123         Do not require AC_C_INLINE.
60124         * modules/savewd (Depends-on): Add extern-inline.
60126         base32, base64: no need for 'inline'
60127         * lib/base32.c (to_uchar, get_8, decode_8):
60128         * lib/base64.c (to_uchar, get_4, decode_4):
60129         Change 'static inline' to 'inline'.
60130         * m4/base32.m4 (gl_PREREQ_BASE32):
60131         * m4/base64.m4 (gl_PREREQ_BASE64):
60132         Do not require AC_C_INLINE.
60134         array-oset, linkedhash-list, rbtree-oset: no need for 'inline'
60135         * lib/gl_array_oset.c (gl_array_nx_add_at):
60136         (gl_array_remove_at):
60137         * lib/gl_linkedhash_list.c (hash_resize_after_add)
60138         (add_to_bucket, remove_from_bucket):
60139         * lib/gl_rbtree_oset.c (rotate_left, rotate_right):
60140         Change 'static inline' to 'static', as it's simpler to omit
60141         'inline' unless there's a significant performance advantage.
60143         list, oset, xlist, xoset, xsublist: simplify via extern inline
60144         * lib/gl_list.h, lib/gl_list.c (GL_LIST_INLINE):
60145         * lib/gl_oset.c, lib/gl_oset.h (GL_OSET_INLINE):
60146         * lib/gl_xlist.c, lib/gl_xlist.h (GL_XLIST_INLINE):
60147         * lib/gl_xoset.c, lib/gl_xoset.h (GL_XOSET_INLINE):
60148         * lib/gl_xsublist.c, lib/gl_xsublist.h (GL_XSUBLIST_INLINE):
60149         New macro.  Replace all uses of 'static inline' with it.
60150         [HAVE_INLINE]: Implement functions as *_INLINE functions,
60151         instead of as macros FOO that are defined to static inline
60152         functions FOO_inline.
60153         * lib/gl_list.c, lib/gl_oset.c, lib/gl_xlist.c, lib/gl_xoset.c:
60154         * lib/gl_xsublist.c:
60155         Reimplement from scratch, by defining the corresponding *_INLINE
60156         macro and including the corresponding .h file.  This is simpler.
60157         * modules/list, modules/oset, modules/xlist, modules/xoset:
60158         (Files): Remove m4/gl_list.m4.
60159         (configure.ac): Remove gl_LIST.
60160         * m4/gl_list.m4: Remove.
60161         * modules/list, modules/oset, modules/xlist, modules/xoset:
60162         * modules/xsublist:
60163         (Depends-on): Depend on extern-inline, not inline.
60165         xalloc: better 'inline'
60166         * lib/xmalloc.c, lib/xalloc.h (XALLOC_INLINE):
60167         New macro.  Replace all uses of 'static inline' with it.
60168         (static_inline): Remove.
60169         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
60170         Let 'extern inline' do the work automatically, instead of doing
60171         it by hand.
60172         * m4/xalloc.m4 (gl_PREREQ_XALLOC, gl_PREREQ_XMALLOC):
60173         Remove.  All uses removed.
60174         * modules/xalloc (Depends-on): Remove 'inline'.  Add 'extern-inline'.
60176         gethrxtime: better 'inline'
60177         * lib/xtime.c: New file.
60178         * lib/gethrxtime.c, lib/gethrxtime.h (GETHRXTIME_INLINE):
60179         * lib/xtime.h (XTIME_INCLUDE):
60180         New macros.  Replace all uses of 'static inline' with them.
60181         * lib/gethrxtime.c (gethrxtime): Define only if
60182         ! (HAVE_ARITHMETIC_HRTIME_T && HAVE_DECL_GETHRTIME), since
60183         this source file is now always compiled, because of the extern inline.
60184         * lib/gethrxtime.h, lib/xtime.h:
60185         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
60186         * m4/gethrxtime.m4 (gl_GETHRXTIME): Do not check for clock macros
60187         if gethrtime works, as they're not needed in that case.
60188         (gl_XTIME): Do not require AC_C_INLINE.
60189         (gl_PREREQ_GETHRXTIME): Remove; all uses removed, as it's always
60190         compiled now.  Move the check into gl_GETHRXTIME.
60191         * modules/gethrxtime (Files, lib_SOURCES): Add lib/xtime.c.
60192         (Depends-on): Add extern-inline.
60193         (configure.ac): gethrxtime is always compiled now.
60194         (lib_SOURCES): Add gethrxtime.c.
60196         wctype-h: better 'inline'
60197         * lib/wctype-h.c: New file.
60198         * lib/wctype.in.h (_GL_WCTYPE_INLINE):
60199         New macro.  Replace all uses of 'static inline' with it.
60200         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
60201         * m4/wctype_h.m4 (gl_WCTYPE_H): Do not require AC_C_INLINE.
60202         * modules/wctype-h (Files, lib_SOURCES): Add lib/wctype-h.c.
60203         (Depends-on): Add extern-inline.
60205         unistd: better 'inline'
60206         * lib/unistd.c: New file.
60207         * lib/unistd.in.h (_GL_UNISTD_INLINE):
60208         New macro.  Replace all uses of 'static inline' with it.
60209         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
60210         * m4/unistd_h.m4 (gl_UNISTD_H): Do not require AC_C_INLINE.
60211         * modules/unistd (Files, lib_SOURCES): Add lib/unistd.c.
60212         (Depends-on): Add extern-inline.
60214         sys_socket: better 'inline'
60215         * lib/sys_socket.c: New file.
60216         * lib/sys_socket.in.h (_GL_SYS_SOCKET_INLINE):
60217         New macro.  Replace all uses of 'static inline' with it.
60218         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
60219         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Do not require AC_C_INLINE.
60220         * modules/sys_socket (Files, lib_SOURCES): Add lib/sys_socket.c.
60221         (Depends-on): Add extern-inline.
60223         stdio: better 'inline'
60224         * lib/stdio.c: New file.
60225         * lib/stdio.in.h (_GL_STDIO_INLINE):
60226         New macro.  Replace all uses of 'static inline' with it.
60227         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
60228         * m4/stdio_h.m4 (gl_STDIO_H): Do not require AC_C_INLINE.
60229         * modules/stdio (Files, lib_SOURCES): Add lib/stdio.c.
60230         (Depends-on): Add extern-inline.
60232         sigaction: better 'inline'
60233         * lib/sig-handler.c: New file.
60234         * lib/sig-handler.h (SIG_HANDLER_INLINE):
60235         New macro.  Replace all uses of 'static inline' with it.
60236         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
60237         * m4/sigaction.m4 (gl_PREREQ_SIG_HANDLER_H): Do not require AC_C_INLINE.
60238         * modules/sigaction (Files, lib_SOURCES): Add lib/sig-handler.c.
60239         (Depends-on): Add extern-inline.
60241         selinux-h: better 'inline'
60242         * lib/se-context.c, lib/se-selinux.c: New files.
60243         * lib/getfilecon.c (map_to_failure): Omit 'inline' for static function.
60244         * lib/se-context.in.h (SE_CONTEXT_INLINE):
60245         New macro.  Replace all uses of 'static inline' with it.
60246         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
60247         * lib/se-selinux.in.h (SE_SELINUX_INLINE):
60248         New macro.  Replace all uses of 'static inline' with it.
60249         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
60250         * modules/selinux-h (Files, lib_SOURCES):
60251         Add lib/se-context.c, lib/se-selinux.c.
60252         (Depends-on): Add extern-inline.
60253         (configure.ac): Do not require AC_C_INLINE.
60255         pthread: better 'inline'
60256         * lib/pthread.c: New file.
60257         * lib/pthread.in.h (_GL_PTHREAD_INLINE):
60258         New macro.  Replace all uses of 'static inline' with it.
60259         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
60260         * m4/pthread.m4 (gl_PTHREAD_CHECK):
60261         Add AC_LIBOBJ([pthread]).  Do not require AC_C_INLINE.
60262         * modules/pthread (Files): Add lib/pthread.c.
60263         (Depends-on): Add extern-inline.
60265         math: better 'inline'
60266         * lib/math.c: New file.
60267         * lib/math.in.h (_GL_MATH_INLINE):
60268         New macro.  Replace all uses of 'static inline' with it.
60269         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
60270         * m4/math_h.m4 (gl_MATH_H):
60271         Do not require AC_C_INLINE.
60272         * modules/math (Files, lib_SOURCES):
60273         Add lib/math.c.
60274         (Depends-on): Add extern-inline.
60276         count-one-bits: better 'inline'
60277         * lib/count-one-bits.c: New file.
60278         * lib/count-one-bits.h (COUNT_ONE_BITS_INLINE):
60279         New macro.  Replace all uses of 'static inline' with it.
60280         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
60281         * m4/count-one-bits.m4 (gl_COUNT_ONE_BITS):
60282         Do not require AC_C_INLINE.
60283         * modules/count-one-bits (Files, lib_SOURCES):
60284         Add lib/count-one-bits.c.
60285         (Depends-on): Add extern-inline.
60287         count-leading-zeros: better 'inline'
60288         * lib/count-leading-zeros.c: New file.
60289         * lib/count-leading-zeros.h (COUNT_LEADING_ZEROS_INLINE):
60290         New macro.  Replace all uses of 'static inline' with it.
60291         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
60292         * m4/count-leading-zeros.m4 (gl_COUNT_LEADING_ZEROS):
60293         Do not require AC_C_INLINE.
60294         * modules/count-leading-zeros (Files, lib_SOURCES):
60295         Add lib/count-leading-zeros.c.
60296         (Depends-on): Add extern-inline.
60298         bitrotate: better 'inline'
60299         * lib/bitrotate.c: New file.
60300         * lib/bitrotate.h (BITROTATE_INLINE):
60301         New macros.
60302         Replace all uses of 'static inline' with them.
60303         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
60304         * modules/bitrotate (Files, lib_SOURCES): Add lib/bitrotate.c.
60305         (Depends-on): Add extern-inline.
60306         (configure.ac): Do not require AC_C_INLINE.
60308 2012-11-20  Theophile Ranquet  <ranquet@lrde.epita.fr>
60310         maint.mk: avoid gratuitous failure
60311         Reported by Stefano Lattarini in
60312         <http://lists.gnu.org/r/bug-bison/2012-11/msg00022.html>
60313         * top/maint.mk (public-submodule-commit): Quote more safely.
60315 2012-11-20  Eli Zaretskii  <eliz@gnu.org>
60317         canonicalize, canonicalize-lgpl: support MS-Windows file names
60318         See <http://lists.gnu.org/r/bug-gnulib/2012-11/msg00074.html>
60319         for test cases, which it'd be nice to add at some point.
60320         * lib/canonicalize.c, lib/canonicalize-lgpl.c: Include dosname.h.
60321         * lib/canonicalize.c (canonicalize_filename_mode):
60322         * lib/canonicalize-lgpl.c (__realpath):
60323         Use FILE_SYSTEM_PREFIX_LEN instead of assuming that the first
60324         slash is at the beginning of the file name.  Use ISSLASH, instead
60325         of a literal '/'.  Use IS_ABSOLUTE_FILE_NAME instead of comparing
60326         the first character with '/'.  Test for
60327         DOUBLE_SLASH_IS_DISTINCT_ROOT only if the file name does not begin
60328         with a drive letter.
60329         * lib/canonicalize.c (SLASHES): New macro.
60330         (canonicalize_filename_mode): Use SLASHES instead of a literal "/".
60332 2012-11-17  Dmitry V. Levin  <ldv@altlinux.org>
60334         fts: introduce FTS_VERBATIM
60335         * lib/fts_.h (FTS_VERBATIM): New bit flag.
60336         (FTS_OPTIONMASK, FTS_NAMEONLY, FTS_STOP): Adjust.
60337         * lib/fts.c (fts_open): Honor it.
60339 2012-11-09  Pádraig Brady  <P@draigBrady.com>
60341         getlogin-tests: allow errno == ENXIO
60342         * tests/test-getlogin.c (main): Skip tests if getlogin fails
60343         with errno == ENXIO (No controlling tty).
60344         getlogin_r-tests: Likewise. Also allow errno == ENOENT
60345         * tests/test-getlogin_r.c (main): Skip tests if getlogin_r fails
60346         with errno == ENOENT.  This was reported to happen in various
60347         situations on GNU/Linux.
60349 2012-11-09  Paul Eggert  <eggert@cs.ucla.edu>
60351         getlogin-tests: allow errno == ENOENT
60352         * tests/test-getlogin.c (main): Skip tests if getlogin fails
60353         with errno == ENOENT.  This happened to me on Ubuntu 12.04.1 x86,
60354         when running a test in an Emacs shell buffer.
60356 2012-11-08  Jim Meyering  <jim@meyering.net>
60358         tests/nap.h: avoid warning about unused variable
60359         * tests/nap.h (nap_works): Remove now-unused declaration of "result".
60361         prefix-gnulib-mk: avoid overzealous "lib/"-prefix addition
60362         * build-aux/prefix-gnulib-mk (prefix): Tighten a regexp to require
60363         white space before each of the special-cased file names, to avoid
60364         adding "lib/" after $(libdir)/.  Reported by Matias A. fonzo
60365         in http://bugs.gnu.org/12830.
60367 2012-11-08  Paul Eggert  <eggert@cs.ucla.edu>
60369         fcntl-h: default O_SEARCH, O_EXEC back to O_RDONLY
60370         O_PATH doesn't work with Linux kernel 3.6.5, as fchmod (fd, ...)
60371         fails with errno == EBADF when fd is opened with O_PATH.
60372         Reported by Jim Meyering in
60373         <http://lists.gnu.org/r/bug-gnulib/2012-11/msg00026.html>.
60374         * doc/posix-headers/fcntl.texi (fcntl.h): Document this.
60375         * lib/fcntl.in.h (O_EXEC, O_SEARCH) [O_PATH]: Default back to O_RDONLY.
60377 2012-11-07  Paul Eggert  <eggert@cs.ucla.edu>
60379         test-utimens: speed up by taking shorter naps
60380         * tests/nap.h (lt_mtime, get_mtime, nap_works, guess_delay):
60381         New functions.
60382         (nap): Use them, to do a better job of guessing the delay.
60383         On Fedora 17 with ext4 atop md atop hard disks, this made
60384         test-utimens run 10x faster, because the test napped for
60385         1 ms at a time rather than 20 ms.  Reported by Stefano Lattarini in
60386         <http://bugs.gnu.org/12820#11>.
60388 2012-11-07  Jim Meyering  <jim@meyering.net>
60390         mountlist.c: fix a compilation failure
60391         * lib/mountlist.c (read_file_system_list): Fix a compilation failure
60392         I introduced while transforming commit v0.0-7683-g613bcb6
60394 2012-11-05  Paul Eggert  <eggert@cs.ucla.edu>
60396         errno: port to LynxOS 178 2.2.2
60397         Problem reported by Joel Brobecker in
60398         <http://lists.gnu.org/r/bug-gnulib/2012-10/msg00088.html>.
60399         * doc/posix-headers/errno.texi (errno.h): Document this.
60400         * lib/errno.in.h (EILSEQ, GNULIB_defined_EILSEQ) [!EILSEQ]: New macros.
60401         * lib/strerror-override.c, lib/strerror-override.h (strerror_override):
60402         Supply a string for EILSEQ.
60403         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Check for EILSEQ.
60405 2012-11-05  Paul Eggert  <eggert@cs.ucla.edu>
60407         fcntl-h: default O_SEARCH, O_EXEC to O_PATH if available
60408         Linux kernel 2.6.39 introduced O_PATH (see
60409         <http://lwn.net/Articles/433854/>) and this is a better fallback
60410         for O_SEARCH and O_EXEC than O_RDONLY, if O_PATH is available.
60411         * doc/posix-headers/fcntl.texi (fcntl.h): Document this.
60412         * lib/fcntl.in.h (O_EXEC, O_SEARCH) [O_PATH]: Default to O_PATH.
60413         * lib/fcntl.in.h (O_ACCMODE):
60414         * tests/test-fcntl-h.c (main):
60415         Do not reject O_ACCMODE merely because it has more than the
60416         minimal number of bits, as POSIX allows extensions here.
60418 2012-11-04  Andrew Warshall  <warshall@99main.com>  (tiny change)
60420         mountlist: do not classify a bind-mounted dir entry as "dummy"
60421         * lib/mountlist.c (ME_DUMMY_0): Rename from ME_DUMMY, but omit
60422         the "none"-testing clause.
60423         (ME_DUMMY) [MOUNTED_GETMNTENT1]: New macro to encapsulate the
60424         exception for bind-mounted directories.
60426 2012-11-01  Akim Demaille  <akim@lrde.epita.fr>
60428         quote: provide a means to escape strings with nul characters
60429         * lib/quote.h, lib/quotearg.c (quote_mem, quote_n_mem): New functions.
60430         (quote, quote_n): Rename formal arguments for consistency with
60431         quotearg.
60433 2012-10-30  Paul Eggert  <eggert@cs.ucla.edu>
60435         test-raise: don't assume 199 is an invalid signal
60436         * tests/test-raise.c (main): Don't assume 199 is not a signal number.
60438         sh-quote-tests: port to Solaris 9
60439         * modules/sh-quote-tests (test_sh_quote_LDADD): Add @LIBINTL@.
60440         Problem reported by Dagobert Michelsen in
60441         <http://lists.gnu.org/r/bug-gnulib/2012-10/msg00114.html>.
60443 2012-10-28  Jim Meyering  <jim@meyering.net>
60445         maint.mk: rename a new configurable variable
60446         * top/maint.mk (_gl_translatable_string_re): Rename from
60447         translation-markers: _gl_ prefix to insulate from user Makefile code,
60448         and the _re suffix to inform that it's a regular expression.
60450 2012-10-26  Eric Blake  <eblake@redhat.com>
60452         maint.mk: let packages tweak sc_po_check pattern
60453         * top/maint.mk (sc_po_check): Add translation-markers, to allow
60454         finding files with other translation markers.
60456 2012-10-16  Paul Eggert  <eggert@cs.ucla.edu>
60458         euidaccess: speed up 'configure' on GNU hosts
60459         * m4/euidaccess.m4 (gl_FUNC_NONREENTRANT_EUIDACCESS):
60460         Check for setregid here, not in gl_PREREQ_EUIDACCESS, since
60461         it's needed only in this case.  Use AC_CHECK_DECLS, not
60462         AC_CHECK_DECLS_ONCE.
60463         (gl_PREREQ_EUIDACCESS): Do not use AC_CHECK_HEADERS_ONCE libgen.h
60464         or AC_REQUIRE for AC_FUNC_GETGROUPS.
60466         * lib/regexec.c (re_search_internal): Fix grammar in comment.
60468 2012-10-15  Paul Eggert  <eggert@cs.ucla.edu>
60470         fchmodat, fchownat, fstatat: port to non-inlining compilers
60471         Problem reported for FreeBSD 9 by Jim Meyering in
60472         <http://lists.gnu.org/r/bug-gnulib/2012-10/msg00070.html>.
60473         * lib/chmodat.c, lib/chownat.c, lib/statat.c:
60474         New files, which define FCHMODAT_INLINE etc.
60475         * lib/fchmodat.c (FCHMODAT_INLINE):
60476         * lib/fchownat.c (FCHOWNAT_INLINE):
60477         * lib/fstatat.c (FSTATAT_INLINE):
60478         Remove, as chmodat.c etc. now do this.
60479         * modules/fchmodat (Files): Add lib/chmodat.c.
60480         * modules/fchownat (Files): Add lib/chownat.c.
60481         * modules/fstatat (Files): Add lib/statat.c.
60483 2012-10-15  Jim Meyering  <jim@meyering.net>
60485         fchmodat.c, fchownat.c: compile-impeding typos
60486         * lib/fchmodat.c (FCHMODAT_INLINE): Fix typo: s/#include/#define/
60487         * lib/fchownat.c (FCHOWNAT_INLINE): Likewise.
60488         Introduced in commit v0.0-7636-gd202279.
60490 2012-10-15  Paul Eggert  <eggert@cs.ucla.edu>
60492         fcntl-h: support GNU flags like O_IGNORE_CTTY
60493         * doc/posix-headers/fcntl.texi (fcntl.h): Support O_IGNORE_CTTY,
60494         O_NOLINK, and O_NOTRANS.  These flags are nonzero on GNU/Hurd
60495         systems.  Discovered when using fcntl-h with GNU Emacs, which uses
60496         O_IGNORE_CTTY.  Fix misspelling of F_SETLKW.
60497         * lib/fcntl.in.h (O_IGNORE_CTTY, O_NOLINK, O_NOTRANS):
60498         Define to 0 if not already defined.
60499         * tests/test-fcntl-h.c: Test these new flags.
60501 2012-10-14  Paul Eggert  <eggert@cs.ucla.edu>
60503         faccessat, etc.: support AT_FDCWD-only use
60504         * lib/at-func.c: If GNULIB_SUPPORT_ONLY_AT_FDCWD, then support
60505         this function only if its first argument is AT_FDCWD.
60506         Emacs wants faccessat for AT_EACCESS but not for any first-arg
60507         values other than AT_FDCWD, so it doesn't want all the openat
60508         machinery with fchdir etc.
60509         * modules/faccessat, modules/fchmodat, modules/fchownat (Files):
60510         * modules/fstatat, modules/mkdirat, modules/openat (Files):
60511         * modules/unlinkat (Files):
60512         Remove lib/openat-priv.h, as at-internal supplies this file.
60513         Removing this file here allows us to support programs like Emacs
60514         that avoid at-internal.
60516         faccessat: speed up 'configure' on mainstream hosts
60517         * m4/faccessat.m4 (gl_PREREQ_FACCESSAT):
60518         Use AT_CHECK_FUNCS for 'access', not AC_CHECK_FUNCS_ONCE,
60519         since it's only on unusual platforms that we need to check for
60520         'access', and it's better not to slow 'configure' down on all
60521         platforms.
60523         faccessat: port to Solaris 10
60524         * lib/faccessat.c: Include <fcntl.h>, for AT_EACCESS.
60525         Needed on Solaris 10, which doesn't have AT_EACCESS,
60526         so we need the Gnulib fcntl.h, which defines it.
60528 2012-10-14  Pádraig Brady  <P@draigBrady.com>
60529         canonicalize: fix C89 compilation
60530         * lib/canonicalize.c (canonicalize_filename_mode): Swap order of
60531         declarations so C89 is supported.  Also remove the comment
60532         referencing memorty allocation as the suggested feature could
60533         not be implemented as suggested.
60534         Reported by Michael Goffioul.
60536 2012-10-12  Paul Eggert  <eggert@cs.ucla.edu>
60538         group-member: omit unnecessary dependencies
60539         This is for Emacs, which has its own allocator and where we
60540         don't want to use xalloc.
60541         * lib/group-member.c: Include xalloc-oversized.h, not xalloc.h,
60542         since we no longer use xmalloc.  Do not include stdbool.h, since
60543         the changes below happen to remove the only use of bool.
60544         (GROUPBUF_SIZE): New constant.
60545         (struct group_info): Remove n_groups member.  Add groupbuf member.
60546         This lets us get the groups without using malloc, usually.
60547         (free_group_info, get_group_info): Adjust to this.
60548         (get_group_info): Return the number of groups found, or -1 on error.
60549         Use plain malloc not xmalloc, and treat its failure as if there
60550         are no groups, as the user already loses in case of error.
60551         (group_member): Simplify, based on changes to get_group_info.
60552         * modules/group-member (Depends-on): Remove dependencies on
60553         xalloc and stdbool.  Add dependency on xalloc-oversized.
60555 2012-10-08  Alexandre Duret-Lutz  <adl@lrde.epita.fr>  (tiny change)
60557         gethrxtime: port to C++
60558         * lib/gethrxtime.h, lib/xtime.h [__cplusplus]: Add extern "C".
60560 2012-10-04  Paul Eggert  <eggert@cs.ucla.edu>
60562         ptsname: fix macro-name typo
60563         * lib/stdlib.in.h (ptsname): Fix misspelling of GNULIB_NAMESPACE.
60565 2012-10-03  Simon Josefsson  <simon@josefsson.org>
60567         inttostr: Relax license.
60568         * modules/inttostr (License): Change from LGPL to LGPLv2+.
60570 2012-10-03  Eric Blake  <eblake@redhat.com>
60572         ptsname_r: support ptys returned by FreeBSD posix_openpt
60573         * lib/ptsname_r.c (__ptsname_r): Don't munge name if it already
60574         lives in /dev/pts/.
60576 2012-10-02  Eric Blake  <eblake@redhat.com>
60578         pselect: reject invalid file descriptors
60579         * m4/pselect.m4 (gl_FUNC_PSELECT): Probe for FreeBSD bug.
60580         * lib/pselect.c (rpl_pselect) [!win32]: Work around it.
60581         * modules/pselect (Depends-on): Add dup2.
60582         * doc/posix-functions/pselect.texi (pselect): Document this.
60584         select: reject invalid file descriptors
60585         * m4/select.m4 (gl_FUNC_SELECT): Probe for FreeBSD bug.
60586         * lib/select.c (rpl_select) [!win32]: Work around it.
60587         * modules/select (Depends-on): Add dup2.
60588         * doc/posix-functions/select.texi (select): Document this.
60590         select: enhance test
60591         * tests/test-select.h (do_select_bad_nfd_nowait, test_bad_nfd):
60592         New functions.
60593         (test_function): Enhance test.
60594         (do_select_bad_fd): Avoid any stale errno values.
60596         ptsname: reject invalid file descriptors
60597         http://www.austingroupbugs.net/view.php?id=503
60598         * m4/ptsname.m4 (gl_FUNC_PTSNAME): Probe for FreeBSD bug.
60599         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Add new witness.
60600         * modules/stdlib (Makefile.am): Replace witness.
60601         * lib/stdlib.in.h (ptsname): Allow for replacement.
60602         * modules/ptsname (configure.ac): Trigger replacement.
60603         * doc/posix-functions/ptsname.texi (ptsname): Document this.
60605 2012-10-02  Nikos Mavrogiannopoulos  <nmav@gnutls.org>  (tiny change)
60607         hash-pjw-bare: new module
60608         * lib/hash-pjw-bare.c: New file, very much like hash-pjw.c.
60609         * lib/hash-pjw-bare.h: Likewise.
60610         * modules/hash-pjw-bare: New file.
60611         * MODULES.html.sh (Misc): Add it.
60613 2012-10-02  Eric Blake  <eblake@redhat.com>
60615         manywarnings: cater to more gcc infelicities
60616         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add test for
60617         -Wuninitialized without -O.
60619 2012-10-01  Ed Maste  <emaste@freebsd.org>  (tiny change)
60621         select, poll tests: Make setsockopt invocation effective.
60622         * tests/test-poll.c (open_server_socket): Move setsockopt() call before
60623         the bind() call.
60624         * tests/test-select.h (open_server_socket): Likewise.
60626 2012-09-30  Paul Eggert  <eggert@cs.ucla.edu>
60628         sockets, sys_stat: restore AC_C_INLINE
60629         This undoes the 2012-09-22 patch.
60630         * m4/sockets.m4 (gl_SOCKETS):
60631         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H):
60632         Restore AC_C_INLINE, since MSVC requires __inline or _inline
60633         and does not support plain 'inline'.  Reported by Bruno Haible in
60634         <http://lists.gnu.org/r/bug-gnulib/2012-09/msg00183.html>.
60636 2012-09-30  Bruno Haible  <bruno@clisp.org>
60638         localeconv tests: Avoid test failure on OpenIndiana.
60639         * tests/test-localeconv.c (main): On OpenIndiana (a Solaris 11 variant)
60640         skip the 'grouping' and 'mon_grouping' tests.
60641         Reported by Jim Meyering.
60643 2012-09-30  Bruno Haible  <bruno@clisp.org>
60645         havelib: Follow libtool developments.
60646         * m4/lib-ld.m4: Rebase on libtool.m4 from libtool-2.4.
60647         Suggested by Simon Josefsson.
60649 2012-09-29  Jim Meyering  <meyering@redhat.com>
60651         fstatat.c: fix a compile-impeding typo
60652         * lib/fstatat.c (FSTATAT_INLINE): Fix typo: s/#include/#define/
60653         Introduced in commit v0.0-7636-gd202279.
60654         Mats Erik Andersson reported the resulting OpenBSD compilation failure.
60656 2012-09-28  Akim Demaille  <akim@lrde.epita.fr>
60658         extern-inline: provide a -Wundef safe config.h
60659         * m4/extern-inline.m4 (gl_EXTERN_INLINE): Protect
60660         "#if __GNUC_STDC_INLINE__" with "defined __GNUC_STDC_INLINE__"
60661         to produce a -Wundef warning free config.h.
60663 2012-09-26  Paul Eggert  <eggert@cs.ucla.edu>
60665         hash-pjw: relax license to LGPLv2+
60666         * modules/hash-pjw (License): Relax, with consent of author.
60668 2012-09-25  Akim Demaille  <akim@lrde.epita.fr>
60670         maint.mk: fix strict vs. lazy variable issues with RELEASE
60671         * top/maint.mk (_equal): New function.
60672         (member_check): Strip the result to avoid spurious spaces.
60673         (url_dir_list): Do not use ifeq, which is strict, as it will
60674         require RELEASE_TYPE to be defined.
60675         (announcement_Cc_, announcement_mail_headers_): Likewise: instead
60676         of relying on ifeq, use $(release_type) to dispatch (lazily) onto...
60677         (announcement_Cc_alpha,announcement_mail_headers_alpha)
60678         (announcement_Cc_beta,announcement_mail_headers_beta)
60679         (announcement_Cc_stable,announcement_mail_headers_stable): these.
60680         (release): Do not depend on $(release-type), as it forces its
60681         evaluation.  Bounce to it.
60683 2012-09-25  Akim Demaille  <akim@lrde.epita.fr>
60685         maint.mk: formatting changes
60686         * top/maint.mk: Indent bodies of if's.
60688 2012-09-21  Akim Demaille  <akim@lrde.epita.fr>
60690         maint.mk: factor the validation of RELEASE_TYPE
60691         With help from Jim Meyering.
60692         http://lists.gnu.org/r/bug-gnulib/2012-09/msg00132.html
60693         * top/maint.mk (_empty, _sp): Move their definition earlier.
60694         (member-check, release-type): New.
60695         Use the latter instead of $(RELEASE_TYPE).
60696         Remove now useless local checks.
60698 2012-09-20  Akim Demaille  <akim@lrde.epita.fr>
60700         maint.mk: provide "make upload" to ease uploading
60701         See
60702         <http://lists.gnu.org/r/bug-gnulib/2012-08/msg00028.html>.
60703         Do not depend simply on the current $(VERSION), as there may have been
60704         new commits since the tarball generation.  Rather, rely on $(RELEASE),
60705         as "make release-commit" already does.
60707         For consistency, add "make release RELEASE='X.Y TYPE'" as an alias for
60708         "make TYPE".
60710         * top/maint.mk (upload_command, upload, release): New.
60711         (RELEASE_TYPE): If undefined, default to the second word of $(RELEASE).
60712         (VERSION): first word of $(RELEASE) is always right.
60713         (emit_upload_commands): Adjust.
60714         * top/README-release: Update.
60716 2012-09-20  Akim Demaille  <akim@lrde.epita.fr>
60718         maint.mk: silent rules
60719         With help from Stefano Lattarini.
60720         * top/maint.mk (writable-files): Use $(AM_V_GEN).
60721         (announcement): Use $(AM_V_at).
60723 2012-09-24  Paul Eggert  <eggert@cs.ucla.edu>
60725         localename: port gl_locale_name_thread_unsafe to FreeBSD
60726         * lib/localename.c (gl_locale_name_thread_unsafe): Port to FreeBSD,
60727         and use the simpler FreeBSD implementation on Mac OS X as well.
60728         Original idea suggested by Ed Maste in
60729         <http://lists.gnu.org/r/bug-gnulib/2012-09/msg00094.html>.
60731 2012-09-22  Paul Eggert  <eggert@cs.ucla.edu>
60733         binary-io, eealloc, mbfile, mbiter, mbutil, xsize: better 'inline'
60734         * lib/binary-io.c, lib/eealloc.c, lib/mbfile.c, lib/mbiter.c:
60735         * lib/mbuiter.c, lib/xsize.c: New files.
60736         * lib/binary-io.h (BINARY_IO_INLINE):
60737         * lib/eealloc.h (EEALLOC_INLINE):
60738         * lib/mbfile.h (MBFILE_INLINE):
60739         * lib/mbiter.h (MBITER_INLINE):
60740         * lib/mbuiter.h (MBUITER_INLINE):
60741         * lib/xsize.h (XSIZE_INLINE):
60742         New macros.
60743         Replace all uses of 'static inline' with them.
60744         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
60745         * m4/eealloc.m4 (gl_EEALLOC):
60746         * m4/mbfile.m4 (gl_MBFILE):
60747         * m4/mbiter.m4 (gl_MBITER):
60748         * m4/xsize.m4 (gl_XSIZE):
60749         Do not require AC_C_INLINE.
60750         * modules/binary-io (Files, lib_SOURCES): Add lib/binary-io.c
60751         * modules/eealloc (Files, lib_SOURCES): Add lib/eealloc.c.
60752         * modules/mbfile (Files, lib_SOURCES): Add lib/mbfile.c.
60753         * modules/mbiter (Files, lib_SOURCES): Add lib/mbiter.c.
60754         * modules/mbuiter (Files, lib_SOURCES): Add lib/mbuiter.c.
60755         * modules/xsize (Files, lib_SOURCES): Add lib/xsize.c.
60756         * modules/binary-io, modules/eealloc, modules/mbfile:
60757         * modules/mbiter, modules/mbuiter:
60758         (Depends-on): Add extern-inline.
60760         pipe-filter-gi, pipe-filter-ii: better use of 'inline'
60761         * lib/pipe-filter-aux.c: New file.
60762         * lib/pipe-filter-aux.h (PIPE_FILTER_AUX_INLINE): New macro.
60763         Replace all uses of 'static inline' with it.
60764         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
60765         * lib/pipe-filter-gi.c (filter_init, filter_cleanup)
60766         (filter_retcode): No real need for inline here.
60767         * modules/pipe-filter-gi, modules/pipe-filter-ii:
60768         (Files): Add lib/pipe-filter-aux.c.
60769         (Depends-on): Add extern-inline.
60770         (configure.ac): Do not require AC_C_INLINE.
60771         (lib_SOURCES): Add pipe-filter-aux.c.
60773         fdutimensat: omit unnecessary AC_C_INLINE
60774         * modules/fdutimensat (configure.ac): Remove AC_C_INLINE.
60776         fchmodat, fchownat, fstatat: use extern-inline
60777         * lib/fchmodat.c, lib/openat.h (FCHMODAT_INLINE):
60778         * lib/fchownat.c, lib/openat.h (FCHOWNAT_INLINE):
60779         * lib/fstatat.c, lib/openat.h (FSTATAT_INLINE):
60780         New macros.
60781         * lib/openat.h:
60782         Replace all uses of 'static inline' with them.
60783         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
60784         * modules/fchmodat, modules/fchownat, modules/fstatat:
60785         * modules/openat-h:
60786         (Depends-on):
60787         Add extern-inline.
60788         (configure.ac): Remove AC_C_INLINE.
60790         acl, mbchar, priv-set: use extern-inline
60791         * lib/set-mode-acl.c, lib/acl-internal.h (ACL_INTERNAL_INLINE):
60792         * lib/mbchar.c, lib/mbchar.h (MBCHAR_INLINE):
60793         * lib/priv-set.c, lib/priv-set.h (PRIV_SET_INLINE):
60794         New macros.
60795         * lib/acl-internal.h, lib/mbchar.h, lib/priv-set.h:
60796         Replace all uses of 'static inline' with it.
60797         Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
60798         * m4/acl.m4 (gl_FUNC_ACL):
60799         * m4/mbchar.m4 (gl_MBCHAR):
60800         * m4/priv-set.m4 (gl_PRIV_SET):
60801         Remove AC_C_INLINE, since 'inline' is no longer used directly.
60802         * modules/acl, modules/mbchar, modules/priv-set (Depends-on):
60803         Add extern-inline.
60805         sockets, sys_stat: remove AC_C_INLINE in MSVC-only cases
60806         * m4/sockets.m4 (gl_SOCKETS):
60807         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H):
60808         Remove AC_C_INLINE.  Here, 'inline' is used only in MSVC
60809         environments where it's already guaranteed to work, so we needn't
60810         check for it at 'configure'-time.
60812         tls-tests: omit unnecessary 'inline'
60813         * tests/test-tls.c (perhaps_yield): No longer inline.
60814         Simplicity and portability trump efficiency in test cases.
60816         utimens-tests: avoid unnecessary 'inline'
60817         * modules/fdutimensat-tests (configure.ac):
60818         * modules/futimens-tests (configure.ac):
60819         * modules/utimens-tests (configure.ac):
60820         * modules/utimensat-tests (configure.ac):
60821         Remove AC_C_INLINE.
60822         * tests/test-utimens-common.h (ctime_compare):
60823         No longer inline.  Simplicity and portability trump efficiency here.
60825         misc: don't limit commentary to inline functions
60826         * lib/binary-io.h, lib/malloca.h, lib/safe-alloc.c:
60827         * lib/xalloc-oversized.h, lib/xsize.h:
60828         Contrast macros to functions in general, not just to inline functions,
60829         when the commentary does not apply only to inline functions.
60831 2012-09-20  Jim Meyering  <meyering@redhat.com>
60833         non-recursive-gnulib-prefix-hack: new module
60834         * build-aux/prefix-gnulib-mk: Copied from coreutils, derived from
60835         the file that originated in Bison.
60836         * m4/non-recursive-gnulib-prefix-hack.m4: Likewise, this code is
60837         largely copied from a snippet that resided in bison's configure.ac.
60838         * modules/non-recursive-gnulib-prefix-hack: New file.
60839         * MODULES.html.sh (Support for maintaining and releasing projects):
60840         Add it.
60842 2012-09-18  Jim Meyering  <meyering@redhat.com>
60844         maint.mk: generalize _gl_tight_scope for non-recursive make
60845         * top/maint.mk (_gl_tight_scope): Remove a hard-coded assumption
60846         that *.h would describe additional .h files in the directory
60847         specified by $(_gl_TS_dir).  I.e., add this...
60848         (_gl_TS_other_headers): New variable.
60850         maint.mk: exempt trailing blanks found in "binary" files
60851         * top/maint.mk (sc_trailing_blank): Filter out any matches found in
60852         "binary" files, as reported by grep.  Suggested by Richard W.M. Jones
60853         in http://thread.gmane.org/gmane.comp.emulators.guestfs/1902
60855 2012-09-17  Jim Meyering  <meyering@redhat.com>
60857         maint.mk: sc_prohibit_path_max_allocation: don't FP for UNIX_PATH_MAX
60858         * top/maint.mk (sc_prohibit_path_max_allocation): Avoid false-positive
60859         match for symbols like UNIX_PATH_MAX. Reported by Richard W.M. Jones
60860         in http://thread.gmane.org/gmane.comp.emulators.guestfs/1902
60862 2012-09-17  Jim Meyering  <meyering@redhat.com>
60864         maint.mk: teach sc_prohibit_magic_number_exit to accept 77
60865         * top/maint.mk (sc_prohibit_magic_number_exit): Do not complain about
60866         uses like "exit (77)".  "77" is automake's "skip this test" exit code.
60867         It is not in the same category as "exit (0)" or "exit (1)", and
60868         besides, I know of no symbolic name for that 77.  Reported by
60869         Richard W.M. Jones in
60870         http://thread.gmane.org/gmane.comp.emulators.guestfs/1902
60872 2012-09-17  Jim Meyering  <meyering@redhat.com>
60874         maint.mk: relax sc_prohibit_strcmp, to avoid a false positive
60875         * top/maint.mk (sc_prohibit_strcmp): Relax regexp, so as to match
60876         all uses of #define, not just those that start in column 1.
60877         Richard W.M. Jones reported a false positive in
60878         http://thread.gmane.org/gmane.comp.emulators.guestfs/1902
60880 2012-09-16  Paul Eggert  <eggert@cs.ucla.edu>
60882         localcharset: work around Mac OS X bug with UTF-8 and MB_CUR_MAX
60883         * lib/localcharset.c (locale_charset) [DARWIN7]:
60884         Return "ASCII" if the system reports "UTF-8" and MB_CUR_MAX <= 1,
60885         as these two values are incompatible.  Problem reported by Max Horn.
60886         For more discussion, please see
60887         <http://lists.gnu.org/r/bug-gnulib/2012-09/msg00061.html>.
60889         doc: document sticky-EOF issue
60890         * doc/posix-functions/fgetc.texi (fgetc):
60891         * doc/posix-functions/fgets.texi (fgets):
60892         * doc/posix-functions/fread.texi (fread):
60893         * doc/posix-functions/fscanf.texi (fscanf):
60894         * doc/posix-functions/getc.texi (getc):
60895         * doc/posix-functions/getchar.texi (getchar):
60896         * doc/posix-functions/scanf.texi (scanf):
60897         Mention that glibc and default Solaris do not conform to
60898         C99 and POSIX-2001 or later, with respect to how getchar
60899         etc. behave when feof reports nonzero.
60901 2012-09-13  Joachim Schmitz  <jojo@schmitz-digital.de>  (tiny change)
60903         poll: fix poll(0, NULL, msec)
60904         * lib/poll.c: don't exit early if NULL is the 1st arg to poll(),
60905         but nfd is 0.  In that case poll should behave like select.
60907 2012-09-13  Joachim Schmitz  <jojo@schmitz-digital.de>  (tiny change)
60908             Paolo Bonzini  <bonzini@gnu.org>
60910         poll: fix for systems that can't recv() on a non-socket
60911         * lib/poll.c: if recv returns ENOTSOCK, assume the descriptor
60912         is readable.  In this case POLLHUP will not be supported.
60913         * doc/posix-functions/poll.texi: Document this.
60915 2012-09-13  Paolo Bonzini  <bonzini@gnu.org>
60917         poll/select: document portability problems not fixed by Gnulib.
60918         * doc/posix-functions/poll.texi: poll does not work well on
60919         pipes under Windows.  It has the same limitations as select on
60920         BeOS.
60921         * doc/posix-functions/select.texi: select does not work well
60922         on pipes under Windows.
60924 2012-09-10  Paul Eggert  <eggert@cs.ucla.edu>
60926         fcntl-h: check for AIX 7.1 bug with O_NOFOLLOW and O_CREAT
60927         * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Check for AIX 7.1 bug
60928         that caused a GNU tar test failure.  Problem reported by Jez Wain; see
60929         <http://lists.gnu.org/r/bug-tar/2012-07/msg00018.html>.
60931 2012-09-06  Eric Blake  <eblake@redhat.com>
60933         net_if: give more details about the bug being fixed
60934         * doc/posix-headers/net_if.texi: Add clarification.
60936 2012-09-05  Eric Blake  <eblake@redhat.com>
60938         net_if: new module
60939         * modules/net_if: New module, borrowing ideas from netinet_in.
60940         * m4/net_if_h.m4: New file.
60941         * lib/net_if.in.h: Likewise.
60942         * doc/posix-headers/net_if.texi (net/if.h): Document it.
60943         * MODULES.html.sh (lacking POSIX:2008): Likewise.
60944         * tests/test-net_if.c: Make function checks conditional.
60945         Reported by Jasper Lievisse Adriaanse <jasper@humppa.nl>.
60947 2012-09-05  Mats Erik Andersson  <gnu@gisladisker.se>  (tiny change)
60949         readutmp: fix non-portable UT_PID use
60950         * lib/readutmp.c (desirable_utmp_entry) <READ_UTMP_CHECK_PIDS>:
60951         Use `UT_PID (u) > 0' as absolute condition.
60953 2012-09-04  Jim Meyering  <meyering@redhat.com>
60955         fts: reduce two or more trailing spaces to just one, usually
60956         * lib/fts.c (fts_open): Upon initialization, if a name ends in two
60957         or more slashes, trim all but the final one.  But if a name consists
60958         solely of two slashes, don't modify it.  If it consists solely of
60959         three or more slashes, strip all but one.
60961         This is part of the solution to a minor problem with rm:
60962         it would print a bogus ELOOP diagnostic when failing to remove
60963         the slash-decorated name of a symlink-to-directory:
60965             $ mkdir d && ln -s d s && env rm -r s/
60966             rm: cannot remove 's': Too many levels of symbolic links
60968         With the change below and a trivial don't-trim-trailing-slashes
60969         adjustment to remove.c, it does this:
60971             $ env rm -r s/
60972             rm: cannot remove 's/': Not a directory
60974         Improved by: Eric Blake
60976         fts: when there is no risk of overlap, use memcpy, not memmove
60977         * lib/fts.c (fts_alloc): Fix unjustified memcopy: s/memmove/memcpy/
60979 2012-08-29  Paul Eggert  <eggert@cs.ucla.edu>
60981         stdbool: be more compatible with mixed C/C++ compiles
60982         * lib/stdbool.in.h (_Bool, true, false) [__cplusplus]:
60983         Define to bool, true, false, respectively, as GCC's builtin
60984         stdbool.h does.  Problem reported by Michael Goffioul in
60985         <http://lists.gnu.org/r/bug-gnulib/2012-08/msg00143.html>.
60987 2012-08-28  Jim Meyering  <meyering@redhat.com>
60989         revert last change: it was not needed
60990         * tests/test-vc-list-files-git.sh: There's already a test for
60991         a working git, just below.
60993 2012-08-28  Jim Meyering  <meyering@redhat.com>
60995         tests: test-vc-list-files-git.sh: skip if git is not available
60996         * tests/test-vc-list-files-git.sh: Skip this test when git is
60997         not available.
60999 2012-08-26  Bruno Haible  <bruno@clisp.org>
61001         gnulib-tool: Remove no-op option --no-changelog.
61002         * gnulib-tool (func_usage): Don't mention --no-changelog.
61003         (do_changelog): Remove variable.
61004         Reported by Dmitriy Selyutin <ghostman.sd@gmail.com>.
61006 2012-08-24  Paul Eggert  <eggert@cs.ucla.edu>
61008         doc: remove fdl-1.2.texi
61009         It is no longer used or maintained, and its use of @acronym
61010         is problematic.  See the thread containing
61011         <http://lists.gnu.org/r/bug-gnulib/2012-08/msg00134.html>.
61012         * config/srclist.txt: Remove doc/old-licenses/fdl-1.2.texi.
61013         * doc/old-licenses/fdl-1.2.texi: Remove.
61015         execinfo: port to FreeBSD
61016         * m4/execinfo.m4 (gl_EXECINFO_H): Set LIB_EXECINFO to -lexecinfo
61017         if needed, as in FreeBSD.  Reported by Bastien Roucariès in
61018         <http://lists.gnu.org/r/bug-gnulib/2012-08/msg00113.html>.
61019         * modules/execinfo (Link): Add $(LIB_EXECINFO).
61021 2012-08-23  Jim Meyering  <meyering@redhat.com>
61023         xstrtol.h: avoid "_Noreturn is not at beginning of declaration" warning
61024         * lib/xstrtol.h: Put "_Noreturn" before "void" in declaration,
61025         to placate gcc's -Wold-style-declaration.
61027 2012-08-24  Paul Eggert  <eggert@cs.ucla.edu>
61029         doc: do not use @acronym
61030         * doc/inet_ntoa.texi (inet_ntoa):
61031         * doc/parse-datetime.texi (Seconds since the Epoch)
61032         (Specifying time zone rules):
61033         * doc/posix-functions/inet_ntoa.texi (inet_ntoa):
61034         Don't use @acronym.  Problem reported by John Darlington in
61035         <http://lists.gnu.org/r/bug-gnulib/2012-08/msg00124.html>.
61037 2012-08-23  Paul Eggert  <eggert@cs.ucla.edu>
61039         stdnoreturn: port to newer GCCs
61040         * m4/stdnoreturn.m4 (gl_STDNORETURN_H): Avoid problems with
61041         bleeding-edge GCC that complains about 'int _Noreturn foo (void);'.
61042         Problem reported by Jim Meyering in
61043         <http://lists.gnu.org/r/bug-gnulib/2012-08/msg00121.html>.
61044         Also, rename the 'test' function to a void a clash with the
61045         already-supplied 'main' function; this fixes a bug that incorrectly
61046         rejected GCC 4.7.1's <stdnoreturn.h>.
61047         * doc/posix-headers/stdnoreturn.texi (stdnoreturn.h):
61048         Document GCC problem.
61050 2012-08-22  Reuben Thomas  <rrt@sc3d.org>
61052         pipe-filter: fix comment typo
61053         * lib/pipe-filter.h: Mention correct function.
61055 2012-08-22  Paul Eggert  <eggert@cs.ucla.edu>
61057         execinfo: new module
61058         This is for Emacs.  Currently, it provides a no-effect stub
61059         on all platforms where it does not already work.
61060         It already works on glibc-based systems, and on Solaris 11.
61061         * lib/execinfo.c, lib/execinfo.in.h, m4/execinfo.m4, modules/execinfo:
61062         New files.
61063         * doc/glibc-headers/execinfo.texi (execinfo.h):
61064         * MODULES.html.sh (Misc): Document it.
61066 2012-08-20  Paul Eggert  <eggert@cs.ucla.edu>
61068         extern-inline: support old GCC 'inline'
61069         * m4/extern-inline.m4 (gl_EXTERN_INLINE): Use pre-C99 GCC 'inline'
61070         if available.  This applies to GCC versions 2.7 through 4.2, or
61071         when newer GCC is using -fgnu89-inline.  The goal is to address
61072         some of the performance issues mentioned by Bruno Haible in
61073         <http://lists.gnu.org/r/bug-gnulib/2012-08/msg00097.html>.
61075 2012-08-20  Eric Blake  <eblake@redhat.com>
61077         maint.mk: avoid redundant file name in message
61078         * top/maint.mk (sc_prohibit_strcmp, sc_unmarked_diagnostics)
61079         (sc_prohibit_defined_have_decl_tests, sc_const_long_option)
61080         (sc_makefile_path_separator_check): Remove bogus $(ME).
61082 2012-08-20  Mike Frysinger  <vapier@gentoo.org>
61084         timer-time: fix link order when static linking on glibc
61085         * m4/timer_time.m4 (LIB_TIMER_TIME): Add -lpthread
61086         _after_ -lrt so that it's significant.
61088 2012-08-19  Paul Eggert  <eggert@cs.ucla.edu>
61090         timespec: omit unnecessary AC_C_INLINE
61091         * m4/timespec.m4 (gl_TIMESPEC): Do not require AC_C_INLINE.
61093         stat-time: omit unnecessary AC_C_INLINE
61094         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
61095         Do not require AC_C_INLINE.
61097         ignore-value: omit unnecessary AC_C_INLINE
61098         * modules/ignore-value (configure.ac): Do not require AC_C_INLINE.
61100         sys_select: avoid 'static inline'
61101         * lib/sys_select.in.h (rpl_fd_isset): Now static, not static inline.
61103         mktime: avoid 'static inline'
61104         * lib/mktime.c (leapyear, ydhms_diff): Now static, not static inline.
61105         * m4/mktime.m4 (gl_PREREQ_MKTIME): Do not require AC_C_INLINE.
61107 2012-08-19  Bruno Haible  <bruno@clisp.org>
61109         gnulib-tool: Improve coding style.
61110         * gnulib-tool (func_emit_tests_Makefile_am): Set perhapsLT, like in
61111         func_emit_lib_Makefile_am.
61112         Reported and fix suggested by Dmitriy Selyutin <ghostman.sd@gmail.com>.
61114 2012-08-19  Bruno Haible  <bruno@clisp.org>
61116         gnulib-tool: Fix indentation.
61117         * gnulib-tool (func_import): Fix indentation.
61119 2012-08-19  Bruno Haible  <bruno@clisp.org>
61121         gnulib-tool: Remove old file names from .cvsignore, .gitignore.
61122         * gnulib-tool (func_update_ignorelist): Don't use 'join -v 1' command
61123         on the list of removed files.
61125 2012-08-17  Paul Eggert  <eggert@cs.ucla.edu>
61127         test-parse-datetime: avoid glibc leap-second glitch
61128         * tests/test-parse-datetime.c (main): Set TZ to US Eastern time
61129         with the 2012 rules.  Problem reported by Bruce Dubbs in
61130         <http://bugs.gnu.org/12206>.
61132 2012-08-14  Bruno Haible  <bruno@clisp.org>
61134         gnulib-tool: Fix indentation of generated gnulib-comp.m4 file.
61135         * gnulib-tool (func_emit_autoconf_snippet): Initialize indentation
61136         from argument.
61137         Reported and fix suggested by Dmitriy Selyutin <ghostman.sd@gmail.com>.
61139 2012-08-14  Eric Blake  <eblake@redhat.com>
61141         ldexp: relax license
61142         * modules/ldexp (License): Trivial relax, since the module only
61143         provides a permissively licensed m4 file.
61145 2012-08-13  Bruno Haible  <bruno@clisp.org>
61147         gnulib-tool: Fix persistence of --witness-c-macro option.
61148         * gnulib-tool (func_import): Fix typo in emit of gl_WITNESS_C_MACRO.
61149         Reported by Dmitriy Selyutin <ghostman.sd@gmail.com>.
61151 2012-08-11  Eric Blake  <eblake@redhat.com>
61153         count-leading-zeros: use a lookup table on non-gcc compilers
61154         * lib/count-leading-zeros.h (count_leading_zeros_32): Use an
61155         alternate implementation, suggested by Jim Meyering.
61157 2012-08-10  Eric Blake  <eblake@redhat.com>
61159         count-leading-zeros: new module
61160         * modules/count-leading-zeros: New module.
61161         * m4/count-leading-zeros.m4: New file.
61162         * lib/count-leading-zeros.h: Likewise.
61163         * modules/count-leading-zeros-tests: New test.
61164         * tests/test-count-leading-zeros.c: New file.
61165         * MODULES.html.sh (Integer arithmetic functions): Document it.
61167 2012-08-07  Simon Josefsson  <simon@josefsson.org>
61168             Jim Meyering  <meyering@redhat.com>
61170         maintainer-makefile: Fix syntax error with dash.
61171         * top/maint.mk (sc_vulnerable_makefile_CVE-2009-4029): Quote arguments.
61172         (sc_vulnerable_makefile_CVE-2012-3386): Likewise.
61174 2012-08-05  Jim Meyering  <meyering@redhat.com>
61176         extern-inline: also ignore -Wmissing-declarations
61177         * m4/extern-inline.m4: Also ignore -Wmissing-declarations,
61178         required with gcc-4.8.0-to-be.
61180         maint.mk: sc_prohibit_magic_number_exit: avoid new false positives
61181         * top/maint.mk (sc_prohibit_magic_number_exit): Also filter out matches
61182         for /error ?([^,]*)/.  This avoids false-positives for strings like
61183         "Unknown error (252)", introduced via commit v0.0-7538-g92875a6.
61185 2012-08-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
61187         gnumakefile: better interaction with Automake-NG
61188         * modules/gnumakefile [Makefile.am]: The makefiles generated by
61189         Automake-NG always contain a definition of VPATH, even in non-VPATH
61190         builds (its value being simply '.' in that case).  So, in the
61191         'clean-GNUmakefile' rule, to determine whether running under a
61192         VPATH setup, compare '$(srcdir)' to '.' rather than checking whether
61193         '$(VPATH)' expands to the empty string.
61195 2012-08-02  Carlo de Falco  <carlo.defalco@polimi.it>  (tiny change)
61197         base64: Use extern C scope in header file, for C++.
61198         * lib/base64.h: Add C++ namespace protection.
61200 2012-08-02  Paul Eggert  <eggert@cs.ucla.edu>
61202         stat-time, timespec, u64: support naive out-of-dir builds
61203         * lib/stat-time.c, lib/timespec.c, lib/u64.c:
61204         Use '#include "foo.h"', not '#include <foo.h>', when including
61205         one's own interface.  This works better when configuring with
61206         out-of-directory builds, since packages need not add an
61207         otherwise-unnecessary -I$(topdir_src)/lib to DEFAULT_INCLUDES.
61209 2012-08-01  Paul Eggert  <eggert@cs.ucla.edu>
61211         utimens: use extern-inline
61212         * lib/utimens.c (_GL_UTIMENS_INLINE): Define when including utimens.h.
61213         * lib/utimens.h: Add copyright notice, since this is now large enough
61214         to copyright.  Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
61215         (_GL_UTIMENS_INLINE): New macro.  Use it instead of 'static inline'.
61216         * modules/utimens (Depends-on): Add extern-inline.
61218         u64: use extern-inline
61219         * lib/u64.c: New file.
61220         * lib/u64.h: Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
61221         (_GL_U64_INLINE): New macro.  Use it instead of 'static inline'.
61222         * modules/u64 (Files): Add lib/u64.c.
61223         (Depends-on): Add extern-inline.
61224         (configure.ac): No need to require AC_C_INLINE, since extern-inline
61225         does that now.
61226         (lib_SOURCES): Add u64.c.
61228         timespec: use extern-inline
61229         * lib/timespec.c: New file.
61230         * lib/timespec.h: Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
61231         (_GL_TIMESPEC_INLINE): New macro.  Use it instead of 'static inline'.
61232         * modules/timespec (Files): Add lib/timespec.c.
61233         (Depends-on): Add extern-inline.
61234         (lib_SOURCES): Add timespec.c.
61236         stat-time: use extern-inline
61237         * lib/stat-time.c: New file.
61238         * lib/stat-time.h: Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END.
61239         (_GL_STAT_TIME_INLINE): New macro.  Use it instead of 'static inline'.
61240         * modules/stat-time (Files): Add lib/stat-time.c.
61241         (Depends-on): Add extern-inline.
61242         (lib_SOURCES): Add stat-time.c.
61244         extern-inline: new module
61245         * modules/extern-inline, m4/extern-inline.m4: New files.
61246         This is for better support of 'extern inline' a la ISO C99,
61247         with a portable alternative on compilers that do not support
61248         C99-style 'extern inline'.  Using 'extern inline' shrinks the size
61249         of the Emacs executable, when compiled with debugging disabled,
61250         which is a typical way that Emacs is built while developing.
61252 2012-08-01  Akim Demaille  <akim@lrde.epita.fr>
61254         maint.mk: a "release-commit" wrapper to do-release-commit-and-tag
61255         * build-aux/do-release-commit-and-tag: Move variable definitions
61256         together.
61257         ($branch): Instead of defaulting to "master", default to the current
61258         branch (as gnu-web-doc-update does).
61259         (help): Display the current values of the option arguments.
61260         * top/maint.mk (release-commit): New.
61261         * top/README-release: Simplify the corresponding step.
61263 2012-07-30  Eric Blake  <eblake@redhat.com>
61265         passfd: fix comment on recvfd
61266         * lib/passfd.c (recvfd): Fix comment.
61267         Reported by Jann Horn <jannhorn@googlemail.com>.
61269 2012-07-30  Jim Meyering  <meyering@redhat.com>
61271         maint.mk: avoid a sub-shell
61272         * top/maint.mk (release-prep): Remove unneeded sub-shell.
61274 2012-07-30  Akim Demaille  <akim@lrde.epita.fr>
61276         maint.mk: use silent-rules support from Automake
61277         * top/maint.mk (news-check, vc-diff-check, announcement)
61278         (no-submodule-changes, alpha beta stable, release-prep)
61279         (web-manual, update-copyright): Use $(AM_V_GEN) and $(AM_V_at).
61281 2012-07-30  Akim Demaille  <akim@lrde.epita.fr>
61283         maint.mk: provide a web-manual-update target
61284         * top/maint.mk: here.
61285         * top/README-release: Use it to simplify the web manual update step.
61287 2012-07-30  Akim Demaille  <akim@lrde.epita.fr>
61289         README-release: shorten the circuit to post a news
61290         * top/README-release: Point directly to the news submission form.
61292 2012-07-30  Akim Demaille  <akim@lrde.epita.fr>
61294         gnu-web-doc-update: fix --help
61295         * build-aux/gnu-web-doc-update: The information "top level" was written
61296         twice.
61298 2012-07-30  Akim Demaille  <akim@lrde.epita.fr>
61300         maint.mk: absolute VPATH issue
61301         * top/maint.mk (release-prep): Help Git find .git/.
61302         From Jim Meyering.
61304 2012-07-29  Akim Demaille  <akim@lrde.epita.fr>
61306         gitlog-to-changelog: fix previous change
61307         * build-aux/gitlog-to-changelog: Fix condition.
61308         Add missing ";".
61310 2012-07-29  Akim Demaille  <akim@lrde.epita.fr>
61312         gitlog-to-changelog: don't expect .git to be in $srcdir
61313         Reported by Bruno Haible.
61314         <http://lists.gnu.org/r/bug-gnulib/2012-07/msg00265.html>
61315         * build-aux/gitlog-to-changelog (&git_dir_option): New.
61316         Use it.
61318 2012-07-29  Akim Demaille  <akim@lrde.epita.fr>
61320         maint.mk: absolute VPATH build fix
61321         * top/maint.mk (gpg_key_ID): Help git find .git when, for instance,
61322         $(srcdir) is not a parent of $(builddir).
61324 2012-07-28  John Darrington  <john@darrington.wattle.id.au>
61326         clean-temp: Fix memory leak.
61327         * lib/clean-temp.c (cleanup_temp_dir): Free also the 'subdirs' and
61328         'files' members of tmpdir.
61330 2012-07-27  Jim Meyering  <meyering@redhat.com>
61332         maint.mk: new rule: refresh-gnulib-patches
61333         I noticed that 8 of coreutils' 9 gl/**/*.diff files were stale.
61334         Use this rule to refresh them.
61335         * top/maint.mk (refresh-gnulib-patches): New rule.
61337 2012-07-24  Bruno Haible  <bruno@clisp.org>
61339         gnulib-tool: Fix handling of inctests variable.
61340         * gnulib-tool: Canonicalize $inctests also in 'update' mode.
61341         Reported by Nick Bowler <nbowler@elliptictech.com>.
61343 2012-07-22  Bruno Haible  <bruno@clisp.org>
61345         getpass: Assume AC_CHECK_DECLS_ONCE invocation, like in getpass.m4.
61346         * lib/getpass.h: Assume HAVE_DECL_GETPASS is defined.
61347         * cfg.mk (exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests):
61348         Remove exemption for getpass.h.
61349         Suggested by Eric Blake.
61351 2012-07-20  Eric Blake  <eblake@redhat.com>
61353         verify: document conflict with -Wnested-externs
61354         * lib/verify.h: Give hint about usage when gcc warnings are enabled.
61356         maint.mk: forbid exit(-1)
61357         * top/maint.mk (sc_prohibit_magic_number_exit): Detect negatives.
61359 2012-07-20  Paul Eggert  <eggert@cs.ucla.edu>
61361         fsusage: port back to Solaris
61362         * lib/fsusage.c (get_fs_usage): Fix busted logic causing compile-time
61363         error (fsd not declared) on Solaris 10.  Reported privately by
61364         Andrew Borodin.
61366 2012-07-19  Akim Demaille  <akim@lrde.epita.fr>
61368         gnu-web-doc-update: fix error messages
61369         * build-aux/gnu-web-doc-update: Don't pass $ME to die.
61371         gnu-web-doc-update: check the requirements.
61372         * build-aux/gnu-web-doc-update (find_tool): Import from bootstrap.
61373         ($CVS, $CVSU, $GIT, $RSYNC, $XARGS): New.
61374         * build-aux/bootstrap (find_tool): Comment change.
61376 2012-07-17  Akim Demaille  <akim@lrde.epita.fr>
61378         maint.mk: minor simplication.
61379         * top/maint.mk (_sc_excl): Use $(or...) instead of $(if...)
61380         for default values.
61382 2012-07-15  Akim Demaille  <akim@lrde.epita.fr>
61384         gitlog-to-changelog: VPATH build issues
61385         If builddir is not a subdirectory of srcdir, running git from it will
61386         fail.
61387         * build-aux/gitlog-to-changelog (--srcdir): New option.
61389 2012-07-15  Bruno Haible  <bruno@clisp.org>
61391         fpending: Assume AC_CHECK_DECLS_ONCE invocation, like in fpending.m4.
61392         * lib/fpending.h: Assume HAVE_DECL___FPENDING is defined.
61393         * cfg.mk (exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests)
61394         Remove exemption for fpending.h.
61395         Suggested by Eric Blake.
61397 2012-07-15  Paul Eggert  <eggert@cs.ucla.edu>
61399         pthread_sigmask: fix bug on FreeBSD 9
61400         * lib/pthread_sigmask.c [PTHREAD_SIGMASK_INEFFECTIVE]:
61401         Include string.h.
61402         (pthread_sigmask) [PTHREAD_SIGMASK_INEFFECTIVE]:
61403         When calling pthread_sigmask (1729, NEW, OLD), specify non-null NEW;
61404         this avoids a bug on FreeBSD 9, where pthread_sigmask is effective
61405         but pthread_sigmask (1729, NULL, NULL) returns zero.
61406         See <http://bugs.gnu.org/11884>.
61407         Avoid the need to call pthread_sigmask (1729, ...) in most cases,
61408         by inspecting whether the main call changed the old mask.
61410 2012-07-15  Reuben Thomas  <rrt@sc3d.org>
61412         README-release: make it more legible
61413         * top/README-release: Improve typography slightly.
61415 2012-07-15  Jim Meyering  <meyering@redhat.com>
61417         maint: require that each sc_... command start with "@"
61418         * Makefile (sc_prohibit_sc_omitted_at): New rule so that
61419         "make sc_maint" helps us avoid this nit.
61421 2012-07-15  Jim Meyering  <meyering@redhat.com>
61423         maint.mk: add leading "@" to quiet new "make syntax-check" rule
61424         * top/maint.mk (sc_prohibit_defined_have_decl_tests): Add "@".
61426 2012-07-13  Eric Blake  <eblake@redhat.com>
61428         maint.mk: new syntax check for HAVE_DECL checks
61429         * top/maint.mk (sc_prohibit_defined_have_decl_tests): New rule.
61430         * cfg.mk
61431         (exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests):
61432         Exempt some false positives.
61433         Based on a report by Karel Zak.
61435         argp: make HAVE_DECL usage consistent
61436         * lib/argp-parse.c (__argp_parse): Check contents of HAVE_DECL
61437         macros, not whether they are defined.
61438         * m4/argp.m4 (gl_ARGP): Always define HAVE_DECL_* macros, per
61439         convention with other declaration checks.
61440         Reported by Karel Zak, with suggestions from Paul Eggert.
61442         stat-time: relax license to LGPLv2+
61443         * modules/stat-time (License): Relax, with consent of all authors.
61445         strndup: fix m4 usage error
61446         * m4/strndup.m4 (gl_FUNC_STRNDUP): HAVE_DECL_STRNDUP is always
61447         defined, to either 0 or 1.
61448         Reported by Karel Zak.
61450 2012-07-11  Jim Meyering  <meyering@redhat.com>
61452         maint: enable the sc_avoid_if_before_free syntax-check rule
61453         * cfg.mk (local-checks-to-skip): Enable sc_avoid_if_before_free.
61454         (if_before_free_offenders_): Define.
61455         (if_before_free_basename_re_): Define.
61456         Exempt current files with useless if-before-free.
61458 2012-07-11  Paul Eggert  <eggert@cs.ucla.edu>
61460         gettext: do not assume '#define ... defined ...' behavior
61461         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS):
61462         Do not use '#define FOO ... defined BAR ...', as the C standard says
61463         it's not portable to expect that this works after macro expansion.
61464         Problem reported for gzip by Steven M. Schweda in
61465         <http://lists.gnu.org/r/bug-gzip/2012-07/msg00000.html>.
61467 2012-07-10  Paul Eggert  <eggert@cs.ucla.edu>
61469         getloadavg: clean out old Emacs and Autoconf cruft
61470         See Glenn Morris in <http://bugs.gnu.org/11905>.
61471         * lib/getloadavg.c: Include <config.h>, <stdbool.h> always.
61472         Include <sys/param.h> if HAVE_SYS_PARAM_H, not if unix or __unix.
61473         (LDAV_CVT): Remove no-longer-used LOAD_AVE_CVT hook.
61474         * m4/getloadavg.m4 (gl_PREREQ_GETLOADAVG): Check for <sys/param.h>.
61476 2012-07-10  Akim Demaille  <akim@lrde.epita.fr>
61478         bootstrap: let warn be like tests/init.sh's warn_
61479         Reported by Jim Meyering.
61480         * build-aux/bootstrap (warn): Remove, replaced by...
61481         (warnf_, warn_): these.
61482         Adjust callers.
61483         Shorten messages that no longer fit in 80 columns.
61485 2012-07-09  Bruno Haible  <bruno@clisp.org>
61487         getopt: Simplify after Emacs changed.
61488         * m4/getopt.m4 (gl_FUNC_GETOPT_POSIX): Inline gl_GETOPT_IFELSE.
61489         (gl_GETOPT_IFELSE): Remove macro.
61491 2012-07-09  Jim Meyering  <meyering@redhat.com>
61493         maint.mk: add sc_vulnerable_makefile_CVE-2012-3386
61494         * top/maint.mk (sc_vulnerable_makefile_CVE-2012-3386): New rule.
61496         maint.mk: _sc_search_regexp, sc_vulnerable_makefile_CVE-2009-4029: fix
61497         Bugs in both of those conspired to make the
61498         sc_vulnerable_makefile_CVE-2009-4029 rule 99% useless.
61499         _sc_search_regexp's handling of non-empty $in_files would filter
61500         out any offending file names.  sc_vulnerable_makefile_CVE-2009-4029's
61501         choice of in_files value meant there would be no match in most
61502         projects, due to the presence of two or more Makefile.in files.
61503         * top/maint.mk (_sc_search_regexp) [in_vc_files,in_files]: Clarify.
61504         Fix a bug in how a non-empty $$in_files was processed:
61505         (sc_vulnerable_makefile_CVE-2009-4029): Fix erroneous use of in_files:
61506         in spite of the name, it's a regexp, not a list of file names.
61508 2012-07-09  Paul Eggert  <eggert@cs.ucla.edu>
61510         getloadavg, getopt: fix commentary re configure.in
61511         Autoconf is deprecating the name 'configure.in', so change it to
61512         to the new name 'configure.ac' in a couple of places.
61513         * lib/getloadavg.c: configure.in -> configure.ac, in comment.
61514         * m4/getopt.m4 (gl_GETOPT_IFELSE, gl_GETOPT_SUBSTITUTE_HEADER)
61515         (gl_PREREQ_GETOPT): Remove obsolete commentary re Emacs configure.in.
61516         Emacs has renamed it to configure.ac, and it no longer refers
61517         to these macros anyway.
61519         timespec: mark functions with const attributes
61520         * lib/timespec.h (timespec_add, timespec_sub, dtotimespec):
61521         Mark with _GL_ATTRIBUTE_CONST.
61523 2012-07-07  Ludovic Courtès  <ludo@gnu.org>
61525         canonicalize[-lgpl]: handle "guessing" values when cross-building
61526         * m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE)
61527         (gl_CANONICALIZE_LGPL): Check whether $gl_cv_func_realpath_works
61528         matches "*yes" instead of just "yes".  Regression introduced in commit
61529         e0bcf6626cde8dad4bfbdc4045c744f0cd8b9e24.
61531 2012-07-07  Ludovic Courtès  <ludo@gnu.org>
61532             Bruno Haible  <bruno@clisp.org>
61534         canonicalize: make the right guess when cross-compiling to GNU
61535         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Match also "gnu*" to
61536         determine whether cross-compiling to glibc systems, so as to
61537         include GNU/Hurd.
61539 2012-07-06  Paul Eggert  <eggert@cs.ucla.edu>
61541         timespec-sub: avoid duplicate include
61542         * lib/timespec-sub.c: Do not include <config.h> twice.
61543         Reported by Juanma Barranquero.
61545 2012-07-06  Akim Demaille  <akim@lrde.epita.fr>
61547         bootstrap: use a more consistent error reporting scheme
61548         * build-aux/bootstrap (warn, die): New.
61549         Use them.
61551 2012-07-05  Paul Eggert  <eggert@cs.ucla.edu>
61553         sys_time: allow too-wide tv_sec
61554         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Allow struct
61555         timeval even if tv_sec is wider than time_t.  This allows
61556         OpenBSD 5.1 amd64 and fixes an Emacs porting glitch with utimens.c,
61557         as without this patch gnulib replaces struct timeval
61558         and OpenBSD futimes therefore has a type mismatch.
61559         * doc/posix-headers/sys_time.texi: Mention this.
61561         pthread: check for both pthread_create and pthread_join
61562         * m4/pthread.m4 (gl_PTHREAD_CHECK): Revert previous change, but
61563         alter the check so that it tests for both pthread_create and
61564         pthread_join.  This should be more portable to hosts like OSF/1 5.1.
61565         Suggested by Bruno Haible and Richard Yao in
61566         <http://lists.gnu.org/r/bug-gnulib/2012-07/msg00048.html>.
61568         parse-datetime: doc tuneup
61569         * doc/parse-datetime.texi: Index "leap seconds" and fix minor
61570         spacing issues.
61572 2012-07-05  Akim Demaille  <akim@lrde.epita.fr>
61574         do-release-commit-and-tag: fix the previous commit
61575         * build-aux/do-release-commit-and-tag: Actually the test was right,
61576         but the comment and the error message were misleading.
61577         Fix comment, and improve error message.
61578         Perform check first, so that NEWS is not modified uselessly.
61580         do-release-commit-and-tag: fix typo
61581         * build-aux/do-release-commit-and-tag: Be sure that NEWS does
61582         _not_ start with a stub.
61584 2012-07-04  Paul Eggert  <eggert@cs.ucla.edu>
61586         pthread: check for pthread_create, not pthread_join
61587         * m4/pthread.m4 (gl_PTHREAD_CHECK): Check for pthread_create, not
61588         pthread_join.  On FreeBSD 9, pthread_create is in libpthread but
61589         pthread_join in libc.  I hope this removes the need for all the
61590         OSF/1 5.1 pthread_join business.  Reported by Richard Yao in
61591         <http://lists.gnu.org/r/bug-gnulib/2012-07/msg00042.html>.
61593 2012-07-04  Jim Meyering  <meyering@redhat.com>
61595         parse-datetime: fix failure to diagnose invalid input
61596         date -d "$(printf '\xb0')" would print 00:00:00 with today's date
61597         rather than diagnosing the invalid input.  Now it reports this:
61598         date: invalid date '\260'
61599         * lib/parse-datetime.y (to_uchar): Define.
61600         (yylex): Don't sign-extend "other" bytes.
61601         * m4/parse-datetime.m4: Require AC_C_INLINE for first use of "inline".
61602         Thanks to Bruno Haible for the patch to this file.
61603         * tests/test-parse-datetime.c (main): Add a test to trigger the bug.
61604         Peter Evans reported the bug in GNU date: http://bugs.gnu.org/11843
61606 2012-07-03  Jim Meyering  <meyering@redhat.com>
61608         bootstrap: do not require now-removed build-aux/missing
61609         Now that build-aux/missing is, er, missing, bootstrap would
61610         silently fail.
61611         * build-aux/bootstrap (gnulib_extra_files): Remove $build_aux/missing
61612         from the list, now that (since commit v0.0-7489-gd0f486f) the file is
61613         no longer part of gnulib.
61614         Diagnose the failure.
61616 2012-07-03  Paul Eggert  <eggert@cs.ucla.edu>
61618         alloca: add support for HP NonStop TNS/E native
61619         * lib/alloca.in.h (alloca): Support the new host.
61620         From a suggestion by Joachim Schmitz in
61621         <http://lists.gnu.org/r/bug-gnulib/2012-06/msg00355.html>.
61623 2012-07-02  Pádraig Brady  <P@draigBrady.com>
61625         fsusage: remove code not needed on non GNU/Linux systems.
61627         * lib/fsusage.c [STAT_STATVFS || STAT_STATVFS64]:
61628         Don't include headers no longer needed in this case.
61629         * lib/fsusage.c [STAT_STATVFS &&
61630         ! (__linux__ && (__GLIBC__||__UCLIBC__))]: Undefine
61631         STAT_STATFS2_FRSIZE to exclude code not used in this case.
61633 2012-07-02  Paul Eggert  <eggert@cs.ucla.edu>
61635         fsusage: include files needed for glibc 2.6 fallback
61636         * lib/fsusage.c [STAT_STATVFS || STAT_STATVFS64]:
61637         Include <sys/param.h>, <sys/mount.h>, <sys/vfs.h>
61638         as they are needed for the 2.6 < glibc/Linux < 2.6.36 fallback.
61639         Problem reported by Ludovic Courtès in
61640         <http://lists.gnu.org/r/bug-gnulib/2012-07/msg00005.html>.
61642         fsusage: avoid needless check on GNU/Linux
61643         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Omit STAT_STATFS3_OSF1 check
61644         on GNU/Linux systems, since it can't possibly work.
61646 2012-07-01  Bruno Haible  <bruno@clisp.org>
61648         log: Fix an autoconf >= 2.64 warning.
61649         * modules/log (configure.ac): Require, not invoke, gl_FUNC_LOG.
61650         Reported by Carlos O'Donell <carlos_odonell@mentor.com>.
61652 2012-06-28  Bruno Haible  <bruno@clisp.org>
61654         log10f: Fix possible configuration problem.
61655         * m4/log10f.m4 (gl_FUNC_LOG10F): Augment LIBS by $LOG10F_LIBM, not
61656         $LOGF_LIBM.
61657         Reported by Carlos O'Donell <carlos_odonell@mentor.com>.
61659 2012-06-28  Bruno Haible  <bruno@clisp.org>
61661         remove: No longer override on all platforms. Fixes bug from 2010-03-20.
61662         * m4/remove.m4 (gl_FUNC_REMOVE): Test gl_cv_func_unlink_honors_slashes,
61663         not gl_cv_func_unlink_works.
61664         Reported by Carlos O'Donell <carlos_odonell@mentor.com>.
61666 2012-06-27  Eric Blake  <eblake@redhat.com>
61668         config: drop scripts that automake says are not independent
61669         * config/srclist.txt: Drop elisp-comp, missing, and ylwrap.
61670         * build-aux/elisp-comp: Delete.
61671         * build-aux/missing: Likewise.
61672         * build-aux/ylwrap: Likewise.
61673         * modules/elisp-comp: Likewise.
61674         * MODULES.html.sh: Drop mention of elisp-comp.
61675         * NEWS: Mention this.
61677 2012-06-26  Paul Eggert  <eggert@cs.ucla.edu>
61679         root-uid: new module
61680         This is for portability to Tandem's NonStop Kernel.
61681         * lib/root-uid.h, modules/root-uid: New files.
61682         * lib/euidaccess.c, lib/pt_chown.c, lib/unlinkdir.c:
61683         * lib/write-any-file.c, tests/test-sethostname2.c:
61684         Include "root-uid.h".
61685         * lib/euidaccess.c (euidaccess):
61686         * lib/pt_chown.c (main):
61687         * lib/unlinkdir.c (cannot_unlink_dir):
61688         * lib/write-any-file.c (can_write_any_file):
61689         * m4/mknod.m4 (gl_FUNC_MKNOD):
61690         * tests/test-sethostname2.c (geteuid, main):
61691         Don't assume ROOT_UID == 0.
61692         * modules/euidaccess (Depends-on):
61693         * modules/pt_chown (Depends-on):
61694         * modules/sethostname-tests (Depends-on):
61695         * modules/unlinkdir (Depends-on):
61696         * modules/write-any-file (Depends-on):
61697         Add root-uid.
61699         regex: use locale-independent comparison for codeset name
61700         See Bruno Haible's comment in <http://bugs.gnu.org/10305#120>.
61701         * lib/regcomp.c (init_dfa): Use just ASCII case comparison
61702         for codeset name.
61703         * lib/regex_internal.h: Do not include <strings.h>, since we
61704         no longer use strcasecmp.
61705         * modules/regex (Depends-on): Remove strcase.
61707 2012-06-23  Bruno Haible  <bruno@clisp.org>
61709         getopt-posix: No longer guarantee that option processing is resettable.
61710         * doc/posix-functions/getopt.texi: Drop description of problem with
61711         internal state. Fix info about mingw and msvc9.
61712         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Don't require a resettable
61713         option processing by getopt(). Run three test programs instead of one.
61714         Simplify cross-compilation guess.
61715         * NEWS: Mention the change.
61716         Reported by Rich Felker <dalias@aerifal.cx>.
61718 2012-06-26  Bruno Haible  <bruno@clisp.org>
61720         argp, regex: Ensure strcasecmp gets declared.
61721         * lib/argp-help.c: Include <strings.h>.
61722         * lib/regex_internal.h: Likewise.
61723         Reported and suggested by Joachim Schmitz <jojo@schmitz-digital.de>.
61725 2012-06-24  Bruno Haible  <bruno@clisp.org>
61727         ptsname_r: Make it consistent with ptsname on AIX.
61728         * lib/ptsname_r.c (__ptsname_r): For AIX, use nearly the same
61729         implementation as for OSF/1.
61730         * tests/test-ptsname_r.c (main) [AIX]: Use the modern way of opening
61731         a pty master.
61733         ptsname_r: Make it consistent with ptsname on OSF/1.
61734         * lib/ptsname_r.c (__ptsname_r): Add a different implementation for
61735         OSF/1.
61737 2012-06-24  Bruno Haible  <bruno@clisp.org>
61739         ttyname_r: Fix result on OSF/1, Solaris.
61740         * lib/ttyname_r.c (ttyname_r): Produce a NUL-terminated result.
61742 2012-06-24  Bruno Haible  <bruno@clisp.org>
61744         ptsname_r: Add support for Solaris.
61745         * lib/ptsname_r.c (__ptsname_r): Add a different implementation for
61746         Solaris.
61748         ptsname_r: Fix test failure on native Windows.
61749         * modules/ptsname_r (Depends-on): Add isatty.
61751         ptsname_r: Fix test failures on IRIX, Solaris.
61752         * m4/ptsname_r.m4 (gl_PREREQ_PTSNAME_R): Test whether isatty sets
61753         errno when it fails. Define ISATTY_FAILS_WITHOUT_SETTING_ERRNO
61754         accordingly.
61755         * lib/ptsname_r.c: Include <fcntl.h>.
61756         (__ptsname_r): When isatty returned false, then on IRIX, Solaris
61757         set errno if fd is invalid.
61758         * tests/test-isatty.c (main): Update comments.
61760 2012-06-24  Bruno Haible  <bruno@clisp.org>
61762         ptsname test: Extend test.
61763         * tests/test-ptsname.c: Include <errno.h>.
61764         (main): Test behaviour with invalid file descriptor.
61766 2012-06-23  Paul Eggert  <eggert@cs.ucla.edu>
61768         time: fix obsolete comment
61769         * m4/time_h.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Remove obsolete
61770         reference to HAVE_STRUCT_TIMESPEC in comment.
61772 2012-06-23  Bruno Haible  <bruno@clisp.org>
61774         getopt-gnu: Handle suboptimal getopt_long's abbreviation handling.
61775         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): If getopt_long exists but
61776         does not handle abbreviated long options with equivalent
61777         disambiguations, set gl_replace_getopt to yes.
61778         * doc/posix-functions/getopt.texi: Mention the OpenBSD 5.0 problem.
61780 2012-06-22  Paul Eggert  <eggert@cs.ucla.edu>
61782         time_r: fix typo that always overrode localtime_r decl
61783         * m4/time_r.m4 (gl_TIME_R): Use AC_CHECK_DECLS, not
61784         AC_CHECK_DECLS_ONCE, since localtime_r is declared in <time.h>,
61785         not in a standard include.
61787 2012-06-22  Bruno Haible  <bruno@clisp.org>
61789         Write "Mac OS X" instead of "MacOS X".
61790         * README: Write "Mac OS X" instead of "MacOS X".
61791         * build-aux/bootstrap: Likewise.
61792         * build-aux/install-reloc: Likewise.
61793         * lib/acl-internal.h: Likewise.
61794         * lib/acl_entries.c: Likewise.
61795         * lib/argp-ba.c: Likewise.
61796         * lib/argp-pv.c: Likewise.
61797         * lib/config.charset: Likewise.
61798         * lib/copy-acl.c: Likewise.
61799         * lib/csharpexec.c: Likewise.
61800         * lib/euidaccess.c: Likewise.
61801         * lib/fbufmode.c: Likewise.
61802         * lib/fflush.c: Likewise.
61803         * lib/file-has-acl.c: Likewise.
61804         * lib/filemode.h: Likewise.
61805         * lib/fpurge.c: Likewise.
61806         * lib/freadable.c: Likewise.
61807         * lib/freadahead.c: Likewise.
61808         * lib/freading.c: Likewise.
61809         * lib/freadptr.c: Likewise.
61810         * lib/freadseek.c: Likewise.
61811         * lib/fseeko.c: Likewise.
61812         * lib/fseterr.c: Likewise.
61813         * lib/fsusage.c: Likewise.
61814         * lib/fwritable.c: Likewise.
61815         * lib/fwriting.c: Likewise.
61816         * lib/get-rusage-as.c: Likewise.
61817         * lib/get-rusage-data.c: Likewise.
61818         * lib/getdomainname.c: Likewise.
61819         * lib/idpriv-drop.c: Likewise.
61820         * lib/idpriv-droptemp.c: Likewise.
61821         * lib/localcharset.c: Likewise.
61822         * lib/locale.in.h: Likewise.
61823         * lib/localename.c: Likewise.
61824         * lib/mbsrtowcs-state.c: Likewise.
61825         * lib/nproc.c: Likewise.
61826         * lib/passfd.c: Likewise.
61827         * lib/posix_openpt.c: Likewise.
61828         * lib/printf-parse.c: Likewise.
61829         * lib/progreloc.c: Likewise.
61830         * lib/safe-read.h: Likewise.
61831         * lib/safe-write.h: Likewise.
61832         * lib/sched.in.h: Likewise.
61833         * lib/set-mode-acl.c: Likewise.
61834         * lib/signal.in.h: Likewise.
61835         * lib/stdint.in.h: Likewise.
61836         * lib/stdio-impl.h: Likewise.
61837         * lib/stdlib.in.h: Likewise.
61838         * lib/strtod.c: Likewise.
61839         * lib/sys_select.in.h: Likewise.
61840         * lib/tcgetsid.c: Likewise.
61841         * lib/unistd.in.h: Likewise.
61842         * lib/unlockpt.c: Likewise.
61843         * lib/vasnprintf.c: Likewise.
61844         * lib/vma-iter.c: Likewise.
61845         * lib/wcsrtombs-state.c: Likewise.
61846         * m4/acl.m4: Likewise.
61847         * m4/acosl.m4: Likewise.
61848         * m4/asinl.m4: Likewise.
61849         * m4/atanl.m4: Likewise.
61850         * m4/c-stack.m4: Likewise.
61851         * m4/cosl.m4: Likewise.
61852         * m4/expl.m4: Likewise.
61853         * m4/extensions.m4: Likewise.
61854         * m4/fdatasync.m4: Likewise.
61855         * m4/fmal.m4: Likewise.
61856         * m4/frexp.m4: Likewise.
61857         * m4/frexpf.m4: Likewise.
61858         * m4/frexpl.m4: Likewise.
61859         * m4/fsusage.m4: Likewise.
61860         * m4/getdomainname.m4: Likewise.
61861         * m4/getloadavg.m4: Likewise.
61862         * m4/getopt.m4: Likewise.
61863         * m4/gettext.m4: Likewise.
61864         * m4/gnulib-common.m4: Likewise.
61865         * m4/intdiv0.m4: Likewise.
61866         * m4/intlmacosx.m4: Likewise.
61867         * m4/largefile.m4: Likewise.
61868         * m4/ldexpl.m4: Likewise.
61869         * m4/link-follow.m4: Likewise.
61870         * m4/locale-ar.m4: Likewise.
61871         * m4/locale-fr.m4: Likewise.
61872         * m4/locale-ja.m4: Likewise.
61873         * m4/locale-tr.m4: Likewise.
61874         * m4/locale-zh.m4: Likewise.
61875         * m4/locale_h.m4: Likewise.
61876         * m4/lock.m4: Likewise.
61877         * m4/logl.m4: Likewise.
61878         * m4/mathfunc.m4: Likewise.
61879         * m4/minus-zero.m4: Likewise.
61880         * m4/mktime.m4: Likewise.
61881         * m4/mmap-anon.m4: Likewise.
61882         * m4/multiarch.m4: Likewise.
61883         * m4/nanosleep.m4: Likewise.
61884         * m4/nocrash.m4: Likewise.
61885         * m4/poll.m4: Likewise.
61886         * m4/printf-frexpl.m4: Likewise.
61887         * m4/printf.m4: Likewise.
61888         * m4/signbit.m4: Likewise.
61889         * m4/sinl.m4: Likewise.
61890         * m4/sqrtl.m4: Likewise.
61891         * m4/strerror_r.m4: Likewise.
61892         * m4/tanl.m4: Likewise.
61893         * m4/threadlib.m4: Likewise.
61894         * m4/ttyname_r.m4: Likewise.
61895         * m4/unlink.m4: Likewise.
61896         * m4/visibility.m4: Likewise.
61897         * m4/wcwidth.m4: Likewise.
61898         * tests/minus-zero.h: Likewise.
61899         * tests/test-alloca-opt.c: Likewise.
61900         * tests/test-copy-acl.sh: Likewise.
61901         * tests/test-copy-file.sh: Likewise.
61902         * tests/test-fdatasync.c: Likewise.
61903         * tests/test-file-has-acl.sh: Likewise.
61904         * tests/test-flock.c: Likewise.
61905         * tests/test-fsync.c: Likewise.
61906         * tests/test-localename.c: Likewise.
61907         * tests/test-malloca.c: Likewise.
61908         * tests/test-nonblocking-pipe.h: Likewise.
61909         * tests/test-nonblocking-socket.h: Likewise.
61910         * tests/test-openpty.c: Likewise.
61911         * tests/test-posix_openpt.c: Likewise.
61912         * tests/test-ptsname.c: Likewise.
61913         * tests/test-ptsname_r.c: Likewise.
61914         * tests/test-sameacls.c: Likewise.
61915         * tests/test-select.h: Likewise.
61916         * tests/test-set-mode-acl.sh: Likewise.
61917         * tests/test-snprintf-posix.h: Likewise.
61918         * tests/test-sprintf-posix.h: Likewise.
61919         * tests/test-strtod.c: Likewise.
61920         * tests/test-time.c: Likewise.
61921         * tests/test-vasnprintf-posix.c: Likewise.
61922         * tests/test-vasprintf-posix.c: Likewise.
61923         * doc/acl-resources.txt: Likewise.
61924         * doc/**/*.texi: Likewise.
61925         Reported by Max Horn <max@quendi.de>.
61927 2012-06-22  Bruno Haible  <bruno@clisp.org>
61929         grantpt: Relax requirement regarding invalid file descriptors.
61930         * lib/grantpt.c: Don't include <fcntl.h>.
61931         (grantpt): Don't verify the validity of the file descriptor.
61932         * modules/grantpt (Depends-on): Remove fcntl-h.
61933         * tests/test-grantpt.c (main): Allow grantpt to succeed for invalid
61934         file descriptors.
61935         * doc/posix-functions/grantpt.texi: Document more platforms on which
61936         grantpt succeeds for invalid file descriptors.
61937         Reported by Rich Felker <dalias@aerifal.cx>.
61939 2012-06-22  Bruno Haible  <bruno@clisp.org>
61941         fbufmode test: Don't test unportable behaviour.
61942         * tests/test-fbufmode.c (test_mode): New function, extracted from main.
61943         (main): Invoke it three times.
61944         Reported by Szabolcs Nagy <nsz@port70.net>
61945         and Rich Felker <dalias@aerifal.cx>.
61947 2012-06-21  Bruno Haible  <bruno@clisp.org>
61949         gnulib-tool: Refactor inctests variable.
61950         * gnulib-tool: Normalize inctests to 'true' or 'false', not ''.
61951         (func_modules_transitive_closure,
61952         func_modules_transitive_closure_separately,
61953         func_import, func_create_testdir): Update.
61955         gnulib-tool: --create-[mega]testdir, --[mega]test implies --with-tests.
61956         * gnulib-tool: Accept option --without-tests.
61957         (func_usage): Document --without-tests option. Rearrange.
61958         (inctests): Normalize according to the mode.
61959         * NEWS: Mention the change.
61960         Suggested by Simon Josefsson.
61962 2012-06-21  Bruce Korb  <bkorb@gnu.org>
61964         parse-duration test: Avoid spurious output.
61965         * tests/test-parse-duration.sh: Reindent with leading tabs.
61967 2012-06-21  Jim Meyering  <meyering@redhat.com>
61969         maint: disable the strncpy prohibition
61970         * cfg.mk: Do not prohibit strncpy here.
61972 2012-06-21  Bruno Haible  <bruno@clisp.org>
61974         nonblocking: Avoid compilation error on mingw64.
61975         * m4/stdio_h.m4 (gl_STDIO_H): Invoke gl_MODULE_INDICATOR for scanf,
61976         fscanf.
61977         * modules/vscanf (configure.ac): Invoke gl_MODULE_INDICATOR.
61978         * modules/vfscanf (configure.ac): Likewise.
61979         * lib/stdio-read.c (scanf, fscanf, vscanf, vfscanf): Enable function
61980         definition only if stdio.h has prepared it.
61981         Reported by Daniel P. Berrange <berrange@redhat.com>.
61983 2012-06-20  Bernd Jendrissek  <bernd.jendrissek@gmail.com>  (tiny change)
61985         gnulib-tool: Use readlink if it is available.
61986         * gnulib-tool (func_readlink): Choose function more appropriately.
61988 2012-06-21  Paul Eggert  <eggert@cs.ucla.edu>
61990         posixtm-tests: port to buggy compiler
61991         Problem reported by Simon Josefsson in
61992         <http://lists.gnu.org/r/bug-gnulib/2012-06/msg00246.html>.
61993         * modules/posixtm-tests (Depends-on): Add stdint.
61994         * tests/test-posixtm.c (struct posixtm_test.t_expected):
61995         Now of type int_least64_t, not int64_t, both because that's
61996         what INT64_C returns and because int_least64_t works even
61997         on 72-bit hosts.
61998         (T): Use INT64_C on constants outside the traditional int range,
61999         to work around compiler bug noted by Simon.
62001         mktime: fix integer overflow in 'configure'-time test
62002         * m4/mktime.m4 (gl_FUNC_MKTIME): Do not rely on undefined behavior
62003         after integer overflow.  Problem reported by Rich Felker in
62004         <http://lists.gnu.org/r/bug-gnulib/2012-06/msg00257.html>.
62005         Also, don't look for further instances of a bug if we've already
62006         found one instance; this helps 'configure' run faster.
62008 2012-06-20  John Darrington  <john@darrington.wattle.id.au>  (tiny change)
62010         tmpfile, clean-temp: Fix invocation of GetVersionEx.
62011         * lib/tmpfile.c (supports_delete_on_close): Initialize parameter for
62012         GetVersionEx correctly.
62013         * lib/clean-temp.c (supports_delete_on_close): Likewise.
62015 2012-06-20  Bruno Haible  <bruno@clisp.org>
62017         fdopen: Allow implementations that don't reject invalid fd arguments.
62018         * m4/fdopen.m4 (gl_FUNC_FDOPEN): Let the test pass if fdopen(-1,...)
62019         succeeds.
62020         Reported by Rich Felker <dalias@aerifal.cx>.
62022 2012-06-20  Simon Josefsson  <simon@josefsson.org>
62024         * modules/parse-duration-tests (test_parse_duration_LDADD): Don't
62025         bring in LIBINTL.
62027 2012-06-20  Paul Eggert  <eggert@cs.ucla.edu>
62029         init.sh: do not rely on autoupated PWD
62030         This addresses symptoms of the problem reported by Nelson H.F. Beebe in
62031         <http://lists.gnu.org/r/bug-gzip/2012-06/msg00008.html>.
62032         Although Nelson's bug was not necessarily fixed by this patch,
62033         it seems wise to make the change for safety.
62034         * tests/init.sh (path_prepend_): Do not rely on PWD updating
62035         automagically after 'cd'; this is not reliable on older shells.
62036         (setup_): Fail if we cannot cd to temporary directory.
62038 2012-06-19  Bruno Haible  <bruno@clisp.org>
62040         stat, fstat: Avoid warnings on mingw64.
62041         * lib/stat.c (stat) [_GL_WINDOWS_64_BIT_ST_SIZE]: Undefine before
62042         redefining.
62043         * lib/fstat.c (stat, fstat) [_GL_WINDOWS_64_BIT_ST_SIZE]: Likewise.
62044         Reported by Daniel P. Berrange <berrange@redhat.com>.
62046 2012-06-19  Bruno Haible  <bruno@clisp.org>
62048         stdioext: Add support for musl libc.
62050         * m4/fbufmode.m4 (gl_FUNC_FBUFMODE): Test whether __fbufsize exists.
62051         * lib/fbufmode.c (fbufmode): Add conditional code for musl.
62053         * m4/fseterr.m4: New file.
62054         * lib/fseterr.h (fseterr): Define as an alias of __fseterr if that
62055         function exists.
62056         * modules/fseterr (Files): Add m4/fseterr.m4.
62057         (configure.ac): Invoke gl_FUNC_FSETERR. Compile fseterr.c if
62058         __fseterr does not exist.
62059         (Makefile.am): Remove fseterr.c from lib_SOURCES.
62061         * lib/freadable.h: Update comment.
62063         * lib/fwritable.h: Update comment.
62065         * lib/freading.h: Update comment.
62067         * lib/fwriting.h: Update comment.
62069         * m4/freadahead.m4: New file.
62070         * lib/freadahead.h (freadahead): Define as an alias of __freadahead if
62071         that function exists.
62072         * modules/freadahead (Files): Add m4/freadahead.m4.
62073         (configure.ac): Invoke gl_FUNC_FREADAHEAD. Compile freadahead.c if
62074         __freadahead does not exist.
62075         (Makefile.am): Remove freadahead.c from lib_SOURCES.
62077         * m4/freadptr.m4: New file.
62078         * lib/freadptr.h (freadptr): Define as an alias of __freadptr if that
62079         function exists.
62080         * modules/freadptr (Files): Add m4/freadptr.m4.
62081         (configure.ac): Invoke gl_FUNC_FREADPTR. Compile freadptr.c if
62082         __freadptr does not exist.
62083         (Makefile.am): Remove freadptr.c from lib_SOURCES.
62085         * m4/freadseek.m4: New file.
62086         * lib/freadseek.c (freadptrinc): Use __freadptrinc if that function
62087         exists.
62088         * modules/freadseek (Files): Add m4/freadseek.m4.
62089         (configure.ac): Invoke gl_FUNC_FREADSEEK.
62091         * lib/fpurge.c (fpurge): Update comment.
62093         Reported by and with help from Rich Felker <dalias@aerifal.cx>.
62095 2012-06-19  Bruno Haible  <bruno@clisp.org>
62097         *printf-posix: Put more info into config.log.
62098         * m4/printf.m4 (gl_PRINTF_ENOMEM): Emit conftest's error output and
62099         exit code into config.log.
62101 2012-06-19  Bruno Haible  <bruno@clisp.org>
62103         getopt-gnu: Fix exit code overflow in autoconf test.
62104         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Squash exit code values,
62105         to keep them below < 128.
62107 2012-06-17  Jim Meyering  <meyering@redhat.com>
62109         maint.mk: fix typo in code to derive GPG key at release time
62110         * top/maint.mk (gpg_key_ID): Fix typo: $3 -> $$3
62112 2012-06-17  Paul Eggert  <eggert@cs.ucla.edu>
62114         regex: avoid warning when pointers are not long
62115         * lib/regcomp.c (parse_dup_op, mark_opt_subexp): Cast between void *
62116         and uintptr_t, not long, for portability to hosts where pointers and
62117         long have different sizes.  Issue noted by Daniel P. Berrange in
62118         <http://lists.gnu.org/r/bug-gnulib/2012-06/msg00122.html>
62119         and fix suggested by Bruno Haible in
62120         <http://lists.gnu.org/r/bug-gnulib/2012-06/msg00128.html>.
62122 2012-06-17  Bruno Haible  <bruno@clisp.org>
62124         dummy: Relicense into the public domain.
62125         * modules/dummy (License): Set to "public domain".
62126         Suggested by Reuben Thomas.
62128 2012-06-12  Akim Demaille  <akim@lrde.epita.fr>
62130         announce-gen: VPATH issues
62131         * build-aux/announce-gen (--srcdir): New option, used to trim the
62132         $srcdir part of the path from $builddir to NEWS.
62133         * top/maint.mk (announcement): Adjust.
62135 2012-06-12  Akim Demaille  <akim@lrde.epita.fr>
62137         gnu-web-doc-update: VPATH builds
62138         * build-aux/gnu-web-doc-update (--builddir): New option.
62139         Revamp the handling of options.
62140         Prefer $(...) to `...`.
62141         Don't pass --tmpdir=. to mktemp, it is useless given that we specify
62142         the template, and it is GNU mktemp specific.
62143         Prefer set -e to long series of &&.
62144         Restore the initial git branch, not "master".
62145         Properly initialize submodules (don't rely only on bootstrap).
62146         Do not reconfigure blindly, use config.status.
62147         * top/README-release: Update instructions for gnu-web-doc-update.
62149 2012-06-11  Jim Meyering  <meyering@redhat.com>
62151         maint.mk: revert most of the previous change re "all these"
62152         * top/maint.mk (prohibit_undesirable_word_seq_RE_): Remove that pair.
62153         For rationale, see the discussion at
62154         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/30912
62156 2012-06-10  Karl Berry  <karl@gnu.org>
62158         * build-aux/gnupload: with --dry-run, do not ask for gpg pw.
62160         * build-aux/gnupload: implement --replace, ftp-upload protocol v1.2.
62162 2012-06-10  Bruce Korb  <bkorb@gnu.org>
62164         parse-duration: Relicense under LGPLv2+.
62165         * modules/parse-duration (License): Change to LGPLv2+.
62167 2012-06-10  Jim Meyering  <meyering@redhat.com>
62169         maint.mk: prohibit common grammar error: "all these"
62170         * top/maint.mk (prohibit_undesirable_word_seq_RE_): Add "all these" to
62171         the list of prohibited word sequences.  It should be "all of these".
62172         * lib/tempname.c (__gen_tempname): Fix one of them.
62174 2012-06-07  Akim Demaille  <akim@lrde.epita.fr>
62176         do-release-commit-and-tag: support VPATH builds
62177         * build-aux/do-release-commit-and-tag: Prefer $(...) to `...`.
62178         (noteworthy): Defined earlier to factor its value.
62179         (noteworthy_stub): New.
62180         Use it to factor.
62181         (help_version): Split into...
62182         (help, version): these.
62183         Adjust the option processing part.
62184         Support "--option=value" in addition to "--option value".
62185         (builddir): New.
62186         (--builddir): New option.
62187         * top/README-release: Document this.
62188         Reword slightly so that the reader cannot understand that he
62189         has to do these steps before calling do-release-commit-and-tag.
62191 2012-06-07  Akim Demaille  <akim@lrde.epita.fr>
62193         readme-release: also require announce-gen and maintainer-makefile
62194         * modules/readme-release (Depends-on): here.
62195         * modules/announce-gen, modules/do-release-commit-and-tag,
62196         modules/gnu-web-doc-update, modules/maintainer-makefile
62197         (Description): Point to readme-release.
62199 2012-06-07  Akim Demaille  <akim@lrde.epita.fr>
62201         maint.mk: fix VPATH issues.
62202         * top/maint.mk (news-check): GNU Make understand $< very well.
62203         (release-prep): NEWS is in $(srcdir).
62205 2012-06-05  Akim Demaille  <akim@lrde.epita.fr>
62207         readme-release: require the promoted modules.
62208         * modules/readme-release (Depends-on): Add
62209         do-release-commit-and-tag, gnupload, and gnu-web-doc-update, used
62210         in this text.
62212 2012-05-21  Paolo Bonzini  <bonzini@gnu.org>
62213             Bruno Haible  <bruno@clisp.org>
62215         error, strerror-override: Support mingw64 from Fedora 17.
62216         * lib/errno.in.h (GNULIB_defined_ESTREAMS): Use a different indicator
62217         for ETXTBSY, ENODATA, ENOSR, ENOSTR, ETIME, EOTHER, compared to
62218         EINPROGRESS.
62219         * lib/strerror-override.h (strerror_override): Test it.
62220         * lib/strerror-override.c (strerror_override): Likewise.
62221         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Test also ETXTBSY.
62223 2012-05-21  Paolo Bonzini  <bonzini@gnu.org>
62224             Bruno Haible  <bruno@clisp.org>
62226         error, strerror-override: Support mingw64 from Fedora 17.
62227         * lib/errno.in.h (GNULIB_defined_ENOTRECOVERABLE): Use a different
62228         indicator for ENOTRECOVERABLE, compared to EOWNERDEAD.
62229         * lib/strerror-override.h (strerror_override): Test it.
62230         * lib/strerror-override.c (strerror_override): Likewise.
62232 2012-06-03  Bruno Haible  <bruno@clisp.org>
62234         error, strerror-override: Support new errno values from POSIX:2008.
62235         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Test also EOWNERDEAD and
62236         ENOTRECOVERABLE.
62237         * lib/errno.in.h (EOWNERDEAD, ENOTRECOVERABLE): Define on all
62238         platforms.
62239         * lib/strerror-override.c (strerror_override): Conditionalize the
62240         EOWNERDEAD, ENOTRECOVERABLE handling on GNULIB_defined_EOWNERDEAD.
62241         * lib/strerror-override.h (strerror_override): Declare also if
62242         GNULIB_defined_EOWNERDEAD is defined.
62243         * tests/test-errno.c (e130, e131): New variables.
62244         * doc/posix-headers/errno.texi: Mention the status for EOWNERDEAD,
62245         ENOTRECOVERABLE.
62246         Reported by Paolo Bonzini.
62248 2012-05-31  Jim Meyering  <meyering@redhat.com>
62250         savewd: add missing dependency on sys_wait module
62251         * modules/savewd (Depends-on): Add sys_wait, needed at least
62252         for MSVC.  Report and suggested change by Michael Goffioul.
62254 2012-05-29  Paul Eggert  <eggert@cs.ucla.edu>
62256         system-quote-tests: port to CentOS 5
62257         Problem reported by Tom G. Christensen in
62258         <http://lists.gnu.org/r/bug-gnulib/2012-05/msg00255.html>.
62259         * tests/test-system-quote-child.c (fclose, fprintf): Undef.
62261 2012-05-29  Jim Meyering  <meyering@redhat.com>
62263         maint: fix typos in comments and ChangeLog
62264         Culprits identified and fixed mostly automatically using these commands:
62265         git ls-files | misspellings -f - |grep -v '^ERROR:' |perl -pe \
62266         's/^(.*?)\[(\d+)\]: (\w+) -> "(.*?)"$/sed -i '\''${2}s!$3!$4!'\'' $1/'
62267         using http://github.com/lyda/misspell-check
62268         * ChangeLog: Fix typos.
62269         * doc/solaris-versions: Likewise.
62270         * lib/regexec.c (re_search_stub): Likewise.
62271         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Likewise.
62273 2012-05-27  Paul Eggert  <eggert@cs.ucla.edu>
62275         manywarnings: remove duplicate -Wmultichar entry
62276         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Remove duplicate
62277         entry for -Wmultichar.  -Wno-multichar is in the GCC 4.7.0 manual,
62278         so keep the entry marked as documented.
62280 2012-05-27  Karl Berry  <karl@gnu.org>
62282         * config/srclist.txt (mktime.c): remove last libc sync,
62283         perhaps just temporarily.
62285 2012-05-26  Paul Eggert  <eggert@cs.ucla.edu>
62287         regex: don't assume uint64_t or uint32_t
62288         * lib/regcomp.c (init_word_char): Don't assume that the types
62289         uint64_t and uint32_t exist.  The C standard doesn't guarantee
62290         them, and on some 32-bit compilers there is no uint64_t.
62291         Problem reported by Gianluigi Tiesi in
62292         <http://lists.gnu.org/r/bug-gnulib/2012-03/msg00154.html>.
62294 2012-05-25  Jim Meyering  <meyering@redhat.com>
62296         maint.mk: add strncpy-prohibiting syntax-check rule
62297         * top/maint.mk (sc_prohibit_strncpy): New rule, from coreutils.
62299 2012-05-24  Jim Meyering  <meyering@redhat.com>
62301         maint.mk: compute $(gpg_key_ID) more portably
62302         * top/maint.mk (gpg_key_ID): Use awk in place of sed '{...;...;}'.
62303         That use of sed is not portable to some fringe systems.
62304         Reported by Paul Eggert in
62305         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/30793/focus=30802
62307 2012-05-23  Paul Eggert  <eggert@cs.ucla.edu>
62309         mktime: sync from glibc
62310         * config/srclist.txt: Uncomment mktime.c.
62311         * lib/mktime.c: Sync from glibc master.  This incorporates 3 changes.
62312         First, indent with tabs, since glibc uses tabs and doesn't want to
62313         change and we'd rather be identical to glibc.  Also, two small
62314         coding changes:
62315         (isdst_differ): Use &&, not &, as && is the usual style.
62316         (__mktime_internal): Rename local var from abs_diff to approx_abs_diff
62317         for clarity.
62319 2012-05-23  Akim Demaille  <akim@lrde.epita.fr>
62321         announce-gen: du -h is more portable than du --human
62322         * build-aux/announce-gen (sizes): Invoke du with -h instead
62323         of --human.  Accept leading white space in its output.
62325 2012-05-23  Akim Demaille  <akim@lrde.epita.fr>
62327         announce-gen: Improve diagnostics.
62328         * build-aux/announce-gen: When parsing command line options,
62329         prefer "announce-gen: option --release-type requires an argument"
62330         to "Option release-type requires an argument".
62332 2012-05-23  Akim Demaille  <akim@lrde.epita.fr>
62334         maint.mk: gpg_key_ID: use sed more portably
62335         * top/maint.mk (gpg_key_ID): End sed block with a semicolon before
62336         the closing brace.
62337         (refresh-po): Fuse two sed invocations into one.
62339 2012-05-15  Akim Demaille  <akim@lrde.epita.fr>
62341         gitlog-to-changelog: support the log message format used in Bison.
62342         * build-aux/gitlog-to-changelog: Support --strip-tab and
62343         --strip-cherry-picked.
62345 2012-05-21  Paolo Bonzini  <bonzini@gnu.org>
62347         poll/select: prevent busy-waiting.  SwitchToThread() only gives away
62348         the rest of the current time slice to another thread in the current
62349         process. So if the thread that feeds the file decscriptor we're
62350         polling is not in the current process, we get busy-waiting.
62351         * lib/poll.c: Use SleepEx(1, TRUE) instead of SwitchToThread().
62352         Patch from Theodore Leblond.
62353         * lib/select.c: Split polling out of the loop that sets the output
62354         fd_sets.  Check for zero result and loop if the wait timeout is
62355         infinite.
62357 2012-05-21  Simon Josefsson  <simon@josefsson.org>
62359         select: Fix build error on IRIX 6.5.
62360         * lib/select.c: Include stddef.h for NULL.
62362 2012-05-21  Simon Josefsson  <simon@josefsson.org>
62364         gc: fix libgcrypt detection on older machines.
62365         * m4/gc.m4: Reject libgcrypt earlier than 1.4.4.  Collapse
62366         copyright years because the file has been distributed every year
62367         since it was created.
62369 2012-05-18  Paul Eggert  <eggert@cs.ucla.edu>
62371         crypto: fix bug in large buffer handling
62372         Problem reported by Serge Belyshev for glibc in
62373         <http://sourceware.org/bugzilla/show_bug.cgi?id=14090> and for gnulib in
62374         <http://lists.gnu.org/r/bug-gnulib/2012-05/msg00226.html>.
62375         * lib/md4.c (md4_process_block):
62376         * lib/md5.c (md5_process_block):
62377         * lib/sha1.c (sha1_process_block):
62378         * lib/sha256.c (sha256_process_block):
62379         Don't assume the buffer length is less than 2**32.
62380         * lib/sha512.c (sha512_process_block): Likewise.
62381         Here, the bug is present only in the rare case where the host does
62382         not support uint64_t or where size_t is wider than 64 bits.
62383         Use u64size to work around the problems.
62384         * lib/u64.h (u64size): New macro.
62386 2012-05-15  Pádraig Brady  <P@draigBrady.com>
62388         fsusage: fix block size returned on older Linux 2.6
62390         * lib/fsusage.c: Fall back to (struct statfs).f_frsize
62391         which is available since Linux 2.6.
62392         * m4/fsusage.m4 (STAT_STATFS2_FRSIZE): Always define
62393         when the member is available so it can be used as a fallback.
62394         * doc/posix-functions/statvfs.texi: Mention the hang issue
62395         on Linux < 2.6.36.
62397 2012-05-14  Paul Eggert  <eggert@cs.ucla.edu>
62399         bootstrap: suppress stderr chatter
62400         * build-aux/bootstrap (insert_sorted_if_absent, main program):
62401         Omit unnecessary chatter to stderr.  The main program chatter
62402         was there only inadvertantly.
62404         bootstrap: .gitignore files created by autopoint, libtool
62405         I ran into this problem when bootstrapping the latest diffutils.
62406         After './bootstrap', 'git status' reported lots of untracked files
62407         m4/codeset.m4, m4/gettext.m4, etc.  These files were created by
62408         autopoint and do not need to be version-controlled.
62409         * build-aux/bootstrap: Put into .gitignore the files that
62410         autopoint and libtool create, by keeping track of files that exist
62411         after but not before these programs are run.
62412         (version_controlled_file): Move up.  2nd arg is now full file
62413         name, not base name; this is more convenient.  Put CVS at the end,
62414         as it's now somewhat deprecated.
62416 2012-05-14  Jim Meyering  <meyering@redhat.com>
62418         ignore-value.h: remove unused _GL_ATTRIBUTE_DEPRECATED definition
62419         * lib/ignore-value.h (_GL_ATTRIBUTE_DEPRECATED): Remove now-unused
62420         definition.  Reported by Bruno Haible.
62422 2012-05-13  Bruno Haible  <bruno@clisp.org>
62423             Paul Eggert  <eggert@cs.ucla.edu>
62425         binary-io: Define set_binary_mode function.
62426         * lib/binary-io.h (set_binary_mode): New function.
62427         (SET_BINARY): Define in terms of set_binary_mode.
62428         * modules/binary-io (configure.ac): Require AC_C_INLINE.
62429         * tests/test-binary-io.c (main): Accept an argument, and test either
62430         set_binary_mode or SET_BINARY depending on the argument.
62431         * tests/test-binary-io.sh: Invoke test-binary-io twice, with an
62432         argument. Clean up also t-bin-out0.tmp.
62434 2012-05-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
62436         bootstrap: take advantage of POSIX shell features
62438         The 'bootstrap' script offered by Gnulib script already uses POSIX
62439         shell features (like $((...)) arithmetic expansions) that are not
62440         supported by legacy Bourne shells like Solaris 10 /bin/sh.  This
62441         means that bootstrap must already be run using a proper POSIX shell,
62442         which will thus provide more features, like ${var#pattern} parameter
62443         expansion or inversion of a command exit status with '!'.  We can
62444         thus use these features to improve the clarity and the performances
62445         of the bootstrap script.
62447         Suggested by Eric Blake.
62449         * build-aux/bootstrap: Prefer xpg4 parameter expansions over use
62450         of sed/expr plus command substitutions, to save some forks.  While
62451         we are at it, prefer the POSIX $(...) form of command substitution,
62452         rather than the legacy form `...` (since the former is visually
62453         clearer and interacts better with quoting), and prefer the idiom:
62454           "if ! CMD; then ACTION ..."
62455         over the idiom:
62456           "if CMD; then :; else ACTION ..."
62457         which was required by legacy Bourne shells not supporting '!'.
62459 2012-05-12  Bruno Haible  <bruno@clisp.org>
62461         system-quote: Add more comments.
62462         * lib/system-quote.h: Add more comments about wilcards and limitations.
62463         Suggested by Eli Zaretskii <eliz@gnu.org>.
62465         sh-quote, system-quote: Add comments about wildcards.
62466         * lib/sh-quote.h: Clarify what happens with wildcard characters.
62467         * lib/system-quote.h: Likewise.
62468         Reported by Eli Zaretskii <eliz@gnu.org>.
62470 2012-05-11  Paul Eggert  <eggert@cs.ucla.edu>
62472         fsusage: check for GNU/Linux statvfs problem dynamically
62473         * lib/fsusage.c [STAT_STATVFS && __linux__ && (__GLIBC__||__UCLIBC__)]:
62474         Define STAT_STATFS2_BSIZE too, since in this case the code now
62475         checks dynamically whether statvfs is reliable, falling back on
62476         Linux-style statfs otherwise.
62477         (statvfs_works): New function, for dynamically testing statvfs.
62478         (get_fs_usage) [STAT_STATVFS]: Use it.
62479         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Remove static check for
62480         statvfs on GNU/Linux hosts, since it's now done dynamically.
62482 2012-05-10  Bruno Haible  <bruno@clisp.org>
62484         system-quote, execute, spawn-pipe: Escape '?' on Windows.
62485         * lib/system-quote.c (SHELL_SPECIAL_CHARS, CMD_SPECIAL_CHARS): Add the
62486         '?' character.
62487         * lib/w32spawn.h (SHELL_SPECIAL_CHARS): Likewise.
62488         * tests/test-system-quote-main.c (check_all): Check also strings like
62489         "??????????".
62490         Reported by Eli Zaretskii <eliz@gnu.org>.
62492 2012-05-10  Paul Eggert  <eggert@cs.ucla.edu>
62494         _Noreturn: port config.h to gcc -Wundef
62495         * m4/gnulib-common.m4 (gl_COMMON_BODY): Check that __STDC_VERSION__ is
62496         defined before using it, for gcc -Wundef.  Reported by Akim Demaille in
62497         <http://lists.gnu.org/r/bug-gnulib/2012-05/msg00147.html>.
62499 2012-05-10  Bruno Haible  <bruno@clisp.org>
62501         system-quote: Refactor.
62502         * lib/system-quote.h (system_quote_copy): Fix comment.
62503         * lib/system-quote.c (windows_createprocess_quote, windows_cmd_quote):
62504         New functions, extracted from system_quote_copy.
62505         (system_quote_length, system_quote_copy): Use these functions.
62506         Reported by Paul Eggert.
62508 2012-05-08  Bruno Haible  <bruno@clisp.org>
62510         execute, spawn-pipe: Escape '*' characters in arguments on Windows.
62511         * lib/w32spawn.h (SHELL_SPECIAL_CHARS): Add the '*' character.
62513 2012-05-08  Bruno Haible  <bruno@clisp.org>
62515         Tests for module 'system-quote'.
62516         * modules/system-quote-tests: New file.
62517         * tests/test-system-quote.sh: New file.
62518         * tests/test-system-quote-main.c: New file.
62519         * tests/test-system-quote-child.c: New file.
62521         New module 'system-quote'.
62522         * lib/system-quote.h: New file.
62523         * lib/system-quote.c: New file.
62524         * modules/system-quote: New file.
62526 2012-05-08  Bruno Haible  <bruno@clisp.org>
62528         sh-quote: Make C++ safe and allow multiple inclusion.
62529         * lib/sh-quote.h: Add double-inclusion guard. For C++, wrap function
62530         declarations in extern "C".
62532 2012-05-08  Bruno Haible  <bruno@clisp.org>
62534         sh-quote tests: Make tests stricter.
62535         * tests/test-sh-quote.c (check_one): Check the return value of
62536         shell_quote_copy.
62537         (main): Check a string with a CR character. Check a string that
62538         contains UCHAR_MAX.
62540 2012-05-08  Akim Demaille  <akim@lrde.epita.fr>
62542         warnings.m4: provide a means to specify the program to compile.
62543         * m4/warnings.m4 (gl_COMPILER_OPTION_IF): New, extracted from...
62544         (gl_WARN_ADD): here.
62545         Use gl_AS_VAR_APPEND.
62546         Support an argument to specify the program to compile.
62547         (gl_WARN_ADD): Accept an argument to specify the program to compile.
62548         AC_SUBST the WARN_CFLAGS when they are used.
62549         * modules/warnings (configure.ac): Don't AC_SUBST WARN_CFLAGS,
62550         leave this to gl_WARN_ADD.
62552 2012-05-08  Eric Blake  <eblake@redhat.com>
62554         doc: recommendations on gettext version
62555         * doc/gnulib-tool.texi (gettextize and autopoint): Document the
62556         choice between versions.
62557         * DEPENDENCIES (gettext): Cover both approaches.
62559 2012-05-08  Jim Meyering  <meyering@redhat.com>
62561         init.sh: explain why EXEEXT support uses aliases rather than functions
62562         * tests/init.sh: Add a comment.
62564         init.sh: don't let bash aliases interfere with tests
62565         * tests/init.sh: Undefine any pre-defined aliases if the selected shell
62566         is bash.  This avoids problems for those who alias standard commands to
62567         non-conforming uses, like those reported in http://bugs.gnu.org/11256.
62568         Suggested by Tim Mooney <Tim.Mooney@ndsu.edu>.
62570 2012-05-07  Paul Eggert  <eggert@cs.ucla.edu>
62572         stdint: be more consistent with glibc, SunOS libc
62573         * lib/stdint.in.h (gl_int_fast8_t, gl_uint_fast8_t)
62574         (gl_int_fast16_t, gl_uint_fast16_t)
62575         (gl_int_fast32_t, gl_uint_fast32_t)
62576         (INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX)
62577         (INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX)
62578         (INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
62579         Be consistent with glibc by default, and with SunOS 5.10 and later
62580         if __sun is defined.  This lessens the likelihood of clashes if
62581         code compiled for older hosts is combined with code compiled for
62582         newer ones.  Problem reported by Niels Möller in
62583         <http://lists.gnu.org/r/bug-gnulib/2012-05/msg00074.html>.
62585 2012-05-07  Eric Blake  <eblake@redhat.com>
62587         isatty: relax license to LGPLv2+
62588         * modules/isatty (License): Relax license.
62590 2012-05-06  Paul Eggert  <eggert@cs.ucla.edu>
62592         stat-size: comment fix
62593         * lib/stat-size.h: Remove obsolete comment about indenting.
62595 2012-05-06  Bruno Haible  <bruno@clisp.org>
62597         Tests for module 'sh-quote'.
62598         * modules/sh-quote-tests: New file.
62599         * tests/test-sh-quote.c: New file.
62601 2012-05-06  Bruno Haible  <bruno@clisp.org>
62603         sh-quote: Improve shell_quote_argv's signature.
62604         * lib/sh-quote.h (shell_quote_argv): Make argument array a 'const *'.
62605         * lib/sh-quote.c (shell_quote_argv): Likewise.
62607 2012-05-06  Paul Eggert  <eggert@cs.ucla.edu>
62609         stdint: document issues with int_fast8_t etc.
62610         * doc/posix-headers/stdint.texi (stdint.h): Say that other
62611         stdint.h substitutes may define these types differently.  See
62612         <http://lists.gnu.org/r/bug-gnulib/2012-05/msg00071.html>.
62614 2012-05-05  Bruno Haible  <bruno@clisp.org>
62616         nanosleep: Avoid guessing wrong when cross-compiling to Linux.
62617         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require AC_CANONICAL_HOST. When
62618         cross-compiling, set gl_cv_func_nanosleep to either 'guessing no'
62619         or 'guessing no (mishandles large arguments)'.
62621 2012-05-05  Bruno Haible  <bruno@clisp.org>
62623         link-follow: Avoid guessing wrong when cross-compiling to glibc/Linux.
62624         * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Require
62625         AC_CANONICAL_HOST. When cross-compiling to a glibc/Linux platform,
62626         set gl_cv_func_link_follows_symlink to "guessing no".
62628 2012-05-05  Bruno Haible  <bruno@clisp.org>
62630         tzset: Avoid guessing wrong when cross-compiling to glibc systems.
62631         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require AC_CANONICAL_HOST. When
62632         cross-compiling to a glibc platform, set gl_cv_func_tzset_clobber to
62633         "guessing no".
62634         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Update.
62636 2012-05-05  Bruno Haible  <bruno@clisp.org>
62638         d-ino: Avoid guessing "no" when cross-compiling to glibc/Linux systems.
62639         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Require
62640         AC_CANONICAL_HOST. When cross-compiling to a glibc/Linux platform,
62641         set gl_cv_struct_dirent_d_ino to "guessing yes".
62643 2012-05-05  Bruno Haible  <bruno@clisp.org>
62645         fseeko-tests, ftello-tests: Avoid "guessing no" when cross-compiling.
62646         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Require AC_CANONICAL_HOST. When
62647         cross-compiling to a glibc platform, set gl_cv_func_ungetc_works to
62648         "guessing yes".
62650 2012-05-05  Bruno Haible  <bruno@clisp.org>
62652         signbit: Avoid "guessing no" when cross-compiling to glibc systems.
62653         * m4/signbit.m4 (gl_SIGNBIT): Require AC_CANONICAL_HOST. When cross-
62654         compiling to a glibc system, set gl_cv_func_signbit and
62655         gl_cv_func_signbit_gcc to "guessing yes".
62657 2012-05-05  Bruno Haible  <bruno@clisp.org>
62659         strerror: Avoid "guessing no" when cross-compiling to glibc systems.
62660         * m4/strerror.m4 (gl_FUNC_STRERROR): Require AC_CANONICAL_HOST. When
62661         cross-compiling to a glibc platform, set gl_cv_func_working_strerror
62662         to "guessing yes".
62663         (gl_FUNC_STRERROR_0): Require AC_CANONICAL_HOST. When cross-compiling
62664         to a glibc platform, set gl_cv_func_strerror_0_works to "guessing yes".
62666 2012-05-05  Bruno Haible  <bruno@clisp.org>
62668         canonicalize[-lgpl]: Avoid "guessing no" when cross-compiling to glibc.
62669         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Require
62670         AC_CANONICAL_HOST. When cross-compiling to a glibc system, set
62671         gl_cv_func_realpath_works to "guessing yes".
62673 2012-05-05  Bruno Haible  <bruno@clisp.org>
62675         gettimeofday: Avoid bad guess when cross-compiling to glibc systems.
62676         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Require
62677         AC_CANONICAL_HOST. When cross-compiling, guess no on glibc platforms.
62679 2012-05-04  Bruno Haible  <bruno@clisp.org>
62681         Tweak last commit.
62682         * m4/off_t.m4 (gl_TYPE_OFF_T): Tweak comments.
62683         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
62685 2012-05-04  Paul Eggert  <eggert@cs.ucla.edu>
62687         unistd_h: make it easier to avoid sys_types_h
62688         This is useful for Emacs, which has its own method of porting to
62689         Windows, and which therefore does not need the sys_types_h module.
62690         * m4/off_t.m4: New file, defining gl_TYPE_OFF_T, which contains
62691         code moved here from gl_SYS_TYPES_H.
62692         * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Require it instead of
62693         using the code directly.
62694         * m4/unistd_h.m4 (gl_UNISTD_H): Require gl_TYPE_OFF_T, not
62695         gl_SYS_TYPES_H.
62696         * modules/sys_types (Files):
62697         * modules/unistd (Files): Add m4/off_t.m4.
62699 2012-05-03  Bruno Haible  <bruno@clisp.org>
62701         lstat: Avoid "guessing no" when cross-compiling to glibc systems.
62702         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): When cross-
62703         compiling, set gl_cv_func_lstat_dereferences_slashed_symlink to
62704         "guessing yes" or "guessing no".
62705         (gl_FUNC_LSTAT): Update.
62706         * m4/fstatat.m4 (gl_FUNC_FSTATAT): Update.
62707         * m4/openat.m4 (gl_FUNC_OPENAT): Update.
62708         * m4/unlinkat.m4 (gl_FUNC_UNLINKAT): Update.
62710 2012-05-03  Bruno Haible  <bruno@clisp.org>
62712         *alloc-gnu, eealloc: Avoid "guessing no" when cross-compiling to glibc.
62713         * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): Override in autoconf < 2.70.
62714         * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): Override in autoconf < 2.70.
62715         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Require AC_CANONICAL_HOST. When
62716         cross-compiling, choose the first alternative on glibc systems.
62717         * modules/eealloc (Files): Add m4/malloc.m4, m4/realloc.m4.
62719 2012-05-03  Bruno Haible  <bruno@clisp.org>
62721         getgroups: Avoid "guessing no" when cross-compiling to glibc systems.
62722         * m4/getgroups.m4 (AC_FUNC_GETGROUPS): Override in autoconf < 2.70.
62723         (gl_FUNC_GETGROUPS): Adapt to change of ac_cv_func_getgroups_works.
62725 2012-05-03  Bruno Haible  <bruno@clisp.org>
62727         chown: Avoid "guessing no" when cross-compiling to glibc systems.
62728         * m4/chown.m4 (AC_FUNC_CHOWN): Override in autoconf < 2.70.
62730 2012-05-03  Bruno Haible  <bruno@clisp.org>
62732         Avoid "guessing no" guesses when cross-compiling to glibc systems.
62733         * m4/cbrtl.m4 (gl_FUNC_CBRTL): Require AC_CANONICAL_HOST. When cross-
62734         compiling to glibc systems, set gl_cv_func_cbrtl_ieee to "guessing yes".
62735         * m4/ceil.m4 (gl_FUNC_CEIL): Require AC_CANONICAL_HOST. When cross-
62736         compiling to glibc systems, set gl_cv_func_ceil_ieee to "guessing yes".
62737         * m4/ceilf.m4 (gl_FUNC_CEILF): Require AC_CANONICAL_HOST. When cross-
62738         compiling to glibc systems, set gl_cv_func_ceilf_ieee to "guessing yes".
62739         * m4/ceill.m4 (gl_FUNC_CEILL): Require AC_CANONICAL_HOST. When cross-
62740         compiling to glibc systems, set gl_cv_func_ceill_ieee to "guessing yes".
62741         * m4/chown.m4 (gl_FUNC_CHOWN): Require AC_CANONICAL_HOST. When cross-
62742         compiling to glibc systems, set gl_cv_func_chown_slash_works,
62743         gl_cv_func_chown_ctime_works to "guessing yes".
62744         * m4/lchown.m4 (gl_FUNC_LCHOWN): Update.
62745         * m4/exp2l.m4 (gl_FUNC_EXP2L): Require AC_CANONICAL_HOST. When cross-
62746         compiling to glibc systems, set gl_cv_func_exp2l_ieee to "guessing yes".
62747         * m4/expm1.m4 (gl_FUNC_EXPM1): Require AC_CANONICAL_HOST. When cross-
62748         compiling to glibc systems, set gl_cv_func_expm1_ieee to "guessing yes".
62749         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require AC_CANONICAL_HOST. When cross-
62750         compiling to glibc systems, set gl_cv_func_open_directory_works to
62751         "guessing yes".
62752         * m4/fstat.m4 (gl_FUNC_FSTAT): Update.
62753         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Require AC_CANONICAL_HOST. When
62754         cross-compiling to glibc systems, set gl_cv_func_fdopendir_works to
62755         "guessing yes".
62756         * m4/floor.m4 (gl_FUNC_FLOOR): Require AC_CANONICAL_HOST. When cross-
62757         compiling to glibc systems, set gl_cv_func_floor_ieee to "guessing yes".
62758         * m4/floorf.m4 (gl_FUNC_FLOORF): Require AC_CANONICAL_HOST. When cross-
62759         compiling to glibc systems, set gl_cv_func_floorf_ieee to
62760         "guessing yes".
62761         * m4/fmod.m4 (gl_FUNC_FMOD): Require AC_CANONICAL_HOST. When cross-
62762         compiling to glibc systems, set gl_cv_func_fmod_ieee to "guessing yes".
62763         * m4/fmodf.m4 (gl_FUNC_FMODF): Require AC_CANONICAL_HOST. When cross-
62764         compiling to glibc systems, set gl_cv_func_fmodf_ieee to "guessing yes".
62765         * m4/fmodl.m4 (gl_FUNC_FMODL): Require AC_CANONICAL_HOST. When cross-
62766         compiling to glibc systems, set gl_cv_func_fmodl_ieee to "guessing yes".
62767         * m4/getgroups.m4 (gl_FUNC_GETGROUPS): Require AC_CANONICAL_HOST. When
62768         cross-compiling to glibc systems, set gl_cv_func_getgroups_works to
62769         "guessing yes".
62770         * m4/hypot.m4 (gl_FUNC_HYPOT): Require AC_CANONICAL_HOST. When cross-
62771         compiling to glibc systems, set gl_cv_func_hypot_ieee to "guessing yes".
62772         * m4/hypotf.m4 (gl_FUNC_HYPOTF): Require AC_CANONICAL_HOST. When cross-
62773         compiling to glibc systems, set gl_cv_func_hypotf_ieee to
62774         "guessing yes".
62775         * m4/hypotl.m4 (gl_FUNC_HYPOTL): Require AC_CANONICAL_HOST. When cross-
62776         compiling to glibc systems, set gl_cv_func_hypotl_ieee to
62777         "guessing yes".
62778         * m4/link.m4 (gl_FUNC_LINK): Require AC_CANONICAL_HOST. When cross-
62779         compiling to glibc systems, set gl_cv_func_link_works to "guessing yes".
62780         * m4/log.m4 (gl_FUNC_LOG): Require AC_CANONICAL_HOST. When cross-
62781         compiling to glibc systems, set gl_cv_func_log_ieee to "guessing yes".
62782         * m4/logf.m4 (gl_FUNC_LOGF): Require AC_CANONICAL_HOST. When cross-
62783         compiling to glibc systems, set gl_cv_func_logf_ieee to "guessing yes".
62784         * m4/log10.m4 (gl_FUNC_LOG10): Require AC_CANONICAL_HOST. When cross-
62785         compiling to glibc systems, set gl_cv_func_log10_ieee to "guessing yes".
62786         * m4/log10f.m4 (gl_FUNC_LOG10F): Require AC_CANONICAL_HOST. When cross-
62787         compiling to glibc systems, set gl_cv_func_log10f_ieee to
62788         "guessing yes".
62789         * m4/log1p.m4 (gl_FUNC_LOG1P): Require AC_CANONICAL_HOST. When cross-
62790         compiling to glibc systems, set gl_cv_func_log1p_ieee to "guessing yes".
62791         * m4/log1pf.m4 (gl_FUNC_LOG1PF): Require AC_CANONICAL_HOST. When cross-
62792         compiling to glibc systems, set gl_cv_func_log1pf_ieee to
62793         "guessing yes".
62794         * m4/log1pl.m4 (gl_FUNC_LOG1PL): Require AC_CANONICAL_HOST. When cross-
62795         compiling to glibc systems, set gl_cv_func_log1pl_ieee to
62796         "guessing yes".
62797         * m4/log2.m4 (gl_FUNC_LOG2): Require AC_CANONICAL_HOST. When cross-
62798         compiling to glibc systems, set gl_cv_func_log2_ieee to "guessing yes".
62799         * m4/log2f.m4 (gl_FUNC_LOG2F): Require AC_CANONICAL_HOST. When cross-
62800         compiling to glibc systems, set gl_cv_func_log2f_ieee to "guessing yes".
62801         * m4/mkdir.m4 (gl_FUNC_MKDIR): Require AC_CANONICAL_HOST. When cross-
62802         compiling to glibc systems, set gl_cv_func_mkdir_trailing_slash_works,
62803         gl_cv_func_mkdir_trailing_dot_works to "guessing yes".
62804         * m4/mkfifo.m4 (gl_FUNC_MKFIFO): Require AC_CANONICAL_HOST. When cross-
62805         compiling to glibc systems, set gl_cv_func_mkfifo_works to
62806         "guessing yes".
62807         * m4/mknod.m4 (gl_FUNC_MKNOD): Require AC_CANONICAL_HOST. When cross-
62808         compiling to glibc systems, set gl_cv_func_mknod_works to
62809         "guessing yes".
62810         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_CANONICAL_HOST. When
62811         cross-compiling to glibc systems, set gl_cv_func_working_mkstemp to
62812         "guessing yes".
62813         * m4/modf.m4 (gl_FUNC_MODF): Require AC_CANONICAL_HOST. When cross-
62814         compiling to glibc systems, set gl_cv_func_modf_ieee to "guessing yes".
62815         * m4/modff.m4 (gl_FUNC_MODFF): Require AC_CANONICAL_HOST. When cross-
62816         compiling to glibc systems, set gl_cv_func_modff_ieee to "guessing yes".
62817         * m4/modfl.m4 (gl_FUNC_MODFL): Require AC_CANONICAL_HOST. When cross-
62818         compiling to glibc systems, set gl_cv_func_modfl_ieee to "guessing yes".
62819         * m4/putenv.m4 (gl_FUNC_PUTENV): Require AC_CANONICAL_HOST. When cross-
62820         compiling to glibc systems, set gl_cv_func_svid_putenv to
62821         "guessing yes".
62822         * m4/readlink.m4 (gl_FUNC_READLINK): Require AC_CANONICAL_HOST. When
62823         cross-compiling to glibc systems, set gl_cv_func_readlink_works to
62824         "guessing yes".
62825         * m4/remainder.m4 (gl_FUNC_REMAINDER): Require AC_CANONICAL_HOST. When
62826         cross-compiling to glibc systems, set gl_cv_func_remainder_ieee to
62827         "guessing yes".
62828         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Require AC_CANONICAL_HOST.
62829         When cross-compiling to glibc systems, set gl_cv_func_remainderf_ieee
62830         to "guessing yes".
62831         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Require AC_CANONICAL_HOST.
62832         When cross-compiling to glibc systems, set gl_cv_func_remainderl_ieee
62833         to "guessing yes".
62834         * m4/rmdir.m4 (gl_FUNC_RMDIR): Require AC_CANONICAL_HOST. When cross-
62835         compiling to glibc systems, set gl_cv_func_rmdir_works to
62836         "guessing yes".
62837         * m4/unlink.m4 (gl_FUNC_UNLINK): Require AC_CANONICAL_HOST. When cross-
62838         compiling to glibc systems, set gl_cv_func_unlink_honors_slashes,
62839         gl_cv_func_unlink_parent_fails to "guessing yes".
62840         * m4/remove.m4 (gl_FUNC_REMOVE): Update.
62841         * m4/rename.m4 (gl_FUNC_RENAME): Require AC_CANONICAL_HOST. When cross-
62842         compiling to glibc systems, set gl_cv_func_rename_slash_dst_works,
62843         gl_cv_func_rename_slash_src_works, gl_cv_func_rename_link_works,
62844         gl_cv_func_rename_dest_works to "guessing yes".
62845         * m4/round.m4 (gl_FUNC_ROUND): Require AC_CANONICAL_HOST. When cross-
62846         compiling to glibc systems, set gl_cv_func_round_ieee to "guessing yes".
62847         * m4/roundf.m4 (gl_FUNC_ROUNDF): Require AC_CANONICAL_HOST. When cross-
62848         compiling to glibc systems, set gl_cv_func_roundf_ieee to
62849         "guessing yes".
62850         * m4/roundl.m4 (gl_FUNC_ROUNDL): Require AC_CANONICAL_HOST. When cross-
62851         compiling to glibc systems, set gl_cv_func_roundl_ieee to
62852         "guessing yes".
62853         * m4/setenv.m4 (gl_FUNC_SETENV): Require AC_CANONICAL_HOST. When cross-
62854         compiling to glibc systems, set gl_cv_func_setenv_works to
62855         "guessing yes".
62856         (gl_FUNC_UNSETENV): Require AC_CANONICAL_HOST. When cross-
62857         compiling to glibc systems, set gl_cv_func_unsetenv_works to
62858         "guessing yes".
62859         * m4/sleep.m4 (gl_FUNC_SLEEP): Require AC_CANONICAL_HOST. When cross-
62860         compiling to glibc systems, set gl_cv_func_sleep_works to
62861         "guessing yes".
62862         * m4/stat.m4 (gl_FUNC_STAT): Require AC_CANONICAL_HOST. When cross-
62863         compiling to glibc systems, set gl_cv_func_stat_file_slash to
62864         "guessing yes".
62865         * m4/symlink.m4 (gl_FUNC_SYMLINK): Require AC_CANONICAL_HOST. When
62866         cross-compiling to glibc systems, set gl_cv_func_symlink_works to
62867         "guessing yes".
62868         * m4/trunc.m4 (gl_FUNC_TRUNC): Require AC_CANONICAL_HOST. When cross-
62869         compiling to glibc systems, set gl_cv_func_trunc_ieee to "guessing yes".
62870         * m4/truncf.m4 (gl_FUNC_TRUNCF): Require AC_CANONICAL_HOST. When cross-
62871         compiling to glibc systems, set gl_cv_func_truncf_ieee to
62872         "guessing yes".
62873         * m4/truncl.m4 (gl_FUNC_TRUNCL): Require AC_CANONICAL_HOST. When cross-
62874         compiling to glibc systems, set gl_cv_func_truncl_ieee to
62875         "guessing yes".
62876         * m4/usleep.m4 (gl_FUNC_USLEEP): Require AC_CANONICAL_HOST. When cross-
62877         compiling to glibc systems, set gl_cv_func_usleep_works to
62878         "guessing yes".
62879         * m4/utimens.m4 (gl_UTIMENS): Require AC_CANONICAL_HOST. When cross-
62880         compiling to glibc systems, set gl_cv_func_futimesat_works to
62881         "guessing yes".
62883 2012-05-03  Bruno Haible  <bruno@clisp.org>
62885         Say "guessing yes" or "guessing no" when cross-compiling.
62886         * m4/dup2.m4 (gl_FUNC_DUP2): When cross-compiling, set
62887         gl_cv_func_dup2_works to "guessing yes" or "guessing no".
62888         * m4/getdelim.m4 (gl_FUNC_GETDELIM): When cross-compiling, set
62889         gl_cv_func_working_getdelim to "guessing yes" or "guessing no".
62890         * m4/getline.m4 (gl_FUNC_GETLINE): When cross-compiling, set
62891         am_cv_func_working_getline to "guessing yes" or "guessing no".
62892         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): When cross-compiling, set
62893         gl_cv_func_memmem_works_always to "guessing yes" or "guessing no".
62894         (gl_FUNC_MEMMEM): When cross-compiling, set
62895         gl_cv_func_memmem_works_fast to "guessing yes" or "guessing no".
62896         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): When cross-compiling, set
62897         gl_cv_func_stpncpy to "guessing yes" or "guessing no".
62898         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): When cross-compiling,
62899         set gl_cv_func_strcasestr_works_always to "guessing yes" or
62900         "guessing no".
62901         (gl_FUNC_STRCASESTR): When cross-compiling, set
62902         gl_cv_func_strcasestr_linear to "guessing yes" or "guessing no".
62903         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): When cross-compiling, set
62904         gl_cv_func_strstr_works_always to "guessing yes" or "guessing no".
62905         (gl_FUNC_STRSTR): When cross-compiling, set
62906         gl_cv_func_strstr_linear to "guessing yes" or "guessing no".
62907         * m4/strtod.m4 (gl_FUNC_STRTOD): When cross-compiling, set
62908         gl_cv_func_strtod_works to "guessing yes" or "guessing no".
62909         * m4/wctype_h.m4 (gl_WCTYPE_H): When cross-compiling, set
62910         gl_cv_func_iswcntrl_works to "guessing yes" or "guessing no".
62912 2012-05-01  Bruno Haible  <bruno@clisp.org>
62914         relocatable-prog: Enable ELF ORIGIN trick also on GNU/kFreeBSD.
62915         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Treat kFreeBSD like Linux.
62916         * build-aux/reloc-ldflags: Likewise.
62917         Suggested by Steven Chamberlain <steven@pyro.eu.org>.
62919 2012-05-01  Bruno Haible  <bruno@clisp.org>
62921         gnulib-tool: Remove transitional code.
62922         * gnulib-tool: Don't warn about --import with 0 arguments any more.
62923         Reported by Dmitriy Selyutin <ghostman.sd@gmail.com>.
62925 2012-05-01  Bruno Haible  <bruno@clisp.org>
62927         getcwd: Fix misindentation.
62928         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Fix indentation.
62930 2012-04-29  Paul Eggert  <eggert@cs.ucla.edu>
62932         exclude: process exclude and include directives in order
62933         This restores the pre-2009 behavior, and is part of a fix of a
62934         grep bug reported by Quentin Arce in
62935         <http://lists.gnu.org/r/bug-grep/2012-04/msg00056.html>.
62936         * lib/exclude.c (struct exclude): Remove 'tail' member.
62937         (new_exclude_segment): Prepend the new segment instead of appending.
62938         Return void, since that's now more convenient.
62939         (file_pattern_matches): Renamed from excluded_file_pattern_p.
62940         (file_name_matches): Renamed from excluded_file_name_p.
62941         (file_pattern_matches, file_name_matches):
62942         Return true if the pattern matches, not if it excludes.
62943         All callers changed.
62944         (excluded_file_name): Process the list in reverse order;
62945         since the list is now reversed this restores the pre-2009 behavior.
62946         (add_exclude): Adjust to new reversed-order list.  Use local var
62947         rather than macro, for clarity.
62948         * tests/test-exclude7.sh: Adjust to corrected behavior.
62950         exclude: handle wildcards with FNM_NOESCAPE and with trailing \
62951         * lib/exclude.c (unescape_pattern): Don't worry about unescaped [;
62952         it's not possible here.  Handle the case of \ at end of pattern
62953         without dumping core.
62954         (add_exclude): Do not unescape the pattern if FNM_NOESCAPE is used.
62956         _Noreturn: future-proof non-GNU and non-MSVC compilers
62957         * build-aux/snippet/_Noreturn.h (_Noreturn):
62958         * m4/gnulib-common.m4 (gl_COMMON_BODY):
62959         Do not define _Noreturn if __STDC_VERSION__ indicates this is
62960         C11 or later.  This is more likely to work with random future C
62961         compilers that are neither GNUish nor MSVCish.  See Vincent Lefevre in
62962         <http://lists.gnu.org/r/bug-gnulib/2012-04/msg00195.html>.
62964         exclude: handle wildcards with FNM_EXTMATCH
62965         * lib/exclude.c (fnmatch_pattern_has_wildcards): Also treat '+(',
62966         '+@', '!(' as wildcards, if FNM_EXTMATCH.  Make it clear in a
62967         comment that "has wildcards" really means "has or may have
62968         wildcards".  Simplify by avoiding the need to call strcspn.
62970 2012-04-29  Bruno Haible  <bruno@clisp.org>
62972         gnulib-tool: Fix list of authors.
62973         * gnulib-tool (func_version): Add Paul Eggert to list of authors.
62975 2012-04-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
62977         bootstrap: support Automake-NG in $buildreq
62978         * bootstrap (check_versions): Handle automake and aclocal from
62979         Automake-NG specially.  They can be specified as respectively
62980         the "automake-ng" and "aclocal-ng" requirements.
62982 2012-04-25  Eric Blake  <eblake@redhat.com>
62984         bootstrap: only force latest Makefile.in.in for gettext module
62985         * build-aux/bootstrap (with_gettext): Only install latest
62986         Makefile.in.in for projects requesting bleeding edge gettext.
62988 2012-04-22  Bruno Haible  <bruno@clisp.org>
62990         doc: Mention reason for replacement on glibc/Linux systems.
62991         * doc/posix-functions/dprintf.texi: Mention the problem with special
62992         'long double' values.
62993         * doc/posix-functions/fprintf.texi: Likewise.
62994         * doc/posix-functions/printf.texi: Likewise.
62995         * doc/posix-functions/snprintf.texi: Likewise.
62996         * doc/posix-functions/sprintf.texi: Likewise.
62997         * doc/posix-functions/vdprintf.texi: Likewise.
62998         * doc/posix-functions/vfprintf.texi: Likewise.
62999         * doc/posix-functions/vprintf.texi: Likewise.
63000         * doc/posix-functions/vsnprintf.texi: Likewise.
63001         * doc/posix-functions/vsprintf.texi: Likewise.
63002         * doc/posix-functions/fcntl.texi: Add glibc/Linux to the list of
63003         platforms with F_DUPFD_CLOEXEC problems.
63004         * doc/posix-functions/glob.texi: Mention which platforms are affected
63005         by the problem with symbolic links.
63006         * doc/posix-functions/linkat.texi: Mention the problem with
63007         AT_SYMLINK_FOLLOW on Linux.
63009 2012-04-22  Bruno Haible  <bruno@clisp.org>
63011         pwrite: Don't replace on all platforms.
63012         * m4/pwrite.m4 (gl_FUNC_PWRITE): Fix syntax error in test program.
63014 2012-04-22  Bruno Haible  <bruno@clisp.org>
63016         rint* tests: Avoid gcc warnings.
63017         * tests/test-rint.c (INFINITY, NAN): Undefine before redefining.
63018         * tests/test-rintf.c (INFINITY, NAN): Likewise.
63019         * tests/test-rintl.c (INFINITY, NAN): Likewise.
63021 2012-04-21  Bruno Haible  <bruno@clisp.org>
63023         users.txt: Update.
63024         * users.txt: Add freedink, wdiff. Update URLs for projects that have
63025         switched from CVS to git, bzr, or svn.
63027 2012-04-21  Bruno Haible  <bruno@clisp.org>
63029         Large File Support for native Windows platforms.
63031         * m4/largefile.m4 (gl_LARGEFILE): New macro.
63032         * modules/largefile (configure.ac): Require gl_LARGEFILE.
63034         * lib/sys_types.in.h (off_t) [WINDOWS_64_BIT_OFF_T]: Define to a 64-bit
63035         type.
63036         * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Set WINDOWS_64_BIT_OFF_T.
63037         * modules/sys_types (Makefile.am): Substitute WINDOWS_64_BIT_OFF_T.
63038         * doc/posix-headers/sys_types.texi: Mention the effect of the
63039         'largefile' module.
63041         * lib/fcntl.in.h: Add comments about off_t.
63042         * modules/fcntl-h (Depends-on): Add sys_types.
63044         * lib/unistd.in.h [WINDOWS_64_BIT_OFF_T]: Include <sys/types.h>.
63045         (ftruncate): Replace it if REPLACE_FTRUNCATE is 1.
63046         * m4/unistd_h.m4 (gl_UNISTD_H): Require gl_SYS_TYPES_H.
63047         (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_FTRUNCATE.
63048         * modules/unistd (Depends-on): Add sys_types.
63049         (Makefile.am): Substitute WINDOWS_64_BIT_OFF_T, REPLACE_FTRUNCATE.
63051         * lib/lseek.c (rpl_lseek) [_GL_WINDOWS_64_BIT_OFF_T]: Use _lseeki64
63052         instead of lseek.
63053         * m4/lseek.m4 (gl_FUNC_LSEEK): Require gl_SYS_TYPES_H. Set
63054         REPLACE_LSEEK if WINDOWS_64_BIT_OFF_T is 1.
63055         * modules/lseek (Depends-on): Add sys_types.
63057         * lib/ftruncate.c: Put under GPLv3+. Include <windows.h>,
63058         msvc-nothrow.h.
63059         (SetFileSize): New function.
63060         (ftruncate) [_GL_WINDOWS_64_BIT_OFF_T]: New implementation.
63061         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Set REPLACE_FTRUNCATE on Windows
63062         if Large File Support is requested.
63063         * modules/ftruncate (configure.ac): Consider REPLACE_FTRUNCATE.
63064         (Depends-on): Add sys_types, msvc-nothrow. Update conditions.
63066         * lib/stdio.in.h: Add comments about off_t.
63067         * modules/stdio (Depends-on): Add sys_types.
63069         * lib/ftello.c [_GL_WINDOWS_64_BIT_OFF_T]: Use _ftelli64 or ftello64
63070         instead of ftello.
63071         * m4/ftello.m4 (gl_FUNC_FTELLO): Require gl_SYS_TYPES_H. Set
63072         REPLACE_FTELLO if WINDOWS_64_BIT_OFF_T is 1.
63073         (gl_PREREQ_FTELLO): New macro.
63074         * modules/ftello (Depends-on): Add sys_types.
63075         (configure.ac): Incoke gl_PREREQ_FTELLO.
63077         * lib/fseeko.c [_GL_WINDOWS_64_BIT_OFF_T]: Use _fseeki64 or fseeko64
63078         instead of fseeko.
63079         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Require gl_SYS_TYPES_H. Set
63080         REPLACE_FSEEKO if WINDOWS_64_BIT_OFF_T is 1.
63081         (gl_PREREQ_FSEEKO): New macro.
63082         * modules/fseeko (Depends-on): Add sys_types.
63083         (configure.ac): Invoke gl_PREREQ_FSEEKO.
63085         * lib/sys_stat.in.h: Add comments about off_t.
63086         (stat, fstat) [WINDOWS_64_BIT_ST_SIZE]: Define to variants that use a
63087         64-bit integer for st_size in 'struct stat'.
63088         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Set WINDOWS_64_BIT_ST_SIZE.
63089         Define _GL_WINDOWS_64_BIT_ST_SIZE.
63090         * modules/sys_stat (Depends-on): Add sys_types.
63091         (Makefile.am): Substitute WINDOWS_64_BIT_ST_SIZE.
63093         * lib/stat.c (stat) [_GL_WINDOWS_64_BIT_ST_SIZE]: Define to _stati64
63094         instead of stat or _stat.
63096         * lib/fstat.c [_GL_WINDOWS_64_BIT_ST_SIZE]: Use _fstati64 and
63097         'struct _stati64' instead of fstat and 'struct stat'.
63098         * m4/fstat.m4 (gl_FUNC_FSTAT): Require gl_HEADER_SYS_STAT_H. Set
63099         REPLACE_FSTAT if WINDOWS_64_BIT_ST_SIZE is 1.
63101         Reported by Ray Satiro <raysatiro@yahoo.com>.
63103 2012-04-19  Eric Blake  <eblake@redhat.com>
63105         bootstrap: accommodate older libtool
63106         * build-aux/bootstrap (use_libtool): Cater to libtool 1.5.22.
63107         Reported by Daniel P. Berrange.
63109 2012-04-19  Jim Meyering  <meyering@redhat.com>
63111         announce-gen: avoid failure due to lack of Digest::SHA1
63112         Even with the preferred Digest::SHA available, this script
63113         would fail when the backup module, Digest::SHA1, was not installed.
63114         * build-aux/announce-gen: Quote the conditional use of "use".
63115         Reported by Reuben Thomas in:
63116         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/30444
63118         bootstrap: don't let a user's CDPATH setting affect this script
63119         When CDPATH is set, cd will sometimes generate output.
63120         When "cd" is run in a subshell whose output matters, that
63121         surprising-to-some output can cause malfunction.
63122         Unsetting CDPATH turns off this shell "feature."
63123         * build-aux/bootstrap (CDPATH): Unset.
63124         Reported by Reuben Thomas in:
63125         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/30435
63126         and inspired by his patch here:
63127         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/30440
63129 2012-04-16  Akim Demaille  <akim@lrde.epita.fr>
63130         and Jim Meyering  <meyering@redhat.com>
63132         maint.mk: catch "see @xref{}" and similar
63133         * top/maint.mk (prohibit_undesirable_word_seq_RE_): Also
63134         prohibit "See also @xref{", "Also see @pxref{", and similar.
63136 2012-04-16  Jim Meyering  <meyering@redhat.com>
63138         bootstrap: really use gnulib's po/Makefile.in.in
63139         * build-aux/bootstrap: Correct the source file name in previous change.
63140         Reported by Akim Demaille.
63142         configmake: correct minor inconsistency in Makefile rule
63143         * modules/configmake (Makefile.am): All other rules like this one
63144         run the final "mv -f ..." in the same backslash-continued command
63145         as the one that does everything else.  This one put the mv -f ...
63146         command on a separate, non-backslash-continued line.
63147         Make it like the others.
63149         bootstrap: use gnulib's po/Makefile.in.in, not the one from gettext
63150         * build-aux/bootstrap: Use gnulib's po/Makefile.in.in, not
63151         the one from gettext.  Reported by Akim Demaille.
63153 2012-04-16  Joel E. Denny  <joeldenny@joeldenny.org>
63155         Fix recursion of install-* into po directories.
63156         Bison's install-pdf bug reported by Hans Aberg at
63157         <http://lists.gnu.org/r/bug-bison/2011-05/msg00008.html>.
63158         * build-aux/po/Makefile.in.in (install-dvi, install-html)
63159         (install-info, install-pdf, install-ps): New targets.
63161 2012-04-16  Jim Meyering  <meyering@redhat.com>
63163         maint: avoid spurious "make sc_maint" failure
63164         * cfg.mk (exclude_file_name_regexp--sc_trailing_blank): Also
63165         exempt all *.class file names, for lib/javaversion.class.
63167 2012-04-15  Bruno Haible  <bruno@clisp.org>
63169         lseek: Make configure test independent of environment.
63170         * m4/lseek.m4 (gl_FUNC_LSEEK): Require AC_CANONICAL_HOST. On native
63171         Windows, we know that lseek() on pipes is broken; skip the runtime
63172         test.
63174 2012-04-14  Bruno Haible  <bruno@clisp.org>
63176         stat: Bypass buggy override in mingw64.
63177         * m4/stat.m4 (gl_FUNC_STAT): Update comments.
63178         * lib/stat.c (stat) [mingw64]: Define to _stat.
63179         * doc/posix-functions/stat.texi: Mention mingw64 bug.
63181 2012-04-14  Bruno Haible  <bruno@clisp.org>
63183         pathmax: Fix compilation error on MSVC 9.
63184         * modules/pathmax (Depends-on): Add unistd.
63186 2012-04-12  Paul Eggert  <eggert@cs.ucla.edu>
63188         README: document pointer comparison assumption
63189         * README (Portability guidelines): Document assumption about
63190         pointer comparisons, in response to a recent bug-gnulib comment by
63191         Jeffrey Kegler.
63193 2012-04-12  Bruno Haible  <bruno@clisp.org>
63195         Tests for module 'getrusage'.
63196         * modules/getrusage-tests: New file.
63197         * tests/test-getrusage.c: New file.
63199         New module 'getrusage'.
63200         * lib/sys_resource.in.h: Include arg-nonnull.h, c++defs.h,
63201         warn-on-use.h.
63202         (getrusage): New declaration.
63203         * lib/getrusage.c: New file.
63204         * m4/getrusage.m4: New file.
63205         * m4/sys_resource_h.m4 (gl_HEADER_SYS_RESOURCE): Test whether getrusage
63206         is declared.
63207         (gl_SYS_RESOURCE_H_DEFAULTS): Initialize GNULIB_GETRUSAGE,
63208         HAVE_GETRUSAGE.
63209         * modules/sys_resource (Depends-on): Add snippet/arg-nonnull,
63210         snippet/c++defs, snippet/warn-on-use.
63211         (Makefile.am): Update generation of sys/resource.h. Substitute
63212         GNULIB_GETRUSAGE, HAVE_GETRUSAGE.
63213         * modules/getrusage: New file.
63214         * doc/posix-functions/getrusage.texi: Mention the new module.
63216 2012-04-12  Bruno Haible  <bruno@clisp.org>
63218         Tests for module 'sys_resource'.
63219         * modules/sys_resource-tests: New file.
63220         * tests/test-sys_resource.c: New file.
63222         New module 'sys_resource'.
63223         * lib/sys_resource.in.h: New file.
63224         * m4/sys_resource_h.m4: New file.
63225         * modules/sys_resource: New file.
63226         * doc/posix-headers/sys_resource.texi: Mention the new module.
63228 2012-04-12  LRN  <lrn1986@gmail.com>  (tiny change)
63230         ioctl: Fix compilation error on mingw.
63231         * lib/ioctl.c: Include <windows.h>.
63232         Also reported by Ray Satiro <raysatiro@yahoo.com>.
63234 2012-04-04  Jim Meyering  <meyering@redhat.com>
63236         regex: correct #pragma guard expression
63237         * lib/regex.c: -Wsuggest-attribute=pure was introduced in gcc-4.6,
63238         not 4.3.  Correct its cpp guard expression.
63240 2012-04-04  Paul Eggert  <eggert@cs.ucla.edu>
63242         regex: remove unnecessary type punning
63243         Problem reported by Vladimir Serbinenko in
63244         <http://lists.gnu.org/r/bug-gnulib/2012-04/msg00006.html>.
63245         * lib/regex.h (struct re_pattern_buffer): Change the type of
63246         __REPB_PREFIX(buffer) from unsigned char * to struct re_dfa_t *.
63247         Fix comment to match code.
63248         * lib/regcomp.c (re_compile_fastmap, re_compile_fastmap_iter, regfree)
63249         (re_compile_internal, free_workarea_compile, analyze, lower_subexp)
63250         (parse, parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
63251         * lib/regexec.c (regexec, re_search_stub, re_search_internal)
63252         (set_regs):
63253         Omit no-longer-necessary casts.
63255 2012-04-03  Bruno Haible  <bruno@clisp.org>
63257         Tests for module 'ilogbl'.
63258         * modules/ilogbl-tests: New file.
63259         * tests/test-ilogbl.c: New file.
63261         New module 'ilogbl'.
63262         * lib/math.in.h (ilogbl): New declaration.
63263         * lib/ilogbl.c: New file.
63264         * m4/ilogbl.m4: New file.
63265         * m4/math_h.m4 (gl_MATH_H): Test whether ilogbl is declared.
63266         (gl_MATH_H_DEFAULTS): Initialize GNULIB_ILOGBL, HAVE_ILOGBL.
63267         * modules/math (Makefile.am): Substitute GNULIB_ILOGBL, HAVE_ILOGBL.
63268         Split sed invocation, to avoid the limit of 100 substitutions of
63269         HP-UX 'sed'.
63270         * modules/ilogbl: New file.
63271         * tests/test-math-c++.cc: Check the declaration of ilogbl.
63272         * doc/posix-functions/ilogbl.texi: Mention the new module.
63274 2012-04-03  Bruno Haible  <bruno@clisp.org>
63276         Tests for module 'ilogbf'.
63277         * modules/ilogbf-tests: New file.
63278         * tests/test-ilogbf.c: New file.
63280         New module 'ilogbf'.
63281         * lib/math.in.h (ilogbf): New declaration.
63282         * lib/ilogbf.c: New file.
63283         * m4/ilogbf.m4: New file.
63284         * m4/math_h.m4 (gl_MATH_H): Test whether ilogbf is declared.
63285         (gl_MATH_H_DEFAULTS): Initialize GNULIB_ILOGBF, HAVE_ILOGBF,
63286         REPLACE_ILOGBF.
63287         * modules/math (Makefile.am): Substitute GNULIB_ILOGBF, HAVE_ILOGBF,
63288         REPLACE_ILOGBF.
63289         * modules/ilogbf: New file.
63290         * tests/test-math-c++.cc: Check the declaration of ilogbf.
63291         * doc/posix-functions/ilogbf.texi: Mention the new module.
63293 2012-04-03  Bruno Haible  <bruno@clisp.org>
63295         Tests for module 'ilogb'.
63296         * modules/ilogb-tests: New file.
63297         * tests/test-ilogb.c: New file.
63298         * tests/test-ilogb.h: New file, based on tests/test-logb.h and
63299         tests/test-logb-ieee.h.
63301         New module 'ilogb'.
63302         * lib/math.in.h (ilogb): New declaration.
63303         * lib/ilogb.c: New file.
63304         * m4/ilogb.m4: New file.
63305         * m4/math_h.m4 (gl_MATH_H): Test whether ilogb is declared.
63306         (gl_MATH_H_DEFAULTS): Initialize GNULIB_ILOGB, HAVE_ILOGB,
63307         REPLACE_ILOGB.
63308         * modules/math (Makefile.am): Substitute GNULIB_ILOGB, HAVE_ILOGB,
63309         REPLACE_ILOGB.
63310         * modules/ilogb: New file.
63311         * tests/test-math-c++.cc: Check the declaration of ilogb.
63312         * doc/posix-functions/ilogb.texi: Mention the new module.
63314 2012-04-03  Bruno Haible  <bruno@clisp.org>
63316         math: Provide FP_ILOGB0 and FP_ILOGBNAN.
63317         * lib/math.in.h (FP_ILOGB0, FP_ILOGBNAN): Define fallback.
63318         * tests/test-math.c: Check that FP_ILOGB0, FP_ILOGBNAN are defined.
63319         (main): Check their values.
63320         * doc/posix-headers/math.texi: Mention the FP_ILOGB0, FP_ILOGBNAN
63321         problem.
63323 2012-04-03  Bruno Haible  <bruno@clisp.org>
63325         Tests for module 'logbl-ieee'.
63326         * modules/logbl-ieee-tests: New file.
63327         * tests/test-logbl-ieee.c: New file.
63329         New module 'logbl-ieee'.
63330         * modules/logbl-ieee: New file.
63332         Tests for module 'logb-ieee'.
63333         * modules/logb-ieee-tests: New file.
63334         * tests/test-logb-ieee.c: New file.
63336         New module 'logb-ieee'.
63337         * modules/logb-ieee: New file.
63339         Tests for module 'logbf-ieee'.
63340         * modules/logbf-ieee-tests: New file.
63341         * tests/test-logbf-ieee.c: New file.
63342         * tests/test-logb-ieee.h: New file.
63344         New module 'logbf-ieee'.
63345         * modules/logbf-ieee: New file.
63347 2012-04-03  Bruno Haible  <bruno@clisp.org>
63349         Tests for module 'logbl'.
63350         * modules/logbl-tests: New file.
63351         * tests/test-logbl.c: New file.
63353         New module 'logbl'.
63354         * lib/math.in.h (logbl): New declaration.
63355         * lib/logbl.c: New file.
63356         * m4/logbl.m4: New file.
63357         * m4/math_h.m4 (gl_MATH_H): Test whether logbl is declared.
63358         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOGBL, HAVE_LOGBL,
63359         REPLACE_LOGBL.
63360         * modules/math (Makefile.am): Substitute GNULIB_LOGBL, HAVE_LOGBL,
63361         REPLACE_LOGBL.
63362         * modules/logbl: New file.
63363         * tests/test-math-c++.cc: Check the declaration of logbl.
63364         * doc/posix-functions/logbl.texi: Mention the new module.
63366 2012-04-02  Bruno Haible  <bruno@clisp.org>
63368         Tests for module 'logbf'.
63369         * modules/logbf-tests: New file.
63370         * tests/test-logbf.c: New file.
63372         New module 'logbf'.
63373         * lib/math.in.h (logbf): New declaration.
63374         * lib/logbf.c: New file.
63375         * m4/logbf.m4: New file.
63376         * m4/math_h.m4 (gl_MATH_H): Test whether logbf is declared.
63377         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOGBF, HAVE_LOGBF,
63378         REPLACE_LOGBF.
63379         * modules/math (Makefile.am): Substitute GNULIB_LOGBF, HAVE_LOGBF,
63380         REPLACE_LOGBF.
63381         * modules/logbf: New file.
63382         * tests/test-math-c++.cc: Check the declaration of logbf.
63383         * doc/posix-functions/logbf.texi: Mention the new module.
63385 2012-04-02  Bruno Haible  <bruno@clisp.org>
63387         logb tests: More tests.
63388         * tests/test-logb.h: New file, based on tests/test-logb.c and
63389         tests/test-frexp.h.
63390         * tests/test-logb.c: Include minus-zero.h, test-logb.h.
63391         (main): Just invoke test_function.
63392         * modules/logb-tests (Files): Add tests/test-logb.h,
63393         tests/minus-zero.h, tests/randomd.c.
63394         (Makefile.am): Add randomd.c to test_logb_SOURCES.
63396         logb: Provide replacement and workarounds.
63397         * lib/math.in.h (logb): Ensure declaration. Replace if REPLACE_LOGB
63398         is 1.
63399         * lib/logb.c: New file.
63400         * m4/logb.m4 (gl_FUNC_LOGB_WORKS): New macro.
63401         (gl_FUNC_LOGB): Invoke it. Set HAVE_LOGB, REPLACE_LOGB.
63402         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOGB.
63403         * modules/math (Makefile.am): Substitute REPLACE_LOGB.
63404         * modules/logb (Files): Add lib/logb.c.
63405         (Depends-on): Add isfinite, frexp, isnand.
63406         (configure.ac): Compile the replacement code logb.c if needed.
63407         * tests/test-math-c++.cc: Check the declaration of logb.
63408         * doc/posix-functions/logb.texi: Mention the replacement and the bug
63409         with subnormal numbers.
63411 2012-04-02  Bruno Haible  <bruno@clisp.org>
63413         log10* tests: Speed up.
63414         * tests/test-log10.h (test_function): Reduce amount of random numbers
63415         to test.
63417 2012-04-01  Bruno Haible  <bruno@clisp.org>
63419         logf-ieee: Fix test whether logf works.
63420         * m4/logf.m4 (gl_FUNC_LOGF): Fix typo in test program.
63422 2012-04-01  Bruno Haible  <bruno@clisp.org>
63424         log10l: Work around log10l-ieee test failure on IRIX 6.5.
63425         * lib/log10l.c: Include <float.h>
63426         (log10l): On IRIX, normalize the +Infinity value.
63427         * modules/log10l (Depends-on): Add 'float'.
63428         * doc/posix-functions/log10l.texi: Mention the IRIX problem with
63429         +Infinity.
63431         log10f-ieee: Work around test failure on NetBSD 5.1.
63432         * m4/log10f-ieee.m4: New file.
63433         * m4/log10f.m4 (gl_FUNC_LOG10F): If gl_FUNC_LOG10F_IEEE is present,
63434         test whether log10f works with a negative argument. Replace it if not.
63435         * lib/log10f.c (log10f): For negative arguments, return NaN.
63436         * modules/log10f-ieee (Files): Add m4/log10f-ieee.m4.
63437         (configure.ac): Invoke gl_FUNC_LOG10F_IEEE.
63438         * doc/posix-functions/log10f.texi: Mention the log10f-ieee module.
63440         log10f-ieee: Work around test failure on Solaris 9.
63441         * modules/log10f-ieee (Depends-on): Add log10-ieee.
63442         (configure.ac): Require gl_FUNC_LOG10F.
63444         log10-ieee: Work around test failure on NetBSD 5.1 and Solaris 11.
63445         * m4/log10-ieee.m4: New file.
63446         * m4/log10.m4 (gl_FUNC_LOG10): If gl_FUNC_LOG10_IEEE is present, test
63447         whether log10 works with a negative argument. Replace it if not.
63448         * lib/log10.c (log10): For negative arguments, return NaN.
63449         * modules/log10-ieee (Files): Add m4/log10-ieee.m4.
63450         (configure.ac): Invoke gl_FUNC_LOG10_IEEE.
63451         * doc/posix-functions/log10.texi: Mention the log10-ieee module.
63453         Tests for module 'log10l-ieee'.
63454         * modules/log10l-ieee-tests: New file.
63455         * tests/test-log10l-ieee.c: New file.
63457         New module 'log10l-ieee'.
63458         * modules/log10l-ieee: New file.
63460         Tests for module 'log10-ieee'.
63461         * modules/log10-ieee-tests: New file.
63462         * tests/test-log10-ieee.c: New file.
63464         New module 'log10-ieee'.
63465         * modules/log10-ieee: New file.
63467         Tests for module 'log10f-ieee'.
63468         * modules/log10f-ieee-tests: New file.
63469         * tests/test-log10f-ieee.c: New file.
63470         * tests/test-log10-ieee.h: New file.
63472         New module 'log10f-ieee'.
63473         * modules/log10f-ieee: New file.
63475 2012-04-01  Bruno Haible  <bruno@clisp.org>
63477         log10l: Work around AIX 5.1, IRIX 6.5, OSF/1 5.1 bug.
63478         * lib/math.in.h (log10l): Override if REPLACE_LOG10L is 1.
63479         * lib/log10l.c (log10l): If log10l exists, use it and provide just the
63480         workaround.
63481         * m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): New macro.
63482         (gl_FUNC_LOG10L): Invoke it. Set REPLACE_LOG10L.
63483         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOG10L.
63484         * modules/math (Makefile.am): Substitute REPLACE_LOG10L.
63485         * modules/log10l (configure.ac): Consider REPLACE_LOG10L.
63486         (Depends-on): Update conditions.
63487         * doc/posix-functions/log10l.texi: Mention the MSVC9, AIX 5.1,
63488         IRIX 6.5, OSF/1 5.1 problems.
63490 2012-04-01  Bruno Haible  <bruno@clisp.org>
63492         log10f: Work around OSF/1 5.1 bug.
63493         * lib/math.in.h (log10f): Override if REPLACE_LOG10F is 1.
63494         * lib/log10f.c (log10f): If logf exists, use it and provide just the
63495         workaround.
63496         * m4/log10f.m4 (gl_FUNC_LOG10F_WORKS): New macro.
63497         (gl_FUNC_LOG10F): Invoke it. Set REPLACE_LOG10F.
63498         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOG10F.
63499         * modules/math (Makefile.am): Substitute REPLACE_LOG10F.
63500         * modules/log10f (configure.ac): Consider REPLACE_LOG10F.
63501         (Depends-on): Update conditions.
63502         * doc/posix-functions/log10f.texi: Mention the OSF/1 5.1 problem.
63504 2012-04-01  Bruno Haible  <bruno@clisp.org>
63506         log10: Work around OSF/1 5.1 bug.
63507         * lib/math.in.h (log10): New declaration.
63508         * lib/log10.c: New file.
63509         * m4/log10.m4 (gl_FUNC_LOG10_WORKS): New macro.
63510         (gl_FUNC_LOG10): Invoke it. Set REPLACE_LOG10.
63511         * m4/math_h.m4 (gl_MATH_H): Test whether log10 is declared.
63512         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG10, REPLACE_LOG10.
63513         * modules/math (Makefile.am): Substitute GNULIB_LOG10, REPLACE_LOG10.
63514         * modules/log10 (Files): Add lib/log10.c.
63515         (Depends-on): Add math.
63516         (configure.ac): If REPLACE_LOG10 is 1, compile an override.
63517         * tests/test-math-c++.cc: Check the declaration of log10.
63518         * doc/posix-functions/log10.texi: Mention the OSF/1 5.1 problem.
63520 2012-03-31  Bruno Haible  <bruno@clisp.org>
63522         log10l tests: More tests.
63523         * modules/log10l-tests (Files): Add tests/test-log10l.h,
63524         tests/minus-zero.h, tests/randoml.c.
63525         (Makefile.am): Add randoml.c to test_log10l_SOURCES.
63526         * tests/test-log10l.c: Include <float.h>, minus-zero.h, test-log10l.h.
63527         (main): Invoke test_function.
63529         log10f tests: More tests.
63530         * modules/log10f-tests (Files): Add tests/test-log10.h,
63531         tests/minus-zero.h, tests/randomf.c.
63532         (Makefile.am): Add randomf.c to test_log10f_SOURCES.
63533         * tests/test-log10f.c: Include <float.h>, minus-zero.h, test-log10.h.
63534         (main): Invoke test_function.
63536         log10 tests: More tests.
63537         * tests/test-log10.h: New file.
63538         * modules/log10-tests (Files): Add tests/test-log10.h,
63539         tests/minus-zero.h, tests/randomd.c.
63540         (Makefile.am): Add randomd.c to test_log10_SOURCES.
63541         * tests/test-log10.c: Include <float.h>, minus-zero.h, test-log10.h.
63542         (main): Invoke test_function.
63544 2012-03-31  Simon Josefsson  <simon@josefsson.org>
63546         fflush: Fix syntax error.
63547         * lib/fflush.c: Include unused-parameter.h, needed for
63548         _GL_UNUSED_PARAMETER.
63549         * modules/fflush (Depends-on): Add snippet/unused-parameter.
63551 2012-03-30  Paul Eggert  <eggert@cs.ucla.edu>
63553         regex: pacify GCC when compiling GRUB
63554         * lib/regcomp.c (init_dfa): Make a pointer 'const', to avoid
63555         a diagnostic.  Reported by Vladimir Serbinenko in
63556         <http://lists.gnu.org/r/bug-gnulib/2012-03/msg00163.html>.
63558 2012-03-29  Eric Blake  <eblake@redhat.com>
63560         stdio: don't assume gets any more
63561         * m4/stdio_h.m4 (gl_STDIO_H, gl_STDIO_H_DEFAULTS): Drop gets
63562         support.
63563         * modules/stdio (Makefile.am): Likewise.
63564         * lib/stdio-read.c (gets): Likewise.
63565         * tests/test-stdio-c++.cc: Likewise.
63566         * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Fix comment.
63567         * lib/stdio.in.h (gets): Make warning occur in more places.
63568         * doc/posix-functions/gets.texi (gets): Update documentation.
63569         Reported by Christer Solskogen.
63571         maint.mk: fix syntax checks without exclusions
63572         * top/maint.mk (_sc_search_regexp): Allow for empty variable.
63573         Reported by Daniel P. Berrange.
63575         strerror_r: avoid compiler warning
63576         * lib/strerror_r.c (strerror_r): Hoist extern declaration to top
63577         level.
63579         fflush: avoid compiler warning
63580         * lib/fflush.c (update_fpos_cache): Mark variables that are
63581         potentially unused.
63583 2012-03-25  Bruno Haible  <bruno@clisp.org>
63585         Tests for module 'localeconv'.
63586         * modules/localeconv-tests: New file.
63587         * tests/test-localeconv.c: New file.
63589         New module 'localeconv'.
63590         * lib/locale.in.h (localeconv): New declaration.
63591         * lib/localeconv.c: New file.
63592         * m4/localeconv.m4: New file.
63593         * m4/locale_h.m4 (gl_LOCALE_H_DEFAULTS): Initialize GNULIB_LOCALECONV,
63594         REPLACE_LOCALECONV.
63595         * modules/locale (Makefile.am): Substitute GNULIB_LOCALECONV,
63596         REPLACE_LOCALECONV.
63597         * modules/localeconv: New file.
63598         * modules/nl_langinfo (Depends-on): Add localeconv.
63599         * modules/human (Depends-on): Likewise.
63600         * doc/posix-functions/localeconv.texi: Mention the new module.
63602 2012-03-25  Bruno Haible  <bruno@clisp.org>
63604         locale: Provide a complete 'struct lconv'.
63605         * m4/locale_h.m4 (gl_LOCALE_H): Set REPLACE_STRUCT_LCONV to 1 if
63606         'struct lconv' does not contain int_p_cs_precedes.
63607         * tests/test-locale.c (main): Check that 'struct lconv' is complete.
63608         * doc/posix-headers/locale.texi: Update.
63610         locale: Provide a complete 'struct lconv' on Solaris 10, 11.
63611         * m4/locale_h.m4 (gl_LOCALE_H): On Solaris, define _LCONV_C99.
63612         * doc/posix-headers/locale.texi: Update.
63614         locale: Provide a working 'struct lconv'.
63615         * lib/locale.in.h (lconv): Override if REPLACE_STRUCT_LCONV is 1.
63616         * m4/locale_h.m4 (gl_LOCALE_H): Set REPLACE_STRUCT_LCONV to 1 if
63617         'struct lconv' does not even contain decimal_point.
63618         (gl_LOCALE_H_DEFAULTS): Initialize REPLACE_STRUCT_LCONV.
63619         * modules/locale (Makefile.am): Substitute REPLACE_STRUCT_LCONV.
63620         * tests/test-locale.c (main): Check that 'struct lconv' is complete.
63621         * doc/posix-headers/locale.texi: Mention the problems with
63622         'struct lconv'.
63623         Reported by Gianluigi Tiesi <sherpya@netfarm.it>.
63625 2012-03-24  Bruno Haible  <bruno@clisp.org>
63627         Enable common subexpression optimization in GCC.
63628         * lib/unitypes.in.h (_UC_ATTRIBUTE_CONST, _UC_ATTRIBUTE_PURE): New
63629         macros.
63630         * lib/unicase.in.h (uc_toupper, uc_tolower, uc_totitle): Declare with
63631         GCC attribute 'const'.
63632         (uc_locale_language): Declare with GCC attribute 'pure'.
63633         * lib/unicase/caseprop.h (uc_is_cased, uc_is_case_ignorable): Declare
63634         with GCC attribute 'const'.
63635         * lib/unictype.in.h (uc_is_general_category_withtable,
63636         uc_combining_class, uc_combining_class_name,
63637         uc_combining_class_long_name, uc_bidi_class_name,
63638         uc_bidi_category_name, uc_bidi_class_long_name, uc_bidi_class,
63639         uc_bidi_category, uc_is_bidi_class, uc_is_bidi_category,
63640         uc_decimal_value, uc_digit_value, uc_numeric_value,
63641         uc_joining_type_name, uc_joining_type_long_name, uc_joining_type,
63642         uc_joining_group_name, uc_joining_group, uc_is_property_*, uc_script,
63643         uc_block, uc_is_c_whitespace, uc_is_java_whitespace,
63644         uc_c_ident_category, uc_java_ident_category, uc_is_alnum, uc_is_alpha,
63645         uc_is_cntrl, uc_is_digit, uc_is_graph, uc_is_lower, uc_is_print,
63646         uc_is_punct, uc_is_space, uc_is_upper, uc_is_xdigit, uc_is_blank):
63647         Declare with GCC attribute 'const'.
63648         (uc_general_category_name, uc_general_category_long_name,
63649         uc_general_category_byname, uc_general_category,
63650         uc_is_general_category, uc_combining_class_byname,
63651         uc_bidi_class_byname, uc_bidi_category_byname, uc_joining_type_byname,
63652         uc_joining_group_byname, uc_script_byname, uc_is_script, uc_is_block):
63653         Declare with GCC attribute 'pure'.
63654         * lib/unigbrk.in.h (uc_graphemeclusterbreak_property,
63655         uc_is_grapheme_break, u8_grapheme_next, u16_grapheme_next,
63656         u32_grapheme_next, u8_grapheme_prev, u16_grapheme_prev,
63657         u32_grapheme_prev, lib/uniname.in.h (unicode_name_character): Declare
63658         with GCC attribute 'pure'.
63659         * lib/uninorm.in.h (uc_composition): Declare with GCC attribute
63660         'const'.
63661         (uninorm_decomposing_form): Declare with GCC attribute 'pure'.
63662         * lib/unistr.in.h (): Declare with GCC attribute 'const'.
63663         (u8_check, u16_check, u32_check, u8_mblen, u16_mblen, u32_mblen,
63664         u8_cmp, u16_cmp, u32_cmp, u8_cmp2, u16_cmp2, u32_cmp2, u8_chr, u16_chr,
63665         u32_chr, u8_mbsnlen, u16_mbsnlen, u32_mbsnlen, u8_strmblen,
63666         u16_strmblen, u32_strmblen, u8_strlen, u16_strlen, u32_strlen,
63667         u8_strnlen, u16_strnlen, u32_strnlen, u8_strcmp_gnu, u8_strcmp,
63668         u16_strcmp, u32_strcmp, u8_strncmp, u16_strncmp, u32_strncmp,
63669         u8_strchr, u16_strchr, u32_strchr, u8_strrchr, u16_strrchr,
63670         u32_strrchr, u8_strcspn, u16_strcspn, u32_strcspn, u8_strspn,
63671         u16_strspn, u32_strspn, u8_strpbrk, u16_strpbrk, u32_strpbrk,
63672         u8_strstr, u16_strstr, u32_strstr, u8_startswith, u16_startswith,
63673         u32_startswith, u8_endswith, u16_endswith, u32_endswith): Declare with
63674         GCC attribute 'pure'.
63675         * lib/uniwbrk.in.h (uc_wordbreak_property): Declare with GCC attribute
63676         'const'.
63677         * lib/uniwidth.in.h (uc_width): Simplify declaration.
63678         (u8_width, u16_width, u32_width, u8_strwidth, u16_strwidth,
63679         u32_strwidth): Declare with GCC attribute 'pure'.
63681         Enable common subexpression optimization in GCC.
63682         * lib/dirent.in.h (_GL_ATTRIBUTE_PURE): Define, like in string.in.h.
63683         (alphasort): Declare with GCC attribute 'pure'.
63684         * lib/stdlib.in.h (_GL_ATTRIBUTE_PURE): Define, like in string.in.h.
63685         (atoll): Declare with GCC attribute 'pure'.
63686         * lib/string.in.h (mbslen, mbsnlen, mbschr, mbsrchr, mbsstr,
63687         mbscasecmp, mbsncasecmp, mbspcasecmp, mbscasestr, mbscspn, mbspbrk,
63688         mbsspn, strverscmp): Declare with GCC attribute 'pure'.
63689         * lib/wchar.in.h (_GL_ATTRIBUTE_PURE): Define, like in string.in.h.
63690         (btowc, wctob, wcwidth, wmemchr, wmemcmp, wcslen, wcsnlen, wcscmp,
63691         wcsncmp, wcscasecmp, wcsncasecmp, wcschr, wcsrchr, wcscspn, wcsspn,
63692         wcspbrk, wcsstr, wcswidth): Declare with GCC attribute 'pure'.
63694 2012-03-24  Bruno Haible  <bruno@clisp.org>
63696         gnulib-tool: Avoid unintended error output from 'cmp'.
63697         * gnulib-tool (func_add_file, func_update_file, func_import): Use
63698         "cmp -s", not "cmp > /dev/null".
63700 2012-03-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
63702         gnulib-tool: fix imprecise comments w.r.t. an automake bug
63704         It's not just Automake versions < 1.9b that creates an empty
63705         pkgdatadir at installation time if pkgdata_DATA is specified
63706         to empty; modern automake versions do this as well, at least
63707         until automake 1.11.4 (not yet released at the moment of writing,
63708         but soon to appear).  That behaviour was generally considered a
63709         feature rather than a bug, at least until this discussion:
63710         <http://lists.gnu.org/r/automake/2012-03/msg00014.html>
63712         See also automake bugs #10997 and #11030.
63714         * gnulib-tool (func_emit_lib_Makefile_am): Adjust comments.  Add
63715         reference to relevant automake bug numbers.
63716         (func_emit_tests_Makefile_am): Likewise.
63718 2012-03-20  Reuben Thomas  <rrt@sc3d.org>
63720         announce-gen: use Digest::SHA when possible
63721         * build-aux/announce-gen: Use Digest::SHA when possible, falling
63722         back to Digest::SHA1 if necessary.
63724 2012-03-20  Jim Meyering  <meyering@redhat.com>
63726         tests: avoid gcc warnings about argv vs. const initializers
63727         * tests/test-posix_spawn1.c (main): Cast to "(char *)" to avoid two
63728         warnings about discarding 'const' qualifier from pointer target type.
63729         * tests/test-posix_spawn2.c (main): Likewise.
63731 2012-03-20  Reuben Thomas  <rrt@sc3d.org>
63733         README-release: simplify slightly
63734         * top/README-release: Run "git checkout master" only once.
63736 2012-03-15  Mark Wielaard  <mark@klomp.org>
63738         git-merge-changelog: add specific example on how to use with hg.
63739         * lib/git-merge-changelog.c: Add example on how to use in .hgrc.
63741 2012-03-18  Mark Wielaard  <mark@klomp.org>
63743         lib/git-merge-changelog.c (status): Report bugs to bug-gnulib@gnu.org.
63745 2012-03-18  Andreas Oberritter  <obi@opendreambox.org>
63747         git-version-gen: don't let "prefix" envvar cause trouble
63748         * build-aux/git-version-gen (prefix): Initialize properly,
63749         so as not to use a value specified via the environment.
63750         Details here: http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10810
63752 2012-03-16  Paul Eggert  <eggert@cs.ucla.edu>
63754         regex: diagnose too-large repeat counts in EREs
63755         Previously, the code did not diagnose the too-large repeat count
63756         in EREs like 'b{1000000000}'; instead, it silently treated the ERE
63757         as if it were 'b\{1000000000}', which is unexpected.
63758         * lib/regcomp.c (parse_dup_op): Fail with REG_ESIZE if a repeat count
63759         is too large.  REG_ESIZE is used nowhere else, and the diagnostic
63760         is a reasonable one for this problem.  Another option would be to
63761         create a new REG_OVERFLOW error for repeat counts that are too large.
63762         (fetch_number): Return RE_DUP_MAX + 1, not REG_ERROR, if the repeat
63763         count is too large, so that the caller can distinguish the two cases.
63764         * lib/regex.h (_REG_ESIZE): Document that this is now a generic
63765         "Too large" return code, and that repeat counts are one example of this.
63767 2012-03-16  Paul Eggert  <eggert@cs.ucla.edu>
63769         doc: some glibc x32 integer width issues
63770         * doc/posix-headers/sys_types.texi (sys/types.h):
63771         * doc/posix-headers/time.texi (time.h):
63772         Mention that glibc x32 does not conform to POSIX in a couple of
63773         areas related to integer widths.
63775 2012-03-15  Bruno Haible  <bruno@clisp.org>
63777         fmal: Avoid test failure on OpenBSD 5.1/SPARC64.
63778         * lib/fma.c (VOLATILE): New macro.
63779         (FUNC): Use it to work around a GCC compiler bug.
63781 2012-03-13  Bruno Haible  <bruno@clisp.org>
63783         hypotl: Bypass broken implementation in OpenBSD 5.1/SPARC.
63784         * m4/hypotl.m4 (gl_FUNC_HYPOTL_WORKS): New macro.
63785         (gl_FUNC_HYPOTL): Invoke it. If the function does not work, set
63786         REPLACE_HYPOTL to 1.
63787         * doc/posix-functions/hypotl.texi: Mention the OpenBSD 5.1/SPARC bug.
63789 2012-03-13  Bruno Haible  <bruno@clisp.org>
63791         remainderl: Bypass broken implementation in OpenBSD 5.1/SPARC.
63792         * m4/remainderl.m4 (gl_FUNC_REMAINDERL_WORKS): New macro.
63793         (gl_FUNC_REMAINDERL): Invoke it. If the function does not work, set
63794         REPLACE_REMAINDERL to 1.
63795         * doc/posix-functions/remainderl.texi: Mention the OpenBSD 5.1/SPARC
63796         bug.
63798 2012-03-13  Bruno Haible  <bruno@clisp.org>
63800         sqrtl: Bypass broken implementation in OpenBSD 5.1/SPARC.
63801         * lib/math.in.h (sqrtl): Replace it if REPLACE_SQRTL is 1.
63802         * m4/sqrtl.m4 (gl_FUNC_SQRTL_WORKS): New macro.
63803         (gl_FUNC_SQRTL): Invoke it. Set REPLACE_SQRTL to 1 if sqrtl() produces
63804         too big rounding errors.
63805         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_SQRTL.
63806         * modules/math (Makefile.am): Substitute REPLACE_SQRTL.
63807         * modules/sqrtl (configure.ac): Consider REPLACE_SQRTL.
63808         (Depends-on): Update conditions.
63809         * tests/test-sqrtl.c (my_ldexpl): New function.
63810         (main): Add test of a particular value.
63811         * doc/posix-functions/sqrtl.texi: Mention the OpenBSD 5.1/SPARC bug.
63813 2012-03-13  Pádraig Brady  <P@draigBrady.com>
63815         doc: Update timer_* platform portability notes.
63816         * doc/posix-functions/timer_create.texi: Add platforms (OpenBSD 4.9)
63817         that always return ENOSYS.
63818         * doc/posix-functions/timer_delete.texi: Likewise.
63819         * doc/posix-functions/timer_gettime.texi: Likewise.
63820         * doc/posix-functions/timer_settime.texi: Likewise.
63822 2012-03-13  Bruno Haible  <bruno@clisp.org>
63824         cbrtl: Bypass broken implementation in OpenBSD 5.1/SPARC.
63825         * m4/cbrtl.m4 (gl_FUNC_CBRTL_WORKS): New macro.
63826         (gl_FUNC_CBRTL): Invoke it. If the function does not work, set
63827         REPLACE_CBRTL to 1.
63828         * doc/posix-functions/cbrtl.texi: Mention the OpenBSD 5.1/SPARC bug.
63830 2012-03-13  Bruno Haible  <bruno@clisp.org>
63832         remainderl: Avoid compilation error on AIX >= 5.2.
63833         * lib/math.in.h (remainderl): Undefine macro from the system header.
63835 2012-03-13  Bruno Haible  <bruno@clisp.org>
63837         Avoid compilation errors with MSVC option -fp:strict.
63838         * lib/cbrt.c: Use MSVC specific pragma fenv_access.
63839         * lib/cbrtf.c: Likewise.
63840         Reported by Michael Goffioul <michael.goffioul@gmail.com>.
63842 2012-03-12  Bruno Haible  <bruno@clisp.org>
63844         uninorm: Don't crash in out-of-memory conditions.
63845         * lib/uninorm/u-normalize-internal.h (FUNC): Handle malloc() failure
63846         gracefully.
63847         * lib/uninorm/uninorm-filter.c (uninorm_filter_write): Likewise.
63848         Based on a report and patch by Stephen Gallagher <sgallagh@redhat.com>.
63850 2012-03-13  Akim Demaille  <akim@lrde.epita.fr>
63852         quote: fix syntax-check
63853         * top/maint.mk (sc_prohibit_quote_without_use): quote.h
63854         also exports quote_quoting_options.
63856 2012-03-12  Simon Josefsson  <simon@josefsson.org>
63858         Collapse list of copyright years to ranges.  See
63859         <https://lists.gnu.org/r/bug-gnulib/2012-03/msg00051.html>.
63860         * build-aux/bootstrap.conf, build-aux/csharpcomp.sh.in,
63861         build-aux/csharpexec.sh.in, build-aux/gnupload,
63862         build-aux/install-reloc, build-aux/javacomp.sh.in,
63863         build-aux/javaexec.sh.in, build-aux/ldd.sh.in,
63864         build-aux/move-if-change, build-aux/reloc-ldflags,
63865         build-aux/relocatable.sh.in, build-aux/x-to-1.in: Fix copyright.
63867 2012-03-11  Bruno Haible  <bruno@clisp.org>
63869         log2f-ieee: Work around test failure on NetBSD 5.1 and Solaris 10.
63870         * m4/log2f-ieee.m4: New file.
63871         * m4/log2f.m4 (gl_FUNC_LOG2F): If gl_FUNC_LOG2F_IEEE is present, test
63872         whether log2f works with a minus zero argument. Replace it if not.
63873         * modules/log2f-ieee (Files): Add m4/log2f-ieee.m4.
63874         (Depends-on): Add log2-ieee.
63875         (configure.ac): Invoke gl_FUNC_LOG2F_IEEE.
63876         * doc/posix-functions/log2f.texi: Mention the log2f-ieee module.
63878         log2-ieee: Work around test failure on NetBSD 5.1 and Solaris 10.
63879         * m4/log2-ieee.m4: New file.
63880         * m4/log2.m4 (gl_FUNC_LOG2): If gl_FUNC_LOG2_IEEE is present, test
63881         whether log2 works with a minus zero argument. Replace it if not.
63882         * modules/log2-ieee (Files): Add m4/log2-ieee.m4.
63883         (configure.ac): Invoke gl_FUNC_LOG2_IEEE.
63884         * doc/posix-functions/log2.texi: Mention the log2-ieee module.
63886         Tests for module 'log2l-ieee'.
63887         * modules/log2l-ieee-tests: New file.
63888         * tests/test-log2l-ieee.c: New file.
63890         New module 'log2l-ieee'.
63891         * modules/log2l-ieee: New file.
63893         Tests for module 'log2-ieee'.
63894         * modules/log2-ieee-tests: New file.
63895         * tests/test-log2-ieee.c: New file.
63897         New module 'log2-ieee'.
63898         * modules/log2-ieee: New file.
63900         Tests for module 'log2f-ieee'.
63901         * modules/log2f-ieee-tests: New file.
63902         * tests/test-log2f-ieee.c: New file.
63903         * tests/test-log2-ieee.h: New file.
63905         New module 'log2f-ieee'.
63906         * modules/log2f-ieee: New file.
63908 2012-03-11  Bruno Haible  <bruno@clisp.org>
63910         Tests for module 'log2l'.
63911         * modules/log2l-tests: New file.
63912         * tests/test-log2l.c: New file.
63914         New module 'log2l'.
63915         * lib/math.in.h (log2l): New declaration.
63916         * lib/log2l.c: New file.
63917         * m4/log2l.m4: New file.
63918         * m4/math_h.m4 (gl_MATH_H): Test whether log2l is declared.
63919         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG2L, HAVE_DECL_LOG2L,
63920         REPLACE_LOG2L.
63921         * modules/math (Makefile.am): Substitute GNULIB_LOG2L, HAVE_DECL_LOG2L,
63922         REPLACE_LOG2L.
63923         * modules/log2l: New file.
63924         * tests/test-math-c++.cc: Check the declaration of log2l.
63925         * doc/posix-functions/log2l.texi: Mention the new module and the IRIX
63926         and OSF/1 problems.
63928 2012-03-11  Bruno Haible  <bruno@clisp.org>
63930         Tests for module 'log2f'.
63931         * modules/log2f-tests: New file.
63932         * tests/test-log2f.c: New file.
63934         New module 'log2f'.
63935         * lib/math.in.h (log2f): New declaration.
63936         * lib/log2f.c: New file.
63937         * m4/log2f.m4: New file.
63938         * m4/math_h.m4 (gl_MATH_H): Test whether log2f is declared.
63939         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG2F, HAVE_DECL_LOG2F,
63940         REPLACE_LOG2F.
63941         * modules/math (Makefile.am): Substitute GNULIB_LOG2F, HAVE_DECL_LOG2F,
63942         REPLACE_LOG2F.
63943         * modules/log2f: New file.
63944         * tests/test-math-c++.cc: Check the declaration of log2f.
63945         * doc/posix-functions/log2f.texi: Mention the new module and the IRIX
63946         and OSF/1 and Cygwin problems.
63948 2012-03-11  Bruno Haible  <bruno@clisp.org>
63950         Tests for module 'log2'.
63951         * modules/log2-tests: New file.
63952         * tests/test-log2.c: New file.
63953         * tests/test-log2.h: New file.
63955         New module 'log2'.
63956         * lib/math.in.h (log2): New declaration.
63957         * lib/log2.c: New file.
63958         * m4/log2.m4: New file.
63959         * m4/math_h.m4 (gl_MATH_H): Test whether log2 is declared.
63960         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG2, HAVE_DECL_LOG2,
63961         REPLACE_LOG2.
63962         * modules/math (Makefile.am): Substitute GNULIB_LOG2, HAVE_DECL_LOG2,
63963         REPLACE_LOG2.
63964         * modules/log2: New file.
63965         * tests/test-math-c++.cc: Check the declaration of log2.
63966         * doc/posix-functions/log2.texi: Mention the new module and the IRIX
63967         and OSF/1 and Cygwin problems.
63969 2012-03-11  Bruno Haible  <bruno@clisp.org>
63971         exp2* tests: More tests.
63972         * tests/test-exp2.h (test_function): Test all integral arguments that
63973         don't need to overflow or denormalized numbers.
63974         * tests/test-exp2.c (MAX_EXP, MIN_EXP): New macros.
63975         * tests/test-exp2f.c (MAX_EXP, MIN_EXP): Likewise.
63976         * tests/test-exp2l.c (MAX_EXP, MIN_EXP): Likewise.
63978 2012-03-10  Bruno Haible  <bruno@clisp.org>
63980         log1pl-ieee: Work around test failure on AIX 7.1.
63981         * modules/log1pl-ieee (Depends-on): Add log1p-ieee.
63983         log1pl-ieee: Work around test failure on IRIX 6.5.
63984         * m4/log1pl-ieee.m4: New file.
63985         * m4/log1pl.m4 (gl_FUNC_LOG1PL): If gl_FUNC_LOG1PL_IEEE is present,
63986         test whether log1pl works with a minus zero argument. Replace it if
63987         not.
63988         * lib/math.in.h (log1pl): Override if REPLACE_LOG1PL is 1.
63989         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOG1PL.
63990         * modules/math (Makefile.am): Substitute REPLACE_LOG1PL.
63991         * modules/log1pl (configure.ac): Consider REPLACE_LOG1PL.
63992         (Depends-on): Update conditions.
63993         * modules/log1pl-ieee (Files): Add m4/log1p-ieee.m4, m4/minus-zero.m4,
63994         m4/signbit.m4.
63995         (configure.ac): Invoke gl_FUNC_LOG1PL_IEEE.
63996         * doc/posix-functions/log1pl.texi: Mention the log1pl-ieee module.
63998         log1pf-ieee: Work around test failure on OpenBSD 4.9 and AIX 7.1.
63999         * m4/log1pf-ieee.m4: New file.
64000         * m4/log1pf.m4 (gl_FUNC_LOG1PF): If gl_FUNC_LOG1PF_IEEE is present,
64001         test whether log1pf works with a minus zero argument. Replace it if
64002         not.
64003         * modules/log1pf-ieee (Files): Add m4/log1pf-ieee.m4, m4/minus-zero.m4,
64004         m4/signbit.m4.
64005         (configure.ac): Invoke gl_FUNC_LOG1PF_IEEE.
64006         * doc/posix-functions/log1pf.texi: Mention the log1pf-ieee module.
64008         log1pf-ieee: Work around test failure on AIX 5.1 and HP-UX 11.
64009         * modules/log1pf-ieee (Depends-on): Add log1p-ieee.
64010         (configure.ac): Require gl_FUNC_LOG1PF.
64012         log1p-ieee: Work around test failure on AIX 7.1 and HP-UX 11.
64013         * m4/log1p-ieee.m4: New file.
64014         * m4/log1p.m4 (gl_FUNC_LOG1P): If gl_FUNC_LOG1P_IEEE is present, test
64015         whether log1p works with a minus zero argument. Replace it if not.
64016         * lib/math.in.h (log1p): Override if REPLACE_LOG1P is 1.
64017         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOG1P.
64018         * modules/math (Makefile.am): Substitute REPLACE_LOG1P.
64019         * modules/log1p (configure.ac): Consider REPLACE_LOG1P.
64020         (Depends-on): Update conditions.
64021         * modules/log1p-ieee (Files): Add m4/log1p-ieee.m4, m4/minus-zero.m4,
64022         m4/signbit.m4.
64023         (configure.ac): Invoke gl_FUNC_LOG1P_IEEE.
64024         * doc/posix-functions/log1p.texi: Mention the log1p-ieee module.
64026         Tests for module 'log1pl-ieee'.
64027         * modules/log1pl-ieee-tests: New file.
64028         * tests/test-log1pl-ieee.c: New file.
64030         New module 'log1pl-ieee'.
64031         * modules/log1pl-ieee: New file.
64033         Tests for module 'log1p-ieee'.
64034         * modules/log1p-ieee-tests: New file.
64035         * tests/test-log1p-ieee.c: New file.
64037         New module 'log1p-ieee'.
64038         * modules/log1p-ieee: New file.
64040         Tests for module 'log1pf-ieee'.
64041         * modules/log1pf-ieee-tests: New file.
64042         * tests/test-log1pf-ieee.c: New file.
64043         * tests/test-log1p-ieee.h: New file.
64045         New module 'log1pf-ieee'.
64046         * modules/log1pf-ieee: New file.
64048 2012-03-10  Bruno Haible  <bruno@clisp.org>
64050         Tests for module 'log1pl'.
64051         * modules/log1pl-tests: New file.
64052         * tests/test-log1pl.c: New file.
64054         New module 'log1pl'.
64055         * lib/math.in.h (log1pl): New declaration.
64056         * lib/log1pl.c: New file.
64057         * m4/log1pl.m4: New file.
64058         * m4/math_h.m4 (gl_MATH_H): Test whether log1pl is declared.
64059         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG1PL, HAVE_LOG1PL.
64060         * modules/math (Makefile.am): Substitute GNULIB_LOG1PL, HAVE_LOG1PL.
64061         * modules/log1pl: New file.
64062         * tests/test-math-c++.cc: Check the declaration of log1pl.
64063         * doc/posix-functions/log1pl.texi: Mention the new module.
64065 2012-03-10  Bruno Haible  <bruno@clisp.org>
64067         Tests for module 'log1pf'.
64068         * modules/log1pf-tests: New file.
64069         * tests/test-log1pf.c: New file.
64071         New module 'log1pf'.
64072         * lib/math.in.h (log1pf): New declaration.
64073         * lib/log1pf.c: New file.
64074         * m4/log1pf.m4: New file.
64075         * m4/math_h.m4 (gl_MATH_H): Test whether log1pf is declared.
64076         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG1PF, HAVE_LOG1PF,
64077         REPLACE_LOG1PF.
64078         * modules/math (Makefile.am): Substitute GNULIB_LOG1PF, HAVE_LOG1PF,
64079         REPLACE_LOG1PF.
64080         * modules/log1pf: New file.
64081         * tests/test-math-c++.cc: Check the declaration of log1pf.
64082         * doc/posix-functions/log1pf.texi: Mention the new module.
64084 2012-03-10  Bruno Haible  <bruno@clisp.org>
64086         log1p tests: More tests.
64087         * tests/test-log1p.h: New file.
64088         * modules/log1p-tests (Files): Add tests/test-log1p.h, tests/randomd.c.
64089         (Makefile.am): Add randomd.c to test_log1p_SOURCES.
64090         * tests/test-log1p.c: Include <float.h> and test-log1p.h.
64091         (main): Invoke test_function.
64093         log1p: Provide replacement for Minix and MSVC.
64094         * lib/math.in.h (log1p): New declaration.
64095         * lib/log1p.c: New file.
64096         * m4/log1p.m4: New file.
64097         * m4/math_h.m4 (gl_MATH_H): Test whether log1p is declared.
64098         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG1P, HAVE_LOG1P.
64099         * modules/math (Makefile.am): Substitute GNULIB_LOG1P, HAVE_LOG1P.
64100         * modules/log1p (Files): Add lib/log1p.c, m4/log1p.m4.
64101         (Depends-on): Add math, isnand, log, round.
64102         (configure.ac): Invoke gl_FUNC_LOG1P. Arrange to compile replacement if
64103         HAVE_LOG1P is 0.
64104         * tests/test-math-c++.cc: Check the declaration of log1p.
64105         * doc/posix-functions/log1p.texi: Mention the replacement.
64107 2012-03-10  Bruno Haible  <bruno@clisp.org>
64109         math tests: Small simplification.
64110         * tests/test-exp.h (test_function): Use the same err_bound for
64111         'double' on platforms with sizeof (long double) == sizeof (double)
64112         than on platforms with sizeof (long double) > sizeof (double).
64113         * tests/test-exp2.h (test_function): Likewise.
64114         * tests/test-expm1.h (test_function): Likewise.
64115         * tests/test-log.h (test_function): Likewise.
64117 2012-03-10  Bruno Haible  <bruno@clisp.org>
64119         Fix some comments.
64120         * lib/expl.c: Fix an ambiguous comment.
64121         * lib/expm1.c: Likewise.
64122         * lib/expm1l.c: Likewise.
64123         * lib/exp2.c: Likewise.
64124         * lib/exp2l.c: Likewise.
64126 2012-03-10  Paul Eggert  <eggert@cs.ucla.edu>
64128         regex: allow inclusion of <regex.h> before <limits.h>
64129         Without this patch, portable programs had to include <limits.h> before
64130         <regex.h> if they wanted a consistent value for RE_DUP_MAX.
64131         I ran into this problem with a test version of GNU grep on Solaris 8.
64132         * lib/regex.h: Include <limits.h> if _REGEX_INCLUDE_LIMITS_H.
64133         This is done conditionally so that this change can be merged
64134         back to glibc.
64135         * m4/regex.m4 (gl_REGEX): Define _REGEX_INCLUDE_LIMITS_H if
64136         using the included regex.
64138         fts: depend on fdopendir
64139         * modules/fts (Depends-on): Depend on fdopendir.  This is needed
64140         on Solaris 8, at least, since it lacks fdopendir.  Evidently the
64141         problem was introduced when fdopendir was split out.
64143 2012-03-10  Bruno Haible  <bruno@clisp.org>
64145         Remove unused variables.
64146         * m4/fmodf.m4 (gl_FUNC_FMODF): Remove unused variable 'i'.
64147         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise.
64149 2012-03-10  Bruno Haible  <bruno@clisp.org>
64151         isnanf-nolibm: Fix last commit.
64152         * lib/isnanf-nolibm.h [IRIX]: Don't include <ieeefp.h>. Declare isnanf.
64154         isnanf-nolibm: Make it work on IRIX 6.5 with cc.
64155         * lib/isnanf-nolibm.h [IRIX]: Include <ieeefp.h>.
64157 2012-03-10  Bruno Haible  <bruno@clisp.org>
64159         logf-ieee: Work around test failure on NetBSD 5.1.
64160         * m4/logf-ieee.m4: New file.
64161         * m4/logf.m4 (gl_FUNC_LOGF): If gl_FUNC_LOGF_IEEE is present, test
64162         whether logf works with a negative argument. Replace it if not.
64163         * lib/logf.c (logf): For negative arguments, return NaN.
64164         * modules/logf-ieee (Files): Add m4/logf-ieee.m4.
64165         (configure.ac): Invoke gl_FUNC_LOGF_IEEE.
64166         * doc/posix-functions/logf.texi: Mention the logf-ieee module.
64168         logf-ieee: Work around test failure on Solaris 9.
64169         * modules/logf-ieee (Depends-on): Add log-ieee.
64170         (configure.ac): Require gl_FUNC_LOGF.
64172         log-ieee: Work around test failure on NetBSD 5.1 and Solaris 11.
64173         * m4/log-ieee.m4: New file.
64174         * m4/log.m4 (gl_FUNC_LOG): If gl_FUNC_LOG_IEEE is present, test whether
64175         log works with a negative argument. Replace it if not.
64176         * lib/log.c (log): For negative arguments, return NaN.
64177         * modules/log-ieee (Files): Add m4/log-ieee.m4.
64178         (configure.ac): Invoke gl_FUNC_LOG_IEEE.
64179         * doc/posix-functions/log.texi: Mention the log-ieee module.
64181         Tests for module 'logl-ieee'.
64182         * modules/logl-ieee-tests: New file.
64183         * tests/test-logl-ieee.c: New file.
64185         New module 'logl-ieee'.
64186         * modules/logl-ieee: New file.
64188         Tests for module 'log-ieee'.
64189         * modules/log-ieee-tests: New file.
64190         * tests/test-log-ieee.c: New file.
64192         New module 'log-ieee'.
64193         * modules/log-ieee: New file.
64195         Tests for module 'logf-ieee'.
64196         * modules/logf-ieee-tests: New file.
64197         * tests/test-logf-ieee.c: New file.
64198         * tests/test-log-ieee.h: New file.
64200         New module 'logf-ieee'.
64201         * modules/logf-ieee: New file.
64203 2012-03-10  Bruno Haible  <bruno@clisp.org>
64205         log: Fix bug introduced on 2012-03-09.
64206         * m4/log.m4 (gl_FUNC_LOG): Require gl_MATH_H_DEFAULTS.
64208 2012-03-10  Pádraig Brady  <P@draigBrady.com>
64210         timer-time: link explicitly with pthreads on glibc
64211         * m4/timer_time.m4 (LIB_TIMER_TIME): Add -lpthread
64212         to support static linking, when newer glibc is
64213         detected, as that contains pthread emulation of
64214         POSIX timer functions where required.
64215         * modules/timer-time: Depend on threadlib to
64216         pull in the appropriate library to link.
64218 2012-03-10  Bruno Haible  <bruno@clisp.org>
64220         log* tests: More tests.
64221         * tests/test-log.h: New file.
64222         * tests/test-log.c: Include <float.h>, minus-zero.h, test-log.h.
64223         (main): Invoke test_function.
64224         * tests/test-logf.c: Include <float.h>, minus-zero.h, test-log.h.
64225         (main): Invoke test_function.
64226         * tests/test-logl.c: Include <float.h>, minus-zero.h, test-log.h.
64227         (main): Invoke test_function.
64228         * modules/log-tests (Files): Add tests/test-log.h, tests/minus-zero.h,
64229         tests/randomd.c.
64230         (Makefile.am): Add randomd.c to test_log_SOURCES.
64231         * modules/logf-tests (Files): Add tests/test-log.h, tests/minus-zero.h,
64232         tests/randomf.c.
64233         (Makefile.am): Add randomf.c to test_logf_SOURCES.
64234         * modules/logl-tests (Files): Add tests/test-log.h, tests/minus-zero.h,
64235         tests/randoml.c.
64236         (Depends-on): Add 'float'.
64237         (Makefile.am): Add randoml.c to test_logl_SOURCES.
64239 2012-03-09  Bruno Haible  <bruno@clisp.org>
64241         logl: Work around OSF/1 5.1 bug.
64242         * lib/math.in.h (logl): Override if REPLACE_LOGL is 1.
64243         * lib/logl.c (logl): If logl exists, use it and provide just the
64244         workaround.
64245         * m4/logl.m4 (gl_FUNC_LOGL_WORKS): New macro.
64246         (gl_FUNC_LOGL): Invoke it. Set REPLACE_LOGL.
64247         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOGL.
64248         * modules/math (Makefile.am): Substitute REPLACE_LOGL.
64249         * modules/logl (configure.ac): Consider REPLACE_LOGL.
64250         (Depends-on): Update conditions.
64251         * doc/posix-functions/logl.texi: Mention the OSF/1 5.1 problem.
64253 2012-03-09  Bruno Haible  <bruno@clisp.org>
64255         logf: Work around OSF/1 5.1 bug.
64256         * lib/math.in.h (logf): Override if REPLACE_LOGF is 1.
64257         * lib/logf.c (logf): If logf exists, use it and provide just the
64258         workaround.
64259         * m4/logf.m4 (gl_FUNC_LOGF_WORKS): New macro.
64260         (gl_FUNC_LOGF): Invoke it. Set REPLACE_LOGF.
64261         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOGF.
64262         * modules/math (Makefile.am): Substitute REPLACE_LOGF.
64263         * modules/logf (configure.ac): Consider REPLACE_LOGF.
64264         (Depends-on): Update conditions.
64265         * doc/posix-functions/logf.texi: Mention the OSF/1 5.1 problem.
64267 2012-03-09  Bruno Haible  <bruno@clisp.org>
64269         log: Work around OSF/1 5.1 bug.
64270         * lib/math.in.h (log): New declaration.
64271         * lib/log.c: New file.
64272         * m4/log.m4 (gl_FUNC_LOG_WORKS): New macro.
64273         (gl_FUNC_LOG): Invoke it. Set REPLACE_LOG.
64274         * m4/math_h.m4 (gl_MATH_H): Test whether log is declared.
64275         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG, REPLACE_LOG.
64276         * modules/math (Makefile.am): Substitute GNULIB_LOG, REPLACE_LOG.
64277         * modules/log (Files): Add lib/log.c.
64278         (Depends-on): Add math.
64279         (configure.ac): If REPLACE_LOG is 1, compile an override.
64280         * tests/test-math-c++.cc: Check the declaration of log.
64281         * doc/posix-functions/log.texi: Mention the OSF/1 5.1 problem.
64283 2012-03-09  Jim Meyering  <meyering@redhat.com>
64285         readtokens.c: adjust wording in a comment
64286         * lib/readtokens.c: Insert omitted "that" in a comment.
64288 2012-03-08  Paul Eggert  <eggert@cs.ucla.edu>
64290         modechange: add notations +40, 00440, etc.
64291         * lib/modechange.c (mode_compile): Support new notations
64292         +40, -40, =440, 00440.  See <http://debbugs.gnu.org/8391>.
64294 2012-03-08  Bruno Haible  <bruno@clisp.org>
64296         exp2l-ieee: Work around test failure on OpenBSD 4.9 and IRIX 6.5.
64297         * m4/exp2l-ieee.m4: New file.
64298         * m4/exp2l.m4 (gl_FUNC_EXP2L): If gl_FUNC_EXP2L_IEEE is present,
64299         test whether exp2l works with a NaN argument and with a negative
64300         infinity argument. Replace it if not.
64301         * lib/math.in.h (exp2l): Override if REPLACE_EXP2L is 1.
64302         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXP2L.
64303         * modules/math (Makefile.am): Substitute REPLACE_EXP2L.
64304         * modules/exp2l (configure.ac): Consider REPLACE_EXP2L.
64305         (Depends-on): Update conditions.
64306         * modules/exp2l-ieee (Files): Add m4/exp2l-ieee.m4.
64307         (configure.ac): Invoke gl_FUNC_EXP2L_IEEE.
64308         * doc/posix-functions/exp2l.texi: Mention the exp2l-ieee module.
64310         Tests for module 'exp2l-ieee'.
64311         * modules/exp2l-ieee-tests: New file.
64312         * tests/test-exp2l-ieee.c: New file.
64314         New module 'exp2l-ieee'.
64315         * modules/exp2l-ieee: New file.
64317         Tests for module 'exp2-ieee'.
64318         * modules/exp2-ieee-tests: New file.
64319         * tests/test-exp2-ieee.c: New file.
64321         New module 'exp2-ieee'.
64322         * modules/exp2-ieee: New file.
64324         Tests for module 'exp2f-ieee'.
64325         * modules/exp2f-ieee-tests: New file.
64326         * tests/test-exp2f-ieee.c: New file.
64327         * tests/test-exp2-ieee.h: New file.
64329         New module 'exp2f-ieee'.
64330         * modules/exp2f-ieee: New file.
64332 2012-03-08  Bruno Haible  <bruno@clisp.org>
64334         Tests for module 'exp2l'.
64335         * modules/exp2l-tests: New file.
64336         * tests/test-exp2l.c: New file.
64338         New module 'exp2l'.
64339         * lib/math.in.h (exp2l): New declaration.
64340         * lib/exp2l.c: New file.
64341         * lib/expl-table.c: New file, extracted from lib/expl.c.
64342         * lib/expl.c (gl_expl_table): New declaration.
64343         (expl): Remove expl_table. Update reference.
64344         * m4/exp2l.m4: New file.
64345         * m4/math_h.m4 (gl_MATH_H): Test whether exp2l is declared.
64346         (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXP2L, HAVE_DECL_EXP2L.
64347         * modules/math (Makefile.am): Substitute GNULIB_EXP2L, HAVE_DECL_EXP2L.
64348         * modules/exp2l: New file.
64349         * modules/expl (Files): Add lib/expl-table.c.
64350         (configure.ac): Compile also expl-table.c.
64351         * tests/test-math-c++.cc: Check the declaration of exp2l.
64352         * doc/posix-functions/exp2l.texi: Mention the new module and the IRIX
64353         problem.
64355 2012-03-08  Bruno Haible  <bruno@clisp.org>
64357         Tests for module 'exp2f'.
64358         * modules/exp2f-tests: New file.
64359         * tests/test-exp2f.c: New file.
64361         New module 'exp2f'.
64362         * lib/math.in.h (exp2f): New declaration.
64363         * lib/exp2f.c: New file.
64364         * m4/exp2f.m4: New file.
64365         * m4/math_h.m4 (gl_MATH_H): Test whether exp2f is declared.
64366         (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXP2F, HAVE_DECL_EXP2F.
64367         * modules/math (Makefile.am): Substitute GNULIB_EXP2F, HAVE_DECL_EXP2F.
64368         * modules/exp2f: New file.
64369         * tests/test-math-c++.cc: Check the declaration of exp2f.
64370         * doc/posix-functions/exp2f.texi: Mention the new module and the
64371         IRIX problem.
64373 2012-03-08  Bruno Haible  <bruno@clisp.org>
64375         Tests for module 'exp2'.
64376         * modules/exp2-tests: New file.
64377         * tests/test-exp2.c: New file.
64378         * tests/test-exp2.h: New file.
64380         New module 'exp2'.
64381         * lib/math.in.h (exp2): New declaration.
64382         * lib/exp2.c: New file.
64383         * m4/exp2.m4: New file.
64384         * m4/math_h.m4 (gl_MATH_H): Test whether exp2 is declared.
64385         (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXP2, HAVE_DECL_EXP2,
64386         REPLACE_EXP2.
64387         * modules/math (Makefile.am): Substitute GNULIB_EXP2, HAVE_DECL_EXP2,
64388         REPLACE_EXP2.
64389         * modules/exp2: New file.
64390         * tests/test-math-c++.cc: Check the declaration of exp2.
64391         * doc/posix-functions/exp2.texi: Mention the new module and the IRIX
64392         and OpenBSD problems.
64394 2012-03-08  Paul Eggert  <eggert@cs.ucla.edu>
64396         savedir: fix comment typo
64397         * lib/savedir.c (savedirstream): Fix typo in comment.
64399 2012-03-08  Bruno Haible  <bruno@clisp.org>
64401         test-readtokens.c: use const; remove unwarranted cast
64402         * tests/test-readtokens.c: Declare delim to be const, to avoid a cast.
64404 2012-03-08  Bruno Haible  <bruno@clisp.org>
64406         fmal: Avoid compilation error on AIX.
64407         * lib/math.in.h (fmal): Undefine macro before declaration. Needed on
64408         AIX 5.2..7.1.
64410 2012-03-08  Bruno Haible  <bruno@clisp.org>
64412         fma, fmaf, fmal: Override undeclared system functions on IRIX 6.5.
64413         * m4/fma.m4 (gl_FUNC_FMA): If fma() exists but is not declared,
64414         arrange to set REPLACE_FMA=1, not HAVE_FMA=0.
64415         * m4/fmaf.m4 (gl_FUNC_FMAF): If fmaf() exists but is not declared,
64416         arrange to set REPLACE_FMAF=1, not HAVE_FMAF=0.
64417         * m4/fmal.m4 (gl_FUNC_FMAL): If fmal() exists but is not declared,
64418         arrange to set REPLACE_FMAL=1, not HAVE_FMAL=0.
64420 2012-03-08  Bruno Haible  <bruno@clisp.org>
64422         remainderf: Override buggy system function on IRIX 6.5.
64423         * m4/remainderf.m4 (gl_FUNC_REMAINDERF_WORKS): New macro.
64424         (gl_FUNC_REMAINDERF): Invoke it. Don't assume remainderf() is declared
64425         when it exists.
64426         * doc/posix-functions/remainderf.texi: Mention the IRIX problems.
64428 2012-03-08  Jim Meyering  <meyering@redhat.com>
64430         test-readtokens.c: avoid const-related compilation warnings
64431         * tests/test-readtokens.c: Avoid const-related compilation warnings.
64433 2012-03-07  Jim Meyering  <meyering@redhat.com>
64434             Bruno Haible  <bruno@clisp.org>
64436         frexp-nolibm, frexpl-nolibm tests: Fix bug introduced on 2012-03-03.
64437         * modules/frexp-nolibm-tests (Files): Add tests/test-frexp.h,
64438         tests/randomd.c.
64439         (Makefile.am): Add randomd.c to test_frexp_nolibm_SOURCES.
64440         * modules/frexpl-nolibm-tests (Files): Add tests/test-frexp.h,
64441         tests/randoml.c.
64442         (Makefile.am): Add randoml.c to test_frexpl_nolibm_SOURCES.
64444 2012-03-07  Bruno Haible  <bruno@clisp.org>
64446         expm1l: Avoid compilation error on AIX.
64447         * lib/math.in.h (expm1l): Undefine macro before declaration. Needed on
64448         AIX 5.2..7.1.
64450 2012-03-07  Bruno Haible  <bruno@clisp.org>
64452         expm1l: Don't override undeclared system function on IRIX 6.5.
64453         * lib/math.in.h (expm1l): Test HAVE_DECL_EXPM1L, not HAVE_EXPM1L.
64454         * m4/expm1l.m4 (gl_FUNC_EXPM1L): Don't assume expm1l() is declared when
64455         it exists. Set HAVE_DECL_EXPM1L.
64456         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_EXPM1L, not
64457         HAVE_EXPM1L.
64458         * modules/math (Makefile.am): Substitute HAVE_DECL_EXPM1L, not
64459         HAVE_EXPM1L.
64460         * doc/posix-functions/expm1l.texi: Mention missing declaration problem.
64462 2012-03-07  Bruno Haible  <bruno@clisp.org>
64464         remainderl: Don't override undeclared system function on IRIX 6.5.
64465         * lib/math.in.h (remainderl): Test HAVE_DECL_REMAINDERL, not
64466         HAVE_REMAINDERL.
64467         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Don't assume remainderl() is
64468         declared when it exists. Set HAVE_DECL_REMAINDERL.
64469         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_REMAINDERL,
64470         not HAVE_REMAINDERL.
64471         * modules/math (Makefile.am): Substitute HAVE_DECL_REMAINDERL, not
64472         HAVE_REMAINDERL.
64473         * doc/posix-functions/remainderl.texi: Mention missing declaration
64474         problem.
64476 2012-03-07  Bruno Haible  <bruno@clisp.org>
64478         rintf: Don't override undeclared system function on IRIX 6.5.
64479         * lib/math.in.h (rintf): Test HAVE_DECL_RINTF, not HAVE_RINTF.
64480         * m4/rintf.m4 (gl_FUNC_RINTF): Don't assume rintf() is declared when it
64481         exists. Set HAVE_DECL_RINTF.
64482         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_RINTF, not
64483         HAVE_RINTF.
64484         * modules/math (Makefile.am): Substitute HAVE_DECL_RINTF, not
64485         HAVE_RINTF.
64486         * doc/posix-functions/rintf.texi: Mention missing declaration problem.
64488 2012-03-07  Bruno Haible  <bruno@clisp.org>
64490         roundl: Avoid compilation error on AIX.
64491         * lib/math.in.h (roundl): Undefine macro before declaration. Needed on
64492         AIX 5.2..7.1.
64494 2012-03-07  Bruno Haible  <bruno@clisp.org>
64496         roundl: Don't override undeclared system function on IRIX 6.5.
64497         * m4/roundl.m4 (gl_FUNC_ROUNDL): Search for roundl() in the libraries
64498         also when it is not declared. Set HAVE_ROUNDL. For replacement code,
64499         test HAVE_ROUNDL, not HAVE_DECL_ROUNDL.
64500         * modules/roundl (configure.ac): For replacement code, test
64501         HAVE_ROUNDL, not HAVE_DECL_ROUNDL.
64502         (Depends-on): Update conditions.
64503         * doc/posix-functions/roundl.texi: Mention the IRIX problem.
64505 2012-03-07  Bruno Haible  <bruno@clisp.org>
64507         roundf: Don't override undeclared system function on IRIX 6.5.
64508         * m4/roundf.m4 (gl_FUNC_ROUNDF): Search for roundf() in the libraries
64509         also when it is not declared. Set HAVE_ROUNDF. For replacement code,
64510         test HAVE_ROUNDF, not HAVE_DECL_ROUNDF.
64511         * modules/roundf (configure.ac): For replacement code, test
64512         HAVE_ROUNDF, not HAVE_DECL_ROUNDF.
64513         (Depends-on): Update conditions.
64514         * modules/roundf-ieee (Depends-on): Update conditions.
64515         * doc/posix-functions/roundf.texi: Mention the IRIX problem.
64517 2012-03-07  Bruno Haible  <bruno@clisp.org>
64519         round: Don't override undeclared system function on IRIX 6.5.
64520         * m4/check-math-lib.m4 (gl_CHECK_MATH_LIB): Accept an optional third
64521         argument.
64522         * m4/round.m4 (gl_FUNC_ROUND): Search for round() in the libraries
64523         also when it is not declared. Set HAVE_ROUND. For replacement code,
64524         test HAVE_ROUND, not HAVE_DECL_ROUND.
64525         * modules/round (configure.ac): For replacement code, test HAVE_ROUND,
64526         not HAVE_DECL_ROUND.
64527         (Depends-on): Update conditions.
64528         * modules/round-ieee (Depends-on): Update conditions.
64529         * doc/posix-functions/round.texi: Mention the IRIX problem.
64531 2012-03-07  Bruno Haible  <bruno@clisp.org>
64533         copysignf: Don't override undeclared system function on IRIX 6.5.
64534         * lib/math.in.h (copysignf): Test HAVE_DECL_COPYSIGNF, not
64535         HAVE_COPYSIGNF.
64536         * m4/copysignf.m4 (gl_FUNC_COPYSIGNF): Don't assume copysignf() is
64537         declared when it exists. Set HAVE_DECL_COPYSIGNF.
64538         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_COPYSIGNF,
64539         not HAVE_COPYSIGNF.
64540         * modules/math (Makefile.am): Substitute HAVE_DECL_COPYSIGNF, not
64541         HAVE_COPYSIGNF.
64542         * doc/posix-functions/copysignf.texi: Mention missing declaration
64543         problem.
64545 2012-03-07  Jim Meyering  <meyering@redhat.com>
64547         readtokens: add tests
64548         * modules/readtokens-tests: New file.
64549         * tests/test-readtokens.c: New file.
64551 2012-03-07  Jim Meyering  <meyering@redhat.com>
64553         quotearg: the module must now include quote.h
64554         With commit v0.0-7133-g6417476, quotearg.c includes "quote.h".
64555         So must the module.
64556         * modules/quotearg (Files): Add quote.h.
64558 2012-03-06  Paul Eggert  <eggert@cs.ucla.edu>
64560         readtokens: avoid core dumps with unusual calling patterns
64561         Reported by Xu Zhongxing in <http://debbugs.gnu.org/10953>.
64562         * lib/readtokens.c: Include limits.h.
64563         (word, bits_per_word, get_nth_bit, set_nth_bit): New.
64564         (readtoken): Don't cache the delimiters; the cache code was buggy
64565         if !delim && saved_delim, or if the new n_delim differs from the old.
64566         Also, it wasn't thread-safe.
64568 2012-03-07  Bruno Haible  <bruno@clisp.org>
64570         quote: Adhere to common module description layout.
64571         * modules/quote (Makefile.am): Add back empty section.
64573 2012-03-06  Akim Demaille  <demaille@gostai.com>
64575         quote: fuse into quotearg
64576         This patch is made for the benefit of Bison.
64577         quote does not leave the choice of the quoting style to the user.
64578         quoting_style provides poor customizability, yet quoting_options,
64579         which is very rich, is hidden inside quotearg.c.  So in order to
64580         allow quote customization, move its implementation to quotearg.c.
64581         * lib/quote.c: Remove.
64582         * modules/quote: Adjust.
64583         * lib/quotearg.c (quoting_options_from_style): Fix a compiler
64584         warning: provide all the members of literal structs.
64585         (quote_quoting_options): New.
64586         (quote, quote_n): Import implementation from quote.c.
64587         * lib/quote.h: Import the comments from quote.c.
64588         (quote_quoting_options): New.
64590 2012-03-06  Bruno Haible  <bruno@clisp.org>
64592         Tests for module 'expm1l-ieee'.
64593         * modules/expm1l-ieee-tests: New file.
64594         * tests/test-expm1l-ieee.c: New file.
64596         New module 'expm1l-ieee'.
64597         * modules/expm1l-ieee: New file.
64599         Tests for module 'expm1f-ieee'.
64600         * modules/expm1f-ieee-tests: New file.
64601         * tests/test-expm1f-ieee.c: New file.
64603         New module 'expm1f-ieee'.
64604         * modules/expm1f-ieee: New file.
64606         Tests for module 'expm1-ieee'.
64607         * modules/expm1-ieee-tests: New file.
64608         * tests/test-expm1-ieee.c: New file.
64609         * tests/test-expm1-ieee.h: New file.
64611         New module 'expm1-ieee'.
64612         * modules/expm1-ieee: New file.
64613         * m4/expm1-ieee.m4: New file.
64614         * m4/expm1.m4 (gl_FUNC_EXPM1): If gl_FUNC_EXPM1_IEEE is present, test
64615         whether expm1 works with a minus zero argument. Replace it if not.
64616         * lib/math.in.h (expm1): Override if REPLACE_EXPM1 is 1.
64617         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXPM1.
64618         * modules/math (Makefile.am): Substitute REPLACE_EXPM1.
64619         * modules/expm1 (configure.ac): Consider REPLACE_EXPM1.
64620         (Depends-on): Update conditions.
64621         * doc/posix-functions/expm1.texi: Mention the expm1-ieee module and the
64622         AIX problem.
64624 2012-03-06  Bruno Haible  <bruno@clisp.org>
64626         Work around expm1f bug on IRIX 6.5.
64627         * lib/math.in.h (expm1f): Override if REPLACE_EXPM1F is 1.
64628         * m4/expm1f.m4 (gl_FUNC_EXPM1F_WORKS): New macro.
64629         (gl_FUNC_EXPM1F): Invoke it. Set REPLACE_EXPM1F to 1 if expm1f() does
64630         not work.
64631         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_EXPM1F.
64632         * modules/math (Makefile.am): Substitute REPLACE_EXPM1F.
64633         * modules/expm1f (configure.ac): Consider REPLACE_EXPM1F.
64634         (Depends-on): Update conditions.
64635         * doc/posix-functions/expm1f.texi: Mention the IRIX 6.5 bug.
64637 2012-03-06  Bruno Haible  <bruno@clisp.org>
64639         Tests for module 'expm1l'.
64640         * modules/expm1l-tests: New file.
64641         * tests/test-expm1l.c: New file.
64643         New module 'expm1l'.
64644         * lib/math.in.h (expm1l): New declaration.
64645         * lib/expm1l.c: New file.
64646         * m4/expm1l.m4: New file.
64647         * m4/math_h.m4 (gl_MATH_H): Test whether expm1l is declared.
64648         (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXPM1L, HAVE_EXPM1L.
64649         * modules/math (Makefile.am): Substitute GNULIB_EXPM1L, HAVE_EXPM1L.
64650         * modules/expm1l: New file.
64651         * tests/test-math-c++.cc: Check the declaration of expm1l.
64652         * doc/posix-functions/expm1l.texi: Mention the new module.
64654 2012-03-06  Bruno Haible  <bruno@clisp.org>
64656         Tests for module 'expm1f'.
64657         * modules/expm1f-tests: New file.
64658         * tests/test-expm1f.c: New file.
64660         New module 'expm1f'.
64661         * lib/math.in.h (expm1f): New declaration.
64662         * lib/expm1f.c: New file.
64663         * m4/expm1f.m4: New file.
64664         * m4/math_h.m4 (gl_MATH_H): Test whether expm1f is declared.
64665         (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXPM1F, HAVE_EXPM1F.
64666         * modules/math (Makefile.am): Substitute GNULIB_EXPM1F, HAVE_EXPM1F.
64667         * modules/expm1f: New file.
64668         * tests/test-math-c++.cc: Check the declaration of expm1f.
64669         * doc/posix-functions/expm1f.texi: Mention the new module.
64671 2012-03-06  Bruno Haible  <bruno@clisp.org>
64673         Tests for module 'expm1'.
64674         * modules/expm1-tests: New file.
64675         * tests/test-expm1.c: New file.
64676         * tests/test-expm1.h: New file.
64678         New module 'expm1'.
64679         * lib/math.in.h (expm1): New declaration.
64680         * lib/expm1.c: New file.
64681         * m4/expm1.m4: New file.
64682         * m4/math_h.m4 (gl_MATH_H): Test whether expm1 is declared.
64683         (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXPM1, HAVE_EXPM1.
64684         * modules/math (Makefile.am): Substitute GNULIB_EXPM1, HAVE_EXPM1.
64685         * modules/expm1: New file.
64686         * tests/test-math-c++.cc: Check the declaration of expm1.
64687         * doc/posix-functions/expm1.texi: Mention the new module.
64689 2012-03-06  Bruno Haible  <bruno@clisp.org>
64691         math: Ensure declarations of math functions.
64692         * modules/acosf (Depends-on): Add 'extensions'.
64693         * modules/asinf (Depends-on): Likewise.
64694         * modules/atan2f (Depends-on): Likewise.
64695         * modules/atanf (Depends-on): Likewise.
64696         * modules/cbrt (Depends-on): Likewise.
64697         * modules/cbrtf (Depends-on): Likewise.
64698         * modules/cbrtl (Depends-on): Likewise.
64699         * modules/copysignf (Depends-on): Likewise.
64700         * modules/copysignl (Depends-on): Likewise.
64701         * modules/cosf (Depends-on): Likewise.
64702         * modules/coshf (Depends-on): Likewise.
64703         * modules/expf (Depends-on): Likewise.
64704         * modules/fabsf (Depends-on): Likewise.
64705         * modules/fabsl (Depends-on): Likewise.
64706         * modules/fmaf (Depends-on): Likewise.
64707         * modules/fmal (Depends-on): Likewise.
64708         * modules/fmodf (Depends-on): Likewise.
64709         * modules/fmodl (Depends-on): Likewise.
64710         * modules/frexpf (Depends-on): Likewise.
64711         * modules/frexpl (Depends-on): Likewise.
64712         * modules/hypot (Depends-on): Likewise.
64713         * modules/hypotf (Depends-on): Likewise.
64714         * modules/hypotl (Depends-on): Likewise.
64715         * modules/ldexpf (Depends-on): Likewise.
64716         * modules/ldexpl (Depends-on): Likewise.
64717         * modules/log10f (Depends-on): Likewise.
64718         * modules/log10l (Depends-on): Likewise.
64719         * modules/log1p (Depends-on): Likewise.
64720         * modules/logb (Depends-on): Likewise.
64721         * modules/logf (Depends-on): Likewise.
64722         * modules/modff (Depends-on): Likewise.
64723         * modules/modfl (Depends-on): Likewise.
64724         * modules/powf (Depends-on): Likewise.
64725         * modules/remainderf (Depends-on): Likewise.
64726         * modules/remainderl (Depends-on): Likewise.
64727         * modules/rintf (Depends-on): Likewise.
64728         * modules/rintl (Depends-on): Likewise.
64729         * modules/sinf (Depends-on): Likewise.
64730         * modules/sinhf (Depends-on): Likewise.
64731         * modules/sqrtf (Depends-on): Likewise.
64732         * modules/tanf (Depends-on): Likewise.
64733         * modules/tanhf (Depends-on): Likewise.
64734         * m4/acosf.m4 (gl_FUNC_ACOSF): Require gl_USE_SYSTEM_EXTENSIONS.
64735         * m4/asinf.m4 (gl_FUNC_ASINF): Likewise.
64736         * m4/atan2f.m4 (gl_FUNC_ATAN2F): Likewise.
64737         * m4/atanf.m4 (gl_FUNC_ATANF): Likewise.
64738         * m4/cbrt.m4 (gl_FUNC_CBRT): Likewise.
64739         * m4/cbrtf.m4 (gl_FUNC_CBRTF): Likewise.
64740         * m4/cbrtl.m4 (gl_FUNC_CBRTL): Likewise.
64741         * m4/copysignf.m4 (gl_FUNC_COPYSIGNF): Likewise.
64742         * m4/copysignl.m4 (gl_FUNC_COPYSIGNL): Likewise.
64743         * m4/cosf.m4 (gl_FUNC_COSF): Likewise.
64744         * m4/coshf.m4 (gl_FUNC_COSHF): Likewise.
64745         * m4/expf.m4 (gl_FUNC_EXPF): Likewise.
64746         * m4/fabsf.m4 (gl_FUNC_FABSF): Likewise.
64747         * m4/fabsl.m4 (gl_FUNC_FABSL): Likewise.
64748         * m4/fmaf.m4 (gl_FUNC_FMAF): Likewise.
64749         * m4/fmal.m4 (gl_FUNC_FMAL): Likewise.
64750         * m4/fmodf.m4 (gl_FUNC_FMODF): Likewise.
64751         * m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
64752         * m4/frexpf.m4 (gl_FUNC_FREXPF): Likewise.
64753         * m4/frexpl.m4 (gl_FUNC_FREXPL): Likewise.
64754         * m4/hypot.m4 (gl_FUNC_HYPOT): Likewise.
64755         * m4/hypotf.m4 (gl_FUNC_HYPOTF): Likewise.
64756         * m4/hypotl.m4 (gl_FUNC_HYPOTL): Likewise.
64757         * m4/ldexpf.m4 (gl_FUNC_LDEXPF): Likewise.
64758         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Likewise.
64759         * m4/log10f.m4 (gl_FUNC_LOG10F): Likewise.
64760         * m4/log10l.m4 (gl_FUNC_LOF10L): Likewise.
64761         * m4/logb.m4 (gl_FUNC_LOGB): Likewise.
64762         * m4/logf.m4 (gl_FUNC_LOGF): Likewise.
64763         * m4/modff.m4 (gl_FUNC_MODFF): Likewise.
64764         * m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
64765         * m4/powf.m4 (gl_FUNC_POWF): Likewise.
64766         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Likewise.
64767         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Likewise.
64768         * m4/rintf.m4 (gl_FUNC_RINTF): Likewise.
64769         * m4/rintl.m4 (gl_FUNC_RINTL): Likewise.
64770         * m4/sinf.m4 (gl_FUNC_SINF): Likewise.
64771         * m4/sinhf.m4 (gl_FUNC_SINHF): Likewise.
64772         * m4/sqrtf.m4 (gl_FUNC_SQRTF): Likewise.
64773         * m4/tanf.m4 (gl_FUNC_TANF): Likewise.
64774         * m4/tanhf.m4 (gl_FUNC_TANHF): Likewise.
64776 2012-03-06  Bruno Haible  <bruno@clisp.org>
64778         math: Update module names in warnings.
64779         * lib/math.in.h (acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl,
64780         tanl): Use specific module name in warn-on-use warning.
64782 2012-03-06  Bruno Haible  <bruno@clisp.org>
64784         expl: Simplify computation.
64785         * lib/expl.c (expl): Simplify computation of exp_y. Fix comment.
64787 2012-03-05  Bruno Haible  <bruno@clisp.org>
64789         exp* tests: More tests.
64790         * tests/test-exp.h: New file.
64791         * tests/test-exp.c: Include <float.h> and test-exp.h.
64792         (main): Invoke test_function.
64793         * tests/test-expf.c: Include <float.h> and test-exp.h.
64794         (main): Invoke test_function.
64795         * tests/test-expl.c: Include <float.h> and test-exp.h.
64796         (main): Invoke test_function.
64797         * modules/exp-tests (Files): Add tests/test-exp.h, tests/randomd.c.
64798         (Makefile.am): Add randomd.c to test_exp_SOURCES.
64799         * modules/expf-tests (Files): Add tests/test-exp.h, tests/randomf.c.
64800         (Makefile.am): Add randomf.c to test_expf_SOURCES.
64801         * modules/expl-tests (Files): Add tests/test-exp.h, tests/randoml.c.
64802         (Depends-on): Add 'float'.
64803         (Makefile.am): Add randoml.c to test_expl_SOURCES.
64805         expl: Fix precision of computed result.
64806         * lib/expl.c: Completely rewritten.
64807         * modules/expl (Depends-on): Add isnanl, roundl, ldexpl. Remove floorl.
64808         (Maintainer): Add me.
64809         * m4/expl.m4 (gl_FUNC_EXPL): Update computation of EXPL_LIBM.
64811 2012-03-05  Bruno Haible  <bruno@clisp.org>
64813         cbrt* tests: More tests.
64814         * tests/test-cbrt.h: New file.
64815         * tests/test-cbrt.c: Include <float.h> and test-cbrt.h.
64816         (main): Invoke test_function.
64817         * tests/test-cbrtf.c: Include <float.h> and test-cbrt.h.
64818         (main): Invoke test_function.
64819         * tests/test-cbrtl.c: Include <float.h> and test-cbrt.h.
64820         (main): Invoke test_function.
64821         * modules/cbrt-tests (Files): Add tests/test-cbrt.h, tests/randomd.c.
64822         (Makefile.am): Add randomd.c to test_cbrt_SOURCES.
64823         * modules/cbrtf-tests (Files): Add tests/test-cbrt.h, tests/randomf.c.
64824         (Makefile.am): Add randomf.c to test_cbrtf_SOURCES.
64825         * modules/cbrtl-tests (Files): Add tests/test-cbrt.h, tests/randoml.c.
64826         (Depends-on): Add 'float'.
64827         (Makefile.am): Add randoml.c to test_cbrtl_SOURCES.
64829 2012-03-05  Bruno Haible  <bruno@clisp.org>
64831         hypot* tests: More tests.
64832         * tests/test-hypot.h: New file, partially extracted from
64833         tests/test-hypotl.c.
64834         * tests/test-hypot.c: Include test-hypot.h.
64835         (main): Invoke test_function.
64836         * tests/test-hypotf.c: Include test-hypot.h.
64837         (main): Invoke test_function.
64838         * tests/test-hypotl.c: Include fpucw.h and test-hypot.h.
64839         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING and test_function.
64840         * modules/hypot-tests (Files): Add tests/test-hypot.h, tests/randomd.c.
64841         (Makefile.am): Add randomd.c to test_hypot_SOURCES.
64842         * modules/hypotf-tests (Files): Add tests/test-hypot.h,
64843         tests/randomf.c.
64844         (Makefile.am): Add randomf.c to test_hypotf_SOURCES.
64845         * modules/hypotl-tests (Files): Add tests/test-hypot.h,
64846         tests/randoml.c.
64847         (Depends-on): Add 'fpucw', 'float'.
64848         (Makefile.am): Add randoml.c to test_hypotl_SOURCES.
64850 2012-03-05  Bruno Haible  <bruno@clisp.org>
64852         fpucw: Doc about FreeBSD.
64853         * lib/fpucw.h: Mention FreeBSD in comments.
64855 2012-03-04  Bruno Haible  <bruno@clisp.org>
64857         sqrt* tests: More tests.
64858         * tests/test-sqrt.h: New file.
64859         * tests/test-sqrt.c: Include <float.h> and test-sqrt.h.
64860         (main): Invoke test_function.
64861         * tests/test-sqrtf.c: Include <float.h> and test-sqrt.h.
64862         (main): Invoke test_function.
64863         * tests/test-sqrtl.c: Include <float.h> and test-sqrt.h.
64864         (main): Invoke test_function.
64865         * modules/sqrt-tests (Files): Add tests/test-sqrt.h, tests/randomd.c.
64866         (Makefile.am): Add randomd.c to test_sqrt_SOURCES.
64867         * modules/sqrtf-tests (Files): Add tests/test-sqrt.h, tests/randomf.c.
64868         (Makefile.am): Add randomf.c to test_sqrtf_SOURCES.
64869         * modules/sqrtl-tests (Files): Add tests/test-sqrt.h, tests/randoml.c.
64870         (Depends-on): Add 'float'.
64871         (Makefile.am): Add randoml.c to test_sqrtl_SOURCES.
64873 2012-03-04  Bruno Haible  <bruno@clisp.org>
64875         remainder* tests: More tests.
64876         * tests/test-remainder.h: New file, based on tests/test-fmod.h.
64877         * tests/test-remainder.c: Include <float.h> and test-remainder.h.
64878         (main): Invoke test_function.
64879         * tests/test-remainderf.c: Include <float.h> and test-remainder.h.
64880         (main): Invoke test_function.
64881         * tests/test-remainderl.c: Include <float.h> and test-remainder.h.
64882         (main): Invoke test_function.
64883         * modules/remainder-tests (Files): Add tests/test-remainder.h,
64884         tests/randomd.c.
64885         (Makefile.am): Add randomd.c to test_remainder_SOURCES.
64886         * modules/remainderf-tests (Files): Add tests/test-remainder.h,
64887         tests/randomf.c.
64888         (Makefile.am): Add randomf.c to test_remainderf_SOURCES.
64889         * modules/remainderl-tests (Files): Add tests/test-remainder.h,
64890         tests/randoml.c.
64891         (Depends-on): Add 'float'.
64892         (Makefile.am): Add randoml.c to test_remainderl_SOURCES.
64894 2012-03-04  Bruno Haible  <bruno@clisp.org>
64896         remainder, remainderf, remainderl: Fix computation for large quotients.
64897         * lib/remainder.c: Completely rewritten.
64898         * lib/remainderf.c (remainderf): Use implementation of remainder.c with
64899         USE_FLOAT.
64900         * lib/remainderl.c (remainderl): Use implementation of remainder.c with
64901         USE_LONG_DOUBLE.
64902         * modules/remainder (Depends-on): Add isfinite, signbit, fabs, fmod,
64903         isnand, isinf. Remove round, fma.
64904         * modules/remainderf (Files): Add lib/remainder.c.
64905         (Depends-on): Add isfinite, signbit, fabsf, fmodf, isnanf, isinf.
64906         Remove roundf, fmaf.
64907         * modules/remainderl (Files): Add lib/remainder.c.
64908         (Depends-on): Add float, isfinite, signbit, fabsl, fmodl, isnanl,
64909         isinf. Remove roundl, fmal.
64910         * m4/remainder.m4 (gl_FUNC_REMAINDER): Update computation of
64911         REMAINDER_LIBM.
64912         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Update computation of
64913         REMAINDERF_LIBM.
64914         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Update computation of
64915         REMAINDERL_LIBM.
64917 2012-03-04  Bruno Haible  <bruno@clisp.org>
64919         fmod* tests: More tests.
64920         * tests/test-fmod.h (my_ldexp): New function.
64921         (test_function): Reduce amount of random numbers to test. Add tests
64922         of very large quotients x / y.
64923         * tests/test-fmod.c (MAX_EXP): New macro.
64924         * tests/test-fmodf.c (MAX_EXP): Likewise.
64925         * tests/test-fmodl.c (MAX_EXP): Likewise.
64927 2012-03-04  Bruno Haible  <bruno@clisp.org>
64929         fmod, fmodl: Fix computation for large quotients x / y.
64930         * lib/fmod.c: Completely rewritten.
64931         * lib/fmodl.c (fmodl): Use implementation of fmod.c with
64932         USE_LONG_DOUBLE.
64933         * modules/fmod (Depends-on): Add isfinite, signbit, fabs, frexp, ldexp,
64934         isnand. Remove fma.
64935         * modules/fmodl (Files): Add lib/fmod.c.
64936         (Depends-on): Add float, isfinite, signbit, fabsl,
64937         frexpl, ldexpl, isnanl. Remove fma.
64938         * m4/fmod.m4 (gl_FUNC_FMOD): Update computation of FMOD_LIBM.
64939         * m4/fmodl.m4 (gl_FUNC_FMODL): Update computation of FMODL_LIBM.
64941 2012-03-03  Bruno Haible  <bruno@clisp.org>
64943         fmod* tests: More tests.
64944         * tests/test-fmod.h: New file.
64945         * tests/test-fmod.c: Include <float.h> and test-fmod.h.
64946         (main): Invoke test_function.
64947         * tests/test-fmodf.c: Include <float.h> and test-fmod.h.
64948         (main): Invoke test_function.
64949         * tests/test-fmodl.c: Include <float.h> and test-fmod.h.
64950         (main): Invoke test_function.
64951         * modules/fmod-tests (Files): Add tests/test-fmod.h, tests/randomd.c.
64952         (Makefile.am): Add randomd.c to test_fmod_SOURCES.
64953         * modules/fmodf-tests (Files): Add tests/test-fmod.h, tests/randomf.c.
64954         (Makefile.am): Add randomf.c to test_fmodf_SOURCES.
64955         * modules/fmodl-tests (Files): Add tests/test-fmod.h, tests/randoml.c.
64956         (Depends-on): Add 'float'.
64957         (Makefile.am): Add randoml.c to test_fmodl_SOURCES.
64959 2012-03-03  Bruno Haible  <bruno@clisp.org>
64961         rint* tests: More tests.
64962         * tests/test-rint.h: New file, partially extracted from
64963         tests/test-rintl.c.
64964         * tests/test-rint.c: Include test-rint.h.
64965         (main): Invoke test_function.
64966         * tests/test-rintf.c: Include test-rint.h.
64967         (main): Invoke test_function.
64968         * tests/test-rintl.c: Include test-rint.h.
64969         (main): Invoke test_function.
64970         * modules/rint-tests (Files): Add tests/test-rint.h, tests/randomd.c.
64971         (Makefile.am): Add randomd.c to test_rint_SOURCES.
64972         * modules/rintf-tests (Files): Add tests/test-rint.h, tests/randomf.c.
64973         (Makefile.am): Add randomf.c to test_rintf_SOURCES.
64974         * modules/rintl-tests (Files): Add tests/test-rint.h, tests/randoml.c.
64975         (Makefile.am): Add randoml.c to test_rintl_SOURCES.
64977 2012-03-03  Bruno Haible  <bruno@clisp.org>
64979         modf* tests: More tests.
64980         * tests/test-modf.h: New file.
64981         * tests/test-modf.c: Include <float.h> and test-modf.h.
64982         (main): Invoke test_function.
64983         * tests/test-modff.c: Include <float.h> and test-modf.h.
64984         (main): Invoke test_function.
64985         * tests/test-modfl.c: Include <float.h> and test-modf.h.
64986         (main): Invoke test_function.
64987         * modules/modf-tests (Files): Add tests/test-modf.h, tests/randomd.c.
64988         (Makefile.am): Add randomd.c to test_modf_SOURCES.
64989         * modules/modff-tests (Files): Add tests/test-modf.h, tests/randomf.c.
64990         (Makefile.am): Add randomf.c to test_modff_SOURCES.
64991         * modules/modfl-tests (Files): Add tests/test-modf.h, tests/randoml.c.
64992         (Depends-on): Add 'float'.
64993         (Makefile.am): Add randoml.c to test_modfl_SOURCES.
64995 2012-03-03  Bruno Haible  <bruno@clisp.org>
64997         fabs* tests: More tests.
64998         * tests/test-fabs.h: New file, partially extracted from
64999         tests/test-fabsl.c.
65000         * tests/test-fabs.c (RANDOM): New macro.
65001         * tests/test-fabsf.c (RANDOM): New macro.
65002         * tests/test-fabsl.c (RANDOM): New macro.
65003         * modules/fabs-tests (Files): Add tests/randomd.c.
65004         (Makefile.am): Add randomd.c to test_fabs_SOURCES.
65005         * modules/fabsf-tests (Files): Add tests/randomf.c.
65006         (Makefile.am): Add randomf.c to test_fabsf_SOURCES.
65007         * modules/fabsl-tests (Files): Add tests/randoml.c.
65008         (Makefile.am): Add randoml.c to test_fabsl_SOURCES.
65010 2012-03-03  Bruno Haible  <bruno@clisp.org>
65012         ldexp* tests: More tests.
65013         * tests/test-ldexp.h (test_function): Add some pseudo-randomized tests.
65014         * tests/test-ldexp.c (RANDOM): New macro.
65015         * tests/test-ldexpf.c (RANDOM): New macro.
65016         * tests/test-ldexpl.c (RANDOM): New macro.
65017         * modules/ldexp-tests (Files): Add tests/randomd.c.
65018         (Makefile.am): Add randomd.c to test_ldexp_SOURCES.
65019         * modules/ldexpf-tests (Files): Add tests/randomf.c.
65020         (Makefile.am): Add randomf.c to test_ldexpf_SOURCES.
65021         * modules/ldexpl-tests (Files): Add tests/randoml.c.
65022         (Makefile.am): Add randoml.c to test_ldexpl_SOURCES.
65024 2012-03-03  Bruno Haible  <bruno@clisp.org>
65026         frexp* tests: More tests.
65027         * tests/test-frexp.h (test_function): Add some pseudo-randomized tests.
65028         * tests/test-frexp.c (RANDOM): New macro.
65029         * tests/test-frexpf.c (RANDOM): New macro.
65030         * tests/test-frexpl.c (RANDOM): New macro.
65031         * modules/frexp-tests (Files): Add tests/randomd.c.
65032         (Makefile.am): Add randomd.c to test_frexp_SOURCES.
65033         * modules/frexpf-tests (Files): Add tests/randomf.c.
65034         (Makefile.am): Add randomf.c to test_frexpf_SOURCES.
65035         * modules/frexpl-tests (Files): Add tests/randoml.c.
65036         (Makefile.am): Add randoml.c to test_frexpl_SOURCES.
65038 2012-03-03  Bruno Haible  <bruno@clisp.org>
65040         Support for pseudo-random numbers in tests.
65041         * tests/randomf.c: New file.
65042         * tests/randomd.c: New file.
65043         * tests/randoml.c: New file.
65044         * tests/macros.h (randomf, randomd, randoml): New declarations.
65046 2012-03-03  Bruno Haible  <bruno@clisp.org>
65048         frexp* tests: Refactor.
65049         * tests/test-frexp.h: New file, extracted from tests/test-frexpl.c.
65050         * tests/test-frexp.c: Include and use it.
65051         * tests/test-frexpf.c: Likewise.
65052         * tests/test-frexpl.c: Likewise.
65053         * modules/frexp-tests (Files): Add tests/test-frexp.h.
65054         * modules/frexpf-tests (Files): Likewise.
65055         * modules/frexpl-tests (Files): Likewise.
65057 2012-03-02  Jim Meyering  <meyering@redhat.com>
65059         maint: don't specify XZ_OPT=-9ev in dist-related rule
65060         Using xz's -9 option is warranted only if you have a very large
65061         tarball (see xz's documentation for the sizes vs. presets), and
65062         requires 64MiB of memory at decompression time.
65063         * top/maint.mk (alpha beta stable): Don't specify XZ_OPT=-9ev.
65064         Automake's default of just "-e" is fine.  Override on a
65065         per-package basis by setting XZ_OPT e.g., in cfg.mk.
65067 2012-03-01  Eric Blake  <eblake@redhat.com>
65069         maint.mk: allow announcement for non-gnulib project
65070         * maint.mk (announcement): Skip gnulib version if not used.
65072 2012-03-01  Jim Meyering  <meyering@redhat.com>
65074         maint.mk: avoid spurious failure of _sc_search_regexp-using tests
65075         * top/maint.mk: Initialize _sc_search_regexp parameters, so that
65076         envvar settings cannot interfere.  Otherwise, setting envvars like
65077         prohibit=foo require=bar, etc. would cause spurious test failures.
65079 2012-03-01  Eric Blake  <eblake@redhat.com>
65081         maint.mk: add per-line exclusions to prohibitions
65082         * maint.mk (_sc_search_regexp): Add $exclude parameter.
65083         (sc_prohibit_strcmp, sc_unmarked_diagnostics)
65084         (sc_const_long_option): Use it.
65086 2012-03-01  Bruno Haible  <bruno@clisp.org>
65088         Tests for module 'expl-ieee'.
65089         * modules/expl-ieee-tests: New file.
65090         * tests/test-expl-ieee.c: New file.
65092         New module 'expl-ieee'.
65093         * modules/expl-ieee: New file.
65095         Tests for module 'exp-ieee'.
65096         * modules/exp-ieee-tests: New file.
65097         * tests/test-exp-ieee.c: New file.
65099         New module 'exp-ieee'.
65100         * modules/exp-ieee: New file.
65102         Tests for module 'expf-ieee'.
65103         * modules/expf-ieee-tests: New file.
65104         * tests/test-expf-ieee.c: New file.
65105         * tests/test-exp-ieee.h: New file.
65107         New module 'expf-ieee'.
65108         * modules/expf-ieee: New file.
65110 2012-02-29  Bruno Haible  <bruno@clisp.org>
65112         cbrtl-ieee: Work around test failure on IRIX 6.5.
65113         * m4/cbrtl-ieee.m4: New file.
65114         * m4/cbrtl.m4 (gl_FUNC_CBRTL): If gl_FUNC_CBRTL_IEEE is present,
65115         test whether cbrtl works with a minus zero argument. Replace it if not.
65116         * lib/math.in.h (cbrtl): Override if REPLACE_CBRTL is 1.
65117         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_CBRTL.
65118         * modules/math (Makefile.am): Substitute REPLACE_CBRTL.
65119         * modules/cbrtl (configure.ac): Consider REPLACE_CBRTL.
65120         (Depends-on): Update conditions.
65121         * modules/cbrtl-ieee (Files): Add m4/cbrtl-ieee.m4, m4/minus-zero.m4,
65122         m4/signbit.m4.
65123         (configure.ac): Invoke gl_FUNC_CBRTL_IEEE.
65124         * lib/cbrtl.c (cbrtl) [IRIX]: Avoid an unnecessary addition.
65125         * doc/posix-functions/cbrtl.texi: Mention the cbrtl-ieee module.
65127         Tests for module 'cbrtl-ieee'.
65128         * modules/cbrtl-ieee-tests: New file.
65129         * tests/test-cbrtl-ieee.c: New file.
65131         New module 'cbrtl-ieee'.
65132         * modules/cbrtl-ieee: New file.
65134         Tests for module 'cbrt-ieee'.
65135         * modules/cbrt-ieee-tests: New file.
65136         * tests/test-cbrt-ieee.c: New file.
65138         New module 'cbrt-ieee'.
65139         * modules/cbrt-ieee: New file.
65141         Tests for module 'cbrtf-ieee'.
65142         * modules/cbrtf-ieee-tests: New file.
65143         * tests/test-cbrtf-ieee.c: New file.
65144         * tests/test-cbrt-ieee.h: New file.
65146         New module 'cbrtf-ieee'.
65147         * modules/cbrtf-ieee: New file.
65149 2012-02-29  Bruno Haible  <bruno@clisp.org>
65151         cbrtf: Work around bug in IRIX 6.5 system function.
65152         * lib/math.in.h (cbrtf): Override if REPLACE_CBRTF is 1.
65153         * m4/cbrtf.m4 (gl_FUNC_CBRTF_WORKS): New macro.
65154         (gl_FUNC_CBRTF): Invoke it. Set REPLACE_CBRTF to 1 if cbrtf() does not
65155         work.
65156         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_CBRTF.
65157         * modules/math (Makefile.am): Substitute REPLACE_CBRTF.
65158         * modules/cbrtf (configure.ac): Consider REPLACE_CBRTF.
65159         (Depends-on): Update conditions.
65160         * doc/posix-functions/cbrtf.texi: Mention the IRIX 6.5 problem.
65162 2012-02-29  Bruno Haible  <bruno@clisp.org>
65164         Tests for module 'cbrtl'.
65165         * modules/cbrtl-tests: New file.
65166         * tests/test-cbrtl.c: New file.
65168         New module 'cbrtl'.
65169         * lib/math.in.h (cbrtl): New declaration.
65170         * lib/cbrtl.c: New file.
65171         * m4/cbrtl.m4: New file.
65172         * m4/math_h.m4 (gl_MATH_H): Test whether cbrtl is declared.
65173         (gl_MATH_H_DEFAULTS): Initialize GNULIB_CBRTL, HAVE_CBRTL,
65174         HAVE_DECL_CBRTL.
65175         * modules/math (Makefile.am): Substitute GNULIB_CBRTL, HAVE_CBRTL,
65176         HAVE_DECL_CBRTL.
65177         * modules/cbrtl: New file.
65178         * tests/test-math-c++.cc: Check the declaration of cbrtl.
65179         * doc/posix-functions/cbrtl.texi: Mention the new module.
65181 2012-02-29  Bruno Haible  <bruno@clisp.org>
65183         Tests for module 'cbrtf'.
65184         * modules/cbrtf-tests: New file.
65185         * tests/test-cbrtf.c: New file.
65187         New module 'cbrtf'.
65188         * lib/math.in.h (cbrtf): New declaration.
65189         * lib/cbrtf.c: New file.
65190         * m4/cbrtf.m4: New file.
65191         * m4/math_h.m4 (gl_MATH_H): Test whether cbrtf is declared.
65192         (gl_MATH_H_DEFAULTS): Initialize GNULIB_CBRTF, HAVE_CBRTF,
65193         HAVE_DECL_CBRTF.
65194         * modules/math (Makefile.am): Substitute GNULIB_CBRTF, HAVE_CBRTF,
65195         HAVE_DECL_CBRTF.
65196         * modules/cbrtf: New file.
65197         * tests/test-math-c++.cc: Check the declaration of cbrtf.
65198         * doc/posix-functions/cbrtf.texi: Mention the new module.
65200 2012-02-29  Bruno Haible  <bruno@clisp.org>
65202         cbrt: Provide replacement on MSVC and Minix.
65203         * lib/math.in.h (cbrt): New declaration.
65204         * lib/cbrt.c: New file.
65205         * m4/cbrt.m4: New file.
65206         * m4/math_h.m4 (gl_MATH_H): Test whether cbrt is declared.
65207         (gl_MATH_H_DEFAULTS): Initialize GNULIB_CBRT, HAVE_CBRT.
65208         * modules/math (Makefile.am): Substitute GNULIB_CBRT, HAVE_CBRT.
65209         * modules/cbrt (Files): Add lib/cbrt.c, m4/cbrt.m4.
65210         (Depends-on): Add dependencies.
65211         (configure.ac): Arrange to compile replacement if HAVE_CBRT is 0.
65212         * tests/test-math-c++.cc: Check the declaration of cbrt.
65213         * doc/posix-functions/cbrt.texi: Mention that the module provides a
65214         replacement.
65216 2012-02-29  Bruno Haible  <bruno@clisp.org>
65218         hypotl-ieee: Work around test failure on OSF/1 and native Windows.
65219         * m4/hypotl-ieee.m4: New file.
65220         * m4/hypotl.m4 (gl_FUNC_HYPOTL): If gl_FUNC_HYPOTL_IEEE is present,
65221         test whether hypotl works with mixed NaN and Infinity arguments.
65222         Replace it if not.
65223         * lib/math.in.h (hypotl): Override if REPLACE_HYPOTL is 1.
65224         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_HYPOTL.
65225         * modules/math (Makefile.am): Substitute REPLACE_HYPOTL.
65226         * modules/hypotl (configure.ac): Consider REPLACE_HYPOTL.
65227         (Depends-on): Update conditions.
65228         * modules/hypotl-ieee (Files): Add m4/hypotl-ieee.m4.
65229         (Depends-on): Add hypot-ieee.
65230         (configure.ac): Invoke gl_FUNC_HYPOTL_IEEE.
65231         * doc/posix-functions/hypotl.texi: Mention the hypotl-ieee module.
65233         hypotf-ieee: Work around test failure on OSF/1 and native Windows.
65234         * m4/hypotf-ieee.m4: New file.
65235         * m4/hypotf.m4 (gl_FUNC_HYPOTF): If gl_FUNC_HYPOTF_IEEE is present,
65236         test whether hypotf works with mixed NaN and Infinity arguments.
65237         Replace it if not.
65238         * modules/hypotf-ieee (Files): Add m4/hypotf-ieee.m4.
65239         (Depends-on): Add hypot-ieee.
65240         (configure.ac): Invoke gl_FUNC_HYPOTF_IEEE.
65241         * doc/posix-functions/hypotf.texi: Mention the hypotf-ieee module.
65243         hypot-ieee: Work around test failure on OSF/1 and native Windows.
65244         * lib/math.in.h (hypot): New declaration.
65245         * lib/hypot.c: New file.
65246         * m4/hypot-ieee.m4: New file.
65247         * m4/hypot.m4 (gl_FUNC_HYPOT): If gl_FUNC_HYPOT_IEEE is present, test
65248         whether hypot works with mixed NaN and Infinity arguments. Replace it
65249         if not.
65250         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_HYPOT,
65251         REPLACE_HYPOT.
65252         * modules/math (Makefile.am): Substitute GNULIB_HYPOT, REPLACE_HYPOT.
65253         * modules/hypot (Files): Add lib/hypot.c.
65254         (Depends-on): Add dependencies.
65255         (configure.ac): Arrange to compile replacement if REPLACE_HYPOT is 1.
65256         * modules/hypot-ieee (Files): Add m4/hypot-ieee.m4.
65257         (configure.ac): Invoke gl_FUNC_HYPOT_IEEE.
65258         * tests/test-math-c++.cc: Check the declaration of hypot.
65259         * doc/posix-functions/hypot.texi: Mention the hypot-ieee module.
65261         Tests for module 'hypotl-ieee'.
65262         * modules/hypotl-ieee-tests: New file.
65263         * tests/test-hypotl-ieee.c: New file.
65265         New module 'hypotl-ieee'.
65266         * modules/hypotl-ieee: New file.
65268         Tests for module 'hypot-ieee'.
65269         * modules/hypot-ieee-tests: New file.
65270         * tests/test-hypot-ieee.c: New file.
65272         New module 'hypot-ieee'.
65273         * modules/hypot-ieee: New file.
65275         Tests for module 'hypotf-ieee'.
65276         * modules/hypotf-ieee-tests: New file.
65277         * tests/test-hypotf-ieee.c: New file.
65278         * tests/test-hypot-ieee.h: New file.
65280         New module 'hypotf-ieee'.
65281         * modules/hypotf-ieee: New file.
65283 2012-02-29  Bruno Haible  <bruno@clisp.org>
65285         Remove unused variables.
65286         * m4/fmod.m4 (gl_FUNC_FMOD): Remove unused variable 'i'.
65287         * m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
65288         * m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise.
65289         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Likewise.
65291 2012-02-29  Eric Blake  <eblake@redhat.com>
65293         termios: fix pid_t always, not just for tcgetsid
65294         * doc/posix-headers/termios.texi (termios.h): Mention problem.
65295         * lib/termios.in.h (include): Ensure pid_t on all platforms, not
65296         just when building tcgetsid.
65298 2012-02-29  Bruno Haible  <bruno@clisp.org>
65300         Tests for module 'hypotl'.
65301         * modules/hypotl-tests: New file.
65302         * tests/test-hypotl.c: New file.
65304         New module 'hypotl'.
65305         * lib/math.in.h (hypotl): New declaration.
65306         * lib/hypotl.c: New file.
65307         * m4/hypotl.m4: New file.
65308         * m4/math_h.m4 (gl_MATH_H): Test whether hypotf is declared.
65309         (gl_MATH_H_DEFAULTS): Initialize GNULIB_HYPOTL, HAVE_HYPOTL.
65310         * modules/math (Makefile.am): Substitute GNULIB_HYPOTL, HAVE_HYPOTL.
65311         * modules/hypotl: New file.
65312         * tests/test-math-c++.cc: Check the hypotl declaration.
65313         * doc/posix-functions/hypotl.texi: Mention the new module.
65315 2012-02-29  Eric Blake  <eblake@redhat.com>
65317         tcgetsid: fix cygwin header bug
65318         * lib/termios.in.h (includes) [Cygwin]: Ensure pid_t is defined.
65320         docs: update cygwin progress
65321         * doc/posix-functions/llround.texi (llround): Added in cygwin
65322         1.7.8.
65323         * doc/posix-functions/llroundf.texi (llroundf): Likewise.
65324         * doc/glibc-functions/program_invocation_name.texi
65325         (program_invocation_name): Likewise.
65326         * doc/glibc-functions/program_invocation_short_name.texi
65327         (program_invocation_short_name): Likewise.
65328         * doc/glibc-functions/madvise.texi (madvise): Likewise.
65329         * doc/glibc-functions/pthread_yield.texi (pthread_yield):
65330         Likewise.
65331         * doc/posix-functions/pthread_spin_destroy.texi
65332         (pthread_spin_destroy): Added in cygwin 1.7.10.
65333         * doc/posix-functions/pthread_spin_init.texi (pthread_spin_init):
65334         Likewise.
65335         * doc/posix-functions/pthread_spin_lock.texi (pthread_spin_lock):
65336         Likewise.
65337         * doc/posix-functions/pthread_spin_trylock.texi
65338         (pthread_spin_trylock): Likewise.
65339         * doc/posix-functions/pthread_spin_unlock.texi
65340         (pthread_spin_unlock): Likewise.
65341         * doc/posix-functions/pthread_setschedprio.texi
65342         (pthread_setschedprio): Likewise.
65343         * doc/posix-functions/pthread_attr_getstack.texi
65344         (pthread_attr_getstack): Likewise.
65345         * doc/pastposix-functions/pthread_attr_getstackaddr.texi
65346         (pthread_attr_getstackaddr): Likewise.
65347         * doc/glibc-functions/pthread_getattr_np.texi
65348         (pthread_getattr_np): Likewise.
65349         * doc/glibc-functions/sys_siglist.texi (sys_siglist): Likewise.
65350         * doc/glibc-functions/sysinfo.texi (sysinfo): Likewise.
65351         * doc/posix-functions/clock_settime.texi (clock_settime):
65352         Likewise.
65353         * doc/posix-functions/pthread_attr_getguardsize.texi
65354         (pthread_attr_getguardsize): Likewise.
65355         * doc/posix-functions/pthread_attr_setguardsize.texi
65356         (pthread_attr_setguardsize): Likewise.
65357         * doc/posix-functions/pthread_attr_setstack.texi
65358         (pthread_attr_setstack): Likewise.
65359         * doc/pastposix-functions/pthread_attr_setstackaddr.texi
65360         (pthread_attr_setstackaddr): Likewise.
65361         * doc/posix-functions/clock_getcpuclockid.texi
65362         (clock_getcpuclockid): Likewise.
65363         * doc/posix-functions/pthread_getcpuclockid.texi
65364         (pthread_getcpuclockid): Likewise.
65365         * doc/glibc-functions/error.texi (error): Likewise.
65366         * doc/glibc-functions/error_at_line.texi (error_at_line):
65367         Likewise.
65368         * doc/glibc-functions/error_message_count.texi
65369         (error_message_count): Likewise.
65370         * doc/glibc-functions/error_one_per_line.texi
65371         (error_one_per_line): Likewise.
65372         * doc/glibc-functions/error_print_progname.texi
65373         (error_print_progname): Likewise.
65374         * doc/posix-functions/pthread_condattr_getclock.texi
65375         (pthread_condattr_getclock): Likewise.
65376         * doc/posix-functions/pthread_condattr_setclock.texi
65377         (pthread_condattr_setclock): Likewise.
65378         * doc/posix-functions/clock_nanosleep.texi (clock_nanosleep):
65379         Likewise.
65380         * doc/glibc-functions/getgrouplist.texi (getgrouplist): Likewise.
65381         * doc/glibc-functions/getpt.texi (getpt): Likewise.
65382         * doc/glibc-functions/get_current_dir_name.texi
65383         (get_current_dir_name): Likewise.
65384         * doc/glibc-functions/pthread_sigqueue.texi (pthread_sigqueue):
65385         Likewise.
65386         * doc/posix-functions/tcgetsid.texi (tcgetsid): Likewise, but with
65387         wrong return type.
65388         * doc/glibc-functions/scandirat.texi (scandirat): Added in cygwin
65389         1.7.11.
65391 2012-02-29  Bruno Haible  <bruno@clisp.org>
65393         Tests for module 'hypotf'.
65394         * modules/hypotf-tests: New file.
65395         * tests/test-hypotf.c: New file.
65397         New module 'hypotf'.
65398         * lib/math.in.h (hypotf): New declaration.
65399         * lib/hypotf.c: New file.
65400         * m4/hypotf.m4: New file.
65401         * m4/math_h.m4 (gl_MATH_H): Test whether hypotf is declared.
65402         (gl_MATH_H_DEFAULTS): Initialize GNULIB_HYPOTF, HAVE_HYPOTF,
65403         REPLACE_HYPOTF.
65404         * modules/math (Makefile.am): Substitute GNULIB_HYPOTF, HAVE_HYPOTF,
65405         REPLACE_HYPOTF.
65406         * modules/hypotf: New file.
65407         * tests/test-math-c++.cc: Check the hypotf declaration.
65408         * doc/posix-functions/hypotf.texi: Mention the new module.
65410         hypot: Prepare for hypotf module.
65411         * m4/hypot.m4: New file.
65412         * modules/hypot (Files): Add m4/hypot.m4.
65413         (configure.ac): Invoke gl_FUNC_HYPOT.
65415 2012-02-29  Bruno Haible  <bruno@clisp.org>
65417         hypot tests: More tests.
65418         * tests/test-hypot.c: Include <float.h>.
65419         (main): Add tests about overflow and underflow.
65421 2012-02-29  Bruno Haible  <bruno@clisp.org>
65423         math code: Add comments.
65424         * lib/acosl.c: Add comment about related glibc source files.
65425         * lib/asinl.c: Likewise.
65426         * lib/atanl.c: Likewise.
65427         * lib/expl.c: Likewise.
65428         * lib/logl.c: Likewise.
65429         * lib/sincosl.c: Likewise.
65430         * lib/sinl.c: Likewise.
65431         * lib/tanl.c: Likewise.
65432         * lib/trigl.c: Likewise.
65433         * lib/cosl.c: Likewise. Fix comments.
65435 2012-02-28  Bruno Haible  <bruno@clisp.org>
65437         math: Ensure HUGE_VAL, HUGE_VALF, HUGE_VALL are defined.
65438         * lib/math.in.h (HUGE_VAL, HUGE_VALF, HUGE_VALL): Define fallbacks.
65439         * tests/test-math.c: Include macros.h. Check that HUGE_VAL, HUGE_VALF,
65440         HUGE_VALL are defined.
65441         (numeric_equald): Renamed from numeric_equal.
65442         (numeric_equalf, numeric_equall): New functions.
65443         (main): Check also HUGE_VALF, HUGE_VALL.
65444         * modules/math-tests (Files): Add tests/macros.h.
65445         * doc/posix-headers/math.texi: Document the problems with HUGE_VALF and
65446         HUGE_VALL.
65448 2012-02-28  Bruno Haible  <bruno@clisp.org>
65450         doc: Move ISO C11 feature notes into POSIX chapters.
65451         * doc/posix-functions/aligned_alloc.texi: Renamed from
65452         doc/glibc-functions/aligned_alloc.texi.
65453         * doc/posix-functions/quick_exit.texi: Renamed from
65454         doc/glibc-functions/quick_exit.texi.
65455         * doc/posix-headers/uchar.texi: Renamed from
65456         doc/glibc-headers/uchar.texi.
65457         * doc/posix-functions/c16rtomb.texi: Renamed from
65458         doc/glibc-functions/c16rtomb.texi.
65459         * doc/posix-functions/c32rtomb.texi: Renamed from
65460         doc/glibc-functions/c32rtomb.texi.
65461         * doc/posix-functions/mbrtoc16.texi: Renamed from
65462         doc/glibc-functions/mbrtoc16.texi.
65463         * doc/posix-functions/mbrtoc32.texi: Renamed from
65464         doc/glibc-functions/mbrtoc32.texi.
65465         * doc/gnulib.texi: Update.
65466         (Glibc uchar.h): Remove section.
65467         Suggested by Eric Blake.
65469 2012-02-29  Paul Eggert  <eggert@cs.ucla.edu>
65471         stdnoreturn: port to MSVC better
65472         MSVC standard headers use __declspec(noreturn), so #define noreturn
65473         to empty on that platform.  Reported by Bruno Haible in
65474         <http://lists.gnu.org/r/bug-gnulib/2012-02/msg00152.html>.
65475         * lib/stdnoreturn.in.h (noreturn): Define to empty on MSVC.
65476         * doc/posix-headers/stdnoreturn.texi (stdnoreturn.h): Document this.
65478 2012-02-28  Bruno Haible  <bruno@clisp.org>
65480         doc: Mention new glibc headers and functions.
65481         * doc/glibc-headers/uchar.texi: New file.
65482         * doc/glibc-functions/aligned_alloc.texi: New file.
65483         * doc/glibc-functions/c16rtomb.texi: New file.
65484         * doc/glibc-functions/c32rtomb.texi: New file.
65485         * doc/glibc-functions/clock_adjtime.texi: New file.
65486         * doc/glibc-functions/fanotify_init.texi: New file.
65487         * doc/glibc-functions/fanotify_mark.texi: New file.
65488         * doc/glibc-functions/inet6_opt_append.texi: New file.
65489         * doc/glibc-functions/inet6_opt_find.texi: New file.
65490         * doc/glibc-functions/inet6_opt_finish.texi: New file.
65491         * doc/glibc-functions/inet6_opt_get_val.texi: New file.
65492         * doc/glibc-functions/inet6_opt_init.texi: New file.
65493         * doc/glibc-functions/inet6_opt_next.texi: New file.
65494         * doc/glibc-functions/inet6_opt_set_val.texi: New file.
65495         * doc/glibc-functions/inet6_rth_add.texi: New file.
65496         * doc/glibc-functions/inet6_rth_getaddr.texi: New file.
65497         * doc/glibc-functions/inet6_rth_init.texi: New file.
65498         * doc/glibc-functions/inet6_rth_reverse.texi: New file.
65499         * doc/glibc-functions/inet6_rth_segments.texi: New file.
65500         * doc/glibc-functions/inet6_rth_space.texi: New file.
65501         * doc/glibc-functions/login.texi: New file.
65502         * doc/glibc-functions/mbrtoc16.texi: New file.
65503         * doc/glibc-functions/mbrtoc32.texi: New file.
65504         * doc/glibc-functions/name_to_handle_at.texi: New file.
65505         * doc/glibc-functions/ntp_gettimex.texi: New file.
65506         * doc/glibc-functions/open_by_handle_at.texi: New file.
65507         * doc/glibc-functions/prlimit.texi: New file.
65508         * doc/glibc-functions/process_vm_readv.texi: New file.
65509         * doc/glibc-functions/process_vm_writev.texi: New file.
65510         * doc/glibc-functions/recvmmsg.texi: New file.
65511         * doc/glibc-functions/scandirat.texi: New file.
65512         * doc/glibc-functions/sendmmsg.texi: New file.
65513         * doc/glibc-functions/setns.texi: New file.
65514         * doc/glibc-functions/timespec_get.texi: New file.
65515         * doc/gnulib.texi: Include them.
65516         (Glibc sys/fanotify.h, Glibc sys/resource.h, Glibc uchar.h): New
65517         sections.
65518         Reported by Eric Blake.
65520 2012-02-28  Bruno Haible  <bruno@clisp.org>
65522         Avoid compilation errors with MSVC option -fp:strict.
65523         * lib/floor.c: Use MSVC specific pragma fenv_access.
65524         * lib/ceil.c: Likewise.
65525         * lib/trunc.c: Likewise.
65526         * lib/round.c: Likewise.
65527         * lib/rint.c: Likewise.
65528         * lib/fma.c: Likewise.
65529         * lib/integer_length.c: Likewise.
65530         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
65531         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
65532         * tests/test-floor2.c: Likewise.
65533         * tests/test-floorf2.c: Likewise.
65534         * tests/test-ceil2.c: Likewise.
65535         * tests/test-ceilf2.c: Likewise.
65536         * tests/test-trunc2.c: Likewise.
65537         * tests/test-truncf2.c: Likewise.
65538         Reported by Michael Goffioul <michael.goffioul@gmail.com>.
65540 2012-02-27  Bruno Haible  <bruno@clisp.org>
65542         Tests for module 'sqrtl-ieee'.
65543         * modules/sqrtl-ieee-tests: New file.
65544         * tests/test-sqrtl-ieee.c: New file.
65546         New module 'sqrtl-ieee'.
65547         * modules/sqrtl-ieee: New file.
65549         Tests for module 'sqrt-ieee'.
65550         * modules/sqrt-ieee-tests: New file.
65551         * tests/test-sqrt-ieee.c: New file.
65553         New module 'sqrt-ieee'.
65554         * modules/sqrt-ieee: New file.
65556         Tests for module 'sqrtf-ieee'.
65557         * modules/sqrtf-ieee-tests: New file.
65558         * tests/test-sqrtf-ieee.c: New file.
65559         * tests/test-sqrt-ieee.h: New file.
65561         New module 'sqrtf-ieee'.
65562         * modules/sqrtf-ieee: New file.
65564 2012-02-27  Bruno Haible  <bruno@clisp.org>
65566         remainderl-ieee: Work around test failure on OSF/1.
65567         * m4/remainderl-ieee.m4: New file.
65568         * m4/remainderl.m4 (gl_FUNC_REMAINDERL): If gl_FUNC_REMAINDERL_IEEE is
65569         present, test whether remainderl works with a zero second argument.
65570         Replace it if not.
65571         * lib/math.in.h (remainderl): Override if REPLACE_REMAINDERL is 1.
65572         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_REMAINDERL.
65573         * modules/math (Makefile.am): Substitute REPLACE_REMAINDERL.
65574         * modules/remainderl (configure.ac): Consider REPLACE_REMAINDERL.
65575         (Depends-on): Update conditions.
65576         * modules/remainderl-ieee (Files): Add m4/remainderl-ieee.m4.
65577         (Depends-on): Add remainder-ieee.
65578         (configure.ac): Invoke gl_FUNC_REMAINDERL_IEEE.
65579         * doc/posix-functions/remainderl.texi: Mention the remainderl-ieee
65580         module.
65582         remainderf-ieee: Work around test failure on OSF/1.
65583         * m4/remainderf-ieee.m4: New file.
65584         * m4/remainderf.m4 (gl_FUNC_REMAINDERF): If gl_FUNC_REMAINDERF_IEEE is
65585         present, test whether remainderf works with a zero second argument.
65586         Replace it if not.
65587         * lib/math.in.h (remainderf): Override if REPLACE_REMAINDERF is 1.
65588         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_REMAINDERF.
65589         * modules/math (Makefile.am): Substitute REPLACE_REMAINDERF.
65590         * modules/remainderf (configure.ac): Consider REPLACE_REMAINDERF.
65591         (Depends-on): Update conditions.
65592         * modules/remainderf-ieee (Files): Add m4/remainderf-ieee.m4.
65593         (Depends-on): Add remainder-ieee.
65594         (configure.ac): Invoke gl_FUNC_REMAINDERF_IEEE.
65595         * doc/posix-functions/remainderf.texi: Mention the remainderf-ieee
65596         module.
65598         remainder-ieee: Work around test failure on OSF/1.
65599         * m4/remainder-ieee.m4: New file.
65600         * m4/remainder.m4 (gl_FUNC_REMAINDER): If gl_FUNC_REMAINDER_IEEE is
65601         present, test whether remainder works with a zero second argument.
65602         Replace it if not.
65603         * lib/math.in.h (remainder): Override if REPLACE_REMAINDER is 1.
65604         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_REMAINDER.
65605         * modules/math (Makefile.am): Substitute REPLACE_REMAINDER.
65606         * modules/remainder (configure.ac): Consider REPLACE_REMAINDER.
65607         (Depends-on): Update dependencies.
65608         * modules/remainder-ieee (Files): Add m4/remainder-ieee.m4.
65609         (configure.ac): Invoke gl_FUNC_REMAINDER_IEEE.
65610         * doc/posix-functions/remainder.texi: Mention the remainder-ieee module.
65612         Tests for module 'remainderl-ieee'.
65613         * modules/remainderl-ieee-tests: New file.
65614         * tests/test-remainderl-ieee.c: New file.
65616         New module 'remainderl-ieee'.
65617         * modules/remainderl-ieee: New file.
65619         Tests for module 'remainder-ieee'.
65620         * modules/remainder-ieee-tests: New file.
65621         * tests/test-remainder-ieee.c: New file.
65623         New module 'remainder-ieee'.
65624         * modules/remainder-ieee: New file.
65626         Tests for module 'remainderf-ieee'.
65627         * modules/remainderf-ieee-tests: New file.
65628         * tests/test-remainderf-ieee.c: New file.
65629         * tests/test-remainder-ieee.h: New file.
65631         New module 'remainderf-ieee'.
65632         * modules/remainderf-ieee: New file.
65634 2012-02-27  Bruno Haible  <bruno@clisp.org>
65636         modff, modfl: Fix configure syntax error.
65637         * m4/modff.m4 (gl_FUNC_MODFF): Insert ':' command in 'if'.
65638         * m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
65640 2012-02-27  Bruno Haible  <bruno@clisp.org>
65642         fmodl-ieee: Work around test failures on OSF/1, MSVC 9.
65643         * m4/fmodl-ieee.m4: New file.
65644         * m4/fmodl.m4 (gl_FUNC_FMODL): If gl_FUNC_FMODL_IEEE is present, test
65645         whether fmodl works with zero arguments. Replace it if not.
65646         * modules/fmodl-ieee (Files): Add m4/fmodl-ieee.m4.
65647         (Depends-on): Add fmod-ieee.
65648         (configure.ac): Invoke gl_FUNC_FMODL_IEEE.
65649         * doc/posix-functions/fmodl.texi: Mention the fmodl-ieee module.
65651         fmodf-ieee: Work around test failure on OSF/1.
65652         * m4/fmodf-ieee.m4: New file.
65653         * m4/fmodf.m4 (gl_FUNC_FMODF): If gl_FUNC_FMODF_IEEE is present, test
65654         whether fmodf works with zero arguments. Replace it if not.
65655         * lib/math.in.h (fmodf): Override if REPLACE_FMODF is 1.
65656         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FMODF.
65657         * modules/math (Makefile.am): Substitute REPLACE_FMODF.
65658         * modules/fmodf (configure.ac): Consider REPLACE_FMODF.
65659         (Depends-on): Update dependencies.
65660         * modules/fmodf-ieee (Files): Add m4/fmodf-ieee.m4.
65661         (configure.ac): Invoke gl_FUNC_FMODF_IEEE.
65662         * doc/posix-functions/fmodf.texi: Mention the problem on OSF/1.
65664         fmodf-ieee: Work around test failure on MSVC 9.
65665         * modules/fmodf-ieee (Depends-on): Add fmod-ieee.
65666         * doc/posix-functions/fmodf.texi: Mention the fmodf-ieee module.
65668         fmod-ieee: Work around test failures on OSF/1, mingw.
65669         * m4/fmod-ieee.m4: New file.
65670         * m4/fmod.m4 (gl_FUNC_FMOD): If gl_FUNC_FMOD_IEEE is present, test
65671         whether fmod works with zero arguments. Replace it if not.
65672         * lib/math.in.h (fmod): New declaration.
65673         * lib/fmod.c: New file.
65674         * m4/math_h.m4 (gl_MATH_H): Test whether fmod is declared.
65675         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FMOD, REPLACE_FMOD.
65676         * modules/math (Makefile.am): Substitute GNULIB_FMOD, REPLACE_FMOD.
65677         * modules/fmod (Files): Add lib/fmod.c.
65678         (Depends-on): Add math, isinf, trunc, fma.
65679         (configure.ac): Arrange to compile lib/fmod.c if needed.
65680         * modules/fmod-ieee (Files): Add m4/fmod-ieee.m4, m4/minus-zero.m4,
65681         m4/signbit.m4.
65682         (configure.ac): Invoke gl_FUNC_FMOD_IEEE.
65683         * tests/test-math-c++.cc: Check the declaration of fmod.
65684         * doc/posix-functions/fmod.texi: Mention the fmod-ieee module.
65686         fmodl-ieee: Fix test failures.
65687         * lib/fmodl.c (fmodl): Treat Inf specially.
65688         * modules/fmodl (Depends-on): Add isinf.
65690         Tests for module 'fmodl-ieee'.
65691         * modules/fmodl-ieee-tests: New file.
65692         * tests/test-fmodl-ieee.c: New file.
65694         New module 'fmodl-ieee'.
65695         * modules/fmodl-ieee: New file.
65697         Tests for module 'fmod-ieee'.
65698         * modules/fmod-ieee-tests: New file.
65699         * tests/test-fmod-ieee.c: New file.
65701         New module 'fmod-ieee'.
65702         * modules/fmod-ieee: New file.
65704         Tests for module 'fmodf-ieee'.
65705         * modules/fmodf-ieee-tests: New file.
65706         * tests/test-fmodf-ieee.c: New file.
65707         * tests/test-fmod-ieee.h: New file.
65709         New module 'fmodf-ieee'.
65710         * modules/fmodf-ieee: New file.
65712 2012-02-27  Bruno Haible  <bruno@clisp.org>
65714         Tests for module 'rintl-ieee'.
65715         * modules/rintl-ieee-tests: New file.
65716         * tests/test-rintl-ieee.c: New file.
65718         New module 'rintl-ieee'.
65719         * modules/rintl-ieee: New file.
65721         Tests for module 'rint-ieee'.
65722         * modules/rint-ieee-tests: New file.
65723         * tests/test-rint-ieee.c: New file.
65725         New module 'rint-ieee'.
65726         * modules/rint-ieee: New file.
65728         Tests for module 'rintf-ieee'.
65729         * modules/rintf-ieee-tests: New file.
65730         * tests/test-rintf-ieee.c: New file.
65731         * tests/test-rint-ieee.h: New file.
65733         New module 'rintf-ieee'.
65734         * modules/rintf-ieee: New file.
65736 2012-02-26  Paul Eggert  <eggert@cs.ucla.edu>
65738         regex: re_search etc. should return -2 when memory exhausted
65739         This bug was uncovered when testing 'grep'.  Without the fix,
65740         re_search and friends return -1 when memory is exhausted, but -1
65741         means no match, and this causes grep to falsely report no-match
65742         instead of memory-exhaustion.  See
65743         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=13762>.
65744         * lib/regexec.c (re_search_stub): Return -2 (not -1) if there is
65745         trouble; this can occur if re_search_internal ran out of memory.
65747 2012-02-26  Bruno Haible  <bruno@clisp.org>
65749         modfl-ieee: Work around test failures on IRIX, OSF/1, mingw.
65750         * m4/modfl-ieee.m4: New file.
65751         * m4/modfl.m4 (gl_FUNC_MODFL): If gl_FUNC_MODFL_IEEE is present, test
65752         whether modfl works with Inf. Replace it if not.
65753         * lib/math.in.h (modfl): Override if REPLACE_MODFF is 1.
65754         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_MODFL.
65755         * modules/math (Makefile.am): Substitute REPLACE_MODFL.
65756         * modules/modfl (configure.ac): Consider REPLACE_MODFL.
65757         (Depends-on): Update dependencies.
65758         * modules/modfl-ieee (Files): Add m4/modfl-ieee.m4, m4/minus-zero.m4,
65759         m4/signbit.m4.
65760         (configure.ac): Invoke gl_FUNC_MODFL_IEEE.
65761         * doc/posix-functions/modfl.texi: Mention the modfl-ieee module.
65763         modfl-ieee: Fix dependencies.
65764         * modules/modfl-ieee (Depends-on): Add modf-ieee.
65766         modfl-ieee: Fix test failures.
65767         * lib/modfl.c (modfl): Treat NaN and Inf specially.
65768         * modules/modfl (Depends-on): Add isfinite, isinf.
65770         modff-ieee: Work around test failures on *BSD, IRIX, OSF/1, etc.
65771         * m4/modff-ieee.m4: New file.
65772         * m4/modff.m4 (gl_FUNC_MODFF): If gl_FUNC_MODFF_IEEE is present, test
65773         whether modff works with NaN and Inf. Replace it if not.
65774         * lib/math.in.h (modff): Override if REPLACE_MODFF is 1.
65775         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_MODFF.
65776         * modules/math (Makefile.am): Substitute REPLACE_MODFF.
65777         * modules/modff (configure.ac): Consider REPLACE_MODFF.
65778         (Depends-on): Update dependencies.
65779         * modules/modff-ieee (Files): Add m4/modff-ieee.m4, m4/minus-zero.m4,
65780         m4/signbit.m4.
65781         (Depends-on): Add modf-ieee.
65782         (configure.ac): Invoke gl_FUNC_MODFF_IEEE.
65783         * doc/posix-functions/modff.texi: Mention the modff-ieee module.
65785         modf-ieee: Work around test failures on *BSD, IRIX, OSF/1, Cygwin.
65786         * m4/modf-ieee.m4: New file.
65787         * m4/modf.m4 (gl_FUNC_MODF): If gl_FUNC_MODF_IEEE is present, test
65788         whether modf works with NaN and Inf. Replace it if not.
65789         * lib/math.in.h (modf): New declaration.
65790         * lib/modf.c: New file.
65791         * m4/math_h.m4 (gl_MATH_H): Test whether modf is declared.
65792         (gl_MATH_H_DEFAULTS): Initialize GNULIB_MODF, REPLACE_MODF.
65793         * modules/math (Makefile.am): Substitute GNULIB_MODF, REPLACE_MODF.
65794         * modules/modf (Files): Add lib/modf.c.
65795         (Depends-on): Add math, isfinite, trunc, isinf.
65796         (configure.ac): Addrange to compile lib/modf.c if needed.
65797         * modules/modf-ieee (Files): Add m4/modf-ieee.m4, m4/minus-zero.m4,
65798         m4/signbit.m4.
65799         (configure.ac): Invoke gl_FUNC_MODF_IEEE.
65800         * tests/test-math-c++.cc: Check the declaration of modf.
65801         * doc/posix-functions/modf.texi: Mention the modf-ieee module.
65803         Tests for module 'modfl-ieee'.
65804         * modules/modfl-ieee-tests: New file.
65805         * tests/test-modfl-ieee.c: New file.
65807         New module 'modfl-ieee'.
65808         * modules/modfl-ieee: New file.
65810         Tests for module 'modf-ieee'.
65811         * modules/modf-ieee-tests: New file.
65812         * tests/test-modf-ieee.c: New file.
65814         New module 'modf-ieee'.
65815         * modules/modf-ieee: New file.
65817         Tests for module 'modff-ieee'.
65818         * modules/modff-ieee-tests: New file.
65819         * tests/test-modff-ieee.c: New file.
65820         * tests/test-modf-ieee.h: New file.
65822         New module 'modff-ieee'.
65823         * modules/modff-ieee: New file.
65825 2012-02-26  Bruno Haible  <bruno@clisp.org>
65827         Tests for module 'fabsl-ieee'.
65828         * modules/fabsl-ieee-tests: New file.
65829         * tests/test-fabsl-ieee.c: New file.
65831         New module 'fabsl-ieee'.
65832         * modules/fabsl-ieee: New file.
65834         Tests for module 'fabs-ieee'.
65835         * modules/fabs-ieee-tests: New file.
65836         * tests/test-fabs-ieee.c: New file.
65838         New module 'fabs-ieee'.
65839         * modules/fabs-ieee: New file.
65841         Tests for module 'fabsf-ieee'.
65842         * modules/fabsf-ieee-tests: New file.
65843         * tests/test-fabsf-ieee.c: New file.
65844         * tests/test-fabs-ieee.h: New file.
65846         New module 'fabsf-ieee'.
65847         * modules/fabsf-ieee: New file.
65849 2012-02-26  Bruno Haible  <bruno@clisp.org>
65851         Tests for module 'fmal-ieee'.
65852         * modules/fmal-ieee-tests: New file.
65853         * tests/test-fmal-ieee.c: New file.
65855         New module 'fmal-ieee'.
65856         * modules/fmal-ieee: New file.
65858         Tests for module 'fma-ieee'.
65859         * modules/fma-ieee-tests: New file.
65860         * tests/test-fma-ieee.c: New file.
65862         New module 'fma-ieee'.
65863         * modules/fma-ieee: New file.
65865         Tests for module 'fmaf-ieee'.
65866         * modules/fmaf-ieee-tests: New file.
65867         * tests/test-fmaf-ieee.c: New file.
65868         * tests/test-fma-ieee.h: New file.
65870         New module 'fmaf-ieee'.
65871         * modules/fmaf-ieee: New file.
65873 2012-02-26  Bruno Haible  <bruno@clisp.org>
65875         Tests for module 'ldexpl-ieee'.
65876         * modules/ldexpl-ieee-tests: New file.
65877         * tests/test-ldexpl-ieee.c: New file.
65879         New module 'ldexpl-ieee'.
65880         * modules/ldexpl-ieee: New file.
65882         Tests for module 'ldexp-ieee'.
65883         * modules/ldexp-ieee-tests: New file.
65884         * tests/test-ldexp-ieee.c: New file.
65886         New module 'ldexp-ieee'.
65887         * modules/ldexp-ieee: New file.
65889         Tests for module 'ldexpf-ieee'.
65890         * modules/ldexpf-ieee-tests: New file.
65891         * tests/test-ldexpf-ieee.c: New file.
65892         * tests/test-ldexp-ieee.h: New file.
65894         New module 'ldexpf-ieee'.
65895         * modules/ldexpf-ieee: New file.
65897 2012-02-26  Bruno Haible  <bruno@clisp.org>
65899         Refactor frexp*-ieee tests.
65900         * tests/test-frexp-ieee.h: New file.
65901         * tests/test-frexpf-ieee.c: Include test-frexp-ieee.h.
65902         (main): Just call test_function.
65903         * tests/test-frexp-ieee.c: Include test-frexp-ieee.h.
65904         (main): Just call test_function.
65905         * tests/test-frexpl-ieee.c: Include test-frexp-ieee.h.
65906         (main): Just call test_function.
65907         * modules/frexpf-ieee-tests (Files): Add tests/test-frexp-ieee.h.
65908         * modules/frexp-ieee-tests (Files): Likewise.
65909         * modules/frexpl-ieee-tests (Files): Likewise.
65911         Tests for module 'frexpl-ieee'.
65912         * modules/frexpl-ieee-tests: New file.
65913         * tests/test-frexpl-ieee.c: New file.
65915         New module 'frexpl-ieee'.
65916         * modules/frexpl-ieee: New file.
65918         Tests for module 'frexp-ieee'.
65919         * modules/frexp-ieee-tests: New file.
65920         * tests/test-frexp-ieee.c: New file.
65922         New module 'frexp-ieee'.
65923         * modules/frexp-ieee: New file.
65925         Tests for module 'frexpf-ieee'.
65926         * modules/frexpf-ieee-tests: New file.
65927         * tests/test-frexpf-ieee.c: New file.
65929         New module 'frexpf-ieee'.
65930         * modules/frexpf-ieee: New file.
65932 2012-02-26  Bruno Haible  <bruno@clisp.org>
65934         roundl-ieee tests: More tests.
65935         * tests/test-roundl-ieee.c: Include isnanl-nolibm.h, infinity.h, nan.h.
65936         (main): Add tests for [MX] shaded specification in POSIX.
65937         * modules/roundl-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
65938         (Depends-on): Add isnanl-nolibm.
65940         round-ieee tests: More tests.
65941         * tests/test-round-ieee.c: Include isnand-nolibm.h, infinity.h, nan.h.
65942         (main): Add tests for [MX] shaded specification in POSIX.
65943         * modules/round-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
65944         (Depends-on): Add isnand-nolibm.
65946         roundf-ieee tests: More tests.
65947         * tests/test-roundf-ieee.c: Include isnanf-nolibm.h, infinity.h, nan.h.
65948         (main): Add tests for [MX] shaded specification in POSIX.
65949         * modules/roundf-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
65950         (Depends-on): Add isnanf-nolibm.
65952         truncl-ieee tests: More tests.
65953         * tests/test-truncl-ieee.c: Include isnanl-nolibm.h, infinity.h, nan.h.
65954         (main): Add tests for [MX] shaded specification in POSIX.
65955         * modules/truncl-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
65956         (Depends-on): Add isnanl-nolibm.
65958         trunc-ieee tests: More tests.
65959         * tests/test-trunc-ieee.c: Include isnand-nolibm.h, infinity.h, nan.h.
65960         (main): Add tests for [MX] shaded specification in POSIX.
65961         * modules/trunc-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
65962         (Depends-on): Add isnand-nolibm.
65964         truncf-ieee tests: More tests.
65965         * tests/test-truncf-ieee.c: Include isnanf-nolibm.h, infinity.h, nan.h.
65966         (main): Add tests for [MX] shaded specification in POSIX.
65967         * modules/truncf-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
65968         (Depends-on): Add isnanf-nolibm.
65970         ceill-ieee tests: More tests.
65971         * tests/test-ceill-ieee.c: Include isnanl-nolibm.h, infinity.h, nan.h.
65972         (main): Add tests for [MX] shaded specification in POSIX.
65973         * modules/ceill-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
65974         (Depends-on): Add isnanl-nolibm.
65976         ceil-ieee tests: More tests.
65977         * tests/test-ceil-ieee.c: Include isnand-nolibm.h, infinity.h, nan.h.
65978         (main): Add tests for [MX] shaded specification in POSIX.
65979         * modules/ceil-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
65980         (Depends-on): Add isnand-nolibm.
65982         ceilf-ieee tests: More tests.
65983         * tests/test-ceilf-ieee.c: Include isnanf-nolibm.h, infinity.h, nan.h.
65984         (main): Add tests for [MX] shaded specification in POSIX.
65985         * modules/ceilf-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
65986         (Depends-on): Add isnanf-nolibm.
65988         floorl-ieee tests: More tests.
65989         * tests/test-floorl-ieee.c: Include isnanl-nolibm.h, infinity.h, nan.h.
65990         (main): Add tests for [MX] shaded specification in POSIX.
65991         * modules/floorl-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
65992         (Depends-on): Add isnanl-nolibm.
65994         floor-ieee tests: More tests.
65995         * tests/test-floor-ieee.c: Include isnand-nolibm.h, infinity.h, nan.h.
65996         (main): Add tests for [MX] shaded specification in POSIX.
65997         * modules/floor-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
65998         (Depends-on): Add isnand-nolibm.
66000         floorf-ieee tests: More tests.
66001         * tests/test-floorf-ieee.c: Include isnanf-nolibm.h, infinity.h, nan.h.
66002         (main): Add tests for [MX] shaded specification in POSIX.
66003         * modules/floorf-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
66004         (Depends-on): Add isnanf-nolibm.
66006 2012-02-26  Bruno Haible  <bruno@clisp.org>
66008         fpieee: More comments.
66009         * m4/fpieee.m4 (gl_FP_IEEE): Add more comments.
66011 2012-02-25  Bruno Haible  <bruno@clisp.org>
66013         Tests for module 'log10l'.
66014         * modules/log10l-tests: New file.
66015         * tests/test-log10l.c: New file.
66016         * tests/test-math-c++.cc: Check the declaration of log10l.
66018         New module 'log10l'.
66019         * lib/math.in.h (log10l): New declaration.
66020         * lib/log10l.c: New file.
66021         * m4/log10l.m4: New file.
66022         * modules/log10l: New file.
66023         * m4/math_h.m4 (gl_MATH_H): Test whether log10l is declared.
66024         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG10L, HAVE_LOG10L,
66025         HAVE_DECL_LOG10L.
66026         * modules/math (Makefile.am): Substitute GNULIB_LOG10L, HAVE_LOG10L,
66027         HAVE_DECL_LOG10L.
66028         * doc/posix-functions/log10l.texi: Mention the new module.
66030 2012-02-25  Bruno Haible  <bruno@clisp.org>
66032         fmodl, remainder*: Avoid wrong results due to rounding errors.
66033         * lib/fmodl.c (fmodl): Correct the result if it is not within the
66034         expected bounds.
66035         * lib/remainderf.c (remainderf): Likewise.
66036         * lib/remainder.c (remainder): Likewise.
66037         * lib/remainderl.c (remainderl): Likewise.
66039 2012-02-25  Bruno Haible  <bruno@clisp.org>
66041         Tests for module 'remainderl'.
66042         * modules/remainderl-tests: New file.
66043         * tests/test-remainderl.c: New file.
66044         * tests/test-math-c++.cc: Check the declaration of remainderl.
66046         New module 'remainderl'.
66047         * lib/math.in.h (remainderl): New declaration.
66048         * lib/remainderl.c: New file.
66049         * m4/remainderl.m4: New file.
66050         * modules/remainderl: New file.
66051         * m4/math_h.m4 (gl_MATH_H): Test whether remainderl is declared.
66052         (gl_MATH_H_DEFAULTS): Initialize GNULIB_REMAINDERL, HAVE_REMAINDERL.
66053         * modules/math (Makefile.am): Substitute GNULIB_REMAINDERL,
66054         HAVE_REMAINDERL.
66055         * doc/posix-functions/remainderl.texi: Mention the new module.
66057 2012-02-25  Bruno Haible  <bruno@clisp.org>
66059         Tests for module 'remainderf'.
66060         * modules/remainderf-tests: New file.
66061         * tests/test-remainderf.c: New file.
66062         * tests/test-math-c++.cc: Check the declaration of remainderf.
66064         New module 'remainderf'.
66065         * lib/math.in.h (remainderf): New declaration.
66066         * lib/remainderf.c: New file.
66067         * m4/remainderf.m4: New file.
66068         * modules/remainderf: New file.
66069         * m4/math_h.m4 (gl_MATH_H): Test whether remainderf is declared.
66070         (gl_MATH_H_DEFAULTS): Initialize GNULIB_REMAINDERF, HAVE_REMAINDERF.
66071         * modules/math (Makefile.am): Substitute GNULIB_REMAINDERF,
66072         HAVE_REMAINDERF.
66073         * doc/posix-functions/remainderf.texi: Mention the new module.
66075 2012-02-25  Bruno Haible  <bruno@clisp.org>
66077         remainder: Support for MSVC.
66078         * lib/math.in.h (remainder): New declaration.
66079         * lib/remainder.c: New file.
66080         * m4/remainder.m4: New file.
66081         * modules/remainder (Files): Add lib/remainder.c, m4/remainder.m4.
66082         (Depends-on): Add math, round, fma.
66083         (configure.ac): Use results of gl_FUNC_REMAINDER.
66084         * m4/math_h.m4 (gl_MATH_H): Test whether remainder is declared.
66085         (gl_MATH_H_DEFAULTS): Initialize GNULIB_REMAINDER, HAVE_REMAINDER,
66086         HAVE_DECL_REMAINDER.
66087         * modules/math (Makefile.am): Substitute GNULIB_REMAINDER,
66088         HAVE_REMAINDER, HAVE_DECL_REMAINDER.
66089         * tests/test-math-c++.cc: Check the declaration of remainder.
66090         * doc/posix-functions/remainder.texi: Mention that the MSVC and IRIX 5
66091         problems are fixed.
66093 2012-02-25  Bruno Haible  <bruno@clisp.org>
66095         Tests for module 'fmodl'.
66096         * modules/fmodl-tests: New file.
66097         * tests/test-fmodl.c: New file.
66098         * tests/test-math-c++.cc: Check the declaration of fmodl.
66100         New module 'fmodl'.
66101         * lib/math.in.h (fmodl): New declaration.
66102         * lib/fmodl.c: New file.
66103         * m4/fmodl.m4: New file.
66104         * m4/math_h.m4 (gl_MATH_H): Test whether fmodl is declared.
66105         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FMODL, HAVE_FMODL,
66106         REPLACE_FMODL.
66107         * modules/math (Makefile.am): Substitute GNULIB_FMODL, HAVE_FMODL,
66108         REPLACE_FMODL.
66109         * modules/fmodl: New file.
66110         * doc/posix-functions/fmodl.texi: Mention the new module.
66112 2012-02-25  Bruno Haible  <bruno@clisp.org>
66114         Tests for module 'modfl'.
66115         * modules/modfl-tests: New file.
66116         * tests/test-modfl.c: New file.
66117         * tests/test-math-c++.cc: Check the declaration of modfl.
66119         New module 'modfl'.
66120         * lib/math.in.h (modfl): New declaration.
66121         * lib/modfl.c: New file.
66122         * m4/modfl.m4: New file.
66123         * m4/math_h.m4 (gl_MATH_H): Test whether modfl is declared.
66124         (gl_MATH_H_DEFAULTS): Initialize GNULIB_MODFL, HAVE_MODFL.
66125         * modules/math (Makefile.am): Substitute GNULIB_MODFL, HAVE_MODFL.
66126         * modules/modfl: New file.
66127         * doc/posix-functions/modfl.texi: Mention the new module.
66129 2012-02-25  Bruno Haible  <bruno@clisp.org>
66131         Tests for module 'fabsl'.
66132         * modules/fabsl-tests: New file.
66133         * tests/test-fabsl.c: New file.
66134         * tests/test-math-c++.cc: Check the declaration of fabsl.
66136         New module 'fabsl'.
66137         * lib/math.in.h (fabsl): New declaration.
66138         * lib/fabsl.c: New file.
66139         * m4/fabsl.m4: New file.
66140         * m4/math_h.m4 (gl_MATH_H): Test whether fabsl is declared.
66141         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FABSL, HAVE_FABSL,
66142         REPLACE_FABSL.
66143         * modules/math (Makefile.am): Substitute GNULIB_FABSL, HAVE_FABSL,
66144         REPLACE_FABSL.
66145         * modules/fabsl: New file.
66146         * doc/posix-functions/fabsl.texi: Mention the new module.
66148 2012-02-25  Bruno Haible  <bruno@clisp.org>
66150         fabs tests: More tests.
66151         * tests/test-fabs.c: Include <string.h>, minus-zero.h.
66152         (zero): New variable.
66153         (main): Add tests for signed zero.
66154         * modules/fabs-tests (Files): Add tests/minus-zero.h.
66156         fabsf tests: More tests.
66157         * tests/test-fabsf.c: Include <string.h>, minus-zero.h.
66158         (zero): New variable.
66159         (main): Add tests for signed zero.
66160         * modules/fabsf-tests (Files): Add tests/minus-zero.h.
66162 2012-02-24  Bruno Haible  <bruno@clisp.org>
66164         atanl: Provide function definition on MSVC.
66165         * m4/atanl.m4 (gl_FUNC_ATANL): Test also whether atanl can be used as a
66166         function pointer.
66167         * lib/math.in.h (atanl): Undefine if it does not exist as a function.
66169 2012-02-24  Bruno Haible  <bruno@clisp.org>
66171         acosl: Provide function definition on MSVC.
66172         * m4/acosl.m4 (gl_FUNC_ACOSL): Test also whether acosl can be used as a
66173         function pointer.
66174         * lib/math.in.h (acosl): Undefine if it does not exist as a function.
66176 2012-02-24  Bruno Haible  <bruno@clisp.org>
66178         asinl: Provide function definition on MSVC.
66179         * m4/asinl.m4 (gl_FUNC_ASINL): Test also whether asinl can be used as a
66180         function pointer.
66181         * lib/math.in.h (asinl): Undefine if it does not exist as a function.
66183 2012-02-24  Bruno Haible  <bruno@clisp.org>
66185         tanl: Provide function definition on MSVC.
66186         * m4/tanl.m4 (gl_FUNC_TANL): Test also whether tanl can be used as a
66187         function pointer.
66188         * lib/math.in.h (tanl): Undefine if it does not exist as a function.
66190 2012-02-24  Bruno Haible  <bruno@clisp.org>
66192         cosl: Provide function definition on MSVC.
66193         * m4/cosl.m4 (gl_FUNC_COSL): Test also whether cosl can be used as a
66194         function pointer.
66195         * lib/math.in.h (cosl): Undefine if it does not exist as a function.
66197 2012-02-24  Bruno Haible  <bruno@clisp.org>
66199         sinl: Provide function definition on MSVC.
66200         * m4/sinl.m4 (gl_FUNC_SINL): Test also whether sinl can be used as a
66201         function pointer.
66202         * lib/math.in.h (sinl): Undefine if it does not exist as a function.
66204 2012-02-24  Bruno Haible  <bruno@clisp.org>
66206         logl: Provide function definition on MSVC.
66207         * m4/logl.m4 (gl_FUNC_LOGL): Test also whether logl can be used as a
66208         function pointer.
66209         * lib/math.in.h (logl): Undefine if it does not exist as a function.
66211 2012-02-24  Bruno Haible  <bruno@clisp.org>
66213         expl: Provide function definition on MSVC.
66214         * m4/expl.m4 (gl_FUNC_EXPL): Test also whether expl can be used as a
66215         function pointer.
66216         * lib/math.in.h (expl): Undefine if it does not exist as a function.
66218 2012-02-24  Bruno Haible  <bruno@clisp.org>
66220         sqrtl: Provide function definition on MSVC.
66221         * m4/sqrtl.m4 (gl_FUNC_SQRTL): Test also whether sqrtl can be used as
66222         a function pointer.
66223         * lib/math.in.h (sqrtl): Undefine if it does not exist as a function.
66225 2012-02-24  Bruno Haible  <bruno@clisp.org>
66227         ceill: Provide function definition on MSVC.
66228         * m4/ceill.m4 (gl_FUNC_CEILL_LIBS): Test also whether ceill can be
66229         used as a function pointer.
66230         * lib/math.in.h (ceill): Undefine if it is not declared as a function.
66232 2012-02-24  Bruno Haible  <bruno@clisp.org>
66234         floorl: Provide function definition on MSVC.
66235         * m4/floorl.m4 (gl_FUNC_FLOORL_LIBS): Test also whether floorl can be
66236         used as a function pointer.
66237         * lib/math.in.h (floorl): Undefine if it is not declared as a function.
66239 2012-02-24  Bruno Haible  <bruno@clisp.org>
66241         ceilf: Provide function definition on MSVC.
66242         * m4/ceilf.m4 (gl_FUNC_CEILF_LIBS): Test also whether ceilf can be
66243         used as a function pointer.
66244         * lib/math.in.h (ceilf): Undefine if it is not declared as a function.
66246 2012-02-24  Bruno Haible  <bruno@clisp.org>
66248         floorf: Provide function definition on MSVC.
66249         * m4/floorf.m4 (gl_FUNC_FLOORF_LIBS): Test also whether floorf can be
66250         used as a function pointer.
66251         * lib/math.in.h (floorf): Undefine if it is not declared as a function.
66253 2012-02-24  Paul Eggert  <eggert@cs.ucla.edu>
66255         stdnoreturn: new module
66256         This implements a replacement for C11's <stdnoreturn.h>.
66257         * doc/gnulib.texi (Header File Substitutes): Add stdnoreturn.
66258         * doc/posix-headers/stdnoreturn.texi, lib/stdnoreturn.in.h:
66259         * m4/stdnoreturn.m4, modules/stdnoreturn, modules/stdnoreturn-tests:
66260         * tests/test-stdnoreturn.c: New files.
66262 2012-02-24  Stanislav Brabec  <sbrabec@suse.cz>  (tiny change)
66264         regex: fix false multibyte matches in some regular expressions
66265         See <http://sourceware.org/bugzilla/show_bug.cgi?id=13637>
66266         and <http://sourceware.org/ml/libc-alpha/2012-02/msg00521.html>.
66267         * lib/regex_internal.c (re_string_skip_chars):
66268         Fix miscomputation of remain_len that may cause incomplete
66269         multi-byte character and false match.
66271 2012-02-24  Jim Meyering  <meyering@redhat.com>
66273         maint.mk: tell sc_prohibit_strcmp to ding "0 == strcmp (...)", too
66274         * top/maint.mk (sc_prohibit_strcmp): Also prohibit uses of strcmp
66275         uses with "==" *before* the call, e.g., 0 == strcmp (...)
66276         Remove now-unnecessary str''cmp obfuscation.
66277         Suggested by Akim Demaille.
66279 2012-02-24  Bruno Haible  <bruno@clisp.org>
66281         streq: Rename macro.
66282         * lib/streq.h (STREQ_OPT): Renamed from STREQ.
66283         * NEWS: Mention the change.
66284         * lib/mbrtowc.c (mbrtowc): Update.
66285         * lib/uniwidth/cjk.h (is_cjk_encoding): Update.
66286         * lib/wcwidth.c (wcwidth): Update.
66287         Suggested by Akim Demaille and Jim Meyering.
66289 2012-02-20  Paul Eggert  <eggert@cs.ucla.edu>
66291         regex: fix typo in definition of MIN
66292         * lib/regex_internal.h (MIN): Fix typo.  Problem reported by Thomas
66293         Schwinge in <http://sourceware.org/bugzilla/show_bug.cgi?id=11638#c4>.
66295 2012-02-19  Paul Eggert  <eggert@cs.ucla.edu>
66296             Bruno Haible  <bruno@clisp.org>
66298         acl: Don't use ACL_CNT and similar ops, since they are unreliable.
66299         * lib/file-has-acl.c (file_has_acl) [HP-UX, NonStop Kernel]: Read the
66300         entries into a stack-allocated buffer directly.
66301         * lib/copy-acl.c (qcopy_acl) [HP-UX, NonStop Kernel]: Likewise.
66303 2012-02-19  Paul Eggert  <eggert@cs.ucla.edu>
66304             Bruno Haible  <bruno@clisp.org>
66306         acl: Don't use GETACLCNT and similar ops, since they are unreliable.
66308          - There were several instances of this pattern:
66310              for (;;) {
66311                n = acl (f, GETACLCNT, 0, NULL);
66312                [ allocate an array A of size N ]
66313                if (acl (f, GETACL, n, a) == n)
66314                  break;
66315              }
66317            This loop might never terminate if some other process is constantly
66318            manipulating the file's ACL.  The loop should be rewritten to
66319            terminate.
66321          - The acl (... GETACLNT ...) call is merely an optimization; its value
66322            is merely a hint as to how big to make the array.  A better
66323            optimization is to avoid the acl (... GETACLNT ...)  call entirely,
66324            and just guess a reasonably-big size, growing the size and trying
66325            again if it's not large enough.  This guarantees termination, and
66326            saves a system call.
66328         * lib/acl-internal.h: Include <limits.h>.
66329         (MIN, SIZE_MAX): New macros.
66330         * lib/file-has-acl.c (file_has_acl) [Solaris]: Read the entries into
66331         a stack-allocated buffer, and use malloc if it does not fit. Don't
66332         use GETACLCNT.
66333         * lib/set-mode-acl.c (qset_acl) [Solaris]: Likewise.
66335 2012-02-19  Bruno Haible  <bruno@clisp.org>
66337         acl: Fix endless loop on Solaris with vxfs.
66338         * lib/file-has-acl.c (file_has_acl) [Solaris]: Treat a failing
66339         acl()/facl() call for ACE_GETACL like a failing call for ACE_GETACLCNT.
66340         * lib/set-mode-acl.c (qset_acl) [Solaris]: Likewise.
66341         * lib/copy-acl.c (qcopy_acl)[Solaris]: Likewise.
66342         * tests/test-sameacls.c (main)[Solaris]: Likewise.
66343         Reported by Bill Jones in
66344         <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10639>, via Paul Eggert.
66346 2012-02-19  Bruno Haible  <bruno@clisp.org>
66348         acl: Fix copy-acl test failure on Solaris 11.0.
66349         * lib/file-has-acl.c (NEW_ACE_WRITEA_DATA): New macro.
66350         (acl_ace_nontrivial): Relax the restrictions on access_masks[] so
66351         that this function returns 0 in some more cases.
66353 2012-02-19  Bruno Haible  <bruno@clisp.org>
66355         acl: Update doc references.
66356         * doc/acl-resources.txt: Update links to Solaris documentation.
66358 2012-02-19  Bruno Haible  <bruno@clisp.org>
66360         Fix test failure in many locales on Solaris 11.
66361         * tests/test-pipe-filter-gi1.c (main): Don't use range expression in
66362         'tr' arguments.
66363         * tests/test-pipe-filter-ii1.c (main): Likewise.
66364         * build-aux/bootstrap (check_versions): Run 'tr' command with range
66365         expressions in the C locale.
66366         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Likewise.
66367         * m4/host-os.m4 (gl_HOST_OS): Likewise.
66369 2012-02-19  Bruno Haible  <bruno@clisp.org>
66371         gnulib-tool: Improve usage message.
66372         * gnulib-tool (func_usage): Move doc of --help and --version to the
66373         section "Operation modes".
66375 2012-02-18  Reuben Thomas  <rrt@sc3d.org>
66377         README-release: make it easier to execute commands
66378         * top/README-release: break commands out on to separate lines.
66380 2012-02-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
66382         GNUmakefile: simplify detection of unconfigured trees
66383         * top/GNUmakefile: Use $(wildcard) instead of $(shell) to determine
66384         whether the tree make is being run from is already configured or
66385         not.  Related simplifications.
66387 2012-02-13  Simon Josefsson  <simon@josefsson.org>
66389         * gnulib-tool (func_usage): Document --help and --version.
66391 2012-02-11  Jim Meyering  <meyering@redhat.com>
66393         bootstrap: don't exit 0 upon gnulib-tool failure
66394         * build-aux/bootstrap (gnulib_tool): If gnulib-tool fails, exit with
66395         its exit status, not 0.
66397 2011-12-19  Reuben Thomas  <rrt@sc3d.org>
66399         README-release: various improvements
66400         * top/README-release: Give a command to push changes for the
66401         release.  Add "distcheck" to list of other pre-release checks.
66402         Fix instance of "make stable" which should be "make TYPE".
66404 2012-02-09  Paul Eggert  <eggert@cs.ucla.edu>
66406         maint: replace FSF snail-mail addresses with URLs
66407         * config/argz.mk, lib/accept4.c, lib/alignof.h, lib/alloca.in.h:
66408         * lib/alphasort.c, lib/arcfour.c, lib/arcfour.h, lib/arctwo.c:
66409         * lib/arctwo.h, lib/argz.c, lib/arpa_inet.in.h, lib/asnprintf.c:
66410         * lib/asprintf.c, lib/assert.in.h, lib/base32.c, lib/base32.h:
66411         * lib/base64.c, lib/base64.h, lib/c-ctype.c, lib/c-ctype.h:
66412         * lib/c-strcase.h, lib/c-strcasecmp.c, lib/c-strncasecmp.c:
66413         * lib/check-version.c, lib/check-version.h, lib/config.charset:
66414         * lib/ctype.in.h, lib/des.c, lib/des.h, lib/dup3.c, lib/errno.in.h:
66415         * lib/float+.h, lib/fnmatch.c, lib/fnmatch.in.h, lib/fnmatch_loop.c:
66416         * lib/fseeko.c, lib/gai_strerror.c, lib/gc-gnulib.c:
66417         * lib/gc-libgcrypt.c, lib/gc-pbkdf2-sha1.c, lib/gc.h:
66418         * lib/getaddrinfo.c, lib/getdelim.c, lib/getfilecon.c, lib/getline.c:
66419         * lib/getlogin_r.c, lib/getpass.c, lib/getpass.h, lib/gettext.h:
66420         * lib/gettimeofday.c, lib/glob.in.h, lib/glthread/cond.c:
66421         * lib/glthread/cond.h, lib/glthread/lock.c, lib/glthread/lock.h:
66422         * lib/glthread/thread.c, lib/glthread/thread.h:
66423         * lib/glthread/threadlib.c, lib/glthread/yield.h, lib/hmac-md5.c:
66424         * lib/hmac-sha1.c, lib/hmac.h, lib/iconv.c, lib/iconv.in.h:
66425         * lib/iconv_close.c, lib/iconv_open.c, lib/inet_ntop.c, lib/isfinite.c:
66426         * lib/isinf.c, lib/iswblank.c, lib/langinfo.in.h, lib/link.c:
66427         * lib/localcharset.c, lib/localcharset.h, lib/lseek.c, lib/malloc.c:
66428         * lib/malloca.c, lib/malloca.h, lib/md2.c, lib/md2.h, lib/md4.c:
66429         * lib/md4.h, lib/md5.c, lib/md5.h, lib/memmem.c, lib/mempcpy.c:
66430         * lib/memset.c, lib/memxor.c, lib/memxor.h, lib/minmax.h, lib/mktime.c:
66431         * lib/msvc-inval.c, lib/msvc-inval.h, lib/msvc-nothrow.c:
66432         * lib/msvc-nothrow.h, lib/netdb.in.h, lib/netinet_in.in.h, lib/nproc.c:
66433         * lib/nproc.h, lib/obstack_printf.c, lib/pathmax.h, lib/pipe.c:
66434         * lib/pipe2.c, lib/poll.c, lib/poll.in.h, lib/printf-args.c:
66435         * lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h:
66436         * lib/pselect.c, lib/pthread.in.h, lib/pty-private.h, lib/pty.in.h:
66437         * lib/read-file.c, lib/read-file.h, lib/ref-add.sin, lib/ref-del.sin:
66438         * lib/regcomp.c, lib/regex.c, lib/regex.h, lib/regex_internal.c:
66439         * lib/regex_internal.h, lib/regexec.c, lib/rijndael-alg-fst.c:
66440         * lib/rijndael-alg-fst.h, lib/rijndael-api-fst.c:
66441         * lib/rijndael-api-fst.h, lib/rint.c, lib/rintf.c, lib/rintl.c:
66442         * lib/round.c, lib/roundf.c, lib/roundl.c, lib/scandir.c, lib/select.c:
66443         * lib/sha1.c, lib/sha1.h, lib/size_max.h, lib/snprintf.c:
66444         * lib/stdalign.in.h, lib/stdarg.in.h, lib/stdbool.in.h:
66445         * lib/stddef.in.h, lib/stdint.in.h, lib/stdio.in.h, lib/str-kmp.h:
66446         * lib/str-two-way.h, lib/strcasecmp.c, lib/strcasestr.c, lib/strdup.c:
66447         * lib/striconv.c, lib/striconv.h, lib/string.in.h, lib/strings.in.h:
66448         * lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c, lib/strpbrk.c:
66449         * lib/strptime.c, lib/strsep.c, lib/strstr.c, lib/strverscmp.c:
66450         * lib/sys_file.in.h, lib/sys_ioctl.in.h, lib/sys_select.in.h:
66451         * lib/sys_socket.in.h, lib/sys_stat.in.h, lib/sys_time.in.h:
66452         * lib/sys_times.in.h, lib/sys_types.in.h, lib/sys_uio.in.h:
66453         * lib/sys_utsname.in.h, lib/sys_wait.in.h, lib/tcgetsid.c:
66454         * lib/termios.in.h, lib/time.in.h, lib/time_r.c, lib/timegm.c:
66455         * lib/times.c, lib/unictype/3level.h, lib/unictype/3levelbit.h:
66456         * lib/unistd.in.h, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c:
66457         * lib/vsnprintf.c, lib/waitpid.c, lib/wchar.in.h, lib/wctype.in.h:
66458         * lib/xsize.h, tests/test-closein.c, tests/test-des.c:
66459         * tests/test-fclose.c, tests/test-fgetc.c, tests/test-filevercmp.c:
66460         * tests/test-fputc.c, tests/test-fread.c, tests/test-fwrite.c:
66461         * tests/test-gc-arcfour.c, tests/test-gc-arctwo.c, tests/test-gc-des.c:
66462         * tests/test-gc-hmac-md5.c, tests/test-gc-hmac-sha1.c:
66463         * tests/test-gc-md2.c, tests/test-gc-md4.c, tests/test-gc-md5.c:
66464         * tests/test-gc-pbkdf2-sha1.c, tests/test-gc-rijndael.c:
66465         * tests/test-gc-sha1.c, tests/test-gc.c, tests/test-getdelim.c:
66466         * tests/test-getline.c, tests/test-getndelim2.c, tests/test-md2.c:
66467         * tests/test-md4.c, tests/test-parse-datetime.c, tests/test-perror.c:
66468         * tests/test-perror2.c, tests/test-pipe.c, tests/test-pipe2.c:
66469         * tests/test-poll.c, tests/test-quotearg-simple.c:
66470         * tests/test-quotearg.c, tests/test-quotearg.h:
66471         * tests/test-round-ieee.c, tests/test-round1.c:
66472         * tests/test-roundf-ieee.c, tests/test-roundf1.c:
66473         * tests/test-roundl-ieee.c, tests/test-roundl.c:
66474         * tests/test-safe-alloc.c, tests/test-sigpipe.c:
66475         * tests/test-spawn-pipe-child.c, tests/test-spawn-pipe-main.c:
66476         * tests/test-strerror.c, tests/test-strerror_r.c:
66477         * tests/test-strsignal.c, tests/test-strverscmp.c:
66478         * tests/test-xmemdup0.c:
66479         Replace FSF snail mail addresses with URLs, as per GNU coding
66480         standards.  See glibc bug
66481         <http://sourceware.org/bugzilla/show_bug.cgi?id=13673>.
66483 2011-12-22  Reuben Thomas  <rrt@sc3d.org>
66485         README-release: capitalize a word and split a line
66486         * top/README-release: Fix punctuation and spacing.
66488 2012-02-08  Akim Demaille  <demaille@gostai.com>
66490         fatal-signal: use C prototypes (with explicit void).
66491         * lib/fatal-signal.c (uninstall_handlers, install_handlers)
66492         (init_fatal_signal_set, block_fatal_signals): Fix signatures.
66494 2012-02-07  Paul Eggert  <eggert@cs.ucla.edu>
66496         regex: spelling fix
66497         * lib/regexec.c: spelling fix
66499         regex: rely on stdint.h for SIZE_MAX
66500         * lib/regex_internal.h (SIZE_MAX): Remove; stdint.h supplies this now.
66502 2012-02-07  Paul Eggert  <eggert@cs.ucla.edu>
66504         regex: merge glibc changes
66506         * lib/regcomp.c (init_dfa): Tighten overflow checks to test
66507         for IDX_MAX too, since IDX_MAX can be much less than SIZE_MAX.
66508         (init_word_char): Work even if bitset words are not exactly 32 or
66509         64 bits wide.  Don't assume there are no padding bits.
66510         * lib/regex.c [_LIBC]: Do not include <config.h>.
66511         [!_LIBC]: Add pragmas to ignore -Wsuggest-attributes=pure
66512         and -Wtype-limits.
66513         * lib/regex.h (__USE_GNU): Renamed from __USE_GNU_REGEX, to avoid
66514         needless disagreement with glibc.  All uses changed.  Define it to
66515         1 only if _GNU_SOURCE, to match glibc.
66516         (_REG_RM_NAME): Remove; no longer needed, since the names in
66517         question are now all protected by __USE_GNU.
66518         (_REG_RE_NAME): Remove; replaced by glibc's __REPB_PREFIX.
66519         (REG_TRANSLATE_TYPE): Remove; replaced by glibc's __RE_TRANSLATE_TYPE.
66520         * lib/regex_internal.h (MIN): New macro.
66522         2012-01-03 Ulrich Drepper <drepper@gmail.com>
66523         * lib/regcomp.c (init_word_char): Optimize regex a bit.
66525         2011-12-30 Jakub Jelinek <jakub@redhat.com>
66526         * lib/regex_internal.c (re_string_fetch_byte_case):
66527         Fix up regcomp/regexec.  The problem is that parse_bracket_symbol
66528         is miscompiled, and it turns out it is because of an incorrect
66529         attribute on re_string_fetch_byte_case.  Unlike
66530         re_string_peek_byte_case, this one is really not pure, it modifies
66531         memory (increments pstr->cur_idx), and with the pure attribute GCC
66532         assumed it doesn't and it cached the presumed value of
66533         regexp->cur_idx in a variable across the
66534          for (;; ++i)
66535            {
66536              if (i >= BRACKET_NAME_BUF_SIZE)
66537                return REG_EBRACK;
66538              if (token->type == OP_OPEN_CHAR_CLASS)
66539                ch = re_string_fetch_byte_case (regexp);
66540              else
66541                ch = re_string_fetch_byte (regexp);
66542              if (re_string_eoi(regexp))
66543                return REG_EBRACK;
66544              if (ch == delim && re_string_peek_byte (regexp, 0) == ']')
66545                break;
66546              elem->opr.name[i] = ch;
66547            }
66549         2011-11-29 Andreas Schwab <schwab@redhat.com>
66550         * lib/regcomp.c (build_equiv_class):
66551         Fix access after end of search string in regex matcher.
66553         2011-11-12 Ulrich Drepper <drepper@redhat.com>
66554         * lib/regex_internal.c, lib/regex_internal.h: Fix warnings in regex.
66556         2011-10-12 Ulrich Drepper <drepper@redhat.com>
66557         * lib/regcomp.c (parse_branch): One more regex memory leak fixed.
66559         2011-10-11 Ulrich Drepper <drepper@redhat.com>
66560         * lib/regcomp.c (parse_branch, parse_sub_exp):
66561         More regex memory leak fixes and tests.
66562         (parse_sub_exp, parse_bracket_exp):
66563         Fix memory leak for some invalid regular expressions.
66565         2011-05-28 Ulrich Drepper <drepper@gmail.com>
66566         * lib/regex_internal.c, lib/regexec.c:
66567         Fix unnecessary overallocation due to incomplete character.  When
66568         incomplete characters are found at the end of a string the code
66569         ran amok and allocated lots of memory.  Stricter limits are now in
66570         place.
66572         2011-05-20 Reuben Thomas <rrt@sc3d.org>
66573         * lib/regex.h: Update documentation.
66575         2011-05-16 Aharon Robbins <arnold@skeeve.com>
66576         * lib/regex.h: Update RE_SYNTAX*_AWK constants.
66578         2010-05-05 Andreas Schwab <schwab@redhat.com>
66579         * lib/regexec.c (find_collation_sequence_value):
66580         Fix lookup of collation sequence value during regexp matching.
66582         2010-01-22 Ulrich Drepper <drepper@redhat.com>
66583         * lib/regex_internal.c (re_dfa_add_node): Extend overflow detection.
66585         2008-01-16 Ulrich Drepper <drepper@redhat.com>
66586         * lib/regex.h: Cleanup namespace.
66588         2007-11-26 Ulrich Drepper <drepper@redhat.com>
66589         * lib/regex.h (REG_ENOSYS): Define REG_ENOSYS also for __USE_XOPEN2K.
66591         2007-08-26 Ulrich Drepper <drepper@redhat.com>
66592         * lib/regex_internal.h: Prevent some declarations and definitions
66593         to be seen when used in tests.
66595         2005-05-06 Ulrich Drepper <drepper@redhat.com>
66596         * lib/regex_internal.h: Include bits/libc-lock.h or define dummy
66597         __libc_lock_* macros if not _LIBC.
66598         (struct re_dfa_t): Add lock.
66600 2012-02-07  Eric Blake  <eblake@redhat.com>
66602         maint.mk: also prohibit lower-case @var@
66603         * top/maint.mk (sc_makefile_at_at_check): Enhance check to cover
66604         lower case, like @top_srcdir@.
66606 2012-02-04  Eric Blake  <eblake@redhat.com>
66608         canonicalize: avoid uninitialized memory use
66609         * lib/canonicalize-lgpl.c (__realpath): Avoid possibility of
66610         random '/' left in dest.
66611         * lib/canonicalize.c (canonicalize_filename_mode): Likewise.
66613 2012-02-04  Bruno Haible  <bruno@clisp.org>
66615         isatty: Fix test failure of ptsname_r on native Windows.
66616         * lib/isatty.c (_isatty_nothrow): Upon exception, return 0, not -1,
66617         and don't set errno.
66618         (isatty): Test first whether fd is valid. Set errno when returning 0.
66620 2012-02-04  Bruno Haible  <bruno@clisp.org>
66622         spawn-pipe tests: Fix a NULL program name in a diagnostic.
66623         * tests/test-spawn-pipe-main.c: Include progname.h.
66624         (main): Invoke set_program_name.
66625         * modules/spawn-pipe-tests (Depends-on): Add progname.
66627         nonblocking-socket tests: Fix a NULL program name in a diagnostic.
66628         * tests/test-nonblocking-socket-main.c: Include progname.h.
66629         (main): Invoke set_program_name.
66630         * modules/nonblocking-socket-tests (Depends-on): Add progname.
66632         nonblocking-pipe tests: Fix a NULL program name in a diagnostic.
66633         * tests/test-nonblocking-pipe-main.c: Include progname.h.
66634         (main): Invoke set_program_name.
66635         * modules/nonblocking-pipe-tests (Depends-on): Add progname.
66637 2012-02-04  Eric Blake  <eblake@redhat.com>
66639         canonicalize-lgpl: fix // handling
66640         * lib/canonicalize-lgpl.c (__realpath): Don't convert /// to //.
66642         canonicalize: fix // handling
66643         * lib/canonicalize.c (canonicalize_filename_mode): Don't convert
66644         /// to //, since only // is special.
66646 2012-02-04  Bruno Haible  <bruno@clisp.org>
66648         ioctl: Fix test failure on native Windows.
66649         * lib/ioctl.c: Include msvc-nothrow.h.
66650         (primary_ioctl): If fd is not a valid handle, set errno to EBADF.
66652 2012-02-04  Bruno Haible  <bruno@clisp.org>
66654         fsync: Avoid test failure on native Windows.
66655         * lib/fsync.c (fsync) [Windows]: Don't fail if the handle is merely
66656         read-only.
66658 2012-02-04  Bruno Haible  <bruno@clisp.org>
66660         sys_select: Avoid syntax error on OpenBSD 5.0.
66661         * lib/sys_select.in.h [OpenBSD]: When /usr/include/pthread.h is
66662         currently being included, just include the system's <sys/select.h>.
66664 2012-02-04  Bruno Haible  <bruno@clisp.org>
66666         sys_select: Avoid syntax error on OpenBSD 5.0.
66667         * lib/sys_select.in.h: Include <signal.h> only after the include_next
66668         <sys/select.h>, not before.
66669         Reported by Jiri B <jirib@devio.us>.
66671 2012-02-04  Bruno Haible  <bruno@clisp.org>
66673         get-rusage-as, get-rusage-data tests: Avoid test failure with gcc-4.7.
66674         * tests/test-get-rusage-as.c (main): Assign the malloc() results to
66675         global variables.
66676         * tests/test-get-rusage-data.c (main): Likewise.
66677         Reported by Jim Meyering.
66679 2012-02-04  Bruno Haible  <bruno@clisp.org>
66681         stdioext: Fix last commit.
66682         * lib/fwritable.c [EPLAN9]: Include <fcntl.h>.
66684 2012-02-03  Bruno Haible  <bruno@clisp.org>
66686         stdioext: Add tentative support for Plan9.
66687         * lib/stdio-impl.h: Include <errno.h>.
66688         * lib/fseterr.c (fseterr) [EPLAN9]: Add conditional code.
66689         * lib/freadable.c (freadable): Likewise.
66690         * lib/fwritable.c (fwritable): Likewise.
66691         * lib/fbufmode.c (fbufmode): Likewise.
66692         * lib/freading.c (freading): Likewise.
66693         * lib/fwriting.c (fwriting): Likewise.
66694         * lib/freadptr.c (freadptr): Likewise.
66695         * lib/freadseek.c (freadptrinc): Likewise.
66696         * lib/freadahead.c (freadahead): Likewise.
66697         * lib/fpurge.c (fpurge): Likewise.
66698         * lib/fseeko.c (rpl_fseeko): Likewise.
66699         * m4/fpending.m4 (gl_PREREQ_FPENDING): Add a variant for Plan9.
66700         Reported by Jens Staal <staal1978@gmail.com>.
66702 2012-02-02  Jim Meyering  <meyering@redhat.com>
66704         file-has-acl: suppress a warning from gcc -Wsuggest-attribute=const
66705         * lib/file-has-acl.c (file_has_acl): This function (for some #ifdefs)
66706         would evoke a new gcc warning.  Given all of the #ifdefs, it is better
66707         not even to try to add the attribute.  Instead, add a pragma to suppress
66708         the suggestion/warning.
66710 2012-01-31  Karl Berry  <karl@gnu.org>
66712         setstate doc: typo.
66713         * doc/posix-functions/setstate.texi (setstate): { not (.
66715 2012-01-31  Bruno Haible  <bruno@clisp.org>
66717         popen: Make more robust on Windows.
66718         * lib/popen.c: On native Windows, use the _popen based code even if
66719         HAVE_POPEN is set.
66720         * doc/posix-functions/popen.texi: Mention necessity of COMSPEC
66721         environment variable on native Windows.
66723 2012-01-30  Bruno Haible  <bruno@clisp.org>
66725         pclose: Fix typo.
66726         * lib/stdio.in.h (pclose): Fix typo in warning message.
66728 2012-01-30  Bruno Haible  <bruno@clisp.org>
66730         doc about getlogin_r, setstate.
66731         * doc/posix-functions/getlogin_r.texi: List the incompatible
66732         declaration problem under "not fixed by gnulib".
66733         * doc/posix-functions/setstate.texi: Mention incompatible declaration
66734         problem on Solaris 11 and other platforms.
66736 2012-01-30  Chuanchang Jia  <chuanchang.jia@gmail.com>  (tiny change)
66737             Bruno Haible  <bruno@clisp.org>
66739         poll tests: Make test more robust.
66740         * tests/test-poll.c: Include macros.h.
66741         (test_accept_first, test_pair, test_socket_pair, test_pipe): Verify
66742         return value of various I/O operations.
66743         * modules/poll-tests (Files): Add tests/macros.h.
66745 2012-01-30  Bruno Haible  <bruno@clisp.org>
66747         sys_stat: Fix support for mingw64 and MSVC.
66748         * lib/sys_stat.in.h (stat) [AIX]: Don't redefine 'stat' if the system
66749         header files already do it.
66750         (stat) [mingw, msvc]: Redefine the symbol to which stat is defined, not
66751         stat itself.
66752         Reported by Marc-André Lureau <marcandre.lureau@redhat.com>.
66754 2012-01-30  Bruno Haible  <bruno@clisp.org>
66756         wcwidth: Work around bug in UTF-8 locale on OpenBSD 5.0.
66757         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Test also wcwidth of U+05B0.
66758         * doc/posix-functions/wcwidth.texi: Mention the OpenBSD 5.0 bug.
66760 2012-01-29  Bruno Haible  <bruno@clisp.org>
66762         quotearg: Fix test failure on MacOS X 10.5.
66763         * tests/test-quotearg-simple.c: Include localcharset.h.
66764         (main): If the locale encoding is not ASCII, bypass the tests of
66765         locale_quoting_style and clocale_quoting_style.
66766         * modules/quotearg-tests (Depends-on): Add 'localcharset'.
66768 2012-01-29  Jim Meyering  <meyering@redhat.com>
66770         maint.mk: sc_prohibit_canonicalize_without_use: avoid false positive
66771         * top/maint.mk (sc_prohibit_canonicalize_without_use): Also
66772         detect uses of canonicalize_file_name.
66774 2012-01-28  Bruno Haible  <bruno@clisp.org>
66776         test-framework-sh: Fix test failure with AIX 7.1 diff.
66777         * tests/init.sh (compare_): Don't use 'diff -u' if it inserts a space
66778         in column 1, like 'diff -c' does.
66779         * tests/test-init.sh (test_compare): Don't repeat the test from init.sh
66780         whether 'diff -u' is used. Instead, test whether the output contains
66781         some '@' character.
66783 2012-01-28  Paul Eggert  <eggert@cs.ucla.edu>
66785         strtoimax: eliminate need for stdint.h, inttypes.h checks
66786         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Don't use
66787         gl_AC_HEADER_STDINT_H or gl_AC_HEADER_INTTYPES_H.  This reduces
66788         the prerequisites for a recently-introduced strtoimax test.
66789         I guess this might cause strtoimax to be replaced when not
66790         strictly necessary on older hosts, but this shouldn't introduce
66791         any bugs and it should make Emacs 'configure' faster on typical
66792         modern hosts.  Problem discovered when importing the latest gnulib
66793         to an Emacs test version.
66794         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4.
66796 2012-01-28  Bruno Haible  <bruno@clisp.org>
66798         sys_time: Override 'struct timeval' on some native Windows platforms.
66799         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Test whether tv_sec
66800         has the right type. Set REPLACE_STRUCT_TIMEVAL if not.
66801         (gl_HEADER_SYS_TIME_H_DEFAULTS): Initialize REPLACE_STRUCT_TIMEVAL.
66802         * lib/sys_time.in.h: Include <winsock2.h> also when 'struct timeval'
66803         needs to be overridden.
66804         (timeval): Override if REPLACE_STRUCT_TIMEVAL is set.
66805         * modules/sys_time (Makefile.am): Substitute REPLACE_STRUCT_TIMEVAL.
66806         * tests/test-sys_select.c: Check that the tv_sec member has the same
66807         size as a 'time_t'.
66808         * tests/test-sys_time.c: Likewise.
66809         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): If REPLACE_STRUCT_TIMEVAL
66810         is set, set also REPLACE_GETTIMEOFDAY.
66811         * lib/gettimeofday.c (gettimeofday): If 'struct timeval' is overridden,
66812         convert the resulting 'struct timeval' before returning.
66813         * lib/select.c: Include <sys/time.h>.
66814         (select, timeval): Undefine at the right place.
66815         * modules/select (Depends-on): Add sys_time.
66816         * doc/posix-headers/sys_time.texi: Mention the problem with tv_sec on
66817         some Windows platforms.
66818         Reported by Marc-André Lureau <marcandre.lureau@redhat.com>.
66820 2012-01-28  Marc-André Lureau  <marcandre.lureau@redhat.com>  (tiny change)
66822         accept4, fcntl, socket modules: Avoid warnings on x86_64 mingw64.
66823         * lib/accept4.c (accept4): Use intptr_t to convert handle pointer to
66824         an integer.
66825         * lib/fcntl.c (dupfd): Likewise.
66826         * lib/w32sock.h (SOCKET_TO_FD): Likewise.
66828 2012-01-28  Bruno Haible  <bruno@clisp.org>
66830         fcntl: Avoid compilation error on native Windows.
66831         * modules/fcntl (Depends-on): Add 'close'.
66833 2012-01-28  Marc-André Lureau  <marcandre.lureau@redhat.com>  (tiny change)
66835         select, poll, isatty: Avoid warnings on x86_64 mingw64.
66836         * lib/select.c (IsConsoleHandle): Use intptr_t to convert handle
66837         pointer to an integer.
66838         * lib/poll.c (IsConsoleHandle): Likewise.
66839         * lib/isatty.c (IsConsoleHandle): Likewise.
66841 2012-01-28  Jim Meyering  <meyering@redhat.com>
66843         doc: clarify README-release
66844         * top/README-release: Clarify: you should make a point to have
66845         the latest stable versions of build tools in your PATH, and the
66846         reference to buildreq is solely for its list of tool names, not
66847         for its minimal-functional version numbers.
66848         Prompted by discussion with Reuben Thomas and Gary V. Vaughan.
66850         maint.mk: use more readable (yet functionally equivalent) quoting
66851         It is common to quote a single quote in a single quoted string like
66852         this:  '...'\''...'.  Unless you know the idiom, that looks like
66853         gibberish, so prefer to double-quote the string when possible.
66854         Then you can use a more readable, lone single quote: "...'..."
66855         * top/maint.mk (sc_cast_of_argument_to_free): Quoting like this
66856         "don't" is more readable than the equivalent 'don'\''t'.
66857         (sc_cast_of_x_alloc_return_value): Likewise.
66858         (sc_cast_of_alloca_return_value): Likewise.
66859         (sc_makefile_path_separator_check): Similar: use ":" in '...',
66860         rather than '\'':'\''.
66862 2012-01-27  Paul Eggert  <eggert@cs.ucla.edu>
66864         stdalign: relax _Alignof and tighten _Alignas test
66865         * m4/stdalign.m4 (gl_STDALIGN_H): Relax the _Alignof test,
66866         as it was too strict: alignof must divide offsetof, but it need
66867         not equal offsetof.  Inspired by Joseph S. Myers's comment
66868         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023#c10>.
66869         Conversely, tighten the _Alignas test a bit, as the resulting
66870         alignment must be exactly 8.
66872 2012-01-27  Bruno Haible  <bruno@clisp.org>
66874         stdalign: Document the last change.
66875         * doc/posix-headers/stdalign.texi: Mention GCC bug 52023.
66877 2012-01-27  Paul Eggert  <eggert@cs.ucla.edu>
66879         stdalign: check that alignof and offsetof are consistent
66880         * m4/stdalign.m4 (gl_STDALIGN_H): Check for GCC bug 52023.
66881         Problem reported for gnulib by Richard W.M. Jones in
66882         <http://lists.gnu.org/r/bug-gnulib/2012-01/msg00340.html>.
66884 2012-01-27  Jim Meyering  <meyering@redhat.com>
66886         update-copyright: accept new option: UPDATE_COPYRIGHT_USE_INTERVALS=2
66887         * build-aux/update-copyright: When UPDATE_COPYRIGHT_USE_INTERVALS=2,
66888         convert a sequence with gaps to the minimal containing range.
66889         For example, convert 2000, 2004-2007, 2009 to 2000-2009.
66890         * tests/test-update-copyright.sh: Test for this.
66891         The FSF confirmed it is ok to do this, assuming there is at
66892         least one significant change per year in the affected range:
66893         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/29554/focus=29860
66895 2012-01-26  Bruno Haible  <bruno@clisp.org>
66897         pipe2: refine doc about thread-safety
66898         * doc/glibc-functions/pipe2.texi: Clarify the extent of the
66899         multithread-safety problem.
66900         * doc/glibc-functions/accept4.texi: Likewise.
66902 2012-01-26  Bruno Haible  <bruno@clisp.org>
66904         posix_spawn_file_actions_addopen: Fix 2012-01-08 commit.
66905         * m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN):
66906         In the test program, include <fcntl.h>, for O_RDONLY.
66908 2012-01-26  Eric Blake  <eblake@redhat.com>
66910         pipe2: document lack of thread-safety in replacement
66911         * doc/glibc-functions/pipe2.texi (pipe2): Mention thread safety
66912         issue in replacement.
66913         * doc/glibc-functions/accept4.texi (accept4): Likewise.
66914         Based on a report by Eric Wong.
66916 2012-01-24  Marc-André Lureau  <marcandre.lureau@redhat.com>  (tiny change)
66917             Bruno Haible  <bruno@clisp.org>
66919         malloca: Avoid warnings on x86_64 mingw64.
66920         * lib/malloca.c: Include <stdint.h>.
66921         (mmalloca, freea): Use uintptr_t to convert pointers to integers.
66922         * modules/malloca (Depends-on): Add stdint.
66923         * modules/relocatable-prog-wrapper (Depends-on): Likewise.
66925 2012-01-25  Paul Eggert  <eggert@cs.ucla.edu>
66927         obstack: remove __STDC__ conditionals
66928         * lib/obstack.h: Remove __STDC__ conditionals, as suggested by Joseph
66929         S. Myers in <http://cygwin.com/ml/libc-alpha/2012-01/msg00104.html>.
66930         This leaves lib/localcharset.c, m4/iconv.m4, and a confusing comment in
66931         m4/include_next.m4 as the only gnulib-maintained places that still
66932         refer to __STDC__.
66934 2012-01-24  Bruno Haible  <bruno@clisp.org>
66936         havelib: Modern quoting.
66937         * build-aux/config.rpath: Quote 'like this', not `like this', as per
66938         the recent change to the GNU coding standards.
66940 2012-01-24  Bruno Haible  <bruno@clisp.org>
66942         stdint: Improve support for Android.
66943         * lib/stdint.in.h: Test __ANDROID__, not __BIONIC__.
66944         Reported by Simon Josefsson <simon@josefsson.org>.
66946 2012-01-23  Paul Eggert  <eggert@cs.ucla.edu>
66948         doc: omit trailing empty lines from INSTALL etc.
66949         * doc/Makefile (INSTALL): Omit trailing empty lines.
66950         (INSTALL.ISO, INSTALL.UTF-8): Build from INSTALL, so that these also
66951         omit trailing empty lines.  This simplifies the build procedure.
66953 2012-01-23  Jim Meyering  <meyering@redhat.com>
66955         tests: avoid spurious warnings about gl_sockets_startup
66956         Fedora rawhide's gcc version 4.7.0 20120119 with -Wunused-value
66957         would warn about every use of "gl_sockets_startup (SOCKETS_1_1);"
66958         reporting a "statement with no effect".
66959         * tests/test-accept.c (main): Mark as "(void)".
66960         * tests/test-accept4.c (main): Likewise.
66961         * tests/test-bind.c (main): Likewise.
66962         * tests/test-connect.c (main): Likewise.
66963         * tests/test-getpeername.c (main): Likewise.
66964         * tests/test-getsockname.c (main): Likewise.
66965         * tests/test-getsockopt.c (main): Likewise.
66966         * tests/test-listen.c (main): Likewise.
66967         * tests/test-recv.c (main): Likewise.
66968         * tests/test-recvfrom.c (main): Likewise.
66969         * tests/test-send.c (main): Likewise.
66970         * tests/test-sendto.c (main): Likewise.
66971         * tests/test-setsockopt.c (main): Likewise.
66972         * tests/test-shutdown.c (main): Likewise.
66974 2012-01-21  Bruno Haible  <bruno@clisp.org>
66976         locale-fr.m4: Fix for Android.
66977         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Avoid compilation
66978         failure of the test program on Bionic libc.
66980 2012-01-21  Jim Meyering  <meyering@redhat.com>
66982         bootstrap: fail when bootstrap_post_import_hook fails
66983         Otherwise, it's far too easy to miss diagnostics emitted
66984         between gnulib-tool's output and that of running configure.
66985         * build-aux/bootstrap: Fail when bootstrap_post_import_hook fails.
66987 2012-01-17  Jim Meyering  <meyering@redhat.com>
66989         maint: enable sc_trailing_blank
66990         * build-aux/pmccabe.css: Remove trailing blanks.
66991         * doc/acl-cygwin.txt: Likewise.
66992         * doc/gnu-oids.texi: Likewise
66993         * cfg.mk: Enable sc_trailing_blank.
66994         Exempt build-aux/texinfo.tex and doc/Copyright/assign.future.manual.
66996 2012-01-17  Jim Meyering  <meyering@redhat.com>
66998         maint: enable sc_prohibit_openat_without_use
66999         * cfg.mk: Enable sc_prohibit_openat_without_use.
67000         Exempt lib/selinux-at.c.
67002 2012-01-17  Jim Meyering  <meyering@redhat.com>
67004         maint: enable sc_prohibit_cloexec_without_use
67005         * cfg.mk: Enable sc_prohibit_cloexec_without_use.
67006         * lib/dup-safer-flag.c: Don't include "cloexec.h".  Not needed.
67008 2012-01-17  Jim Meyering  <meyering@redhat.com>
67010         maint: enable sc_prohibit_intprops_without_use
67011         * cfg.mk: Enable sc_prohibit_intprops_without_use
67012         * tests/test-nanosleep.c: Don't include "intprops.h".  Not needed.
67014 2012-01-17  Jim Meyering  <meyering@redhat.com>
67016         maint: enable sc_prohibit_hash_pjw_without_use
67017         * cfg.mk: Enable sc_prohibit_hash_pjw_without_use.
67018         * top/maint.mk (sc_prohibit_hash_pjw_without_use): Adjust regexp
67019         to match any use of \<hash_pjw\>, i.e., not necessarily with a
67020         following " (".
67022 2012-01-17  Jim Meyering  <meyering@redhat.com>
67024         maint: enable double-word-prohibiting rule
67025         * cfg.mk (local-checks-to-skip): Enable sc_prohibit_doubled_word.
67026         Exempt three files.
67028 2012-01-17  Jim Meyering  <meyering@redhat.com>
67030         maint: remove empty lines at EOF, but excluding modules/*
67031         Apply syntax rules at home as well as abroad.  Most changes
67032         were induced by running this:
67033           make srcdir=. _build-aux=build-aux -f top/maint.mk \
67034             sc_prohibit_empty_lines_at_EOF | grep -v modules/ \
67035             | xargs perl -pi -0777 -e 's/\n\n+$/\n/'
67036         * cfg.mk (local-checks-to-skip): Enable sc_prohibit_empty_lines_at_EOF.
67037         Exempt modules/* and two binary files.
67038         Also exempt doc/INSTALL*, per request from Bruno Haible.
67039         * doc/regexprops-generic.texi: *Add* a newline at EOF.  There was none.
67040         * doc/Copyright/assign.translation.manual: Remove empty lines at EOF.
67041         * doc/Copyright/request-assign.future: Likewise.
67042         * doc/Copyright/request-disclaim.changes: Likewise.
67043         * doc/INSTALL: Likewise.
67044         * doc/INSTALL.ISO: Likewise.
67045         * doc/INSTALL.UTF-8: Likewise.
67046         * doc/acl-cygwin.txt: Likewise.
67047         * doc/acl-resources.txt: Likewise.
67048         * doc/fdl-1.2.texi: Likewise.
67049         * doc/fdl-1.3.texi: Likewise.
67050         * doc/fdl.texi: Likewise.
67051         * lib/argp-pin.c: Likewise.
67052         * lib/round.c: Likewise.
67053         * lib/unicase/u16-totitle.c: Likewise.
67054         * lib/unictype/block_test.c: Likewise.
67055         * lib/uninorm/canonical-decomposition.c: Likewise.
67056         * m4/README: Likewise.
67057         * m4/relocatable-lib.m4: Likewise.
67058         * tests/test-isnand-nolibm.c: Likewise.
67059         * tests/test-isnand.c: Likewise.
67060         * tests/uninorm/NormalizationTest.txt: Likewise.
67062 2012-01-17  Jim Meyering  <meyering@redhat.com>
67064         maint: add framework to run syntax-check rules against gnulib sources
67065         * cfg.mk: New file, to disable all currently-failing tests.
67066         We'll enable them one by one, as they are made to pass.
67067         * Makefile (sc_maint): New rule.
67069 2012-01-21  Bruno Haible  <bruno@clisp.org>
67071         stdint: Add support for Android.
67072         * lib/stdint.in.h: When included from Bionic <sys/types.h>, just
67073         include the system's <stdint.h>.
67074         Reported by Simon Josefsson <simon@josefsson.org>.
67076 2012-01-19  Jim Meyering  <meyering@redhat.com>
67078         bootstrap: add bootstrap_post_import_hook
67079         Bison does still need something like the gnulib_mk_hook whose
67080         invocation I had to remove along with slurp in commit 767ccd40.
67081         Technically, we could get along without it, but doing so would
67082         have required living with a warning and a mandatory post-bootstrap
67083         automake rerun.
67084         * build-aux/bootstrap (gnulib_mk_hook): Remove definition, too.
67085         (bootstrap_post_import_hook): New function.
67086         Invoke it after gnulib-tool --import and before autoreconf.
67088 2012-01-18  Jim Meyering  <meyering@redhat.com>
67090         gitlog-to-changelog: don't use "no_"-prefixed variable name
67091         * build-aux/gitlog-to-changelog (main): Use getopt's "!" attribute
67092         to enable both --cluster and --no-cluster.  Change variable name,
67093         s/\$no_cluster/$cluster/, and reverse usage to match.
67095         gitlog-to-changelog: use "||", not "or" in expressions
67096         * build-aux/gitlog-to-changelog (main): Use "||", not "or" in
67097         expressions.
67099 2012-01-17  Joel E. Denny  <joeldenny@joeldenny.org>
67101         gitlog-to-changelog: new option --no-cluster
67102         * build-aux/gitlog-to-changelog: New option --no-cluster, disables
67103         clustering of adjacent commit messages.
67105 2012-01-17  Jim Meyering  <meyering@redhat.com>
67107         maint: spell file systems with two words, not one
67108         * m4/ls-mntd-fs.m4 (MOUNTED_INTERIX_STATVFS): Spell file systems with
67109         two words, not one.
67111 2012-01-16  Jim Meyering  <meyering@redhat.com>
67113         bootstrap: add a FIXME comment to ensure we eventually remove the hack
67114         * build-aux/bootstrap (gnulib_tool_options): Add comment.
67116 2012-01-16  Eric Blake  <eblake@redhat.com>
67118         bootstrap: cater to autoconf 2.59
67119         * build-aux/bootstrap (AUTORECONF): Work even when --no-recursive
67120         is not available.
67122         bootstrap: properly check for libtool
67123         * build-aux/bootstrap (libtoolize): Also run libtool when older
67124         usage is detected.
67126 2012-01-15  Bruno Haible  <bruno@clisp.org>
67128         Improve support for MSVC 9.
67129         * lib/unistd.in.h: Include <io.h> when needed to avoid redefinition
67130         clashes on MSVC.
67131         * lib/fcntl.in.h: Likewise.
67132         * lib/stdlib.in.h: Likewise.
67133         * lib/sys_stat.in.h: Likewise.
67135 2011-01-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
67137         gnupload: we hold the master copy of this script now
67138         For motivation and more information, see:
67139         <http://lists.gnu.org/r/bug-gnulib/2012-01/msg00222.html>
67140         * build-aux/gnupload: Make it clear in the heading comments that the
67141         master copy of this file is maintained by gnulib.  Since we are at
67142         it, bump its copyright year and ...
67143         ($scriptversion): ... the date in its version.
67144         ($usage): Patches and bug reports should be sent to the gnulib list,
67145         not the automake one.
67146         * config/srclist.txt: Don't try to sync 'gnupload' from automake
67147         anymore.
67149 2012-01-15  Bruno Haible  <bruno@clisp.org>
67151         Fix module 'random'.
67152         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether random, srandom,
67153         initstate, setstate are declared.
67155 2012-01-14  Bruno Haible  <bruno@clisp.org>
67157         Tests for module 'random'.
67158         * modules/random-tests: New file.
67159         * tests/test-random.c: New file, based on tests/test-random_r.c.
67161         New module 'random'.
67162         * lib/stdlib.in.h (random, srandom, initstate, setstate): New
67163         declarations.
67164         * lib/random.c: New file, based on glibc/stdlib/random.c.
67165         * m4/random.m4: New file.
67166         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_RANDOM,
67167         HAVE_RANDOM.
67168         * modules/stdlib (Makefile.am): Substitute GNULIB_RANDOM, HAVE_RANDOM.
67169         * modules/random: New file.
67170         * config/srclist.txt: Add an entry for random.c.
67171         * doc/posix-functions/random.texi: Mention the 'random' module.
67172         * doc/posix-functions/initstate.texi: Likewise.
67173         * doc/posix-functions/setstate.texi: Likewise.
67174         * doc/posix-functions/srandom.texi: Likewise.
67176 2012-01-12  Bruno Haible  <bruno@clisp.org>
67178         random_r: Use common idioms.
67179         * lib/random_r.c: Include <stdlib.h> first.
67181         random_r: Override incompatible API on AIX, OSF/1.
67182         * lib/stdlib.in.h (random_r, srandom_r, initstate_r, setstate_r):
67183         Override the system function if REPLACE_RANDOM_R is 1.
67184         * m4/random_r.m4 (gl_FUNC_RANDOM_R): Require AC_CANONICAL_HOST. On AIX
67185         and OSF/1, set REPLACE_RANDOM_R.
67186         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_RANDOM_R.
67187         * modules/stdlib (Makefile.am): Substitute REPLACE_RANDOM_R.
67188         * modules/random_r (configure.ac): Test REPLACE_RANDOM_R.
67189         * doc/glibc-functions/initstate_r.texi: Mention the AIX, OSF/1 problem.
67190         * doc/glibc-functions/random_r.texi: Likewise.
67191         * doc/glibc-functions/setstate_r.texi: Likewise.
67193         random_r: Support for MSVC 9.
67194         * lib/random_r.c: Include stdint.h, not inttypes.h.
67196 2012-01-12  Eric Blake  <eblake@redhat.com>
67198         inet_ntop: guard extra work by IF_LINT
67199         * lib/inet_ntop.c (inet_ntop6): Mark spurious initialization, for
67200         better code generation when not checking for warnings.
67201         Suggested by Paul Eggert and Jim Meyering.
67203         strptime: fix regression on mingw
67204         * lib/strptime.c (__strptime_internal) [!_LIBC && !HAVE_TM_GMTOFF]:
67205         Fix regression.  Reported by Bruno Haible.
67207 2012-01-11  Reuben Thomas  <rrt@sc3d.org>
67208             Bruno Haible  <bruno@clisp.org>
67210         copy-file: add error-code-returning variant.
67211         * lib/copy-file.h (GL_COPY_ERR_*): New enumeration items.
67212         (qcopy_file_preserving): New declaration.
67213         * lib/copy-file.c (qcopy_file_preserving): Renamed from
67214         copy_file_preserving. Change return type to 'int'. Don't emit an error
67215         message here.
67216         (copy_file_preserving): New function.
67217         * tests/test-copy-file.c: Include <stdlib.h>.
67218         (main): Test qcopy_file_preserving if the environment variable
67219         NO_STDERR_OUTPUT is set.
67220         * tests/test-copy-file-1.sh: Invoke test-copy-file.sh a second time,
67221         with NO_STDERR_OUTPUT
67222         * tests/test-copy-file-2.sh: Likewise.
67224 2012-01-10  Bruno Haible  <bruno@clisp.org>
67226         copy-file: Use 'quote' module consistently.
67227         * lib/copy-file.c (copy_file_preserving): Use quote().
67229         copy-file: Refactor.
67230         * lib/copy-file.c: Include quote.h.
67231         (copy_file_preserving): Call qcopy_acl instead of copy_acl. Emit error
67232         message here.
67233         * modules/copy-file (Depends-on): Add quote.
67235         acl: Export qcopy_acl.
67236         * lib/acl.h (qcopy_acl): New declaration.
67237         * lib/copy-acl.c (qcopy_acl): Make non-static.
67239         acl: Rename a local variable.
67240         * lib/set-mode-acl.c (set_acl): Use same variable name as in copy_acl.
67242         acl: Align return values of copy_acl and qcopy_acl.
67243         * lib/copy-acl.c (copy_acl): Return the same value as qcopy_acl,
67244         maybe < -1.
67246 2012-01-11  Eric Blake  <eblake@redhat.com>
67248         strptime: silence gcc warnings
67249         * lib/strptime.c (__strptime_internal) [!_NL_CURRENT],
67250         [!_LIBC && !HAVE_TM_GMTOFF]: Avoid unused variables.
67251         Reported by Daniel P. Berrange.
67253         inet_ntop: silence gcc warning
67254         * lib/inet_ntop.c (inet_ntop6): Initialize best.base.
67255         Reported by Daniel P. Berrange.
67257 2012-01-11  Dmitry V. Levin  <ldv@altlinux.org>
67259         getloadavg test: skip the test on GNU/Linux without /proc mounted
67260         GNU libc implements getloadavg(3) on Linux by parsing /proc/loadavg
67261         file.  When /proc is not mounted, it always fails with ENOENT.
67262         * tests/test-getloadavg.c (main): Treat ENOENT return code from
67263         getloadavg(3) the same way as ENOSYS and ENOTSUP.
67265 2012-01-10  Bruno Haible  <bruno@clisp.org>
67267         regex: Avoid link error on MSVC 9.
67268         * modules/regex (Depends-on): Add wctype.
67270 2012-01-10  Bruno Haible  <bruno@clisp.org>
67272         doc: Mention --with-tests option.
67273         * gnulib-tool (func_usage): Suggest --with-tests for --test etc.
67274         * doc/gnulib.texi (Extra tests modules): Mention the need to pass
67275         --with-tests.
67276         Reported by Reuben Thomas.
67278 2012-01-10  Reuben Thomas  <rrt@sc3d.org>
67280         users.txt: order package names lexicographically.
67281         * users.txt: Order package names lexicographically.
67283 2012-01-10  Jim Meyering  <meyering@redhat.com>
67285         maint.mk: fix description in comment
67286         * top/maint.mk (require_exactly_one_NL_at_EOF_): Fix comment.
67288         ignore-value: remove deprecated ignore_ptr function
67289         * lib/ignore-value.h (ignore_ptr): Remove deprecated function.
67290         * NEWS: Note this.
67292 2012-01-09  Jim Meyering  <meyering@redhat.com>
67294         test-init.sh: avoid a subshell
67295         * tests/test-init.sh: Remove protective subshell.
67296         Suggested by Bernhard Voelker.  While a subshell is normally
67297         required to protect against older shells (Solaris, FreeBSD) that
67298         warn about a missing program before performing redirection, the
67299         shell-selection tests performed by init.sh probably exclude any
67300         offending shell.
67302 2012-01-08  Bruno Haible  <bruno@clisp.org>
67304         setlocale tests: Avoid test failure on Solaris 11.0.
67305         * tests/test-setlocale2.sh: Use 'env' to set the LC_ALL environment
67306         variable.
67308 2012-01-08  Bruno Haible  <bruno@clisp.org>
67310         posix_spawn_file_actions_addopen: Work around Solaris 11.0 bug.
67311         * m4/spawn_h.m4 (gl_SPAWN_H_DEFAULTS): Initialize
67312         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN.
67313         * m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN): New
67314         macro.
67315         * lib/spawn.in.h (posix_spawn_file_actions_addopen): Test
67316         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN, not REPLACE_POSIX_SPAWN.
67317         * lib/spawn_faction_addopen.c: Add workaround implementation if
67318         HAVE_WORKING_POSIX_SPAWN.
67319         * modules/spawn (Makefile): Substitute
67320         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN.
67321         * modules/posix_spawn_file_actions_addopen (configure.ac): Invoke
67322         gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN. Test
67323         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN, not REPLACE_POSIX_SPAWN.
67324         (Depends-on): Update conditions.
67325         * doc/posix-functions/posix_spawn_file_actions_addopen.texi: Mention
67326         the Solaris 11 bug.
67328 2012-01-08  Bruno Haible  <bruno@clisp.org>
67330         posix_spawn_file_actions_adddup2: Work around Solaris 11.0 bug.
67331         * m4/spawn_h.m4 (gl_SPAWN_H_DEFAULTS): Initialize
67332         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2.
67333         * m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2): New
67334         macro.
67335         * lib/spawn.in.h (posix_spawn_file_actions_adddup2): Test
67336         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2, not REPLACE_POSIX_SPAWN.
67337         * lib/spawn_faction_adddup2.c: Add workaround implementation if
67338         HAVE_WORKING_POSIX_SPAWN.
67339         * modules/spawn (Makefile): Substitute
67340         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2.
67341         * modules/posix_spawn_file_actions_adddup2 (configure.ac): Invoke
67342         gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2. Test
67343         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2, not REPLACE_POSIX_SPAWN.
67344         (Depends-on): Update conditions.
67345         * doc/posix-functions/posix_spawn_file_actions_adddup2.texi: Mention
67346         the Solaris 11 bug.
67348 2012-01-08  Bruno Haible  <bruno@clisp.org>
67350         posix_spawn_file_actions_addclose: Work around Solaris 11.0 bug.
67351         * m4/spawn_h.m4 (gl_SPAWN_H_DEFAULTS): Initialize
67352         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE.
67353         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Define
67354         HAVE_WORKING_POSIX_SPAWN.
67355         (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE): New macro.
67356         * lib/spawn.in.h (posix_spawn_file_actions_addclose): Test
67357         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE, not REPLACE_POSIX_SPAWN.
67358         * lib/spawn_faction_addclose.c: Add workaround implementation if
67359         HAVE_WORKING_POSIX_SPAWN.
67360         * modules/spawn (Makefile): Substitute
67361         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE.
67362         * modules/posix_spawn_file_actions_addclose (configure.ac): Invoke
67363         gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE. Test
67364         REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE, not REPLACE_POSIX_SPAWN.
67365         (Depends-on): Update conditions.
67366         * doc/posix-functions/posix_spawn_file_actions_addclose.texi: Mention
67367         the Solaris 11 bug.
67369 2012-01-08  Bruno Haible  <bruno@clisp.org>
67371         doc: Update for Solaris 11.0.
67372         * doc/*/*.texi: Mention Solaris 11.0 where appropriate.
67373         * m4/printf.m4: Update comments.
67375 2012-01-08  Bruno Haible  <bruno@clisp.org>
67377         mktime: Avoid compilation error on Solaris 11.
67378         * lib/mktime.c (WRAPV): Define to 0 on all non-glibc systems.
67380 2012-01-08  Bruno Haible  <bruno@clisp.org>
67382         doc: Small fix.
67383         * doc/posix-headers/nl_types.texi: Correct platforms list.
67385 2012-01-08  Simon Josefsson  <simon@josefsson.org>
67387         Add lgpl-3.0 module.
67388         * MODULES.html.sh (Support for building documentation): Add
67389         lgpl-3.0.
67390         * modules/lgpl-3.0: New file.
67392 2012-01-08  Jim Meyering  <meyering@redhat.com>
67394         select.c: indent with spaces, not TABs
67395         * lib/select.c (windows_poll_handle): Indent with spaces, not TABs.
67397 2012-01-07  Paolo Bonzini  <bonzini@gnu.org>
67399         quotearg: do not use grave accent for left quote
67400         * lib/quotearg.c (gettext_quote): Map "`" to "'" for
67401         locale_quoting_style.
67402         (quotearg_buffer_restyled): Fix example.
67403         * tests/test-quotearg-simple.c (results_g): Adjust test vectors.
67405 2012-01-07  Paolo Bonzini  <bonzini@gnu.org>
67407         quotearg: fall back to Unicode single quotes in UTF-8, GB-18030 locales
67408         Most programs do not have translation catalogs for English and much
67409         less separate catalogs for British and American English.  Drop the
67410         suggestion to translators about these two, and provide it
67411         automatically for Unicode locales.  Like most programs, even those
67412         using American English, we use single quotation marks.  This conflicts
67413         with the American typographic convention, but works better when you
67414         cite the entire error message within double quotes.  It also tries not
67415         to clash with established practice and with what non-gnulib programs
67416         will usually do.
67417         * lib/quotearg.c (gettext_quote): Hard-code U+2018 and U+2019 when
67418         using an UTF-8 or GB-18030 locale.  The list of other locales with
67419         quotes was provided by Bruno Haible.
67420         (quotearg_buffer_restyled): Adjust instructions to translators.
67421         * lib/quotearg.h (locale_quoting_style): Do not put an example in the
67422         text, since this would be wrong when using Unicode.
67423         * modules/quotearg: Depend on c-strcaseeq.
67425 2012-01-07  Paolo Bonzini  <bonzini@gnu.org>
67427         quotearg: fix Wikipedia link
67428         * lib/quotearg.c (quotearg_buffer_restyled): Fix link to Wikipedia.
67430 2012-01-07  Simon Josefsson  <simon@josefsson.org>
67432         Fix for mingw with MSVC9.
67433         * m4/ld-version-script.m4: Check that compiler rejects version
67434         scripts with syntax errors.  Reported by Bruno Haible
67435         <bruno@clisp.org>.
67437 2012-01-06  Bruno Haible  <bruno@clisp.org>
67439         Talk about "native Windows API", not "Woe32".
67440         * lib/accept4.c: Update comments to mention native Windows.
67441         * lib/execute.c: Likewise.
67442         * lib/fatal-signal.c: Likewise.
67443         * lib/localcharset.c: Likewise.
67444         * lib/nanosleep.c: Likewise.
67445         * lib/nl_langinfo.c: Likewise.
67446         * lib/pclose.c: Likewise.
67447         * lib/pipe-filter-gi.c: Likewise.
67448         * lib/pipe-filter-ii.c: Likewise.
67449         * lib/pipe.c: Likewise.
67450         * lib/pipe2.c: Likewise.
67451         * lib/popen.c: Likewise.
67452         * lib/progreloc.c: Likewise.
67453         * lib/relocatable.c: Likewise.
67454         * lib/sigaction.c: Likewise.
67455         * lib/sigprocmask.c: Likewise.
67456         * lib/spawn-pipe.h: Likewise.
67457         * lib/spawn-pipe.c: Likewise.
67458         * lib/spawni.c: Likewise.
67459         * lib/stat-time.h: Likewise.
67460         * lib/w32spawn.h: Likewise.
67461         * tests/test-isatty.c: Likewise.
67462         * lib/config.charset: More comments.
67463         * doc/gnulib-intro.texi: Mention native Windows.
67464         * doc/posix-functions/_Exit_C99.texi: Likewise.
67465         * doc/posix-headers/fcntl.texi: Likewise.
67467 2012-01-06  Guillem Jover  <guillem@hadrons.org>  (tiny change)
67469         argp: Avoid crash if translator uses % characters in a translation.
67470         * lib/argp-parse.c (argp_version_parser): Use a "%s" format string.
67471         Reported by Mats Erik Andersson <gnu@gisladisker.se>.
67473 2012-01-06  Paul Eggert  <eggert@cs.ucla.edu>
67475         doc: C11 and C++11 are now official
67476         * doc/posix-headers/assert.texi, doc/posix-headers/stdalign.texi:
67477         * doc/verify.texi, stdalign.in.h, verify.h, m4/gnulib-common.m4:
67478         * m4/stdalign.m4, modules/assert-h, modules/snippet/_Noreturn:
67479         * modules/stdalign:
67480         Replace references to draft C1X to C11, and to draft C++0X to C++11.
67482 2012-01-06  Bruno Haible  <bruno@clisp.org>
67484         uc-is-grapheme-break tests: Tweak.
67485         * tests/unigbrk/test-uc-is-grapheme-break.c (main): Fix an error
67486         message.
67488 2012-01-06  Bruno Haible  <bruno@clisp.org>
67490         test-init.sh: correct the test for diff -u
67491         * tests/test-init.sh: Also redirect stdout to /dev/null.
67493 2012-01-05  Paul Eggert  <eggert@cs.ucla.edu>
67495         Use ', not `, for quoting output.
67496         * build-aux/announce-gen (usage, sizes, print_news_deltas)
67497         (print_changelog_deltas, get_tool_versions, main program):
67498         * build-aux/git-version-gen:
67499         * build-aux/gitlog-to-changelog (usage, parse_amend_file):
67500         * build-aux/move-if-change (help):
67501         * build-aux/useless-if-before-free (usage, main program):
67502         * check-module (parse_module_file, usage)
67503         (find_included_lib_files, check_module):
67504         * lib/argmatch.c (main) [TEST]:
67505         * lib/argp-help.c (_help):
67506         * lib/getopt1.c (main) [TEST]:
67507         * lib/git-merge-changelog.c (usage):
67508         * lib/xstrtol-error.c (xstrtol_error):
67509         * m4/alloca.m4 (_AC_LIBOBJ_ALLOCA):
67510         * m4/argz.m4 (gl_FUNC_ARGZ):
67511         * m4/bison.m4 (gl_BISON):
67512         * m4/calloc.m4 (gl_FUNC_CALLOC_GNU):
67513         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS):
67514         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
67515         * m4/fpending.m4 (gl_PREREQ_FPENDING):
67516         * m4/gc-random.m4 (gl_GC_RANDOM):
67517         * m4/intl.m4 (gt_CHECK_DECL):
67518         * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK):
67519         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT)
67520         (AC_TYPE_UNSIGNED_LONG_LONG_INT):
67521         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS):
67522         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK):
67523         * m4/onceonly.m4 (AC_CHECK_FUNCS_ONCE):
67524         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION):
67525         * tests/test-dirname.c (main):
67526         * tests/test-getpass.c (main):
67527         * tests/test-iconvme.c (main):
67528         * tests/test-parse-datetime.c (LOG):
67529         * tests/test-xstrtoimax.sh:
67530         * tests/test-xstrtol.sh:
67531         * tests/test-xstrtoll.sh:
67532         * tests/test-xstrtoumax.sh:
67533         * tests/unigbrk/test-uc-is-grapheme-break.c (main):
67534         * top/GNUmakefile (abort-due-to-no-makefile):
67535         Quote 'like this', not `like this', as per the recent change to
67536         the GNU coding standards.
67538 2012-01-05  Bruno Haible  <bruno@clisp.org>
67540         strtoimax: Don't force a replacement on systems where intmax_t is int.
67541         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Use a different test if
67542         'intmax_t' is not larger than 'int'.
67543         Reported by Pádraig Brady <P@draigBrady.com>.
67545 2012-01-05  Bruno Haible  <bruno@clisp.org>
67547         doc: Mention NetBSD bugs.
67548         * doc/posix-functions/*printf.texi: Mention a NetBSD 5.1 bug.
67549         * doc/posix-functions/nl_langinfo.texi: Mention another NetBSD 5.1 bug.
67551 2012-01-05  Bruno Haible  <bruno@clisp.org>
67553         strtoumax tests: Enhance tests.
67554         * tests/test-strtoumax.c (main): Add tests for large values.
67556 2012-01-05  Bruno Haible  <bruno@clisp.org>
67558         strtoimax: Work around AIX 5.1 bug.
67559         * lib/inttypes.in.h (strtoimax): Allow overriding the system's
67560         definition.
67561         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Check against the AIX 5.1 bug.
67562         Set HAVE_STRTOIMAX.
67563         * m4/inttypes.m4 (gl_INTTYPES_H_DEFAULTS): Initialize
67564         REPLACE_STRTOIMAX.
67565         * modules/inttypes-incomplete (Makefile.am): Substitute
67566         REPLACE_STRTOIMAX.
67567         * modules/strtoimax (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
67568         (configure.ac): Test HAVE_STRTOIMAX, REPLACE_STRTOIMAX.
67569         (Depends-on): Update conditions.
67570         * tests/test-strtoimax.c (main): Add tests for large values.
67571         * doc/posix-functions/strtoimax.texi: Mention the AIX 5.1 bug.
67573 2012-01-05  Bruno Haible  <bruno@clisp.org>
67575         inttypes: Modernize.
67576         * lib/inttypes.in.h (strtoimax, strtoumax): Use the C++ safe idioms.
67577         * modules/inttypes-incomplete (Depends-on): Add snippet/c++defs.
67578         (Makefile.am): Update inttypes.h rule.
67580 2012-01-05  Jim Meyering  <meyering@redhat.com>
67582         init.sh: don't waste a subshell just to redirect stderr
67583         * tests/init.sh: In testing for diff -u and diff -c, use a
67584         stderr-redirecting exec inside `...` rather than a subshell.
67586         test-init.sh: avoid failure on HP-UX 11.00
67587         * tests/test-init.sh: Skip "diff -u"-comparing step when compare
67588         resolves to diff -c or cmp.  Reported by Bruno Haible.
67590 2012-01-05  Bruno Haible  <bruno@clisp.org>
67592         Tests for module 'strtoull'.
67593         * modules/strtoull-tests: New file.
67594         * tests/test-strtoull.c: New file, based on tests/test-strtoumax.c.
67596 2012-01-05  Bruno Haible  <bruno@clisp.org>
67598         Tests for module 'strtoll'.
67599         * modules/strtoll-tests: New file.
67600         * tests/test-strtoll.c: New file, based on tests/test-strtoimax.c.
67602 2012-01-05  Bruno Haible  <bruno@clisp.org>
67604         Tests for module 'strtoul'.
67605         * modules/strtoul-tests: New file.
67606         * tests/test-strtoul.c: New file, based on tests/test-strtoumax.c.
67608 2012-01-05  Bruno Haible  <bruno@clisp.org>
67610         Tests for module 'strtol'.
67611         * modules/strtol-tests: New file.
67612         * tests/test-strtol.c: New file, based on tests/test-strtoimax.c.
67614 2012-01-04  Jim Meyering  <meyering@redhat.com>
67616         test-init.sh: accommodate Solaris 5.10's different diff -u output
67617         * tests/test-init.sh: Also exempt @@ lines from the comparison
67618         of diff output, since Solaris 5.10 and GNU diff formats differ.
67619         Reported by Stefano Lattarini.
67621 2012-01-04  Paul Eggert  <eggert@cs.ucla.edu>
67623         test-posixtm: don't assume signed integer wraparound
67624         * tests/test-posixtm.c (main): Don't assume wraparound semantics
67625         after signed integer overflow.  Inspired by (though it may not
67626         fix) Bruno Haible's bug report in
67627         <http://lists.gnu.org/r/bug-gnulib/2012-01/msg00066.html>.
67629         Spell out "Windows 9x" and "Windows XP".
67630         * lib/poll.c, lib/select.c: In comments, replace "Win9x" with
67631         "Windows 9x" and "WinXP" with "Windows XP".
67633 2012-01-04  Jim Meyering  <meyering@redhat.com>
67635         test-vc-list-files-cvs.sh: remove obsolete comment
67636         * tests/test-vc-list-files-cvs.sh: Remove obsolete comment about
67637         double exit.  Now that's all encapsulated via skip_ and Exit.
67639 2012-01-04  Bruno Haible  <bruno@clisp.org>
67641         Talk about "native Windows API", not "Win32".
67642         * lib/classpath.c: Update comments to mention native Windows.
67643         * lib/csharpexec.c: Likewise.
67644         * lib/dup2.c: Likewise.
67645         * lib/error.c: Likewise.
67646         * lib/fcntl.c: Likewise.
67647         * lib/filename.h: Likewise.
67648         * lib/findprog.c: Likewise.
67649         * lib/get-rusage-as.c: Likewise.
67650         * lib/get-rusage-data.c: Likewise.
67651         * lib/getpagesize.c: Likewise.
67652         * lib/javaexec.c: Likewise.
67653         * lib/msvc-inval.c: Likewise.
67654         * lib/msvc-nothrow.c: Likewise.
67655         * lib/nanosleep.c: Likewise.
67656         * lib/nonblocking.c: Likewise.
67657         * lib/printf-parse.c: Likewise.
67658         * lib/setlocale.c: Likewise.
67659         * lib/sigaction.c: Likewise.
67660         * lib/strerror_r.c: Likewise.
67661         * lib/tmpdir.c: Likewise.
67662         * lib/vasnprintf.c: Likewise.
67663         * lib/w32spawn.h: Likewise.
67664         * lib/waitpid.c: Likewise.
67665         * lib/stdio.in.h (fdopen, fopen, freopen): Likewise.
67666         * m4/locale-ar.m4: Likewise.
67667         * m4/locale-fr.m4: Likewise.
67668         * m4/locale-ja.m4: Likewise.
67669         * m4/locale-tr.m4: Likewise.
67670         * m4/locale-zh.m4: Likewise.
67671         * m4/printf.m4: Likewise.
67672         * tests/test-cloexec.c: Likewise.
67673         * tests/test-copy-acl.sh: Likewise.
67674         * tests/test-copy-file.sh: Likewise.
67675         * tests/test-file-has-acl.sh: Likewise.
67676         * tests/test-set-mode-acl.sh: Likewise.
67677         * tests/test-dup-safer.c: Likewise.
67678         * tests/test-dup2.c: Likewise.
67679         * tests/test-dup3.c: Likewise.
67680         * tests/test-fcntl.c: Likewise.
67681         * tests/test-nonblocking-pipe.h: Likewise.
67682         * tests/test-nonblocking-socket.h: Likewise.
67683         * tests/test-pipe.c: Likewise.
67684         * tests/test-pipe2.c: Likewise.
67685         * tests/test-spawn-pipe-child.c: Likewise.
67686         * doc/acl-resources.txt: Likewise.
67687         * lib/getaddrinfo.c (WINDOWS_NATIVE): Renamed from WIN32_NATIVE.
67688         * tests/test-poll.c (WINDOWS_NATIVE): Likewise.
67689         * tests/test-select.h (WINDOWS_NATIVE): Likewise.
67690         * lib/localcharset.c: Update comments to mention native Windows.
67691         (WINDOWS_NATIVE): Renamed from WIN32_NATIVE.
67692         * lib/localename.c: Likewise.
67693         * lib/progreloc.c: Likewise.
67694         * lib/relocatable.c: Likewise.
67695         * lib/poll.c (WINDOWS_NATIVE): Renamed from WIN32_NATIVE.
67696         (windows_compute_revents): Renamed from win32_compute_revents.
67697         (windows_compute_revents_socket): Renamed from
67698         win32_compute_revents_socket.
67699         * lib/select.c: Update comments to mention native Windows.
67700         (windows_poll_handle): Renamed from win32_poll_handle.
67701         * m4/threadlib.m4: Update comments to mention native Windows.
67702         (gl_THREADLIB_EARLY_BODY, gl_THREADLIB_BODY): Expect
67703         --enable-threads=windows instead of --enable-threads=win32. Set
67704         USE_WINDOWS_THREADS, not USE_WIN32_THREADS.
67705         * lib/glthread/lock.h: Update comments to mention native Windows.
67706         (USE_WINDOWS_THREADS): Renamed from USE_WIN32_THREADS.
67707         * lib/glthread/lock.c (USE_WINDOWS_THREADS): Renamed from
67708         USE_WIN32_THREADS.
67709         * lib/glthread/cond.h (USE_WINDOWS_THREADS): Likewise.
67710         * lib/glthread/cond.c (USE_WINDOWS_THREADS): Likewise.
67711         * lib/glthread/thread.h (USE_WINDOWS_THREADS): Likewise.
67712         * lib/glthread/thread.c (USE_WINDOWS_THREADS): Likewise.
67713         * lib/glthread/tls.h (USE_WINDOWS_THREADS): Likewise.
67714         * lib/glthread/tls.c (USE_WINDOWS_THREADS): Likewise.
67715         * lib/glthread/yield.h (USE_WINDOWS_THREADS): Likewise.
67716         * tests/test-cond.c (USE_WINDOWS_THREADS): Likewise.
67717         * tests/test-thread_create.c (USE_WINDOWS_THREADS): Likewise.
67718         * tests/test-lock.c (USE_WINDOWS_THREADS): Likewise.
67719         (TEST_WINDOWS_THREADS): Renamed from TEST_WIN32_THREADS.
67720         * tests/test-tls.c: Likewise.
67721         Rationale:
67722         Microsoft renamed the "Win32 API" to "Windows API", as it is available
67723         on both 32-bit and 64-bit Windows systems.
67724         But in gnulib, we treat Cygwin like a Unix platform, therefore the main
67725         line of distinction is between "native Windows" on one side and Unix/
67726         POSIX systems on the other side. More details in
67727         <https://lists.gnu.org/r/bug-gnulib/2012-01/msg00027.html>.
67728         Suggested by Paul Eggert.
67730 2012-01-03  Bruno Haible  <bruno@clisp.org>
67732         isatty: Support for MSVC 9.
67733         * doc/posix-functions/isatty.texi: Mention the MSVC problem.
67734         * lib/isatty.c: Include <errno.h>, msvc-inval.h.
67735         (_isatty_nothrow): New function.
67736         (isatty): Use it instead of _isatty.
67737         (IsConsoleHandle): Add comment, from Paolo Bonzini.
67738         * lib/poll.c (IsConsoleHandle): Likewise.
67739         * lib/select.c (IsConsoleHandle): Likewise.
67740         * m4/isatty.m4 (gl_FUNC_ISATTY): Fix comment. Reported by Eli Zaretskii.
67741         (gl_PREREQ_ISATTY): New macro.
67742         * modules/isatty (Depends-on): Add msvc-inval.
67743         (configure.ac): Invoke gl_PREREQ_ISATTY.
67745 2012-01-03  Jim Meyering  <meyering@redhat.com>
67747         maint.mk: remove temporary transition aid from over 1.5 years ago
67748         * top/maint.mk (_prohibit_regexp): Remove definition whose sole
67749         purpose was to aid in the transition (avoiding silent malfunction)
67750         from that old name to the new _sc_search_regexp.  This shim was
67751         added by commit 219c504b.
67753         init.sh: do not try to accommodate compare arguments starting with "-"
67754         * tests/init.sh (compare_dev_null_): Do not try to accommodate
67755         compare arguments that start with "-".  Besides, we do not worry
67756         about this when invoking diff or cmp; why start now with sed?
67757         Using "--" to separate options from argument would trigger sed
67758         failure in at least Solaris 7, HP-UX 11.00, IRIX 6.5, FreeBSD 6.4,
67759         OpenBSD 4.9 and NetBSD 5.1.  Reported by Bruno Haible.
67761 2012-01-02  Bruno Haible  <bruno@clisp.org>
67763         Enhance tests for module 'isatty'.
67764         * modules/isatty-tests (Depends-on): Add pipe-posix.
67765         * tests/test-isatty.c: Include <fcntl.h>.
67766         (DEV_NULL): New macro.
67767         (main): Test the resut of isatty() also on regular files, pipes, and
67768         /dev/null.
67770         New module 'isatty'.
67771         * lib/unistd.in.h (isatty): New declaration.
67772         * lib/isatty.c: New file, based on an idea of
67773         Bastien Roucariès <roucaries.bastien@gmail.com>.
67774         * m4/isatty.m4: New file.
67775         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether isatty is declared.
67776         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_ISATTY, REPLACE_ISATTY.
67777         * modules/unistd (Makefile.am): Substitute GNULIB_ISATTY,
67778         REPLACE_ISATTY.
67779         * modules/isatty: New file.
67780         * doc/posix-functions/isatty.texi: Mention the new module.
67781         Suggested by Paolo Bonzini.
67783 2012-01-02  Bruno Haible  <bruno@clisp.org>
67785         canonicalize: Tweak 2011-12-29 commit.
67786         * lib/canonicalize.c (canonicalize_filename_mode): Fix typo in comment.
67787         * lib/canonicalize.h (canonicalize_filename_mode): Update specification.
67789 2012-01-02  Jim Meyering  <meyering@redhat.com>
67791         gitlog-to-changelog: describe input syntax in --help output
67792         * build-aux/gitlog-to-changelog (usage) [SPECIAL SYNTAX]: New section.
67794         gitlog-to-changelog: fix typo in --help: show backslash before email @
67795         * build-aux/gitlog-to-changelog (usage): An "@" was backslash-escaped
67796         in sources, but not in actual output.
67798 2011-12-30  Jim Meyering  <meyering@redhat.com>
67800         gitlog-to-changelog: don't malfunction when name contains %-directive
67801         * build-aux/gitlog-to-changelog (main): Don't let a %-directive
67802         in a name string cause trouble.  E.g., with a user name of "%s",
67803         gitlog-to-changelog would fail with "Missing argument in sprintf at..."
67805 2011-12-30  Gary V. Vaughan  <gary@gnu.org>
67807         gitlog-to-changelog: Copyright-paperwork-exempt: yes == (tiny change)
67808         * build-aux/gitlog-to-changelog (main): Map the string, at beginning
67809         of line in a git commit log, "Copyright-paperwork-exempt: yes", to
67810         the "  (tiny change)" notation that is appended to the standard
67811         ChangeLog "date  name  email" header line.
67813 2012-01-01  Jim Meyering  <meyering@redhat.com>
67815         test-framework-sh: init.sh: fix "make dist" failure
67816         When using gnulib-tool's --with-tests option and any module that
67817         depends on test-framework-sh, "make dist" would fail due to the
67818         lack of init.sh *in lib/*.  The EXTRA_DIST += init.sh is required
67819         in the gltests directory, and not in the gllib/ directory.
67820         One way to work around that is to move the EXTRA_DIST += init.sh
67821         from the primary module to the -tests one:
67822         * modules/test-framework-sh-tests (EXTRA_DIST): Add init.sh here, ...
67823         * modules/test-framework-sh (Makefile.am): ...not here.
67824         Reported by Tom G. Christensen in
67825         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/29519
67827         version-etc: update copyright year reported by --version
67828         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2012.
67830 2011-12-31  Pádraig Brady  <P@draigBrady.com>
67832         canonicalize: only stat() if required
67833         * lib/canonicalize.c (canonicalize_filename_mode):
67834         Avoid calling l?stat() when both CAN_MISSING,
67835         and CAN_NOLINKS are set, as we neither need
67836         to resolve symlinks or test component existence.
67838 2011-12-31  Paul Eggert  <eggert@cs.ucla.edu>
67840         doc: cover st_ino issues once; add OpenVMS etc.
67841         * doc/posix-functions/stat.texi (stat):
67842         * doc/posix-functions/lstat.texi (lstat):
67843         * doc/posix-functions/fstatat.texi (fstatat):
67844         * doc/posix-functions/fstat.texi (fstat):
67845         Move general 'struct stat' stuff to sys_stat.texi,
67846         leaving behind a pointer.
67847         * doc/posix-headers/sys_stat.texi (sys/stat.h):
67848         Merge duplicate info about 'struct stat' problems into here.
67849         Mention issues with OpenVMS, GNU/Linux NFS, NetApp, ClearCase,
67850         and suggest partial workarounds.
67852         same-inode: port to OpenVMS
67853         * lib/same-inode.h (SAME_INODE): Port to OpenVMS by checking all
67854         three st_ino values.
67856 2011-12-30  Pádraig Brady  <P@draigBrady.com>
67858         canonicalize: fix references to stat() and lstat()
67859         * lib/canonicalize.c (canonicalize_filename_mode):
67860         Ensure references always resolve to a replacement
67861         function if required (even via a macro).
67863 2011-12-30  Jim Meyering  <meyering@redhat.com>
67865         gitlog-to-changelog: remove a little duplication
67866         * build-aux/gitlog-to-changelog (main): Grep @lines once,
67867         rather than twice.
67869 2011-12-29  Pádraig Brady  <P@draigBrady.com>
67871         canonicalize: add support for not resolving symlinks
67872         * lib/canonicalize.h: Add the CAN_NOLINKS flag to
67873         indicate we don't want to follow symlinks.  Also
67874         provide CAN_MODE_MASK to aid setting these existing
67875         mutually exclusive values.
67876         * lib/canonicalize.c (canonicalize_filename_mode):
67877         Extract the flags from can_mode parameter, which
67878         are currently just used to select between stat()
67879         and lstat().  Also ensure that mutually exclusive
67880         values are flagged immediately as invalid.
67881         * tests/test-canonicalize.c: Verify symlinks are
67882         not followed, and that invalid flag combinations
67883         are diagnosed.
67885 2011-12-25  Jim Meyering  <meyering@redhat.com>
67887         gitlog-to-changelog: do not clump multi-paragraph entries
67888         Identical header lines (date,name,email+coauthors) are suppressed,
67889         thus putting all entries with those same characteristics under
67890         a single header.  However, when a log entry consists of two or
67891         more paragraphs, it may not be clear where it starts and ends.
67892         This change makes it so that such an entry is always separated
67893         from others by a header line, even when that header would
67894         otherwise be suppressed.
67895         * build-aux/gitlog-to-changelog: Implement the above.
67896         Inspired by a related request from Stefano Lattarini in
67897         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/29456
67899 2011-12-25  Paul Eggert  <eggert@cs.ucla.edu>
67901         announce-gen: fix `cmd' typo in diagnostic
67902         * build-aux/announce-gen (print_changelog_deltas): Fix typo in
67903         diagnostic: a missing '$' meant that the command was not output.
67905 2011-12-23  Jim Meyering  <meyering@redhat.com>
67907         test-framework-sh: distribute init.sh
67908         * modules/test-framework-sh (EXTRA_DIST): Append init.sh.
67909         Otherwise, "make -C gnulib-tests check" (at least in grep) would
67910         fail due to the lack of init.sh.
67912         maint: remove explicit Files: tests/init.sh; depend on test-framework-sh
67913         * modules/atexit-tests: Rather than listing tests/init.sh,
67914         now that there's a module for it, simply depend on that new module.
67915         * modules/closein-tests: Likewise.
67916         * modules/exclude-tests: Likewise.
67917         * modules/getcwd-tests: Likewise.
67918         * modules/perror-tests: Likewise.
67919         * modules/pread-tests: Likewise.
67920         * modules/pwrite-tests: Likewise.
67921         * modules/vc-list-files-tests: Likewise.
67922         * modules/verify-tests: Likewise.
67923         * modules/xalloc-die-tests: Likewise.
67924         * modules/xstrtoimax-tests: Likewise.
67925         * modules/xstrtol-tests: Likewise.
67926         * modules/xstrtoll-tests: Likewise.
67927         * modules/xstrtoumax-tests: Likewise.
67928         * modules/yesno-tests: Likewise.
67930 2011-12-22  Jim Meyering  <meyering@redhat.com>
67932         test-framework-sh: add minimal tests of init.sh's compare function
67933         * modules/test-framework-sh-tests: New file.
67934         * tests/test-init.sh: New file.
67936         test-framework-sh: new module
67937         * modules/test-framework-sh: New file.
67938         * MODULES.html.sh (Support for maintaining and releasing projects):
67939         List it.
67941         init.sh: do not emit simulated diff output to stderr
67942         * tests/init.sh (compare_dev_null_): Print to stdout, not stderr.
67944 2011-12-22  Reuben Thomas  <rrt@sc3d.org>
67946         .gitignore: ignore gnulib.dvi and regex.info
67947         * doc/.gitignore:add gnulib.dvi and regex.info
67949 2011-12-22  Jim Meyering  <meyering@redhat.com>
67951         init.sh: correct previous change
67952         * tests/init.sh (compare): My previous change was wrong.
67953         Don't clobber "$?".  Spotted by Stefano Lattarini and Pádraig Brady.
67955         init.sh: avoid unwarranted test failure when using "set -e"
67956         * tests/init.sh (compare): Ignore nonzero exit from compare_dev_null_.
67957         Otherwise, in a test script that uses "set -e" (like many in vc-dwim)
67958         a use like "compare exp out" would get evoke an unconditional failure.
67960 2011-12-21  Alfred M. Szmidt  <ams@gnu.org>
67962         bootstrap: fix it to honor $ACLOCAL_FLAGS once again
67963         The 2011-12-17 change, commit 767ccd40, replaced a manual invocation
67964         of aclocal that used explicit $ACLOCAL_FLAGS with an invocation of
67965         autoreconf that did not.
67966         * build-aux/bootstrap: Use $ACLOCAL_FLAGS when invoking autoreconf.
67967         Reported by Mats Erik Andersson <gnu@gisladisker.se>.
67969 2011-12-17  Jim Meyering  <meyering@redhat.com>
67971         bootstrap: remove some now-unneeded code
67972         This script arose back when gnulib-tool was young.
67973         Since then, it has seen improvements that render much of this
67974         script unnecessary.  In particular, it can now make symlinks
67975         to the files it uses.  Also, I no longer see as much value in
67976         marking files as read-only via comments.
67977         If you relied on the symlink-creation feature of the preceding
67978         version of this script, you can get most of that functionality
67979         by adding the --symlink option to the definition of
67980         gnulib_tool_option_extras in your bootstrap.conf file.
67981         * build-aux/bootstrap (AUTOPOINT, AUTORECONF): Factor out definitions.
67982         Run autopoint and libtoolize *before* gnulib-tool.
67983         After it, run an abbreviated autoreconf, rather than a loop around
67984         all tools.
67985         (slirp, bt_mark_as_generated): Remove functions.
67987 2011-12-18  Paul Eggert  <eggert@cs.ucla.edu>
67989         ftoastr: fix typo
67990         * lib/ftoastr.h: Fix misspelling in comment.
67992 2011-12-18  Reuben Thomas  <rrt@sc3d.org>
67994         * top/README-release: fix punctuation.
67996 2011-12-17  Jim Meyering  <meyering@redhat.com>
67998         bootstrap: correct the recent buildreq change
67999         The 2011-12-07 commit, 39f5f1e4, omitted some '*'s, and thus
68000         had no effect.
68001         * build-aux/bootstrap (buildreq): Bracket each search term with
68002         "*...*", so that the shell "case" statement works as intended.
68003         Add comments.
68005 2011-12-17  Bernhard Voelker  <mail@bernhard-voelker.de>
68007         build: let bootstrap resort to wget when downloading .po files
68008         * build-aux/bootstrap (download_po_files): Fallback to wget when
68009         downloading the .po files via rsync fails.  This is necessary to
68010         bootstrap from behind a strict firewall.
68012 2011-12-15  Paul Eggert  <eggert@cs.ucla.edu>
68014         stdint: don't assume C++11 when compiling with g++
68015         Problem reported for glibc 2.14 and g++ by Alexander V. Lukyanov in
68016         <http://lists.gnu.org/r/bug-gnulib/2011-12/msg00099.html>.
68017         * m4/stdint.m4 (gl_STDINT_H): Don't go to extra work to make it
68018         work also in C++ before C++11, as that improperly inhibits
68019         generating a substitute stdint.h for that case.
68021 2011-12-15  Paul Eggert  <eggert@cs.ucla.edu>
68023         alloca: protect comment from gnulib-tool
68024         * lib/alloca.c: Change "GCC version 2" to "GCC 2" in comment, so
68025         that gnulib-tool doesn't think it's a license, and munge it to
68026         say "GCC version 3".
68028 2011-12-15  Ludovic Courtès  <ludo@gnu.org>  (tiny change)
68030         localcharset: Use an absolute path in TESTS_ENVIRONMENT.
68031         * modules/localcharset (LOCALCHARSET_TESTS_ENVIRONMENT): Use
68032         $(abs_top_builddir) instead of $(top_builddir).
68034 2011-12-14  Alex Nelson  <ajnelson@cs.ucsc.edu>  (tiny change)
68036         strftime-tests: also test nanoseconds
68037         * tests/test-strftime.c (T): Add a test of %N.
68039 2011-12-13  Paul Eggert  <eggert@cs.ucla.edu>
68041         inttypes, stdint: add C++11 support
68042         C++11 says there's no need to define __STDC_CONSTANT_MACROS etc.
68043         when including inttypes.h and stdint.h.  Support this change to
68044         the standard.
68045         * doc/posix-headers/inttypes.texi (inttypes.h):
68046         * doc/posix-headers/stdint.texi (stdint.h): Document this.
68047         * lib/inttypes.in.h (__STDC_FORMAT_MACROS) [! __cplusplus]:
68048         Define if not defined already, for the benefit of pre-C++11 hosts.
68049         Define the standard format macros (e.g., PRId8) always.
68050         * lib/stdint.in.h (__STDC_CONSTANT_MACROS, __STDC_LIMIT_MACROS):
68051         Likewise, if __cpluspus.  Define the standard constant and limit
68052         macros (e.g., INT8_C, INT8_MAX) always.
68053         * m4/inttypes.m4 (gl_INTTYPES_INCOMPLETE): Do not define
68054         GL_TRIGGER_STDC_LIMIT_MACROS or __STDC_LIMIT_MACROS; no longer needed.
68055         * m4/stdint.m4 (gl_STDINT_H): Update comments about these macros.
68056         * tests/test-inttypes.c (__STDC_LIMIT_MACROS, __STDC_CONSTANT_MACROS)
68057         (__STDC_FORMAT_MACROS): Do not define, since we assume C++11 API now.
68058         * tests/test-stdint.c (__STDC_LIMIT_MACROS, __STDC_CONSTANT_MACROS):
68059         Likewise.
68061 2011-12-12  Paul Eggert  <eggert@cs.ucla.edu>
68063         nonblocking tests: Fix test failure on Linux/PPC.
68064         Suggested by Prerna Saxena in
68065         <http://lists.gnu.org/r/bug-gnulib/2011-12/msg00080.html>.
68066         * tests/test-nonblocking-pipe.h (PIPE_DATA_BLOCK_SIZE) [Linux/PPC64]:
68067         Set to 1100000.
68069 2011-12-12  Jim Meyering  <meyering@redhat.com>
68071         argmatch: don't hard-code `' when listing valid option arguments
68072         * lib/argmatch.c (argmatch_valid): Don't hard-code `%s'.  Instead,
68073         use the quote function to add quotes.  Use fputs rather than
68074         fprintf for the format string with no format directive.
68076 2011-12-07  Eric Blake  <eblake@redhat.com>
68078         bootstrap: detect tools required by gnulib-tool
68079         * build-aux/bootstrap (buildreq): Provide minimum implicit
68080         dependencies.
68081         * DEPENDENCIES: Mention patch as a prereq.
68083 2011-12-04  Bruno Haible  <bruno@clisp.org>
68085         sethostname: Port to Windows platforms.
68086         * lib/sethostname.c: Provide an alternate implementation for Windows
68087         platforms.
68088         * tests/test-sethostname2.c (geteuid): Redefine on Cygwin.
68089         (main): Skip the test if sethostname() fails with EPERM. On Windows
68090         platforms, don't check the result of gethostname().
68092 2011-12-04  Bruno Haible  <bruno@clisp.org>
68093             Jim Meyering  <meyering@redhat.com>
68095         tests: Avoid spurious error message on platforms without mktemp program.
68096         * tests/init.sh (mktempd_): Run mktemp in a subcommand.
68098 2011-12-04  Bruno Haible  <bruno@clisp.org>
68100         sethostname: Fix documentation.
68101         * doc/glibc-functions/sethostname.texi: Move the Solaris problem to the
68102         "not fixed" section.
68104 2011-12-03  Bruno Haible  <bruno@clisp.org>
68106         gnulib-tool: Verify that the License field is present and non-empty.
68107         * gnulib-tool (func_get_license_raw): New function, extracted from
68108         func_get_license.
68109         (func_get_license): Use it. Warn if the module is not a test module and
68110         has no license.
68111         Suggested by Jim Meyering.
68113 2011-12-03  Bruno Haible  <bruno@clisp.org>
68115         sethostname tests: Fix link error on mingw.
68116         * tests/test-sethostname1.c: New file, extracted from
68117         tests/test-sethostname.c.
68118         * tests/test-sethostname2.c: New file, extracted from
68119         tests/test-sethostname.c.
68120         * tests/test-sethostname.c: Remove file.
68121         * modules/sethostname-tests (Files): Add tests/test-sethostname1.c,
68122         tests/test-sethostname2.c. Remove tests/test-sethostname.c.
68123         (Depends-on): Add gethostname.
68124         (Makefile.am): Compile both test-sethostname1 and test-sethostname2.
68125         Link the latter with $(GETHOSTNAME_LIB).
68127         sethostname tests: Fix compilation error on mingw.
68128         * tests/test-sethostname.c: Don't include <sys/types.h>.
68129         (geteuid): Use a dummy value without uid_t.
68130         * modules/sethostname-tests (Depends-on): Remove sys_types.
68132         sethostname tests: Avoid a gcc warning.
68133         * tests/test-sethostname.c (main): Remove an unused variable.
68135         Tweak last commit.
68136         * modules/sethostname-tests (Files): Sort by decreasing importance.
68137         (configure.ac): Check for geteuid.
68138         * tests/test-sethostname.c (main): Emit error messages to stderr. Skip
68139         the test when there's nothing to test. Drop an unnecessary cast.
68140         Improve an error message. Verify that the final sethostname() call
68141         succeeds.
68143 2011-12-01  Ben Walton  <bwalton@artsci.utoronto.ca>
68145         Add a test suite for the sethostname module.
68146         * modules/sethostname-tests: New file.  A test program
68147         for the sethostname module.
68148         * tests/test-sethostname.c: Likewise.
68150 2011-12-03  Bruno Haible  <bruno@clisp.org>
68152         Tweak last commit.
68153         * lib/unistd.in.h (sethostname): Keep declarations in alphabetic order.
68154         Fix preprocessor directives indentation. Fix typos.
68155         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Keep alphabetic order.
68156         * modules/unistd (Makefile): Likewise.
68158 2011-12-01  Ben Walton  <bwalton@artsci.utoronto.ca>
68160         Integrate the sethostname module into unistd.
68161         * lib/unistd.in.h: Integrate the SETHOSTNAME preprocessor handling
68162         into the unistd.h header.
68163         * m4/unistd_h.m4: Setup the autoconf handling for the SETHOSTNAME
68164         preprocessor directives.
68165         * modules/unistd: Setup the Makefile substitutions of the
68166         SETHOSTNAME preprocessor directives.
68168 2011-12-03  Bruno Haible  <bruno@clisp.org>
68170         Tweak last commit.
68171         * lib/sethostname.c: Don't include <string.h>.
68172         (sethostname): No need to copy the argument string to the stack. Don't
68173         call clearerr. Preserve errno when fprintf failed.
68174         * m4/sethostname.m4 (gl_FUNC_SETHOSTNAME): Comment about HOST_NAME_MAX.
68175         Don't invoke AC_REPLACE_FUNCS.
68176         * modules/sethostname (Link): Remove empty section.
68177         * doc/glibc-functions/sethostname.texi: Gnulib does not fix the ENOSYS
68178         failure problem.
68180 2011-12-01  Ben Walton  <bwalton@artsci.utoronto.ca>
68182         New module 'sethostname'.
68183         * lib/sethostname.c (sethostname): New file.  Provide sethostname
68184         for systems that lack it.
68185         * m4/sethostname.m4 (gl_FUNC_SETHOSTNAME): New file.  Detection of
68186         sethostname declaration and function.
68187         * modules/sethostname: New file.  Define the sethostname module.
68189 2011-12-03  Bruno Haible  <bruno@clisp.org>
68191         Tweak last commit.
68192         * m4/gethostname.m4 (gl_PREREQ_HOST_NAME_MAX): Trim blank line.
68194 2011-12-01  Ben Walton  <bwalton@artsci.utoronto.ca>
68196         Split the HOST_NAME_MAX detection into a separate m4 macro.
68197         * m4/gethostname.m4 (gl_PREREQ_HOST_NAME_MAX): Make this a separate
68198         macro so it can be used by the pending sethostname module.
68200 2011-12-03  Bruno Haible  <bruno@clisp.org>
68202         Fix module descriptions syntax.
68203         * modules/argv-iter (License): Fix syntax.
68204         * modules/di-set (License): Likewise.
68205         * modules/ino-map (License): Likewise.
68206         Reported by Stefano Lattarini <stefano.lattarini@gmail.com>.
68208 2011-12-02  Paul Eggert  <eggert@cs.ucla.edu>
68210         stdalign: port to Clang 3.0
68211         Problem reported by Simon Josefsson in
68212         <http://lists.gnu.org/r/bug-gnulib/2011-12/msg00005.html>.
68213         * doc/posix-headers/stdalign.texi (stdalign.h): Mention Clang 3.0,
68214         which has <stdalign.h> but which does not define alignof.
68215         * m4/stdalign.m4 (gl_STDALIGN_H): Check for Clang 3.0's problem.
68217 2011-12-01  Eric Blake  <eblake@redhat.com>
68219         mktempd: silence dd usage
68220         * build-aux/mktempd (rand_bytes): Silence dd.
68222 2011-11-30  Simon Josefsson  <simon@josefsson.org>
68224         manywarnings: Don't mention gcc version in docstring.
68225         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Doc fix.  Suggested by
68226         Jim Meyering <meyering@redhat.com>.
68228 2011-11-30  Jim Meyering  <meyering@redhat.com>
68230         hash: mark a few floating point constants with "f" suffix
68231         * lib/hash.c (DEFAULT_GROWTH_THRESHOLD, DEFAULT_GROWTH_FACTOR)
68232         (DEFAULT_SHRINK_THRESHOLD, DEFAULT_SHRINK_FACTOR): Mark literal
68233         floating point constants with "f", since they're destined to be
68234         saved/used as "float"s.
68236 2011-11-29  Paolo Bonzini  <bonzini@gnu.org>
68238         float tests: Correct and re-enable assertion about LDBL_MIN_EXP.
68239         * tests/test-float.c (test_long_double): Correct and re-enable the
68240         assertion about LDBL_MIN_EXP that was disabled on 2011-08-31.
68242 2011-11-29  Matthew Wala  <wala1@illinois.edu>  (tiny change)
68244         Avoid subtracting two pointers that don't point into the same block.
68245         * lib/argp-help.c (hol_append): Reorder pointer subtractions so that
68246         only pointers into the same memory block are subtracted. We cannot
68247         assume that sizeof (ptrdiff_t) == sizeof (void *).
68249 2011-11-29  Eric Blake  <eblake@redhat.com>
68251         maint.mk: add syntax check for use of compare from init.sh
68252         * top/maint.mk (sc_prohibit_reversed_compare_failure): New rule,
68253         moved here from coreutils.
68255         manywarnings: drop -Wunsuffixed-float-constants
68256         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): C99 does not allow
68257         '1.0D', which is the only way to silence this warning for 'double'.
68259 2011-11-29  Jim Meyering  <meyering@redhat.com>
68261         hash: mark compute_bucket_size with the pure attribute
68262         * lib/hash.c (compute_bucket_size): Use _GL_ATTRIBUTE_PURE.
68264         quotearg, propername: correct pragma guard expression
68265         * lib/quotearg.c: Enable pragma for gcc-4.6 and newer, not 4.3 and newer.
68266         * lib/propername.c: Likewise.  Reported by Bernhard Voelker.
68268 2011-11-28  Jim Meyering  <meyering@redhat.com>
68270         propername: do not mark proper_name with the const attribute
68271         * lib/propername.h (proper_name): Do *not* mark as _GL_ATTRIBUTE_CONST,
68272         since it examines data pointed to by its parameter.
68273         * lib/propername.c (proper_name): Instead, add a pragma to suppress
68274         the suggestion from -Wsuggest-attribute=const.
68276         propername: mark one more function as const
68277         * lib/propername.h (proper_name): Mark as _GL_ATTRIBUTE_CONST.
68279 2011-11-27  Jim Meyering  <meyering@redhat.com>
68281         mark functions with const and pure attributes
68283         Mark functions per suggestions from gcc-4.6 when using these options:
68284         -Wsuggest-attribute=pure -Wsuggest-attribute=const.
68285         Use gnulib's _GL_ATTRIBUTE_PURE and _GL_ATTRIBUTE_CONST macros.
68286         Follow these guidelines: when possible, apply the attribute to
68287         an extern declaration, not to its definition.  Apply it to the
68288         definition only when the definition is static.
68289         * lib/argmatch.h (argmatch, argmatch_to_argument): Mark.
68290         * lib/argv-iter.h (argv_iter_n_args): Likewise.
68291         * lib/base64.h (isbase64): Likewise.
68292         * lib/basename-lgpl.c (last_component, base_len): Likewise.
68293         * lib/c-ctype.h (c_isascii, c_isalnum, c_isalpha): Likewise.
68294         (c_isblank, c_iscntrl, c_isdigit, c_islower, c_isgraph): Likewise.
68295         (c_isprint, c_ispunct, c_isspace, c_isupper, c_isxdigit): Likewise.
68296         (c_tolower, c_toupper): Likewise.
68297         * lib/c-strcase.h (c_strcasecmp, c_strncasecmp): Likewise.
68298         * lib/chdir-long.c (find_non_slash): Likewise.
68299         * lib/dirname.h (base_len, dir_len, last_component): Likewise.
68300         * lib/exclude.h (fnmatch_pattern_has_wildcards): Likewise.
68301         * lib/file-type.h (file_type): Likewise.
68302         * lib/filenamecat-lgpl.c (longest_relative_suffix): Likewise.
68303         * lib/filevercmp.c (verrevcmp): Likewise.
68304         * lib/freadahead.h (freadahead): Likewise.
68305         * lib/fts.c (fts_maxarglen): Likewise.
68306         * lib/hash-pjw.h (hash_pjw): Likewise.
68307         * lib/hash-triple.h (triple_hash_no_name, triple_compare_ino_str):
68308         * lib/hash.c (is_prime, next_prime): Likewise.
68309         * lib/hash.c (hash_get_n_buckets, hash_get_n_buckets_used): Likewise.
68310         (hash_get_n_entries, hash_get_max_bucket_length): Likewise.
68311         (hash_table_ok, hash_get_first, hash_string): Likewise.
68312         (compute_bucket_size): Likewise.
68313         * lib/i-ring.h (i_ring_empty): Likewise.
68314         * lib/isnan.c (isnanl): Likewise.
68315         * lib/math.h (isnanl, rpl_isnanl): Likewise.
68316         * lib/memcasecmp.h (memcasecmp): Likewise.
68317         * lib/memchr2.h (memchr2): Likewise.
68318         * lib/memcmp2.h (memcmp2): Likewise.
68319         * lib/parse-datetime.y (lookup_zone): Likewise.
68320         * lib/sockets.h (gl_sockets_startup, gl_sockets_cleanup)
68321         [!WINDOWS_SOCKETS]: Likewise.
68322         * lib/strnlen1.h (strnlen1): Likewise.
68323         * lib/uniwidth.in.h (uc_width): Likewise.
68324         * lib/quotearg.c: Add pragma to avoid unwarranted suggestion from
68325         gcc's -Wsuggest-attribute=pure for quoting_options_from_style.
68326         (quoting_options_from_style): Add a comment.
68327         * lib/propername.h (proper_name): Add a comment.
68329 2011-11-27  Bruno Haible  <bruno@clisp.org>
68331         Remove unused macros from !_LIBC code in glibc-borrowed files.
68332         * lib/fnmatch.c (STRCOLL): Remove macro.
68333         * lib/fnmatch_loop.c (STRCOLL): Remove undef.
68334         * lib/glob.c (__stat, __readdir64): Remove macros.
68335         * lib/tempname.c (__open64, __xstat64): Remove macros.
68336         Suggested by Paul Eggert.
68338 2011-11-27  Bruno Haible  <bruno@clisp.org>
68340         getcwd: Fix link error on MSVC 9.
68341         * modules/getcwd (Depends-on): Add readdir, rewinddir.
68343 2011-11-27  Bruno Haible  <bruno@clisp.org>
68345         Don't set REPLACE_FOO to 1 if HAVE_FOO is 0.
68346         * m4/opendir.m4 (gl_FUNC_OPENDIR): Don't set REPLACE_OPENDIR to 1 if
68347         HAVE_OPENDIR is 0.
68348         * m4/closedir.m4 (gl_FUNC_CLOSEDIR): Don't set REPLACE_CLOSEDIR to 1 if
68349         HAVE_CLOSEDIR is 0.
68350         * m4/dup2.m4 (gl_FUNC_DUP2): Don't set REPLACE_DUP2 to 1 if HAVE_DUP2
68351         is 0.
68352         * m4/dup3.m4 (gl_FUNC_DUP3): Update comments.
68354 2011-11-27  Bruno Haible  <bruno@clisp.org>
68356         getcwd: Fix bug from 2011-08-17.
68357         * m4/getcwd.m4 (gl_FUNC_GETCWD): Set REPLACE_GETCWD to 1 only on
68358         platforms that need it.
68359         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Consider a return
68360         code of 4 to be a failure, not a success. This ensures that
68361         REPLACE_GETCWD becomes 1 on OpenBSD 4.9 and NetBSD 5.1.
68363 2011-11-27  Bruno Haible  <bruno@clisp.org>
68365         binary-io tests: Avoid test failure on mingw when libtool is used.
68366         * tests/test-binary-io.c (main): Don't remove t-bin-out2.tmp here.
68367         Don't verify the size of t-bin-out1.tmp here.
68368         * tests/test-binary-io.sh: Verify it here.
68369         Reported by Simon Josefsson.
68371 2011-11-26  Bruno Haible  <bruno@clisp.org>
68373         Fix conflict between two instantiations of module 'unistd'.
68374         * gnulib-tool (func_emit_autoconf_snippet): Substitute
68375         ${include_guard_prefix} also in the autoconf snippet.
68376         * m4/getopt.m4 (gl_FUNC_GETOPT_POSIX): Don't set GNULIB_UNISTD_H_GETOPT.
68377         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Don't initialize
68378         GNULIB_UNISTD_H_GETOPT.
68379         * modules/getopt-posix (configure.ac): Set the
68380         GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT variable.
68381         * modules/getopt-gnu (configure.ac): Likewise.
68382         * modules/unistd (Makefile.am): Change the substitution value of
68383         GNULIB_UNISTD_H_GETOPT to depend on the include guard prefix.
68384         Reported by Simon Josefsson.
68386 2011-11-25  Bruno Haible  <bruno@clisp.org>
68388         pagealign_alloc: Doc and comments.
68389         * doc/posix-functions/posix_memalign.texi: Refer to the pagealign_alloc
68390         module.
68391         * lib/pagealign_alloc.c (pagealign_alloc): Add comment.
68393 2011-11-25  Jim Meyering  <meyering@redhat.com>
68395         test-update-copyright.sh: avoid false-positive failure
68396         * tests/test-update-copyright.sh: Use $TMP.? (not $TMP.*), to work
68397         around false positive failure on Cygwin/Windows.  The latter was
68398         matching erroneously-created files with names like
68399         update-copyright.test-ex.4.bak.  Reported by Simon Josefsson.
68401 2011-11-25  Simon Josefsson  <simon@josefsson.org>
68403         valgrind-tests.m4: Avoid breakage if valgrind on bash fails.
68404         * m4/valgrind-tests.m4: Check that the parameters that will be
68405         used works, not just a subset of them.  Reported by Bruno Haible
68406         <bruno@clisp.org>.
68408 2011-11-24  Jim Meyering  <meyering@redhat.com>
68410         test-stdalign.c: comment out long double tests
68411         * tests/test-stdalign.c: Don't try to reduce alignment of long double
68412         variables.  That provokes errors like this from gcc-4.7.0 20111124:
68413         error: '_Alignas' specifiers cannot reduce alignment of \
68414         'static_longdouble_alignas'.
68416 2011-11-22  Jim Meyering  <meyering@redhat.com>
68418         init.sh: make "compare /dev/null FILE" output more readable
68419         * tests/init.sh (compare_): Document the preferred order of arguments.
68420         (emit_diff_u_header_): New function.
68421         (compare_dev_null_): Emit a simulated diff, rather than just the
68422         contents of the unexpected file.  Suggestion from Bruno Haible.
68424 2011-11-21  Jim Meyering  <meyering@redhat.com>
68425             Eric Blake  <eblake@redhat.com>
68427         init.sh: work around OSF/1 5.1's mishandling of /dev/null
68428         * tests/init.sh: Make our compare function slightly more portable.
68429         Reported by Bruno Haible in
68430         http://thread.gmane.org/gmane.comp.gnu.grep.bugs/4020
68432 2011-11-21  Simon Josefsson  <simon@josefsson.org>
68434         * m4/gnulib-common.m4 (_Noreturn): Check that _MSC_VER is defined
68435         before using it, in code that ends up in config.h.
68437 2011-11-20  Bruno Haible  <bruno@clisp.org>
68439         getcwd: Work around getcwd bug on AIX 5..7.
68440         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Require
68441         AC_CANONICAL_HOST. Assign exit code 31 to the bug seen on AIX 5.1..7.1.
68442         Use a different value for gl_cv_func_getcwd_path_max. Move the
68443         definition of HAVE_PARTLY_WORKING_GETCWD from here...
68444         * m4/getcwd.m4 (gl_FUNC_GETCWD): ... to here. Invoke
68445         gl_FUNC_GETCWD_PATH_MAX also when $gl_cv_func_getcwd_null is 'no'.
68446         Define HAVE_MINIMALLY_WORKING_GETCWD.
68447         * lib/getcwd.c (__getcwd): Don't use the system's getcwd on platforms
68448         where it is not even minimally working, that is, on AIX.
68449         * tests/test-getcwd.c (test_long_name): Distinguish the same cases as
68450         m4/getcwd-path-max.m4.
68451         (main): Update exit code computation.
68452         * doc/posix-functions/getcwd.texi: Mention list of platforms where
68453         getcwd does not handle long file names.
68455 2011-11-20  Bruno Haible  <bruno@clisp.org>
68457         getcwd: Fix bug from 2009-09-10.
68458         * m4/getcwd.m4 (gl_FUNC_GETCWD): Treat "guessing yes" like "yes", not
68459         like "no".
68461 2011-11-20  Simon Josefsson  <simon@josefsson.org>
68463         * m4/manywarnings.m4: Add more warnings from gcc 4.6.2.
68465 2011-11-20  Bruno Haible  <bruno@clisp.org>
68467         fma tests: Avoid shadowing local variables.
68468         * tests/test-fma2.h (test_function): Reduce scope of x, y, z, result,
68469         expected.
68471 2011-11-20  Bruno Haible  <bruno@clisp.org>
68473         copysignf tests: Fix.
68474         * tests/test-copysignf.c: Fix signature check.
68476 2011-11-20  Bruno Haible  <bruno@clisp.org>
68478         fma: Remove unused code.
68479         * lib/fma.c (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): Remove
68480         unused macros.
68482 2011-11-20  Bruno Haible  <bruno@clisp.org>
68484         sethostname: Fix doc about AIX.
68485         * doc/glibc-functions/sethostname.texi: Drop mention that AIX 5.1 lacks
68486         sethostname; it has it.
68488         sethostname: Mention more portability problems.
68489         * doc/glibc-functions/sethostname.texi: Mention the missing declaration
68490         problem.
68491         Reported by Ben Walton <bwalton@artsci.utoronto.ca>.
68493 2011-11-19  Bruno Haible  <bruno@clisp.org>
68495         Depend on module fcntl-h when AT_FDCWD is used.
68496         * modules/utimens (Depends-on): Add fcntl-h.
68497         * modules/areadlinkat (Depends-on): Likewise.
68498         * modules/areadlinkat-with-size (Depends-on): Likewise.
68499         * modules/faccessat (Depends-on): Likewise.
68500         * modules/fchmodat (Depends-on): Likewise.
68501         * modules/fchownat (Depends-on): Likewise.
68502         * modules/getcwd (Depends-on): Likewise.
68503         * modules/mkdirat (Depends-on): Likewise.
68504         * modules/mkfifoat (Depends-on): Likewise.
68505         * modules/readlinkat (Depends-on): Likewise.
68506         * modules/symlinkat (Depends-on): Likewise.
68507         * modules/dup2-tests (Depends-on): Likewise.
68508         * modules/fdutimensat-tests (Depends-on): Likewise.
68509         * modules/futimens-tests (Depends-on): Likewise.
68511 2011-11-19  Bruno Haible  <bruno@clisp.org>
68513         euidaccess: Update a comment.
68514         * lib/euidaccess.c: Update comment about platforms with faccessat.
68516 2011-11-19  Bruno Haible  <bruno@clisp.org>
68518         openat: Fix file list.
68519         * modules/openat (Files): Remove lib/at-func.c.
68521 2011-11-19  Bruno Haible  <bruno@clisp.org>
68523         fstatat: Simplify.
68524         * lib/fstatat.c (AT_FUNC_NAME): Define as fstatat. On platforms where
68525         gnulib should define rpl_fstatat, there is a
68526         "#define fstatat rpl_fstatat" in <sys/stat.h>.
68528 2011-11-19  Bruno Haible  <bruno@clisp.org>
68530         Ensure 'inline' can be used in tests/test-utimens-common.h.
68531         * modules/fdutimensat-tests (configure.ac): Require AC_C_INLINE.
68532         * modules/futimens-tests (configure.ac): Likewise.
68533         * modules/utimens-tests (configure.ac): Likewise.
68534         * modules/utimensat-tests (configure.ac): Likewise.
68536 2011-11-19  Simon Josefsson  <simon@josefsson.org>
68538         * lib/hash.c (hash_insert): Use hash_insert_if_absent,
68539         not hash_insert0.
68540         (hash_insert_if_absent): Doc fix.
68542 2011-11-19  Simon Josefsson  <simon@josefsson.org>
68544         * m4/readline.m4 (gl_FUNC_READLINE): Check for readline/history.h.
68546 2011-11-18  Paul Eggert  <eggert@cs.ucla.edu>
68548         test-getcwd: disambiguate exit status
68549         * tests/test-getcwd.c (test_long_name): Return 0..7.
68550         (main): Exit with an unambiguous exit status.  The old
68551         code yielded a mysterious mixture of two failure codes.
68553         fstatat: fix configuration bug on mingw, OpenBSD 4, Solaris 8
68554         * lib/fstatat.c (AT_FUNC_NAME): Use HAVE_FSTAT, not
68555         HAVE_WORKING_FSTATAT_ZERO_FLAG, to decide whether to define
68556         rpl_fstatat or fstatat.  This should fix the other problem
68557         reported by Kai Habel in
68558         <http://lists.gnu.org/r/bug-gnulib/2011-11/msg00237.html>.
68559         A similar problem was reported for OpenBSD 4.6 by Mats Erik Andersson
68560         <http://lists.gnu.org/r/bug-gnulib/2011-11/msg00239.html>
68561         and I reproduced it on a Solaris 8 host we still have in production.
68563 2011-11-18  Jim Meyering  <meyering@redhat.com>
68565         hash: deprecate poorly-named hash_insert0: use hash_insert_if_absent
68566         * lib/hash.c (hash_insert_if_absent): Rename from hash_insert0.
68567         Add a sentence to the comment.
68568         (hash_insert0): New function that simply calls hash_insert_if_absent.
68569         * lib/hash.h (hash_insert_if_absent): Declare it.
68570         (hash_insert0): Add deprecation attribute.
68571         (_GL_ATTRIBUTE_DEPRECATED): Define.
68572         * lib/di-set.c (di_set_insert): Use hash_insert_if_absent,
68573         not hash_insert0.
68574         * NEWS: Mention it, even though it's not really an incompatible change.
68576 2011-11-18  Dagobert Michelsen  <dam@opencsw.org>  (tiny change)
68578         openat: avoid compilation failure due to lack of <errno.h> inclusion
68579         * lib/openat.c: Include <errno.h>.
68581 2011-11-17  Paul Eggert  <eggert@cs.ucla.edu>
68583         * modules/getcwd (Depends-on): Add fdopendir.
68584         This fixes one of the two problems reported by Kai Habel in
68585         <http://lists.gnu.org/r/bug-gnulib/2011-11/msg00237.html>.
68587         modules/crypto/gc-*: simplify dependencies and fix stdalign.h bug
68588         stdalign problem reported by Ian Beckwith in
68589         <http://lists.gnu.org/r/bug-gnulib/2011-11/msg00238.html>.
68590         * modules/crypto/gc-arcfour (Depends-on):
68591         Depend conditionally on crypto/arcfour.
68592         * modules/crypto/gc-arctwo (Depends-on):
68593         Depend conditionally on crypto/arctwo.
68594         * modules/crypto/gc-des (Depends-on):
68595         Depend conditionally on crypto/des.
68596         * modules/crypto/gc-hmac-md5 (Depends-on):
68597         Depend conditionally on crypto/hmac-md5.
68598         * modules/crypto/gc-hmac-sha1 (Depends-on):
68599         Depend conditionally on crypto/hmac-sha1.
68600         * modules/crypto/gc-md2 (Depends-on): Remove stdint, minmax.
68601         * modules/crypto/gc-md4 (Depends-on):
68602         Depend conditionally on crypto/md4.
68603         * modules/crypto/gc-md5 (Depends-on):
68604         Depend conditionally on crypto/md5.
68605         * modules/crypto/gc-rijndael (Depends-on):
68606         Depend conditionally on crypto/rijndael.
68607         * modules/crypto/gc-sha1 (Depends-on):
68608         Depend conditionally on crypto/sha1.
68609         * modules/crypto/gc-arcfour:
68610         * modules/crypto/gc-arctwo:
68611         * modules/crypto/gc-des:
68612         * modules/crypto/gc-hmac-md5:
68613         * modules/crypto/gc-hmac-sha1:
68614         * modules/crypto/gc-md2:
68615         * modules/crypto/gc-md4:
68616         * modules/crypto/gc-md5:
68617         * modules/crypto/gc-rijndael:
68618         * modules/crypto/gc-sha1:
68619         (Files, Depends-on, configure.ac): Remove now-unnecessary stuff,
68620         now that the conditional dependencies do the work for us.
68622 2011-11-17  Jim Meyering  <meyering@redhat.com>
68624         tests: factor st_ctime-comparison out of two headers
68625         * tests/test-utimens-common.h (ctime_compare): Define.
68626         * tests/test-futimens.h (test_futimens): Replace open-coded equivalent.
68627         * tests/test-lutimens.h (test_lutimens): Likewise.
68628         * tests/test-utimens.h (test_utimens): Likewise.
68630         test-getcwd: don't leave behind a confdir3/ directory upon interrupt
68631         Invoke the test program via an init.sh-using wrapper.
68632         * tests/test-getcwd.sh: New file.
68633         * modules/getcwd-tests (Files): Add it.
68634         (Makefile.am) [TESTS]: Invoke the shell script wrapper.
68636 2011-11-01  Gary V. Vaughan  <gary@gnu.org>
68638         gitlog-to-changelog: support multi-author commits.
68639         The FSF cares about keeping track of all authors of patches to its
68640         projects, but Git doesn't provide obvious support for multi-author
68641         changesets. Consensus seems to be forming around the use of extra
68642         Signed-off-by inspired lines in the log message formatted as
68643         `Co-authored-by: A U Thor <email@example.com>' for round-tripping
68644         multi-author commits between version control systems.
68645         * gitlog-to-changelog: Extract `Co-authored-by:' lines from the git
68646         log message and output in standard ChangeLog multi-author format.
68647         Reported by Peter Rosin <peda@lysator.liu.se>
68649 2011-11-15  Ben Walton  <bwalton@artsci.utoronto.ca>  (tiny change)
68650             Bruno Haible  <bruno@clisp.org>
68652         Fix some modules' file list.
68653         * modules/fstatat (Files): Add m4/lstat.m4.
68654         * modules/openat (Files): Likewise.
68655         * modules/unlinkat (Files): Likewise.
68657 2011-11-15  Gary V. Vaughan  <gary@gnu.org>
68659         maint.mk: fix tight-scope.mk generation in VPATH builds.
68660         * top/maint.mk (tight-scope.mk): Make sure to prefix file
68661         reference with $(srcdir) so that the file is found correctly even
68662         when running `make syntax-check' in a VPATH build.
68664 2011-11-13  Bruno Haible  <bruno@clisp.org>
68665             Jim Meyering  <meyering@redhat.com>
68667         Silence successful tests that use 'compare' on AIX, HP-UX, Solaris.
68668         * tests/init.sh (compare): Remove "No differences encountered" or
68669         synonymous output from the 'diff' program.
68671 2011-11-13  Bruno Haible  <bruno@clisp.org>
68673         Makefile: Tweak indentation.
68674         * Makefile: Use tab as first character in every line that contains rule
68675         commands.
68677 2011-11-13  Bruno Haible  <bruno@clisp.org>
68679         Syntax check for copyright statements.
68680         * check-copyright: New file.
68681         * Makefile (sc_check_copyright): New rule.
68683 2011-11-13  Simon Josefsson  <simon@josefsson.org>
68685         * build-aux/git-version-gen: Add --prefix to configure the tag
68686         match string.
68688 2011-11-13  Simon Josefsson  <simon@josefsson.org>
68690         * build-aux/git-version-gen: Add --help and --version.
68692 2011-11-12  Jim Meyering  <meyering@redhat.com>
68694         revamp the other test-exclude?.sh scripts to use init.sh, too
68695         * tests/test-exclude1.sh: Use init.sh.
68696         * tests/test-exclude2.sh: Likewise.
68697         * tests/test-exclude3.sh: Likewise.
68698         * tests/test-exclude4.sh: Likewise.
68699         * tests/test-exclude5.sh: Likewise.
68700         * tests/test-exclude6.sh: Likewise.
68701         * tests/test-exclude7.sh: Likewise.
68702         * tests/test-exclude8.sh: Likewise.
68703         * modules/exclude-tests (Files): List init.sh.
68705         test-exclude2.sh, test-exclude5.sh: fail if test-exclude fails
68706         These shell scripts ignored failure of the binary test-exclude,
68707         so making the latter return 77 didn't cause them to be skipped.
68708         * tests/test-exclude5.sh: Exit with test-exclude's error status
68709         when that program fails.  Revamp to use init.sh.
68710         * tests/test-exclude2.sh: Likewise.
68712         test-exclude: fix a typo
68713         * tests/test-exclude.c (main): Test for "leading_dir", not "leading-dir".
68715 2011-11-11  Bruno Haible  <bruno@clisp.org>
68717         obstack: Fix compilation error on MSVC 9.
68718         * lib/obstack.c (print_and_abort): Declare with _Noreturn specifier.
68720 2011-11-11  Jim Meyering  <meyering@redhat.com>
68722         test-exclude: skip tests rather than failing on deficient systems
68723         * tests/test-exclude.c (main): Skip tests that use FNM_CASEFOLD
68724         and FNM_LEADING_DIR on systems that lack the definitions.  This affects
68725         at least Solaris 9.  Reported and diagnosed by Dagobert Michelsen in
68726         http://thread.gmane.org/gmane.comp.gnu.grep.bugs/3947/focus=3950
68728 2011-11-10  Bruno Haible  <bruno@clisp.org>
68730         ptsname_r test: Avoid gcc warning on glibc systems.
68731         * tests/test-ptsname_r.c (null_ptr): New function.
68732         (test_errors): Use it.
68734 2011-11-10  Bruno Haible  <bruno@clisp.org>
68736         ptsname_r: Avoid compilation error on OSF/1 5.1.
68737         * lib/stdlib.in.h (ptsname_r): Override if REPLACE_PTSNAME_R is 1.
68738         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_PTSNAME_R.
68739         * m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): Set REPLACE_PTSNAME_R if the
68740         function is not declared or incompatibly declared.
68741         * modules/stdlib (Makefile.am): Substitute REPLACE_PTSNAME_R.
68742         * modules/ptsname_r (Depends-on, configure.ac): Update.
68743         * doc/glibc-functions/ptsname_r.texi: Mention the OSF/1 problems.
68745 2011-11-10  Bruno Haible  <bruno@clisp.org>
68747         fstatat: Make cross-compilation guess succeed everywhere except on AIX.
68748         * m4/fstatat.m4 (gl_FUNC_FSTATAT): Require AC_CANONICAL_HOST.
68749         When cross-compiling, guess yes on all platforms except AIX.
68750         Reported by Ludovic Courtès <ludo@gnu.org>.
68752 2011-11-09  Bruno Haible  <bruno@clisp.org>
68754         ptsname_r tests: Fix bugs.
68755         * tests/test-ptsname_r.c (test_errors): Change return type to 'void'.
68756         Fix ptsname_r calls. Reduce loop rounds to a reasonable amount.
68758 2011-11-09  Paul Eggert  <eggert@cs.ucla.edu>
68760         fstatat: work with cross-compilation
68761         Problem reported by Ludovic Courtès in
68762         <http://lists.gnu.org/r/bug-gnulib/2011-11/msg00136.html>.
68763         * m4/fstatat.m4 (gl_FUNC_FSTATAT): When cross-compiling, report
68764         "cross-compiling" and assume the bug is present.  Replace
68765         FSTATAT_ZERO_FLAG_BROKEN with HAVE_WORKING_FSTATAT_ZERO_FLAG with
68766         an inverted sense, to be more conservative about our assumptions.
68767         * lib/fstatat.c (rpl_fstatat): Adjust to renamed macro.
68769 2011-11-09  Bruno Haible  <bruno@clisp.org>
68771         Improve MODULES.html output.
68772         * modules/mkfifoat (Description): Use the word "function".
68773         * modules/readlinkat (Description): Likewise.
68774         * modules/symlinkat (Description): Likewise.
68776 2011-11-09  Eric Blake  <eblake@redhat.com>
68778         ptsname_r-tests: new test module
68779         * modules/ptsname_r-tests: New module.
68780         * tests/test-ptsname_r.c: New file.
68782         ptsname_r: new module
68783         * modules/ptsname_r: New module.
68784         * m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): New file.
68785         * lib/ptsname.c (__ptsname_r): Split...
68786         * lib/ptsname_r.c: ...into new file.
68787         * m4/stdlib_h.m4 (gl_STDLIB_H): Check for decl.
68788         (gl_STDLIB_H_DEFAULTS): Set witness defaults.
68789         * modules/stdlib (Makefile.am): Substitute witnesses.
68790         * lib/stdlib.in.h (ptsname_r): Declare it.
68791         * doc/glibc-functions/ptsname_r.texi (ptsname_r): Document it.
68792         * MODULES.html.sh (Misc): Likewise.
68793         * modules/ptsname (Depends-on): Alter dependency.
68794         * doc/posix-functions/ptsname.texi (ptsname): Mention new module.
68796 2011-11-09  Jim Meyering  <meyering@redhat.com>
68798         announce-gen: be more concise when there's only one URL+tarball
68799         * build-aux/announce-gen (get_tool_versions): When you distribute
68800         only one type of tarball, combine the first two "Here are..."
68801         sections and make the key-checking grammar independent of
68802         how many tarballs there are.
68804 2011-11-09  Eric Blake  <eblake@redhat.com>
68806         openpty: provide a stub on mingw
68807         * lib/pty.in.h (includes): Provide forward declarations.
68808         * lib/openpty.c (openpty) [mingw]: Provide ENOSYS stub.
68810         raise: fix mingw handling of SIGPIPE
68811         * lib/sigprocmask.c (_gl_raise_SIGPIPE): Provide a return value.
68813 2011-11-08  Bruno Haible  <bruno@clisp.org>
68815         More conditional dependencies.
68816         * modules/faccessat (Depends-on): Add conditions.
68817         * modules/fchmodat (Depends-on): Likewise.
68818         * modules/fchownat (Depends-on): Likewise.
68819         * modules/fstatat (Depends-on): Likewise.
68820         * modules/mkfifoat (Depends-on): Likewise.
68821         * modules/readlinkat (Depends-on): Likewise.
68822         * modules/symlinkat (Depends-on): Likewise.
68823         * modules/unlinkat (Depends-on): Likewise.
68824         * modules/utimensat (Depends-on): Likewise.
68825         * modules/mkdirat (Depends-on): Add sys_stat. Add conditions.
68826         * modules/linkat (Depends-on): Refine the conditions.
68827         * modules/renameat (Depends-on): Likewise.
68829 2011-11-08  Bruno Haible  <bruno@clisp.org>
68831         faccessat: Move AC_LIBOBJ invocation to module description.
68832         * m4/faccessat.m4 (gl_PREREQ_FACCESSAT): New macro.
68833         (gl_FUNC_FACESSAT): Don't test for access() here. Move AC_LIBOBJ
68834         invocation from here...
68835         * modules/faccessat (configure.ac): ... to here. Invoke
68836         gl_PREREQ_FACCESSAT.
68838 2011-11-08  Bruno Haible  <bruno@clisp.org>
68840         faccessat: Simplify autoconf macro.
68841         * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Don't require gl_FUNC_OPENAT,
68842         gl_FUNC_EUIDACCESS.
68844 2011-11-08  Bruno Haible  <bruno@clisp.org>
68846         renameat: Fix dependencies.
68847         * modules/renameat (Depends-on): Add stdbool.
68849 2011-11-08  Bruno Haible  <bruno@clisp.org>
68851         mkfifoat: Fix module description.
68852         * modules/mkfifoat (configure.ac): Invoke gl_SYS_STAT_MODULE_INDICATOR,
68853         not gl_UNISTD_MODULE_INDICATOR.
68855 2011-11-08  Bruno Haible  <bruno@clisp.org>
68857         fstatat: Remove unused dependency.
68858         * modules/fstatat (Depends-on): Remove fstat.
68860 2011-11-08  Simon Josefsson  <simon@josefsson.org>
68862         GNUmakefile: behave when Makefile is missing.
68863         * top/GNUmakefile: Always initialize _build-aux and _autoreconf.
68865 2011-11-08  Bruno Haible  <bruno@clisp.org>
68867         openat: Conditionalize dependencies.
68868         * lib/openat.c: Reduce the scope of some #includes.
68869         * modules/openat (Depends-on): Add conditions.
68871 2011-11-07  Jim Meyering  <meyering@redhat.com>
68873         maint.mk: extract GPG key ID without using a temporary file
68874         * top/maint.mk (gpg_key_ID): Extract GPG key ID from signed tag, but
68875         without using a temporary file.  Based on a suggestion from Werner Koch
68876         in http://thread.gmane.org/gmane.comp.encryption.gpg.devel/16496
68878 2011-11-07  Eric Blake  <eblake@redhat.com>
68880         grantpt: fix typo
68881         * lib/stdlib.in.h (grantpt): Check correct function.
68883         maint.mk: silence new syntax check
68884         * top/maint.mk (sc_prohibit_dirent_without_use): Add missing @.
68886 2011-11-06  Bruno Haible  <bruno@clisp.org>
68888         Doc about floating-point and math API.
68889         * doc/posix-headers/float.texi: Mention problem with FLT_ROUNDS.
68890         * doc/posix-headers/math.texi: Mention problem with math_errhandling.
68892 2011-11-06  Bruno Haible  <bruno@clisp.org>
68894         stdalign tests: Skip the test when compiled by Sun C.
68895         * tests/test-stdalign.c (main): Skip the test on Sun C.
68897 2011-11-06  Bruno Haible  <bruno@clisp.org>
68899         ansi-c++-opt: Complete the 2011-06-05 change.
68900         * m4/ansi-c++.m4 (gl_PROG_ANSI_CXX): When a C++ compiler is found but
68901         does not support namespaces, set the variable to "no", not to ":".
68903 2011-11-06  Paul Eggert  <eggert@cs.ucla.edu>
68905         * doc/posix-headers/stdalign.texi (stdalign.h): Mention Sun review ID.
68907 2011-11-06  Bruno Haible  <bruno@clisp.org>
68909         copysignl: Fix result for zero argument on HP-UX 11 with HP C.
68910         * lib/copysignl.c (compute_minus_zerol) [HP-UX]: New function.
68911         (minus_zerol) [HP-UX]: New macro.
68912         (unary_minus) [HP-UX]: New function.
68913         (copysignl) [HP-UX]: Use unary_minus function.
68915 2011-11-06  Bruno Haible  <bruno@clisp.org>
68917         ldexp, ldexpf, ldexpl: Enhance tests.
68918         * tests/test-ldexp.h: New file, combining code from tests/test-ldexp.c
68919         and tests/test-ldexpl.c.
68920         * tests/test-ldexpl.c: (DOUBLE, ISNAN, INFINITY, NAN, L_, MINUS_ZERO,
68921         LDEXP, MIN_EXP, MAX_EXP): New macros.
68922         Include test-ldexp.h.
68923         (main): Just call test_function.
68924         * tests/test-ldexp.c: Include float.h, isnand-nolibm.h, minus-zero.h,
68925         infinity.h, nan.h.
68926         (DOUBLE, ISNAN, INFINITY, NAN, L_, MINUS_ZERO, LDEXP, MIN_EXP,
68927         MAX_EXP): New macros.
68928         Include test-ldexp.h.
68929         (x, y): Remove variables.
68930         (main): Just call test_function.
68931         * tests/test-ldexpf.c: Include float.h, isnanf-nolibm.h, minus-zero.h,
68932         infinity.h, nan.h.
68933         (DOUBLE, ISNAN, INFINITY, NAN, L_, MINUS_ZERO, LDEXP, MIN_EXP,
68934         MAX_EXP): New macros.
68935         Include test-ldexp.h.
68936         (x, y): Remove variables.
68937         (main): Just call test_function.
68938         * modules/ldexpl-tests (Files): Add tests/test-ldexp.h.
68939         * modules/ldexp-tests (Files): Add tests/test-ldexp.h,
68940         tests/minus-zero.h, tests/infinity.h, tests/nan.h.
68941         (Depends-on): Add isnand-nolibm, signbit, float.
68942         * modules/ldexpf-tests (Files): Add tests/test-ldexp.h,
68943         tests/minus-zero.h, tests/infinity.h, tests/nan.h.
68944         (Depends-on): Add isnanf-nolibm, signbit, float.
68946 2011-11-06  Bruno Haible  <bruno@clisp.org>
68948         math tests: Cosmetics.
68949         * tests/test-math-c++.cc: Reorder declarations.
68951 2011-11-05  Bruno Haible  <bruno@clisp.org>
68953         fma*: Simplify test.
68954         * tests/test-fma2.h (FORGIVE_GLIBC_BUG): Remove macro.
68955         (test_function): Remove all if (FORGIVE_GLIBC_BUG) statements.
68957         Tests for module 'fmal'.
68958         * modules/fmal-tests: New file.
68959         * tests/test-fmal1.c: New file.
68960         * tests/test-fmal2.c: New file.
68962         New module 'fmal'.
68963         * lib/math.in.h (fmal): New declaration.
68964         * lib/fmal.c: New file.
68965         * m4/fmal.m4: New file.
68966         * m4/math_h.m4 (gl_MATH_H): Test whethern fmal is declared.
68967         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FMAL, HAVE_FMAL, REPLACE_FMAL.
68968         * modules/math (Makefile.am): Substitute GNULIB_FMAL, HAVE_FMAL,
68969         REPLACE_FMAL.
68970         * modules/fmal: New file.
68971         * doc/posix-functions/fmal.texi: Mention the new module and the various
68972         bugs.
68974         Tests for module 'fmaf'.
68975         * modules/fmaf-tests: New file.
68976         * tests/test-fmaf1.c: New file.
68977         * tests/test-fmaf2.c: New file.
68979         New module 'fmaf'.
68980         * lib/math.in.h (fmaf): New declaration.
68981         * lib/fmaf.c: New file.
68982         * m4/fmaf.m4: New file.
68983         * m4/math_h.m4 (gl_MATH_H): Test whethern fmaf is declared.
68984         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FMAF, HAVE_FMAF, REPLACE_FMAF.
68985         * modules/math (Makefile.am): Substitute GNULIB_FMAF, HAVE_FMAF,
68986         REPLACE_FMAF.
68987         * modules/fmaf: New file.
68988         * doc/posix-functions/fmaf.texi: Mention the new module and the various
68989         bugs.
68991         Tests for module 'fma'.
68992         * modules/fma-tests: New file.
68993         * tests/test-fma1.c: New file.
68994         * tests/test-fma1.h: New file.
68995         * tests/test-fma2.c: New file.
68996         * tests/test-fma2.h: New file.
68998         New module 'fma'.
68999         * lib/math.in.h (fma): New declaration.
69000         * lib/fma.c: New file.
69001         * m4/fma.m4: New file.
69002         * m4/fegetround.m4: New file.
69003         * m4/math_h.m4 (gl_MATH_H): Test whethern fma is declared.
69004         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FMA, HAVE_FMA, REPLACE_FMA.
69005         * modules/math (Makefile.am): Substitute GNULIB_FMA, HAVE_FMA,
69006         REPLACE_FMA.
69007         * modules/fma: New file.
69008         * doc/posix-functions/fma.texi: Mention the new module and the various
69009         bugs.
69011         Extend gl_MATHFUNC.
69012         * m4/mathfunc.m4 (gl_MATHFUNC): Accept an 4th parameter of INCLUDES.
69013         Support 'void' as argument type.
69014         * m4/rint.m4 (gl_FUNC_RINT): Update gl_MATHFUNC invocation.
69016 2011-11-05  Jim Meyering  <meyering@redhat.com>
69018         maint.mk: also prohibit inclusion of dirent.h without use
69019         * top/maint.mk (sc_prohibit_dirent_without_use): New rule.
69021 2011-11-05  Bruno Haible  <bruno@clisp.org>
69023         ldexpl tests: Avoid test failure on MSVC 9.
69024         * tests/test-ldexpl.c (main): Use a temporary variable for the expected
69025         value. Needed in order to enforce the conversion from a value greater
69026         than LDBL_MAX to Infinity.
69028 2011-11-05  Bruno Haible  <bruno@clisp.org>
69030         New modules 'at-internal', 'openat-h', split off from module 'openat'.
69031         * modules/at-internal: New file, extracted from modules/openat.
69032         * modules/openat-h: New file.
69033         * m4/openat.m4 (gl_FUNC_OPENAT): Don't set GNULIB_OPENAT. Don't
69034         invoke gl_PREREQ_OPENAT and gl_MODULE_INDICATOR.
69035         * modules/openat (Description): Add reference to POSIX function.
69036         (Files): Remove lib/openat.h, lib/openat-proc.c.
69037         (Depends-on): Add at-internal, openat-h. Remove fdopendir, gettext-h,
69038         intprops, unistd.
69039         (configure.ac): Remove AC_LIBOBJ of openat-proc. Invoke
69040         gl_PREREQ_OPENAT, gl_MODULE_INDICATOR here. Invoke
69041         gl_FCNTL_MODULE_INDICATOR.
69042         (Include): Remove unistd.h, openat.h.
69043         * modules/areadlinkat (Files): Add lib/at-func.c.
69044         (Depends-on): Add at-internal, dosname, errno, extensions, fchdir,
69045         openat-die, openat-h, save-cwd.
69046         * modules/areadlinkat-with-size (Files): Add lib/at-func.c.
69047         (Depends-on): Add at-internal, dosname, errno, extensions, fchdir,
69048         openat-die, openat-h, save-cwd, unistd.
69049         * modules/faccessat (Files): Add lib/at-func.c, lib/openat-priv.h.
69050         (Depends-on): Add at-internal, dosname, errno, fchdir, openat-die,
69051         openat-h, save-cwd. Remove fcntl-h, openat.
69052         * modules/fchmodat (Files): Remove lib/openat.h.
69053         (Depends-on): Add at-internal, openat-h. Remove dirent, fcntl-h,
69054         openat, stdbool, unistd.
69055         * modules/fchownat (Files): Remove lib/openat.h.
69056         (Depends-on): Add at-internal, openat-h. Remove dirent, fcntl-h,
69057         openat, stdbool, sys_stat.
69058         * modules/fdopendir (Files): Remove lib/openat-priv.h,
69059         lib/openat-proc.c.
69060         (Depends-on): Add at-internal.
69061         (condigure.ac): Remove AC_LIBOBJ of openat-proc.
69062         * modules/fstatat (Files): Remove lib/openat.h.
69063         (Depends-on): Add at-internal, openat-h. Remove dirent, openat,
69064         stdbool, unistd.
69065         * modules/fts (Depends-on): Add openat-h.
69066         * modules/linkat (Depends-on): Add at-internal, openat-h. Remove
69067         openat.
69068         * modules/mkdirat (Files): Remove lib/openat.h.
69069         (Depends-on): Add at-internal, openat-h. Remove dirent, fcntl-h,
69070         openat, stdbool, sys_stat.
69071         * modules/mkfifoat (Files): Add lib/at-func.c.
69072         (Depends-on): Add at-internal, dosname, errno, fchdir, openat-die,
69073         openat-h, save-cwd. Remove fcntl-h, openat.
69074         * modules/openat-die (Depends-on): Add openat-h. Remove openat.
69075         * modules/readlinkat (Files): Add lib/at-func.c.
69076         (Depends-on): Add at-internal, dosname, errno, fchdir, openat-die,
69077         openat-h, save-cwd. Remove fcntl-h, openat.
69078         * modules/renameat (Depends-on): Add at-internal, openat-h. Remove
69079         openat.
69080         * modules/selinux-at (Files): Add lib/at-func.c.
69081         (Depends-on): Add at-internal, dosname, errno, extensions, fchdir,
69082         fcntl-h, openat-die, openat-h, save-cwd, unistd. Remove openat.
69083         * modules/symlinkat (Files): Add lib/at-func.c.
69084         (Depends-on): Add at-internal, dosname, errno, fchdir, openat-die,
69085         openat-h, save-cwd. Remove fcntl-h, openat.
69086         * modules/unlinkat (Files): Remove lib/openat.h.
69087         (Depends-on): Add at-internal, openat-h. Remove dirent, openat,
69088         stdbool.
69089         * modules/utimensat (Files): Add lib/at-func.c.
69090         (Depends-on): Add at-internal, dosname, errno, fchdir, fcntl-h,
69091         openat-die, openat-h, save-cwd.
69092         * modules/fchownat-tests (Depends-on): Add openat-h. Remove openat.
69093         * modules/fdutimensat-tests (Depends-on): Add openat.
69094         * modules/fstatat-tests (Depends-on): Add openat-h.
69095         * modules/readlinkat-tests (Depends-on): Add openat.
69096         * modules/symlinkat-tests (Depends-on): Add openat.
69098 2011-11-05  Bruno Haible  <bruno@clisp.org>
69100         openat: Include <stdbool.h>.
69101         * lib/openat.c: Include <stdbool.h>.
69103 2011-11-04  Bruno Haible  <bruno@clisp.org>
69105         fchownat, renameat, unlinkat: Fix dependencies.
69106         * modules/fchownat (Depends-on): Add fstatat.
69107         * modules/renameat (Depends-on): Likewise.
69108         * modules/unlinkat (Depends-on): Likewise.
69110 2011-11-04  Paul Eggert  <eggert@cs.ucla.edu>
69112         openat: remove direct dependency on dirent
69113         * lib/openat.h: Don't include <dirent.h>; it's no longer needed,
69114         and hasn't been needed ever since fdopendir was split into its own
69115         module on 2009-08-31.
69116         * modules/openat (Depends-on): Remove dirent.
69118 2011-11-04  Bruno Haible  <bruno@clisp.org>
69120         renameat: Optimize code size.
69121         * modules/renameat (configure.ac): Don't compile at-func2.c if
69122         REPLACE_RENAMEAT is 1.
69124 2011-11-04  Bruno Haible  <bruno@clisp.org>
69126         openat tests: Fix file list.
69127         * modules/openat-tests (Files): Add tests/test-open.h.
69129 2011-11-04  Bruno Haible  <bruno@clisp.org>
69131         openat, fchmodat, fchownat, linkat, renameat: Fix dependencies.
69132         * modules/fchmodat (Depends-on): Add openat-die.
69133         * modules/fchownat (Depends-on): Likewise.
69134         * modules/linkat (Depends-on): Likewise.
69135         * modules/renameat (Depends-on): Likewise.
69136         * modules/openat (Depends-on): Add dirent.
69138 2011-11-04  Jim Meyering  <meyering@redhat.com>
69140         at-func*.c: fix comments
69141         * lib/at-func2.c: Correct/improve first-line comment.
69142         * lib/at-func.c: Correct grammar in first-line comment.
69144 2011-11-04  Bruno Haible  <bruno@clisp.org>
69146         New module 'mkdirat', split off from module 'openat'.
69147         * m4/mkdirat.m4: New file. extracted from m4/openat.m4.
69148         * m4/openat.m4 (gl_FUNC_OPENAT): Don't require gl_SYS_STAT_H_DEFAULTS.
69149         Don't test for mkdirat. Don't set GNULIB_MKDIRAT, HAVE_MKDIRAT.
69150         * modules/mkdirat: New file, extracted from modules/openat.
69151         * modules/openat (Files): Remove lib/mkdirat.c.
69152         (Depends-on): Remove mkdir.
69153         (configure.ac): Remove AC_LIBOBJ of mkdirat.
69154         (Include): Remove <sys/stat.h>.
69155         * modules/mkdirat-tests: New file, extracted from modules/openat-tests.
69156         * modules/openat-tests (Files): Remove tests/test-mkdirat.c,
69157         tests/test-mkdir.h.
69158         (Depends-on): Remove ignore-value.
69159         (Makefile.am): Remove rules for test-mkdirat.
69160         * doc/posix-functions/mkdirat.texi: Mention module 'mkdirat' instead
69161         of module 'openat'.
69162         * NEWS: Mention the change.
69164 2011-11-04  Bruno Haible  <bruno@clisp.org>
69166         closedir: Avoid warning on mingw.
69167         * lib/closedir.c: Include <unistd.h>.
69169 2011-11-04  Bruno Haible  <bruno@clisp.org>
69171         New module 'fstatat', split off from module 'openat'.
69172         * lib/openat.h (statat, lstatat): Enable only if GNULIB_FSTATAT is
69173         defined.
69174         * m4/fstatat.m4: New file. extracted from m4/openat.m4.
69175         * m4/openat.m4 (gl_FUNC_OPENAT): Don't set GNULIB_FSTATAT. Don't invoke
69176         gl_FUNC_FSTATAT.
69177         (gl_FUNC_FSTATAT): Moved to m4/fstatat.m4.
69178         * modules/fstatat: New file, extracted from modules/openat.
69179         * modules/openat (Files): Remove lib/fstatat.c.
69180         (Depends-on): Remove lstat.
69181         (configure.ac): Remove AC_LIBOBJ of fstatat.
69182         * modules/fstatat-tests: New file, extracted from modules/openat-tests.
69183         * modules/openat-tests (Files): Remove tests/test-fstatat.c,
69184         tests/test-lstat.h, tests/test-stat.h.
69185         (Depends-on): Remove getcwd-lgpl.
69186         (Makefile.am): Remove rules for test-fstatat.
69187         * doc/posix-functions/fstatat.texi: Mention module 'fstatat' instead
69188         of module 'openat'.
69189         * NEWS: Mention the change.
69190         * modules/getcwd (Depends-on): Add fstatat.
69191         * modules/linkat (Depends-on): Likewise.
69192         * modules/mkfifoat-tests (Depends-on): Likewise.
69193         * modules/utimensat (Depends-on): Add fstatat. Remove openat.
69195 2011-11-03  Bruno Haible  <bruno@clisp.org>
69197         New module 'unlinkat', split off from module 'openat'.
69198         * m4/unlinkat.m4: New file, extracted from m4/openat.m4.
69199         * m4/openat.m4 (gl_FUNC_OPENAT): Don't set GNULIB_UNLINKAT,
69200         REPLACE_UNLINKAT, HAVE_UNLINKAT. Don't test for unlinkat.
69201         * modules/unlinkat: New file, extracted from modules/openat. Correct
69202         the dependency conditions.
69203         * modules/openat (Files): Remove lib/unlinkat.c.
69204         (Depends-on): Remove rmdir, unlink.
69205         (configure.ac): Remove AC_LIBOBJ of unlinkat.
69206         * modules/unlinkat-tests: New file, extracted from modules/openat-tests.
69207         * modules/openat-tests (Files): Remove tests/test-unlinkat.c,
69208         tests/test-rmdir.h, tests/test-unlink.h.
69209         (Depends-on): Remove unlinkdir.
69210         (Makefile.am): Remove rules for test-unlinkat.
69211         * doc/posix-functions/unlinkat.texi: Mention module 'unlinkat' instead
69212         of module 'openat'.
69213         * NEWS: Mention the change.
69214         * modules/linkat-tests (Depends-on): Add unlinkat.
69215         * modules/mkfifoat-tests (Depends-on): Likewise.
69216         * modules/readlinkat-tests (Depends-on): Likewise.
69218 2011-11-02  Bruno Haible  <bruno@clisp.org>
69220         New module 'fchmodat', split off from module 'openat'.
69221         * lib/openat.h (chmodat, lchmodat): Enable only if GNULIB_FCHMODAT is
69222         defined.
69223         * m4/fchmodat.m4: New file, extracted from m4/openat.m4.
69224         * m4/openat.m4 (gl_FUNC_OPENAT): Don't set GNULIB_FCHMODAT. Don't test
69225         for fchmodat, lchmod. Don't set HAVE_FCHMODAT.
69226         * modules/fchmodat: New file, extracted from modules/openat.
69227         * modules/openat (Files): Remove lib/fchmodat.c.
69228         (configure.ac): Remove AC_LIBOBJ of fchmodat.
69229         * modules/fchmodat-tests: New file, extracted from modules/openat-tests.
69230         * modules/openat-tests (Files): Remove tests/test-fchmodat.c.
69231         (Makefile.am): Remove rules for test-fchmodat.
69232         * doc/posix-functions/fchmodat.texi: Mention module 'fchmodat' instead
69233         of module 'openat'.
69234         * NEWS: Mention the change.
69236 2011-11-02  Jim Meyering  <meyering@redhat.com>
69238         putenv: indent #definition of "environ" to placate cppi
69239         * lib/putenv.c (environ): Make indentation reflect cpp nesting.
69241         gitlog-to-changelog: provide a ChangeLog-repair mechanism
69242         Git logs are often treated as immutable, because editing them
69243         changes the SHA1 checksums of all descendants.  Thus, errors in
69244         git logs tend to stay there forever.  However, when we generate
69245         a ChangeLog file -- typically for distribution -- from that git log,
69246         we can actually make corrections in the generated file.  The key
69247         lies in recording in machine-readable/applicable form the desired
69248         corrections.  See --help for description and an example.
69249         * build-aux/gitlog-to-changelog (parse_amend_file): New function.
69250         (usage): Describe it; alphabetize option descriptions.
69251         (main): Honor the new option, carefully.
69253 2011-11-01  Jim Meyering  <meyering@redhat.com>
69255         gitlog-to-changelog: avoid an infloop
69256         * build-aux/gitlog-to-changelog: Don't infloop for a commit log
69257         that ends up being empty.
69259 2011-11-01  Paul Eggert  <eggert@cs.ucla.edu>
69261         * MODULES.html.sh: Fix sed-script shell quoting and locale issues.
69262         (func_module): Replace foo=` ... sed -e COMPLICATED ... ` with
69263         bar=COMPLICATED; foo=` ... sed -e "$bar" ... ` when COMPLICATED
69264         contains (possibly-quoted) backslashes.  This should avoid
69265         all-too-common shell bugs if COMPLICATED contains backslashes in
69266         the "wrong" places.  Reported by David Evans in
69267         <http://lists.gnu.org/r/bug-gnulib/2011-11/msg00013.html>.
69268         When 'sed' uses character ranges like A-Z, invoke it in the C locale,
69269         because we want ASCII ranges.  Is there some reason we don't use
69270         the C locale everywhere in this script?
69271         (func_module, top level): Avoid unwanted pathname expansion when
69272         $repo_url_prefix or $repo_url_suffix_repl contain shell
69273         metacharacters like '?' and '*'.
69275 2011-11-01  Bruno Haible  <bruno@clisp.org>
69277         fchownat: Improve description.
69278         * modules/fchownat (Description): Add link to function.
69280 2011-11-01  Paul Eggert  <eggert@cs.ucla.edu>
69282         * tests/test-stdalign.c (TEST_ALIGNMENT): Shrink back to 8.
69283         mingw supports alignments only up to 8 (!).  Reported by Bruno Haible in
69284         <http://lists.gnu.org/r/bug-gnulib/2011-11/msg00006.html>.
69285         * doc/posix-headers/stdalign.texi (stdalign.h): Document this.
69287 2011-11-01  Bruno Haible  <bruno@clisp.org>
69289         alignof: Avoid collision with stdalign module.
69290         * lib/alignof.h (alignof): Remove macro.
69291         * NEWS: Mention the change.
69292         Reported by Paul Eggert.
69294 2011-11-01  Bruno Haible  <bruno@clisp.org>
69296         New module 'fchownat', split off from module 'openat'.
69297         * lib/openat.h (chownat, lchownat): Enable only if GNULIB_FCHOWNAT is
69298         defined.
69299         * m4/fchownat.m4: New file, extracted from m4/openat.m4.
69300         * m4/openat.m4 (gl_FUNC_OPENAT): Don't set GNULIB_FCHOWNAT. Don't
69301         invoke gl_FUNC_FCHOWNAT.
69302         (gl_FUNC_FCHOWNAT_DEREF_BUG, gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG,
69303         gl_FUNC_FCHOWNAT): Moved to m4/fchownat.m4.
69304         * modules/fchownat: New file, extracted from modules/openat.
69305         * modules/openat (Files): Remove lib/fchownat.c.
69306         (Depends-on): Remove lchown.
69307         (configure.ac): Remove AC_LIBOBJ of fchownat.
69308         * modules/fchownat-tests: New file, extracted from modules/openat-tests.
69309         * modules/openat-tests (Files): Remove tests/test-fchownat.c,
69310         tests/test-chown.h, tests/test-lchown.h, tests/nap.h.
69311         (Depends-on): Remove mgetgroups, usleep, stat-time.
69312         (configure.ac): Remove test for getegid.
69313         (Makefile.am): Remove rules for test-fchownat.
69314         * doc/posix-functions/fchownat.texi: Mention module 'fchownat' instead
69315         of module 'openat'.
69316         * NEWS: Mention the change.
69318 2011-10-31  Paul Eggert  <eggert@cs.ucla.edu>
69320         stdalign: port better to MSVC and to Sun C 5.11
69321         This fixes some of the problems reported by Bruno Haible in
69322         <http://lists.gnu.org/r/bug-gnulib/2011-10/msg00300.html>.
69323         * doc/posix-headers/stdalign.texi (stdalign.h): Document more
69324         shortcomings of MSVC and of Sun C 5.11.
69325         * lib/stdalign.in.h (_Alignas): Omit bogus extra parenthesis
69326         around __declspec arg.
69327         * modules/stdalign-tests (Files): Add tests/macros.h.
69328         * tests/test-stdalign.c: Do not include <stdlib.h>; no longer needed.
69329         Include macros.h, for ASSERT.
69330         (DECLARE_ALIGNED): Remove.
69331         (TEST_ALIGNMENT): Define to 16 if alignment is supported (more likely
69332         to catch bug), and to 1 if not (simplifies the rest of the code).
69333         (CHECK_STATIC): Always declare the alignment test vars; that's simpler.
69334         (CHECK_AUTO): Remove.
69335         (CHECK_ALIGNED): Check only the alignment of the static vars,
69336         since auto var alignment isn't supported by Sun C 5.11.
69337         (CHECK_TYPES): Remove.  All uses replaced by inline code, so that
69338         ASSERT failures are easier to diagnose.
69340 2011-10-31  Bruno Haible  <bruno@clisp.org>
69342         doc about some IRIX 5.3 problems.
69343         * doc/posix-functions/getpwnam_r.texi: Mention incompatible declaration
69344         on IRIX 5.3.
69345         * doc/posix-headers/poll.texi: Mention missing nfds_t on IRIX 5.3.
69346         * doc/posix-functions/ptsname.texi: Mention missing declaration on IRIX
69347         5.3.
69348         * doc/posix-functions/grantpt.texi: Likewise.
69349         * doc/posix-functions/unlockpt.texi: Likewise.
69350         * doc/posix-functions/lgamma.texi: Likewise.
69351         * doc/posix-functions/nextafter.texi: Likewise.
69352         * doc/posix-functions/remainder.texi: Likewise.
69353         * doc/posix-functions/select.texi: Mention misplaced declaration on
69354         IRIX 5.3.
69355         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
69357 2011-10-31  Dmitry V. Levin  <ldv@altlinux.org>
69359         gitlog-to-changelog: fix git-log invocation.
69360         git-log mishandles date strings before 1970-01-01 UTC, and there is
69361         no use to specify --since=1970-01-01 by default anyway.
69362         * build-aux/gitlog-to-changelog: By default, when no --since option
69363         was given, do not specify explicit --since option to git-log.
69365 2011-10-30  Dmitry V. Levin  <ldv@altlinux.org>
69367         gitlog-to-changelog: new option --append-dot.
69368         * build-aux/gitlog-to-changelog: New option --append-dot, makes the
69369         first non-blank line of each commit message terminated with a dot.
69371 2011-10-30  Bruno Haible  <bruno@clisp.org>
69373         ffsl, ffsll: Avoid compilation error due to 'restrict'.
69374         * lib/ffsl.h: Include <config.h>.
69375         Suggested by Tom G. Christensen <tgc@jupiterrise.com>.
69377 2011-10-30  Jim Meyering  <meyering@redhat.com>
69379         GNUmakefile: reenable "make syntax-check" for most projects
69380         Since Friday's commit 05e2d798, "maint.mk: don't maintain a second
69381         build-aux variable", "syntax-check" would do nothing but succeed with
69382         the "No version control files detected..." diagnostic (unless you
69383         happened to override _build-aux via cfg.mk).
69384         * top/GNUmakefile (_autoreconf, _build-aux): Move default definitions
69385         to precede inclusion of maint.mk.  Otherwise, these variables would
69386         be used undefined in any project that does not override the default.
69388 2011-10-29  Dmitry V. Levin  <ldv@altlinux.org>
69390         gitlog-to-changelog: treat a message with only blank lines as empty.
69391         * build-aux/gitlog-to-changelog: Move the code that removes leading and
69392         trailing blank lines before the code that issues a warning about an
69393         empty commit message.
69395 2011-10-30  Jim Meyering  <meyering@redhat.com>
69397         test-parse-datetime.c: avoid new DST-related false positive test failure
69398         * tests/test-parse-datetime.c (gmt_offset): Determine the "gmt_offset"
69399         based on the time/date we'll convert, not the current time.
69400         Otherwise, the moment we cross a DST boundary like today's in
69401         Europe, (CEST to CET), that offset ends up being one hour off.
69403 2011-10-27  Bruno Haible  <bruno@clisp.org>
69405         fstat: Tweak documentation.
69406         * modules/fstat (Description): More precise description.
69408 2011-10-27  Bruno Haible  <bruno@clisp.org>
69410         Update documentation regarding 'largefile' module.
69411         * doc/posix-functions/fstat.texi: Tweak wording.
69412         * doc/posix-functions/opendir.texi: Mention that the module fixes the
69413         problems with huge directories and/or small ino_t types.
69414         * doc/posix-functions/readdir.texi: Likewise.
69415         * doc/posix-functions/rewinddir.texi: Likewise.
69417 2011-10-28  Gary V. Vaughan  <gary@gnu.org>
69419         maint.mk: don't maintain a second build-aux variable.
69420         * maint.mk (build_aux): Removed.  The maintainer-makefile module
69421         depends on GNUmakefile, which already maintains a cfg.mk
69422         overridable $(_build-aux) for projects with a non-standard
69423         build-aux directory location, although without the $(srcdir)
69424         prefix.  Use that variable consistently instead of introducing a
69425         second one.  Adjust all call sites.
69427 2011-10-27  Paul Eggert  <eggert@cs.ucla.edu>
69429         Add stdalign module and use it in other modules.
69430         This is based on a previous proposal by Bruno Haible
69431         <https://lists.gnu.org/r/bug-gnulib/2011-07/msg00226.html>.
69433         stdalign: new module
69434         * doc/posix-headers/stdalign.texi, lib/stdalign.in.h, m4/stdalign.m4:
69435         * modules/stdalign: New files.
69436         * MODULES.html.sh (c1x_core_properties): Add stdalign.
69437         * doc/gnulib.texi (Header File Substitutes): Add stdalign.
69439         stdalign-tests: new module
69440         * modules/stdalign-tests, tests/test-stdalign.c: New files.
69442         argp: use stdalign
69443         * lib/argp-parse.c: Include <stdalign.h>.
69444         (alignof): Remove.
69445         * modules/argp (Depends-on): Add stdalign.
69447         crypto libraries: use stdalign
69448         * lib/md4.c, lib/md5.c, lib/sha1.c, lib/sha256.c, lib/sha512.c:
69449         Include <stdalign.h> and <stdint.h>.  Do not include <stddef.h>.
69450         Do not include <stdlib.h> twice, in md4.c.
69451         (UNALIGNED_P): Simplify by using alignof.  Use uintptr_t, not size_t,
69452         because we are accessing a pointer's bit-pattern, not a size.
69453         * modules/crypto/gc-md4 (Depends-on): Add stdalign.
69454         * modules/crypto/gc-md5, modules/crypto/gc-sha1, modules/crypto/md4:
69455         * modules/crypto/md5, modules/crypto/sha1, modules/crypto/sha256:
69456         * modules/crypto/sha512: Likewise.
69458         sys_socket: use stdalign, not alignof
69459         * lib/sys_socket.in.h: Include <stdalign.h> instead of <alignof.h>.
69460         * modules/sys_socket (Depends-on): Depend on stdalign, not alignof.
69462 2011-10-27  Bruno Haible  <bruno@clisp.org>
69464         raise test: Avoid a test failure on Linux/MIPS.
69465         * tests/test-raise.c (main): Try raising signal 199, not 99. Needed
69466         because 99 is a valid signal on Linux/MIPS.
69468 2011-10-27  Bruno Haible  <bruno@clisp.org>
69470         nonblocking tests: Fix test failure on Linux/MIPS.
69471         * tests/test-nonblocking-pipe.h (PIPE_DATA_BLOCK_SIZE) [Linux/MIPS]:
69472         Set to 270000.
69474 2011-10-27  Bruno Haible  <bruno@clisp.org>
69476         utimensat: Work around problem on Linux/hppa.
69477         * lib/utimensat.c (rpl_utimensat) [Linux/hppa]: Reject invalid tv_nsec
69478         values.
69479         * doc/posix-functions/utimensat.texi: Mention the problem on Linux/hppa.
69481 2011-10-25  Jim Meyering  <meyering@redhat.com>
69483         maint.mk: fix a bug in sc_prohibit_stddef_without_use
69484         * top/maint.mk (sc_prohibit_stddef_without_use): Don't require / *\(/
69485         after symbols like NULL, size_t, etc.
69486         Reported by Alfred M. Szmidt.
69488         maint.mk: exempt ENODATA from a syntax-check rule
69489         * top/maint.mk (gl_extract_significant_defines_): Also exempt ENODATA
69490         from the sc_prohibit_always-defined_macros syntax-check rule.
69491         Add a comment.  See this for more details:
69492         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28739/focus=28795
69494 2011-10-23  Jim Meyering  <meyering@redhat.com>
69496         fts: close parent dir FD before returning from post-traversal fts_read
69497         The problem: the fts-using "mkdir -p A/B; rm -rf A" would attempt to
69498         unlink A, even though an FD open on A remained.  This is suboptimal
69499         (holding a file descriptor open longer than needed), but otherwise not
69500         a problem on Unix-like kernels.  However, on Cygwin with certain Novell
69501         file systems, (see http://cygwin.com/ml/cygwin/2011-10/msg00365.html),
69502         that represents a real problem: it causes the removal of A to fail
69503         with e.g., "rm: cannot remove `A': Device or resource busy"
69505         fts visits each directory twice and keeps a cache (fts_fd_ring) of
69506         directory file descriptors.  After completing the final, FTS_DP,
69507         visit of a directory, RESTORE_INITIAL_CWD intended to clear the FD
69508         cache, but then proceeded to add a new FD to it via the subsequent
69509         FCHDIR (which calls cwd_advance_fd and i_ring_push).  Before, the
69510         final file descriptor would be closed only via fts_close's call to
69511         fd_ring_clear.  Now, it is usually closed earlier, via the final
69512         FTS_DP-returning fts_read call.
69513         * lib/fts.c (restore_initial_cwd): New function, converted from
69514         the macro.  Call fd_ring_clear *after* FCHDIR, not before it.
69515         Update callers.
69516         Reported by Franz Sirl via the above URL, with analysis by Eric Blake
69517         in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28739
69519 2011-10-23  Gary V. Vaughan  <gary@gnu.org>
69520             Bruno Haible  <bruno@clisp.org>
69521             Jim Meyering  <jim@meyering.net>
69523         readme-release: improve safety of release prep instructions.
69524         * README-release: Don't git pull all branches when only master
69525         is needed for the release process.
69526         Run make maintainer-clean before changing trees and merging.
69527         Don't try to run ./configure right after git pull in case files
69528         that influence the bootstrap process have changed, move the
69529         ./configure step to after running ./bootstrap.
69530         Don't bootstrap "one last time"... it's the first time!
69532 2011-10-22  Bruno Haible  <bruno@clisp.org>
69534         errno, strerror-override: Support for MSVC 10.
69535         * lib/errno.in.h (GNULIB_defined_ETXTBSY): Remove macro.
69536         (ENOMSG, EIDRM, ENOLINK, EPROTO, EBADMSG, EOVERFLOW, ENOTSUP,
69537         ENETRESET, ECONNABORTED, ECANCELED, EINPROGRESS, EALREADY, ENOTSOCK,
69538         EDESTADDRREQ, EMSGSIZE, EPROTOTYPE, ENOPROTOOPT, EPROTONOSUPPORT,
69539         EOPNOTSUPP, EAFNOSUPPORT, EADDRINUSE, EADDRNOTAVAIL, ENETDOWN,
69540         ENETUNREACH, ECONNRESET, ENOBUFS, EISCONN, ENOTCONN, ETIMEDOUT,
69541         ECONNREFUSED, ELOOP, EHOSTUNREACH, EWOULDBLOCK, ETXTBSY) [Win32]:
69542         Assign values compatible with MSVC 10.
69543         (ENODATA, ENOSR, ENOSTR, ENOTRECOVERABLE, EOWNERDEAD, ETIME, EOTHER):
69544         New macros.
69545         (GNULIB_defined_EWINSOCK): New macro.
69546         * lib/strerror-override.c (strerror_override): Update accordingly.
69547         * lib/strerror-override.h: Likewise.
69548         * lib/w32sock.h (set_winsock_errno): Map those WSA* values that are no
69549         longer equal to the corresponding errno value.
69550         Reported by Michael Goffioul <michael.goffioul@gmail.com>.
69552 2011-10-22  Bruno Haible  <bruno@clisp.org>
69554         perror: Recognize when test program crashes.
69555         * m4/perror.m4 (gl_FUNC_PERROR): If the test program crashes due to
69556         strerror, set gl_cv_func_perror_works to no.
69557         Reported by Daniel Richard G. <skunk@iskunk.org>.
69559         perror: Fix indentation.
69560         * m4/perror.m4 (gl_FUNC_PERROR): Fix indentation.
69562 2011-10-22  Bruno Haible  <bruno@clisp.org>
69564         isfinite, isinf, isnan, signbit: Don't define as a macro in C++.
69565         * lib/math.in.h (_GL_MATH_CXX_REAL_FLOATING_DECL_1,
69566         _GL_MATH_CXX_REAL_FLOATING_DECL_2): nEW MACROS.
69567         (isfinite, isinf, isnan, signbit): In C++, define as overloaded
69568         functions, not as a macro.
69569         * tests/test-math-c++.cc (REAL_FLOATING_CHECK, OVERLOADED_CHECK): New
69570         macros.
69571         (isfinite, isinf, isnan, signbit): Check overloaded functions and
69572         absence of macro.
69573         Suggested by Eric Blake.
69574         Reported by Michael Goffioul <michael.goffioul@gmail.com>.
69576 2011-10-21  Bruno Haible  <bruno@clisp.org>
69578         relocatable-prog-wrapper: Don't leave object files behind.
69579         * build-aux/install-reloc: Re-synchronize list of .o files to be
69580         removed with list of compilation units.
69582 2011-10-20  Bruno Haible  <bruno@clisp.org>
69584         openpty, posix_openpt: Remove code duplication.
69585         * lib/posix_openpt.c: Add comments about platforms, from lib/openpty.c.
69586         * lib/openpty.c: Include <stdlib.h>.
69587         (openpty): Use posix_openpt on all platforms except IRIX.
69588         * modules/openpty (Depends-on): Add posix_openpt. Add conditions.
69590 2011-10-20  Bruno Haible  <bruno@clisp.org>
69592         unlockpt: Detect invalid argument.
69593         * lib/unlockpt.c: Include <fcntl.h>.
69594         (unlockpt): Check whether fd is valid, using fcntl().
69595         * modules/unlockpt (Depends-on): Add fcntl-h.
69597 2011-10-20  Bruno Haible  <bruno@clisp.org>
69599         openpty: Avoid compilation error on AIX 6.1.
69600         * lib/pty.in.h [AIX]: Include <sys/ioctl.h>, for 'struct winsize'.
69602 2011-10-20  Bruno Haible  <bruno@clisp.org>
69604         posix_openpt: Support for OpenBSD.
69605         * lib/posix_openpt.c [OpenBSD]: Include <sys/ioctl.h>, <sys/tty.h>.
69606         (posix_openpt) [OpenBSD]: New code.
69607         * lib/grantpt.c: Include <fcntl.h>.
69608         (grantpt) [OpenBSD]: Only test whether fd is valid, nothing else.
69609         * modules/grantpt (Depends-on): Add fcntl-h.
69611 2011-10-20  Bruno Haible  <bruno@clisp.org>
69613         posix_openpt test: Coding style.
69614         * tests/test-posix_openpt.c: Use GNU coding style.
69616 2011-10-20  Bruno Haible  <bruno@clisp.org>
69618         grantpt: Support --avoid=pt_chown.
69619         * modules/grantpt (Files): Add lib/pty-private.h.
69621 2011-10-20  Bruno Haible  <bruno@clisp.org>
69623         posix_openpt: Fix autoconf macro.
69624         * m4/posix_openpt.m4 (gl_FUNC_POSIX_OPENPT): Fix variable name. Remove
69625         unneeded check for _getpty.
69627 2011-10-20  Bruno Haible  <bruno@clisp.org>
69629         openpty: Update comments.
69630         * lib/openpty.c: Add comments about Minix.
69632 2011-10-19  Eric Blake  <eblake@redhat.com>
69634         openpty: relax license
69635         * modules/openpty (License): Change from LGPLv3+ to LGPLv2+.
69637         pt_chown: use configmake to simplify build
69638         * modules/pt_chown (Makefile.am): Drop line guaranteed by configmake.
69640         ptsname and others: relax license
69641         * modules/grantpt (License): Change from LGPLv3+ to LGPLv2+.
69642         * modules/unlockpt (License): Likewise.
69643         * modules/pt_chown (License): Likewise.
69644         * modules/ptsname (License): Likewise.
69645         * modules/ttyname_r (License): Likewise.
69647 2011-10-19  Jim Meyering  <meyering@redhat.com>
69649         posix_openpt: remove spurious #endif
69650         * lib/posix_openpt.c (posix_openpt): Remove spurious #endif.
69652 2011-10-19  Gary V. Vaughan  <gary@gnu.org>
69654         maint.mk: Respect $(build_aux) in web-manual rule.
69655         * top/maint.mk (web-manual): Find gen-announce script in user's
69656         $(build_aux) directory instead of hard-coding 'build-aux'.
69658 2011-10-19  Bruno Haible  <bruno@clisp.org>
69660         posix_openpt: Fix compilation error.
69661         * lib/posix_openpt.c (posix_openpt): Renamed from posix_openpty.
69662         * doc/posix-functions/posix_openpt.texi: Mention ENOENT error code.
69663         Mention the openpty module as an alternative.
69665 2011-10-19  Bruno Haible  <bruno@clisp.org>
69667         Support for old NeXTstep 3.3 frexp().
69668         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Check for alarm. Limit the
69669         execution time of the test to 5 seconds.
69670         Reported by Daniel Richard G. <skunk@iskunk.org>.
69672 2011-10-19  Bruno Haible  <bruno@clisp.org>
69674         Support for old NeXTstep 3.3 sed.
69675         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER_ONE): In the sed address
69676         part, use /.../, not \|...|. Escape periods in the header file name.
69677         * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Likewise.
69678         Reported by Daniel Richard G. <skunk@iskunk.org>.
69680 2011-10-18  Daniel Richard G.  <skunk@iskunk.org>  (tiny change)
69682         Support for old NeXTstep 3.3 gcc.
69683         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Write
69684         'defined __STRICT_ANSI__', not '__STRICT_ANSI__'.
69685         * lib/math.in.h (_GL_NUM_UINT_WORDS etc.): Likewise.
69686         * lib/spawn.in.h (_Restrict_arr_): Likewise.
69687         * lib/regex.h (_Restrict_arr_): Likewise.
69688         * lib/regex_internal.h (re_token_t): Likewise.
69689         * lib/regexec.c (check_node_accept_bytes): Likewise.
69690         * tests/test-printf-posix.c (func1, func2, func3, func4): Likewise.
69692 2011-10-18  Eric Blake  <eblake@redhat.com>
69694         posix_openpt: new module
69695         * modules/posix_openpt: New module.
69696         * m4/posix_openpt.m4: New file.
69697         * lib/posix_openpt.c: Likewise.
69698         * m4/stdlib_h.m4 (gl_STDLIB_H): Check for decl.
69699         (gl_STDLIB_H_DEFAULTS): Set defaults.
69700         * modules/stdlib (Makefile.am): Substitute macros.
69701         * lib/stdlib.in.h (posix_openpt): Declare.
69702         * MODULES.html.sh (systems lacking POSIX:2008): Document it.
69703         * doc/posix-functions/posix_openpt.texi (posix_openpt): Likewise.
69704         * modules/posix_openpt-tests: New test module.
69705         * tests/test-posix_openpt.c: New test.
69707 2011-10-15  Bruno Haible  <bruno@clisp.org>
69709         xstrtoll: Fix compilation failure.
69710         * lib/xstrtol.c (ULLONG_MAX, LLONG_MAX, LLONG_MIN): New macros, taken
69711         from lib/strtol.c.
69712         * doc/posix-headers/limits.texi: Mention missing numerical limits on
69713         some platforms.
69714         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
69716 2011-10-15  Bruno Haible  <bruno@clisp.org>
69718         vasnprintf: Optimize bit search operation.
69719         * lib/vasnprintf.c (divide): Use optimizations from integer_length.c.
69720         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Require
69721         gl_DOUBLE_EXPONENT_LOCATION.
69722         * modules/vasnprintf (Files): Add m4/exponentd.m4.
69723         * modules/unistdio/u8-vasnprintf (Files): Likewise.
69724         * modules/unistdio/u8-u8-vasnprintf (Files): Likewise.
69725         * modules/unistdio/u16-vasnprintf (Files): Likewise.
69726         * modules/unistdio/u16-u16-vasnprintf (Files): Likewise.
69727         * modules/unistdio/u32-vasnprintf (Files): Likewise.
69728         * modules/unistdio/u32-u32-vasnprintf (Files): Likewise.
69729         * modules/unistdio/ulc-vasnprintf (Files): Likewise.
69730         * m4/isnand.m4 (gl_PREREQ_ISNAND): Use AC_REQUIRE.
69732 2011-10-15  Bruno Haible  <bruno@clisp.org>
69734         vasnprintf: Fix comments.
69735         * lib/vasnprintf.c (decode_long_double, decode_double): Fix comments.
69737 2011-10-14  Bruno Haible  <bruno@clisp.org>
69739         Tests for module 'integer_length_ll'.
69740         * modules/integer_length_ll-tests: New file.
69741         * tests/test-integer_length_ll.c: New file.
69743         New module 'integer_length_ll'.
69744         * lib/integer_length_ll.c: New file.
69745         * modules/integer_length_ll: New file.
69747 2011-10-14  Bruno Haible  <bruno@clisp.org>
69749         Tests for module 'integer_length_l'.
69750         * modules/integer_length_l-tests: New file.
69751         * tests/test-integer_length_l.c: New file.
69753         New module 'integer_length_l'.
69754         * lib/integer_length_l.c: New file.
69755         * modules/integer_length_l: New file.
69757 2011-10-14  Bruno Haible  <bruno@clisp.org>
69759         Tests for module 'integer_length'.
69760         * modules/integer_length-tests: New file.
69761         * tests/test-integer_length.c: New file.
69763         New module 'integer_length'.
69764         * lib/integer_length.h: New file.
69765         * lib/integer_length.c: New file.
69766         * modules/integer_length: New file.
69768 2011-10-14  Daniel Richard G.  <skunk@iskunk.org>  (tiny change)
69770         popen: Fix dependency conditions.
69771         * modules/popen (Depends-on, configure.ac): Fix shell syntax error.
69773 2011-10-14  Daniel Richard G.  <skunk@iskunk.org>  (tiny change)
69775         perror: Fix autoconf test.
69776         * m4/perror.m4 (gl_FUNC_PERROR): In the test program, include
69777         <stdlib.h> and <string.h>.
69779 2011-10-14  Bruno Haible  <bruno@clisp.org>
69781         ffsl: Optimize on 64-bit platforms.
69782         * lib/ffsl.h (FUNC): Omit a test from the last loop round. Do loop
69783         unrolling.
69785 2011-10-13  Bruno Haible  <bruno@clisp.org>
69787         ffsl: Optimize on 32-bit platforms.
69788         * lib/ffsl.h (FUNC): If TYPE has the same representation as 'int', just
69789         use ffs() without a loop.
69791         ffsl, ffsll: Optimize for GCC.
69792         * lib/ffsl.h (FUNC): Use GCC_BUILTIN if defined.
69793         * lib/ffsl.c (GCC_BUILTIN): New macro.
69794         * lib/ffsll.c (GCC_BUILTIN): Likewise.
69796 2011-10-13  Bruno Haible  <bruno@clisp.org>
69798         ffs, bcopy, memset: Support symbol renaming via config.h.
69799         * lib/ffs.c: Include <config.h>.
69800         * lib/bcopy.c: Likewise.
69801         * lib/memset.c: Likewise.
69803 2011-10-10  Bruno Haible  <bruno@clisp.org>
69805         atanl: Simplify for platforms where 'long double' == 'double'.
69806         * lib/atanl.c (atanl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New
69807         alternative implementation.
69808         * m4/atanl.m4 (gl_FUNC_ATANL): Require gl_LONG_DOUBLE_VS_DOUBLE.
69809         Determine ATANL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
69810         * modules/atanl (Depends-on): Add atan. Update conditions.
69812 2011-10-10  Bruno Haible  <bruno@clisp.org>
69814         acosl: Simplify for platforms where 'long double' == 'double'.
69815         * lib/acosl.c (acosl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New
69816         alternative implementation.
69817         * m4/acosl.m4 (gl_FUNC_ACOSL): Require gl_LONG_DOUBLE_VS_DOUBLE.
69818         Determine ACOSL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
69819         * modules/acosl (Depends-on): Add acos. Update conditions.
69821 2011-10-10  Bruno Haible  <bruno@clisp.org>
69823         asinl: Simplify for platforms where 'long double' == 'double'.
69824         * lib/asinl.c (asinl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New
69825         alternative implementation.
69826         * m4/asinl.m4 (gl_FUNC_ASINL): Require gl_LONG_DOUBLE_VS_DOUBLE.
69827         Determine ASINL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
69828         * modules/asinl (Depends-on): Add asin. Update conditions.
69830 2011-10-10  Bruno Haible  <bruno@clisp.org>
69832         tanl: Simplify for platforms where 'long double' == 'double'.
69833         * lib/tanl.c (tanl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New alternative
69834         implementation.
69835         * m4/tanl.m4 (gl_FUNC_TANL): Require gl_LONG_DOUBLE_VS_DOUBLE.
69836         Determine TANL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
69837         * modules/tanl (Depends-on): Add tan. Update conditions.
69838         (configure.ac): Don't compile trigl.c if
69839         HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
69841 2011-10-10  Bruno Haible  <bruno@clisp.org>
69843         cosl: Simplify for platforms where 'long double' == 'double'.
69844         * lib/cosl.c (cosl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New alternative
69845         implementation.
69846         * m4/cosl.m4 (gl_FUNC_COSL): Require gl_LONG_DOUBLE_VS_DOUBLE.
69847         Determine COSL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
69848         * modules/cosl (Depends-on): Add cos. Update conditions.
69849         (configure.ac): Don't compile sincosl.c and trigl.c if
69850         HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
69852 2011-10-10  Bruno Haible  <bruno@clisp.org>
69854         sinl: Simplify for platforms where 'long double' == 'double'.
69855         * lib/sinl.c (sinl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New alternative
69856         implementation.
69857         * m4/sinl.m4 (gl_FUNC_SINL): Require gl_LONG_DOUBLE_VS_DOUBLE.
69858         Determine SINL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
69859         * modules/sinl (Depends-on): Add sin. Update conditions.
69860         (configure.ac): Don't compile sincosl.c and trigl.c if
69861         HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
69863 2011-10-10  Bruno Haible  <bruno@clisp.org>
69865         logl: Simplify for platforms where 'long double' == 'double'.
69866         * lib/logl.c (logl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New alternative
69867         implementation.
69868         * m4/logl.m4 (gl_FUNC_LOGL): Require gl_LONG_DOUBLE_VS_DOUBLE.
69869         Determine LOGL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
69870         * modules/logl (Depends-on): Add log. Update conditions.
69872 2011-10-10  Bruno Haible  <bruno@clisp.org>
69874         expl: Simplify for platforms where 'long double' == 'double'.
69875         * lib/expl.c (expl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New alternative
69876         implementation.
69877         * m4/expl.m4 (gl_FUNC_EXPL): Require gl_LONG_DOUBLE_VS_DOUBLE.
69878         Determine EXPL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
69879         * modules/expl (Depends-on): Add exp. Update conditions.
69881 2011-10-10  Bruno Haible  <bruno@clisp.org>
69883         sqrtl: Simplify for platforms where 'long double' == 'double'.
69884         * lib/sqrtl.c (sqrtl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New
69885         alternative implementation.
69886         * m4/sqrtl.m4 (gl_FUNC_SQRTL): Require gl_LONG_DOUBLE_VS_DOUBLE.
69887         Determine SQRTL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
69888         * modules/sqrtl (Depends-on): Update conditions.
69890 2011-10-10  Bruno Haible  <bruno@clisp.org>
69892         ldexpl: Simplify for platforms where 'long double' == 'double'.
69893         * lib/ldexpl.c (ldexpl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New
69894         alternative implementation.
69895         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Require gl_LONG_DOUBLE_VS_DOUBLE.
69896         Determine LDEXPL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
69897         * modules/ldexpl (Depends-on): Add ldexp. Update conditions.
69899 2011-10-10  Tom G. Christensen  <tgc@jupiterrise.com>  (tiny change)
69901         ffsll: set correct witness
69902         * modules/ffsll (configure.ac): Fix typo.
69904 2011-10-10  Bruno Haible  <bruno@clisp.org>
69906         printf-frexpl: Simplify for platforms where 'long double' == 'double'.
69907         * lib/printf-frexpl.c: Include <config.h>.
69908         (printf_frexpl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New function.
69909         * lib/printf-frexp.c [!USE_LONG_DOUBLE]: Don't include <config.h> a
69910         second time.
69911         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Require
69912         gl_LONG_DOUBLE_VS_DOUBLE.
69913         * modules/printf-frexpl (Depends-on): Add printf-frexp. Update
69914         conditions.
69916 2011-10-10  Bruno Haible  <bruno@clisp.org>
69918         frexpl: Simplify for platforms where 'long double' == 'double'.
69919         * lib/frexpl.c: Include <config.h>.
69920         (frexpl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New function.
69921         * lib/frexp.c [!USE_LONG_DOUBLE]: Don't include <config.h> a second
69922         time.
69923         * m4/frexpl.m4 (gl_FUNC_FREXPL): Require gl_LONG_DOUBLE_VS_DOUBLE.
69924         Determine FREXPL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
69925         (gl_FUNC_FREXPL_NO_LIBM): Require gl_LONG_DOUBLE_VS_DOUBLE.
69926         * modules/frexpl (Depends-on): Add frexp. Update conditions.
69927         * modules/frexpl-nolibm (Depends-on): Add frexp-nolibm. Update
69928         conditions.
69930 2011-10-10  Jim Meyering  <meyering@redhat.com>
69932         test-renameat: don't leave behind a temporary file
69933         * tests/test-renameat.c (main): Don't forget to remove a temporary file.
69934           ERROR: files left in build directory after distclean:
69935           ./gltests/test-renameat.too
69936           make[1]: *** [distcleancheck] Error 1
69937         Reported by Tom G. Christensen.
69939 2011-10-09  Bruno Haible  <bruno@clisp.org>
69941         rint: Determine RINT_LIBM correctly on AIX 7.
69942         * m4/mathfunc.m4 (gl_MATHFUNC): Try to invoke the function also
69943         directly, not only through a function pointer. Also accept an optional
69944         4th argument with extra code.
69945         * m4/rint.m4 (gl_FUNC_RINT): Pass an extra code that gets turned into a
69946         rintf() call by gcc when optimizing.
69948         mathfunc.m4: Refactor.
69949         * m4/mathfunc.m4 (gl_MATHFUNC): Assign the argument list to a temporary
69950         m4 variable.
69952 2011-10-09  Bruno Haible  <bruno@clisp.org>
69954         rintl: Simplify for platforms where 'long double' == 'double'.
69955         * lib/rintl.c: Include <config.h>.
69956         (rintl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New function.
69957         * lib/rint.c [!USE_LONG_DOUBLE]: Don't include <config.h> a second
69958         time.
69959         * m4/rintl.m4 (gl_FUNC_RINTL): Require gl_LONG_DOUBLE_VS_DOUBLE.
69960         Determine RINTL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
69961         * modules/rintl (Depends-on): Add rint. Update conditions.
69963 2011-10-09  Bruno Haible  <bruno@clisp.org>
69965         roundl: Simplify for platforms where 'long double' == 'double'.
69966         * lib/roundl.c: Include <config.h>.
69967         (roundl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New function.
69968         * lib/round.c [!USE_LONG_DOUBLE]: Don't include <config.h> a second
69969         time.
69970         * m4/roundl.m4 (gl_FUNC_ROUNDL): Require gl_LONG_DOUBLE_VS_DOUBLE.
69971         Determine ROUNDL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
69972         * modules/roundl (Depends-on): Add round. Update conditions.
69974 2011-10-09  Bruno Haible  <bruno@clisp.org>
69976         truncl: Simplify for platforms where 'long double' == 'double'.
69977         * lib/truncl.c: Include <config.h>.
69978         (truncl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New function.
69979         * lib/trunc.c [!USE_LONG_DOUBLE]: Don't include <config.h> a second
69980         time.
69981         * m4/truncl.m4 (gl_FUNC_TRUNCL): Require gl_LONG_DOUBLE_VS_DOUBLE.
69982         Determine TRUNCL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
69983         * modules/truncl (Depends-on): Add trunc. Update conditions.
69985 2011-10-09  Bruno Haible  <bruno@clisp.org>
69987         ceill: Simplify for platforms where 'long double' == 'double'.
69988         * lib/ceill.c: Include <config.h>.
69989         (ceill) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New function.
69990         * lib/ceil.c [!USE_LONG_DOUBLE]: Don't include <config.h> a second
69991         time.
69992         * m4/ceill.m4 (gl_FUNC_CEILL): Require gl_LONG_DOUBLE_VS_DOUBLE.
69993         Determine CEILL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
69994         * modules/ceill (Depends-on): Add ceil. Update conditions.
69996 2011-10-09  Bruno Haible  <bruno@clisp.org>
69998         floorl: Simplify for platforms where 'long double' == 'double'.
69999         * lib/floorl.c: Include <config.h>.
70000         (floorl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New function.
70001         * lib/floor.c [!USE_LONG_DOUBLE]: Don't include <config.h> a second
70002         time.
70003         * m4/floorl.m4 (gl_FUNC_FLOORL): Require gl_LONG_DOUBLE_VS_DOUBLE.
70004         Determine FLOORL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
70005         * modules/floorl (Depends-on): Add floor. Update conditions.
70007 2011-10-09  Bruno Haible  <bruno@clisp.org>
70009         rint: Fix ordering constraints.
70010         * m4/rint.m4 (gl_FUNC_RINT): Require gl_MATH_H_DEFAULTS.
70011         * m4/rintf.m4 (gl_FUNC_RINTF): Likewise.
70012         * m4/rintl.m4 (gl_FUNC_RINTL): Likewise.
70014 2011-10-09  Bruno Haible  <bruno@clisp.org>
70016         copysignl: Simplify for platforms where 'long double' == 'double'.
70017         * lib/copysignl.c (copysignl) [HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]: New
70018         alternative.
70019         * m4/copysignl.m4 (gl_FUNC_COPYSIGNL): Require gl_LONG_DOUBLE_VS_DOUBLE.
70020         Determine COPYSIGNL_LIBM according to HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.
70021         * modules/copysignl (Depends-on): Add copysign. Update conditions.
70023 2011-10-09  Bruno Haible  <bruno@clisp.org>
70025         Tests for module 'rintl'.
70026         * modules/rintl-tests: New file.
70027         * tests/test-rintl.c: New file.
70029         New module 'rintl'.
70030         * lib/math.in.h (rintl): New declaration.
70031         * lib/rintl.c: New file.
70032         * m4/rintl.m4: New file.
70033         * m4/math_h.m4 (gl_MATH_H): Test whether rintl is declared.
70034         (gl_MATH_H_DEFAULTS): Initialize GNULIB_RINTL, HAVE_RINTL.
70035         * modules/math (Makefile.am): Substitute GNULIB_RINTL, HAVE_RINTL.
70036         * modules/rintl: New file.
70037         * tests/test-math-c++.cc: Check the declaration of rintl.
70038         * modules/math-c++-tests (Makefile.am): Link test-math-c++ against
70039         $(RINTL_LIBM). Needed on IRIX 6.5 with cc.
70040         * doc/posix-functions/rintl.texi: Mention the new module.
70042 2011-10-09  Bruno Haible  <bruno@clisp.org>
70044         Tests for module 'rintf'.
70045         * modules/rintf-tests: New file.
70046         * tests/test-rintf.c: New file.
70048         New module 'rintf'.
70049         * lib/math.in.h (rintf): New declaration.
70050         * lib/rintf.c: New file.
70051         * m4/rintf.m4: New file.
70052         * m4/math_h.m4 (gl_MATH_H): Test whether rintf is declared.
70053         (gl_MATH_H_DEFAULTS): Initialize GNULIB_RINTF, HAVE_RINTF.
70054         * modules/math (Makefile.am): Substitute GNULIB_RINTF, HAVE_RINTF.
70055         * modules/rintf: New file.
70056         * tests/test-math-c++.cc: Check the declaration of rintf.
70057         * doc/posix-functions/rintf.texi: Mention the new module.
70059 2011-10-09  Bruno Haible  <bruno@clisp.org>
70061         rint: Support for MSVC.
70062         * lib/math.in.h (rint): New declaration.
70063         * lib/rint.c: New file.
70064         * m4/rint.m4: New file.
70065         * m4/math_h.m4 (gl_MATH_H): Test whether rint is declared.
70066         (gl_MATH_H_DEFAULTS): Initialize GNULIB_RINT, HAVE_RINT.
70067         * modules/math (Makefile.am): Substitute GNULIB_RINT, HAVE_RINT.
70068         * modules/rint (Description): Fix.
70069         (Files): Add lib/rint.c, m4/rint.m4.
70070         (Depends-on): Add math.
70071         (configure.ac): Invoke gl_FUNC_RINT, AC_LIBOBJ,
70072         gl_MATH_MODULE_INDICATOR.
70073         * tests/test-math-c++.cc: Check the declaration of rint.
70074         * modules/math-c++-tests (Makefile.am): Link test-math-c++ against
70075         $(RINT_LIBM). Needed on IRIX 6.5 with cc.
70076         * doc/posix-functions/rint.texi: Mention the replacement provided by
70077         the module.
70079         rint tests: More tests.
70080         * tests/test-rint.c: Include <float.h>, <stdio.h>, isnand-nolibm.h,
70081         minus-zero.h, infinity.h, nan.h.
70082         (main): Skip the test if the current rounding mode is not standard. Add
70083         tests for negative numbers, minus zero, infinity, NaN.
70084         * modules/rint-tests (Files): Add tests/minus-zero.h, tests/infinity.h,
70085         tests/nan.h.
70086         (Depends-on): Add isnand-nolibm.
70088 2011-10-09  Bruno Haible  <bruno@clisp.org>
70090         Tests for module 'copysignl'.
70091         * modules/copysignl-tests: New file.
70092         * tests/test-copysignl.c: New file.
70094         New module 'copysignl'.
70095         * lib/math.in.h (copysignl): New declaration.
70096         * lib/copysignl.c: New file.
70097         * m4/copysignl.m4: New file.
70098         * m4/math_h.m4 (gl_MATH_H): Test whether copysignl is declared.
70099         (gl_MATH_H_DEFAULTS): Initialize GNULIB_COPYSIGNL, HAVE_COPYSIGNL.
70100         * modules/math (Makefile.am): Substitute GNULIB_COPYSIGNL,
70101         HAVE_COPYSIGNL.
70102         * modules/copysignl: New file.
70103         * tests/test-math-c++.cc: Check the declaration of copysignl.
70104         * modules/math-c++-tests (Makefile.am): Link test-math-c++ against
70105         $(COPYSIGNL_LIBM). Needed on IRIX 6.5 with cc.
70106         * doc/posix-functions/copysignl.texi: Mention the new module.
70108 2011-10-09  Bruno Haible  <bruno@clisp.org>
70110         Tests for module 'copysignf'.
70111         * modules/copysignf-tests: New file.
70112         * tests/test-copysignf.c: New file.
70114         New module 'copysignf'.
70115         * lib/math.in.h (copysignf): New declaration.
70116         * lib/copysignf.c: New file.
70117         * m4/copysignf.m4: New file.
70118         * m4/math_h.m4 (gl_MATH_H): Test whether copysignf is declared.
70119         (gl_MATH_H_DEFAULTS): Initialize GNULIB_COPYSIGNF, HAVE_COPYSIGNF.
70120         * modules/math (Makefile.am): Substitute GNULIB_COPYSIGNF,
70121         HAVE_COPYSIGNF.
70122         * modules/copysignf: New file.
70123         * tests/test-math-c++.cc: Check the declaration of copysignf.
70124         * doc/posix-functions/copysignf.texi: Mention the new module.
70126 2011-10-09  Bruno Haible  <bruno@clisp.org>
70128         Ensure that HAVE_* variables are set to 1 before they are set to 0.
70129         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Require gl_DIRENT_H_DEFAULTS.
70130         * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): Require gl_ARPA_INET_H_DEFAULTS.
70131         * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Likewise.
70132         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Require
70133         gl_SIGNAL_H_DEFAULTS.
70135 2011-10-09  Bruno Haible  <bruno@clisp.org>
70137         poll: Make macro safer.
70138         * m4/poll.m4 (gl_FUNC_POLL): Complain if, after invoking gl_POLL_H,
70139         ac_cv_header_poll_h is not set.
70141 2011-10-09  Bruno Haible  <bruno@clisp.org>
70143         copysign: Provide replacement.
70144         * lib/math.in.h (copysign): New declaration.
70145         * lib/copysign.c: New file.
70146         * m4/copysign.m4: New file.
70147         * m4/math_h.m4 (gl_MATH_H): Test whether copysign is declared.
70148         (gl_MATH_H_DEFAULTS): Initialize GNULIB_COPYSIGN, HAVE_COPYSIGN.
70149         * modules/math (Makefile.am): Substitute GNULIB_COPYSIGN,
70150         HAVE_COPYSIGN.
70151         * modules/copysign (Description): Clarify.
70152         (Files): Add lib/copysign.c, m4/copysign.m4.
70153         (Depends-on): Add math, signbit.
70154         (configure.ac): Invoke gl_FUNC_COPYSIGN, AC_LIBOBJ,
70155         gl_MATH_MODULE_INDICATOR.
70156         * tests/test-math-c++.cc: Check the declaration of copysign.
70157         * doc/posix-functions/copysign.texi: Mention the effects of the module
70158         on Minix and MSVC.
70160 2011-10-09  Bruno Haible  <bruno@clisp.org>
70162         isinf: Ensure macro on AIX 5.1.
70163         * m4/isinf.m4 (gl_ISINF): Also test whether isinf is defined as a
70164         macro.
70165         * doc/posix-functions/isinf.texi: Mention also AIX 5.1 as deficient.
70167 2011-10-09  Bruno Haible  <bruno@clisp.org>
70169         *printf-posix tests: Fix for platforms where 'long double' == 'double'.
70170         * modules/snprintf-posix-tests (configure.ac): Require
70171         gl_LONG_DOUBLE_VS_DOUBLE.
70172         * modules/sprintf-posix-tests (configure.ac): Likewise.
70173         * modules/vasnprintf-posix-tests (configure.ac): Likewise.
70174         * modules/vasprintf-posix-tests (configure.ac): Likewise.
70175         * modules/vsnprintf-posix-tests (configure.ac): Likewise.
70176         * modules/vsprintf-posix-tests (configure.ac): Likewise.
70177         * tests/test-snprintf-posix.h (test_function): Avoid 80-bit long double
70178         tests on platforms where 'long double' is the same as 'double'.
70179         * tests/test-sprintf-posix.h (test_function): Likewise.
70180         * tests/test-vasnprintf-posix.c (test_function): Likewise.
70181         * tests/test-vasprintf-posix.c (test_function): Likewise.
70183         *printf: Fix for platforms where 'long double' == 'double'.
70184         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Require
70185         gl_LONG_DOUBLE_VS_DOUBLE. Don't blindly assume 80-bit 'long double'.
70186         * modules/dprintf-posix (Files): Add m4/math_h.m4.
70187         * modules/fprintf-posix (Files): Likewise.
70188         * modules/obstack-printf-posix (Files): Likewise.
70189         * modules/snprintf-posix (Files): Likewise.
70190         * modules/sprintf-posix (Files): Likewise.
70191         * modules/vasnprintf (Files): Likewise.
70192         * modules/vasnprintf-posix (Files): Likewise.
70193         * modules/vasprintf-posix (Files): Likewise.
70194         * modules/vdprintf-posix (Files): Likewise.
70195         * modules/vfprintf-posix (Files): Likewise.
70196         * modules/vsnprintf-posix (Files): Likewise.
70197         * modules/vsprintf-posix (Files): Likewise.
70198         * modules/unistdio/u8-vasnprintf (Files): Likewise.
70199         * modules/unistdio/u8-u8-vasnprintf (Files): Likewise.
70200         * modules/unistdio/u16-vasnprintf (Files): Likewise.
70201         * modules/unistdio/u16-u16-vasnprintf (Files): Likewise.
70202         * modules/unistdio/u32-vasnprintf (Files): Likewise.
70203         * modules/unistdio/u32-u32-vasnprintf (Files): Likewise.
70204         * modules/unistdio/ulc-vasnprintf (Files): Likewise.
70206         isnanl[-nolibm]: Fix for platforms where 'long double' == 'double'.
70207         * lib/isnan.c (rpl_isnanl): Don't blindly assume 80-bit 'long double'.
70208         * m4/isnanl.m4 (gl_PREREQ_ISNANL): Require gl_LONG_DOUBLE_VS_DOUBLE.
70209         (gl_FUNC_ISNANL_WORKS): Likewise. Don't blindly assume 80-bit
70210         'long double'.
70211         * modules/isnanl-nolibm (Files): Add m4/math_h.m4.
70213         isinf: Fix for platforms where 'long double' == 'double'.
70214         * m4/isinf.m4 (gl_ISINFL_WORKS): Require gl_LONG_DOUBLE_VS_DOUBLE.
70215         Don't blindly assume 80-bit 'long double'.
70217         isfinite: Fix for platforms where 'long double' == 'double'.
70218         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Require gl_LONG_DOUBLE_VS_DOUBLE.
70219         Don't blindly assume 80-bit 'long double'.
70221         isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9.
70222         * m4/math_h.m4 (gl_LONG_DOUBLE_VS_DOUBLE): New macro.
70223         * modules/isfinite-tests (configure.ac): Require
70224         gl_LONG_DOUBLE_VS_DOUBLE.
70225         * modules/isinf-tests (configure.ac): Likewise.
70226         * modules/isnan-tests (configure.ac): Likewise.
70227         * modules/isnanl-tests (configure.ac): Likewise.
70228         * modules/isnanl-nolibm-tests (configure.ac): Likewise.
70229         * tests/test-isfinite.c (test_isfinitel): Avoid 80-bit long double
70230         tests on platforms where 'long double' is the same as 'double'.
70231         * tests/test-isinf.c (test_isinfl): Likewise.
70232         * tests/test-isnan.c (test_long_double): Likewise.
70233         * tests/test-isnanl.h (main): Likewise.
70235 2011-10-08  Bruno Haible  <bruno@clisp.org>
70237         Tests for module 'tanhf'.
70238         * modules/tanhf-tests: New file.
70239         * tests/test-tanhf.c: New file.
70241         New module 'tanhf'.
70242         * lib/math.in.h (tanhf): New declaration.
70243         * lib/tanhf.c: New file.
70244         * m4/tanhf.m4: New file.
70245         * m4/math_h.m4 (gl_MATH_H): Test whether tanhf is declared.
70246         (gl_MATH_H_DEFAULTS): Initialize GNULIB_TANHF, HAVE_TANHF.
70247         * modules/math (Makefile.am): Substitute GNULIB_TANHF, HAVE_TANHF.
70248         * modules/tanhf: New file.
70249         * tests/test-math-c++.cc: Check the declaration of tanhf.
70250         * doc/posix-functions/tanhf.texi: Mention the new module.
70252         tanh: Use a .m4 file.
70253         * m4/tanh.m4: New file.
70254         * modules/tanh (Files): Add it.
70255         (configure.ac): Just invoke gl_FUNC_TANH.
70257 2011-10-08  Bruno Haible  <bruno@clisp.org>
70259         Tests for module 'coshf'.
70260         * modules/coshf-tests: New file.
70261         * tests/test-coshf.c: New file.
70263         New module 'coshf'.
70264         * lib/math.in.h (coshf): New declaration.
70265         * lib/coshf.c: New file.
70266         * m4/coshf.m4: New file.
70267         * m4/math_h.m4 (gl_MATH_H): Test whether coshf is declared.
70268         (gl_MATH_H_DEFAULTS): Initialize GNULIB_COSHF, HAVE_COSHF.
70269         * modules/math (Makefile.am): Substitute GNULIB_COSHF, HAVE_COSHF.
70270         * modules/coshf: New file.
70271         * tests/test-math-c++.cc: Check the declaration of coshf.
70272         * doc/posix-functions/coshf.texi: Mention the new module.
70274         cosh: Use a .m4 file.
70275         * m4/cosh.m4: New file.
70276         * modules/cosh (Files): Add it.
70277         (configure.ac): Just invoke gl_FUNC_COSH.
70279 2011-10-08  Bruno Haible  <bruno@clisp.org>
70281         Tests for module 'sinhf'.
70282         * modules/sinhf-tests: New file.
70283         * tests/test-sinhf.c: New file.
70285         New module 'sinhf'.
70286         * lib/math.in.h (sinhf): New declaration.
70287         * lib/sinhf.c: New file.
70288         * m4/sinhf.m4: New file.
70289         * m4/math_h.m4 (gl_MATH_H): Test whether sinhf is declared.
70290         (gl_MATH_H_DEFAULTS): Initialize GNULIB_SINHF, HAVE_SINHF.
70291         * modules/math (Makefile.am): Substitute GNULIB_SINHF, HAVE_SINHF.
70292         * modules/sinhf: New file.
70293         * tests/test-math-c++.cc: Check the declaration of sinhf.
70294         * doc/posix-functions/sinhf.texi: Mention the new module.
70296         sinh: Use a .m4 file.
70297         * m4/sinh.m4: New file.
70298         * modules/sinh (Files): Add it.
70299         (configure.ac): Just invoke gl_FUNC_SINH.
70301 2011-10-08  Bruno Haible  <bruno@clisp.org>
70303         Tests for module 'atan2f'.
70304         * modules/atan2f-tests: New file.
70305         * tests/test-atan2f.c: New file.
70307         New module 'atan2f'.
70308         * lib/math.in.h (atan2f): New declaration.
70309         * lib/atan2f.c: New file.
70310         * m4/atan2f.m4: New file.
70311         * m4/math_h.m4 (gl_MATH_H): Test whether atan2f is declared.
70312         (gl_MATH_H_DEFAULTS): Initialize GNULIB_ATAN2F, HAVE_ATAN2F.
70313         * modules/math (Makefile.am): Substitute GNULIB_ATAN2F, HAVE_ATAN2F.
70314         * modules/atan2f: New file.
70315         * tests/test-math-c++.cc: Check the declaration of atan2f.
70316         * doc/posix-functions/atan2f.texi: Mention the new module.
70318         atan2: Use a .m4 file.
70319         * m4/atan2.m4: New file.
70320         * modules/atan2 (Files): Add it.
70321         (configure.ac): Just invoke gl_FUNC_ATAN2.
70323 2011-10-08  Bruno Haible  <bruno@clisp.org>
70325         Tests for module 'atanf'.
70326         * modules/atanf-tests: New file.
70327         * tests/test-atanf.c: New file.
70329         New module 'atanf'.
70330         * lib/math.in.h (atanf): New declaration.
70331         * lib/atanf.c: New file.
70332         * m4/atanf.m4: New file.
70333         * m4/math_h.m4 (gl_MATH_H): Test whether atanf is declared.
70334         (gl_MATH_H_DEFAULTS): Initialize GNULIB_ATANF, HAVE_ATANF.
70335         * modules/math (Makefile.am): Substitute GNULIB_ATANF, HAVE_ATANF.
70336         * modules/atanf: New file.
70337         * tests/test-math-c++.cc: Check the declaration of atanf.
70338         * doc/posix-functions/atanf.texi: Mention the new module.
70340         atan: Use a .m4 file.
70341         * m4/atan.m4: New file.
70342         * modules/atan (Files): Add it.
70343         (configure.ac): Just invoke gl_FUNC_ATAN.
70345 2011-10-08  Bruno Haible  <bruno@clisp.org>
70347         Tests for module 'acosf'.
70348         * modules/acosf-tests: New file.
70349         * tests/test-acosf.c: New file.
70351         New module 'acosf'.
70352         * lib/math.in.h (acosf): New declaration.
70353         * lib/acosf.c: New file.
70354         * m4/acosf.m4: New file.
70355         * m4/math_h.m4 (gl_MATH_H): Test whether acosf is declared.
70356         (gl_MATH_H_DEFAULTS): Initialize GNULIB_ACOSF, HAVE_ACOSF.
70357         * modules/math (Makefile.am): Substitute GNULIB_ACOSF, HAVE_ACOSF.
70358         * modules/acosf: New file.
70359         * tests/test-math-c++.cc: Check the declaration of acosf.
70360         * doc/posix-functions/acosf.texi: Mention the new module.
70362         acos: Use a .m4 file.
70363         * m4/acos.m4: New file.
70364         * modules/acos (Files): Add it.
70365         (configure.ac): Just invoke gl_FUNC_ACOS.
70367 2011-10-08  Bruno Haible  <bruno@clisp.org>
70369         Tests for module 'asinf'.
70370         * modules/asinf-tests: New file.
70371         * tests/test-asinf.c: New file.
70373         New module 'asinf'.
70374         * lib/math.in.h (asinf): New declaration.
70375         * lib/asinf.c: New file.
70376         * m4/asinf.m4: New file.
70377         * m4/math_h.m4 (gl_MATH_H): Test whether asinf is declared.
70378         (gl_MATH_H_DEFAULTS): Initialize GNULIB_ASINF, HAVE_ASINF.
70379         * modules/math (Makefile.am): Substitute GNULIB_ASINF, HAVE_ASINF.
70380         * modules/asinf: New file.
70381         * tests/test-math-c++.cc: Check the declaration of asinf.
70382         * doc/posix-functions/asinf.texi: Mention the new module.
70384         asin: Use a .m4 file.
70385         * m4/asin.m4: New file.
70386         * modules/asin (Files): Add it.
70387         (configure.ac): Just invoke gl_FUNC_ASIN.
70389 2011-10-08  Bruno Haible  <bruno@clisp.org>
70391         Tests for module 'tanf'.
70392         * modules/tanf-tests: New file.
70393         * tests/test-tanf.c: New file.
70395         New module 'tanf'.
70396         * lib/math.in.h (tanf): New declaration.
70397         * lib/tanf.c: New file.
70398         * m4/tanf.m4: New file.
70399         * m4/math_h.m4 (gl_MATH_H): Test whether tanf is declared.
70400         (gl_MATH_H_DEFAULTS): Initialize GNULIB_TANF, HAVE_TANF.
70401         * modules/math (Makefile.am): Substitute GNULIB_TANF, HAVE_TANF.
70402         * modules/tanf: New file.
70403         * tests/test-math-c++.cc: Check the declaration of tanf.
70404         * doc/posix-functions/tanf.texi: Mention the new module.
70406         tan: Use a .m4 file.
70407         * m4/tan.m4: New file.
70408         * modules/tan (Files): Add it.
70409         (configure.ac): Just invoke gl_FUNC_TAN.
70411 2011-10-08  Bruno Haible  <bruno@clisp.org>
70413         Tests for module 'cosf'.
70414         * modules/cosf-tests: New file.
70415         * tests/test-cosf.c: New file.
70417         New module 'cosf'.
70418         * lib/math.in.h (cosf): New declaration.
70419         * lib/cosf.c: New file.
70420         * m4/cosf.m4: New file.
70421         * m4/math_h.m4 (gl_MATH_H): Test whether cosf is declared.
70422         (gl_MATH_H_DEFAULTS): Initialize GNULIB_COSF, HAVE_COSF.
70423         * modules/math (Makefile.am): Substitute GNULIB_COSF, HAVE_COSF.
70424         * modules/cosf: New file.
70425         * tests/test-math-c++.cc: Check the declaration of cosf.
70426         * doc/posix-functions/cosf.texi: Mention the new module.
70428         cos: Use a .m4 file.
70429         * m4/cos.m4: New file.
70430         * modules/cos (Files): Add it.
70431         (configure.ac): Just invoke gl_FUNC_COS.
70433 2011-10-08  Bruno Haible  <bruno@clisp.org>
70435         Tests for module 'sinf'.
70436         * modules/sinf-tests: New file.
70437         * tests/test-sinf.c: New file.
70439         New module 'sinf'.
70440         * lib/math.in.h (sinf): New declaration.
70441         * lib/sinf.c: New file.
70442         * m4/sinf.m4: New file.
70443         * m4/math_h.m4 (gl_MATH_H): Test whether sinf is declared.
70444         (gl_MATH_H_DEFAULTS): Initialize GNULIB_SINF, HAVE_SINF.
70445         * modules/math (Makefile.am): Substitute GNULIB_SINF, HAVE_SINF.
70446         * modules/sinf: New file.
70447         * tests/test-math-c++.cc: Check the declaration of sinf.
70448         * doc/posix-functions/sinf.texi: Mention the new module.
70450         sin: Use a .m4 file.
70451         * m4/sin.m4: New file.
70452         * modules/sin (Files): Add it.
70453         (configure.ac): Just invoke gl_FUNC_SIN.
70455 2011-10-08  Bruno Haible  <bruno@clisp.org>
70457         Tests for module 'powf'.
70458         * modules/powf-tests: New file.
70459         * tests/test-powf.c: New file.
70461         New module 'powf'.
70462         * lib/math.in.h (powf): New declaration.
70463         * lib/powf.c: New file.
70464         * m4/powf.m4: New file.
70465         * m4/math_h.m4 (gl_MATH_H): Test whether powf is declared.
70466         (gl_MATH_H_DEFAULTS): Initialize GNULIB_POWF, HAVE_POWF.
70467         * modules/math (Makefile.am): Substitute GNULIB_POWF, HAVE_POWF.
70468         * modules/powf: New file.
70469         * tests/test-math-c++.cc: Check the declaration of powf.
70470         * doc/posix-functions/powf.texi: Mention the new module.
70472         pow: Use a .m4 file.
70473         * m4/pow.m4: New file.
70474         * modules/pow (Files): Add it.
70475         (configure.ac): Just invoke gl_FUNC_POW.
70477 2011-10-08  Bruno Haible  <bruno@clisp.org>
70479         Tests for module 'log10f'.
70480         * modules/log10f-tests: New file.
70481         * tests/test-log10f.c: New file.
70483         New module 'log10f'.
70484         * lib/math.in.h (log10f): New declaration.
70485         * lib/log10f.c: New file.
70486         * m4/log10f.m4: New file.
70487         * m4/math_h.m4 (gl_MATH_H): Test whether log10f is declared.
70488         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG10F, HAVE_LOG10F.
70489         * modules/math (Makefile.am): Substitute GNULIB_LOG10F, HAVE_LOG10F.
70490         * modules/log10f: New file.
70491         * tests/test-math-c++.cc: Check the declaration of log10f.
70492         * doc/posix-functions/log10f.texi: Mention the new module.
70494         log10: Use a .m4 file.
70495         * m4/log10.m4: New file.
70496         * modules/log10 (Files): Add it.
70497         (configure.ac): Just invoke gl_FUNC_LOG10.
70499 2011-10-08  Bruno Haible  <bruno@clisp.org>
70501         Tests for module 'logf'.
70502         * modules/logf-tests: New file.
70503         * tests/test-logf.c: New file.
70505         New module 'logf'.
70506         * lib/math.in.h (logf): New declaration.
70507         * lib/logf.c: New file.
70508         * m4/logf.m4: New file.
70509         * m4/math_h.m4 (gl_MATH_H): Test whether logf is declared.
70510         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOGF, HAVE_LOGF.
70511         * modules/math (Makefile.am): Substitute GNULIB_LOGF, HAVE_LOGF.
70512         * modules/logf: New file.
70513         * tests/test-math-c++.cc: Check the declaration of logf.
70514         * doc/posix-functions/logf.texi: Mention the new module.
70516         log: Use a .m4 file.
70517         * m4/log.m4: New file.
70518         * modules/log (Files): Add it.
70519         (configure.ac): Just invoke gl_FUNC_LOG.
70521 2011-10-08  Bruno Haible  <bruno@clisp.org>
70523         Tests for module 'expf'.
70524         * modules/expf-tests: New file.
70525         * tests/test-expf.c: New file.
70527         New module 'expf'.
70528         * lib/math.in.h (expf): New declaration.
70529         * lib/expf.c: New file.
70530         * m4/expf.m4: New file.
70531         * m4/math_h.m4 (gl_MATH_H): Test whether expf is declared.
70532         (gl_MATH_H_DEFAULTS): Initialize GNULIB_EXPF, HAVE_EXPF.
70533         * modules/math (Makefile.am): Substitute GNULIB_EXPF, HAVE_EXPF.
70534         * modules/expf: New file.
70535         * tests/test-math-c++.cc: Check the declaration of expf.
70536         * doc/posix-functions/expf.texi: Mention the new module.
70538         exp: Use a .m4 file.
70539         * m4/exp.m4: New file.
70540         * modules/exp (Files): Add it.
70541         (configure.ac): Just invoke gl_FUNC_EXP.
70543 2011-10-08  Bruno Haible  <bruno@clisp.org>
70545         Tests for module 'sqrtf'.
70546         * modules/sqrtf-tests: New file.
70547         * tests/test-sqrtf.c: New file.
70549         New module 'sqrtf'.
70550         * lib/math.in.h (sqrtf): New declaration.
70551         * lib/sqrtf.c: New file.
70552         * m4/sqrtf.m4: New file.
70553         * m4/math_h.m4 (gl_MATH_H): Test whether sqrtf is declared.
70554         (gl_MATH_H_DEFAULTS): Initialize GNULIB_SQRTF, HAVE_SQRTF.
70555         * modules/math (Makefile.am): Substitute GNULIB_SQRTF, HAVE_SQRTF.
70556         * modules/sqrtf: New file.
70557         * tests/test-math-c++.cc: Check the declaration of sqrtf.
70558         * doc/posix-functions/sqrtf.texi: Mention the new module.
70560 2011-10-08  Bruno Haible  <bruno@clisp.org>
70562         Tests: Avoid link failures w.r.t. libintl.
70563         * modules/faccessat-tests (Makefile.am): Link test-faccessat against
70564         $(LIBINTL).
70565         * modules/fchdir-tests (Makefile.am): Link test-fchdir against
70566         $(LIBINTL).
70567         * modules/getcwd-lgpl-tests (Makefile.am): Link test-getcwd-lgpl
70568         against $(LIBINTL).
70569         * modules/getcwd-tests (Makefile.am): Link test-getcwd against
70570         $(LIBINTL).
70571         * modules/openat-tests (Makefile.am): Link test-fchmodat against
70572         $(LIBINTL).
70573         * modules/stat-tests (Makefile.am): Link test-stat against $(LIBINTL).
70575 2011-10-08  Bruno Haible  <bruno@clisp.org>
70577         pow tests: Defeat compiler optimizations.
70578         * tests/test-pow.c (main): Assign arguments to x and y before use.
70580 2011-10-08  Bruno Haible  <bruno@clisp.org>
70582         gnulib-tool: Improve last commit.
70583         * gnulib-tool (func_modules_transitive_closure): Simplify code.
70584         (func_emit_autoconf_snippets): Instead of invoking func_acceptable,
70585         ignore dependencies that are not among the modules list.
70587 2011-10-07  Paul Eggert  <eggert@cs.ucla.edu>
70589         gnulib-tool: don't follow dependencies to avoided modules
70590         This fixes a bug that is related to the previous one.
70591         * gnulib-tool (func_modules_transitive_closure)
70592         (func_emit_autoconf_snippets):
70593         Check whether a dependency is acceptable before using it.
70594         (--extract-dependencies): Report an error if --avoid is also used,
70595         since this combination of options is not yet supported.
70597         gnulib-tool: fix typo that broke Emacs on powerpc-apple-darwin9.8.0.
70598         Problem reported by Peter Dyballa in
70599         <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9696>.
70600         * gnulib-tool (func_emit_autoconf_snippets): Quote with "", not '',
70601         when echoing "$condition".
70603 2011-10-07  Bruno Haible  <bruno@clisp.org>
70605         Fix documentation about math functions on MacOS X.
70606         * doc/posix-functions/exp2.texi: Don't say the function is missing on
70607         MacOS X 10.5.
70608         * doc/posix-functions/fdim.texi: Likewise.
70609         * doc/posix-functions/feclearexcept.texi: Likewise.
70610         * doc/posix-functions/fegetenv.texi: Likewise.
70611         * doc/posix-functions/fegetround.texi: Likewise.
70612         * doc/posix-functions/feholdexcept.texi: Likewise.
70613         * doc/posix-functions/feraiseexcept.texi: Likewise.
70614         * doc/posix-functions/fesetenv.texi: Likewise.
70615         * doc/posix-functions/fesetround.texi: Likewise.
70616         * doc/posix-functions/fetestexcept.texi: Likewise.
70617         * doc/posix-functions/feupdateenv.texi: Likewise.
70618         * doc/posix-functions/fmax.texi: Likewise.
70619         * doc/posix-functions/fmin.texi: Likewise.
70620         * doc/posix-functions/log2.texi: Likewise.
70621         * doc/posix-functions/modff.texi: Likewise.
70622         * doc/posix-functions/nan.texi: Likewise.
70623         * doc/posix-functions/nanf.texi: Likewise.
70624         * doc/posix-functions/nextafterf.texi: Likewise.
70625         * doc/posix-functions/remquo.texi: Likewise.
70627 2011-10-07  Bruno Haible  <bruno@clisp.org>
70629         modff: Drop assumption about library that defines modff.
70630         * m4/modff.m4 (gl_FUNC_MODFF): Use gl_MATHFUNC macro instead of
70631         AC_CHECK_FUNCS.
70632         * modules/modff (Files): Add m4/mathfunc.m4.
70634 2011-10-07  Bernhard Voelker  <mail@bernhard-voelker.de>
70636         raise tests: Avoid a GCC warning.
70637         * tests/test-raise.c (handler): Use _Noreturn.
70639 2011-10-07  Bruno Haible  <bruno@clisp.org>
70641         Tests for module 'ldexpf'.
70642         * modules/ldexpf-tests: New file.
70643         * tests/test-ldexpf.c: New file.
70645         New module 'ldexpf'.
70646         * lib/math.in.h (ldexpf): New declaration.
70647         * lib/ldexpf.c: New file.
70648         * m4/ldexpf.m4: New file.
70649         * m4/math_h.m4 (gl_MATH_H): Test whether ldexpf is declared.
70650         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LDEXPF, HAVE_LDEXPF.
70651         * modules/math (Makefile.am): Substitute GNULIB_LDEXPF, HAVE_LDEXPF.
70652         * modules/ldexpf: New file.
70653         * tests/test-math-c++.cc: Check the declaration of ldexpf.
70654         * doc/posix-functions/ldexpf.texi: Mention the new module.
70656 2011-10-06  Bruno Haible  <bruno@clisp.org>
70658         frexpf: Work around problems on IRIX and mingw.
70659         * lib/math.in.h (frexpf): Consider also REPLACE_FREXPF.
70660         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPF.
70661         * m4/frexpf.m4 (gl_FUNC_FREXPF_WORKS): New macro.
70662         (gl_FUNC_FREXPF): Invoke it. Set REPLACE_FREXPF.
70663         * modules/frexpf (Depends-on, configure.ac): Consider REPLACE_FREXPF.
70664         * modules/math (Makefile.am): Substitute REPLACE_FREXPF.
70665         * doc/posix-functions/frexpf.texi: Mention the IRIX and mingw problems.
70667 2011-10-06  Bruno Haible  <bruno@clisp.org>
70669         fabsf: Drop assumption about library that defines fabsf.
70670         * m4/fabsf.m4 (gl_FUNC_FABSF): Use gl_MATHFUNC macro instead of
70671         AC_CHECK_FUNCS.
70672         * modules/fabsf (Files): Add m4/mathfunc.m4.
70674 2011-10-06  Bruno Haible  <bruno@clisp.org>
70676         frexpf: Drop assumption about library that defines frexpf.
70677         * m4/mathfunc.m4 (gl_MATHFUNC): Support also the argument types
70678         'int *', 'float *', 'long double *', 'float', 'long double'.
70679         * m4/frexpf.m4 (gl_FUNC_FREXPF): Use gl_MATHFUNC macro instead of
70680         AC_CHECK_FUNCS.
70681         * modules/frexpf (Files): Add m4/mathfunc.m4.
70683         Tests for module 'frexpf'.
70684         * modules/frexpf-tests: New file.
70685         * tests/test-frexpf.c: New file.
70687         New module 'frexpf'.
70688         * lib/math.in.h (frexpf): New declaration.
70689         * lib/frexpf.c: New file.
70690         * m4/frexpf.m4: New file.
70691         * m4/math_h.m4 (gl_MATH_H): Test whether frexpf is declared.
70692         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPF, HAVE_FREXPF.
70693         * modules/math (Makefile.am): Substitute GNULIB_FREXPF, HAVE_FREXPF.
70694         * modules/frexpf: New file.
70695         * tests/test-math-c++.cc: Check the declaration of frexpf.
70696         * doc/posix-functions/frexpf.texi: Mention the new module.
70698 2011-10-06  Bruno Haible  <bruno@clisp.org>
70700         math: Sort function declarations of math.in.h.
70701         * lib/math.in.h (frexp, logb): Move declarations.
70703 2011-10-05  Bruno Haible  <bruno@clisp.org>
70705         Tests for module 'modff'.
70706         * modules/modff-tests: New file.
70707         * tests/test-modff.c: New file.
70709         New module 'modff'.
70710         * lib/math.in.h (modff): New declaration.
70711         * lib/modff.c: New file.
70712         * m4/modff.m4: New file.
70713         * m4/math_h.m4 (gl_MATH_H): Test whether modff is declared.
70714         (gl_MATH_H_DEFAULTS): Initialize GNULIB_MODFF, HAVE_MODFF.
70715         * modules/math (Makefile.am): Substitute GNULIB_MODFF, HAVE_MODFF.
70716         * modules/modff: New file.
70717         * tests/test-math-c++.cc: Check the declaration of modff.
70718         * doc/posix-functions/modff.texi: Mention the new module.
70720         modf tests: Make test sharper.
70721         * tests/test-modf.c (main): Strengthen upper bound.
70723         modf: Use a .m4 file.
70724         * m4/modf.m4: New file.
70725         * modules/modf (Files): Add it.
70726         (configure.ac): Just invoke gl_FUNC_MODF.
70728 2011-10-05  Bruno Haible  <bruno@clisp.org>
70730         Tests for module 'fmodf'.
70731         * modules/fmodf-tests: New file.
70732         * tests/test-fmodf.c: New file.
70734         New module 'fmodf'.
70735         * lib/math.in.h (fmodf): New declaration.
70736         * lib/fmodf.c: New file.
70737         * m4/fmodf.m4: New file.
70738         * m4/math_h.m4 (gl_MATH_H): Test whether fmodf is declared.
70739         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FMODF, HAVE_FMODF.
70740         * modules/math (Makefile.am): Substitute GNULIB_FMODF, HAVE_FMODF.
70741         * modules/fmodf: New file.
70742         * tests/test-math-c++.cc: Check the declaration of fmodf.
70743         * doc/posix-functions/fmodf.texi: Mention the new module.
70745         fmod: Use a .m4 file.
70746         * m4/fmod.m4: New file.
70747         * modules/fmod (Files): Add it.
70748         (configure.ac): Just invoke gl_FUNC_FMOD.
70750 2011-10-05  Bruno Haible  <bruno@clisp.org>
70752         Tests for module 'fabsf'.
70753         * modules/fabsf-tests: New file.
70754         * tests/test-fabsf.c: New file.
70756         New module 'fabsf'.
70757         * lib/math.in.h (fabsf): New declaration.
70758         * lib/fabsf.c: New file.
70759         * m4/fabsf.m4: New file.
70760         * m4/math_h.m4 (gl_MATH_H): Test whether fabsf is declared.
70761         (gl_MATH_H_DEFAULTS): Initialize GNULIB_FABSF, HAVE_FABSF.
70762         * modules/math (Makefile.am): Substitute GNULIB_FABSF, HAVE_FABSF.
70763         * modules/fabsf: New file.
70764         * tests/test-math-c++.cc: Check the declaration of fabsf.
70765         * doc/posix-functions/fabsf.texi: Mention the new module.
70767         fabs: Use a .m4 file.
70768         * m4/fabs.m4: New file.
70769         * modules/fabs (Files): Add it.
70770         (configure.ac): Just invoke gl_FUNC_FABS.
70772 2011-10-05  Jim Meyering  <meyering@redhat.com>
70774         file-has-acl: revert both recent changes, 80af92af and 95f7c57f
70775         * lib/file-has-acl.c: While the 2011-10-03 change does fix the
70776         ls -lL regression introduced in coreutils-8.12, it does so at the
70777         cost of an additional stat call in the common case.  Besides, now
70778         that the kernel change that prompted commit 95f7c57f has been reverted
70779         (see https://bugzilla.redhat.com/show_bug.cgi?id=720325#c24)
70780         we have no use for commit 95f7c57f, "file-has-acl: use
70781         acl_extended_file_nofollow if available".
70783 2011-10-03  Kamil Dudka  <kdudka@redhat.com>
70785         file-has-acl: revert unintended change in behavior of ls -L
70786         * lib/file-has-acl.c (acl_extended_file_wrap): New function,
70787         derived from...
70788         (file_has_acl): ...code here.  Call it.
70789         This problem was introduced with 2011-07-22 commit 95f7c57f,
70790         "file-has-acl: use acl_extended_file_nofollow if available".
70791         See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28538
70793 2011-10-03  Bruno Haible  <bruno@clisp.org>
70795         poll: Avoid link errors on MSVC.
70796         * m4/poll.m4 (gl_FUNC_POLL): Determine LIB_POLL.
70797         * modules/poll (Depends-on): Add sockets.
70798         (Link): New section.
70799         * NEWS: Mention the change.
70800         * modules/poll-tests (Makefile.am): Link test-poll against $(LIB_POLL).
70801         * modules/poll-h-c++-tests (Makefile.am): Link test-poll-h-c++ against
70802         $(LIB_POLL) instead of $(LIBSOCKET).
70804 2011-10-03  Bruno Haible  <bruno@clisp.org>
70806         sys_select tests: Fix link error on MSVC 9.
70807         * modules/sys_select-c++-tests (Makefile.am): Link test-sys_select-c++
70808         with $(LIB_SELECT) instead of $(LIBSOCKET).
70810 2011-10-03  Bruno Haible  <bruno@clisp.org>
70812         sys_select: Fix compilation error on mingw.
70813         * lib/sys_select.in.h: On native Windows, include <io.h>.
70815 2011-10-03  Bruno Haible  <bruno@clisp.org>
70817         wmemset: Support for MSVC.
70818         * m4/wmemset.m4 (gl_FUNC_WMEMSET): Use a small test program to test
70819         whether wmemset() exists.
70821 2011-10-03  Bruno Haible  <bruno@clisp.org>
70823         wmemmove: Support for MSVC.
70824         * m4/wmemmove.m4 (gl_FUNC_WMEMMOVE): Use a small test program to test
70825         whether wmemmove() exists.
70827 2011-10-03  Bruno Haible  <bruno@clisp.org>
70829         wmemcpy: Support for MSVC.
70830         * m4/wmemcpy.m4 (gl_FUNC_WMEMCPY): Use a small test program to test
70831         whether wmemcpy() exists.
70833 2011-10-03  Bruno Haible  <bruno@clisp.org>
70835         wmemcmp: Support for MSVC.
70836         * m4/wmemcmp.m4 (gl_FUNC_WMEMCMP): Use a small test program to test
70837         whether wmemcmp() exists.
70839 2011-10-03  Bruno Haible  <bruno@clisp.org>
70841         wmemchr: Support for MSVC.
70842         * m4/wmemchr.m4 (gl_FUNC_WMEMCHR): Use a small test program to test
70843         whether wmemchr() exists.
70845 2011-10-03  Bruno Haible  <bruno@clisp.org>
70847         glthread/*, strsignal: Support for MSVC.
70848         * lib/glthread/cond.h: Define WIN32_LEAN_AND_MEAN, so as to avoid
70849         including <winsock.h> on MSVC 9.
70850         * lib/glthread/lock.h: Likewise.
70851         * lib/glthread/thread.h: Likewise.
70852         * lib/glthread/tls.h: Likewise.
70853         * lib/glthread/yield.h: Likewise.
70854         * lib/strsignal.c: Include <string.h> first. Don't include <unistd.h>
70855         if HAVE_UNISTD_H is false.
70856         * m4/strsignal.m4 (gl_PREREQ_STRSIGNAL): Test for <unistd.h>.
70858 2011-10-03  Bruno Haible  <bruno@clisp.org>
70860         nonblocking tests: Fix test failure on OpenBSD/SPARC64.
70861         * tests/test-nonblocking-socket.h (SOCKET_DATA_BLOCK_SIZE) [OpenBSD]:
70862         Set to 100000.
70864 2011-10-03  Bruno Haible  <bruno@clisp.org>
70866         acl: Fix specification.
70867         * lib/file-has-acl.c (file_has_acl): Fix specification.
70869 2011-10-03  Bruno Haible  <bruno@clisp.org>
70871         relocatable-lib[-lgpl]: Avoid expensive /proc access on Linux, Cygwin.
70872         * lib/relocatable.c (ENABLE_COSTLY_RELOCATABLE): New macro.
70873         (compute_curr_prefix, shared_library_fullname,
70874         find_shared_library_fullname, get_shared_library_fullname, relocate):
70875         Use it together with PIC && INSTALLDIR.
70876         Reported by <jojelino@gmail.com>
70877         via Charles Wilson <cygwin@cwilson.fastmail.fm>.
70879 2011-10-01  Jim Meyering  <meyering@redhat.com>
70881         maint.mk: adjust a release-related rule not to require use of gzip
70882         * top/maint.mk (writable-files): Don't hard-code use of .tar.gz.
70883         Instead, check each file in $(DIST_ARCHIVES).  This is better for
70884         projects that build only .tar.xz files.  Also fix an erroneous test.
70886         test-linkat: don't leave behind a temporary file
70887         * tests/test-linkat.c (main): Don't forget to remove a temporary file.
70888         Otherwise, coreutils' "make distcheck" would fail with this:
70889           Only in /c/cu/tests/torture/coreutils/test/\
70890             coreutils-8.13.22-d5caf.old/gnulib-tests: test-linkat.too
70891           make[2]: *** [my-distcheck] Error 1
70893         float, math: add omitted file
70894         * lib/itold.c: Add file, required for yesterday's float change.
70896 2011-10-01  Bruno Haible  <bruno@clisp.org>
70898         isinf: Fix for OpenBSD/x86.
70899         * m4/isinf.m4 (gl_ISINFL_WORKS): Also test the behaviour of isinf on
70900         pseudo-NaNs, pseudo-Infinities, and other non-IEEE values.
70901         * doc/posix-functions/isinf.texi: Mention the problem on OpenBSD/x86.
70903 2011-10-01  Bruno Haible  <bruno@clisp.org>
70905         isfinite: Fix syntax error in configure test.
70906         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Fix syntax error.
70908         isfinite: Fix typo.
70909         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): When cross-compiling, set
70910         gl_cv_func_isfinitel_works, not gl_cv_func_isnanl_works.
70912 2011-10-01  Bruno Haible  <bruno@clisp.org>
70914         nonblocking tests: Fix test failure on Linux/IA-64.
70915         * tests/test-nonblocking-pipe.h (PIPE_DATA_BLOCK_SIZE) [Linux/IA-64]:
70916         Set to 270000.
70918 2011-10-01  Bruno Haible  <bruno@clisp.org>
70920         mkfifoat tests: Fix a test failure on mingw.
70921         * tests/test-mkfifoat.c (main): Allow mkfifoat or test_mknodat to fail
70922         with error ENOSYS.
70924 2011-09-30  Bruno Haible  <bruno@clisp.org>
70926         float, math: Fix 'int' to 'long double' conversion on Linux/SPARC64.
70927         * m4/float_h.m4 (gl_FLOAT_H): Test conversion from 'int' to
70928         'long double'. Set REPLACE_ITOLD.
70929         * lib/float.in.h (_Qp_itoq, _gl_float_fix_itold): New declarations.
70930         * lib/math.in.h (_Qp_itoq, _gl_math_fix_itold): New declarations.
70931         * lib/itold.c: New file.
70932         * modules/float (Files): Add lib/itold.c.
70933         (configure.ac): When REPLACE_ITOLD is 1, arrange to compile itold.c.
70934         (Makefile.am): Substitute REPLACE_ITOLD.
70935         * modules/math (Depends-on): Add float.
70936         (Makefile.am): Substitute REPLACE_ITOLD.
70937         * doc/posix-headers/float.texi: Mention problem on Linux/SPARC64.
70938         * doc/posix-headers/math.texi: Likewise.
70939         * doc/posix-functions/logl.texi: Likewise.
70941 2011-09-30  Bruno Haible  <bruno@clisp.org>
70943         nonblocking tests: Fix test failure on Linux/SPARC (32-bit and 64-bit).
70944         * tests/test-nonblocking-pipe.h (PIPE_DATA_BLOCK_SIZE) [Linux/SPARC]:
70945         Set to 140000.
70947 2011-09-30  Bruno Haible  <bruno@clisp.org>
70949         gnulib-tool: Improve suggestion where to put gl_EARLY invocation.
70950         * gnulib-tool (func_import): If the configure.ac has an AC_PROG_CC_STDC
70951         invocation, say "right after AC_PROG_CC_STDC", not "right after
70952         AC_PROG_CC".
70953         Reported by Gary V. Vaughan <gary@gnu.org>.
70955 2011-09-30  Bruno Haible  <bruno@clisp.org>
70957         Centralize C99 requirement.
70958         * m4/gnulib-common.m4 (gl_PROG_CC_C99): New macro.
70959         * modules/stdarg (configure.ac-early): Invoke it instead of
70960         AC_PROG_CC_STDC.
70961         Reported by Gary V. Vaughan and Paul Eggert.
70963 2011-09-29  Bruno Haible  <bruno@clisp.org>
70965         float: Fix LDBL_MAX value on Linux/PowerPC.
70966         * m4/float_h.m4 (gl_FLOAT_H): Set FLOAT_H and REPLACE_FLOAT_LDBL also
70967         on Linux/PowerPC.
70968         * lib/float.in.h (LDBL_MAX): Redefine also on Linux/PowerPC.
70969         * lib/float.c (gl_LDBL_MAX): Also define on Linux/PowerPC.
70970         * doc/posix-headers/float.texi: Mention Linux/PowerPC as an affected
70971         platform.
70972         Reported by Andreas Metzler <ametzler@downhill.at.eu.org>.
70974 2011-09-29  Bruno Haible  <bruno@clisp.org>
70976         doc: Improve doc about gl_EARLY.
70977         * doc/gnulib-tool.texi (Initial import): Mention where to place an
70978         AC_PROG_CC_STDC invocation.
70979         Reported by Gary V. Vaughan <gary@gnu.org>.
70981 2011-09-28  Bruno Haible  <bruno@clisp.org>
70983         fgetc, fputc, fread, fwrite tests: Fix link error.
70984         * tests/test-fgetc.c (main): Don't invoke gl_msvc_inval_ensure_handler
70985         on non-MSVC platforms.
70986         * tests/test-fputc.c (main): Likewise.
70987         * tests/test-fread.c (main): Likewise.
70988         * tests/test-fwrite.c (main): Likewise.
70989         Reported by Jim Meyering.
70991 2011-09-27  Bruno Haible  <bruno@clisp.org>
70993         fputc, fwrite tests: Avoid test failure on MSVC.
70994         * tests/test-fgetc.c: Include msvc-inval.h.
70995         (main): Invoke gl_msvc_inval_ensure_handler.
70996         * tests/test-fputc.c: Include msvc-inval.h.
70997         (main): Invoke gl_msvc_inval_ensure_handler.
70998         * tests/test-fread.c: Include msvc-inval.h.
70999         (main): Invoke gl_msvc_inval_ensure_handler.
71000         * tests/test-fwrite.c: Include msvc-inval.h.
71001         (main): Invoke gl_msvc_inval_ensure_handler.
71002         * modules/fgetc-tests (Depends-on): Add msvc-inval.
71003         * modules/fputc-tests (Depends-on): Likewise.
71004         * modules/fread-tests (Depends-on): Likewise.
71005         * modules/fwrite-tests (Depends-on): Likewise.
71007 2011-09-27  Bruno Haible  <bruno@clisp.org>
71009         raise: Fix double declaration with modules 'sigprocmask' and 'sigpipe'.
71010         * lib/signal.in.h (GNULIB_defined_signal_blocking): New macro.
71011         (raise): Remove older, duplicated declaration.
71012         (_gl_raise_SIGPIPE): New declaration.
71013         * lib/sigprocmask.c (_gl_raise_SIGPIPE): New function.
71014         (rpl_raise): Remove function.
71015         * lib/raise.c (rpl_raise, raise): Merge into a single function. Handle
71016         a gnulib-defined SIGPIPE here.
71017         * m4/raise.m4 (gl_FUNC_RAISE): Set REPLACE_RAISE also if the module
71018         'sigprocmask' has detected missing signal-blocking and the module
71019         'sigpipe' is enabled.
71020         Reported by Tatsuro MATSUOKA <tmacchant5@yahoo.co.jp>.
71022 2011-09-26  Gijs van Tulder  <gvtulder@gmail.com>
71024         base64-tests: avoid memory leak
71025         * tests/test-base64.c (main): Plug memory leak.
71027         base32: new module
71028         * modules/base32: New module.
71029         * lib/base32.c: New file.
71030         * lib/base32.h: Likewise.
71031         * m4/base32.m4: Likewise.
71032         * modules/base32-tests: New test.
71033         * tests/test-base32.c: Likewise.
71034         * MODULES.html.sh (Misc): Mention it.
71036 2011-09-26  Paul Eggert  <eggert@cs.ucla.edu>
71038         gnulib: use more-standard license notice wording
71039         * gnulib-tool (func_emit_copyright_notice): When emitting a
71040         license notice into a file, use the standard wording as suggested
71041         by the current information for GNU maintainers, except say "file"
71042         rather than "program".  The new wording gives a license version
71043         number, which addresses an issue raised by Glenn Morris in
71044         <http://lists.gnu.org/r/bug-gnulib/2011-09/msg00397.html>.
71045         * m4/onceonly.m4: Use that same wording here, too.
71047         dup2: minor simplification
71048         * m4/dup2.m4 (gl_PREREQ_DUP2): Don't require AC_C_INLINE,
71049         as lib/dup2.c no longer uses 'inline'.
71051 2011-09-25  Bruno Haible  <bruno@clisp.org>
71053         strings: Fix compilation error on MSVC.
71054         * lib/strings.in.h: Include <stddef.h> for size_t.
71056 2011-09-25  Bruno Haible  <bruno@clisp.org>
71058         fflush et al.: Document limitation on MSVC.
71059         * doc/posix-functions/fflush.texi: Document possible crash in handling
71060         mode other than DEFAULT_HANDLING.
71061         * doc/posix-functions/fgetc.texi: Likewise.
71062         * doc/posix-functions/fputc.texi: Likewise.
71063         * doc/posix-functions/fread.texi: Likewise.
71064         * doc/posix-functions/fwrite.texi: Likewise.
71066 2011-09-25  Bruno Haible  <bruno@clisp.org>
71068         msvc-inval: Allow three invalid parameter handling modes.
71069         * lib/msvc-inval.h: Don't include <stdlib.h> here.
71070         (DEFAULT_HANDLING, HAIRY_LIBRARY_HANDLING, SANE_LIBRARY_HANDLING): New
71071         macros.
71072         (gl_msvc_inval_ensure_handler, TRY_MSVC_INVAL, CATCH_MSVC_INVAL,
71073         DONE_MSVC_INVAL): Implement DEFAULT_HANDLING. Treat
71074         SANE_LIBRARY_HANDLING as a no-op.
71075         * lib/msvc-inval.c: Treat SANE_LIBRARY_HANDLING as a no-op. Include
71076         <stdlib.h>.
71077         (gl_msvc_invalid_parameter_handler): Implement DEFAULT_HANDLING.
71079 2011-09-25  Bruno Haible  <bruno@clisp.org>
71081         msvc-inval: Make handler multithread-safe.
71082         * lib/msvc-inval.h (struct gl_msvc_inval_per_thread): New type.
71083         (gl_msvc_inval_restart, gl_msvc_inval_restart_valid): Remove
71084         declarations.
71085         (gl_msvc_inval_current): New declaration.
71086         (TRY_MSVC_INVAL, CATCH_MSVC_INVAL, DONE_MSVC_INVAL) [!_MSC_VER]:
71087         Operate on the structure returned by gl_msvc_inval_current().
71088         * lib/msvc-inval.c (gl_msvc_inval_restart, gl_msvc_inval_restart_valid):
71089         Remove varaiables.
71090         (tls_index, tls_initialized): New variables.
71091         (not_per_thread): New variable.
71092         (gl_msvc_inval_current): New function.
71093         (gl_msvc_invalid_parameter_handler) [!_MSC_VER]: Use the structure
71094         returned by gl_msvc_inval_current().
71096 2011-09-25  Bruno Haible  <bruno@clisp.org>
71098         msvc-inval: Install handler globally.
71099         * lib/msvc-inval.h (STATUS_GNULIB_INVALID_PARAMETER): Define also for
71100         !_MSC_VER.
71101         (gl_msvc_invalid_parameter_handler): Remove declaration.
71102         (gl_msvc_inval_restart_valid, gl_msvc_inval_ensure_handler): New
71103         declarations.
71104         (TRY_MSVC_INVAL, CATCH_MSVC_INVAL, DONE_MSVC_INVAL) [!_MSC_VER]:
71105         Install the handler globally, don't uninstall it.
71106         * lib/msvc-inval.c (gl_msvc_inval_restart_valid): New variable.
71107         (gl_msvc_invalid_parameter_handler): Make static. If the restart is not
71108         currently valid, call RaiseException instead.
71109         (gl_msvc_inval_initialized, gl_msvc_inval_ensure_handler): Define also
71110         for !_MSC_VER.
71112 2011-09-25  Bruno Haible  <bruno@clisp.org>
71114         strerror_r-posix: Fix for MSVC 9.
71115         * lib/strerror_r.c (local_snprintf): New function.
71116         (snprintf): Define to local_snprintf, not to _snprintf.
71118 2011-09-25  Bruno Haible  <bruno@clisp.org>
71120         ftruncate: Support for MSVC 9.
71121         * lib/ftruncate.c: Include errno.h, msvc-inval.h.
71122         (chsize_nothrow): New function.
71123         (chsize): Redefine as a macro.
71124         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): Require AC_C_INLINE.
71125         * modules/ftruncate (Depends-on): Add msvc-inval.
71127 2011-09-25  Bruno Haible  <bruno@clisp.org>
71129         New module 'fstat'.
71130         * lib/sys_stat.in.h (fstat): Declare only if GNULIB_FSTAT is set.
71131         * lib/fstat.c: New file, based on a piece of lib/fchdir.c.
71132         * lib/fchdir.c (rpl_fstat): Remove function.
71133         * m4/fstat.m4: New file.
71134         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't set REPLACE_FSTAT.
71135         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Test whether fstat is
71136         declared.
71137         (gl_SYS_STAT_H_DEFAULTS): Initialize GNULIB_FSTAT.
71138         * modules/sys_stat (Makefile.am): Substitute GNULIB_FSTAT.
71139         * modules/fstat: New file.
71140         * modules/sys_stat-tests (Depends-on): Remove fstat-tests.
71141         * tests/test-sys_stat-c++.cc (fstat): Check only if GNULIB_TEST_FSTAT
71142         is set.
71143         * doc/posix-functions/fstat.texi: Mention the new module and the
71144         problem on MSVC.
71145         * NEWS: Mention the change.
71146         * modules/acl (Depends-on): Add fstat.
71147         * modules/chdir-safer (Depends-on): Likewise.
71148         * modules/chown (Depends-on): Likewise.
71149         * modules/copy-file (Depends-on): Likewise.
71150         * modules/fchdir (Depends-on): Likewise.
71151         * modules/fdopendir (Depends-on): Likewise.
71152         * modules/fopen (Depends-on): Likewise.
71153         * modules/fts (Depends-on): Likewise.
71154         * modules/getcwd (Depends-on): Likewise.
71155         * modules/isapipe (Depends-on): Likewise.
71156         * modules/linkat (Depends-on): Likewise.
71157         * modules/lseek (Depends-on): Likewise.
71158         * modules/mkdir-p (Depends-on): Likewise.
71159         * modules/open (Depends-on): Likewise.
71160         * modules/openat (Depends-on): Likewise.
71161         * modules/read-file (Depends-on): Likewise.
71162         * modules/renameat (Depends-on): Likewise.
71163         * modules/utimens (Depends-on): Likewise.
71165 2011-09-25  Bruno Haible  <bruno@clisp.org>
71167         linkat: Fix compilation on MSVC 9.
71168         * lib/linkat.c: Don't include <stdint.h>.
71170 2011-09-25  Bruno Haible  <bruno@clisp.org>
71172         fclose: Support for MSVC 9.
71173         * lib/fclose.c: Include msvc-inval.h.
71174         (fclose_nothrow): New function.
71175         (rpl_fclose): Use it.
71176         * modules/fclose (Depends-on): Add msvc-inval.
71177         * doc/posix-functions/fclose.texi: Mention the problem on MSVC.
71179 2011-09-24  Paul Eggert  <eggert@cs.ucla.edu>
71181         dup2: minor simplifications
71182         * lib/dup2.c (ms_windows_dup2): Omit 'inline' as it's not clear
71183         that it's a performance win.
71184         (rpl_dup2): Change "if !((defined _WIN32 || defined __WIN32__) &&
71185         ! defined __CYGWIN__)" to "ifdef F_GETFL".
71187 2011-09-24  Jim Meyering  <meyering@redhat.com>
71189         test-futimens: avoid a warning from gcc -Wshadow
71190         * tests/test-futimens.h (test_futimens): Rename inner local, s/fd/fd0/
71191         to avoid a shadowing warning.
71193 2011-09-24  Bruno Haible  <bruno@clisp.org>
71195         fdopen: Support for MSVC 9.
71196         * m4/fdopen.m4 (gl_FUNC_FDOPEN): Set REPLACE_FDOPEN also if
71197         HAVE_MSVC_INVALID_PARAMETER_HANDLER is 1.
71198         * lib/fdopen.c: Include msvc-inval.h.
71199         (fdopen_nothrow): New function.
71200         (rpl_fdopen): Use it.
71201         * modules/fdopen (Depends-on): Add msvc-inval.
71202         * modules/fclose-tests (Depends-on): Add fdopen.
71203         * modules/fflush-tests (Depends-on): Likewise.
71204         * modules/fgetc-tests (Depends-on): Likewise.
71205         * modules/fputc-tests (Depends-on): Likewise.
71206         * modules/fread-tests (Depends-on): Likewise.
71207         * modules/freopen-tests (Depends-on): Likewise.
71208         * modules/fseeko-tests (Depends-on): Likewise.
71209         * modules/ftello-tests (Depends-on): Likewise.
71210         * modules/fwrite-tests  (Depends-on): Likewise.
71211         * doc/posix-functions/fdopen.texi: Mention the problem on MSVC.
71213 2011-09-24  Bruno Haible  <bruno@clisp.org>
71215         fgetc, fputc, fread, fwrite tests: Avoid compilation error on MSVC.
71216         * modules/fgetc-tests (Depends-on): Add unistd.
71217         * modules/fputc-tests (Depends-on): Likewise.
71218         * modules/fread-tests (Depends-on): Likewise.
71219         * modules/fwrite-tests (Depends-on): Likewise.
71221 2011-09-24  Bruno Haible  <bruno@clisp.org>
71223         dup: Simplify autoconf test.
71224         * m4/dup.m4 (gl_FUNC_DUP): Don't run a test program. Instead, just rely
71225         on gl_MSVC_INVAL's result.
71227 2011-09-24  Bruno Haible  <bruno@clisp.org>
71229         Tests for function fwrite().
71230         * modules/fwrite-tests: New file.
71231         * tests/test-fwrite.c: New file.
71232         * modules/stdio-tests (Depends-on): Add fwrite-tests.
71234         Tests for function fread().
71235         * modules/fread-tests: New file.
71236         * tests/test-fread.c: New file.
71237         * modules/stdio-tests (Depends-on): Add fread-tests.
71239         Activate fputc tests.
71240         * modules/stdio-tests (Depends-on): Add fputc-tests.
71242         Enhance fgetc, fputc tests.
71243         * tests/test-fgetc.c (main): Also test the stream's error indicator.
71244         * tests/test-fputc.c (main): Likewise.
71246 2011-09-24  Bruno Haible  <bruno@clisp.org>
71248         write: Support for MSVC 9.
71249         * lib/unistd.in.h (write): Replace also when GNULIB_UNISTD_H_NONBLOCKING
71250         is not 1.
71251         * lib/write.c (write_nothrow): New function.
71252         (rpl_write): Define also when GNULIB_NONBLOCKING or GNULIB_SIGPIPE is
71253         not 1. Use write_nothrow.
71254         * m4/write.m4 (gl_FUNC_WRITE): Replace read if the platform has an
71255         invalid parameter handler.
71256         (gl_PREREQ_WRITE): New macro.
71257         * modules/write (Depends-on): Add msvc-inval.
71258         (configure.ac): Invoke gl_PREREQ_WRITE.
71259         * doc/posix-functions/write.texi: Mention the problem on MSVC.
71261 2011-09-24  Bruno Haible  <bruno@clisp.org>
71263         read: Fix last commit.
71264         * lib/read.c (read_nothrow): Change return type to 'ssize_t'.
71266 2011-09-24  Bruno Haible  <bruno@clisp.org>
71268         dup2: Fix last commit.
71269         * lib/dup2.c: Restore comments. Treat Cygwin like Unix.
71270         (rpl_dup2): Disable fcntl workaround on native Windows.
71272         sigprocmask: Make code safer.
71273         * lib/sigprocmask.c: Move '#include "msvc-inval.h"' before the code
71274         section that changes macro definitions for this compilation unit.
71276 2011-09-23  Paul Eggert  <eggert@cs.ucla.edu>
71278         dup2: clarify by coalescing Windows-specific material
71279         * lib/dup2.c: Move '#include "msvc-inval.h"' and '#include
71280         "msvc-nothrow.h"' to the Windows-specific section, so that the
71281         Emacs source need not contain these include files.
71282         (ms_windows_dup2): Rename from dup2_nothrow, and move all the
71283         Windows-specific fixes into this function rather than just the
71284         nothrow fix, as this shortens and clarifies the code.  Always
71285         define as a function, as that's a bit cleaner than having it be
71286         sometimes a function and sometimes a macro.
71287         (rpl_dup2): Move the Windows-specific stuff out of here and into
71288         ms_windows_dup2.  Don't protect the Haiku-related fix with
71289         "#if !defined __linux__", as the same code also works around
71290         a Linux kernel bug, and it doesn't add any system calls on any
71291         platform.  Add comment about FreeBSD 6.1.
71293         sigprocmask: move #include directive
71294         * lib/sigprocmask.c: Move '#include "msvc-inval.h"' to the
71295         Windows-specific section, so that the Emacs source need not
71296         contain msvc-inval.h.
71298 2011-09-23  Bruno Haible  <bruno@clisp.org>
71300         read: Support for MSVC 9.
71301         * lib/unistd.in.h (read): Replace also when GNULIB_UNISTD_H_NONBLOCKING
71302         is not 1.
71303         * lib/read.c (read_nothrow): New function.
71304         (rpl_read): Define also when GNULIB_NONBLOCKING is not 1. Use
71305         read_nothrow.
71306         * m4/read.m4 (gl_FUNC_READ): Replace read if the platform has an
71307         invalid parameter handler.
71308         (gl_PREREQ_READ): New macro.
71309         * modules/read (Depends-on): Add msvc-inval.
71310         (configure.ac): Invoke gl_PREREQ_READ.
71311         * doc/posix-functions/read.texi: Mention the problem on MSVC.
71313 2011-09-23  Bruno Haible  <bruno@clisp.org>
71315         close: Support for MSVC 9.
71316         * lib/close.c: Include <errno.h>, msvc-inval.h.
71317         (close_nothrow): New function.
71318         (rpl_close): Use it.
71319         * m4/close.m4 (gl_FUNC_CLOSE): Replace close if the platform has an
71320         invalid parameter handler.
71321         * modules/close (Depends-on): Add msvc-inval.
71322         * modules/dup2-tests (Depends-on): Add close.
71323         * modules/dup3-tests (Depends-on): Likewise.
71324         * modules/fcntl-tests (Depends-on): Likewise.
71325         * modules/spawn-pipe-tests (Depends-on): Likewise.
71326         * modules/unistd-safer-tests (Depends-on): Likewise.
71327         * doc/posix-functions/close.texi: Mention the problem on MSVC.
71329 2011-09-23  Bruno Haible  <bruno@clisp.org>
71331         New module 'dup'.
71332         * lib/unistd.in.h (dup): Declare only if the 'dup' module is in use.
71333         Allow replacement.
71334         * lib/dup.c: New file.
71335         * lib/fchdir.c (rpl_dup): Remove function.
71336         * m4/dup.m4: New file.
71337         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't set REPLACE_DUP here.
71338         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether 'dup' is declared.
71339         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_DUP.
71340         * modules/unistd (Makefile.am): Substitute GNULIB_DUP.
71341         * modules/dup: New file.
71342         * tests/test-unistd-c++.cc: Check the signature of 'dup' only if the
71343         'dup' module is in use.
71344         * modules/fdopendir (Depends-on): Add dup.
71345         * modules/fdutimensat-tests (Depends-on): Likewise.
71346         * modules/fts (Depends-on): Likewise.
71347         * modules/futimens-tests (Depends-on): Likewise.
71348         * modules/posix_spawnp-tests (Depends-on): Likewise.
71349         * modules/unistd-safer-tests (Depends-on): Likewise.
71350         * modules/utimens-tests (Depends-on): Likewise.
71351         * doc/posix-functions/dup.texi: Mention the new module and the problem
71352         on MSVC.
71354 2011-09-23  Bruno Haible  <bruno@clisp.org>
71356         getdtablesize: Support for MSVC 9.
71357         * lib/getdtablesize.c: Include msvc-inval.h.
71358         (_setmaxstdio_nothrow): New function.
71359         (_setmaxstdio): Redefine it.
71360         * m4/getdtablesize.m4 (gl_PREREQ_GETDTABLESIZE): New macro.
71361         * modules/getdtablesize (Depends-on): Add msvc-inval.
71362         (configure.ac): Invoke gl_PREREQ_GETDTABLESIZE.
71364 2011-09-23  Bruno Haible  <bruno@clisp.org>
71366         signal-h: Rename from signal.
71367         * modules/signal-h: Renamed from modules/signal.
71368         * modules/pthread_sigmask (Depends-on): Update.
71369         * modules/raise (Depends-on): Likewise.
71370         * modules/sigaction (Depends-on): Likewise.
71371         * modules/sigpipe (Depends-on): Likewise.
71372         * modules/sigprocmask (Depends-on): Likewise.
71373         * modules/sys_select (Depends-on): Likewise.
71374         * modules/signal-h-tests: Renamed from modules/signal-tests.
71375         (Files, Depends-on, Makefile.am): Update.
71376         * tests/test-signal-h.c: Renamed from tests/test-signal.c.
71377         * modules/signal-h-c++-tests: Renamed from modules/signal-c++-tests.
71378         (Files, Makefile.am): Update.
71379         * tests/test-signal-h-c++.cc: Renamed from tests/test-signal-c++.cc.
71380         * tests/test-signal-h-c++2.cc: Renamed from tests/test-signal-c++2.cc.
71381         * modules/signal: New placeholder file.
71382         * MODULES.html.sh (Support for systems lacking POSIX:2008): Update.
71383         * doc/posix-headers/signal.texi: Update.
71384         * NEWS: Mention the change.
71386 2011-09-23  Bruno Haible  <bruno@clisp.org>
71388         sigprocmask: Avoid crashes through signal() on MSVC 9.
71389         * lib/sigprocmask.c: Include msvc-inval.h.
71390         (signal_nothrow): New function.
71391         (signal): Redefine it.
71392         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Require AC_C_INLINE.
71393         * modules/sigprocmask (Depends-on): Add msvc-inval.
71394         * doc/posix-functions/signal.texi: Mention the problem on MSVC.
71396 2011-09-23  Bruno Haible  <bruno@clisp.org>
71398         Tests for module 'raise'.
71399         * modules/raise-tests: New file.
71400         * tests/test-raise.c: New file.
71402         raise: Support for MSVC.
71403         * lib/signal.in.h (raise): New declaration.
71404         * lib/raise.c (raise_nothrow, rpl_raise): New alternate implementation
71405         for native Windows platforms.
71406         * m4/raise.m4: New file.
71407         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Initialize GNULIB_RAISE,
71408         HAVE_RAISE, REPLACE_RAISE.
71409         * modules/signal (Makefile.am): Substitute GNULIB_RAISE, HAVE_RAISE,
71410         REPLACE_RAISE.
71411         * modules/raise (Status, Notice): Remove fields.
71412         (Files): Add m4/raise.m4.
71413         (Depends-on): Add signal, msvc-inval.
71414         (configure.ac): Use the common idioms.
71415         (Maintainer): Add me.
71416         * tests/test-signal-c++.cc: Check the signature of raise.
71417         * doc/posix-functions/raise.texi: Mention the problem on MSVC.
71419 2011-09-23  Bruno Haible  <bruno@clisp.org>
71421         pipe2: Fix compilation on pre-C99 compilers.
71422         * lib/pipe2.c (pipe2): Surround verify(...) declaration with braces.
71424 2011-09-23  Bruno Haible  <bruno@clisp.org>
71426         New module 'msvc-nothrow'. Makes _get_osfhandle safe on MSVC 9.
71427         * lib/msvc-nothrow.h: New file.
71428         * lib/msvc-nothrow.c: New file.
71429         * m4/msvc-nothrow.m4: New file.
71430         * modules/msvc-nothrow: New file.
71431         * lib/dup2.c: Include msvc-nothrow.h.
71432         (rpl_dup2): No need to protect _get_osfhandle call here.
71433         * lib/accept4.c: Include msvc-nothrow.h.
71434         * lib/error.c: Likewise.
71435         * lib/fcntl.c: Likewise.
71436         * lib/lseek.c: Likewise.
71437         * lib/nonblocking.c: Likewise.
71438         * lib/poll.c: Likewise.
71439         * lib/read.c: Likewise.
71440         * lib/select.c: Likewise.
71441         * lib/sockets.h: Likewise.
71442         * lib/sockets.c: Likewise.
71443         * lib/stdio-read.c: Likewise.
71444         * lib/stdio-write.c: Likewise.
71445         * lib/write.c: Likewise.
71446         * lib/w32sock.h: Likewise.
71447         * lib/w32spawn.h: Likewise.
71448         * lib/flock.c: Include msvc-nothrow.h instead of <io.h>.
71449         * lib/fsync.c: Likewise.
71450         * lib/isapipe.c: Likewise.
71451         * modules/dup2 (Depends-on): Add msvc-nothrow.
71452         * modules/accept4 (Depends-on): Likewise.
71453         * modules/error (Depends-on): Likewise.
71454         * modules/fcntl (Depends-on): Likewise.
71455         * modules/lseek (Depends-on): Likewise.
71456         * modules/nonblocking (Depends-on): Likewise.
71457         * modules/poll (Depends-on): Likewise.
71458         * modules/read (Depends-on): Likewise.
71459         * modules/select (Depends-on): Likewise.
71460         * modules/sockets (Depends-on): Likewise.
71461         * modules/sigpipe (Depends-on): Likewise.
71462         * modules/write (Depends-on): Likewise.
71463         * modules/accept (Depends-on): Likewise.
71464         * modules/bind (Depends-on): Likewise.
71465         * modules/connect (Depends-on): Likewise.
71466         * modules/gethostname (Depends-on): Likewise.
71467         * modules/getpeername (Depends-on): Likewise.
71468         * modules/getsockname (Depends-on): Likewise.
71469         * modules/getsockopt (Depends-on): Likewise.
71470         * modules/ioctl (Depends-on): Likewise.
71471         * modules/listen (Depends-on): Likewise.
71472         * modules/recv (Depends-on): Likewise.
71473         * modules/recvfrom (Depends-on): Likewise.
71474         * modules/send (Depends-on): Likewise.
71475         * modules/sendto (Depends-on): Likewise.
71476         * modules/setsockopt (Depends-on): Likewise.
71477         * modules/shutdown (Depends-on): Likewise.
71478         * modules/socket (Depends-on): Likewise.
71479         * modules/execute (Depends-on): Likewise.
71480         * modules/spawn-pipe (Depends-on): Likewise.
71481         * modules/flock (Depends-on): Likewise.
71482         * modules/fsync (Depends-on): Likewise.
71483         * modules/isapipe (Depends-on): Likewise.
71484         * tests/test-cloexec.c: Include msvc-nothrow.h.
71485         * tests/test-dup-safer.c: Likewise.
71486         * tests/test-dup2.c: Likewise.
71487         * tests/test-dup3.c: Likewise.
71488         * tests/test-fcntl.c: Likewise.
71489         * tests/test-pipe.c: Likewise.
71490         * tests/test-pipe2.c: Likewise.
71491         * modules/cloexec-tests (Depends-on): Add msvc-nothrow.
71492         * modules/unistd-safer-tests (Depends-on): Likewise.
71493         * modules/dup2-tests (Depends-on): Likewise.
71494         * modules/dup3-tests (Depends-on): Likewise.
71495         * modules/fcntl-tests (Depends-on): Likewise.
71496         * modules/pipe-posix-tests (Depends-on): Likewise.
71497         * modules/pipe2-tests (Depends-on): Likewise.
71499 2011-09-23  Bruno Haible  <bruno@clisp.org>
71501         dup2: Make code more maintainable.
71502         * lib/dup2.c (dup2_nothrow): New function, extracted from rpl_dup2.
71503         (rpl_dup2): Use it.
71504         * m4/dup2.m4 (gl_PREREQ_DUP2): New macro.
71505         * modules/dup2 (configure.ac): Invoke it.
71506         Reported by Paul Eggert.
71508 2011-09-23  Bruno Haible  <bruno@clisp.org>
71510         msvc-inval: Fix compilation error.
71511         * lib/msvc-inval.h: Include <excpt.h>.
71513 2011-09-23  Bruno Haible  <bruno@clisp.org>
71515         mkdir: Tweak for MSVC 9.
71516         * lib/sys_stat.in.h: Update comments.
71517         * doc/posix-functions/mkdir.texi: Mention problem on MSVC 9.
71519         Tests for module 'chdir'.
71520         * modules/chdir-tests: New file.
71521         * tests/test-chdir.c: New file.
71523         New module 'chdir'.
71524         * modules/chdir: New file.
71525         * lib/unistd.in.h: Include <io.h>, <direct.h> also for chdir.
71526         (chdir): New declaration.
71527         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether chdir is declared.
71528         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_CHDIR.
71529         * modules/unistd (Makefile.am): Substitute GNULIB_CHDIR.
71530         * tests/test-unistd-c++.cc: Check signature of chdir.
71531         * doc/posix-functions/chdir.texi: Mention problem on native Windows.
71532         * modules/chdir-long (Depends-on): Add chdir.
71533         * modules/fchdir (Depends-on): Likewise.
71534         * modules/rename (Depends-on): Likewise.
71535         * modules/savewd (Depends-on): Likewise.
71537         rmdir: Support for mingw, MSVC 9.
71538         * lib/unistd.in.h: Include <io.h> and <direct.h> also for rmdir.
71539         * doc/posix-functions/getcwd.texi: Mention problem on native Windows.
71541         getcwd: Tweak for MSVC 9.
71542         * lib/unistd.in.h: Update comments.
71543         * doc/posix-functions/getcwd.texi: Mention problem on MSVC 9.
71545 2011-09-22  Bruno Haible  <bruno@clisp.org>
71547         strerror_r-posix: Avoid a link error on MSVC.
71548         * m4/strerror_r.m4 (gl_PREREQ_STRERROR_R): Check for snprintf.
71549         * lib/strerror_r.c (snprintf): Define to _snprintf if it doesn't exist.
71551 2011-09-22  Bruno Haible  <bruno@clisp.org>
71553         select: Avoid link errors on MSVC.
71554         * m4/select.m4 (gl_FUNC_SELECT): Determine LIB_SELECT.
71555         * modules/select (Link): Replace $(LIBSOCKET) with $(LIB_SELECT).
71556         * modules/pselect (Link): Likewise.
71557         * NEWS: Mention the change.
71558         * modules/select-tests (Makefile.am): Link test-select, test-select-fd,
71559         test-select-stdin against $(LIB_SELECT).
71560         * modules/pselect-tests (Makefile.am): Link test-pselect against
71561         $(LIB_SELECT).
71563 2011-09-22  Bruno Haible  <bruno@clisp.org>
71565         select: Avoid compilation error on MSVC.
71566         * lib/select.c: Don't include <stdbool.h>.
71568 2011-09-21  Bruno Haible  <bruno@clisp.org>
71570         Consolidate all uses of PATH_MAX in *.m4 files.
71571         * m4/pathmax.m4 (gl_PATHMAX_SNIPPET, gl_PATHMAX_SNIPPET_PREREQ): New
71572         macros.
71573         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Use gl_PATHMAX_SNIPPET_PREREQ
71574         and gl_PATHMAX_SNIPPET.
71575         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise.
71576         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
71577         * modules/chdir-long (Files): Add m4/pathmax.m4.
71578         * modules/getcwd (Files): Likewise.
71580 2011-09-21  Bruno Haible  <bruno@clisp.org>
71582         ftruncate: Un-deprecate, concentrate on Win32 support.
71583         * modules/ftruncate (Status, Notice): Remove sections.
71584         (Depends-on): Add largefile.
71585         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Drop failure message on
71586         non-mingw platforms.
71587         * lib/ftruncate.c: Remove code for the older platforms. For Win32,
71588         include <io.h>.
71589         * modules/perror-tests (Depends-on): Add ftruncate.
71590         * doc/posix-functions/ftruncate.texi: Mention the MSVC problem and the
71591         'ftruncate' module.
71593 2011-09-21  Bruno Haible  <bruno@clisp.org>
71595         Add dependencies to new dirent related modules.
71596         * modules/opendir (Depends-on): Add closedir.
71597         * modules/getcwd (Depends-on): Add opendir, closedir.
71598         * modules/dirent-safer-tests (Depends-on): Likewise.
71599         * modules/fdopendir-tests (Depends-on): Likewise.
71600         * modules/rename-tests (Depends-on): Add opendir, readdir, closedir.
71601         * modules/renameat-tests (Depends-on): Likewise.
71603 2011-09-21  Bruno Haible  <bruno@clisp.org>
71605         opendir: Avoid compilation error on mingw.
71606         * lib/opendir.c: Include <stddef.h> always. Include <unistd.h> as well.
71607         * modules/opendir (Depends-on): Add unistd.
71609 2011-09-21  Bruno Haible  <bruno@clisp.org>
71611         ftruncate tests: Avoid a test failure on mingw.
71612         * tests/test-ftruncate.c (main): Allow a failure with EACCES.
71614 2011-09-21  Bruno Haible  <bruno@clisp.org>
71616         select tests: Avoid test failures on OSF/1 5.1 and mingw.
71617         * tests/test-select.h (test_bad_fd): Disable all tests on OSF/1 and
71618         native Windows.
71620 2011-09-21  Bruno Haible  <bruno@clisp.org>
71622         New module 'fdopen'.
71623         * lib/stdio.in.h (fdopen): New declaration.
71624         * lib/fdopen.c: New file.
71625         * m4/fdopen.m4: New file.
71626         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize GNULIB_FDOPEN,
71627         REPLACE_FDOPEN.
71628         * modules/stdio (Makefile.am): Substitute GNULIB_FDOPEN,
71629         REPLACE_FDOPEN.
71630         * modules/fdopen: New file.
71631         * modules/stdio-tests (Depends-on): Remove fdopen-tests.
71632         * tests/test-stdio-c++.cc: Check signature of fdopen.
71633         * doc/posix-functions/fdopen.texi: Mention the new module.
71635 2011-09-21  Bruno Haible  <bruno@clisp.org>
71637         unlockpt tests: Avoid test failure on NetBSD 5.1.
71638         * tests/test-unlockpt.c (main): Skip the EBADF tests on NetBSD.
71639         * doc/posix-functions/unlockpt.texi: Mention the bug on NetBSD.
71641 2011-09-21  Bruno Haible  <bruno@clisp.org>
71643         getlogin, getlogin_r tests: Avoid test failure on Linux/SPARC.
71644         * tests/test-getlogin.c (main): Allow a failure with EINVAL.
71645         * tests/test-getlogin_r.c (main): Likewise.
71647 2011-09-20  Bruno Haible  <bruno@clisp.org>
71649         time tests: Don't require pid_t.
71650         * doc/posix-headers/time.texi: Revert last change.
71651         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Revert last change.
71652         * tests/test-time.c: Comment out the check for pid_t.
71654 2011-09-20  Bruno Haible  <bruno@clisp.org>
71656         fsync tests: Avoid a test failure on mingw.
71657         * tests/test-fsync.c (main): Allow a failure with EIO.
71659 2011-09-20  Bruno Haible  <bruno@clisp.org>
71661         euidaccess: Update comments.
71662         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Update comments.
71664 2011-09-20  Bruno Haible  <bruno@clisp.org>
71666         Ensure EBADF returns for socket functions on mingw.
71667         * lib/accept.c (rpl_accept): Fail with error EBADF if the file
71668         descriptor is invalid.
71669         * lib/bind.c (rpl_bind): Likewise.
71670         * lib/connect.c (rpl_connect): Likewise.
71671         * lib/getpeername.c (rpl_getpeername): Likewise.
71672         * lib/getsockname.c (rpl_getsockname): Likewise.
71673         * lib/getsockopt.c (rpl_getsockopt): Likewise.
71674         * lib/listen.c (rpl_listen): Likewise.
71675         * lib/recv.c (rpl_recv): Likewise.
71676         * lib/recvfrom.c (rpl_recvfrom): Likewise.
71677         * lib/send.c (rpl_send): Likewise.
71678         * lib/sendto.c (rpl_sendto): Likewise.
71679         * lib/setsockopt.c (rpl_setsockopt): Likewise.
71680         * lib/shutdown.c (rpl_shutdown): Likewise.
71682 2011-09-20  Bruno Haible  <bruno@clisp.org>
71684         select tests: EBADF tests.
71685         * tests/test-select.h (do_select_bad_fd, do_select_bad_fd_nowait,
71686         test_bad_fd): New functions.
71687         (test_function): Invoke also test_bad_fd.
71689 2011-09-20  Bruno Haible  <bruno@clisp.org>
71691         Tests for module 'posix_spawn_file_actions_addopen.
71692         * modules/posix_spawn_file_actions_addopen-tests: New file.
71693         * tests/test-posix_spawn_file_actions_addopen.c: New file.
71695         Tests for module 'posix_spawn_file_actions_adddup2'.
71696         * modules/posix_spawn_file_actions_adddup2-tests: New file.
71697         * tests/test-posix_spawn_file_actions_adddup2.c: New file.
71699         Tests for module 'posix_spawn_file_actions_addclose'.
71700         * modules/posix_spawn_file_actions_addclose-tests: New file.
71701         * tests/test-posix_spawn_file_actions_addclose.c: New file.
71703 2011-09-20  Bruno Haible  <bruno@clisp.org>
71705         Tests for module 'unlockpt'.
71706         * modules/unlockpt-tests: New file.
71707         * tests/test-unlockpt.c: New file.
71708         * doc/posix-functions/unlockpt.texi: Mention the Cygwin 1.7 problem.
71710         Tests for module 'grantpt'.
71711         * modules/grantpt-tests: New file.
71712         * tests/test-grantpt.c: New file.
71713         * doc/posix-functions/grantpt.texi: Mention the Cygwin 1.7 problem.
71715 2011-09-20  Bruno Haible  <bruno@clisp.org>
71717         freopen tests: EBADF tests.
71718         * tests/test-freopen.c: Include errno.h, unistd.h.
71719         (main): Add tests for EBADF, commented out for the moment.
71721         fclose tests: EBADF tests.
71722         * tests/test-fclose.c (main): Add tests for EBADF.
71724         fflush tests: EBADF tests.
71725         * tests/test-fflush.c: Include errno.h, macros.h.
71726         (main): Add tests for EBADF.
71728         ftello tests: EBADF tests.
71729         * tests/test-ftello4.sh: New file.
71730         * tests/test-ftello4.c: New file.
71731         * modules/ftello-tests (Files): Add them.
71732         (Makefile.am): Arrange to compile test-ftello4 and run test-ftello4.sh.
71734         fseeko tests: EBADF tests.
71735         * tests/test-fseeko4.sh: New file.
71736         * tests/test-fseeko4.c: New file.
71737         * modules/fseeko-tests (Files): Add them.
71738         (Makefile.am): Arrange to compile test-fseeko4 and run test-fseeko4.sh.
71740         Tests for function fputc().
71741         * modules/fputc-tests: New file.
71742         * tests/test-fputc.c: New file.
71743         * modules/stdio-tests (Depends-on): Add fputc-tests.
71745         Tests for function fgetc().
71746         * modules/fgetc-tests: New file.
71747         * tests/test-fgetc.c: New file.
71748         * modules/stdio-tests (Depends-on): Add fgetc-tests.
71750         Tests for function fdopen().
71751         * modules/fdopen-tests: New file.
71752         * tests/test-fdopen.c: New file.
71753         * modules/stdio-tests (Depends-on): Add fdopen-tests.
71755         Tests for module 'vdprintf'.
71756         * modules/vdprintf-tests: New file.
71757         * tests/test-vdprintf.c: New file.
71759         Tests for module 'dprintf'.
71760         * modules/dprintf-tests: New file.
71761         * tests/test-dprintf.c: New file.
71763 2011-09-20  Bruno Haible  <bruno@clisp.org>
71765         Tests for module 'ioctl'.
71766         * modules/ioctl-tests: New file.
71767         * tests/test-ioctl.c: New file.
71769 2011-09-20  Bruno Haible  <bruno@clisp.org>
71771         fcntl tests: EBADF tests.
71772         * tests/test-fcntl.c (main): Add more tests for EBADF.
71774 2011-09-20  Bruno Haible  <bruno@clisp.org>
71776         utimensat tests: EBADF tests.
71777         * tests/test-utimensat.c (main): Add tests for EBADF.
71779         renameat tests: EBADF tests.
71780         * tests/test-renameat.c (main): Add tests for EBADF.
71782         mkfifoat tests: EBADF tests.
71783         * tests/test-mkfifoat.c (main): Add tests for EBADF.
71785         readlinkat tests: EBADF tests.
71786         * tests/test-readlinkat.c (main): Add tests for EBADF.
71788         symlinkat tests: EBADF tests.
71789         * tests/test-symlinkat.c (main): Add tests for EBADF.
71791         linkat tests: EBADF tests.
71792         * tests/test-linkat.c (main): Add tests for EBADF.
71794         Tests for module 'faccessat'.
71795         * modules/faccessat-tests: New file.
71796         * tests/test-faccessat.c: New file.
71798         fdopendir tests: EBADF tests.
71799         * tests/test-fdopendir.c (main): Add more tests for EBADF.
71801         openat tests: EBADF tests.
71802         * tests/test-fchownat.c (main): Add tests for EBADF.
71803         * tests/test-fstatat.c (main): Likewise.
71804         * tests/test-mkdirat.c (main): Likewise.
71805         * tests/test-openat.c (main): Likewise.
71806         * tests/test-unlinkat.c (main): Likewise.
71807         * tests/test-fchmodat.c: New file.
71808         * modules/openat-tests (Files): Add tests/test-fchmodat.c.
71809         (Makefile.am): Also run 'test-fchmodat'.
71811 2011-09-20  Bruno Haible  <bruno@clisp.org>
71813         utimens, futimens, fdutimensat tests: EBADF tests.
71814         * tests/test-futimens.h (test_futimens): Add more tests for EBADF.
71816         Tests for function fstat().
71817         * modules/fstat-tests: New file.
71818         * tests/test-fstat.c: New file.
71819         * modules/sys_stat-tests (Depends-on): Add fstat-tests.
71821 2011-09-20  Bruno Haible  <bruno@clisp.org>
71823         test-ttyname_r tests: EBADF tests.
71824         * tests/test-ttyname_r.c (main): Add tests for EBADF.
71826         Tests for module 'isatty'.
71827         * modules/isatty-tests: New file.
71828         * tests/test-isatty.c: New file.
71830         Tests for module 'write'.
71831         * modules/write-tests: New file.
71832         * tests/test-write.c: New file.
71834         Tests for module 'read'.
71835         * modules/read-tests: New file.
71836         * tests/test-read.c: New file.
71838         pwrite tests: EBADF tests.
71839         * tests/test-pwrite.c (main): Add tests for EBADF.
71841         pread tests: EBADF tests.
71842         * tests/test-pread.c (main): Add tests for EBADF.
71844         lseek tests: EBADF tests.
71845         * tests/test-lseek.c (main): Add more tests for EBADF.
71847         Tests for module 'ftruncate'.
71848         * modules/ftruncate-tests: New file.
71849         * tests/test-ftruncate.sh: New file.
71850         * tests/test-ftruncate.c: New file.
71852         fsync tests: EBADF tests.
71853         * tests/test-fsync.c (main): Add more tests for EBADF.
71855         fdatasync tests: EBADF tests.
71856         * tests/test-fdatasync.c (main): Add more tests for EBADF.
71858         Tests for module 'fchown'.
71859         * modules/fchown-tests: New file.
71860         * tests/test-fchown.c: New file.
71862         Tests for module 'fchmod'.
71863         * modules/fchmod-tests: New file.
71864         * tests/test-fchmod.c: New file.
71866         fchdir tests: EBADF tests.
71867         * tests/test-fchdir.c (main): Add more tests for EBADF.
71869         dup2 tests: EBADF tests.
71870         * tests/test-dup2.c (main): Add more tests for EBADF.
71872         Tests for module 'dup'.
71873         * modules/dup-tests: New file.
71874         * tests/test-dup.c: New file.
71876         Tests for module 'close'.
71877         * modules/close-tests: New file.
71878         * tests/test-close.c: New file.
71880 2011-09-20  Bruno Haible  <bruno@clisp.org>
71882         Tests for module 'shutdown'.
71883         * modules/shutdown-tests: New file.
71884         * tests/test-shutdown.c: New file.
71886         Tests for module 'setsockopt'.
71887         * modules/setsockopt-tests: New file.
71888         * tests/test-setsockopt.c: New file.
71890         Tests for module 'sendto'.
71891         * modules/sendto-tests: New file.
71892         * tests/test-sendto.c: New file.
71894         Tests for module 'send'.
71895         * modules/send-tests: New file.
71896         * tests/test-send.c: New file.
71898         Tests for module 'recvfrom'.
71899         * modules/recvfrom-tests: New file.
71900         * tests/test-recvfrom.c: New file.
71902         Tests for module 'recv'.
71903         * modules/recv-tests: New file.
71904         * tests/test-recv.c: New file.
71906         Tests for module 'listen'.
71907         * modules/listen-tests: New file.
71908         * tests/test-listen.c: New file.
71910         Tests for module 'getsockopt'.
71911         * modules/getsockopt-tests: New file.
71912         * tests/test-getsockopt.c: New file.
71914         Tests for module 'getsockname'.
71915         * modules/getsockname-tests: New file.
71916         * tests/test-getsockname.c: New file.
71918         Tests for module 'getpeername'.
71919         * modules/getpeername-tests: New file.
71920         * tests/test-getpeername.c: New file.
71922         Tests for module 'connect'.
71923         * modules/connect-tests: New file.
71924         * tests/test-connect.c: New file.
71926         Tests for module 'bind'.
71927         * modules/bind-tests: New file.
71928         * tests/test-bind.c: New file.
71930         accept4 tests: Fix for native Windows.
71931         * tests/test-accept4.c: Include sockets.h.
71932         (main): Invoke gl_sockets_startup.
71933         * modules/accept4-tests (Depends-on): Add sockets.
71935         accept tests: Fix for native Windows.
71936         * tests/test-accept.c: Include sockets.h.
71937         (main): Invoke gl_sockets_startup.
71938         * modules/accept-tests (Depends-on): Add sockets.
71940 2011-09-19  Bruno Haible  <bruno@clisp.org>
71942         msvc-inval: Require a semicolon after DONE_MSVC_INVAL.
71943         * lib/msvc-inval.h (TRY_MSVC_INVAL, DONE_MSVC_INVAL): Wrap in a
71944         do...while(0).
71945         * lib/dup2.c (rpl_dup2): Add a semicolon after DONE_MSVC_INVAL.
71946         Suggested by Paul Eggert.
71948 2011-09-19  Bruno Haible  <bruno@clisp.org>
71950         sched: Ensure pid_t is defined.
71951         * m4/sched_h.m4 (gl_SCHED_H): Arrange to override <sched.h> if it does
71952         not define pid_t.
71953         * lib/sched.in.h: Include <sys/types.h>.
71954         * doc/posix-headers/sched.texi: Mention the pid_t problem.
71955         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
71957 2011-09-19  Bruno Haible  <bruno@clisp.org>
71959         msvc-inval: Ensure the entire expansion is a single statement.
71960         * lib/msvc-inval.h (TRY_MSVC_INVAL, DONE_MSVC_INVAL): Add an extra pair
71961         of braces.
71963 2011-09-19  Jim Meyering  <meyering@redhat.com>
71965         tests: use printf, not echo in init.sh's warn_ function
71966         * tests/init.sh (warn_): Use printf, not echo.  The latter would
71967         misbehave when given strings containing a backslash or starting
71968         with e.g., -n.  James Youngman suggested setting IFS.
71970 2011-09-19  Eric Blake  <eblake@redhat.com>
71972         futimens: enhance test
71973         * tests/test-futimens.h (test_futimens): Also check for EBADF on
71974         closed non-negative fd.
71976         date: accept 'hence' as opposite of 'ago'
71977         * lib/parse-datetime.y (relative_time_table): Add 'hence'.
71978         * tests/test-parse-datetime.c (main): Enhance test.
71979         Suggested by Jesse Wilson.
71981 2011-09-19  Jim Meyering  <meyering@redhat.com>
71983         getcwd: don't fail in a deep directory on a system without openat
71984         Before this change, getcwd would fail when called from a directory
71985         of depth PATH_MAX / 3 or greater.  That was due to the fact that
71986         the non-openat implementation used "..", "../..", "../../..", etc.
71987         to access ancestor directories.  With too many, that string would
71988         be longer than PATH_MAX.
71989         * lib/getcwd.c (HAVE_OPENAT_SUPPORT): Define also when we are
71990         using gnulib's openat replacement.
71991         * m4/openat.m4: Set GNULIB_OPENAT, so getcwd.c knows when
71992         we're using the replacement function.
71994 2011-09-14  Martin von Gagern  <Martin.vGagern@gmx.net>
71996         maint.mk: avoid warnings from perl about missing files
71997         * top/maint.mk (def_sym_regex): Ignore files listed in
71998         $(gl_other_headers_) that do not exist, say because a project
71999         does not use a corresponding module.
72001 2011-09-18  Paul Eggert  <eggert@cs.ucla.edu>
72003         stat: use pathmax.h only if needed
72004         * lib/stat.c: Include pathmax.h only if REPLACE_FUNC_STAT_DIR.
72005         This is better for Emacs, which does not have a mingw port and
72006         therefore can avoid the pathmax module.
72008         utimens: remove dependency on dup2
72009         * lib/utimens.c (fdutimens): Don't invoke dup2; it's not needed
72010         to work around the Linux kernel bug.
72011         * modules/utimens (Depends-on): Remove dup2.
72013 2011-09-18  Bruno Haible  <bruno@clisp.org>
72015         inet_ntop, inet_pton: Look for it also in libresolv.
72016         * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): If the function was not found in
72017         libnsl, search for it in libresolv.
72018         * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Likewise.
72019         Needed on Solaris 7.
72021 2011-09-18  Bruno Haible  <bruno@clisp.org>
72023         accept, accept4 tests: Avoid link error on Solaris.
72024         * modules/accept-tests (Makefile.am): Link test-accept against
72025         $(LIBSOCKET).
72026         * modules/accept4-tests (Makefile.am): Link test-accept4 against
72027         $(LIBSOCKET).
72029         accept4: Avoid link error on Solaris.
72030         * modules/accept4 (Link): New section.
72032         socket functions: Avoid link errors on Solaris.
72033         * modules/accept (Depends-on): Add socketlib.
72034         (Link): New section.
72035         * modules/bind (Depends-on): Add socketlib.
72036         (Link): New section.
72037         * modules/connect (Depends-on): Add socketlib.
72038         (Link): New section.
72039         * modules/getpeername (Depends-on): Add socketlib.
72040         (Link): New section.
72041         * modules/getsockname (Depends-on): Add socketlib.
72042         (Link): New section.
72043         * modules/getsockopt (Depends-on): Add socketlib.
72044         (Link): New section.
72045         * modules/listen (Depends-on): Add socketlib.
72046         (Link): New section.
72047         * modules/recv (Depends-on): Add socketlib.
72048         (Link): New section.
72049         * modules/recvfrom (Depends-on): Add socketlib.
72050         (Link): New section.
72051         * modules/send (Depends-on): Add socketlib.
72052         (Link): New section.
72053         * modules/sendto (Depends-on): Add socketlib.
72054         (Link): New section.
72055         * modules/setsockopt (Depends-on): Add socketlib.
72056         (Link): New section.
72057         * modules/shutdown (Depends-on): Add socketlib.
72058         (Link): New section.
72059         * modules/socket (Depends-on): Add socketlib.
72060         (Link): New section.
72062 2011-09-18  Bruno Haible  <bruno@clisp.org>
72064         ptsname tests: Let the test fail rather than hang (e.g. on AIX 5.1).
72065         * tests/test-ptsname.c (main): Terminate the test if it takes longer
72066         than 5 seconds.
72067         * modules/ptsname-tests (configure.ac): Test for alarm.
72069 2011-09-18  Bruno Haible  <bruno@clisp.org>
72071         posix_spawn_file_actions_add*: Fix module dependencies.
72072         * modules/posix_spawn_file_actions_addclose (Dependencies): Add
72073         posix_spawn_file_actions_init.
72074         * modules/posix_spawn_file_actions_adddup2 (Dependencies): Likewise.
72075         * modules/posix_spawn_file_actions_addopen (Dependencies): Likewise.
72077 2011-09-18  Bruno Haible  <bruno@clisp.org>
72079         rename, renameat tests: Avoid test failures on FreeBSD 6.4.
72080         * tests/test-rename.h (test_rename): Allow error code EEXIST.
72081         * tests/test-renameat.c (main): Likewise.
72083 2011-09-18  Bruno Haible  <bruno@clisp.org>
72085         Tests for module 'accept4'.
72086         * modules/accept4-tests: New file.
72087         * tests/test-accept4.c: New file.
72089 2011-09-18  Bruno Haible  <bruno@clisp.org>
72091         Tests for module 'accept'.
72092         * modules/accept-tests: New file.
72093         * tests/test-accept.c: New file.
72095 2011-09-18  Bruno Haible  <bruno@clisp.org>
72097         dup2: Support for MSVC.
72098         * lib/dup2.c: Include msvc-inval.h.
72099         (rpl_dup2): Handle invalid parameter notifications during dup2 and
72100         _get_osfhandle calls.
72101         * modules/dup2 (Depends-on): Add msvc-inval.
72102         * doc/posix-functions/dup2.texi: Mention problem on MSVC.
72104         New module 'msvc-inval'.
72105         * lib/msvc-inval.h: New file.
72106         * lib/msvc-inval.c: New file.
72107         * m4/msvc-inval.m4: New file.
72108         * modules/msvc-inval: New file.
72110 2011-09-17  Bruno Haible  <bruno@clisp.org>
72112         Tests for module 'pclose'.
72113         * modules/pclose-tests: New file.
72115         New module 'pclose'.
72116         * lib/stdio.in.h (pclose): New declaration.
72117         * lib/pclose.c: New file.
72118         * m4/pclose.m4: New file.
72119         * m4/stdio_h.m4 (gl_STDIO_H): Test whether pclose is declared.
72120         (gl_STDIO_H_DEFAULTS): Initialize GNULIB_PCLOSE, HAVE_PCLOSE.
72121         * modules/stdio (Makefile.am): Substitute GNULIB_PCLOSE, HAVE_PCLOSE.
72122         * modules/pclose: New file.
72123         * modules/popen-tests (Depends-on): Add pclose.
72124         * modules/popen-safer-tests (Depends-on): Likewise.
72125         * doc/posix-functions/pclose.texi: Mention the new module.
72127 2011-09-17  Bruno Haible  <bruno@clisp.org>
72129         popen: Support for MSVC.
72130         * lib/stdio.in.h (popen): Declare it if the system lacks this function.
72131         * lib/popen.c (popen): Provide alternate definition for native Windows.
72132         * m4/popen.m4 (gl_FUNC_POPEN): Test if popen exists. Set HAVE_POPEN.
72133         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize HAVE_POPEN.
72134         * modules/popen (Depends-on, configure.ac): Update condition.
72135         * modules/stdio (Makefile.am): Substitute HAVE_POPEN.
72136         * doc/posix-functions/popen.texi: Mention that the MSVC problem is
72137         fixed.
72139 2011-09-17  Bruno Haible  <bruno@clisp.org>
72141         isnanl, isnand, isnanf: Work around MSVC bug.
72142         * lib/isnan.c (FUNC): Use alternate ways of computing NaN and Infinity.
72144 2011-09-17  Bruno Haible  <bruno@clisp.org>
72146         sys_socket tests: Fix recent mistake.
72147         * tests/test-sys_socket.c (t1): Avoid collision of identifiers.
72149 2011-09-17  Bruno Haible  <bruno@clisp.org>
72151         putenv: Support for MSVC.
72152         * modules/putenv (Depends-on): Add environ.
72153         * lib/putenv.c (environ): Disable declaration.
72154         * lib/unistd.in.h: Update comment.
72156 2011-09-17  Bruno Haible  <bruno@clisp.org>
72158         math: Avoid macro redefinition warnings on MSVC.
72159         * lib/math.in.h (ceilf, ceill, floorf, floorl, frexpl, ldexpl):
72160         Undefine before redefining.
72162 2011-09-17  Bruno Haible  <bruno@clisp.org>
72164         doc: Mention functions which are declared as macros.
72165         * doc/posix-functions/*[fl].texi: Mention that some functions are
72166         defined as macros with arguments only.
72168 2011-09-17  Bruno Haible  <bruno@clisp.org>
72170         Add dependencies to new dirent related modules.
72171         * modules/backupfile (Depends-on): Add opendir, readdir, closedir.
72172         * modules/fts (Depends-on): Likewise.
72173         * modules/glob (Depends-on): Likewise.
72174         * modules/savedir (Depends-on): Likewise.
72175         * modules/scandir (Depends-on): Likewise.
72176         * modules/dirent-safer (Depends-on): Add opendir, closedir.
72177         * modules/fdopendir (Depends-on): Add opendir.
72179 2011-09-17  Bruno Haible  <bruno@clisp.org>
72181         inet_pton: Support for MSVC on Windows Vista or newer.
72182         * lib/arpa_inet.in.h (inet_pton): Also consider REPLACE_INET_PTON.
72183         * lib/inet_pton.c (rpl_inet_pton): Use a simple wrapper if
72184         HAVE_DECL_INET_PTON is defined.
72185         * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Invoke gl_PREREQ_SYS_H_WINSOCK2.
72186         On platforms with <winsock2.h>, test whether inet_pton is declared in
72187         <ws2tcpip.h>. If so, arrange to replace it.
72188         * m4/arpa_inet_h.m4 (gl_ARPA_INET_H_DEFAULTS): Initialize
72189         REPLACE_INET_PTON.
72190         * modules/arpa_inet (Makefile.am): Substitute REPLACE_INET_PTON.
72191         * modules/inet_pton (Files): Add m4/sys_socket_h.m4.
72192         (Depends-on, configure.ac): Update condition.
72193         * doc/posix-functions/inet_pton.texi: Mention the MSVC problem.
72195 2011-09-17  Bruno Haible  <bruno@clisp.org>
72197         inet_ntop: Support for MSVC on Windows Vista or newer.
72198         * lib/arpa_inet.in.h (inet_ntop): Also consider REPLACE_INET_NTOP.
72199         * lib/inet_ntop.c (rpl_inet_ntop): Use a simple wrapper if
72200         HAVE_DECL_INET_NTOP is defined.
72201         * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): Invoke gl_PREREQ_SYS_H_WINSOCK2.
72202         On platforms with <winsock2.h>, test whether inet_ntop is declared in
72203         <ws2tcpip.h>. If so, arrange to replace it.
72204         * m4/arpa_inet_h.m4 (gl_ARPA_INET_H_DEFAULTS): Initialize
72205         REPLACE_INET_NTOP.
72206         * modules/arpa_inet (Makefile.am): Substitute REPLACE_INET_NTOP.
72207         * modules/inet_ntop (Files): Add m4/sys_socket_h.m4.
72208         (Depends-on, configure.ac): Update condition.
72209         * doc/posix-functions/inet_ntop.texi: Mention the MSVC problem.
72211 2011-09-16  Eric Blake  <eblake@redhat.com>
72213         test-fsync: yet another enhancement
72214         * tests/test-fsync.c (main): Also test behavior on read-only text
72215         file.
72217 2011-09-16  Bruno Haible  <bruno@clisp.org>
72219         Enhance fsync, fdatasync tests.
72220         * tests/test-fsync.c (main): Test both STDIN_FILENO and STDOUT_FILENO.
72221         * tests/test-fdatasync.c (main): Likewise.
72223 2011-09-16  Bruno Haible  <bruno@clisp.org>
72225         Support for MSVC compiler: Ensure mode_t gets defined.
72226         * m4/fcntl_h.m4 (gl_FCNTL_H): Require AC_TYPE_MODE_T.
72227         * m4/spawn_h.m4 (gl_SPAWN_H): Likewise.
72228         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
72229         * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Likewise.
72230         * tests/test-fcntl-h.c: Check that mode_t is defined.
72231         * tests/test-sys_stat.c: Likewise.
72232         * tests/test-sys_types.c: Likewise.
72233         * doc/posix-headers/fcntl.texi: Mention the missing mode_t problem.
72234         * doc/posix-headers/sys_stat.texi: Likewise.
72235         * doc/posix-headers/sys_types.texi: Likewise.
72237 2011-09-16  Bruno Haible  <bruno@clisp.org>
72239         sys_stat: Support for MSVC.
72240         * lib/sys_stat.in.h (S_IFIFO): Define to _S_IFIFO if that exists.
72241         * tests/test-sys_stat.c: Don't assume that S_IFBLK exists.
72242         * doc/posix-headers/sys_stat.texi: Mention missing S_IFIFO, S_IFBLK on
72243         MSVC.
72245 2011-09-16  Bruno Haible  <bruno@clisp.org>
72247         Support for MSVC compiler: Ensure off_t gets defined.
72248         * lib/unistd.in.h: Include <sys/types.h>.
72249         * tests/test-fcntl-h.c: Check that off_t is defined.
72250         * tests/test-sys_stat.c: Likewise.
72251         * tests/test-sys_types.c: Likewise.
72253 2011-09-16  Eric Blake  <eblake@redhat.com>
72255         fdatasync: port to Solaris
72256         * m4/fdatasync.m4 (gl_FUNC_FDATASYNC): Set LIB_FDATASYNC.
72257         * modules/fdatasync (Link): Document it.
72258         * modules/fdatasync-tests (test_fdatasync_LDADD): Link with it.
72260         fdatasync: port to MacOS X 10.7
72261         * m4/fdatasync.m4 (gl_FUNC_FDATASYNC): Check for present but not
72262         declared.
72263         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Another default.
72264         * modules/unistd (Makefile.am): Substitute it.
72265         * lib/unistd.in.h (fdatasync): Declare on MacOS.
72266         * doc/posix-functions/fdatasync.texi (fdatasync): Document it.
72268         fdatasync: minor improvements
72269         * modules/fdatasync (Depends-on): Add condition for fsync.
72270         * lib/fdatasync.c (fdatasync): Add comment.
72271         * tests/test-unistd-c++.cc: Test fdatasync.
72273         unistd: update refs to newer POSIX
72274         * lib/unistd.in.h: Prefer POSIX 2008 over 2001.
72275         Suggested by Bruno Haible.
72277         fdatasync: new module
72278         * modules/fsync (Description): Document difference to fdatasync.
72279         * modules/fdatasync: New module.
72280         * m4/fdatasync.m4 (gl_FUNC_FDATASYNC): New file.
72281         * lib/fdatasync.c (fdatasync): Likewise.
72282         * m4/unistd_h.m4 (gl_UNISTD_H, gl_UNISTD_H_DEFAULTS): Set up
72283         defaults.
72284         * modules/unistd (Makefile.am): Set witnesses.
72285         * lib/unistd.in.h (fdatasync): Declare.
72286         * MODULES.html.sh: Document it.
72287         * doc/posix-functions/fdatasync.texi (fdatasync): Likewise.
72288         * modules/fdatasync-tests: New test.
72289         * tests/test-fdatasync.c: Likewise.
72291 2011-09-16  Eric Blake  <eblake@redhat.com>
72293         test-fsync: enhance tests
72294         * modules/fsync-tests (Depends-on): Add errno, for mingw.
72295         * tests/test-fsync.c (main): Enhance test.
72297 2011-09-15  Bruno Haible  <bruno@clisp.org>
72299         Support for MSVC compiler: Ensure ssize_t gets defined.
72300         * doc/posix-headers/sys_types.texi: Mention the missing ssize_t problem.
72301         * doc/posix-headers/stdio.texi: Likewise.
72302         * modules/stdio (Depends-on): Add ssize_t.
72303         * modules/sys_socket (Depends-on): Likewise.
72304         * modules/sys_types (Depends-on): Likewise.
72305         * modules/sys_uio (Depends-on): Likewise.
72306         * modules/unistd (Depends-on): Likewise.
72307         * tests/test-sys_socket.c: Check that size_t and ssize_t are defined.
72308         * tests/test-sys_types.c: Check that ssize_t is defined.
72310 2011-09-14  Bruno Haible  <bruno@clisp.org>
72312         Avoid using #, the m4 comment starter character, near brackets.
72313         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER_ONE): Use |, not #, as
72314         delimiter character in sed expressions.
72315         * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Likewise.
72316         Suggested by Eric Blake.
72318         Properly quote AC_CHECK_DECLS' 4th argument.
72319         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Double-quote AC_CHECK_DECLS' 4th
72320         argument.
72321         * m4/ceilf.m4 (gl_FUNC_CEILF): Likewise.
72322         * m4/ceill.m4 (gl_FUNC_CEILL): Likewise.
72323         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
72324         * m4/floorf.m4 (gl_FUNC_FLOORF): Likewise.
72325         * m4/floorl.m4 (gl_FUNC_FLOORL): Likewise.
72326         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH): Likewise.
72327         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Likewise.
72328         * m4/getdomainname.m4 (gl_FUNC_GETDOMAINNAME): Likewise.
72329         * m4/gethrxtime.m4 (gl_GETHRXTIME): Likewise.
72330         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
72331         * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): Likewise.
72332         * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Likewise.
72333         * m4/isfinite.m4 (gl_ISFINITE): Likewise.
72334         * m4/isinf.m4 (gl_ISINF): Likewise.
72335         * m4/logb.m4 (gl_FUNC_LOGB): Likewise.
72336         * m4/readutmp.m4 (gl_READUTMP): Likewise.
72337         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
72338         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
72339         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
72340         * m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise.
72341         * m4/signbit.m4 (gl_SIGNBIT): Likewise.
72342         * m4/sleep.m4 (gl_FUNC_SLEEP): Likewise.
72343         * m4/strsignal.m4 (gl_PREREQ_STRSIGNAL): Likewise.
72344         * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
72345         * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
72346         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
72347         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Likewise.
72348         * m4/wctob.m4 (gl_FUNC_WCTOB): Likewise.
72349         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
72350         Reported by Eric Blake.
72352         Properly quote AC_CHECK_DECL's 4th argument.
72353         * m4/acosl.m4 (gl_FUNC_ACOSL): Double-quote AC_CHECK_DECL's 4th
72354         argument.
72355         * m4/argp.m4 (gl_ARGP): Likewise.
72356         * m4/asinl.m4 (gl_FUNC_ASINL): Likewise.
72357         * m4/atanl.m4 (gl_FUNC_ATANL): Likewise.
72358         * m4/cosl.m4 (gl_FUNC_COSL): Likewise.
72359         * m4/expl.m4 (gl_FUNC_EXPL): Likewise.
72360         * m4/frexpl.m4 (gl_FUNC_FREXPL, gl_FUNC_FREXPL_NO_LIBM): Likewise.
72361         * m4/getloadavg.m4 (gl_GETLOADAVG): Likewise.
72362         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Likewise.
72363         * m4/logl.m4 (gl_FUNC_LOGL): Likewise.
72364         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
72365         * m4/sinl.m4 (gl_FUNC_SINL): Likewise.
72366         * m4/sqrtl.m4 (gl_FUNC_SQRTL): Likewise.
72367         * m4/tanl.m4 (gl_FUNC_TANL): Likewise.
72368         Reported by Eric Blake.
72370 2011-09-14  Eric Blake  <eblake@redhat.com>
72372         opendir: avoid compile warning
72373         * lib/opendir.c (includes): Always include errno.h.
72374         Reported by Tatsuro MATSUOKA.
72376 2011-09-14  Jim Meyering  <meyering@redhat.com>
72378         maint.mk: sc_tight_scope: propagate failure from sub-make
72379         * top/maint.mk (sc_tight_scope): Actually initialize and use $fail.
72380         Reported by Martin von Gagern.
72382 2011-09-13  Bruno Haible  <bruno@clisp.org>
72384         tempname: Support for MSVC.
72385         * doc/posix-headers/fcntl.texi: Document the problem with O_ACCMODE on
72386         MSVC.
72387         * modules/tempname (Depends-on): Add fcntl-h.
72389 2011-09-13  Bruno Haible  <bruno@clisp.org>
72391         sys_time: Support for MSVC.
72392         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Invoke
72393         gl_PREREQ_SYS_H_WINSOCK2. When testing for 'struct timeval', also
72394         include <winsock2.h>.
72395         * lib/sys_time.in.h: On MSVC, include <winsock2.h> and hide its
72396         function declarations that collide with POSIX.
72397         * modules/sys_time (Files): Add m4/sys_socket_h.m4.
72398         (Makefile.am): Substitute HAVE_WINSOCK2_H.
72400 2011-09-13  Bruno Haible  <bruno@clisp.org>
72402         stat: Support for MSVC.
72403         * lib/stat.c: Include pathmax.h.
72404         * modules/stat (Depends-on): Add pathmax.
72406         pathmax: Support for native Windows.
72407         * lib/pathmax.h (PATH_MAX): Define to 260 on native Windows.
72409 2011-09-12  Bruno Haible  <bruno@clisp.org>
72411         New modules 'opendir', 'readdir', 'rewinddir', 'closedir'.
72412         * lib/dirent.in.h (struct dirent): New type.
72413         (DT_UNKNOWN, DT_FIFO, DT_CHR, DT_DIR, DT_BLK, DT_REG, DT_LNK, DT_SOCK,
72414         DT_WHT): New macros.
72415         (DIR): New type.
72416         (opendir, closedir): Declare only if the module 'opendir' is enabled.
72417         (readdir, rewinddir): New declarations.
72418         * lib/dirent-private.h: New file.
72419         * lib/opendir.c: New file.
72420         * lib/readdir.c: New file.
72421         * lib/rewinddir.c: New file.
72422         * lib/closedir.c: New file.
72423         * lib/fchdir.c (rpl_closedir, rpl_opendir): Remove functions.
72424         * m4/opendir.m4: New file.
72425         * m4/readdir.m4: New file.
72426         * m4/rewinddir.m4: New file.
72427         * m4/closedir.m4: New file.
72428         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't set REPLACE_OPENDIR,
72429         REPLACE_CLOSEDIR here.
72430         * m4/dirent_h.m4 (gl_DIRENT_H): Also check whether closedir, opendir,
72431         readdir, rewinddir are declared.
72432         (gl_DIRENT_H_DEFAULTS): Initialize GNULIB_OPENDIR, GNULIB_READDIR,
72433         GNULIB_REWINDDIR, GNULIB_CLOSEDIR, HAVE_OPENDIR, HAVE_READDIR,
72434         HAVE_REWINDDIR, HAVE_CLOSEDIR.
72435         * modules/dirent (Makefile.am): Substitute GNULIB_OPENDIR,
72436         GNULIB_READDIR, GNULIB_REWINDDIR, GNULIB_CLOSEDIR, HAVE_OPENDIR,
72437         HAVE_READDIR, HAVE_REWINDDIR, HAVE_CLOSEDIR.
72438         * modules/opendir: New file.
72439         * modules/readdir: New file.
72440         * modules/rewinddir: New file.
72441         * modules/closedir: New file.
72442         * doc/posix-functions/opendir.texi: Mention the 'opendir' module.
72443         * doc/posix-functions/readdir.texi: Mention the 'readdir' module.
72444         * doc/posix-functions/rewinddir.texi: Mention the 'rewinddir' module.
72445         * doc/posix-functions/closedir.texi: Mention the 'closedir' module.
72446         * NEWS: Mention the 'fchdir' change.
72448 2011-09-11  Bruno Haible  <bruno@clisp.org>
72450         asm-underscore.m4: Support for MSVC.
72451         * m4/asm-underscore.m4 (gl_C_ASM): New macro.
72452         (gl_ASM_SYMBOL_PREFIX): Require it. Use its results.
72454 2011-09-11  Reuben Thomas  <rrt@sc3d.org>
72456         Doc about crypt functions.
72457         * doc/posix-functions/crypt.texi: Expand range of glibc versions
72458         needing for _GNU_SOURCE to get crypt.
72459         * doc/posix-functions/encrypt.texi: Likewise.
72460         * doc/posix-functions/setkey.texi: Likewise.
72462 2011-09-11  Bruno Haible  <bruno@clisp.org>
72464         doc: Update regarding MSVC 9.
72465         * doc/gnulib-intro.texi (Target Platforms): Classify MSVC as "rarely
72466         tested".
72467         * doc/posix-functions/*.texi: Update with info about MSVC 9.
72468         * doc/posix-headers/*.texi: Likewise.
72469         * doc/pastposix-functions/*.texi: Likewise.
72470         * doc/glibc-functions/*.texi: Likewise.
72471         * doc/glibc-headers/*.texi: Likewise.
72473 2011-09-11  Bruno Haible  <bruno@clisp.org>
72475         unistd et al.: Don't assume <unistd.h> exists.
72476         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Don't include <unistd.h> if it
72477         does not exist.
72478         * m4/environ.m4 (gl_ENVIRON): Don't include <unistd.h> if it does not
72479         exist. But include <stdlib.h>.
72480         * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): If <unistd.h> does not exist,
72481         include <io.h> and <stdlib.h> instead. Don't test symbolink links if
72482         symlink() does not exist.
72483         * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): If <unistd.h> does not exist,
72484         include <io.h> instead.
72485         * m4/free.m4 (gl_FUNC_FREE): Assume free(NULL) works on native Windows.
72486         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): If <unistd.h> does not exist,
72487         include <direct.h> instead.
72488         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise.
72489         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
72490         * m4/lseek.m4 (gl_FUNC_LSEEK): If <unistd.h> does not exist, include
72491         <io.h> instead.
72492         * m4/rename.m4 (gl_FUNC_RENAME): Assume rename() manages hard links
72493         correctly if the system does not have hard links.
72494         * m4/rmdir.m4 (gl_FUNC_RMDIR): If <unistd.h> does not exist, include
72495         <direct.h> instead.
72496         * m4/unistd_h.m4 (gl_UNISTD_H): If <unistd.h> does not exist, bypass
72497         it when looking for function declarations.
72498         * m4/unlink.m4 (gl_FUNC_UNLINK): If <unistd.h> does not exist, include
72499         <direct.h> and <io.h> instead.
72500         * doc/posix-headers/unistd.texi: More details about MSVC problem.
72502 2011-09-11  Bruno Haible  <bruno@clisp.org>
72504         strcase: Support for MSVC.
72505         * modules/strcase (Status, Notice): Remove obsoletion mark.
72506         * doc/posix-functions/strcasecmp.texi: Mention MSVC problem.
72507         * doc/posix-functions/strncasecmp.texi: Likewise.
72509         strings: Don't assume <strings.h> exists.
72510         * lib/strings.in.h: Include <strings.h> only if HAVE_STRINGS_H is 1.
72511         * m4/strings_h.m4 (gl_HEADER_STRINGS_H_BODY): Set HAVE_STRINGS_H.
72512         * modules/strings (Makefile.am): Substitute HAVE_STRINGS_H.
72513         * doc/posix-headers/strings.texi: Mention the MSVC problem.
72515 2011-09-11  Bruno Haible  <bruno@clisp.org>
72517         dirent: Don't assume <dirent.h> exists.
72518         * lib/dirent.in.h: Include <dirent.h> only if HAVE_DIRENT_H is 1.
72519         * m4/dirent_h.m4 (gl_DIRENT_H): Set HAVE_DIRENT_H.
72520         * modules/dirent (Makefile.am): Substitute HAVE_DIRENT_H.
72521         * doc/posix-headers/dirent.texi: Mention the MSVC problem.
72523 2011-09-11  Bruno Haible  <bruno@clisp.org>
72525         Fix wint_t on MSVC.
72526         * lib/wchar.in.h (wint_t): On MSVC, override it.
72527         * lib/wctype.in.h (wint_t): Likewise.
72528         * m4/stdint.m4 (gl_STDINT_TYPE_PROPERTIES): Override BITSIZEOF_WINT_T on
72529         MSVC.
72530         * doc/posix-headers/wchar.texi: Mention the problem with wint_t on MSVC.
72531         * doc/posix-headers/wctype.texi: Likewise.
72533 2011-09-11  Bruno Haible  <bruno@clisp.org>
72535         sys_types: Fix typo.
72536         * lib/sys_types.in.h: Fix typo in comment.
72537         Reported by Paul Eggert.
72539         Support for MSVC compiler: Ensure size_t gets defined.
72540         * modules/strings (Depends-on): Add 'sys_types'.
72541         * modules/sys_uio (Depends-on): Likewise.
72542         * lib/sys_uio.in.h: Update comment.
72544         C++ tests for module 'sys_types'.
72545         * modules/sys_types-c++-tests: New file.
72546         * tests/test-sys_types-c++.cc: New file.
72548         Tests for module 'sys_types'.
72549         * modules/sys_types-tests: New file.
72550         * tests/test-sys_types.c: New file.
72552         New module 'sys_types'.
72553         * lib/sys_types.in.h: New file.
72554         * m4/sys_types_h.m4: New file.
72555         * modules/sys_types: New file.
72556         * doc/posix-headers/sys_types.texi: Mention the new module and the
72557         size_t problem on MSVC 9.
72559 2011-09-11  Bruno Haible  <bruno@clisp.org>
72561         Support for MSVC compiler: Avoid division by a literal 0.
72562         * lib/math.in.h (NAN): Define through a function call also on MSVC.
72563         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Divide by 'zero' instead of 0.0.
72564         * m4/printf.m4 (gl_PRINTF_INFINITE, gl_PRINTF_DIRECTIVE_A,
72565         gl_PRINTF_DIRECTIVE_F, gl_PRINTF_FLAG_ZERO): Likewise.
72566         (gl_PRINTF_INFINITE_LONG_DOUBLE): Divide by 'zeroL' instead of 0.0L.
72567         * tests/infinity.h: New file.
72568         * tests/nan.h (NaNf, NaNd, NaNl): Define through a function call also
72569         on MSVC.
72570         * tests/test-ceilf1.c: Include infinity.h.
72571         (main): Use Infinityf.
72572         * tests/test-ceil1.c: Include infinity.h.
72573         (main): Use Infinityd.
72574         * tests/test-ceill.c: Include infinity.h.
72575         (main): Use Infinityl.
72576         * tests/test-dprintf-posix.c: Include infinity.h.
72577         (test_function): Use Infinityd.
72578         * tests/test-floorf1.c: Include infinity.h.
72579         (main): Use Infinityf.
72580         * tests/test-floor1.c: Include infinity.h.
72581         (main): Use Infinityd.
72582         * tests/test-floorl.c: Include infinity.h.
72583         (main): Use Infinityl.
72584         * tests/test-fprintf-posix.c: Include infinity.h.
72585         (test_function): Use Infinityd.
72586         * tests/test-frexp.c: Include infinity.h.
72587         (main): Use Infinityd.
72588         * tests/test-frexpl.c: Include infinity.h.
72589         (main): Use Infinityl.
72590         * tests/test-isfinite.c: Include infinity.h.
72591         (test_isfinitef): Use Infinityf.
72592         (test_isfinited): Use Infinityd.
72593         (test_isfinitel): Use Infinityl.
72594         * tests/test-isinf.c: Include infinity.h.
72595         (test_isinff): Use Infinityf.
72596         (test_isinfd): Use Infinityd.
72597         (test_isinfl): Use Infinityl.
72598         * tests/test-isnan.c: Include infinity.h.
72599         (test_float): Use Infinityf.
72600         (test_double): Use Infinityd.
72601         (test_long_double): Use Infinityl.
72602         * tests/test-isnanf.h: Include infinity.h.
72603         (main): Use Infinityf.
72604         * tests/test-isnand.h: Include infinity.h.
72605         (main): Use Infinityd.
72606         * tests/test-isnanl.h: Include infinity.h.
72607         (main): Use Infinityl.
72608         * tests/test-ldexpl.c: Include infinity.h.
72609         (main): Use Infinityl.
72610         * tests/test-printf-posix.h: Include infinity.h.
72611         (test_function): Use Infinityd.
72612         * tests/test-roundf1.c: Include infinity.h.
72613         (main): Use Infinityf.
72614         * tests/test-round1.c: Include infinity.h.
72615         (main): Use Infinityd.
72616         * tests/test-roundl.c: Include infinity.h.
72617         (main): Use Infinityl.
72618         * tests/test-signbit.c: Include infinity.h.
72619         (test_signbitf): Use Infinityf.
72620         (test_signbitd): Use Infinityd.
72621         (test_signbitl): Use Infinityl.
72622         * tests/test-snprintf-posix.h: Include infinity.h.
72623         (test_function): Use Infinityd, Infinityl.
72624         * tests/test-sprintf-posix.h: Include infinity.h.
72625         (test_function): Use Infinityd, Infinityl.
72626         * tests/test-truncf1.c: Include infinity.h.
72627         (main): Use Infinityf.
72628         * tests/test-trunc1.c: Include infinity.h.
72629         (main): Use Infinityd.
72630         * tests/test-truncl.c: Include infinity.h.
72631         (main): Use Infinityl.
72632         * tests/test-vasnprintf-posix.c: Include infinity.h.
72633         (test_function): Use Infinityd, Infinityl.
72634         * tests/test-vasprintf-posix.c: Include infinity.h.
72635         (test_function): Use Infinityd, Infinityl.
72636         * modules/ceilf-tests (Files): Add tests/infinity.h.
72637         * modules/ceil-tests (Files): Likewise.
72638         * modules/ceill-tests (Files): Likewise.
72639         * modules/dprintf-posix-tests (Files): Likewise.
72640         * modules/floorf-tests (Files): Likewise.
72641         * modules/floor-tests (Files): Likewise.
72642         * modules/floorl-tests (Files): Likewise.
72643         * modules/fprintf-posix-tests (Files): Likewise.
72644         * modules/frexp-tests (Files): Likewise.
72645         * modules/frexp-nolibm-tests (Files): Likewise.
72646         * modules/frexpl-tests (Files): Likewise.
72647         * modules/frexpl-nolibm-tests (Files): Likewise.
72648         * modules/isfinite-tests (Files): Likewise.
72649         * modules/isinf-tests (Files): Likewise.
72650         * modules/isnan-tests (Files): Likewise.
72651         * modules/isnanf-tests (Files): Likewise.
72652         * modules/isnanf-nolibm-tests (Files): Likewise.
72653         * modules/isnand-tests (Files): Likewise.
72654         * modules/isnand-nolibm-tests (Files): Likewise.
72655         * modules/isnanl-tests (Files): Likewise.
72656         * modules/isnanl-nolibm-tests (Files): Likewise.
72657         * modules/ldexpl-tests (Files): Likewise.
72658         * modules/printf-posix-tests (Files): Likewise.
72659         * modules/roundf-tests (Files): Likewise.
72660         * modules/round-tests (Files): Likewise.
72661         * modules/roundl-tests (Files): Likewise.
72662         * modules/signbit-tests (Files): Likewise.
72663         * modules/snprintf-posix-tests (Files): Likewise.
72664         * modules/sprintf-posix-tests (Files): Likewise.
72665         * modules/truncf-tests (Files): Likewise.
72666         * modules/trunc-tests (Files): Likewise.
72667         * modules/truncl-tests (Files): Likewise.
72668         * modules/vasnprintf-posix-tests (Files): Likewise.
72669         * modules/vasprintf-posix-tests (Files): Likewise.
72670         * modules/vdprintf-posix-tests (Files): Likewise.
72671         * modules/vfprintf-posix-tests (Files): Likewise.
72672         * modules/vprintf-posix-tests (Files): Likewise.
72673         * modules/vsnprintf-posix-tests (Files): Likewise.
72674         * modules/vsprintf-posix-tests (Files): Likewise.
72675         * modules/xprintf-posix-tests (Files): Likewise.
72677 2011-09-11  Bruno Haible  <bruno@clisp.org>
72679         Ensure pid_t gets defined.
72680         * m4/fcntl_h.m4 (gl_FCNTL_H): Require AC_TYPE_PID_T.
72681         * m4/sched_h.m4 (gl_SCHED_H): Likewise.
72682         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
72683         * m4/spawn_h.m4 (gl_SPAWN_H): Likewise.
72684         * m4/sys_wait_h.m4 (gl_SYS_WAIT_H): Likewise.
72685         * m4/termios_h.m4 (gl_TERMIOS_H): Likewise.
72686         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Likewise.
72687         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
72688         * tests/test-fcntl-h.c: Check that pid_t is defined.
72689         * tests/test-sched.c: Likewise.
72690         * tests/test-termios.c: Likewise.
72691         * tests/test-time.c: Likewise.
72692         * doc/posix-headers/fcntl.texi: Mention lack of pid_t on MSVC platform.
72693         * doc/posix-headers/signal.texi: Likewise.
72694         * doc/posix-headers/sys_types.texi: Likewise.
72695         * doc/posix-headers/time.texi: Likewise.
72697 2011-09-11  Bruno Haible  <bruno@clisp.org>
72699         acl: Fix compilation on Solaris 10 (older version).
72700         * lib/file-has-acl.c (acl_ace_nontrivial): Use NEW_ACE_EVERYONE instead
72701         of ACE_EVERYONE.
72702         * lib/set-mode-acl.c (qset_acl): Likewise.
72703         Reported by Christian Jullien <eligis@orange.fr>.
72705 2011-09-10  Bruno Haible  <bruno@clisp.org>
72707         iconv, unsetenv: Add support for MSVC compiler.
72708         * m4/iconv.m4 (AM_ICONV): Use ISO C declaration syntax on MSVC.
72709         * m4/setenv.m4 (gl_FUNC_UNSETENV): Drop support for K&R C compilers.
72711 2011-09-10  Bruno Haible  <bruno@clisp.org>
72713         *printf: Add support for MSVC compiler.
72714         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_N): On MSVC, install a handler that
72715         handles the exception caused by the %n directive. When cross-compiling,
72716         guess no on native Windows.
72717         (gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_RETVAL_C99,
72718         gl_SNPRINTF_DIRECTIVE_N, gl_SNPRINTF_SIZE1): When snprintf is missing,
72719         emulate it through vsnprintf.
72720         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Update comment.
72721         * doc/posix-functions/dprintf.texi: Update documentation regarding
72722         MSVC 9.
72723         * doc/posix-functions/fprintf.texi: Likewise.
72724         * doc/posix-functions/printf.texi: Likewise.
72725         * doc/posix-functions/snprintf.texi: Likewise.
72726         * doc/posix-functions/sprintf.texi: Likewise.
72727         * doc/posix-functions/swprintf.texi: Likewise.
72728         * doc/posix-functions/vdprintf.texi: Likewise.
72729         * doc/posix-functions/vfprintf.texi: Likewise.
72730         * doc/posix-functions/vprintf.texi: Likewise.
72731         * doc/posix-functions/vsnprintf.texi: Likewise.
72732         * doc/posix-functions/vsprintf.texi: Likewise.
72733         * doc/glibc-functions/asprintf.texi: Likewise.
72734         * doc/glibc-functions/obstack_printf.texi: Likewise.
72735         * doc/glibc-functions/obstack_vprintf.texi: Likewise.
72736         * doc/glibc-functions/vasprintf.texi: Likewise.
72738 2011-09-10  Bruno Haible  <bruno@clisp.org>
72740         nocrash: Add support for native Windows.
72741         * m4/nocrash.m4 (GL_NOCRASH): Avoid a crash also on native Windows.
72743 2011-09-10  Michael Goffioul  <michael.goffioul@gmail.com>  (tiny change)
72744             Bruno Haible  <bruno@clisp.org>
72746         absolute-header, include-next: Add support for MSVC compiler.
72747         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER_ONE): Require
72748         AC_CANONICAL_HOST. On native Windows, recognize also backslash as
72749         directory separator in #line directives.
72750         * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): On native Windows,
72751         recognize also backslash as directory separator in #line directives.
72753 2011-09-08  Jim Meyering  <meyering@redhat.com>
72755         maint.mk: mark the post-release commit log with "maint: " prefix
72756         * top/maint.mk (emit-commit-log): Add "maint: " prefix to the
72757         one-line commit-log summary.
72759 2011-09-08  Reuben Thomas  <rrt@sc3d.org>
72760             Bruno Haible  <bruno@clisp.org>
72762         Doc about crypt functions.
72763         * doc/posix-functions/crypt.texi: Mention need for _GNU_SOURCE on glibc
72764         systems.
72765         * doc/posix-functions/encrypt.texi: Likewise.
72766         * doc/posix-functions/setkey.texi: Likewise.
72768 2011-09-08  Simon Josefsson  <simon@josefsson.org>
72770         * lib/gc.h: Fix copyright header.
72772 2011-09-07  Bruno Haible  <bruno@clisp.org>
72774         pthread: Determine $(LIB_PTHREAD) correctly on OSF/1 5.1.
72775         * m4/pthread.m4 (gl_PTHREAD_CHECK): Use AC_CACHE_CHECK and
72776         AC_LINK_IFELSE instead of AC_SEARCH_LIBS.
72778 2011-09-07  Bruno Haible  <bruno@clisp.org>
72780         openat: Work around compilation error with OSF/1 5.1 DTK cc.
72781         * lib/fopen.c: Use different syntax for include of <stdio.h>.
72782         * lib/freopen.c: Likewise.
72783         * lib/fstatat.c: Use different syntax for include of <sys/stat.h>.
72784         * lib/lstat.c: Likewise.
72785         * lib/stat.c: Likewise.
72786         * lib/open.c: Use different syntax for include of <fcntl.h>.
72787         * lib/openat.c: Include fcntl.h again, explicitly.
72789 2011-09-04  J.T. Conklin  <jtc@acorntoolworks.com>
72791         parse-datetime: document the newly accepted format
72792         * doc/parse-datetime.texi (Combined date and time of day items):
72793         New section.
72795 2011-09-06  Bruno Haible  <bruno@clisp.org>
72797         acl: Fix a test failure on newer Solaris 10 with ZFS.
72798         * tests/test-sameacls.c (main): Interpret acl GETACLCNT failure with
72799         ENOSYS as no ACL.
72800         Reported by Jim Meyering.
72802 2011-09-06  Bruno Haible  <bruno@clisp.org>
72804         acl: Update for AIX >= 5.3 with NFS.
72805         * lib/file-has-acl.c (file_has_acl): Interpret aclx_get failure with
72806         ENOSYS as no ACL.
72808         acl: Fix a test failure on AIX >= 5.3 with NFS.
72809         * tests/test-sameacls.c (main): Interpret aclx_get failure with ENOSYS
72810         as no ACL.
72812 2011-09-06  Bruno Haible  <bruno@clisp.org>
72814         acl: Fix a test failure on IRIX 6.5 with NFS.
72815         * lib/acl-internal.h (MODE_INSIDE_ACL): Define to 0 on IRIX.
72816         * lib/set-mode-acl.c (qset_acl): Test !HAVE_ACL_TYPE_EXTENDED instead
72817         of MODE_INSIDE_ACL. If !MODE_INSIDE_ACL, do a chmod_or_fchmod always.
72818         * lib/copy-acl.c (qcopy_acl): Likewise.
72820 2011-09-05  Paul Eggert  <eggert@cs.ucla.edu>
72822         openat: port to AIX 7.1 with large files
72823         AIX 7.1 does a "#define openat open64at" if large files are in use,
72824         so we can't simply #undef openat.  Use the orig_openat trick (similar
72825         to orig_open in lib/open.c) to work around the problem.  Problem
72826         reported by Kevin Brott for GNU tar, in the thread containing
72827         <http://lists.gnu.org/r/bug-tar/2011-09/msg00032.html>.
72828         * lib/openat.c (__need_system_fcntl_h): Define first.
72829         Include <fcntl.h> and <sys/types.h> before undefining.
72830         (orig_openat) [HAVE_OPENAT]: New inline function.
72831         (openat) [HAVE_OPENAT]: Do not undef.
72832         (rpl_openat): Use orig_openat, not openat.
72834 2011-09-05  Joachim Schmitz  <schmitz@hp.com>  (tiny change)
72835             Bruno Haible  <bruno@clisp.org>
72837         acl: Avoid errors on NonStop Kernel.
72838         * lib/file-has-acl.c (file_has_acl) [NonStop Kernel]: Ignore ENOSYS and
72839         ENOTSUP errors.
72841 2011-09-05  Bruno Haible  <bruno@clisp.org>
72843         acl: Clean up Solaris code.
72844         * lib/acl-internal.h: Remove no-op #if.
72845         * lib/file-has-acl.c: Likewise.
72846         * lib/set-mode-acl.c (qset_acl): Remove unused Solaris code.
72847         * lib/copy-acl.c (qcopy_acl): Likewise.
72849 2011-09-05  Bruno Haible  <bruno@clisp.org>
72851         acl: Fix a bug with NFSv4 ACLs on Solaris 10 (newer version) in
72852         binaries built on the original Solaris 10.
72853         * lib/file-has-acl.c (file_has_acl): ACLs with 4..6 ACEs can be
72854         trivial.
72856 2011-09-05  Bruno Haible  <bruno@clisp.org>
72858         acl: Improve support of NFSv4 ACLs on Solaris 10 (newer version).
72859         * lib/acl-internal.h (acl_nontrivial): Declare also on newer Solaris
72860         10.
72861         * lib/file-has-acl.c (acl_nontrivial): Define also on newer Solaris 10.
72862         (acl_ace_nontrivial): Likewise. Recognize the trivial ACLs with 6 ACEs.
72863         * lib/copy-acl.c (qcopy_acl): On newer Solaris 10, use acl or facl
72864         instead of acl_get, facl_get, acl_set, facl_set.
72866 2011-09-05  Bruno Haible  <bruno@clisp.org>
72868         copy-file: Try unit tests on more file systems.
72869         * tests/test-copy-file-1.sh: New file.
72870         * tests/test-copy-file-2.sh: New file.
72871         * modules/copy-file-tests (Files): Add them.
72872         (Makefile.am): Add them to TESTS.
72874         acl: Try unit tests on more file systems.
72875         * tests/test-file-has-acl-1.sh: New file.
72876         * tests/test-file-has-acl-2.sh: New file.
72877         * tests/test-set-mode-acl-1.sh: New file.
72878         * tests/test-set-mode-acl-2.sh: New file.
72879         * tests/test-copy-acl-1.sh: New file.
72880         * tests/test-copy-acl-2.sh: New file.
72881         * modules/acl-tests (Files): Add them.
72882         (Makefile.am): Add them to TESTS.
72884 2011-09-04  Bruno Haible  <bruno@clisp.org>
72886         acl: Improve support of NFSv4 ACLs on Solaris 10 (newer version).
72887         * lib/acl-internal.h (ACE_*, NEW_ACE_*): Define also on newer Solaris
72888         10.
72889         (OLD_ALLOW, OLD_DENY): New macros.
72890         (NEW_ACE_ACCESS_ALLOWED_ACE_TYPE): Renamed from
72891         ACE_ACCESS_ALLOWED_ACE_TYPE.
72892         (NEW_ACE_ACCESS_DENIED_ACE_TYPE): Renamed from
72893         ACE_ACCESS_DENIED_ACE_TYPE.
72894         (OLD_ACE_OWNER, OLD_ACE_GROUP, OLD_ACE_OTHER): New macros.
72895         (NEW_ACE_EXECUTE): Fix value.
72896         (NEW_ACE_APPEND_DATA, NEW_ACE_READ_NAMED_ATTRS,
72897         NEW_ACE_WRITE_NAMED_ATTRS, NEW_ACE_DELETE_CHILD,
72898         NEW_ACE_READ_ATTRIBUTES, NEW_ACE_WRITE_ATTRIBUTES, NEW_ACE_DELETE,
72899         NEW_ACE_READ_ACL, NEW_ACE_WRITE_ACL, NEW_ACE_WRITE_OWNER,
72900         NEW_ACE_SYNCHRONIZE): New macros.
72901         * lib/set-mode-acl.c (qset_acl): On newer Solaris 10, use acl or facl
72902         instead of acl_fromtext, acl_set, facl_set.
72903         Fixes a coreutils/tests/cp/perm failure.
72905 2011-09-03  Paul Eggert  <eggert@cs.ucla.edu>
72907         openat: test for fstatat (..., 0) bug
72908         Further testing with tar suggests that fstatat (..., 0)
72909         does not work in general, on AIX 7.1; see
72910         <http://lists.gnu.org/r/bug-tar/2011-09/msg00023.html>.
72911         So, give up entirely on AIX 7.1's fstatat, and fall back on our
72912         replacement fstatat (which is what older AIX releases were using
72913         anyway).
72914         * lib/fstatat.c (fstatat) [HAVE_FSTATAT]: Do not undef.  The only
72915         use is now changed to orig_fstatat.  This was probably the right
72916         thing to do anyway.
72917         (FSTATAT_AT_FDCWD_0_BROKEN): Remove; no longer used.
72918         (rpl_fstatat) [FSTATAT_ZERO_FLAG_BROKEN]: Remove.
72919         (rpl_fstatat): Simplify, assuming !FSTATAT_ZERO_FLAG_BROKEN.
72920         (AT_FUNC_NAME) [FSTATAT_ZERO_FLAG_BROKEN]: Now rpl_fstatat.
72921         * m4/openat.m4 (gl_FUNC_FSTATAT): Test for the more-general bug
72922         and define FSTATAT_ZERO_FLAG_BROKEN, not FSTATAT_AT_FDCWD_0_BROKEN,
72923         if the bug is found.
72925         openat: test for fstatat (AT_FDCWD, ..., 0) bug
72926         This tests for another fstatat bug on AIX 7.1:
72927         fstatat (AT_FDCWD, ..., 0) does not work.  See
72928         <http://lists.gnu.org/r/bug-tar/2011-09/msg00015.html>.
72929         * lib/fstatat.c (FSTATAT_AT_FDCWD_0_BROKEN)
72930         (LSTAT_FOLLOWS_SLASHED_SYMLINK): Default to 0.
72931         (rpl_fstatat): Adjust so that it works around either (or both)
72932         bugs if present.
72933         * m4/openat.m4 (gl_FUNC_FSTATAT): Test for this fstatat bug.
72935 2011-09-03  Karl Berry  <karl@gnu.org>
72937         * doc/regex.texi (Character Class Operators): Avoid literal ":"
72938         in index entries.
72940 2011-09-02  Bruno Haible  <bruno@clisp.org>
72942         Allow the user to override the choice of AR, ARFLAGS, RANLIB.
72943         * m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): Don't override the given
72944         values of AR, ARFLAGS, RANLIB.
72945         Reported by John W. Eaton <jwe@gnu.org> for Octave.
72947 2011-09-02  Bruno Haible  <bruno@clisp.org>
72949         Find 'ar' program that fits with --host argument.
72950         * m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): Use AC_CHECK_TOOL.
72952 2011-09-02  Bruno Haible  <bruno@clisp.org>
72954         tests: init.sh: Support any non-GNU diff.
72955         * tests/init.sh (compare): If "diff -c" is supported but "diff -u" is
72956         not, use "diff -c". Useful on AIX 6.1, HP-UX 11.31, OSF/1 5.1,
72957         Solaris 8.
72959 2011-09-02  Bruno Haible  <bruno@clisp.org>
72961         tests: init.sh: work also with any non-GNU diff that supports -u
72962         * tests/init.sh: Relax check for diff -u support.
72963         Rather than checking for GNU diff via --version, simply check
72964         for support for -u itself.  Useful at least on OpenBSD 4.9,
72965         AIX 7.1, IRIX 6.5, and Solaris 10.
72967 2011-09-01  Bruno Haible  <bruno@clisp.org>
72969         strtoimax, strtoumax: Document problem on HP-UX 11.
72970         * doc/posix-functions/strtoimax.texi: Mention HP-UX 11.11 problem.
72971         * doc/posix-functions/strtoumax.texi: Likewise.
72973 2011-09-01  Bruno Haible  <bruno@clisp.org>
72975         strtoumax: Avoid link error on OSF/1 with DTK cc.
72976         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Always test whether strtoumax is
72977         defined as a function.
72978         * modules/strtoumax (Depends-on, configure.ac): Test only whether
72979         strtoumax is defined, not whether it is declared.
72981 2011-09-01  Bruno Haible  <bruno@clisp.org>
72983         strtoimax: Avoid link error on OSF/1 with DTK cc.
72984         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Always test whether strtoimax is
72985         defined as a function.
72986         * modules/strtoimax (Depends-on, configure.ac): Test only whether
72987         strtoimax is defined, not whether it is declared.
72989 2011-09-01  Bruno Haible  <bruno@clisp.org>
72991         imaxdiv: Avoid link error on OSF/1 with DTK cc.
72992         * m4/imaxdiv.m4 (gl_FUNC_IMAXDIV): Also test whether imaxdiv is defined
72993         as a function.
72994         * modules/imaxdiv (configure.ac): Test whether imaxdiv is defined, not
72995         whether it is declared.
72997 2011-09-01  Bruno Haible  <bruno@clisp.org>
72999         imaxabs: Avoid link error on OSF/1 with DTK cc.
73000         * m4/imaxabs.m4 (gl_FUNC_IMAXABS): Also test whether imaxabs is defined
73001         as a function.
73002         * modules/imaxabs (configure.ac): Test whether imaxabs is defined, not
73003         whether it is declared.
73005 2011-09-01  Bruno Haible  <bruno@clisp.org>
73007         Tests for module 'strtoumax'.
73008         * modules/strtoumax-tests: New file.
73009         * tests/test-strtoumax.c: New file.
73011         Tests for module 'strtoimax'.
73012         * modules/strtoimax-tests: New file.
73013         * tests/test-strtoimax.c: New file.
73015         Tests for module 'imaxdiv'.
73016         * modules/imaxdiv-tests: New file.
73017         * tests/test-imaxdiv.c: New file.
73019         Tests for module 'imaxabs'.
73020         * modules/imaxabs-tests: New file.
73021         * tests/test-imaxabs.c: New file.
73023 2011-09-01  Bruno Haible  <bruno@clisp.org>
73025         pthread: Determine $(LIB_PTHREAD) correctly on IRIX 6.5.
73026         * m4/pthread.m4 (gl_PTHREAD_CHECK): Check for pthread_join, not
73027         pthread_create.
73029 2011-09-01  Paul Eggert  <eggert@cs.ucla.edu>
73031         openat: work around AIX 7.1 fstatat issue
73032         This should fix the problem that was not properly fixed
73033         in the previous change, dated 2011-08-30.
73034         * lib/fstatat.c: Include <sys/stat.h> twice, the first with
73035         __need_system_stat_h defined.
73036         (orig_fstatat) [HAVE_FSTATAT]: New function.
73037         (rpl_fstatat): Go back to the old way of doing things,
73038         except call orig_fstatat instead of fstatat.
73039         * m4/openat.m4 (gl_FUNC_FSTATAT): Remove unnecessary check for openat.
73040         Remove unnecessary check whether fstatat fills in st_size etc.
73042 2011-09-01  Bruno Haible  <bruno@clisp.org>
73044         sys_select: Avoid a syntax error regarding timespec_t on IRIX 6.5.
73045         * lib/sys_select.in.h [__sgi]: When included from <sys/bsd_types.h>,
73046         just include the system's header.
73048 2011-08-31  Jim Meyering  <meyering@redhat.com>
73050         tests: avoid spurious assertion failure in test-float.c on ppc64
73051         * tests/test-float.c (test_long_double): Comment out an assertion,
73052         LDBL_MIN_EXP <= DBL_MIN_EXP, that is failing at least on PowerPC-64
73053         with gcc-4.4.4.
73055         maint: indent with spaces, not TABs
73056         I need to get in the habit of running gnulib's "make check".
73057         Both of these would have been caught.
73058         * m4/largefile.m4: Indent with spaces, not TABs.
73059         * lib/parse-datetime.y (iso_8601_time): Likewise.
73060         Spotted by Pádraig Brady.
73062         test-parse-datetime.c: accommodate a relatively strict gcc warning
73063         * tests/test-parse-datetime.c (gmt_offset): Declare function "static",
73064         to avoid a warning from gcc's -Werror=missing-declarations.
73065         Insert a few spaces-before-funcall-parenthesis.
73067 2011-08-17  J.T. Conklin  <jtc@acorntoolworks.com>
73069         parse-datetime: accept ISO 8601 date and time rep with "T" separator
73070         The parser now accepts ISO 8601 date-time strings with "T" as the
73071         separator.  It has long parsed dates like "2004-02-29 16:21:42"
73072         with a space between the date and time strings.  Now it also parses
73073         "2004-02-29T16:21:42" and fractional-second and time-zone-annotated
73074         variants like "2004-02-29T16:21:42.333-07:00"
73075         * lib/parse-datetime.y: Parse ISO 8601 extended date and time
73076         of day representation using the 'T' separator character.
73077         * doc/parse-datetime.texi (General date syntax): replace use of
73078         deprecated --iso-8601 option with --rfc-3339 in example of date
73079         command output formats that can be parsed.
73080         * tests/test-parse-datetime.c (tm_diff): New function, taken from
73081         lib/parse-datetime.y.
73082         (gmt_offset): New function.
73083         (main): Add additional test cases to validate ISO8601 extended
73084         date and time of day parsing.
73086 2011-08-31  Bruno Haible  <bruno@clisp.org>
73088         freopen: Documentation.
73089         * doc/posix-functions/freopen.texi: Document the bug with the NULL file
73090         name.
73091         Reported by Claudio Bley <claudio.bley@gmail.com>.
73093 2011-08-31  Claudio Bley  <claudio.bley@gmail.com>  (tiny change)
73095         freopen: Don't crash if the filename argument is NULL.
73096         * lib/freopen.c (rpl_freopen): Don't compare the filename if it is
73097         NULL.
73099 2011-08-30  Paul Eggert  <eggert@cs.ucla.edu>
73101         openat: work around AIX 7.1 fstatat bug
73102         Problem reported by Kevin Brott for GNU tar, in the thread containing
73103         <http://lists.gnu.org/r/bug-tar/2011-08/msg00015.html>.
73104         * lib/fstatat.c (rpl_fstatat): Do not invoke underlying fstatat if
73105         FSTATAT_ST_SIZE_ETC_BROKEN.
73106         (fstatat) [FSTATAT_ST_SIZE_ETC_BROKEN && HAVE_FSTATAT]: #define to
73107         rpl_fstatat.
73108         * m4/openat.m4 (gl_FUNC_FSTATAT): New macro, with the fstatat-relevant
73109         part of gl_FUNC_OPENAT.  Also, check for the AIX 7.1 bug, and use
73110         AC_CHECK_FUNCS_ONCE for fstatat.
73111         (gl_FUNC_OPENAT): Use it.  Use AC_CHECK_FUNCS_ONCE for
73112         fchmodat, mkdirat, openat and unlinkat.
73114 2011-08-30  Bruno Haible  <bruno@clisp.org>
73116         Avoid endless recursions if config.h includes some header files.
73117         * lib/fopen.c (__need_FILE): Define already before including config.h.
73118         * lib/freopen.c (__need_FILE): Likewise.
73119         * lib/open.c (__need_system_fcntl_h): Likewise.
73120         * lib/stat.c (__need_system_sys_stat_h): Likewise.
73121         * lib/lstat.c (__need_system_sys_stat_h): Likewise.
73122         Reported by Michael Goffioul <michael.goffioul@gmail.com>.
73124 2011-08-25  Karl Berry  <karl@gnu.org>
73126         * config/srclist.txt (ylwrap): new try.
73127         * build-aux/ylwrap: new file.
73129 2011-08-23  Bruno Haible  <bruno@clisp.org>
73131         tmpdir: Use a good default directory on native Windows.
73132         * lib/tmpdir.c: Include <windows.h>, pathmax.h.
73133         (P_tmpdir): Default to _P_tmpdir on native Windows.
73134         (path_search): On native Windows, try the value returned by GetTempPath
73135         before trying P_tmpdir.
73136         * modules/tmpdir (Depends-on): Add pathmax.
73137         Suggested by John Darrington <john@darrington.wattle.id.au>.
73139 2011-08-20  Reuben Thomas  <rrt@sc3d.org>
73141         doc: fix typo in README-release
73142         * top/README-release: Capitalize first word of a sentence.
73144 2011-08-19  Jim Meyering  <meyering@redhat.com>
73146         fts: do not exhaust memory when processing million-entry directories
73147         Before this change, traversing (via rm -rf, find, du, etc.) an N-entry
73148         directory would require about 256*N bytes of memory.  Thus, it was
73149         easy to construct a directory too large to be processed by any of
73150         those tools.  With this change, fts' maximum memory utilization is
73151         now limited to around 30MB.
73152         * lib/fts.c (FTS_MAX_READDIR_ENTRIES): Define.
73153         (fts_read): When we've processed the final entry (i.e., when
73154         ->fts_link is NULL) and fts_dirp is non-NULL, call fts_build
73155         using the parent entry to read any remaining entries.  Dispatch
73156         depending on what fts_build returns:
73157         - NULL+stop, aka failure: stop
73158         - NULL otherwise: move up in the dir hierarchy
73159         - non-NULL: handle this new entry
73160         (fts_build): Declare and use new local, continue_readdir.
73161         Prepare to be called from fts_read, when the entries
73162         from a partially-read directory have just been exhausted.
73163         In that case, we'll skip the opendir and instead use the parent's
73164         fts_dirp and derive dir_fd from that.
73165         Finally, in the readdir loop, if we read max_entries entries,
73166         exit the loop ensuring *not* to call closedir.  This is required
73167         so that fts_dirp can be reused on a subsequent call.
73168         Prompted by Ben England's report of memory exhaustion in find
73169         and rm -rf vs. NFS: https://bugzilla.redhat.com/719749.
73171         maint: fts: move decl of `dp' down into while loop; split a long line
73172         * lib/fts.c (fts_build): No semantic change.
73174         fts: add/use new struct member, fts_dirp
73175         We are about to use this to manage any directory with
73176         too many entries to read all of them into memory at once.
73177         To do that, we'll need to save the DIR* pointer in each
73178         affected FTSENT struct.
73179         * lib/fts_.h: Include <dirent.h>.
73180         (struct FTSENT) [fts_dirp]: New member.
73181         * lib/fts.c (closedir_and_clear): Define.
73182         Use it in place of closedir so that we are sure to
73183         clear the new fts_dirp member when done with it.
73184         (fts_alloc): Initialize the new member.
73185         (fts_lfree): Free, if needed.
73187         maint: fts: give __opendir2 a new parameter and rename
73188         * lib/fts.c (__opendir2): Give it a new parameter, Pdir_fd, rather
73189         than surreptitiously using sole caller's "dir_fd".
73190         (fts_opendir): Rename from __opendir2.
73192         maint: fts.c: remove __opendir2's now-unused parameter, oflag
73193         * lib/fts.c (__opendir2): Remove unused parameter, oflag.
73195         maint: fts.c: correct off-by-one indentation
73196         * lib/fts.c (fts_build): Correct indentation, change style
73197         of a couple of block comments, and bracing style.
73199         maint: fts.c: move __opendir2 #define "up" out of function body
73200         * lib/fts.c (__opendir2): Move "up".  No semantic change.
73202         maint: fts.c: remove #if-0'd FTS_WHITEOUT code
73203         * lib/fts.c: Remove #if-0'd FTS_WHITEOUT code.  It's been #if-0'd
73204         out for a long time and besides was useful only on BSD systems.
73206 2011-08-18  Paul Eggert  <eggert@cs.ucla.edu>
73208         regex: port to Stratus OpenVOS
73209         * lib/regex_internal.h (internal_function) [!_LIBC]: Simply
73210         define to empty, rather than attempting nonportable optimizations.
73211         Problem reported by Paul Green in:
73212         http://lists.gnu.org/r/bug-diffutils/2011-08/msg00047.html
73213         and fix suggested by Eric Blake in:
73214         http://lists.gnu.org/r/bug-gnulib/2011-08/msg00143.html
73216 2011-08-17  Eric Blake  <eblake@redhat.com>
73218         getcwd: fix test failures on mingw
73219         * lib/getcwd.c (__getcwd): Early exit for ERANGE.
73220         * tests/test-getcwd.c (test_abort_bug, test_long_name): Don't fail
73221         test if long directory cannot be created, and allow mingw errno.
73223         getcwd-lgpl: fix m4 to match relaxed test for BSD
73224         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Relax probe.
73225         (gl_FUNC_GETCWD_SIGNATURE): New macro.
73226         (gl_FUNC_GETCWD_LGPL, gl_FUNC_GETCWD): Use it.
73227         * doc/posix-functions/getcwd.texi (getcwd): Tweak mentions of
73228         signature problem.
73230         getcwd: fix compilation on mingw64
73231         * lib/unistd.in.h (includes) [mingw]: Include <direct.h> for
73232         getcwd.
73233         Reported by Marc-André Lureau.
73235         pipe2: silence compiler warning
73236         * lib/pipe2.c (pipe2): Hide label if it is not used.
73238 2011-08-15  Ben Pfaff  <blp@cs.stanford.edu>
73240         relocatable-prog: fix link error
73241         * modules/relocatable-prog (configure.ac) [RELOCATABLE]: Also
73242         invoke AC_LIBOBJ([relocatable]).  This invocation was previously
73243         in the gl_RELOCATABLE_LIBRARY macro.  That invocation was moved
73244         into modules/relocatable-lib without noticing that
73245         modules/relocatable-prog also invokes gl_RELOCATABLE_LIBRARY and
73246         also needs to build relocatable.c.
73248 2011-08-12  Paul Eggert  <eggert@cs.ucla.edu>
73250         getaddrinfo: fix sh typo in gai_strerrorA decl checking
73251         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix typo in the generated
73252         shell code: it contained a 'break' that was not in a loop.
73253         Apparently the macro assumed that AC_CHECK_DECLS is implemenented
73254         via a shell-language loop; this may have been true in old Autoconf
73255         versions, but it's not true in Autoconf 2.68.  I found this bug
73256         when testing coreutils git on Solaris 8, whose shell complains
73257         about the syntax error.
73259 2011-08-12  Simon Josefsson  <simon@josefsson.org>
73261         * lib/base64.c: Fix comment to reference RFC 4648.
73262         Suggested by Bruno Haible <bruno@clisp.org> and Gijs van Tulder
73263         <gvtulder@gmail.com>.
73265 2011-08-11  Paul Eggert  <eggert@cs.ucla.edu>
73267         * build-aux/bootstrap (slurp): Remove obsolescent gettext.m4 patch.
73269         po/Makefile.in.in: fix make -q problem
73270         * build-aux/po/Makefile.in.in (check-macro-version): Remove this
73271         rule, since there's no file named 'check-macro-version' and its
73272         use as a file breaks make -q.
73273         (all): Don't depend on check-macro-version.
73274         (CHECK_MACRO_VERSION): New macro.
73275         (stamp-po): Use it.
73277         configmake: fix make -q problem
73278         * modules/configmake (configmake.h): Update configmake.h's time stamp
73279         even if the file does not change.  Otherwise, 'make -q' fails.
73280         Problem reported by Simon Josefsson in
73281         <http://lists.gnu.org/r/bug-gnulib/2011-08/msg00088.html>.
73283 2011-08-11  Jim Meyering  <meyering@redhat.com>
73285         git-version-gen: correct the advice in a comment
73286         * build-aux/git-version-gen: Correct comment.
73287         Don't recommend to list .tarball-version in .gitignore.
73289 2011-08-10  Paul Eggert  <eggert@cs.ucla.edu>
73291         base64: fix off-by-one buffer size bug
73292         Problem and (trivial) fix reported by Gijs van Tulder in
73293         <http://lists.gnu.org/r/bug-gnulib/2011-08/msg00083.html>.
73294         * lib/base64.c (base64_decode_alloc_ctx): Allocate one more byte.
73295         * tests/test-base64.c (main): Catch the bug.
73297 2011-08-10  Eric Blake  <eblake@redhat.com>
73299         closein: correct comments
73300         * lib/closein.c (close_stdin): Improve comments.
73302 2011-08-09  Bruno Haible  <bruno@clisp.org>
73304         More tests for 'fseeko'.
73305         * tests/test-fseeko3.c: New file, from Eric Blake.
73306         * tests/test-fseeko3.sh: New file.
73307         * modules/fseeko-tests (Files): Add them.
73308         (TESTS): Add test-fseeko3.sh.
73309         (check_PROGRAMS): Add test-fseeko3.
73311 2011-08-09  Eric Blake  <eblake@redhat.com>
73313         fseeko: remove unneeded hack
73314         * lib/fseeko.c (fseeko): Don't special-case SEEK_END.
73316         fseeko: fix bug on glibc
73317         * lib/fseeko.c (fseeko): Set stream offset to match fd offset.
73318         Reported by John W. Eaton.
73320 2011-08-08  Bruno Haible  <bruno@clisp.org>
73322         unictype/base: Fix interoperability with preinstalled libunistring.
73323         * modules/unictype/base (configure.ac): Bump minimum version to 0.9.4.
73324         Reported by Simon Josefsson.
73326 2011-08-08  Bruno Haible  <bruno@clisp.org>
73328         iswblank: Detect declaration correctly.
73329         * m4/iswblank.m4 (gl_FUNC_ISWBLANK): Use correct headers in
73330         AC_CHECK_DECLS invocation.
73332 2011-08-08  Bruno Haible  <bruno@clisp.org>
73334         tcgetsid: Detect declaration correctly.
73335         * m4/tcgetsid.m4 (gl_FUNC_TCGETSID): Use correct headers in
73336         AC_CHECK_DECLS invocation.
73337         Reported by Simon Josefsson.
73339 2011-08-08  Eric Blake  <eblake@redhat.com>
73341         largefile: fix typo that regressed large file support
73342         * modules/largefile (configure.ac-early): Fix section name.
73344 2011-08-06  Karl Berry  <karl@gnu.org>
73346         * MODULES.html.sh (func_all_files): _Noreturn is no longer
73347         a separate module.
73349 2011-08-05  Simon Josefsson  <simon@josefsson.org>
73351         openat: Fix warnings and commens when building unlinkat.c on Hurd.
73352         * lib/unlinkat.c: Mention Hurd in comments.  Include stdlib.h to
73353         get prototype for free.
73355 2011-08-04  Bruno Haible  <bruno@clisp.org>
73357         Tests for module 'pathmax'.
73358         * modules/pathmax-tests: New file.
73359         * tests/test-pathmax.c: New file.
73361         canonicalize-lgpl: Support larger filenames on the Hurd.
73362         * lib/canonicalize-lgpl.c (__realpath): Bump path_max fallback to 8192.
73363         Reported by Paul Eggert.
73365         pathmax: Leave PATH_MAX undefined on the Hurd, and a constant otherwise.
73366         * lib/pathmax.h (PATH_MAX): Leave it undefined on GNU/Hurd.
73367         * lib/chdir-long.h: Include pathmax.h.
73368         * lib/clean-temp.c (PATH_MAX): Remove code that is done by pathmax.h.
73369         * lib/getcwd.c: Include pathmax.h instead of <limits.h>.
73370         (PATH_MAX): Remove code that is done by pathmax.h.
73371         * lib/canonicalize.c (PATH_MAX): Provide a fallback value.
73372         * lib/tmpfile.c: Add a comment.
73373         * m4/pathmax.m4 (gl_PATHMAX): Don't test for pathconf.
73374         * modules/chdir-long (Depends-on): Add pathmax.
73375         * modules/getcwd (Depends-on): Add pathmax.
73376         * tests/test-getcwd.c (test_abort_bug): Avoid syntax error when PATH_MAX
73377         is not defined.
73378         * doc/posix-headers/limits.texi: Mention the pathmax module.
73379         * NEWS: Mention the change.
73381 2011-08-02  Bruno Haible  <bruno@clisp.org>
73383         pthread_sigmask: Actually use results of gl_THREADLIB.
73384         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Test and require
73385         gl_THREADLIB, not gl_[]THREADLIB.
73386         Reported by Eric Blake.
73388 2011-08-02  Jim Meyering  <meyering@redhat.com>
73390         maint.mk: relax the default _gl_TS_function_match regexp
73391         * top/maint.mk (_gl_TS_function_match): Don't require at least one
73392         space between function name and "(" in an "extern" declaration.
73393         That would fail to match a decl with no space there: extern void foo();
73395 2011-07-31  Iain Nicol  <iain@thenicols.net>
73397         git-version-gen: document that EXTRA_DIST must include .version
73398         * build-aux/git-version-gen: In the how-to-use comment, document
73399         that EXTRA_DIST must include .version.  Otherwise, "make distcheck"
73400         will fail when run from an unpacked distribution tarball.
73402 2011-08-01  Bruno Haible  <bruno@clisp.org>
73404         wctype-h: Fix last change.
73405         * m4/wctype_h.m4 (gl_WCTYPE_H): If towlower is defined, set
73406         REPLACE_TOWLOWER to 0.
73407         Reported by Sam Steingold <sds@gnu.org>.
73409 2011-07-31  Bruno Haible  <bruno@clisp.org>
73411         frexpl: Update autoconf test.
73412         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Update overrides of <float.h>,
73413         according to changes of 2011-06-20.
73415 2011-07-31  Bruno Haible  <bruno@clisp.org>
73417         sys_utsname: Add support for Minix.
73418         * lib/sys_utsname.in.h [Minix]: Include <stddef.h> before
73419         <sys/utsname.h>.
73420         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H): Likewise.
73421         * doc/posix-headers/sys_utsname.texi: Document the Minix problem.
73423 2011-07-31  Bruno Haible  <bruno@clisp.org>
73425         strings: Add support for Minix.
73426         * lib/strings.in.h [Minix]: Include <sys/types.h> before <strings.h>.
73427         * m4/strings_h.m4 (gl_HEADER_STRINGS_H_BODY): Likewise.
73428         * doc/posix-headers/strings.texi: Document the Minix problem.
73430 2011-07-31  Bruno Haible  <bruno@clisp.org>
73432         wctype-h: Add support for Minix.
73433         * m4/wctype_h.m4 (gl_WCTYPE_H): Test whether towlower is declared. Set
73434         REPLACE_TOWLOWER.
73435         * modules/wctype-h (Makefile.am): Substitute REPLACE_TOWLOWER.
73436         * lib/wctype.in.h (towlower, towupper): Test REPLACE_TOWLOWER, not
73437         REPLACE_ISWCNTRL.
73439 2011-07-31  Paul Eggert  <eggert@cs.ucla.edu>
73441         * lib/xalloc.h (DEFAULT_MXFAST): Track 64-bit glibc.
73442         This is a performance improvement for 64-bit hosts: it causes the
73443         value of DEFAULT_MXFAST to track what's in glibc on such hosts.
73445 2011-07-31  Bruno Haible  <bruno@clisp.org>
73447         stdioext: Add support for Minix.
73448         * lib/fbufmode.c (fbufmode) [__minix]: Add conditional code.
73449         * lib/fpurge.c (fpurge): Likewise.
73450         * lib/freadahead.c (freadahead): Likewise.
73451         * lib/freadable.c (freadable): Likewise.
73452         * lib/freading.c (freading): Likewise.
73453         * lib/freadptr.c (freadptr): Likewise.
73454         * lib/freadseek.c (freadptrinc): Likewise.
73455         * lib/fseeko.c (rpl_fseeko): Likewise.
73456         * lib/fseterr.c (fseterr): Likewise.
73457         * lib/fwritable.c (fwritable): Likewise.
73458         * lib/fwriting.c (fwriting): Likewise.
73459         * lib/fflush.c (clear_ungetc_buffer): Update comment.
73460         * m4/fpending.m4 (gl_PREREQ_FPENDING): Add a variant for Minix.
73462 2011-07-31  Bruno Haible  <bruno@clisp.org>
73464         errno: Port to Minix.
73465         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Test also whether ENETRESET and
73466         ECONNABORTED are defined.
73467         * lib/errno.in.h (ENETRESET, GNULIB_defined_ENETRESET, ECONNABORTED,
73468         GNULIB_defined_ECONNABORTED): New macros.
73469         * lib/strerror-override.h (strerror_override): Test also
73470         GNULIB_defined_ENETRESET, GNULIB_defined_ECONNABORTED.
73471         * lib/strerror-override.c (strerror_override): Handle also ENETRESET,
73472         ECONNABORTED.
73473         * doc/posix-headers/errno.texi: Mention the Minix problem.
73475 2011-07-31  Bruno Haible  <bruno@clisp.org>
73477         Work around declaration collisions on Minix.
73478         * m4/mbsinit.m4 (gl_FUNC_MBSINIT): If mbsinit is declared but not
73479         defined, set REPLACE_MBSINIT.
73480         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): If mbrtowc is declared but not
73481         defined, set REPLACE_MBRTOWC.
73482         * m4/mbrlen.m4 (gl_FUNC_MBRLEN): If mbrlen is declared but not defined,
73483         set REPLACE_MBRLEN.
73484         * m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): If mbsrtowcs is declared but not
73485         defined, set REPLACE_MBSRTOWCS.
73486         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): If wcrtomb is declared but not
73487         defined, set REPLACE_WCRTOMB.
73488         * m4/wcsrtombs.m4 (gl_FUNC_WCSRTOMBS): If wcsrtombs is declared but not
73489         defined, set REPLACE_WCSRTOMBS.
73491 2011-07-31  Bruno Haible  <bruno@clisp.org>
73493         Add support for Minix with ACK compiler.
73494         * m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): New macro.
73495         * gnulib-tool (func_import, func_create_testdir): Emit invocation of
73496         gl_PROG_AR_RANLIB instead of AC_PROG_RANLIB.
73498 2011-07-31  Bruno Haible  <bruno@clisp.org>
73500         Documentation about Minix.
73501         * doc/posix-headers/*.texi: Add info about Minix 3.1.8.
73502         * doc/glibc-headers/*.texi: Likewise.
73503         * doc/posix-functions/*.texi: Likewise.
73504         * doc/glibc-functions/*.texi: Likewise.
73506 2011-07-31  Bruno Haible  <bruno@clisp.org>
73508         snippet/warn-on-use: Fix indentation.
73509         * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Fix indentation.
73511 2011-07-25  Jim Meyering  <meyering@redhat.com>
73513         tests: test-update-copyright.sh: remove unnecessary "rm" commands
73514         * tests/test-update-copyright.sh: Remove unused rm -f $TMP.*.bak
73515         commands.
73517 2011-07-27  Jim Meyering  <meyering@redhat.com>
73519         maint.mk: avoid sc_prohibit_always-defined_macros failure in coreutils
73520         * top/maint.mk (gl_extract_significant_defines_): Now that
73521         SA_RESETHAND and SA_RESTART are #defined (albeit conditionally) in
73522         gnulib/lib/signal.in.h, and now that we recommend to
73523         define-if-undefined those two symbols in application code,
73524         we must filter them out of the "significant" list.
73525         This avoids a "make syntax-check" failure in coreutils.
73527 2011-07-26  Eric Blake  <eblake@redhat.com>
73529         warnings: add comments about previous patch
73530         * m4/absolute-header.m4: Document AS_VAR_PUSHDEF limitation.
73531         * m4/include_next.m4: Likewise.
73532         * m4/warn-on-use.m4: Likewise.
73533         * m4/warnings.m4: Likewise, and simplify use.
73534         Suggested by Stefano Lattarini.
73536         include-next, warnings: support older autoconf
73537         * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Use
73538         AS_VAR_PUSHDEF in a way that works with older autoconf.
73539         * m4/warnings.m4 (gl_WARN_ADD): Likewise.
73540         Reported by Daniel P. Berrange.
73542 2011-07-25  Bruno Haible  <bruno@clisp.org>
73544         fseek, ftell: Fix doc.
73545         * doc/posix-functions/fseek.texi: Reword statement about
73546         AC_SYS_LARGEFILE.
73547         * doc/posix-functions/ftell.texi: Likewise.
73549 2011-07-25  Paul Eggert  <eggert@cs.ucla.edu>
73550             Bruno Haible  <bruno@clisp.org>
73552         Add dependencies to the 'largefile' module.
73553         * modules/fopen (Depends-on): Add 'largefile'.
73554         * modules/freopen (Depends-on): Likewise.
73555         * modules/fseeko (Depends-on): Likewise.
73556         * modules/ftello (Depends-on): Likewise.
73557         * modules/glob (Depends-on): Likewise.
73558         * modules/lseek (Depends-on): Likewise.
73559         * modules/lstat (Depends-on): Likewise.
73560         * modules/mkostemp (Depends-on): Likewise.
73561         * modules/mkostemps (Depends-on): Likewise.
73562         * modules/mkstemp (Depends-on): Likewise.
73563         * modules/mkstemps (Depends-on): Likewise.
73564         * modules/open (Depends-on): Likewise.
73565         * modules/openat (Depends-on): Likewise.
73566         * modules/pread (Depends-on): Likewise.
73567         * modules/pwrite (Depends-on): Likewise.
73568         * modules/scandir (Depends-on): Likewise.
73569         * modules/stat (Depends-on): Likewise.
73570         * modules/tmpfile (Depends-on): Likewise.
73571         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Do not require AC_SYS_LARGEFILE,
73572         since the containing module now depends on the largefile module.
73573         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Likewise.
73574         * doc/posix-functions/fopen.texi: Mention that the problem of 32-bit
73575         off_t is fixed by gnulib.
73576         * doc/posix-functions/freopen.texi: Likewise.
73577         * doc/posix-functions/fseeko.texi: Likewise.
73578         * doc/posix-functions/fstatat.texi: Likewise.
73579         * doc/posix-functions/ftello.texi: Likewise.
73580         * doc/posix-functions/glob.texi: Likewise.
73581         * doc/posix-functions/lseek.texi: Likewise.
73582         * doc/posix-functions/lstat.texi: Likewise.
73583         * doc/posix-functions/mkstemp.texi: Likewise.
73584         * doc/posix-functions/open.texi: Likewise.
73585         * doc/posix-functions/openat.texi: Likewise.
73586         * doc/posix-functions/pread.texi: Likewise.
73587         * doc/posix-functions/pwrite.texi: Likewise.
73588         * doc/posix-functions/scandir.texi: Likewise.
73589         * doc/posix-functions/stat.texi: Likewise.
73590         * doc/posix-functions/tmpfile.texi: Likewise.
73591         * doc/glibc-functions/mkostemp.texi: Likewise.
73592         * doc/glibc-functions/mkostemps.texi: Likewise.
73593         * doc/glibc-functions/mkstemps.texi: Likewise.
73595 2011-07-25  Bruno Haible  <bruno@clisp.org>
73597         fcntl: Move AC_LIBOBJ invocation to module description.
73598         * m4/fcntl.m4 (gl_REPLACE_FCNTL): Don't invoke AC_LIBOBJ.
73599         * modules/fcntl (configure.ac): Invoke AC_LIBOBJ.
73601         fcntl: Remove call-in from fchdir.m4.
73602         * m4/fcntl.m4 (gl_FUNC_FCNTL): Conditionally invoke gl_TEST_FCHDIR.
73603         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't invoke gl_REPLACE_FCNTL.
73605         dup3: Remove potential call-in from fchdir.m4.
73606         * m4/dup3.m4 (gl_FUNC_DUP3): Add comment about fchdir.
73607         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Remove comment about dup3.
73609         dup2: Move AC_LIBOBJ invocation to module description.
73610         * m4/dup2.m4 (gl_REPLACE_DUP2): Remove macro.
73611         (gl_FUNC_DUP2): Instead of gl_REPLACE_DUP2, just set REPLACE_DUP2 to 1.
73612         Don't invoke AC_LIBOBJ.
73613         * modules/dup2 (configure.ac): Invoke AC_LIBOBJ.
73615         dup2: Remove call-in from fchdir.m4.
73616         * m4/dup2.m4 (gl_FUNC_DUP2): Conditionally invoke gl_TEST_FCHDIR.
73617         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't invoke gl_REPLACE_DUP2.
73619         fclose: Move AC_LIBOBJ invocation to module description.
73620         * m4/fclose.m4 (gl_REPLACE_FCLOSE): Remove macro.
73621         (gl_FUNC_FCLOSE): Instead of gl_REPLACE_FCLOSE, just set REPLACE_FCLOSE
73622         to 1.
73623         * modules/fclose (configure.ac): Invoke AC_LIBOBJ.
73625         fclose: Remove call-in from close.m4.
73626         * m4/fclose.m4 (gl_FUNC_FCLOSE): Invoke gl_FUNC_CLOSE.
73627         * m4/close.m4 (gl_FUNC_CLOSE): Don't invoke gl_REPLACE_FCLOSE.
73629         close: Move AC_LIBOBJ invocation to module description.
73630         * m4/close.m4 (gl_REPLACE_CLOSE): Remove macro.
73631         (gl_FUNC_CLOSE): Instead of gl_REPLACE_CLOSE, just set REPLACE_CLOSE to
73632         1.
73633         * modules/close (configure.ac): Invoke AC_LIBOBJ.
73635         close: Remove call-in from fchdir.m4.
73636         * m4/close.m4 (gl_FUNC_CLOSE): Conditionally invoke gl_TEST_FCHDIR.
73637         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't invoke gl_REPLACE_CLOSE.
73639         open: Move AC_LIBOBJ invocation to module description.
73640         * m4/open.m4 (gl_REPLACE_OPEN): Remove macro.
73641         (gl_FUNC_OPEN): Instead of gl_REPLACE_OPEN, just set REPLACE_OPEN to 1.
73642         * modules/open (configure.ac): Invoke AC_LIBOBJ and gl_PREREQ_OPEN.
73644         open: Remove call-in from fchdir.m4.
73645         * m4/open.m4 (gl_FUNC_OPEN): Conditionally invoke gl_TEST_FCHDIR.
73646         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't invoke gl_REPLACE_OPEN.
73648         fchdir: Start to remove gl_REPLACE_* idiom.
73649         * m4/fchdir.m4 (gl_TEST_FCHDIR): New macro.
73650         (gl_FUNC_FCHDIR): Invoke it.
73652 2011-07-25  Paul Eggert  <eggert@cs.ucla.edu>
73654         * lib/ftell.c (ftell): Comment out cast.
73656         close: use gl_REPLACE_FCLOSE only if defined
73657         * m4/close.m4 (gl_REPLACE_CLOSE): Use gl_REPLACE_FCLOSE only if it
73658         is defined.  The close module doesn't depend on the fclose module
73659         any more, so gl_REPLACE_CLOSE's existence cannot be assumed.  See
73660         <http://lists.gnu.org/r/bug-gnulib/2011-07/msg00392.html>.
73661         I reproduced the problem with "./gnulib-tool --test close sys_socket".
73663 2011-07-24  Jim Meyering  <meyering@redhat.com>
73665         test-select.h: avoid warning when using gcc's -Wmissing-declarations
73666         * tests/test-select.h (test_function): Declare as "static".
73668 2011-07-24  Bruno Haible  <bruno@clisp.org>
73670         doc: Mention the effects of AC_SYS_LARGEFILE.
73671         * doc/posix-functions/aio_cancel.texi: Mention the effects of AC_SYS_LARGEFILE
73672         on this function.
73673         * doc/posix-functions/aio_error.texi: Likewise.
73674         * doc/posix-functions/aio_fsync.texi: Likewise.
73675         * doc/posix-functions/aio_read.texi: Likewise.
73676         * doc/posix-functions/aio_return.texi: Likewise.
73677         * doc/posix-functions/aio_suspend.texi: Likewise.
73678         * doc/posix-functions/aio_write.texi: Likewise.
73679         * doc/posix-functions/fgetpos.texi: Likewise.
73680         * doc/posix-functions/fopen.texi: Likewise.
73681         * doc/posix-functions/freopen.texi: Likewise.
73682         * doc/posix-functions/fsetpos.texi: Likewise.
73683         * doc/posix-functions/fstatvfs.texi: Likewise.
73684         * doc/posix-functions/ftruncate.texi: Likewise.
73685         * doc/posix-functions/ftw.texi: Likewise.
73686         * doc/posix-functions/getrlimit.texi: Likewise.
73687         * doc/posix-functions/glob.texi: Likewise.
73688         * doc/posix-functions/lio_listio.texi: Likewise.
73689         * doc/posix-functions/lockf.texi: Likewise.
73690         * doc/posix-functions/mkstemp.texi: Likewise.
73691         * doc/posix-functions/mmap.texi: Likewise.
73692         * doc/posix-functions/nftw.texi: Likewise.
73693         * doc/posix-functions/openat.texi: Likewise.
73694         * doc/posix-functions/opendir.texi: Likewise.
73695         * doc/posix-functions/posix_fadvise.texi: Likewise.
73696         * doc/posix-functions/posix_fallocate.texi: Likewise.
73697         * doc/posix-functions/pread.texi: Likewise.
73698         * doc/posix-functions/pwrite.texi: Likewise.
73699         * doc/posix-functions/readdir.texi: Likewise.
73700         * doc/posix-functions/readdir_r.texi: Likewise.
73701         * doc/posix-functions/rewinddir.texi: Likewise.
73702         * doc/posix-functions/scandir.texi: Likewise.
73703         * doc/posix-functions/seekdir.texi: Likewise.
73704         * doc/posix-functions/setrlimit.texi: Likewise.
73705         * doc/posix-functions/statvfs.texi: Likewise.
73706         * doc/posix-functions/telldir.texi: Likewise.
73707         * doc/posix-functions/tmpfile.texi: Likewise.
73708         * doc/posix-functions/truncate.texi: Likewise.
73709         * doc/glibc-functions/fallocate.texi: Likewise.
73710         * doc/glibc-functions/fstatfs.texi: Likewise.
73711         * doc/glibc-functions/fts_children.texi: Likewise.
73712         * doc/glibc-functions/fts_read.texi: Likewise.
73713         * doc/glibc-functions/getdirentries.texi: Likewise.
73714         * doc/glibc-functions/mkostemp.texi: Likewise.
73715         * doc/glibc-functions/mkostemps.texi: Likewise.
73716         * doc/glibc-functions/mkstemps.texi: Likewise.
73717         * doc/glibc-functions/preadv.texi: Likewise.
73718         * doc/glibc-functions/pwritev.texi: Likewise.
73719         * doc/glibc-functions/sendfile.texi: Likewise.
73720         * doc/glibc-functions/statfs.texi: Likewise.
73722 2011-07-24  Bruno Haible  <bruno@clisp.org>
73724         doc: Fix typo.
73725         * doc/posix-functions/fstat.texi: Talk about fstat, not stat.
73727 2011-07-24  Bruno Haible  <bruno@clisp.org>
73729         doc: Mention fsusage.
73730         * doc/posix-functions/statvfs.texi: Mention the fsusage module.
73732 2011-07-24  Bruno Haible  <bruno@clisp.org>
73734         doc: Mention new glibc headers and functions.
73735         * doc/glibc-headers/gshadow.texi: New file.
73736         * doc/glibc-functions/endsgent.texi: New file.
73737         * doc/glibc-functions/fgetsgent.texi: New file.
73738         * doc/glibc-functions/fgetsgent_r.texi: New file.
73739         * doc/glibc-functions/getsgent.texi: New file.
73740         * doc/glibc-functions/getsgent_r.texi: New file.
73741         * doc/glibc-functions/getsgnam.texi: New file.
73742         * doc/glibc-functions/getsgnam_r.texi: New file.
73743         * doc/glibc-functions/putsgent.texi: New file.
73744         * doc/glibc-functions/setsgent.texi: New file.
73745         * doc/glibc-functions/sgetsgent.texi: New file.
73746         * doc/glibc-functions/sgetsgent_r.texi: New file.
73747         * doc/glibc-functions/malloc_info.texi: New file.
73748         * doc/glibc-functions/preadv.texi: New file.
73749         * doc/glibc-functions/pwritev.texi: New file.
73750         * doc/glibc-functions/register_printf_modifier.texi: New file.
73751         * doc/glibc-functions/register_printf_specifier.texi: New file.
73752         * doc/glibc-functions/register_printf_type.texi: New file.
73753         * doc/glibc-functions/pthread_attr_getaffinity_np.texi: New file.
73754         * doc/glibc-functions/pthread_attr_setaffinity_np.texi: New file.
73755         * doc/glibc-functions/pthread_getaffinity_np.texi: New file.
73756         * doc/glibc-functions/pthread_getname_np.texi: New file.
73757         * doc/glibc-functions/pthread_mutex_consistent_np.texi: New file.
73758         * doc/glibc-functions/pthread_mutexattr_getrobust_np.texi: New file.
73759         * doc/glibc-functions/pthread_mutexattr_setrobust_np.texi: New file.
73760         * doc/glibc-functions/pthread_setaffinity_np.texi: New file.
73761         * doc/glibc-functions/pthread_setname_np.texi: New file.
73762         * doc/glibc-functions/pthread_sigqueue.texi: New file.
73763         * doc/glibc-functions/pthread_timedjoin_np.texi: New file.
73764         * doc/glibc-functions/pthread_tryjoin_np.texi: New file.
73765         * doc/glibc-functions/qsort_r.texi: New file.
73766         * doc/glibc-functions/quick_exit.texi: New file.
73767         * doc/glibc-functions/syncfs.texi: New file.
73768         * doc/gnulib.texi: Include them.
73769         (Glibc gshadow.h, Glibc sys/uio.h): New sections.
73770         * doc/posix-functions/psiginfo.texi: Fix info about glibc version.
73771         * doc/posix-functions/pthread_mutex_consistent.texi: Likewise.
73772         * doc/posix-functions/pthread_mutexattr_getrobust.texi: Likewise.
73773         * doc/posix-functions/pthread_mutexattr_setrobust.texi: Likewise.
73774         * doc/glibc-functions/execvpe.texi: Likewise.
73776 2011-07-24  Paul Eggert  <eggert@cs.ucla.edu>
73778         ftell: don't include <unistd.h>
73779         * lib/ftell.c: Don't include <unistd.h>.  <stdio.h> is now
73780         guaranteed to define off_t, and the ftell module depends on the
73781         stdio module.
73783         ftell: do not assume wraparound signed arithmetic
73784         * lib/ftell.c: Include <limits.h>.
73785         (ftell): Don't assume wraparound signed arithmetic.
73787 2011-07-24  Bruno Haible  <bruno@clisp.org>
73789         close: No longer depend on module 'fclose'.
73790         * modules/close (Depends-on): Remove fclose.
73791         * NEWS: Mention the change.
73792         Suggested by Sam Steingold <sds@gnu.org>.
73794 2011-07-24  Bruno Haible  <bruno@clisp.org>
73796         fsusage: Enable large volume support on AIX >= 5.2.
73797         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): If 'struct statvfs64' has a
73798         larger f_blocks field than 'struct statvfs', define STAT_STATVFS64
73799         instead of STAT_STATVFS.
73800         * lib/fsusage.c (get_fs_usage) [STAT_STATVFS64]: Use statvfs64.
73802         fsusage: Restore previous behaviour on AIX, Cygwin, Interix.
73803         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Enforce a 64-bit struct statvfs
73804         f_blocks field only on MacOS X.
73806         fsusage: Support large volumes on glibc/Hurd, HP-UX, Solaris, MacOS X.
73807         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Require AC_SYS_LARGEFILE.
73808         * modules/fsusage (Depends-on): Add largefile.
73810 2011-07-24  Paul Eggert  <eggert@cs.ucla.edu>
73812         * README: Modernize discussion of signed integers.
73813         Assuming overflow wraparound is no longer safe.
73814         Mention ones' complement and signed magnitude.
73816 2011-07-22  Bruno Haible  <bruno@clisp.org>
73818         select tests, pselect tests: Refactor.
73819         * tests/test-select.h: New file, extracted from tests/test-select.c.
73820         (select_fn): New type.
73821         (test, do_select, do_select_nowait, do_select_wait, test_tty,
73822         test_connect_first, test_accept_first, test_pair, test_socket_pair,
73823         test_pipe): Add my_select argument.
73824         (test_function): Renamed from main. Add my_select argument.
73825         * tests/test-select.c: Move most code to tests/test-select.h. Include
73826         test-select.h.
73827         * modules/select-tests (Files): Add tests/test-select.h.
73828         * tests/test-pselect.c: Include test-select.h instead of test-select.c.
73829         (my_select, main): New functions.
73830         * modules/pselect-tests (Files): Add tests/test-select.h,
73831         tests/macros.h, tests/signature.h.
73832         (Depends-on): Remove select-tests. Add dependencies of test-select.h.
73833         (configure.ac): Check for <sys/wait.h>.
73835 2011-07-22  Bruno Haible  <bruno@clisp.org>
73837         sys_select tests: Check the signature of FD_*.
73838         * tests/test-select.c (FD_CLR, FD_ISSET, FD_SET, FD_ZERO): Move
73839         signature tests from here...
73840         * tests/test-sys_select.c (FD_CLR, FD_ISSET, FD_SET, FD_ZERO): ... to
73841         here.
73842         * modules/sys_select-tests (Files): Add tests/signature.h.
73844 2011-07-22  Paul Eggert  <eggert@cs.ucla.edu>
73846         largefile: new module, replacing large-inode
73847         Pádraig Brady suggested this in <http://debbugs.gnu.org/9140#20>.
73848         * MODULES.html.sh: Add largefile, remove large-inode.
73849         * modules/largefile, m4/largefile.m4: New files.
73850         * modules/large-inode, m4/large-inode.m4: Remove.
73852         fsusage: port to MacOS X 10.7 with 4 TiB file systems
73853         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Reject statvfs
73854         implementations that use only 32 bits to count blocks.
73855         On typical hosts with 1024-byte blocks, this fails with file
73856         systems as small as 4 TiB.  Problem reported by Herb Wartens
73857         <http://debbugs.gnu.org/9140> and this should also fix a similar
73858         problem reported by Tim Spriggs <http://debbugs.gnu.org/7355>.
73860         large-inode: New module
73861         * MODULES.html.sh: Add it.
73862         * modules/large-inode, m4/large-inode.m4: New files.
73864         extensions: Enable extensions on MacOS X 10.5 and later.
73865         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Define _DARWIN_C_SOURCE.
73867 2011-07-22  Kamil Dudka  <kdudka@redhat.com>
73869         file-has-acl: use acl_extended_file_nofollow if available
73870         * lib/acl-internal.h (HAVE_ACL_EXTENDED_FILE): New macro.
73871         (acl_extended_file): New macro.
73872         * lib/file-has-acl.c (file_has_acl): Use acl_extended_file_nofollow.
73873         * m4/acl.m4 (gl_FUNC_ACL): Check for acl_extended_file_nofollow.
73875 2011-07-21  Bruno Haible  <bruno@clisp.org>
73877         Declare system functions in a way that works with C++.
73878         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR) [C++]: In the test program,
73879         declare fdopendir as extern "C".
73880         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS) [C++]: In the test program,
73881         declare frexpl as extern "C".
73882         * m4/getaddrinfo.m4 (gl_GETADDRINFO) [C++]: In the test program,
73883         declare gai_strerror as extern "C".
73884         * m4/getdomainname.m4 (gl_FUNC_GETDOMAINNAME) [C++]: In the test
73885         programs, declare gai_strerror as extern "C".
73886         * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R) [C++]: In the test program,
73887         declare getlogin_r as extern "C".
73888         * m4/ioctl.m4 (gl_FUNC_IOCTL) [C++]: In the test program, declare ioctl
73889         as extern "C".
73890         * m4/ldexpl.m4 (gl_FUNC_LDEXPL_WORKS) [C++]: In the test program,
73891         declare ldexpl as extern "C".
73892         * m4/logb.m4 (gl_FUNC_LOGB) [C++]: In the test programs, declare logb
73893         as extern "C".
73894         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS) [C++]: In the test
73895         program, declare getmntinfo as extern "C".
73896         * m4/stpncpy.m4 (gl_FUNC_STPNCPY) [C++]: In the test program, declare
73897         stpncpy as extern "C".
73898         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS) [C++]: In the test
73899         program, declare __xpg_strerror_r as extern "C".
73900         * m4/strndup.m4 (gl_FUNC_STRNDUP) [C++]: In the test program, declare
73901         strndup as extern "C".
73902         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT) [C++]: In the test program,
73903         declare memset and bzero as extern "C".
73904         Reported by Sam Steingold <sds@gnu.org>.
73906 2011-07-12  Jim Meyering  <meyering@redhat.com>
73908         maint.mk: prohibit inclusion of "verify.h" without use
73909         * top/maint.mk (sc_prohibit_verify_without_use): New rule.
73911 2011-07-19  Pádraig Brady  <P@draigBrady.com>
73913         timer-time: A new module to check for timer_settime()
73914         * m4/timer_time.m4: Check for the posix function.
73915         * modules/timer-time: Add the new module.
73916         * MODULES.html.sh (Compat checks for POSIX:2008 functions):
73917         Mention it.
73919 2011-07-19  Paul Eggert  <eggert@cs.ucla.edu>
73920             Bruno Haible  <bruno@clisp.org>
73922         pthread_sigmask: assume POSIX threads if --avoid=threadlib
73923         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): If gl_THREADLIB is
73924         not defined, assume POSIX threads and look for pthread_sigmask in
73925         $LIBS, without changing $CPPFLAGS.
73927 2011-07-19  Bruno Haible  <bruno@clisp.org>
73929         strstr: Update cross-compilation guess.
73930         * m4/strstr.m4 (gl_FUNC_STRSTR): On glibc > 2.12 with x86 or x86_64
73931         CPUs, guess no, in view of glibc
73932         BZ #12100 <http://sourceware.org/bugzilla/show_bug.cgi?id=12100>.
73933         Suggested by Eric Blake. Reported by Reuben Thomas.
73935 2011-07-19  Pádraig Brady  <P@draigBrady.com>
73937         getopt-gnu: suppress core dumps from detection code
73938         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Use the nocrash module
73939         to suppress core dumps that may well occur on glibc systems.
73940         * modules/getopt-gnu: Depend on nocrash.
73942 2011-07-16  Paul Eggert  <eggert@cs.ucla.edu>
73944         pthread_sigmask: ensure usleep is declared
73945         * lib/pthread_sigmask.c [PTHREAD_SIGMASK_UNBLOCK_BUG]:
73946         Include <unistd.h>, to declare usleep.  Needed on Solaris 8,
73948 2011-07-15  Paul Eggert  <eggert@cs.ucla.edu>
73950         doc: Document NonStop portability issues.
73951         * doc/posix-functions/sigaction.texi (sigaction):
73952         * doc/posix-headers/signal.texi (signal.h):
73953         Document NonStop.  See Joachim Schmitz in
73954         http://lists.gnu.org/r/bug-coreutils/2011-07/msg00062.html
73956 2011-07-15  Bruno Haible  <bruno@clisp.org>
73958         ffsl, ffsll: Avoid unportable behaviour.
73959         * lib/ffsl.h (FUNC): Use 'unsigned int' instead of 'int'.
73961 2011-07-15  Bruno Haible  <bruno@clisp.org>
73963         ffs: More tests.
73964         * tests/test-ffs.c (NBITS): New macro.
73965         (main): Add more tests.
73966         * tests/test-ffsl.c (NBITS): New macro.
73967         (main): Add more tests.
73968         * tests/test-ffsll.c (NBITS): New macro.
73969         (main): Add more tests.
73971 2011-07-15  Eric Blake  <eblake@redhat.com>
73973         ffsl, ffsll: new modules
73974         * modules/ffsl: New file.
73975         * modules/ffsll: Likewise.
73976         * m4/ffsl.m4: Likewise.
73977         * m4/ffsll.m4: Likewise.
73978         * lib/ffsl.c: Likewise.
73979         * lib/ffsl.h: Likewise.
73980         * lib/ffsll.c: Likewise.
73981         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY)
73982         (gl_HEADER_STRING_H_DEFAULTS): Add defaults.
73983         * modules/string (Makefile.am): Substitute witnesses.
73984         * lib/strings.in.h (ffsl, ffsll): Declare.
73985         * modules/ffsl-tests: New test file.
73986         * modules/ffsll-tests: Likewise.
73987         * tests/test-ffsl.c: Likewise.
73988         * tests/test-ffsll.c: Likewise.
73989         * MODULES.html.sh (Integer arithmetic functions): Mention it.
73990         * doc/glibc-functions/ffsl.texi (ffsl): Likewise.
73991         * doc/glibc-functions/ffsll.texi (ffsll): Likewise.
73993         ffs: fix m4 prerequisite
73994         * m4/ffs.m4 (gl_FUNC_FFS): Require strings.h defaults.
73996         ffs: avoid undefined behavior
73997         * lib/ffs.c (ffs): Provide fallback for non-32-bit int.
73998         * tests/test-ffs.c (naive, main): Avoid signed shifts.
73999         Reported by Bruno Haible.
74001 2011-07-12  Bruno Haible  <bruno@clisp.org>
74003         pthread_sigmask: Rely on module 'threadlib'.
74004         * modules/pthread_sigmask (Depends-on): Add threadlib.
74005         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Assume gl_THREADLIB
74006         is defined.
74008 2011-07-12  Bruno Haible  <bruno@clisp.org>
74010         regex: Depend on module 'strcase'.
74011         * modules/regex (Depends-on): Add strcase, for strcasecmp().
74013 2011-07-12  Jim Meyering  <meyering@redhat.com>
74015         warn-on-use: fix typo in file name
74016         * modules/snippet/warn-on-use (Files): Correct file name:
74017         include /snippet/ component in "build-aux/snippet/warn-on-use.h".
74019 2011-07-12  Bruno Haible  <bruno@clisp.org>
74021         strings: Document module.
74022         * doc/posix-headers/strings.texi: Mention module 'strings'.
74024 2011-07-12  Bruno Haible  <bruno@clisp.org>
74026         Rename module '_Noreturn' to 'snippet/_Noreturn'.
74027         * modules/snippet/_Noreturn: Renamed from modules/_Noreturn.
74028         (Files, Makefile.am): Update.
74029         * build-aux/snippet/_Noreturn.h: Renamed from build-aux/_Noreturn.h.
74030         * modules/stdlib (Depends-on): Update.
74032 2011-07-12  Bruno Haible  <bruno@clisp.org>
74034         * NEWS: Mention the changes.
74036         Rename module 'warn-on-use' to 'snippet/warn-on-use'.
74037         * modules/snippet/warn-on-use: Renamed from modules/warn-on-use.
74038         (Files, Makefile.am): Update.
74039         * build-aux/snippet/warn-on-use.h: Renamed from build-aux/warn-on-use.h.
74040         * modules/arpa_inet (Depends-on): Update.
74041         * modules/ctype (Depends-on): Update.
74042         * modules/dirent (Depends-on): Update.
74043         * modules/fcntl-h (Depends-on): Update.
74044         * modules/glob (Depends-on): Update.
74045         * modules/iconv-h (Depends-on): Update.
74046         * modules/inttypes-incomplete (Depends-on): Update.
74047         * modules/langinfo (Depends-on): Update.
74048         * modules/locale (Depends-on): Update.
74049         * modules/math (Depends-on): Update.
74050         * modules/netdb (Depends-on): Update.
74051         * modules/poll-h (Depends-on): Update.
74052         * modules/pty (Depends-on): Update.
74053         * modules/search (Depends-on): Update.
74054         * modules/signal (Depends-on): Update.
74055         * modules/spawn (Depends-on): Update.
74056         * modules/stdio (Depends-on): Update.
74057         * modules/stdlib (Depends-on): Update.
74058         * modules/string (Depends-on): Update.
74059         * modules/strings (Depends-on): Update.
74060         * modules/sys_file (Depends-on): Update.
74061         * modules/sys_ioctl (Depends-on): Update.
74062         * modules/sys_select (Depends-on): Update.
74063         * modules/sys_socket (Depends-on): Update.
74064         * modules/sys_stat (Depends-on): Update.
74065         * modules/sys_time (Depends-on): Update.
74066         * modules/sys_times (Depends-on): Update.
74067         * modules/sys_utsname (Depends-on): Update.
74068         * modules/sys_wait (Depends-on): Update.
74069         * modules/termios (Depends-on): Update.
74070         * modules/time (Depends-on): Update.
74071         * modules/unistd (Depends-on): Update.
74072         * modules/wchar (Depends-on): Update.
74073         * modules/wctype-h (Depends-on): Update.
74074         * MODULES.html.sh (Support for building libraries and executables):
74075         Update.
74077         Rename module 'unused-parameter' to 'snippet/unused-parameter'.
74078         * modules/snippet/unused-parameter: Renamed from
74079         modules/unused-parameter.
74080         (Files, Makefile.am): Update.
74081         * build-aux/snippet/unused-parameter.h: Renamed from
74082         build-aux/unused-parameter.h.
74083         * modules/selinux-h (Depends-on): Update.
74084         * modules/unistr/base (Depends-on): Update.
74085         * MODULES.html.sh (Core language properties): Update.
74087         Rename module 'link-warning' to 'snippet/link-warning'.
74088         * modules/snippet/link-warning: Renamed from modules/link-warning.
74089         (Files, Makefile.am): Update.
74090         * build-aux/snippet/link-warning.h: Renamed from
74091         build-aux/link-warning.h.
74092         * MODULES.html.sh (Support for building libraries and executables):
74093         Update.
74095         Rename module 'c++defs' to 'snippet/c++defs'.
74096         * modules/snippet/c++defs: Renamed from modules/c++defs.
74097         (Files, Makefile.am): Update.
74098         * build-aux/snippet/c++defs.h: Renamed from build-aux/c++defs.h.
74099         * modules/arpa_inet (Depends-on): Update.
74100         * modules/ctype (Depends-on): Update.
74101         * modules/dirent (Depends-on): Update.
74102         * modules/fcntl-h (Depends-on): Update.
74103         * modules/glob (Depends-on): Update.
74104         * modules/iconv-h (Depends-on): Update.
74105         * modules/langinfo (Depends-on): Update.
74106         * modules/locale (Depends-on): Update.
74107         * modules/math (Depends-on): Update.
74108         * modules/netdb (Depends-on): Update.
74109         * modules/poll-h (Depends-on): Update.
74110         * modules/pty (Depends-on): Update.
74111         * modules/search (Depends-on): Update.
74112         * modules/signal (Depends-on): Update.
74113         * modules/spawn (Depends-on): Update.
74114         * modules/stdio (Depends-on): Update.
74115         * modules/stdlib (Depends-on): Update.
74116         * modules/string (Depends-on): Update.
74117         * modules/strings (Depends-on): Update.
74118         * modules/sys_ioctl (Depends-on): Update.
74119         * modules/sys_select (Depends-on): Update.
74120         * modules/sys_socket (Depends-on): Update.
74121         * modules/sys_stat (Depends-on): Update.
74122         * modules/sys_time (Depends-on): Update.
74123         * modules/sys_wait (Depends-on): Update.
74124         * modules/termios (Depends-on): Update.
74125         * modules/time (Depends-on): Update.
74126         * modules/unistd (Depends-on): Update.
74127         * modules/wchar (Depends-on): Update.
74128         * modules/wctype-h (Depends-on): Update.
74130         Rename module 'arg-nonnull' to 'snippet/arg-nonnull'.
74131         * modules/snippet/arg-nonnull: Renamed from modules/arg-nonnull.
74132         (Files, Makefile.am): Update.
74133         * build-aux/snippet/arg-nonnull.h: Renamed from build-aux/arg-nonnull.h.
74134         * modules/argv-iter (Depends-on): Update.
74135         * modules/arpa_inet (Depends-on): Update.
74136         * modules/dirent (Depends-on): Update.
74137         * modules/fcntl-h (Depends-on): Update.
74138         * modules/fnmatch (Depends-on): Update.
74139         * modules/getopt-posix (Depends-on): Update.
74140         * modules/glob (Depends-on): Update.
74141         * modules/iconv-h (Depends-on): Update.
74142         * modules/inttypes-incomplete (Depends-on): Update.
74143         * modules/locale (Depends-on): Update.
74144         * modules/math (Depends-on): Update.
74145         * modules/netdb (Depends-on): Update.
74146         * modules/search (Depends-on): Update.
74147         * modules/signal (Depends-on): Update.
74148         * modules/spawn (Depends-on): Update.
74149         * modules/stdio (Depends-on): Update.
74150         * modules/stdlib (Depends-on): Update.
74151         * modules/string (Depends-on): Update.
74152         * modules/strings (Depends-on): Update.
74153         * modules/sys_socket (Depends-on): Update.
74154         * modules/sys_stat (Depends-on): Update.
74155         * modules/sys_time (Depends-on): Update.
74156         * modules/sys_times (Depends-on): Update.
74157         * modules/sys_utsname (Depends-on): Update.
74158         * modules/time (Depends-on): Update.
74159         * modules/unistd (Depends-on): Update.
74160         * modules/wchar (Depends-on): Update.
74161         * MODULES.html.sh (Support for building libraries and executables):
74162         Update.
74164 2011-07-12  Paul Eggert  <eggert@cs.ucla.edu>
74166         Improvements on _Noreturn and related modules.
74168         modules/_Exit-tests: test _Noreturn too
74169         * tests/test-_Exit.c (MTA, Charlie): New functions, taken from the
74170         old tests/test-stdnoreturn.c.  This tests the _Noreturn keyword a bit.
74171         (main): Use them.
74173         stdnoreturn, stdnoreturn-tests: remove modules
74174         They're not needed here and a bit premature for use elsewhere.  See
74175         <http://lists.gnu.org/r/bug-gnulib/2011-07/msg00209.html>.
74176         * m4/stdnoreturn.m4, modules/stdnoreturn, modules/stdnoreturn-tests:
74177         * tests/test-stdnoreturn.c: Remove files.
74178         * MODULES.html.sh (_Noreturn <stdnoreturn.h>): Remove section.
74179         * lib/openat.h, lib/sigpipe-die.h, lib/xalloc.h, lib/xmemdup0.h:
74180         * lib/xstrtol.h: Use _Noreturn rather than including <stdnoreturn.h>
74181         and using noreturn.
74182         * modules/openat, modules/sigpipe-die, modules/xalloc:
74183         * modules/xmemdup0, modules/xstrtol:
74184         Remove dependency on stdnoreturn.
74186         _Noreturn: Ignore __STDC_VERSION__; observe _MSC_VER.
74187         * build-aux/_Noreturn.h (_Noreturn): Ignore __STDC_VERSION__.
74188         Reparenthesize to avoid GCC warning.
74189         Support Microsoft's syntax.
74190         * m4/gnulib-common.m4 (gl_COMMON_BODY): Likewise.
74192         _Noreturn-tests: remove module
74193         * modules/_Noreturn-tests: Remove.
74194         * modules/stdnoreturn-tests (Files): Remove tests/test-_Noreturn.c.
74195         * tests/test-_Noreturn.c: Remove.
74196         * tests/test-stdnoreturn.c: Merge from the old
74197         tests/test-_Noreturn.c, testing both noreturn and _Noreturn.
74199 2011-07-12  Paul Eggert  <eggert@cs.ucla.edu>
74201         _Noreturn, stdnoreturn, and related modules.
74203         * top/maint.mk: Adjust to new noreturn support.
74204         (gl_extract_significant_defines_): Omit pattern ATTRIBUTE_NORETURN.
74205         (def_sym_regex): Do not remove ATTRIBUTE_NORETURN.
74207         xalloc: use stdnoreturn.h
74208         * lib/xalloc.h: Include <stdnoreturn.h>.
74209         (_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn.
74210         * modules/xalloc (Depends-on): Add stdnoreturn.
74212         xstrtol: use stdnoreturn.h
74213         * lib/xstrtol.h: Include <stdnoreturn.h>.
74214         (_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn.
74215         * modules/xstrtol (Depends-on): Add stdnoreturn.
74217         xmemdup0: use stdnoreturn.h
74218         * lib/xmemdup0.h: Include <stdnoreturn.h>.
74219         (_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn.
74220         * modules/xmemdup0 (Depends-on): Add stdnoreturn.
74222         sigpipe-die: use stdnoreturn.h
74223         * lib/sigpipe-die.h: Include <stdnoreturn.h>.
74224         (_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn.
74225         * modules/sigpipe-die (Depends-on): Add stdnoreturn.
74227         openat: use stdnoreturn.h
74228         * lib/openat.h: Include <stdnoreturn.h>.
74229         (_GL_ATTRIBUTE_NORETURN): Remove; all uses replaced with noreturn.
74230         * modules/openat (Depends-on): Add stdnoreturn.
74232         * lib/openat-die.c (openat_save_fail): Modernize comment.
74234         * lib/xalloc-die.c (xalloc_die): Modernize comment.
74236         * lib/glthread/thread.h: Modernize comment.
74238         obstack: use _Noreturn
74239         * lib/obstack.c (__attribute__): Remove macro.
74240         (print_and_abort): Use _Noreturn.
74242         c-stack: use _Noreturn
74243         * lib/c-stack.c (die, overflow_handler, segv_handler):
74244         Use _Noreturn rather than __attribute__((noreturn)).
74246         argmatch-tests, exclude_tests: use _Noreturn
74247         * tests/test-argmatch.c, tests/test-exclude.c (_GL_ATTRIBUTE_NORETURN):
74248         Remove.
74249         (ARGMATCH_DIE_DECL): Use _Noreturn instead.
74251         stdlib: use _Noreturn
74252         * lib/stdlib.in.h (_GL_ATTRIBUTE_NORETURN): Remove.
74253         (_Exit): Use _Noreturn rather than _GL_ATTRIBUTE_NORETURN.
74254         * modules/stdlib (Depends-on): Add _Noreturn.
74255         (stdlib.h): Depend on $(_NORETURN_H), and copy it in.
74257         stdnoreturn-tests: new module
74258         * modules/stdnoreturn-tests, tests/test-stdnoreturn.c: New files.
74260         stdnoreturn: new module
74261         * MODULES.html.sh (Noreturn <stdnoreturn.h>): New section.
74262         * m4/stdnoreturn.m4, modules/stdnoreturn: New files.
74264         _Noreturn-tests: new module
74265         * modules/_Noreturn-tests, tests/test-_Noreturn.c: New files.
74267         _Noreturn: new module
74268         * MODULES.html.sh (Support for systems lacking draft ISO C 1X):
74269         New section, mentioning it.
74270         * build-aux/_Noreturn.h, modules/_Noreturn: New files.
74272         * m4/gnulib-common.m4 (gl_COMMON_BODY): Add _Noreturn.
74274 2011-07-11  Eric Blake  <eblake@redhat.com>
74276         ffs: new module
74277         * modules/ffs: New file.
74278         * m4/ffs.m4: Likewise.
74279         * lib/ffs.c: Likewise.
74280         * m4/strings_h.m4 (gl_HEADER_STRINGS_H_DEFAULTS): Add default.
74281         * modules/strings (Makefile.am): Substitute witness.
74282         (Depends-on): Add c++defs.
74283         * lib/strings.in.h (ffs): Declare.
74284         * modules/ffs-tests: New test file.
74285         * tests/test-ffs.c: Test new module.
74286         * MODULES.html.sh (Integer arithmetic functions): Mention it.
74287         * doc/posix-functions/ffs.texi (ffs): Likewise.
74289         regex: avoid compiler warning
74290         * lib/regex.c (includes): Include <strings.h>, for use of
74291         strcasecmp in regcomp.c.
74292         Reported by Joachim Schmitz.
74294 2011-07-09  Paul Eggert  <eggert@cs.ucla.edu>
74296         stdint: respect system's intmax_t if INTMAX_MAX
74297         * lib/stdint.in.h (intmax_t, uintmax_t): If the system defines
74298         INTMAX_MAX, assume its intmax_t is OK.  Similarly for and
74299         uintmax_t.  This is for some Mac OS X builds, where intmax_t is
74300         long but int64_t is long long, and where we will clash with the
74301         system intmax_t if we override it.  See
74302         <http://lists.gnu.org/r/bug-gnulib/2011-07/msg00160.html>.
74303         (INTMAX_C, UINTMAX_C): For consistency, respect the system's
74304         INTMAX_C if INTMAX_MAX and INTMAX_C are both defined, and
74305         similarly for UINTMAX_C.
74307 2011-07-08  Bruno Haible  <bruno@clisp.org>
74309         pthread_sigmask tests: Avoid a compiler warning.
74310         * tests/test-pthread_sigmask1.c (main): Complain if system() returns
74311         non-zero.
74313         sigprocmask tests: A better way to avoid a compiler warning.
74314         * tests/test-sigprocmask.c: Don't include "ignore-value.h".
74315         (main): Complain if system() returns non-zero.
74316         * modules/sigprocmask-tests (Depends-on): Remove ignore-value.
74318 2011-07-08  Bruno Haible  <bruno@clisp.org>
74320         pthread_sigmask: Work around IRIX bug.
74321         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Test for the IRIX
74322         bug.
74323         * lib/pthread_sigmask.c (pthread_sigmask): usleep for some time when
74324         there may be unblocked pending signals.
74325         * doc/posix-functions/pthread_sigmask.texi: Mention the IRIX bug.
74327 2011-07-08  Bruno Haible  <bruno@clisp.org>
74329         pthread_sigmask: Work around Cygwin bug.
74330         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Test for the Cygwin
74331         bug.
74332         * lib/pthread_sigmask.c (pthread_sigmask): Fix the return value from
74333         the system's pthread_sigmask function.
74334         * doc/posix-functions/pthread_sigmask.texi: Mention the Cygwin bug.
74336 2011-07-08  Bruno Haible  <bruno@clisp.org>
74338         pthread_sigmask: Work around bug in single-threaded implementation.
74339         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Test for the
74340         FreeBSD, HP-UX, Solaris bug.
74341         (gl_PREREQ_PTHREAD_SIGMASK): New macro.
74342         * lib/pthread_sigmask.c: Include <stddef.h>.
74343         (pthread_sigmask): If HAVE_PTHREAD_SIGMASK, define as a wrapper around
74344         the system's pthread_sigmask function.
74345         * modules/pthread_sigmask (configure.ac): Invoke
74346         gl_PREREQ_PTHREAD_SIGMASK.
74347         * doc/posix-functions/pthread_sigmask.texi: Mention bug on FreeBSD,
74348         HP-UX, Solaris.
74350 2011-07-08  Eric Blake  <eblake@redhat.com>
74352         test-sigprocmask: avoid compiler warning
74353         * modules/sigprocmask-tests (Depends-on): Add ignore-value.
74354         * tests/test-sigprocmask.c (main): Use it to silence warning.
74355         Reported by Jim Meyering.
74357         test-snprintf: avoid compiler warning
74358         * tests/test-snprintf.c (main): Avoid shadowed declaration.
74359         * tests/test-vsnprintf.c (main): Likewise.
74360         Reported by Jim Meyering.
74362 2011-07-08  Bruno Haible  <bruno@clisp.org>
74364         Tests for module 'pthread_sigmask'.
74365         * modules/pthread_sigmask-tests: New file.
74366         * tests/test-pthread_sigmask1.c: New file, based on
74367         tests/test-sigprocmask.c.
74368         * tests/test-pthread_sigmask2.c: New file.
74370 2011-07-08  Jim Meyering  <meyering@redhat.com>
74372         test-getopt.h: avoid warning about an unused variable
74373         * tests/test-getopt.h (test_getopt): Remove unused variable, "c".
74375 2011-07-07  Jim Meyering  <meyering@redhat.com>
74377         maint: reduce list of files exempt from sc_prohibit_leading_TABs
74378         * Makefile (sc_prohibit_leading_TABs): Don't exempt m4/po.m4,
74379         now that it no longer contains leading TABs.
74380         Remove unused "url=FIXME" statement.
74382 2011-07-08  Paul Eggert  <eggert@cs.ucla.edu>
74384         pthread_sigmask: Assume POSIX when not gl_THREADLIB.
74385         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK):
74386         When gl_THREADLIB is not in use, assume that the POSIX sematics
74387         are desired.  This is better for Emacs, which uses POSIX semantics
74388         on GNUish and/or POSIXish platforms, and does not use threads at
74389         all otherwise.
74391         pthread_sigmask: fix typo when testing for libraries
74392         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK):
74393         AC_LINK_IFELSE, not AC_COMPILE_IFELSE.
74395 2011-07-08  Eric Blake  <eblake@redhat.com>
74397         fts: introduce FTS_NOATIME
74398         * lib/fts_.h (FTS_NOATIME): New bit flag.
74399         (FTS_OPTIONMASK): Adjust.
74400         * lib/fts.c (diropen, fts_open, fts_build): Honor it.
74401         (fd_ring_check): Debug code unconditionally uses O_NOATIME.
74403 2011-07-08  Bruno Haible  <bruno@clisp.org>
74405         Tests for module 'thread'.
74406         * modules/thread-tests: New file.
74407         * tests/test-thread_self.c: New file.
74408         * tests/test-thread_create.cc: New file.
74410 2011-07-08  Bruno Haible  <bruno@clisp.org>
74412         thread: Avoid gcc warnings when using gl_thread_self().
74413         * lib/glthread/thread.h (gl_thread_self): Return a pthread_t, not a
74414         'void *'.
74415         (gl_thread_self_pointer): Update.
74417 2011-07-07  Bruno Haible  <bruno@clisp.org>
74419         signal-c++-tests: Check declaration of pthread_sigmask.
74420         * tests/test-signal-c++.cc: Check declaration of pthread_sigmask.
74421         * modules/signal-c++-tests (Makefile.am): Link test-signal-c++ against
74422         $(LIB_PTHREAD_SIGMASK).
74424 2011-07-07  Bruno Haible  <bruno@clisp.org>
74426         pthread_sigmask: Fix link requirements on OSF/1 5.1 and with pth.
74427         * lib/signal.in.h (pthread_sigmask): Override if
74428         REPLACE_PTHREAD_SIGMASK is 1.
74429         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Initialize
74430         REPLACE_PTHREAD_SIGMASK.
74431         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Set also
74432         REPLACE_PTHREAD_SIGMASK. Set and substitute LIB_PTHREAD_SIGMASK.
74433         * modules/signal (Makefile.am): Substitute REPLACE_PTHREAD_SIGMASK.
74434         * modules/pthread_sigmask (Depends-on, configure.ac): Update condition.
74435         (Link): Set to $(LIB_PTHREAD_SIGMASK), not $(LIBMULTITHREAD).
74437 2011-07-07  Bruno Haible  <bruno@clisp.org>
74439         pthread_sigmask: Ensure declaration in <signal.h>.
74440         * lib/signal.in.h: On MacOS X, FreeBSD, OpenBSD, OSF/1, Solaris 2.6,
74441         include <pthread.h>.
74442         * doc/posix-functions/pthread_sigmask.texi: Mention the header file
74443         problem.
74445 2011-07-07  Bruno Haible  <bruno@clisp.org>
74447         pthread_sigmask: Document the module.
74448         * doc/posix-functions/pthread_sigmask.texi: Mention the new module.
74450 2011-07-07  Bruno Haible  <bruno@clisp.org>
74452         pthread_sigmask: Follow gnulib conventions.
74453         * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Renamed from
74454         gl_PTHREAD_SIGMASK.
74455         * modules/pthread_sigmask (configure.ac): Update.
74457 2011-07-07  Bruno Haible  <bruno@clisp.org>
74459         pthread_sigmask: Make declaration C++ safe.
74460         * lib/signal.in.h: In two special conditions, just do an #include_next.
74461         (pthread_sigmask): Test HAVE_PTHREAD_SIGMASK, not REPLACE_PTHREAD_MASK.
74462         Invoke _GL_CXXALIAS_SYS and _GL_CXXALIASWARN.
74463         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Initialize
74464         HAVE_PTHREAD_SIGMASK, not REPLACE_PTHREAD_MASK.
74465         * m4/pthread_sigmask.m4 (gl_PTHREAD_SIGMASK): Set HAVE_PTHREAD_SIGMASK,
74466         not REPLACE_PTHREAD_MASK.
74467         * modules/signal (Makefile.am): Substitute HAVE_PTHREAD_SIGMASK,
74468         not REPLACE_PTHREAD_MASK.
74469         * modules/pthread_sigmask (Depends-on, configure.ac): Update condition.
74471 2011-07-07  Bruno Haible  <bruno@clisp.org>
74473         pthread_sigmask: Fix return value.
74474         * lib/signal.in.h (pthread_sigmask): Declare. Don't define as a macro.
74475         * lib/pthread_sigmask.c: New file.
74476         * modules/pthread_sigmask (Files): Add it.
74477         (configure.ac): Invoke AC_LIBOBJ.
74479 2011-07-07  Eric Blake  <eblake@redhat.com>
74481         getopt: more portable argv creation
74482         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADRS): Rather than casting away
74483         const, use char arrays rather than strings.
74484         Suggested by Paul Eggert.
74486 2011-07-07  Bruno Haible  <bruno@clisp.org>
74488         Tests for module 'sigprocmask'.
74489         * modules/sigprocmask-tests: New file.
74490         * tests/test-sigprocmask.c: New file.
74492 2011-07-07  Bruno Haible  <bruno@clisp.org>
74494         float tests: Tweak.
74495         * tests/test-float.c (main): Tweak skip message.
74497 2011-07-07  Eric Blake  <eblake@redhat.com>
74499         getopt: avoid compiler warning during configure
74500         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADRS): Avoid problems with
74501         assigning string literals to non-const pointer.
74503         getopt-gnu: avoid crash in glibc getopt
74504         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADRS): Detect the problem.
74505         * tests/test-getopt.h (test_getopt): Enhance test.
74506         * tests/test-getopt_long.h (test_getopt_long): Likewise.
74507         * doc/posix-functions/getopt.texi (getopt): Document it.
74508         * doc/glibc-functions/getopt_long.texi (getopt_long): Likewise.
74509         * doc/glibc-functions/getopt_long_only.texi (getopt_long_only):
74510         Likewise.
74512 2011-07-07  Ulrich Drepper  <drepper@gmail.com>
74514         getopt: handle W; without long options in getopt [BZ #12922]
74515         * lib/getopt.c (_getopt_internal_r): When "W;" is in short options
74516         but no long options are defined, just return 'W'.
74518 2011-07-07  Bruno Haible  <bruno@clisp.org>
74520         Avoid literal tabs.
74521         * m4/po,m4 (AM_PO_SUBDIRS, AM_POSTPROCESS_PO_MAKEFILE): Use a shell
74522         variable containing a tab instead of a literal tab.
74523         Reported by Jim Meyering.
74525 2011-07-07  Bruno Haible  <bruno@clisp.org>
74527         Comments.
74528         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Update comments about mingw.
74530 2011-07-06  Bruno Haible  <bruno@clisp.org>
74532         sys_select: Fix compilation error on mingw, introduced on 2011-06-30.
74533         * lib/sys_select.in.h: Don't include <sys/socket.h>. Instead, include
74534         <winsock2.h>.
74535         (rpl_fd_isset, FD_ISSET): New definitions, copied from
74536         lib/sys_socket.in.h.
74537         (close, gethostname): Hide declarations from <winsock2.h>.
74538         (socket, connect, accept, bind, getpeername, getsockname, getsockopt,
74539         listen, recv, send, recvfrom, sendto, setsockopt, shutdown): Likewise.
74540         * lib/sys_socket.in.h (close, gethostname): Tweak indentation.
74541         (select): Don't override if gnulib's <sys/select.h> was already
74542         included.
74543         * lib/unistd.in.h (socket, connect, accept, bind, getpeername,
74544         getsockname, getsockopt, listen, recv, send, recvfrom, sendto,
74545         setsockopt, shutdown, select): Tweak indentation.
74547 2011-07-06  Paul Eggert  <eggert@cs.ucla.edu>
74549         * modules/pthread_sigmask (configure.ac): gl_SIGNAL_MODULE_INDICATOR
74550         and not gl_SYS_SELECT_MODULE_INDICATOR, fixing a typo exposed
74551         in an application that does not use the sys_select module.
74553 2011-07-06  Erik Faye-Lund  <kusmabite@gmail.com>
74555         poll: do not return 0 on timeout=-1
74556         * lib/poll.c: Loop with yield if no events occurred.
74558 2011-07-06  Eric Blake  <eblake@redhat.com>
74560         pthread_sigmask: always replace when not using pthread
74561         * m4/pthread_sigmask.m4 (gl_PTHREAD_SIGMASK): Force sigprocmask
74562         replacement when using some threading other than pthread.  Fix
74563         logic bug.
74565 2011-07-06  Bruno Haible  <bruno@clisp.org>
74567         Comments.
74568         * m4/printf.m4: Update comments about mingw.
74570 2011-07-06  Paul Eggert  <eggert@cs.ucla.edu>
74572         sys_select: define sigset_t more portably
74573         * lib/sys_select.in.h: Always include <sys/types.h>, since
74574         we now need sigset_t and mingw defines it there.
74575         Include <signal.h> before split inclusion guard, to avoid
74576         mishaps on Solaris, whose <signal.h> eventually includes us.
74577         * m4/signal_h.m4 (gl_SIGNAL_H): Require gl_CHECK_TYPE_SIGSET_T.
74578         (gl_CHECK_TYPE_SIGSET_T): New macro, most of the contents of
74579         which come from ...
74580         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Require
74581         gl_CHECK_TYPE_SIGSET_T.
74582         (gl_PREREQ_SIGPROCMASK): Now a no-op, since gl_CHECK_TYPE_SIGSET_T
74583         does the real work.
74584         * modules/sys_select (Depends-on): Add 'signal'.
74586         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Poison pselect.
74587         Suggested by Bruno Haible.
74589         pselect: Use pthread_sigmask, not sigprocmask.
74590         * lib/pselect.c (pselect): Use pthread_sigmask, as it supports
74591         multithreaded apps better than sigprocmask does.
74592         * modules/pselect (Depends-on): Depend on pthread_sigmask, not
74593         sigprocmask directly.
74595 2011-07-05  Paul Eggert  <eggert@cs.ucla.edu>
74597         * lib/pselect.c (pselect): Use plain name, without "rpl_".
74598         Don't #undef,  since we don't need any underlying pselect.
74599         * modules/pselect (configure.ac): Use our pselect.o if !HAVE_PSELECT.
74600         (Depends-on): Add select.
74601         (Link): Add $(LIBSOCKET).
74602         These changes suggested by Bruno Haible.
74604         pselect: document better
74605         * MODULES.html.sh (Support for systems lacking POSIX:2008): Add it.
74606         * doc/posix-functions/pselect.texi (pselect): Document new module.
74608         pthread_sigmask: new module
74609         * MODULES.html.sh (Support for systems lacking POSIX:2008): Add it.
74610         * doc/posix-functions/pthread_sigmask.texi: Document new module.
74611         * lib/signal.in.h (pthread_sigmask): Arrange for replacement.
74612         This is done only as a macro; I don't know how well that'll
74613         work for C++.  Move <sys/types.h> include before the include_next,
74614         to avoid mishap on Solaris.
74615         * m4/signal_h.m4 (gl_SIGNAL_H, gl_SIGNAL_H_DEFAULTS): Check for it.
74616         * modules/signal (Makefile.am): Substitute the check's results.
74617         * modules/pthread_sigmask, m4/pthread_sigmask.m4: New files.
74619         test-pselect: new module
74620         * modules/pselect-tests, tests/test-pselect.c: New files.
74621         * tests/test-select.c, tests/test-sys_select-c++.cc:
74622         If TEST_PSELECT is defined, test pselect instead of testing select.
74624         * tests/test-sys_select.c (sigset_t): Test for it, too.
74625         Suggested by Bruno Haible.
74627 2011-07-05  Eric Blake  <eblake@redhat.com>
74629         snprintf: guarantee %1$d, for libintl
74630         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require %1$d support.
74631         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Likewise.
74632         * doc/posix-functions/snprintf.texi (snprintf): Update.
74633         * doc/posix-functions/vsnprintf.texi (vsnprintf): Likewise.
74634         * tests/test-snprintf.c (main): Enhance test.
74635         * tests/test-vsnprintf.c (main): Likewise.
74637 2011-07-05  Jim Meyering  <meyering@redhat.com>
74639         maint: exempt stdio-read.c and stdio-write.c from the cppi check
74640         * Makefile (sc_cpp_indent_check): Exempt stdio-read.c and stdio-write.c
74641         per Bruno's request, to accommodate this idiom (no space after "#")
74642         even when the function is inside an #if block:
74643         char *
74644         gets (char *s)
74645         #undef gets
74646         {
74647           ...
74648         }
74650 2011-07-04  Jim Meyering  <meyering@redhat.com>
74652         maint: indent with spaces, not TABs, and add a rule to check this
74653         * tests/test-userspec.c: Indent with spaces, not TABs.
74654         * tests/test-argp.c: Likewise.
74655         * tests/test-c-stack2.sh: Likewise.
74656         * tests/test-parse-duration.sh: Likewise
74657         * m4/strtod.m4: Likewise.
74658         * m4/alloca.m4: Likewise.
74659         * m4/pselect.m4: Likewise.
74660         * Makefile (sc_prohibit_leading_TABs): Prohibit leading TABs.
74662 2011-07-03  Jim Meyering  <meyering@redhat.com>
74664         maint.mk: correct omissions in prohibit_argmatch_without_use check
74665         This rule would mistakenly report that argmatch.h is included without
74666         use even when both the argmatch and invalid_arg macro were used.
74667         * top/maint.mk (sc_prohibit_argmatch_without_use): Also detect uses
74668         of argmatch and invalid_arg.
74670 2011-07-03  Bruno Haible  <bruno@clisp.org>
74672         Comments about EINTR.
74673         * lib/safe-read.h: Explain the purpose of this module.
74674         * lib/safe-write.h: Likewise.
74675         * doc/posix-functions/read.texi: Mention EINTR and the 'safe-read'
74676         module.
74677         * doc/posix-functions/write.texi: Mention EINTR and the 'safe-write'
74678         module.
74679         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
74681 2011-06-30  Paul Eggert  <eggert@cs.ucla.edu>
74683         xnanosleep: Rewrite to use new dtotimespec module.
74684         It has the conversion code that used to be in xnanosleep.
74685         * lib/xnanosleep.c: Do not include limits.h, stdbool.h, stdio.h,
74686         assert.h, sys/types.h, or intprops.h.  Include timespec.h instead.
74687         (TIME_T_MAX): Remove.
74688         (xnanosleep): Rewrite in terms of dtotimespec.
74689         * modules/xnanosleep (Depends-on): Add dtotimespec.
74690         Remove intprops, stdbool.
74692         timespec-add, timespec-sub: new modules
74693         * lib/timespec.h (timespec_add, timespec_sub): New decls.
74694         * lib/timespec-add.c, lib/timespec-sub.c:
74695         * modules/timespec-add, modules/timespec-sub: New files.
74697         dtotimespec: new module
74698         * lib/timespec.h (dtotimespec): New decl.
74699         * lib/dtotimespec.c, modules/dtotimespec: New files.
74701         * lib/timespec.h (timespec_sign, timespectod): New inline functions.
74703         pselect: new module
74704         * lib/sys_select.in.h: Include <signal.h>, for 'sigset_t'.
74705         (pselect): New decls.
74706         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Require AC_C_RESTRICT,
74707         since the standard pselect decl uses 'restrict'.
74708         (gl_SYS_SELECT_H_DEFAULTS): Add defaults for GNULIB_PSELECT,
74709         HAVE_PSELECT, REPLACE_PSELECT.
74710         * modules/sys_select (sys/select.h): Substitute GNULIB_PSELECT,
74711         HAVE_PSELECT, REPLACE_PSELECT.
74712         * lib/pselect.c, m4/pselect.m4, modules/pselect: New files.
74714         sys_select: don't depend on sys_socket
74715         This is so that Emacs doesn't have to drag in m4/sockpfaf.m4 etc; see
74716         <http://lists.gnu.org/r/bug-gnulib/2011-06/msg00358.html>.
74717         This fix works on GNU and GNU-like platforms, but has not been tested
74718         on native Windows.
74719         * lib/sys_select.in.h: Include <sys/socket.h> only if native Windows.
74720         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Do not require
74721         gl_HEADER_SYS_SOCKET.
74722         * modules/sys_select (Files): Add m4/sys_socket_h.m4, for
74723         gl_PREREQ_SYS_H_WINSOCK2.
74725 2011-06-29  Eric Blake  <eblake@redhat.com>
74727         pipe2: fix C89 compile problem
74728         * lib/pipe2.c (pipe2): Avoid C99 array initialization.
74729         Reported by Bruno Haible.
74731         pipe, pipe2: don't corrupt fd on error
74732         * lib/pipe.c (pipe): Leave fd unchanged on error.
74733         * lib/pipe2.c (pipe2): Likewise.
74734         * doc/posix-functions/pipe.texi (pipe): Document cygwin issue.
74735         * doc/glibc-functions/pipe2.texi (pipe2): Likewise.
74737 2011-06-27  Paolo Bonzini  <bonzini@gnu.org>
74739         mmap-anon: do not use regular expressions inadvertently
74740         * m4/mmap-anon.m4: Remove trailing period from strings sought
74741         in the output.
74743 2011-06-25  Paul Eggert  <eggert@cs.ucla.edu>
74745         nanosleep: fix integer overflow problem
74746         * lib/nanosleep.c (my_usleep): Don't assume signed integer
74747         arithmetic wraps around on overflow.
74749         nanosleep: simplify carrying
74750         * lib/nanosleep.c (nanosleep): Use the requested tv_nsec for the
74751         first call to the underyling nanosleep, not for the last one.
74752         This doesn't fix any bugs, but it simplifies the computation of
74753         the remaining delay.  Found while auditing integer overflow issues.
74755         dup2: remove test for existence of fcntl
74756         * m4/dup2.m4 (gl_FUNC_DUP2): Use "#ifdef FD_CLOEXEC", not
74757         "#if HAVE_FCNTL", in the configure-time test program.
74758         This removes the need for the AC_CHECK_FUNCS_ONCE([fcntl]),
74759         and therefore speeds up "configure" a bit.  Found while
74760         adding the dup2 module to Emacs.
74762 2011-06-24  Eric Blake  <eblake@redhat.com>
74764         maint.mk: enhance useless header checks
74765         * top/maint.mk (_sc_header_without_use): Check both include
74766         styles.
74767         (sc_prohibit_assert_without_use)
74768         (sc_prohibit_close_stream_without_use)
74769         (sc_prohibit_getopt_without_use)
74770         (sc_prohibit_quotearg_without_use)
74771         (sc_prohibit_quote_without_use)
74772         (sc_prohibit_long_options_without_use)
74773         (sc_prohibit_inttostr_without_use)
74774         (sc_prohibit_ignore_value_without_use)
74775         (sc_prohibit_error_without_use, sc_prohibit_xalloc_without_use)
74776         (sc_prohibit_hash_without_use, sc_prohibit_cloexec_without_use)
74777         (sc_prohibit_posixver_without_use, sc_prohibit_same_without_use)
74778         (sc_prohibit_hash_pjw_without_use)
74779         (sc_prohibit_safe_read_without_use)
74780         (sc_prohibit_argmatch_without_use)
74781         (sc_prohibit_canonicalize_without_use)
74782         (sc_prohibit_root_dev_ino_without_use)
74783         (sc_prohibit_openat_without_use)
74784         (sc_prohibit_c_ctype_without_use)
74785         (sc_prohibit_signal_without_use)
74786         (sc_prohibit_stdio--_without_use)
74787         (sc_prohibit_stdio-safer_without_use)
74788         (sc_prohibit_strings_without_use)
74789         (sc_prohibit_intprops_without_use)
74790         (sc_prohibit_stddef_without_use)
74791         (sc_prohibit_xfreopen_without_use): Update clients.
74793 2011-06-24  Jim Meyering  <meyering@redhat.com>
74795         syntax-check: keep one maint.mk rule in sync with its header
74796         * Makefile (sc_check_sym_list): Add a rule to prevent a repeat
74797         of the bug Eric has just fixed, with today's commit 25e4c2ec.
74798         I prefer to avoid temporary files here, so use <(...), but that
74799         is not supported by /bin/sh, so...
74800         (SHELL): Define to /bin/bash.
74802 2011-06-24  Eric Blake  <eblake@redhat.com>
74804         maint.mk: update sc_prohibit_intprops_without_use
74805         * top/maint.mk (_intprops_names): Match recent changes.
74807 2011-06-24  Bruno Haible  <bruno@clisp.org>
74809         strerror-override: No-op tweak.
74810         * lib/strerror-override.h (strerror_override): Reorder conditions,
74811         for consistency with lib/strerror-override.c.
74813 2011-06-23  Eric Blake  <eblake@redhat.com>
74815         maint.mk: test further PATH_MAX issues
74816         * top/maint.mk (sc_prohibit_path_max_array): Rename...
74817         (sc_prohibit_path_max_allocation): ...and also test alloca.
74818         Suggested by Jim Meyering.
74820 2011-06-22  Eric Blake  <eblake@redhat.com>
74822         maint.mk: add syntax-check to avoid char[PATH_MAX]
74823         * top/maint.mk (sc_prohibit_path_max_array): New rule.
74825         stat: be robust to PATH_MAX definition
74826         * lib/stat.c (rpl_stat): Require reasonable PATH_MAX.
74827         * modules/stat (Depends-on): Add verify.
74829         link: work around IRIX bug
74830         * m4/link.m4 (gl_FUNC_LINK): Expose the bug.
74831         * lib/link.c (rpl_link): Work around it.
74832         * tests/test-link.h (test_link): Enhance test.
74833         * doc/posix-functions/link.texi (link): Document the bug.
74835         getopt: silence clang warning
74836         * lib/getopt.c (_getopt_internal_r): Avoid unlikely NULL
74837         dereference.
74838         Reported by Gustavo Martin Domato.
74840 2011-06-22  Jim Meyering  <meyering@redhat.com>
74842         bootstrap: do not insert a blank line into each .gitignore file
74843         * build-aux/bootstrap (sort_patterns): Filter out blank lines.
74845 2011-06-21  Eric Blake  <eblake@redhat.com>
74847         perror: test for output mismatch
74848         * m4/perror.m4 (gl_FUNC_PERROR): Add test, in order to replace
74849         perror on IRIX.
74851         strerror_r: fix OpenBSD behavior on out-of-range
74852         * lib/strerror_r.c (strerror_r): Always use maximal string.
74853         * doc/posix-functions/strerror_r.texi (strerror_r): Document it.
74855         strerror_r: fix OpenBSD behavior on 0
74856         * lib/strerror-override.c (strerror_override): Also override 0
74857         when needed.
74858         * lib/strerror-override.h (strerror_override): Likewise.
74859         * lib/strerror.c (strerror): Simplify, now that 0 override is done
74860         earlier.
74861         * lib/strerror_r.c (strerror_r): Likewise.
74862         * m4/strerror.m4 (gl_FUNC_STRERROR): Split detection of 0
74863         behavior...
74864         (gl_FUNC_STRERROR_0): ...into new macro.
74865         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Replace strerror_r if 0
74866         is overridden.
74867         (gl_FUNC_STRERROR_R_WORKS): Avoid extra tests if 0 is broken.
74868         * modules/strerror-override (Files): Add strerror.m4.
74869         (configure.ac): Also provide override for 0 when needed.
74870         * doc/posix-functions/strerror.texi (strerror): Document this.
74871         * doc/posix-functions/perror.texi (perror): Likewise.
74873         perror: adjust array size
74874         * modules/perror (Depends-on): Add strerror-override.
74875         * lib/perror.c (perror): Use it to avoid magic number.
74877         strerror-override: reduce size
74878         * lib/strerror-override.c (strerror_override): Use fewer lines.
74880 2011-06-20  Bruno Haible  <bruno@clisp.org>
74882         pathmax: Ensure correct value for PATH_MAX on HP-UX.
74883         * lib/pathmax.h (PATH_MAX) [HP-UX]: Define to 1024.
74885 2011-06-20  Paul Eggert  <eggert@cs.ucla.edu>
74887         alloca: port to compilers that can optimize like GCC 4.6.0
74888         * lib/alloca.c (find_stack_direction): New signature, taken from
74889         Autoconf git.  This works with GCC 4.6.0.  This code should never
74890         be used with GCC 4.6.0 itself, as GCC has alloca, but it might
74891         be used with other compilers that optimize as well as GCC 4.6.0 does.
74892         (alloca): Adjust to new signature.
74893         * m4/alloca.m4 (__AC_LIBOBJ_ALLOCA) [Autoconf version < 2.69]:
74894         New macro, which patches Autoconf in a similar way.
74896         c-stack: stop worrying about stack direction
74897         * lib/c-stack.c (find_stack_direction): Remove.
74898         (segv_handler): Don't worry about stack direction growth, as it's
74899         too much of a pain to configure this correctly, given how compilers
74900         are optimizing-away our stack-growth detection code.  Instead, assume
74901         that any access to just before or just after the stack is OK.
74902         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
74903         Don't require AC_FUNC_ALLOCA; no longer needed.
74905 2011-06-20  Eric Blake  <eblake@redhat.com>
74907         test-stat: don't allocate PATH_MAX bytes
74908         * tests/test-stat.h (test_stat_func): Don't stack-allocate a
74909         PATH_MAX-sized buffer.
74910         * modules/openat-tests (Depends-on): Add getcwd-lgpl, drop pathmax.
74911         * modules/stat-tests (Depends-on): Likewise.
74912         * tests/test-fstatat.c (includes): Drop pathmax.h.
74913         * tests/test-stat.c (includes): Likewise.
74914         Reported by Bruno Haible.
74916 2011-06-20  Bruno Haible  <bruno@clisp.org>
74918         float: Work around <float.h> bugs on FreeBSD/x86, AIX with GCC, IRIX.
74919         * lib/float.in.h: Add workarounds for FreeBSD/x86, AIX with GCC, IRIX.
74920         * lib/float.c: New file.
74921         * m4/float_h.m4 (gl_FLOAT_H): Also handle FreeBSD, AIX, IRIX. Set
74922         REPLACE_FLOAT_LDBL.
74923         * modules/float (Files): Add lib/float.c.
74924         (configure.ac): Invoke AC_LIBOBJ.
74925         * doc/posix-headers/float.texi: Mention problems on FreeBSD, AIX, IRIX.
74927 2011-06-20  Bruno Haible  <bruno@clisp.org>
74929         Tests for module 'float'.
74930         * modules/float-tests: New file.
74931         * tests/test-float.c: New file.
74933 2011-06-19  Bruno Haible  <bruno@clisp.org>
74935         isinf: Coding style.
74936         * lib/isinf.c: Use GNU coding style.
74938 2011-06-19  Bruno Haible  <bruno@clisp.org>
74940         linkat test: Avoid test failure on AIX 7.1.
74941         * tests/test-linkat.c (main): Allow EINVAL as alternate error value.
74942         * tests/test-link.h (test_link): Likewise.
74944 2011-06-19  Bruno Haible  <bruno@clisp.org>
74946         pread test: Avoid test failure on OpenBSD 4.9.
74947         * tests/test-pread.c (main): Allow EFBIG instead of EINBAL.
74949 2011-06-19  Bruno Haible  <bruno@clisp.org>
74951         sprintf-posix: Fix test failure on AIX 7.1.
74952         * m4/printf.m4 (gl_PRINTF_PRECISION): Test against AIX bug.
74953         * doc/posix-functions/dprintf.texi: Mention limited precision problem
74954         on AIX.
74955         * doc/posix-functions/fprintf.texi: Likewise.
74956         * doc/posix-functions/printf.texi: Likewise.
74957         * doc/posix-functions/snprintf.texi: Likewise.
74958         * doc/posix-functions/sprintf.texi: Likewise.
74959         * doc/posix-functions/vdprintf.texi: Likewise.
74960         * doc/posix-functions/vfprintf.texi: Likewise.
74961         * doc/posix-functions/vprintf.texi: Likewise.
74962         * doc/posix-functions/vsnprintf.texi: Likewise.
74963         * doc/posix-functions/vsprintf.texi: Likewise.
74965 2011-06-19  Bruno Haible  <bruno@clisp.org>
74967         roundl-ieee: Fix test failure on AIX 7.1.
74968         * m4/roundl.m4 (gl_FUNC_ROUNDL): Test also the sign of roundl (-0.3L).
74969         * doc/posix-functions/roundl.texi: Mention problem with negative
74970         arguments.
74972 2011-06-19  Bruno Haible  <bruno@clisp.org>
74974         round-ieee: Fix test failures on AIX 7.1 and OSF/1 5.1.
74975         * modules/round-ieee (Depends-on): Add floor-ieee, ceil-ieee.
74976         * doc/posix-functions/round.texi: Mention problem with negative
74977         arguments.
74978         * doc/posix-functions/ceil.texi: Mention problem on OSF/1 5.1.
74980 2011-06-19  Bruno Haible  <bruno@clisp.org>
74982         roundf-ieee: Fix test failures on AIX 7.1 and OSF/1 5.1.
74983         * m4/roundf.m4 (gl_FUNC_ROUNDF): Test also the sign of roundf (-0.3f).
74984         * modules/roundf-ieee (Depends-on): Add floorf-ieee, ceilf-ieee.
74985         * doc/posix-functions/roundf.texi: Mention problem with negative
74986         arguments.
74987         * doc/posix-functions/ceilf.texi: Mention problem on OSF/1 5.1.
74989 2011-06-19  Bruno Haible  <bruno@clisp.org>
74991         ceilf-ieee: Work around bug on MacOS X 10.5.
74992         * doc/posix-functions/ceilf.texi: Mention the MacOS X 10.5 problem.
74994         floor*-ieee, ceil*-ieee, trunc*-ieee, round*-ieee: More robust checks.
74995         * m4/floorf.m4 (gl_FUNC_FLOORF): In the test whether the function is
74996         IEEE compliant, avoid compiler optimizations.
74997         * m4/floor.m4 (gl_FUNC_FLOOR): Likewise.
74998         * m4/ceilf.m4 (gl_FUNC_CEILF): Likewise.
74999         * m4/ceil.m4 (gl_FUNC_CEIL): Likewise.
75000         * m4/ceill.m4 (gl_FUNC_CEILL): Likewise.
75001         * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
75002         * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
75003         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
75004         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
75005         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
75006         * m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise.
75008 2011-06-19  Bruno Haible  <bruno@clisp.org>
75010         ceilf-ieee: Work around bug on AIX 7.1.
75011         * m4/ceilf.m4 (gl_FUNC_CEILF): Test also the sign of ceilf (-0.3f).
75012         * doc/posix-functions/ceilf.texi: Mention the AIX 7.1 problem.
75014 2011-06-19  Bruno Haible  <bruno@clisp.org>
75016         ceil-ieee: Work around bug on AIX 7.1.
75017         * m4/ceil.m4 (gl_FUNC_CEIL): Test also the sign of ceil (-0.3).
75018         * doc/posix-functions/ceil.texi: Mention the AIX 7.1 problem.
75020 2011-06-18  Bruno Haible  <bruno@clisp.org>
75022         fsync test: Avoid test failure on MacOS X and AIX.
75023         * tests/test-fsync.c (fsync): Allow ENOTSUP and EBADF instead of
75024         EINVAL.
75026 2011-06-18  Bruno Haible  <bruno@clisp.org>
75028         openat, fdopendir tests: Fix link errors.
75029         * modules/openat-tests (Depends-on): Add progname.
75030         * modules/fdopendir-tests (Depends-on): Likewise.
75031         * tests/test-fchownat.c: Include progname.h.
75032         (main): Call set_program_name.
75033         * tests/test-fstatat.c: Include progname.h.
75034         (main): Call set_program_name.
75035         * tests/test-mkdirat.c: Include progname.h.
75036         (main): Call set_program_name.
75037         * tests/test-openat.c: Include progname.h.
75038         (main): Call set_program_name.
75039         * tests/test-unlinkat.c: Include progname.h.
75040         (main): Call set_program_name.
75041         * tests/test-fdopendir.c: Include progname.h.
75042         (main): Call set_program_name.
75044 2011-06-18  Bruno Haible  <bruno@clisp.org>
75046         Doc update.
75047         * doc/posix-functions/pthread_attr_getstack.texi: Update info regarding
75048         HP-UX.
75049         * doc/posix-functions/pthread_attr_setstack.texi: Likewise.
75051 2011-06-18  Bruno Haible  <bruno@clisp.org>
75053         getcwd tests: Avoid compilation error on HP-UX 11.31.
75054         * modules/getcwd-tests (Depends-on): Add pathmax.
75055         * tests/test-getcwd.c: Include pathmax.h.
75057 2011-06-18  Bruno Haible  <bruno@clisp.org>
75059         isfinite, isinf: Fix link error on AIX 6 and 7.
75060         * m4/isfinite.m4 (gl_ISFINITE): When determining whether libm is
75061         needed, also test the macro with a 'float' argument.
75062         * m4/isinf.m4 (gl_ISINF): Likewise.
75064 2011-06-18  Bruno Haible  <bruno@clisp.org>
75066         getloadavg: Don't clobber LIBS. Regression from previous commit.
75067         * m4/getloadavg.m4 (gl_PREREQ_GETLOADAVG): Move tests that use
75068         AC_CHECK_LIB from here...
75069         (gl_GETLOADAVG): ... to here, inside the experiment with LIBS.
75070         (gl_GETLOADAVG, gl_PREREQ_GETLOADAVG): Rename gl_have_func to
75071         gl_func_getloadavg_done.
75072         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
75074 2011-06-18  Bruno Haible  <bruno@clisp.org>
75076         clean-temp: Improve documentation.
75077         * lib/clean-temp.h: Explain better how to use this module.
75078         Reported by John Darrington <john@darrington.wattle.id.au>.
75080 2011-06-17  Bruno Haible  <bruno@clisp.org>
75082         pread, pwrite: Avoid cc warning on AIX.
75083         * lib/unistd.in.h (pread): Undefine before defining as a macro.
75084         (pwrite): Likewise.
75086 2011-06-17  Bruno Haible  <bruno@clisp.org>
75088         spawn-pipe tests: Fix link error.
75089         * tests/test-spawn-pipe-child.c: Undefine fprintf.
75090         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
75092 2011-06-17  Bruno Haible  <bruno@clisp.org>
75094         Tests: Remove unnecessary dependency.
75095         * modules/canonicalize-tests (Depends-on): Remove progname.
75096         * modules/chown-tests (Depends-on): Likewise.
75097         * modules/dirname-tests (Depends-on): Likewise.
75098         * modules/fdopendir-tests (Depends-on): Likewise.
75099         * modules/fdutimensat-tests (Depends-on): Likewise.
75100         * modules/hash-tests (Depends-on): Likewise.
75101         * modules/lchown-tests (Depends-on): Likewise.
75102         * modules/linkat-tests (Depends-on): Likewise.
75103         * modules/renameat-tests (Depends-on): Likewise.
75104         * modules/spawn-pipe-tests (Depends-on): Likewise.
75105         * modules/utimensat-tests (Depends-on): Likewise.
75107 2011-06-17  Bruno Haible  <bruno@clisp.org>
75109         spawn-pipe tests: Fix link error.
75110         * tests/test-spawn-pipe-child.c: Undefine fflush.
75112 2011-06-17  Bruno Haible  <bruno@clisp.org>
75114         Fix tests link errors.
75115         * modules/ceil-ieee-tests (Makefile.am): Use CEIL_LIBM, not FLOOR_LIBM.
75116         * modules/chown-tests (Makefile.am): Don't link test-chown with
75117         LIBINTL.
75118         * modules/lchown-tests (Makefile.am): Don't link test-lchown with
75119         LIBINTL.
75120         * modules/utimens-tests (Makefile.am): Don't link test-utimens with
75121         LIBINTL.
75122         * modules/futimens-tests (Makefile.am): Don't link test-futimens with
75123         LIBINTL.
75125 2011-06-16  Bruno Haible  <bruno@clisp.org>
75127         crypto/gc-sha1: Fix recent regression.
75128         * modules/crypto/gc-sha1 (configure.ac): Invoke AC_LIBOBJ here.
75129         * m4/gc-sha1.m4 (gl_GC_SHA1): Don't invoke gl_SHA1.
75131         crypto/gc-md5: Fix recent regression.
75132         * modules/crypto/gc-md5 (configure.ac): Invoke AC_LIBOBJ here.
75134         crypto/gc-md4: Fix recent regression.
75135         * modules/crypto/gc-md4 (configure.ac): Invoke AC_LIBOBJ here.
75136         * m4/md4.m4 (gl_MD4): Ensure the expansion is non-empty.
75138         crypto/gc-arctwo: Fix recent regression.
75139         * modules/crypto/gc-arctwo (configure.ac): Invoke AC_LIBOBJ here.
75140         * m4/arctwo.m4 (gl_ARCTWO): Ensure the expansion is non-empty.
75142         crypto/gc-rijndael: Fix recent regression.
75143         * modules/crypto/gc-rijndael (Files): Remove m4/rijndael.m4.
75144         (configure.ac): Invoke AC_LIBOBJ here.
75145         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Don't invoke gl_RIJNDAEL.
75146         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
75148         crypto/gc-hmac-sha1: Fix recent regression.
75149         * modules/crypto/gc-hmac-sha1 (Files): Remove m4/hmac-sha1.m4.
75150         (configure.ac): Invoke AC_LIBOBJ here.
75151         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Don't invoke gl_HMAC_SHA1.
75152         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
75154         crypto/gc-hmac-md5: Fix recent regression.
75155         * modules/crypto/gc-hmac-md5 (Files): Remove m4/hmac-md5.m4.
75156         (configure.ac): Invoke AC_LIBOBJ here.
75157         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Don't invoke gl_HMAC_MD5.
75158         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
75160         crypto/gc-des: Fix recent regression.
75161         * modules/crypto/gc-des (Files): Remove m4/des.m4.
75162         (configure.ac): Invoke AC_LIBOBJ here.
75163         * m4/gc-des.m4 (gl_GC_DES): Don't invoke gl_DES.
75164         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
75166         crypto/gc-arcfour: Fix recent regression.
75167         * modules/crypto/gc-arcfour (Files): Remove m4/arcfour.m4.
75168         (configure.ac): Invoke AC_LIBOBJ here.
75169         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Don't invoke gl_ARCFOUR.
75170         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
75172 2011-06-16  Paul Eggert  <eggert@cs.ucla.edu>
75174         * m4/lstat.m4 (gl_FUNC_LSTAT): Fix typo in prerequisite.
75175         After the 2011-05-21 change, this macro requires
75176         gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, not
75177         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
75179 2011-06-16  Bruno Haible  <bruno@clisp.org>
75181         fprintftime: Move AC_LIBOBJ invocations to module description.
75182         * m4/fprintftime.m4: Remove file.
75183         * modules/fprintftime (Files): Remove m4/fprintftime.m4.
75184         (configure.ac): Remove gl_FPRINTFTIME call.
75185         (Makefile.am): Augment lib_SOURCES.
75186         Reported by Jim Meyering.
75188 2011-06-16  Bruno Haible  <bruno@clisp.org>
75190         tmpfile-safer: Finish 2011-05-23 commit.
75191         * m4/stdio-safer.m4: Really remove file.
75192         Reported by Jim Meyering.
75194 2011-06-16  Bruno Haible  <bruno@clisp.org>
75196         syntax-check: Fix typo.
75197         * Makefile (allow_AC_LIBOBJ): Mention printf-posix-rpl.m4, not
75198         printf-posix.m4.
75199         Reported by Jim Meyering.
75201 2011-06-13  Jim Meyering  <meyering@redhat.com>
75203         syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy
75204         * Makefile (sc_prohibit_AC_LIBOBJ_in_m4): New rule.
75206 2011-05-23  Bruno Haible  <bruno@clisp.org>
75208         yesno: Move AC_LIBOBJ invocations to module description.
75209         * m4/yesno.m4 (gl_YESNO): Remove AC_LIBOBJ invocation.
75210         * modules/yesno (Makefile.am): Augment lib_SOURCES.
75212 2011-05-23  Bruno Haible  <bruno@clisp.org>
75214         xstrtol: Move AC_LIBOBJ invocations to module description.
75215         * m4/xstrtol.m4 (gl_XSTRTOL): Remove AC_LIBOBJ invocations.
75216         * modules/xstrtol (Makefile.am): Augment lib_SOURCES.
75218 2011-05-23  Bruno Haible  <bruno@clisp.org>
75220         xstrtold: Move AC_LIBOBJ invocations to module description.
75221         * m4/xstrtod.m4 (gl_XSTRTOLD): Remove AC_LIBOBJ invocation.
75222         * modules/xstrtold (Makefile.am): Augment lib_SOURCES.
75224 2011-05-23  Bruno Haible  <bruno@clisp.org>
75226         xstrtod: Move AC_LIBOBJ invocations to module description.
75227         * m4/xstrtod.m4 (gl_XSTRTOD): Remove AC_LIBOBJ invocation.
75228         * modules/xstrtod (Makefile.am): Augment lib_SOURCES.
75230 2011-05-23  Bruno Haible  <bruno@clisp.org>
75232         xnanosleep: Move AC_LIBOBJ invocations to module description.
75233         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove AC_LIBOBJ invocation.
75234         * modules/xnanosleep (Makefile.am): Augment lib_SOURCES.
75236 2011-05-23  Bruno Haible  <bruno@clisp.org>
75238         xgetcwd: Move AC_LIBOBJ invocations to module description.
75239         * m4/xgetcwd.m4 (gl_XGETCWD): Remove AC_LIBOBJ invocation.
75240         * modules/xgetcwd (Makefile.am): Augment lib_SOURCES.
75242 2011-05-23  Bruno Haible  <bruno@clisp.org>
75244         xalloc: Move AC_LIBOBJ invocations to module description.
75245         * m4/xalloc.m4 (gl_XALLOC): Remove AC_LIBOBJ invocation.
75246         * modules/xalloc (Makefile.am): Augment lib_SOURCES.
75248 2011-05-23  Bruno Haible  <bruno@clisp.org>
75250         write-any-file: Move AC_LIBOBJ invocations to module description.
75251         * m4/write-any-file.m4 (gl_WRITE_ANY_FILE): Remove AC_LIBOBJ
75252         invocation.
75253         * modules/write-any-file (Makefile.am): Augment lib_SOURCES.
75255 2011-05-23  Bruno Haible  <bruno@clisp.org>
75257         utimens: Move AC_LIBOBJ invocations to module description.
75258         * m4/utimens.m4 (gl_UTIMENS): Remove AC_LIBOBJ invocation.
75259         * modules/utimens (Makefile.am): Augment lib_SOURCES.
75261 2011-05-23  Bruno Haible  <bruno@clisp.org>
75263         utimecmp: Move AC_LIBOBJ invocations to module description.
75264         * m4/utimecmp.m4 (gl_UTIMECMP): Remove AC_LIBOBJ invocation.
75265         * modules/utimecmp (Makefile.am): Augment lib_SOURCES.
75267 2011-05-23  Bruno Haible  <bruno@clisp.org>
75269         userspec: Move AC_LIBOBJ invocations to module description.
75270         * m4/userspec.m4 (gl_USERSPEC): Remove AC_LIBOBJ invocation.
75271         * modules/userspec (Makefile.am): Augment lib_SOURCES.
75273 2011-05-23  Bruno Haible  <bruno@clisp.org>
75275         unlinkdir: Move AC_LIBOBJ invocations to module description.
75276         * m4/unlinkdir.m4 (gl_UNLINKDIR): Remove AC_LIBOBJ invocation.
75277         * modules/unlinkdir (Makefile.am): Augment lib_SOURCES.
75279 2011-05-23  Bruno Haible  <bruno@clisp.org>
75281         unistd-safer: Move AC_LIBOBJ invocations to module description.
75282         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Remove AC_LIBOBJ invocations.
75283         * modules/unistd-safer (Makefile.am): Augment lib_SOURCES.
75285 2011-05-23  Bruno Haible  <bruno@clisp.org>
75287         tempname: Move AC_LIBOBJ invocations to module description.
75288         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Remove AC_LIBOBJ invocation.
75289         * modules/tempname (Makefile.am): Augment lib_SOURCES.
75291 2011-05-23  Bruno Haible  <bruno@clisp.org>
75293         strftime: Move AC_LIBOBJ invocations to module description.
75294         * m4/strftime.m4 (gl_FUNC_STRFTIME): Remove AC_LIBOBJ invocation.
75295         * modules/strftime (Makefile.am): Augment lib_SOURCES.
75297 2011-05-23  Bruno Haible  <bruno@clisp.org>
75299         stdlib-safer: Move AC_LIBOBJ invocations to module description.
75300         * m4/stdlib-safer.m4: Remove file.
75301         * modules/stdlib-safer (Files): Remove m4/stdlib-safer.m4.
75302         (configure.ac): Remove gl_STDLIB_SAFER call.
75303         (Makefile.am): Augment lib_SOURCES.
75305 2011-05-23  Bruno Haible  <bruno@clisp.org>
75307         tmpfile-safer: Move AC_LIBOBJ invocations to module description.
75308         * m4/stdio-safer.m4: Remove file.
75309         * modules/tmpfile-safer (Files): Remove m4/stdio-safer.m4.
75310         (configure.ac): Remove gl_TMPFILE_SAFER call.
75311         (Makefile.am): Augment lib_SOURCES.
75313 2011-05-23  Bruno Haible  <bruno@clisp.org>
75315         popen-safer: Move AC_LIBOBJ invocations to module description.
75316         * m4/stdio-safer.m4 (gl_POPEN_SAFER): Remove macro.
75317         * modules/popen-safer (Files): Remove m4/stdio-safer.m4.
75318         (configure.ac): Remove gl_POPEN_SAFER call.
75319         (Makefile.am): Augment lib_SOURCES.
75321 2011-05-23  Bruno Haible  <bruno@clisp.org>
75323         freopen-safer: Move AC_LIBOBJ invocations to module description.
75324         * m4/stdio-safer.m4 (gl_FREOPEN_SAFER): Remove macro.
75325         * modules/freopen-safer (Files): Remove m4/stdio-safer.m4.
75326         (configure.ac): Remove gl_FREOPEN_SAFER call.
75327         (Makefile.am): Augment lib_SOURCES.
75329 2011-05-23  Bruno Haible  <bruno@clisp.org>
75331         fopen-safer: Move AC_LIBOBJ invocations to module description.
75332         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove macro.
75333         * modules/fopen-safer (Files): Remove m4/stdio-safer.m4.
75334         (configure.ac): Remove gl_FOPEN_SAFER call.
75335         (Makefile.am): Augment lib_SOURCES.
75337 2011-05-23  Bruno Haible  <bruno@clisp.org>
75339         crypto/sha512: Move AC_LIBOBJ invocations to module description.
75340         * m4/sha512.m4 (gl_SHA512): Remove AC_LIBOBJ invocation.
75341         * modules/crypto/sha512 (Makefile.am): Augment lib_SOURCES.
75343 2011-05-23  Bruno Haible  <bruno@clisp.org>
75345         crypto/sha256: Move AC_LIBOBJ invocations to module description.
75346         * m4/sha256.m4 (gl_SHA256): Remove AC_LIBOBJ invocation.
75347         * modules/crypto/sha256 (Makefile.am): Augment lib_SOURCES.
75349 2011-05-23  Bruno Haible  <bruno@clisp.org>
75351         crypto/sha1: Move AC_LIBOBJ invocations to module description.
75352         * m4/sha1.m4 (gl_SHA1): Remove AC_LIBOBJ invocation.
75353         * modules/crypto/sha1 (Makefile.am): Augment lib_SOURCES.
75355 2011-05-23  Bruno Haible  <bruno@clisp.org>
75357         settime: Move AC_LIBOBJ invocations to module description.
75358         * m4/settime.m4 (gl_SETTIME): Remove AC_LIBOBJ invocation.
75359         * modules/settime (Makefile.am): Augment lib_SOURCES.
75361 2011-05-23  Bruno Haible  <bruno@clisp.org>
75363         savedir: Move AC_LIBOBJ invocations to module description.
75364         * m4/savedir.m4 (gl_SAVEDIR): Remove AC_LIBOBJ invocation.
75365         * modules/savedir (Makefile.am): Augment lib_SOURCES.
75367 2011-05-23  Bruno Haible  <bruno@clisp.org>
75369         save-cwd: Move AC_LIBOBJ invocations to module description.
75370         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove AC_LIBOBJ invocation.
75371         * modules/save-cwd (Makefile.am): Augment lib_SOURCES.
75373 2011-05-23  Bruno Haible  <bruno@clisp.org>
75375         same: Move AC_LIBOBJ invocations to module description.
75376         * m4/same.m4 (gl_SAME): Remove AC_LIBOBJ invocation.
75377         * modules/same (Makefile.am): Augment lib_SOURCES.
75379 2011-05-23  Bruno Haible  <bruno@clisp.org>
75381         safe-write: Move AC_LIBOBJ invocations to module description.
75382         * m4/safe-write.m4 (gl_SAFE_WRITE): Remove macro.
75383         * modules/safe-write (configure.ac): Invoke gl_PREREQ_SAFE_WRITE
75384         instead of gl_SAFE_WRITE.
75385         (Makefile.am): Augment lib_SOURCES.
75387 2011-05-23  Bruno Haible  <bruno@clisp.org>
75389         safe-read: Move AC_LIBOBJ invocations to module description.
75390         * m4/safe-read.m4 (gl_SAFE_READ): Remove macro.
75391         * modules/safe-read (configure.ac): Invoke gl_PREREQ_SAFE_READ instead
75392         of gl_SAFE_READ.
75393         (Makefile.am): Augment lib_SOURCES.
75395 2011-05-23  Bruno Haible  <bruno@clisp.org>
75397         safe-alloc: Move AC_LIBOBJ invocations to module description.
75398         * m4/safe-alloc.m4 (gl_SAFE_ALLOC): Remove AC_LIBOBJ invocation.
75399         * modules/safe-alloc (Makefile.am): Augment lib_SOURCES.
75401 2011-05-23  Bruno Haible  <bruno@clisp.org>
75403         crypto/rijndael: Move AC_LIBOBJ invocations to module description.
75404         * m4/rijndael.m4: Remove file.
75405         * modules/crypto/rijndael (Files): Remove it.
75406         (configure.ac): Remove gl_RIJNDAEL call.
75407         (Makefile.am): Augment lib_SOURCES.
75409 2011-05-23  Bruno Haible  <bruno@clisp.org>
75411         readtokens: Move AC_LIBOBJ invocations to module description.
75412         * m4/readtokens.m4 (gl_READTOKENS): Remove AC_LIBOBJ invocation.
75413         * modules/readtokens (Makefile.am): Augment lib_SOURCES.
75415 2011-05-23  Bruno Haible  <bruno@clisp.org>
75417         read-file: Move AC_LIBOBJ invocations to module description.
75418         * m4/read-file.m4 (gl_FUNC_READ_FILE): Remove macro.
75419         * modules/read-file (configure.ac): Invoke gl_PREREQ_READ_FILE instead
75420         of gl_FUNC_READ_FILE.
75421         (Makefile.am): Augment lib_SOURCES.
75423 2011-05-23  Bruno Haible  <bruno@clisp.org>
75425         quotearg: Move AC_LIBOBJ invocations to module description.
75426         * m4/quotearg.m4 (gl_QUOTEARG): Remove AC_LIBOBJ invocation.
75427         * modules/quotearg (Makefile.am): Augment lib_SOURCES.
75429 2011-05-23  Bruno Haible  <bruno@clisp.org>
75431         quote: Move AC_LIBOBJ invocations to module description.
75432         * m4/quote.m4 (gl_QUOTE): Remove AC_LIBOBJ invocation.
75433         * modules/quote (Makefile.am): Augment lib_SOURCES.
75435 2011-05-23  Bruno Haible  <bruno@clisp.org>
75437         posixver: Move AC_LIBOBJ invocations to module description.
75438         * m4/posixver.m4 (gl_POSIXVER): Remove AC_LIBOBJ invocation.
75439         * modules/posixver (Makefile.am): Augment lib_SOURCES.
75441 2011-05-23  Bruno Haible  <bruno@clisp.org>
75443         posixtm: Move AC_LIBOBJ invocations to module description.
75444         * m4/posixtm.m4 (gl_POSIXTM): Remove AC_LIBOBJ invocation.
75445         * modules/posixtm (Makefile.am): Augment lib_SOURCES.
75447 2011-05-23  Bruno Haible  <bruno@clisp.org>
75449         physmem: Move AC_LIBOBJ invocations to module description.
75450         * m4/physmem.m4 (gl_PHYSMEM): Remove AC_LIBOBJ invocation.
75451         * modules/physmem (Makefile.am): Augment lib_SOURCES.
75453 2011-05-23  Bruno Haible  <bruno@clisp.org>
75455         pagealign_alloc: Move AC_LIBOBJ invocations to module description.
75456         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC): Remove AC_LIBOBJ
75457         invocation.
75458         * modules/pagealign_alloc (Makefile.am): Augment lib_SOURCES.
75460 2011-05-23  Bruno Haible  <bruno@clisp.org>
75462         mpsort: Move AC_LIBOBJ invocations to module description.
75463         * m4/mpsort.m4 (gl_MPSORT): Remove AC_LIBOBJ invocation.
75464         * modules/mpsort (Makefile.am): Augment lib_SOURCES.
75466 2011-05-23  Bruno Haible  <bruno@clisp.org>
75468         modechange: Move AC_LIBOBJ invocations to module description.
75469         * m4/modechange.m4 (gl_MODECHANGE): Remove AC_LIBOBJ invocation.
75470         * modules/modechange (Makefile.am): Augment lib_SOURCES.
75472 2011-05-23  Bruno Haible  <bruno@clisp.org>
75474         mkdir-p: Move AC_LIBOBJ invocations to module description.
75475         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Remove AC_LIBOBJ invocations.
75476         * modules/mkdir-p (Makefile.am): Augment lib_SOURCES.
75478 2011-05-23  Bruno Haible  <bruno@clisp.org>
75480         mkancesdirs: Move AC_LIBOBJ invocations to module description.
75481         * m4/mkancesdirs.m4 (gl_MKANCESDIRS): Remove AC_LIBOBJ invocation.
75482         * modules/mkancesdirs (Makefile.am): Augment lib_SOURCES.
75484 2011-05-23  Bruno Haible  <bruno@clisp.org>
75486         mgetgroups: Move AC_LIBOBJ invocations to module description.
75487         * m4/mgetgroups.m4 (gl_MGETGROUPS): Remove AC_LIBOBJ invocation.
75488         * modules/mgetgroups (Makefile.am): Augment lib_SOURCES.
75490 2011-05-23  Bruno Haible  <bruno@clisp.org>
75492         memxor: Move AC_LIBOBJ invocations to module description.
75493         * m4/memxor.m4 (gl_MEMXOR): Remove AC_LIBOBJ invocation.
75494         * modules/memxor (Makefile.am): Augment lib_SOURCES.
75496 2011-05-23  Bruno Haible  <bruno@clisp.org>
75498         memcoll: Move AC_LIBOBJ invocations to module description.
75499         * m4/memcoll.m4 (gl_MEMCOLL): Remove AC_LIBOBJ invocation.
75500         * modules/memcoll (Makefile.am): Augment lib_SOURCES.
75502 2011-05-23  Bruno Haible  <bruno@clisp.org>
75504         memcasecmp: Move AC_LIBOBJ invocations to module description.
75505         * m4/memcasecmp.m4 (gl_MEMCASECMP): Remove AC_LIBOBJ invocation.
75506         * modules/memcasecmp (Makefile.am): Augment lib_SOURCES.
75508 2011-05-23  Bruno Haible  <bruno@clisp.org>
75510         crypto/md5: Move AC_LIBOBJ invocations to module description.
75511         * m4/md5.m4 (gl_MD5): Remove AC_LIBOBJ invocation.
75512         * modules/crypto/md5 (Makefile.am): Augment lib_SOURCES.
75514 2011-05-23  Bruno Haible  <bruno@clisp.org>
75516         crypto/md4: Move AC_LIBOBJ invocations to module description.
75517         * m4/md4.m4 (gl_MD4): Remove AC_LIBOBJ invocation.
75518         * modules/crypto/md4 (Makefile.am): Augment lib_SOURCES.
75520 2011-05-23  Bruno Haible  <bruno@clisp.org>
75522         crypto/md2: Move AC_LIBOBJ invocations to module description.
75523         * m4/md2.m4: Remove file.
75524         * modules/crypto/md2 (Files): Remove it.
75525         (configure.ac): Remove gl_MD2 call.
75526         (Makefile.am): Augment lib_SOURCES.
75528 2011-05-23  Bruno Haible  <bruno@clisp.org>
75530         long-options: Move AC_LIBOBJ invocations to module description.
75531         * m4/long-options.m4: Remove file.
75532         * modules/long-options (Files): Remove it.
75533         (configure.ac): Remove gl_LONG_OPTIONS call.
75534         (Makefile.am): Augment lib_SOURCES.
75536 2011-05-23  Bruno Haible  <bruno@clisp.org>
75538         i-ring: Move AC_LIBOBJ invocations to module description.
75539         * m4/i-ring.m4 (gl_I_RING): Remove AC_LIBOBJ invocation.
75540         * modules/i-ring (Makefile.am): Augment lib_SOURCES.
75542 2011-05-23  Bruno Haible  <bruno@clisp.org>
75544         idcache: Move AC_LIBOBJ invocations to module description.
75545         * m4/idcache.m4 (gl_IDCACHE): Remove AC_LIBOBJ invocation.
75546         * modules/idcache (Makefile.am): Augment lib_SOURCES.
75548 2011-05-23  Bruno Haible  <bruno@clisp.org>
75550         human: Move AC_LIBOBJ invocations to module description.
75551         * m4/human.m4 (gl_HUMAN): Remove AC_LIBOBJ invocation.
75552         * modules/human (Makefile.am): Augment lib_SOURCES.
75554 2011-05-23  Bruno Haible  <bruno@clisp.org>
75556         crypto/hmac-sha1: Move AC_LIBOBJ invocations to module description.
75557         * m4/hmac-sha1.m4: Remove file.
75558         * modules/crypto/hmac-sha1 (Files): Remove it.
75559         (configure.ac): Remove gl_HMAC_SHA1 call.
75560         (Makefile.am): Augment lib_SOURCES.
75562 2011-05-23  Bruno Haible  <bruno@clisp.org>
75564         crypto/hmac-md5: Move AC_LIBOBJ invocations to module description.
75565         * m4/hmac-md5.m4: Remove file.
75566         * modules/crypto/hmac-md5 (Files): Remove it.
75567         (configure.ac): Remove gl_HMAC_MD5 call.
75568         (Makefile.am): Augment lib_SOURCES.
75570 2011-05-23  Bruno Haible  <bruno@clisp.org>
75572         hash: Move AC_LIBOBJ invocations to module description.
75573         * m4/hash.m4: Remove file.
75574         * modules/hash (Files): Remove it.
75575         (configure.ac): Remove gl_HASH call.
75576         (Makefile.am): Augment lib_SOURCES.
75578 2011-05-23  Bruno Haible  <bruno@clisp.org>
75580         hard-locale: Move AC_LIBOBJ invocations to module description.
75581         * m4/hard-locale.m4 (gl_HARD_LOCALE): Remove AC_LIBOBJ invocation.
75582         * modules/hard-locale (Makefile.am): Augment lib_SOURCES.
75584 2011-05-23  Bruno Haible  <bruno@clisp.org>
75586         getugroups: Move AC_LIBOBJ invocations to module description.
75587         * m4/getugroups.m4 (gl_GETUGROUPS): Remove AC_LIBOBJ invocation.
75588         * modules/getugroups (Makefile.am): Augment lib_SOURCES.
75590 2011-05-23  Bruno Haible  <bruno@clisp.org>
75592         gettime: Move AC_LIBOBJ invocations to module description.
75593         * m4/gettime.m4 (gl_GETTIME): Remove AC_LIBOBJ invocation.
75594         * modules/gettime (Makefile.am): Augment lib_SOURCES.
75596 2011-05-23  Bruno Haible  <bruno@clisp.org>
75598         getndelim2: Move AC_LIBOBJ invocations to module description.
75599         * m4/getndelim2.m4 (gl_GETNDELIM2): Remove AC_LIBOBJ invocation.
75600         * modules/getndelim2 (Makefile.am): Augment lib_SOURCES.
75602 2011-05-23  Bruno Haible  <bruno@clisp.org>
75604         crypto/gc-pbkdf2-sha1: Move AC_LIBOBJ invocations to module description.
75605         * m4/gc-pbkdf2-sha1.m4: Remove file.
75606         * modules/crypto/gc-pbkdf2-sha1 (Files): Remove it.
75607         (configure.ac): Remove gl_GC_PBKDF2_SHA1 call.
75608         (Makefile.am): Augment lib_SOURCES.
75610 2011-05-23  Bruno Haible  <bruno@clisp.org>
75612         fts: Move AC_LIBOBJ invocations to module description.
75613         * m4/fts.m4 (gl_FUNC_FTS_CORE): Move AC_LIBOBJ invocation from here...
75614         * modules/fts (configure.ac): ... to here.
75616 2011-05-23  Bruno Haible  <bruno@clisp.org>
75618         file-type: Move AC_LIBOBJ invocations to module description.
75619         * m4/file-type.m4: Remove file.
75620         * modules/file-type (Files): Remove it.
75621         (configure.ac): Remove gl_FILE_TYPE call.
75622         (Makefile.am): Augment lib_SOURCES.
75624 2011-05-23  Bruno Haible  <bruno@clisp.org>
75626         filenamecat*: Respect rules for use of AC_LIBOBJ.
75627         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT, gl_FILE_NAME_CONCAT_LGPL):
75628         Remove AC_LIBOBJ invocation.
75629         * modules/filenamecat (Makefile.am): Augment lib_SOURCES.
75630         * modules/filenamecat-lgpl (Makefile.am): Augment lib_SOURCES.
75632 2011-05-23  Bruno Haible  <bruno@clisp.org>
75634         filemode: Move AC_LIBOBJ invocations to module description.
75635         * m4/filemode.m4 (gl_FILEMODE): Remove AC_LIBOBJ invocation.
75636         * modules/filemode (Makefile.am): Augment lib_SOURCES.
75638 2011-05-23  Bruno Haible  <bruno@clisp.org>
75640         openat-safer: Move AC_LIBOBJ invocations to module description.
75641         * m4/fcntl-safer.m4 (gl_OPENAT_SAFER): Remove AC_LIBOBJ invocation.
75642         * modules/openat-safer (Makefile.am): Augment lib_SOURCES.
75644 2011-05-23  Bruno Haible  <bruno@clisp.org>
75646         fcntl-safer: Move AC_LIBOBJ invocations to module description.
75647         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove AC_LIBOBJ invocations.
75648         * modules/fcntl-safer (Makefile.am): Augment lib_SOURCES.
75650 2011-05-23  Bruno Haible  <bruno@clisp.org>
75652         exclude: Move AC_LIBOBJ invocations to module description.
75653         * m4/exclude.m4: Remove file.
75654         * modules/exclude (Files): Remove it.
75655         (configure.ac): Remove gl_EXCLUDE call.
75656         (Makefile.am): Augment lib_SOURCES.
75658 2011-05-23  Bruno Haible  <bruno@clisp.org>
75660         dirname*: Respect rules for use of AC_LIBOBJ.
75661         * m4/dirname.m4 (gl_DIRNAME, gl_DIRNAME_LGPL): Remove AC_LIBOBJ
75662         invocations.
75663         * modules/dirname (Makefile.am): Augment lib_SOURCES.
75664         * modules/dirname-lgpl (Makefile.am): Augment lib_SOURCES.
75666 2011-05-23  Bruno Haible  <bruno@clisp.org>
75668         dirent-safer: Move AC_LIBOBJ invocations to module description.
75669         * m4/dirent-safer.m4 (gl_DIRENT_SAFER): Remove AC_LIBOBJ invocation.
75670         * modules/dirent-safer (Makefile.am): Augment lib_SOURCES.
75672 2011-05-23  Bruno Haible  <bruno@clisp.org>
75674         crypto/des: Move AC_LIBOBJ invocations to module description.
75675         * m4/des.m4: Remove file.
75676         * modules/crypto/des (Files): Remove it.
75677         (configure.ac): Remove gl_DES call.
75678         (Makefile.am): Augment lib_SOURCES.
75680 2011-05-23  Bruno Haible  <bruno@clisp.org>
75682         cycle-check: Move AC_LIBOBJ invocations to module description.
75683         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Remove AC_LIBOBJ invocation.
75684         * modules/cycle-check (Makefile.am): Augment lib_SOURCES.
75686 2011-05-23  Bruno Haible  <bruno@clisp.org>
75688         c-strtold: Move AC_LIBOBJ invocations to module description.
75689         * m4/c-strtod.m4 (gl_C_STRTOLD): Remove AC_LIBOBJ invocation.
75690         * modules/c-strtold (Makefile.am): Augment lib_SOURCES.
75692 2011-05-23  Bruno Haible  <bruno@clisp.org>
75694         c-strtod: Move AC_LIBOBJ invocations to module description.
75695         * m4/c-strtod.m4 (gl_C_STRTOD): Remove AC_LIBOBJ invocation.
75696         * modules/c-strtod (Makefile.am): Augment lib_SOURCES.
75698 2011-05-23  Bruno Haible  <bruno@clisp.org>
75700         crc: Move AC_LIBOBJ invocations to module description.
75701         * m4/crc.m4: Remove file.
75702         * modules/crc (Files): Remove it.
75703         (configure.ac): Remove gl_CRC call.
75704         (Makefile.am): Augment lib_SOURCES.
75706 2011-05-23  Bruno Haible  <bruno@clisp.org>
75708         close-stream: Move AC_LIBOBJ invocations to module description.
75709         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove AC_LIBOBJ invocation.
75710         * modules/close-stream (Makefile.am): Augment lib_SOURCES.
75712 2011-05-23  Bruno Haible  <bruno@clisp.org>
75714         closeout: Move AC_LIBOBJ invocations to module description.
75715         * m4/closeout.m4 (gl_CLOSEOUT): Remove AC_LIBOBJ invocation.
75716         * modules/closeout (Makefile.am): Augment lib_SOURCES.
75718 2011-05-23  Bruno Haible  <bruno@clisp.org>
75720         closein: Move AC_LIBOBJ invocations to module description.
75721         * m4/closein.m4 (gl_CLOSEIN): Remove AC_LIBOBJ invocation.
75722         * modules/closein (Makefile.am): Augment lib_SOURCES.
75724 2011-05-23  Bruno Haible  <bruno@clisp.org>
75726         cloexec: Move AC_LIBOBJ invocations to module description.
75727         * m4/cloexec.m4: Remove file.
75728         * modules/cloexec (Files): Remove it.
75729         (configure.ac): Remove gl_CLOEXEC call.
75730         (Makefile.am): Augment lib_SOURCES.
75732 2011-05-23  Bruno Haible  <bruno@clisp.org>
75734         check-version: Move AC_LIBOBJ invocations to module description.
75735         * m4/check-version.m4: Remove file.
75736         * modules/check-version (Files): Remove it.
75737         (configure.ac): Remove gl_CHECK_VERSION call.
75738         (Makefile.am): Augment lib_SOURCES.
75740 2011-05-23  Bruno Haible  <bruno@clisp.org>
75742         chdir-safer: Move AC_LIBOBJ invocations to module description.
75743         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Remove AC_LIBOBJ invocation.
75744         * modules/chdir-safer (Makefile.am): Augment lib_SOURCES.
75746 2011-05-23  Bruno Haible  <bruno@clisp.org>
75748         canonicalize: Move AC_LIBOBJ invocations to module description.
75749         * m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE): Remove
75750         AC_LIBOBJ invocation.
75751         * modules/canonicalize (Makefile.am): Augment lib_SOURCES.
75753 2011-05-23  Bruno Haible  <bruno@clisp.org>
75755         canon-host: Move AC_LIBOBJ invocations to module description.
75756         * m4/canon-host.m4 (gl_CANON_HOST): Remove macro.
75757         * modules/canon-host (configure.ac): Invoke gl_PREREQ_CANON_HOST
75758         instead of gl_CANON_HOST.
75759         (Makefile.am): Augment lib_SOURCES.
75761 2011-05-23  Bruno Haible  <bruno@clisp.org>
75763         backupfile: Move AC_LIBOBJ invocations to module description.
75764         * m4/backupfile.m4 (gl_BACKUPFILE): Remove AC_LIBOBJ invocation.
75765         * modules/backupfile (Makefile.am): Augment lib_SOURCES.
75767 2011-05-23  Bruno Haible  <bruno@clisp.org>
75769         argmatch: Move AC_LIBOBJ invocations to module description.
75770         * m4/argmatch.m4: Remove file.
75771         * modules/argmatch (Files): Remove it.
75772         (configure.ac): Remove gl_ARGMATCH call.
75773         (Makefile.am): Augment lib_SOURCES.
75775 2011-05-23  Bruno Haible  <bruno@clisp.org>
75777         crypto/arctwo: Move AC_LIBOBJ invocations to module description.
75778         * m4/arctwo.m4 (gl_ARCTWO): Remove AC_LIBOBJ invocation.
75779         * modules/crypto/arctwo (Makefile.am): Augment lib_SOURCES.
75781 2011-05-23  Bruno Haible  <bruno@clisp.org>
75783         crypto/arcfour: Move AC_LIBOBJ invocations to module description.
75784         * m4/arcfour.m4: Remove file.
75785         * modules/crypto/arcfour (Files): Remove it.
75786         (configure.ac): Remove gl_ARCFOUR call.
75787         (Makefile.am): Augment lib_SOURCES.
75789 2011-05-22  Bruno Haible  <bruno@clisp.org>
75791         write: Move AC_LIBOBJ invocations to module description.
75792         * m4/write.m4 (gl_FUNC_WRITE): Move AC_LIBOBJ invocation from here...
75793         * modules/write (configure.ac): ... to here.
75795 2011-05-22  Bruno Haible  <bruno@clisp.org>
75797         wmemset: Move AC_LIBOBJ invocations to module description.
75798         * m4/wmemset.m4 (gl_FUNC_WMEMSET): Move AC_LIBOBJ invocation from
75799         here...
75800         * modules/wmemset (configure.ac): ... to here.
75802 2011-05-22  Bruno Haible  <bruno@clisp.org>
75804         wmemmove: Move AC_LIBOBJ invocations to module description.
75805         * m4/wmemmove.m4 (gl_FUNC_WMEMMOVE): Move AC_LIBOBJ invocation from
75806         here...
75807         * modules/wmemmove (configure.ac): ... to here.
75809 2011-05-22  Bruno Haible  <bruno@clisp.org>
75811         wmemcpy: Move AC_LIBOBJ invocations to module description.
75812         * m4/wmemcpy.m4 (gl_FUNC_WMEMCPY): Move AC_LIBOBJ invocation from
75813         here...
75814         * modules/wmemcpy (configure.ac): ... to here.
75816 2011-05-22  Bruno Haible  <bruno@clisp.org>
75818         wmemcmp: Move AC_LIBOBJ invocations to module description.
75819         * m4/wmemcmp.m4 (gl_FUNC_WMEMCMP): Move AC_LIBOBJ invocation from
75820         here...
75821         * modules/wmemcmp (configure.ac): ... to here.
75823 2011-05-22  Bruno Haible  <bruno@clisp.org>
75825         wmemchr: Move AC_LIBOBJ invocations to module description.
75826         * m4/wmemchr.m4 (gl_FUNC_WMEMCHR): Move AC_LIBOBJ invocation from
75827         here...
75828         * modules/wmemchr (configure.ac): ... to here.
75830 2011-05-22  Bruno Haible  <bruno@clisp.org>
75832         wcswidth: Move AC_LIBOBJ invocations to module description.
75833         * m4/wcswidth.m4 (gl_FUNC_WCSWIDTH): Move AC_LIBOBJ invocation from
75834         here...
75835         * modules/wcswidth (configure.ac): ... to here.
75837 2011-05-22  Bruno Haible  <bruno@clisp.org>
75839         wcwidth: Respect rules for use of AC_LIBOBJ.
75840         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Set HAVE_WCWIDTH. Move AC_LIBOBJ
75841         invocation from here...
75842         * modules/wcwidth (configure.ac): ... to here.
75843         (Depends-on): Update conditions.
75845 2011-05-22  Bruno Haible  <bruno@clisp.org>
75847         wctype: Move AC_LIBOBJ invocations to module description.
75848         * m4/wctype.m4 (gl_FUNC_WCTYPE): Set HAVE_WCTYPE. Move AC_LIBOBJ
75849         invocation from here...
75850         * modules/wctype (configure.ac): ... to here.
75851         (Depends-on): Update conditions.
75853 2011-05-22  Bruno Haible  <bruno@clisp.org>
75855         wctrans: Move AC_LIBOBJ invocations to module description.
75856         * m4/wctrans.m4 (gl_FUNC_WCTRANS): Set HAVE_WCTRANS. Move AC_LIBOBJ
75857         invocation from here...
75858         * modules/wctrans (configure.ac): ... to here.
75860 2011-05-22  Bruno Haible  <bruno@clisp.org>
75862         wctomb: Move AC_LIBOBJ invocations to module description.
75863         * m4/wctomb.m4 (gl_FUNC_WCTOMB): Move AC_LIBOBJ and gl_PREREQ_WCTOMB
75864         invocations from here...
75865         * modules/wctomb (configure.ac): ... to here.
75867 2011-05-22  Bruno Haible  <bruno@clisp.org>
75869         wctob: Move AC_LIBOBJ invocations to module description.
75870         * m4/wctob.m4 (gl_FUNC_WCTOB): Set HAVE_WCTOB. Move AC_LIBOBJ and
75871         gl_PREREQ_WCTOB invocations from here...
75872         * modules/wctob (configure.ac): ... to here.
75873         (Depends-on): Update conditions.
75875 2011-05-22  Bruno Haible  <bruno@clisp.org>
75877         wcsxfrm: Move AC_LIBOBJ invocations to module description.
75878         * m4/wcsxfrm.m4 (gl_FUNC_WCSXFRM): Move AC_LIBOBJ invocation from
75879         here...
75880         * modules/wcsxfrm (configure.ac): ... to here.
75882 2011-05-22  Bruno Haible  <bruno@clisp.org>
75884         wcstok: Move AC_LIBOBJ invocations to module description.
75885         * m4/wcstok.m4 (gl_FUNC_WCSTOK): Move AC_LIBOBJ invocation from here...
75886         * modules/wcstok (configure.ac): ... to here.
75888 2011-05-22  Bruno Haible  <bruno@clisp.org>
75890         wcsstr: Move AC_LIBOBJ invocations to module description.
75891         * m4/wcsstr.m4 (gl_FUNC_WCSSTR): Move AC_LIBOBJ invocation from here...
75892         * modules/wcsstr (configure.ac): ... to here.
75894 2011-05-22  Bruno Haible  <bruno@clisp.org>
75896         wcsspn: Move AC_LIBOBJ invocations to module description.
75897         * m4/wcsspn.m4 (gl_FUNC_WCSSPN): Move AC_LIBOBJ invocation from here...
75898         * modules/wcsspn (configure.ac): ... to here.
75900 2011-05-22  Bruno Haible  <bruno@clisp.org>
75902         wcsrtombs: Move AC_LIBOBJ invocations to module description.
75903         * m4/wcsrtombs.m4 (gl_FUNC_WCSRTOMBS): Move AC_LIBOBJ and
75904         gl_PREREQ_WCSRTOMBS invocations from here...
75905         * modules/wcsrtombs (configure.ac): ... to here.
75907 2011-05-22  Bruno Haible  <bruno@clisp.org>
75909         wcsrchr: Move AC_LIBOBJ invocations to module description.
75910         * m4/wcsrchr.m4 (gl_FUNC_WCSRCHR): Move AC_LIBOBJ invocation from
75911         here...
75912         * modules/wcsrchr (configure.ac): ... to here.
75914 2011-05-22  Bruno Haible  <bruno@clisp.org>
75916         wcspbrk: Move AC_LIBOBJ invocations to module description.
75917         * m4/wcspbrk.m4 (gl_FUNC_WCSPBRK): Move AC_LIBOBJ invocation from
75918         here...
75919         * modules/wcspbrk (configure.ac): ... to here.
75921 2011-05-22  Bruno Haible  <bruno@clisp.org>
75923         wcsnrtombs: Move AC_LIBOBJ invocations to module description.
75924         * m4/wcsnrtombs.m4 (gl_FUNC_WCSNRTOMBS): Move AC_LIBOBJ and
75925         gl_PREREQ_WCSNRTOMBS invocations from here...
75926         * modules/wcsnrtombs (configure.ac): ... to here.
75928 2011-05-22  Bruno Haible  <bruno@clisp.org>
75930         wcsnlen: Move AC_LIBOBJ invocations to module description.
75931         * m4/wcsnlen.m4 (gl_FUNC_WCSNLEN): Move AC_LIBOBJ invocation from
75932         here...
75933         * modules/wcsnlen (configure.ac): ... to here.
75935 2011-05-22  Bruno Haible  <bruno@clisp.org>
75937         wcsncpy: Move AC_LIBOBJ invocations to module description.
75938         * m4/wcsncpy.m4 (gl_FUNC_WCSNCPY): Move AC_LIBOBJ invocation from
75939         here...
75940         * modules/wcsncpy (configure.ac): ... to here.
75942 2011-05-22  Bruno Haible  <bruno@clisp.org>
75944         wcsncmp: Move AC_LIBOBJ invocations to module description.
75945         * m4/wcsncmp.m4 (gl_FUNC_WCSNCMP): Move AC_LIBOBJ invocation from
75946         here...
75947         * modules/wcsncmp (configure.ac): ... to here.
75949 2011-05-22  Bruno Haible  <bruno@clisp.org>
75951         wcsncat: Move AC_LIBOBJ invocations to module description.
75952         * m4/wcsncat.m4 (gl_FUNC_WCSNCAT): Move AC_LIBOBJ invocation from
75953         here...
75954         * modules/wcsncat (configure.ac): ... to here.
75956 2011-05-22  Bruno Haible  <bruno@clisp.org>
75958         wcsncasecmp: Move AC_LIBOBJ invocations to module description.
75959         * m4/wcsncasecmp.m4 (gl_FUNC_WCSNCASECMP): Move AC_LIBOBJ invocation
75960         from here...
75961         * modules/wcsncasecmp (configure.ac): ... to here.
75963 2011-05-22  Bruno Haible  <bruno@clisp.org>
75965         wcslen: Move AC_LIBOBJ invocations to module description.
75966         * m4/wcslen.m4 (gl_FUNC_WCSLEN): Move AC_LIBOBJ invocation from here...
75967         * modules/wcslen (configure.ac): ... to here.
75969 2011-05-22  Bruno Haible  <bruno@clisp.org>
75971         wcsdup: Move AC_LIBOBJ invocations to module description.
75972         * m4/wcsdup.m4 (gl_FUNC_WCSDUP): Move AC_LIBOBJ invocation from here...
75973         * modules/wcsdup (configure.ac): ... to here.
75975 2011-05-22  Bruno Haible  <bruno@clisp.org>
75977         wcscspn: Move AC_LIBOBJ invocations to module description.
75978         * m4/wcscspn.m4 (gl_FUNC_WCSCSPN): Move AC_LIBOBJ invocation from
75979         here...
75980         * modules/wcscspn (configure.ac): ... to here.
75982 2011-05-22  Bruno Haible  <bruno@clisp.org>
75984         wcscpy: Move AC_LIBOBJ invocations to module description.
75985         * m4/wcscpy.m4 (gl_FUNC_WCSCPY): Move AC_LIBOBJ invocation from here...
75986         * modules/wcscpy (configure.ac): ... to here.
75988 2011-05-22  Bruno Haible  <bruno@clisp.org>
75990         wcscoll: Move AC_LIBOBJ invocations to module description.
75991         * m4/wcscoll.m4 (gl_FUNC_WCSCOLL): Move AC_LIBOBJ invocation from
75992         here...
75993         * modules/wcscoll (configure.ac): ... to here.
75995 2011-05-22  Bruno Haible  <bruno@clisp.org>
75997         wcscmp: Move AC_LIBOBJ invocations to module description.
75998         * m4/wcscmp.m4 (gl_FUNC_WCSCMP): Move AC_LIBOBJ invocation from here...
75999         * modules/wcscmp (configure.ac): ... to here.
76001 2011-05-22  Bruno Haible  <bruno@clisp.org>
76003         wcschr: Move AC_LIBOBJ invocations to module description.
76004         * m4/wcschr.m4 (gl_FUNC_WCSCHR): Move AC_LIBOBJ invocation from here...
76005         * modules/wcschr (configure.ac): ... to here.
76007 2011-05-22  Bruno Haible  <bruno@clisp.org>
76009         wcscat: Move AC_LIBOBJ invocations to module description.
76010         * m4/wcscat.m4 (gl_FUNC_WCSCAT): Move AC_LIBOBJ invocation from here...
76011         * modules/wcscat (configure.ac): ... to here.
76013 2011-05-22  Bruno Haible  <bruno@clisp.org>
76015         wcscasecmp: Move AC_LIBOBJ invocations to module description.
76016         * m4/wcscasecmp.m4 (gl_FUNC_WCSCASECMP): Move AC_LIBOBJ invocation from
76017         here...
76018         * modules/wcscasecmp (configure.ac): ... to here.
76020 2011-05-22  Bruno Haible  <bruno@clisp.org>
76022         wcrtomb: Move AC_LIBOBJ invocations to module description.
76023         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Move AC_LIBOBJ and gl_PREREQ_WCRTOMB
76024         invocations from here...
76025         * modules/wcrtomb (configure.ac): ... to here.
76027 2011-05-22  Bruno Haible  <bruno@clisp.org>
76029         wcpncpy: Move AC_LIBOBJ invocations to module description.
76030         * m4/wcpncpy.m4 (gl_FUNC_WCPNCPY): Move AC_LIBOBJ invocation from
76031         here...
76032         * modules/wcpncpy (configure.ac): ... to here.
76034 2011-05-22  Bruno Haible  <bruno@clisp.org>
76036         wcpcpy: Move AC_LIBOBJ invocations to module description.
76037         * m4/wcpcpy.m4 (gl_FUNC_WCPCPY): Move AC_LIBOBJ invocation from here...
76038         * modules/wcpcpy (configure.ac): ... to here.
76040 2011-05-22  Bruno Haible  <bruno@clisp.org>
76042         waitpid: Move AC_LIBOBJ invocations to module description.
76043         * m4/waitpid.m4 (gl_FUNC_WAITPID): Set HAVE_WAITPID. Move AC_LIBOBJ
76044         invocation from here...
76045         * modules/waitpid (configure.ac): ... to here.
76047 2011-05-22  Bruno Haible  <bruno@clisp.org>
76049         utimensat: Move AC_LIBOBJ invocations to module description.
76050         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Move AC_LIBOBJ invocations from
76051         here...
76052         * modules/utimensat (configure.ac): ... to here.
76054 2011-05-22  Bruno Haible  <bruno@clisp.org>
76056         usleep: Move AC_LIBOBJ invocations to module description.
76057         * m4/usleep.m4 (gl_FUNC_USLEEP): Move AC_LIBOBJ invocations from
76058         here...
76059         * modules/usleep (configure.ac): ... to here.
76061 2011-05-22  Bruno Haible  <bruno@clisp.org>
76063         unlockpt: Move AC_LIBOBJ invocations to module description.
76064         * m4/unlockpt.m4 (gl_FUNC_UNLOCKPT): Move AC_LIBOBJ and
76065         gl_PREREQ_UNLOCKPT invocations from here...
76066         * modules/unlockpt (configure.ac): ... to here.
76068 2011-05-22  Bruno Haible  <bruno@clisp.org>
76070         unlink: Respect rules for use of AC_LIBOBJ.
76071         * m4/unlink.m4 (gl_FUNC_UNLINK): Move AC_LIBOBJ invocation from here...
76072         * modules/unlink (configure.ac): ... to here.
76074 2011-05-22  Bruno Haible  <bruno@clisp.org>
76076         uname: Move AC_LIBOBJ invocations to module description.
76077         * m4/uname.m4 (gl_FUNC_UNAME): Call AC_CHECK_FUNCS instead of
76078         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_UNAME invocations from
76079         here...
76080         * modules/uname (configure.ac): ... to here.
76082 2011-05-22  Bruno Haible  <bruno@clisp.org>
76084         ttyname_r: Move AC_LIBOBJ invocations to module description.
76085         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Move AC_LIBOBJ and
76086         gl_PREREQ_TTYNAME_R invocations from here...
76087         * modules/ttyname_r (configure.ac): ... to here.
76089 2011-05-22  Bruno Haible  <bruno@clisp.org>
76091         tsearch: Move AC_LIBOBJ invocations to module description.
76092         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Move AC_LIBOBJ and gl_PREREQ_TSEARCH
76093         invocations from here...
76094         * modules/tsearch (configure.ac): ... to here.
76096 2011-05-22  Bruno Haible  <bruno@clisp.org>
76098         towctrans: Move AC_LIBOBJ invocations to module description.
76099         * m4/towctrans.m4 (gl_FUNC_TOWCTRANS): Set HAVE_TOWCTRANS. Move
76100         AC_LIBOBJ invocation from here...
76101         * modules/towctrans (configure.ac): ... to here.
76103 2011-05-22  Bruno Haible  <bruno@clisp.org>
76105         tmpfile: Move AC_LIBOBJ invocations to module description.
76106         * m4/tmpfile.m4 (gl_FUNC_TMPFILE): Move AC_LIBOBJ and gl_PREREQ_TMPFILE
76107         invocations from here...
76108         * modules/tmpfile (configure.ac): ... to here.
76110 2011-05-22  Bruno Haible  <bruno@clisp.org>
76112         times: Move AC_LIBOBJ invocations to module description.
76113         * m4/times.m4 (gl_FUNC_TIMES): Move AC_LIBOBJ invocation from here...
76114         * modules/times (configure.ac): ... to here.
76116 2011-05-22  Bruno Haible  <bruno@clisp.org>
76118         time_r: Move AC_LIBOBJ invocations to module description.
76119         * m4/time_r.m4 (gl_TIME_R): Move AC_LIBOBJ and gl_PREREQ_TIME_R
76120         invocations from here...
76121         * modules/time_r (configure.ac): ... to here.
76123 2011-05-22  Bruno Haible  <bruno@clisp.org>
76125         timegm: Move AC_LIBOBJ invocations to module description.
76126         * m4/timegm.m4 (gl_FUNC_TIMEGM): Move AC_LIBOBJ and gl_PREREQ_TIMEGM
76127         invocations from here...
76128         * modules/timegm (configure.ac): ... to here.
76130 2011-05-22  Bruno Haible  <bruno@clisp.org>
76132         tcgetsid: Move AC_LIBOBJ invocations to module description.
76133         * m4/tcgetsid.m4 (gl_FUNC_TCGETSID): Set HAVE_TCGETSID. Move AC_LIBOBJ
76134         and gl_PREREQ_TCGETSID invocations from here...
76135         * modules/tcgetsid (configure.ac): ... to here.
76136         (Depends-on): Update conditions.
76138 2011-05-22  Bruno Haible  <bruno@clisp.org>
76140         symlinkat: Move AC_LIBOBJ invocations to module description.
76141         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Move AC_LIBOBJ invocation from
76142         here...
76143         * modules/symlinkat (configure.ac): ... to here.
76145 2011-05-22  Bruno Haible  <bruno@clisp.org>
76147         symlink: Move AC_LIBOBJ invocations to module description.
76148         * m4/symlink.m4 (gl_FUNC_SYMLINK): Move AC_LIBOBJ invocations from
76149         here...
76150         * modules/symlink (configure.ac): ... to here.
76152 2011-05-22  Bruno Haible  <bruno@clisp.org>
76154         strverscmp: Move AC_LIBOBJ invocations to module description.
76155         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP): Call AC_CHECK_FUNCS instead of
76156         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRVERSCMP invocations
76157         from here...
76158         * modules/strverscmp (configure.ac): ... to here.
76160 2011-05-22  Bruno Haible  <bruno@clisp.org>
76162         strtok_r: Move AC_LIBOBJ invocations to module description.
76163         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_STRTOK_R. Move AC_LIBOBJ
76164         and gl_PREREQ_STRTOK_R invocations from here...
76165         * modules/strtok_r (configure.ac): ... to here.
76166         (Depends-on): Update conditions.
76168 2011-05-22  Bruno Haible  <bruno@clisp.org>
76170         strtoumax: Move AC_LIBOBJ invocations to module description.
76171         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Call AC_CHECK_FUNCS instead of
76172         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRTOUMAX invocations
76173         from here...
76174         * modules/strtoumax (configure.ac): ... to here.
76176 2011-05-22  Bruno Haible  <bruno@clisp.org>
76178         strtoimax: Move AC_LIBOBJ invocations to module description.
76179         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Call AC_CHECK_FUNCS instead of
76180         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRTOIMAX invocations
76181         from here...
76182         * modules/strtoimax (configure.ac): ... to here.
76184 2011-05-22  Bruno Haible  <bruno@clisp.org>
76186         strtoull: Move AC_LIBOBJ invocations to module description.
76187         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Call AC_CHECK_FUNCS instead of
76188         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRTOULL invocations
76189         from here...
76190         * modules/strtoull (configure.ac): ... to here.
76192 2011-05-22  Bruno Haible  <bruno@clisp.org>
76194         strtoll: Move AC_LIBOBJ invocations to module description.
76195         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Call AC_CHECK_FUNCS instead of
76196         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRTOLL invocations from
76197         here...
76198         * modules/strtoll (configure.ac): ... to here.
76200 2011-05-22  Bruno Haible  <bruno@clisp.org>
76202         strtoul: Move AC_LIBOBJ invocations to module description.
76203         * m4/strtoul.m4 (gl_FUNC_STRTOUL): Call AC_CHECK_FUNCS instead of
76204         AC_REPLACE_FUNCS. Move AC_LIBOBJ invocation from here...
76205         * modules/strtoul (configure.ac): ... to here.
76207 2011-05-22  Bruno Haible  <bruno@clisp.org>
76209         strtol: Move AC_LIBOBJ invocations to module description.
76210         * m4/strtol.m4 (gl_FUNC_STRTOL): Call AC_CHECK_FUNCS instead of
76211         AC_REPLACE_FUNCS. Move AC_LIBOBJ invocation from here...
76212         * modules/strtol (configure.ac): ... to here.
76214 2011-05-22  Bruno Haible  <bruno@clisp.org>
76216         strtod: Move AC_LIBOBJ invocations to module description.
76217         * m4/strtod.m4 (gl_FUNC_STRTOD): Move AC_LIBOBJ and gl_PREREQ_STRTOD
76218         invocations from here...
76219         * modules/strtod (configure.ac): ... to here.
76221 2011-05-22  Bruno Haible  <bruno@clisp.org>
76223         strstr*: Move AC_LIBOBJ invocations to module description.
76224         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE, gl_FUNC_STRSTR): Move AC_LIBOBJ
76225         invocations from here...
76226         * modules/strstr-simple (configure.ac): ... to here.
76227         * modules/strstr (configure.ac): ... and here.
76229 2011-05-22  Bruno Haible  <bruno@clisp.org>
76231         strsignal: Move AC_LIBOBJ invocations to module description.
76232         * m4/strsignal.m4 (gl_FUNC_STRSIGNAL): Set HAVE_STRSIGNAL. Move
76233         AC_LIBOBJ and gl_PREREQ_STRSIGNAL invocations from here...
76234         * modules/strsignal (configure.ac): ... to here.
76235         (Depends-on): Update conditions.
76237 2011-05-22  Bruno Haible  <bruno@clisp.org>
76239         strsep: Move AC_LIBOBJ invocations to module description.
76240         * m4/strsep.m4 (gl_FUNC_STRSEP): Call AC_CHECK_FUNCS instead of
76241         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRSEP invocations from
76242         here...
76243         * modules/strsep (configure.ac): ... to here.
76245 2011-05-22  Bruno Haible  <bruno@clisp.org>
76247         strptime: Move AC_LIBOBJ invocations to module description.
76248         * m4/strptime.m4 (gl_FUNC_STRPTIME): Move AC_LIBOBJ and
76249         gl_PREREQ_STRPTIME invocations from here...
76250         * modules/strptime (configure.ac): ... to here.
76252 2011-05-22  Bruno Haible  <bruno@clisp.org>
76254         strpbrk: Move AC_LIBOBJ invocations to module description.
76255         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Call AC_CHECK_FUNCS instead of
76256         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRPBRK invocations from
76257         here...
76258         * modules/strpbrk (configure.ac): ... to here.
76260 2011-05-22  Bruno Haible  <bruno@clisp.org>
76262         strnlen: Move AC_LIBOBJ invocations to module description.
76263         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Move AC_LIBOBJ and gl_PREREQ_STRNLEN
76264         invocations from here...
76265         * modules/strnlen (configure.ac): ... to here.
76267 2011-05-22  Bruno Haible  <bruno@clisp.org>
76269         strndup: Move AC_LIBOBJ invocations to module description.
76270         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_STRNDUP. Move AC_LIBOBJ
76271         invocations from here...
76272         * modules/strndup (configure.ac): ... to here.
76273         (Depends-on): Update conditions.
76275 2011-05-22  Bruno Haible  <bruno@clisp.org>
76277         strncat: Move AC_LIBOBJ invocations to module description.
76278         * m4/strncat.m4 (gl_FUNC_STRNCAT): Move AC_LIBOBJ and gl_PREREQ_STRNCAT
76279         invocations from here...
76280         * modules/strncat (configure.ac): ... to here.
76282 2011-05-22  Bruno Haible  <bruno@clisp.org>
76284         strdup, strdup-posix: Move AC_LIBOBJ invocations to module description.
76285         * m4/strdup.m4 (gl_FUNC_STRDUP): Move AC_LIBOBJ and gl_PREREQ_STRDUP
76286         invocations from here...
76287         * modules/strdup (configure.ac): ... to here.
76288         * modules/strdup-posix (configure.ac): ... and here.
76290 2011-05-22  Bruno Haible  <bruno@clisp.org>
76292         strcspn: Move AC_LIBOBJ invocations to module description.
76293         * m4/strcspn.m4 (gl_FUNC_STRCSPN): Call AC_CHECK_FUNCS instead of
76294         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRCSPN invocations from
76295         here...
76296         * modules/strcspn (configure.ac): ... to here.
76298 2011-05-22  Bruno Haible  <bruno@clisp.org>
76300         strchrnul: Move AC_LIBOBJ invocations to module description.
76301         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Move AC_LIBOBJ and
76302         gl_PREREQ_STRCHRNUL invocations from here...
76303         * modules/strchrnul (configure.ac): ... to here.
76305 2011-05-22  Bruno Haible  <bruno@clisp.org>
76307         strcasestr*: Move AC_LIBOBJ invocations to module description.
76308         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE, gl_FUNC_STRCASESTR):
76309         Move AC_LIBOBJ and gl_PREREQ_STRCASESTR invocations from here...
76310         * modules/strcasestr-simple (configure.ac): ... to here.
76311         * modules/strcasestr (configure.ac): ... and here.
76313 2011-05-22  Bruno Haible  <bruno@clisp.org>
76315         strcase: Move AC_LIBOBJ invocations to module description.
76316         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Set HAVE_STRNCASECMP.
76317         (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Call AC_CHECK_FUNCS instead
76318         of AC_REPLACE_FUNCS. Move AC_LIBOBJ, gl_PREREQ_STRCASECMP,
76319         gl_PREREQ_STRNCASECMP invocations from here...
76320         * modules/strcase (configure.ac): ... to here.
76322 2011-05-22  Bruno Haible  <bruno@clisp.org>
76324         stpncpy: Move AC_LIBOBJ invocations to module description.
76325         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Move AC_LIBOBJ invocations from
76326         here...
76327         * modules/stpncpy (configure.ac): ... to here.
76329 2011-05-22  Bruno Haible  <bruno@clisp.org>
76331         stpcpy: Move AC_LIBOBJ invocations to module description.
76332         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Call AC_CHECK_FUNCS instead of
76333         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STPCPY invocations from
76334         here...
76335         * modules/stpcpy (configure.ac): ... to here.
76337 2011-05-21  Bruno Haible  <bruno@clisp.org>
76339         stat: Move AC_LIBOBJ invocations to module description.
76340         * m4/stat.m4 (gl_PREREQ_STAT): New macro, extracted from gl_FUNC_STAT.
76341         (gl_FUNC_STAT): Move AC_LIBOBJ and gl_PREREQ_STAT invocations from
76342         here...
76343         * modules/stat (configure.ac): ... to here.
76345 2011-05-21  Bruno Haible  <bruno@clisp.org>
76347         sleep: Move AC_LIBOBJ invocations to module description.
76348         * m4/sleep.m4 (gl_FUNC_SLEEP): Move AC_LIBOBJ invocations from here...
76349         * modules/sleep (configure.ac): ... to here.
76351 2011-05-21  Bruno Haible  <bruno@clisp.org>
76353         signbit: Move AC_LIBOBJ invocations to module description.
76354         * m4/signbit.m4 (gl_SIGNBIT): Move AC_LIBOBJ invocations from here...
76355         * modules/signbit (configure.ac): ... to here.
76357 2011-05-21  Bruno Haible  <bruno@clisp.org>
76359         sigprocmask: Move AC_LIBOBJ invocations to module description.
76360         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Move AC_LIBOBJ and
76361         gl_PREREQ_SIGPROMASK invocations from here...
76362         * modules/sigprocmask (configure.ac): ... to here.
76364 2011-05-21  Bruno Haible  <bruno@clisp.org>
76366         sigaction: Move AC_LIBOBJ invocations to module description.
76367         * m4/sigaction.m4 (gl_SIGACTION): Move AC_LIBOBJ and
76368         gl_PREREQ_SIGACTION invocations from here...
76369         * modules/sigaction (configure.ac): ... to here.
76371 2011-05-21  Bruno Haible  <bruno@clisp.org>
76373         sig2str: Move AC_LIBOBJ invocations to module description.
76374         * m4/sig2str.m4 (gl_FUNC_SIG2STR): Call AC_CHECK_FUNCS instead of
76375         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_SIG2STR invocations from
76376         here...
76377         * modules/sig2str (configure.ac): ... to here.
76379 2011-05-21  Bruno Haible  <bruno@clisp.org>
76381         setlocale: Move AC_LIBOBJ invocations to module description.
76382         * m4/setlocale.m4 (gl_FUNC_SETLOCALE): Move AC_LIBOBJ and
76383         gl_PREREQ_SETLOCALE invocations from here...
76384         * modules/setlocale (configure.ac): ... to here.
76386 2011-05-21  Bruno Haible  <bruno@clisp.org>
76388         unsetenv: Move AC_LIBOBJ invocations to module description.
76389         * m4/setenv.m4 (gl_FUNC_UNSETENV): Set HAVE_UNSETENV. Move AC_LIBOBJ
76390         and gl_PREREQ_UNSETENV invocations from here...
76391         * modules/unsetenv (configure.ac): ... to here.
76392         (Depends-on): Update.
76394 2011-05-21  Bruno Haible  <bruno@clisp.org>
76396         setenv: Move AC_LIBOBJ invocations to module description.
76397         * m4/setenv.m4 (gl_FUNC_SETENV): Move AC_LIBOBJ invocations from
76398         here...
76399         * modules/setenv (configure.ac): ... to here.
76401 2011-05-21  Bruno Haible  <bruno@clisp.org>
76403         selinux-h: Move AC_LIBOBJ invocations to module description.
76404         * m4/selinux-selinux-h.m4 (gl_HEADERS_SELINUX_SELINUX_H): Move
76405         AC_LIBOBJ invocation from here...
76406         * modules/selinux-h (configure.ac): ... to here.
76408 2011-05-21  Bruno Haible  <bruno@clisp.org>
76410         select: Respect rules for use of AC_LIBOBJ.
76411         * m4/select.m4 (gl_FUNC_SELECT): Move AC_LIBOBJ invocations from
76412         here...
76413         * modules/select (configure.ac): ... to here.
76415 2011-05-21  Bruno Haible  <bruno@clisp.org>
76417         scandir: Move AC_LIBOBJ invocations to module description.
76418         * m4/scandir.m4 (gl_FUNC_SCANDIR): Move AC_LIBOBJ and gl_PREREQ_SCANDIR
76419         invocations from here...
76420         * modules/scandir (configure.ac): ... to here.
76422 2011-05-21  Bruno Haible  <bruno@clisp.org>
76424         rpmatch: Move AC_LIBOBJ invocations to module description.
76425         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Call AC_CHECK_FUNCS instead of
76426         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_RPMATCH invocations from
76427         here...
76428         * modules/rpmatch (configure.ac): ... to here.
76430 2011-05-21  Bruno Haible  <bruno@clisp.org>
76432         rmdir: Respect rules for use of AC_LIBOBJ.
76433         * m4/rmdir.m4 (gl_FUNC_RMDIR): Move AC_LIBOBJ invocation from here...
76434         * modules/rmdir (configure.ac): ... to here.
76436 2011-05-21  Bruno Haible  <bruno@clisp.org>
76438         renameat: Move AC_LIBOBJ invocations to module description.
76439         * m4/renameat.m4 (gl_FUNC_RENAMEAT): Move AC_LIBOBJ invocations from
76440         here...
76441         * modules/renameat (configure.ac): ... to here.
76443 2011-05-21  Bruno Haible  <bruno@clisp.org>
76445         rename: Respect rules for use of AC_LIBOBJ.
76446         * m4/rename.m4 (gl_FUNC_RENAME): Move AC_LIBOBJ invocations from
76447         here...
76448         * modules/rename (configure.ac): ... to here.
76450 2011-05-21  Bruno Haible  <bruno@clisp.org>
76452         remove: Move AC_LIBOBJ invocations to module description.
76453         * m4/remove.m4 (gl_FUNC_REMOVE): Move AC_LIBOBJ invocations from
76454         here...
76455         * modules/remove (configure.ac): ... to here.
76457 2011-05-21  Bruno Haible  <bruno@clisp.org>
76459         relocatable-lib: Move AC_LIBOBJ invocations to module description.
76460         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_SEPARATE): Remove
76461         macro.
76462         (gl_RELOCATABLE_LIBRARY): Move AC_LIBOBJ invocation from here...
76463         * modules/relocatable-lib (configure.ac): ... to here.
76464         * modules/relocatable-prog-wrapper (configure.ac): Invoke
76465         gl_RELOCATABLE_LIBRARY instead of gl_RELOCATABLE_LIBRARY_SEPARATE.
76467 2011-05-21  Bruno Haible  <bruno@clisp.org>
76469         relocatable-prog: Move AC_LIBOBJ invocations to module description.
76470         * m4/relocatable.m4 (gl_RELOCATABLE): Move AC_LIBOBJ invocation from
76471         here...
76472         * modules/relocatable-prog (configure.ac): ... to here.
76474 2011-05-21  Bruno Haible  <bruno@clisp.org>
76476         regex: Move AC_LIBOBJ invocations to module description.
76477         * m4/regex.m4 (gl_REGEX): Move AC_LIBOBJ and gl_PREREQ_REGEX
76478         invocations from here...
76479         * modules/regex (configure.ac): ... to here.
76481 2011-05-21  Bruno Haible  <bruno@clisp.org>
76483         realloc-*: Move AC_LIBOBJ invocations to module description.
76484         * m4/realloc.m4 (gl_REPLACE_REALLOC): Remove macro.
76485         (gl_FUNC_REALLOC_GNU, gl_FUNC_REALLOC_POSIX): Inline it here. Move
76486         AC_LIBOBJ invocations from here...
76487         * modules/realloc-gnu (configure.ac): ... to here.
76488         * modules/realloc-posix (configure.ac): ... and here.
76490 2011-05-21  Bruno Haible  <bruno@clisp.org>
76492         readutmp: Move AC_LIBOBJ invocations to module description.
76493         * m4/readutmp.m4 (gl_READUTMP): Move AC_LIBOBJ invocation from here...
76494         * modules/readutmp (configure.ac): ... to here.
76496 2011-05-21  Bruno Haible  <bruno@clisp.org>
76498         readlinkat: Move AC_LIBOBJ invocations to module description.
76499         * m4/readlinkat.m4 (gl_FUNC_READLINKAT): Move AC_LIBOBJ invocation from
76500         here...
76501         * modules/readlinkat (configure.ac): ... to here.
76503 2011-05-21  Bruno Haible  <bruno@clisp.org>
76505         readlink: Move AC_LIBOBJ invocations to module description.
76506         * m4/readlink.m4 (gl_FUNC_READLINK): Move AC_LIBOBJ and
76507         gl_PREREQ_READLINK invocations from here...
76508         * modules/readlink (configure.ac): ... to here.
76510 2011-05-21  Bruno Haible  <bruno@clisp.org>
76512         readline: Move AC_LIBOBJ invocations to module description.
76513         * m4/readline.m4 (gl_FUNC_READLINE): Move AC_LIBOBJ and
76514         gl_PREREQ_READLINE invocations from here...
76515         * modules/readline (configure.ac): ... to here.
76517 2011-05-21  Bruno Haible  <bruno@clisp.org>
76519         read: Move AC_LIBOBJ invocations to module description.
76520         * m4/read.m4 (gl_FUNC_READ): Move AC_LIBOBJ invocation from here...
76521         * modules/read (configure.ac): ... to here.
76523 2011-05-21  Bruno Haible  <bruno@clisp.org>
76525         rawmemchr: Move AC_LIBOBJ invocations to module description.
76526         * m4/rawmemchr.m4 (gl_FUNC_RAWMEMCHR): Call AC_CHECK_FUNCS instead of
76527         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_RAWMEMCHR invocations
76528         from here...
76529         * modules/rawmemchr (configure.ac): ... to here.
76531 2011-05-21  Bruno Haible  <bruno@clisp.org>
76533         random_r: Move AC_LIBOBJ invocations to module description.
76534         * m4/random_r.m4 (gl_FUNC_RANDOM_R): Move AC_LIBOBJ and
76535         gl_PREREQ_RANDOM_R invocations from here...
76536         * modules/random_r (configure.ac): ... to here.
76538 2011-05-21  Bruno Haible  <bruno@clisp.org>
76540         pwrite: Move AC_LIBOBJ invocations to module description.
76541         * m4/pwrite.m4 (gl_FUNC_PWRITE): Move AC_LIBOBJ invocation from here...
76542         * modules/pwrite (configure.ac): ... to here.
76544 2011-05-21  Bruno Haible  <bruno@clisp.org>
76546         putenv: Move AC_LIBOBJ invocations to module description.
76547         * m4/putenv.m4 (gl_FUNC_PUTENV): Move AC_LIBOBJ invocation from here...
76548         * modules/putenv (configure.ac): ... to here.
76550 2011-05-21  Bruno Haible  <bruno@clisp.org>
76552         login_tty: Move AC_LIBOBJ invocations to module description.
76553         * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Move AC_LIBOBJ invocation from here...
76554         * modules/login_tty (configure.ac): ... to here.
76556 2011-05-21  Bruno Haible  <bruno@clisp.org>
76558         openpty: Move AC_LIBOBJ invocations to module description.
76559         * m4/pty.m4 (gl_FUNC_OPENPTY): Move AC_LIBOBJ invocations from here...
76560         * modules/openpty (configure.ac): ... to here.
76562 2011-05-21  Bruno Haible  <bruno@clisp.org>
76564         forkpty: Move AC_LIBOBJ invocations to module description.
76565         * m4/pty.m4 (gl_FUNC_FORKPTY): Move AC_LIBOBJ invocations from here...
76566         * modules/forkpty (configure.ac): ... to here.
76568 2011-05-21  Bruno Haible  <bruno@clisp.org>
76570         ptsname: Move AC_LIBOBJ invocations to module description.
76571         * m4/ptsname.m4 (gl_FUNC_PTSNAME): Move AC_LIBOBJ and gl_PREREQ_PTSNAME
76572         invocations from here...
76573         * modules/ptsname (configure.ac): ... to here.
76575 2011-05-21  Bruno Haible  <bruno@clisp.org>
76577         pread: Move AC_LIBOBJ invocations to module description.
76578         * m4/pread.m4 (gl_FUNC_PREAD): Move AC_LIBOBJ invocation from here...
76579         * modules/pread (configure.ac): ... to here.
76581 2011-05-21  Bruno Haible  <bruno@clisp.org>
76583         posix_spawn*: Move AC_LIBOBJ invocations to module description.
76584         * m4/posix_spawn.m4 (gl_PREREQ_POSIX_SPAWN_INTERNAL): Renamed from
76585         gl_POSIX_SPAWN_INTERNAL. Move AC_LIBOBJ invocation from here...
76586         * modules/posix_spawn (configure.ac): ... to here.
76587         * modules/posix_spawnp (configure.ac): ... and here.
76589 2011-05-21  Bruno Haible  <bruno@clisp.org>
76591         popen: Move AC_LIBOBJ invocations to module description.
76592         * m4/popen.m4 (gl_FUNC_POPEN): Move AC_LIBOBJ and gl_PREREQ_POPEN
76593         invocations from here...
76594         * modules/popen (configure.ac): ... to here.
76596 2011-05-21  Bruno Haible  <bruno@clisp.org>
76598         poll: Move AC_LIBOBJ invocations to module description.
76599         * m4/poll.m4 (gl_FUNC_POLL): Move AC_LIBOBJ and gl_PREREQ_POLL
76600         invocations from here...
76601         * modules/poll (configure.ac): ... to here.
76603 2011-05-21  Bruno Haible  <bruno@clisp.org>
76605         pipe-posix: Move AC_LIBOBJ invocations to module description.
76606         * m4/pipe.m4 (gl_FUNC_PIPE): Move AC_LIBOBJ invocation from here...
76607         * modules/pipe-posix (configure.ac): ... to here.
76609 2011-05-21  Bruno Haible  <bruno@clisp.org>
76611         openat: Respect rules for use of AC_LIBOBJ.
76612         * m4/openat.m4 (gl_FUNC_OPENAT): Call AC_CHECK_FUNCS instead of
76613         AC_REPLACE_FUNCS. Move AC_LIBOBJ invocations from here...
76614         * modules/openat (configure.ac): ... to here.
76616 2011-05-21  Bruno Haible  <bruno@clisp.org>
76618         obstack-printf*: Move AC_LIBOBJ invocations to module description.
76619         * m4/obstack-printf.m4 (gl_REPLACE_OBSTACK_PRINTF): Move AC_LIBOBJ
76620         invocation from here...
76621         * modules/obstack-printf (configure.ac): ... to here.
76622         * modules/obstack-printf-posix (configure.ac): ... and here.
76624 2011-05-21  Bruno Haible  <bruno@clisp.org>
76626         nl_langinfo: Move AC_LIBOBJ invocations to module description.
76627         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Move AC_LIBOBJ invocations
76628         from here...
76629         * modules/nl_langinfo (configure.ac): ... to here.
76631 2011-05-21  Bruno Haible  <bruno@clisp.org>
76633         nanosleep: Move AC_LIBOBJ invocations to module description.
76634         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Move AC_LIBOBJ and
76635         gl_PREREQ_NANOSLEEP invocations from here...
76636         * modules/nanosleep (configure.ac): ... to here.
76638 2011-05-21  Bruno Haible  <bruno@clisp.org>
76640         mountlist: Move AC_LIBOBJ invocations to module description.
76641         * m4/mountlist.m4 (gl_MOUNTLIST): Move AC_LIBOBJ and
76642         gl_PREREQ_MOUNTLIST_EXTRA invocations from here...
76643         * modules/mountlist (configure.ac): ... to here.
76645 2011-05-21  Bruno Haible  <bruno@clisp.org>
76647         mktime: Respect rules for use of AC_LIBOBJ.
76648         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove macro.
76649         (gl_FUNC_MKTIME): Inline it here. Set gl_cv_func_working_mktime. Move
76650         AC_LIBOBJ and gl_PREREQ_MKTIME invocations from here...
76651         (gl_FUNC_MKTIME_INTERNAL): ... and here...
76652         * modules/mktime (configure.ac): ... to here.
76653         * modules/mktime-internal (configure.ac): ... and here.
76654         * m4/timegm.m4 (gl_FUNC_TIMEGM): Update.
76656 2011-05-21  Bruno Haible  <bruno@clisp.org>
76658         mkstemps: Move AC_LIBOBJ invocations to module description.
76659         * m4/mkstemps.m4 (gl_FUNC_MKSTEMPS): Move AC_LIBOBJ invocation from
76660         here...
76661         * modules/mkstemps (configure.ac): ... to here.
76663 2011-05-21  Bruno Haible  <bruno@clisp.org>
76665         mkstemp: Move AC_LIBOBJ invocations to module description.
76666         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Move AC_LIBOBJ and
76667         gl_PREREQ_MKSTEMP invocations from here...
76668         * modules/mkstemp (configure.ac): ... to here.
76670 2011-05-21  Bruno Haible  <bruno@clisp.org>
76672         mkostemps: Move AC_LIBOBJ invocations to module description.
76673         * m4/mkostemps.m4 (gl_FUNC_MKOSTEMPS): Move AC_LIBOBJ invocation from
76674         here...
76675         * modules/mkostemps (configure.ac): ... to here.
76677 2011-05-21  Bruno Haible  <bruno@clisp.org>
76679         mkostemp: Move AC_LIBOBJ invocations to module description.
76680         * m4/mkostemp.m4 (gl_FUNC_MKOSTEMP): Move AC_LIBOBJ and
76681         gl_PREREQ_MKOSTEMP invocations from here...
76682         * modules/mkostemp (configure.ac): ... to here.
76684 2011-05-21  Bruno Haible  <bruno@clisp.org>
76686         mknod: Move AC_LIBOBJ invocations to module description.
76687         * m4/mknod.m4 (gl_FUNC_MKNOD): Move AC_LIBOBJ invocations from here...
76688         * modules/mknod (configure.ac): ... to here.
76690 2011-05-21  Bruno Haible  <bruno@clisp.org>
76692         mkfifoat: Move AC_LIBOBJ invocations to module description.
76693         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Move AC_LIBOBJ invocations from
76694         here...
76695         * modules/mkfifoat (configure.ac): ... to here.
76697 2011-05-21  Bruno Haible  <bruno@clisp.org>
76699         mkfifo: Respect rules for use of AC_LIBOBJ.
76700         * m4/mkfifo.m4 (gl_FUNC_MKFIFO): Move AC_LIBOBJ invocations from
76701         here...
76702         * modules/mkfifo (configure.ac): ... to here.
76704 2011-05-21  Bruno Haible  <bruno@clisp.org>
76706         mkdtemp: Move AC_LIBOBJ invocations to module description.
76707         * m4/mkdtemp.m4 (gl_FUNC_MKDTEMP): Move AC_LIBOBJ and gl_PREREQ_MKDTEMP
76708         invocations from here...
76709         * modules/mkdtemp (configure.ac): ... to here.
76711 2011-05-21  Bruno Haible  <bruno@clisp.org>
76713         mkdir: Move AC_LIBOBJ invocations to module description.
76714         * m4/mkdir.m4 (gl_FUNC_MKDIR): Move AC_LIBOBJ invocations from here...
76715         * modules/mkdir (configure.ac): ... to here.
76717 2011-05-21  Bruno Haible  <bruno@clisp.org>
76719         memset: Move AC_LIBOBJ invocations to module description.
76720         * m4/memset.m4 (gl_FUNC_MEMSET): Call AC_CHECK_FUNCS instead of
76721         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_MEMSET invocations from
76722         here...
76723         * modules/memset (configure.ac): ... to here.
76725 2011-05-21  Bruno Haible  <bruno@clisp.org>
76727         memrchr: Move AC_LIBOBJ invocations to module description.
76728         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Call AC_CHECK_FUNCS instead of
76729         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_MEMRCHR invocations from
76730         here...
76731         * modules/memrchr (configure.ac): ... to here.
76733 2011-05-21  Bruno Haible  <bruno@clisp.org>
76735         mempcpy: Move AC_LIBOBJ invocations to module description.
76736         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Call AC_CHECK_FUNCS instead of
76737         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_MEMPCPY invocations from
76738         here...
76739         * modules/mempcpy (configure.ac): ... to here.
76741 2011-05-21  Bruno Haible  <bruno@clisp.org>
76743         memmove: Move AC_LIBOBJ invocations to module description.
76744         * m4/memmove.m4 (gl_FUNC_MEMMOVE): Call AC_CHECK_FUNCS instead of
76745         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_MEMMOVE invocations from
76746         here...
76747         * modules/memmove (configure.ac): ... to here.
76749 2011-05-21  Bruno Haible  <bruno@clisp.org>
76751         memmem*: Move AC_LIBOBJ invocations to module description.
76752         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): Call AC_CHECK_FUNCS instead of
76753         AC_REPLACE_FUNCS. Set HAVE_MEMMEM. Move AC_LIBOBJ invocations from
76754         here...
76755         (gl_FUNC_MEMMEM): ... and here...
76756         * modules/memmem-simple (configure.ac): ... to here.
76757         * modules/memmem (configure.ac): ... and here.
76759 2011-05-21  Bruno Haible  <bruno@clisp.org>
76761         memcpy: Move AC_LIBOBJ invocations to module description.
76762         * m4/memcpy.m4 (gl_FUNC_MEMCPY): Call AC_CHECK_FUNCS instead of
76763         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_MEMCPY invocations from
76764         here...
76765         * modules/memcpy (configure.ac): ... to here.
76767 2011-05-21  Bruno Haible  <bruno@clisp.org>
76769         memcmp: Simplify autoconf macro.
76770         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Merge the cross-compilation code into
76771         the AC_RUN_IFELSE invocation. Set gl_func_memcmp.
76772         * modules/memcmp (Depends-on, configure.ac): Test gl_func_memcmp.
76774 2011-05-21  Bruno Haible  <bruno@clisp.org>
76776         memcmp: Move AC_LIBOBJ invocations to module description.
76777         * m4/memcmp.m4 (AC_FUNC_MEMCMP): Remove macro.
76778         (gl_FUNC_MEMCMP): Inline it here. Set gl_cv_func_memcmp_working. Move
76779         AC_LIBOBJ and gl_PREREQ_MEMCMP invocations from here...
76780         * modules/memcmp (configure.ac): ... to here.
76781         (Depends-on): Update conditions.
76783 2011-05-21  Bruno Haible  <bruno@clisp.org>
76785         memchr: Respect rules for use of AC_LIBOBJ.
76786         * m4/memchr.m4 (gl_FUNC_MEMCHR): Move AC_LIBOBJ and gl_PREREQ_MEMCHR
76787         invocations from here...
76788         * modules/memchr (configure.ac): ... to here.
76790 2011-05-21  Bruno Haible  <bruno@clisp.org>
76792         mbtowc: Move AC_LIBOBJ invocations to module description.
76793         * m4/mbtowc.m4 (gl_FUNC_MBTOWC): Move AC_LIBOBJ and gl_PREREQ_MBTOWC
76794         invocations from here...
76795         * modules/mbtowc (configure.ac): ... to here.
76797 2011-05-21  Bruno Haible  <bruno@clisp.org>
76799         mbsrtowcs: Move AC_LIBOBJ invocations to module description.
76800         * m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): Move AC_LIBOBJ and
76801         gl_PREREQ_MBSRTOWCS invocations from here...
76802         * modules/mbsrtowcs (configure.ac): ... to here.
76804 2011-05-21  Bruno Haible  <bruno@clisp.org>
76806         mbsnrtowcs: Move AC_LIBOBJ invocations to module description.
76807         * m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): Move AC_LIBOBJ and
76808         gl_PREREQ_MBSNRTOWCS invocations from here...
76809         * modules/mbsnrtowcs (configure.ac): ... to here.
76811 2011-05-21  Bruno Haible  <bruno@clisp.org>
76813         mbsinit: Move AC_LIBOBJ invocations to module description.
76814         * m4/mbsinit.m4 (gl_FUNC_MBSINIT): Move AC_LIBOBJ and gl_PREREQ_MBSINIT
76815         invocations from here...
76816         * modules/mbsinit (configure.ac): ... to here.
76818 2011-05-21  Bruno Haible  <bruno@clisp.org>
76820         mbrlen: Move AC_LIBOBJ invocations to module description.
76821         * m4/mbrlen.m4 (gl_FUNC_MBRLEN): Move AC_LIBOBJ and gl_PREREQ_MBRLEN
76822         invocations from here...
76823         * modules/mbrlen (configure.ac): ... to here.
76825 2011-05-21  Bruno Haible  <bruno@clisp.org>
76827         mbrtowc: Respect rules for use of AC_LIBOBJ.
76828         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Move AC_LIBOBJ and gl_PREREQ_MBRTOWC
76829         invocations from here...
76830         * modules/mbrtowc (configure.ac): ... to here.
76832 2011-05-21  Bruno Haible  <bruno@clisp.org>
76834         malloc-*: Move AC_LIBOBJ invocations to module description.
76835         * m4/malloc.m4 (gl_REPLACE_MALLOC): Remove macro.
76836         (gl_FUNC_MALLOC_GNU, gl_FUNC_MALLOC_POSIX): Inline it here. Move
76837         AC_LIBOBJ invocations from here...
76838         * modules/malloc-gnu (configure.ac): ... to here.
76839         * modules/malloc-posix (configure.ac): ... and here.
76841 2011-05-21  Bruno Haible  <bruno@clisp.org>
76843         lstat, openat: Respect rules for use of AC_LIBOBJ.
76844         * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Renamed from
76845         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK. Set variable
76846         gl_cv_func_lstat_dereferences_slashed_symlink. Don't invoke AC_LIBOBJ.
76847         (gl_PREREQ_LSTAT): New macro, extracted from gl_FUNC_LSTAT.
76848         (gl_FUNC_LSTAT): Update. Remove gl_PREREQ_LSTAT code.
76849         * modules/lstat (configure.ac): Invoke AC_LIBOBJ and gl_PREREQ_LSTAT
76850         here.
76851         * m4/openat.m4 (gl_FUNC_OPENAT): Update.
76853 2011-05-21  Bruno Haible  <bruno@clisp.org>
76855         lseek: Move AC_LIBOBJ invocations to module description.
76856         * m4/lseek.m4 (gl_REPLACE_LSEEK): Remove macro.
76857         (gl_FUNC_LSEEK): Inline it here. Move AC_LIBOBJ invocation from here...
76858         * modules/lseek (configure.ac): ... to here.
76860 2011-05-21  Bruno Haible  <bruno@clisp.org>
76862         linkat: Move AC_LIBOBJ invocations to module description.
76863         * m4/linkat.m4 (gl_FUNC_LINKAT): Move AC_LIBOBJ invocations from
76864         here...
76865         * modules/linkat (configure.ac): ... to here.
76867 2011-05-21  Bruno Haible  <bruno@clisp.org>
76869         link: Respect rules for use of AC_LIBOBJ.
76870         * m4/link.m4 (gl_FUNC_LINK): Move AC_LIBOBJ invocations from here...
76871         * modules/link (configure.ac): ... to here.
76873 2011-05-21  Bruno Haible  <bruno@clisp.org>
76875         lchown: Move AC_LIBOBJ invocations to module description.
76876         * m4/lchown.m4 (gl_FUNC_EUIDACCESS): Call AC_CHECK_FUNCS instead of
76877         AC_REPLACE_FUNCS. Move AC_LIBOBJ invocations from here...
76878         * modules/lchown (configure.ac): ... to here.
76880 2011-05-21  Bruno Haible  <bruno@clisp.org>
76882         iswctype: Move AC_LIBOBJ invocations to module description.
76883         * m4/iswctype.m4 (gl_FUNC_ISWCTYPE): Move AC_LIBOBJ invocation from
76884         here...
76885         * modules/iswctype (configure.ac): ... to here.
76887 2011-05-21  Bruno Haible  <bruno@clisp.org>
76889         iswblank: Move AC_LIBOBJ invocations to module description.
76890         * m4/iswblank.m4 (gl_FUNC_ISWBLANK): Move AC_LIBOBJ invocation from
76891         here...
76892         * modules/iswblank (configure.ac): ... to here.
76894 2011-05-21  Bruno Haible  <bruno@clisp.org>
76896         atanl: Move AC_LIBOBJ invocations to module description.
76897         * m4/atanl.m4 (gl_FUNC_ATANL): Move AC_LIBOBJ invocation from here...
76898         * modules/atanl (configure.ac): ... to here.
76900 2011-05-21  Bruno Haible  <bruno@clisp.org>
76902         acosl: Move AC_LIBOBJ invocations to module description.
76903         * m4/acosl.m4 (gl_FUNC_ACOSL): Move AC_LIBOBJ invocation from here...
76904         * modules/acosl (configure.ac): ... to here.
76906 2011-05-21  Bruno Haible  <bruno@clisp.org>
76908         asinl: Respect rules for use of AC_LIBOBJ.
76909         * m4/asinl.m4 (gl_FUNC_ASINL): Move AC_LIBOBJ invocation from here...
76910         * modules/asinl (configure.ac): ... to here.
76912 2011-05-21  Bruno Haible  <bruno@clisp.org>
76914         tanl: Move AC_LIBOBJ invocations to module description.
76915         * m4/tanl.m4 (gl_FUNC_TANL): Move AC_LIBOBJ invocations from here...
76916         * modules/tanl (configure.ac): ... to here.
76918 2011-05-21  Bruno Haible  <bruno@clisp.org>
76920         cosl: Move AC_LIBOBJ invocations to module description.
76921         * m4/cosl.m4 (gl_FUNC_COSL): Move AC_LIBOBJ invocations from here...
76922         * modules/cosl (configure.ac): ... to here.
76924 2011-05-21  Bruno Haible  <bruno@clisp.org>
76926         sinl: Move AC_LIBOBJ invocations to module description.
76927         * m4/sinl.m4 (gl_FUNC_SINL): Move AC_LIBOBJ invocations from here...
76928         * modules/sinl (configure.ac): ... to here.
76930 2011-05-21  Bruno Haible  <bruno@clisp.org>
76932         logl: Move AC_LIBOBJ invocations to module description.
76933         * m4/logl.m4 (gl_FUNC_LOGL): Move AC_LIBOBJ invocation from here...
76934         * modules/logl (configure.ac): ... to here.
76936 2011-05-21  Bruno Haible  <bruno@clisp.org>
76938         expl: Move AC_LIBOBJ invocations to module description.
76939         * m4/expl.m4 (gl_FUNC_EXPL): Move AC_LIBOBJ invocation from here...
76940         * modules/expl (configure.ac): ... to here.
76942 2011-05-21  Bruno Haible  <bruno@clisp.org>
76944         roundl: Move AC_LIBOBJ invocations to module description.
76945         * m4/roundl.m4 (gl_FUNC_ROUNDL): Move AC_LIBOBJ invocation from here...
76946         * modules/roundl (configure.ac): ... to here.
76948 2011-05-21  Bruno Haible  <bruno@clisp.org>
76950         round: Move AC_LIBOBJ invocations to module description.
76951         * m4/round.m4 (gl_FUNC_ROUND): Move AC_LIBOBJ invocation from here...
76952         * modules/round (configure.ac): ... to here.
76954 2011-05-21  Bruno Haible  <bruno@clisp.org>
76956         roundf: Move AC_LIBOBJ invocations to module description.
76957         * m4/roundf.m4 (gl_FUNC_ROUNDF): Move AC_LIBOBJ invocation from here...
76958         * modules/roundf (configure.ac): ... to here.
76960 2011-05-21  Bruno Haible  <bruno@clisp.org>
76962         truncl: Move AC_LIBOBJ invocations to module description.
76963         * m4/truncl.m4 (gl_FUNC_TRUNCL): Move AC_LIBOBJ invocation from here...
76964         * modules/truncl (configure.ac): ... to here.
76966 2011-05-21  Bruno Haible  <bruno@clisp.org>
76968         trunc: Move AC_LIBOBJ invocations to module description.
76969         * m4/trunc.m4 (gl_FUNC_TRUNC): Move AC_LIBOBJ invocation from here...
76970         * modules/trunc (configure.ac): ... to here.
76972 2011-05-21  Bruno Haible  <bruno@clisp.org>
76974         truncf: Move AC_LIBOBJ invocations to module description.
76975         * m4/truncf.m4 (gl_FUNC_TRUNCF): Move AC_LIBOBJ invocation from here...
76976         * modules/truncf (configure.ac): ... to here.
76978 2011-05-21  Bruno Haible  <bruno@clisp.org>
76980         ceill: Move AC_LIBOBJ invocations to module description.
76981         * m4/ceill.m4 (gl_FUNC_CEILL): Move AC_LIBOBJ invocation from here...
76982         * modules/ceill (configure.ac): ... to here.
76984 2011-05-21  Bruno Haible  <bruno@clisp.org>
76986         ceil: Move AC_LIBOBJ invocations to module description.
76987         * m4/ceil.m4 (gl_FUNC_CEIL): Move AC_LIBOBJ invocation from here...
76988         * modules/ceil (configure.ac): ... to here.
76990 2011-05-21  Bruno Haible  <bruno@clisp.org>
76992         ceilf: Move AC_LIBOBJ invocations to module description.
76993         * m4/ceilf.m4 (gl_FUNC_CEILF): Move AC_LIBOBJ invocation from here...
76994         * modules/ceilf (configure.ac): ... to here.
76996 2011-05-21  Bruno Haible  <bruno@clisp.org>
76998         floorl: Respect rules for use of AC_LIBOBJ.
76999         * m4/floorl.m4 (gl_FUNC_FLOORL): Move AC_LIBOBJ invocation from here...
77000         * modules/floorl (configure.ac): ... to here.
77002 2011-05-21  Bruno Haible  <bruno@clisp.org>
77004         floor: Respect rules for use of AC_LIBOBJ.
77005         * m4/floor.m4 (gl_FUNC_FLOOR): Move AC_LIBOBJ invocation from here...
77006         * modules/floor (configure.ac): ... to here.
77008 2011-05-21  Bruno Haible  <bruno@clisp.org>
77010         floorf: Move AC_LIBOBJ invocations to module description.
77011         * m4/floorf.m4 (gl_FUNC_FLOORF): Move AC_LIBOBJ invocation from here...
77012         * modules/floorf (configure.ac): ... to here.
77014 2011-05-20  Bruno Haible  <bruno@clisp.org>
77016         sqrtl: Respect rules for use of AC_LIBOBJ.
77017         * m4/sqrtl.m4 (gl_FUNC_SQRTL): Move AC_LIBOBJ invocation from here...
77018         * modules/sqrtl (configure.ac): ... to here.
77020 2011-05-20  Bruno Haible  <bruno@clisp.org>
77022         ldexpl: Respect rules for use of AC_LIBOBJ.
77023         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Move AC_LIBOBJ invocation from here...
77024         * modules/ldexpl (configure.ac): ... to here.
77026 2011-05-20  Bruno Haible  <bruno@clisp.org>
77028         frexpl*: Respect rules for use of AC_LIBOBJ.
77029         * m4/frexpl.m4 (gl_FUNC_FREXPL, gl_FUNC_FREXPL_NO_LIBM): Move AC_LIBOBJ
77030         invocation from here...
77031         * modules/frexpl (configure.ac): ... to here.
77032         * modules/frexpl-nolibm (configure.ac): ... and here.
77034 2011-05-20  Bruno Haible  <bruno@clisp.org>
77036         frexp, frexp-nolibm: Move AC_LIBOBJ invocations to module description.
77037         * m4/frexp.m4 (gl_FUNC_FREXP, gl_FUNC_FREXP_NO_LIBM): Move AC_LIBOBJ
77038         invocation from here...
77039         * modules/frexp (configure.ac): ... to here.
77040         * modules/frexp-nolibm (configure.ac): ... and here.
77042 2011-05-20  Bruno Haible  <bruno@clisp.org>
77044         isnan: Respect rules for use of AC_LIBOBJ.
77045         * m4/isnan.m4 (gl_ISNAN): Don't do the AC_LIBOBJ and gl_PREREQ_ISNAN*
77046         invocations here.
77047         * modules/isnanf (configure.ac): Require gl_ISNAN if it exists. Test
77048         REPLACE_ISNAN.
77049         * modules/isnand (configure.ac): Likewise.
77050         * modules/isnanl (configure.ac): Likewise.
77052 2011-05-20  Bruno Haible  <bruno@clisp.org>
77054         isnanl*: Respect rules for use of AC_LIBOBJ.
77055         * m4/isnanl.m4 (gl_FUNC_ISNANL, gl_FUNC_ISNANL_NO_LIBM): Move AC_LIBOBJ
77056         invocation from here...
77057         * modules/isnanl (configure.ac): ... to here.
77058         * modules/isnanl-nolibm (configure.ac): ... and here.
77060 2011-05-20  Bruno Haible  <bruno@clisp.org>
77062         isnand*: Move AC_LIBOBJ invocations to module description.
77063         * m4/isnand.m4 (gl_FUNC_ISNAND, gl_FUNC_ISNAND_NO_LIBM): Move AC_LIBOBJ
77064         invocation from here...
77065         * modules/isnand (configure.ac): ... to here.
77066         * modules/isnand-nolibm (configure.ac): ... and here.
77068 2011-05-20  Bruno Haible  <bruno@clisp.org>
77070         isnanf*: Move AC_LIBOBJ invocations to module description.
77071         * m4/isnanf.m4 (gl_FUNC_ISNANF, gl_FUNC_ISNANF_NO_LIBM): Move AC_LIBOBJ
77072         invocation from here...
77073         * modules/isnanf (configure.ac): ... to here.
77074         * modules/isnanf-nolibm (configure.ac): ... and here.
77076 2011-05-20  Bruno Haible  <bruno@clisp.org>
77078         isnan*: Separate the AC_LIBOBJ invocations.
77079         * m4/isnanf.m4 (gl_PREREQ_ISNANF): Renamed from gl_BUILD_ISNANF. Remove
77080         AC_LIBOBJ invocation.
77081         (gl_FUNC_ISNANF, gl_FUNC_ISNANF_NO_LIBM): Update. Invoke AC_LIBOBJ
77082         here.
77083         * m4/isnand.m4 (gl_PREREQ_ISNAND): Renamed from gl_BUILD_ISNAND. Remove
77084         AC_LIBOBJ invocation.
77085         (gl_FUNC_ISNAND, gl_FUNC_ISNAND_NO_LIBM): Update. Invoke AC_LIBOBJ
77086         here.
77087         * m4/isnanl.m4 (gl_PREREQ_ISNANL): Renamed from gl_BUILD_ISNANL. Remove
77088         AC_LIBOBJ invocation.
77089         (gl_FUNC_ISNANL, gl_FUNC_ISNANL_NO_LIBM): Update. Invoke AC_LIBOBJ
77090         here.
77091         * m4/isnan.m4 (gl_ISNAN): Update. Invoke AC_LIBOBJ here.
77093 2011-05-08  Bruno Haible  <bruno@clisp.org>
77095         isinf: Move AC_LIBOBJ invocations to module description.
77096         * m4/isinf.m4 (gl_ISINF): Move AC_LIBOBJ invocation from here...
77097         * modules/isinf (configure.ac): ... to here.
77099 2011-05-08  Bruno Haible  <bruno@clisp.org>
77101         isfinite: Move AC_LIBOBJ invocations to module description.
77102         * m4/isfinite.m4 (gl_ISFINITE): Move AC_LIBOBJ invocation from here...
77103         * modules/isfinite (configure.ac): ... to here.
77105 2011-05-08  Bruno Haible  <bruno@clisp.org>
77107         isblank: Move AC_LIBOBJ invocations to module description.
77108         * m4/isblank.m4 (gl_FUNC_ISBLANK): Move AC_LIBOBJ invocation from
77109         here...
77110         * modules/isblank (configure.ac): ... to here.
77112 2011-05-08  Bruno Haible  <bruno@clisp.org>
77114         isapipe: Move AC_LIBOBJ invocations to module description.
77115         * m4/isapipe.m4 (gl_ISAPIPE): Set HAVE_ISAPIPE. Move AC_LIBOBJ and
77116         gl_PREREQ_ISAPIPE invocations from here...
77117         * modules/isapipe (configure.ac): ... to here.
77118         (Depends-on): Update condition.
77120 2011-05-08  Bruno Haible  <bruno@clisp.org>
77122         ioctl: Move AC_LIBOBJ invocations to module description.
77123         * m4/ioctl.m4 (gl_FUNC_IOCTL): Set HAVE_IOCTL. Move AC_LIBOBJ
77124         invocations from here...
77125         * modules/ioctl (configure.ac): ... to here.
77126         (Depends-on): Update condition.
77128 2011-05-08  Bruno Haible  <bruno@clisp.org>
77130         imaxdiv: Move AC_LIBOBJ invocations to module description.
77131         * m4/imaxdiv.m4 (gl_FUNC_IMAXDIV): Move AC_LIBOBJ and gl_PREREQ_IMAXDIV
77132         invocations from here...
77133         * modules/imaxdiv (configure.ac): ... to here.
77135 2011-05-08  Bruno Haible  <bruno@clisp.org>
77137         imaxabs: Move AC_LIBOBJ invocations to module description.
77138         * m4/imaxabs.m4 (gl_FUNC_IMAXABS): Move AC_LIBOBJ and gl_PREREQ_IMAXABS
77139         invocations from here...
77140         * modules/imaxabs (configure.ac): ... to here.
77142 2011-05-08  Bruno Haible  <bruno@clisp.org>
77144         getaddrinfo: Move AC_LIBOBJ invocations to module description.
77145         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Set HAVE_GETADDRINFO, Move
77146         AC_LIBOBJ invocations from here...
77147         * modules/getaddrinfo (configure.ac): ... to here.
77148         (Depends-on): Add conditions.
77150 2011-05-08  Bruno Haible  <bruno@clisp.org>
77152         inet_pton. getaddrinfo: Respect rules for use of AC_LIBOBJ.
77153         * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Set HAVE_INET_PTON. Call
77154         AC_CHECK_FUNCS instead of AC_REPLACE_FUNCS. Don't invoke
77155         gl_PREREQ_INET_PTON. Move tests for declaration of inet_pton here...
77156         (gl_PREREQ_INET_PTON): ... from here.
77157         * modules/inet_pton (configure.ac): Invoke AC_LIBOBJ and
77158         gl_PREREQ_INET_PTON here.
77159         (Depends-on): Update condition.
77161 2011-05-08  Bruno Haible  <bruno@clisp.org>
77163         inet_ntop. getaddrinfo: Respect rules for use of AC_LIBOBJ.
77164         * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): Set HAVE_INET_NTOP. Call
77165         AC_CHECK_FUNCS instead of AC_REPLACE_FUNCS. Don't invoke
77166         gl_PREREQ_INET_NTOP. Move tests for declaration of inet_ntop here...
77167         (gl_PREREQ_INET_NTOP): ... from here.
77168         * modules/inet_ntop (configure.ac): Invoke AC_LIBOBJ and
77169         gl_PREREQ_INET_NTOP here.
77170         (Depends-on): Update condition.
77172 2011-05-08  Bruno Haible  <bruno@clisp.org>
77174         iconv_open: Move AC_LIBOBJ invocations to module description.
77175         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN, gl_REPLACE_ICONV_OPEN): Move
77176         AC_LIBOBJ invocations from here...
77177         * modules/iconv_open (configure.ac): ... to here.
77179 2011-05-08  Bruno Haible  <bruno@clisp.org>
77181         iconv_open, iconv_open-utf: Respect rules for use of AC_LIBOBJ.
77182         If module 'iconv_open' is among the main modules and module
77183         'iconv_open-utf' is among the tests dependencies, then
77184         REPLACE_ICONV_UTF will be defined to 1, hence iconv_open() in lib may
77185         return the special iconv_t values. Therefore iconv() and iconv_close()
77186         must support these special iconv_t values, already in lib, not only in
77187         tests.
77188         * m4/iconv_open-utf.m4: New file, extracted from m4/iconv_open.m4.
77189         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Invoke
77190         gl_FUNC_ICONV_OPEN_UTF_SUPPORT if present.
77191         (gl_FUNC_ICONV_OPEN_UTF): Remove macro.
77192         * modules/iconv_open (Files): Add lib/iconv.c, lib/iconv_close.c.
77193         (Depends-on): Add the dependencies of iconv_open-utf.
77194         * modules/iconv_open-utf (Files): Add m4/iconv_open-utf.m4. Remove
77195         m4/iconv_open.m4, lib/iconv.c, lib/iconv_close.c.
77196         (Depends-on): Remove modules needed by lib/iconv.c, lib/iconv_close.c.
77198 2011-05-08  Bruno Haible  <bruno@clisp.org>
77200         group-member: Move AC_LIBOBJ invocations to module description.
77201         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER): Move AC_LIBOBJ and
77202         gl_PREREQ_GROUP_MEMBER invocations from here...
77203         * modules/group-member (configure.ac): ... to here.
77205 2011-05-08  Bruno Haible  <bruno@clisp.org>
77207         grantpt: Move AC_LIBOBJ invocations to module description.
77208         * m4/grantpt.m4 (gl_FUNC_GRANTPT): Move AC_LIBOBJ and gl_PREREQ_GRANTPT
77209         invocations from here...
77210         * modules/grantpt (configure.ac): ... to here.
77212 2011-05-08  Bruno Haible  <bruno@clisp.org>
77214         glob: Move AC_LIBOBJ invocations to module description.
77215         * m4/glob.m4 (gl_GLOB): Move AC_LIBOBJ and gl_PREREQ_GLOB invocations
77216         from here...
77217         * modules/glob (configure.ac): ... to here.
77219 2011-05-08  Bruno Haible  <bruno@clisp.org>
77221         getusershell: Move AC_LIBOBJ invocations to module description.
77222         * m4/getusershell.m4 (gl_FUNC_GETUSERSHELL): Set HAVE_GETUSERSHELL.
77223         Move AC_LIBOBJ invocation from here...
77224         * modules/getusershell (configure.ac): ... to here.
77225         (Depends-on): Update condition.
77227 2011-05-08  Bruno Haible  <bruno@clisp.org>
77229         gettimeofday: Move AC_LIBOBJ invocations to module description.
77230         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
77231         gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Move AC_LIBOBJ and
77232         gl_PREREQ_GETTIMEOFDAY invocations from here...
77233         * modules/gettimeofday (configure.ac): ... to here.
77235 2011-05-08  Bruno Haible  <bruno@clisp.org>
77237         gettimeofday, tzset: Respect rules for use of AC_LIBOBJ.
77238         * modules/tzset (configure.ac): Don't invoke gl_FUNC_TZSET_CLOBBER,
77239         just gl_FUNC_TZSET.
77240         * m4/tzset.m4 (gl_FUNC_TZSET): New macro.
77241         (gl_FUNC_TZSET_CLOBBER): Remove actions.
77242         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Invoke
77243         gl_FUNC_TZSET_CLOBBER and its actions here, if present.
77245 2011-05-08  Bruno Haible  <bruno@clisp.org>
77247         getsubopt: Move AC_LIBOBJ invocations to module description.
77248         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Move AC_LIBOBJ and
77249         gl_PREREQ_GETSUBOPT invocations from here...
77250         * modules/getsubopt (configure.ac): ... to here.
77252 2011-05-08  Bruno Haible  <bruno@clisp.org>
77254         getpass-gnu: Move AC_LIBOBJ invocations to module description.
77255         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): Set REPLACE_GETPASS. Move
77256         AC_LIBOBJ and gl_PREREQ_GETPASS invocations from here...
77257         * modules/getpass-gnu (configure.ac): ... to here.
77259 2011-05-08  Bruno Haible  <bruno@clisp.org>
77261         getpass: Move AC_LIBOBJ invocations to module description.
77262         * m4/getpass.m4 (gl_FUNC_GETPASS): Set HAVE_GETPASS. Move AC_LIBOBJ and
77263         gl_PREREQ_GETPASS invocations from here...
77264         * modules/getpass (configure.ac): ... to here.
77266 2011-05-08  Bruno Haible  <bruno@clisp.org>
77268         getpagesize: Move AC_LIBOBJ invocations to module description.
77269         * m4/getpagesize.m4 (gl_FUNC_GETPAGESIZE): Move AC_LIBOBJ invocation
77270         from here...
77271         * modules/getpagesize (configure.ac): ... to here.
77273 2011-05-08  Bruno Haible  <bruno@clisp.org>
77275         getopt: Move AC_LIBOBJ invocations to module description.
77276         * m4/getopt.m4 (gl_REPLACE_GETOPT): Remove macro.
77277         (gl_FUNC_GETOPT): Inline it here. Move AC_LIBOBJ and gl_PREREQ_GETOPT
77278         invocations from here...
77279         * modules/getopt-gnu (configure.ac): ... to here.
77280         * modules/getopt-posix (configure.ac): ... and here.
77281         (Depends-on): Update condition.
77283 2011-05-08  Bruno Haible  <bruno@clisp.org>
77285         getopt, argp: Respect rules for use of AC_LIBOBJ.
77286         * m4/argp.m4 (gl_ARGP): Don't invoke gl_REPLACE_GETOPT.
77287         (gl_REPLACE_GETOPT_ALWAYS): New macro.
77288         * m4/getopt.m4 (gl_FUNC_GETOPT_POSIX): Test whether
77289         gl_REPLACE_GETOPT_ALWAYS is defined. Set REPLACE_GETOPT.
77291 2011-05-08  Bruno Haible  <bruno@clisp.org>
77293         getlogin_r: Move AC_LIBOBJ invocations to module description.
77294         * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Move AC_LIBOBJ and
77295         gl_PREREQ_GETLOGIN_R invocations from here...
77296         * modules/getlogin_r (configure.ac): ... to here.
77298 2011-05-08  Bruno Haible  <bruno@clisp.org>
77300         getlogin: Move AC_LIBOBJ invocations to module description.
77301         * m4/getlogin.m4 (gl_FUNC_GETLOGIN): Move AC_LIBOBJ invocation from
77302         here...
77303         * modules/getlogin (configure.ac): ... to here.
77305 2011-05-08  Bruno Haible  <bruno@clisp.org>
77307         getloadavg: Move AC_LIBOBJ invocations to module description.
77308         * m4/getloadavg.m4 (gl_FUNC_GETDELIM): Set HAVE_GETLOADAVG. Move
77309         AC_LIBOBJ and gl_PREREQ_GETLOADAVG invocations from here...
77310         * modules/getloadavg (configure.ac): ... to here.
77312 2011-05-08  Bruno Haible  <bruno@clisp.org>
77314         gethrxtime: Move AC_LIBOBJ invocations to module description.
77315         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Move code that determines
77316         LIB_GETHRXTIME from here...
77317         (gl_GETHRXTIME): ... to here. Move AC_LIBOBJ and gl_PREREQ_GETHRXTIME
77318         invocations from here...
77319         * modules/gethrxtime (configure.ac): ... to here.
77321 2011-05-08  Bruno Haible  <bruno@clisp.org>
77323         gethostname: Move AC_LIBOBJ invocations to module description.
77324         * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): Move AC_LIBOBJ and
77325         gl_PREREQ_GETHOSTNAME invocations from here...
77326         * modules/gethostname (configure.ac): ... to here.
77328 2011-05-08  Bruno Haible  <bruno@clisp.org>
77330         getgroups: Move AC_LIBOBJ invocations to module description.
77331         * m4/getgroups.m4 (gl_FUNC_GETGROUPS): Move AC_LIBOBJ invocations from
77332         here...
77333         * modules/getgroups (configure.ac): ... to here.
77335 2011-05-08  Bruno Haible  <bruno@clisp.org>
77337         getdtablesize: Move AC_LIBOBJ invocations to module description.
77338         * m4/getdtablesize.m4 (gl_FUNC_GETDTABLESIZE): Move AC_LIBOBJ
77339         invocation from here...
77340         * modules/getdtablesize (configure.ac): ... to here.
77342 2011-05-08  Bruno Haible  <bruno@clisp.org>
77344         getdomainname: Move AC_LIBOBJ invocations to module description.
77345         * m4/getdomainname.m4 (gl_FUNC_GETDOMAINNAME): Move AC_LIBOBJ and
77346         gl_PREREQ_GETDOMAINNAME invocations from here...
77347         * modules/getdomainname (configure.ac): ... to here.
77349 2011-05-08  Bruno Haible  <bruno@clisp.org>
77351         getline: Move AC_LIBOBJ invocations to module description.
77352         * m4/getline.m4 (gl_FUNC_GETLINE): Move AC_LIBOBJ and gl_PREREQ_GETLINE
77353         invocations from here...
77354         * modules/getline (configure.ac): ... to here.
77356 2011-05-08  Bruno Haible  <bruno@clisp.org>
77358         getline: Simplify.
77359         * m4/getline.m4 (gl_PREREQ_GETLINE): Don't invoke gl_FUNC_GETDELIM.
77360         It's already handled through the module dependency.
77362 2011-05-08  Bruno Haible  <bruno@clisp.org>
77364         getdelim: Move AC_LIBOBJ invocations to module description.
77365         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Set HAVE_GETDELIM. Move AC_LIBOBJ
77366         and gl_PREREQ_GETDELIM invocations from here...
77367         * modules/getdelim (configure.ac): ... to here.
77368         (Depends-on): Fix condition.
77370 2011-05-08  Bruno Haible  <bruno@clisp.org>
77372         getcwd: Move AC_LIBOBJ invocations to module description.
77373         * m4/getcwd.m4 (gl_FUNC_GETCWD): Move AC_LIBOBJ and gl_PREREQ_GETCWD
77374         invocations from here...
77375         * modules/getcwd (configure.ac): ... to here.
77377 2011-05-08  Bruno Haible  <bruno@clisp.org>
77379         getcwd-lgpl: Move AC_LIBOBJ invocations to module description.
77380         * m4/getcwd.m4 (gl_FUNC_GETCWD_LGPL): Move AC_LIBOBJ invocation from
77381         here...
77382         * modules/getcwd-lgpl (configure.ac): ... to here.
77384 2011-05-07  Bruno Haible  <bruno@clisp.org>
77386         crypto/gc: Move AC_LIBOBJ invocations to module description.
77387         * m4/gc.m4 (gl_GC): Move AC_LIBOBJ invocations from here...
77388         * modules/crypto/gc (configure.ac): ... to here.
77390 2011-05-07  Bruno Haible  <bruno@clisp.org>
77392         fwriting: Move AC_LIBOBJ invocations to module description.
77393         * m4/fwriting.m4 (gl_FUNC_FWRITINT): Move AC_LIBOBJ invocation from
77394         here...
77395         * modules/fwriting (configure.ac): ... to here.
77397 2011-05-07  Bruno Haible  <bruno@clisp.org>
77399         fwritable: Move AC_LIBOBJ invocations to module description.
77400         * m4/fwritable.m4 (gl_FUNC_FWRITABLE): Move AC_LIBOBJ invocation from
77401         here...
77402         * modules/fwritable (configure.ac): ... to here.
77404 2011-05-07  Bruno Haible  <bruno@clisp.org>
77406         futimens: Move AC_LIBOBJ invocations to module description.
77407         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Move AC_LIBOBJ invocations from
77408         here...
77409         * modules/futimens (configure.ac): ... to here.
77411 2011-05-07  Bruno Haible  <bruno@clisp.org>
77413         ftruncate: Move AC_LIBOBJ invocations to module description.
77414         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Move AC_LIBOBJ and
77415         gl_PREREQ_FTRUNCATE invocations from here...
77416         * modules/ftruncate (configure.ac): ... to here.
77418 2011-05-07  Bruno Haible  <bruno@clisp.org>
77420         fsync: Move AC_LIBOBJ invocations to module description.
77421         * m4/fsync.m4 (gl_FUNC_FSYNC): Move AC_LIBOBJ and gl_PREREQ_FSYNC
77422         invocations from here...
77423         * modules/fsync (configure.ac): ... to here.
77425 2011-05-07  Bruno Haible  <bruno@clisp.org>
77427         fsusage: Move AC_LIBOBJ invocations to module description.
77428         * m4/fsusage.m4 (gl_FUNC_FREOPEN): Move AC_LIBOBJ and
77429         gl_PREREQ_FSUSAGE_EXTRA invocations from here...
77430         * modules/fsusage (configure.ac): ... to here.
77432 2011-05-07  Bruno Haible  <bruno@clisp.org>
77434         freopen: Move AC_LIBOBJ invocations to module description.
77435         * m4/freopen.m4 (gl_FUNC_FREOPEN): Move AC_LIBOBJ and gl_PREREQ_FREOPEN
77436         invocations from here...
77437         * modules/freopen (configure.ac): ... to here.
77439 2011-05-07  Bruno Haible  <bruno@clisp.org>
77441         free: Move AC_LIBOBJ invocations to module description.
77442         * m4/free.m4 (gl_FUNC_FREE): Move AC_LIBOBJ and missing gl_PREREQ_FREE
77443         invocations from here...
77444         * modules/free (configure.ac): ... to here.
77446 2011-05-07  Bruno Haible  <bruno@clisp.org>
77448         freadable: Move AC_LIBOBJ invocations to module description.
77449         * m4/freadable.m4 (gl_FUNC_FREADABLE): Move AC_LIBOBJ invocation from
77450         here...
77451         * modules/freadable (configure.ac): ... to here.
77453 2011-05-07  Bruno Haible  <bruno@clisp.org>
77455         fpurge: Move AC_LIBOBJ invocations to module description.
77456         * m4/fpurge.m4 (gl_FUNC_FPURGE): Set HAVE_FPURGE. Move AC_LIBOBJ
77457         invocations from here...
77458         * modules/fpurge (configure.ac): ... to here.
77460 2011-05-07  Bruno Haible  <bruno@clisp.org>
77462         fpending: Move AC_LIBOBJ invocations to module description.
77463         * m4/fpending.m4 (gl_PREREQ_FPENDING): New macro, extracted from
77464         gl_FUNC_FPENDING.
77465         (gl_FUNC_FPENDING): Move AC_LIBOBJ and gl_PREREQ_FPENDING
77466         invocations from here...
77467         * modules/fpending (configure.ac): ... to here.
77469 2011-05-07  Bruno Haible  <bruno@clisp.org>
77471         fopen: Move AC_LIBOBJ invocations to module description.
77472         * m4/fopen.m4 (gl_FUNC_FOPEN): Move AC_LIBOBJ and gl_PREREQ_FOPEN
77473         invocations from here...
77474         * modules/fopen (configure.ac): ... to here.
77476 2011-05-07  Bruno Haible  <bruno@clisp.org>
77478         fnmatch, fnmatch-gnu: Move AC_LIBOBJ invocations to module description.
77479         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH): New macro, extracted from
77480         gl_FUNC_FNMATCH_POSIX.
77481         (gl_FUNC_FNMATCH_POSIX): Move AC_LIBOBJ and gl_PREREQ_FNMATCH
77482         invocations from here...
77483         * modules/fnmatch (configure.ac): ... to here.
77484         * modules/fnmatch-gnu (configure.ac): ... and here.
77486 2011-05-07  Bruno Haible  <bruno@clisp.org>
77488         flock: Move AC_LIBOBJ invocations to module description.
77489         * m4/flock.m4 (gl_FUNC_FLOCK): Move AC_LIBOBJ and gl_PREREQ_FLOCK
77490         invocations from here...
77491         * modules/flock (configure.ac): ... to here.
77493 2011-05-07  Bruno Haible  <bruno@clisp.org>
77495         fileblocks: Move AC_LIBOBJ invocations to module description.
77496         * m4/fileblocks.m4 (gl_FILEBLOCKS): Move AC_LIBOBJ and
77497         gl_PREREQ_FILEBLOCKS invocations from here...
77498         * modules/fileblocks (configure.ac): ... to here.
77500 2011-05-06  Bruno Haible  <bruno@clisp.org>
77502         fflush: Move AC_LIBOBJ invocations to module description.
77503         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Remove macro.
77504         (gl_FUNC_FFLUSH): Inline it here. Move AC_LIBOBJ and gl_PREREQ_FFLUSH
77505         invocations from here...
77506         * modules/fflush (configure.ac): ... to here.
77508 2011-05-06  Bruno Haible  <bruno@clisp.org>
77510         fdopendir: Move AC_LIBOBJ invocations to module description.
77511         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Move AC_LIBOBJ invocations from
77512         here...
77513         * modules/fdopendir (configure.ac): ... to here.
77514         (Depends-on): Improve conditions.
77516 2011-05-06  Bruno Haible  <bruno@clisp.org>
77518         _Exit: Move AC_LIBOBJ invocations to module description.
77519         * m4/_Exit.m4 (gl_FUNC__EXIT): Move AC_LIBOBJ and gl_PREREQ__EXIT
77520         invocations from here...
77521         * modules/_Exit (configure.ac): ... to here.
77523 2011-05-21  Bruno Haible  <bruno@clisp.org>
77525         euidaccess: Respect rules for use of AC_LIBOBJ.
77526         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Call AC_CHECK_FUNCS instead of
77527         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_EUIDACCESS invocations
77528         from here...
77529         * modules/euidaccess (configure.ac): ... to here.
77531 2011-05-06  Bruno Haible  <bruno@clisp.org>
77533         error: Move AC_LIBOBJ invocations to module description.
77534         * m4/error.m4 (gl_ERROR): Inline AC_FUNC_ERROR_AT_LINE. Remove
77535         AC_LIBSOURCES invocation. Move AC_LIBOBJ and gl_PREREQ_ERROR
77536         invocations from here...
77537         * modules/error (configure.ac): ... to here.
77539 2011-05-06  Bruno Haible  <bruno@clisp.org>
77541         duplocale: Move AC_LIBOBJ invocations to module description.
77542         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Move AC_LIBOBJ and
77543         gl_PREREQ_DUPLOCALE invocations from here...
77544         * modules/duplocale (configure.ac): ... to here.
77546 2011-05-05  Bruno Haible  <bruno@clisp.org>
77548         dirfd: Move AC_LIBOBJ invocations to module description.
77549         * m4/dirfd.m4 (gl_PREREQ_DIRFD): New macro, extracted from
77550         gl_FUNC_DIRFD.
77551         (gl_FUNC_DIRFD): Move AC_LIBOBJ and gl_PREREQ_DIRFD invocations from
77552         here...
77553         * modules/dirfd (configure.ac): ... to here.
77554         (Depends-on): Fix condition.
77556 2011-05-05  Bruno Haible  <bruno@clisp.org>
77558         chown: Respect rules for use of AC_LIBOBJ.
77559         * m4/chown.m4 (gl_FUNC_CHOWN): Move AC_LIBOBJ invocations from here...
77560         * modules/chown (configure.ac): ... to here.
77562 2011-05-05  Bruno Haible  <bruno@clisp.org>
77564         chdir-long: Move AC_LIBOBJ invocations to module description.
77565         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Move AC_LIBOBJ and
77566         gl_PREREQ_CHDIR_LONG invocations from here...
77567         * modules/chdir-long (configure.ac): ... to here.
77569 2011-05-05  Bruno Haible  <bruno@clisp.org>
77571         canonicalize-lgpl: Move AC_LIBOBJ invocations to module description.
77572         * m4/canonicalize.m4 (gl_CANONICALIZE_LGPL): Move AC_LIBOBJ invocation
77573         from here...
77574         * modules/canonicalize-lgpl (configure.ac): ... to here.
77576 2011-05-05  Bruno Haible  <bruno@clisp.org>
77578         calloc-posix, calloc-gnu: Move AC_LIBOBJs to module description.
77579         * m4/calloc.m4 (gl_REPLACE_CALLOC): Remove macro.
77580         (gl_FUNC_CALLOC_GNU, gl_FUNC_CALLOC_POSIX): Instead, just set
77581         REPLACE_CALLOC.
77582         * modules/calloc-posix (configure.ac): Invoke AC_LIBOBJ here.
77583         * modules/calloc-gnu (configure.ac): Likewise.
77585 2011-05-05  Bruno Haible  <bruno@clisp.org>
77587         btowc: Move AC_LIBOBJ invocations to module description.
77588         * m4/btowc.m4 (gl_FUNC_BTOWC): Move AC_LIBOBJ and gl_PREREQ_BTOWC
77589         invocations from here...
77590         * modules/btowc (configure.ac): ... to here.
77592 2011-05-21  Bruno Haible  <bruno@clisp.org>
77594         atexit: Move AC_LIBOBJ invocations to module description.
77595         * m4/atexit.m4 (gl_FUNC_ATEXIT): Call AC_CHECK_FUNCS instead of
77596         AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_ATEXIT invocations from
77597         here...
77598         * modules/atexit (configure.ac): ... to here.
77600 2011-05-05  Bruno Haible  <bruno@clisp.org>
77602         atoll: Move AC_LIBOBJ invocations to module description.
77603         * m4/atoll.m4 (gl_FUNC_ATOLL): Move AC_LIBOBJ and gl_PREREQ_ATOLL
77604         invocations from here...
77605         * modules/atoll (configure.ac): ... to here.
77607 2011-05-05  Bruno Haible  <bruno@clisp.org>
77609         argz: Move AC_LIBOBJ invocations to module description.
77610         * m4/argz.m4 (gl_FUNC_ARGZ): Move AC_LIBOBJ invocation from here...
77611         * modules/argz (configure.ac): ... to here.
77613 2011-05-05  Bruno Haible  <bruno@clisp.org>
77615         alphasort: Move AC_LIBOBJ invocations to module description.
77616         * m4/alphasort.m4 (gl_FUNC_ALPHASORT): Move AC_LIBOBJ and
77617         gl_PREREQ_ALPHASORT invocations from here...
77618         * modules/alphasort (configure.ac): ... to here.
77620 2011-06-15  Paul Eggert  <eggert@cs.ucla.edu>
77622         verify: new macro verify_expr; verify_true deprecated
77623         * NEWS: Mention this.
77624         * doc/verify.texi (Compile-time Assertions): Document this.
77625         * lib/verify.h (verify_true): Deprecate.
77626         (verify_expr): New macro.
77627         * tests/test-verify.c (function): Test verify_expr.
77629 2011-06-14  Jim Meyering  <meyering@redhat.com>
77631         init.sh: give more portable redirection-related advice in a comment
77632         * tests/init.sh (stderr_fileno_): Update the advice in comments.
77633         See http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/22488
77634         for lots of discussion.  Stefano Lattarini suggested the solution
77635         of putting "9>&2" after the command.  Reported by Bruno Haible.
77637 2011-06-13  Bruno Haible  <bruno@clisp.org>
77639         locale-zh: Reject zh_CN.GB18030 locale on Solaris 8.
77640         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): On Solaris 8, set LOCALE_ZH_CN to
77641         'none'.
77643 2011-06-13  Paul Eggert  <eggert@cs.ucla.edu>
77645         ftoastr: use strtof only if HAVE_STRTOF
77646         This is needed on HP-UX 11.11 with GCC 4.2.4; see Bruno Haible's report
77647         <http://lists.gnu.org/r/bug-gnulib/2011-06/msg00154.html>.
77648         * lib/ftoastr.c (STRTOF) [LENGTH == 1]: Use strtof only if HAVE_STRTOF.
77649         * modules/ftoastr (configure.ac): Check for strtof.
77651 2011-06-13  Bruno Haible  <bruno@clisp.org>
77653         gnulib-tool: Addendum to 2011-06-08 commit.
77654         * gnulib-tool (func_emit_lib_Makefile_am): If options --makefile-name
77655         and --witness-c-macro have been given, augment AM_CPPFLAGS.
77657 2011-06-13  Bruno Haible  <bruno@clisp.org>
77659         fseeko: Provide a non-inline replacement of fseek().
77660         * lib/stdio.in.h (fseek): Don't provide if module 'fseek' is not used.
77661         * modules/fseeko (Depends-on): Add fseek.
77662         * modules/fseek (License): Change to LGPLv2+.
77664 2011-06-13  Bruno Haible  <bruno@clisp.org>
77666         ftello: Provide a non-inline replacement of ftell().
77667         * lib/stdio.in.h (ftell): Don't provide if module 'ftell' is not used.
77668         * m4/ftell.m4 (gl_FUNC_FTELL): Replace ftell also if the system does
77669         not have ftello() (such as on mingw).
77670         * modules/ftello (Depends-on): Add ftell.
77671         * modules/ftell (License): Change to LGPLv2+.
77673 2011-05-07  Bruno Haible  <bruno@clisp.org>
77675         ftell: Move AC_LIBOBJ invocations to module description.
77676         * m4/ftell.m4 (gl_FUNC_FTELL): Move AC_LIBOBJ invocation from here...
77677         * modules/ftell (configure.ac): ... to here.
77679 2011-05-07  Bruno Haible  <bruno@clisp.org>
77681         ftello: Respect rules for use of AC_LIBOBJ.
77682         * m4/ftello.m4 (gl_REPLACE_FTELLO): Remove macro.
77683         (gl_FUNC_FTELLO): Inline it here. Move AC_LIBOBJ invocation from
77684         here...
77685         * modules/ftello (configure.ac): ... to here.
77687 2011-05-07  Bruno Haible  <bruno@clisp.org>
77689         fseeko: Simplify.
77690         * m4/fseeko.m4 (gl_HAVE_FSEEKO): Remove macro.
77691         (gl_FUNC_FSEEKO): Inline it here.
77693 2011-05-07  Bruno Haible  <bruno@clisp.org>
77695         fseek: Move AC_LIBOBJ invocations to module description.
77696         * m4/fseek.m4 (gl_REPLACE_FSEEK): Remove macro.
77697         (gl_FUNC_FSEEK): Inline it here. Move AC_LIBOBJ invocation from here...
77698         * modules/fseek (configure.ac): ... to here.
77700 2011-05-07  Bruno Haible  <bruno@clisp.org>
77702         fseek: Respect rules for use of AC_LIBOBJ.
77703         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Move gl_REPLACE_FSEEK invocation from
77704         here...
77705         * m4/fseek.m4 (gl_FUNC_FSEEK): ... to here.
77707 2011-05-07  Bruno Haible  <bruno@clisp.org>
77709         fseeko: Respect rules for use of AC_LIBOBJ.
77710         * m4/fseeko.m4 (gl_REPLACE_FSEEKO): Remove macro.
77711         (gl_FUNC_FSEEKO): Inline it here. Move AC_LIBOBJ invocation from
77712         here...
77713         * modules/fseeko (configure.ac): ... to here.
77715 2011-06-13  Bruno Haible  <bruno@clisp.org>
77717         gnulib-tool: Allow comments in the 'Depends-on' section.
77718         * doc/gnulib.texi (Module description): Mention comment syntax in the
77719         Depends-on section.
77720         * gnulib-tool (func_get_dependencies): Filter out comment lines.
77722 2011-06-13  Bruno Haible  <bruno@clisp.org>
77724         file-set.h: guard __attibute__ use, now that it's not always defined
77725         * lib/file-set.h (record_file): Use __attribute__ only with compiler
77726         versions that support it.  This fixes a coreutils build failure with
77727         the vendor cc on HP-UX 11.31.
77729 2011-06-12  Bruno Haible  <bruno@clisp.org>
77731         acl: Add support for HP-UX >= 11.11 JFS ACLs.
77732         * doc/acl-resources.txt: Add info about the ACL APIs on HP-UX.
77733         * m4/acl.m4 (gl_FUNC_ACL): Also test for HP-UX 11.11 API.
77734         * lib/acl-internal.h [HP-UX 11.11]: Include <aclv.h>.
77735         (acl, aclsort): New declarations.
77736         (aclv_nontrivial): New declaration.
77737         * lib/file-has-acl.c (aclv_nontrivial) [HP-UX 11.11]: New function.
77738         (file_has_acl): Read also the second kind of HP-UX ACLs.
77739         * lib/set-mode-acl.c (qset_acl) [HP-UX 11.11]: Try to set the second
77740         kind of HP-UX ACLs if the first kind fails.
77741         * lib/copy-acl.c (qcopy_acl) [HP-UX 11.11]: Read and set also the
77742         second kind of HP-UX ACLs.
77743         * tests/test-sameacls.c [HP-UX 11.11]: Include <aclv.h>.
77744         (main) [HP-UX 11.11]: Test also whether the second kind of HP-UX ACLs
77745         agree.
77746         * tests/test-file-has-acl.sh (acl_flavor) [HP-UX 11.11]: Set to
77747         hpuxjfs.
77748         Handle hpuxjfs.
77749         * tests/test-set-mode-acl.sh (acl_flavor) [HP-UX 11.11]: Set to
77750         hpuxjfs.
77751         Handle hpuxjfs.
77752         * tests/test-copy-acl.sh (acl_flavor) [HP-UX 11.11]: Set to hpuxjfs.
77753         (func_test_same_acls): Use both lsacl and getacl.
77754         Handle hpuxjfs.
77755         * tests/test-copy-file.sh (acl_flavor) [HP-UX 11.11]: Set to hpuxjfs.
77756         (func_test_same_acls): Use both lsacl and getacl.
77757         Handle hpuxjfs.
77759 2011-06-12  Bruno Haible  <bruno@clisp.org>
77761         acl: Complete the 2010-08-10 fix.
77762         * lib/file-has-acl.c (file_has_acl) [HP-UX]: Also test against ENOTSUP.
77763         * lib/set-mode-acl.c (qset_acl) [HP-UX]: Likewise.
77764         * lib/copy-acl.c (qcopy_acl) [HP-UX]: Test for the errno values
77765         explicitly.
77766         * tests/test-sameacls.c (main) [HP-UX]: Also test against ENOTSUP.
77767         Reported in <http://debbugs.gnu.org/db/60/6053.html>.
77769 2011-06-12  Bruno Haible  <bruno@clisp.org>
77771         spawn-pipe tests: Comments.
77772         * tests/test-spawn-pipe-child.c (main): Update comment.
77773         Reported by James Youngman <jay@gnu.org>.
77775 2011-06-11  James Youngman  <jay@gnu.org>
77777         New module 'stat-size'.
77778         * modules/stat-size: New module.  Provides macros for accessing
77779         file size information in instances of struct stat.  Depends on the
77780         fileblocks module because it calls st_blocks.
77781         * lib/stat-size.h: New file, adapted from coreutils' system.h.
77782         * doc/gnulib.texi: Include stat-size.texi.
77783         * doc/stat-size.texi: Documentation for this module.
77784         * m4/stat-size.m4: New file; defines gl_STAT_SIZE.
77785         * m4/fileblocks.m4: Mention that stat-size depends on the call to
77786         AC_STRUCT_ST_BLOCKS.
77788 2011-06-09  Bruno Haible  <bruno@clisp.org>
77790         thread: Support pthreads-win32.
77791         * lib/glthread/thread.h (gl_thread_self): Define differently on
77792         pthreads-win32.
77793         (gl_null_thread): New declaration.
77794         (gl_thread_self_pointer): New macro.
77795         * lib/glthread/thread.c (gl_null_thread): New constant.
77796         * tests/test-lock.c: Use gl_thread_self_pointer instead of
77797         gl_thread_self.
77798         * tests/test-tls.c: Likewise.
77799         Suggested by Paul Eggert. Reported by Eric Blake.
77801 2011-06-09  Bruno Haible  <bruno@clisp.org>
77803         thread: Fix confusion between NULL and 0.
77804         * lib/glthread/thread.h (gl_thread_self): Use NULL and 0 appropriately.
77805         Reported by Paul Eggert.
77807 2011-06-09  Bruno Haible  <bruno@clisp.org>
77809         spawn-pipe tests: Avoid test failure on HP-UX 11.
77810         * tests/test-spawn-pipe-child.c (main) [HP-UX]: Don't assert that fd 2
77811         is closed.
77813 2011-06-09  Bruno Haible  <bruno@clisp.org>
77815         acl tests: Fix compilation error on HP-UX 11.
77816         * tests/test-sameacls.c: Include <sys/acl.h> also on HP-UX.
77818 2011-06-09  Bruno Haible  <bruno@clisp.org>
77820         rmdir: Avoid test failure on HP-UX 10.20.
77821         * tests/test-rmdir.h (test_rmdir_func): Accept ENOTEMPTY error, like
77822         EEXIST.
77824 2011-06-08  Eric Blake  <eblake@redhat.com>
77826         perror: fix test on mingw
77827         * modules/perror-tests (Depends-on): Add dup2.
77829         strerror_r-posix: fix on MacOS
77830         * m4/strerror.m4 (gl_FUNC_STRERROR): Flush out MacOS bug.
77831         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS): Likewise, and fix
77832         logic bug.
77833         * lib/strerror_r.c (strerror_r): Fix the bug.
77834         * lib/strerror.c (strerror): Likewise.
77835         * doc/posix-functions/strerror_r.texi (strerror_r): Document the
77836         problem.
77837         * doc/posix-functions/strerror.texi (strerror): Likewise.
77838         * doc/posix-functions/perror.texi (perror): Likewise.
77839         * tests/test-strerror.c (main): Enhance test.
77840         * tests/test-strerror_r.c (main): Likewise.
77842 2011-06-08  Bruno Haible  <bruno@clisp.org>
77844         gnulib-tool: Better isolation between different gnulib-tool invocations.
77845         * gnulib-tool: New option --witness-c-macro.
77846         (witness_c_macro): New variable.
77847         (func_emit_lib_Makefile_am): If --witness-c-macro was specified, let
77848         AM_CPPFLAGS define it as a C macro.
77849         (func_emit_tests_Makefile_am): Likewise.
77850         (func_import): Store witness_c_macro setting in gnulib-cache.m4 and
77851         read it from there.
77852         * m4/gnulib-common.m4 (gl_MODULE_INDICATOR_CONDITION): Define through
77853         m4_define, not AC_DEFUN.
77854         (gl_MODULE_INDICATOR_SET_VARIABLE_AUX,
77855         gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR): New macros.
77856         (gl_MODULE_INDICATOR_SET_VARIABLE): Use them.
77857         * modules/arpa_inet (Makefile.am): Use sed expression s/.../.../, not
77858         s|...|...|, to substitute the values of the GNULIB_* module indicator
77859         variables.
77860         * modules/dirent (Makefile.am): Likewise.
77861         * modules/fcntl-h (Makefile.am): Likewise.
77862         * modules/iconv-h (Makefile.am): Likewise.
77863         * modules/langinfo (Makefile.am): Likewise.
77864         * modules/locale (Makefile.am): Likewise.
77865         * modules/math (Makefile.am): Likewise.
77866         * modules/netdb (Makefile.am): Likewise.
77867         * modules/poll-h (Makefile.am): Likewise.
77868         * modules/pty (Makefile.am): Likewise.
77869         * modules/search (Makefile.am): Likewise.
77870         * modules/signal (Makefile.am): Likewise.
77871         * modules/spawn (Makefile.am): Likewise.
77872         * modules/stdio (Makefile.am): Likewise.
77873         * modules/stdlib (Makefile.am): Likewise.
77874         * modules/string (Makefile.am): Likewise.
77875         * modules/sys_ioctl (Makefile.am): Likewise.
77876         * modules/sys_select (Makefile.am): Likewise.
77877         * modules/sys_socket (Makefile.am): Likewise.
77878         * modules/sys_stat (Makefile.am): Likewise.
77879         * modules/sys_times (Makefile.am): Likewise.
77880         * modules/sys_utsname (Makefile.am): Likewise.
77881         * modules/sys_wait (Makefile.am): Likewise.
77882         * modules/termios (Makefile.am): Likewise.
77883         * modules/time (Makefile.am): Likewise.
77884         * modules/unistd (Makefile.am): Likewise.
77885         * modules/wchar (Makefile.am): Likewise.
77887 2011-06-08  Eric Blake  <eblake@redhat.com>
77889         strerror: simplify replacement
77890         * m4/strerror.m4 (gl_PREREQ_STRERROR): Delete.
77891         * modules/strerror (configure.ac): No prereqs needed here...
77892         * modules/strerror-override (configure.ac): ...but this needs it.
77893         (Files): Add file for needed prereq macro.
77895 2011-06-08  Bruno Haible  <bruno@clisp.org>
77897         strerror_r-posix: Tweaks.
77898         * m4/strerror.m4 (gl_FUNC_STRERROR): Omit the code that tests
77899         gl_cv_func_strerror_r_works if gl_FUNC_STRERROR_R_WORKS is not present.
77900         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS): Fix AC_CACHE_CHECK
77901         message. Move gl_HEADER_STRING_H_DEFAULTS invocation from here...
77902         (gl_FUNC_STRERROR_R): ... to here.
77903         (gl_PREREQ_STRERROR_R): Test for __xpg_strerror_r.
77905 2011-06-07  Eric Blake  <eblake@redhat.com>
77907         perror: document fixed bugs
77908         * doc/posix-functions/perror.texi (perror): Document recent
77909         patches.
77911 2011-06-07  Paul Eggert  <eggert@cs.ucla.edu>
77913         stat-time: get_stat_birthtime failure is better-defined
77914         * lib/stat-time.h (get_stat_birthtime): If the time is not available,
77915         return a timestamp whose tv_sec and tv_nsec values are both -1.
77916         Previously, the spec said only that the tv_nsec value was negative.
77917         This upward-compatible change simplifies GNU tar a bit.
77919 2011-06-07  Eric Blake  <eblake@redhat.com>
77921         strerror_r-posix: work around cygwin 1.7.9
77922         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Split...
77923         (gl_FUNC_STRERROR_R_WORKS): ...into new macro, to detect Cygwin
77924         bug without replacing strerror_r.
77925         * m4/strerror.m4 (gl_FUNC_STRERROR): Replace strerror if
77926         strerror_r is buggy, but without requiring strerror_r compilation.
77927         * doc/posix-functions/strerror_r.texi (strerror_r): Fix docs.
77929         test-perror: relax test to ignore cygwin bug
77930         * tests/test-perror2.c (main): Relax test on requiring detection
77931         of stream errors, and use unbuffered stream.
77932         * doc/posix-functions/dprintf.texi (dprintf): Document bug.
77933         * doc/posix-functions/fprintf.texi (fprintf): Likewise.
77934         * doc/posix-functions/fputc.texi (fputc): Likewise.
77935         * doc/posix-functions/fputs.texi (fputs): Likewise.
77936         * doc/posix-functions/fputws.texi (fputws): Likewise.
77937         * doc/posix-functions/fwprintf.texi (fwprintf): Likewise.
77938         * doc/posix-functions/fwrite.texi (fwrite): Likewise.
77939         * doc/posix-functions/getopt.texi (getopt): Likewise.
77940         * doc/posix-functions/perror.texi (perror): Likewise.
77941         * doc/posix-functions/printf.texi (printf): Likewise.
77942         * doc/posix-functions/psiginfo.texi (psiginfo): Likewise.
77943         * doc/posix-functions/psignal.texi (psignal): Likewise.
77944         * doc/posix-functions/putc.texi (putc): Likewise.
77945         * doc/posix-functions/putc_unlocked.texi (putc_unlocked):
77946         Likewise.
77947         * doc/posix-functions/putchar.texi (putchar): Likewise.
77948         * doc/posix-functions/putchar_unlocked.texi (putchar_unlocked):
77949         Likewise.
77950         * doc/posix-functions/puts.texi (puts): Likewise.
77951         * doc/posix-functions/putwc.texi (putwc): Likewise.
77952         * doc/posix-functions/putwchar.texi (putwchar): Likewise.
77953         * doc/posix-functions/vdprintf.texi (vdprintf): Likewise.
77954         * doc/posix-functions/vfprintf.texi (vfprintf): Likewise.
77955         * doc/posix-functions/vfwprintf.texi (vfwprintf): Likewise.
77956         * doc/posix-functions/vprintf.texi (vprintf): Likewise.
77957         * doc/posix-functions/vwprintf.texi (vwprintf): Likewise.
77958         * doc/posix-functions/wordexp.texi (wordexp): Likewise.
77959         * doc/posix-functions/wprintf.texi (wprintf): Likewise.
77961 2011-05-22  Bruno Haible  <bruno@clisp.org>
77963         strerror: Move AC_LIBOBJ invocations to module description.
77964         * m4/strerror.m4 (gl_FUNC_STRERROR): Move AC_LIBOBJ and
77965         gl_PREREQ_STRERROR invocations from here...
77966         * modules/strerror (configure.ac): ... to here.
77968 2011-05-21  Bruno Haible  <bruno@clisp.org>
77970         perror: Use common idiom.
77971         * modules/perror (configure.ac): Reorder statements.
77973 2011-06-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
77975         tests: fix usage message in 'mktempd_'
77976         * tests/init.sh (mktempd_): In the usage message, use literal
77977         'mktempd_', not '$ME' (which is even undefined), as the name of
77978         the subroutine.
77980 2011-06-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
77982         tests init: new function 'fatal_', for hard errors
77983         Before this patch, the only way offered by tests/init.sh to
77984         properly signal a hard error was the `framework_failure_'
77985         function.  But the error message issued by that function,
77986         as its name would suggest, refers to a set-up failure in the
77987         testsuite, while hard errors can obviously also be due to
77988         other reasons.  The best way to fix this inconsistency is to
77989         introduce a new function with a more general error message.
77990         * tests/init.sh (fatal_): New function.
77992 2011-06-06  Eric Blake  <eblake@redhat.com>
77994         canonicalize-lgpl: use common idiom
77995         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Prefer older rm -rf
77996         over newer POSIX -Rf.
77997         Reported by Bruno Haible.
77999         canonicalize-lgpl: work around AIX realpath bug
78000         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Expose AIX bug.
78001         * doc/posix-functions/realpath.texi (realpath): Document it.
78002         Reported by Bruno Haible.
78004         strerror: work around FreeBSD bug
78005         * lib/strerror.c (strerror): Special case 0.
78006         Reported by Bruno Haible.
78008         strerror-override: avoid bloating errno module
78009         * modules/errno (Files, configure.ac): Move replacement strings...
78010         * modules/strerror-override: ...to new module.
78011         * modules/strerror (Depends-on): Add strerror-override.
78012         * modules/strerror_r-posix (Depends-on): Likewise.
78013         * MODULES.html.sh: Document new module.
78014         Reported by Bruno Haible.
78016 2011-06-06  Bruno Haible  <bruno@clisp.org>
78018         spawn-pipe tests: Rename program.
78019         * tests/test-spawn-pipe-main.c: Renamed from tests/test-spawn-pipe.c.
78020         * tests/test-spawn-pipe-child.c: Update comment.
78021         * tests/test-spawn-pipe.sh: Update.
78022         * modules/spawn-pipe-tests (Files, Makefile.am): Update.
78024         spawn-pipe tests: Link the child program only against libc.
78025         * tests/test-spawn-pipe-child.c: New file, extracted from
78026         tests/test-spawn-pipe.c.
78027         (main): Expect only one argument.
78028         (is_open): New function, copied from tests/test-pipe.c.
78029         * tests/test-spawn-pipe.c: Don't include <errno.h>.
78030         (child_main): Remove function.
78031         (test_pipe): Pass only one argument to the child program.
78032         (main): Remove child process code. Expect the child program's name as
78033         first argument.
78034         * tests/test-spawn-pipe.sh: Pass the child program's name as first
78035         argument.
78036         * modules/spawn-pipe-tests (Files): Add tests/test-spawn-pipe-child.c.
78037         (Makefile.am): Add test-spawn-pipe-child to check_PROGRAMS. Link
78038         test-spawn-pipe-child against no libraries.
78040 2011-06-06  Bruno Haible  <bruno@clisp.org>
78042         careadlinkat: Avoid mismatch between ssize_t and int.
78043         * lib/careadlinkat.h (careadlinkatcwd): Declare as a function always.
78044         * lib/careadlinkat.c (careadlinkatcwd): Define always.
78046 2011-06-06  Jim Meyering  <meyering@redhat.com>
78048         gnulib-common.m4: add _GL_ATTRIBUTE_CONST and _GL_ATTRIBUTE_PURE
78049         * m4/gnulib-common.m4 (gl_COMMON): Emit definitions of
78050         _GL_ATTRIBUTE_CONST and _GL_ATTRIBUTE_PURE.
78052 2011-06-05  Bruno Haible  <bruno@clisp.org>
78054         ansi-c++-opt: Interoperability with libtool.
78055         * m4/ansi-c++.m4 (gl_PROG_ANSI_CXX): When a C++ compiler is not found,
78056         set the variable to "no", not to ":".
78057         * NEWS: Mention the change.
78059 2011-06-05  Bruno Haible  <bruno@clisp.org>
78061         acl: Fix test failure on AIX 7.
78062         * tests/test-sameacls.c (main) [AIX]: Fix aclx_printStr invocation.
78063         Based on a patch by Jørn Amundsen <Jorn.Amundsen@ntnu.no>.
78065 2011-06-05  Bruno Haible  <bruno@clisp.org>
78067         pipe-filter-ii: Fix test failure on AIX and IRIX.
78068         * lib/pipe-filter-ii.c (pipe_filter_ii_execute): When write() fails
78069         with EAGAIN, retry with a smaller buffer size.
78071 2011-06-05  Bruno Haible  <bruno@clisp.org>
78073         localename: Fix link dependencies.
78074         * modules/localename (Link): Mention $(LIBTHREAD) or $(LTLIBTHREAD).
78075         * modules/localename-tests (Makefile.am): Link test-localename with
78076         $(LIBTHREAD).
78078 2011-06-05  Bruno Haible  <bruno@clisp.org>
78080         error: Avoid gcc warning.
78081         * lib/error.c (strerror_r): Declare also when its return type is 'int'.
78083 2011-06-05  Bruno Haible  <bruno@clisp.org>
78085         unsetenv: Avoid gcc warning.
78086         * lib/unsetenv.c (unsetenv): Provide declaration if system lacks it.
78088 2011-06-05  Bruno Haible  <bruno@clisp.org>
78090         setenv: Avoid gcc warning.
78091         * lib/setenv.c (setenv): Provide declaration if system lacks it.
78093 2011-06-05  Bruno Haible  <bruno@clisp.org>
78095         sys_select: Ensure memset is declared also on AIX 7.
78096         * lib/sys_select.in.h: Include <string.h> also on AIX.
78097         * doc/posix-headers/sys_select.texi: Mention that <sys/select.h> is not
78098         self-contained also on AIX 7.1.
78100 2011-06-04  Jim Meyering  <meyering@redhat.com>
78102         maint.mk: sc_unmarked_diagnostics: don't hard-code "error"
78103         * top/maint.mk (sc_unmarked_diagnostics): Don't hard-code the
78104         function name, "error".
78105         (_gl_translatable_diag_func_re): New configurable variable.
78107 2011-06-04  Bruno Haible  <bruno@clisp.org>
78109         getopt: Avoid gcc warning.
78110         * lib/getopt.c (_getopt_internal_r): Remove unused variable 'ambig'.
78112 2011-06-04  Bruno Haible  <bruno@clisp.org>
78114         strerror_r: Fix comments.
78115         * lib/strerror_r.c (strerror_r): Update comments after 2011-06-01
78116         commit.
78118 2011-06-04  Bruno Haible  <bruno@clisp.org>
78120         perror: Fix compilation error.
78121         * lib/perror.c: Don't include intprops.h, verify.h, strerror-impl.h.
78122         Undefine fprintf, not sprintf.
78123         * modules/perror (Depends-on): Remove intprops, verify.
78125 2011-06-04  Bruno Haible  <bruno@clisp.org>
78127         setlocale: Enable replacement on Cygwin 1.5.
78128         * m4/setlocale.m4 (gl_FUNC_SETLOCALE): Set REPLACE_SETLOCALE also on
78129         Cygwin 1.5.x.
78130         * doc/posix-functions/setlocale.texi: Mention that the problem with the
78131         LC_CTYPE category also exists on Cygwin 1.5.x.
78133 2011-06-04  Bruno Haible  <bruno@clisp.org>
78135         strerror-override: Don't disable symbol renamings.
78136         * lib/strerror-override.h: Include errno.h and stddef.h, not string.h.
78137         * lib/strerror-override.c: Include config.h.
78138         (strerror_override): Don't undefine.
78140 2011-06-03  Bruno Haible  <bruno@clisp.org>
78142         Copyright: Use LGPL 2.1 instead of LGPL 2.0.
78143         * lib/localename.h: Update copyright header.
78144         * lib/localename.c: Likewise.
78145         * lib/relocatable.h: Likewise.
78146         * lib/relocatable.c: Likewise.
78148 2011-06-02  Bruno Haible  <bruno@clisp.org>
78150         doc: Fix a module name.
78151         * doc/posix-functions/open.texi: Fix module name 'nonblocking'.
78153 2011-06-02  Bruno Haible  <bruno@clisp.org>
78155         pipe2: Remove dependency on 'nonblocking' module.
78156         * lib/pipe2.c: Include verify.h. Include nonblocking.h only if
78157         O_NONBLOCK is defined by gnulib.
78158         (pipe2) [WIN32]: If O_NONBLOCK is not defined by gnulib, verify that it
78159         is zero.
78160         * modules/pipe2 (Depends-on): Add verify. Remove nonblocking.
78161         * tests/test-pipe2.c: Include nonblocking.h only if O_NONBLOCK is
78162         defined by gnulib.
78163         (get_nonblocking_flag): New function.
78164         (main): Test O_NONBLOCK flag only if it is nonzero.
78165         * doc/glibc-functions/pipe2.texi: Mention the 'nonblocking' module.
78167 2011-06-03  Jim Meyering  <meyering@redhat.com>
78169         maint: three new prohibit-header-without-use rules
78170         Prohibit use of cloexec.h, posixver.h, same.h without use.
78171         * top/maint.mk (sc_prohibit_cloexec_without_use): New rule.
78172         (sc_prohibit_posixver_without_use): Likewise.
78173         (sc_prohibit_same_without_use): Likewise.
78175 2011-06-02  Paul Eggert  <eggert@cs.ucla.edu>
78177         allocator: 'die' routine is now given requested size
78178         * lib/allocator.h (struct allocator.die): New size arg.
78179         * lib/careadlinkat.c (careadlinkat): Pass size to 'die' function.
78180         If the actual problem is an ssize_t limitation, not a size_t or
78181         malloc failure, fail with errno==ENAMETOOLONG instead of calling 'die'.
78183 2011-06-01  Eric Blake  <eblake@redhat.com>
78185         strerror: drop strerror_r dependency
78186         * lib/strerror_r.c (strerror_r): Move gnulib replacement strings...
78187         * lib/strerror-override.c (strerror_override): ...to new file.
78188         * lib/strerror-override.h: Add prototype.
78189         * lib/strerror-impl.h: Delete.
78190         * lib/strerror.c (strerror): New implementation.
78191         * modules/errno (Files): Add new files.
78192         (configure.ac): Compile new file as appropriate.
78193         * modules/strerror (Files): Drop unused file.
78194         (Depends-on): Drop strerror_r-posix.
78195         * MODULES.html.sh: Document strerror_r-posix.
78196         Requested by Sam Steingold.
78198         perror: call strerror_r directly
78199         * modules/perror (Files): Drop strerror-impl.h.
78200         * lib/perror.c (perror): Use our own stack buffer, rather than
78201         calling a wrapper that uses static storage.
78202         * doc/posix-functions/perror.texi (perror): Document a limitation
78203         of our replacement.
78205         strerror_r: fix includes for FreeBSD
78206         * lib/strerror_r.c (includes): Use <stdlib.h> unconditionally,
78207         since we use abort on some platforms.
78208         Reported by Matthias Bolte.
78210 2011-05-31  Bruno Haible  <bruno@clisp.org>
78212         Fix link errors in tests: openat-die uses gettext-h.
78213         * modules/areadlinkat-tests (Makefile.am): Link test-areadlinkat
78214         against $(LIBINTL).
78215         * modules/dirent-safer-tests (Makefile.am): Link test-dirent-safer
78216         against $(LIBINTL).
78217         * modules/fdopendir-tests (Makefile.am): Link test-fdopendir against
78218         $(LIBINTL).
78219         * modules/fdutimensat-tests (Makefile.am): Link test-fdutimensat
78220         against $(LIBINTL).
78221         * modules/linkat-tests (Makefile.am): Link test-linkat against
78222         $(LIBINTL).
78223         * modules/mkfifoat-tests (Makefile.am): Link test-mkfifoat against
78224         $(LIBINTL).
78225         * modules/openat-safer-tests (Makefile.am): Link test-openat-safer
78226         against $(LIBINTL).
78227         * modules/openat-tests (Makefile.am): Link test-fchownat, test-fstatat,
78228         test-mkdirat, test-openat, test-unlinkat against $(LIBINTL).
78229         * modules/readlinkat-tests (Makefile.am): Link test-readlinkat against
78230         $(LIBINTL).
78231         * modules/symlinkat-tests (Makefile.am): Link test-symlinkat against
78232         $(LIBINTL).
78233         * modules/utimensat-tests (Makefile.am): Link test-utimensat against
78234         $(LIBINTL).
78235         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
78237 2011-05-31  Bruno Haible  <bruno@clisp.org>
78239         Fix link errors in tests: wait-process uses gettext-h.
78240         * modules/nonblocking-pipe-tests (Makefile.am): Set
78241         test_nonblocking_pipe_main_LDADD.
78242         * modules/nonblocking-socket-tests (Makefile.am): Link
78243         test-nonblocking-socket-main against $(LIBINTL).
78244         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
78246 2011-05-29  Paul Eggert  <eggert@cs.ucla.edu>
78248         assert-h: work around 'verify' incompatibility
78249         * lib/verify.h: Use @...@ directives, not ifdef.
78250         * modules/assert-h (assert.h): Implement the directives.
78251         (assert.h): Substitute the symbol-prefix more consistently.
78253 2011-05-29  Jim Meyering  <meyering@redhat.com>
78255         trim: remove three superfluous assignments
78256         * lib/trim.c (trim2): Remove three superfluous assignments
78257         and correct brace positioning.
78259 2011-05-29  Bruno Haible  <bruno@clisp.org>
78261         wctype-h: Avoid namespace pollution on Solaris 2.6.
78262         * lib/wctype.in.h: On Solaris, undefine 'multibyte' and a few other
78263         identifiers.
78264         * doc/posix-headers/wctype.texi: Mention the problem.
78265         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
78267 2011-05-28  Jim Meyering  <meyering@redhat.com>
78269         parse-datetime.y: accommodate -Wstrict-overflow
78270         * lib/parse-datetime.y (yylex): Rearrange pointer arithmetic to
78271         placate -Wstrict-overflow.
78273         trim: avoid a warning from -O2 -Wstrict-overflow
78274         * lib/trim.c (trim2): Declare local to be "unsigned int", not "int".
78276 2011-05-29  Bruno Haible  <bruno@clisp.org>
78278         gnulib-tool: Fix bug in yesterday's commit.
78279         * gnulib-tool (func_create_testdir): Don't add gltests to $subdirs
78280         twice.
78282 2011-05-29  Bruno Haible  <bruno@clisp.org>
78284         Allow multiple gnulib generated include files to be combined.
78285         * gnulib-tool (func_compute_include_guard_prefix): New function.
78286         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Resolve also
78287         ${gl_include_guard_prefix} references.
78288         (func_import, func_create_testdir): Invoke
78289         func_compute_include_guard_prefix.
78290         * lib/arpa_inet.in.h: Use the @GUARD_PREFIX@ placeholder.
78291         * lib/ctype.in.h: Likewise.
78292         * lib/dirent.in.h: Likewise.
78293         * lib/errno.in.h: Likewise.
78294         * lib/fcntl.in.h: Likewise.
78295         * lib/float.in.h: Likewise.
78296         * lib/getopt.in.h: Likewise.
78297         * lib/iconv.in.h: Likewise.
78298         * lib/langinfo.in.h: Likewise.
78299         * lib/locale.in.h: Likewise.
78300         * lib/math.in.h: Likewise.
78301         * lib/netdb.in.h: Likewise.
78302         * lib/netinet_in.in.h: Likewise.
78303         * lib/poll.in.h: Likewise.
78304         * lib/pthread.in.h: Likewise.
78305         * lib/pty.in.h: Likewise.
78306         * lib/sched.in.h: Likewise.
78307         * lib/se-selinux.in.h: Likewise.
78308         * lib/search.in.h: Likewise.
78309         * lib/signal.in.h: Likewise.
78310         * lib/spawn.in.h: Likewise.
78311         * lib/stdarg.in.h: Likewise.
78312         * lib/stddef.in.h: Likewise.
78313         * lib/stdint.in.h: Likewise.
78314         * lib/stdio.in.h: Likewise.
78315         * lib/stdlib.in.h: Likewise.
78316         * lib/string.in.h: Likewise.
78317         * lib/strings.in.h: Likewise.
78318         * lib/sys_file.in.h: Likewise.
78319         * lib/sys_ioctl.in.h: Likewise.
78320         * lib/sys_select.in.h: Likewise.
78321         * lib/sys_socket.in.h: Likewise.
78322         * lib/sys_stat.in.h: Likewise.
78323         * lib/sys_time.in.h: Likewise.
78324         * lib/sys_times.in.h: Likewise.
78325         * lib/sys_uio.in.h: Likewise.
78326         * lib/sys_utsname.in.h: Likewise.
78327         * lib/sys_wait.in.h: Likewise.
78328         * lib/sysexits.in.h: Likewise.
78329         * lib/termios.in.h: Likewise.
78330         * lib/time.in.h: Likewise.
78331         * lib/unistd.in.h: Likewise.
78332         * lib/wchar.in.h: Likewise.
78333         * lib/wctype.in.h: Likewise.
78334         * modules/arpa_inet (Makefile.am): Substitute @GUARD_PREFIX@.
78335         * modules/ctype (Makefile.am): Likewise.
78336         * modules/dirent (Makefile.am): Likewise.
78337         * modules/errno (Makefile.am): Likewise.
78338         * modules/fcntl-h (Makefile.am): Likewise.
78339         * modules/float (Makefile.am): Likewise.
78340         * modules/getopt-posix (Makefile.am): Likewise.
78341         * modules/iconv-h (Makefile.am): Likewise.
78342         * modules/langinfo (Makefile.am): Likewise.
78343         * modules/locale (Makefile.am): Likewise.
78344         * modules/math (Makefile.am): Likewise.
78345         * modules/netdb (Makefile.am): Likewise.
78346         * modules/netinet_in (Makefile.am): Likewise.
78347         * modules/poll-h (Makefile.am): Likewise.
78348         * modules/pthread (Makefile.am): Likewise.
78349         * modules/pty (Makefile.am): Likewise.
78350         * modules/sched (Makefile.am): Likewise.
78351         * modules/search (Makefile.am): Likewise.
78352         * modules/selinux-h (Makefile.am): Likewise.
78353         * modules/signal (Makefile.am): Likewise.
78354         * modules/spawn (Makefile.am): Likewise.
78355         * modules/stdarg (Makefile.am): Likewise.
78356         * modules/stddef (Makefile.am): Likewise.
78357         * modules/stdint (Makefile.am): Likewise.
78358         * modules/stdio (Makefile.am): Likewise.
78359         * modules/stdlib (Makefile.am): Likewise.
78360         * modules/string (Makefile.am): Likewise.
78361         * modules/strings (Makefile.am): Likewise.
78362         * modules/sys_file (Makefile.am): Likewise.
78363         * modules/sys_ioctl (Makefile.am): Likewise.
78364         * modules/sys_select (Makefile.am): Likewise.
78365         * modules/sys_socket (Makefile.am): Likewise.
78366         * modules/sys_stat (Makefile.am): Likewise.
78367         * modules/sys_time (Makefile.am): Likewise.
78368         * modules/sys_times (Makefile.am): Likewise.
78369         * modules/sys_uio (Makefile.am): Likewise.
78370         * modules/sys_utsname (Makefile.am): Likewise.
78371         * modules/sys_wait (Makefile.am): Likewise.
78372         * modules/sysexits (Makefile.am): Likewise.
78373         * modules/termios (Makefile.am): Likewise.
78374         * modules/time (Makefile.am): Likewise.
78375         * modules/unistd (Makefile.am): Likewise.
78376         * modules/wchar (Makefile.am): Likewise.
78377         * modules/wctype-h (Makefile.am): Likewise.
78378         * modules/assert-h (Makefile.am): Replace _GL_VERIFY_H specially.
78380 2011-05-29  Bruno Haible  <bruno@clisp.org>
78382         assert-h: Allow multiple gnulib generated replacements to coexist.
78383         * lib/verify.h (struct _gl_verify_type): Avoid identical redefinition.
78385 2011-05-29  Bruno Haible  <bruno@clisp.org>
78387         argp: Allow coexistence with strerror_r-posix module.
78388         * lib/argp-help.c (__argp_failure): If strerror_r is defined as a macro
78389         (either to __xpg_strerror_r by glibc's <string.h> or to rpl_strerror_r
78390         by gnulib's <string.h> replacement), assume it has the POSIX signature,
78391         not the glibc signature.
78393 2011-05-28  Bruno Haible  <bruno@clisp.org>
78395         gnulib-tool: Alternative structure of testdirs, similar to --import.
78396         * gnulib-tool: New option --single-configure.
78397         (func_usage): Document it.
78398         (single_configure): New variable.
78399         (func_modules_transitive_closure_separately,
78400         func_modules_transitive_closure_separately,
78401         func_determine_use_libtests, func_modules_add_dummy_separately,
78402         func_modules_to_filelist_separately): New functions, extracted from
78403         func_import.
78404         (func_emit_tests_Makefile_am): Handle $single_configure = true case.
78405         (func_import): Use the new functions.
78406         (func_create_testdir): Set final_modules. Handle $single_configure =
78407         true case.
78409 2011-05-28  Bruno Haible  <bruno@clisp.org>
78411         getloadavg: Remove an unreliable safety check.
78412         * m4/getloadavg.m4 (gl_GETLOADAVG): Drop argument. Remove test whether
78413         getloadavg.c is in place.
78414         * modules/getloadavg (configure.ac): Drop argument of gl_GETLOADAVG.
78415         Reported by Sam Steingold <sds@gnu.org>.
78417 2011-05-28  Bruno Haible  <bruno@clisp.org>
78419         doc: Cleanup yet another file produced by texinfo.tex.
78420         * doc/Makefile (mostlyclean): Remove also gnulib.cn.
78422 2011-05-28  Bruno Haible  <bruno@clisp.org>
78424         Finish the conditional dependencies mechanism.
78425         * gnulib-tool: New option --no-conditional-dependencies.
78426         (func_usage): Document it. Don't mark --conditional-dependencies as
78427         experimental.
78428         (cond_dependencies): The possible values can now be true, false, empty.
78429         (func_modules_transitive_closure, func_emit_autoconf_snippets): Update.
78430         (func_import): Store setting in gnulib-cache.m4 and read it from there.
78431         * doc/gnulib-tool.texi (Conditional dependencies): New section.
78433 2011-05-28  Bruno Haible  <bruno@clisp.org>
78435         doc: Use a recent texinfo.tex.
78436         * doc/Makefile (tex_opts): New variable.
78437         (%.dvi, %.pdf): Pass it to texi2dvi and texi2pdf.
78439 2011-05-28  Jim Meyering  <meyering@redhat.com>
78441         intprops.h: adjust comment to match code change
78442         * lib/intprops.h (_GL_INT_CONVERT): Adjust comment: now that E is used
78443         only once, it *may* have side effects.  Also fix an unrelated typo.
78444         (_GL_INT_SIGNED): Likewise.
78446 2011-05-26  Simon Josefsson  <simon@josefsson.org>
78448         * lib/gen-uni-tables.c: Say "gen-uni-tables.c" consistently.
78450 2011-05-26  Bruno Haible  <bruno@clisp.org>
78452         mbsrchr: Avoid collision with system function on Interix.
78453         * lib/string.in.h (mbsrchr): Define as rpl_mbsrchr also on Interix.
78454         Reported by Markus Duft <mduft@gentoo.org>.
78456 2011-05-15  James Youngman  <jay@gnu.org>
78458         getopt: for ambiguous options, enumerate the possibilities.
78459         * lib/getopt.c (_getopt_internal_r): Merge glibc change printing
78460         the ambiguous options when an ambiguous prefix is given. This was
78461         http://sourceware.org/bugzilla/show_bug.cgi?id=7101.  The merged
78462         glibc change was
78463         http://sourceware.org/git/?p=glibc.git;a=commit;h=bd25564e1e98910ed69043ed6a6f884ce60e5780.
78465 2011-05-25  Eric Blake  <eblake@redhat.com>
78467         getcwd: work around mingw bug
78468         * lib/getcwd-lgpl.c (rpl_getcwd): Guarantee correct error.
78469         * doc/posix-functions/getcwd.texi (getcwd): Document it.
78470         Reported by Matthias Bolte.
78472 2011-05-24  Paul Eggert  <eggert@cs.ucla.edu>
78474         test-intprops: disable -Wtype-limits diagnostics
78475         * tests/test-intprops.c: Use a pragma to ignore -Wtype-limits
78476         diagnostics.  Otherwise, the integer overflow macros generate many
78477         diagnostics.  Reported by Jim Meyering in
78478         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00528.html>.
78480         intprops: shorten, to pacify gcc -Woverlength-strings
78481         * lib/intprops.h (_GL_INT_CONVERT, _GL_INT_NEGATE_CONVERT):
78482         (_GL_BINARY_OP_OVERFLOW): Say "0 * (x)" rather than "(x) - (x)",
78483         so that, for example, verify (INT_MULTIPLY_OVERFLOW (...)) is less
78484         likely to run afoul of C compiler limits for string constant lengths.
78485         See <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00528.html>.
78487 2011-05-24  Eric Blake  <eblake@redhat.com>
78489         docs: document recently fixed glibc printf bug
78490         * doc/posix-functions/fprintf.texi (fprintf): Document it.
78491         * doc/posix-functions/printf.texi (printf): Likewise.
78492         * doc/posix-functions/vfprintf.texi (vfprintf): Likewise.
78493         * doc/posix-functions/vprintf.texi (vprintf): Likewise.
78495         closein-tests: convert to init.sh
78496         * modules/closein-tests (Files): Add init.sh
78497         * tests/test-closein.sh Use it.
78499         yesno-tests: convert to init.sh
78500         * modules/yesno-tests (Files): Add init.sh.
78501         * tests/test-yesno.sh: Use it.
78503         atexit-tests: ensure reliable exit status
78504         * tests/test-atexit.sh: Prefer 'Exit' over 'exit'.
78505         Reported by Bruno Haible.
78507 2011-05-24  Bruno Haible  <bruno@clisp.org>
78509         strerror_r-posix: Respect rules for use of AC_LIBOBJ.
78510         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Move AC_LIBOBJ and
78511         gl_PREREQ_STRERROR_R invocations from here...
78512         * modules/strerror_r-posix (configure.ac): ... to here.
78514 2011-05-24  Eric Blake  <eblake@redhat.com>
78516         strerror_r: fix missing header
78517         * lib/strerror_r.c: Avoid compiler warning about snprintf.
78519         strerror_r: fix AIX test failures
78520         * lib/strerror_r.c (strerror_r): Convert silent truncation to
78521         ERANGE failure.
78523         strerror_r: fix Solaris test failures
78524         * lib/strerror_r.c (strerror_r): Partially populate buf on ERANGE
78525         failures.
78526         * doc/posix-functions/strerror_r.texi (strerror_r): Document this.
78528         strerror_r: enforce POSIX recommendations
78529         * lib/strerror_r.c (safe_copy): New helper method.
78530         (strerror_r): Guarantee a non-empty string.
78531         * tests/test-strerror_r.c (main): Enhance tests to incorporate
78532         recent POSIX rulings and to match our strerror guarantees.
78533         * doc/posix-functions/strerror_r.texi (strerror_r): Document this.
78535 2011-05-24  Jim Meyering  <meyering@redhat.com>
78537         test-perror2.c: avoid warning about unused variable
78538         * tests/test-perror2.c (main): Remove declaration of unused "fp".
78540 2011-05-24  Eric Blake  <eblake@redhat.com>
78542         perror: avoid spurious test failure on HP-UX
78543         * tests/test-perror.sh: Use Exit to avoid wrong exit status.
78545         tests: fix logic bug in init.sh
78546         * tests/init.sh: (gl_set_x_corrupts_stderr_): Clear for successful
78547         shell.
78549 2011-05-24  Jim Meyering  <meyering@redhat.com>
78551         utimensat: do not reference an out-of-scope buffer
78552         Otherwise, with __linux__ defined, "times" would point to a buffer, "ts"
78553         declared in an inner scope, yet "times" would be dereferenced outside
78554         the scope in which "ts" was valid.
78555         * lib/utimensat.c (rpl_utimensat) [__linux__]: Move the declaration
78556         of ts[2] "out/up", so that the use of aliased "times" (via
78557         "times = ts;") does not end up referencing an out-of-scope "ts"
78559         opendir-safer.c: don't clobber errno; don't close negative FD
78560         * lib/opendir-safer.c (opendir_safer):
78561         [HAVE_FDOPENDIR || GNULIB_FDOPENDIR]: Don't close a negative
78562         file descriptor, and more importantly, don't clobber the
78563         offending errno value with EINVAL.  Before, upon failure
78564         of dup_safer, we would pass the negative file descriptor to
78565         fdopendir, which would clobber errno.
78567 2011-05-23  Bruno Haible  <bruno@clisp.org>
78569         idcache: Fix module description.
78570         * modules/idcache (Include): Set to "idcache.h".
78572 2011-05-23  Paul Eggert  <eggert@cs.ucla.edu>
78574         gnulib-tool: fix portability problem with MacOS sed
78575         A sed command like "/x/{s/a/b/}" is not portable; a newline is needed
78576         before the "}".  Problem reported by Leo in
78577         <http://lists.gnu.org/r/emacs-devel/2011-05/msg00717.html>.
78578         * gnulib-tool (func_modules_transitive_closure): Insert newlines in
78579         sed_extract_condition1, sed_extract_condition2.
78581 2011-05-23  Bruno Haible  <bruno@clisp.org>
78583         hash: Simplify autoconf macro.
78584         * m4/hash.m4 (gl_HASH): Don't require AM_STDBOOL_H.
78586 2011-05-23  Bruno Haible  <bruno@clisp.org>
78588         getugroups: Fix module description.
78589         * modules/getugroups (Include): Set to "getugroups.h".
78591 2011-05-23  Bruno Haible  <bruno@clisp.org>
78593         linkat: Simplify autoconf macro.
78594         * m4/linkat.m4 (gl_FUNC_LINKAT): Don't require gl_FUNC_LINK.
78596 2011-05-23  Bruno Haible  <bruno@clisp.org>
78597             Eric Blake  <eblake@redhat.com>
78599         linkat, renameat: Update dependencies.
78600         * modules/renameat (Depends-on): Add dosname, save-cwd. Remove stpcpy.
78601         * modules/linkat (Depends-on): Likewise. Remove also readlink,
78602         symlinkat.
78604 2011-05-23  Jim Meyering  <meyering@redhat.com>
78606         maint.mk: more tight_scope improvements
78607         * top/maint.mk: (_gl_TS_var_match): Use $(_gl_TS_extern) here, too.
78608         (_gl_TS_headers): Define only in if-0'd block.
78609         (_gl_TS_dir): Omit the $(srcdir)/ prefix.  Sometimes we need it,
78610         sometimes we must *not* use it.  Adjust uses accordingly.
78611         (sc_tight_scope): Use much simpler grep-based test to determine
78612         whether we skip this rule.
78614         maint.mk: generalize/improve the tight-scope rule
78615         * top/maint.mk: Emit a warning when the test is skipped.
78616         (_gl_TS_dir): Add $(srcdir)/ prefix.
78617         (_gl_TS_function_match): Simplify, rather than trying
78618         to enumerate common types.  Otherwise, it would fail to match an
78619         "extern unsigned char const *" declaration in idutils.
78620         (_gl_TS_extern): Do not endorse use of "XTERN", but do provide
78621         a way to support use of that type of macro.
78622         (_gl_TS_var_match): Simplify regexp.
78623         (_gl_TS_obj_files): New configurable variable.
78624         (_gl_TS_headers): Likewise.
78626 2011-05-22  Paul Eggert  <eggert@cs.ucla.edu>
78628         verify: fix bug when gnulib <assert.h> is also included
78629         * lib/verify.h (verify, verify_true): Define if _GL_VERIFY_H
78630         is defined, not if _GL_STATIC_ASSERT_H is not defined.
78631         Perhaps there's a better way, but this fixes the immediate problem.
78632         Problem reported by Bruno Haible in
78633         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00478.html>.
78635 2011-05-22  Bruno Haible  <bruno@clisp.org>
78637         xgetcwd: Simplify autoconf macro.
78638         * m4/xgetcwd.m4 (gl_XGETCWD): Don't require gl_FUNC_GETCWD.
78640 2011-05-22  Bruno Haible  <bruno@clisp.org>
78642         New module 'mktime-internal'.
78643         * modules/mktime-internal: New file.
78644         * m4/timegm.m4 (gl_PREREQ_TIMEGM): Move contents to ...
78645         * m4/mktime.m4 (gl_FUNC_MKTIME_INTERNAL): New macro. Define
78646         mktime_internal as a C macro if libc has __mktime_internal.
78647         * modules/timegm (Depends-on): Add mktime-internal. Remove mktime. Add
78648         conditions.
78649         * MODULES.html.sh (Date and time <time.h>): Add mktime-internal.
78651 2011-05-22  Bruno Haible  <bruno@clisp.org>
78653         timegm: Correct mktime replacement statements.
78654         * m4/timegm.m4 (gl_PREREQ_TIMEGM): Set REPLACE_MKTIME, instead of
78655         defining mktime as a C macro. This completes a 2009-07-28 commit.
78657 2011-05-22  Bruno Haible  <bruno@clisp.org>
78659         timegm: Simplify autoconf macro.
78660         * m4/timegm.m4 (gl_PREREQ_TIMEGM): Don't require gl_TIME_R.
78662 2011-05-21  Paul Eggert  <eggert@cs.ucla.edu>
78664         clock-time: change to LGPLv2+.
78665         * modules/clock-time: Change from GPL to LGPLv2+.  Actually, it's
78666         BSD-like but we have no mark for that; this is good enough for now.
78668 2011-05-21  Bruno Haible  <bruno@clisp.org>
78670         strerror_r: Fix comments.
78671         * lib/strerror_r.c (strerror_r): Fix comment about Cygwin and sys_nerr.
78673 2011-05-21  Bruno Haible  <bruno@clisp.org>
78675         relocatable-prog-wrapper: Fix possible link error.
78676         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Move determination of
78677         HAVE_SETENV and REPLACE_SETENV and AC_LIBOBJ invocation from here...
78678         (gl_FUNC_SETENV): ... to here.
78679         * m4/canonicalize.m4 (gl_CANONICALIZE_LGPL_SEPARATE): Update comment.
78680         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): Likewise.
78682 2011-05-21  Bruno Haible  <bruno@clisp.org>
78684         relocatable-prog-wrapper: Assume strerror() exists.
78685         * modules/relocatable-prog-wrapper (Files): Remove lib/strerror.c,
78686         m4/strerror.m4.
78687         (configure.ac): Don't invoke gl_FUNC_STRERROR_SEPARATE.
78688         * lib/relocwrapper.c: Remove mention of strerror module.
78689         * lib/strerror.c: Assume REPLACE_STRERROR is 1.
78690         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): Remove macro.
78691         (gl_FUNC_STRERROR): Inline it here. Don't define REPLACE_STRERROR as a
78692         C macro.
78694 2011-05-21  Bruno Haible  <bruno@clisp.org>
78696         select: Simplify replacement idiom.
78697         * m4/select.m4 (gl_FUNC_SELECT): Set REPLACE_SELECT also on native
78698         Win32 platforms.
78699         * lib/sys_select.in.h (select): Simplify accordingly.
78700         * modules/select (Depends-on): Likewise.
78702 2011-05-21  Bruno Haible  <bruno@clisp.org>
78704         mkdir-p: Simplify autoconf macro.
78705         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't require gl_FUNC_LCHMOD,
78706         gl_FUNC_LCHOWN.
78708 2011-05-21  Eric Blake  <eblake@redhat.com>
78710         strerror_r: avoid clobbering strerror on cygwin
78711         * lib/strerror_r.c (strerror_r): Don't use cygwin's strerror_r;
78712         fall back instead to sys_errlist.
78713         * modules/strerror (configure.ac): Add witness.
78714         * tests/test-strerror_r.c (main): Enhance test.
78715         * doc/posix-functions/strerror_r.texi (strerror_r): Document it.
78716         * tests/test-perror2.c (main): Free memory before exit.
78718 2011-05-21  Bruno Haible  <bruno@clisp.org>
78720         mkdtemp: Use gnulib naming conventions.
78721         * m4/mkdtemp.m4 (gl_FUNC_MKDTEMP): Renamed from gt_FUNC_MKDTEMP.
78722         * modules/mkdtemp (configure.ac): Update.
78724 2011-05-20  Eric Blake  <eblake@redhat.com>
78726         strerror_r: avoid corrupting errno on Solaris
78727         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Check for Solaris behavior.
78728         * doc/posix-functions/strerror_r.texi (strerror_r): Document it.
78730         strerror_r: avoid compiler warning
78731         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Don't return a char*.
78733         strerror_r: simplify AIX code
78734         * lib/strerror_r.c (strerror_r): Filter out buflen of 1 up front.
78736         test-perror: avoid spurious failure on FreeBSD
78737         * modules/perror-tests (Depends-on): Add strerror, now that
78738         strerror_r no longer pulls it in.
78740 2011-05-20  Bruno Haible  <bruno@clisp.org>
78742         strerror_r-posix: Remove unused dependencies.
78743         * modules/strerror_r-posix (Depends-on): Remove strerror.
78744         Reported by Eric Blake.
78746 2011-05-20  Paul Eggert  <eggert@cs.ucla.edu>
78748         intprops: remove assumption about A|B representation
78749         * lib/intprops.h (_GL_BINARY_OP_OVERFLOW): Do not assume that A|B
78750         is a valid integer if both A and B are.  Although this is true for
78751         all known practical hosts, the C standard doesn't guarantee it,
78752         and the code need not assume it.  Also, this change may work around
78753         HP-UX 11.23 and IRIX 6.5 cc bugs reported by Bruno Haible in
78754         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00426.html>.
78756 2011-05-20  Eric Blake  <eblake@redhat.com>
78758         perror: work around FreeBSD bug
78759         * m4/perror.m4 (gl_FUNC_PERROR): Also replace perror if strerror_r
78760         is broken.  Move AC_LIBOBJ...
78761         * modules/perror (configure.ac): Here.
78762         * doc/posix-functions/perror.texi (perror): Document this.
78763         * tests/test-perror2.c (main): Enhance test.
78765         test-perror: check for strerror interactions
78766         * tests/macros.h (STREQ): Add macro.
78767         * modules/perror-tests (Files): Add second test.
78768         * tests/test-perror2.c (main): New file.
78769         * doc/posix-functions/perror.texi (perror): Document glibc bug.
78771         test-perror: rewrite to use init script
78772         * modules/perror-tests (Files): Add init.sh.
78773         * tests/test-perror.sh: Use temporary directory.
78775 2011-05-20  Jim Meyering  <meyering@redhat.com>
78777         maint: replace misused "a" with "an"
78778         * doc/intprops.texi: "a integer"
78779         * doc/regex.texi: "a explanation"
78780         * lib/alignof.h: "a object"
78781         * lib/argmatch.h: "a explanation"
78782         * lib/argp-help.c: "a option" and "a OPTION_DOC"
78783         * lib/stdint.in.h: "a integer"
78784         * lib/userspec.c: "a owner"
78785         * doc/gnulib.texi: Fix "a idea", and reword.
78787 2011-05-19  Jim Meyering  <meyering@redhat.com>
78789         maint: correct misuse of "a" and "an"
78790         * doc/regex.texi (Collating Symbol Operators): s/an close.../a close/
78791         * lib/argp-help.c: "an docum...": s/an/a/
78792         * lib/argp-parse.c: "An vector": s/An/A/
78793         * lib/execute.c: "an native": s/an/a/
78794         * lib/spawn-pipe.c: Likewise.
78795         * lib/gc.h: "an Gc_rc": s/an/a/
78796         * lib/unigbrk.in.h: "an grapheme": s/an/a/
78797         * lib/fts.c: "an stat.st_dev": s/an/a/
78799 2011-05-19  Paul Eggert  <eggert@cs.ucla.edu>
78801         intprops-tests: work around HP-UX 11.23 cc bug with constants
78802         * tests/test-intprops.c (VERIFY): New macro.
78803         (main): Use it, instead of verify, to work around the compiler bug; see
78804         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00401.html>.
78806         intprops: work around IRIX 6.5 cc bug with 0u - 0u + -1
78807         See http://lists.gnu.org/r/bug-gnulib/2011-05/msg00406.html
78808         * lib/intprops.h (_GL_INT_NEGATE_CONVERT): New macro.
78809         (_GL_INT_SIGNED, _GL_INT_MAXIMUM, _GL_DIVIDE_OVERFLOW):
78810         (_GL_REMAINDER_OVERFLOW): Use it.
78812         intprops-tests: revert unsigned part of previous change
78813         * tests/test-intprops.c (UINT_MAX, ULONG_MAX, UINTMAX_MAX, U0, U1):
78814         Remove; they weren't actually needed.  All uses of U0 and U1 removed,
78815         and other casts to 'unsigned int' reverted to 'u' suffixes.  See
78816         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00406.html>.
78818 2011-05-19  Bruno Haible  <bruno@clisp.org>
78820         strerror_r: Work around strerror_r() change in Cygwin 1.7.8.
78821         * lib/strerror_r.c (strerror_r) [CYGWIN]: Recognize when the system's
78822         strerror_r() returned without filling the buffer.
78823         Reported by Eric Blake.
78825 2011-05-19  Eric Blake  <eblake@redhat.com>
78827         strerror_r: guarantee unchanged errno
78828         * lib/strerror_r.c (strerror_r): Guarantee unchanged errno.
78829         * lib/strerror-impl.h (strerror): Set errno to match strerror_r
78830         failure.
78831         * tests/test-strerror_r.c (main): Enhance test.
78833 2011-05-19  Bruno Haible  <bruno@clisp.org>
78835         strerror_r: Reorder #if blocks.
78836         * lib/strerror_r.c (strerror_r): Reorder conditionals in the function
78837         for consistency with the previous commit.
78839 2011-05-19  Bruno Haible  <bruno@clisp.org>
78841         perror: Avoid clobbering the strerror buffer when possible.
78842         * lib/strerror-impl.h: New file, extracted from lib/strerror.c.
78843         * lib/strerror.c: Include it.
78844         * modules/strerror (Files): Add lib/strerror-impl.h.
78845         * lib/perror.c: Include <stdlib.h>, intprops.h, verify.h.
78846         (my_strerror): New function, defined through lib/strerror-impl.h.
78847         (perror): Use it instead of strerror.
78848         * modules/perror (Files): Add lib/strerror-impl.h.
78849         (Depends-on): Remove strerror. Add intprops, verify, strerror_r-posix.
78851 2011-05-19  Eric Blake  <eblake@redhat.com>
78853         strerror_r: fix on newer cygwin
78854         * lib/strerror_r.c (strerror_r): Cygwin now has
78855         __xpg_strerror_r, use it.
78857 2011-05-19  Bruno Haible  <bruno@clisp.org>
78859         strerror_r: Avoid clobbering the strerror buffer when possible.
78860         * lib/strerror.c: Define _NETBSD_SOURCE. Include <nl_types.h>.
78861         (sys_nerr, sys_errlist): New declarations.
78862         (strerror_r): Be careful not to clobber the strerror buffer on NetBSD,
78863         HP-UX, native Win32, IRIX, and 32-bit Solaris.
78864         * m4/strerror_r.m4 (gl_PREREQ_STRERROR_R): Test whether catgets exists.
78866 2011-05-19  Bruno Haible  <bruno@clisp.org>
78868         strerror_r: Fix test failure on mingw.
78869         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Don't define
78870         EXTEND_STRERROR_R.
78871         * lib/strerror_r.c (strerror_r): Test the various GNULIB_defined_*
78872         macros from errno.in.h instead.
78874 2011-05-19  Eric Blake  <eblake@redhat.com>
78876         strerror: relax test for Solaris
78877         * tests/test-strerror.c (main): Permit Solaris behavior.
78878         * tests/test-strerror_r.c (main): Likewise.
78880         strerror: enforce POSIX ruling on strerror(0)
78881         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): Expose BSD bug.
78882         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Likewise.
78883         * lib/strerror_r.c (rpl_strerror_r): Work around it.
78884         * doc/posix-functions/strerror.texi (strerror): Document it.
78885         * doc/posix-functions/strerror_r.texi (strerror_r): Likewise.
78886         * tests/test-strerror.c (main): Strengthen test.
78887         * tests/test-strerror_r.c (main): Likewise.
78889 2011-05-19  Paul Eggert  <eggert@cs.ucla.edu>
78891         intprop-tests: port to older and more-pedantic compilers
78892         * modules/intprops-tests (Files): Add tests/macros.h.
78893         * tests/test-intprops.c: Include macros.h.
78894         (TYPE_IS_INTEGER): Use ASSERT, not verify, to test this macro, as
78895         it's no longer documented to expand to an integer constant expression.
78896         (TYPE_SIGNED): Use ASSERT, not verify, to test this macro when the
78897         argument is floating point, as it's no longer documented to expand
78898         to an integer constant expression in that case.
78899         (UINT_MAX, ULONG_MAX, UINTMAX_MAX): Redefine to work around
78900         compiler bugs reported by Bruno Haible.  See
78901         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00401.html>.
78902         (U0, U1): New constants, to work around the same bugs.  Also,
78903         in tests, use e.g., "(unsigned int) 39" rather than "39u".
78905         intprops: work around C compiler bugs
78906         * lib/intprops.h (INT_MULTIPLY_RANGE_OVERFLOW): Work around compiler
78907         bug in Sun C 5.11 2010/08/13 and other compilers; see
78908         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00401.html>.
78910         intprops: TYPE_IS_INTEGER, TYPE_SIGNED not integer constant exprs
78911         * doc/intprops.texi (Integer Type Determination): Fix
78912         documentation for TYPE_IS_INTEGER: it returns an constant
78913         expression, not an integer constant expression.  Fix doc for
78914         TYPE_SIGNED: it returns an integer constant expression only if its
78915         argument is an integer type.  (TYPE_IS_INTEGER is the same, but is
78916         hardly worth documented that way....)
78918 2011-05-18  Bruno Haible  <bruno@clisp.org>
78920         strerror_r: Avoid clobbering the strerror buffer when possible.
78921         * lib/strerror_r.c (strerror_r): Merge the three implementations.
78922         Handle gnulib defined errno values here. When strerror() returns NULL
78923         or an empty string, return EINVAL.
78924         * lib/strerror.c (strerror): Always call strerror_r. Don't handle
78925         gnulib defined errno values here.
78926         * modules/strerror (Depends-on): Add verify, strerror_r-posix.
78928 2011-05-18  Eric Blake  <eblake@redhat.com>
78930         fnmatch: avoid compiler warning
78931         * lib/fnmatch_loop.c (FCT): Use correct type.
78932         Reported by Matthias Bolte.
78934 2011-05-13  Jim Meyering  <meyering@redhat.com>
78936         maint.mk: three new prohibit_<HDR>_without_use rules
78937         * top/maint.mk (sc_prohibit_stdio--_without_use): New rule.
78938         (sc_prohibit_stdio-safer_without_use): Likewise.
78939         (sc_prohibit_xfreopen_without_use): Likewise.
78941 2011-05-17  Jim Meyering  <meyering@redhat.com>
78943         announce-gen: fail if the NEWS delta is empty
78944         If there's nothing noteworthy in NEWS, then either you forgot
78945         or you shouldn't be releasing.
78946         * build-aux/announce-gen: Die if the NEWS delta is effectively empty.
78948 2011-05-17  Pádraig Brady  <P@draigBrady.com>
78950         * top/maint.mk (_gl_tight_scope:): Automatically exclude compiler
78951         reserved symbols starting with double underscore from the check.
78953 2011-05-17  Paul Eggert  <eggert@cs.ucla.edu>
78955         intprops: add doc
78956         * doc/intprops.texi: New file, documenting intprops.
78957         * doc/gnulib.texi (Particular Modules): Include it.
78959         verify: add doc to gnulib manual and fix example
78960         * doc/gnulib.texi (Compile-time Assertions): New node, for 'verify'.
78961         * doc/verify.texi (Compile-time Assertions): Update 'assert' doc.
78962         (Compile-time Assertions): Fix example so it can't overflow.
78964 2011-05-17  Jim Meyering  <meyering@redhat.com>
78966         warnings.m4: don't usurp save_CPPFLAGS variable name
78967         * m4/warnings.m4: Prefix local temporary variable name with gl_.
78969         doc: fix typo
78970         * doc/gnulib-intro.texi (Target Platforms): s/is/are/
78972 2011-05-16  Paul Eggert  <eggert@cs.ucla.edu>
78973             Bruno Haible  <bruno@clisp.org>
78975         doc: Tweak recent change.
78976         * README (Portability guidelines): Tweak new text.
78977         * doc/gnulib-intro.texi (Target Platforms): Likewise. Mention
78978         Interix 6.1.
78980 2011-05-16  Eric Blake  <eblake@redhat.com>
78982         inttypes: avoid autoconf warning
78983         * m4/inttypes.m4 (gl_INTTYPES_INCOMPLETE): Only expand once.
78984         * m4/stdint.m4 (gl_STDINT_H): Likewise.
78986 2011-05-16  Sam Steingold  <sds@gnu.org>
78987         and Eric Blake  <eblake@redhat.com>
78989         vc-list-files: accept multiple directory operands
78990         * build-aux/vc-list-files: Iterate over all remaining operands.
78992 2011-05-16  Bruno Haible  <bruno@clisp.org>
78994         Fix confusion regarding deprecated modules.
78995         * modules/calloc (Status, Notice): Mark module as deprecated, not
78996         obsolete.
78997         * modules/fnmatch-posix (Status, Notice): Likewise.
78998         * modules/getdate (Status, Notice): Likewise.
78999         * modules/getopt (Status, Notice): Likewise.
79000         * modules/malloc (Status, Notice): Likewise.
79001         * modules/pipe (Status, Notice): Likewise.
79002         * modules/realloc (Status, Notice): Likewise.
79003         * modules/rename-dest-slash (Status, Notice): Likewise.
79004         * modules/unictype/bidicategory-all (Status, Notice): Likewise.
79005         * modules/unictype/bidicategory-byname (Status, Notice): Likewise.
79006         * modules/unictype/bidicategory-name (Status, Notice): Likewise.
79007         * modules/unictype/bidicategory-of (Status, Notice): Likewise.
79008         * modules/unictype/bidicategory-test (Status, Notice): Likewise.
79010 2011-05-16  Bruno Haible  <bruno@clisp.org>
79012         doc: List the target platforms.
79013         * doc/gnulib-intro.texi (Target Platforms): New section.
79014         * doc/gnulib.texi (Introduction): Update menu.
79015         * README (Portability guidelines): Refer to the new section. Update
79016         statement about oldest supported environment. Remove rationale why
79017         <errno.h>, <string.h>, <stdlib.h> are assumed. Update example of an
79018         unportable C89 function.
79019         Reported by Bastien Roucariès <roucaries.bastien@gmail.com> and
79020         Charles Wilson <cygwin@cwilson.fastmail.fm>. Feedback from Paul Eggert.
79022 2011-05-16  Paul Eggert  <eggert@cs.ucla.edu>
79024         * build-aux/bootstrap (gnulib_tool): Handle symlink timestamps better.
79026 2011-05-13  Paul Eggert  <eggert@cs.ucla.edu>
79028         intprops-tests: new module
79029         * modules/intprops-tests, tests/test-intprops.c: New files.
79031         intprops: add safe, portable integer overflow checking
79032         * lib/intprops.h (_GL_INT_CONVERT, _GL_INT_TWOS_COMPLEMENT):
79033         (_GL_INT_SIGNED, _GL_INT_MINIMUM, _GL_INT_MAXIMUM):
79034         (_GL_SIGNED_INT_MINIMUM, INT_ADD_RANGE_OVERFLOW):
79035         (INT__SUBTRACT__RANGE_OVERFLOW, INT_NEGATE_RANGE_OVERFLOW):
79036         (INT_MULTIPLY_RANGE_OVERFLOW, INT_REMAINDER_RANGE_OVERFLOW):
79037         (INT_LEFT_SHIFT_RANGE_OVERFLOW, _GL_ADD_OVERFLOW):
79038         (_GL__SUBTRACT__OVERFLOW, _GL_MULTIPLY_OVERFLOW, _GL_DIVIDE_OVERFLOW):
79039         (_GL_REMAINDER_OVERFLOW, _GL_UNSIGNED_NEG_MULTIPLE, INT_ADD_OVERFLOW):
79040         (INT__SUBTRACT__OVERFLOW, INT_NEGATE_OVERFLOW, INT_MULTIPLY_OVERFLOW):
79041         (INT_DIVIDE_OVERFLOW, INT_REMAINDER_OVERFLOW):
79042         (INT_LEFT_SHIFT_OVERFLOW, _GL_BINARY_OP_OVERFLOW): New macros.
79044 2011-05-12  James Youngman  <jay@gnu.org>
79046         Add a test for glibc's Bugzilla bug #12378.
79047         * m4/fnmatch.m4: Use gnulib's fnmatch if the system fnmatch
79048         doesn't allow the literal matching of a lone "[" (which is
79049         required by POSIX).
79050         * tests/test-fnmatch.c (main): Check that "[/b" matches itself.
79052 2011-05-11  Ulrich Drepper  <drepper@gmail.com>
79054         Sync glibc change fixing Bugzilla bug #12378.
79055         * lib/fnmatch_loop.c (FCT): When matching '[' keep track of
79056         beginning and fall back to matching as normal character if the
79057         string ends before the matching ']' is found.  This is what POSIX
79058         requires.
79060 2011-05-13  Eric Blake  <eblake@redhat.com>
79062         getcwd-lgpl: relax test for FreeBSD
79063         * doc/posix-functions/getcwd.texi (getcwd): Document portability
79064         issue.
79065         * tests/test-getcwd-lgpl.c (main): Relax test.
79066         Reported by Matthias Bolte.
79068 2011-05-11  Eric Blake  <eblake@redhat.com>
79070         test-fflush: silence compiler warning
79071         * tests/test-fflush.c (main): Don't fclose a NULL pointer.
79073 2011-05-11  Bruno Haible  <bruno@clisp.org>
79075         canonicalize, canonicalize-lgpl: Avoid crash dialog on MacOS X.
79076         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Add GL_NOCRASH code.
79077         * modules/canonicalize (Depends-on): Add 'nocrash'.
79078         * modules/canonicalize-lgpl (Depends-on): Likewise.
79079         * doc/posix-functions/realpath.texi: Update platforms list.
79080         Reported by Ryan Schmidt <ryandesign@macports.org>.
79082 2011-05-11  Bruno Haible  <bruno@clisp.org>
79084         group-member: Declare function in <unistd.h>.
79085         * lib/unistd.in.h (group_member): New declaration.
79086         * lib/group-member.h: Remove file.
79087         * lib/group-member.c: Include <unistd.h> instead of group-member.h.
79088         * tests/test-unistd-c++.cc: Check signature of group_member.
79089         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER): Require
79090         gl_UNISTD_H_DEFAULTS. Set HAVE_GROUP_MEMBER.
79091         * m4/unistd_h.m4 (gl_UNISTD_H): Check whether group_member is declared.
79092         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GROUP_MEMBER,
79093         HAVE_GROUP_MEMBER.
79094         * modules/group-member (Files): Remove lib/group-member.h.
79095         (Depends-on): Add unistd. Specify conditions.
79096         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
79097         (Include): Change to <unistd.h>.
79098         * modules/unistd (Makefile.am): Substitute GNULIB_GROUP_MEMBER,
79099         HAVE_GROUP_MEMBER.
79100         * NEWS: Mention the change.
79101         * lib/euidaccess.c: Don't include group-member.h.
79103 2011-05-11  Bruno Haible  <bruno@clisp.org>
79105         group-member: Document module.
79106         * doc/glibc-functions/group_member.texi: Mention the 'group-member'
79107         module.
79109 2011-05-11  Bruno Haible  <bruno@clisp.org>
79111         fclose: Fix mistake earlier today.
79112         * lib/fclose.c (rpl_fclose): Don't assume that EOF < 0.
79114 2011-05-11  Eric Blake  <eblake@redhat.com>
79116         fclose: preserve fflush errors
79117         * lib/fclose.c (rpl_fclose): Don't lose fflush errors.
79118         Reported by Jim Meyering.
79120         bootstrap: support a prereq of 'rpcgen -' on RHEL5
79121         * build-aux/bootstrap (check_versions): When no specific version
79122         is required, merely check that the app produces an exit status
79123         that indicates its existence.
79125         maint.mk: drop redundant check
79126         * top/maint.mk (sc_the_the): Delete; sc_prohibit_doubled_word does
79127         the same but better.
79129 2011-05-11  Bruno Haible  <bruno@clisp.org>
79131         fclose: Fix possible link error.
79132         * lib/fclose.c (rpl_fclose): Invoke _gl_unregister_fd, not
79133         unregister_shadow_fd. Improve comments.
79134         * lib/sockets.c (close_fd_maybe_socket): Add comments. Reported by
79135         Eric Blake.
79137 2011-05-11  Jim Meyering  <meyering@redhat.com>
79139         maint.mk: improve "can not" detection and generalize rule name
79140         * top/maint.mk (sc_prohibit_undesirable_word_seq): Renamed from
79141         sc_prohibit_can_not, since we'll probably add a few more word pairs here.
79142         Use the same technique as in sc_prohibit_doubled_word, so that
79143         we recognize "can not" also when the words are separated by a newline.
79144         Suggested by Eric Blake.
79145         (perl_filename_lineno_text_): Define.  Factored out of...
79146         (prohibit_doubled_word_): ...here.  Use the new definition.
79147         (prohibit_undesirable_word_seq_): New var.  Use it here, too.
79148         (prohibit_undesirable_word_seq_RE_): New overridable variable.
79149         (ignore_undesirable_word_sequence_RE_): New overridable variable.
79151 2011-05-10  Eric Blake  <eblake@redhat.com>
79153         fclose: avoid double close race when possible
79154         * lib/fclose.c (rpl_fclose): Rewrite to avoid double-close race on
79155         all but WINDOWS_SOCKETS.
79157 2011-05-10  Bastien Roucariès  <roucaries.bastien@gmail.com>
79159         openat: correct new comment
79160         * lib/openat-proc.c (openat_proc_name): Correct the comment.
79162 2011-05-10  Jim Meyering  <meyering@redhat.com>
79164         openat: add comments
79165         * lib/openat-proc.c (openat_proc_name): Add comments,
79166         mostly from Eric Blake.
79168 2011-05-09  Eric Blake  <eblake@redhat.com>
79170         openat: reduce syscalls in first probe of /proc
79171         * lib/openat-proc.c (openat_proc_name): Require that /proc/self/fd
79172         be a directory.  Simplify the probe for .. bugs.
79173         * modules/openat (Depends-on): Drop same-inode.
79174         Reported by Bastien ROUCARIES.
79176 2011-05-09  Jim Meyering  <meyering@redhat.com>
79178         maint.mk: change semantics/name of tight_scope variables
79179         * top/maint.mk (_gl_TS_var_match, _gl_TS_function_match):
79180         Rename variables to align with semantics that make them more useful.
79182         maint.mk: tweak new rule's name not to impinge
79183         * top/maint.mk (_gl_tight_scope): Rename from sc_tight_scope-0.
79184         (sc_tight_scope): Use new rule name rather than $@-0.
79186         maint.mk: add a syntax-check rule to ensure tightly-scoped symbols
79187         * top/maint.mk (sc_tight_scope): New rule.
79188         (sc_tight_scope-0): New rule, ifdef'd out.
79189         (_gl_TS_dir): Default.
79190         (_gl_TS_unmarked_extern_functions, _gl_TS_function_regex): Define.
79191         (_gl_TS_unmarked_extern_vars, _gl_TS_var_regex): Define.
79193 2011-05-09  Simon Josefsson  <simon@josefsson.org>
79195         * m4/gc.m4: Remove gl_PREREQ_GC (not used).  Reported by Bruno
79196         Haible <bruno@clisp.org>.
79198 2011-05-08  Bruno Haible  <bruno@clisp.org>
79200         Comments.
79201         * m4/isnanf.m4: Add comment.
79202         * m4/isnanl.m4: Likewise.
79204 2011-05-08  Bruno Haible  <bruno@clisp.org>
79206         glob: Remove obsolete macro.
79207         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): Remove macro.
79209 2011-05-08  Paul Eggert  <eggert@cs.ucla.edu>
79211         intprops: Sun C 5.11 supports __typeof__
79212         * lib/intprops.h (_GL_HAVE___TYPEOF__): New macro, which is set
79213         for either GCC 2 or later, as before, or for Sun C 5.11 or later,
79214         which is new.
79215         (_GL_SIGNED_TYPE_OR_EXPR): Use it.
79217         intprops: switch to usual gnulib indenting and naming
79218         * lib/intprops.h (_GL_INTPROPS_H): Rename from GL_INTPROPS_H.
79219         (_GL_SIGNED_TYPE_OR_EXPR): Rename from signed_type_or_expr__.
79221         * tests/test-inttostr.c (IS_TIGHT): Adjust to above renaming.
79223 2011-05-08  Jim Meyering  <meyering@redhat.com>
79225         maint.mk: suppress "Entering/Leaving directory" diag in announcement
79226         * top/maint.mk (release-prep): Use make's --no-print-directory
79227         option when generating the announcement.  This eliminates the
79228         pesky "make[2]: Entering/Leaving directory" diagnostics in the
79229         generated announcement template.
79231 2011-05-08  Bruno Haible  <bruno@clisp.org>
79233         tzset: Fix gettimeofday wrapper on Solaris 2.6.
79234         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): When invoking
79235         gl_GETTIMEOFDAY_REPLACE_LOCALTIME, also set REPLACE_GETTIMEOFDAY.
79237 2011-05-07  Paul Eggert  <eggert@cs.ucla.edu>
79239         ignore-value, verify: Omit include files from lib_SOURCES.
79240         * modules/ignore-value, modules/verify (Makefile.am):
79241         Don't put ignore-value.h, or verify.h, into lib_SOURCES, as
79242         that leads Automake to duplicate use of am__objects_... variables
79243         in Makefile.in.  See
79244         <http://lists.gnu.org/r/emacs-devel/2011-05/msg00257.html>.
79246 2011-05-07  Bruno Haible  <bruno@clisp.org>
79248         fclose: Simplify autoconf macro.
79249         * m4/fclose.m4 (gl_FUNC_FCLOSE): Assume gl_FUNC_FFLUSH_STDIN is
79250         defined.
79252 2011-05-07  Bruno Haible  <bruno@clisp.org>
79254         canonicalize-lgpl: Fix autoconf macro ordering bug.
79255         * m4/canonicalize.m4 (gl_CANONICALIZE_LGPL): Require
79256         gl_STDLIB_H_DEFAULTS.
79258 2011-05-06  Eric Blake  <eblake@redhat.com>
79260         maintainer-makefile: make sc_po_check easier to tune
79261         * top/maint.mk (sc_po_check): Allow overriding which non-VC files
79262         to probe for strings, such as an alternate location for gnulib.
79264         fclose: guarantee behavior on seekable stdin
79265         * modules/fclose (Depends-on): Add fflush.
79266         * doc/posix-functions/fclose.texi (fclose): Document this.
79267         * tests/test-fclose.c (main): Make test for this unconditional.
79269 2011-05-06  Bruno Haible  <bruno@clisp.org>
79271         fflush, fpurge: Relicense under LGPLv2+.
79272         * modules/fflush (License): Change from LGPLv3+ to LGPLv2+.
79273         * modules/fpurge (License): Likewise.
79274         With permission from Eric Blake and Jim Meyering.
79275         Suggested by Eric Blake.
79277 2011-05-06  Karl Berry  <karl@gnu.org>
79279         * MODULES.html.sh (func_all_modules): remove exit.
79281 2011-05-06  Jim Meyering  <meyering@redhat.com>
79283         maint.mk: use info-gnu@ as the default only for a stable release
79284         * top/maint.mk: Don't default to info-gnu for alpha or beta releases.
79285         For those, just use $(PACKAGE_BUGREPORT), in which case we don't have
79286         to set the Mail-Followup-To header.  Prompted by Reuben Thomas in
79287         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/26488
79289 2011-05-05  Paul Eggert  <eggert@cs.ucla.edu>
79291         assert-h: new module, which supports C1X-style static_assert
79292         * lib/assert.in.h, m4/assert_h.m4, modules/assert-h: New files.
79293         * lib/verify.h: Revamp so that this can be copied into assert.h,
79294         while retaining the ability to use it standalone as before.
79295         Rename private identifiers so as not to encroach on the
79296         standard C namespace, since this is now used by assert.h.
79297         (_GL_VERIFY_TYPE): New macro, factoring out differing parts of
79298         the old verify_true.
79299         (_GL_VERIFY_TRUE): New macro, with much of the contents of
79300         the old verify_true.  Use _GL_VERIFY_TYPE.
79301         (_GL_VERIFY): New macro, with much of the contents of the old verify.
79302         (static_assert): New macro, if _GL_STATIC_ASSERT_H
79303         is defined and static_assert is not; _GL_STATIC_ASSERT_H is
79304         defined when this file is copied into the replacement assert.h.
79305         (_Static_assert): New macro, if _GL_STATIC_ASSERT_H is defined
79306         and _Static_assert is not built in.
79307         (verify_true, verify): Define only if _GL_STATIC_ASSERT_H is not
79308         defined, and use the new macros mentioned above.
79309         * doc/posix-headers/assert.texi: Document this.
79311 2011-05-05  Bruno Haible  <bruno@clisp.org>
79313         fclose, fflush: Respect rules for use of AC_LIBOBJ.
79314         * m4/fflush.m4 (gl_FUNC_FFLUSH): Don't invoke gl_REPLACE_FCLOSE.
79315         * m4/fclose.m4 (gl_FUNC_FCLOSE): Invoke gl_FUNC_FFLUSH_STDIN and
79316         gl_REPLACE_FCLOSE here.
79317         * modules/fflush (Depends-on): Remove fclose.
79318         * doc/posix-functions/fclose.texi: Mention module 'fflush' only in
79319         combination with module 'fclose'.
79321 2011-05-05  Bruno Haible  <bruno@clisp.org>
79323         fflush, fseeko: Respect rules for use of AC_LIBOBJ.
79324         * m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): New macro, extracted from
79325         gl_FUNC_FFLUSH.
79326         (gl_FUNC_FFLUSH): Use it.
79327         (gl_REPLACE_FFLUSH): Don't invoke gl_REPLACE_FSEEKO.
79328         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Invoke gl_FUNC_FFLUSH_STDIN and
79329         gl_REPLACE_FSEEKO here.
79331 2011-05-05  Bruno Haible  <bruno@clisp.org>
79333         tzset: Relicense under LGPL.
79334         * modules/tzset (License): Change to LGPL.
79335         No agreement needed; it's a no-op.
79337         strtoimax, strtoumax: Relicense under LGPL.
79338         * modules/strtoimax (License): Change to LGPL.
79339         * modules/strtoumax (License): Likewise.
79340         With permission from Jim Meyering, Paul Eggert:
79341         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00124.html>
79342         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00109.html>
79344         getgroups: Relicense under LGPL.
79345         * modules/getgroups (License): Change to LGPL.
79346         With permission from Jim Meyering, Paul Eggert, Eric Blake:
79347         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00111.html>
79348         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00148.html>
79349         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00138.html>
79351         nanosleep: Relicense under LGPL.
79352         * modules/nanosleep (License): Change to LGPL.
79353         With permission from Jim Meyering, Paul Eggert, Eric Blake, Bruno
79354         Haible:
79355         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00111.html>
79356         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00148.html>
79357         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00138.html>
79358         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00131.html>
79360         futimens: Relicense under LGPL.
79361         * modules/futimens (License): Change to LGPL.
79362         With permission from Eric Blake:
79363         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00138.html>
79365         fflush: Relicense under LGPL.
79366         * modules/fflush (License): Change to LGPL.
79367         With permission from Eric Blake, Bruno Haible, Jim Meyering:
79368         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00138.html>
79369         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00131.html>
79370         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00133.html>
79372         tmpfile: Relicense under LGPL.
79373         * modules/tmpfile (License): Change to LGPL.
79374         With permission from Ben Pfaff:
79375         <http://lists.gnu.org/r/bug-gnulib/2010-12/msg00185.html>
79377         isfinite: Relicense under LGPL.
79378         * modules/isfinite (License): Change to LGPL.
79379         With permission from Ben Pfaff, Bruno Haible:
79380         <http://lists.gnu.org/r/bug-gnulib/2010-12/msg00185.html>
79381         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00130.html>
79383         acosl..tanl: Relicense under LGPL.
79384         * modules/acosl (License): Change to LGPL.
79385         * modules/asinl (License): Likewise.
79386         * modules/atanl (License): Likewise.
79387         * modules/cosl (License): Likewise.
79388         * modules/expl (License): Likewise.
79389         * modules/logl (License): Likewise.
79390         * modules/sinl (License): Likewise.
79391         * modules/sqrtl (License): Likewise.
79392         * modules/tanl (License): Likewise.
79393         Source code originally from glibc and Paolo Bonzini. Agreements:
79394         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00137.html>
79395         <http://lists.gnu.org/r/bug-gnulib/2011-05/msg00128.html>
79397 2011-05-05  Bruno Haible  <bruno@clisp.org>
79399         signal: Define sighandler_t.
79400         * lib/signal.in.h (sighandler_t): New type.
79401         * m4/signal_h.m4 (gl_SIGNAL_H): Require AC_USE_SYSTEM_EXTENSIONS. Test
79402         whether sighandler_t is defined.
79403         (gl_SIGNAL_H_DEFAULTS): Initialize HAVE_SIGHANDLER_T.
79404         * modules/signal (Depends-on): Add extensions.
79405         (Makefile.am): Substitute HAVE_SIGHANDLER_T.
79406         * doc/posix-headers/signal.texi: Mention the problem with sighandler_t.
79407         Suggested by Markus Steinborn <gnugv_maintainer@yahoo.de>.
79409 2011-05-05  Eric Blake  <eblake@redhat.com>
79411         maint: remove useless REPLACE_*_H macros
79412         * m4/arpa_inet_h.m4 (gl_REPLACE_ARPA_INET_H): Delete.
79413         * m4/dirent_h.m4 (gl_REPLACE_DIRENT_H): Likewise.
79414         * m4/locale_h.m4 (gl_REPLACE_LOCALE_H): Likewise.
79415         * m4/poll_h.m4 (gl_REPLACE_POLL_H): Likewise.
79416         * m4/spawn_h.m4 (gl_REPLACE_SPAWN_H): Likewise.
79417         * m4/sys_ioctl_h.m4 (gl_REPLACE_SYS_IOCTL_H): Likewise.
79418         * m4/wchar_h.m4 (gl_REPLACE_WCHAR_H): Likewise.
79419         * m4/btowc.m4: Update callers.
79420         * m4/dirfd.m4: Likewise.
79421         * m4/duplocale.m4: Likewise.
79422         * m4/fchdir.m4: Likewise.
79423         * m4/fdopendir.m4: Likewise.
79424         * m4/inet_ntop.m4: Likewise.
79425         * m4/inet_pton.m4: Likewise.
79426         * m4/ioctl.m4: Likewise.
79427         * m4/mbrlen.m4: Likewise.
79428         * m4/mbrtowc.m4: Likewise.
79429         * m4/mbsinit.m4: Likewise.
79430         * m4/mbsnrtowcs.m4: Likewise.
79431         * m4/mbsrtowcs.m4: Likewise.
79432         * m4/poll.m4: Likewise.
79433         * m4/setlocale.m4: Likewise.
79434         * m4/wcrtomb.m4: Likewise.
79435         * m4/wcsnrtombs.m4: Likewise.
79436         * m4/wcsrtombs.m4: Likewise.
79437         * m4/wctob.m4: Likewise.
79438         * m4/wcwidth.m4: Likewise.
79439         * modules/posix_spawn: Likewise.
79440         * modules/posix_spawn_file_actions_addclose: Likewise.
79441         * modules/posix_spawn_file_actions_adddup2: Likewise.
79442         * modules/posix_spawn_file_actions_addopen: Likewise.
79443         * modules/posix_spawn_file_actions_destroy: Likewise.
79444         * modules/posix_spawn_file_actions_init: Likewise.
79445         * modules/posix_spawnattr_destroy: Likewise.
79446         * modules/posix_spawnattr_getflags: Likewise.
79447         * modules/posix_spawnattr_getpgroup: Likewise.
79448         * modules/posix_spawnattr_getschedparam: Likewise.
79449         * modules/posix_spawnattr_getschedpolicy: Likewise.
79450         * modules/posix_spawnattr_getsigdefault: Likewise.
79451         * modules/posix_spawnattr_getsigmask: Likewise.
79452         * modules/posix_spawnattr_init: Likewise.
79453         * modules/posix_spawnattr_setflags: Likewise.
79454         * modules/posix_spawnattr_setpgroup: Likewise.
79455         * modules/posix_spawnattr_setschedparam: Likewise.
79456         * modules/posix_spawnattr_setschedpolicy: Likewise.
79457         * modules/posix_spawnattr_setsigdefault: Likewise.
79458         * modules/posix_spawnattr_setsigmask: Likewise.
79459         * modules/posix_spawnp: Likewise.
79461 2011-05-04  Reuben Thomas  <rrt@sc3d.org>
79463         Add option to do-release-commit-and-tag to specify branch.
79464         * build-aux/do-release-commit-and-tag: Add --branch.
79466 2011-05-03  Bruno Haible  <bruno@clisp.org>
79468         Avoid unnecessary compilation units, through conditional dependencies.
79469         * modules/accept (Depends-on): Add conditions to the dependencies.
79470         * modules/acosl (Depends-on): Likewise.
79471         * modules/argz (Depends-on): Likewise.
79472         * modules/asinl (Depends-on): Likewise.
79473         * modules/atanl (Depends-on): Likewise.
79474         * modules/atoll (Depends-on): Likewise.
79475         * modules/bind (Depends-on): Likewise.
79476         * modules/btowc (Depends-on): Likewise.
79477         * modules/canonicalize-lgpl (Depends-on): Likewise.
79478         * modules/ceil (Depends-on): Likewise.
79479         * modules/ceilf (Depends-on): Likewise.
79480         * modules/ceill (Depends-on): Likewise.
79481         * modules/chdir-long (Depends-on): Likewise.
79482         * modules/chown (Depends-on): Likewise.
79483         * modules/close (Depends-on): Likewise.
79484         * modules/connect (Depends-on): Likewise.
79485         * modules/cosl (Depends-on): Likewise.
79486         * modules/dirfd (Depends-on): Likewise.
79487         * modules/dprintf (Depends-on): Likewise.
79488         * modules/dprintf-posix (Depends-on): Likewise.
79489         * modules/error (Depends-on): Likewise.
79490         * modules/euidaccess (Depends-on): Likewise.
79491         * modules/expl (Depends-on): Likewise.
79492         * modules/faccessat (Depends-on): Likewise.
79493         * modules/fchdir (Depends-on): Likewise.
79494         * modules/fclose (Depends-on): Likewise.
79495         * modules/fcntl (Depends-on): Likewise.
79496         * modules/fdopendir (Depends-on): Likewise.
79497         * modules/fflush (Depends-on): Likewise.
79498         * modules/floor (Depends-on): Likewise.
79499         * modules/floorf (Depends-on): Likewise.
79500         * modules/floorl (Depends-on): Likewise.
79501         * modules/fnmatch (Depends-on): Likewise.
79502         * modules/fopen (Depends-on): Likewise.
79503         * modules/fprintf-posix (Depends-on): Likewise.
79504         * modules/frexp (Depends-on): Likewise.
79505         * modules/frexp-nolibm (Depends-on): Likewise.
79506         * modules/frexpl (Depends-on): Likewise.
79507         * modules/frexpl-nolibm (Depends-on): Likewise.
79508         * modules/fseek (Depends-on): Likewise.
79509         * modules/fsusage (Depends-on): Likewise.
79510         * modules/ftell (Depends-on): Likewise.
79511         * modules/ftello (Depends-on): Likewise.
79512         * modules/futimens (Depends-on): Likewise.
79513         * modules/getcwd (Depends-on): Likewise.
79514         * modules/getcwd-lgpl (Depends-on): Likewise.
79515         * modules/getdelim (Depends-on): Likewise.
79516         * modules/getdomainname (Depends-on): Likewise.
79517         * modules/getgroups (Depends-on): Likewise.
79518         * modules/gethostname (Depends-on): Likewise.
79519         * modules/getline (Depends-on): Likewise.
79520         * modules/getlogin_r (Depends-on): Likewise.
79521         * modules/getopt-posix (Depends-on): Likewise.
79522         * modules/getpeername (Depends-on): Likewise.
79523         * modules/getsockname (Depends-on): Likewise.
79524         * modules/getsockopt (Depends-on): Likewise.
79525         * modules/getsubopt (Depends-on): Likewise.
79526         * modules/getusershell (Depends-on): Likewise.
79527         * modules/glob (Depends-on): Likewise.
79528         * modules/grantpt (Depends-on): Likewise.
79529         * modules/iconv_open (Depends-on): Likewise.
79530         * modules/iconv_open-utf (Depends-on): Likewise.
79531         * modules/inet_ntop (Depends-on): Likewise.
79532         * modules/inet_pton (Depends-on): Likewise.
79533         * modules/ioctl (Depends-on): Likewise.
79534         * modules/isapipe (Depends-on): Likewise.
79535         * modules/isfinite (Depends-on): Likewise.
79536         * modules/isinf (Depends-on): Likewise.
79537         * modules/lchown (Depends-on): Likewise.
79538         * modules/ldexpl (Depends-on): Likewise.
79539         * modules/link (Depends-on): Likewise.
79540         * modules/linkat (Depends-on): Likewise.
79541         * modules/listen (Depends-on): Likewise.
79542         * modules/logl (Depends-on): Likewise.
79543         * modules/lstat (Depends-on): Likewise.
79544         * modules/mbrlen (Depends-on): Likewise.
79545         * modules/mbrtowc (Depends-on): Likewise.
79546         * modules/mbsinit (Depends-on): Likewise.
79547         * modules/mbsnrtowcs (Depends-on): Likewise.
79548         * modules/mbsrtowcs (Depends-on): Likewise.
79549         * modules/mbtowc (Depends-on): Likewise.
79550         * modules/memcmp (Depends-on): Likewise.
79551         * modules/mkdir (Depends-on): Likewise.
79552         * modules/mkdtemp (Depends-on): Likewise.
79553         * modules/mkfifo (Depends-on): Likewise.
79554         * modules/mkfifoat (Depends-on): Likewise.
79555         * modules/mknod (Depends-on): Likewise.
79556         * modules/mkostemp (Depends-on): Likewise.
79557         * modules/mkostemps (Depends-on): Likewise.
79558         * modules/mkstemp (Depends-on): Likewise.
79559         * modules/mkstemps (Depends-on): Likewise.
79560         * modules/mktime (Depends-on): Likewise.
79561         * modules/nanosleep (Depends-on): Likewise.
79562         * modules/open (Depends-on): Likewise.
79563         * modules/openat (Depends-on): Likewise.
79564         * modules/perror (Depends-on): Likewise.
79565         * modules/poll (Depends-on): Likewise.
79566         * modules/popen (Depends-on): Likewise.
79567         * modules/posix_spawn (Depends-on): Likewise.
79568         * modules/posix_spawn_file_actions_addclose (Depends-on): Likewise.
79569         * modules/posix_spawn_file_actions_adddup2 (Depends-on): Likewise.
79570         * modules/posix_spawn_file_actions_addopen (Depends-on): Likewise.
79571         * modules/posix_spawnp (Depends-on): Likewise.
79572         * modules/pread (Depends-on): Likewise.
79573         * modules/printf-posix (Depends-on): Likewise.
79574         * modules/ptsname (Depends-on): Likewise.
79575         * modules/putenv (Depends-on): Likewise.
79576         * modules/pwrite (Depends-on): Likewise.
79577         * modules/readline (Depends-on): Likewise.
79578         * modules/readlink (Depends-on): Likewise.
79579         * modules/readlinkat (Depends-on): Likewise.
79580         * modules/recv (Depends-on): Likewise.
79581         * modules/recvfrom (Depends-on): Likewise.
79582         * modules/regex (Depends-on): Likewise.
79583         * modules/remove (Depends-on): Likewise.
79584         * modules/rename (Depends-on): Likewise.
79585         * modules/renameat (Depends-on): Likewise.
79586         * modules/rmdir (Depends-on): Likewise.
79587         * modules/round (Depends-on): Likewise.
79588         * modules/roundf (Depends-on): Likewise.
79589         * modules/roundl (Depends-on): Likewise.
79590         * modules/rpmatch (Depends-on): Likewise.
79591         * modules/select (Depends-on): Likewise.
79592         * modules/send (Depends-on): Likewise.
79593         * modules/sendto (Depends-on): Likewise.
79594         * modules/setenv (Depends-on): Likewise.
79595         * modules/setlocale (Depends-on): Likewise.
79596         * modules/setsockopt (Depends-on): Likewise.
79597         * modules/shutdown (Depends-on): Likewise.
79598         * modules/sigaction (Depends-on): Likewise.
79599         * modules/signbit (Depends-on): Likewise.
79600         * modules/sigprocmask (Depends-on): Likewise.
79601         * modules/sinl (Depends-on): Likewise.
79602         * modules/sleep (Depends-on): Likewise.
79603         * modules/snprintf (Depends-on): Likewise.
79604         * modules/snprintf-posix (Depends-on): Likewise.
79605         * modules/socket (Depends-on): Likewise.
79606         * modules/sprintf-posix (Depends-on): Likewise.
79607         * modules/sqrtl (Depends-on): Likewise.
79608         * modules/stat (Depends-on): Likewise.
79609         * modules/strchrnul (Depends-on): Likewise.
79610         * modules/strdup-posix (Depends-on): Likewise.
79611         * modules/strerror (Depends-on): Likewise.
79612         * modules/strerror_r-posix (Depends-on): Likewise.
79613         * modules/strndup (Depends-on): Likewise.
79614         * modules/strnlen (Depends-on): Likewise.
79615         * modules/strptime (Depends-on): Likewise.
79616         * modules/strsep (Depends-on): Likewise.
79617         * modules/strsignal (Depends-on): Likewise.
79618         * modules/strstr-simple (Depends-on): Likewise.
79619         * modules/strtod (Depends-on): Likewise.
79620         * modules/strtoimax (Depends-on): Likewise.
79621         * modules/strtok_r (Depends-on): Likewise.
79622         * modules/strtoumax (Depends-on): Likewise.
79623         * modules/symlink (Depends-on): Likewise.
79624         * modules/symlinkat (Depends-on): Likewise.
79625         * modules/tanl (Depends-on): Likewise.
79626         * modules/tcgetsid (Depends-on): Likewise.
79627         * modules/tmpfile (Depends-on): Likewise.
79628         * modules/trunc (Depends-on): Likewise.
79629         * modules/truncf (Depends-on): Likewise.
79630         * modules/truncl (Depends-on): Likewise.
79631         * modules/uname (Depends-on): Likewise.
79632         * modules/unlink (Depends-on): Likewise.
79633         * modules/unlockpt (Depends-on): Likewise.
79634         * modules/unsetenv (Depends-on): Likewise.
79635         * modules/usleep (Depends-on): Likewise.
79636         * modules/utimensat (Depends-on): Likewise.
79637         * modules/vasprintf (Depends-on): Likewise.
79638         * modules/vdprintf (Depends-on): Likewise.
79639         * modules/vdprintf-posix (Depends-on): Likewise.
79640         * modules/vfprintf-posix (Depends-on): Likewise.
79641         * modules/vprintf-posix (Depends-on): Likewise.
79642         * modules/vsnprintf (Depends-on): Likewise.
79643         * modules/vsnprintf-posix (Depends-on): Likewise.
79644         * modules/vsprintf-posix (Depends-on): Likewise.
79645         * modules/wcrtomb (Depends-on): Likewise.
79646         * modules/wcscasecmp (Depends-on): Likewise.
79647         * modules/wcscspn (Depends-on): Likewise.
79648         * modules/wcsdup (Depends-on): Likewise.
79649         * modules/wcsncasecmp (Depends-on): Likewise.
79650         * modules/wcsnrtombs (Depends-on): Likewise.
79651         * modules/wcspbrk (Depends-on): Likewise.
79652         * modules/wcsrtombs (Depends-on): Likewise.
79653         * modules/wcsspn (Depends-on): Likewise.
79654         * modules/wcsstr (Depends-on): Likewise.
79655         * modules/wcstok (Depends-on): Likewise.
79656         * modules/wcswidth (Depends-on): Likewise.
79657         * modules/wctob (Depends-on): Likewise.
79658         * modules/wctomb (Depends-on): Likewise.
79659         * modules/wctype (Depends-on): Likewise.
79660         * modules/wcwidth (Depends-on): Likewise.
79661         * modules/write (Depends-on): Likewise.
79663 2011-05-03  Bruno Haible  <bruno@clisp.org>
79665         Support for conditional dependencies.
79666         * doc/gnulib.texi (Module description): Document the syntax of
79667         conditional dependencies.
79668         * gnulib-tool: New option --conditional-dependencies.
79669         (func_usage): Document it.
79670         (cond_dependencies): New variable.
79671         (func_get_automake_snippet_conditional,
79672         func_get_automake_snippet_unconditional): New functions, extracted from
79673         func_get_automake_snippet.
79674         (func_get_automake_snippet): Use them.
79675         (sed_first_32_chars): New variable.
79676         (func_module_shellfunc_name): New function.
79677         (func_module_shellvar_name): New function.
79678         (func_module_conditional_name): New function.
79679         (func_uncond_add_module, func_conddep_add_module, func_cond_module_p,
79680         func_cond_module_condition): New functions.
79681         (func_modules_transitive_closure): Add support for conditional
79682         dependencies.
79683         (func_emit_lib_Makefile_am): For a conditional module, enclose the
79684         conditional automake snippet in an automake conditional.
79685         (func_emit_autoconf_snippets): Emit shell functions that contain the
79686         code for conditional modules.
79687         (func_import, func_create_testdir): Update specification.
79689 2011-05-03  Eric Blake  <eblake@redhat.com>
79691         test-getaddrinfo: report error information
79692         * tests/test-getaddrinfo.c (simple): Use err outside of dbprintf.
79694 2011-05-03  Jim Meyering  <meyering@redhat.com>
79696         bootstrap: avoid build failure when $GZIP is set
79697         * build-aux/bootstrap (check_versions): Do not treat $GZIP as a
79698         program name.  If defined at all, it is supposed to list gzip options.
79699         Reported by Alan Curry in http://debbugs.gnu.org/8609
79701 2011-05-03  Reuben Thomas  <rrt@sc3d.org>
79703         readme-release: new module with release instructions
79704         * modules/readme-release: New module.
79705         * top/README-release: New file, from coreutils, grep, diffutils.
79706         * MODULES.html.sh (Support for maintaining and releasing): Add it.
79708 2011-05-02  Eric Blake  <eblake@redhat.com>
79710         fflush: also replace fclose when fixing fflush
79711         * modules/fflush (Depends-on): Add fclose.
79712         * m4/fflush.m4 (gl_FUNC_FFLUSH): Also replace fclose.
79713         * lib/fclose.c (rpl_fclose): Don't cause spurious failures on
79714         memstreams with no backing fd.
79715         * doc/posix-functions/fclose.texi (fclose): Document the use of
79716         fflush module to fix the bug.
79717         * tests/test-fclose.c (main): Relax test when fclose is used in
79718         isolation.
79720         fclose: add some tests
79721         * modules/fclose-tests: New test module.
79722         * tests/test-fclose.c: New file.
79723         * doc/posix-functions/fclose.texi (fclose): Document the bug.
79725         fclose: reduced dependencies
79726         * modules/fclose (Depends-on): Switch from fflush/fseeko to
79727         simpler lseek.
79728         * lib/fclose.c (rpl_fclose): Likewise.
79729         Reported by Simon Josefsson.
79731         exit: drop remaining clients
79732         * modules/argmatch (Depends-on): Replace exit with stdlib.
79733         * modules/copy-file (Depends-on): Likewise.
79734         * modules/execute (Depends-on): Likewise.
79735         * modules/exitfail (Depends-on): Likewise.
79736         * modules/obstack (Depends-on): Likewise.
79737         * modules/pagealign_alloc (Depends-on): Likewise.
79738         * modules/pipe-filter-gi (Depends-on): Likewise.
79739         * modules/pipe-filter-ii (Depends-on): Likewise.
79740         * modules/savewd (Depends-on): Likewise.
79741         * modules/spawn-pipe (Depends-on): Likewise.
79742         * modules/wait-process (Depends-on): Likewise.
79743         * modules/xsetenv (Depends-on): Likewise.
79744         * modules/chdir-long (Depends-on): Add stdlib, for EXIT_FAILURE.
79745         * modules/git-merge-changelog (Depends-on): Likewise.
79746         * modules/long-options (Depends-on): Likewise.
79747         * modules/pt_chown (Depends-on): Likewise.
79748         * modules/sysexits (Depends-on): Likewise.
79750         freading: relax license from LGPLv3+ to LGPLv2+
79751         * modules/freading (License): Relax LGPL version.
79753 2011-05-02  Bruno Haible  <bruno@clisp.org>
79755         fchdir: Remove unused dependencies.
79756         * modules/fchdir (Depends-on): Remove include_next.
79758 2011-05-02  Bruno Haible  <bruno@clisp.org>
79760         gnulib-tool: Refactor.
79761         * gnulib-tool (func_emit_autoconf_snippet): New function, extracted
79762         from func_emit_autoconf_snippets.
79763         (func_emit_autoconf_snippets): Use it.
79765 2011-05-02  Simon Josefsson  <simon@josefsson.org>
79767         * NEWS: Document removal of 'exit'.
79768         * modules/exit: Remove file.
79770 2011-05-01  Bruno Haible  <bruno@clisp.org>
79772         Update DEPENDENCIES.
79773         * DEPENDENCIES (gettext): Recommend the newest release.
79774         Reported by Simon Josefsson.
79776 2011-05-01  Bruno Haible  <bruno@clisp.org>
79778         gnulib-tool: Reduce code duplication.
79779         * gnulib-tool (func_emit_autoconf_snippets): New function.
79780         (func_import, func_create_testdir): Use it.
79782 2011-04-30  Eric Blake  <eblake@redhat.com>
79784         fclose: don't fail on non-seekable input stream
79785         * modules/fclose (Depends-on): Add freading, fflush, fseeko.
79786         * lib/fclose.c (rpl_fclose): Skip fflush for non-seekable input,
79787         since fflush is allowed to fail in that case.
79789 2011-04-30  Bruno Haible  <bruno@clisp.org>
79791         dup3: cleanup
79792         * lib/dup3.c: Remove old code, leftover from 2009-12-16.
79794 2011-04-30  Bruno Haible  <bruno@clisp.org>
79796         netdb: Make it work in C++ mode.
79797         * lib/netdb.in.h (struct addrinfo): In C++, define as a C struct.
79798         (getaddrinfo, freeaddrinfo, getnameinfo): Use macros from c++defs
79799         module.
79800         * m4/netdb_h.m4 (gl_NETDB_MODULE_INDICATOR): Invoke
79801         gl_MODULE_INDICATOR_FOR_TESTS.
79802         * modules/netdb-tests (Depends-on): Add netdb-c++-tests.
79803         * modules/netdb-c++-tests: New file.
79804         * tests/test-netdb-c++.cc: New file.
79806 2011-04-30  Bruno Haible  <bruno@clisp.org>
79808         New modules 'vfscanf', 'vscanf'.
79809         * modules/vfscanf: New file.
79810         * modules/vscanf: New file.
79811         * m4/stdio_h.m4 (gl_STDIO_H): Don't set GNULIB_VFSCANF, GNULIB_VSCANF
79812         here.
79813         * doc/posix-functions/vfscanf.texi: Mention module 'vfscanf'.
79814         * doc/posix-functions/vscanf.texi: Mention module 'vscanf'.
79816 2011-04-30  Bruno Haible  <bruno@clisp.org>
79818         passfd: Add comments.
79819         * lib/passfd.c: Add comments about platforms.
79821 2011-04-30  Bruno Haible  <bruno@clisp.org>
79823         sys_uio: Make <sys/uio.h> self-contained.
79824         * lib/sys_uio.in.h: Include <sys/types.h> before <sys/uio.h>.
79825         * doc/posix-headers/sys_uio.texi: Mention the OpenBSD problem.
79827 2011-04-30  Bruno Haible  <bruno@clisp.org>
79829         sys_socket: Ensure 'struct iovec' definition.
79830         * lib/sys_socket.in.h: Include <sys/uio.h> also on platforms that have
79831         <sys/socket.h>.
79832         * doc/posix-headers/sys_socket.texi: Mention the OpenBSD problem.
79834 2011-04-30  Bruno Haible  <bruno@clisp.org>
79836         sys_uio: Protect definition of 'struct iovec'.
79837         * lib/sys_uio.in.h (struct iovec): Avoid redefinition. In C++, define
79838         it as a C struct.
79840 2011-04-30  Bruno Haible  <bruno@clisp.org>
79842         manywarnings: fix indentation
79843         * m4/manywarnings.m4: Indent by 2 spaces consistently.
79845 2011-04-30  Pádraig Brady  <P@draigBrady.com>
79847         manywarnings: add -Wno-missing-field-initializers if needed.
79848         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add the above
79849         option if it's needed to allow initialization with { 0, }
79851 2011-04-29  Reuben Thomas  <rrt@sc3d.org>
79853         announce-gen: cosmetic improvement
79854         * build-aux/announce-gen: Strip any leading ./ from the NEWS file name.
79856 2011-04-29  Jim Meyering  <meyering@redhat.com>
79858         vc-list-files: indent with spaces, not TABs
79859         * build-aux/vc-list-files: Convert leading TABs to spaces,
79860         to match the style of most other files in gnulib.
79862         announce-gen: indent with spaces, not TABs
79863         * build-aux/announce-gen: Convert all TABs to spaces, to match
79864         the style of most other files in gnulib.
79866 2011-04-29  Eric Blake  <eblake@redhat.com>
79868         quotearg: avoid uninitialized variable use
79869         * lib/quotearg.c (quoting_options_from_style): Initialize
79870         remaining fields, and ensure that custom styles are only used via
79871         quoting_options rather than quoting_style.
79873 2011-04-29  Jim Meyering  <meyering@redhat.com>
79875         maint.mk: remove unused VC-tag variable
79876         * top/maint.mk (VC-tag): Remove unused variable.
79878 2011-04-29  Bruno Haible  <bruno@clisp.org>
79880         netdb: fix gai_strerror replacements
79881         * lib/netdb.in.h: Add _GL_FUNCDECL_RPL definitions.
79882         * modules/netdb: Substitute it.
79884 2011-04-29  Jim Meyering  <meyering@redhat.com>
79886         test-getcwd.c: avoid new set-but-not-used warning
79887         * tests/test-getcwd.c (test_abort_bug): Exit nonzero for any problem,
79888         not just the glibc/abort one that getcwd-abort-bug.m4 detects.
79889         * m4/getcwd-abort-bug.m4: Update this now-duplicated code to match,
79890         and adjust the code that sets gl_cv_func_getcwd_abort_bug accordingly.
79892         test-hash.c: avoid a new shadowing warning
79893         * tests/test-hash.c (main): Don't shadow "dup".
79895 2011-04-28  Eric Blake  <eblake@redhat.com>
79897         getaddrinfo: fix gai_strerror signature
79898         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Detect broken signatures,
79899         and work around mingw with UNICODE defined.
79900         (gl_PREREQ_GETADDRINFO): Drop redundant decl check.
79901         * m4/netdb_h.m4 (gl_NETDB_H_DEFAULTS): Add witness.
79902         * modules/netdb (Makefile.am): Substitute it.
79903         * lib/netdb.in.h (gai_strerror): Declare replacement.
79904         * lib/gai_strerror.c (rpl_gai_strerror): Fix signature.
79905         * doc/posix-functions/gai_strerror.texi (gai_strerror): Document
79906         the fix.
79908         getsockopt: avoid compiler warning
79909         * lib/getsockopt.c (rpl_getsockopt): Add a cast for mingw.
79910         Reported by Matthias Bolte.
79912         tests: drop unused link dependency
79913         * modules/areadlinkat-tests (Makefile.am): Drop stale LDADD.
79914         * modules/dirent-safer-tests (Makefile.am): Likewise.
79915         * modules/fdopendir-tests (Makefile.am): Likewise.
79916         * modules/mkfifoat-tests (Makefile.am): Likewise.
79917         * modules/openat-safer-tests (Makefile.am): Likewise.
79918         * modules/openat-tests (Makefile.am): Likewise.
79919         * modules/readlinkat-tests (Makefile.am): Likewise.
79920         * modules/symlinkat-tests (Makefile.am): Likewise.
79921         * modules/linkat-tests (Makefile.am): Likewise.
79922         (Depends-on): Switch to filenamecat-lgpl.
79923         * modules/fdutimensat-tests (test_fdutimensat_LDADD): Drop unused
79924         LIBINTL.
79925         * modules/utimensat-tests (test_utimensat_LDADD): Likewise.
79926         * tests/test-linkat.c (main): Don't require xalloc.
79928         hash, mgetgroups: drop xalloc dependency
79929         * lib/hash.c (includes): Adjust includes.
79930         * lib/mgetgroups.c (includes): Likewise.
79931         (xgetgroups): Move...
79932         * lib/xgetgroups.c: ...to new file.
79933         * lib/mgetgroups.h (xgetgroups): Make declaration conditional.
79934         * modules/xgetgroups: New file, split from...
79935         * modules/mgetgroups: ...here.
79936         (Depends-on): Add xalloc-oversized.
79937         * modules/hash (Depends-on): Likewise.
79938         * modules/hash-tests (Depends-on): Drop xalloc.
79939         (test_hash_LDADD): Drop unused library.
79940         * tests/test-hash.c (main): Break xalloc dependency.
79941         (includes): Drop unused include.
79943         xalloc-oversized: new module
79944         * modules/xalloc-oversized: New module.
79945         * modules/xalloc (Depends-on): Add it.
79946         * lib/xalloc.h (xalloc_oversized): Move...
79947         * lib/xalloc-oversized.h: ...into new file.
79949         utimecmp: drop dependency on xmalloc
79950         * lib/utimecmp.c (utimecmp): Work even if hash table cache fails
79951         due to memory pressure.
79952         * modules/utimecmp (Depends-on): Drop xalloc.
79954 2011-04-27  Eric Blake  <eblake@redhat.com>
79956         getcwd: fix mingw bugs
79957         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Detect one mingw bug.
79958         * doc/posix-functions/getcwd.texi (getcwd): Document the problems.
79959         * lib/getcwd-lgpl.c (rpl_getcwd): Fix return type.
79961 2011-04-27  Bruno Haible  <bruno@clisp.org>
79963         mkstemps: Ensure declaration on MacOS X 10.5.
79964         * lib/stdlib.in.h: Include <unistd.h> when mkstemps is requested.
79965         * doc/glibc-functions/mkstemps.texi: Document header file problem on
79966         MacOS X.
79968 2011-04-27  Bruno Haible  <bruno@clisp.org>
79970         mkstemp: More documentation.
79971         * doc/posix-functions/mkstemp.texi: Document header file problem on
79972         MacOS X.
79974 2011-04-27  Bruno Haible  <bruno@clisp.org>
79976         mkstemp: Tweak configure message when cross-compiling.
79977         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): When cross-compiling, qualify the
79978         result as a guess.
79980 2011-04-27  Bruno Haible  <bruno@clisp.org>
79982         clean-temp: Clarify what it does.
79983         * lib/clean-temp.h: Add more comments.
79984         * doc/posix-functions/mkstemp.texi: Tweak reference to 'clean-temp'
79985         module.
79986         * doc/glibc-functions/mkostemp.texi: Mention 'clean-temp' here too.
79987         * doc/glibc-functions/mkstemps.texi: Likewise.
79988         * doc/glibc-functions/mkostemps.texi: Likewise.
79990 2011-04-27  Eric Blake  <eblake@redhat.com>
79992         fchdir: avoid extra chdir and fix test
79993         * modules/fchdir (Depends-on): Add dosname, filenamecat-lgpl,
79994         getcwd-lgpl.
79995         * lib/fchdir.c (get_name): Any absolute name will do; it does not
79996         have to be canonical.
79997         (canonicalize_file_name): Drop unused macro.
79998         * m4/dup2.m4 (gl_REPLACE_DUP2): Ensure dup2 is replaced.
80000         filenamecat-lgpl: fix licence
80001         * modules/filenamecat-lgpl (License): Mark as LGPLv2+, as intended
80002         when it was first created.
80004         linkat, renameat: add missing dependency
80005         * modules/linkat (Depends-on): Require getcwd-lgpl.
80006         * modules/renameat (Depends-on): Likewise.
80008         tests: reduce dependencies
80009         * tests/test-linkat.c (main): Use lighter-weight getcwd.
80010         * tests/test-renameat.c (main): Likewise.
80011         * modules/linkat-tests (Depends-on): Relax dependency.
80012         * modules/renameat-tests (Depends-on): Likewise.
80013         * modules/fchdir-tests (Depends-on): Likewise.  Also make cloexec
80014         dependency explicit.
80016         save-cwd: reduce default dependency
80017         * modules/save-cwd (Depends-on): Use getcwd-lgpl.
80018         * lib/save-cwd.c: Update comments.
80019         * NEWS: Document the semantic change.
80021         getcwd: enhance tests
80022         * tests/test-getcwd-lgpl.c: New file, taken from...
80023         * tests/test-getcwd.c: ...old contents.  Rewrite this file to
80024         repeat long path stress tests from m4 probe.
80025         * modules/getcwd-lgpl-tests: New module.
80026         * modules/getcwd-tests (Depends-on): Depend on lgpl tests.
80027         * m4/getcwd-abort-bug.m4: Update comment.
80028         * m4/getcwd-path-max.m4: Likewise.
80030         getcwd-lgpl: new module
80031         * modules/getcwd-lgpl: New module.
80032         * lib/getcwd-lgpl.c: New file.
80033         * doc/posix-functions/getcwd.texi (getcwd): Document it.
80034         * MODULES.html.sh (lacking POSIX:2008): Likewise.
80035         * modules/getcwd (configure.ac): Set C witness.
80036         * m4/getcwd.m4 (gl_FUNC_GETCWD_LGPL): New macro.
80038         getcwd: tweak comments
80039         * m4/getcwd-abort-bug.m4: Fix comments.
80040         * m4/getcwd-path-max.m4: Likewise.
80041         * m4/getcwd.m4: Likewise.
80043 2011-04-27  Reuben Thomas  <rrt@sc3d.org>
80044         and Eric Blake  <eblake@redhat.com>
80046         mkstemp: replace if system version uses wrong permissions
80047         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Add test for non-owner
80048         read/write mode bits set in file created by mkstemp.
80049         * doc/posix-functions/mkstemp.texi (mkstemp): Document the fix.
80051 2011-04-27  Eric Blake  <eblake@redhat.com>
80053         passfd: avoid compiler warning
80054         * lib/passfd.c (sendfd, recvfd): Avoid shadowing names.
80055         Reported by Laine Stump.
80057 2011-04-27  J.T. Conklin  <jtc@acorntoolworks.com>  (tiny change)
80059         * gnulib-tool: change "join -a 2" to "join -a2", the latter is
80060         required by the NetBSD (and perhaps other 4.4BSD derived) join.
80062 2011-04-27  Reuben Thomas  <rrt@sc3d.org>
80063         and Eric Blake  <eblake@redhat.com>
80065         mkstemp: mention clean-temp module
80066         * lib/mkstemp.c: Add comment.
80067         * doc/posix-functions/mkstemp.texi (mkstemp): Likewise.
80069 2011-04-26  Paul Eggert  <eggert@cs.ucla.edu>
80071         inttypes: also provide default values for 32-bit tests
80072         * m4/inttypes.m4 (gl_INTTYPES_H_DEFAULTS): Also provide default values
80073         for INT32_MAX_LT_INTMAX_MAX and for UINT32_MAX_LT_UINTMAX_MAX.
80075 2011-04-25  Paul Eggert  <eggert@cs.ucla.edu>
80077         strtoumax: remove dependency on strtoimax
80078         This is like the strtoull change of yesterday.
80079         * modules/strtoumax (Files): Add lib/strtoimax.c.
80080         (Depends-on): Remove strtoimax and add verify.
80082         inttypes-incomplete: new module
80083         * m4/inttypes.m4 (gl_INTTYPES_INCOMPLETE): New macro, containing
80084         all but the PRI* and SCN* parts of gl_INTTYPES_H.
80085         (gl_INTTYPES_PRI_SCN): New macro, containing the PRI* and SCN* parts
80086         of gl_INTTYPES_H.
80087         (gl_INTTYPES_H): Rewrite in terms of these new macros.
80088         (gl_INTTYPES_H_DEFAULTS): Provide defaults for the PRI* and SCN*
80089         parts, in case gl_INTTYPE_PRI_SCN is not invoked.
80090         * modules/imaxabs, modules/imaxdiv, modules/strtoimax (Depends-on):
80091         * modules/strtoumax, modules/xstrtol (Depends-on):
80092         Depend on inttypes-incomplete, not inttypes.
80093         * modules/inttypes-incomplete: New module, containing the contents
80094         of the old modules/inttypes module, except that the Files: section
80095         omits m4/inttypes-pri.m4, and the configure.ac section invokes
80096         gl_INTTYPES_INCOMPLETE rather than gl_INTTYPES_H.
80097         * modules/inttypes (Files): Remove lib/inttypes.in.h, m4/inttypes.m4.
80098         (Depends-on): Depend only on inttypes-incomplete.
80099         (Makefile.am): Remove everything; this is now in inttypes-incomplete.
80101         inttypes: omit now-redundant strtoimax and strtoumax work
80102         * m4/inttypes.m4 (gl_INTTYPES_H): Do not check for strtoimax and
80103         strtoumax decls; gl_FUNC_STRTOIMAX and gl_FUNC_STRTOUMAX now do this.
80105         strtoimax, strtoumax: simplify, port to HP-UX 11.00 64-bit
80106         This supports apps that need pointers to strtoimax and strtoumax,
80107         and ports to HP-UX 11.00 64.bit, which has macros that expand to
80108         nonexistent functions.  See
80109         <http://lists.gnu.org/r/bug-gnulib/2011-04/msg00241.html>
80110         et seq.
80111         * lib/inttypes.in.h (strtoimax, strtoumax): #undef before declaring.
80112         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Don't check whether it's
80113         a macro.
80114         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
80116 2011-04-25  Simon Josefsson  <simon@josefsson.org>
80118         * modules/gnumakefile (configure.ac): Replace TAB with SPCs.
80120 2011-04-25  Bruno Haible  <bruno@clisp.org>
80122         strtol, strtoul: Mark modules as obsolete.
80123         * modules/strtol (Status, Notice): New sections.
80124         * modules/strtoul (Status, Notice): New sections.
80126 2011-04-25  Bruno Haible  <bruno@clisp.org>
80128         strtod: Remove check for strtod, unless supporting old platforms.
80129         * modules/strtod-obsolete: New file.
80130         * m4/strtod-obsolete.m4: New file.
80131         * m4/strtod.m4 (gl_FUNC_STRTOD): Don't check whether strtod is declared
80132         if gl_FUNC_STRTOD_OBSOLETE is not also defined.
80133         * modules/strtod (Depends-on): Add strtod-obsolete.
80134         * doc/posix-functions/strtod.texi: Mention module strtod-obsolete.
80136 2011-04-25  Bruno Haible  <bruno@clisp.org>
80138         strcase: Make module obsolete.
80139         * modules/strcase (Status, Notice): New sections.
80141 2011-04-25  Bruno Haible  <bruno@clisp.org>
80143         dup2: Remove check for dup2, unless supporting old obsolete platforms.
80144         * modules/dup2-obsolete: New file.
80145         * m4/dup2-obsolete.m4: New file.
80146         * m4/dup2.m4 (gl_FUNC_DUP2): Don't check whether dup2 exists if
80147         gl_FUNC_DUP2_OBSOLETE is not also defined.
80148         * modules/dup2 (Depends-on): Add dup2-obsolete.
80149         * doc/posix-functions/dup2.texi: Mention module dup2-obsolete.
80151 2011-04-25  Bruno Haible  <bruno@clisp.org>
80153         strnlen: Avoid memchr related link error on old obsolete platforms.
80154         * modules/memchr-obsolete: New file.
80155         * m4/memchr-obsolete.m4: New file.
80156         * m4/memchr.m4 (gl_FUNC_MEMCHR): Don't check whether memchr exists if
80157         gl_FUNC_MEMCHR_OBSOLETE is not also defined.
80158         * modules/memchr (Depends-on): Add memchr-obsolete.
80159         * modules/strnlen (Depends-on): Likewise.
80160         * doc/posix-functions/memchr.texi: Mention module memchr-obsolete.
80162 2011-04-25  Jim Meyering  <meyering@redhat.com>
80164         maint.mk: makefile_at_at_check extend and clean up
80165         * top/maint.mk (sc_makefile_at_at_check): Check *.mk files
80166         in addition to */Makefile.am.
80167         Exempt legitimate uses of @VAR@ notation, e.g.,
80168         MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@
80169         Remove obsolete coreutils-specific comment.
80170         Prompted by discussion here:
80171         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/26074
80173 2011-04-24  Paul Eggert  <eggert@cs.ucla.edu>
80175         strtoul: remove dependency on strtol
80176         This is so that 'configure' need not check for strtol merely because
80177         the application needs strtoul.
80178         * modules/strtoul (Files): Add lib/strtol.c.
80179         (Depends-on): Remove strtol.
80181         strtoull: remove dependency on strtoul
80182         This is like the strtoll change.
80183         * modules/strtoull (Files): Add lib/strtol.c, lib/strtoul.c.
80184         (Depends-on): Remove strtoul.
80186         strtoll: remove dependency on strtol
80187         This is so that 'configure' need not check for strtol merely because
80188         the application needs strtoll.
80189         * modules/strtoll (Files): Add lib/strtol.c.
80190         (Depends-on): Remove strtol.
80192 2011-04-22  Paul Eggert  <eggert@cs.ucla.edu>
80194         inttypes: Move some configure check to module 'imaxdiv'.
80195         * m4/imaxdiv.m4 (gl_FUNC_IMAXDIV): Require gl_INTTYPES_H_DEFAULTS
80196         instead of gl_INTTYPES_H.  Check for imaxdiv decl here.
80197         * m4/inttypes.m4 (gl_INTTYPES_H): Don't check for imaxdiv decl here.
80199 2011-04-22  Paul Eggert  <eggert@cs.ucla.edu>
80201         inttypes: Move some configure check to module 'imaxabs'.
80202         * m4/imaxabs.m4 (gl_FUNC_IMAXABS): Require gl_INTTYPES_H_DEFAULTS
80203         instead of gl_INTTYPES_H.  Check for imaxabs decl here.
80204         * m4/inttypes.m4 (gl_INTTYPES_H): Don't check for imaxabs decl here.
80206 2011-04-22  Paul Eggert  <eggert@cs.ucla.edu>
80208         inttypes: Remove configure tests that are not needed since 2009-12-31.
80209         * m4/inttypes.m4 (gl_INTTYPES_H): Remove determination of
80210         gl_cv_header_working_inttypes_h.
80212 2011-04-22  Paul Eggert  <eggert@cs.ucla.edu>
80214         * modules/strnlen (Depends-on): Remove memchr.
80215         The strnlen implementation doesn't need the memchr module's fixes; see
80216         <http://lists.gnu.org/r/bug-gnulib/2011-04/msg00237.html>.
80218         strtol: remove dependency on wchar
80219         * lib/strtol.c: Include <wchar.h> only if USE_WIDE_CHAR is defined.
80220         * modules/strtol (Depends-on): Remove wchar.
80222 2011-04-21  Eric Blake  <eblake@redhat.com>
80224         passfd: fix test regression on Linux
80225         * modules/passfd-tests (configure.ac): Correct socketpair check.
80227         passfd: speed up configure and drop unused code
80228         * m4/afunix.m4 (gl_SOCKET_AFUNIX): Rename...
80229         * m4/passfd.m4 (gl_PASSFD): ...to something more fitting of
80230         its use.  Drop test for setting unused HAVE_UNIXSOCKET_SCM_RIGHTS.
80231         Instead of probing at configure for unix_scm_rights_bsd44_way,
80232         instead probe for CMSG_FIRSTHDR at compile time.  Simplify BSD 4.3
80233         check to a struct member probe.
80234         * lib/passfd.c (includes): Nothing here requires <sys/un.h>.
80235         (sendfd, recvfd): Update preprocessor checks.
80236         * modules/passfd (Files): Reflect rename, and drop unused file.
80237         (Depends-on): Drop unused dependency.
80239         passfd: allow compilation on mingw
80240         * modules/sys_socket (Depends-on): Add sys_uio.
80241         * lib/sys_socket.in.h [!@HAVE_SYS_SOCKET_H@]: Use it for struct
80242         iovec and a minimal struct msghdr.
80243         * m4/afunix.m4 (gl_SOCKET_AFUNIX): Detect recvmsg/sendmsg.
80244         * tests/test-sys_socket.c (main): Enhance test.
80245         * lib/passfd.c (include): Drop <sys/uio.h>; <sys/sockets.h> is
80246         guaranteed to provide what we need.
80247         (sendmsg, recvmsg): Declare fallbacks if we lack sendmsg.
80248         * modules/passfd-tests (Depends-on): Add sys_wait.
80249         * tests/test-passfd.c (main): Skip test on mingw, for now.
80250         * doc/posix-headers/sys_socket.texi (sys/socket.h): Document the
80251         partial 'struct msghdr' implementation.
80253         sys_uio: new module
80254         * modules/sys_uio: New module.
80255         * modules/sys_uio-tests: Likewise.
80256         * lib/sys_uio.in.h: New file.
80257         * m4/sys_uio_h.m4: Likewise.
80258         * tests/test-sys_uio.c: Likewise.
80259         * doc/posix-headers/sys_uio.texi (sys/uio.h): Document it.
80260         * MODULES.html.sh (systems lacking POSIX:2008): Likewise.
80262 2011-04-20  Jim Meyering  <meyering@redhat.com>
80264         useless-if-before-free: avoid false-positive
80265         * build-aux/useless-if-before-free: Adjust regexp for the non-brace
80266         disjunct so that it too requires a terminating ";".  Without that,
80267         this script would identify as useless one statement from gcc that
80268         was not:
80269           if (aligned_ptr)
80270             free (((void **) aligned_ptr) [-1]);
80272 2011-04-20  Giuseppe Scrivano  <gscrivano@gnu.org>
80274         doc: update users.txt.
80275         * users.txt: Add barcode.
80277 2011-04-19  Bruno Haible  <bruno@clisp.org>
80279         ioctl: Remove link dependency on native Windows.
80280         * lib/fd-hook.h: Renamed from lib/close-hook.h.
80281         (gl_close_fn, gl_ioctl_fn): New types.
80282         (struct fd_hook): Renamed from struct close_hook. Change type of
80283         private_close_fn field. Add private_ioctl_fn field.
80284         (close_hook_fn): Add parameter for primary close method.
80285         (execute_close_hooks, execute_all_close_hooks): Likewise.
80286         (ioctl_hook_fn): New type.
80287         (execute_ioctl_hooks, execute_all_ioctl_hooks): New declarations.
80288         (register_fd_hook): Renamed from register_close_hook. Add ioctl_hook
80289         argument.
80290         (unregister_fd_hook): Renamed from unregister_close_hook.
80291         * lib/fd-hook.c: Renamed from lib/close-hook.c.
80292         Don't include <unistd.h>.
80293         (close): Remove undef.
80294         (anchor): Update.
80295         (execute_close_hooks): Add argument for primary close method.
80296         (execute_all_close_hooks): Likewise.
80297         (execute_ioctl_hooks, execute_all_ioctl_hooks): New functions.
80298         (register_fd_hook): Renamed from register_close_hook. Add ioctl_hook
80299         argument. Allow each argument to be NULL.
80300         (unregister_fd_hook): Renamed from unregister_close_hook.
80301         * lib/close.c (rpl_close): Pass 'close' function pointer to
80302         execute_all_close_hooks.
80303         * lib/ioctl.c: Include <errno.h>, fd-hook.h.
80304         (primary_ioctl): New function.
80305         (ioctl): Don't call ioctlsocket here. Instead, call
80306         execute_all_ioctl_hooks.
80307         * lib/sockets.c (close_fd_maybe_socket): Add argument for primary
80308         close method.
80309         (ioctl_fd_maybe_socket): New function, with code from lib/ioctl.c.
80310         (fd_sockets_hook): Renamed from close_sockets_hook.
80311         (gl_sockets_startup, gl_sockets_cleanup): Update.
80312         * modules/fd-hook: Renamed from modules/close-hook. Update.
80313         * modules/close (Depends-on): Add fd-hook, remove close-hook.
80314         * modules/sockets (Depends-on): Likewise.
80315         * modules/ioctl (Depends-on): Add fd-hook.
80316         * tests/test-nonblocking.c (main): Use GNULIB_TEST_SOCKET, not
80317         GNULIB_SOCKET.
80319 2011-04-19  Bruno Haible  <bruno@clisp.org>
80321         Move the support of O_NONBLOCK in open() to the 'open' module.
80322         * modules/nonblocking (Depends-on): Remove 'open'.
80323         * m4/nonblocking.m4 (gl_NONBLOCKING_IO_BODY): Set
80324         gl_cv_have_open_O_NONBLOCK.
80325         * m4/open.m4 (gl_FUNC_OPEN): Replace open() also when required for
80326         O_NONBLOCK support.
80327         * doc/posix-functions/open.texi: Document support for O_NONBLOCK.
80329 2011-04-17  Bruno Haible  <bruno@clisp.org>
80331         pipe2: Simplify code.
80332         * lib/pipe2.c (pipe2): Reduce code duplication.
80334 2011-04-17  Bruno Haible  <bruno@clisp.org>
80336         nonblocking: Add comment.
80337         * lib/fcntl.in.h (O_NONBLOCK): Add comment.
80339 2011-04-17  Bruno Haible  <bruno@clisp.org>
80341         nonblocking: Add tests for sockets.
80342         * tests/test-nonblocking-socket.sh: New file.
80343         * tests/test-nonblocking-socket-main.c: New file.
80344         * tests/test-nonblocking-socket-child.c: New file.
80345         * tests/test-nonblocking-socket.h: New file.
80346         * tests/socket-server.h: New file.
80347         * tests/socket-client.h: New file.
80348         * modules/nonblocking-socket-tests: New file.
80349         * modules/nonblocking-tests (Depends-on): Add nonblocking-socket-tests.
80351 2011-04-17  Bruno Haible  <bruno@clisp.org>
80353         nonblocking: Add tests for pipes.
80354         * tests/test-nonblocking-pipe.sh: New file.
80355         * tests/test-nonblocking-pipe-main.c: New file.
80356         * tests/test-nonblocking-pipe-child.c: New file.
80357         * tests/test-nonblocking-pipe.h: New file.
80358         * tests/test-nonblocking-writer.h: New file.
80359         * tests/test-nonblocking-reader.h: New file.
80360         * tests/test-nonblocking-misc.h: New file.
80361         * modules/nonblocking-pipe-tests: New file.
80362         * modules/nonblocking-tests (Depends-on): Add nonblocking-pipe-tests.
80364 2011-04-16  Bruno Haible  <bruno@clisp.org>
80366         gettext: Clarify the needed programmer actions.
80367         * modules/gettext (Notice): New field.
80368         Suggested by Ben Pfaff <blp@cs.stanford.edu>.
80370 2011-04-16  Bruno Haible  <bruno@clisp.org>
80372         strchrnul: Tweak last commit.
80373         * doc/glibc-functions/strchrnul.texi: Add more details about Cygwin
80374         bug.
80375         * lib/string.in.h (strchrnul): Use same arguments in _GL_FUNCDECL_RPL
80376         as in _GL_FUNCDECL_SYS.
80377         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Invoke gl_PREREQ_STRCHRNUL after
80378         AC_LIBOBJ. When cross-compiling, say "guessing yes" not "yes".
80380 2011-04-15  Eric Blake  <eblake@redhat.com>
80382         strchrnul: work around cygwin bug
80383         * doc/glibc-functions/strchrnul.texi (strchrnul): Document bug.
80384         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Detect it.
80385         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New witness.
80386         * modules/string (Makefile.am): Substitute it.
80387         * lib/string.in.h (strchrnul): Use it.
80389 2011-04-15  Bruno Haible  <bruno@clisp.org>
80391         Don't require lib/stdio-write.c when only module 'stdio' is used.
80392         * m4/stdio_h.m4 (gl_STDIO_H): Move the AC_LIBOBJ back into the m4_ifdef
80393         invocation.
80394         Reported by Rob Vermaas <rob.vermaas@gmail.com>.
80396 2011-04-14  Bruno Haible  <bruno@clisp.org>
80398         Support non-blocking pipe I/O in read() on native Windows.
80399         * lib/unistd.in.h: Include <sys/types.h> also for 'read'.
80400         (read): New declaration.
80401         * lib/read.c: New file.
80402         * lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT_SCANF,
80403         _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM): New macros.
80404         (fgetc, fgets, fread, fscanf, getc, getchar, gets, scanf, vfscanf,
80405         vscanf): New declarations.
80406         * lib/stdio-read.c: New file.
80407         * m4/read.m4: New file.
80408         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_READ,
80409         REPLACE_READ.
80410         * m4/stdio_h.m4 (gl_STDIO_H): Set GNULIB_FGETC, GNULIB_FGETS,
80411         GNULIB_FREAD, GNULIB_FSCANF, GNULIB_GETC, GNULIB_GETCHAR, GNULIB_GETS,
80412         GNULIB_SCANF, GNULIB_VFSCANF, GNULIB_VSCANF. In non-blocking I/O is
80413         desired and needs workarounds, set REPLACE_STDIO_READ_FUNCS.
80414         (gl_STDIO_H_DEFAULTS): Initialize GNULIB_FGETC, GNULIB_FGETS,
80415         GNULIB_FREAD, GNULIB_FSCANF, GNULIB_GETC, GNULIB_GETCHAR, GNULIB_GETS,
80416         GNULIB_SCANF, GNULIB_VFSCANF, GNULIB_VSCANF, REPLACE_STDIO_READ_FUNCS.
80417         * modules/read: New file.
80418         * modules/nonblocking (Files): Add lib/stdio-read.c.
80419         * modules/unistd (Makefile.am): Substitute GNULIB_READ, REPLACE_READ.
80420         * modules/stdio (Makefile.am): Substitute GNULIB_FGETC, GNULIB_FGETS,
80421         GNULIB_FREAD, GNULIB_FSCANF, GNULIB_GETC, GNULIB_GETCHAR, GNULIB_GETS,
80422         GNULIB_SCANF, GNULIB_VFSCANF, GNULIB_VSCANF, REPLACE_STDIO_READ_FUNCS.
80423         * modules/pread (Depends-on): Add read.
80424         * modules/safe-read (Depends-on): Likewise.
80425         * tests/test-stdio-c++.cc (fgetc, fgets, fread, fscanf, getc, getchar,
80426         gets, scanf, vfscanf, vscanf): Verify signatures.
80427         * doc/posix-functions/read.texi: Mention 'nonblocking' module and
80428         problem with non-blocking pipes.
80429         * doc/posix-functions/fgetc.texi: Likewise.
80430         * doc/posix-functions/fgets.texi: Likewise.
80431         * doc/posix-functions/fread.texi: Likewise.
80432         * doc/posix-functions/fscanf.texi: Likewise.
80433         * doc/posix-functions/getc.texi: Likewise.
80434         * doc/posix-functions/getchar.texi: Likewise.
80435         * doc/posix-functions/gets.texi: Likewise.
80436         * doc/posix-functions/scanf.texi: Likewise.
80437         * doc/posix-functions/vfscanf.texi: Likewise.
80438         * doc/posix-functions/vscanf.texi: Likewise.
80440 2011-04-14  Bruno Haible  <bruno@clisp.org>
80442         Support non-blocking pipe I/O in write() on native Windows.
80443         * lib/write.c (rpl_write): Split a write request that failed merely
80444         because the byte count was larger than the pipe buffer's size.
80445         * doc/posix-functions/write.texi: Mention the problem with large byte
80446         counts.
80448 2011-04-14  Bruno Haible  <bruno@clisp.org>
80450         wchar: Ensure that wchar_t gets defined on uClibc.
80451         * lib/wchar.in.h: On uClibc, include <stddef.h>.
80452         Reported by Giuseppe Scrivano <gscrivano@gnu.org>.
80454 2011-04-13  Bruno Haible  <bruno@clisp.org>
80456         safe-write, full-read: Avoid unnecessary compilation units.
80457         * modules/safe-write (Files): Add lib/safe-read.c, m4/safe-read.m4.
80458         (Depends-on): Remove safe-read. Add ssize_t.
80459         * modules/full-read (Files): Add lib/full-write.c.
80460         (Depends-on): Add full-write.
80462 2011-04-13  Bruno Haible  <bruno@clisp.org>
80464         Support non-blocking pipe I/O and SIGPIPE in pwrite().
80465         * modules/pwrite (Depends-on): Add 'write'.
80467 2011-04-13  Bruno Haible  <bruno@clisp.org>
80469         Support non-blocking pipe I/O in write() on native Windows.
80470         * lib/unistd.in.h (write): Enable replacement also if
80471         GNULIB_UNISTD_H_NONBLOCKING is 1.
80472         * lib/write.c: Enable replacement also if GNULIB_NONBLOCKING.
80473         (rpl_write): When failing to write on a non-blocking pipe, change
80474         errno from ENOSPC to EAGAIN.
80475         * lib/stdio.in.h (fprintf, fputc, fputs, fwrite, printf, putc,
80476         putchar, puts, vfprintf, vprintf): Enable replacement also if
80477         GNULIB_STDIO_H_NONBLOCKING is 1.
80478         * lib/stdio-write.c: Enable replacements also if GNULIB_NONBLOCKING.
80479         (CLEAR_ERRNO, HANDLE_ENOSPC): New macros.
80480         (CLEAR_LastError, HANDLE_ERROR_NO_DATA): New macros, extracted from
80481         CALL_WITH_SIGPIPE_EMULATION.
80482         (CALL_WITH_SIGPIPE_EMULATION): Use them.
80483         * m4/nonblocking.m4: New file.
80484         * m4/write.m4 (gl_FUNC_WRITE): Enable REPLACE_WRITE also if required
80485         for non-blocking I/O support.
80486         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
80487         GNULIB_UNISTD_H_NONBLOCKING.
80488         * m4/stdio_h.m4 (gl_STDIO_H): Enable REPLACE_STDIO_WRITE_FUNCS also if
80489         required for non-blocking I/O support.
80490         (gl_STDIO_H_DEFAULTS): Initialize GNULIB_STDIO_H_NONBLOCKING.
80491         * modules/nonblocking (Files): Add m4/nonblocking.m4,
80492         lib/stdio-write.c, m4/asm-underscore.m4.
80493         (Depends-on): Add stdio, unistd.
80494         (configure.ac): Invoke gl_NONBLOCKING_IO. Define GNULIB_NONBLOCKING.
80495         Set GNULIB_STDIO_H_NONBLOCKING, GNULIB_UNISTD_H_NONBLOCKING.
80496         * modules/unistd (Makefile.am): Substitute GNULIB_UNISTD_H_NONBLOCKING.
80497         * modules/stdio (Makefile.am): Substitute GNULIB_STDIO_H_NONBLOCKING.
80498         * doc/posix-functions/fprintf.texi: Mention 'nonblocking' module and
80499         problem with non-blocking pipes.
80500         * doc/posix-functions/fputc.texi: Likewise.
80501         * doc/posix-functions/fputs.texi: Likewise.
80502         * doc/posix-functions/fwrite.texi: Likewise.
80503         * doc/posix-functions/printf.texi: Likewise.
80504         * doc/posix-functions/putc.texi: Likewise.
80505         * doc/posix-functions/putchar.texi: Likewise.
80506         * doc/posix-functions/puts.texi: Likewise.
80507         * doc/posix-functions/vfprintf.texi: Likewise.
80508         * doc/posix-functions/vprintf.texi: Likewise.
80509         * doc/posix-functions/write.texi: Likewise.
80511 2011-04-10  Jim Meyering  <meyering@redhat.com>
80513         maint.mk: prohibit doubled words
80514         Detect them also when they're separated by a newline.
80515         There are 3 ways to customize it:
80516           - disable the test on a per file basis, as usual with rules using
80517             $(VC_LIST_EXCEPT)
80518           - replace the default doubled-word-selecting regexp (affects all files)
80519           - ignore a particular file-vs-doubled-word match
80520         I nearly used that last one to ignore the "is is" match in
80521         coreutils' NEWS file, since the text was "ls -is is ..."
80522         To do that, I would have added this line to cfg.mk:
80523           ignore_doubled_word_match_RE_ = ^NEWS:[0-9]+:is[ ]is$
80524         but it would have ignored any "is is" match in NEWS.
80525         Low probability, but still...
80526         Instead, I changed the text, slightly:
80527           -  ls -is is now consistent with ls -lis in ignoring values returned
80528           +  "ls -is" is now consistent with ls -lis in ignoring values returned
80529         * top/maint.mk (prohibit_double_word_RE_): Provide default.
80530         (prohibit_doubled_word_): Define.
80531         (sc_prohibit_doubled_word): New rule.
80532         (sc_prohibit_the_the): Remove.  Subsumed by the above.
80534 2011-04-10  Jim Meyering  <meyering@redhat.com>
80536         maint: fix doubled-word typo in comment
80537         * m4/gethostname.m4: s/is is/it is/
80538         * m4/getdomainname.m4: Likewise.
80540 2011-04-10  Jim Meyering  <meyering@redhat.com>
80542         maint: remove doubled word: s/it it/it/
80543         * lib/stat-time.h (get_stat_birthtime): s/it it/it/
80545 2011-04-10  Jim Meyering  <meyering@redhat.com>
80547         maint.mk: remove useless semicolon and backslash
80548         * top/maint.mk (sc_prohibit_empty_lines_at_EOF): Remove stray
80549         semicolon and backslash.
80551 2011-04-10  Bruno Haible  <bruno@clisp.org>
80553         stdint test: Fix compilation failure on OSF/1 with DTK compiler.
80554         * modules/stdint-tests (Depends-on): Add wchar.
80556 2011-04-10  Jim Meyering  <meyering@redhat.com>
80558         maint: remove doubled words in comments, e.g., s/a a/a/
80559         * lib/strptime.c (day_of_the_week): s/the the/the/
80560         * tests/test-chown.h (test_chown): s/a a/a/
80562         test-chown.h: correct a cast
80563         * tests/test-chown.h (test_chown): Cast -1 to gid_t (not uid_t)
80564         when the destination is a stat.st_gid.
80566 2011-04-09  Mats Erik Andersson  <mats.andersson@gisladisker.se>  (tiny change)
80568         getaddrinfo: Fix test for sa_len member.
80569         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): When testing for sa_len,
80570         include <sys/types.h> before <sys/socket.h>.
80572 2011-04-09  Paul Eggert  <eggert@cs.ucla.edu>
80574         maint: change "can not" to "cannot"
80575         * doc/posix-functions/iconv.texi (iconv): This one crossed line
80576         boundaries.
80578 2011-04-09  Jim Meyering  <meyering@redhat.com>
80580         maint: change "a a" to "a"
80581         * tests/test-lchown.h (test_lchown): s/a a/a/
80583         maint.mk: prohibit \<the the\>
80584         * top/maint.mk (sc_prohibit_the_the): New rule.
80586         maint: fix "the the" in comment
80587         * lib/count-one-bits.h: s/the the/the/
80589         maint: change "can not" to "cannot"
80590         But do not change the occurrences in maintain.texi or in
80591         build-aux/po/Makefile.in.in, which I presume comes from gettext.
80592         * doc/gnulib-tool.texi: s/can not/cannot/
80593         * doc/posix-functions/accept.texi (accept): Likewise.
80594         * doc/posix-functions/socket.texi (socket): Likewise.
80595         * lib/mbrtowc.c: Likewise.
80597         maint.mk: prohibit use of "can not"
80598         * top/maint.mk (sc_prohibit_can_not): New rule.
80599         Writing "can not" (rather than "cannot") is too common.  Prohibit it.
80601 2011-04-09  Bruno Haible  <bruno@clisp.org>
80603         careadlinkat: Guard against misuse of careadlinkatcwd.
80604         * lib/careadlinkat.c: Include <stdlib.h>.
80605         (careadlinkatcwd): Check that the fd argument is as expected.
80607 2011-04-09  Bruno Haible  <bruno@clisp.org>
80609         careadlinkat: Use common coding style.
80610         * lib/careadlinkat.c: Move gnulib includes after system includes.
80612 2011-04-09  Bruno Haible  <bruno@clisp.org>
80614         careadlinkat: Clarify specification.
80615         * lib/careadlinkat.h (careadlinkat): Clarify preadlinkat argument.
80616         (careadlinkatcwd): Add comment.
80617         * lib/careadlinkat.c (careadlinkat): Clarify preadlinkat argument.
80619 2011-04-09  Bruno Haible  <bruno@clisp.org>
80621         areadlinkat: Avoid link error on many platforms.
80622         * modules/areadlinkat (Depends-on): Add areadlink.
80624 2011-04-09  Bruno Haible  <bruno@clisp.org>
80626         allocator, careadlinkat: Fix double-inclusion guard.
80627         * lib/allocator.h: Fix double-inclusion guard.
80628         * lib/careadlinkat.h: Likewise.
80630 2011-04-09  Bruno Haible  <bruno@clisp.org>
80632         relocatable-prog-wrapper: Update after module 'areadlink' changed.
80633         * lib/relocwrapper.c: Update dependencies hierarchy.
80634         * build-aux/install-reloc: Update list of files to be compiled.
80635         * modules/relocatable-prog-wrapper (Files): Add lib/careadlinkat.[hc],
80636         lib/allocator.[hc].
80638 2011-04-08  Eric Blake  <eblake@redhat.com>
80640         strftime: silence gnulib-tool warning
80641         * modules/strftime-tests (Depends-on): Drop automatic dependency.
80643 2011-04-08  Bruno Haible  <bruno@clisp.org>
80645         verify: Fix syntax error with GCC 4.6 in C++ mode.
80646         * lib/verify.h (HAVE__STATIC_ASSERT): Don't define in C++ mode.
80647         (HAVE_STATIC_ASSERT): New macro.
80648         (verify_true, verify): Use 'static_assert' if it is supported and
80649         '_Static_assert' is not supported.
80651 2011-04-08  Paul Eggert  <eggert@cs.ucla.edu>
80653         allocator: New module.
80654         * modules/allocator, lib/allocator.c: New files.
80655         * lib/allocator.h (stdlib_allocator): New decl.
80656         * lib/careadlinkat.c (_GL_USE_STDLIB_ALLOC, standard_allocator):
80657         Remove.  Do not include <stdlib.h>.
80658         (careadlinkat): Use stdlib_allocator instead of rolling our own.
80659         * modules/careadlinkat (Files): Remove lib/allocator.h.
80660         (Depends-on): Add allocator.
80662         stdlib: let modules use system malloc, realloc
80663         * lib/stdlib.in.h (malloc, realloc): Don't #define or add warnings
80664         if !_GL_USE_STDLIB_ALLOC.
80665         (malloc, realloc): Limit this change to a smaller scope.
80667         * lib/careadlinkat.c (_GL_USE_STDLIB_ALLOC): Define.
80668         (malloc, realloc): Don't #undef; no longer needed.
80669         * lib/malloca.c (_GL_USE_STDLIB_ALLOC, malloc): Likewise.
80670         * lib/progreloc.c (_GL_USE_STDLIB_ALLOC, malloc): Likewise.
80671         * lib/setenv.c (_GL_USE_STDLIB_ALLOC, malloc, realloc): Likewise.
80672         * lib/canonicalize-lgpl.c (_GL_USE_STDLIB_ALLOC, malloc): Likewise.
80673         * lib/relocatable.c (_GL_USE_STDLIB_ALLOC, malloc): Likewise.
80674         * lib/relocwrapper.c (_GL_USE_STDLIB_ALLOC, malloc): Likewise.
80675         * lib/malloc.c (_GL_USE_STDLIB_ALLOC, malloc): Likewise.
80676         * lib/realloc.c (_GL_USE_STDLIB_ALLOC, malloc, realloc): Likewise.
80678         careadlinkat: rename members to avoid problem
80679         * lib/allocator.h (struct allocator): Rename members from
80680         malloc/realloc to allocate/reallocate, to avoid problems if malloc
80681         and realloc are #define'd.  Reported by Eric Blake in
80682         <http://lists.gnu.org/r/bug-gnulib/2011-04/msg00091.html>.
80683         * lib/careadlinkat.c (careadlinkat): Adjust to renaming.
80685 2011-04-08  Eric Blake  <eblake@redhat.com>
80687         nonblocking: reduce dependency
80688         * tests/test-nonblocking.c: Only test sockets when in use.
80689         * modules/nonblocking-tests (Depends-on): Drop socket.
80690         (Makefile.am): Link even if sockets are not present.
80691         * modules/pipe2-tests (Makefile.am): Likewise.
80692         * lib/ioctl.c (ioctl) [WIN32]: Fail if sockets are not also in use.
80694         pipe2: fix O_NONBLOCK support on mingw
80695         * modules/pipe2 (Depends-on): Add nonblocking.
80696         * lib/pipe2.c (pipe2) [WIN32]: Add O_NONBLOCK support.
80697         * tests/test-pipe2.c (is_nonblocking): Adjust test accordingly.
80698         * tests/test-nonblocking.c (main): Likewise.
80699         * modules/pipe2-tests (Makefile.am): Avoid link failure.
80701         fcntl-h: fix O_ACCMODE on cygwin
80702         * doc/posix-headers/fcntl.texi (fcntl.h): Document the bug.
80703         * lib/fcntl.in.h (O_ACCMODE): Fix it.
80705         pipe-filter: drop O_NONBLOCK workarounds
80706         * modules/pipe-filter-gi (Depends-on): Add fcntl-h.
80707         * modules/pipe-filter-ii (Depends-on): Likewise.
80708         * lib/pipe-filter-aux.h (O_NONBLOCK): Delete workaround.
80710         nonblocking: provide O_NONBLOCK for mingw
80711         * modules/nonblocking (Depends-on): Add open.
80712         (configure.ac): Set new witness macro.
80713         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Provide default for it.
80714         * modules/fcntl-h (Makefile.am): Substitute it.
80715         * lib/fcntl.in.h (O_NONBLOCK): Guarantee non-zero definition when
80716         nonblocking module is in use.
80717         * lib/nonblocking.c: Adjust portability test.
80718         * lib/open.c (open): Don't let native open see gnulib flag.
80719         * tests/test-fcntl-h.c (main): Enhance test.
80720         * tests/test-open.h (test_open): Likewise.
80721         * doc/posix-headers/fcntl.texi (fcntl.h): Document the replacement.
80723         careadlinkat: fix compilation error on mingw
80724         * lib/careadlinkat.c (standard_allocator): Avoid renaming fields
80725         within struct allocator.
80727 2011-04-06  Eric Blake  <eblake@redhat.com>
80729         binary-io: relicense under LGPLv2+
80730         * modules/binary-io (License): Relax to LGPLv2+.
80731         Requested for libvirt, and required by pipe2.
80733 2011-04-06  Paul Eggert  <eggert@cs.ucla.edu>
80735         verify: use _Static_assert if available
80736         * lib/verify.h (HAVE__STATIC_ASSERT): New macro.
80737         (verify_true, verify): Use it if available.  This generates better
80738         diagnostics with GCC 4.6.0 and later.
80740 2011-04-05  Bruno Haible  <bruno@clisp.org>
80742         Remove leftover generated .h files after config.status changed.
80744         * m4/alloca.m4 (gl_FUNC_ALLOCA): New automake conditional
80745         GL_GENERATE_ALLOCA_H.
80746         * modules/alloca-opt (Makefile.am): Remove alloca.h if
80747         GL_GENERATE_ALLOCA_H evaluates to false.
80749         * m4/argz.m4 (gl_FUNC_ARGZ): New automake conditional
80750         GL_GENERATE_ARGZ_H.
80751         * modules/argz (Makefile.am): Remove argz.h if GL_GENERATE_ARGZ_H
80752         evaluates to false.
80754         * m4/byteswap.m4 (gl_BYTESWAP): New automake conditional
80755         GL_GENERATE_BYTESWAP_H.
80756         * modules/byteswap (Makefile.am): Remove byteswap.h if
80757         GL_GENERATE_BYTESWAP_H evaluates to false.
80759         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): New automake conditional
80760         GL_GENERATE_ERRNO_H.
80761         * modules/errno (Makefile.am): Remove errno.h if GL_GENERATE_ERRNO_H
80762         evaluates to false.
80764         * m4/float_h.m4 (gl_FLOAT_H): New automake conditional
80765         GL_GENERATE_FLOAT_H.
80766         * modules/float (Makefile.am): Remove float.h if GL_GENERATE_FLOAT_H
80767         evaluates to false.
80769         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): New automake conditional
80770         GL_GENERATE_FNMATCH_H.
80771         * modules/fnmatch (Makefile.am): Remove fnmatch.h if
80772         GL_GENERATE_FNMATCH_H evaluates to false.
80774         * m4/glob.m4 (gl_GLOB_SUBSTITUTE, gl_GLOB): New automake conditional
80775         GL_GENERATE_GLOB_H.
80776         * modules/glob (Makefile.am): Remove glob.h if GL_GENERATE_GLOB_H
80777         evaluates to false.
80779         * m4/iconv_h.m4 (gl_REPLACE_ICONV_H, gl_ICONV_H_DEFAULTS): New
80780         automake conditional GL_GENERATE_ICONV_H.
80781         * modules/iconv-h (Makefile.am): Remove iconv.h if GL_GENERATE_ICONV_H
80782         evaluates to false.
80784         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): New automake conditional
80785         GL_GENERATE_NETINET_IN_H.
80786         * modules/netinet_in (Makefile.am): Remove netinet/in.h if
80787         GL_GENERATE_NETINET_IN_H evaluates to false.
80789         * m4/pthread.m4 (gl_PTHREAD_CHECK): Set PTHREAD_H here. New automake
80790         conditional GL_GENERATE_PTHREAD_H.
80791         (gl_PTHREAD_DEFAULTS): Don't set PTHREAD_H here.
80792         * modules/pthread (Makefile.am): Remove pthread.h if
80793         GL_GENERATE_PTHREAD_H evaluates to false.
80795         * m4/sched_h.m4 (gl_SCHED_H): New automake conditional
80796         GL_GENERATE_SCHED_H.
80797         * modules/sched (Makefile.am): Remove sched.h if GL_GENERATE_SCHED_H
80798         evaluates to false.
80800         * m4/selinux-context-h.m4 (gl_HEADERS_SELINUX_CONTEXT_H): New automake
80801         conditional GL_GENERATE_SELINUX_CONTEXT_H.
80802         * modules/selinux-h (Makefile.am): Remove selinux/context.h if
80803         GL_GENERATE_SELINUX_CONTEXT_H evaluates to false.
80805         * m4/stdarg.m4 (gl_STDARG_H): New automake conditional
80806         GL_GENERATE_STDARG_H.
80807         * modules/stdarg (Makefile.am): Remove stdarg.h if
80808         GL_GENERATE_STDARG_H evaluates to false.
80810         * m4/stdbool.m4 (AM_STDBOOL_H): New automake conditional
80811         GL_GENERATE_STDBOOL_H.
80812         * modules/stdbool (Makefile.am): Remove stdbool.h if
80813         GL_GENERATE_STDBOOL_H evaluates to false.
80815         * m4/stddef_h.m4 (gl_STDDEF_H): Set STDDEF_H here. New automake
80816         conditional GL_GENERATE_STDDEF_H.
80817         (gl_STDDEF_H_DEFAULTS): Don't set STDDEF_H here.
80818         * modules/stddef (Makefile.am): Remove stddef.h if
80819         GL_GENERATE_STDDEF_H evaluates to false.
80821         * m4/stdint.m4 (gl_STDINT_H): New automake conditional
80822         GL_GENERATE_STDINT_H.
80823         * modules/stdint (Makefile.am): Remove stdint.h if
80824         GL_GENERATE_STDINT_H evaluates to false.
80826         * m4/sysexits.m4 (gl_SYSEXITS): New automake conditional
80827         GL_GENERATE_SYSEXITS_H.
80828         * modules/sysexits (Makefile.am): Remove sysexits.h if
80829         GL_GENERATE_SYSEXITS_H evaluates to false.
80831         Reported by Karl Berry and Ralf Wildenhues.
80833 2011-04-05  Bruno Haible  <bruno@clisp.org>
80835         Ensure to rebuild generated .h files when config.status has changed.
80836         * modules/arpa_inet (Makefile.am): Add dependency from .h file to
80837         config.status.
80838         * modules/ctype (Makefile.am): Likewise.
80839         * modules/dirent (Makefile.am): Likewise.
80840         * modules/errno (Makefile.am): Likewise.
80841         * modules/fcntl-h (Makefile.am): Likewise.
80842         * modules/float (Makefile.am): Likewise.
80843         * modules/getopt-posix (Makefile.am): Likewise.
80844         * modules/glob (Makefile.am): Likewise.
80845         * modules/iconv-h (Makefile.am): Likewise.
80846         * modules/inttypes (Makefile.am): Likewise.
80847         * modules/langinfo (Makefile.am): Likewise.
80848         * modules/locale (Makefile.am): Likewise.
80849         * modules/math (Makefile.am): Likewise.
80850         * modules/netdb (Makefile.am): Likewise.
80851         * modules/netinet_in (Makefile.am): Likewise.
80852         * modules/poll-h (Makefile.am): Likewise.
80853         * modules/pthread (Makefile.am): Likewise.
80854         * modules/pty (Makefile.am): Likewise.
80855         * modules/sched (Makefile.am): Likewise.
80856         * modules/search (Makefile.am): Likewise.
80857         * modules/selinux-h (Makefile.am): Likewise.
80858         * modules/signal (Makefile.am): Likewise.
80859         * modules/spawn (Makefile.am): Likewise.
80860         * modules/stdarg (Makefile.am): Likewise.
80861         * modules/stdbool (Makefile.am): Likewise.
80862         * modules/stddef (Makefile.am): Likewise.
80863         * modules/stdint (Makefile.am): Likewise.
80864         * modules/stdio (Makefile.am): Likewise.
80865         * modules/stdlib (Makefile.am): Likewise.
80866         * modules/string (Makefile.am): Likewise.
80867         * modules/strings (Makefile.am): Likewise.
80868         * modules/sys_file (Makefile.am): Likewise.
80869         * modules/sys_ioctl (Makefile.am): Likewise.
80870         * modules/sys_select (Makefile.am): Likewise.
80871         * modules/sys_socket (Makefile.am): Likewise.
80872         * modules/sys_stat (Makefile.am): Likewise.
80873         * modules/sys_time (Makefile.am): Likewise.
80874         * modules/sys_times (Makefile.am): Likewise.
80875         * modules/sys_utsname (Makefile.am): Likewise.
80876         * modules/sys_wait (Makefile.am): Likewise.
80877         * modules/sysexits (Makefile.am): Likewise.
80878         * modules/termios (Makefile.am): Likewise.
80879         * modules/time (Makefile.am): Likewise.
80880         * modules/unistd (Makefile.am): Likewise.
80881         * modules/wchar (Makefile.am): Likewise.
80882         * modules/wctype-h (Makefile.am): Likewise.
80883         Reported by Karl Berry, Eric Blake, and Ralf Wildenhues.
80885 2011-04-05  Bruno Haible  <bruno@clisp.org>
80887         pipe2: Relicense under LGPLv2+.
80888         * modules/pipe2 (License): Change to LGPLv2+.
80889         Requested by Eric Blake, for libvirt.
80891 2011-04-05  Bruce Korb  <bkorb@gnu.org>
80893         bootstrap: compute gnulib_extra_files after updating build_aux
80894         * build-aux/bootstrap (gnulib_extra_files): bootstrap.conf may
80895         change build_aux or also supply gnulib_extra_files.  Handle correctly.
80897 2011-04-05  Eric Blake  <eblake@redhat.com>
80899         bootstrap: preserve git whitelist item sorting
80900         * build-aux/bootstrap (sort_patterns): New function.
80901         (insert_sorted_if_absent): Use it to sink ! lines to the bottom.
80903 2011-04-05  Simon Josefsson  <simon@josefsson.org>
80905         * top/maint.mk (sc_prohibit_empty_lines_at_EOF): Don't trigger
80906         sc_space_tab check.
80908 2011-04-05  Paul Eggert  <eggert@cs.ucla.edu>
80910         areadlink, areadlinkat: rewrite in terms of careadlinkat
80911         * lib/areadlink.c, lib/areadlinkat.c: Include careadlinkat.h
80912         instead of errno.h, limits.h, stdint.h, stdlib.h, string.h, unistd.h.
80913         (SSIZE_MAX, INITIAL_BUF_SIZE): Remove.
80914         (malloc, realloc): Remove #undefs.
80915         (areadlink, areadlinkat): Rewrite in terms of careadlinkat.
80916         * modules/areadlink (Depends-on): Add careadlinkat.  Remove
80917         readlink, ssize_t, stdint, unistd.
80918         * modules/areadlinkat (Depends-on): Add careadlinkat.  Remove
80919         areadlink, stdint.
80921         careadlinkat: new module
80922         * lib/allocator.h, lib/careadlinkat.h, lib/careadlinkat.c:
80923         * modules/careadlinkat: New files, written by me with
80924         a review and feedback from Ben Pfaff in
80925         <http://lists.gnu.org/r/bug-gnulib/2011-04/msg00008.html>.
80927 2011-04-01  Bruno Haible  <bruno@clisp.org>
80929         wmemchr, wcschr, wcsrchr, wcspbrk, wcsstr: Avoid errors in C++ mode.
80930         * lib/wchar.in.h (wmemchr, wcschr, wcsrchr, wcspbrk, wcsstr): Use
80931         _GL_CXXALIAS_SYS_CAST2 instead of _GL_CXXALIAS_SYS. On glibc >= 2.10
80932         systems, use _GL_CXXALIASWARN1 instead of _GL_CXXALIASWARN.
80933         Reported by Bruce Korb <bruce.korb@gmail.com>.
80935 2011-04-01  Bruno Haible  <bruno@clisp.org>
80937         wcpcpy, wcpncpy: Ensure declaration on glibc >= 2.13 systems.
80938         * m4/wcpcpy.m4 (gl_FUNC_WCPCPY): Require AC_USE_SYSTEM_EXTENSIONS.
80939         * m4/wcpncpy.m4 (gl_FUNC_WCPNCPY): Likewise.
80940         * modules/wcpcpy (Depends-on): Add extensions.
80941         * modules/wcpncpy (Depends-on): Likewise.
80942         * doc/posix-functions/wcpcpy.texi: Mention missing declaration on glibc
80943         systems.
80944         * doc/posix-functions/wcpncpy.texi: Likewise.
80945         * doc/posix-functions/wcwidth.texi: Likewise.
80947 2011-03-31  Eric Blake  <eblake@redhat.com>
80949         nonblocking: fix mingw test failures
80950         * lib/nonblocking.c (set_nonblocking_flag): Succeed when clearing
80951         non-blocking flag on regular file.
80952         (get_nonblocking_flag): Set errno on invalid fd.
80953         * tests/test-nonblocking.c (main): Avoid test failure on
80954         directories if fchdir is not active.
80955         * modules/nonblocking-tests (Depends-on): Drop unused dependency.
80957 2011-03-31  Bruno Haible  <bruno@clisp.org>
80959         Fix bug with gl_WARN_ON_USE_PREPARE, introduced on 2011-01-23.
80960         * m4/gnulib-common.m4 (gl_ASSERT_NO_GNULIB_POSIXCHECK): Hide the
80961         gl_WARN_ON_USE_PREPARE definition from 'aclocal'.
80962         Reported by Simon Josefsson <simon@josefsson.org>.
80964 2011-03-31  Bruno Haible  <bruno@clisp.org>
80965         and Eric Blake  <eblake@redhat.com>
80967         nonblocking: new module
80968         * modules/nonblocking: New module.
80969         * modules/nonblocking-tests: Likewise.
80970         * lib/nonblocking.h: New file.
80971         * lib/nonblocking.c: Likewise.
80972         * tests/test-nonblocking.c: New test.
80973         * lib/ioctl.c (ioctl) [mingw]: Update comment.
80975 2011-03-30  Bruno Haible  <bruno@clisp.org>
80977         stdio: Avoid GCC >= 4.4 warnings when using %lld and similar on mingw.
80978         * lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT_PRINTF): Use 'gnu_printf' format
80979         instead of 'printf' format for GCC >= 4.4.
80980         (_GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM): New macro.
80981         (fprintf, printf, vfprintf, vprintf): Declare with
80982         _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM when the function ends up calling
80983         the system's vfprintf() function.
80984         Reported by Daniel P. Berrange <berrange@redhat.com> via Eric Blake.
80986 2011-03-30  Eric Blake  <eblake@redhat.com>
80988         passfd: fix scoping bug
80989         * lib/passfd.c (sendfd, recvfd): Don't let buf go out of scope
80990         before sendmsg/recvmsg.
80992         passfd: standardize coding conventions
80993         * m4/afunix.m4 (gl_SOCKET_AFUNIX): Drop check for something that
80994         can be learned at compile time.
80995         * lib/passfd.c (MSG_CMSG_CLOEXEC): Reduce number of in-function
80996         ifdefs.
80997         (sendfd, recvfd): Follow gnulib code conventions.
80999         passfd: fix incorrect sendmsg arguments
81000         * lib/passfd.c (sendfd): Avoid uninitialized msg_flags field, and
81001         incorrect msg_controllen value.
81002         * modules/passfd-tests (Depends-on): Check for alarm.
81003         * tests/test-passfd.c (main) [HAVE_DECL_ALARM]: Avoid hanging test.
81004         Reported by Bastien ROUCARIES.
81006 2011-03-30  Bruno Haible  <bruno@clisp.org>
81008         c-strcasestr: Relicense under LGPLv2+.
81009         * modules/c-strcasestr (License): Change to LGPLv2+.
81010         Requested by Eric Blake, for libvirt.
81012 2011-03-30  Simon Josefsson  <simon@josefsson.org>
81014         * users.txt: Add libidn2.  Fix libtasn1 link.
81016 2011-03-30  Jim Meyering  <meyering@redhat.com>
81018         tests: readlink* ("",... fails with EINVAL on newer kernels
81019         readlink and readlinkat have typically failed with ENOENT for
81020         the invalid, empty file name,  "".  However, with the advent
81021         of linux-2.6.39, they fail with EINVAL.
81022         * tests/test-areadlink.h (test_areadlink): Also accept EINVAL
81023         when operating on the empty file name.
81024         * tests/test-readlink.h (test_readlink): Likewise.
81026 2011-03-29  Bruno Haible  <bruno@clisp.org>
81028         Relicense some modules under LGPLv2+, for libidn2.
81029         * modules/array-mergesort (License): Change to LGPLv2+.
81030         * modules/c-strcaseeq (License): Likewise.
81031         * modules/striconveh (License): Likewise.
81032         * modules/striconveha (License): Likewise.
81033         * modules/uniconv/base (License): Likewise.
81034         * modules/uniconv/u8-conv-from-enc (License): Likewise.
81035         * modules/uniconv/u8-strconv-from-enc (License): Likewise.
81036         * modules/uniconv/u8-strconv-from-locale (License): Likewise.
81037         * modules/unictype/base (License): Likewise.
81038         * modules/unictype/bidiclass-of (License): Likewise.
81039         * modules/unictype/category-M (License): Likewise.
81040         * modules/unictype/category-none (License): Likewise.
81041         * modules/unictype/category-of (License): Likewise.
81042         * modules/unictype/category-test (License): Likewise.
81043         * modules/unictype/category-test-withtable (License): Likewise.
81044         * modules/unictype/combining-class (License): Likewise.
81045         * modules/unictype/joiningtype-of (License): Likewise.
81046         * modules/unictype/scripts (License): Likewise.
81047         * modules/uninorm/base (License): Likewise.
81048         * modules/uninorm/canonical-decomposition (License): Likewise.
81049         * modules/uninorm/composition (License): Likewise.
81050         * modules/uninorm/decompose-internal (License): Likewise.
81051         * modules/uninorm/decomposition-table (License): Likewise.
81052         * modules/uninorm/nfc (License): Likewise.
81053         * modules/uninorm/nfd (License): Likewise.
81054         * modules/uninorm/u32-normalize (License): Likewise.
81055         * modules/unistr/base (License): Likewise.
81056         * modules/unistr/u32-cpy (License): Likewise.
81057         * modules/unistr/u32-mbtouc-unsafe (License): Likewise.
81058         * modules/unistr/u32-to-u8 (License): Likewise.
81059         * modules/unistr/u32-uctomb (License): Likewise.
81060         * modules/unistr/u8-check (License): Likewise.
81061         * modules/unistr/u8-mblen (License): Likewise.
81062         * modules/unistr/u8-mbtouc (License): Likewise.
81063         * modules/unistr/u8-mbtouc-unsafe (License): Likewise.
81064         * modules/unistr/u8-mbtoucr (License): Likewise.
81065         * modules/unistr/u8-prev (License): Likewise.
81066         * modules/unistr/u8-strlen (License): Likewise.
81067         * modules/unistr/u8-to-u32 (License): Likewise.
81068         * modules/unistr/u8-uctomb (License): Likewise.
81069         * modules/unitypes (License): Likewise.
81070         Requested by Simon Josefsson.
81072 2011-03-29  Simon Josefsson  <simon@josefsson.org>
81074         lib-symbol-visibility: Add a notice.
81075         * modules/lib-symbol-visibility (Notice): New field.
81077 2011-03-29  Bruno Haible  <bruno@clisp.org>
81079         getaddrinfo: Doc fix.
81080         * doc/posix-functions/getaddrinfo.texi: Mention Windows problem in the
81081         section "fixed in Gnulib".
81083 2011-03-28  Simon Josefsson  <simon@josefsson.org>
81085         * doc/posix-functions/getaddrinfo.texi: Drop netdb.h discussion.
81086         Reported by Bastien ROUCARIES <roucaries.bastien@gmail.com>.
81088 2011-03-26  Bruno Haible  <bruno@clisp.org>
81090         unictype/property-byname: Reduce the number of load-time relocations.
81091         * lib/unictype/pr_byname.c: Include <stdlib.h>.
81092         (UC_PROPERTY_INDEX_*): New enumeration values.
81093         (uc_property_byname): Convert an index from the lookup table to an
81094         uc_property_t.
81095         * lib/unictype/pr_byname.gperf: Store indices instead of uc_property_t
81096         values.
81098 2011-03-26  Bruno Haible  <bruno@clisp.org>
81100         unictype/property-byname: Allow omitted word separators and aliases.
81101         * lib/unictype/pr_byname.gperf: Add property names without word
81102         separators. Add aliases from Unicode 6.0 PropertyAliases.txt, except
81103         for 'space'.
81105 2011-03-26  Bruno Haible  <bruno@clisp.org>
81107         unictype/joininggroup-byname: Allow hyphens, omitted word separators.
81108         * lib/unictype/joininggroup_byname.c (uc_joining_group_byname): Convert
81109         also hyphens to space.
81110         * lib/unictype/joininggroup_byname.gperf: Recognize the names also
81111         without spaces.
81112         * tests/unictype/test-joininggroup_byname.c (main): Add more tests.
81114 2011-03-26  Bruno Haible  <bruno@clisp.org>
81116         unictype/joiningtype-byname: Recognize long names as well.
81117         * lib/unictype.in.h (uc_joiningtype_class_byname): Allow argument to be
81118         a long name.
81119         * lib/unictype/joiningtype_byname.c: Include <string.h>,
81120         unictype/joiningtype_byname.h.
81121         (uc_joiningtype_class_byname): Use uc_joining_type_lookup.
81122         * lib/unictype/joiningtype_byname.gperf: New file.
81123         * modules/unictype/joiningtype-byname (Files): Add
81124         lib/unictype/joiningtype_byname.gperf.
81125         (Depends-on): Add gperf.
81126         (Makefile.am): Add rule for generating unictype/joiningtype_byname.h.
81127         * tests/unictype/test-joiningtype_byname.c (main): Test the recognition of
81128         long names.
81130         Tests for module 'unictype/joiningtype-longname'.
81131         * modules/unictype/joiningtype-longname-tests: New file.
81132         * tests/unictype/test-joiningtype_longname.c: New file.
81134         New module 'unictype/joiningtype-longname'.
81135         * lib/unictype.in.h (uc_joiningtype_class_long_name): New declaration.
81136         * lib/unictype/joiningtype_longname.c: New file.
81137         * modules/unictype/joiningtype-longname: New file.
81138         * modules/unictype/joiningtype-all (Depends-on): Add
81139         unictype/joiningtype-longname.
81141 2011-03-26  Bruno Haible  <bruno@clisp.org>
81143         unictype/bidiclass-byname: Recognize long names as well.
81144         * lib/unictype.in.h (uc_bidi_class_byname): Allow argument to be a long
81145         name.
81146         * lib/unictype/bidi_byname.c: Include <string.h>,
81147         unictype/bidi_byname.h.
81148         (uc_bidi_class_byname): Use uc_bidi_class_lookup.
81149         * lib/unictype/bidi_byname.gperf: New file.
81150         * modules/unictype/bidiclass-byname (Files): Add
81151         lib/unictype/bidi_byname.gperf.
81152         (Depends-on): Add gperf.
81153         (Makefile.am): Add rule for generating unictype/bidi_byname.h.
81154         * tests/unictype/test-bidi_byname.c (main): Test the recognition of
81155         long names.
81157         Tests for module 'unictype/bidiclass-longname'.
81158         * modules/unictype/bidiclass-longname-tests: New file.
81159         * tests/unictype/test-bidi_longname.c: New file.
81161         New module 'unictype/bidiclass-longname'.
81162         * lib/unictype.in.h (uc_bidi_class_long_name): New declaration.
81163         * lib/unictype/bidi_longname.c: New file.
81164         * modules/unictype/bidiclass-longname: New file.
81165         * modules/unictype/bidiclass-all (Depends-on): Add
81166         unictype/bidiclass-longname.
81168 2011-03-26  Bruno Haible  <bruno@clisp.org>
81170         unictype/bidi*: Rename modules.
81171         * modules/unictype/bidiclass-all: Renamed from
81172         modules/unictype/bidicategory-all.
81173         * modules/unictype/bidiclass-name: Renamed from
81174         modules/unictype/bidiclass-name.
81175         (Description): Update.
81176         * modules/unictype/bidiclass-name-tests: Renamed from
81177         modules/unictype/bidicategory-name-tests.
81178         * modules/unictype/bidiclass-byname: Renamed from
81179         modules/unictype/bidicategory-byname.
81180         (Description): Update.
81181         * modules/unictype/bidiclass-byname-tests: Renamed from
81182         modules/unictype/bidicategory-byname-tests.
81183         * modules/unictype/bidiclass-of: Renamed from
81184         modules/unictype/bidicategory-of.
81185         (Description): Update.
81186         * modules/unictype/bidiclass-of-tests: Renamed from
81187         modules/unictype/bidicategory-of-tests.
81188         * modules/unictype/bidiclass-test: Renamed from
81189         modules/unictype/bidicategory-test.
81190         (Description): Update.
81191         * modules/unictype/bidiclass-test-tests: Renamed from
81192         modules/unictype/bidicategory-test-tests.
81193         * modules/unictype/bidicategory-all: New file, a simple redirection.
81194         * modules/unictype/bidicategory-name: Likewise.
81195         * modules/unictype/bidicategory-byname: Likewise.
81196         * modules/unictype/bidicategory-of: Likewise.
81197         * modules/unictype/bidicategory-test: Likewise.
81198         * modules/unictype/property-bidi-* (Dependencies): Update.
81199         * lib/unictype/bidi_*.c: Update comment.
81201 2011-03-26  Bruno Haible  <bruno@clisp.org>
81203         unictype/bidi*: Rename functions, part 2.
81204         * modules/unictype/bidicategory-name (configure.ac): Update required
81205         libunistring version.
81206         * modules/unictype/bidicategory-byname (configure.ac): Likewise.
81208 2011-03-25  Bruno Haible  <bruno@clisp.org>
81210         New module 'unictype/combining-class-all'.
81211         * modules/unictype/combining-class-all: New file.
81213         Tests for module 'unictype/combining-class-byname'.
81214         * modules/unictype/combining-class-byname-tests: New file.
81215         * tests/unictype/test-combiningclass_byname.c: New file.
81217         New module 'unictype/combining-class-byname'.
81218         * lib/unictype.in.h (uc_combining_class_byname): New declaration.
81219         * lib/unictype/combiningclass_byname.c: New file.
81220         * lib/unictype/combiningclass_byname.gperf: New file.
81221         * modules/unictype/combining-class-byname: New file.
81223         Tests for module 'unictype/combining-class-longname'.
81224         * modules/unictype/combining-class-longname-tests: New file.
81225         * tests/unictype/test-combiningclass_longname.c: New file.
81227         New module 'unictype/combining-class-longname'.
81228         * lib/unictype.in.h (uc_combining_class_long_name): New declaration.
81229         * lib/unictype/combiningclass_longname.c: New file.
81230         * modules/unictype/combining-class-longname: New file.
81232         Tests for module 'unictype/combining-class-name'.
81233         * modules/unictype/combining-class-name-tests: New file.
81234         * tests/unictype/test-combiningclass_name.c: New file.
81236         New module 'unictype/combining-class-name'.
81237         * lib/unictype.in.h (uc_combining_class_name): New declaration.
81238         * lib/unictype/combiningclass_name.c: New file.
81239         * modules/unictype/combining-class-name: New file.
81241 2011-03-25  Bruno Haible  <bruno@clisp.org>
81243         unictype/combining-class: Rename source files.
81244         * lib/gen-uni-tables.c (main): Emit unictype/combiningclass.h instead
81245         of unictype/combining.h.
81246         * lib/unictype/combiningclass.c: Renamed from lib/unictype/combining.c.
81247         Update.
81248         * lib/unictype/combiningclass.h: Renamed from lib/unictype/combining.h.
81249         * modules/unictype/combining-class (Description): Fix.
81250         (Files, Makefile.am): Update.
81251         * tests/unictype/test-combiningclass.c: Renamed from
81252         tests/unictype/test-combining.c.
81253         * modules/unictype/combining-class-tests (Files, Makefile.am): Update.
81255 2011-03-25  Bruno Haible  <bruno@clisp.org>
81257         unictype: Update list of canonical combining classes.
81258         * lib/unictype.in.h (UC_CCC_ATA): New enumeration value.
81260 2011-03-25  Bruno Haible  <bruno@clisp.org>
81262         unictype/category-byname: Recognize long names as well.
81263         * lib/unictype.in.h (uc_general_category_byname): Allow argument to be
81264         a long name.
81265         * lib/unictype/categ_byname.c: Include <stdlib.h>, <string.h>,
81266         unictype/categ_byname.h.
81267         (UC_CATEGORY_INDEX_*): New enumeration values.
81268         (uc_general_category_byname): Use uc_general_category_lookup and
81269         convert from index to value.
81270         * lib/unictype/categ_byname.gperf: New file.
81271         * modules/unictype/category-byname (Files): Add
81272         lib/unictype/categ_byname.gperf.
81273         (Depends-on): Add gperf.
81274         (Makefile.am): Add rule for generating unictype/categ_byname.h.
81275         * tests/unictype/test-categ_byname.c (main): Test the recognition of
81276         long names.
81278         Tests for module 'unictype/category-longname'.
81279         * modules/unictype/category-longname-tests: New file.
81280         * tests/unictype/test-categ_longname.c: New file.
81282         New module 'unictype/category-longname'.
81283         * lib/unictype.in.h (uc_general_category_long_name): New declaration.
81284         * lib/unictype/categ_longname.c: New file.
81285         * modules/unictype/category-longname: New file.
81286         * modules/unictype/category-all (Depends-on): Add it.
81288 2011-03-25  Bruno Haible  <bruno@clisp.org>
81290         Tests for module 'unictype/category-LC'.
81291         * modules/unictype/category-LC-tests: New file.
81292         * tests/unictype/test-categ_LC.c: New file, automatically generated.
81294         New module 'unictype/category-LC'.
81295         * lib/unictype.in.h (UC_CATEGORY_MASK_LC): New enumeration value.
81296         (UC_CATEGORY_LC): New declaration.
81297         (UC_CASED_LETTER): New macro.
81298         * lib/gen-uni-tables.c (is_category_LC): New function.
81299         (output_categories): Also handle category LC.
81300         (UC_CATEGORY_MASK_LC): New enumeration value.
81301         (general_category_byname): Also handle category LC.
81302         * lib/unictype/categ_LC.c: New file.
81303         * lib/unictype/categ_LC.h: New file, automatically generated.
81304         * lib/unictype/categ_name.c (uc_general_category_name): Also handle
81305         category LC.
81306         * lib/unictype/categ_byname.c (uc_general_category_byname): Likewise.
81307         * modules/unictype/category-LC: New file.
81308         * modules/unictype/category-byname (Depends-on): Add
81309         unictype/category-LC.
81310         * modules/unictype/category-all (Depends-on): Likewise.
81312 2011-03-25  Eric Blake  <eblake@redhat.com>
81314         xmalloc: revert yesterday's regression
81315         * lib/xmalloc.c (xrealloc): Once again forward xrealloc(NULL,0) to
81316         realloc's underlying behavior (allowing allocation of zero-size
81317         objects, especially if malloc-gnu is also in use).
81319 2011-03-25  Reuben Thomas  <rrt@sc3d.org>
81321         maint.mk: add missing version to VC-tag
81322         * top/maint.mk: git tag was missing actual tag name; add it.
81324         valgrind: do leak checking, and exit with code 1 on error (not 0)
81325         * m4/valgrind-tests.m4: Add `--error-exitcode=1 --leak-check=full'
81326         to VALGRIND.
81328 2010-11-30  Reuben Thomas  <rrt@sc3d.org>
81330         posix-modules: say what it does.
81331         * posix-modules: Add a line to the --help output saying what it does.
81333 2011-03-24  Paul Eggert  <eggert@cs.ucla.edu>
81335         xmalloc: Do not leak if underlying realloc is C99 compatible.
81336         * lib/xmalloc.c (xrealloc): If N is zero, call 'free' directly.
81337         This avoids a leak on C99-based systems.  See
81338         <http://lists.gnu.org/r/bug-gnulib/2011-03/msg00243.html>.
81340 2011-03-24  Eric Blake  <eblake@redhat.com>
81342         realloc: document portability problem
81343         * doc/posix-functions/realloc.texi (realloc): Mention pitfalls of
81344         passing 0 size to realloc.
81346 2011-03-23  Ben Walton  <bwalton@artsci.utoronto.ca>
81348         doc: update users.txt
81349         * users.txt: Add cvsps, tmpwatch
81351 2011-03-23  Matt Rice  <ratmice@gmail.com>
81353         doc: update users.txt
81354         * users.txt: Add gdb.
81356 2011-03-23  Jim Meyering  <meyering@redhat.com>
81358         doc: update users.txt
81359         Looking through matches up to the following URL (there are still
81360         several more pages), I found several projects that use gnulib:
81361         http://codesearch.google.com/codesearch?start=50&q=gnulib-cache\.m4
81362         * users.txt: Add nagios plugins (nagiosplug), acct, gengetopt,
81363         gmediaserver, gtkreindeer, jugtail, libunistring, mini-httpd, reindeer.
81365 2011-03-22  Bruno Haible  <bruno@clisp.org>
81367         unictype/bidi*: Rename functions.
81368         * lib/unictype.in.h (uc_bidi_class_name, uc_bidi_class_byname,
81369         uc_bidi_class, uc_is_bidi_class): New declarations.
81370         * lib/unictype/bidi_byname.c (uc_bidi_class_byname): Renamed from
81371         uc_bidi_category_byname.
81372         (uc_bidi_category_byname): New function.
81373         * lib/unictype/bidi_name.c (u_bidi_class_name): Renamed from
81374         u_bidi_category_name.
81375         (uc_bidi_class_name): Renamed from uc_bidi_category_name.
81376         (uc_bidi_category_name): New function.
81377         * lib/unictype/bidi_of.c (uc_bidi_class): Renamed from
81378         uc_bidi_category.
81379         (uc_bidi_category): New function.
81380         * lib/unictype/bidi_test.c (uc_is_bidi_class): Renamed from
81381         uc_is_bidi_category. Invoke uc_bidi_class.
81382         (uc_is_bidi_category): New function.
81383         * tests/unictype/test-bidi_byname.c (main): Test uc_bidi_class_byname
81384         instead of uc_bidi_category_byname.
81385         * tests/unictype/test-bidi_name.c (main): Test uc_bidi_class_name
81386         instead of uc_bidi_category_name.
81387         * tests/unictype/test-bidi_of.c (main): Test uc_bidi_class instead of
81388         uc_bidi_category.
81389         * tests/unictype/test-bidi_test.c (main): Test uc_is_bidi_class
81390         instead of uc_is_bidi_category.
81392 2011-03-21  Bruno Haible  <bruno@clisp.org>
81394         New module 'unictype/joininggroup-all'.
81395         * modules/unictype/joininggroup-all: New file.
81397         Tests for module 'unictype/joininggroup-of'.
81398         * modules/unictype/joininggroup-of-tests: New file.
81399         * tests/unictype/test-joininggroup_of.c: New file.
81400         * tests/unictype/test-joininggroup_of.h: New file, automatically
81401         generated by gen-uni-tables.
81403         New module 'unictype/joininggroup-of'.
81404         * modules/unictype/joininggroup-of: New file.
81405         * lib/unictype/joininggroup_of.c: New file.
81406         * lib/unictype/joininggroup_of.h: New file, automatically generated by
81407         gen-uni-tables.
81409         Tests for module 'unictype/joininggroup-byname'.
81410         * modules/unictype/joininggroup-byname-tests: New file.
81411         * tests/unictype/test-joininggroup_byname.c: New file.
81413         New module 'unictype/joininggroup-byname'.
81414         * modules/unictype/joininggroup-byname: New file.
81415         * lib/unictype/joininggroup_byname.c: New file.
81416         * lib/unictype/joininggroup_byname.gperf: New file.
81418         Tests for module 'unictype/joininggroup-name'.
81419         * modules/unictype/joininggroup-name-tests: New file.
81420         * tests/unictype/test-joininggroup_name.c: New file.
81422         New module 'unictype/joininggroup-name'.
81423         * modules/unictype/joininggroup-name: New file.
81424         * lib/unictype/joininggroup_name.c: New file.
81425         * lib/unictype/joininggroup_name.h: New file.
81427         New module 'unictype/joiningtype-all'.
81428         * modules/unictype/joiningtype-all: New file.
81430         Tests for module 'unictype/joiningtype-of'.
81431         * modules/unictype/joiningtype-of-tests: New file.
81432         * tests/unictype/test-joiningtype_of.c: New file.
81433         * tests/unictype/test-joiningtype_of.h: New file, automatically
81434         generated by gen-uni-tables.
81436         New module 'unictype/joiningtype-of'.
81437         * modules/unictype/joiningtype-of: New file.
81438         * lib/unictype/joiningtype_of.c: New file.
81439         * lib/unictype/joiningtype_of.h: New file, automatically generated by
81440         gen-uni-tables.
81442         Tests for module 'unictype/joiningtype-byname'.
81443         * modules/unictype/joiningtype-byname-tests: New file.
81444         * tests/unictype/test-joiningtype_byname.c: New file.
81446         New module 'unictype/joiningtype-byname'.
81447         * modules/unictype/joiningtype-byname: New file.
81448         * lib/unictype/joiningtype_byname.c: New file.
81450         Tests for module 'unictype/joiningtype-name'.
81451         * modules/unictype/joiningtype-name-tests: New file.
81452         * tests/unictype/test-joiningtype_name.c: New file.
81454         New module 'unictype/joiningtype-name'.
81455         * modules/unictype/joiningtype-name: New file.
81456         * lib/unictype/joiningtype_name.c: New file.
81458         unictype: Add support for Arabic shaping properties.
81459         * lib/unictype.in.h (UC_JOINING_TYPE_*): New enumeration values.
81460         (uc_joining_type_name, uc_joining_type_byname, uc_joining_type): New
81461         declarations.
81462         (UC_JOINING_GROUP_*): New enumeration values.
81463         (uc_joining_group_name, uc_joining_group_byname, uc_joining_group): New
81464         declarations.
81465         * lib/gen-uni-tables.c (UC_JOINING_TYPE_*): New enumeration values.
81466         (unicode_joining_type): New variable.
81467         (UC_JOINING_GROUP_*): New enumeration values.
81468         (unicode_joining_group): New variable.
81469         (fill_arabicshaping, joining_type_as_c_identifier,
81470         output_joining_type_test, output_joining_type,
81471         joining_group_as_c_identifier, output_joining_group_test,
81472         output_joining_group): New functions.
81473         (main); Add an argument denoting the ArabicShaping.txt file. Invoke
81474         fill_arabicshaping and output_joining_type_test, output_joining_type,
81475         output_joining_group_test, output_joining_group.
81476         Reported by Simon Josefsson.
81478 2011-03-21  Jim Meyering  <meyering@redhat.com>
81480         strftime: fix a bug in yesterday's change
81481         * lib/strftime.c (add): Accommodate width's initial value of -1.
81482         Otherwise, nstrftime would copy uninitialized data into
81483         the result buffer.
81485 2011-03-21  Jim Meyering  <meyering@redhat.com>
81487         tests: add strftime-tests module
81488         * tests/test-strftime.c: New file.
81489         * modules/strftime-tests: New module.
81491 2011-03-20  Paul Eggert  <eggert@cs.ucla.edu>
81493         strftime: don't assume a byte count fits in 'int'
81494         * lib/strftime.c (add): Don't assume first arg fits in 'int'.  I
81495         found this problem by static analysis, using gcc -Wstrict-overflow
81496         (GCC 4.5.2, x86-64).  This reported an optimization that depended
81497         on an integer overflow having undefined behavior, but it turns out
81498         that the argument is a size, which might not fit in 'int' anyway,
81500 2011-03-20  Paul Eggert  <eggert@cs.ucla.edu>
81502         stdio: don't require ignore_value around fwrite
81504         This patch works around libc bug 11959
81505         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=11959>.
81506         Without this patch, applications must often write
81507         ignore_value (fwrite (...)) even though the ignore_value is
81508         not helpful here.  It's common to write many objects, using
81509         fwrite/printf/etc., and then use ferror to detect output error.
81511         I considered making this patch optional, but decided against it,
81512         because libc is obviously being inconsistent here: there is no
81513         reason libc should insist that user code must inspect fwrite
81514         return's value without also insisting that it inspect printf's,
81515         putchar's, etc.  If user code wants to have a strict style where
81516         all these functions' values are checked (so that ferror need not
81517         be checked), we could add support for that style in a new gnulib
81518         module, but in the meantime it's better to be consistent and to
81519         support common usage.
81521         * lib/stdio.in.h (rpl_fwrite): Define this wrapper around fwrite,
81522         to work around libc bug 11959, if __USE_FORTIFY_LEVEL indicates
81523         that we are compiling in checking mode, and if not C++, and
81524         if not already wrapping fwrite for some other reason.
81525         (fwrite): #define to rpl_fwrite if the latter is defined.
81527 2011-03-20  Bruno Haible  <bruno@clisp.org>
81529         verror: Fix compilation error introduced on 2011-02-13.
81530         * lib/verror.h (verror, verror_at_line): Use _GL_ATTRIBUTE_FORMAT macro
81531         instead of __attribute__.
81532         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
81534 2011-03-20  Paul Eggert  <eggert@cs.ucla.edu>
81535             Bruno Haible  <bruno@clisp.org>
81537         socklen: do not depend on sys_socket
81538         While trying to modify Emacs to use gnulib's socklen module,
81539         I discovered a circular dependency: socklen depends on sys_socket
81540         and vice versa.  Emacs can use socklen, but it does not need
81541         sys_socket because it has its own substitute for sys/socket.h.
81542         * m4/socklen.m4 (gl_SOCKET_HEADERS): New macro, extracted from
81543         gl_TYPE_SOCKLEN_T.
81544         (gl_CHECK_SOCKET_HEADERS): New macro, taken from parts of
81545         gl_PREREQ_SYS_H_SOCKET.
81546         (gl_TYPE_SOCKLEN_T): Require it instead of requiring
81547         gl_PREREQ_SYS_H_SOCKET.
81548         * m4/sys_socket_h.m4 (gl_PREREQ_SYS_H_SOCKET): Require
81549         gl_CHECK_SOCKET_HEADERS instead of doing its work ourselves.
81550         * modules/socklen (Depends-on): Do not depend on sys_socket.
81551         (Include): Adjust to match the code used in gl_SOCKET_HEADERS.
81553 2011-03-20  Jim Meyering  <meyering@redhat.com>
81555         maint.mk: sort file names *after* new transformation
81556         * top/maint.mk (sc_po_check): Sorting before removing the $(srcdir)/
81557         prefix would have led to an unwarranted failure in GNU parted.
81558         Sort after that transformation.
81560 2011-03-19  Jim Meyering  <meyering@redhat.com>
81562         maint.mk: fix po-file syntax-check rule
81563         * top/maint.mk (sc_po_check): Fix fatal typo in yesterday's change.
81564         Patch by Bruno Haible.
81566 2011-03-19  Bruno Haible  <bruno@clisp.org>
81568         socklen: Update comment.
81569         * m4/socklen.m4: Update comment about platforms.
81571 2011-03-19  Paul Eggert  <eggert@cs.ucla.edu>
81572             Bruno Haible  <bruno@clisp.org>
81574         inet_ntop, inet_pton: Simplify.
81575         * modules/inet_ntop (Depends-on): Remove socklen, since sys_socket is
81576         documented to provide socklen_t and we already depend on sys_socket.
81577         * modules/inet_pton (Depends-on): Likewise.
81578         * lib/arpa_inet.in.h: Adjust comment.
81580 2011-03-19  Paul Eggert  <eggert@cs.ucla.edu>
81581             Bruno Haible  <bruno@clisp.org>
81583         netdb: Simplify.
81584         * modules/netdb (Depends-on): Remove socklen, since sys_socket is
81585         documented to provide socklen_t and we already depend on sys_socket.
81586         * lib/netdb.in.h: Adjust comment.
81588 2011-03-19  Bruno Haible  <bruno@clisp.org>
81590         sys_socket, netdb: Document problem with socklen_t.
81591         * doc/posix-headers/sys_socket.texi: Mention lack of socklen_t on some
81592         platforms.
81593         * doc/posix-headers/netdb.texi: Likewise.
81595 2011-03-18  Eric Blake  <eblake@redhat.com>
81597         maint.mk: let po check work in VPATH build
81598         * top/maint.mk (po_file): Allow cfg.mk override.
81599         (sc_po_check): Allow VPATH use.
81600         Reported by Jiri Denemark.
81602 2011-03-16  Jim Meyering  <meyering@redhat.com>
81604         maint.mk: allow fine-grained syntax-check exclusion via Make variables
81605         Before, you would have had to create one .x-sc_ file per rule in order
81606         to exempt offending files.  Now, you may instead use a Make variable --
81607         usually defined in cfg.mk -- whose name identifies the affected rule.
81608         * top/maint.mk (_sc_excl): Define.
81609         (VC_LIST_EXCEPT): Use it to exclude names on a per-rule basis.
81610         (_sc_search_regexp): When not using VC_LIST_EXCEPT, exclude here, too.
81612 2011-03-13  Bruno Haible  <bruno@clisp.org>
81614         ignore-value tests: Avoid warnings.
81615         * tests/test-ignore-value.c (_GL_ATTRIBUTE_RETURN_CHECK): Define to
81616         empty for gcc < 3.4.
81618 2011-03-13  Bruno Haible  <bruno@clisp.org>
81620         passfd: Fix link error on Solaris.
81621         * modules/passfd (Description): Correct.
81622         (Depends-on): Add socketlib.
81623         (Link): New section.
81624         * modules/passfd-tests (Makefile.am): Link test-passfd with LIBSOCKET.
81626 2011-03-13  Bruno Haible  <bruno@clisp.org>
81628         passfd: Fix link error on AIX 5.2.
81629         * m4/afunix.m4 (gl_SOCKET_AFUNIX): Define _LINUX_SOURCE_COMPAT.
81631 2011-03-13  Bruno Haible  <bruno@clisp.org>
81633         passfd: Work around bug with CMSG_FIRSTHDR on FreeBSD 6.4.
81634         * lib/sys_socket.in.h: Include <stddef.h>.
81635         * m4/afunix.m4 (gl_SOCKET_AFUNIX): Include <stddef.h> before using
81636         CMSG_FIRSTHDR. Remove unused variable.
81638 2011-03-13  Bruno Haible  <bruno@clisp.org>
81640         passfd: Fix compilation error on OpenBSD.
81641         * lib/passfd.c: Include <sys/uio.h>.
81643 2011-03-13  Bruno Haible  <bruno@clisp.org>
81645         passfd test: Fix warnings.
81646         * tests/test-passfd.c: Include <sys/wait.h>.
81647         (main): Fix typo.
81649 2011-03-13  Bruno Haible  <bruno@clisp.org>
81651         passfd module, part 4, tweaks.
81652         * tests/test-passfd.c: Reorder includes.
81653         (main): Fix perror and printf calls.
81655 2011-03-07  Bastien Roucariès  <roucaries.bastien@gmail.com>
81657         passfd module, part 4.
81658         * modules/passfd-tests: New file.
81659         * tests/test-passfd.c: New file.
81661 2011-03-13  Jim Meyering  <meyering@redhat.com>
81663         Makefile: rely on GNU make; derive syntax-check rule names
81664         Rather than requiring that each sc_ rule be listed as a dependent
81665         of "check", use features of GNU make to derive the list.
81666         * Makefile (syntax-check-rules): Define.
81667         (check): Depend on the new variable, not the hard-coded list.
81669 2011-03-13  Bastien Roucariès  <roucaries.bastien@gmail.com>
81670             Bruno Haible  <bruno@clisp.org>
81672         passfd module, part 3.
81673         * lib/passfd.h (recvfd): Add a flags argument.
81674         * lib/passfd.c: Include <fcntl.h>, cloexec.h.
81675         (recvfd): Add a flags argument.
81676         * m4/afunix.m4 (gl_SOCKET_AFUNIX): Test whether MSG_CMSG_CLOEXEC
81677         exists.
81678         * modules/passfd (Depends-on): Add cloexec.
81679         Suggested by Eric Blake.
81681 2011-03-13  Bruno Haible  <bruno@clisp.org>
81683         passfd module, part 2, tweaks.
81684         * modules/passfd (Files): Reorder.
81685         (Depends-on): Remove errno.
81686         (Include): Remove <sys/socket.h>, <sys/un.h>.
81687         * lib/passfd.h: Use a GPLv3+ header. Make C++ safe.
81688         * lib/passfd.c: Untabify. Use a GPLv3+ header. Really include the
81689         specification header. Include <sys/socket.h> always. Don't include
81690         <winsock2.h>. Use "#if HAVE_..." instead of "#ifdef HAVE_...".
81691         (sendfd): Clarify that it sets errno when it fails.
81692         (recvfd): Fix specification.
81694 2011-03-07  Bastien Roucariès  <roucaries.bastien@gmail.com>
81696         passfd module, part 2.
81697         * modules/passfd: New file.
81698         * lib/passfd.h: New file.
81699         * lib/passfd.c: New file.
81701 2011-03-12  Bruno Haible  <bruno@clisp.org>
81703         wcswidth, mbswidth: Avoid integer overflow.
81704         * lib/wcswidth.c: Include <limits.h>.
81705         * lib/wcswidth-impl.h (wcswidth): Avoid 'int' overflow.
81706         * lib/mbswidth.c: Include <limits.h>.
81707         (mbsnwidth): Avoid 'int' overflow.
81708         Reported by Jim Meyering.
81710 2011-03-12  Bruno Haible  <bruno@clisp.org>
81712         futimens, utimensat: Avoid endless recursion on Solaris 10.
81713         * lib/sys_stat.in.h (futimens, utimensat): Define with rpl_ prefix on
81714         Solaris.
81715         Reported by Ben Walton <bwalton@artsci.utoronto.ca> via Eric Blake
81716         in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8230>.
81718 2011-03-11  Jim Meyering  <meyering@redhat.com>
81720         maint.mk: relax a regexp to accommodate other formatting styles
81721         * top/maint.mk (sc_unmarked_diagnostics): Allow 0 or 1 space
81722         between "ngettext" and the following "(".
81724 2011-03-11  Pádraig Brady  <P@draigBrady.com>
81726         maint.mk: suppress a false positive warning
81727         * top/maint.mk ((sc_unmarked_diagnostics): Don't warn when
81728         diagnostics are marked with ngettext.
81730 2011-03-10  Eric Blake  <eblake@redhat.com>
81732         wchar: add explicit dependencies, for Tru64
81733         * modules/mbmemcasecoll (Depends-on): Add wchar.
81734         * modules/mbtowc (Depends-on): Likewise.
81735         * modules/vasnprintf (Depends-on): Likewise.
81736         * modules/unistdio/u-printf-args (Depends-on): Likewise.
81737         * modules/wctomb (Depends-on): Likewise.
81738         Reported by Peter O'Gorman.
81740 2011-03-08  Bruno Haible  <bruno@clisp.org>
81742         passfd module, part 1, tweaks.
81743         * m4/afunix.m4 (gl_SOCKET_AFUNIX): Update AC_REQUIRE invocation.
81744         Improve indentation. Improve AC_MSG_CHECKING messages.
81745         * m4/sockpfaf.m4 (gl_SOCKET_FAMILY_UNIX): New macro, extracted from
81746         gl_SOCKET_FAMILIES.
81748 2011-03-07  Bastien Roucariès  <roucaries.bastien@gmail.com>
81750         passfd module, part 1.
81751         * m4/afunix.m4: New file.
81752         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Also test for UNIX domain
81753         sockets.
81755 2011-03-08  Bruno Haible  <bruno@clisp.org>
81757         regex-quote: New API.
81758         * lib/regex-quote.h: Include <stdbool.h>.
81759         (struct regex_quote_spec): New type.
81760         (regex_quote_spec_posix, regex_quote_spec_gnu, regex_quote_spec_pcre):
81761         New declarations.
81762         (regex_quote_length, regex_quote_copy, regex_quote): Take a
81763         'const struct regex_quote_spec *' argument.
81764         * lib/regex-quote.c (RE_*, PCRE_*): New macros.
81765         (pcre_special): New constant.
81766         (regex_quote_spec_posix, regex_quote_spec_gnu, regex_quote_spec_pcre):
81767         New functions.
81768         (regex_quote_length, regex_quote_copy, regex_quote): Take a
81769         'const struct regex_quote_spec *' argument.
81770         * modules/regex-quote (Depends-on): Add stdbool.
81771         * tests/test-regex-quote.c (check): Update for new API. Add test for
81772         anchored results.
81773         * NEWS: Mention the API change.
81774         Reported by Reuben Thomas and Eric Blake.
81776 2011-03-06  Bruno Haible  <bruno@clisp.org>
81778         regex-quote: Fix creation of POSIX extended regular expressions.
81779         * lib/regex-quote.c (ere_special): Add grouping and alternation
81780         operators.
81782 2011-03-05  Bruno Haible  <bruno@clisp.org>
81784         doc: Improve doc regarding autopoint vs. gnulib.
81785         * doc/gnulib-tool.texi (gettextize and autopoint): Recommend to
81786         disable autopoint while running autoreconf.
81787         Suggested by Ralf Wildenhues.
81789 2011-03-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
81791         Update AC_OPENMP macro for Lahey compiler on GNU/Linux.
81792         * m4/openmp.m4 (AC_OPENMP): Sync from Autoconf.
81794 2011-03-03  Bruce Korb  <bkorb@gnu.org>
81796         parse-duration: remove xalloc.h dependency
81797         * lib/parse-duration.c (parse_period): handle NULL return from
81798         strdup instead of calling xstrdup().
81799         * modules/parse-duration: remove "xalloc" dependency
81801 2011-03-03  Matthew Booth  <mbooth@redhat.com>
81803         bootstrap: honor m4_base when running aclocal
81804         * build-aux/bootstrap: Fix hard-coded use of m4 directory name.
81806 2011-03-02  Jim Meyering  <meyering@redhat.com>
81808         getopt-gnu: relax license from LGPLv3+ to LGPLv2+
81809         * modules/getopt-gnu (License): Relax to LGPLv2+, for augeas,
81810         on request from Matt Booth.
81812 2011-03-01  Eric Blake  <eblake@redhat.com>
81814         test-link: work on Hurd
81815         * tests/test-link.h (test_link): Hurd rejects linking directories
81816         with EISDIR instead of the POSIX-mandated EPERM.
81818 2011-02-28  Paul Eggert  <eggert@cs.ucla.edu>
81820         stdio: simplify by moving files to printf-posix, sigpipe
81821         * m4/stdio_h.m4 (gl_STDIO_H): Do not require gl_ASM_SYMBOL_PREFIX,
81822         since this symbol is needed only if printf is replaced.
81823         * m4/printf-posix-rpl.m4 (gl_REPLACE_PRINTF):
81824         Require gl_ASM_SYMBOL_PREFIX.
81825         * modules/printf-posix (Files): Add m4/asm-underscore.m4.
81826         * modules/sigpipe (Files): Likewise.  Also, add m4/stdio-write.c.
81827         (Depends-on): Add 'raise'.
81828         (configure.ac): Require gl_ASM_SYMBOL_PREFIX.
81829         * modules/stdio (Files): Remove lib/stdio-write.c,
81830         m4/asm-underscore.m4.
81831         (Depends-on): Remove 'raise'.
81833         stdio: simplify by moving gl_STDIN_LARGE_OFFSET to fseeko, ftello
81834         * m4/fseeko.m4 (gl_STDIN_LARGE_OFFSET): Moved here, from ...
81835         * m4/stdio_h.m4 (gl_STDIN_LARGE_OFFSET): ... here, because
81836         * modules/ftello (Files): Add m4/fseeko.m4, for gl_STDIN_LARGE_OFFSET.
81838 2011-02-28  Bruno Haible  <bruno@clisp.org>
81840         localcharset: Assume ANSI C behaviour of free().
81841         * lib/localcharset.c (get_charset_aliases): Remove NULL test before
81842         calling free().
81843         Suggested by Simon Josefsson <simon@josefsson.org>.
81845 2011-02-28  Corinna Vinschen  <vinschen@redhat.com>  (tiny change)
81846             Charles Wilson  <cygwin@cwilson.fastmail.fm>  (tiny change)
81847             Bruno Haible  <bruno@clisp.org>  (tiny change)
81849         On Cygwin, use /proc file system instead of win32 API.
81850         * lib/relocatable.c: On Cygwin, use file names from /proc, rather than
81851         Win32 file names.
81852         (DllMain): Simplify by removing Cygwin specific code.
81853         (find_shared_library_fullname): Use Linux specific implementation also
81854         for Cygwin.
81855         (get_shared_library_fullname): Update accordingly.
81856         * lib/progreloc.c: On Cygwin, use file names from /proc, rather than
81857         Win32 file names.
81858         (find_executable): On Cygwin, use /proc, like on Linux. Remove previous
81859         Cygwin specific code.
81861 2011-02-28  Christian Rössel  <christian.roessel@gmx.de>  (tiny change)
81862             Markus Geimer  <m.geimer@fz-juelich.de>  (tiny change)
81864         Fix OpenMP flag detection for various Fortran compilers.
81865         * m4/openmp.m4 (_AC_LANG_OPENMP(Fortran 77)): Use '!$'
81866         OpenMP-conditional compilation construct, to force compile
81867         failure with missing OpenMP flag.
81868         (AC_OPENMP): Add flags for Cray CCE and NEC SX compilers.
81870 2011-02-25  Eric Blake  <eblake@redhat.com>
81872         strstr: expand test coverage
81873         * tests/test-strstr.c (main): Add much shorter trigger.  Fix C89
81874         compilation.
81875         * tests/test-memmem.c (main): Duplicate tests.
81876         * tests/test-strcasestr.c (main): Likewise.
81877         * tests/test-c-strcasestr.c (main): Likewise.
81879 2011-02-25  Jim Meyering  <meyering@redhat.com>
81881         maint.mk: detect missing-NL-at-EOF, too
81882         * top/maint.mk (sc_prohibit_empty_lines_at_EOF): Adjust so that
81883         it also detects when a file lacks a newline at EOF.
81884         (require_exactly_one_NL_at_EOF_): Renamed from
81885         detect_empty_lines_at_EOF_.  I opted not to rename the rule,
81886         since people may well have .x-sc_... file names tied to the
81887         existing name.  Suggested by Eric Blake.
81889 2011-02-25  Paul Eggert  <eggert@cs.ucla.edu>
81891         dirname: move m4/dos.m4 functionality into lib/dosname.h
81893         m4/dos.m4 needs to go.  It laboriously invokes the C compiler, and
81894         extracts symbols from it, puts them into config.h; but it's much
81895         easier to use the symbols directly.  filename.h already does this,
81896         but it disagrees with dos.m4 in some respects.  This patch
81897         introduces a different include file dosname.h that packages up
81898         dos.m4, and then later we can work on merging filename.h and
81899         dosname.h.  Applications that need only the easy-to-configure
81900         symbols should consider including dosname.h rather than dirname.h.
81901         * NEWS: Mention incompatible changes.
81902         * m4/dos.m4: Remove.
81903         * lib/dosname.h, modules/dosname: New files.
81904         * lib/dirname.h (ISSLASH, FILE_SYSTEM_PREFIX_LEN):
81905         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE):
81906         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): Move to lib/dosname.h.
81907         * lib/at-func.c, lib/at-func2.c, lib/openat.c, lib/savewd.c:
81908         Include dosname.h, not dirname.h.
81909         * lib/rmdir.c, lib/stat.c, lib/unlink.c, lib/unlinkat.c:
81910         Include dosname.h, for definitions of symbols like ISSLASH
81911         that used to be in config.h.
81912         * m4/dirname.m4 (gl_DIRNAME_LGPL): Do not require gl_AC_DOS.
81913         * m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise.
81914         * m4/stat.m4 (gl_FUNC_STAT): Likewise.
81915         * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise.
81916         * modules/dirname-lgpl (Files): Omit m4/dos.m4.
81917         * modules/rmdir (Files): Likewise.
81918         * modules/stat (Files): Likewise.
81919         * modules/unlink (Files): Likewise.
81920         * modules/dirname-lgpl (Depends-on): Add dosname.
81921         * modules/lstat (Depends-on): Likewise.
81922         * modules/openat (Depends-on): Likewise.
81923         * modules/rmdir (Depends-on): Likewise.
81924         * modules/savewd (Depends-on): Likewise.
81925         * modules/stat (Depends-on): Likewise.
81926         * modules/unlink (Depends-on): Likewise.
81927         * modules/openat (Depends-on): Remove dirname-lgpl.
81928         * modules/savewd (Depends-on): Likewise.
81929         * tests/test-dirname.c: Do not use removed symbols like
81930         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.  Instead, use
81931         the remaining symbols, e.g., ISSLASH ('\\').
81933 2011-02-25  Eric Blake  <eblake@redhat.com>
81935         strstr: revert patches that introduced bug and pessimization
81936         * lib/str-two-way.h: Add another reference.
81937         (two_way_short_needle, two_way_long_needle): Revert changes from
81938         2011-02-24; they pessimize search speed.
81939         (critical_factorization): Partially revert changes from
81940         2010-06-22; they violate the requirement that the left half of the
81941         needle be smaller than the period of the needle.
81943 2011-02-24  Paul Eggert  <eggert@cs.ucla.edu>
81945         filenamecat: remove unnecessary dependency on dirname-lgpl
81946         * modules/filenamecat (Depends-on): Remove dirname-lgpl, as there
81947         is no direct dependency, just an indirect one via filenamecat-lgpl.
81949         remove: remove unnecessary use of m4/dos.m4
81950         * m4/remove.m4 (gl_FUNC_REMOVE): Don't require gl_AC_DOS; not needed.
81951         * modules/remove (FILES): Remove m4/dos.m4.
81953         * lib/openat-proc.c: Don't include dirname.h; not needed.
81955         backupfile: remove unnecessary use of m4/dos.m4
81956         * m4/backupfile.m4 (gl_BACKUPFILE): Don't require gl_AC_DOS; none
81957         of its symbols are used by the backupfile code.  backupfile.c does
81958         use a symbol HAVE_DOS_FILE_NAMES, but that symbol is meant only
81959         for the rare case of programs that want all their backup file
81960         names to live within 8+3 limits, and dos.m4 doesn't address that.
81961         * modules/backupfile (Files): Remove m4/dos.m4.
81963 2011-02-24  Jim Meyering  <meyering@redhat.com>
81965         strstr: fix a bug whereby strstr would mistakenly return NULL
81966         * lib/str-two-way.h (two_way_short_needle): Correct off-by-one error
81967         in period calculation.
81968         (two_way_long_needle): Likewise.
81969         The original problem was reported by Mike Stump in
81970         http://thread.gmane.org/gmane.comp.sysutils.autoconf.bugs/7834
81971         Ralf Wildenhues provided the short needle and haystack.
81972         * tests/test-strstr.c: Add Ralf's test case to trigger the bug.
81973         Add a more involved test to trigger the bug in two_way_long_needle.
81975 2011-02-24  Stefano Lattarini  <stefano.lattarini@gmail.com>  (tiny change)
81977         gnulib-tool: remove use of bold display in help screen
81978         * gnulib-tool (func_usage): Do not use bold display anymore in the
81979         help screen.  That was just meant to be a temporary emphasis for a
81980         backward-incompatible change.
81982 2011-02-23  Bruno Haible  <bruno@clisp.org>
81984         Fix misindentation of preprocessor directives.
81985         * lib/argp-namefrob.h: Reindent preprocessor directives.
81986         * lib/getopt_int.h (struct _getopt_data): Likewise.
81987         * lib/progreloc.c (maybe_executable, find_executable): Likewise.
81988         * lib/vasnprintf.c (decode_long_double): Likewise.
81989         * tests/test-argmatch.c: Insert blank lines, for clarity.
81990         * tests/test-exclude.c: Likewise.
81992 2011-02-22  Bruno Haible  <bruno@clisp.org>
81994         ioctl: Fix for MacOS X in 64-bit mode.
81995         * lib/ioctl.c (rpl_ioctl): Zero-extend, not sign-extend, the request
81996         value.
81997         Suggested by Eric Blake.
81998         Reported by Markus Gothe <nietzsche@lysator.liu.se>.
82000 2011-02-22  Jim Meyering  <meyering@redhat.com>
82002         maint: sc_cpp_indent_check: remove the "only in lib/" restriction
82003         * Makefile (sc_cpp_indent_check): Don't limit the check to files
82004         in lib/.
82006 2011-02-22  Eric Blake  <eblake@redhat.com>
82008         maint: avoid any CDPATH issue
82009         * Makefile (sc_cpp_indent_check): Anchor cd argument.
82011         maint: adjust cpp indentation for my modules, as well
82012         * Makefile (sc_cpp_indent_check): Add my name.
82013         * lib/fbufmode.c: Filter through cppi.
82014         * lib/fpurge.c: Likewise.
82015         * lib/freadable.c: Likewise.
82016         * lib/freading.c: Likewise.
82017         * lib/fwritable.c: Likewise.
82018         * lib/fwriting.c: Likewise.
82019         * lib/sigaction.c: Likewise.
82021 2011-02-22  Jim Meyering  <meyering@redhat.com>
82023         maint: adjust cpp indentation to reflect nesting depth
82024         I.e., in a block of code that begins with an unnested "#if",
82025         put one space between the "#" in column 1 and following token.
82026         For example,
82027         -#include <sys/vfs.h>
82028         +# include <sys/vfs.h>
82029         Do this only in .c files that are part of a module I maintain.
82030         * lib/linkat.c: Filter through cppi.
82031         * lib/nanosleep.c: Likewise.
82032         * lib/openat.c: Likewise.
82033         * lib/openat-die.c: Likewise.
82034         * lib/dup3.c: Likewise.
82035         * lib/fchownat.c: Likewise.
82036         * lib/flock.c: Likewise.
82037         * lib/fsync.c: Likewise.
82038         * lib/fts.c: Likewise.
82039         * lib/getpass.c: Likewise.
82040         * lib/gettimeofday.c: Likewise.
82041         * lib/userspec.c: Likewise.
82042         * Makefile (sc_cpp_indent_check): New rule, to check this.
82044 2011-02-22  Bruno Haible  <bruno@clisp.org>
82046         New module 'wctomb'.
82047         * lib/stdlib.in.h (wctomb): New declaration.
82048         * lib/wctomb.c: New file.
82049         * lib/wctomb-impl.h: New file.
82050         * m4/wctomb.m4: New file.
82051         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_WCTOMB,
82052         REPLACE_WCTOMB.
82053         * modules/stdlib (Makefile.am): Substitute GNULIB_WCTOMB,
82054         REPLACE_WCTOMB.
82055         * modules/wctomb: New file.
82056         * tests/test-stdlib-c++.cc: Test signature of wctomb.
82057         * doc/posix-functions/wctomb.texi: Mention the new module.
82058         * modules/wctob (Depends-on): Add wctomb.
82060 2011-02-22  Bruno Haible  <bruno@clisp.org>
82062         New module 'mbtowc'.
82063         * lib/stdlib.in.h (mbtowc): New declaration.
82064         * lib/mbtowc.c: New file.
82065         * lib/mbtowc-impl.h: New file, from libutf8 with modifications.
82066         * m4/mbtowc.m4: New file.
82067         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_MBTOWC,
82068         REPLACE_MBTOWC.
82069         * modules/stdlib (Makefile.am): Substitute GNULIB_MBTOWC,
82070         REPLACE_MBTOWC.
82071         * modules/mbtowc: New file.
82072         * tests/test-stdlib-c++.cc: Test signature of mbtowc.
82073         * doc/posix-functions/mbtowc.texi: Mention the new module.
82074         * modules/btowc (Depends-on): Add mbtowc.
82076 2011-02-22  Bruno Haible  <bruno@clisp.org>
82078         wcrtomb: Add more tests for native Windows platforms.
82079         * tests/test-wcrtomb-w32-1.sh: New file.
82080         * tests/test-wcrtomb-w32-2.sh: New file.
82081         * tests/test-wcrtomb-w32-3.sh: New file.
82082         * tests/test-wcrtomb-w32-4.sh: New file.
82083         * tests/test-wcrtomb-w32-5.sh: New file.
82084         * tests/test-wcrtomb-w32.c: New file.
82085         * modules/wcrtomb-tests (Files): Add them.
82086         (Makefile.am): Arrange to run these tests.
82087         * tests/test-wcrtomb-w32-6.sh: New file, currently unused.
82088         * tests/test-wcrtomb-w32-7.sh: New file, currently unused.
82090 2011-02-20  Bruno Haible  <bruno@clisp.org>
82092         wcrtomb: Enhance test.
82093         * tests/test-wcrtomb.c (main): Add test against bug with NULL argument.
82095 2011-02-20  Bruno Haible  <bruno@clisp.org>
82097         mbrtowc: Tiny optimization.
82098         * lib/mbrtowc.c (mbrtowc): Delay pstate assignment until it is needed.
82100 2011-02-20  Jim Meyering  <meyering@redhat.com>
82102         test-exclude.c: remove unmatched #endif
82103         * tests/test-exclude.c: Remove stray #endif, left over from
82104         the change of a week ago.
82106 2011-02-19  Jim Meyering  <meyering@redhat.com>
82108         git-version-gen: skip "-dirty" check when appropriate
82109         * build-aux/git-version-gen: Don't run any git commands when the
82110         version string comes from .tarball-version.  Prior to this, we
82111         would run git update-index --refresh even from a just-unpacked
82112         tarball directory, and that could affect a .git/ directory in a
82113         parent of the build directory.  Reported by Mike Frysinger.
82115 2011-02-19  Bruno Haible  <bruno@clisp.org>
82117         unictype/property-byname: Reduce the size of the 'data' segment.
82118         * lib/unictype/pr_byname.gperf: Add gperf option '%pic'.
82120 2011-02-19  Bruno Haible  <bruno@clisp.org>
82122         unictype/scripts: Reduce the size of the 'data' segment.
82123         * lib/gen-uni-tables.c (output_scripts_byname): Emit gperf option
82124         '%pic'.
82125         * lib/unictype/scripts_byname.gperf: Regenerated.
82127 2011-02-19  Bruno Haible  <bruno@clisp.org>
82129         stdint: Update documentation.
82130         * doc/posix-headers/stdint.texi: Mention WCHAR_MIN, WCHAR_MAX problem.
82132 2011-02-18  Paul Eggert  <eggert@cs.ucla.edu>
82134         stdint: omit redundant check for wchar.h
82135         * m4/stdint.m4 (gl_STDINT_H): The earlier part of this macro now
82136         always tests whether wchar.h exists, so remove the now-redundant test.
82138 2011-02-18  Bruno Haible  <bruno@clisp.org>
82140         stdint: Cut dependency to module 'wchar'.
82141         * lib/stdint.in.h: Include wchar.h only when HAVE_WCHAR_H is 1. Also
82142         include the necessary prerequisites.
82143         * m4/stdint.m4 (gl_STDINT_H): Test whether wchar.h exists.
82144         * modules/stdint (Depends-on): Remove wchar.
82145         (Makefile.am): Substitute HAVE_WCHAR_H.
82146         This reverts part of a 2007-01-06 commit. Reported by Paul Eggert.
82148 2011-02-18  Eric Blake  <eblake@redhat.com>
82150         longlong: skip, rather than fail, on cross-compilation
82151         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Avoid aborting configure
82152         when cross-compiling; regression from 2011-02-16.
82154 2011-02-17  Paul Eggert  <eggert@cs.ucla.edu>
82156         * NEWS: Mention 2011-02-08 change to stdlib.
82158 2011-02-17  Bruno Haible  <bruno@clisp.org>
82160         getloadavg: Add comments about platforms.
82161         * m4/getloadavg.m4: Add comment.
82162         * lib/getloadavg.c: Likewise.
82164 2011-02-17  Bruno Haible  <bruno@clisp.org>
82166         getloadavg: Fix link error on Solaris 2.6.
82167         * modules/getloadavg (Link): New section.
82168         * modules/getloadavg-tests (Makefile.am): Use GETLOADAVG_LIBS for
82169         linking test-getloadavg.
82170         * doc/glibc-functions/getloadavg.texi: Mention that Solaris 2.6 lacks
82171         getloadavg.
82173 2011-02-17  Paul Eggert  <eggert@cs.ucla.edu>
82175         * lib/getloadavg.c (getloadavg) [sgi]: Make ldav_off of type ptrdiff_t.
82176         It was 'int', but this doesn't match the IRIX 6.5 manual.
82177         Suggested by Bruno Haible in
82178         <http://lists.gnu.org/r/bug-gnulib/2011-02/msg00207.html>.
82180 2011-02-17  Bruno Haible  <bruno@clisp.org>
82182         havelib: Fix comments.
82183         * m4/lib-link.m4 (AC_LIB_RPATH): Update comments after 2007-01-02
82184         change.
82186 2011-02-17  Bruno Haible  <bruno@clisp.org>
82188         havelib: Update config.rpath.
82189         * build-aux/config.rpath: Update to match libtool.m4 from libtool-2.4.
82191 2011-02-17  Bruno Haible  <bruno@clisp.org>
82193         getloadavg test: Add some plausibility checks.
82194         * tests/test-getloadavg.c (check_avg): Print a warning when the value
82195         is improbable.
82197 2011-02-16  Eric Blake  <eblake@redhat.com>
82199         maintainer-makefile: make syntax-check a no-op from tarballs
82200         * top/maint.mk (no-vc-detected): New rule.
82201         (local-checks-available): Use it to avoid hanging if someone tries
82202         'make syntax-check' from a tarball.  Also append to any non-syntax
82203         checks already defined in cfg.mk.
82205 2011-02-16  Paul Eggert  <eggert@cs.ucla.edu>
82207         longlong: tune, particularly for common case of c99
82209         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Don't bother compiling
82210         or running anything if c99, or if unsigned long long int does not
82211         work.  In either case, we know the answer without further tests.
82212         Do not compile _AC_TYPE_LONG_LONG_SNIPPET twice.  Instead, compile
82213         it at most once, and use its results for both long long int and
82214         unsigned long long int.  This is more likely to be efficient in
82215         the common case where the program wants to check for both long
82216         long int and unsigned long long int.
82217         (AC_TYPE_UNSIGNED_LONG_LONG_INT): Don't bother compiling if c99,
82218         since the answer is already known.
82220 2011-02-15  Paul Eggert  <eggert@cs.ucla.edu>
82222         getloadavg: set errno
82223         * lib/getloadavg.c: Set errno when returning -1.  If no other
82224         error number looks appropriate, set it to ENOSYS if the getloadavg
82225         looks like it can't possibly ever work, ENOTSUP otherwise.
82226         Suggested by Bruno Haible in
82227         <http://lists.gnu.org/r/bug-gnulib/2011-02/msg00187.html>.
82229         getloadavg: trim unused parts and speed up 'configure'
82230         * NEWS: Document this.
82231         * lib/getloadavg.c: Ignore HAVE_GETLOADAVG; this file is now
82232         always compiled if getloadavg is absent.
82233         Move test code to ...
82234         * tests/test-getloadavg.c: New file, containing previous
82235         contents of test from lib/getloadavg.c.  It also contains
82236         suggestions by Bruno Haible in
82237         <http://lists.gnu.org/r/bug-gnulib/2011-02/msg00186.html>.
82238         * modules/getloadavg-tests: New file.
82239         * m4/getloadavg.m4 (gl_GETLOADAVG): Do not check for getloadavg twice.
82240         Do tests in the same order as they're needed for getloadavg.c.
82241         Omit setgid-related tests that generate symbols KMEM_GROUP,
82242         NEET_SETGID, GETLOADAVG_PRIVILEGED; nobody seems to use those any more.
82243         Do only the tests that are needed to see whether the system has
82244         getloadavg, moving the other tests into ...
82245         (gl_PREREQ_GETLOADAVG): ... here.  Do not define obsolete symbol
82246         NLIST_NAME_UNION; nobody should be using it.  Do not define
82247         symbols C_GETLOADAVG and HAVE_GETLOADAVG; they're no longer
82248         relevant, as the user of this module shouldn't care how getloadavg
82249         is implemented.
82251         getloadavg: omit unused var
82252         * lib/getloadavg.c (getloadavg): Omit unused local variable.
82254 2011-02-15  Jim Meyering  <meyering@redhat.com>
82256         doc: update users.txt
82257         * users.txt: Update iwhd's URL.
82259 2011-02-13  Bruno Haible  <bruno@clisp.org>
82261         Consistent macro naming for macros that use GCC __attribute__.
82262         * lib/di-set.h (_GL_ATTRIBUTE_NONNULL): Renamed from
82263         _ATTRIBUTE_NONNULL_.
82264         * lib/ino-map.h (_GL_ATTRIBUTE_NONNULL): Likewise.
82265         * lib/hash.h (_GL_ATTRIBUTE_WUR): Renamed from ATTRIBUTE_WUR.
82266         * lib/ignore-value.h (_GL_ATTRIBUTE_DEPRECATED): Renamed from
82267         ATTRIBUTE_DEPRECATED.
82268         * lib/openat.h (_GL_ATTRIBUTE_NORETURN): Renamed from
82269         ATTRIBUTE_NORETURN.
82270         * lib/sigpipe-die.h (_GL_ATTRIBUTE_NORETURN): Likewise.
82271         * lib/xmemdup0.h (_GL_ATTRIBUTE_NORETURN): Likewise.
82272         * lib/xstrtol.h (_GL_ATTRIBUTE_NORETURN): Likewise.
82273         * lib/xalloc.h (_GL_ATTRIBUTE_NORETURN): Likewise.
82274         (_GL_ATTRIBUTE_MALLOC): Renamed from ATTRIBUTE_MALLOC.
82275         (_GL_ATTRIBUTE_ALLOC_SIZE): Renamed from ATTRIBUTE_ALLOC_SIZE.
82276         * lib/version-etc.h (_GL_ATTRIBUTE_SENTINEL): Renamed from
82277         ATTRIBUTE_SENTINEL.
82278         * lib/safe-alloc.h (_GL_ATTRIBUTE_RETURN_CHECK): Renamed from
82279         ATTRIBUTE_RETURN_CHECK.
82280         * tests/test-ignore-value.c (_GL_ATTRIBUTE_RETURN_CHECK): Likewise.
82281         * tests/test-argmatch.c (_GL_ATTRIBUTE_NORETURN): Renamed from
82282         ATTRIBUTE_NORETURN.
82283         * tests/test-exclude.c (_GL_ATTRIBUTE_NORETURN): Likewise.
82284         Reported by Paul Eggert.
82286 2011-02-13  Bruno Haible  <bruno@clisp.org>
82288         Don't interfere with a program's definition of __attribute__.
82289         * lib/argp.h (__attribute__): Remove definition.
82290         (_GL_ATTRIBUTE_FORMAT): New macro.
82291         (argp_error, __argp_error, argp_failure, __argp_failure): Use it.
82292         * lib/argp-fmtstream.h (__attribute__): Remove definition.
82293         (_GL_ATTRIBUTE_FORMAT): New macro.
82294         (__argp_fmtstream_printf, argp_fmtstream_printf): Use it.
82295         * lib/argp-help.c (hol_entry_long_iterate): Use __attribute__ only for
82296         GCC 3 or newer.
82297         * lib/error.h (__attribute__): Remove definition.
82298         (_GL_ATTRIBUTE_FORMAT): New macro.
82299         (error, error_at_line): Use it.
82300         * lib/hash.h (__attribute__): Remove definition.
82301         (ATTRIBUTE_WUR): Update definition. Define always.
82302         * lib/openat.h (__attribute__): Remove definition.
82303         (ATTRIBUTE_NORETURN): Update definition. Define always.
82304         * lib/sigpipe-die.h (__attribute__): Remove definition.
82305         (ATTRIBUTE_NORETURN): Update definition. Define always.
82306         * lib/vasnprintf.h (__attribute__): Remove definition.
82307         (_GL_ATTRIBUTE_FORMAT): New macro.
82308         (asnprintf, vasnprintf): Use it.
82309         * lib/xalloc.h (__attribute__): Remove definition.
82310         (ATTRIBUTE_NORETURN): Update definition. Define always.
82311         (ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE): Define always.
82312         * lib/xmemdup0.h (__attribute__): Remove definition.
82313         (ATTRIBUTE_NORETURN): Update definition. Define always.
82314         * lib/xprintf.h (__attribute__): Remove definition.
82315         (_GL_ATTRIBUTE_FORMAT): New macro.
82316         (xprintf, xvprintf, xfprintf, xvfprintf): Use it.
82317         * lib/xstrtol.h (__attribute__): Remove definition.
82318         (ATTRIBUTE_NORETURN): Update definition. Define always.
82319         * lib/xvasprintf.h (__attribute__): Remove definition.
82320         (_GL_ATTRIBUTE_FORMAT): New macro.
82321         (xasprintf, xvasprintf): Use it.
82322         * tests/test-argmatch.c (__attribute__): Remove definition.
82323         (ATTRIBUTE_NORETURN): Update definition. Define always.
82324         * tests/test-exclude.c (__attribute__): Remove definition.
82325         (ATTRIBUTE_NORETURN): Update definition. Define always.
82326         Reported by Paul Eggert.
82328 2011-02-13  Bruno Haible  <bruno@clisp.org>
82330         mbrtowc: Add more tests for native Windows platforms.
82331         * tests/test-mbrtowc-w32-1.sh: New file.
82332         * tests/test-mbrtowc-w32-2.sh: New file.
82333         * tests/test-mbrtowc-w32-3.sh: New file.
82334         * tests/test-mbrtowc-w32-4.sh: New file.
82335         * tests/test-mbrtowc-w32-5.sh: New file.
82336         * tests/test-mbrtowc-w32.c: New file.
82337         * modules/mbrtowc-tests (Files): Add them.
82338         (Makefile.am): Arrange to run these tests.
82339         * tests/test-mbrtowc-w32-6.sh: New file, currently unused.
82340         * tests/test-mbrtowc-w32-7.sh: New file, currently unused.
82342 2011-02-13  Bruno Haible  <bruno@clisp.org>
82344         mbrtowc: Work around native Windows bug.
82345         * m4/mbrtowc.m4 (gl_MBRTOWC_RETVAL): Detect native Windows bug. Use the
82346         guess when no suitable locale for testing was found.
82347         * doc/posix-functions/mbrtowc.texi: Mention the native Windows bug.
82349 2011-02-13  Bruno Haible  <bruno@clisp.org>
82351         mbsinit: Work around mingw bug.
82352         * m4/mbsinit.m4 (gl_FUNC_MBSINIT): Replace mbsinit also on mingw.
82353         * lib/mbsinit.c (mbsinit): Provide an alternate definition for native
82354         Windows.
82355         * doc/posix-functions/mbsinit.texi: Mention the mingw bug.
82357 2011-02-13  Bruno Haible  <bruno@clisp.org>
82359         mbsinit: Don't crash for a NULL argument.
82360         * lib/mbsinit.c (mbsinit): When the argument is NULL, return 1.
82361         * tests/test-mbsinit.c (mbsinit): Check this behaviour.
82363 2011-02-13  Bruno Haible  <bruno@clisp.org>
82365         Don't interfere with a program's definition of __attribute__.
82366         * lib/stdio.in.h (__attribute__): Remove definition.
82367         (_GL_ATTRIBUTE_FORMAT, _GL_ATTRIBUTE_FORMAT_PRINTF): New macros.
82368         (dprintf, fprintf, obstack_printf, obstack_printf, obstack_vprintf,
82369         printf, snprintf, sprintf, asprintf, vasprintf, vdprintf, vfprintf,
82370         vsnprintf, vsprintf): Use _GL_ATTRIBUTE_FORMAT_PRINTF.
82371         * lib/string.in.h (__attribute__): Remove definition.
82372         Reported by Paul Eggert.
82374 2011-02-12  Paul Eggert  <eggert@cs.ucla.edu>
82376         stdlib: don't get in the way of non-GCC __attribute__
82377         See thread starting at
82378         <http://lists.gnu.org/r/bug-gnulib/2011-02/msg00161.html>.
82379         Revert previous stdlib change, installing the following instead:
82380         * lib/stdlib.in.h (__attribute__): Remove.  We do not want
82381         to get in the way of a non-GCC compiler that supports __attribute__.
82382         (_GL_ATTRIBUTE_RETURN): New macro.
82383         (_Exit): Use it instead of __attribute__.
82385 2011-02-12  Bruno Haible  <bruno@clisp.org>
82387         quotearg test: Avoid test failure on mingw.
82388         * tests/test-quotearg.sh: Convert the locale identifier from native
82389         Windows syntax to Unix syntax.
82391 2011-02-12  Bruno Haible  <bruno@clisp.org>
82393         setlocale: Prefer gnulib's override over libintl's override.
82394         * lib/locale.in.h (GNULIB_defined_setlocale): New macro.
82395         * lib/gettext.h (setlocale): Redefine to rpl_setlocale if
82396         GNULIB_defined_setlocale is set.
82398 2011-02-12  Paul Eggert  <eggert@cs.ucla.edu>
82400         stdlib: support non-GCC __attribute__
82402         Fix a serious and tricky problem encountered when attempting to
82403         add the getloadavg module to Emacs.  Emacs worked fine on RHEL
82404         5.5, but it crashed due to memory corruption on Solaris 10 with
82405         Sun C 5.11.  Emacs normally ORs 3-bit tags into their low-order
82406         bits that are otherwise zero.  This tagging is optional inside
82407         Emacs but is preferred and is used when __attribute__ ((__aligned
82408         (8))) works, as it does with both recent-enough GCC and with Sun C
82409         5.11.  However, Sun C 5.11 is not GCC and does not #define
82410         __GNUC__ and __GNUC_MINOR__.
82412         When I added the getloadavg module to Emacs, it brought in
82413         stdlib.in.h, which contained this fragment:
82415            #ifndef __attribute__
82416            # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
82417            #  define __attribute__(Spec)   /* empty */
82418            # endif
82419            #endif
82421         When files that include <stdlib.h> were compiled with Sun C 5.11,
82422         the above code disabled __attribute__ ((__aligned (8))), which
82423         caused variables to not be properly aligned, which eventually led
82424         to the pointer corruption mentioned above.  (This was a bit hard
82425         to diagnose, unfortunately.)
82427         Several "#define __attribute__(X) /* empty */" code snippets need
82428         to be eradicated from Gnulib to work with non-GCC compilers that
82429         support __attribute__.  The Autoconf way to do this is to test for
82430         each kind of attribute that we want support for, and selectively
82431         enable that in source code.
82433         Fix this problem just for stdlib.h, by adding a test for the
82434         __noreturn__ attribute, and change stdlib.in.h to use that test
82435         when needed.  This technique can be easily generalized to the
82436         other *.in.h files and attributes, and a similar technique can be
82437         used for *.h and *.c files.  This patch is enough to solve the
82438         problem for Emacs + getloadavg, and I thought I'd publish it for
82439         feedback before undertaking further, similar fixes in other
82440         modules.
82442         This patch does not arrange to #define HAVE_ATTRIBUTE_NORETURN
82443         because it's not needed for stdlib.h.  It merely substitutes the
82444         value directly into stdlib.h.  We may well need to #define it, or
82445         similar symbols, for other modules, but it's nice to also have an
82446         option to not #define it for applications like Emacs that do not
82447         need it.
82449         * lib/stdlib.in.h (__attribute__): Do not #define.
82450         (_GL_ATTRIBUTE_NORETURN): New macro, which in stdlib.h needs to
82451         be defined only if the _Exit module is also used.
82452         * m4/_Exit.m4 (gl_FUNC__EXIT): Require gl_ATTRIBUTE_NORETURN.
82453         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Subst
82454         HAVE_ATTRIBUTE_NORETURN and default it to 1, its value on GNU
82455         platforms.
82456         * modules/_Exit (Files): Add m4/attribute.m4.
82457         * modules/stdlib (Makefile.am): Substitute HAVE_ATTRIBUTE_NORETURN.
82458         * m4/attribute.m4: New file.
82460 2011-02-12  Bruno Haible  <bruno@clisp.org>
82462         wcsrtombs: Work around bug on native Windows.
82463         * m4/wcsrtombs.m4 (gl_WCSRTOMBS_NULL): Test against mingw bug.
82464         * lib/wcsrtombs.c (rpl_wcsrtombs): When dest is NULL, pass SIZE_MAX
82465         instead of len.
82466         * doc/posix-functions/wcsrtombs.texi: Document mingw bug.
82468 2011-02-12  Bruno Haible  <bruno@clisp.org>
82470         mbsrtowcs: Work around bug on native Windows.
82471         * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Require gt_LOCALE_FR. Test
82472         against mingw bug.
82473         * doc/posix-functions/mbsrtowcs.texi: Document mingw bug.
82475 2011-02-12  Bruno Haible  <bruno@clisp.org>
82477         Avoid setlocale bugs in tests.
82478         * modules/btowc (Dependencies): Add setlocale.
82479         * modules/c-strcase (Dependencies): Likewise.
82480         * modules/mbmemcasecmp (Dependencies): Likewise.
82481         * modules/mbmemcasecoll (Dependencies): Likewise.
82482         * modules/mbrtowc (Dependencies): Likewise.
82483         * modules/mbscasecmp (Dependencies): Likewise.
82484         * modules/mbscasestr (Dependencies): Likewise.
82485         * modules/mbschr (Dependencies): Likewise.
82486         * modules/mbscspn (Dependencies): Likewise.
82487         * modules/mbsinit (Dependencies): Likewise.
82488         * modules/mbsncasecmp (Dependencies): Likewise.
82489         * modules/mbsnrtowcs (Dependencies): Likewise.
82490         * modules/mbspbrk (Dependencies): Likewise.
82491         * modules/mbspcasecmp (Dependencies): Likewise.
82492         * modules/mbsrchr (Dependencies): Likewise.
82493         * modules/mbsrtowcs (Dependencies): Likewise.
82494         * modules/mbsspn (Dependencies): Likewise.
82495         * modules/mbsstr (Dependencies): Likewise.
82496         * modules/nl_langinfo (Dependencies): Likewise.
82497         * modules/quotearg (Dependencies): Likewise.
82498         * modules/unicase/locale-language (Dependencies): Likewise.
82499         * modules/unicase/ulc-casecmp (Dependencies): Likewise.
82500         * modules/unicase/ulc-casecoll (Dependencies): Likewise.
82501         * modules/unigbrk/ulc-grapheme-breaks (Dependencies): Likewise.
82502         * modules/unistdio/u8-vasnprintf (Dependencies): Likewise.
82503         * modules/unistdio/u16-vasnprintf (Dependencies): Likewise.
82504         * modules/unistdio/u32-vasnprintf (Dependencies): Likewise.
82505         * modules/unistdio/ulc-vasnprintf (Dependencies): Likewise.
82506         * modules/uniwbrk/ulc-wordbreaks (Dependencies): Likewise.
82507         * modules/vasnprintf-posix (Dependencies): Likewise.
82508         * modules/wcrtomb (Dependencies): Likewise.
82509         * modules/wcsnrtombs (Dependencies): Likewise.
82510         * modules/wcsrtombs (Dependencies): Likewise.
82512 2011-02-12  Bruno Haible  <bruno@clisp.org>
82514         setlocale: Workaround native Windows bug.
82515         * lib/setlocale.c (rpl_setlocale): On native Windows, when setlocale
82516         succeeds but sets LC_CTYPE to "C", report a failure.
82517         * tests/test-setlocale2.sh: New file.
82518         * tests/test-setlocale2.c: New file.
82519         * modules/setlocale-tests (Files): Add the new files.
82520         (Makefile.am): Enable test-setlocale2.sh test.
82521         * doc/posix-functions/setlocale.texi: Mention workaround.
82523 2011-02-11  Bruno Haible  <bruno@clisp.org>
82525         Tests for module 'setlocale'.
82526         * modules/setlocale-tests: New file.
82527         * tests/test-setlocale1.sh: New file.
82528         * tests/test-setlocale1.c: New file.
82530         New module 'setlocale'.
82531         * lib/locale.in.h (setlocale): New declaration.
82532         * lib/setlocale.c: New file, based on
82533         gettext/gettext-runtime/intl/setlocale.c.
82534         * m4/setlocale.m4: New file.
82535         * m4/locale_h.m4 (gl_LOCALE_H): Test whether setlocale is declared.
82536         (gl_LOCALE_H_DEFAULTS): Initialize GNULIB_SETLOCALE, REPLACE_SETLOCALE.
82537         * modules/locale (Makefile.am): Substitute GNULIB_SETLOCALE,
82538         REPLACE_SETLOCALE.
82539         * modules/setlocale: New file.
82540         * tests/test-locale-c++.cc: Test the declaration of setlocale.
82541         * doc/posix-functions/setlocale.texi: Mention the new module.
82543 2011-02-11  Bruno Haible  <bruno@clisp.org>
82545         Prepare for locale dependent tests on mingw.
82546         * m4/locale-ar.m4 (gt_LOCALE_AR): On native Windows, don't try "ar"
82547         because it has the wrong locale encoding.
82548         * m4/locale-fr.m4 (gt_LOCALE_FR): On native Windows, try
82549         French_France.1252 instead of "fr".
82550         (gt_LOCALE_FR_UTF8): On native Windows, try French_France.65001.
82551         * m4/locale-ja.m4 (gt_LOCALE_JA): On native Windows, don't try "ja"
82552         because it has the wrong locale encoding.
82553         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Require AC_CANONICAL_HOST. On
82554         native Windows, try Turkish_Turkey.65001.
82555         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): On native Windows, try
82556         Chinese_China.54936.
82558         Prepare for locale dependent tests on mingw.
82559         * m4/locale-ar.m4 (gt_LOCALE_AR): On native Windows, call setlocale
82560         differently.
82561         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Likewise.
82562         * m4/locale-ja.m4 (gt_LOCALE_JA): Likewise.
82563         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.
82564         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
82566 2011-02-11  Eric Blake  <eblake@redhat.com>
82568         strptime: avoid compiler warnings
82569         * lib/strptime.c (__strptime_internal) [!_NL_CURRENT]: Avoid
82570         compiler warnings about dead code.
82571         Reported by Daniel P. Berrange.
82573 2011-02-11  Thien-Thi Nguyen  <ttn@gnuvola.org>
82575         doc: update users.txt
82576         * users.txt: Add rcs.
82578 2011-02-10  John W. Eaton  <jwe@gnu.org>
82580         doc: update users.txt
82581         * users.txt: Add octave.
82583 2011-02-10  Jim Meyering  <meyering@redhat.com>
82585         doc: update users.txt
82586         * users.txt: Add iwhd.
82588 2011-02-09  Bruno Haible  <bruno@clisp.org>
82590         gnulib-tool: Make copyright notice adjustment more robust.
82591         * gnulib-tool (func_import): In sed_transform_main_lib_file,
82592         sed_transform_build_aux_file, sed_transform_testsrelated_lib_file,
82593         allow a line break to occur after "GNU" in "GNU [Lesser] General Public
82594         License".
82595         Reported by Glenn Morris <rgm@gnu.org> via Paul Eggert.
82597 2011-02-06  Bruno Haible  <bruno@clisp.org>
82599         New module 'towctrans'.
82600         * modules/towctrans: New file.
82601         * lib/wctype.in.h (towctrans): New declaration.
82602         * lib/towctrans.c: New file.
82603         * lib/towctrans-impl.h: New file.
82604         * m4/towctrans.m4: New file.
82605         * m4/wctype_h.m4 (gl_WCTYPE_H): Test whether towctrans is declared.
82606         (gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_TOWCTRANS.
82607         * modules/wctype-h (Makefile.am): Substitute GNULIB_TOWCTRANS.
82608         * tests/test-wctype-h-c++.cc: Test the declaration of towctrans.
82609         * doc/posix-functions/towctrans.texi: Mention the new module.
82611 2011-02-06  Bruno Haible  <bruno@clisp.org>
82613         New module 'wctrans'.
82614         * modules/wctrans: New file.
82615         * lib/wctype.in.h (wctrans): New declaration.
82616         * lib/wctrans.c: New file.
82617         * lib/wctrans-impl.h: New file.
82618         * m4/wctrans.m4: New file.
82619         * m4/wctype_h.m4 (gl_WCTYPE_H): Test whether wctrans is declared.
82620         (gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_WCTRANS.
82621         * modules/wctype-h (Makefile.am): Substitute GNULIB_WCTRANS.
82622         * tests/test-wctype-h-c++.cc: Test the declaration of wctrans.
82623         * doc/posix-functions/wctrans.texi: Mention the new module.
82625 2011-02-06  Bruno Haible  <bruno@clisp.org>
82627         New module 'iswctype'.
82628         * modules/iswctype: New file.
82629         * lib/wctype.in.h (iswctype): New declaration.
82630         * lib/iswctype.c: New file.
82631         * lib/iswctype-impl.h: New file.
82632         * m4/iswctype.m4: New file.
82633         * m4/wctype_h.m4 (gl_WCTYPE_H): Test whether iswctype is declared.
82634         (gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_ISWCTYPE.
82635         * modules/wctype-h (Makefile.am): Substitute GNULIB_ISWCTYPE.
82636         * tests/test-wctype-h-c++.cc: Test the declaration of iswctype.
82637         * doc/posix-functions/iswctype.texi: Mention the new module and the
82638         HP-UX 11.00 problem.
82640 2011-02-06  Bruno Haible  <bruno@clisp.org>
82642         New module 'wctype'.
82643         * modules/wctype: Change to represent the wctype() substitute.
82644         * lib/wctype.in.h (wctype): New declaration.
82645         * lib/wctype.c: New file.
82646         * lib/wctype-impl.h: New file.
82647         * m4/wctype.m4: New file.
82648         * m4/wctype_h.m4 (gl_WCTYPE_H): Test whether wctype is declared.
82649         (gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_WCTYPE.
82650         * modules/wctype-h (Makefile.am): Substitute GNULIB_WCTYPE.
82651         * tests/test-wctype-h-c++.cc: Test the declaration of wctype.
82652         * doc/posix-functions/wctype.texi: Mention the new module and the
82653         HP-UX 11.00 problem.
82655 2011-02-06  Bruno Haible  <bruno@clisp.org>
82657         wctype-h: Ensure wctype_t and wctrans_t are defined.
82658         * lib/wctype.in.h (wctype_t, wctrans_t): New type declarations.
82659         * m4/wctype_h.m4 (gl_WCTYPE_H): Determine HAVE_WCTYPE_T, HAVE_WCTRANS_T.
82660         (gl_WCTYPE_H_DEFAULTS): Initialize HAVE_WCTYPE_T, HAVE_WCTRANS_T.
82661         * modules/wctype-h (Makefile.am): Substitute HAVE_WCTYPE_T,
82662         HAVE_WCTRANS_T.
82663         * tests/test-wctype-h.c: Check that wctype_t and wctrans_t are defined.
82665 2011-02-09  Paul Eggert  <eggert@cs.ucla.edu>
82667         flock: fix license typo
82669         * lib/flock.c: Fix typo in license.  One of the "Lesser"s was
82670         omitted.
82672 2011-02-08  Bruno Haible  <bruno@clisp.org>
82674         Split large sed scripts, for HP-UX sed.
82675         * modules/math (Makefile.am): Split sed scripts around 50 sed commands,
82676         to avoid HP-UX limit of 99 commands, in the near future.
82677         * modules/stdlib (Makefile.am): Likewise.
82678         * modules/unistd (Makefile.am): Likewise.
82679         * modules/wchar (Makefile.am): Likewise.
82680         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
82681         Suggestion by Ralf Wildenhues <Ralf.Wildenhues@gmx.de> in
82682         <http://lists.gnu.org/r/bug-gnulib/2010-01/msg00216.html>.
82684 2011-02-08  Paul Eggert  <eggert@cs.ucla.edu>
82685             Bruno Haible  <bruno@clisp.org>
82687         stdlib: improve random_r modularization
82688         * lib/stdlib.in.h: Encapsulate all the stuff having to do with
82689         random_r inside "#if @GNULIB_RANDOM_R@", so that it's clearer that
82690         you also need the random_r module to get this material right.
82691         * m4/random_r.m4 (gl_FUNC_RANDOM_R): Move check for random.h here ...
82692         * m4/stdlib_h.m4 (gl_STDLIB_H): ... from here.
82693         (gl_STDLIB_H_DEFAULTS): Default HAVE_RANDOM_H to 1, and AC_SUBST it.
82695 2011-02-08  Paul Eggert  <eggert@cs.ucla.edu>
82697         stdlib: don't depend on stdint
82698         * lib/stdlib.in.h: Don't include <stdint.h> merely because
82699         GNULIB_POSIXCHECK is defined.  GNULIB_POSIXCHECK seems to
82700         be independent of whether stdint.h is needed.
82701         * m4/random_r.m4 (gl_FUNC_RANDOM_R): Check for struct random_data
82702         here, instead of ...
82703         * m4/stdlib_h.m4 (gl_STDLIB_H): ... here.  Applications that need
82704         struct random_data should be using the random_r module, not just
82705         the stdlib module (which wouldn't make sense: what package needs
82706         just struct random_data without also needing random_r?).
82707         * modules/stdlib (Depends-on): Remove stdint.
82709         getloadavg: don't depend on c-strtod, cloexec, fcntl-safer
82710         See the thread rooted at
82711         <http://lists.gnu.org/r/bug-gnulib/2011-02/msg00090.html>.
82712         * lib/getloadavg.c: Do not include c-strtod.h, cloexec.h, or fcntl--.h.
82713         Include <fcntl.h> only if (defined __linux__ || defined __CYGWIN__
82714         || defined SUNOS_5 || (defined LOAD_AVE_TYPE && !  defined
82715         __VMS)); previously it was always included (via fcntl--.h).
82716         (getloadavg): Do not use c_strtod.  Instead, approximate it by
82717         hand; this is good enough for load averages.  Also, do not use
82718         set_cloexec_flag; instead, use the O_CLOEXEC and F_DUPFD_CLOEXEC
82719         flags directly if available and don't bother otherwise.  (Packages
82720         that need the extra reliability should use the modules that define
82721         these flags on older platforms that lack them.)
82722         * modules/getloadavg (Depends-on): Remove c-strtod, cloexec,
82723         fcntl-safer.
82725 2011-02-08  Jim Meyering  <meyering@redhat.com>
82727         di-set.h, ino-map.h: add multiple-inclusion guard
82728         Technically, the guard is required only for ino-map.h, due to its
82729         INO_MAP_INSERT_FAILURE definition, but do both for consistency.
82730         * lib/di-set.h: Add file-spanning #ifndef _GL_DI_SET_H.
82731         * lib/ino-map.h: Likewise.
82733 2011-02-06  Bruno Haible  <bruno@clisp.org>
82735         iswblank: Ensure declaration on glibc systems.
82736         * m4/iswblank.m4 (gl_FUNC_ISWBLANK): Require gl_USE_SYSTEM_EXTENSIONS.
82737         * modules/iswblank (Dependencies): Add 'extensions'.
82738         * doc/posix-functions/iswblank.texi: Document the glibc problem.
82740 2011-02-06  Bruno Haible  <bruno@clisp.org>
82742         New module 'iswblank'.
82743         * lib/wctype.in.h (iswblank): Don't declare if GNULIB_ISWBLANK is 0.
82744         * modules/iswblank: New file.
82745         * modules/wctype-h (Files): Remove lib/iswblank.c.
82746         (Makefile.am): Substitute GNULIB_ISWBLANK.
82747         * m4/iswblank.m4: New file, partially extracted from m4/wctype_h.m4.
82748         * m4/wctype_h.m4 (gl_WCTYPE_MODULE_INDICATOR): New macro.
82749         (gl_WCTYPE_H_DEFAULTS): New macro.
82750         (gl_WCTYPE_H): Require it. Remove iswblank related code.
82751         * modules/iswblank-tests: New file.
82752         * tests/test-iswblank.c: New file, extraced from tests/test-wctype-h.c.
82753         * tests/test-wctype-h.c (main): Remove iswblank tests.
82754         * tests/test-wctype-h-c++.cc: Guard the signature test of iswblank.
82755         * doc/posix-functions/iswblank.texi: Mention module 'iswblank' instead
82756         of 'wctype-h'.
82757         * NEWS: Mention the change.
82758         * modules/mbchar (Depends-on): Add iswblank.
82760 2011-02-08  Bruno Haible  <bruno@clisp.org>
82762         di-set tests: Refactor.
82763         * tests/test-di-set.c: Include di-set.h early. Include macros.h. Drop
82764         unnecessary includes.
82765         (ASSERT): Remove macro.
82766         (main): Make C90 compliant by avoiding variable declaration after
82767         statement.
82768         * modules/di-set-tests (Files): Add tests/macros.h.
82770 2011-02-08  Bruno Haible  <bruno@clisp.org>
82772         ino-map tests: Refactor.
82773         * tests/test-ino-map.c: Include ino-map.h early. Include macros.h. Drop
82774         unnecessary includes.
82775         (ASSERT): Remove macro.
82776         (main): Make C90 compliant by avoiding variable declaration after
82777         statement.
82778         * modules/ino-map-tests (Files): Add tests/macros.h.
82780 2011-02-08  Jim Meyering  <meyering@redhat.com>
82782         di-set: add "const" to a cast
82783         * lib/di-set.c (di_set_insert): Cast hash_insert0 argument to
82784         "(void const *)", not "(void *)".  Spotted by Bruno Haible.
82786 2011-02-06  Bruno Haible  <bruno@clisp.org>
82788         Rename module 'wctype' to 'wctype-h'.
82789         * modules/wctype-h: Renamed from modules/wctype.
82790         * modules/wctype: Simplyfy to a redirection to 'wctype-h'.
82791         * modules/wctype-h-tests: Renamed from modules/wctype-tests.
82792         (Files, Depends-on, Makefile.am): Update.
82793         * modules/wctype-h-c++-tests: Renamed from modules/wctype-c++-tests.
82794         (Files, Makefile.am): Update.
82795         * tests/test-wctype-h.c: Renamed from tests/test-wctype.c.
82796         * tests/test-wctype-h-c++.cc: Renamed from tests/test-wctype-c++.cc.
82797         * doc/posix-headers/wctype.texi: Update.
82798         * doc/posix-functions/iswalnum.texi: Update.
82799         * doc/posix-functions/iswalpha.texi: Update.
82800         * doc/posix-functions/iswblank.texi: Update.
82801         * doc/posix-functions/iswcntrl.texi: Update.
82802         * doc/posix-functions/iswdigit.texi: Update.
82803         * doc/posix-functions/iswgraph.texi: Update.
82804         * doc/posix-functions/iswlower.texi: Update.
82805         * doc/posix-functions/iswprint.texi: Update.
82806         * doc/posix-functions/iswpunct.texi: Update.
82807         * doc/posix-functions/iswspace.texi: Update.
82808         * doc/posix-functions/iswupper.texi: Update.
82809         * doc/posix-functions/iswxdigit.texi: Update.
82810         * doc/posix-functions/towlower.texi: Update.
82811         * doc/posix-functions/towupper.texi: Update.
82812         * NEWS: Mention the change.
82813         * modules/fnmatch (Dependencies): Add wctype-h, remove wctype.
82814         * modules/mbchar (Dependencies): Likewise.
82815         * modules/mbswidth (Dependencies): Likewise.
82816         * modules/quotearg (Dependencies): Likewise.
82817         * modules/regex (Dependencies): Likewise.
82818         * modules/wcscasecmp (Dependencies): Likewise.
82819         * modules/wcsncasecmp (Dependencies): Likewise.
82820         * modules/wcwidth (Dependencies): Likewise.
82822 2011-02-06  Bruno Haible  <bruno@clisp.org>
82824         New module 'wcswidth'.
82825         * modules/wcswidth: New file.
82826         * lib/wchar.in.h (wcswidth): New declaration.
82827         * lib/wcswidth.c: New file.
82828         * lib/wcswidth-impl.h: New file, from libutf8 with modifications.
82829         * m4/wcswidth.m4: New file.
82830         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcswidth is declared.
82831         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSWIDTH, HAVE_WCSWIDTH,
82832         REPLACE_WCSWIDTH.
82833         * modules/wchar (Makefile.am): Substitute GNULIB_WCSWIDTH,
82834         HAVE_WCSWIDTH, REPLACE_WCSWIDTH.
82835         * tests/test-wchar-c++.cc: Test the declaration of wcswidth.
82836         * doc/posix-functions/wcswidth.texi: Mention the new module.
82838 2011-02-06  Bruno Haible  <bruno@clisp.org>
82840         New module 'wcstok'.
82841         * modules/wcstok: New file.
82842         * lib/wchar.in.h (wcstok): New declaration.
82843         * lib/wcstok.c: New file.
82844         * lib/wcstok-impl.h: New file, from libutf8 with modifications.
82845         * m4/wcstok.m4: New file.
82846         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcstok is declared.
82847         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSTOK, HAVE_WCSTOK.
82848         * modules/wchar (Makefile.am): Substitute GNULIB_WCSTOK, HAVE_WCSTOK.
82849         * tests/test-wchar-c++.cc: Test the declaration of wcstok.
82850         * doc/posix-functions/wcstok.texi: Mention the new module.
82852 2011-02-06  Bruno Haible  <bruno@clisp.org>
82854         New module 'wcsstr'.
82855         * modules/wcsstr: New file.
82856         * lib/wchar.in.h (wcsstr): New declaration.
82857         * lib/wcsstr.c: New file.
82858         * lib/wcsstr-impl.h: New file, from libutf8 with modifications.
82859         * m4/wcsstr.m4: New file.
82860         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsstr is declared.
82861         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSSTR, HAVE_WCSSTR.
82862         * modules/wchar (Makefile.am): Substitute GNULIB_WCSSTR, HAVE_WCSSTR.
82863         * tests/test-wchar-c++.cc: Test the declaration of wcsstr.
82864         * doc/posix-functions/wcsstr.texi: Mention the new module.
82866 2011-02-06  Bruno Haible  <bruno@clisp.org>
82868         New module 'wcspbrk'.
82869         * modules/wcspbrk: New file.
82870         * lib/wchar.in.h (wcspbrk): New declaration.
82871         * lib/wcspbrk.c: New file.
82872         * lib/wcspbrk-impl.h: New file, from libutf8 with modifications.
82873         * m4/wcspbrk.m4: New file.
82874         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcspbrk is declared.
82875         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSPBRK, HAVE_WCSPBRK.
82876         * modules/wchar (Makefile.am): Substitute GNULIB_WCSPBRK, HAVE_WCSPBRK.
82877         * tests/test-wchar-c++.cc: Test the declaration of wcspbrk.
82878         * doc/posix-functions/wcspbrk.texi: Mention the new module.
82880 2011-02-06  Bruno Haible  <bruno@clisp.org>
82882         New module 'wcsspn'.
82883         * modules/wcsspn: New file.
82884         * lib/wchar.in.h (wcsspn): New declaration.
82885         * lib/wcsspn.c: New file.
82886         * lib/wcsspn-impl.h: New file, from libutf8 with modifications.
82887         * m4/wcsspn.m4: New file.
82888         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsspn is declared.
82889         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSSPN, HAVE_WCSSPN.
82890         * modules/wchar (Makefile.am): Substitute GNULIB_WCSSPN, HAVE_WCSSPN.
82891         * tests/test-wchar-c++.cc: Test the declaration of wcsspn.
82892         * doc/posix-functions/wcsspn.texi: Mention the new module.
82894 2011-02-06  Bruno Haible  <bruno@clisp.org>
82896         New module 'wcscspn'.
82897         * modules/wcscspn: New file.
82898         * lib/wchar.in.h (wcscspn): New declaration.
82899         * lib/wcscspn.c: New file.
82900         * lib/wcscspn-impl.h: New file, from libutf8 with modifications.
82901         * m4/wcscspn.m4: New file.
82902         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcscspn is declared.
82903         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCSPN, HAVE_WCSCSPN.
82904         * modules/wchar (Makefile.am): Substitute GNULIB_WCSCSPN, HAVE_WCSCSPN.
82905         * tests/test-wchar-c++.cc: Test the declaration of wcscspn.
82906         * doc/posix-functions/wcscspn.texi: Mention the new module.
82908 2011-02-06  Bruno Haible  <bruno@clisp.org>
82910         New module 'wcsrchr'.
82911         * modules/wcsrchr: New file.
82912         * lib/wchar.in.h (wcsrchr): New declaration.
82913         * lib/wcsrchr.c: New file.
82914         * lib/wcsrchr-impl.h: New file, from libutf8 with modifications.
82915         * m4/wcsrchr.m4: New file.
82916         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsrchr is declared.
82917         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSRCHR, HAVE_WCSRCHR.
82918         * modules/wchar (Makefile.am): Substitute GNULIB_WCSRCHR, HAVE_WCSRCHR.
82919         * tests/test-wchar-c++.cc: Test the declaration of wcsrchr.
82920         * doc/posix-functions/wcsrchr.texi: Mention the new module.
82922 2011-02-06  Bruno Haible  <bruno@clisp.org>
82924         New module 'wcschr'.
82925         * modules/wcschr: New file.
82926         * lib/wchar.in.h (wcschr): New declaration.
82927         * lib/wcschr.c: New file.
82928         * lib/wcschr-impl.h: New file, from libutf8 with modifications.
82929         * m4/wcschr.m4: New file.
82930         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcschr is declared.
82931         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCHR, HAVE_WCSCHR.
82932         * modules/wchar (Makefile.am): Substitute GNULIB_WCSCHR, HAVE_WCSCHR.
82933         * tests/test-wchar-c++.cc: Test the declaration of wcschr.
82934         * doc/posix-functions/wcschr.texi: Mention the new module.
82936 2011-02-06  Bruno Haible  <bruno@clisp.org>
82938         New module 'wcsdup'.
82939         * modules/wcsdup: New file.
82940         * lib/wchar.in.h (wcsdup): New declaration.
82941         * lib/wcsdup.c: New file.
82942         * lib/wcsdup-impl.h: New file, from libutf8 with modifications.
82943         * m4/wcsdup.m4: New file.
82944         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsdup is declared.
82945         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSDUP, HAVE_WCSDUP.
82946         * modules/wchar (Makefile.am): Substitute GNULIB_WCSDUP, HAVE_WCSDUP.
82947         * tests/test-wchar-c++.cc: Test the declaration of wcsdup.
82948         * doc/posix-functions/wcsdup.texi: Mention the new module.
82950 2011-02-06  Bruno Haible  <bruno@clisp.org>
82952         New module 'wcsxfrm'.
82953         * modules/wcsxfrm: New file.
82954         * lib/wchar.in.h (wcsxfrm): New declaration.
82955         * lib/wcsxfrm.c: New file.
82956         * lib/wcsxfrm-impl.h: New file.
82957         * m4/wcsxfrm.m4: New file.
82958         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsxfrm is declared.
82959         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSXFRM, HAVE_WCSXFRM.
82960         * modules/wchar (Makefile.am): Substitute GNULIB_WCSXFRM, HAVE_WCSXFRM.
82961         * tests/test-wchar-c++.cc: Test the declaration of wcsxfrm.
82962         * doc/posix-functions/wcsxfrm.texi: Mention the new module.
82964 2011-02-06  Bruno Haible  <bruno@clisp.org>
82966         New module 'wcscoll'.
82967         * modules/wcscoll: New file.
82968         * lib/wchar.in.h (wcscoll): New declaration.
82969         * lib/wcscoll.c: New file.
82970         * lib/wcscoll-impl.h: New file.
82971         * m4/wcscoll.m4: New file.
82972         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcscoll is declared.
82973         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCOLL, HAVE_WCSCOLL.
82974         * modules/wchar (Makefile.am): Substitute GNULIB_WCSCOLL, HAVE_WCSCOLL.
82975         * tests/test-wchar-c++.cc: Test the declaration of wcscoll.
82976         * doc/posix-functions/wcscoll.texi: Mention the new module.
82978 2011-02-06  Bruno Haible  <bruno@clisp.org>
82980         New module 'wcsncasecmp'.
82981         * modules/wcsncasecmp: New file.
82982         * lib/wchar.in.h (wcsncasecmp): New declaration.
82983         * lib/wcsncasecmp.c: New file.
82984         * lib/wcsncasecmp-impl.h: New file, from libutf8 with modifications.
82985         * m4/wcsncasecmp.m4: New file.
82986         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsncasecmp is declared.
82987         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSNCASECMP, HAVE_WCSNCASECMP.
82988         * modules/wchar (Makefile.am): Substitute GNULIB_WCSNCASECMP,
82989         HAVE_WCSNCASECMP.
82990         * tests/test-wchar-c++.cc: Test the declaration of wcsncasecmp.
82991         * doc/posix-functions/wcsncasecmp.texi: Mention the new module.
82993 2011-02-06  Bruno Haible  <bruno@clisp.org>
82995         New module 'wcscasecmp'.
82996         * modules/wcscasecmp: New file.
82997         * lib/wchar.in.h (wcscasecmp): New declaration.
82998         * lib/wcscasecmp.c: New file.
82999         * lib/wcscasecmp-impl.h: New file, from libutf8 with modifications.
83000         * m4/wcscasecmp.m4: New file.
83001         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcscasecmp is declared.
83002         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCASECMP, HAVE_WCSCASECMP.
83003         * modules/wchar (Makefile.am): Substitute GNULIB_WCSCASECMP,
83004         HAVE_WCSCASECMP.
83005         * tests/test-wchar-c++.cc: Test the declaration of wcscasecmp.
83006         * doc/posix-functions/wcscasecmp.texi: Mention the new module.
83008 2011-02-05  Bruno Haible  <bruno@clisp.org>
83010         New module 'wcsncmp'.
83011         * modules/wcsncmp: New file.
83012         * lib/wchar.in.h (wcsncmp): New declaration.
83013         * lib/wcsncmp.c: New file.
83014         * lib/wcsncmp-impl.h: New file, from libutf8 with modifications.
83015         * m4/wcsncmp.m4: New file.
83016         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsncmp is declared.
83017         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSNCMP, HAVE_WCSNCMP.
83018         * modules/wchar (Makefile.am): Substitute GNULIB_WCSNCMP, HAVE_WCSNCMP.
83019         * tests/test-wchar-c++.cc: Test the declaration of wcsncmp.
83020         * doc/posix-functions/wcsncmp.texi: Mention the new module.
83022 2011-02-05  Bruno Haible  <bruno@clisp.org>
83024         New module 'wcscmp'.
83025         * modules/wcscmp: New file.
83026         * lib/wchar.in.h (wcscmp): New declaration.
83027         * lib/wcscmp.c: New file.
83028         * lib/wcscmp-impl.h: New file, from libutf8 with modifications.
83029         * m4/wcscmp.m4: New file.
83030         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcscmp is declared.
83031         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCMP, HAVE_WCSCMP.
83032         * modules/wchar (Makefile.am): Substitute GNULIB_WCSCMP, HAVE_WCSCMP.
83033         * tests/test-wchar-c++.cc: Test the declaration of wcscmp.
83034         * doc/posix-functions/wcscmp.texi: Mention the new module.
83036 2011-02-05  Bruno Haible  <bruno@clisp.org>
83038         New module 'wcsncat'.
83039         * modules/wcsncat: New file.
83040         * lib/wchar.in.h (wcsncat): New declaration.
83041         * lib/wcsncat.c: New file.
83042         * lib/wcsncat-impl.h: New file, from libutf8 with modifications.
83043         * m4/wcsncat.m4: New file.
83044         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsncat is declared.
83045         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSNCAT, HAVE_WCSNCAT.
83046         * modules/wchar (Makefile.am): Substitute GNULIB_WCSNCAT, HAVE_WCSNCAT.
83047         * tests/test-wchar-c++.cc: Test the declaration of wcsncat.
83048         * doc/posix-functions/wcsncat.texi: Mention the new module.
83050 2011-02-05  Bruno Haible  <bruno@clisp.org>
83052         New module 'wcscat'.
83053         * modules/wcscat: New file.
83054         * lib/wchar.in.h (wcscat): New declaration.
83055         * lib/wcscat.c: New file.
83056         * lib/wcscat-impl.h: New file, from libutf8 with modifications.
83057         * m4/wcscat.m4: New file.
83058         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcscat is declared.
83059         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCAT, HAVE_WCSCAT.
83060         * modules/wchar (Makefile.am): Substitute GNULIB_WCSCAT, HAVE_WCSCAT.
83061         * tests/test-wchar-c++.cc: Test the declaration of wcscat.
83062         * doc/posix-functions/wcscat.texi: Mention the new module.
83064 2011-02-05  Bruno Haible  <bruno@clisp.org>
83066         New module 'wcpncpy'.
83067         * modules/wcpncpy: New file.
83068         * lib/wchar.in.h (wcpncpy): New declaration.
83069         * lib/wcpncpy.c: New file.
83070         * lib/wcpncpy-impl.h: New file, from libutf8 with modifications.
83071         * m4/wcpncpy.m4: New file.
83072         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcpncpy is declared.
83073         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCPNCPY, HAVE_WCPNCPY.
83074         * modules/wchar (Makefile.am): Substitute GNULIB_WCPNCPY, HAVE_WCPNCPY.
83075         * tests/test-wchar-c++.cc: Test the declaration of wcpncpy.
83076         * doc/posix-functions/wcpncpy.texi: Mention the new module.
83078 2011-02-05  Bruno Haible  <bruno@clisp.org>
83080         New module 'wcsncpy'.
83081         * modules/wcsncpy: New file.
83082         * lib/wchar.in.h (wcsncpy): New declaration.
83083         * lib/wcsncpy.c: New file.
83084         * lib/wcsncpy-impl.h: New file, from libutf8 with modifications.
83085         * m4/wcsncpy.m4: New file.
83086         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsncpy is declared.
83087         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSNCPY, HAVE_WCSNCPY.
83088         * modules/wchar (Makefile.am): Substitute GNULIB_WCSNCPY, HAVE_WCSNCPY.
83089         * tests/test-wchar-c++.cc: Test the declaration of wcsncpy.
83090         * doc/posix-functions/wcsncpy.texi: Mention the new module.
83092 2011-02-05  Bruno Haible  <bruno@clisp.org>
83094         New module 'wcpcpy'.
83095         * modules/wcpcpy: New file.
83096         * lib/wchar.in.h (wcpcpy): New declaration.
83097         * lib/wcpcpy.c: New file.
83098         * lib/wcpcpy-impl.h: New file, from libutf8 with modifications.
83099         * m4/wcpcpy.m4: New file.
83100         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcpcpy is declared.
83101         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCPCPY, HAVE_WCPCPY.
83102         * modules/wchar (Makefile.am): Substitute GNULIB_WCPCPY, HAVE_WCPCPY.
83103         * tests/test-wchar-c++.cc: Test the declaration of wcpcpy.
83104         * doc/posix-functions/wcpcpy.texi: Mention the new module.
83106 2011-02-05  Bruno Haible  <bruno@clisp.org>
83108         New module 'wcscpy'.
83109         * modules/wcscpy: New file.
83110         * lib/wchar.in.h (wcscpy): New declaration.
83111         * lib/wcscpy.c: New file.
83112         * lib/wcscpy-impl.h: New file, from libutf8 with modifications.
83113         * m4/wcscpy.m4: New file.
83114         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcscpy is declared.
83115         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCPY, HAVE_WCSCPY.
83116         * modules/wchar (Makefile.am): Substitute GNULIB_WCSCPY, HAVE_WCSCPY.
83117         * tests/test-wchar-c++.cc: Test the declaration of wcscpy.
83118         * doc/posix-functions/wcscpy.texi: Mention the new module.
83120 2011-02-05  Bruno Haible  <bruno@clisp.org>
83122         New module 'wcsnlen'.
83123         * modules/wcsnlen: New file.
83124         * lib/wchar.in.h (wcsnlen): New declaration.
83125         * lib/wcsnlen.c: New file.
83126         * lib/wcsnlen-impl.h: New file, from libutf8 with modifications.
83127         * m4/wcsnlen.m4: New file.
83128         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsnlen is declared.
83129         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSNLEN, HAVE_WCSNLEN.
83130         * modules/wchar (Makefile.am): Substitute GNULIB_WCSNLEN, HAVE_WCSNLEN.
83131         * tests/test-wchar-c++.cc: Test the declaration of wcsnlen.
83132         * doc/posix-functions/wcsnlen.texi: Mention the new module.
83134 2011-02-05  Bruno Haible  <bruno@clisp.org>
83136         New module 'wcslen'.
83137         * modules/wcslen: New file.
83138         * lib/wchar.in.h (wcslen): New declaration.
83139         * lib/wcslen.c: New file.
83140         * lib/wcslen-impl.h: New file, from libutf8 with modifications.
83141         * m4/wcslen.m4: New file.
83142         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcslen is declared.
83143         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSLEN, HAVE_WCSLEN.
83144         * modules/wchar (Makefile.am): Substitute GNULIB_WCSLEN, HAVE_WCSLEN.
83145         * tests/test-wchar-c++.cc: Test the declaration of wcslen.
83146         * doc/posix-functions/wcslen.texi: Mention the new module.
83148 2011-02-05  Bruno Haible  <bruno@clisp.org>
83150         New module 'wmemset'.
83151         * modules/wmemset: New file.
83152         * lib/wchar.in.h (wmemset): New declaration.
83153         * lib/wmemset.c: New file.
83154         * lib/wmemset-impl.h: New file, from libutf8 with modifications.
83155         * m4/wmemset.m4: New file.
83156         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmemset is declared.
83157         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMSET, HAVE_WMEMSET.
83158         * modules/wchar (Makefile.am): Substitute GNULIB_WMEMSET, HAVE_WMEMSET.
83159         * tests/test-wchar-c++.cc: Test the declaration of wmemset.
83160         * doc/posix-functions/wmemset.texi: Mention the new module.
83162 2011-02-05  Bruno Haible  <bruno@clisp.org>
83164         New module 'wmemmove'.
83165         * modules/wmemmove: New file.
83166         * lib/wchar.in.h (wmemmove): New declaration.
83167         * lib/wmemmove.c: New file.
83168         * lib/wmemmove-impl.h: New file, from libutf8 with modifications.
83169         * m4/wmemmove.m4: New file.
83170         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmemmove is declared.
83171         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMMOVE, HAVE_WMEMMOVE.
83172         * modules/wchar (Makefile.am): Substitute GNULIB_WMEMMOVE,
83173         HAVE_WMEMMOVE.
83174         * tests/test-wchar-c++.cc: Test the declaration of wmemmove.
83175         * doc/posix-functions/wmemmove.texi: Mention the new module.
83177 2011-02-05  Bruno Haible  <bruno@clisp.org>
83179         New module 'wmemcpy'.
83180         * modules/wmemcpy: New file.
83181         * lib/wchar.in.h (wmemcpy): New declaration.
83182         * lib/wmemcpy.c: New file.
83183         * lib/wmemcpy-impl.h: New file, from libutf8 with modifications.
83184         * m4/wmemcpy.m4: New file.
83185         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmemcpy is declared.
83186         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMCPY, HAVE_WMEMCPY.
83187         * modules/wchar (Makefile.am): Substitute GNULIB_WMEMCPY, HAVE_WMEMCPY.
83188         * tests/test-wchar-c++.cc: Test the declaration of wmemcpy.
83189         * doc/posix-functions/wmemcpy.texi: Mention the new module.
83191 2011-02-05  Bruno Haible  <bruno@clisp.org>
83193         New module 'wmemcmp'.
83194         * modules/wmemcmp: New file.
83195         * lib/wchar.in.h (wmemcmp): New declaration.
83196         * lib/wmemcmp.c: New file.
83197         * lib/wmemcmp-impl.h: New file, from libutf8 with modifications.
83198         * m4/wmemcmp.m4: New file.
83199         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmemcmp is declared.
83200         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMCMP, HAVE_WMEMCMP.
83201         * modules/wchar (Makefile.am): Substitute GNULIB_WMEMCMP, HAVE_WMEMCMP.
83202         * tests/test-wchar-c++.cc: Test the declaration of wmemcmp.
83203         * doc/posix-functions/wmemcmp.texi: Mention the new module.
83205 2011-02-07  Jim Meyering  <meyering@redhat.com>
83207         di-set, ino-map: new modules, from coreutils
83208         * lib/di-set.c: New file.
83209         * lib/di-set.h: Likewise.
83210         * lib/ino-map.c: Likewise.
83211         * lib/ino-map.h: Likewise.
83212         * modules/di-set: Likewise.
83213         * modules/di-set-tests: Likewise.
83214         * modules/ino-map: Likewise.
83215         * modules/ino-map-tests: Likewise.
83216         * tests/test-di-set.c: Likewise.
83217         * tests/test-ino-map.c: Likewise.
83219 2011-02-06  Paul Eggert  <eggert@cs.ucla.edu>
83221         getloadavg: merge minor changes from Emacs
83223         * lib/getloadavg.c (getloadavg_initialized): More-accurate comment.
83224         (getloadavg): Use memset, not bzero.
83226         2008-07-25  Chong Yidong  <cyd@stupidchicken.com>
83227         * lib/getloadavg.c (nl): Rename to name_list to avoid ncurses.h
83228         clash (bug#86).
83230 2010-11-14  Bruno Haible  <bruno@clisp.org>
83232         Allow multiple gnulib generated replacements to coexist.
83233         * lib/getopt.in.h (struct option): Avoid identical redefinition.
83234         * lib/inttypes.in.h (imaxdiv_t): Likewise.
83235         * lib/langinfo.in.h (nl_item): Likewise.
83236         * lib/math.in.h (_NaN, NAN): Likewise.
83237         * lib/netdb.in.h (struct addrinfo): Likewise.
83238         * lib/poll.in.h (struct pollfd, nfds_t): Likewise.
83239         * lib/pthread.in.h (pthread_t, pthread_attr_t, pthread_barrier_t,
83240         pthread_barrierattr_t, pthread_cond_t, pthread_condattr_t,
83241         pthread_key_t, pthread_mutex_t, pthread_mutexattr_t, pthread_once_t,
83242         pthread_rwlock_t, pthread_rwlockattr_t, pthread_cond_destroy,
83243         pthread_cond_init, pthread_cond_signal, pthread_cond_wait,
83244         pthread_create, pthread_exit, pthread_join, pthread_mutexattr_destroy,
83245         pthread_mutexattr_init, pthread_mutexattr_settype,
83246         pthread_mutex_destroy, pthread_mutex_init, pthread_mutex_lock,
83247         pthread_mutex_trylock, pthread_mutex_unlock, pthread_spinlock_t,
83248         pthread_spin_init, pthread_spin_destroy, pthread_spin_lock,
83249         pthread_spin_trylock, pthread_spin_unlock): Likewise.
83250         * lib/sched.in.h (struct sched_param): Likewise.
83251         * lib/se-selinux.in.h (security_class_t, security_context_t,
83252         is_selinux_enabled, getcon, freecon, getfscreatecon, setfscreatecon,
83253         matchpathcon, getfilecon, lgetfilecon, fgetfilecon, setfilecon,
83254         lsetfilecon, fsetfilecon, security_check_context,
83255         security_check_context_raw, setexeccon, matchpathcon_init_prefix):
83256         Likewise.
83257         * lib/search.in.h (VISIT, _gl_search_compar_fn, _gl_search_action_fn):
83258         Likewise.
83259         * lib/signal.in.h (sig_atomic_t, sigset_t, verify_NSIG_constraint,
83260         _gl_function_taking_int_returning_void_t, union sigval,
83261         struct siginfo_t, siginfo_t, struct sigaction): Likewise.
83262         * lib/spawn.in.h (posix_spawnattr_t, posix_spawn_file_actions_t,
83263         verify_POSIX_SPAWN_USEVFORK_no_overlap): Likewise.
83264         * lib/stdint.in.h (gl_int8_t, gl_uint8_t, gl_int16_t, gl_uint16_t,
83265         gl_int32_t, gl_uint32_t, gl_int64_t, gl_uint64_t, int_least8_t,
83266         uint_least8_t, int_least16_t, uint_least16_t, int_least32_t,
83267         uint_least32_t, int_least64_t, uint_least64_t, gl_int_fast8_t,
83268         gl_uint_fast8_t, gl_int_fast16_t, gl_uint_fast16_t, gl_int_fast32_t,
83269         gl_uint_fast32_t, int_fast64_t, uint_fast64_t, gl_intptr_t,
83270         gl_uintptr_t, intmax_t, uintmax_t, _verify_intmax_size): Likewise.
83271         * lib/stdio.in.h (rpl_fseek, rpl_ftell): Likewise.
83272         * lib/sys_socket.in.h (sa_family_t, struct sockaddr_storage,
83273         socklen_t, rpl_fd_isset): Likewise.
83274         * lib/sys_stat.in.h (rpl_mkdir): Likewise.
83275         * lib/sys_time.in.h (struct timeval): Likewise.
83276         * lib/sys_times.in.h (struct tms): Likewise.
83277         * lib/sys_utsname.in.h (struct utsname):
83278         * lib/time.in.h (struct timespec, __time_t_must_be_integral): Likewise.
83279         * lib/unistd.in.h (getpagesize): Likewise.
83280         * lib/wchar.in.h (mbstate_t): Likewise.
83281         * lib/wctype.in.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
83282         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit,
83283         towlower, towupper): Likewise.
83284         Reported by Sam Steingold <sds@gnu.org>.
83286 2011-02-05  Eric Blake  <eblake@redhat.com>
83288         unsetenv: work around Haiku issues
83289         * m4/setenv.m4 (gl_FUNC_UNSETENV): Also detect Haiku issue.
83290         * doc/posix-functions/unsetenv.texi (unsetenv): Document it.
83292 2010-12-30  Bruce Korb  <bkorb@gnu.org>
83294         libposix: avoid calling error() within libposix
83295         * lib/openat-die.c: remove error module stuff when GNULIB_LIBPOSIX
83296         is defined.
83298 2011-02-05  Eric Blake  <eblake@redhat.com>
83300         strerror_r-posix: port to cygwin
83301         * lib/strerror_r.c (strerror_r) [__CYGWIN__]: Add cygwin
83302         implementation.
83303         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Adjust comment.
83304         * tests/test-strerror_r.c (main): Fix test.
83305         * doc/posix-functions/strerror_r.texi (strerror_r): Document the
83306         issue.
83308 2011-02-05  Bruno Haible  <bruno@clisp.org>
83310         New module 'wmemchr'.
83311         * modules/wmemchr: New file.
83312         * lib/wchar.in.h (wmemchr): New declaration.
83313         * lib/wmemchr.c: New file.
83314         * lib/wmemchr-impl.h: New file, from libutf8 with modifications.
83315         * m4/wmemchr.m4: New file.
83316         * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wmemchr is declared.
83317         (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WMEMCHR, HAVE_WMEMCHR.
83318         * modules/wchar (Makefile.am): Substitute GNULIB_WMEMCHR, HAVE_WMEMCHR.
83319         * tests/test-wchar-c++.cc: Test the declaration of wmemchr.
83320         * doc/posix-functions/wmemchr.texi: Mention the new module.
83322 2011-02-04  Eric Blake  <eblake@redhat.com>
83324         fdopendir: detect FreeBSD bug
83325         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Detect bug.
83326         * doc/posix-functions/fdopendir.texi (fdopendir): Document it.
83328 2011-02-04  Paul Eggert  <eggert@cs.ucla.edu>
83330         stdbool: do not define HAVE_STDBOOL_H
83331         * m4/stdbool.m4 (AC_CHECK_HEADER_STDBOOL): Renamed from
83332         AC_HEADER_STDBOOL.  All uses changed.  Do not define
83333         HAVE_STDBOOL_H, as gnulib does not need this.  This change is
83334         imported from the latest Autoconf git.  It was motivated by Emacs,
83335         which uses gnulib but does not need HAVE_STDBOOL_H.
83337 2011-02-04  Bruno Haible  <bruno@clisp.org>
83339         wcsnrtombs: Prepare for new module wwcsnrtombs.
83340         * lib/wcsnrtombs-impl.h: New file, extracted from lib/wcsnrtombs.c.
83341         * lib/wcsnrtombs.c: Include it.
83342         * modules/wcsnrtombs (Files): Add lib/wcsnrtombs-impl.h.
83344         wcsrtombs: Prepare for new module wwcsrtombs.
83345         * lib/wcsrtombs-impl.h: New file, extracted from lib/wcsrtombs.c.
83346         * lib/wcsrtombs.c: Include it.
83347         * modules/wcsrtombs (Files): Add lib/wcsrtombs-impl.h.
83349         mbsnrtowcs: Prepare for new module mbsnrtowwcs.
83350         * lib/mbsnrtowcs-impl.h: New file, extracted from lib/mbsnrtowcs.c.
83351         * lib/mbsnrtowcs.c: Include it.
83352         * modules/mbsnrtowcs (Files): Add lib/mbsnrtowcs-impl.h.
83354         mbsrtowcs: Prepare for new module mbsrtowwcs.
83355         * lib/mbsrtowcs-impl.h: New file, extracted from lib/mbsrtowcs.c.
83356         * lib/mbsrtowcs.c: Include it.
83357         * modules/mbsrtowcs (Files): Add lib/mbsrtowcs-impl.h.
83359 2011-02-04  Bruno Haible  <bruno@clisp.org>
83361         vasnprintf: Reduce use of malloc for small format strings.
83362         * lib/printf-args.h (N_DIRECT_ALLOC_ARGUMENTS): New macro.
83363         (arguments): Add room for the first 7 arguments.
83364         * lib/printf-parse.h (N_DIRECT_ALLOC_DIRECTIVES): New macro.
83365         (char_directives, u8_directives, u16_directives, u32_directives): Add
83366         room for the first 7 directives.
83367         * lib/printf-parse.c: Include <string.h>.
83368         (PRINTF_PARSE): Change memory handling code so that it uses the first
83369         7 preallocated elements in an 'arguments' or 'DIRECTIVES' struct.
83370         * lib/vasnprintf.c (VASNPRINTF): Update memory handling code.
83371         Reported by Pádraig Brady <P@draigbrady.com>.
83373 2011-01-31  Eric Blake  <eblake@redhat.com>
83375         dup2: work around Haiku bug
83376         * m4/dup2.m4 (gl_FUNC_DUP2): Test for bug.
83377         * lib/dup2.c (rpl_dup2) [!WIN32]: Add workaround.
83378         * doc/posix-functions/dup2.texi (dup2): Document the bug.
83379         * tests/test-dup2.c (main): Enhance test.
83381 2011-01-31  Simon Josefsson  <simon@josefsson.org>
83383         doc: off_t is not available in eglibc 2.11.2 stdio.h.
83384         * doc/posix-headers/stdio.texi (stdio.h): Mention that off_t isn't
83385         declared by eglibc 2.11.2.
83386         * lib/stdio.in.h: Likewise.
83388 2011-01-31  Eric Blake  <eblake@redhat.com>
83390         ignore-value: add missing test dependency
83391         * tests/test-ignore-value.c: Revert previous change; stdio.h
83392         provides off_t.
83393         * modules/ignore-value-tests (Depends-on): Add missing dependency.
83395 2011-01-30  Paul Eggert  <eggert@cs.ucla.edu>
83397         mktime: clarify long_int width checking
83398         * lib/mktime.c (long_int_is_wide_enough): Move this assertion to
83399         the top level, to make it clearer that the assumption about
83400         long_int width is being checked.  See
83401         <http://lists.gnu.org/r/bug-gnulib/2011-01/msg00554.html>.
83403 2011-01-30  Simon Josefsson  <simon@josefsson.org>
83405         ignore-value: Fix self-test.
83406         * tests/test-ignore-value.c: Include sys/types.h for off_t.
83408 2011-01-29  Paul Eggert  <eggert@cs.ucla.edu>
83410         TYPE_MAXIMUM: avoid theoretically undefined behavior
83411         * lib/intprops.h (TYPE_MINIMUM, TYPE_MAXIMUM): Do not shift a
83412         negative number, which the C Standard says has undefined behavior.
83413         In practice this is not a problem, but might as well do it by the book.
83414         Reported by Rich Felker and Eric Blake; see
83415         <http://lists.gnu.org/r/bug-gnulib/2011-01/msg00493.html>.
83416         * lib/strtol.c (TYPE_MINIMUM, TYPE_MAXIMUM): Likewise.
83417         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
83418         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
83419         * m4/parse-datetime.m4 (gl_PARSE_DATETIME): Likewise.
83420         * m4/stdint.m4 (gl_STDINT_H): Likewise.
83421         * lib/mktime.c (TYPE_MAXIMUM): Redo slightly to match the others.
83423         mktime: #undef mktime before #defining it
83424         * lib/mktime.c (mktime) [DEBUG]: #undef mktime before #defining it.
83426         mktime: systematically normalize tm_isdst comparisons
83427         * lib/mktime.c (isdst_differ): New function.
83428         (__mktime_internal): Use it systematically for all isdst comparisons.
83429         This completes the fix for libc BZ #6723, and removes the need for
83430         normalizing tm_isdst.  See
83431         <http://sourceware.org/bugzilla/show_bug.cgi?id=6723>
83432         (not_equal_tm) [DEBUG]: Use isdst_differ here, too.
83434         mktime: fix some integer overflow issues and sidestep the rest
83436         This was prompted by a bug report by Benjamin Lindner for MinGW
83437         <http://lists.gnu.org/r/bug-gnulib/2011-01/msg00472.html>.
83438         His bug is due to signed integer overflow (0 - INT_MIN), and I
83439         I scanned through mktime.c looking for other integer overflow
83440         problems, fixing all the bugs I found.
83442         Although the C Standard says the resulting code is still not safe
83443         in the presence of integer overflow, in practice it should be good
83444         enough for all real-world two's-complement implementations, except
83445         for debugging environments that deliberately trap on integer
83446         overflow (e.g., gcc -ftrapv).
83448         * lib/mktime.c (WRAPV): New macro.
83449         (SHR): Also check that long_int and time_t shift right in the
83450         usual way, before using the fast-but-unportable method.
83451         (TYPE_ONES_COMPLEMENT, TYPE_SIGNED_MAGNITUDE): Remove, no longer
83452         used.  The code already assumed two's complement, so there's
83453         no need to test for alternatives.  All uses removed.
83454         (TYPE_MAXIMUM): Don't rely here on overflow behavior not defined by
83455         the C standard.  Problem reported by Rich Felker in
83456         <http://lists.gnu.org/r/bug-gnulib/2011-01/msg00488.html>.
83457         (twos_complement_arithmetic): Also check long_int and time_t.
83458         (time_t_avg, time_t_add_ok, time_t_int_add_ok): New functions.
83459         (guess_time_tm, ranged_convert, __mktime_internal): Use them.
83460         (__mktime_internal): Avoid integer overflow with unary subtraction
83461         in two instances where -1 - X is an adequate replacement for -X,
83462         since the calculations are approximate.
83464 2011-01-29  Eric Blake  <eblake@redhat.com>
83466         mktime: avoid infinite loop
83467         * m4/mktime.m4 (AC_FUNC_MKTIME): Avoid overflow on possibly-signed
83468         type; behavior is still undefined but portable to all known targets.
83469         Reported by Rich Felker.
83471 2011-01-29  Simon Josefsson  <simon@josefsson.org>
83473         rename, unlink, same-inode: Relicense.
83474         * modules/rename (License): Relax from LGPLv3+ to LGPLv2+.
83475         * modules/unlink (License): Likewise.
83476         * modules/same-inode (License): Likewise.
83478 2011-01-28  Paul Eggert  <eggert@cs.ucla.edu>
83480         mktime: avoid problems on NetBSD 5 / i386
83481         * lib/mktime.c (long_int): New type.  This works around a problem
83482         on NetBSD 5 / i386, where 'long int' and 'int' are both 32 bits
83483         but time_t is 64 bits, and where I expect the existing code is
83484         wrong in some cases.
83485         (leapyear, ydhms_diff, guess_time_tm, __mktime_internal): Use it.
83486         (ydhms_diff): Bring back the compile-time check for wide-enough
83487         year and yday.
83489         mktime: fix misspelling in comment
83490         * lib/mktime.c (__mktime_internal): Fix misspelling in comment.
83491         This merges all recent glibc changes of importance.
83493 2011-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
83495         move-if-change: cope with concurrent mv of identical file.
83496         * build-aux/move-if-change (CMPPROG): Accept environment
83497         variable as an override for `cmp'.
83498         (usage): Document CMPPROG.
83499         Adjust comparison to drop stdout.  Cope with failure of mv if
83500         the target file exists and is identical to the source, for
83501         parallel builds.
83502         Report from H.J. Lu against binutils in PR binutils/12283.
83504 2011-01-28  Bruce Korb  <bkorb@gnu.org>
83506         * users.txt: Mention sharutils.
83508 2011-01-28  Simon Josefsson  <simon@josefsson.org>
83510         * users.txt: Mention OATH Toolkit.
83512 2011-01-27  Bruno Haible  <bruno@clisp.org>
83514         Prepare for supporting FreeBSD 10.
83515         * build-aux/config.libpath: Remove handling of freebsd1*.
83517 2011-01-27  Gerald Pfeifer  <gerald@pfeifer.com>  (tiny change)
83519         Prepare for supporting FreeBSD 10.
83520         * build-aux/config.rpath: Remove handling of freebsd1* which soon would
83521         match FreeBSD 10.0.
83523 2011-01-27  Bruno Haible  <bruno@clisp.org>
83525         vma-iter, get-rusage-as: Add OpenBSD support.
83526         * modules/vma-iter (configure.ac): Test for mquery.
83527         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define also on OpenBSD.
83528         * lib/vma-iter.c: Include <sys/mman.h>.
83529         (vma_iterate): Add an implementation based on mquery().
83530         * lib/resource-ext.h (get_rusage_as): Update comments.
83531         * lib/get-rusage-as.c: Likewise.
83532         * lib/get-rusage-data.c: Likewise.
83534 2011-01-26  Karl Berry  <karl@gnu.org>
83536         * doc/Makefile (lang_env, makeinfo_prog, manual_opts): new
83537         variables to make it easier to override the makeinfo program used.
83539 2011-01-26  Eric Blake  <eblake@redhat.com>
83541         fcntl: work around Haiku F_DUPFD bugs
83542         * m4/fcntl.m4 (gl_FUNC_FCNTL): Also catch Haiku errno bug.
83543         * lib/fcntl.c (rpl_fcntl) [F_DUPFD]: Work around Haiku losing
83544         cloexec bit on duplication.
83545         * doc/posix-functions/fcntl.texi (fcntl): Document the bug.
83547 2011-01-26  Bruno Haible  <bruno@clisp.org>
83549         Enable memory leak tests on AIX.
83550         * tests/test-dprintf-posix2.c (main): Don't skip the test on AIX.
83551         * tests/test-fprintf-posix3.c (main): Likewise.
83553 2011-01-26  Bruno Haible  <bruno@clisp.org>
83555         Tests for module 'get-rusage-data'.
83556         * modules/get-rusage-data-tests: New file.
83557         * tests/test-get-rusage-data.c: New file.
83559         New module 'get-rusage-data'.
83560         * lib/resource-ext.h (get_rusage_data): New declaration.
83561         * lib/get-rusage-data.c: New file.
83562         * modules/get-rusage-data: New file.
83564 2011-01-25  Bruno Haible  <bruno@clisp.org>
83566         get-rusage-as: Allow for easier testing.
83567         * lib/resource-ext.h (get_rusage_as): Add comment.
83568         * lib/get-rusage-as.c (get_rusage_as_via_setrlimit): Define always.
83569         (main): New function for interactive testing.
83571 2011-01-25  Bruno Haible  <bruno@clisp.org>
83573         vma-iter: Treat Haiku like BeOS.
83574         * lib/vma-iter.h (VMA_ITERATE_SUPPORTED): Define on Haiku as well.
83575         * lib/vma-iter.c (vma_iterate) [Haiku]: Use the BeOS API.
83577 2011-01-25  Eric Blake  <eblake@redhat.com>
83579         c-stack: fix regression on cygwin when libsigsegv is present
83580         * lib/c-stack.c (die): Don't flatten error if sigsegv is present.
83582 2011-01-24  Bruno Haible  <bruno@clisp.org>
83584         vma-iter: Avoid empty intervals.
83585         * lib/vma-iter.c (vma_iterate) [IRIX, OSF/1]: Don't call the callback
83586         on an empty interval.
83588 2011-01-24  Jim Meyering  <meyering@redhat.com>
83590         u64: remove unnecessary #include
83591         * lib/u64.h: Don't include <stddef.h>.  It was not used.
83593 2011-01-23  Paul Eggert  <eggert@cs.ucla.edu>
83595         Allow the user to avoid the HAVE_RAW_DECL_* macros.
83596         * m4/gnulib-common.m4 (gl_ASSERT_NO_GNULIB_POSIXCHECK): New macro.
83598 2011-01-23  Bruno Haible  <bruno@clisp.org>
83600         New module 'vma-iter'.
83601         * lib/vma-iter.h: New file.
83602         * lib/vma-iter.c: New file, based on lib/get-rusage-as.c.
83603         * modules/vma-iter: New file.
83604         * lib/get-rusage-as.c: Include vma-iter.h. Don't include system headers
83605         for get_rusage_as_via_iterator.
83606         (vma_iterate_callback): New function.
83607         (get_rusage_as_via_iterator): Rewritten to use vma_iterate.
83608         * modules/get-rusage-as (Depends-on): Add vma-iter.
83610 2011-01-23  Bruno Haible  <bruno@clisp.org>
83612         uninorm: Tweak includes.
83613         * lib/uninorm/normalize-internal.h: Don't include <stddef.h>.
83614         Reported by Jim Meyering.
83616 2011-01-23  Bruno Haible  <bruno@clisp.org>
83618         get-rusage-as: Improve on NetBSD.
83619         * lib/get-rusage-as.c (get_rusage_as_via_iterator): On NetBSD, use
83620         /proc, like on FreeBSD.
83622 2011-01-23  Jim Meyering  <meyering@redhat.com>
83624         xreadlink.h: remove unnecessary #include
83625         * lib/xreadlink.h: Don't include <stddef.h>.  It was not used.
83627         maint.mk: add syntax-check rule: detect unnecessary #include <stddef.h>
83628         * top/maint.mk (sc_prohibit_stddef_without_use): New rule.
83630 2011-01-23  Bruno Haible  <bruno@clisp.org>
83632         get-rusage-as: Fix bug.
83633         * lib/get-rusage-as.c (get_rusage_as_via_setrlimit): Restore the
83634         original limit when aborting the first loop.
83636 2011-01-23  Bruno Haible  <bruno@clisp.org>
83638         wctype: Ensure valid C syntax.
83639         * m4/wctype_h.m4 (gl_WCTYPE_H): Invoke gl_CHECK_NEXT_HEADERS
83640         unconditionally, instead of gl_NEXT_HEADERS conditionally.
83642 2011-01-21  Paul Eggert  <eggert@cs.ucla.edu>
83644         getopt: omit HAVE_OPTRESET, HAVE_GETOPT_CLIP from config.h
83645         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not put the
83646         symbols HAVE_OPTRESET and HAVE_GETOPT_CLIP into config.h,
83647         as they are needed only for configure's test case.
83648         This removes two unnecessary symbols from config.h.
83650         gl_CHECK_NEXT_HEADERS implies AC_CHECK_HEADERS_ONCE
83651         * m4/include_next.m4 (gl_CHECK_HEXT_HEADERS): Document this.
83652         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Don't bother to invoke
83653         AC_CHECK_HEADERS_ONCE on a header that we also invoke
83654         gl_CHECK_NEXT_HEADERS on, since the latter invokes the former.
83655         * m4/netdb_h.m4 (gl_HEADER_NETDB): Likewise.
83656         * m4/pthread.m4 (gl_PTHREAD_CHECK): Likewise.
83657         * m4/sched_h.m4 (gl_SCHED_H): Likewise.
83658         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
83659         * m4/spawn_h.m4 (gl_SPAWN_H): Likewise.
83660         * m4/sys_file_h.m4 (gl_HEADER_SYS_FILE_H): Likewise.
83661         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
83662         * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Likewise.
83663         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H): Likewise.
83664         * m4/termios_h.m4 (gl_TERMIOS_H): Likewise.
83665         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
83666         * m4/wchar_h.m4 (gl_WCHAR_H): Likewise.
83667         * m4/wctype_h.m4 (gl_WCTYPE_H): Likewise.
83669 2011-01-21  Eric Blake  <eblake@redhat.com>
83671         maintainer-makefile: work with older git for submodule check
83672         * top/maint.mk (public-submodule-commit): Rewrite to avoid
83673         merge-base --independent, which Ubuntu 10.04 git 1.7.0.4 lacks.
83674         Reported by Matthias Bolte.
83676         bootstrap: minor portability fixes
83677         * build-aux/bootstrap (me): Use $me instead of $0 in functions.
83678         (usage): Omit leading capital and trailing . on help phrases, per
83679         GNU Coding Standards.
83680         (check_versions, top level): Prefix messages with script name.
83682 2011-01-21  Benjamin Lindner  <bjmldn@gmail.com>  (tiny change)
83684         bootstrap: support --no-git option
83685         * build-aux/bootstrap: Add --no-git option, to be used when
83686         --gnulib-srcdir points to the exact desired checkout.
83688 2011-01-21  Eric Blake  <eblake@redhat.com>
83690         strerror_r-posix: work with glibc 2.13
83691         * lib/strerror_r.c (strerror_r): Fix return type.
83693 2011-01-21  Pádraig Brady  <P@draigBrady.com>
83694             Bruno Haible  <bruno@clisp.org>
83696         uN_strstr: New unit tests.
83697         * modules/unistr/u8-strstr-tests: New file.
83698         * modules/unistr/u16-strstr-tests: New file.
83699         * modules/unistr/u32-strstr-tests: New file.
83700         * tests/unistr/test-u-strstr.h: New file, based on tests/test-strstr.c.
83701         * tests/unistr/test-u8-strstr.c: New file.
83702         * tests/unistr/test-u16-strstr.c: New file.
83703         * tests/unistr/test-u32-strstr.c: New file.
83705 2011-01-21  Pádraig Brady  <P@draigBrady.com>
83706             Bruno Haible  <bruno@clisp.org>
83708         Make uN_strstr functions O(n) worst-case.
83709         * lib/unistr/u-strstr.h (FUNC): In the 8-bit case, use strstr. In the
83710         16-bit and 32-bit unit cases, use the unibyte algorithm from
83711         lib/mbsstr.c.
83712         * lib/unistr/u8-strstr.c: Include <string.h>.
83713         (UNIT_IS_UINT8_T): New macro.
83714         * lib/unistr/u16-strstr.c: Include malloca.h and str-kmp.h.
83715         (U_STRLEN, U_STRNLEN): New macros.
83716         * lib/unistr/u32-strstr.c: Include malloca.h and str-kmp.h.
83717         (U_STRLEN, U_STRNLEN): New macros.
83718         * modules/unistr/u8-strstr (Depends-on): Add strstr.
83719         (configure.ac): Update required libunistring version.
83720         * modules/unistr/u16-strstr (Files): Add lib/str-kmp.h.
83721         (Depends-on): Add unistr/u16-strlen, unistr/u16-strnlen, stdbool,
83722         malloca.
83723         (configure.ac): Update required libunistring version.
83724         * modules/unistr/u32-strstr (Files): Add lib/str-kmp.h.
83725         (Depends-on): Add unistr/u32-strlen, unistr/u32-strnlen, stdbool,
83726         malloca.
83727         (configure.ac): Update required libunistring version.
83729 2011-01-21  Pádraig Brady  <P@draigBrady.com>
83730             Bruno Haible  <bruno@clisp.org>
83732         Prepare for faster uN_strstr functions.
83733         * lib/str-kmp.h: Support definable UNITs.
83734         (knuth_morris_pratt): Renamed from knuth_morris_pratt_unibyte. Add
83735         needle_len argument.
83736         * lib/mbsstr.c (mbsstr): Adjust for the changed str-kmp.h.
83737         * lib/mbscasestr.c (mbscasestr): Likewise.
83739 2011-01-21  Pádraig Brady  <P@draigBrady.com>
83741         malloca-tests: make faster by unsetting MALLOC_PERTURB_
83742         * tests/test-malloca.c (main): Unset the environment variable
83743         to greatly speed up the test.
83744         * tests/init.sh: Don't say that MALLOC_PERTURB_ is cheap.
83745         * modules/malloca-tests: Depend on unsetenv.
83747 2011-01-21  Pádraig Brady  <P@draigBrady.com>
83749         ignore-value: remove stdint dependency
83750         * lib/ignore-value.h: Remove <stdint.h>
83751         * modules/ignore-value: Remove stdint dependency.
83753 2011-01-21  Jim Meyering  <meyering@redhat.com>
83755         maint.mk: adjust variable name to be consistent with other gl_ vars
83756         * top/maint.mk (gl_public_submodule_commit): Rename the variable
83757         to be lower case.
83759 2011-01-20  Jim Meyering  <meyering@redhat.com>
83761         maint.mk: make "check" depend on public-submodule-commit by default
83762         * top/maint.mk (GL_PUBLIC_SUBMODULE_COMMIT): New overridable variable.
83764 2011-01-20  Bruno Haible  <bruno@clisp.org>
83766         mbfile, mbiter: Complete change from 2008-12-21.
83767         * m4/mbfile.m4 (gl_MBFILE): Don't require AC_FUNC_MBRTOWC.
83768         * m4/mbiter.m4 (gl_MBITER): Likewise.
83770 2011-01-20  Jim Meyering  <meyering@redhat.com>
83772         init.sh: insert space between each function name and "()"
83773         * tests/init.sh: Make it a little easier to see that a function's
83774         name is "warn_", and not "warn" when looking at the first part of
83775         its definition: "warn_ ()".  Suggested by Ralf Wildenhues.
83777 2011-01-20  Jim Meyering  <meyering@redhat.com>
83779         mountlist: clean up code formatting
83780         * lib/mountlist.c (read_file_system_list): Split a long line,
83781         correct bracing style, use NULL in place of "(struct statfs *)0",
83782         don't parenthesize return value, add spaces around "=" and after
83783         ";-in-for-stmt".
83785 2011-01-14  Markus Duft  <mduft@gentoo.org>
83787         mountlist: add support for Interix
83788         * lib/mountlist.c (read_file_system_list) [MOUNTED_INTERIX_STATVFS]:
83789         Apply statvfs to all entries of /dev/fs.
83790         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for statvfs,
83791         and if found, AC_DEFINE MOUNTED_INTERIX_STATVFS.
83793 2011-01-20  Jim Meyering  <meyering@redhat.com>
83795         maint.mk: improve the public-submodule-commit rule
83796         * top/maint.mk (public-submodule-commit): Prefix with $(AM_V_GEN),
83797         to suppress printing of its commands... unless V=1.
83798         Add git submodule's --quiet option to suppress printing of e.g.,
83799         "Entering gnulib" output.
83800         "cd" into $(srcdir) before running git submodule.
83802 2011-01-20  Bruno Haible  <bruno@clisp.org>
83804         include_next: Fix bug introduced on 2011-01-18.
83805         * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): New macro, extracted
83806         from gl_CHECK_NEXT_HEADERS and gl_NEXT_HEADERS. Omit test of
83807         ac_cv_header_... variable if the second argument is not 'check'.
83808         (gl_CHECK_NEXT_HEADERS, gl_NEXT_HEADERS): Invoke
83809         gl_NEXT_HEADERS_INTERNAL.
83811 2011-01-20  Bruno Haible  <bruno@clisp.org>
83813         Allow the user to avoid the GNULIB_TEST_* macros.
83814         * m4/gnulib-common.m4 (gl_ASSERT_NO_GNULIB_TESTS): New macro.
83815         Suggested by Paul Eggert.
83817 2011-01-14  Jim Meyering  <meyering@redhat.com>
83819         bootstrap: avoid failure when there is no .gitmodules file
83820         ": ${gnulib_path=gnulib}" fails to set $gnulib_path when that variable
83821         has been assigned to, even when its value is the empty string.
83822         * build-aux/bootstrap (gnulib_path): Test explicitly for an empty
83823         "$gnulib_path", rather than using ${gnulib_path=gnulib}.
83824         Reported by John W. Eaton <jwe@gnu.org>.
83826 2011-01-19  Paul Eggert  <eggert@cs.ucla.edu>
83828         assume <ctype.h>, ..., <time.h> exist
83829         For years gnulib has been assuming the existence of the headers
83830         <ctype.h>, <errno.h>, <fcntl.h>, <locale.h>, <signal.h>,
83831         <stdio.h>, <stdlib.h>, <string.h>, and <time.h>.  Omit checks for
83832         them, since they don't appear to be needed.
83833         * README (Portability guidelines): Document this.
83834         * lib/flock.c: Assume <fcntl.h> exists.
83835         * lib/regex_internal.h: Assume <locale.h> exists.
83836         * m4/ctype.m4 (gl_CTYPE_H): Assume <ctype.h> exists.
83837         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Assume <errno.h> exists.
83838         * m4/fcntl_h.m4 (gl_FCNTL_H): Assume <fcntl.h> exists.
83839         * m4/flock.m4 (gl_PREREQ_FLOCK): Likewise.
83840         * m4/locale_h.m4 (gl_LOCALE_H): Assume <locale.h> exists.
83841         * m4/regex.m4 (gl_REGEX): Likewise.
83842         * m4/signal_h.m4 (gl_SIGNAL_H): Assume <signal.h> exists.
83843         * m4/stdio_h.m4 (gl_STDIO_H): Assume <stdio.h> exists.
83844         * m4/stdlib_h.m4 (gl_STDLIB_H): Assume <stdlib.h> exists.
83845         * m4/string_h.m4 (gl_STRING_H): Assume <string.h> exists.
83846         * tests/test-argp.c: Likewise.
83847         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Assume <time.h> exists.
83849         multiarch: remove AA_APPLE_UNIVERSAL_BUILD
83850         * m4/multiarch.m4 (gl_MULTIARCH): Don't AC_DEFINE
83851         AA_APPLE_UNIVERSAL_BUILD.  See
83852         <http://lists.gnu.org/r/bug-gnulib/2011-01/msg00247.html>.
83853         * NEWS: Document this.
83855 2011-01-19  Eric Blake  <eblake@redhat.com>
83857         c-stack: assume stack overflow if SA_SIGINFO unsupported
83858         * lib/c-stack.c (SIGACTION_WORKS): Rename...
83859         (SIGINFO_WORKS): ...since gnulib module guarantees that (most) of
83860         sigaction will work.
83861         (die): Assume stack overflow if siginfo doesn't work, to let Haiku
83862         behavior match Linux.
83863         * tests/test-c-stack.c (main): Prefer NULL for pointers.
83865         stdbool-tests: accommodate Haiku
83866         * tests/test-stdbool.c: Haiku's gcc 2.95 lacks native _Bool.
83868         binary-io: fix O_TEXT on Haiku
83869         * modules/binary-io (Depends-on): Add fcntl-h.
83870         * lib/binary-io.h (O_TEXT): Rely on replacement <fcntl.h> rather
83871         than blindly undefining O_TEXT.
83872         Reported by Scott McCreary.
83874 2011-01-18  Paul Eggert  <eggert@cs.ucla.edu>
83876         include_next: do not check for standard headers like stddef.h
83878         I found this problem when modifying Emacs to use gnulib.
83879         I noticed that it added HAVE_STDDEF_H to config.h, even though
83880         gnulib always assumes <stddef.h> exists as per README and this
83881         symbol is unnecessary.
83882         * m4/include_next.m4 (gl_NEXT_HEADERS): New macro, which does not
83883         use AC_CHECK_HEADERS_ONCE, but which otherwise contains what
83884         gl_CHECK_NEXT_HEADERS used to contain.  This makes 'configure' run
83885         faster for headers like stddef.h that are known to exist.
83886         (gl_CHECK_NEXT_HEADERS): Use it.
83887         * m4/float_h.m4 (gl_FLOAT_H): For float.h, use gl_NEXT_HEADERS
83888         rather than gl_CHECK_NEXT_HEADERS.
83889         * m4/stdarg.m4 (gl_STDARG_H): Likewise, for stdarg.h.
83890         * m4/stddef_h.m4 (gl_STDDEF_H): Likewise, for stddef.h.
83892 2011-01-18  Eric Blake  <eblake@redhat.com>
83894         ansi-c++-opt: skip C++ dependency style if C++ is unused
83895         * m4/ansi-c++.m4 (gl_PROG_ANSI_CXX): Avoid full-blown dependency
83896         tests when we know C++ compilation is not desired.
83897         Reported by Scott McCreary.
83899 2011-01-18  Bruno Haible  <bruno@clisp.org>
83901         *printf-posix: Avoid test failures. Make tests work on MacOS X, Cygwin.
83902         * tests/test-fprintf-posix3.c: Include "resource-ext.h".
83903         (main): Perform test also when getrlimit and setrlimit don't exist or
83904         when setrlimit of RLIMIT_DATA fails (like on Cygwin). Instead of
83905         limiting the address space size using setrlimit, compare the address
83906         space size before and after the test.
83907         * tests/test-dprintf-posix2.c: Likewise.
83908         * tests/test-fprintf-posix3.sh: Update skip messages.
83909         * tests/test-dprintf-posix2.sh: Likewise.
83910         * modules/fprintf-posix-tests (Depends-on): Add get-rusage-as.
83911         * modules/dprintf-posix-tests (Depends-on): Likewise.
83912         Reported by Bruce Korb <bkorb@gnu.org> and
83913         Gary V. Vaughan <gary@gnu.org>.
83915 2011-01-18  Bruno Haible  <bruno@clisp.org>
83917         get-rusage-as: Improvement for Cygwin.
83918         * lib/get-rusage-as.c (get_rusage_as_via_iterator): On Windows, ignore
83919         areas that are merely reserved.
83921 2011-01-18  Paul Eggert  <eggert@cs.ucla.edu>
83923         strftime: remove dependencies on multibyte modules
83925         strftime depended on mbrlen, mbsinit, and wchar, but these modules
83926         are needed only if ! MULTIBYTE_IS_FORMAT_SAFE, and that is true
83927         only if __osf__ is defined, and I suspect OSF doesn't need these
83928         other modules.  If my guess is wrong, we'll need to come up with a
83929         variant of strftime that doesn't need the multibyte modules.
83931         I discovered this problem when attempting modify Emacs to use the
83932         strftime module.  With the previous gnulib, this caused Emacs to
83933         need 31 new files, ranging from lib/config.charset to
83934         m4/wint_t.m4.  This was overkill and I expect would be offputting
83935         to the Emacs maintainers.  After this change, only 6 new files are
83936         needed, namely strftime.[ch], srtftime.m4, stdbool.in.h,
83937         stdbool.m4, and tm_gmtoff.m4.
83939         * lib/strftime.c (MULTIBYTE_IS_FORMAT_SAFE): Define to 1 always.
83940         Suggested by Bruno Haible in
83941         <http://lists.gnu.org/r/bug-gnulib/2011-01/msg00238.html>.
83942         * m4/strftime.m4 (gl_FUNC_STRFTIME): Do not require AC_TYPE_MBSTATE_T,
83943         and do not check for wchar.h.
83944         * modules/strftime (Files): Remove m4/mbstate_t.m4.
83945         (Depends-on): Remove mbrlen, mbsinit, wchar.
83947 2011-01-18  Bruno Haible  <bruno@clisp.org>
83949         Tests for module 'get-rusage-as'.
83950         * modules/get-rusage-as-tests: New file.
83951         * tests/test-get-rusage-as.c: New file.
83953         New module 'get-rusage-as'.
83954         * modules/get-rusage-as: New file.
83955         * lib/resource-ext.h: New file.
83956         * lib/get-rusage-as.c: New file.
83958 2011-01-17  Eric Blake  <eblake@redhat.com>
83960         sigaction: relax license from LGPLv3+ to LGPLv2+
83961         * modules/sigaction (License): Relax to LGPLv2+.
83963 2011-01-14  Bruno Haible  <bruno@clisp.org>
83965         filemode: Make function declarations usable in C++ mode.
83966         * lib/filemode.h: Enclose function declarations in extern "C" block.
83967         Reported by John W. Eaton <jwe@gnu.org>.
83969 2011-01-12  Rob Vermaas  <rob.vermaas@gmail.com>
83971         save-cwd: no longer include "xgetcwd.h"
83972         * lib/save-cwd.c: Don't include "xgetcwd.h"; it's no longer used.
83973         This avoids a compilation failure in projects that use save-cwd
83974         without also using the xgetcwd module.
83976 2011-01-11  Paul Eggert  <eggert@cs.ucla.edu>
83978         ftoastr: split into 3 modules ftoastr, dtoastr, ldtoastr
83979         This is so that a program like Emacs, which needs only dtoastr,
83980         does not have to bother with distributing and compiling ftoastr
83981         and ldtoastr.
83982         * MODULES.html.sh: Document these modules (ftoastr wasn't documented).
83983         * modules/dtoastr, modules/ldtoastr: New files.
83984         * modules/ftoastr: Now works just for 'float'.
83985         (Files): Remove lib/dtoastr.c, lib/ldtoastr.c.
83986         (Makefile.am): Remove ftoastr.h (not needed and no effect),
83987         dtoastr.c, ldtoastr.c.
83989 2011-01-11  Jim Meyering  <meyering@redhat.com>
83991         save-cwd: remove #if-!HAVE_FCHDIR'd code; use the fchdir module
83992         There is no need to work around the lack of the fchdir function,
83993         since gnulib can now provide a replacement when required.
83994         * lib/save-cwd.c: Remove #if !HAVE_FCHDIR...#endif code.
83995         * modules/save-cwd (Depends-on): Add fchdir.
83997 2011-01-11  Paul Eggert  <eggert@cs.ucla.edu>
83999         openat, save-cwd: avoid xmalloc
84001         This removes a direct (but undocumented) dependency of openat on
84002         xalloc, along with an indirect dependency via save-cwd.  It also
84003         removes a dependency of save-cwd on xgetcwd, and thereby
84004         indirectly on xalloc.  This change causes the openat substitute
84005         to fall back on save_cwd when memory is tight, and for save_cwd to
84006         fail instead of dying when memory is tight, but that's good enough.
84007         Problem and initial idea for fix reported by Bastien Roucaries in
84008         <http://lists.gnu.org/r/bug-gnulib/2011-01/msg00170.html>.
84010         * lib/openat-proc.c: Include stdlib.h (for malloc), not
84011         xalloc.h (for xmalloc).
84012         (openat_proc_name): Use malloc, not xmalloc.
84013         * lib/save-cwd.c (save_cwd): Use getcwd, not xgetcwd.
84014         * modules/save-cwd (Files): Depend on getcwd, not xgetcwd.
84016         openat: Increase OPENAT_BUFFER_SIZE from 512 to at least 1024
84017         This avoids heap allocation for file names whose lengths are in
84018         the range 512..1023, with the upper bound increasing to at most
84019         4031 depending on the platform's PATH_MAX.  (We do not want
84020         pathmax.h here as it might supply a non-constant PATH_MAX.)
84021         * lib/openat-priv.h (SAFER_ALLOCA_MAX, SAFER_ALLOCA): New macros.
84022         Perhaps they should be moved to malloca.h?
84023         (OPENAT_BUFFER_SIZE): Use them.
84025 2011-01-10  Bruno Haible  <bruno@clisp.org>
84027         doc: Update users.txt.
84028         * users.txt: Add recutils.
84030 2011-01-09  Karl Berry  <karl@gnu.org>
84032         * doc/posix-functions/gai_strerror.texi: Insert missing @item.
84034         * doc/configmake.texi: New file.
84035         * doc/gnulib.texi: Include it.
84036         * modules/configmake: Move documentation from here.
84038 2011-01-09  Bruno Haible  <bruno@clisp.org>
84040         Update to Unicode 6.0.0.
84041         * lib/gen-uni-tables.c (symbolic_width): Fix bounds of planes.
84042         (get_lbp): Update for Unicode 6.0.0.
84043         * lib/uniwidth/width.c (nonspacing_table_data): Add U+065F,
84044         U+0859..U+085B, U+093A, U+0956..U+0957, U+0F8D..U+0F8F, U+135D..U+135E,
84045         U+1BE6, U+1BE8..U+1BE9, U+1BED, U+1BEF..U+1BF1, U+1DFC, U+2D7F,
84046         U+11001, U+11038..U+11046. Remove U+06DE.
84047         (uc_width): Fix bounds of planes.
84048         * tests/uniwidth/test-uc_width2.sh: Same updates as in
84049         lib/uniwidth/width.c.
84050         * tests/unigbrk/GraphemeBreakTest.txt: Copied from Unicode 6.0.0, with
84051         trailing whitespace removed.
84052         * tests/uninorm/NormalizationTest.txt: Update from Unicode 6.0.0,
84053         without comments, but with the original copyright notice.
84054         * lib/unicase/cased.h: Regenerated for Unicode 6.0.0.
84055         * lib/unicase/ignorable.h: Likewise.
84056         * lib/unicase/tocasefold.h: Likewise.
84057         * lib/unicase/tolower.h: Likewise.
84058         * lib/unicase/totitle.h: Likewise.
84059         * lib/unicase/toupper.h: Likewise.
84060         * lib/unictype/bidi_of.h: Likewise.
84061         * lib/unictype/blocks.h: Likewise.
84062         * lib/unictype/categ_C.h: Likewise.
84063         * lib/unictype/categ_Cn.h: Likewise.
84064         * lib/unictype/categ_L.h: Likewise.
84065         * lib/unictype/categ_Ll.h: Likewise.
84066         * lib/unictype/categ_Lm.h: Likewise.
84067         * lib/unictype/categ_Lo.h: Likewise.
84068         * lib/unictype/categ_Lu.h: Likewise.
84069         * lib/unictype/categ_M.h: Likewise.
84070         * lib/unictype/categ_Mc.h: Likewise.
84071         * lib/unictype/categ_Me.h: Likewise.
84072         * lib/unictype/categ_Mn.h: Likewise.
84073         * lib/unictype/categ_N.h: Likewise.
84074         * lib/unictype/categ_Nd.h: Likewise.
84075         * lib/unictype/categ_No.h: Likewise.
84076         * lib/unictype/categ_P.h: Likewise.
84077         * lib/unictype/categ_Po.h: Likewise.
84078         * lib/unictype/categ_S.h: Likewise.
84079         * lib/unictype/categ_Sc.h: Likewise.
84080         * lib/unictype/categ_Sk.h: Likewise.
84081         * lib/unictype/categ_Sm.h: Likewise.
84082         * lib/unictype/categ_So.h: Likewise.
84083         * lib/unictype/categ_of.h: Likewise.
84084         * lib/unictype/combining.h: Likewise.
84085         * lib/unictype/ctype_alnum.h: Likewise.
84086         * lib/unictype/ctype_alpha.h: Likewise.
84087         * lib/unictype/ctype_graph.h: Likewise.
84088         * lib/unictype/ctype_lower.h: Likewise.
84089         * lib/unictype/ctype_print.h: Likewise.
84090         * lib/unictype/ctype_punct.h: Likewise.
84091         * lib/unictype/ctype_upper.h: Likewise.
84092         * lib/unictype/decdigit.h: Likewise.
84093         * lib/unictype/digit.h: Likewise.
84094         * lib/unictype/numeric.h: Likewise.
84095         * lib/unictype/pr_alphabetic.h: Likewise.
84096         * lib/unictype/pr_bidi_arabic_digit.h: Likewise.
84097         * lib/unictype/pr_bidi_arabic_right_to_left.h: Likewise.
84098         * lib/unictype/pr_bidi_boundary_neutral.h: Likewise.
84099         * lib/unictype/pr_bidi_eur_num_terminator.h: Likewise.
84100         * lib/unictype/pr_bidi_hebrew_right_to_left.h: Likewise.
84101         * lib/unictype/pr_bidi_left_to_right.h: Likewise.
84102         * lib/unictype/pr_bidi_non_spacing_mark.h: Likewise.
84103         * lib/unictype/pr_bidi_other_neutral.h: Likewise.
84104         * lib/unictype/pr_case_ignorable.h: Likewise.
84105         * lib/unictype/pr_cased.h: Likewise.
84106         * lib/unictype/pr_changes_when_casefolded.h: Likewise.
84107         * lib/unictype/pr_changes_when_casemapped.h: Likewise.
84108         * lib/unictype/pr_changes_when_lowercased.h: Likewise.
84109         * lib/unictype/pr_changes_when_titlecased.h: Likewise.
84110         * lib/unictype/pr_changes_when_uppercased.h: Likewise.
84111         * lib/unictype/pr_combining.h: Likewise.
84112         * lib/unictype/pr_composite.h: Likewise.
84113         * lib/unictype/pr_currency_symbol.h: Likewise.
84114         * lib/unictype/pr_decimal_digit.h: Likewise.
84115         * lib/unictype/pr_deprecated.h: Likewise.
84116         * lib/unictype/pr_format_control.h: Likewise.
84117         * lib/unictype/pr_grapheme_base.h: Likewise.
84118         * lib/unictype/pr_grapheme_extend.h: Likewise.
84119         * lib/unictype/pr_grapheme_link.h: Likewise.
84120         * lib/unictype/pr_id_continue.h: Likewise.
84121         * lib/unictype/pr_id_start.h: Likewise.
84122         * lib/unictype/pr_ideographic.h: Likewise.
84123         * lib/unictype/pr_lowercase.h: Likewise.
84124         * lib/unictype/pr_math.h: Likewise.
84125         * lib/unictype/pr_numeric.h: Likewise.
84126         * lib/unictype/pr_other_alphabetic.h: Likewise.
84127         * lib/unictype/pr_other_id_continue.h: Likewise.
84128         * lib/unictype/pr_other_math.h: Likewise.
84129         * lib/unictype/pr_punctuation.h: Likewise.
84130         * lib/unictype/pr_sentence_terminal.h: Likewise.
84131         * lib/unictype/pr_terminal_punctuation.h: Likewise.
84132         * lib/unictype/pr_unassigned_code_value.h: Likewise.
84133         * lib/unictype/pr_unified_ideograph.h: Likewise.
84134         * lib/unictype/pr_uppercase.h: Likewise.
84135         * lib/unictype/pr_xid_continue.h: Likewise.
84136         * lib/unictype/pr_xid_start.h: Likewise.
84137         * lib/unictype/scripts.h: Likewise.
84138         * lib/unictype/scripts_byname.gperf: Likewise.
84139         * lib/unictype/sy_java_ident.h: Likewise.
84140         * lib/unigbrk/gbrkprop.h: Likewise.
84141         * lib/unilbrk/lbrkprop1.h: Likewise.
84142         * lib/unilbrk/lbrkprop2.h: Likewise.
84143         * lib/uninorm/decomposition-table2.h: Likewise.
84144         * lib/uniwbrk/wbrkprop.h: Likewise.
84145         * tests/unicase/test-cased.c: Likewise.
84146         * tests/unicase/test-ignorable.c: Likewise.
84147         * tests/unicase/test-uc_tolower.c: Likewise.
84148         * tests/unicase/test-uc_totitle.c: Likewise.
84149         * tests/unicase/test-uc_toupper.c: Likewise.
84150         * tests/unictype/test-categ_C.c: Likewise.
84151         * tests/unictype/test-categ_Cn.c: Likewise.
84152         * tests/unictype/test-categ_L.c: Likewise.
84153         * tests/unictype/test-categ_Ll.c: Likewise.
84154         * tests/unictype/test-categ_Lm.c: Likewise.
84155         * tests/unictype/test-categ_Lo.c: Likewise.
84156         * tests/unictype/test-categ_Lu.c: Likewise.
84157         * tests/unictype/test-categ_M.c: Likewise.
84158         * tests/unictype/test-categ_Mc.c: Likewise.
84159         * tests/unictype/test-categ_Me.c: Likewise.
84160         * tests/unictype/test-categ_Mn.c: Likewise.
84161         * tests/unictype/test-categ_N.c: Likewise.
84162         * tests/unictype/test-categ_Nd.c: Likewise.
84163         * tests/unictype/test-categ_No.c: Likewise.
84164         * tests/unictype/test-categ_P.c: Likewise.
84165         * tests/unictype/test-categ_Po.c: Likewise.
84166         * tests/unictype/test-categ_S.c: Likewise.
84167         * tests/unictype/test-categ_Sc.c: Likewise.
84168         * tests/unictype/test-categ_Sk.c: Likewise.
84169         * tests/unictype/test-categ_Sm.c: Likewise.
84170         * tests/unictype/test-categ_So.c: Likewise.
84171         * tests/unictype/test-ctype_alnum.c: Likewise.
84172         * tests/unictype/test-ctype_alpha.c: Likewise.
84173         * tests/unictype/test-ctype_graph.c: Likewise.
84174         * tests/unictype/test-ctype_lower.c: Likewise.
84175         * tests/unictype/test-ctype_print.c: Likewise.
84176         * tests/unictype/test-ctype_punct.c: Likewise.
84177         * tests/unictype/test-ctype_upper.c: Likewise.
84178         * tests/unictype/test-decdigit.h: Likewise.
84179         * tests/unictype/test-digit.h: Likewise.
84180         * tests/unictype/test-numeric.h: Likewise.
84181         * tests/unictype/test-pr_alphabetic.c: Likewise.
84182         * tests/unictype/test-pr_bidi_arabic_digit.c: Likewise.
84183         * tests/unictype/test-pr_bidi_arabic_right_to_left.c: Likewise.
84184         * tests/unictype/test-pr_bidi_boundary_neutral.c: Likewise.
84185         * tests/unictype/test-pr_bidi_eur_num_terminator.c: Likewise.
84186         * tests/unictype/test-pr_bidi_hebrew_right_to_left.c: Likewise.
84187         * tests/unictype/test-pr_bidi_left_to_right.c: Likewise.
84188         * tests/unictype/test-pr_bidi_non_spacing_mark.c: Likewise.
84189         * tests/unictype/test-pr_bidi_other_neutral.c: Likewise.
84190         * tests/unictype/test-pr_case_ignorable.c: Likewise.
84191         * tests/unictype/test-pr_cased.c: Likewise.
84192         * tests/unictype/test-pr_changes_when_casefolded.c: Likewise.
84193         * tests/unictype/test-pr_changes_when_casemapped.c: Likewise.
84194         * tests/unictype/test-pr_changes_when_lowercased.c: Likewise.
84195         * tests/unictype/test-pr_changes_when_titlecased.c: Likewise.
84196         * tests/unictype/test-pr_changes_when_uppercased.c: Likewise.
84197         * tests/unictype/test-pr_combining.c: Likewise.
84198         * tests/unictype/test-pr_composite.c: Likewise.
84199         * tests/unictype/test-pr_currency_symbol.c: Likewise.
84200         * tests/unictype/test-pr_decimal_digit.c: Likewise.
84201         * tests/unictype/test-pr_deprecated.c: Likewise.
84202         * tests/unictype/test-pr_format_control.c: Likewise.
84203         * tests/unictype/test-pr_grapheme_base.c: Likewise.
84204         * tests/unictype/test-pr_grapheme_extend.c: Likewise.
84205         * tests/unictype/test-pr_grapheme_link.c: Likewise.
84206         * tests/unictype/test-pr_id_continue.c: Likewise.
84207         * tests/unictype/test-pr_id_start.c: Likewise.
84208         * tests/unictype/test-pr_ideographic.c: Likewise.
84209         * tests/unictype/test-pr_lowercase.c: Likewise.
84210         * tests/unictype/test-pr_math.c: Likewise.
84211         * tests/unictype/test-pr_numeric.c: Likewise.
84212         * tests/unictype/test-pr_other_alphabetic.c: Likewise.
84213         * tests/unictype/test-pr_other_id_continue.c: Likewise.
84214         * tests/unictype/test-pr_other_math.c: Likewise.
84215         * tests/unictype/test-pr_punctuation.c: Likewise.
84216         * tests/unictype/test-pr_sentence_terminal.c: Likewise.
84217         * tests/unictype/test-pr_terminal_punctuation.c: Likewise.
84218         * tests/unictype/test-pr_unassigned_code_value.c: Likewise.
84219         * tests/unictype/test-pr_unified_ideograph.c: Likewise.
84220         * tests/unictype/test-pr_uppercase.c: Likewise.
84221         * tests/unictype/test-pr_xid_continue.c: Likewise.
84222         * tests/unictype/test-pr_xid_start.c: Likewise.
84223         * tests/unigbrk/test-uc-gbrk-prop.h: Likewise.
84224         * lib/unicase/special-casing-table.gperf: Regenerated; only comment
84225         changes.
84226         * lib/unictype/categ_Cc.h: Likewise.
84227         * lib/unictype/categ_Cf.h: Likewise.
84228         * lib/unictype/categ_Co.h: Likewise.
84229         * lib/unictype/categ_Cs.h: Likewise.
84230         * lib/unictype/categ_Lt.h: Likewise.
84231         * lib/unictype/categ_Nl.h: Likewise.
84232         * lib/unictype/categ_Pc.h: Likewise.
84233         * lib/unictype/categ_Pd.h: Likewise.
84234         * lib/unictype/categ_Pe.h: Likewise.
84235         * lib/unictype/categ_Pf.h: Likewise.
84236         * lib/unictype/categ_Pi.h: Likewise.
84237         * lib/unictype/categ_Ps.h: Likewise.
84238         * lib/unictype/categ_Z.h: Likewise.
84239         * lib/unictype/categ_Zl.h: Likewise.
84240         * lib/unictype/categ_Zp.h: Likewise.
84241         * lib/unictype/categ_Zs.h: Likewise.
84242         * lib/unictype/ctype_blank.h: Likewise.
84243         * lib/unictype/ctype_cntrl.h: Likewise.
84244         * lib/unictype/ctype_digit.h: Likewise.
84245         * lib/unictype/ctype_space.h: Likewise.
84246         * lib/unictype/ctype_xdigit.h: Likewise.
84247         * lib/unictype/mirror.h: Likewise.
84248         * lib/unictype/pr_ascii_hex_digit.h: Likewise.
84249         * lib/unictype/pr_bidi_block_separator.h: Likewise.
84250         * lib/unictype/pr_bidi_common_separator.h: Likewise.
84251         * lib/unictype/pr_bidi_control.h: Likewise.
84252         * lib/unictype/pr_bidi_embedding_or_override.h: Likewise.
84253         * lib/unictype/pr_bidi_eur_num_separator.h: Likewise.
84254         * lib/unictype/pr_bidi_european_digit.h: Likewise.
84255         * lib/unictype/pr_bidi_pdf.h: Likewise.
84256         * lib/unictype/pr_bidi_segment_separator.h: Likewise.
84257         * lib/unictype/pr_bidi_whitespace.h: Likewise.
84258         * lib/unictype/pr_dash.h: Likewise.
84259         * lib/unictype/pr_default_ignorable_code_point.h: Likewise.
84260         * lib/unictype/pr_diacritic.h: Likewise.
84261         * lib/unictype/pr_extender.h: Likewise.
84262         * lib/unictype/pr_hex_digit.h: Likewise.
84263         * lib/unictype/pr_hyphen.h: Likewise.
84264         * lib/unictype/pr_ids_binary_operator.h: Likewise.
84265         * lib/unictype/pr_ids_trinary_operator.h: Likewise.
84266         * lib/unictype/pr_ignorable_control.h: Likewise.
84267         * lib/unictype/pr_iso_control.h: Likewise.
84268         * lib/unictype/pr_join_control.h: Likewise.
84269         * lib/unictype/pr_left_of_pair.h: Likewise.
84270         * lib/unictype/pr_line_separator.h: Likewise.
84271         * lib/unictype/pr_logical_order_exception.h: Likewise.
84272         * lib/unictype/pr_non_break.h: Likewise.
84273         * lib/unictype/pr_not_a_character.h: Likewise.
84274         * lib/unictype/pr_other_default_ignorable_code_point.h: Likewise.
84275         * lib/unictype/pr_other_grapheme_extend.h: Likewise.
84276         * lib/unictype/pr_other_id_start.h: Likewise.
84277         * lib/unictype/pr_other_lowercase.h: Likewise.
84278         * lib/unictype/pr_other_uppercase.h: Likewise.
84279         * lib/unictype/pr_paired_punctuation.h: Likewise.
84280         * lib/unictype/pr_paragraph_separator.h: Likewise.
84281         * lib/unictype/pr_pattern_syntax.h: Likewise.
84282         * lib/unictype/pr_pattern_white_space.h: Likewise.
84283         * lib/unictype/pr_private_use.h: Likewise.
84284         * lib/unictype/pr_quotation_mark.h: Likewise.
84285         * lib/unictype/pr_radical.h: Likewise.
84286         * lib/unictype/pr_soft_dotted.h: Likewise.
84287         * lib/unictype/pr_space.h: Likewise.
84288         * lib/unictype/pr_titlecase.h: Likewise.
84289         * lib/unictype/pr_variation_selector.h: Likewise.
84290         * lib/unictype/pr_white_space.h: Likewise.
84291         * lib/unictype/pr_zero_width.h: Likewise.
84292         * lib/unictype/sy_c_ident.h: Likewise.
84293         * lib/unictype/sy_c_whitespace.h: Likewise.
84294         * lib/unictype/sy_java_whitespace.h: Likewise.
84295         * lib/uninorm/composition-table.gperf: Likewise.
84296         * lib/uninorm/decomposition-table1.h: Likewise.
84297         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Add test for rule
84298         LB8.
84299         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
84300         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
84301         * modules/unictype/*: Bump version number of expected libunistring
84302         version.
84304 2011-01-09  Bruno Haible  <bruno@clisp.org>
84306         Update to Unicode 5.2.0.
84307         * tests/unigbrk/GraphemeBreakTest.txt: Copied from Unicode 5.2.0, with
84308         trailing whitespace removed.
84310 2011-01-09  Bruno Haible  <bruno@clisp.org>
84312         New Unicode character properties, from Unicode 5.2.0.
84313         * lib/unictype.in.h (UC_PROPERTY_CASED, UC_PROPERTY_CASE_IGNORABLE,
84314         UC_PROPERTY_CHANGES_WHEN_LOWERCASED,
84315         UC_PROPERTY_CHANGES_WHEN_UPPERCASED,
84316         UC_PROPERTY_CHANGES_WHEN_TITLECASED,
84317         UC_PROPERTY_CHANGES_WHEN_CASEFOLDED,
84318         UC_PROPERTY_CHANGES_WHEN_CASEMAPPED,
84319         uc_is_property_cased, uc_is_property_case_ignorable,
84320         uc_is_property_changes_when_lowercased,
84321         uc_is_property_changes_when_uppercased,
84322         uc_is_property_changes_when_titlecased,
84323         uc_is_property_changes_when_casefolded,
84324         uc_is_property_changes_when_casemapped): New declarations.
84325         * lib/unictype/pr_byname.gperf: Add the new properties.
84326         * modules/unictype/property-byname (Depends-on): Depend on the new
84327         properties modules.
84328         * modules/unictype/property-all (Depends-on): Likewise.
84329         * MODULES.html.sh (Unicode string functions): Add
84330         unictype/property-case-ignorable, unictype/property-cased,
84331         unictype/property-changes-when-casefolded,
84332         unictype/property-changes-when-casemapped,
84333         unictype/property-changes-when-lowercased,
84334         unictype/property-changes-when-titlecased,
84335         unictype/property-changes-when-uppercased.
84337         New module 'unictype/property-changes-when-casemapped'.
84338         * modules/unictype/property-changes-when-casemapped: New file.
84339         * lib/unictype/pr_changes_when_casemapped.c: New file.
84340         * lib/unictype/pr_changes_when_casemapped.h: New file, automatically
84341         generated by gen-uni-tables.
84342         * modules/unictype/property-changes-when-casemapped-tests: New file.
84343         * tests/unictype/test-pr_changes_when_casemapped.c: New file,
84344         automatically generated by gen-uni-tables.
84346         New module 'unictype/property-changes-when-casefolded'.
84347         * modules/unictype/property-changes-when-casefolded: New file.
84348         * lib/unictype/pr_changes_when_casefolded.c: New file.
84349         * lib/unictype/pr_changes_when_casefolded.h: New file, automatically
84350         generated by gen-uni-tables.
84351         * modules/unictype/property-changes-when-casefolded-tests: New file.
84352         * tests/unictype/test-pr_changes_when_casefolded.c: New file,
84353         automatically generated by gen-uni-tables.
84355         New module 'unictype/property-changes-when-titlecased'.
84356         * modules/unictype/property-changes-when-titlecased: New file.
84357         * lib/unictype/pr_changes_when_titlecased.c: New file.
84358         * lib/unictype/pr_changes_when_titlecased.h: New file, automatically
84359         generated by gen-uni-tables.
84360         * modules/unictype/property-changes-when-titlecased-tests: New file.
84361         * tests/unictype/test-pr_changes_when_titlecased.c: New file,
84362         automatically generated by gen-uni-tables.
84364         New module 'unictype/property-changes-when-uppercased'.
84365         * modules/unictype/property-changes-when-uppercased: New file.
84366         * lib/unictype/pr_changes_when_uppercased.c: New file.
84367         * lib/unictype/pr_changes_when_uppercased.h: New file, automatically
84368         generated by gen-uni-tables.
84369         * modules/unictype/property-changes-when-uppercased-tests: New file.
84370         * tests/unictype/test-pr_changes_when_uppercased.c: New file,
84371         automatically generated by gen-uni-tables.
84373         New module 'unictype/property-changes-when-lowercased'.
84374         * modules/unictype/property-changes-when-lowercased: New file.
84375         * lib/unictype/pr_changes_when_lowercased.c: New file.
84376         * lib/unictype/pr_changes_when_lowercased.h: New file, automatically
84377         generated by gen-uni-tables.
84378         * modules/unictype/property-changes-when-lowercased-tests: New file.
84379         * tests/unictype/test-pr_changes_when_lowercased.c: New file,
84380         automatically generated by gen-uni-tables.
84382         New module 'unictype/property-case-ignorable'.
84383         * modules/unictype/property-case-ignorable: New file.
84384         * lib/unictype/pr_case_ignorable.c: New file.
84385         * lib/unictype/pr_case_ignorable.h: New file, automatically generated
84386         by gen-uni-tables.
84387         * modules/unictype/property-case-ignorable-tests: New file.
84388         * tests/unictype/test-pr_case_ignorable.c: New file, automatically
84389         generated by gen-uni-tables.
84391         New module 'unictype/property-cased'.
84392         * modules/unictype/property-cased: New file.
84393         * lib/unictype/pr_cased.c: New file.
84394         * lib/unictype/pr_cased.h: New file, automatically generated by
84395         gen-uni-tables.
84396         * modules/unictype/property-cased-tests: New file.
84397         * tests/unictype/test-pr_cased.c: New file, automatically generated by
84398         gen-uni-tables.
84400 2011-01-09  Bruno Haible  <bruno@clisp.org>
84402         Update to Unicode 5.2.0.
84403         * lib/gen-uni-tables.c (output_predicate, output_category,
84404         output_combclass, output_bidi_category, output_decimal_digit_test,
84405         output_decimal_digit, output_digit_test, output_digit,
84406         output_numeric_test, output_numeric, output_mirror, output_scripts,
84407         output_scripts_byname, output_blocks, output_ident_category): Fix
84408         comment header.
84409         (is_WBP_MIDNUMLET, is_WBP_MIDLETTER): New functions, extracted from
84410         get_wbp.
84411         (PROP_CASED, PROP_CASE_IGNORABLE, PROP_CHANGES_WHEN_*): New enumeration
84412         items.
84413         (fill_properties): Also fill the peoperties Cased, Case_Ignorable,
84414         Changes_When_Lowercased, Changes_When_Uppercased,
84415         Changes_When_Titlecased, Changes_When_Casefolded,
84416         Changes_When_Casemapped.
84417         (is_property_alphabetic, is_property_default_ignorable_code_point):
84418         Update for Unicode 5.2.0.
84419         (is_property_cased, is_property_case_ignorable,
84420         is_property_changes_when_lowercased,
84421         is_property_changes_when_uppercased,
84422         is_property_changes_when_titlecased,
84423         is_property_changes_when_casefolded,
84424         is_property_changes_when_casemapped): New functions.
84425         (output_properties): Output also the properties cased, case_ignorable,
84426         changes_when_lowercased, changes_when_uppercased,
84427         changes_when_titlecased, changes_when_casefolded,
84428         changes_when_casemapped.
84429         (symbolic_width): Update for Unicode 5.2.0, incorporating changes from
84430         Unicode TR#11 revision 17 -> 19.
84431         (LBP_CP): New enumeration value.
84432         (LBP_*): Adjust values accordingly.
84433         (get_lbp): Update for Unicode 5.2.0, incorporating changes from Unicode
84434         TR#14 revision 22 -> 24.
84435         (debug_output_lbp): Allow for LBP_* bits >= 32. Support LBP_CP.
84436         (fill_org_lbp, debug_output_org_lbp, output_lbp): Support LBP_CP.
84437         (get_wbp): Update for Unicode 5.2.0, incorporating changes from Unicode
84438         TR#29 revision 13 -> 15. Use functions is_WBP_MIDNUMLET,
84439         is_WBP_MIDLETTER.
84440         (output_composition_tables): Allow for 24 bits instead of 16 bits in
84441         the code1 and code2 of each composition rule.
84442         * lib/unicase/cased.h: Regenerated for Unicode 5.2.0.
84443         * lib/unicase/ignorable.h: Likewise.
84444         * lib/unicase/tocasefold.h: Likewise.
84445         * lib/unicase/tolower.h: Likewise.
84446         * lib/unicase/totitle.h: Likewise.
84447         * lib/unicase/toupper.h: Likewise.
84448         * lib/unictype/bidi_of.h: Likewise.
84449         * lib/unictype/blocks.h: Likewise.
84450         * lib/unictype/categ_C.h: Likewise.
84451         * lib/unictype/categ_Cf.h: Likewise.
84452         * lib/unictype/categ_Cn.h: Likewise.
84453         * lib/unictype/categ_L.h: Likewise.
84454         * lib/unictype/categ_Ll.h: Likewise.
84455         * lib/unictype/categ_Lm.h: Likewise.
84456         * lib/unictype/categ_Lo.h: Likewise.
84457         * lib/unictype/categ_Lu.h: Likewise.
84458         * lib/unictype/categ_M.h: Likewise.
84459         * lib/unictype/categ_Mc.h: Likewise.
84460         * lib/unictype/categ_Mn.h: Likewise.
84461         * lib/unictype/categ_N.h: Likewise.
84462         * lib/unictype/categ_Nd.h: Likewise.
84463         * lib/unictype/categ_Nl.h: Likewise.
84464         * lib/unictype/categ_No.h: Likewise.
84465         * lib/unictype/categ_P.h: Likewise.
84466         * lib/unictype/categ_Pd.h: Likewise.
84467         * lib/unictype/categ_Po.h: Likewise.
84468         * lib/unictype/categ_S.h: Likewise.
84469         * lib/unictype/categ_Sc.h: Likewise.
84470         * lib/unictype/categ_So.h: Likewise.
84471         * lib/unictype/categ_of.h: Likewise.
84472         * lib/unictype/combining.h: Likewise.
84473         * lib/unictype/ctype_alnum.h: Likewise.
84474         * lib/unictype/ctype_alpha.h: Likewise.
84475         * lib/unictype/ctype_graph.h: Likewise.
84476         * lib/unictype/ctype_lower.h: Likewise.
84477         * lib/unictype/ctype_print.h: Likewise.
84478         * lib/unictype/ctype_punct.h: Likewise.
84479         * lib/unictype/ctype_upper.h: Likewise.
84480         * lib/unictype/decdigit.h: Likewise.
84481         * lib/unictype/digit.h: Likewise.
84482         * lib/unictype/numeric.h: Likewise.
84483         * lib/unictype/pr_alphabetic.h: Likewise.
84484         * lib/unictype/pr_bidi_arabic_digit.h: Likewise.
84485         * lib/unictype/pr_bidi_eur_num_terminator.h: Likewise.
84486         * lib/unictype/pr_bidi_european_digit.h: Likewise.
84487         * lib/unictype/pr_bidi_hebrew_right_to_left.h: Likewise.
84488         * lib/unictype/pr_bidi_left_to_right.h: Likewise.
84489         * lib/unictype/pr_bidi_non_spacing_mark.h: Likewise.
84490         * lib/unictype/pr_bidi_other_neutral.h: Likewise.
84491         * lib/unictype/pr_combining.h: Likewise.
84492         * lib/unictype/pr_composite.h: Likewise.
84493         * lib/unictype/pr_currency_symbol.h: Likewise.
84494         * lib/unictype/pr_dash.h: Likewise.
84495         * lib/unictype/pr_decimal_digit.h: Likewise.
84496         * lib/unictype/pr_deprecated.h: Likewise.
84497         * lib/unictype/pr_diacritic.h: Likewise.
84498         * lib/unictype/pr_extender.h: Likewise.
84499         * lib/unictype/pr_grapheme_base.h: Likewise.
84500         * lib/unictype/pr_grapheme_extend.h: Likewise.
84501         * lib/unictype/pr_grapheme_link.h: Likewise.
84502         * lib/unictype/pr_id_continue.h: Likewise.
84503         * lib/unictype/pr_id_start.h: Likewise.
84504         * lib/unictype/pr_ideographic.h: Likewise.
84505         * lib/unictype/pr_ignorable_control.h: Likewise.
84506         * lib/unictype/pr_logical_order_exception.h: Likewise.
84507         * lib/unictype/pr_lowercase.h: Likewise.
84508         * lib/unictype/pr_numeric.h: Likewise.
84509         * lib/unictype/pr_other_alphabetic.h: Likewise.
84510         * lib/unictype/pr_punctuation.h: Likewise.
84511         * lib/unictype/pr_sentence_terminal.h: Likewise.
84512         * lib/unictype/pr_terminal_punctuation.h: Likewise.
84513         * lib/unictype/pr_unassigned_code_value.h: Likewise.
84514         * lib/unictype/pr_unified_ideograph.h: Likewise.
84515         * lib/unictype/pr_uppercase.h: Likewise.
84516         * lib/unictype/pr_xid_continue.h: Likewise.
84517         * lib/unictype/pr_xid_start.h: Likewise.
84518         * lib/unictype/pr_zero_width.h: Likewise.
84519         * lib/unictype/scripts.h: Likewise.
84520         * lib/unictype/scripts_byname.gperf: Likewise.
84521         * lib/unictype/sy_java_ident.h: Likewise.
84522         * lib/unigbrk/gbrkprop.h: Likewise.
84523         * lib/unilbrk/lbrkprop1.h: Likewise.
84524         * lib/unilbrk/lbrkprop2.h: Likewise.
84525         * lib/unilbrk/lbrktables.h: Likewise.
84526         * lib/unilbrk/lbrktables.c (unilbrk_table): Add a row and column for
84527         LBP_CP. Implement rule LB30.
84528         * lib/uniwidth/width.c (nonspacing_table_data): Add U+0816..U+0819,
84529         U+081B..U+0823, U+0825..U+0827, U+0829..U+082D, U+0900, U+0955, U+109D,
84530         U+1A56, U+1A58..U+1A5E, U+1A60, U+1A62, U+1A65..U+1A6C, U+1A73..U+1A7C,
84531         U+1A7F, U+1CD0..U+1CD2, U+1CD4..U+1CE0, U+1CE2..U+1CE8, U+1CED, U+1DFD,
84532         U+2CEF..U+2CF1, U+A6F0..U+A6F1, U+A8E0..U+A8F1, U+A980..U+A982, U+A9B3,
84533         U+A9B6..U+A9B9, U+A9BC, U+AAB0, U+AAB2..U+AAB4, U+AAB7..U+AAB8,
84534         U+AABE..U+AABF, U+AAC1, U+ABE5, U+ABE8, U+ABED, U+11080..U+11081,
84535         U+110B3..U+110B6, U+110B9..U+110BA, U+110BD.
84536         (uc_width): Return 2 also for unassigned code points of planes 2 and 3.
84537         * lib/uninorm/composition-table.gperf: Regenerated for Unicode 5.2.0.
84538         * lib/uninorm/composition.c (struct composition_rule): Allow for 24
84539         bits instead of 16 bits in the code1 and code2 of each composition
84540         rule.
84541         (uc_composition): Update for Unicode 5.2.0.
84542         * lib/uninorm/decomposition-table1.h: Regenerated for Unicode 5.2.0.
84543         * lib/uninorm/decomposition-table2.h: Likewise.
84544         * lib/uniwbrk/wbrkprop.h: Likewise.
84545         * tests/unicase/test-cased.c: Likewise.
84546         * tests/unicase/test-ignorable.c: Likewise.
84547         * tests/unicase/test-uc_tolower.c: Likewise.
84548         * tests/unicase/test-uc_totitle.c: Likewise.
84549         * tests/unicase/test-uc_toupper.c: Likewise.
84550         * tests/unictype/test-categ_C.c: Likewise.
84551         * tests/unictype/test-categ_Cf.c: Likewise.
84552         * tests/unictype/test-categ_Cn.c: Likewise.
84553         * tests/unictype/test-categ_L.c: Likewise.
84554         * tests/unictype/test-categ_Ll.c: Likewise.
84555         * tests/unictype/test-categ_Lm.c: Likewise.
84556         * tests/unictype/test-categ_Lo.c: Likewise.
84557         * tests/unictype/test-categ_Lu.c: Likewise.
84558         * tests/unictype/test-categ_M.c: Likewise.
84559         * tests/unictype/test-categ_Mc.c: Likewise.
84560         * tests/unictype/test-categ_Mn.c: Likewise.
84561         * tests/unictype/test-categ_N.c: Likewise.
84562         * tests/unictype/test-categ_Nd.c: Likewise.
84563         * tests/unictype/test-categ_Nl.c: Likewise.
84564         * tests/unictype/test-categ_No.c: Likewise.
84565         * tests/unictype/test-categ_P.c: Likewise.
84566         * tests/unictype/test-categ_Pd.c: Likewise.
84567         * tests/unictype/test-categ_Po.c: Likewise.
84568         * tests/unictype/test-categ_S.c: Likewise.
84569         * tests/unictype/test-categ_Sc.c: Likewise.
84570         * tests/unictype/test-categ_So.c: Likewise.
84571         * tests/unictype/test-ctype_alnum.c: Likewise.
84572         * tests/unictype/test-ctype_alpha.c: Likewise.
84573         * tests/unictype/test-ctype_graph.c: Likewise.
84574         * tests/unictype/test-ctype_lower.c: Likewise.
84575         * tests/unictype/test-ctype_print.c: Likewise.
84576         * tests/unictype/test-ctype_punct.c: Likewise.
84577         * tests/unictype/test-ctype_upper.c: Likewise.
84578         * tests/unictype/test-decdigit.h: Likewise.
84579         * tests/unictype/test-digit.h: Likewise.
84580         * tests/unictype/test-numeric.h: Likewise.
84581         * tests/unictype/test-pr_alphabetic.c: Likewise.
84582         * tests/unictype/test-pr_bidi_arabic_digit.c: Likewise.
84583         * tests/unictype/test-pr_bidi_eur_num_terminator.c: Likewise.
84584         * tests/unictype/test-pr_bidi_european_digit.c: Likewise.
84585         * tests/unictype/test-pr_bidi_hebrew_right_to_left.c: Likewise.
84586         * tests/unictype/test-pr_bidi_left_to_right.c: Likewise.
84587         * tests/unictype/test-pr_bidi_non_spacing_mark.c: Likewise.
84588         * tests/unictype/test-pr_bidi_other_neutral.c: Likewise.
84589         * tests/unictype/test-pr_combining.c: Likewise.
84590         * tests/unictype/test-pr_composite.c: Likewise.
84591         * tests/unictype/test-pr_currency_symbol.c: Likewise.
84592         * tests/unictype/test-pr_dash.c: Likewise.
84593         * tests/unictype/test-pr_decimal_digit.c: Likewise.
84594         * tests/unictype/test-pr_deprecated.c: Likewise.
84595         * tests/unictype/test-pr_diacritic.c: Likewise.
84596         * tests/unictype/test-pr_extender.c: Likewise.
84597         * tests/unictype/test-pr_grapheme_base.c: Likewise.
84598         * tests/unictype/test-pr_grapheme_extend.c: Likewise.
84599         * tests/unictype/test-pr_grapheme_link.c: Likewise.
84600         * tests/unictype/test-pr_id_continue.c: Likewise.
84601         * tests/unictype/test-pr_id_start.c: Likewise.
84602         * tests/unictype/test-pr_ideographic.c: Likewise.
84603         * tests/unictype/test-pr_ignorable_control.c: Likewise.
84604         * tests/unictype/test-pr_logical_order_exception.c: Likewise.
84605         * tests/unictype/test-pr_lowercase.c: Likewise.
84606         * tests/unictype/test-pr_numeric.c: Likewise.
84607         * tests/unictype/test-pr_other_alphabetic.c: Likewise.
84608         * tests/unictype/test-pr_punctuation.c: Likewise.
84609         * tests/unictype/test-pr_sentence_terminal.c: Likewise.
84610         * tests/unictype/test-pr_terminal_punctuation.c: Likewise.
84611         * tests/unictype/test-pr_unassigned_code_value.c: Likewise.
84612         * tests/unictype/test-pr_unified_ideograph.c: Likewise.
84613         * tests/unictype/test-pr_uppercase.c: Likewise.
84614         * tests/unictype/test-pr_xid_continue.c: Likewise.
84615         * tests/unictype/test-pr_xid_start.c: Likewise.
84616         * tests/unictype/test-pr_zero_width.c: Likewise.
84617         * tests/unigbrk/test-uc-gbrk-prop.h: Likewise.
84618         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Update for
84619         changed behaviour: line breaking is now disallowed between a letter
84620         or '=' and '('.
84621         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
84622         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
84623         * tests/unilbrk/test-ulc-possible-linebreaks.c (main): Likewise.
84624         * tests/unilbrk/test-ulc-width-linebreaks.c (main): Likewise.
84625         * tests/uniwidth/test-uc_width2.sh: Same updates as in
84626         lib/uniwidth/width.c.
84627         * tests/uninorm/NormalizationTest.txt: Update from Unicode 5.2.0,
84628         without comments, but with the original copyright notice.
84629         * lib/unicase/special-casing-table.gperf: Regenerated; only comment
84630         changes.
84631         * lib/unictype/categ_Cc.h: Likewise.
84632         * lib/unictype/categ_Co.h: Likewise.
84633         * lib/unictype/categ_Cs.h: Likewise.
84634         * lib/unictype/categ_Lt.h: Likewise.
84635         * lib/unictype/categ_Me.h: Likewise.
84636         * lib/unictype/categ_Pc.h: Likewise.
84637         * lib/unictype/categ_Pe.h: Likewise.
84638         * lib/unictype/categ_Pf.h: Likewise.
84639         * lib/unictype/categ_Pi.h: Likewise.
84640         * lib/unictype/categ_Ps.h: Likewise.
84641         * lib/unictype/categ_Sk.h: Likewise.
84642         * lib/unictype/categ_Sm.h: Likewise.
84643         * lib/unictype/categ_Z.h: Likewise.
84644         * lib/unictype/categ_Zl.h: Likewise.
84645         * lib/unictype/categ_Zp.h: Likewise.
84646         * lib/unictype/categ_Zs.h: Likewise.
84647         * lib/unictype/ctype_blank.h: Likewise.
84648         * lib/unictype/ctype_cntrl.h: Likewise.
84649         * lib/unictype/ctype_digit.h: Likewise.
84650         * lib/unictype/ctype_space.h: Likewise.
84651         * lib/unictype/ctype_xdigit.h: Likewise.
84652         * lib/unictype/mirror.h: Likewise.
84653         * lib/unictype/pr_ascii_hex_digit.h: Likewise.
84654         * lib/unictype/pr_bidi_arabic_right_to_left.h: Likewise.
84655         * lib/unictype/pr_bidi_block_separator.h: Likewise.
84656         * lib/unictype/pr_bidi_boundary_neutral.h: Likewise.
84657         * lib/unictype/pr_bidi_common_separator.h: Likewise.
84658         * lib/unictype/pr_bidi_control.h: Likewise.
84659         * lib/unictype/pr_bidi_embedding_or_override.h: Likewise.
84660         * lib/unictype/pr_bidi_eur_num_separator.h: Likewise.
84661         * lib/unictype/pr_bidi_pdf.h: Likewise.
84662         * lib/unictype/pr_bidi_segment_separator.h: Likewise.
84663         * lib/unictype/pr_bidi_whitespace.h: Likewise.
84664         * lib/unictype/pr_default_ignorable_code_point.h: Likewise.
84665         * lib/unictype/pr_format_control.h: Likewise.
84666         * lib/unictype/pr_hex_digit.h: Likewise.
84667         * lib/unictype/pr_hyphen.h: Likewise.
84668         * lib/unictype/pr_ids_binary_operator.h: Likewise.
84669         * lib/unictype/pr_ids_trinary_operator.h: Likewise.
84670         * lib/unictype/pr_iso_control.h: Likewise.
84671         * lib/unictype/pr_join_control.h: Likewise.
84672         * lib/unictype/pr_left_of_pair.h: Likewise.
84673         * lib/unictype/pr_line_separator.h: Likewise.
84674         * lib/unictype/pr_math.h: Likewise.
84675         * lib/unictype/pr_non_break.h: Likewise.
84676         * lib/unictype/pr_not_a_character.h: Likewise.
84677         * lib/unictype/pr_other_default_ignorable_code_point.h: Likewise.
84678         * lib/unictype/pr_other_grapheme_extend.h: Likewise.
84679         * lib/unictype/pr_other_id_continue.h: Likewise.
84680         * lib/unictype/pr_other_id_start.h: Likewise.
84681         * lib/unictype/pr_other_lowercase.h: Likewise.
84682         * lib/unictype/pr_other_math.h: Likewise.
84683         * lib/unictype/pr_other_uppercase.h: Likewise.
84684         * lib/unictype/pr_paired_punctuation.h: Likewise.
84685         * lib/unictype/pr_paragraph_separator.h: Likewise.
84686         * lib/unictype/pr_pattern_syntax.h: Likewise.
84687         * lib/unictype/pr_pattern_white_space.h: Likewise.
84688         * lib/unictype/pr_private_use.h: Likewise.
84689         * lib/unictype/pr_quotation_mark.h: Likewise.
84690         * lib/unictype/pr_radical.h: Likewise.
84691         * lib/unictype/pr_soft_dotted.h: Likewise.
84692         * lib/unictype/pr_space.h: Likewise.
84693         * lib/unictype/pr_titlecase.h: Likewise.
84694         * lib/unictype/pr_variation_selector.h: Likewise.
84695         * lib/unictype/pr_white_space.h: Likewise.
84696         * lib/unictype/sy_c_ident.h: Likewise.
84697         * lib/unictype/sy_c_whitespace.h: Likewise.
84698         * lib/unictype/sy_java_whitespace.h: Likewise.
84699         * modules/uni*/*: Bump version number of expected libunistring version.
84700         Reported by Simon Josefsson.
84702 2011-01-09  Karl Heuer  <kwzh@gnu.org>
84704         useless-if-before-free: fix typo in --help and make the internal,
84705         automatic version date update process work once again.
84706         --help output contained a NUL character instead of the
84707         backslash-zero that was intended.  Also, the "must lie within
84708         the first 8 lines" line is on line 9, and hence not getting
84709         automatically updated.
84710         * build-aux/useless-if-before-free: Fix the former by adding a
84711         backslash, and the latter by condensing the three lines of what-it-does
84712         to a single line, leaving one line of slack for the future.
84714 2011-01-09  Bruno Haible  <bruno@clisp.org>
84716         uniwidth/width: Fix width of U+1D173..U+1D17A.
84717         * lib/gen-uni-tables.c (is_nonspacing, output_nonspacing_property,
84718         symbolic_width, output_width_property_test): New functions.
84719         (main): Invoke output_nonspacing_property, output_width_property_test.
84720         * lib/uniwidth/width.c (nonspacing_table_data): Set bits for
84721         U+1D173..U+1D17A.
84722         * tests/uniwidth/test-uc_width2.sh: For U+1D173..U+1D17A, expect 0, not
84723         1.
84724         * modules/uniwidth/*: Bump version number of expected libunistring
84725         version.
84726         * modules/unilbrk/*: Likewise.
84728 2011-01-08  Bruno Haible  <bruno@clisp.org>
84730         uninorm tests: Preserve copyright of Unicode data file.
84731         * tests/uninorm/NormalizationTest.txt: Re-add original copyright.
84732         Mention modifications.
84734 2011-01-08  Bruno Haible  <bruno@clisp.org>
84736         gen-uni-tables: Prepare for Unicode 5.2.0.
84737         * lib/gen-uni-tables.c (get_lbp): Allow for more than 32 LBP_* values.
84738         (debug_output_lbp, output_lbp): Update.
84740 2011-01-08  Bruno Haible  <bruno@clisp.org>
84742         unilbrk: Clarify gen-uni-tables.c code.
84743         * lib/gen-uni-tables.c (get_lbp): Assume REVISION_22 to be false. These
84744         were mistakes in UAX #14 revision 22 that are corrected in revision 24.
84745         Clarify what to do with unilbrk/lbrkprop.txt and uniwbrk/wbrkprop.txt.
84747 2011-01-07  Bruno Haible  <bruno@clisp.org>
84749         strtod: Restore errno when successfully parsing Infinity or NaN.
84750         * lib/strtod.c (strtod): After successfully parsing an Infinity or NaN,
84751         restore the original errno.
84753 2011-01-07  Bruno Haible  <bruno@clisp.org>
84755         remove test: Avoid failure on HP-UX 11.
84756         * tests/test-remove.c (main): Allow EEXIST as alternative error code.
84758 2011-01-07  Bruno Haible  <bruno@clisp.org>
84760         mkdir, mkdirat tests: Avoid failure on HP-UX 11.11.
84761         * tests/test-mkdir.h (test_mkdir): Allow EOPNOTSUPP as alternative
84762         error code.
84764 2011-01-07  Pádraig Brady  <P@draigBrady.com>
84766         ignore-value: fixup comments, and add Eric Blake
84767         as an author since he rewrote the macros.
84768         * lib/ignore-value.h (ignore_value):  State that
84769         we now support aggregates.  Also specify exactly
84770         when the GCC warn_unused_result feature was added.
84772 2011-01-06  Eric Blake  <eblake@redhat.com>
84774         ignore-value: support aggregate types
84775         * lib/ignore-value.h (ignore_value): Provide separate gcc
84776         definition.
84777         * modules/ignore-value-tests: New test module.
84778         * tests/test-ignore-value.c: New test.
84780         maint.mk: improve sc_prohibit_strcmp regex
84781         * top/maint.mk (sc_prohibit_strcmp): Detect strcmp()!=0, as
84782         documented.  Also, detect strcmp((expr),expr) == 0.  Exempt the
84783         definition of STRNEQ.
84785         signal: work around Haiku issue with SIGBUS
84786         * lib/siglist.h: Add comment.
84787         * lib/sig2str.c (numname_table): Swap SIGBUS order, to match
84788         strsignal's favoring of SIGSEGV.
84789         * tests/test-signal.c (main): Avoid test failure.
84790         * doc/posix-headers/signal.texi (signal.h): Document the issue.
84791         Reported by Scott McCreary.
84793         maint.mk: add pre-release check to ensure submodule commits are public
84794         * top/maint.mk (public-submodule-commit): New rule.
84795         (submodule-checks): New variable.
84796         (alpha beta stable): Depend on the variable.
84798 2011-01-05  Pádraig Brady  <P@draigBrady.com>
84799         and Jim Meyering  <meyering@redhat.com>
84801         ignore-value: make ignore_value more generic; deprecate ignore_ptr
84802         * lib/ignore-value.h: Include <stdint.h>, for decl of intptr_t.
84803         (ATTRIBUTE_DEPRECATED): Define.
84804         (_ignore_case): New function.
84805         (ignore_value): New macro, to replace the old function.
84806         (ignore_ptr): Arrange for any use to evoke a deprecation warning.
84807         * modules/ignore-value (Depends-on): Add stdint.
84809 2011-01-04  Eric Blake  <eblake@redhat.com>
84811         doc: regenerate INSTALL
84812         * doc/Makefile (INSTALL, INSTALL.ISO, INSTALL.UTF-8): Re-add
84813         @firstparagraphindent support, now that autoconf dropped it.
84814         (INSTALL_PRELUDE): Reinstate old macro.
84815         * doc/install.texi: Resync from autoconf.
84816         * doc/INSTALL: Reflect recent autoconf update.
84817         * doc/INSTALL.ISO: Likewise.
84818         * doc/INSTALL.UTF-8: Likewise.
84819         Reported by Karl Berry.
84821 2011-01-04  Bruce Korb  <address@hidden>
84823         git-version-gen: avoid a sub-shell
84824         * build-aux/git-version-gen: Redirect stderr in `...` via
84825         "exec 2>...", rather than via an added sub-shell.
84827 2011-01-03  Ben Pfaff  <blp@cs.stanford.edu>
84829         git-version-gen: use (...) rather than sh -c '...'
84830         * build-aux/git-version-gen: Rather than hard-coding a shell's name
84831         with "sh -c '...'", just use "(...)".  Less syntax is better, too.
84833 2011-01-03  Jim Meyering  <meyering@redhat.com>
84835         git-version-gen: convert leading TABs to spaces
84836         * build-aux/git-version-gen: Expand leading TABs.
84838         git-version-gen: handle failed "git rev-list"
84839         * build-aux/git-version-gen: Rather than leaking a "fatal" error
84840         from git and proceeding as if it had succeeded but printed no SHA1
84841         checksums, suppress the diagnostic and handle the failure.
84842         Reported by Bruce Korb in http://marc.info/?l=git&m=129399145930450&w=2
84844         git-version-gen: include command name in one more diagnostic
84845         * build-aux/git-version-gen: When the required .tarball-version file
84846         was missing or unreadable, you might see the diagnostic from "cat",
84847         but no trace of the name of the invoking script.  Now, you still see
84848         the diagnostic from cat, but also get one from "git-version-gen: ".
84849         Inspired by a patch from Bruce Korb.
84851         update-copyright: adjust test to match changed code
84852         * tests/test-update-copyright.sh: Change test's expected output
84853         to match new actual output.
84855 2011-01-02  Bruno Haible  <bruno@clisp.org>
84857         getlogin_r: Avoid test failure on HP-UX 11.
84858         * tests/test-getlogin_r.c (main): Allow an error code EINVAL instead of
84859         ERANGE when the second argument is zero.
84860         * doc/posix-functions/getlogin_r.texi: Document the HP-UX 11
84861         portability problem.
84863 2011-01-02  Bruce Korb  <bkorb@gnu.org>
84865         * build-aux/update-copyright: doc Simon's changes
84867 2011-01-02  Simon Josefsson  <simon@josefsson.org>
84869         * build-aux/update-copyright: Support UPDATE_COPYRIGHT_HOLDER
84870         environment variable.
84872 2011-01-02  Bruno Haible  <bruno@clisp.org>
84874         unigbrk: Avoid gcc warnings.
84875         * lib/unigbrk/u16-grapheme-breaks.c (u16_grapheme_breaks): Remove
84876         unused variable.
84877         * lib/unigbrk/u16-grapheme-prev.c (u16_grapheme_prev): Likewise.
84878         * lib/unigbrk/u8-grapheme-prev.c (u8_grapheme_prev): Likewise.
84879         * tests/unigbrk/test-u16-grapheme-breaks.c (main): Likewise.
84880         * tests/unigbrk/test-u32-grapheme-breaks.c (main): Likewise.
84881         * tests/unigbrk/test-u8-grapheme-breaks.c (test_u8_grapheme_breaks):
84882         Change type of first argument to 'const char *'.
84883         (main): Remove unused variable.
84884         * tests/unigbrk/test-u8-grapheme-next.c (test_u8_grapheme_next): Change
84885         type of first argument to 'const char *'.
84886         * tests/unigbrk/test-u8-grapheme-prev.c (test_u8_grapheme_prev):
84887         Likewise.
84888         (main): Change type of variable 's'.
84889         * tests/unigbrk/test-uc-is-grapheme-break.c (main): Cast column number
84890         to 'int'.
84892 2011-01-02  Bruno Haible  <bruno@clisp.org>
84894         pwrite: Fix test whether it works and make it work on HP-UX 11.11.
84895         * m4/pwrite.m4 (gl_FUNC_PWRITE): Use AC_LANG_PROGRAM, not
84896         AC_LANG_SOURCE. Extend the test program to catch another HP-UX 11.11
84897         bug.
84898         * lib/pwrite.c: Undo 2010-12-31 patch.
84899         * doc/posix-functions/pwrite.texi: Document another HP-UX 11.11 bug.
84901 2011-01-02  Bruno Haible  <bruno@clisp.org>
84903         pread: Fix test whether it works.
84904         * m4/pread.m4 (gl_FUNC_PREAD): Use AC_LANG_PROGRAM, not AC_LANG_SOURCE.
84906 2011-01-02  Bruno Haible  <bruno@clisp.org>
84908         Fix detection of traditional Arabic locale on HP-UX, Solaris, Cygwin.
84909         * m4/locale-ar.m4 (gt_LOCALE_AR): Require that the locale encoding name
84910         ends in "6". Don't require a specific month name. Try also the locale
84911         names found on HP-UX 11 and Solaris 7.
84913 2011-01-02  Bruno Haible  <bruno@clisp.org>
84915         tcgetsid: Correct linkage in C++ mode on HP-UX 11.00.
84916         * lib/termios.in.h: In C++ mode, on HP-UX, include <sys/termios.h> with
84917         C linkage.
84918         * doc/posix-functions/tcgetsid.texi: Mention the HP-UX 11.00 bug.
84920 2011-01-01  Ben Pfaff  <blp@cs.stanford.edu>
84922         Rename uc_is_grapheme_cluster_break() to uc_is_grapheme_break()
84923         for consistency, since the "cluster" term is not used elsewhere.
84924         * lib/unigbrk.in.h: Update name.
84925         * lib/unigbrk/u16-grapheme-breaks.c: Update name.
84926         * lib/unigbrk/u16-grapheme-next.c: Update name.
84927         * lib/unigbrk/u16-grapheme-prev.c: Update name.
84928         * lib/unigbrk/u32-grapheme-breaks.c: Update name.
84929         * lib/unigbrk/u32-grapheme-next.c: Update name.
84930         * lib/unigbrk/u32-grapheme-prev.c: Update name.
84931         * lib/unigbrk/u8-grapheme-breaks.c: Update name.
84932         * lib/unigbrk/u8-grapheme-next.c: Update name.
84933         * lib/unigbrk/u8-grapheme-prev.c: Update name.
84934         * lib/unigbrk/uc-is-grapheme-break.c: Update name.
84935         * tests/unigbrk/test-uc-is-grapheme-break.c: Update name.
84936         Suggested by Bruno Haible.
84938 2011-01-01  Ben Pfaff  <blp@cs.stanford.edu>
84940         Remove module 'u8-grapheme-len' as too redundant with
84941         'u8-grapheme-next'.
84942         * modules/unigbrk/u8-grapheme-len: Delete file.
84943         * modules/unigbrk/u8-grapheme-len-tests: Delete file.
84944         * lib/unigbrk.in.h: Remove prototype for deleted function.
84945         * lib/unigbrk/u8-grapheme-len.c: Delete file.
84946         * tests/unigbrk/test-u8-grapheme-len.c: Delete file.
84948         Remove module 'u16-grapheme-len' as too redundant with
84949         'u16-grapheme-next'.
84950         * modules/unigbrk/u16-grapheme-len: Delete file.
84951         * modules/unigbrk/u16-grapheme-len-tests: Delete file.
84952         * lib/unigbrk.in.h: Remove prototype for deleted function.
84953         * lib/unigbrk/u16-grapheme-len.c: Delete file.
84954         * tests/unigbrk/test-u16-grapheme-len.c: Delete file.
84956         Remove module 'u32-grapheme-len' as too redundant with
84957         'u32-grapheme-next'.
84958         * modules/unigbrk/u32-grapheme-len: Delete file.
84959         * modules/unigbrk/u32-grapheme-len-tests: Delete file.
84960         * lib/unigbrk.in.h: Remove prototype for deleted function.
84961         * lib/unigbrk/u32-grapheme-len.c: Delete file.
84962         * tests/unigbrk/test-u32-grapheme-len.c: Delete file.
84964         Suggested by Bruno Haible.
84966 2011-01-01  Ben Pfaff  <blp@cs.stanford.edu>
84968         * unigbrk.in.h: Fix typo: "ben" => "been".
84969         Reported by Bruno Haible.
84971 2011-01-01  Jim Meyering  <meyering@redhat.com>
84973         maint: update almost all copyright ranges to include 2011
84974         Run the new "make update-copyright" rule.
84976 2011-01-01  Jim Meyering  <meyering@redhat.com>
84978         maint: update-copyright: exempt doc/INSTALL*
84979         * Makefile (update-copyright): Also exclude doc/INSTALL*,
84980         since they are generated.  Suggested by Bruno Haible.
84982 2011-01-01  Jim Meyering  <meyering@redhat.com>
84984         maint: refine the update-copyright rule
84985         * Makefile (update-copyright): Also exclude any file that includes
84986         the "GENERATED AUTOMATICALLY" comment, being careful not to exclude
84987         code that merely generates the comment.
84989 2010-12-31  Ben Pfaff  <blp@cs.stanford.edu>
84991         New module 'u8-grapheme-len'.
84992         * modules/unigbrk/u8-grapheme-len: New file.
84993         * modules/unigbrk/u8-grapheme-len-tests: New file.
84994         * lib/unigbrk.in.h: Add prototype for new function.
84995         * lib/unigbrk/u8-grapheme-len.c: New file.
84996         * tests/unigbrk/test-u8-grapheme-len.c: New file.
84998         New module 'u16-grapheme-len'.
84999         * modules/unigbrk/u16-grapheme-len: New file.
85000         * modules/unigbrk/u16-grapheme-len-tests: New file.
85001         * lib/unigbrk.in.h: Add prototype for new function.
85002         * lib/unigbrk/u16-grapheme-len.c: New file.
85003         * tests/unigbrk/test-u16-grapheme-len.c: New file.
85005         New module 'u32-grapheme-len'.
85006         * modules/unigbrk/u32-grapheme-len: New file.
85007         * modules/unigbrk/u32-grapheme-len-tests: New file.
85008         * lib/unigbrk.in.h: Add prototype for new function.
85009         * lib/unigbrk/u32-grapheme-len.c: New file.
85010         * tests/unigbrk/test-u32-grapheme-len.c: New file.
85012         New module 'u8-grapheme-next'.
85013         * modules/unigbrk/u8-grapheme-next: New file.
85014         * modules/unigbrk/u8-grapheme-next-tests: New file.
85015         * lib/unigbrk.in.h: Add prototype for new function.
85016         * lib/unigbrk/u8-grapheme-next.c: New file.
85017         * tests/unigbrk/test-u8-grapheme-next.c: New file.
85019         New module 'u16-grapheme-next'.
85020         * modules/unigbrk/u16-grapheme-next: New file.
85021         * modules/unigbrk/u16-grapheme-next-tests: New file.
85022         * lib/unigbrk.in.h: Add prototype for new function.
85023         * lib/unigbrk/u16-grapheme-next.c: New file.
85024         * tests/unigbrk/test-u16-grapheme-next.c: New file.
85026         New module 'u32-grapheme-next'.
85027         * modules/unigbrk/u32-grapheme-next: New file.
85028         * modules/unigbrk/u32-grapheme-next-tests: New file.
85029         * lib/unigbrk.in.h: Add prototype for new function.
85030         * lib/unigbrk/u32-grapheme-next.c: New file.
85031         * tests/unigbrk/test-u32-grapheme-next.c: New file.
85033         New module 'u8-grapheme-prev'.
85034         * modules/unigbrk/u8-grapheme-prev: New file.
85035         * modules/unigbrk/u8-grapheme-prev-tests: New file.
85036         * lib/unigbrk.in.h: Add prototype for new function.
85037         * lib/unigbrk/u8-grapheme-prev.c: New file.
85038         * tests/unigbrk/test-u8-grapheme-prev.c: New file.
85040         New module 'u16-grapheme-prev'.
85041         * modules/unigbrk/u16-grapheme-prev: New file.
85042         * modules/unigbrk/u16-grapheme-prev-tests: New file.
85043         * lib/unigbrk.in.h: Add prototype for new function.
85044         * lib/unigbrk/u16-grapheme-prev.c: New file.
85045         * tests/unigbrk/test-u16-grapheme-prev.c: New file.
85047         New module 'u32-grapheme-prev'.
85048         * modules/unigbrk/u32-grapheme-prev: New file.
85049         * modules/unigbrk/u32-grapheme-prev-tests: New file.
85050         * lib/unigbrk.in.h: Add prototype for new function.
85051         * lib/unigbrk/u32-grapheme-prev.c: New file.
85052         * tests/unigbrk/test-u32-grapheme-prev.c: New file.
85054         New module 'u8-grapheme-breaks'.
85055         * modules/unigbrk/u8-grapheme-breaks: New file.
85056         * modules/unigbrk/u8-grapheme-breaks-tests: New file.
85057         * lib/unigbrk.in.h: Add prototype for new function.
85058         * lib/unigbrk/u8-grapheme-breaks.c: New file.
85059         * tests/unigbrk/test-u8-grapheme-breaks.c: New file.
85061         New module 'u16-grapheme-breaks'.
85062         * modules/unigbrk/u16-grapheme-breaks: New file.
85063         * modules/unigbrk/u16-grapheme-breaks-tests: New file.
85064         * lib/unigbrk.in.h: Add prototype for new function.
85065         * lib/unigbrk/u16-grapheme-breaks.c: New file.
85066         * tests/unigbrk/test-u16-grapheme-breaks.c: New file.
85068         New module 'u32-grapheme-breaks'.
85069         * modules/unigbrk/u32-grapheme-breaks: New file.
85070         * modules/unigbrk/u32-grapheme-breaks-tests: New file.
85071         * lib/unigbrk.in.h: Add prototype for new function.
85072         * lib/unigbrk/u32-grapheme-breaks.c: New file.
85073         * tests/unigbrk/test-u32-grapheme-breaks.c: New file.
85075         New module 'ulc-grapheme-breaks'.
85076         * modules/unigbrk/ulc-grapheme-breaks: New file.
85077         * modules/unigbrk/ulc-grapheme-breaks-tests: New file.
85078         * m4/locale-ar.m4: New file.
85079         * lib/unigbrk/ulc-grapheme-breaks.c: New file.
85080         * tests/unigbrk/test-ulc-grapheme-breaks.c: New file.
85081         * tests/unigbrk/test-ulc-grapheme-breaks.sh: New file.
85083 2010-12-31  Ben Pfaff  <blp@cs.stanford.edu>
85085         gbrkprop: Fix implementation of uc_graphemeclusterbreak_property.
85086         * lib/unigbrk/gbrkprop.h: Regenerate with gen-uni-tables.c.  I had
85087         modified how this file was generated before I initially submitted
85088         the module, but failed to regenerate it.  This meant that several
85089         of the level2 entries were wrong.
85090         * lib/unigbrk/uc-gbrk-prop.h (uc_graphemeclusterbreak_property):
85091         Remove the division-by-2 that is folded into the table now that
85092         gbrkprop.h has been regenerated properly.  Now -1 entries are
85093         handled correctly.
85095         New module 'unigbrk/uc-gbrk-prop-tests'.
85096         * modules/unigbrk/uc-gbrk-prop-tests: New file.
85097         * lib/gen-uni-tables.c: Generate tests/test-uc-gbrk-prop.h.
85098         * tests/unigbrk/test-uc-gbrk-prop.c: New file.
85099         * tests/unigbrk/test-uc-gbrk-prop.h: New file.
85101 2011-01-01  Bruno Haible  <bruno@clisp.org>
85103         Avoid use of hexadecimal escapes.
85104         * tests/unigbrk/test-uc-is-grapheme-break.c (main): Use octal escapes
85105         instead of hexadecimal escapes.
85107 2011-01-01  Jim Meyering  <meyering@redhat.com>
85109         maint: new rule to update copyright year ranges
85110         * Makefile (update-copyright): New rule.
85112         maint: indent with TABs in Makefile
85113         * Makefile: Expand leading sequences of spaces to TABs
85115         version-etc: update the copyright year it reports
85116         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2011.
85118 2010-12-31  Bruno Haible  <bruno@clisp.org>
85120         isfinite: Avoid compiler bug of "cc -O" on HP-UX 11.11.
85121         * lib/isfinite.c (zerof, zerod, zerol): New variables.
85122         (gl_isfinitef, gl_isfinited, gl_isfinitel): Use them instead of literal
85123         zero.
85125 2010-12-31  Bruno Haible  <bruno@clisp.org>
85127         pwrite: Work around HP-UX 11.11 bug.
85128         * m4/pwrite.m4 (gl_FUNC_PWRITE): When pwrite exists, test whether it
85129         works and set REPLACE_PWRITE if not.
85130         * lib/pwrite.c (pwrite): Add an implementation that uses the system
85131         function.
85132         * doc/posix-functions/pwrite.texi: Document the HP-UX 11 bug.
85134 2010-12-31  Bruno Haible  <bruno@clisp.org>
85136         pread: Work around HP-UX 11 bugs.
85137         * m4/pread.m4 (gl_FUNC_PREAD): When pread exists, test whether it works
85138         and set REPLACE_PREAD if not.
85139         * doc/posix-functions/pread.texi: Document the HP-UX 11 bugs.
85141 2010-12-31  Eric Blake  <eblake@redhat.com>
85143         nl_langinfo: fix YESEXPR on Irix 6.5
85144         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Test for Irix bug.
85145         * lib/nl_langinfo.c (rpl_nl_langinfo): Work around it.
85146         * doc/posix-functions/nl_langinfo.texi (nl_langinfo): Document
85147         it.
85149 2010-12-31  Bruno Haible  <bruno@clisp.org>
85151         iconv: Document HP-UX 11 bug.
85152         * doc/posix-functions/iconv.texi: Document HP-UX 11 return value bug.
85154 2010-12-31  Bruno Haible  <bruno@clisp.org>
85156         ldexpl: Fix link error on HP-UX 11.
85157         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): When replacing ldexpl, set
85158         LDEXPL_LIBM, using $ISNANL_LIBM.
85160 2010-12-31  Eric Blake  <eblake@redhat.com>
85162         ftello: avoid compilation failure with SunStudio c89
85163         * lib/ftello.c (ftello): Use lseek, not llseek.
85165         tests: avoid failing coreutils tests on cygwin
85166         * tests/init.sh (find_exe_basenames_): Exempt [.exe.
85167         (create_exe_shims_): Return 0 when skipping.
85169 2010-12-31  Bruno Haible  <bruno@clisp.org>
85171         sys_select: Avoid warning about missing memset declaration on HP-UX 11.
85172         * lib/sys_select.in.h: On HP-UX, include also <string.h>.
85174 2010-12-31  Bruno Haible  <bruno@clisp.org>
85176         waitpid: Fix link error in C++ mode.
85177         * lib/sys_wait.in.h: Remove extern "C" { ... } group.
85179 2010-12-31  Bruno Haible  <bruno@clisp.org>
85181         isnan: Use GCC built-ins when possible.
85182         * lib/math.in.h (gl_isnan_f): Use __builtin_isnanf instead of
85183         __builtin_isnan.
85184         (gl_isnan_l): Use __builtin_isnanl instead of __builtin_isnan.
85185         (isnan): Define using GCC built-ins for GCC >= 4.0.
85187 2010-12-31  Bruno Haible  <bruno@clisp.org>
85189         isnand: Fix mistake.
85190         * m4/isnand.m4 (gl_HAVE_ISNAND_IN_LIBM): Use __builtin_isnan, not
85191         __builtin_isnand.
85193 2010-12-31  Bruno Haible  <bruno@clisp.org>
85195         open: Avoid C++ error on HP-UX 11.
85196         * lib/fcntl.in.h (open): Disable _GL_CXXALIASWARN invocation on HP-UX.
85198 2010-12-31  Bruno Haible  <bruno@clisp.org>
85200         time_r: Add missing declarations on HP-UX 11.
85201         * lib/time.in.h (localtime_r, gmtime_r): Test HAVE_DECL_LOCALTIME_R
85202         instead of HAVE_LOCALTIME_R.
85203         * m4/time_r.m4 (gl_TIME_R): Test whether localtime_r is declared. Set
85204         HAVE_LOCALTIME_R always.
85205         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize
85206         HAVE_DECL_LOCALTIME_R, not HAVE_LOCALTIME_R.
85207         * modules/time (Makefile.am): Substitute HAVE_DECL_LOCALTIME_R, not
85208         HAVE_LOCALTIME_R.
85209         * doc/posix-functions/gmtime_r.texi: Document the HP-UX 11 problem.
85210         * doc/posix-functions/localtime_r.texi: Likewise.
85212 2010-12-29  Eric Blake  <eblake@redhat.com>
85214         mountlist: tweak previous commit
85215         * lib/mountlist.c (me_remote): Guarantee trailing backslash.
85216         Reported by Paul Eggert.
85218         mountlist: fix local drive detection on cygwin
85219         * lib/mountlist.c (ME_REMOTE) [__CYGWIN__]: Provide implementation
85220         that works for cygwin.
85222 2010-12-29  Paul Eggert  <eggert@cs.ucla.edu>
85224         ftoastr, snprintf: ftoastr + snprintf module
85225         * lib/ftoastr.c: Use GNULIB_SNPRINTF, not GNULIB_SNPRINTF_POSIX,
85226         since the snprintf module now should be good enough here.
85227         * modules/snprintf (configure.ac): Add gl_MODULE_INDICATOR([snprintf]).
85228         It seems odd to have both gl_STDIO_MODULE_INDICATOR([snprintf])
85229         and gl_MODULE_INDICATOR([snprintf]), but the former enables
85230         GNULIB_SNPRINTF only for the test directory, and the latter
85231         doesn't arrange for gl_STDIO_H_DEFAULTS to be called, so neither
85232         seems to suffice by itself.
85234 2010-12-28  Paul Eggert  <eggert@cs.ucla.edu>
85236         alloca: one step towards thread-safety
85237         * lib/alloca.c (find_stack_direction): New arg PTR, to avoid the
85238         need for a static variable.  All callers changed.  This does not
85239         make the alloca replacement thread-safe, but it's one step.
85241         tests: minor indenting change
85242         * tests/init.sh: Sync from coreutils housekeeping patch
85243         <http://lists.gnu.org/r/coreutils/2010-12/msg00116.html>
85244         to keep lines within 80 columns.
85246 2010-12-28  Jim Meyering  <meyering@redhat.com>
85248         regex: don't infloop on persistent failing calloc
85249         * lib/regexec.c (build_trtable): Return failure indication upon
85250         calloc failure.  Otherwise, re_search_internal could infloop on OOM.
85251         In glibc, this was fixed for version 2.13:
85252         http://sourceware.org/bugzilla/show_bug.cgi?id=12348
85254 2010-12-28  Bruno Haible  <bruno@clisp.org>
85255             Paul Eggert <eggert@cs.ucla.edu>
85257         linkat: Make implementation robust against system behaviour variations.
85258         * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Define
85259         LINK_FOLLOWS_SYMLINKS to -1 if it needs a runtime test in the Solaris
85260         way, and to -2 if it needs a generic runtime test.
85261         * lib/linkat.c (solaris_optimized_link_immediate,
85262         solaris_optimized_link_follow): New functions.
85263         * tests/test-linkat.c (EXPECT_LINK_HARDLINKS_SYMLINKS): New macro.
85264         (check_same_link): Use it.
85266 2010-12-26  Ben Pfaff  <blp@cs.stanford.edu>
85268         New module 'unigbrk/base'.
85269         * modules/unigbrk/base: New file.
85270         * lib/unigbrk.in.h: New file.
85272         New module 'unigbrk/uc-gbrk-prop'.
85273         * lib/gen-uni-tables.c: Generate lib/unigbrk/gbrkprop.h.
85274         * modules/unigbrk/uc-gbrk-prop: New file.
85275         * lib/unigbrk/gbrkprop.h: New file.
85276         * lib/unigbrk/uc-gbrk-prop.c: New file.
85278         New module 'unigbrk/uc-is-grapheme-break'.
85279         * modules/unigbrk/uc-is-grapheme-break: New file.
85280         * modules/unigbrk/uc-is-grapheme-break-tests: New file.
85281         * lib/unigbrk/uc-is-grapheme-break.c: New file.
85282         * tests/unigbrk/test-uc-is-grapheme-break.c: New file.
85283         * tests/unigbrk/test-uc-is-grapheme-break.sh: New file.
85284         * tests/unigbrk/GraphemeBreakTest.txt: New file.
85286         With corrections and tweaks by Bruno Haible <bruno@clisp.org>.
85288 2010-12-27  Bruno Haible  <bruno@clisp.org>
85290         linkat test: Avoid failure on Solaris 11 2010-11.
85291         * tests/test-linkat.c (main): Allow ENOTDIR as alternative error code.
85293 2010-12-27  Paul Eggert  <eggert@cs.ucla.edu>
85295         utimens: work around glibc rounding bug on more platforms
85296         * lib/utimens.c (fdutimens): Work around rounding bug even if
85297         HAVE_WORKING_UTIMES.  Reported for Linux 2.4.21 by Bruno Haible in
85298         <http://lists.gnu.org/r/bug-gnulib/2010-12/msg00298.html>.
85300 2010-12-27  Bruno Haible  <bruno@clisp.org>
85302         select tests: Improve comments.
85303         * tests/test-select.c (do_select): Add comments.
85305 2010-12-27  Bruno Haible  <bruno@clisp.org>
85307         select tests: Safer way of handling timeout.
85308         * tests/test-select.c (do_select_nowait): Zero-initialize the timeout
85309         at every invocation.
85311 2010-12-27  Bruno Haible  <bruno@clisp.org>
85313         select tests: Use 'bool' where appropriate.
85314         * tests/test-select.c (connect_to_socket): Change argument type to
85315         'bool'.
85317 2010-12-27  Bruno Haible  <bruno@clisp.org>
85319         select tests: Use existing modules.
85320         * modules/select-tests (Depends-on): Add pipe-posix, unistd.
85321         (configure.ac): Don't test for unistd.h.
85322         * tests/test-select.c: Include <unistd.h> always. Use pipe() as
85323         declared in <unistd.h>.
85325 2010-12-27  Bruno Haible  <bruno@clisp.org>
85327         mbrtowc: Work around a Solaris 7 bug.
85328         * m4/mbrtowc.m4 (gl_MBRTOWC_NULL_ARG1): New macro.
85329         (gl_MBRTOWC_NULL_ARG2): Renamed from gl_MBRTOWC_NULL_ARG.
85330         (gl_FUNC_MBRTOWC): Update. Define MBRTOWC_NULL_ARG2_BUG instead of
85331         MBRTOWC_NULL_ARG_BUG. Invoke gl_MBRTOWC_NULL_ARG1 and define
85332         MBRTOWC_NULL_ARG1_BUG.
85333         * lib/mbrtowc.c (rpl_mbrtowc): Use MBRTOWC_NULL_ARG2_BUG instead of
85334         MBRTOWC_NULL_ARG_BUG. Handle MBRTOWC_NULL_ARG1_BUG.
85335         * tests/test-mbrtowc.c (main): Test support of a NULL first argument.
85336         * doc/posix-functions/mbrtowc.texi: Mention the Solaris 7 bug.
85338 2010-12-27  Jim Meyering  <meyering@redhat.com>
85340         read-file.c: tweak syntax
85341         * lib/read-file.c (fread_file): Remove space after "*" in function
85342         definitions.
85344 2010-12-27  Bruno Haible  <bruno@clisp.org>
85346         times test: Avoid gcc warnings on OSF/1.
85347         * tests/test-times.c (main): Cast printf arguments from clock_t to
85348         'long int'.
85350 2010-12-27  Paul Eggert  <eggert@cs.ucla.edu>
85352         utimens: work around glibc rounding bug on older Linux kernels
85353         * lib/utimens.c (fdutimens): If invoking futimesat or futimes
85354         on Linux with a glibc whose utimes might not work, then work
85355         around a longstanding glibc bug involving rounding rather than
85356         truncated time stamps.  Reported for Linux 2.4.21 by Bruno Haible in
85357         <http://lists.gnu.org/r/bug-gnulib/2010-11/msg00113.html>.
85359 2010-12-26  Bruno Haible  <bruno@clisp.org>
85361         inet_ntop: Hide mismatch of declaration on NonStop Kernel.
85362         * lib/arpa_inet.in.h (inet_ntop): Use _GL_CXXALIAS_SYS_CAST instead of
85363         _GL_CXXALIAS_SYS.
85364         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
85366 2010-12-26  Bruno Haible  <bruno@clisp.org>
85368         inet_ntop, inet_pton: Ensure declaration on NonStop Kernel.
85369         * lib/arpa_inet.in.h: On NonStop Kernel, include also <netdb.h>.
85370         * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Likewise.
85371         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Include also <netdb.h> when
85372         looking for the declaration.
85373         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
85374         * doc/posix-functions/inet_ntop.texi: Document the NonStop Kernel
85375         problem.
85376         * doc/posix-functions/inet_pton.texi: Likewise.
85378 2010-12-26  Bruno Haible  <bruno@clisp.org>
85380         arpa_inet: Use the common idioms with C++ support.
85381         * lib/arpa_inet.in.h: Include c++defs.h.
85382         (inet_ntop, inet_pton): Declare using the macros with C++ namespace
85383         support.
85384         * modules/arpa_inet (Depends-on): Add c++defs.
85385         (Makefile.am): Substitute the contents of c++defs.h.
85386         * modules/arpa_inet-tests (Depends-on): Add arpa_inet-c++-tests.
85387         * modules/arpa_inet-c++-tests: New file.
85388         * tests/test-arpa_inet-c++.cc: New file.
85390 2010-12-25  Bruno Haible  <bruno@clisp.org>
85392         Fix more C++ link errors on Solaris 8.
85393         * modules/fcntl-h-c++-tests (test_fcntl_h_c___LDADD): Add
85394         $(LIB_EACCESS).
85395         * modules/stdio-c++-tests (test_stdio_c___LDADD): Likewise.
85396         * modules/stdlib-c++-tests (test_stdlib_c___LDADD): Likewise.
85397         * modules/sys_ioctl-c++-tests (test_sys_ioctl_c___LDADD): Likewise.
85398         * modules/wchar-c++-tests (test_wchar_c___LDADD): Likewise.
85399         * modules/wctype-c++-tests (test_wctype_c___LDADD): Likewise.
85401 2010-12-25  Bruno Haible  <bruno@clisp.org>
85403         printf-posix: Fix link error when a non-GCC compiler is used.
85404         * lib/stdio.in.h (printf): When not using GCC, override printf
85405         correctly.
85406         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
85408 2010-12-25  Bruno Haible  <bruno@clisp.org>
85410         strerror_r-posix: Update doc.
85411         * doc/posix-functions/strerror_r.texi: Update doc about the return
85412         value. See <http://sources.redhat.com/bugzilla/show_bug.cgi?id=12204>.
85414 2010-12-25  Paul Eggert  <eggert@cs.ucla.edu>
85416         utimens: simplify the logic of the previous change
85417         * m4/utimes.m4 (gl_FUNC_UTIMES): Simplify the logic a bit.
85418         This should not affect whether the test succeeds or fails.
85420         utimens: configure better on hosts with NFS clock skew
85421         * m4/utimes.m4 (gl_FUNC_UTIMES): Don't assume that utimes (f, NULL)
85422         uses the clock of the local host.  It might use the clock of the
85423         NFS server.  Reported for Linux 2.4.21 client by Bruno Haible in
85424         <http://lists.gnu.org/r/bug-gnulib/2010-11/msg00113.html>.
85426 2010-12-25  Bruno Haible  <bruno@clisp.org>
85428         ptsname test: Avoid failure on Solaris.
85429         * tests/test-ptsname.c (main): For Solaris, use the recommended way to
85430         open a pseudo-terminal; don't use BSD-style ptys.
85431         * doc/posix-functions/ptsname.texi: Document the limitation on Solaris.
85433 2010-12-25  Bruno Haible  <bruno@clisp.org>
85435         ptsname: Avoid ERANGE failure on some systems.
85436         * lib/ptsname.c (buffer): Increase size.
85438 2010-12-25  Bruno Haible  <bruno@clisp.org>
85440         rename, renameat: Avoid test failures at NFS mounted locations.
85441         * tests/test-rename.h (assert_nonexistent): Remove the old directory,
85442         so that subsequent mkdir calls succeed.
85444 2010-12-25  Bruno Haible  <bruno@clisp.org>
85446         iswblank: Fix C++ link error on Solaris 8.
85447         * lib/wctype.in.h (iswblank): Declare using _GL_FUNCDECL_RPL or
85448         _GL_FUNCDECL_SYS.
85450 2010-12-25  Bruno Haible  <bruno@clisp.org>
85452         unistd: Fix C++ link error on Solaris 8.
85453         * modules/unistd-c++-tests (test_unistd_c___LDADD): Add $(LIB_EACCESS).
85455 2010-12-25  Bruno Haible  <bruno@clisp.org>
85457         readlink doc: Mention an old glibc bug.
85458         * doc/posix-functions/readlink.texi: Mention glibc 2.4 bug (BZ #2450).
85460 2010-12-25  Bruno Haible  <bruno@clisp.org>
85462         fcntl-h: Fix for use of C++ on glibc systems.
85463         * lib/fcntl.in.h: Include <sys/stat.h> before include_next <fcntl.h>
85464         also on glibc systems in C++ mode.
85465         Reported by Gary V. Vaughan <gary@gnu.org>.
85467 2010-12-25  Bruno Haible  <bruno@clisp.org>
85469         roundl-ieee: Make it work on OSF/1 5.1 with cc.
85470         * modules/roundl-ieee (Depends-on): Add floorl-ieee, ceill-ieee.
85472 2010-12-25  Bruno Haible  <bruno@clisp.org>
85474         truncl-ieee: Make it work on OSF/1 5.1 with cc.
85475         * doc/posix-functions/truncl.texi: Mention the OSF/1 5.1 bug.
85476         * m4/truncl.m4 (gl_FUNC_TRUNCL): If gl_FUNC_TRUNCL_IEEE is also used,
85477         test whether truncl works according to ISO C 99 with IEC 60559.
85478         * m4/truncl-ieee.m4: New file.
85479         * modules/truncl-ieee (Files): Add it and m4/minus-zero.m4,
85480         m4/signbit.m4.
85481         (configure.ac): Invoke gl_FUNC_TRUNCL_IEEE.
85483 2010-12-25  Bruno Haible  <bruno@clisp.org>
85485         ceill-ieee: Make it work on OSF/1 5.1 with cc.
85486         * doc/posix-functions/ceill.texi: Mention the OSF/1 5.1 bug.
85487         * m4/ceill.m4 (gl_FUNC_CEILL): If gl_FUNC_CEILL_IEEE is also used,
85488         test whether ceill works according to ISO C 99 with IEC 60559.
85489         * m4/ceill-ieee.m4: New file.
85490         * modules/ceill-ieee (Files): Add it and m4/minus-zero.m4,
85491         m4/signbit.m4.
85492         (configure.ac): Invoke gl_FUNC_CEILL_IEEE.
85494 2010-12-25  Bruno Haible  <bruno@clisp.org>
85496         Ensure all prerequisites of <wchar.h> are included.
85497         * m4/btowc.m4 (gl_FUNC_BTOWC): Include <stddef.h>, <stdio.h>, <time.h>
85498         before <wchar.h>.
85499         * m4/mbrlen.m4 (gl_MBRLEN_INCOMPLETE_STATE, gl_MBRLEN_RETVAL,
85500         gl_MBRLEN_NUL_RETVAL): Likewise.
85501         * m4/mbrtowc.m4 (gl_MBRTOWC_INCOMPLETE_STATE, gl_MBRTOWC_SANITYCHECK,
85502         gl_MBRTOWC_NULL_ARG, gl_MBRTOWC_RETVAL, gl_MBRTOWC_NUL_RETVAL,
85503         AC_FUNC_MBRTOWC): Likewise.
85504         * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Likewise.
85505         * m4/mbstate_t.m4 (AC_TYPE_MBSTATE_T): Likewise.
85506         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.
85507         * m4/wcsrtombs.m4 (gl_WCSRTOMBS_TERMINATION, gl_WCSRTOMBS_NULL):
85508         Likewise.
85509         * m4/wctob.m4 (gl_FUNC_WCTOB): Likewise.
85510         * m4/wchar_h.m4 (gl_WCHAR_H_INLINE_OK): Likewise.
85511         (gl_WCHAR_H): Improve comments.
85512         * m4/wctype_h.m4 (gl_WCTYPE_H): Likewise.
85514 2010-12-25  Bruno Haible  <bruno@clisp.org>
85516         strtok_r: Fix C syntax error in autoconf macro.
85517         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Don't use UTF-8 encoded U+00A0
85518         characters in test program.
85520 2010-12-24  Bruno Haible  <bruno@clisp.org>
85522         ceil, trunc, round: Fix gcc warnings.
85523         * lib/ceil.c (MIN): Undefine before redefining.
85524         * lib/trunc.c (MIN): Likewise.
85525         * lib/round.c (MIN): Likewise.
85526         Include <math.h> first.
85528 2010-12-24  Bruno Haible  <bruno@clisp.org>
85530         select tests: Avoid failures on OSF/1 5.1.
85531         * tests/test-select.c (test_accept_first, test_socket_pair): Ignore
85532         failure of closing the last socket; it may fail with ECONNRESET.
85534 2010-12-24  Eric Blake  <eblake@redhat.com>
85536         stdint: avoid HP-UX 10.20 preprocessor bug
85537         * lib/stdint.in.h (INT64_MAX, UINT64_MAX): Check via #ifdef rather
85538         than #if.
85539         * tests/test-floor2.c (main): Likewise.
85540         Reported by Peter O'Gorman.
85542         pipe: make obsoletion transition easier
85543         * lib/pipe.h: Restore file as thin shim around "spawn-pipe.h".
85544         * modules/pipe (Files): Include revived file.
85545         (Include): Drop reference, to mirror getdate's behavior.
85547 2010-12-24  Bruno Haible  <bruno@clisp.org>
85549         sys_socket: Hide mismatch of declarations on NonStop Kernel.
85550         * lib/sys_socket.in.h (connect, bind, sendto, setsockopt): Use
85551         _GL_CXXALIAS_SYS_CAST instead of _GL_CXXALIAS_SYS.
85552         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
85554 2010-12-24  Bruno Haible  <bruno@clisp.org>
85556         gethostname: Ensure declaration on NonStop Kernel.
85557         * lib/unistd.in.h: Include <netdb.h> also on NonStop Kernel systems.
85558         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
85560 2010-12-24  Bruno Haible  <bruno@clisp.org>
85562         sys_select: Ensure all necessary types on NonStop Kernel.
85563         * lib/sys_select.in.h: If the system does not have <sys/select.h>,
85564         include <sys/time.h>.
85565         * doc/posix-headers/sys_select.texi: Mention that it's missing on
85566         NonStop Kernel.
85567         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
85569 2010-12-24  Bruno Haible  <bruno@clisp.org>
85571         sys_select: Remove unneeded include.
85572         * lib/sys_select.in.h: Don't include <sys/socket.h> on platforms that
85573         have <sys/select.h>.
85575 2010-12-24  Bruno Haible  <bruno@clisp.org>
85577         gethostname: Provide a fallback for HOST_NAME_MAX.
85578         * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): When neither HOST_NAME_MAX
85579         nor MAXHOSTNAMELEN is found in the usual system headers, use 256
85580         instead.
85581         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
85583 2010-12-24  Bruno Haible  <bruno@clisp.org>
85585         sigaction tests: Allow missing SA_RESETHAND and SA_RESTART.
85586         * tests/test-sigaction.c (SA_RESETHAND): Fall back to 0.
85587         (SA_RESTART): Likewise.
85588         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
85590 2010-12-24  Bruno Haible  <bruno@clisp.org>
85592         signal: Define NSIG.
85593         * lib/signal.in.h (NSIG): Define to 32 on NonStop Kernel.
85594         * tests/test-signal.c (nsig): New variable.
85595         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
85597 2010-12-24  Bruno Haible  <bruno@clisp.org>
85599         rename, renameat: Avoid test failures on OSF/1 5.1.
85600         * tests/test-rename.h (test_rename): Allow EEXIST and ENOTDIR as
85601         alternative error codes.
85602         * tests/test-renameat.c (main): Likewise.
85604 2010-12-24  Bruno Haible  <bruno@clisp.org>
85606         *printf: Detect large precisions bug on Solaris 10/SPARC.
85607         * m4/printf.m4 (gl_PRINTF_PRECISION): Add one more test code, provided
85608         by Paul Eggert.
85609         * tests/test-snprintf-posix.h (test_function): Add this test code here
85610         too.
85611         * tests/test-sprintf-posix.h (test_function): Likewise.
85612         * tests/test-vasnprintf-posix.c (test_function): Likewise.
85613         * tests/test-vasprintf-posix.c (test_function): Likewise.
85614         * doc/posix-functions/fprintf.texi: Mention Solaris 10 bug as worked
85615         around by gnulib.
85616         * doc/posix-functions/printf.texi: Likewise.
85617         * doc/posix-functions/snprintf.texi: Likewise.
85618         * doc/posix-functions/sprintf.texi: Likewise.
85619         * doc/posix-functions/vfprintf.texi: Likewise.
85620         * doc/posix-functions/vprintf.texi: Likewise.
85621         * doc/posix-functions/vsnprintf.texi: Likewise.
85622         * doc/posix-functions/vsprintf.texi: Likewise.
85623         * doc/posix-functions/dprintf.texi: Undo last commit.
85624         * doc/posix-functions/vdprintf.texi: Likewise.
85626 2010-12-23  Paul Eggert  <eggert@cs.ucla.edu>
85628         tests: port test-fdutimensat.c to Solaris 8
85629         * tests/test-fdutimensat.c (do_fdutimens): Don't assume
85630         fdutimensat works with a nonnegative fd and AT_SYMLINK_NOFOLLOW.
85631         On Solaris 8, it fails with errno == ENOSYS, because there is no
85632         futimens (so it can't use the fd), and there is no lutimens (so it
85633         can't implement AT_SYMLINK_NOFOLLOW on symlinks).
85635         vsnprintf: make more consistent with snprintf; doc fixes
85637         * doc/posix-functions/snprintf.texi (snprintf): The workaround for
85638         the byte count return problem was promoted from the snprintf-posix
85639         to the snprintf module.
85640         * doc/posix-functions/vsnprintf.texi (vsnprintf): Likewise.
85641         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Also check
85642         gl_SNPRINTF_RETVAL_C99, for consistency with gl_FUNC_SNPRINTF.
85643         * tests/test-snprintf.c (main): Check the byte count returned.
85644         * tests/test-vsnprintf.c (main): Likewise.
85646 2010-12-23  Eric Blake  <eblake@redhat.com>
85648         sigpipe: relax to LGPLv2+, since it did not have any LGPLv3+ parts
85649         * modules/sigpipe (License): Relax license.
85651 2010-12-22  Paul Eggert  <eggert@cs.ucla.edu>
85653         doc: document Solaris printf bug with large float precisions
85654         * doc/posix-functions/dprintf.texi (dprintf):
85655         * doc/posix-functions/fprintf.texi (fprintf):
85656         * doc/posix-functions/printf.texi (printf):
85657         * doc/posix-functions/snprintf.texi (snprintf):
85658         * doc/posix-functions/sprintf.texi (sprintf):
85659         * doc/posix-functions/vdprintf.texi (vdprintf):
85660         * doc/posix-functions/vfprintf.texi (vfprintf):
85661         * doc/posix-functions/vprintf.texi (vprintf):
85662         * doc/posix-functions/vsnprintf.texi (vsnprintf):
85663         * doc/posix-functions/vsprintf.texi (vsprintf):
85664         Mention that these functions mishandle large floating point
85665         precisions on Solaris 10.  The same bug is also present in Solaris
85666         8, and I assume earlier.  This causes "cd gnulib-tests; make
85667         check" to fail on Solaris 8 (and I assume, later) when building
85668         the latest coreutils, in test-vasprintf-posix's call to
85669         my_asprintf (&result, "%.4000f %d", 1.0, 99).  I have not checked
85670         the wide flavors (e.g., wprintf) so this patch just updates the
85671         documentation for the narrow ones.
85673         test-posixtm.c: add two tests
85674         * tests/test-posixtm.c: Add two tests, to highlight the
85675         bug in Solaris 10 (and earlier) localtime.  Gnulib doesn't work
85676         around this bug; this is merely to document it.
85678 2010-12-22  Bruno Haible  <bruno@clisp.org>
85680         getlogin_r: Work around portability problem on OSF/1.
85681         * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Detect the OSF/1 problem.
85682         * lib/unistd.in.h (getlogin_r): Replace if REPLACE_GETLOGIN_R is set.
85683         * lib/getlogin_r.c (getlogin_r): When getlogin_r exists, invoke it and
85684         test for a truncated result.
85685         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_GETLOGIN_R.
85686         * modules/unistd (Makefile.am): Substitute REPLACE_GETLOGIN_R.
85687         * modules/getlogin_r (Depends-on): Add memchr.
85688         * doc/posix-functions/getlogin_r.texi: Mention the OSF/1 problem.
85690 2010-12-22  Bruno Haible  <bruno@clisp.org>
85692         ptsname: Avoid test failure on OSF/1 5.1.
85693         * modules/ptsname-tests (Depends-on): Add 'same-inode'.
85694         * tests/test-ptsname.c: Include <sys/stat.h>, same-inode.h.
85695         (same_slave): New function.
85696         (main): Use it to compare ptsname's result with the expected file name.
85698 2010-12-22  Bruno Haible  <bruno@clisp.org>
85700         Port extended stdio modules to HP NonStop Kernel.
85701         * lib/stdio-impl.h (_IOERR, _IOREAD, _IOWRT, _IORW) [__TANDEM]: New
85702         macros.
85703         * lib/fbufmode.c: Update comments.
85704         * lib/fflush.c: Likewise.
85705         * lib/fpurge.c: Likewise.
85706         * lib/freadable.c: Likewise.
85707         * lib/freadahead.c: Likewise.
85708         * lib/freading.c: Likewise.
85709         * lib/freadptr.c: Likewise.
85710         * lib/freadseek.c: Likewise.
85711         * lib/fseeko.c: Likewise.
85712         * lib/fseterr.c: Likewise.
85713         * lib/fwritable.c: Likewise.
85714         * lib/fwriting.c: Likewise.
85715         Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
85717 2010-12-22  Bruno Haible  <bruno@clisp.org>
85719         ttyname_r: Work around bug on OSF/1 5.1.
85720         * doc/posix-functions/ttyname_r.texi: Mention the OSF/1 bug.
85721         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Detect the OSF/1 bug. Say "no"
85722         instead of "guessing no" when the OSF/1 bug or the Solaris bug is
85723         present.
85724         * lib/ttyname_r.c (ttyname_r): Update comments.
85726 2010-12-22  Bruno Haible  <bruno@clisp.org>
85728         round: Implement result sign according to IEEE 754.
85729         * lib/round.c (MIN, MINUS_ZERO): New macros.
85730         (FLOOR_FREE_ROUND): Return -0.0 for -0.5 < x < 0.
85731         * tests/test-roundf-ieee.c (main): Test also values between -1 and 1.
85732         * tests/test-round-ieee.c (main): Likewise.
85733         * tests/test-roundl-ieee.c (main): Likewise.
85735         trunc: Implement result sign according to IEEE 754.
85736         * lib/trunc.c (MIN, MINUS_ZERO): New macros.
85737         (FUNC): Return +0.0 for 0 < x < 1 and -0.0 for -1 < x < 0.
85738         * tests/test-trunc2.c: Include minus-zero.h.
85739         (MINUS_ZERO): New macro.
85740         (trunc_reference): Keep in sync with lib/trunc.c.
85741         * tests/test-truncf2.c: Include minus-zero.h.
85742         (MINUS_ZERO): New macro.
85743         (truncf_reference): Keep in sync with lib/trunc.c.
85744         * tests/test-truncf-ieee.c (main): Test also values between -1 and 1.
85745         * tests/test-trunc-ieee.c (main): Likewise.
85746         * tests/test-truncl-ieee.c (main): Likewise.
85748         ceil: Implement result sign according to IEEE 754.
85749         * lib/ceil.c (MIN, MINUS_ZERO): New macros.
85750         (FUNC): Return -0.0 for -1 < x < 0.
85751         * tests/test-ceil2.c: Include minus-zero.h.
85752         (MINUS_ZERO): New macro.
85753         (ceil_reference): Keep in sync with lib/ceil.c.
85754         * tests/test-ceilf2.c: Include minus-zero.h.
85755         (MINUS_ZERO): New macro.
85756         (ceilf_reference): Keep in sync with lib/ceil.c.
85757         * tests/test-ceilf-ieee.c (main): Test also values between -1 and 1.
85758         * tests/test-ceil-ieee.c (main): Likewise.
85759         * tests/test-ceill-ieee.c (main): Likewise.
85761         floor: Implement result sign according to IEEE 754.
85762         * lib/floor.c (FUNC): Return +0.0 for 0 < x < 1.
85763         * tests/test-floor2.c (floor_reference): Keep in sync with lib/floor.c.
85764         * tests/test-floorf2.c (floorf_reference): Likewise.
85765         * tests/test-floorf-ieee.c (main): Test also values between -1 and 1.
85766         * tests/test-floor-ieee.c (main): Likewise.
85767         * tests/test-floorl-ieee.c (main): Likewise.
85769 2010-12-22  Bruno Haible  <bruno@clisp.org>
85771         getaddrinfo: Update doc.
85772         * doc/posix-functions/gai_strerror.texi: Return type is also different
85773         on AIX and HP-UX.
85775 2010-12-22  Paul Eggert  <eggert@cs.ucla.edu>
85777         getaddrinfo, inet_ntop: Update doc for Solaris.
85778         * doc/posix-functions/gai_strerror.texi: Return type is also an
85779         issue on Solaris 9 and earlier.
85780         * doc/posix-functions/inet_ntop.texi: 4th arg type is also an issue
85781         on Solaris 10 and earlier.
85783 2010-12-21  Bruno Haible  <bruno@clisp.org>
85785         New module 'roundl-ieee'.
85786         * modules/roundl-ieee: New file.
85787         * m4/roundl.m4 (gl_FUNC_ROUNDL): If gl_FUNC_ROUNDL_IEEE is also used,
85788         test whether roundl works according to ISO C 99 with IEC 60559.
85789         * m4/roundl-ieee.m4: New file.
85790         * modules/roundl-ieee-tests: New file.
85791         * tests/test-roundl-ieee.c: New file, based on tests/test-roundl.c.
85792         * tests/test-roundl.c (main): Remove signbit tests.
85793         * modules/roundl-tests (Depends-on): Remove signbit.
85794         * doc/posix-functions/roundl.texi: Mention the new module.
85796 2010-12-21  Bruno Haible  <bruno@clisp.org>
85798         New module 'truncl-ieee'.
85799         * modules/truncl-ieee: New file.
85800         * modules/truncl-ieee-tests: New file.
85801         * tests/test-truncl-ieee.c: New file, based on tests/test-truncl.c.
85802         * tests/test-truncl.c (main): Remove signbit tests.
85803         * modules/truncl-tests (Depends-on): Remove signbit.
85804         * doc/posix-functions/truncl.texi: Mention the new module.
85806 2010-12-21  Bruno Haible  <bruno@clisp.org>
85808         New module 'ceill-ieee'.
85809         * modules/ceill-ieee: New file.
85810         * modules/ceill-ieee-tests: New file.
85811         * tests/test-ceill-ieee.c: New file, based on tests/test-ceill.c.
85812         * tests/test-ceill.c (main): Remove signbit tests.
85813         * modules/ceill-tests (Depends-on): Remove signbit.
85814         * doc/posix-functions/ceill.texi: Mention the new module.
85816 2010-12-21  Bruno Haible  <bruno@clisp.org>
85818         New module 'floorl-ieee'.
85819         * modules/floorl-ieee: New file.
85820         * modules/floorl-ieee-tests: New file.
85821         * tests/test-floorl-ieee.c: New file, based on tests/test-floorl.c.
85822         * tests/test-floorl.c (main): Remove signbit tests.
85823         * modules/floorl-tests (Depends-on): Remove signbit.
85824         * doc/posix-functions/floorl.texi: Mention the new module.
85826 2010-12-21  Bruno Haible  <bruno@clisp.org>
85828         New module 'round-ieee'.
85829         * modules/round-ieee: New file.
85830         * m4/round.m4 (gl_FUNC_ROUND): If gl_FUNC_ROUND_IEEE is also used, test
85831         whether round works according to ISO C 99 with IEC 60559.
85832         * m4/round-ieee.m4: New file.
85833         * modules/round-ieee-tests: New file.
85834         * tests/test-round-ieee.c: New file, based on tests/test-roundf-ieee.c.
85835         * tests/test-round1.c (main): Remove signbit tests.
85836         * modules/round-tests (Depends-on): Remove 'signbit'.
85837         * doc/posix-functions/round.texi: Mention the new module.
85839 2010-12-21  Bruno Haible  <bruno@clisp.org>
85841         New module 'trunc-ieee'.
85842         * modules/trunc-ieee: New file.
85843         * m4/trunc.m4 (gl_FUNC_TRUNC): If gl_FUNC_TRUNC_IEEE is also used, test
85844         whether trunc works according to ISO C 99 with IEC 60559.
85845         * m4/trunc-ieee.m4: New file.
85846         * lib/math.in.h (trunc): Replace if REPLACE_TRUNC is set.
85847         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_TRUNC.
85848         * modules/math (Makefile.am): Substitute REPLACE_TRUNC.
85849         * modules/trunc-ieee-tests: New file.
85850         * tests/test-trunc-ieee.c: New file, based on tests/test-truncf-ieee.c.
85851         * tests/test-trunc1.c (main): Remove signbit tests.
85852         * modules/trunc-tests (Depends-on): Remove 'signbit'.
85853         * doc/posix-functions/trunc.texi: Mention the new module.
85855 2010-12-21  Bruno Haible  <bruno@clisp.org>
85857         New module 'ceil-ieee'.
85858         * modules/ceil-ieee: New file.
85859         * m4/ceil.m4 (gl_FUNC_CEIL): Require gl_MATH_H_DEFAULTS. If
85860         gl_FUNC_CEIL_IEEE is also used, test whether ceil works according to
85861         ISO C 99 with IEC 60559.
85862         * m4/ceil-ieee.m4: New file.
85863         * modules/ceil (Files): Add lib/ceil.c.
85864         (Depends-on): Add 'float'.
85865         (configure.ac): Invoke gl_MATH_MODULE_INDICATOR.
85866         * lib/math.in.h (ceil): New declaration.
85867         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_CEIL,
85868         REPLACE_CEIL.
85869         * modules/math (Makefile.am): Substitute GNULIB_CEIL, REPLACE_CEIL.
85870         * modules/ceil-ieee-tests: New file.
85871         * tests/test-ceil-ieee.c: New file, based on tests/test-ceilf-ieee.c.
85872         * tests/test-math-c++.cc: Check the signature of 'ceil'.
85873         * doc/posix-functions/ceil.texi: Mention the new module.
85875 2010-12-21  Bruno Haible  <bruno@clisp.org>
85877         New module 'floor-ieee'.
85878         * modules/floor-ieee: New file.
85879         * m4/floor.m4 (gl_FUNC_FLOOR): Require gl_MATH_H_DEFAULTS. If
85880         gl_FUNC_FLOOR_IEEE is also used, test whether floor works according to
85881         ISO C 99 with IEC 60559.
85882         * m4/floor-ieee.m4: New file.
85883         * modules/floor (Files): Add lib/floor.c.
85884         (Depends-on): Add 'float'.
85885         (configure.ac): Invoke gl_MATH_MODULE_INDICATOR.
85886         * lib/math.in.h (floor): New declaration.
85887         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FLOOR,
85888         REPLACE_FLOOR.
85889         * modules/math (Makefile.am): Substitute GNULIB_FLOOR, REPLACE_FLOOR.
85890         * modules/floor-ieee-tests: New file.
85891         * tests/test-floor-ieee.c: New file, based on tests/test-floorf-ieee.c.
85892         * tests/test-math-c++.cc: Check the signature of 'floor'.
85893         * doc/posix-functions/floor.texi: Mention the new module.
85895 2010-12-21  Bruno Haible  <bruno@clisp.org>
85897         New module 'roundf-ieee'.
85898         * modules/roundf-ieee: New file.
85899         * m4/roundf.m4 (gl_FUNC_ROUNDF): If gl_FUNC_ROUNDF_IEEE is also used,
85900         test whether roundf works according to ISO C 99 with IEC 60559.
85901         * m4/roundf-ieee.m4: New file.
85902         * modules/roundf-ieee-tests: New file.
85903         * tests/test-roundf-ieee.c: New file, based on tests/test-roundf1.c.
85904         * tests/test-roundf1.c (main): Remove signbit tests.
85905         * modules/roundf-tests (Depends-on): Remove 'signbit'.
85906         * doc/posix-functions/roundf.texi: Mention the new module.
85908 2010-12-21  Bruno Haible  <bruno@clisp.org>
85910         New module 'truncf-ieee'.
85911         * modules/truncf-ieee: New file.
85912         * m4/truncf.m4 (gl_FUNC_TRUNCF): If gl_FUNC_TRUNCF_IEEE is also used,
85913         test whether truncf works according to ISO C 99 with IEC 60559.
85914         * m4/truncf-ieee.m4: New file.
85915         * lib/math.in.h (truncf): Replace if REPLACE_TRUNCF is set.
85916         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_TRUNCF.
85917         * modules/math (Makefile.am): Substitute REPLACE_TRUNCF.
85918         * modules/truncf-ieee-tests: New file.
85919         * tests/test-truncf-ieee.c: New file, based on tests/test-truncf1.c.
85920         * tests/test-truncf1.c (main): Remove signbit tests.
85921         * modules/truncf-tests (Depends-on): Remove 'signbit'.
85922         * doc/posix-functions/truncf.texi: Mention the new module.
85924 2010-12-21  Bruno Haible  <bruno@clisp.org>
85926         New module 'ceilf-ieee'.
85927         * modules/ceilf-ieee: New file.
85928         * m4/ceilf.m4 (gl_FUNC_FLOORF): If gl_FUNC_CEILF_IEEE is also used,
85929         test whether ceilf works according to ISO C 99 with IEC 60559.
85930         * m4/ceilf-ieee.m4: New file.
85931         * modules/ceilf-ieee-tests: New file.
85932         * tests/test-ceilf-ieee.c: New file, based on tests/test-ceilf1.c.
85933         * tests/test-ceilf1.c (main): Remove signbit tests.
85934         * modules/ceilf-tests (Depends-on): Remove 'signbit'.
85935         * doc/posix-functions/ceilf.texi: Mention the new module.
85937 2010-12-21  Bruno Haible  <bruno@clisp.org>
85939         New module 'floorf-ieee'.
85940         * modules/floorf-ieee: New file.
85941         * m4/floorf.m4 (gl_FUNC_FLOORF): If gl_FUNC_FLOORF_IEEE is also used,
85942         test whether floorf works according to ISO C 99 with IEC 60559.
85943         * m4/floorf-ieee.m4: New file.
85944         * modules/floorf-ieee-tests: New file.
85945         * tests/test-floorf-ieee.c: New file, based on tests/test-floorf1.c.
85946         * tests/test-floorf1.c (main): Remove signbit tests.
85947         * modules/floorf-tests (Depends-on): Remove 'signbit'.
85948         * doc/posix-functions/floorf.texi: Mention the new module.
85950 2010-12-21  Bruno Haible  <bruno@clisp.org>
85952         Support for minus zero in autoconf macros.
85953         * m4/minus-zero.m4: New file, based on tests/minus-zero.h.
85954         * m4/signbit.m4 (gl_FLOAT_SIGNBIT_CODE, gl_DOUBLE_SIGNBIT_CODE,
85955         gl_LONG_DOUBLE_SIGNBIT_CODE, gl_FLOATTYPE_SIGNBIT_CODE): New macros.
85956         * tests/minus-zero.h: Update comments.
85958 2010-12-21  Bruno Haible  <bruno@clisp.org>
85960         Tests for module 'ceil'.
85961         * modules/ceil-tests: New file.
85962         * tests/test-ceil1.c: New file, based on tests/test-ceill.c.
85963         * tests/test-ceil2.c: New file, based on tests/test-ceilf2.c.
85965 2010-12-21  Bruno Haible  <bruno@clisp.org>
85967         Tests for module 'floor'.
85968         * modules/floor-tests: New file.
85969         * tests/test-floor1.c: New file, based on tests/test-floorl.c.
85970         * tests/test-floor2.c: New file, based on tests/test-floorf2.c.
85972 2010-12-21  Bruno Haible  <bruno@clisp.org>
85974         math: Fix indentation.
85975         * lib/math.in.h (floorf): Fix indentation.
85977 2010-12-21  Bruno Haible  <bruno@clisp.org>
85979         Fix cross-compilation guesses on Solaris.
85980         * m4/fopen.m4 (gl_FUNC_FOPEN): Correct shell pattern so that it does
85981         not match "solaris2.10".
85982         * m4/open.m4 (gl_FUNC_OPEN): Likewise.
85983         * m4/printf.m4 (gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_DIRECTIVE_N,
85984         gl_VSNPRINTF_ZEROSIZE_C99): Likewise.
85986 2010-12-21  Paul Eggert  <eggert@cs.ucla.edu>
85988         snprintf: port snprintf (NULL, 0, ...) to Solaris 8 and 9
85989         This fixes a problem observed with the latest coreutils snapshot
85990         that caused a test to fail on Solaris 8.  src/csplit.c's call
85991         snprintf (NULL, 0, format, UINT_MAX) returns -1 on Solaris 9 and
85992         earlier, instead of returning the number of bytes that would have
85993         been generated; this causes csplit to incorrectly report memory
85994         exhaustion.
85995         * m4/printf.m4 (gl_SNPRINTF_RETVAL_C99): Also check for
85996         snprintf (NULL, 0, ...) and (for good measure) snprintf (buf, 0, ...).
85997         Guess that it doesn't work on Solaris 2.6 through 9.  Adjust
85998         comments to match.
85999         (gl_PRINTF_SIZES_C99, gl_PRINTF_DIRECTIVE_F, gl_SNPRINTF_RETVAL_C99):
86000         Fix typo in matching older versions of Solaris: "solaris2.10"
86001         is matched by the shell pattern "solaris2.[0-9]*".  This matters
86002         only for guessing while cross-compiling.
86003         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Also check gl_SNPRINTF_RETVAL_C99.
86005 2010-12-20  Paul Eggert  <eggert@cs.ucla.edu>
86007         ftoastr: fix comment again
86008         * lib/ftoastr.h: Fix typo in comment.  Noted by Ben Pfaff in
86009         <http://lists.gnu.org/r/bug-gnulib/2010-12/msg00149.html>.
86010         Also, simplify example a bit by using flags = 0.
86012 2010-12-20  Bruno Haible  <bruno@clisp.org>
86014         round*, trunc*: Update documentation regarding glibc.
86015         * doc/posix-functions/roundf.texi: Mention missing declaration problem.
86016         * doc/posix-functions/round.texi: Likewise.
86017         * doc/posix-functions/roundl.texi: Likewise.
86018         * doc/posix-functions/truncf.texi: Likewise.
86019         * doc/posix-functions/trunc.texi: Likewise.
86020         * doc/posix-functions/truncl.texi: Likewise.
86022 2010-12-20  Bruno Haible  <bruno@clisp.org>
86024         roundf, round, roundl: Update documentation regarding OSF/1 5.1.
86025         * doc/posix-functions/roundf.texi: Mention OSF/1 5.1 problem.
86026         * doc/posix-functions/round.texi: Likewise.
86027         * doc/posix-functions/roundl.texi: Likewise.
86029 2010-12-20  Bruno Haible  <bruno@clisp.org>
86031         ttyname_r: Add missing declaration on HP-UX 11.
86032         * lib/unistd.in.h (ttyname_r): Test HAVE_DECL_TTYNAME_R instead of
86033         HAVE_TTYNAME_R.
86034         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Test whether ttyname_r is
86035         declared. Set HAVE_TTYNAME_R always.
86036         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
86037         HAVE_DECL_TTYNAME_R, not HAVE_TTYNAME_R.
86038         * modules/unistd (Makefile.am): Substitute HAVE_DECL_TTYNAME_R, not
86039         HAVE_TTYNAME_R.
86040         * doc/posix-functions/ttyname_r.texi: Document the HP-UX 11 problem.
86042 2010-12-20  Bruno Haible  <bruno@clisp.org>
86044         getlogin, getlogin_r: Document HP-UX 11.11 bugs.
86045         * doc/posix-functions/getlogin.texi: Document HP-UX 11.11 bug.
86046         * doc/posix-functions/getlogin_r.texi: Likewise.
86047         * tests/test-getlogin.c: Include <errno.h>.
86048         (main): Avoid test failure on HP-UX 11.11.
86049         * tests/test-getlogin_r.c (main): Likewise.
86051 2010-12-20  Bruno Haible  <bruno@clisp.org>
86053         getlogin_r: Add missing declaration on HP-UX 11.
86054         * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Test whether getlogin_r is
86055         declared also when it exists as a function.
86056         * doc/posix-functions/getlogin_r.texi: Document this workaround.
86058 2010-12-20  Bruno Haible  <bruno@clisp.org>
86060         wcsrtombs: Don't confuse mbstate_t with rpl_mbstate_t.
86061         * lib/wcsrtombs.c: If gnulib overrides mbstate_t, define wcsrtombs
86062         through wcrtomb.
86064 2010-12-19  Paul Eggert  <eggert@cs.ucla.edu>
86066         ftoastr: fix comment
86067         * lib/ftoastr.h: Fix typo in comment.  Noted by Ben Pfaff in
86068         <http://lists.gnu.org/r/bug-gnulib/2010-12/msg00130.html>.
86070 2010-12-19  Bruno Haible  <bruno@clisp.org>
86072         isnan: Ensure it is a macro.
86073         * lib/math.in.h (isnan): Define as a macro if not already a macro.
86074         * doc/posix-functions/isnan.texi: Mention problem on IRIX, OSF/1,
86075         Solaris.
86077 2010-12-19  Bruno Haible  <bruno@clisp.org>
86079         ldexpl test: Fix link error on OSF/1 5.1.
86080         * modules/ldexpl-tests (Makefile.am): Define test_ldexpl_LDADD.
86082 2010-12-19  Bruno Haible  <bruno@clisp.org>
86084         wctype: Make it work in C++ mode on OSF/1 5.1.
86085         * lib/wctype.in.h (iswblank): Declare but not define here.
86086         * lib/iswblank.c: New file, extracted from lib/wctype.in.h.
86087         * m4/wctype_h.m4 (gl_WCTYPE_H): Arrange to compile it if needed.
86088         * modules/wctype (Files): Add lib/iswblank.c.
86090 2010-12-19  Bruno Haible  <bruno@clisp.org>
86092         signal: Document problem with type of SIGRTMIN, SIGRTMAX on OSF/1 5.1.
86093         * doc/posix-headers/signal.texi: Document OSF/1 5.1 problem.
86094         * lib/strsignal.c (strsignal): Cast SIGRTMIN to 'int'.
86096 2010-12-19  Bruno Haible  <bruno@clisp.org>
86098         sys_socket: Use POSIX compatible declarations on OSF/1 5.1.
86099         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): On OSF/1, define
86100         _POSIX_PII_SOCKET.
86101         * doc/posix-functions/recv.texi: Document the OSF/1 problem.
86102         * doc/posix-functions/recvfrom.texi: Likewise.
86103         * doc/posix-functions/send.texi: Likewise.
86104         * doc/posix-functions/sendto.texi: Likewise.
86106 2010-12-19  Bruno Haible  <bruno@clisp.org>
86108         tcgetsid: Add missing declaration on OSF/1 5.1.
86109         * lib/termios.in.h (tcgetsid): Test HAVE_DECL_TCGETSID instead of
86110         HAVE_TCGETSID.
86111         * m4/tcgetsid.m4 (gl_FUNC_TCGETSID): Test whether tcgetsid is declared.
86112         Don't set HAVE_TCGETSID.
86113         * m4/termios_h.m4 (gl_TERMIOS_H_DEFAULTS): Initialize
86114         HAVE_DECL_TCGETSID, not HAVE_TCGETSID.
86115         * modules/termios (Makefile.am): Substitute HAVE_DECL_TCGETSID, not
86116         HAVE_TCGETSID.
86117         * doc/posix-functions/tcgetsid.texi: Mention the OSF/1 5.1 problem.
86119 2010-12-19  Bruno Haible  <bruno@clisp.org>
86121         stdio: Fix problem with popen() declaration on OSF/1 5.1.
86122         * lib/stdio.in.h: During the include_next statement, let recursive
86123         includes of this file include only the system header file.
86125 2010-12-19  Bruno Haible  <bruno@clisp.org>
86127         iconv_open: Fix regression from 2010-12-04.
86128         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN_UTF): Fix typo.
86129         Reported by Noah Lavine <noah.b.lavine@gmail.com>.
86131 2010-12-19  Bruno Haible  <bruno@clisp.org>
86133         stdbool test: Avoid a gcc warning.
86134         * tests/test-stdbool.c (main): Fail if e1 is false.
86135         Reported by Jim Meyering.
86137 2010-12-19  Jim Meyering  <meyering@redhat.com>
86139         setenv: restore to working order
86140         $HAVE_SETENV is used in gl_FUNC_SETENV, yet its definitions were
86141         mistakenly removed.
86142         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Restore code to set
86143         HAVE_SETENV.
86144         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Restore code to initialize
86145         HAVE_SETENV.
86147 2010-12-19  Bruno Haible  <bruno@clisp.org>
86149         Document some different function declarations on OSF/1 5.1.
86150         * doc/posix-functions/gai_strerror.texi: Mention different declaration.
86151         * doc/posix-functions/inet_ntop.texi: Likewise.
86152         * doc/posix-functions/gethostname.texi: Likewise.
86153         * lib/unistd.in.h (gethostname): Update comment.
86155 2010-12-19  Bruno Haible  <bruno@clisp.org>
86157         doc: Mention vasprintf-posix module.
86158         * doc/glibc-functions/asprintf.texi: Mention the workarounds present in
86159         the 'vasprintf-posix' module.
86160         * doc/glibc-functions/vasprintf.texi: Likewise.
86162 2010-12-19  Bruno Haible  <bruno@clisp.org>
86164         unsetenv: Add missing declaration on OSF/1 5.1.
86165         * lib/stdlib.in.h (setenv): Test HAVE_DECL_UNSETENV, not HAVE_UNSETENV.
86166         * m4/setenv.m4 (gl_FUNC_UNSETENV): Test whether unsetenv is declared.
86167         Don't set HAVE_UNSETENV. In the test program, set _BSD.
86168         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_DECL_UNSETENV,
86169         not HAVE_UNSETENV.
86170         * modules/stdlib (Makefile.am): Substitute HAVE_DECL_UNSETENV, not
86171         HAVE_UNSETENV.
86172         * doc/posix-functions/unsetenv.texi: Mention the OSF/1 5.1 problem.
86174 2010-12-19  Bruno Haible  <bruno@clisp.org>
86176         setenv: Add missing declaration on OSF/1 5.1.
86177         * lib/stdlib.in.h (setenv): Test HAVE_DECL_SETENV, not HAVE_SETENV.
86178         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Test whether setenv is
86179         declared. Don't set HAVE_SETENV.
86180         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_DECL_SETENV,
86181         not HAVE_SETENV.
86182         * modules/stdlib (Makefile.am): Substitute HAVE_DECL_SETENV, not
86183         HAVE_SETENV.
86184         * doc/posix-functions/setenv.texi: Mention the OSF/1 5.1 problem.
86186 2010-12-19  Bruno Haible  <bruno@clisp.org>
86188         nl_langinfo tests: Avoid gcc warning.
86189         * tests/test-nl_langinfo.c: Don't enable the GCC pragma for GCC 4.2.
86191 2010-12-19  Bruno Haible  <bruno@clisp.org>
86193         mknod: Avoid error in C++ mode on OSF/1 with GCC.
86194         * lib/sys_stat.in.h (mknod): Use _GL_CXXALIAS_SYS_CAST instead of
86195         _GL_CXXALIAS_SYS.
86197 2010-12-19  Bruno Haible  <bruno@clisp.org>
86199         stdbool: Relax test.
86200         * tests/test-stdbool.c (e): Don't require that casts from a variable's
86201         address to 'bool' work in static initializer, for compilers other than
86202         GCC.
86204 2010-12-19  Bruno Haible  <bruno@clisp.org>
86206         ftello: Add missing declaration on OSF/1 5.1.
86207         * lib/stdio.in.h (ftello): Test HAVE_DECL_FTELLO, not HAVE_FTELLO.
86208         * m4/ftello.m4 (gl_FUNC_FTELLO): Test whether ftello is declared.
86209         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_FTELLO.
86210         * modules/stdio (Makefile.am): Substitute HAVE_DECL_FTELLO.
86211         * doc/posix-functions/ftello.texi: Mention the OSF/1 5.1 problem.
86213 2010-12-19  Bruno Haible  <bruno@clisp.org>
86215         fseeko: Add missing declaration on OSF/1 5.1.
86216         * lib/stdio.in.h (fseeko): Test HAVE_DECL_FSEEKO, not HAVE_FSEEKO.
86217         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Test whether fseeko is declared.
86218         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_FSEEKO.
86219         * modules/stdio (Makefile.am): Substitute HAVE_DECL_FSEEKO.
86220         * doc/posix-functions/fseeko.texi: Mention the OSF/1 5.1 problem.
86222 2010-12-19  Bruno Haible  <bruno@clisp.org>
86224         fchdir: Add missing declaration on OSF/1 5.1.
86225         * lib/unistd.in.h (fchdir): Provide declaration if systems lacks it.
86226         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Check whether fchdir is declared.
86227         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize HAVE_DECL_FCHDIR.
86228         * modules/unistd (Makefile.am): Substitute HAVE_DECL_FCHDIR.
86229         * doc/posix-functions/fchdir.texi: Mention the OSF/1 5.1 problem.
86231 2010-12-19  Bruno Haible  <bruno@clisp.org>
86233         relocatable-prog-wrapper: Separate from relocatable-prog.
86234         * modules/relocatable-prog (Makefile.am): Define uninstall-hook and
86235         uninstall-relocwrapper rule here.
86236         * modules/relocatable-prog-wrapper (Makefile.am): ... not here.
86237         Reported by Ian Beckwith <ianb@erislabs.net>.
86239 2010-12-19  Bruno Haible  <bruno@clisp.org>
86241         unistr/u8-mbsnlen: Add missing dependency.
86242         * modules/unistr/u8-mbsnlen (Depends-on): Add unistr/u8-mbtouc.
86243         Reported by Ian Beckwith <ianb@erislabs.net>.
86245 2010-12-19  Bruno Haible  <bruno@clisp.org>
86247         iconv: Make it possible again to use this module without 'iconv-h'.
86248         * modules/iconv (configure.ac): Don't invoke gl_ICONV_MODULE_INDICATOR
86249         if it is not defined.
86250         Reported by Ian Beckwith <ianb@erislabs.net>.
86252 2010-12-18  Paul Eggert  <eggert@cs.ucla.edu>
86254         acl: port to Solaris 8 when copying from tmpfs to ufs
86255         * lib/copy-acl.c (qcopy_acl): Also allow EINVAL as an ignorable
86256         error number.  Problem observed on Solaris 8 with latest
86257         coreutils, with "mv A B", where A is on a tmpfs file system and B
86258         is on a ufs file system.  This caused coreutils' mv/part-symlink
86259         test to fail.
86261         tests: set fail=0 at start
86262         * tests/init.sh (setup_): Move fail=0 initialization here ...
86263         (mktempd_): ... from here, so that tests can rely on fail being
86264         set to 0 initially.  This fixes a problem in coreutils; see:
86265         http://lists.gnu.org/r/coreutils/2010-12/msg00083.html
86267 2010-12-18  Bruno Haible  <bruno@clisp.org>
86269         memmem-simple: Stylistic changes.
86270         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): Avoid possible gcc warning.
86271         Fix preprocessor directive indentation.
86273 2010-12-15  Pádraig Brady  <P@draigBrady.com>
86275         memmem, memmem-simple: reorganize and expand empty needle check
86276         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE, gl_FUNC_MEMMEM): Move all
86277         functional checks to memmem-simple so that one has a fully functional
86278         memmem by using just this module.
86279         Restrict the performance only check to the memmem module.
86280         Also expand the empty needle check to ensure the correct
86281         pointer is returned, not just a non NULL pointer.
86282         * doc/glibc-functions/memmem.texi: Rearrange the portability
86283         documentation to correlate with the rearranged checks.
86284         Clarify exactly how the memmem and memmem-simple modules
86285         relate to each other.
86287 2010-12-15  Pádraig Brady  <P@draigBrady.com>
86288             Bruno Haible  <bruno@clisp.org>
86290         Improve cross-compilation guesses for uClibc.
86291         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): When cross-compiling, assume
86292         that uClibc does not have the glibc bug.
86293         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Likewise.
86294         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): Likewise.
86296 2010-12-14  Eric Blake  <eblake@redhat.com>
86298         configmake: provide fallbacks for oldest supported autotools
86299         * m4/configmake.m4: New file.
86300         * modules/configmake (Files): Ship it.
86301         (configure.ac): Use it to guarantee fallbacks.
86303 2010-12-13  Pádraig Brady  <P@draigBrady.com>
86305         read-file: Improve handling of large files
86306         * lib/read-file.c (fread_file): Minimize realloc()s
86307         for regular files, and better manage sizes around SIZE_MAX.
86309 2010-12-13  Eric Blake  <eblake@redhat.com>
86311         cloexec, fcntl: relax license
86312         * modules/cloexec (License): Change from LGPLv3+ to LGPLv2+, with
86313         consent from all contributors.
86314         * modules/fcntl (License): Likewise.
86316 2010-12-10  Bruno Haible  <bruno@clisp.org>
86318         Tests for module 'pipe-posix'.
86319         * modules/pipe-posix-tests: New file.
86320         * tests/test-pipe.c: New file, based on tests/test-pipe2.c.
86322 2010-12-10  Bruno Haible  <bruno@clisp.org>
86324         pipe-posix: Make it work in C++ mode.
86325         * lib/unistd.in.h: Don't include <io.h>, <fcntl.h> for pipe.
86326         (pipe): Use common idiom, not a macro definition.
86327         * lib/pipe.c: New file.
86328         * m4/pipe.m4: New file.
86329         * modules/pipe-posix (Description): Enhance.
86330         (Files): Add lib/pipe.c, m4/pipe.m4.
86331         (configure.ac): Invoke gl_FUNC_PIPE.
86332         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize HAVE_PIPE.
86333         * modules/unistd (Makefile.am): Substitute HAVE_PIPE.
86334         * tests/test-unistd-c++.cc: Check the signature of pipe.
86336 2010-12-10  Bruno Haible  <bruno@clisp.org>
86338         Rename module 'pipe' to 'spawn-pipe'.
86339         * modules/spawn-pipe: New file, renamed from modules/pipe.
86340         (Files, configure.ac, Makefile.am): Update.
86341         (Include): Mention "spawn-pipe.h" instead of "pipe.h".
86342         * modules/pipe: Reduce to an obsolete indirection to 'spawn-pipe'.
86343         * lib/spawn-pipe.h: New file, renamed from lib/pipe.h.
86344         * lib/spawn-pipe.c: New file, renamed from lib/pipe.c. Include
86345         "spawn-pipe.h" instead of "pipe.h".
86346         * m4/spawn-pipe.m4: New file, renamed from m4/pipe.m4. Rename gl_PIPE
86347         to gl_SPAWN_PIPE.
86348         * modules/spawn-pipe-tests: New file, renamed from modules/pipe-tests.
86349         (Files, Makefile.am): Update.
86350         * tests/test-spawn-pipe.sh: New file, renamed from tests/test-pipe.sh.
86351         Update.
86352         * tests/test-spawn-pipe.c: New file, renamed from tests/test-pipe.c.
86353         Include "spawn-pipe.h" instead of "pipe.h".
86354         * lib/csharpcomp.c: Include "spawn-pipe.h" instead of "pipe.h".
86355         * lib/javacomp.c: Likewise.
86356         * lib/javaversion.c: Likewise.
86357         * lib/pipe-filter-gi.c: Likewise.
86358         * lib/pipe-filter-ii.c: Likewise.
86359         * modules/csharpcomp (Depends-on): Add 'spawn-pipe', remove 'pipe'.
86360         * modules/javacomp (Depends-on): Likewise.
86361         * modules/javaversion (Depends-on): Likewise.
86362         * modules/pipe-filter-gi (Depends-on): Likewise.
86363         * modules/pipe-filter-ii (Depends-on): Likewise.
86364         * MODULES.html.sh (Executing programs): Update.
86365         * NEWS: Mention the change.
86367 2010-12-10  Eric Blake  <eblake@redhat.com>
86369         pipe-posix: new module
86370         * modules/pipe-posix: New file.
86371         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set default.
86372         (gl_UNISTD_H): Check for declaration.
86373         * modules/unistd (Makefile.am): Substitute it.
86374         * lib/unistd.in.h (pipe): Provide it for mingw.
86375         * doc/posix-functions/pipe.texi (pipe): Update documentation.
86376         * MODULES.html.sh (File descriptor based Input/Output): Likewise.
86378 2010-12-07  Bruno Haible  <bruno@clisp.org>
86380         unistr/u8-strcmp: Avoid collision with libc function on Solaris 11.
86381         * lib/unistr.in.h (u8_strcmp) [__sun]: Declare with real name
86382         u8_strcmp_gnu.
86383         * modules/unistr/u8-strcmp (configure.ac): Bump version number.
86385 2010-12-06  Bruno Haible  <bruno@clisp.org>
86387         Update internal documentation.
86388         * m4/README: Document new idioms for AC_RUN_IFELSE invocations.
86390 2010-12-04  Bruno Haible  <bruno@clisp.org>
86392         Put more information about failed tests into the test return codes.
86393         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Change test
86394         program so that it returns an enumerated value (0, 1, 2, 3, 4, ...).
86395         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
86396         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
86397         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Likewise.
86398         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
86399         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
86400         * m4/intdiv0.m4 (gt_INTDIV0): Likewise.
86401         * m4/isapipe.m4 (gl_PREREQ_ISAPIPE): Likewise.
86402         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
86403         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Likewise.
86404         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
86405         * m4/sleep.m4 (gl_FUNC_SLEEP): Likewise.
86406         * m4/stdint.m4 (gl_STDINT_H): Likewise.
86407         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Change test program so that it
86408         returns a bit mask.
86409         * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Likewise.
86410         * m4/chown.m4 (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): Likewise.
86411         * m4/dup2.m4 (gl_FUNC_DUP2): Likewise.
86412         * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Likewise.
86413         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Likewise.
86414         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Likewise.
86415         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
86416         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Likewise.
86417         * m4/iconv.m4 (AM_ICONV_LINK): Likewise.
86418         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN_UTF): Likewise.
86419         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Likewise.
86420         * m4/isnanf.m4 (gl_ISNANF_WORKS): Likewise.
86421         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Likewise.
86422         * m4/ldexpl.m4 (gl_FUNC_LDEXPL_WORKS): Likewise.
86423         * m4/link.m4 (gl_FUNC_LINK): Likewise.
86424         * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise.
86425         * m4/mbrlen.m4 (gl_MBRLEN_RETVAL): Likewise.
86426         * m4/mbrtowc.m4 (gl_MBRTOWC_RETVAL): Likewise.
86427         * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Likewise.
86428         * m4/memchr.m4 (gl_FUNC_MEMCHR): Likewise.
86429         * m4/memmem.m4 (gl_FUNC_MEMMEM): Likewise.
86430         * m4/mkfifo.m4 (gl_FUNC_MKFIFO): Likewise.
86431         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise.
86432         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
86433         * m4/open.m4 (gl_FUNC_OPEN): Likewise.
86434         * m4/poll.m4 (gl_FUNC_POLL): Likewise.
86435         * m4/popen.m4 (gl_FUNC_POPEN): Likewise.
86436         * m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_LONG_DOUBLE,
86437         gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE,
86438         gl_PRINTF_DIRECTIVE_A, gl_PRINTF_DIRECTIVE_F, gl_PRINTF_DIRECTIVE_LS,
86439         gl_PRINTF_PRECISION): Likewise.
86440         * m4/regex.m4 (gl_REGEX): Likewise.
86441         * m4/rename.m4 (gl_FUNC_RENAME): Likewise.
86442         * m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise.
86443         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Likewise.
86444         * m4/stat.m4 (gl_FUNC_STAT): Likewise.
86445         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
86446         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
86447         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Likewise.
86448         * m4/strsignal.m4 (gl_FUNC_STRSIGNAL): Likewise.
86449         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
86450         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
86451         * m4/symlink.m4 (gl_FUNC_SYMLINK): Likewise.
86452         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Likewise.
86453         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Likewise.
86454         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
86455         * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise.
86456         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise.
86457         * m4/utimes.m4 (gl_FUNC_UTIMES): Likewise.
86458         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.
86459         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
86460         * m4/signbit.m4 (gl_SIGNBIT_TEST_PROGRAM): Likewise.
86461         (gl_FLOATTYPE_SIGN_LOCATION): Change test program so that it returns an
86462         enumerated value.
86463         * m4/acl.m4 (gl_ACL_GET_FILE): Use "if ... return 1; return 0;" style.
86465 2010-12-04  Bruno Haible  <bruno@clisp.org>
86467         Update for Solaris 11 2010-11.
86468         * doc/{glibc,posix}-{functions,headers}: Add info about Solaris 11
86469         Express, released in November 2010.
86471 2010-12-04  Bruno Haible  <bruno@clisp.org>
86473         nproc: Relax license.
86474         * modules/nproc (License): Change to LGPL, with consent by Glen Lenker
86475         and Paul Eggert.
86476         Requested by Ludovic Courtès <ludo@gnu.org>.
86478 2010-12-01  Paul Eggert  <eggert@cs.ucla.edu>
86480         utimecmp: fine-grained src to nearby coarse-grained dest
86482         * lib/utimecmp.c (utimecmp): When UTIMECMP_TRUNCATE_SOURCE is set,
86483         and the source is on a file system with higher-resolution time
86484         stamps, than the destination, and _PC_TIMESTAMP_RESOLUTION does
86485         not work, and the time stamps are close together, the algorithm to
86486         determine the exact resolution from the read-back mtime was buggy:
86487         it had a "!=" where it should have had an "==".  This bug has been
86488         in the code ever since it was introduced to gnulib.
86489         Problem reported by Dan Jacobson in
86490         <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7529>.
86492 2010-11-30  Bruno Haible  <bruno@clisp.org>
86494         strerror_r-posix: Fix autoconf test.
86495         * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Fix typo.
86497 2010-11-28  Bruno Haible  <bruno@clisp.org>
86498             Paul Eggert  <eggert@cs.ucla.edu>
86500         Tests for module 'getdomainname'.
86501         * modules/getdomainname-tests: New file.
86502         * tests/test-getdomainname.c: New file, based on
86503         tests/test-gethostname.c.
86505 2010-11-28  Bruno Haible  <bruno@clisp.org>
86506             Paul Eggert  <eggert@cs.ucla.edu>
86508         getdomainname: Use the system function when possible.
86509         * lib/unistd.in.h: Include <netdb.h>, for getdomainname's declaration.
86510         (getdomainname): Replace if needed. Provide the declaration if it is
86511         missing. Don't use _GL_CXXALIAS_SYS_CAST.
86512         * lib/getdomainname.c: Include <limits.h> and <sys/systeminfo.h>.
86513         (getdomainname): When the system has getdomainname, call the system
86514         function. When sysinfo (SI_SRPC_DOMAIN, ...) is possible, use that.
86515         * m4/getdomainname.m4 (gl_FUNC_GETDOMAINNAME): Require
86516         gl_HEADER_SYS_SOCKET and gl_HEADER_NETDB. Test whether the function is
86517         found in libnsl. Look for the declaration also in <netdb.h>. Replace
86518         the function if its second argument is of type 'int' or if it is found
86519         in libnsl.
86520         (gl_PREREQ_GETDOMAINNAME): Define HAVE_GETDOMAINNAME. Check for
86521         <sys/systeminfo.h> and sysinfo().
86522         * modules/getdomainname (Depends-on): Add netdb, sys_socket.
86523         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
86524         HAVE_DECL_GETDOMAINNAME and REPLACE_GETDOMAINNAME instead of
86525         HAVE_GETDOMAINNAME.
86526         * modules/unistd (Makefile.am): Substitute HAVE_DECL_GETDOMAINNAME and
86527         REPLACE_GETDOMAINNAME instead of HAVE_GETDOMAINNAME.
86528         * doc/glibc-functions/getdomainname.texi: Document the problems with
86529         the getdomainname declaration.
86531 2010-11-28  Bruno Haible  <bruno@clisp.org>
86533         sys_socket: Ensure ss_family field on AIX.
86534         * lib/sys_socket.in.h (ss_family): New macro definition.
86535         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Set
86536         HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY. Set SYS_SOCKET_H if necessary.
86537         (gl_SYS_SOCKET_H_DEFAULTS): Initialize
86538         HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY.
86539         * modules/sys_socket (Makefile.am): Substitute
86540         HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY.
86541         * doc/posix-headers/sys_socket.texi: Mention the AIX bug.
86543 2010-11-27  Bruno Haible  <bruno@clisp.org>
86545         readline: Improve configure output.
86546         * m4/readline.m4 (gl_FUNC_READLINE): Make the
86547         "checking for readline..." result understandable.
86549 2010-11-27  Bruno Haible  <bruno@clisp.org>
86551         *printf-posix: Detect a bug on Solaris 10/x86.
86552         * m4/printf.m4 (gl_PRINTF_PRECISION): Detect crash with large precision
86553         for floating-point output.
86554         * tests/test-vasnprintf-posix.c (test_function): Test precision with %f
86555         directive.
86556         * tests/test-snprintf-posix.h (test_function): Likewise.
86557         * tests/test-sprintf-posix.h (test_function): Likewise.
86558         * tests/test-vasprintf-posix.c (test_function): Likewise.
86559         * doc/posix-functions/fprintf.texi: Mention Solaris/x86 bug.
86560         * doc/posix-functions/printf.texi: Likewise.
86561         * doc/posix-functions/snprintf.texi: Likewise.
86562         * doc/posix-functions/sprintf.texi: Likewise.
86563         * doc/posix-functions/vfprintf.texi: Likewise.
86564         * doc/posix-functions/vprintf.texi: Likewise.
86565         * doc/posix-functions/vsnprintf.texi: Likewise.
86566         * doc/posix-functions/vsprintf.texi: Likewise.
86567         * doc/glibc-functions/obstack_printf.texi: Likewise.
86568         * doc/glibc-functions/obstack_vprintf.texi: Likewise.
86570 2010-11-27  Bruno Haible  <bruno@clisp.org>
86572         Fix link error when module libunistring-optional is in use.
86573         * modules/striconveh-tests (Makefile.am): Link with $(LIBUNISTRING).
86574         * modules/striconveha-tests (Makefile.am): Likewise.
86576 2010-11-27  Bruno Haible  <bruno@clisp.org>
86578         regex: Mention link dependencies.
86579         * modules/regex (Link): New section.
86580         * modules/rpmatch (Link): Likewise.
86581         * modules/regex-quote-tests (Makefile.am): Link with $(LIBINTL).
86583 2010-11-27  Bruno Haible  <bruno@clisp.org>
86585         ftoastr: Fix compilation error on Solaris.
86586         * lib/ftoastr.c: Include <config.h>.
86588 2010-11-27  Bruno Haible  <bruno@clisp.org>
86590         getloadavg: Update documentation.
86591         * doc/glibc-functions/getloadavg.texi: Mention the Solaris problem.
86593 2010-11-27  Bruno Haible  <bruno@clisp.org>
86595         sys_socket: Fix test whether the functions are declared.
86596         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Include <sys/socket.h>,
86597         not <sys/select.h>.
86599 2010-11-27  Bruno Haible  <bruno@clisp.org>
86601         getpass: Make sure to get system declaration on some platforms.
86602         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU): Require
86603         gl_USE_SYSTEM_EXTENSIONS.
86604         * modules/getpass (Depends-on): Add extensions.
86606 2010-11-26  Bruno Haible  <bruno@clisp.org>
86608         iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
86609         * lib/iconv.in.h (iconv_open, iconv, iconv_close): Define only if the
86610         'iconv' module is present.
86611         (ICONV_CONST): New macro.
86612         * m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS): Initialize GNULIB_ICONV and
86613         ICONV_CONST.
86614         * m4/iconv.m4 (AM_ICONV): If the gnulib module 'iconv-h' is present,
86615         set ICONV_CONST.
86616         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN_UTF): Don't set ICONV_CONST
86617         here.
86618         * modules/iconv (configure.ac): Invoke gl_ICONV_MODULE_INDICATOR.
86619         * modules/iconv-h (Makefile.am): Substitute GNULIB_ICONV.
86620         * tests/test-iconv-h.c (ICONV_CONST): Don't define here.
86621         * tests/test-iconv-h-c++.cc (ICONV_CONST): Don't define here.
86622         (iconv_open, iconv, iconv_close): Test only if the 'iconv' module is
86623         present.
86625 2010-11-25  Paul Eggert  <eggert@cs.ucla.edu>
86627         ftoastr: comment fix
86628         * lib/ftoastr.c: "little" -> "little or no" in comment
86630 2010-11-24  Paul Eggert  <eggert@cs.ucla.edu>
86632         stdint: port to GCC 4.3 + OSX + Octave
86633         On this platform, stdint.h is buggy and defines int64_t to long
86634         long int.  The replacement defined it to long int, causing
86635         problems with C++ style name mangling.  Instead, trust the system
86636         definition if INT64_MAX is defined, and likewise for the unsigned
86637         variant.   Problem reported by Jarno Rajahalme in
86638         <http://lists.gnu.org/r/bug-gnulib/2010-04/msg00143.html>.
86639         * lib/stdint.in.h (GL_INT64_T): Define if INT64_MAX is defined,
86640         and don't mess with int64_t and INT64_MAX in this case.
86641         (GL_UINT64_T): Likewise for UINT64_MAX and uint64_t.
86643 2010-11-24  Bruno Haible  <bruno@clisp.org>
86645         doc: Corrections regarding MacOS X 10.4 and 10.5.
86646         * doc/{glibc,posix,pastposix}-functions/*.texi: Update info about
86647         MacOS X.
86648         Reported by Simon Josefsson.
86650 2010-11-22  Ben Pfaff  <blp@cs.stanford.edu>
86652         Uninstall ".bin" files installed by relocwrapper.
86653         * modules/relocatable-prog-wrapper (uninstall-relocwrapper):
86654         Recursively run "make uninstall" with ".bin" prefixed to EXEEXT,
86655         unless it is already there.
86657 2010-11-21  Bruno Haible  <bruno@clisp.org>
86659         Update for NetBSD 5.0.
86660         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Don't guess yes on
86661         NetBSD; the test fails on NetBSD 5.0.
86662         * doc/{glibc,posix,pastposix}-{headers,functions}/*.texi: Update info
86663         about NetBSD.
86665 2010-11-21  Bruno Haible  <bruno@clisp.org>
86667         Update for HP-UX 11.23 and HP-UX 11.31.
86668         * doc/{glibc,posix}-{headers,functions}/*.texi: Update info about
86669         HP-UX.
86671 2010-11-21  Bruno Haible  <bruno@clisp.org>
86673         Update for MacOS X 10.5.
86674         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Don't guess yes on
86675         MacOS X; the test fails on MacOS X 10.5.8.
86676         * doc/{glibc,posix,pastposix}-{headers,functions}/*.texi: Update info
86677         about MacOS X.
86679 2010-11-20  Joel E. Denny  <joeldenny@joeldenny.org>
86681         bootstrap: add bootstrap_sync option.
86682         See discussion at
86683         <http://lists.gnu.org/r/bug-gnulib/2010-10/msg00369.html>,
86684         <http://lists.gnu.org/r/bug-gnulib/2010-11/msg00200.html>.
86685         * build-aux/bootstrap: Accept --bootstrap-sync to update
86686         bootstrap if it is not identical to the local gnulib's
86687         bootstrap.  Accept bootstrap_sync=true in bootstrap.conf to
86688         enable this by default.  Accept --no-bootstrap-sync to disable
86689         it.
86691 2010-11-20  Bruno Haible  <bruno@clisp.org>
86693         Ensure that <features.h> is included before __GLIBC__ is tested.
86694         * lib/printf-parse.h: Include <features.h>.
86695         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gl_FEATURES_H.
86696         Reported by Mike Frysinger <vapier@gentoo.org>.
86698         Ensure that <features.h> is included before __GLIBC__ is tested.
86699         * lib/wchar.in.h: Include <features.h>.
86700         * m4/wchar_h.m4 (gl_WCHAR_H): Require gl_FEATURES_H.
86701         * modules/wchar (Makefile.am): Substitute HAVE_FEATURES_H.
86702         Reported by Mike Frysinger <vapier@gentoo.org>.
86704         Ensure that <features.h> is included before __GLIBC__ is tested.
86705         * lib/arpa_inet.in.h: Include <features.h>.
86706         * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Require gl_FEATURES_H.
86707         * modules/arpa_inet (Makefile.am): Substitute HAVE_FEATURES_H.
86708         Reported by Mike Frysinger <vapier@gentoo.org>.
86710         Ensure that <features.h> is included before __GLIBC__ is tested.
86711         * build-aux/link-warning.h: Include <features.h>.
86712         * modules/link-warning (configure.ac): Require gl_FEATURES_H.
86713         (Makefile.am): Substitute HAVE_FEATURES_H into link-warning.h.
86714         Reported by Mike Frysinger <vapier@gentoo.org>.
86716         Ensure that <features.h> is included before __GLIBC__ is tested.
86717         * m4/gnulib-common.m4 (gl_FEATURES_H): New macro.
86718         Reported by Mike Frysinger <vapier@gentoo.org>.
86720 2010-11-20  Bruno Haible  <bruno@clisp.org>
86722         memmem: Fix autoconf test.
86723         * m4/memmem.m4 (gl_FUNC_MEMMEM): Test HAVE_DECL_MEMMEM, not HAVE_MEMMEM.
86725 2010-11-20  Bruno Haible  <bruno@clisp.org>
86727         Port to uClibc.
86728         * build-aux/link-warning.h (GL_LINK_WARNING): Treat uClibc like glibc.
86729         * lib/fcntl.in.h: Likewise.
86730         * lib/hard-locale.c (GLIBC_VERSION): Likewise.
86731         * lib/mbrtowc.c (mbrtowc): Likewise.
86732         * lib/relocatable.c (find_shared_library_fullname): Likewise.
86733         * lib/strerror_r.c: Likewise.
86734         * lib/unistr/u8-strnlen.c: Likewise.
86735         * lib/vasnprintf.c (decimal_point_char): Likewise.
86736         * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Likewise.
86737         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Likewise.
86738         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Likewise.
86739         * m4/glibc21.m4 (gl_GLIBC21): Likewise.
86740         * tests/test-sigaction.c (handler, main): Likewise.
86741         * lib/freading.h: Treat uClibc like a non-glibc platform.
86742         * lib/freading.c: Likewise.
86743         * lib/gettext.h: Likewise.
86744         * lib/localename.c (gl_locale_name_thread_unsafe, HAVE_LOCALE_NULL):
86745         Likewise.
86746         * lib/printf-parse.h (FLAG_LOCALIZED): Likewise.
86747         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
86748         * lib/propername.c (proper_name_utf8): Likewise.
86749         * lib/spawn.in.h: Likewise.
86750         * lib/striconv.c (mem_cd_iconv, str_cd_iconv, str_iconv): Likewise.
86751         * lib/striconveh.c (iconveh_open, iconv_carefully, iconv_carefully_1,
86752         mem_cd_iconveh_internal): Likewise.
86753         * lib/striconveha.c (mem_iconveha, str_iconveha): Likewise.
86754         * lib/string.in.h (memchr, memrchr, rawmemchr, strchrnul, strpbrk,
86755         strstr, strcasestr): Likewise.
86756         * lib/unicodeio.c (unicode_to_mb): Likewise.
86757         * lib/uniconv/u16-conv-from-enc.c (UTF16_NAME): Likewise.
86758         * lib/uniconv/u16-conv-to-enc.c (UTF16_NAME): Likewise.
86759         * lib/uniconv/u16-strconv-to-enc.c (UTF16_NAME): Likewise.
86760         * lib/uniconv/u32-conv-from-enc.c (UTF32_NAME): Likewise.
86761         * lib/uniconv/u32-conv-to-enc.c (UTF32_NAME): Likewise.
86762         * lib/uniconv/u32-strconv-to-enc.c (UTF32_NAME): Likewise.
86763         * lib/unistr/u8-stpncpy.c: Likewise.
86764         * lib/vasnprintf.c (VASNPRINTF): Likewise.
86765         * lib/xmalloc.c (HAVE_GNU_CALLOC): Likewise.
86766         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
86767         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
86768         * m4/glibc2.m4 (gt_GLIBC2): Likewise.
86769         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Likewise.
86770         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE, gl_FUNC_MEMMEM): Likewise.
86771         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Likewise.
86772         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE, gl_FUNC_STRCASESTR):
86773         Likewise.
86774         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE, gl_FUNC_STRSTR): Likewise.
86775         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
86776         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H): Likewise.
86777         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
86778         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
86779         * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Likewise.
86780         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
86781         * m4/wchar_h.m4 (gl_WCHAR_H): Likewise.
86782         * tests/test-getopt.h (OPTIND_MIN): Likewise.
86783         * tests/test-striconveha.c (main): Likewise.
86784         * tests/test-vasnprintf-posix.c (test_function): Likewise.
86785         * tests/test-vasnprintf-posix3.c (test_function, main): Likewise.
86786         * doc/posix-functions/getdelim.texi: Mention an uClibc bug.
86787         * doc/posix-functions/getline.texi: Likewise.
86788         Reported by Mike Frysinger <vapier@gentoo.org>.
86790 2010-11-20  Bruno Haible  <bruno@clisp.org>
86792         nproc: Fix condition.
86793         * lib/nproc.c: Test HAVE_PTHREAD_GETAFFINITY_NP, not
86794         HAVE_PTHREAD_AFFINITY_NP.
86796 2010-11-20  Bruno Haible  <bruno@clisp.org>
86798         Fix a comment.
86799         * lib/vasnprintf.c (VASNPRINTF): Fix comment.
86801 2010-11-19  Paul Eggert  <eggert@cs.ucla.edu>
86803         ftoastr: don't assume snprintf
86804         * lib/ftoastr.c (snprintf) [! GNULIB_SNPRINTF_POSIX]:
86805         Implement a subset of snprintf here, by using sprintf safely.
86806         * modules/ftoastr (Depends-on): Remove snprintf.
86808 2010-11-19  Jim Meyering  <meyering@redhat.com>
86810         test-rename.h: fix compilation failure
86811         * tests/test-rename.h (test_rename): Add omitted "}".
86813 2010-11-17  Jim Meyering  <meyering@redhat.com>
86815         maint.mk: add a URL discussing the no-@acronym policy
86816         * top/maint.mk (sc_texinfo_acronym): Add a URL in a comment.
86818 2010-11-18  Paul Eggert  <eggert@cs.ucla.edu>
86820         ftoastr: depend on snprintf, improve comments
86821         * lib/ftoastr.c: Also mention Loitsch's draft.
86822         * lib/ftoastr.h: Require WIDTH to be nonnegative.  This isn't
86823         needed in the current implementation, but it might simplify
86824         speeding up the code later.
86825         * modules/ftoastr: Depend on snprintf; this improves portability.
86826         Suggested by Bruno Haible in the same email.
86828         ftoastr: port to hosts lacking strtof and strtold
86829         Problem reported by Bruno Haible in
86830         <http://lists.gnu.org/r/bug-gnulib/2010-11/msg00242.html>.
86831         * lib/ftoastr.c (STRTOF): Define to strtod if in a pre-C99
86832         environment and strtold (and presumably strtof) are not available.
86833         * modules/ftoastr (Files): Add m4/c-strtod.m4.
86834         (configure.ac): Require gl_C99_STRTOLD.
86836 2010-11-18  Bruno Haible  <bruno@clisp.org>
86838         c-strtold: Avoid link error on AIX 7.
86839         * lib/c-strtod.c: Test also HAVE_STRTOD_L or HAVE_STRTOLD_L.
86840         * m4/c-strtod.m4 (gl_C_STRTOD): Test whether strtod_l exists.
86841         (gl_C_STRTOLD): Test whether strtold_l exists.
86842         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
86844 2010-11-17  Paul Eggert  <eggert@cs.ucla.edu>
86846         intprops: new macro INT_BITS_STRLEN_BOUND
86847         * lib/intprops.h (INT_BITS_STRLEN_BOUND): New macro, needed by
86848         ftoastr.h.  This exposes an internal of intprops.h that was formerly
86849         not exposed.  Also, it uses a slightly tighter bound than before;
86850         though this makes no practical difference, we might as well be as
86851         tight as we easily can.
86853         ftoastr: new module, for lossless conversion of floats to short strings
86854         * lib/ftoastr.h, lib/ftoastr.c, lib/dtoastr.c, lib/ldtoastr.c:
86855         * modules/ftoastr: New files.
86857 2010-11-15  Paul Eggert  <eggert@cs.ucla.edu>
86859         bootstrap: port to Solaris sed
86860         * build-aux/bootstrap (get_version): Port to Solaris sed.
86861         See Ralf Wildenhues's note in
86862         <http://lists.gnu.org/r/bug-gnulib/2010-11/msg00156.html>.
86864 2010-11-14  Jim Meyering  <meyering@redhat.com>
86866         maint.mk: rename variable: s/noteworthy/gl_noteworthy_news_/
86867         * top/maint.mk (gl_noteworthy_news_): Rename from "noteworthy"
86868         and move definition closer to sole use.
86870 2010-11-13  Jim Meyering  <meyering@redhat.com>
86872         remove autoconf-2.57 work-around requiring AC_PROG_EGREP and AC_PROG_CPP
86873         Now we require at least autoconf-2.59, which means the work-around
86874         is no longer needed.
86875         * m4/alloca.m4 (gl_FUNC_ALLOCA): Remove work-around.
86876         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
86877         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Likewise.
86878         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
86879         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
86881 2010-11-13  Bruno Haible  <bruno@clisp.org>
86883         rename, renameat: Avoid test failures at NFS mounted locations.
86884         * tests/test-rename.h (dentry_exists, assert_nonexistent): New
86885         functions.
86886         (test_rename): Use assert_nonexistent.
86887         * tests/test-rename.c: Include <dirent.h>.
86888         * tests/test-renameat.c: Likewise.
86889         Reported by Gary V. Vaughan <gary@gnu.org>.
86891         rename, renameat: Document Linux bug with NFS
86892         <http://lists.gnu.org/r/bug-gnulib/2010-11/msg00154.html>.
86893         * doc/posix-functions/rename.texi: Mention the NFS bug on Linux.
86894         * doc/posix-functions/renameat.texi: Likewise.
86895         Suggested by Eric Blake.
86897 2010-11-13  Bruno Haible  <bruno@clisp.org>
86899         rename test: Add comments.
86900         * tests/test-rename.h (test_rename): Add structure and comments.
86902 2010-11-13  Eric Blake  <eblake@redhat.com>
86904         maintainer-makefile: cover a few more files
86905         * top/maint.mk (sc_prohibit_test_double_equal): Also cover shell
86906         scripts generated within C files, for libvirt.
86908 2010-11-13  Bruno Haible  <bruno@clisp.org>
86910         unistr/u8-mbtouc: Improve handling of ill-formed UTF-8 input.
86911         * lib/unistr/u8-mbtouc.c (u8_mbtouc): For an invalid multibyte
86912         character, return the number of bytes that belong together, not always
86913         1.
86914         * lib/unistr/u8-mbtouc-unsafe.c (u8_mbtouc_unsafe): Likewise.
86915         * lib/unistr/u8-mbtouc-aux.c (u8_mbtouc_aux): Likewise.
86916         * lib/unistr/u8-mbtouc-unsafe-aux.c (u8_mbtouc_unsafe_aux): Likewise.
86917         * lib/unistr/u8-mbsnlen.c (u8_mbsnlen): Use u8_mbtouc to determine the
86918         number of bytes of an invalid character.
86919         * tests/unistr/test-u8-mbtouc.c (test_safe_function): New function.
86920         (main): Invoke it.
86921         * tests/unistr/test-u8-mbtouc.h (test_function): Update two test
86922         results.
86923         * tests/unistr/test-u8-mbsnlen.c (main): Test various kinds of
86924         malformed byte sequences.
86925         * modules/unistr/u8-mbtouc (configure.ac): Bump version number.
86926         * modules/unistr/u8-mbtouc-unsafe (configure.ac): Likewise.
86927         * modules/unistr/u8-mbsnlen (configure.ac): Likewise.
86928         Reported by Ben Pfaff and Paolo Bonzini.
86930 2010-11-13  Bruno Haible  <bruno@clisp.org>
86932         openat: Work around glibc bug with fchownat() and empty file names.
86933         * m4/openat.m4 (gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG): New macro.
86934         (gl_FUNC_FCHOWNAT): Invoke it.
86935         * lib/fchownat.c (rpl_fchownat): Handle the empty file name specially.
86936         * doc/posix-functions/fchownat.texi: Document the glibc bug.
86937         Reported by Gary V. Vaughan <gary@gnu.org>.
86939 2010-11-13  Bruno Haible  <bruno@clisp.org>
86941         openat: Ensure autoconf macro ordering.
86942         * m4/openat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Require
86943         gl_USE_SYSTEM_EXTENSIONS.
86944         (gl_FUNC_FCHOWNAT): Require gl_UNISTD_H_DEFAULTS.
86946 2010-11-13  Bruno Haible  <bruno@clisp.org>
86948         Update comments.
86949         * lib/unistr/u8-check.c: Update file name in comments.
86950         * lib/unistr/u8-mblen.c: Likewise.
86951         * lib/unistr/u8-prev.c: Likewise.
86952         * lib/unistr/u8-strmblen.c: Likewise.
86953         * lib/unistr/u8-strmbtouc.c: Likewise.
86955 2010-11-13  Jim Meyering  <meyering@redhat.com>
86957         tests: avoid test failure on Solaris 10 due to lack of PATH export
86958         * tests/test-update-copyright.sh: Don't forget to export PATH.
86960         init.sh: ensure that IFS is defined, just in case...
86961         * tests/init.sh (setup_): Ensure that IFS is defined,
86962         so that saving and restoring it works as expected.  This
86963         appears to be useful at least for an old version of dash
86964         from a long time ago (RH 6).  See here for details:
86965         http://thread.gmane.org/gmane.comp.gnu.coreutils.general/436/focus=455
86967         maint.mk: tighten "test a == b" check
86968         * top/maint.mk (sc_prohibit_test_double_equal): Restrict this
86969         test to files that contain something like #!/bin/sh.
86970         Without this, coreutils would get two false positives in
86971         the comments of C source files.
86973 2010-11-12  Eric Blake  <eblake@redhat.com>
86975         bootstrap: fix typo in previous attempt
86976         * build-aux/bootstrap (buildreq): Correct the grouping.
86977         Reported by Paul Eggert.
86979         maintainer-makefile: prohibit test x == x
86980         * top/maint.mk (sc_prohibit_test_double_equal): New rule.
86981         Based on a report by Matthias Bolte.
86983         bootstrap: allow FreeBSD gzip
86984         * build-aux/bootstrap (get_version): Parse FreeBSD gzip version,
86985         which has no '.' and goes to stderr.
86986         * build-aux/bootstrap.conf (buildreq): Improve the sample file.
86987         Reported by Matthias Bolte.
86989         maintainer-makefile: check for i18n setup
86990         * top/maint.mk (sc_bindtextdomain): Check for evidence that _()
86991         will likely work.
86993 2010-11-12  Bruno Haible  <bruno@clisp.org>
86995         sleep, nanosleep: Work around Linux 2.6.9 nanosleep bug.
86996         * lib/sleep.c (rpl_sleep): Split in chunks no larger than 24 days.
86997         * lib/nanosleep.c (nanosleep): Likewise.
86999 2010-11-11  Bruno Haible  <bruno@clisp.org>
87001         fcntl-h: Fix for use of C++ on glibc systems.
87002         * lib/fcntl.in.h: Include <sys/stat.h> before include_next <fcntl.h>
87003         also on glibc systems in C++ mode.
87004         Reported by Gary V. Vaughan <gary@gnu.org>.
87006 2010-11-11  Christian Weisgerber  <naddy@mips.inka.de>  (tiny change)
87008         mknod: avoid false failure with dash
87009         * m4/mknod.m4 (gl_FUNC_MKNOD): Use portable shell syntax.
87011 2010-11-11  Paul Eggert  <eggert@cs.ucla.edu>
87013         unlink: Fix "is it should" typo in diagnostic.
87014         * m4/unlink.m4 (gl_FUNC_UNLINK): Fix typo, as per Reuben Thomas in
87015         <http://lists.gnu.org/r/bug-gnulib/2010-11/msg00106.html>.
87017 2010-11-11  Bruno Haible  <bruno@clisp.org>
87019         Tests for module 'strerror_r-posix'.
87020         * modules/strerror_r-posix-tests: New file.
87021         * tests/test-strerror_r.c: New file.
87022         * tests/test-string-c++.cc: Check the signature of strerror_r.
87024         New module 'strerror_r-posix'.
87025         * lib/string.in.h (strerror_r): New declaration.
87026         * lib/strerror_r.c: New file.
87027         * m4/strerror_r.m4: New file.
87028         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Check for the declaration
87029         of strerror_r.
87030         (gl_HEADER_STRING_H_DEFAULTS): Initialize GNULIB_STRERROR_R,
87031         HAVE_DECL_STRERROR_R, REPLACE_STRERROR_R.
87032         * modules/strerror_r-posix: New file.
87033         * modules/string (Makefile.am): Substitute GNULIB_STRERROR_R,
87034         HAVE_DECL_STRERROR_R, REPLACE_STRERROR_R.
87035         * doc/posix-functions/strerror_r.texi: Mention the new module and the
87036         portability problems.
87038 2010-11-11  Torsten Scheck  <Torsten.Scheck@Leica-Microsystems.com> (tiny change)
87040         * build-aux/pmccabe2html: Fixed a off-by-one error, so last input
87041         line is also considered for output. Quoted function name in shell
87042         command, so temporary files for functions like MyClass::operator()
87043         are removed correctly without errors.
87045 2010-11-09  Bruno Haible  <bruno@clisp.org>
87047         * doc/posix-functions/strerror.texi: List more failing platforms.
87049         * doc/posix-functions/strerror.texi: Add a comment.
87051 2010-11-07  Paul Eggert  <eggert@cs.ucla.edu>
87053         fdopendir: fix bug on MacOS X when low on file descriptors
87055         * lib/fdopendir.c (REPLACE_FCHDIR): #define to 0 if not defined.
87056         (fdopendir_with_dup, fd_clone_opendir): Now have extra CWD arg.
87057         All callers changed.
87058         (fdopendir): Invoke save_cwd at the top level, not after using
87059         multiple dup() calls to use up file descriptors.  Then retry
87060         fdopendir_with_dup.  This avoids failure with EMFILE if FD is 1
87061         less than the maximum number of open file descriptors, because
87062         save_cwd fails with errno == EMFILE.  Problem reported by tsteven4
87063         on Mac OS X 10.6.4 for tar 1.24
87064         <http://lists.gnu.org/r/bug-tar/2010-10/msg00084.html>
87065         <http://lists.gnu.org/r/bug-tar/2010-11/msg00000.html>
87066         and for tar 1.25
87067         <http://lists.gnu.org/r/bug-tar/2010-11/msg00038.html>.
87069 2010-11-07  Bruno Haible  <bruno@clisp.org>
87071         vasnprintf: Support I flag on glibc systems.
87072         * lib/printf-parse.h (FLAG_LOCALIZED): New macro.
87073         * lib/printf-parse.c (PRINTF_PARSE): Handle the 'I' flag.
87074         * lib/vasnprintf.c (VASNPRINTF): Pass the 'I' flag on to the system's
87075         snprintf function.
87076         * tests/test-vasnprintf-posix.c (test_function): Test the 'I' flag on
87077         glibc systems.
87078         * tests/test-vasnprintf-posix3.c: New file.
87079         * modules/vasnprintf-posix-tests (Files): Add it.
87080         (TESTS, check_PROGRAMS): Add test-vasnprintf-posix3.
87082 2010-11-05  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
87084         [html] Fix copy/paste bug: Use unique name for compiler warnings.
87085         * MODULES.html.sh: For compiler warnings, use name
87086         `ansic_ext_compwarn' since `ansic_ext_misc' is already taken.
87088 2010-11-05  Eric Blake  <eblake@redhat.com>
87090         ceil, floor: avoid spurious failure with icc
87091         * tests/test-ceilf2.c (ceilf_reference): Avoid icc's use of DAZ
87092         [denormals-as-zero] when optimizing without -mieee-fp option.
87093         * tests/test-floorf2.c (floorf_reference): Likewise.
87094         * tests/test-ceilf1.c (dummy): New function.
87095         (main): Use it to outsmart icc's optimization.
87096         * tests/test-floorf1.c (dummy, main): Likewise.
87098         tests: require working signbit
87099         * modules/ceilf-tests (Depends-on): Add signbit.
87100         * modules/ceill-tests (Depends-on): Likewise.
87101         * modules/floorf-tests (Depends-on): Likewise.
87102         * modules/floorl-tests (Depends-on): Likewise.
87103         * modules/round-tests (Depends-on): Likewise.
87104         * modules/roundf-tests (Depends-on): Likewise.
87105         * modules/roundl-tests (Depends-on): Likewise.
87106         * modules/trunc-tests (Depends-on): Likewise.
87107         * modules/truncf-tests (Depends-on): Likewise.
87108         * modules/truncl-tests (Depends-on): Likewise.
87110         strtod: work around icc bug
87111         * lib/strtod.c (minus_zero): Define to working value.
87112         (strtod): Use it to avoid icc bug.
87114         copysign: enhance tests
87115         * modules/copysign-tests (Files): Add minus-zero.h.
87116         * tests/test-copysign.c (main): Also test zeros.
87118 2010-11-04  Eric Blake  <eblake@redhat.com>
87120         ceil, floor, round, trunc: enhance tests of -0
87121         * tests/test-ceilf1.c (main): Ensure correct sign of result.
87122         * tests/test-ceill.c (main): Likewise.
87123         * tests/test-floorf1.c (main): Likewise.
87124         * tests/test-floorl.c (main): Likewise.
87125         * tests/test-round1.c (main): Likewise.
87126         * tests/test-roundf1.c (main): Likewise.
87127         * tests/test-roundl.c (main): Likewise.
87128         * tests/test-trunc1.c (main): Likewise.
87129         * tests/test-truncf1.c (main): Likewise.
87130         * tests/test-truncl.c (main): Likewise.
87132 2010-11-04  Eric Blake  <eblake@redhat.com>
87134         frexp, tests: work around ICC bug with -zero
87135         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Compute -0.0 in a way that
87136         works with more compilers.
87137         * tests/minus-zero.h: New file.
87138         * modules/ceilf-tests (Files): Include it.
87139         * modules/ceill-tests (Files): Likewise.
87140         * modules/floorf-tests (Files): Likewise.
87141         * modules/floorl-tests (Files): Likewise.
87142         * modules/frexp-nolibm-tests (Files): Likewise.
87143         * modules/frexp-tests (Files): Likewise.
87144         * modules/frexpl-nolibm-tests (Files): Likewise.
87145         * modules/frexpl-tests (Files): Likewise.
87146         * modules/isnan-tests (Files): Likewise.
87147         * modules/isnand-nolibm-tests (Files): Likewise.
87148         * modules/isnand-tests (Files): Likewise.
87149         * modules/isnanf-nolibm-tests (Files): Likewise.
87150         * modules/isnanf-tests (Files): Likewise.
87151         * modules/isnanl-nolibm-tests (Files): Likewise.
87152         * modules/isnanl-tests (Files): Likewise.
87153         * modules/round-tests (Files): Likewise.
87154         * modules/roundf-tests (Files): Likewise.
87155         * modules/roundl-tests (Files): Likewise.
87156         * modules/ldexpl-tests (Files): Likewise.
87157         * modules/signbit-tests (Files): Likewise.
87158         * modules/snprintf-posix-tests (Files): Likewise.
87159         * modules/sprintf-posix-tests (Files): Likewise.
87160         * modules/strtod-tests (Files): Likewise.
87161         * modules/trunc-tests (Files): Likewise.
87162         * modules/truncf-tests (Files): Likewise.
87163         * modules/truncl-tests (Files): Likewise.
87164         * modules/vsnprintf-posix-tests (Files): Likewise.
87165         * modules/vsprintf-posix-tests (Files): Likewise.
87166         * modules/vasnprintf-posix-tests (Files): Likewise.
87167         * modules/vasprintf-posix-tests (Files): Likewise.
87168         * tests/test-ceilf1.c (main): Use it.
87169         * tests/test-ceill.c (main): Likewise.
87170         * tests/test-floorf1.c (main): Likewise.
87171         * tests/test-floorl.c (main): Likewise.
87172         * tests/test-frexp.c (main): Likewise.
87173         * tests/test-frexpl.c (main): Likewise.
87174         * tests/test-isnan.c (main): Likewise.
87175         * tests/test-isnand.h (main): Likewise.
87176         * tests/test-isnanf.h (main): Likewise.
87177         * tests/test-isnanl.h (main): Likewise.
87178         * tests/test-ldexpl.c (main): Likewise.
87179         * tests/test-round.c (main): Likewise.
87180         * tests/test-roundf.c (main): Likewise.
87181         * tests/test-roundl.c (main): Likewise.
87182         * tests/test-signbit.c (test_signbitf, test_signbitd)
87183         (test_signbitl): Likewise.
87184         * tests/test-snprintf-posix.h (test_function): Likewise.
87185         * tests/test-sprintf-posix.h (test_function): Likewise.
87186         * tests/test-strtod.c (main): Likewise.
87187         * tests/test-trunc1.c (main): Likewise.
87188         * tests/test-truncf1.c (main): Likewise.
87189         * tests/test-truncl.c (main): Likewise.
87191         isnanl: work around icc bug
87192         * lib/isnan.c (FUNC): Compute run-time NaN under ICC as well.
87194 2010-11-03  Eric Blake  <eblake@redhat.com>
87196         tests: fix compiler warnings
87197         * tests/test-getopt.h (test_getopt): Fix condition.
87198         * tests/test-getopt_long.h (test_getopt_long): Likewise.
87199         * tests/test-pipe2.c (main): Likewise.
87200         * tests/test-quotearg-simple.c (main): Avoid icc warning.
87202         utimens: fix broken m4 test
87203         * m4/utimens.m4 (gl_UTIMENS): Include correct headers.
87205 2010-10-28  Bruno Haible  <bruno@clisp.org>
87207         posix_spawn*, getdtablesize: Relax license.
87208         * modules/posix_spawn (License): Change to LGPLv2+.
87209         * modules/posix_spawnp (License): Likewise.
87210         * modules/posix_spawn-internal (License): Likewise.
87211         * modules/posix_spawnattr_init (License): Likewise.
87212         * modules/posix_spawnattr_getflags (License): Likewise.
87213         * modules/posix_spawnattr_setflags (License): Likewise.
87214         * modules/posix_spawnattr_getpgroup (License): Likewise.
87215         * modules/posix_spawnattr_setpgroup (License): Likewise.
87216         * modules/posix_spawnattr_getschedparam (License): Likewise.
87217         * modules/posix_spawnattr_setschedparam (License): Likewise.
87218         * modules/posix_spawnattr_getschedpolicy (License): Likewise.
87219         * modules/posix_spawnattr_setschedpolicy (License): Likewise.
87220         * modules/posix_spawnattr_getsigdefault (License): Likewise.
87221         * modules/posix_spawnattr_setsigdefault (License): Likewise.
87222         * modules/posix_spawnattr_getsigmask (License): Likewise.
87223         * modules/posix_spawnattr_setsigmask (License): Likewise.
87224         * modules/posix_spawnattr_destroy (License): Likewise.
87225         * modules/posix_spawn_file_actions_init (License): Likewise.
87226         * modules/posix_spawn_file_actions_addclose (License): Likewise.
87227         * modules/posix_spawn_file_actions_adddup2 (License): Likewise.
87228         * modules/posix_spawn_file_actions_addopen (License): Likewise.
87229         * modules/posix_spawn_file_actions_destroy (License): Likewise.
87230         * modules/getdtablesize (License): Likewise.
87231         Requested by Adam Stokes <ajs@redhat.com> for use in netcf.
87233 2010-10-26  Bruno Haible  <bruno@clisp.org>
87235         unistd: Refine workaround from 2009-12-23 against Cygwin bug.
87236         * lib/unistd.in.h: Don't include <stdio.h> and <fcntl.h>, except on
87237         Cygwin and mingw.
87238         Suggested by Eric Blake.
87240 2010-10-26  Bruno Haible  <bruno@clisp.org>
87242         stdio: Work around compilation error due to renameat() on Solaris 10.
87243         * lib/stdio.in.h: Include <unistd.h> on Solaris.
87244         * lib/renameat.c: Don't include <unistd.h> here.
87245         * doc/posix-functions/renameat.texi: Mention the Solaris problem.
87246         Reported by Paul Eggert and Eric Blake.
87248 2010-10-26  Paul Eggert  <eggert@cs.ucla.edu>
87250         renameat: port to Solaris 10, which declares renameat in unistd.h
87252         * lib/renameat.c: Include unistd.h before stdio.h, because
87253         Solaris 10 declares renameat in unistd.h.  Problem encountered
87254         when building GNU tar 1.24 on Solaris 10.
87256 2010-10-26  Christian Weisgerber  <naddy@mips.inka.de>  (tiny change)
87258         fdopendir: fix C89 compilation
87259         * lib/fdopendir.c (fd_clone_opendir): Move declaration for older
87260         compilers.
87262 2010-10-23  Paul Eggert  <eggert@cs.ucla.edu>
87264         inttostr: simplify by removing unnecessary redundancy
87265         * lib/anytostr.c: Don't include verify.h.
87266         (anytostr): Don't verify that TYPE_SIGNED (inttype) equals
87267         inttype_is_signed.  Instead, disable the bogus GCC warnings, so that
87268         there's no need for inttype_is_signed and for calling TYPE_SIGNED.
87269         * lib/imaxtostr.c (inttype_is_signed): Remove; no longer needed.
87270         * lib/inttostr.c, lib/offtostr.c, lib/uinttostr.c, lib/umaxtostr.c:
87271         Likewise.
87272         * modules/inttostr (Depends-on): Remove 'verify'.
87274 2010-10-23  Bruno Haible  <bruno@clisp.org>
87276         nl_langinfo: Mention problem with CRNCYSTR on NetBSD 5.0.
87277         * doc/posix-functions/nl_langinfo.texi: Mention problem with CRNCYSTR.
87278         Reported by Eric Blake.
87280 2010-10-23  Bruno Haible  <bruno@clisp.org>
87282         Tests: Fix LOCALE_JA on MirBSD 10.
87283         * m4/locale-ja.m4 (gt_LOCALE_JA): Reject a locale identifier that leads
87284         to an UTF-8 locale.
87285         * m4/locale-fr.m4 (gt_LOCALE_FR): Likewise.
87286         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
87287         Reported by Eric Blake.
87289 2010-10-21  Bruno Haible  <bruno@clisp.org>
87291         nl_langinfo test: Avoid test failure on NetBSD 5.
87292         * tests/test-nl_langinfo.c (main): Relax test of nl_langinfo(CRNCYSTR).
87293         Reported by Eric Blake.
87295 2010-10-21  Eric Blake  <eblake@redhat.com>
87297         c-stack: work around libsigsegv 2.8 bug
87298         * lib/c-stack.c (SIGSTKSZ): Increase size to avoid alternate stack
87299         overflow on at least PowerPC64.
87301 2010-10-17  Bruno Haible  <bruno@clisp.org>
87303         userspec: Drop redundant file.
87304         * modules/userspec (Files): Remove lib/inttostr.h.
87306 2010-10-17  Bruno Haible  <bruno@clisp.org>
87308         nl_langinfo tests: Silence some warnings.
87309         * tests/test-nl_langinfo.c: Silence -Wtype-limits warnings.
87310         Reported by Jim Meyering.
87312 2010-10-17  Bruno Haible  <bruno@clisp.org>
87314         Make use of GCC's attribute __alloc_size__.
87315         * lib/xalloc.h (ATTRIBUTE_ALLOC_SIZE): New macro.
87316         (xmalloc, xzalloc, xcalloc, xrealloc, xmemdup, xnmalloc, xnrealloc,
87317         xcharalloc): Declare with ATTRIBUTE_ALLOC_SIZE.
87318         * lib/eealloc.h (eemalloc, eerealloc): Declare with attribute
87319         __alloc_size__.
87320         * lib/pagealign_alloc.h (pagealign_alloc, pagealign_xalloc): Likewise.
87321         Suggested by Jim Meyering.
87323 2010-10-16  Joel E. Denny  <joeldenny@joeldenny.org>
87325         bootstrap: anchor .gitignore entries.
87326         * build-aux/bootstrap (insert_sorted_if_absent): Replace all uses
87327         with...
87328         (insert_vc_ignore): ... this new function, which prepends `/' to
87329         all .gitignore entries before passing them to
87330         insert_sorted_if_absent.
87332 2010-10-16  Bruno Haible  <bruno@clisp.org>
87334         nextafter: Fix configure check.
87335         * modules/nextafter (configure.ac): Correct expected prototype.
87337 2010-10-16  Bruno Haible  <bruno@clisp.org>
87339         termios: Update documentation.
87340         * doc/posix-headers/termios.texi: Mention remaining mingw problems.
87342 2010-10-16  Bruno Haible  <bruno@clisp.org>
87344         tests: Make them compile with TinyCC.
87345         * tests/test-strstr.c (main): Remove parentheses around array
87346         initializer.
87348 2010-10-15  Eric Blake  <eblake@redhat.com>
87350         ignore-value: make header idempotent
87351         * lib/ignore-value.h: Add double-inclusion guards.
87352         Reported by Stefan Berger.
87354 2010-10-15  Jim Meyering  <meyering@redhat.com>
87356         GNUmakefile: handle "stable" target, not "major"
87357         * top/GNUmakefile (_is-dist-target): s/major/stable/ to match the
87358         lists in maint.mk and announce-gen.  Without this, "make stable"
87359         would fail to ensure that $(VERSION) is up to date.
87361 2010-10-15  Ludovic Courtès  <ludo@gnu.org>
87363         * lib/isnan.c (FUNC): Treat TinyCC (`__TINYC__') like `__SUNPRO_C'
87364         & co.
87366 2010-10-14  Bruno Haible  <bruno@clisp.org>
87368         vasnprintf: Don't set errno to 0.
87369         * lib/vasnprintf.c (VASNPRINTF): Save and restore errno around the
87370         block that sets it to 0.
87371         Reported by Gianluigi Tiesi <sherpya@netfarm.it>.
87373 2010-10-14  Bruno Haible  <bruno@clisp.org>
87375         socketlib: Fix.
87376         * modules/socketlib (Files): Add m4/sys_socket_h.m4. Needed for
87377         gl_PREREQ_SYS_H_WINSOCK2.
87378         Reported by Ian Beckwith <ianb@erislabs.net>.
87380 2010-10-13  Jim Meyering  <meyering@redhat.com>
87382         test-select-stdin.c: avoid warn_unused_result warnings
87383         * tests/test-select-stdin.c: Include "macros.h".
87384         ASSERT that read and fflush succeed.
87386 2010-10-13  Jim Meyering  <meyering@redhat.com>
87388         git-version-gen: do require git-VC'd files in cwd
87389         * build-aux/git-version-gen: Reject a git version string
87390         if there are no commits associated with the current directory.
87391         This avoids an unlikely false-positive (unrelated dir whose parent
87392         repository also contains a tag matching v*), as pointed out
87393         by Giuseppe Scrivano in
87394         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/21843/focus=23664
87396 2010-10-13  Paul Eggert  <eggert@cs.ucla.edu>
87398         argv-iter: omit nonconforming declaration
87399         * lib/argv-iter.h (enum argv_iter_err): Omit the useless
87400         enum arg_iter_err declaration, which doesn't conform to C99.
87401         Solaris 10 cc warns about this.
87403 2010-10-13  Eric Blake  <eblake@redhat.com>
87405         termios: fix compilation on mingw
87406         * m4/termios_h.m4 (gl_TERMIOS_H_DEFAULTS): Set default.
87407         (gl_TERMIOS_H): Adjust it on mingw.
87408         * modules/termios (Makefile.am): Substitute new key.
87409         * lib/termios.in.h (includes): Make include_next conditional.
87410         * doc/posix-headers/termios.texi (termios.h): Update
87411         documentation.
87412         Reported by Daniel P. Berrange.
87414 2010-10-13  Jim Meyering  <meyering@redhat.com>
87416         git-version-gen: don't require that .git/ be in the current dir
87417         * build-aux/git-version-gen: Adjust this script so that it works
87418         when run from any working directory beneath the top-level .git/-
87419         containing directory.  Inspired by a patch from Giuseppe Scrivano,
87420         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/21843/focus=21847
87422         test-select: avoid warn_unused_result warnings
87423         * tests/test-select.c: Include "macros.h".
87424         ASSERT that each call to read, write, and pipe succeeds.
87425         While not technically required, also check each "close".
87426         * modules/select-tests (Files): Add tests/macros.h.
87428         test-symlinkat: remove declaration of unused local
87429         * tests/test-symlinkat.c (main): Remove unused local, "buf".
87431         test-inttostr: avoid shadowing warnings
87432         * tests/test-inttostr.c (main): Rename local, "buf" to "b",
87433         and use malloc rather than the stack for the same reason as
87434         mentioned in the comment justifying the other allocation.
87436 2010-10-11  Bruno Haible  <bruno@clisp.org>
87438         stdlib: Allow multiple gnulib generated replacements to coexist.
87439         * lib/stdlib.in.h (struct random_data): Avoid identical redefinition.
87440         Reported by Sam Steingold <sds@gnu.org>.
87442 2010-10-11  Jim Meyering  <meyering@redhat.com>
87444         fix a documentation typo
87445         * doc/posix-functions/futimens.texi (futimens): Fix typo: s/itme/item/
87447 2010-10-11  Eric Blake  <eblake@redhat.com>
87449         futimens: work around Solaris 11 bug
87450         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Detect the bug.
87451         * tests/test-futimens.h (test_futimens): Enhance, rather than
87452         weaken test.
87453         * doc/posix-functions/futimens.texi (futimens): Document the bug.
87455 2010-10-11  Paul Eggert  <eggert@cs.ucla.edu>
87457         Indentation.
87458         * lib/spawn.in.h (verify_POSIX_SPAWN_USEVFORK_no_overlap): Indent
87459         higher-level operators more to the left.
87461 2010-10-11  Jim Meyering  <meyering@redhat.com>
87463         test-futimens: avoid unwarranted test failure on Solaris 5.11
87464         * tests/test-futimens.h (test_futimens): When provoking EBADF, use an
87465         invalid file descriptor, so we don't provoke EFAULT from Solaris 5.11,
87466         because it tries to dereference the NULL name argument.
87468 2010-10-11  Bruno Haible  <bruno@clisp.org>
87470         Indentation.
87471         * lib/spawn.in.h (verify_POSIX_SPAWN_USEVFORK_no_overlap): Improve
87472         indentation.
87474 2010-10-11  Jim Meyering  <meyering@redhat.com>
87476         spawn.in.h: make indentation consistent with parentheses
87477         * lib/spawn.in.h (verify_POSIX_SPAWN_USEVFORK_no_overlap):
87478         Make indentation consistent with parentheses.
87480 2010-10-11  Gary V. Vaughan  <gary@gnu.org>
87482         Fix mismatched parens in previous commit
87483         * lib/spawn.in.h (verify_POSIX_SPAWN_USEVFORK_no_overlap): Fix mismatched
87484         parens.
87486 2010-10-10  Paul Eggert  <eggert@cs.ucla.edu>
87488         rewrite int foo[2*X-1] to verify(X) or to int foo[X?1:-1]
87490         * lib/float+.h (verify_sizeof_flt, verify_sizeof_dbl):
87491         (verify_sizeof_ldbl): Rewrite 2*X-1 to X?1:-1.
87492         * lib/malloca.c: Include "verify.h".
87493         (verify1): Remove, replacing with a verify call.
87494         * lib/relocwrapper.c (verify1): Likewise.
87495         * lib/vasnprintf.c (mp_limb_verify, mp_twolimb_verify, TCHAR_T_verify):
87496         Likewise.
87497         * modules/malloca (Depends-on): Add 'verify'.
87498         * modules/relocatable-prog-wrapper (Depends-on): Add 'verify'.
87499         * modules/vasnprintf (Depends-on): Add 'verify'.
87500         * modules/unistdio/u8-vasnprintf (Depends-on): Likewise.
87501         * modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
87502         * modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
87503         * modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
87504         * modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
87505         * modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
87506         * modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
87508         prefer (X ? 1 : -1) when converting from boolean (1,0) to int (1,-1)
87510         Formerly the style was sometimes 2*X - 1, because the C standard
87511         was wrongly thought to disallow ?: in integral constant expressions.
87512         * lib/inet_ntop.c (verify_int_size): Rewrite 2*X-7 (!) to 4<=X?1:-1.
87513         * lib/signal.in.h (verify_NSIG_constraint): Rewrite 2*X-1 to X?1:-1.
87514         * lib/spawn.in.h (verify_POSIX_SPAWN_USEVFORK_no_overlap): Likewise.
87515         * lib/stdint.in.h (_verify_intmax_size): Likewise.
87516         * lib/time.in.h (struct __time_t_must_be_integral): Rewrite
87517         2 * ((time_t) 1 / 2 == 0) - 1 to (time_t) 1; this suffices to
87518         verify that time_t cannot be floating.
87520 2010-10-08  Eric Blake  <eblake@redhat.com>
87522         time: enforce recent POSIX ruling that time_t is integral
87523         * lib/time.in.h (__time_t_must_be_integral): Detect any
87524         problematic systems, allowing the rest of gnulib to assume POSIX.
87526 2010-10-08  Jim Meyering  <meyering@redhat.com>
87528         fdopendir: fix a bug on systems lacking openat and /proc support
87529         OpenBSD 4.7 is one such system.  The most noticeable effect was
87530         failure of any application making nontrivial use of fts: rm, du,
87531         chown, chmod etc.  E.g., "mkdir -p a/b; ./rm -rf a" would fail with
87532           ./rm: traversal failed: `a': Bad file descriptor
87533         Debugging that, you see that even though FD 6 was closed just
87534         prior to the opendir call in fd_clone_opendir, its resulting
87535         dir->dd_fd was 8, rather than the expected value of 6:
87537         Breakpoint 3, fdopendir_with_dup (fd=6, older_dupfd=-1) at fdopendir.c:93
87538         93                close (fd);
87539         (gdb) n
87540         94                dir = fd_clone_opendir (dupfd);
87541         (gdb) n
87542         95                saved_errno = errno;
87543         (gdb) p dir->dd_fd
87544         $11 = 8
87546         Notice how it closes FD 6, then gets a DIR* pointer using FD 8.
87547         The problem is that on OpenBSD, fd_clone_opendir has to resort
87548         to using the old-style save/restore CWD mechanism, due to its
87549         lack of openat/proc support, and *that* would steal the FD (6)
87550         that opendir was supposed to use.
87552         The fix is to squirrel away the desired FD so that save_cwd uses a
87553         different one, and then free the dest FD right before calling opendir.
87554         That guarantees opendir will use the required file descriptor.
87556         * lib/fdopendir.c (fd_clone_opendir): Handle the above.
87558 2010-10-08  Bruno Haible  <bruno@clisp.org>
87560         sys_select: Avoid warning due to undeclared memset() on OpenBSD 4.5.
87561         * lib/sys_select.in.h: Include <string.h> also on OpenBSD.
87563 2010-10-08  Bruno Haible  <bruno@clisp.org>
87565         nanosleep: Make replacement POSIX compliant.
87566         * lib/nanosleep.c (nanosleep): Return -1/EINVAL if the delay's tv_nsec
87567         is out of range.
87568         Reported by Jim Meyering.
87570 2010-10-08  Paul Eggert  <eggert@cs.ucla.edu>
87572         bootstrap: add hook for altering gnulib.mk, for Bison
87573         * build-aux/bootstrap (gnulib_mk_hook): New function, so that
87574         the Bison bootstrapping process can rewrite file names and variables
87575         in this file before later parts of 'bootstrap' use the file.
87576         Bison wants to include lib/gnulib.mk from the top-level makefile,
87577         so it needs the file names in this file to be relative to the top
87578         level, not relative to lib; plus it needs variable names to be
87579         rewritten.
87580         (slurp): Use the new function.
87582         bootstrap: reformat for readability
87583         * build-aux/bootstrap: Rewrite to avoid lines longer than 80 columns.
87585 2010-10-08  Eric Blake  <eblake@redhat.com>
87587         docs: update cygwin progress
87588         * doc/posix-functions/cacos.texi (cacos): Added after cygwin
87589         1.7.7.
87590         * doc/posix-functions/cacosf.texi (cacosf): Likewise.
87591         * doc/posix-functions/cacosh.texi (cacosh): Likewise.
87592         * doc/posix-functions/cacoshf.texi (cacoshf): Likewise.
87593         * doc/posix-functions/carg.texi (carg): Likewise.
87594         * doc/posix-functions/cargf.texi (cargf): Likewise.
87595         * doc/posix-functions/casin.texi (casin): Likewise.
87596         * doc/posix-functions/casinf.texi (casinf): Likewise.
87597         * doc/posix-functions/casinh.texi (casinh): Likewise.
87598         * doc/posix-functions/casinhf.texi (casinhf): Likewise.
87599         * doc/posix-functions/catan.texi (catan): Likewise.
87600         * doc/posix-functions/catanf.texi (catanf): Likewise.
87601         * doc/posix-functions/catanh.texi (catanh): Likewise.
87602         * doc/posix-functions/catanhf.texi (catanhf): Likewise.
87603         * doc/posix-functions/ccos.texi (ccos): Likewise.
87604         * doc/posix-functions/ccosf.texi (ccosf): Likewise.
87605         * doc/posix-functions/ccosh.texi (ccosh): Likewise.
87606         * doc/posix-functions/ccoshf.texi (ccoshf): Likewise.
87607         * doc/posix-functions/cexp.texi (cexp): Likewise.
87608         * doc/posix-functions/cexpf.texi (cexpf): Likewise.
87609         * doc/posix-functions/cimag.texi (cimag): Likewise.
87610         * doc/posix-functions/cimagf.texi (cimagf): Likewise.
87611         * doc/posix-functions/clog.texi (clog): Likewise.
87612         * doc/posix-functions/clogf.texi (clogf): Likewise.
87613         * doc/posix-functions/conj.texi (conj): Likewise.
87614         * doc/posix-functions/conjf.texi (conjf): Likewise.
87615         * doc/posix-functions/cpow.texi (cpow): Likewise.
87616         * doc/posix-functions/cpowf.texi (cpowf): Likewise.
87617         * doc/posix-functions/cproj.texi (cproj): Likewise.
87618         * doc/posix-functions/cprojf.texi (cprojf): Likewise.
87619         * doc/posix-functions/creal.texi (creal): Likewise.
87620         * doc/posix-functions/crealf.texi (crealf): Likewise.
87621         * doc/posix-functions/csin.texi (csin): Likewise.
87622         * doc/posix-functions/csinf.texi (csinf): Likewise.
87623         * doc/posix-functions/csinh.texi (csinh): Likewise.
87624         * doc/posix-functions/csinhf.texi (csinhf): Likewise.
87625         * doc/posix-functions/csqrt.texi (csqrt): Likewise.
87626         * doc/posix-functions/csqrtf.texi (csqrtf): Likewise.
87627         * doc/posix-functions/ctan.texi (ctan): Likewise.
87628         * doc/posix-functions/ctanf.texi (ctanf): Likewise.
87629         * doc/posix-functions/ctanh.texi (ctanh): Likewise.
87630         * doc/posix-functions/ctanhf.texi (ctanhf): Likewise.
87631         * doc/posix-headers/complex.texi (complex.h): Likewise.
87633 2010-10-07  Jim Meyering  <meyering@redhat.com>
87635         parse-datetime: avoid compilation failure on OpenBSD 4.7
87636         * lib/parse-datetime.y (_STDLIB_H) [_STDLIB_H_]: Define.
87637         This works around a compilation failure on OpenBSD 4.7:
87638         http://thread.gmane.org/gmane.comp.parsers.bison.bugs/3418
87640 2010-10-07  Eric Blake  <eblake@redhat.com>
87642         docs: update cygwin progress
87643         * doc/glibc-functions/mkostemp.texi (mkostemp): Added in cygwin
87644         1.7.6.
87645         * doc/glibc-functions/mkostemps.texi (mkostemps): Likewise.
87646         * doc/posix-headers/fenv.texi (fenv.h): Added after cygwin 1.7.7.
87647         * doc/posix-functions/feclearexcept.texi (feclearexcept): Likewise.
87648         * doc/posix-functions/fegetenv.texi (fegetenv): Likewise.
87649         * doc/posix-functions/fegetexceptflag.texi (fegetexceptflag):
87650         Likewise.
87651         * doc/posix-functions/fegetround.texi (fegetround): Likewise.
87652         * doc/posix-functions/feholdexcept.texi (feholdexcept): Likewise.
87653         * doc/posix-functions/feraiseexcept.texi (feraiseexcept):
87654         Likewise.
87655         * doc/posix-functions/fesetenv.texi (fesetenv): Likewise.
87656         * doc/posix-functions/fesetexceptflag.texi (fesetexceptflag):
87657         Likewise.
87658         * doc/posix-functions/fesetround.texi (fesetround): Likewise.
87659         * doc/posix-functions/fetestexcept.texi (fetestexcept): Likewise.
87660         * doc/posix-functions/feupdateenv.texi (feupdateenv): Likewise.
87661         * doc/glibc-functions/feenableexcept.texi (feenableexcept):
87662         Likewise.
87663         * doc/glibc-functions/fedisableexcept.texi (fedisableexcept):
87664         Likewise.
87665         * doc/glibc-functions/fegetexcept.texi (fegetexcept): Likewise.
87667         docs: update parse-datetime history
87668         * doc/parse-datetime.texi (Authors of parse_datetime): Better
87669         documentation of this function's history and alternatives.
87671         cygwin: use more robust version check
87672         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE, gl_FUNC_MEMMEM): Don't
87673         exclude an eventual cygwin 1.9.1.
87674         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE, gl_FUNC_STRSTR): Likewise.
87675         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE)
87676         (gl_FUNC_STRCASESTR): Likewise.
87677         Reported by Bruno Haible.
87679 2010-10-06  Bruno Haible  <bruno@clisp.org>
87681         string, sys_select: Avoid #including large headers unless necessary.
87682         * lib/string.in.h: Don't include <unistd.h> except on NetBSD.
87683         * lib/sys_select.in.h: Don't include <string.h> except on Solaris,
87684         OSF/1, BeOS, Haiku.
87685         Reported by Jim Meyering.
87687 2010-10-05  Eric Blake  <eblake@redhat.com>
87689         memmem, strstr, strcasestr: fix bug with long periodic needle
87690         * lib/str-two-way.h (two_way_long_needle): Avoid bug with long
87691         periodic needle having false positive.
87692         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): Detect bug in glibc 2.12
87693         and cygwin 1.7.7.
87694         (gl_FUNC_MEMMEM): Be more pessimistic when cross-compiling.
87695         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE)
87696         (gl_FUNC_STRCASESTR): Likewise.
87697         * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE, gl_FUNC_STRSTR): Likewise.
87698         * tests/test-memmem.c (main): Expose the bug.
87699         * tests/test-strcasestr.c (main): Likewise.
87700         * tests/test-strstr.c (main): Likewise.
87701         * tests/test-c-strcasestr.c (main): Likewise.
87702         * doc/glibc-functions/memmem.texi (memmem): Document the bug.
87703         * doc/posix-functions/strstr.texi (strstr): Likewise.
87704         * doc/glibc-functions/strcasestr.texi (strcasestr): Likewise.
87705         Reported via http://sourceware.org/bugzilla/show_bug.cgi?id=12092
87707 2010-10-05  Paul Eggert  <eggert@cs.ucla.edu>
87709         parse-datetime: do some more renaming
87710         * doc/parse-datetime.texi (Authors of parse_datetime): Call it
87711         parse_datetime, not get_date.  Mention the renaming.
87712         * lib/parse-datetime.y:  Call it parse_datetime, not getdate,
87713         in comments.
87714         * m4/bison.m4: Likewise.
87716 2010-10-05  Eric Blake  <eblake@redhat.com>
87718         parse-datetime: better name than get_date
87719         * NEWS: Reword the deprecation notice.
87720         * modules/get_date: Rename to modules/parse-datetime.
87721         * modules/get_date-tests: Rename to modules/parse-datetime-tests.
87722         * m4/get_date.m4: Rename to m4/parse-datetime.m4.
87723         * lib/get_date.y: Rename to lib/parse-datetime.y.
87724         * tests/test-get_date.c: Rename to tests/test-parse-datetime.c.
87725         * doc/get_date.texi: Rename to doc/parse-datetime.texi.
87726         * doc/getdate.texi: Provide fallback wrapper.
87727         * lib/getdate.h: Move guts, and wrap...
87728         * lib/parse-datetime.h: ...new file.
87729         * lib/parse-datetime.y (get_date): Rename...
87730         (parse_datetime): ...to this.
87731         * m4/parse-datetime.m4 (gl_GET_DATE): Rename...
87732         (gl_PARSE_DATETIME): ...to this.
87733         * doc/posix-functions/getdate.texi (get_date): Provide fallback
87734         documentation.
87735         * modules/getdate (Files): Provide fallback docs and header.
87736         (Notice, Depends-on): Update references.
87737         * tests/test-parse-datetime.c: Likewise.
87738         * DEPENDENCIES: Likewise.
87739         * MODULES.html.sh (Date and time <time.h>): Likewise.
87740         * doc/parse-datetime.texi (Date input formats)
87741         (Authors of parse_datetime): Likewise.
87742         * modules/parse-datetime (Files, configure.ac, Makefile.am)
87743         (Include): Likewise.
87744         * modules/parse-datetime-tests (Files, Makefile.am): Likewise.
87745         * gnulib-tool: Likewise.
87746         * m4/bison.m4 (gl_BISON): Likewise.
87747         Suggested by Bruno Haible.
87749 2010-10-05  Paul Eggert  <eggert@cs.ucla.edu>
87751         more ports to Solaris tr, which needs [] around ranges
87752         * gnulib-tool: Solaris tr needs [] around ranges.
87753         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Likewise.
87754         * tests/test-pipe-filter-gi1.c (main): Likewise.
87755         * tests/test-pipe-filter-ii1.c (main): Likewise.
87757 2010-10-05  Eric Blake  <eblake@redhat.com>
87759         bootstrap: fix Solaris regression
87760         * build-aux/bootstrap (check_versions): Solaris tr still needs []
87761         around ranges.
87762         Reported by Pádraig Brady.
87764         bootstrap: work with pkg-config
87765         * build-aux/bootstrap (check_versions): Also transliterate - in
87766         prerequisite name.
87767         (print_versions): Be robust to any \ in $buildreq.  Avoid listing
87768         prerequisites that were already found, to avoid confusion.
87769         Reported by Justin Clift.
87771         faccessat: remove unused wrappers
87772         * lib/openat.h (accessat, euidaccesat): Delete, since the mere
87773         presence of these wrappers dragged in -lgen on Solaris.
87774         Reported by Clemens Brogi; fix suggested by Paul Eggert.
87776 2010-10-05  Jim Meyering  <meyering@redhat.com>
87778         tests: require @PRAGMA_COLUMNS@ with each @PRAGMA_SYSTEM_HEADER@
87779         * Makefile (sc_pragma_columns): New syntax-check rule.
87781 2010-10-04  Bruno Haible  <bruno@clisp.org>
87783         gnulib-tool: Synthesize appropriate _LDFLAGS for a libtool library.
87784         * gnulib-tool (func_emit_lib_Makefile_am): When preparing for a libtool
87785         library, put '-no-undefined' and the link dependencies into _LDFLAGS.
87786         Reported by Bruce Korb and Eric Blake.
87788 2010-10-04  Bruno Haible  <bruno@clisp.org>
87790         threadlib: Make option --with-libpth-prefix work.
87791         * m4/threadlib.m4 (gl_THREADLIB_BODY): When testing whether pth works,
87792         use $LIBPTH, not just -lpth.
87794 2010-10-04  Bruno Haible  <bruno@clisp.org>
87796         Avoid line length limitation from HP NonStop system header files.
87797         * m4/include_next.m4 (gl_INCLUDE_NEXT): Define also PRAGMA_COLUMNS.
87798         * lib/arpa_inet.in.h: Use PRAGMA_COLUMNS.
87799         * lib/ctype.in.h: Likewise.
87800         * lib/dirent.in.h: Likewise.
87801         * lib/errno.in.h: Likewise.
87802         * lib/fcntl.in.h: Likewise.
87803         * lib/float.in.h: Likewise.
87804         * lib/getopt.in.h: Likewise.
87805         * lib/iconv.in.h: Likewise.
87806         * lib/inttypes.in.h: Likewise.
87807         * lib/langinfo.in.h: Likewise.
87808         * lib/locale.in.h: Likewise.
87809         * lib/math.in.h: Likewise.
87810         * lib/netdb.in.h: Likewise.
87811         * lib/netinet_in.in.h: Likewise.
87812         * lib/poll.in.h: Likewise.
87813         * lib/pthread.in.h: Likewise.
87814         * lib/pty.in.h: Likewise.
87815         * lib/sched.in.h: Likewise.
87816         * lib/se-selinux.in.h: Likewise.
87817         * lib/search.in.h: Likewise.
87818         * lib/signal.in.h: Likewise.
87819         * lib/spawn.in.h: Likewise.
87820         * lib/stdarg.in.h: Likewise.
87821         * lib/stddef.in.h: Likewise.
87822         * lib/stdint.in.h: Likewise.
87823         * lib/stdio.in.h: Likewise.
87824         * lib/stdlib.in.h: Likewise.
87825         * lib/string.in.h: Likewise.
87826         * lib/strings.in.h: Likewise.
87827         * lib/sys_file.in.h: Likewise.
87828         * lib/sys_ioctl.in.h: Likewise.
87829         * lib/sys_select.in.h: Likewise.
87830         * lib/sys_socket.in.h: Likewise.
87831         * lib/sys_stat.in.h: Likewise.
87832         * lib/sys_time.in.h: Likewise.
87833         * lib/sys_times.in.h: Likewise.
87834         * lib/sys_utsname.in.h: Likewise.
87835         * lib/sys_wait.in.h: Likewise.
87836         * lib/sysexits.in.h: Likewise.
87837         * lib/termios.in.h: Likewise.
87838         * lib/time.in.h: Likewise.
87839         * lib/unistd.in.h: Likewise.
87840         * lib/wchar.in.h: Likewise.
87841         * lib/wctype.in.h: Likewise.
87842         * modules/arpa_inet (Makefile.am): Substitute PRAGMA_COLUMNS.
87843         * modules/ctype (Makefile.am): Likewise.
87844         * modules/dirent (Makefile.am): Likewise.
87845         * modules/errno (Makefile.am): Likewise.
87846         * modules/fcntl-h (Makefile.am): Likewise.
87847         * modules/float (Makefile.am): Likewise.
87848         * modules/getopt-posix (Makefile.am): Likewise.
87849         * modules/iconv-h (Makefile.am): Likewise.
87850         * modules/inttypes (Makefile.am): Likewise.
87851         * modules/langinfo (Makefile.am): Likewise.
87852         * modules/locale (Makefile.am): Likewise.
87853         * modules/math (Makefile.am): Likewise.
87854         * modules/netdb (Makefile.am): Likewise.
87855         * modules/netinet_in (Makefile.am): Likewise.
87856         * modules/poll-h (Makefile.am): Likewise.
87857         * modules/pthread (Makefile.am): Likewise.
87858         * modules/pty (Makefile.am): Likewise.
87859         * modules/sched (Makefile.am): Likewise.
87860         * modules/search (Makefile.am): Likewise.
87861         * modules/selinux-h (Makefile.am): Likewise.
87862         * modules/signal (Makefile.am): Likewise.
87863         * modules/spawn (Makefile.am): Likewise.
87864         * modules/stdarg (Makefile.am): Likewise.
87865         * modules/stddef (Makefile.am): Likewise.
87866         * modules/stdint (Makefile.am): Likewise.
87867         * modules/stdio (Makefile.am): Likewise.
87868         * modules/stdlib (Makefile.am): Likewise.
87869         * modules/string (Makefile.am): Likewise.
87870         * modules/strings (Makefile.am): Likewise.
87871         * modules/sys_file (Makefile.am): Likewise.
87872         * modules/sys_ioctl (Makefile.am): Likewise.
87873         * modules/sys_select (Makefile.am): Likewise.
87874         * modules/sys_socket (Makefile.am): Likewise.
87875         * modules/sys_stat (Makefile.am): Likewise.
87876         * modules/sys_time (Makefile.am): Likewise.
87877         * modules/sys_times (Makefile.am): Likewise.
87878         * modules/sys_utsname (Makefile.am): Likewise.
87879         * modules/sys_wait (Makefile.am): Likewise.
87880         * modules/sysexits (Makefile.am): Likewise.
87881         * modules/termios (Makefile.am): Likewise.
87882         * modules/time (Makefile.am): Likewise.
87883         * modules/unistd (Makefile.am): Likewise.
87884         * modules/wchar (Makefile.am): Likewise.
87885         * modules/wctype (Makefile.am): Likewise.
87887 2010-10-04  Bruno Haible  <bruno@clisp.org>
87889         read-file tests: Avoid a test failure on NonStop Kernel.
87890         * tests/test-read-file.c (main): Don't assume that /etc/resolv.conf is
87891         a regular file.
87892         Reported by Joachim Schmitz <schmitz@hp.com>.
87894 2010-10-03  Bruno Haible  <bruno@clisp.org>
87896         gnulib-tool: Fixes for --create-testdir with --libtool.
87897         * gnulib-tool (func_get_automake_snippet): Don't augment
87898         EXTRA_lib_SOURCES for the pt_chown module, since pt_chown.o goes into
87899         an executable.
87900         (func_create_testdir): Handle module 'alloca' like func_import.
87901         Reported by Bruce Korb <bruce.korb@gmail.com>.
87903 2010-10-03  Paul Eggert  <eggert@cs.ucla.edu>
87905         Avoid some lines longer than 80 characters.
87906         * lib/stdint.in.h: Break long comment lines.
87907         * lib/math.in.h: Likewise.
87908         (_GL_NUM_UINT_WORDS): New macro, for readability.
87909         (gl_signbitf, gl_signbitd, gl_signbitl): Use it.
87910         * lib/stdio.in.h: Break lines in _GL_WARN_ON_USE calls.
87911         * lib/stdlib.in.h: Likewise.
87912         * lib/spawn.in.h: Likewise.
87913         * lib/sys_socket.in.h: Update an URL.
87914         * lib/sys_stat.in.h: Break long line.
87916 2010-10-03  Reuben Thomas  <rrt@sc3d.org>
87918         Improve pmccabe2html.
87919         * build-aux/pmccabe2html: Add CYCLO_SRCS variable, and make
87920         cyclo-$(PACKAGE).html depend on it, so the HTML file is remade
87921         when the sources change. Remove the line in the HTML about "Used
87922         ranges" (which implied that there might be other unused ranges),
87923         rename "Resume" to "Summary" (easier to understand for more users).
87924         * build-aux/pmccabe.css: Removing the dashed dividers, some unused
87925         styles, and some unnecessary blank lines.
87927 2010-10-03  Bruno Haible  <bruno@clisp.org>
87928             Joachim Schmitz  <schmitz@hp.com>  (tiny change)
87930         acl: Add support for ACLs on NonStop Kernel.
87931         * m4/acl.m4 (gl_FUNC_ACL): For Solaris, test for facl(), not for acl().
87932         Check whether the function aclsort() exists.
87933         * lib/acl-internal.h: For Solaris, test HAVE_FACL, not HAVE_ACL.
87934         (acl_nontrivial) [HAVE_ACLSORT]: New declaration.
87935         * lib/file-has-acl.c: For Solaris, test HAVE_FACL, not HAVE_ACL.
87936         (acl_nontrivial [HAVE_ACLSORT]: New function.
87937         (file_has_acl): Implement for NonStop Kernel.
87938         * lib/set-mode-acl.c: For Solaris, test HAVE_FACL, not HAVE_ACL.
87939         (qset_acl): Implement for NonStop Kernel.
87940         * lib/copy-acl.c (qcopy_acl): Implement for NonStop Kernel.
87941         * tests/test-sameacls.c: For Solaris, test HAVE_FACL, not HAVE_ACL.
87942         (main): Implement for NonStop Kernel.
87943         * tests/test-file-has-acl.sh (acl_flavor): Set to 'nsk' on NonStop
87944         Kernel. Handle this flavor.
87945         * tests/test-set-mode-acl.sh: Likewise.
87946         * tests/test-copy-acl.sh: Likewise.
87947         * tests/test-copy-file.sh: Likewise.
87949 2010-10-03  Bruno Haible  <bruno@clisp.org>
87951         Info about ACLs on NonStop Kernel.
87952         * doc/acl-resources.txt: Add info about NonStop Kernel.
87953         References by Joachim Schmitz <schmitz@hp.com>.
87955 2010-10-02  Bruno Haible  <bruno@clisp.org>
87957         Define missing EDQUOT on NonStop Kernel.
87958         * lib/errno.in.h (EDQUOT): Assign a value if missing.
87959         * lib/strerror.c (rpl_strerror): Handle missing EDQUOT.
87960         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Also test whether EDQUOT is
87961         missing.
87962         * doc/posix-headers/errno.texi: Mention the NSK bug.
87963         * doc/posix-functions/strerror.texi: Mention the workaround on NSK.
87964         Reported by Joachim Schmitz <schmitz@hp.com>.
87966 2010-10-02  Bruno Haible  <bruno@clisp.org>
87968         Update doc for POSIX:2008.
87969         * doc/posix-headers/*.texi [except ucontext.texi, sys_timeb.texi]:
87970         Update URL of POSIX specification.
87972 2010-10-02  Bruno Haible  <bruno@clisp.org>
87974         gnulib-tool: In testdirs, use the newest available config.{guess.sub}.
87975         * gnulib-tool (func_create_testdir): Use config.guess and config.sub
87976         from gnulib, not from Automake.
87978 2010-10-02  Bruno Haible  <bruno@clisp.org>
87980         New module 'system-posix'.
87981         * modules/system-posix: New file.
87982         * lib/stdlib.in.h: Include <sys/wait.h> only when the 'system-posix'
87983         module is present.
87984         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
87985         GNULIB_SYSTEM_POSIX.
87986         * modules/stdlib (Depends-on): Remove sys_wait.
87987         (Makefile.am): Substitute GNULIB_SYSTEM_POSIX.
87988         * doc/posix-functions/system.texi: Mention the new module.
87989         * doc/posix-headers/stdlib.texi: Likewise.
87990         * tests/test-stdlib.c: If GNULIB_TEST_SYSTEM_POSIX is not defined,
87991         define test_sys_wait_macros to a no-op.
87992         Reported by Sam Steingold <sds@gnu.org>.
87994 2010-09-30  Bruno Haible  <bruno@clisp.org>
87996         More renaming from 'getdate' to 'get_date'.
87997         * doc/get_date.texi: Renamed from doc/getdate.texi.
87998         * modules/get_date (Files): Update.
87999         * MODULES.html.sh (Date and time <time.h>): Update.
88000         * DEPENDENCIES: Update.
88001         * gnulib-tool: Update comment.
88002         * m4/bison.m4 (gl_BISON): Likewise.
88003         * m4/get_date.m4 (gl_GET_DATE): Likewise.
88005 2010-09-30  Justin Clift  <jclift@redhat.com>  (tiny change)
88007         bootstrap: support ACLOCAL_FLAGS during aclocal
88008         * build-aux/bootstrap (aclocal): Honor ACLOCAL_FLAGS, so the user
88009         can add additional -I dir for third-party .m4 files.
88011 2010-09-30  Eric Blake  <eblake@redhat.com>
88013         bootstrap: use glibtoolize on MacOS
88014         * build-aux/bootstrap (check_versions): Convert libtool into
88015         libtoolize.
88016         (tool search): Move libtool check earlier, and look for
88017         glibtoolize for MacOS.
88018         (gnulib_tool_options): Auto-add --libtool when appropriate.
88019         Reported by Justin Clift.
88021         poll: fix typo that broke test on MacOS
88022         * m4/poll.m4 (gl_FUNC_POLL): Add missing test.
88023         Reported by Justin Clift.
88025         getdate: rename to get_date
88026         Note: getdate.h is not renamed, to minimize client impact.
88027         * modules/getdate: Mark obsolete.  Move old contents...
88028         * modules/get_date: ...to new module name.
88029         * modules/getdate-tests: Move...
88030         * modules/get_date-tests: ...here.
88031         * m4/getdate.m4: Move...
88032         * m4/get_date.m4: ...here, and rename gl_GETDATE to gl_GET_DATE.
88033         * lib/getdate.y: Move...
88034         * lib/get_date.y: ...here.
88035         * tests/test-getdate.c: Move...
88036         * tests/test-get_date.c: ...here.
88037         * doc/posix-functions/getdate.texi (getdate): Update name.
88038         * NEWS: Mention the change.
88040 2010-09-29  Bruno Haible  <bruno@clisp.org>
88042         Separate the module 'waitpid' from the module 'sys_wait'.
88043         * lib/sys_wait.in.h (waitpid): Declare only if the 'waitpid' module is
88044         present.
88045         * m4/sys_wait_h.m4 (gl_SYS_WAIT_MODULE_INDICATOR): Invoke
88046         gl_MODULE_INDICATOR_FOR_TESTS.
88047         (gl_SYS_WAIT_H_DEFAULTS): Initialize GNULIB_WAITPID.
88048         * modules/sys_wait (Depends-on): Remove waitpid.
88049         (Makefile.am): Substitute GNULIB_WAITPID.
88050         * modules/waitpid (configure.ac): Invoke gl_SYS_WAIT_MODULE_INDICATOR.
88051         * tests/test-sys_wait-c++.cc (GNULIB_NAMESPACE::waitpid): Check the
88052         signature only if the 'waitpid' module is present.
88053         * doc/posix-functions/waitpid.texi: Mention the 'waitpid' module.
88054         * NEWS: Mention the change.
88055         * modules/grantpt (Depends-on): Add waitpid.
88056         * modules/wait-process (Depends-on): Likewise.
88058 2010-09-29  Bruno Haible  <bruno@clisp.org>
88060         More tests for module 'sys_wait'.
88061         * modules/sys_wait-c++-tests: New file.
88062         * tests/test-sys_wait-c++.cc: New file.
88063         * modules/sys_wait-tests (Depends-on): Add sys_wait-c++-tests.
88064         Reported by Tatsuro MATSUOKA <tmacchant5@yahoo.co.jp>.
88066 2010-09-29  Bruno Haible  <bruno@clisp.org>
88068         New module 'waitpid'.
88069         * lib/waitpid.c: New file, extracted from lib/sys_wait.in.h.
88070         * lib/sys_wait.in.h: Include <sys/types.h>, c++defs.h, warn-on-use.h.
88071         Don't include <process.h>.
88072         (waitpid): Declare only, using modern idiom.
88073         * m4/waitpid.m4: New file.
88074         * m4/sys_wait_h.m4 (gl_SYS_WAIT_H): Check whether waitpid is declared.
88075         * modules/waitpid: New file.
88076         * modules/sys_wait (Depends-on): Add c++defs, warn-on-use, waitpid.
88077         (Makefile.am): Update.
88078         Reported by Tatsuro MATSUOKA <tmacchant5@yahoo.co.jp>.
88080 2010-09-28  Bruno Haible  <bruno@clisp.org>
88082         poll: Assume ANSI C.
88083         * lib/poll.c (poll): Use an ANSI C declaration.
88085 2010-09-28  Bruno Haible  <bruno@clisp.org>
88087         poll-h: Create poll.h on all platforms.
88088         * lib/poll.in.h: Use double-inclusion guard. Don't define POLL*,
88089         struct pollfd, nfds_t, INFTIM when the system has <poll.h>.
88090         * m4/poll_h.m4 (gl_POLL_H): Set HAVE_POLL_H. Invoke
88091         gl_CHECK_NEXT_HEADERS. Don't set POLL_H.
88092         (gl_REPLACE_POLL_H): Don't set POLL_H.
88093         (gl_POLL_H_DEFAULTS): Don't initialize POLL_H.
88094         * modules/poll-h (Depends-on): Add include_next.
88095         (Makefile.am): Create poll.h unconditionally. Substitute also
88096         HAVE_POLL_H, INCLUDE_NEXT, PRAGMA_SYSTEM_HEADER, NEXT_POLL_H.
88098 2010-09-28  Bruno Haible  <bruno@clisp.org>
88100         Tests for module 'poll-h'.
88101         * modules/poll-h-c++-tests: New file.
88102         * tests/test-poll-h-c++.cc: New file.
88104         Tests for module 'poll-h'.
88105         * modules/poll-h-tests: New file.
88106         * tests/test-poll-h.c: New file.
88108 2010-09-28  Bruno Haible  <bruno@clisp.org>
88110         poll-h: Ensure POLL{RD,WR}{NORM,BAND} are defined on glibc platforms.
88111         * modules/poll-h (Depends-on): Add 'extensions'.
88113 2010-09-28  Bruno Haible  <bruno@clisp.org>
88115         New module 'poll-h'.
88116         * lib/poll.in.h: Include c++defs.h and warn-on-use.h.
88117         (poll): Use modern idiom.
88118         * modules/poll-h: New file.
88119         * modules/poll (Files): Remove lib/poll.in.h.
88120         (Depends-on): Add poll-h.
88121         (configure.ac): Invoke gl_POLL_MODULE_INDICATOR.
88122         (Makefile.am): Move code for generation of poll.h to modules/poll-h.
88123         * m4/poll_h.m4: New file.
88124         * m4/poll.m4 (gl_FUNC_POLL): Require gl_POLL_H. Don't check for poll.h
88125         here. Don't set POLL_H here. Instead, set HAVE_POLL and REPLACE_POLL
88126         and invoke gl_REPLACE_POLL_H.
88127         * lib/poll.c: Use common idiom.
88128         * tests/test-poll.c: Likewise.
88129         * doc/posix-headers/poll.texi: Mention the poll-h module.
88130         Suggested by Eric Blake.
88132 2010-09-26  Bruno Haible  <bruno@clisp.org>
88134         sys_wait: Implement WSTOPSIG.
88135         * lib/sys_wait.in.h (WSTOPSIG): New macro.
88136         Reported by Simon Josefsson.
88138 2010-09-26  Simon Josefsson  <simon@josefsson.org>
88140         stdlib, sys_wait: Avoid compilation error on mingw.
88141         * lib/sys_wait.in.h: Include <signal.h>, for SIGTERM.
88143 2010-09-26  Bruno Haible  <bruno@clisp.org>
88145         stdlib tests: Avoid code duplication.
88146         * modules/stdlib-tests (Files): Add tests/test-sys_wait.h.
88147         * modules/sys_wait-tests (Files): Likewise.
88148         * tests/test-sys_wait.h: New file, extracted from tests/test-stdlib.c.
88149         * tests/test-stdlib.c: Include test-sys_wait.h.
88150         (main): Invoke test_sys_wait_macros.
88151         * tests/test-sys_wait.c: Include test-sys_wait.h.
88152         (main): Invoke test_sys_wait_macros.
88154 2010-09-25  Simon Josefsson  <simon@josefsson.org>
88156         * modules/getaddrinfo (Depends-on): Depend on the sockets module.
88157         * lib/getaddrinfo.c (use_win32_p): Call gl_sockets_startup to make
88158         sure Windows sockets are working before calling getaddrinfo.
88159         * tests/test-getaddrinfo.c (main): Don't call WSAStartup here.
88160         * doc/gnulib.texi (Windows sockets): Fix typo.
88162 2010-09-25  Bruno Haible  <bruno@clisp.org>
88164         Tests for module 'regex-quote'.
88165         * modules/regex-quote-tests: New file.
88166         * tests/test-regex-quote.c: New file.
88168         New module 'regex-quote'.
88169         * lib/regex-quote.h: New file.
88170         * lib/regex-quote.c: New file.
88171         * modules/regex-quote: New file.
88172         Suggested by Reuben Thomas <rrt@sc3d.org>.
88174 2010-09-24  Bruno Haible  <bruno@clisp.org>
88176         unistr/u8-strchr: Fix a test failure on i586 glibc systems.
88177         * tests/unistr/test-strchr.h (test_strchr): Disable an invalid check.
88179 2010-09-23  Bruno Haible  <bruno@clisp.org>
88181         setenv: Relax license.
88182         * modules/setenv (License): Change to LGPLv2+, with consent by Eric
88183         Blake.
88184         Requested by Eric Blake.
88186 2010-09-22  Bruno Haible  <bruno@clisp.org>
88188         termios: Relax license.
88189         * modules/termios (License): Change to LGPLv2+.
88190         Requested by Eric Blake.
88192 2010-09-22  Bruno Haible  <bruno@clisp.org>
88194         threadlib: Allow the package to change the default to 'no'.
88195         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): When
88196         gl_THREADLIB_DEFAULT_NO is defined, change the default to 'no'.
88197         Reported by Paul Eggert.
88199 2010-09-22  Pádraig Brady  <P@draigbrady.com>
88200             Bruno Haible  <bruno@clisp.org>
88202         Fix endless loop in mbmemcasecoll.
88203         * lib/mbmemcasecoll.c (apply_towlower): When mbrtowc returns 0, copy 1
88204         byte.
88205         * tests/test-mbmemcasecmp.h (test_ascii): Test embedded NULs.
88207 2010-09-22  Bruno Haible  <bruno@clisp.org>
88209         Tests for module 'memcoll'.
88210         * modules/memcoll-tests: New file.
88211         * tests/test-memcoll.c: New file, based on tests/test-memcmp.c.
88213         memcoll, xmemcoll: Clarify size vs. length.
88214         * modules/memcoll.c (memcoll0): Clarify specification.
88215         * modules/xmemcoll.c (xmemcoll0): Likewise. Reduce by 1 the lengths
88216         passed to collate_error.
88218 2010-09-22  Bruno Haible  <bruno@clisp.org>
88220         Tests for module 'memcasecmp'.
88221         * modules/memcasecmp-tests: New file.
88222         * tests/test-memcasecmp.c: New file, based on tests/test-memcmp.c.
88224 2010-09-22  Paul Eggert  <eggert@cs.ucla.edu>
88226         * lib/pthread.in.h: Add split double-inclusion guard, and include
88227         system <pthread.h> if there is one.  Use @@-style as in other
88228         .in.h files.  Define PTHREAD_COND_INITIALIZER etc. only if system
88229         pthread.h doesn't.
88230         (pthread_mutexattr_destroy, pthread_mutexattr_init):
88231         (pthread_mutexattr_settype, pthread_mutex_trylock):
88232         New static inline functions, if there's no system <pthread.h>.
88233         (pthread_spinlock_t, pthread_spin_init, pthread_spin_destroy):
88234         (pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock):
88235         Approximate with mutexes if the system lacks spinlocks, as in
88236         MacOS.
88237         * m4/pthread.m4 (gl_PTHREAD_CHECK): Require gl_PTHREAD_DEFAULTS.
88238         Add gl_CHECK_NEXT_HEADERS for pthread.h, and support the usual
88239         @@-style.  Check for spinlocks separately.
88240         (gl_PTHREAD_DEFAULTS): New macro.
88241         * modules/pthread: Redo to use a more typical style for in.h files.
88243 2010-09-21  Eric Blake  <eblake@redhat.com>
88245         net_if: enhance tests
88246         * tests/test-net_if.c (main): Move signature checks earlier.
88247         Print failures to stderr.
88248         * doc/posix-functions/if_freenameindex.texi (if_freenameindex):
88249         Document the bug that we do not yet fix.
88251 2010-09-21  Reuben Thomas  <rrt@sc3d.org>
88253         * doc/gnulib.texi (Out of memory handling): Rewrite section to be
88254         about gnulib, not GSS.
88256 2010-09-21  Reuben Thomas  <rrt@sc3d.org>
88258         * build-aux/pmccabe2html: Look for sources in src/ instead of lib/.
88259         * build-aux/pmccabe2html: Set cut_dir properly, and add mode line
88260         for Emacs.
88261         * build-aux/pmccabe2html: Make Makefile.am example code more
88262         cut-and-paste friendly.
88264 2010-09-21  Simon Josefsson  <simon@josefsson.org>
88266         * tests/test-net_if.c: New file.
88267         * modules/net_if-tests: New file.
88269 2010-09-20  Paul Eggert  <eggert@cs.ucla.edu>
88271         pthread: add pthread_spin_destroy
88272         * lib/pthread.in.h (pthread_spin_destroy): New function.
88274 2010-09-19  Bruno Haible  <bruno@clisp.org>
88276         gnulib-tool: Fix --help output.
88277         * gnulib-tool (func_usage): Fix help message.
88278         Reported by Reuben Thomas <rrt@sc3d.org>.
88280 2010-09-18  Jim Meyering  <meyering@redhat.com>
88282         maint.mk: avoid unexpanded \n in two diagnostics
88283         * top/maint.mk (sc_prohibit_always_true_header_tests):
88284         Don't use a literal \n in a halt=... assignment.  It would not be
88285         expanded, and the two \n bytes would appear in the diagnostic output
88286         rather than the desired newline.  Use halt=$$(printf ... instead.
88287         (sc_vulnerable_makefile_CVE-2009-4029): Likewise.
88289 2010-09-18  Bruno Haible  <bruno@clisp.org>
88291         netinet_in: Doc tweak.
88292         * doc/posix-headers/netinet_in.texi: Mention an affected platform.
88293         Reported by Mats Erik Andersson <mats.andersson@gisladisker.se>.
88295 2010-09-18  Jim Meyering  <meyering@redhat.com>
88297         init.sh: correct an outdated comment
88298         * tests/init.sh (create_exe_shims_):  s/function/alias/
88300         init.sh: don't let an ephemeral "*.exe" make us skip all dir entries
88301         * tests/init.sh (find_exe_basenames_): Don't give up on a directory if
88302         a file named "*.exe" is removed between the glob expansion and the
88303         processing of that oddly named file.
88305 2010-09-17  Eric Blake  <eblake@redhat.com>
88307         mirbsd: add some more support
88308         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): MirBSD is
88309         in BSD family.
88310         * m4/gc-random.m4 (gl_GC_RANDOM): MirBSD supports same random
88311         devices as OpenBSD.
88312         * m4/host-os.m4 (mirbsd): Add MirBSD.
88314         tests: fix unportable assumption on sys/wait.h
88315         * tests/test-sys_wait.c (main): Relax test.
88316         * tests/test-stdlib.c (main): Likewise.
88318         init.sh: accommodate directory with no .exes
88319         * tests/init.sh: Accomodate directory containing only scripts.
88321         tests: avoid compiler warning
88322         * tests/test-stdlib.c (main): Use the variable.
88324         fdutimens, fdutimensat: update signature, again
88325         * lib/utimens.h (gl_futimens): Delete, and move signature...
88326         (fdutimens): ...here.
88327         (fdutimensat): Rearrange signature.
88328         (lutimensat): Rename variable for clarity.
88329         * lib/fdutimensat.c (fdutimensat): Update signature.
88330         * lib/utimens.c (fdutimens): Likewise.
88331         (gl_futimens): Delete.
88332         (utimens, lutimens): Update callers.
88333         * lib/futimens.c (futimens): Likewise.
88334         * tests/test-fdutimensat.c: Likewise.
88335         * tests/test-utimens.c: Likewise.
88336         * tests/test-futimens.h: Update comment.
88337         * NEWS: Mention this.
88338         Suggested by Paul Eggert.
88340 2010-09-17  Bruno Haible  <bruno@clisp.org>
88342         Take over the maintenance of some older macros from Autoconf.
88343         * m4/error.m4 (AC_FUNC_ERROR_AT_LINE): New macro, from GNU Autoconf.
88344         * m4/lstat.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): New macro, from
88345         GNU Autoconf.
88346         * m4/memcmp.m4 (AC_FUNC_MEMCMP): New macro, from GNU Autoconf.
88347         * m4/mktime.m4 (AC_FUNC_MKTIME): Change comment.
88349 2010-09-17  Eric Blake  <eblake@redhat.com>
88351         fdutimensat: drop atflag validation
88352         * lib/fdutimensat.c (fdutimensat): Allow AT_SYMLINK_NOFOLLOW even
88353         with valid fd, to close a race scenario where futimens is
88354         unsupported and FILE was replaced by a symlink.
88355         * tests/test-fdutimensat.c (do_fdutimens, main): Adjust test
88356         accordingly.
88357         Suggested by Paul Eggert.
88359 2010-09-16  Bruno Haible  <bruno@clisp.org>
88361         unlockpt: Fix declaration within GNULIB_POSIXCHECK.
88362         * lib/stdlib.in.h (unlockpt): Fix warning declaration.
88364 2010-09-16  Bruno Haible  <bruno@clisp.org>
88366         login_tty: Fix detection of function on FreeBSD, OpenBSD, NetBSD.
88367         * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Augment LIBS while checking whether
88368         login_tty exists.
88369         Reported by Mats Erik Andersson <mats.andersson@gisladisker.se>.
88371 2010-09-16  Bruno Haible  <bruno@clisp.org>
88373         login_tty: Make the replacement code work on BSD systems.
88374         * lib/login_tty.c: Include <sys/ioctl.h>.
88375         (login_tty): Use ioctl TIOCSCTTY when available.
88376         * modules/login_tty (Depends-on): Add sys_ioctl.
88377         Reported by Mats Erik Andersson <mats.andersson@gisladisker.se>.
88379 2010-09-16  Bruno Haible  <bruno@clisp.org>
88381         login_tty: Stricter unit test.
88382         * modules/login_tty-tests (Depends-on): Add tcgetsid.
88383         * tests/test-login_tty.c (main): Also check the results of tcgetpgrp()
88384         and tcgetsid() after login_tty.
88385         Reported by Mats Erik Andersson <mats.andersson@gisladisker.se>.
88387 2010-09-16  Bruno Haible  <bruno@clisp.org>
88389         New module 'tcgetsid'.
88390         * lib/tcgetsid.c: New file.
88391         * m4/tcgetsid.m4: New file.
88392         * modules/tcgetsid: New file.
88393         * modules/termios (Depends-on): Add c++defs, warn-on-use.
88394         (Makefile.am): Ensure c++defs.h, warn-on-use.h get included. Substitute
88395         GNULIB_TCGETSID, HAVE_TCGETSID.
88396         * lib/termios.in.h: Include <sys/types.h>.
88397         (tcgetsid): New declaration.
88398         * m4/termios_h.m4 (gl_TERMIOS_H): Check whether tcgetsid is declared.
88399         (gl_TERMIOS_H_DEFAULTS): Initialize GNULIB_TCGETSID, HAVE_TCGETSID.
88400         * doc/posix-functions/tcgetsid.texi: Mention the new module.
88401         * tests/test-termios-c++.cc: Check GNULIB_NAMESPACE::tcgetsid.
88403 2010-09-16  Bruno Haible  <bruno@clisp.org>
88405         Tests for module 'termios'.
88406         * modules/termios-c++-tests: New file.
88407         * modules/termios-tests: New file.
88408         * tests/test-termios-c++.cc: New file.
88409         * tests/test-termios.c: New file.
88411         New module 'termios'.
88412         * modules/termios: New file.
88413         * lib/termios.in.h: New file.
88414         * m4/termios_h.m4: New file.
88415         * doc/posix-headers/termios.texi: Mention the new module.
88417 2010-09-16  Eric Blake  <eblake@redhat.com>
88419         fdutimensat: add an atflag parameter
88420         * lib/fdutimensat.c (fdutimensat): Add new parameter.
88421         * lib/utimens.h (fdutimensat): Update prototype.
88422         * tests/test-fdutimensat.c: Adjust test to match.
88423         * NEWS: Document the change.
88424         Suggested by Paul Eggert.
88426 2010-09-16  Bruno Haible  <bruno@clisp.org>
88428         Fix typos in comments.
88429         * lib/striconveh.h: Fix typo in comment.
88430         * lib/login_tty.c (login_tty): Likewise.
88432 2010-09-15  Bruno Haible  <bruno@clisp.org>
88434         stdlib: clarify MirBSD WEXITSTATUS bug
88435         * lib/stdlib.in.h: Clarify the MirBSD bug regarding WEXITSTATUS.
88436         * doc/posix-headers/stdlib.texi (stdlib.h): Likewise.
88438 2010-09-15  Eric Blake  <eblake@redhat.com>
88440         stdlib: work around MirBSD WEXITSTATUS bug
88441         * lib/stdlib.in.h (includes): Guarantee WEXITSTATUS.
88442         * modules/stdlib (Depends-on): Add sys_wait.
88443         * tests/test-sys_wait.c (main): Enhance test.
88444         * tests/test-stdlib.c (main): Likewise.
88445         * doc/posix-headers/stdlib.texi (stdlib.h): Document the bug.
88447         docs: mention MacOS issue with WEXITSTATUS(constant)
88448         * doc/posix-headers/sys_wait.texi (sys/wait.h): Document the
88449         issue.
88450         * doc/posix-headers/stdlib.texi (stdlib.h): Likewise.
88452         strnlen: add tests
88453         * modules/strnlen-tests: New file.
88454         * tests/test-strnlen.c: Likewise.
88456 2010-09-14  Bruno Haible  <bruno@clisp.org>
88458         unistr/base: Avoid link errors when module 'libunistring' is also used.
88459         * lib/unistr.in.h (u8_mbtouc_unsafe, u16_mbtouc_unsafe,
88460         u32_mbtouc_unsafe, u8_mbtouc, u16_mbtouc, u32_mbtouc, u8_mbtoucr,
88461         u16_mbtoucr, u32_mbtoucr, u8_uctomb_aux, u16_uctomb_aux, u32_uctomb):
88462         Declare also when HAVE_LIBUNISTRING is set.
88463         Reported by Pádraig Brady <P@draigbrady.com>.
88465 2010-09-14  Eric Blake  <eblake@redhat.com>
88467         test-rawmemchr: make more robust
88468         * modules/rawmemchr-tests (Files): Add zerosize-ptr.h, mmap-anon.m4.
88469         (Depends-on, configure.ac): Add needed prerequisites to use it.
88470         * modules/memchr-tests (Files, Depends-on, configure.ac):
88471         Likewise, to avoid implicit reliance on memchr module prereqs.
88472         * tests/test-memchr.c (main): Ensure proper masking.
88473         * tests/test-rawmemchr.c (main): Likewise.  Detect oversized
88474         reads.
88476         memchr: detect glibc Alpha bug
88477         Avoids http://sourceware.org/bugzilla/show_bug.cgi?id=12019.
88478         * m4/memchr.m4 (gl_FUNC_MEMCHR): Detect glibc 2.11.2 failure on
88479         Alpha.
88480         * doc/posix-functions/memchr.texi (memchr): Tweak wording.
88481         * tests/test-memchr.c (main): Enhance test.
88482         Reported by Nelson H. F. Beebe.
88484 2010-09-13  Paul Eggert  <eggert@cs.ucla.edu>
88486         fts, getcwd, glob: audit for dirfd returning -1
88487         * lib/fts.c (opendir): Remove #define; no longer used.
88488         (opendirat): New arg PDIR_FD.  All callers changed.
88489         (fts_build, _opendir2): Use new opendirat to avoid the need for
88490         dirfd, or for checking whether dirfd returns a negative value.
88491         Don't use opendir; always use openat followed by fdopendir.
88492         * lib/getcwd.c (__getcwd): Don't reset fd; fdopendir no longer clobbers
88493         it.
88494         * lib/glob.c (link_exists_p): Add comment explaining why dirfd never
88495         returns -1 here.
88496         * modules/fts (Depends-on): Remove dirfd.
88497         * modules/getcwd (Depends-on): Likewise.
88499 2010-09-13  Eric Blake  <eblake@redhat.com>
88501         float: fix broken MirBSD header
88502         * m4/float_h.m4 (gl_FLOAT_H): MirBSD copied OpenBSD's bug.
88503         * doc/posix-headers/float.texi (float.h): Document it.
88505 2010-09-13  Paul Eggert  <eggert@cs.ucla.edu>
88507         fts: use O_NOFOLLOW to avoid race condition when opening a directory
88508         * lib/fts.c (opendirat): New arg extra_flags.
88509         (__opendir2): Use it to avoid following symlinks when opening
88510         a directory, if symlinks are not supposed to be followed.  See
88511         <http://lists.gnu.org/r/bug-gnulib/2010-09/msg00213.html>.
88513         fdopendir: preserve argument fd before returning
88514         * lib/fdopendir.c: Adjust comments to say POSIX, not Solaris.
88515         (fdopendir_with_dup, fd_clone_opendir): New static functions.
88516         (fdopendir): Use them, arranging for FD to be open to the same
88517         directory that it was when it started.  (It might be temporarily
88518         closed while fdopendir is running, so this not thread- or
88519         signal-safe.)  Be careful to do the right thing even when file
88520         descriptors are scarce and dup fails with errno == EMFILE.  See
88521         <http://lists.gnu.org/r/bug-gnulib/2010-09/msg00208.html>.
88523 2010-09-10  Paolo Bonzini  <bonzini@gnu.org>
88525         regex: Pass the system regex if its only problem is 32-bit regoff_t.
88526         * NEWS: Document change.
88527         * m4/regex.m4: Disable test for regoff_t size.
88529 2010-09-13  Jim Meyering  <meyering@redhat.com>
88531         fts: don't operate on an invalid file descriptor after failed dup
88532         * lib/fts.c (fts_build): Don't call set_cloexec_flag on a
88533         negative file descriptor.
88535 2010-09-12  Paul Eggert  <eggert@cs.ucla.edu>
88537         savedir: add streamsavedir, deprecate fdsavedir
88538         * NEWS: Mention deprecation of fdsavedir.
88539         * lib/savedir.c (streamsavedir): New extern function, whose name
88540         ends in "savedir" to be consistent with the others.  This differs
88541         from savedirstream in that it doesn't close its argument.  The
88542         next version of GNU tar will use this instead of fdsavedir, to
88543         avoid some race conditions and conserve file descriptors.
88544         (savedirstream): Reimplement as a wrapper around streamsavedir.
88545         (fdsavedir): Add a comment deprecating this function.  As far as
88546         I know, only GNU tar used it, and GNU tar doesn't need it any more.
88547         * lib/savedir.h (streamsavedir): New decl.
88548         (fdsavedir): Add a comment deprecating this.
88550 2010-09-10  Bruno Haible  <bruno@clisp.org>
88552         langinfo: Fix last commit.
88553         * m4/langinfo_h.m4 (gl_LANGINFO_H): Initialize
88554         HAVE_LANGINFO_T_FMT_AMPM, HAVE_LANGINFO_YESEXPR.
88555         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
88557 2010-09-10  Bruno Haible  <bruno@clisp.org>
88559         relocatable-prog-wrapper: Fix compilation failure due to O_EXEC.
88560         * lib/progreloc.c (O_EXEC): Define fallback.
88562 2010-09-10  Paul Eggert  <eggert@cs.ucla.edu>
88564         fcntl-h: define O_CLOEXEC and O_EXEC if not defined; use new defines
88565         * NEWS: Document recent changes to fcntl-h.
88566         * doc/posix-headers/fcntl.texi (fcntl.h): Document that
88567         O_CLOEXEC is now defined to 0 if it is not defined, like other flags.
88568         Also, O_EXEC is now defined to be O_RDONLY if O_EXEC is not defined.
88569         Similarly for O_SEARCH; this last was already true, but not documented.
88570         * lib/fcntl.in.h (O_CLOEXEC): Define to 0 if not defined.
88571         * lib/dup-safer-flag.c (O_CLOEXEC): Remove now-useless #define.
88572         * lib/dup3.c, lib/pipe2.c, tests/test-dup-safer.c, tests/test-fcntl.c:
88573         Likewise.
88574         * lib/popen-safer.c (open_noinherit): Check whether O_CLOEXEC
88575         is zero, not whether it is defined.
88576         * tests/test-dup3.c, tests/test-pipe2.c (main): Likewise.
88577         * lib/progreloc.c (find_executable): Use O_EXEC rather than O_RDONLY.
88578         * lib/open.c (open): Check for O_SEARCH as well as for O_RDONLY.
88580 2010-09-10  Bruno Haible  <bruno@clisp.org>
88582         langinfo, nl_langinfo: Fix for IRIX 5.3.
88583         * m4/langinfo_h.m4 (gl_LANGINFO_H): Test whether langinfo.h defines
88584         T_FMT_AMPM, YESEXPR. Set HAVE_LANGINFO_T_FMT_AMPM,
88585         HAVE_LANGINFO_YESEXPR.
88586         * modules/langinfo (Makefile.am): Substitute HAVE_LANGINFO_T_FMT_AMPM,
88587         HAVE_LANGINFO_YESEXPR.
88588         * lib/langinfo.in.h (T_FMT_AMPM, GNULIB_defined_T_FMT_AMPM): Define if
88589         HAVE_LANGINFO_T_FMT_AMPM is 0.
88590         (YESEXPR, NOEXPR, GNULIB_defined_YESEXPR): Define if
88591         HAVE_LANGINFO_YESEXPR is 0.
88592         * lib/nl_langinfo.c (rpl_nl_langinfo): Handle also T_FMT_AMPM, YESEXPR,
88593         NOEXPR.
88594         * doc/posix-headers/langinfo.texi: Mention the IRIX 5.3 problem.
88595         * doc/posix-functions/nl_langinfo.texi: Likewise.
88596         Reported by Eric Blake.
88598 2010-09-10  Bruno Haible  <bruno@clisp.org>
88600         pty, readutmp: Fix for FreeBSD 8.0 and OpenBSD 4.6.
88601         * doc/glibc-functions/login_tty.texi: Mention the include file problem
88602         on FreeBSD 8.0 and OpenBSD 4.6.
88603         * lib/pty.in.h: Include <sys/types.h> before <libutil.h>.
88604         * m4/pty_h.m4 (gl_PTY_H): Likewise.
88605         * m4/pty.m4 (gl_FUNC_FORKPTY, gl_FUNC_OPENPTY): Likewise.
88606         * m4/readutmp.m4 (gl_READUTMP): Include <sys/types.h> before <utmp.h>.
88607         Invoke AC_INCLUDES_DEFAULT instead of using the undocumented variable
88608         ac_includes_default.
88609         Reported by Mats Erik Andersson <mats.andersson@gisladisker.se>.
88611 2010-09-09  Eric Blake  <eblake@redhat.com>
88613         strsignal: work around NetBSD bug
88614         * m4/strsignal.m4 (gl_FUNC_STRSIGNAL): Also check in <unistd.h>.
88615         * lib/string.in.h (includes): Likewise.
88616         * doc/posix-functions/strsignal.texi (strsignal): Document the
88617         bug.
88618         Reported by Nelson H. F. Beebe.
88620         gnulib-tool: work with NetBSD /bin/sh
88621         * gnulib-tool (func_cache_var, func_cache_lookup_module)
88622         (func_get_description, func_get_comment, func_get_status)
88623         (func_get_notice, func_get_applicability, func_get_filelist)
88624         (func_get_dependencies, func_get_autoconf_early_snippet)
88625         (func_get_autoconf_snippet, func_get_automake_snippet)
88626         (func_get_include_directive, func_get_link_directive)
88627         (func_get_license, func_get_maintainer, func_import): Avoid
88628         shell syntax errors from parsing syntax extensions.
88630 2010-09-09  Bruno Haible  <bruno@clisp.org>
88632         gnulib-tool: Avoid stderr output on IRIX related to 'alias', 'unalias'.
88633         * gnulib-tool: Don't fiddle with file descriptors 0, 1, 2. Instead, use
88634         a reliable way to determine whether the 'alias' command works.
88636 2010-09-08  Jim Meyering  <meyering@redhat.com>
88638         init.sh: penalize a set-x-impaired shell; don't disqualify it
88639         * tests/init.sh: Too many shells corrupt application stderr when
88640         you set -x, so we can't afford to disqualify them, since at least
88641         on Irix-6.5, that would disqualify all bourne shells.
88642         Instead, use a two-pass approach.
88643         On the first pass, try to find a shell that meets the stricter
88644         condition that set -x does not corrupt stderr.
88645         If no shell meets the stricter condition, retest each candidate
88646         shell, but without that extra condition.  Finally, when
88647         VERBOSE=yes is requested and set -x might cause trouble, simply
88648         issue a warning and refrain from enabling debug output.
88650 2010-09-08  Eric Blake  <eblake@redhat.com>
88652         unsetenv: fix OpenBSD bug
88653         * m4/setenv.m4 (gl_FUNC_UNSETENV): Check for OpenBSD bug.
88654         * doc/posix-functions/unsetenv.texi (unsetenv): Update
88655         documentation.
88656         Reported by Jim Meyering.
88658         strtod: work around IRIX 6.5 bug
88659         * lib/strtod.c (strtod): Reparse number on shorter string if
88660         exponent parse was invalid.
88661         * tests/test-strtod.c (main): Add check for "0x1p 2".
88662         Reported by Tom G. Christensen.
88664         getopt: optimize previous patch
88665         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Correctly check for
88666         empty variable.  Speed up awk script.
88667         Reported by Paolo Bonzini.
88669 2010-09-08  Jim Meyering  <meyering@redhat.com>
88671         test.sh: disqualify shells for which set -x corrupts stderr
88672         * tests/init.sh: Add a test to disqualify /bin/sh from SunOS 5.11
88673         and OpenBSD 4.7.  They make it so with "set -x", environment settings
88674         appear in stderr output.  For example, this command:
88675             /bin/sh -c 'set -x; P=1 true 2> err' 2>/dev/null; cat err
88676         prints "P=1" on those two systems:
88678 2010-09-08  Bruno Haible  <bruno@clisp.org>
88680         gnulib-tool: Avoid stderr output on IRIX related to 'alias', 'unalias'.
88681         * gnulib-tool: Use stderr redirection around the 'alias' and 'unalias'
88682         commands, because some shells ignore redirections when there is an
88683         error in the command lookup.
88684         Reported by Eric Blake.
88686 2010-09-07  Reuben Thomas  <rrt@sc3d.org>
88688         * lib/regex.h: Fix a mention of `regex_compile' (should be
88689         `re_compile_pattern').
88690         Correct and clarify documentation for RE_CONTEXT_INVALID_DUP.
88691         (re_set_registers): Correct name of parameter in comment.
88693         * doc/regex.texi: Add documentation for missing syntax flags.
88694         Remove commented-out documentation of defunct syntax option
88695         RE_NO_EMPTY_ALTS.
88696         Correct name of RE_CHAR_CLASSES in one incorrect occurrence.
88697         Add documentation of re_set_registers.
88698         Document trick to re-use a pattern buffer by setting fastmap manually.
88699         Update documentation of struct re_pattern_buffer per public members.
88700         Uncomment documentation of equivalence class operators and
88701         collating symbol operators, since they are now implemented,
88702         Explain leftmost-longest matching in relation to alternatives.
88703         Tidy documentation of substring matching.
88704         Remove POSIX documentation, which is done better in
88705         glibc, and refer the reader there. Keep BSD API documentation, as
88706         that is not readily available elsewhere.
88708 2010-09-07  Eric Blake  <eblake@redhat.com>
88710         getopt: handle POSIXLY_CORRECT set but not exported
88711         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Restore pre-existing
88712         export state of POSIXLY_CORRECT, due to bash set -o posix.
88713         Reported by Dustin J. Mitchell.
88715 2010-09-05  Bruno Haible  <bruno@clisp.org>
88717         gnulib-tool: Highlight the changed options.
88718         * gnulib-tool (func_usage): Display the --import, --add-import,
88719         --remove-import explanations in bold font.
88721 2010-09-06  Karl Berry  <karl@gnu.org>
88723         * doc/gnulib-tool.texi (Modified imports): doc tweaks.
88725 2010-09-05  Bruno Haible  <bruno@clisp.org>
88727         uniwidth/width: Update comment.
88728         * lib/uniwidth/width.c (uc_width): Update comment for Unicode >= 3.1.
88729         Reported by Emanuele Giaquinta <emanuele.giaquinta@gmail.com>.
88731 2010-09-05  Bruno Haible  <bruno@clisp.org>
88733         isinf, isnan: Relax license.
88734         * modules/isinf (License): Change from GPL to LGPL, with consent from
88735         Ben Pfaff.
88736         * modules/isnan (License): Likewise.
88737         Requested by Ludovic Courtès.
88739 2010-09-04  Bruno Haible  <bruno@clisp.org>
88741         gnulib-tool: Help migration from --import to --add-import or --update.
88742         * gnulib-tool: Emit a verbose error message when --import is used
88743         without any module name.
88745 2010-09-04  Bruno Haible  <bruno@clisp.org>
88747         Update doc about gnulib-tool.
88748         * doc/gnulib-tool.texi (VCS Issues): Explain 'gnulib-tool --import' vs.
88749         'gnulib-tool --update' in more detail.
88750         Reported by Eric Blake.
88752 2010-09-04  Bruno Haible  <bruno@clisp.org>
88754         gnulib-tool: Change --import. New options --add/remove-import.
88755         * gnulib-tool: New options --add-import, --remove-import.
88756         (func_usage): Document them.
88757         (have_associative): Define always.
88758         (func_import): In import mode, don't merge the specified settings with
88759         the cached settings. Implement remove-import mode.
88760         * doc/gnulib-tool.texi (Modified imports): Mention the new options.
88761         Explain when to use them versus --import.
88762         (Simple update): Use --add-import instead of --import.
88763         * NEWS: Mention the change.
88765 2010-09-04  Bruno Haible  <bruno@clisp.org>
88767         * doc/gnulib-tool.texi (Initial import): Update paragraph about
88768         separate gnulib.mk.
88770 2010-09-04  Bruno Haible  <bruno@clisp.org>
88772         gnulib-tool: Don't talk about CVS any more.
88773         * gnulib-tool (func_usage, func_import): Write "version control"
88774         instead of CVS.
88776 2010-09-04  Jim Meyering  <meyering@redhat.com>
88778         maint.mk: avoid obscure sc_copyright_check failure in coreutils
88779         * top/maint.mk (v_etc_file): Prepend $(gnulib_dir)/, to avoid
88780         false positives (whose names may be ill-chosen) when searching
88781         non-VC'd files.  Otherwise, a file named "a b/lib/version-etc.c"
88782         would cause a false-positive.
88784         avoid coreutils "make distcheck" failure
88785         Coreutils tests with an absolute build directory name that contains
88786         a space.  Not quoting this directory name caused a failure.
88787         * tests/test-vc-list-files-git.sh: Quote PATH dir name.
88788         * tests/test-vc-list-files-cvs.sh: Likewise.
88790 2010-09-04  Bruno Haible  <bruno@clisp.org>
88792         gnulib-tool: Avoid error when run in a package without Makefile.am.
88793         * gnulib-tool: When collecting the m4dirs in a package that does not
88794         have a Makefile.am, eliminate those directories that contain no
88795         gnulib-cache.m4. Fix expression that counts these directories.
88797 2010-09-04  Bruno Haible  <bruno@clisp.org>
88799         update-copyright test: Improve output when perl is missing or too old.
88800         * tests/test-update-copyright.sh: Move test of Perl version down after
88801         the test whether Perl exists. Provide an explanation relating Perl's
88802         error message to Automake's SKIP: message.
88804 2010-09-04  Bruno Haible  <bruno@clisp.org>
88806         Don't augment PATH in TESTS_ENVIRONMENT.
88807         * modules/update-copyright-tests (Makefile.am): In TESTS_ENVIRONMENT,
88808         set abs_aux_dir instead of augmenting PATH.
88809         * modules/vc-list-files-tests (Makefile.am): Likewise.
88810         * tests/test-update-copyright.sh: Augment PATH here.
88811         * tests/test-vc-list-files-cvs.sh: Augment PATH here, through
88812         path_prepend_.
88813         * tests/test-vc-list-files-git.sh: Likewise.
88815 2010-09-04  Jim Meyering  <meyering@redhat.com>
88817         tests: prohibit augmenting PATH via TESTS_ENVIRONMENT
88818         * Makefile (sc_prohibit_augmenting_PATH_via_TESTS_ENVIRONMENT): New rule.
88820 2010-09-04  Bruno Haible  <bruno@clisp.org>
88822         strdup: Fix compilation error in C++ mode.
88823         * lib/string.in.h (strdup): In C++ mode with GNULIB_NAMESPACE, undefine
88824         the macro.
88826 2010-09-04  Bruno Haible  <bruno@clisp.org>
88828         dirfd: Fix compilation error in C++ mode on MacOS X, *BSD, IRIX.
88829         * lib/dirent.in.h (dirfd): In C++ mode with GNULIB_NAMESPACE, turn the
88830         macro into a function.
88831         Reported by Jarno Rajahalme <jarno.rajahalme@nsn.com>.
88833 2010-09-04  Bruno Haible  <bruno@clisp.org>
88835         Set PATH_SEPARATOR the same way autoconf does.
88836         * build-aux/relocatable.sh.in (func_find_curr_installdir): Determine
88837         the value of PATH_SEPARATOR the same way autoconf-generated configure
88838         scripts do.
88839         * m4/lib-ld.m4 (AC_LIB_PROG_LD): Likewise.
88840         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
88842 2010-09-04  Stefano Lattarini  <stefano.lattarini@gmail.com>  (tiny change)
88844         Set PATH_SEPARATOR the same way autoconf does.
88845         * gnulib-tool (func_gnulib_dir): Determine the value of PATH_SEPARATOR
88846         the same way autoconf-generated configure scripts do.
88847         * posix-modules: Likewise.
88849 2010-09-02  Paul Eggert  <eggert@cs.ucla.edu>
88851         hash: fix safe_hasher const typo
88852         * lib/hash.c (safe_hasher): Result is pointer, not pointer to
88853         const; otherwise, there is a type error later.
88855 2010-09-02  Jim Meyering  <meyering@redhat.com>
88857         test-update-copyright.sh: require perl 5.8.0
88858         * tests/test-update-copyright.sh: Require 5.8.0,
88859         which Tom G. Christensen has confirmed is adequate,
88860         while 5.6.1 is not.
88862 2010-09-02  Eric Blake  <eblake@redhat.com>
88864         tests: init.sh improvements for re-exec'ing with zsh
88865         * tests/init.sh: Borrow autoconf POSIX-mode sanitization.  Pass
88866         -vx through shell re-exec.
88867         Reported by Tom G. Christensen.
88869         wctype: fix typo in previous commit
88870         * m4/wctype_h.m4 (gl_WCTYPE_H): Fix spelling.
88871         Reported by Ludovic Courtès.
88873 2010-09-02  Jim Meyering  <meyering@redhat.com>
88875         test-update-copyright.sh: skip test if Perl is too old
88876         * tests/test-update-copyright.sh: Exit 77 if Perl is too old.
88877         Reported by Tom G. Christensen.
88879 2010-09-02  Bruno Haible  <bruno@clisp.org>
88881         wctype: Avoid compilation error on IRIX 6.5.30.
88882         * lib/wctype.in.h (iswblank): Declare with a replacement if
88883         REPLACE_ISWBLANK is set.
88884         * m4/wctype_h.m4 (gl_WCTYPE_H): Check also whether iswblank is
88885         declared. Set REPLACE_ISWBLANK.
88886         * modules/wctype (Makefile.am): Substitute REPLACE_ISWBLANK.
88887         * doc/posix-functions/iswblank.texi: Mention the IRIX 6.5.30 problem.
88888         * doc/posix-headers/wctype.texi: Likewise.
88889         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
88891 2010-09-01  Bruno Haible  <bruno@clisp.org>
88893         New module 'socketlib'.
88894         * modules/socketlib: New file.
88895         * m4/socketlib.m4: New file, extracted from m4/sockets.m4.
88896         * m4/sockets.m4 (gl_SOCKETS): Require gl_SOCKETLIB.
88897         * modules/sockets (Depends-on): Add socketlib.
88898         Suggested by Sam Steingold <sds@gnu.org>.
88900 2010-09-01  Paul Eggert  <eggert@cs.ucla.edu>
88902         fcntl-h, etc.: prefer O_SEARCH to O_RDONLY when applicable
88904         POSIX 2008 specifies a new 'open' flag O_SEARCH, which can be used
88905         when one needs search access to a directory but not read access.
88906         On systems where it is available, it works in some cases where
88907         O_RDONLY does not, namely on directories that are searchable but
88908         not readable, and which need only to be searchable.  If O_SEARCH
88909         is not available, fall back to the traditional method of using
88910         O_RDONLY.
88912         * lib/fcntl.in.h (O_SEARCH): #define to O_RDONLY if not defined.
88913         * lib/chdir-long.c (cdb_advance_fd): Use O_SEARCH, not O_RDONLY,
88914         when opening a directory that needs only to be searchable.
88915         * lib/chdir-safer.c (chdir_no_follow): Likewise.
88916         * lib/fts.c (diropen, fts_open, fd_ring_check): Likewise.
88917         * lib/openat-proc.c (openat_proc_name): Likewise.
88918         * lib/openat.c (openat_needs_fchdir): Likewise.
88919         * lib/save-cwd.c (save_cwd): Likewise.
88920         * lib/savewd.c (savewd_save, savewd_chdir): Likewise.
88922 2010-08-28  Bruno Haible  <bruno@clisp.org>
88924         New module 'host-cpu-c-abi'.
88925         * modules/host-cpu-c-abi: New file.
88926         * m4/host-cpu-c-abi.m4: New file, based on part of
88927         clisp/src/m4/general.m4.
88928         Requested by Sam Steingold <sds@gnu.org>.
88930 2010-08-31  Eric Blake  <eblake@redhat.com>
88931         and Jim Meyering  <meyering@redhat.com>
88933         hash: factor, and guard against misbehaving hasher function
88934         * lib/hash.c (safe_hasher): New function, to encapsulate the checking
88935         of table->hasher's return value.  Also protect against a hash value
88936         so large that adding it to table->bucket results in a NULL pointer.
88937         (hash_lookup, hash_get_next, hash_find_entry, transfer_entries):
88938         Use it in place of open-coded check-and-abort.
88940 2010-08-30  Bruno Haible  <bruno@clisp.org>
88942         hash: silence spurious clang warning
88943         * lib/hash.c (hash_get_next): Remove unnecessary test against NULL.
88944         Reported by Eric Blake.
88946 2010-08-30  Eric Blake  <eblake@redhat.com>
88948         strstr, memmem, strcasestr: avoid leaked shell message
88949         * m4/strstr.m4 (gl_FUNC_STRSTR): Avoid "Alarm clock" message from
88950         FreeBSD.
88951         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
88952         * m4/memmem.m4 (gl_FUNC_MEMMEM): Likewise.
88954         tests: silence clang warning
88955         * tests/test-malloca.c (do_allocation): Avoid dead store.
88957 2010-08-29  Bruno Haible  <bruno@clisp.org>
88959         gettext: Fix recent mistake.
88960         * m4/intl.m4 (gt_CHECK_DECL): Fix typo introduced on 2010-08-26.
88962 2010-08-29  Bruno Haible  <bruno@clisp.org>
88964         selinux-h: Offer a --without-selinux option.
88965         * m4/selinux-selinux-h.m4 (gl_HEADERS_SELINUX_SELINUX_H): If
88966         --without-selinux was specified, skip all tests and define
88967         HAVE_SELINUX_SELINUX_H to 0.
88968         (gl_LIBSELINUX): Offer --without-selinux option. If it is specified,
88969         set LIB_SELINUX to empty.
88970         * m4/selinux-context-h.m4 (gl_HEADERS_SELINUX_CONTEXT_H): Require
88971         gl_LIBSELINUX. If --without-selinux was specified, replace
88972         selinux/context.h.
88973         Reported by Johan Hattne <johan.hattne@utsouthwestern.edu>.
88975 2010-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
88976             Bruno Haible  <bruno@clisp.org>
88978         Make the module 'realloc-gnu' work again on AIX and OSF/1.
88979         * m4/realloc.m4 (gl_FUNC_REALLOC_GNU): Define HAVE_REALLOC_GNU instead
88980         of HAVE_REALLOC.
88981         * lib/realloc.c (NEED_REALLOC_GNU): Enable behaviour also when
88982         GNULIB_REALLOC_GNU && !HAVE_REALLOC_GNU.
88983         (SYSTEM_MALLOC_GLIBC_COMPATIBLE): Adjust definition.
88984         * modules/realloc-gnu (configure.ac): Use gl_MODULE_INDICATOR.
88986 2010-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
88987             Bruno Haible  <bruno@clisp.org>
88989         Make the module 'calloc-gnu' work again on AIX and OSF/1.
88990         * m4/calloc.m4 (gl_FUNC_CALLOC_GNU): Define HAVE_CALLOC_GNU instead of
88991         HAVE_CALLOC.
88992         * lib/xmalloc.c: Update accordingly.
88993         * lib/calloc.c (NEED_CALLOC_GNU): Enable also when
88994         GNULIB_CALLOC_GNU && !HAVE_CALLOC_GNU.
88995         * modules/calloc-gnu (configure.ac): Invoke gl_MODULE_INDICATOR.
88997 2010-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
88998             Bruno Haible  <bruno@clisp.org>
89000         Make the module 'malloc-gnu' work again on AIX and OSF/1.
89001         * m4/malloc.m4 (gl_FUNC_MALLOC_GNU): Define HAVE_MALLOC_GNU instead of
89002         HAVE_MALLOC.
89003         * lib/malloc.c (NEED_MALLOC_GNU): Enable behaviour also when
89004         GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU.
89005         * modules/malloc-gnu (configure.ac): Use gl_MODULE_INDICATOR.
89007 2010-08-29  Bruno Haible  <bruno@clisp.org>
89009         Update modules list.
89010         * MODULES.html.sh (Memory management functions <stdlib.h>): Add
89011         malloc-gnu, calloc-gnu, realloc-gnu. Remove malloc, calloc, realloc.
89012         (String handling <string.h>): Add astrxfrm.
89013         (File system functions): Add readlinkat.
89015 2010-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
89017         Tests for module 'realloc-gnu'.
89018         * modules/realloc-gnu-tests: New file.
89019         * tests/test-realloc-gnu.c: New file.
89021         Tests for module 'calloc-gnu'.
89022         * modules/calloc-gnu-tests: New file.
89023         * tests/test-calloc-gnu.c: New file.
89025         Tests for module 'malloc-gnu'.
89026         * modules/malloc-gnu-tests: New file.
89027         * tests/test-malloc-gnu.c: New file.
89029 2010-08-28  Bruno Haible  <bruno@clisp.org>
89031         Rename module 'realloc' -> 'realloc-gnu'.
89032         * modules/realloc-gnu: New file, copied from modules/realloc.
89033         * modules/realloc: Convert to a redirection to 'realloc-gnu'. Mark as
89034         obsolete.
89035         * modules/mgetgroups (Depends-on): Update.
89036         * doc/posix-functions/realloc.texi: Update.
89037         * NEWS: Mention the change.
89039         Rename module 'calloc' -> 'calloc-gnu'.
89040         * modules/calloc-gnu: New file, copied from modules/calloc.
89041         * modules/calloc: Convert to a redirection to 'calloc-gnu'. Mark as
89042         obsolete.
89043         * doc/posix-functions/calloc.texi: Update.
89044         * NEWS: Mention the change.
89046         Rename module 'malloc' -> 'malloc-gnu'.
89047         * modules/malloc-gnu: New file, copied from modules/malloc.
89048         * modules/malloc: Convert to a redirection to 'malloc-gnu'. Mark as
89049         obsolete.
89050         * modules/argp (Depends-on): Update.
89051         * modules/regex (Depends-on): Update.
89052         * doc/posix-functions/malloc.texi: Update.
89053         * NEWS: Mention the change.
89055 2010-08-28  Eric Blake  <eblake@redhat.com>
89057         pread, pwrite: add missing dependency
89058         * modules/pread (Depends-on): Add extensions.
89059         * modules/pwrite (Depends-on): Likewise.
89061 2010-08-28  Bruno Haible  <bruno@clisp.org>
89063         unistr/u*-strchr: Fix tests dependencies.
89064         * modules/unistr/u8-strchr-tests (Depends-on): Add unistr/u32-to-u8.
89065         * modules/unistr/u16-strchr-tests (Depends-on): Add unistr/u32-to-u16.
89066         Reported by Ian Beckwith <ianb@erislabs.net>.
89068 2010-08-28  Bruno Haible  <bruno@clisp.org>
89070         read-file: Don't occupy too much unused memory.
89071         * lib/read-file.c (fread_file): Shrink the buffer at the end.
89073 2010-08-28  Giuseppe Scrivano  <gscrivano@gnu.org>
89074             Eric Blake  <eblake@redhat.com>
89075             Bruno Haible  <bruno@clisp.org>
89077         read-file: Avoid memory reallocations with regular files.
89078         * lib/read-file.c: Include <sys/stat.h>, <stdio.h>, <stdint.h>.
89079         (fread_file): With regular files, use the remaining length as the
89080         initial buffer size.  Check against overflow.
89081         * modules/read-file (Depends-on): Add ftello, malloc-posix, stdint,
89082         sys_stat.
89084 2010-08-28  Bruno Haible  <bruno@clisp.org>
89086         ftello: Relax license.
89087         * modules/ftello (License): Relax to LGPLv2+.
89088         Reported by Eric Blake.
89090 2010-08-28  Bruno Haible  <bruno@clisp.org>
89092         Avoid relocwrapper link errors due to gnulib replacement functions.
89093         * lib/canonicalize-lgpl.c [IN_RELOCWRAPPER]: Use the system's getcwd
89094         function.
89095         Reported by Ben Pfaff <blp@cs.stanford.edu>.
89097 2010-08-28  Bruno Haible  <bruno@clisp.org>
89099         Prefer using AC_DEFUN_ONCE over AC_DEFUN in projects with gnulib.
89100         * m4/iconv.m4 (gl_iconv_AC_DEFUN): Use AC_DEFUN_ONCE if gl_00GNULIB is
89101         defined.
89102         * m4/libunistring.m4 (gl_libunistring_AC_DEFUN): Likewise.
89103         Suggested by Eric Blake.
89105 2010-08-28  Bruno Haible  <bruno@clisp.org>
89107         sys_socket, netdb: Ensure socklen_t gets defined.
89108         * modules/sys_socket (Depends-on): Add socklen.
89109         * modules/netdb (Depends-on): Likewise.
89110         * modules/getaddrinfo (Depends-on): Remove socklen.
89111         * modules/getsockopt (Depends-on): Likewise.
89112         * modules/setsockopt (Depends-on): Likewise.
89113         * tests/test-sys_socket.c: Check that socklen_t is defined.
89114         * tests/test-netdb.c: Likewise.
89115         * m4/socklen.m4: Update comments.
89116         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
89118 2010-08-27  Eric Blake  <eblake@redhat.com>
89120         login_tty: add missing dependency
89121         * modules/login_tty (Depends-on): Add pty.
89123 2010-08-26  Eric Blake  <eblake@redhat.com>
89125         lib-symbol-versions: fix m4 quoting
89126         * m4/ld-version-script.m4 (gl_LD_VERSION_SCRIPT): Use correct
89127         format for AC_LINK_IFELSE.
89129         glob: fix compile test
89130         * m4/glob.m4 (gl_GLOB): Use correct format for AC_COMPILE_IFELSE.
89132         btowc: fix missing file
89133         * modules/btowc (Files): Also ship locale-fr.m4.
89135         lseek: fix link test
89136         * m4/lseek.m4 (gl_FUNC_LSEEK): Use correct format for
89137         AC_LINK_IFELSE.
89139         include_next: silence autoconf 2.68 warning
89140         * m4/include_next.m4 (gl_INCLUDE_NEXT): Mark this use of
89141         AC_COMPILE_IFELSE as special.
89142         (AC_LANG_DEFINES_PROVIDED): Provide dummy implementation for
89143         autoconf < 2.68.
89145         acl: fix compilation test
89146         * m4/acl.m4 (gl_FUNC_ALL): Use correct format for
89147         AC_COMPILE_IFELSE.
89149 2010-08-26  Bruno Haible  <bruno@clisp.org>
89151         Modernize AC_TRY_RUN invocations.
89152         * m4/btowc.m4 (gl_FUNC_BTOWC): Use AC_RUN_IFELSE instead of AC_TRY_RUN.
89153         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Likewise.
89154         * m4/exponentd.m4 (gl_DOUBLE_EXPONENT_LOCATION): Likewise.
89155         * m4/exponentf.m4 (gl_FLOAT_EXPONENT_LOCATION): Likewise.
89156         * m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Likewise.
89157         * m4/fopen.m4 (gl_FUNC_FOPEN): Likewise.
89158         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Likewise.
89159         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
89160         * m4/ftello.m4 (gl_FUNC_FTELLO): Likewise.
89161         * m4/iconv.m4 (AM_ICONV_LINK): Likewise.
89162         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN_UTF): Likewise.
89163         * m4/intdiv0.m4 (gt_INTDIV0): Likewise.
89164         * m4/isnanf.m4 (gl_ISNANF_WORKS): Likewise.
89165         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Likewise.
89166         * m4/ldexpl.m4 (gl_FUNC_LDEXPL_WORKS): Likewise.
89167         * m4/mbrlen.m4 (gl_MBRLEN_INCOMPLETE_STATE, gl_MBRLEN_RETVAL,
89168         gl_MBRLEN_NUL_RETVAL): Likewise.
89169         * m4/mbrtowc.m4 (gl_MBRTOWC_INCOMPLETE_STATE, gl_MBRTOWC_SANITYCHECK,
89170         gl_MBRTOWC_NULL_ARG, gl_MBRTOWC_RETVAL, gl_MBRTOWC_NUL_RETVAL):
89171         Likewise.
89172         * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Likewise.
89173         * m4/open.m4 (gl_FUNC_OPEN): Likewise.
89174         * m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_LONG_DOUBLE,
89175         gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE,
89176         gl_PRINTF_DIRECTIVE_A, gl_PRINTF_DIRECTIVE_F, gl_PRINTF_DIRECTIVE_N,
89177         gl_PRINTF_DIRECTIVE_LS, gl_PRINTF_POSITIONS, gl_PRINTF_FLAG_GROUPING,
89178         gl_PRINTF_FLAG_LEFTADJUST, gl_PRINTF_FLAG_ZERO, gl_PRINTF_PRECISION,
89179         gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_RETVAL_C99,
89180         gl_SNPRINTF_DIRECTIVE_N, gl_SNPRINTF_SIZE1, gl_VSNPRINTF_ZEROSIZE_C99):
89181         Likewise.
89182         * m4/printf-posix.m4 (gt_PRINTF_POSIX): Likewise.
89183         * m4/signbit.m4 (gl_SIGNBIT, gl_FLOATTYPE_SIGN_LOCATION): Likewise.
89184         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
89185         * m4/threadlib.m4 (gl_THREADLIB_BODY): Likewise.
89186         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
89187         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Likewise.
89188         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.
89189         * m4/wcsrtombs.m4 (gl_WCSRTOMBS_TERMINATION): Likewise.
89190         * m4/wctob.m4 (gl_FUNC_WCTOB): Likewise.
89191         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
89193 2010-08-26  Bruno Haible  <bruno@clisp.org>
89195         Modernize AC_TRY_LINK invocations.
89196         * m4/acosl.m4 (gl_FUNC_ACOSL): Use AC_LINK_IFELSE instead of
89197         AC_TRY_LINK.
89198         * m4/argp.m4 (gl_ARGP): Likewise.
89199         * m4/asinl.m4 (gl_FUNC_ASINL): Likewise.
89200         * m4/atanl.m4 (gl_FUNC_ATANL): Likewise.
89201         * m4/ceil.m4 (gl_FUNC_CEIL_LIBS): Likewise.
89202         * m4/ceilf.m4 (gl_FUNC_CEILF_LIBS): Likewise.
89203         * m4/ceill.m4 (gl_FUNC_CEILL_LIBS): Likewise.
89204         * m4/codeset.m4 (AM_LANGINFO_CODESET): Likewise.
89205         * m4/cosl.m4 (gl_FUNC_COSL): Likewise.
89206         * m4/expl.m4 (gl_FUNC_EXPL): Likewise.
89207         * m4/floor.m4 (gl_FUNC_FLOOR_LIBS): Likewise.
89208         * m4/floorf.m4 (gl_FUNC_FLOORF_LIBS): Likewise.
89209         * m4/floorl.m4 (gl_FUNC_FLOORL_LIBS): Likewise.
89210         * m4/frexp.m4 (gl_FUNC_FREXP, gl_CHECK_FREXP_NO_LIBM): Likewise.
89211         * m4/frexpl.m4 (gl_FUNC_FREXPL, gl_CHECK_FREXPL_NO_LIBM): Likewise.
89212         * m4/ftello.m4 (gl_FUNC_FTELLO): Likewise.
89213         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
89214         * m4/hostent.m4 (gl_HOSTENT): Likewise.
89215         * m4/iconv.m4 (AM_ICONV_LINK): Likewise.
89216         * m4/intl.m4 (gt_INTL_SUBDIR_CORE): Likewise.
89217         * m4/intlmacosx.m4 (gt_INTL_MACOSX): Likewise.
89218         * m4/isnand.m4 (gl_HAVE_ISNAND_IN_LIBM, gl_HAVE_ISNAND_NO_LIBM):
89219         Likewise.
89220         * m4/isnanf.m4 (gl_HAVE_ISNANF_NO_LIBM, gl_HAVE_ISNANF_IN_LIBM):
89221         Likewise.
89222         * m4/isnanl.m4 (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM):
89223         Likewise.
89224         * m4/lcmessage.m4 (gt_LC_MESSAGES): Likewise.
89225         * m4/ldexpl.m4 (gl_FUNC_LDEXPL, gl_CHECK_LDEXPL_NO_LIBM): Likewise.
89226         * m4/lib-link.m4 (AC_LIB_HAVE_LINKFLAGS): Likewise.
89227         * m4/logb.m4 (gl_FUNC_LOGB): Likewise.
89228         * m4/logl.m4 (gl_FUNC_LOGL): Likewise.
89229         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Likewise.
89230         * m4/servent.m4 (gl_SERVENT): Likewise.
89231         * m4/signbit.m4 (gl_SIGNBIT): Likewise.
89232         * m4/sinl.m4 (gl_FUNC_SINL): Likewise.
89233         * m4/sqrtl.m4 (gl_FUNC_SQRTL): Likewise.
89234         * m4/tanl.m4 (gl_FUNC_TANL): Likewise.
89235         * m4/threadlib.m4 (gl_THREADLIB_BODY): Likewise.
89236         * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
89237         * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
89238         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
89239         * modules/tsearch-tests (configure.ac): Likewise.
89241 2010-08-26  Bruno Haible  <bruno@clisp.org>
89243         Modernize AC_TRY_COMPILE invocations.
89244         * m4/environ.m4 (gt_CHECK_VAR_DECL): Use AC_COMPILE_IFELSE instead of
89245         AC_TRY_COMPILE.
89246         * m4/iconv.m4 (gl_iconv_AC_DEFUN): Likewise.
89247         * m4/intl.m4 (gt_CHECK_DECL): Likewise.
89248         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Likewise.
89249         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
89250         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Likewise.
89251         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
89252         * m4/locale_h.m4 (gl_LOCALE_H): Likewise.
89253         * m4/lock.m4 (gl_LOCK): Likewise.
89254         * m4/malloc.m4 (gl_CHECK_MALLOC_POSIX): Likewise.
89255         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
89256         * m4/minmax.m4 (gl_MINMAX_IN_HEADER): Likewise.
89257         * m4/setenv.m4 (gl_FUNC_UNSETENV): Likewise.
89258         * m4/size_max.m4 (gl_SIZE_MAX): Likewise.
89259         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Likewise.
89260         * m4/stdarg.m4 (gl_STDARG_H): Likewise.
89261         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Likewise.
89262         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Likewise.
89263         * m4/visibility.m4 (gl_VISIBILITY): Likewise.
89264         * m4/wchar_t.m4 (gt_TYPE_WCHAR_T): Likewise.
89265         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
89266         * m4/libunistring.m4 (gl_LIBUNISTRING_CORE): Likewise. Remove
89267         extraneous semicolon.
89269 2010-08-26  Jim Meyering  <meyering@redhat.com>
89271         stat-time: relax license LGPL
89272         * modules/stat-time (License): Change from GPL to LGPL,
89273         with consent from all contributors, for use in libguile.
89274         Requested by Ludovic Courtès.
89276 2010-08-26  Erik Faye-Lund  <kusmabite@gmail.com>
89278         poll: return immediately on POLLHUP.
89279         * lib/poll.c (poll): Always set timeout before wait_timeout is
89280         computed.
89282 2010-08-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
89284         Fix test-unlinkat, test-rmdir failure on AIX 5.3.
89285         * tests/test-rmdir.h (test_rmdir_func): Also accept EEXIST for
89286         rmdir ("dir/.//"), unlinkat.
89288 2010-08-24  Paul Eggert  <eggert@cs.ucla.edu>
89290         stdbool: avoid spurious failure with modern xlc
89291         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Resync with autoconf.
89293 2010-08-24  Bruno Haible  <bruno@clisp.org>
89295         getloadavg: simplify code
89296         * m4/getloadavg.m4 (gl_GETLOADAVG): Remove useless test of
89297         gl_have_func. Update comments.
89299 2010-08-24  Eric Blake  <eblake@redhat.com>
89301         getloadavg: don't define SVR4 on cygwin
89302         * m4/getloadavg.m4 (gl_GETLOADAVG): Sync with autoconf fix, to
89303         only define SVR4 when -lkvm is required.
89304         Reported by Yaakov Selkowitz.
89306 2010-08-24  Bruno Haible  <bruno@clisp.org>
89308         priv-set: fix comment
89309         * lib/priv-set.c (priv_set_restore): Fix typo in comment.
89311 2010-08-23  Paul Eggert  <eggert@cs.ucla.edu>
89313         priv-set: fix comments
89314         * lib/priv-set.c (priv_set_remove, priv_set_restore): Fix comments
89315         to match code, as suggested by David Bartley in:
89316         http://lists.gnu.org/r/bug-tar/2010-08/msg00018.html
89318 2010-08-23  Eric Blake  <eblake@redhat.com>
89320         stdbool: avoid rejecting clang
89321         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Resync with autoconf.
89322         * tests/test-stdbool.c: Enable more tests if using the system
89323         <stdbool.h> instead of the gnulib replacement.
89324         (main): Move xlc bug test to a runtime test for all compilers.
89325         Reported by Anders Kaseorg.
89327         argz: fix shell quoting issue
89328         * m4/argz.m4 (gl_FUNC_ARGZ): Allow for spaces in argument.
89329         Reported by Charles Wilson.
89331 2010-08-22  Paolo Bonzini  <bonzini@gnu.org>
89332             Erik Faye-Lund <kusmabite@gmail.com>
89334         poll, select: handle ERROR_BROKEN_PIPE.
89335         * lib/poll.c (win32_compute_revents): Return POLLHUP when
89336         PeekNamedPipe fails with ERROR_BROKEN_PIPE.
89337         * lib/select.c (win32_compute_revents): Do not mark a pipe
89338         as writeable if PeekNamedPipe fails with ERROR_BROKEN_PIPE.
89340 2010-08-22  Giuseppe Scrivano  <gscrivano@gnu.org>
89342         fts: allow compilation with C++
89343         * lib/fts_.h: Specify extern "C" linkage with C++.
89345 2010-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
89347         Fix gnulib-tool sed script de-commentation for AIX sed.
89348         * gnulib-tool (sed_comments): Try indented comments, for AIX 5.3
89349         sed.
89351 2010-08-17  Eric Blake  <eblake@redhat.com>
89353         test-stddef: test for (some) offsetof bugs
89354         * tests/test-stddef.c: Enhance test to ensure correct type of
89355         offsetof.
89356         * doc/posix-headers/stddef.texi (stddef.h): Document a Solaris bug
89357         that we are not fixing at this time.
89359 2010-08-15  Bruno Haible  <bruno@clisp.org>
89361         stpncpy: Allow stpncpy to be defined as a macro.
89362         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Don't attempt to redeclare stpncpy
89363         if it's already correctly declared.
89364         * lib/string.in.h (stpncpy): Undefine before redefining.
89365         Reported by Jeremy Huddleston <jeremyhu@macports.org>.
89367 2010-08-14  Bruno Haible  <bruno@clisp.org>
89369         Rename module 'memxfrm' to 'amemxfrm'.
89370         * lib/amemxfrm.h: Renamed from lib/memxfrm.h.
89371         (amemxfrm): Renamed from memxfrm.
89372         * lib/amemxfrm.c: Renamed from lib/memxfrm.h. Include amemxfrm.h.
89373         (amemxfrm): Renamed from memxfrm.
89374         * modules/amemxfrm: Renamed from modules/memxfrm. Update.
89375         * NEWS: Mention the change.
89376         * MODULES.html.sh (String handling <string.h>): Update.
89377         * lib/unicase/u-casexfrm.h: Invoke amemxfrm instead of memxfrm.
89378         * lib/unicase/u8-casexfrm.c: Include amemxfrm.h instead of memxfrm.h.
89379         * lib/unicase/u16-casexfrm.c: Likewise.
89380         * lib/unicase/u32-casexfrm.c: Likewise.
89381         * lib/uninorm/u-normxfrm.h: Invoke amemxfrm instead of memxfrm.
89382         * lib/uninorm/u8-normxfrm.c: Include amemxfrm.h instead of memxfrm.h.
89383         * lib/uninorm/u16-normxfrm.c: Likewise.
89384         * lib/uninorm/u32-normxfrm.c: Likewise.
89385         * modules/unicase/u8-casexfrm (Depends-on): Add amemxfrm, remove
89386         memxfrm.
89387         * modules/unicase/u16-casexfrm (Depends-on): Likewise.
89388         * modules/unicase/u32-casexfrm (Depends-on): Likewise.
89389         * modules/uninorm/u8-normxfrm (Depends-on): Likewise.
89390         * modules/uninorm/u16-normxfrm (Depends-on): Likewise.
89391         * modules/uninorm/u32-normxfrm (Depends-on): Likewise.
89392         Suggested by Paul Eggert.
89394 2010-08-14  Bruno Haible  <bruno@clisp.org>
89396         Tests for module 'astrxfrm'.
89397         * modules/astrxfrm-tests: New file.
89398         * tests/test-astrxfrm.c: New file.
89400         New module 'astrxfrm'.
89401         * lib/astrxfrm.h: New file.
89402         * lib/astrxfrm.c: New file, based on lib/memxfrm.c.
89403         * modules/astrxfrm: New file.
89405 2010-08-14  Reuben Thomas  <rrt@sc3d.org>
89407         regex: Tweak doc.
89408         * doc/regex.texi (Overview): Don't mention regex.c.
89409         (GNU Regular Expression Compiling): Likewise.
89410         (Match-end-of-line Operator): Mention 'not_eol'.
89412 2010-08-14  Brian Gough  <bjg@gnu.org>
89413             Bruno Haible  <bruno@clisp.org>
89415         git-merge-changelog: add doc relating to use with bzr and hg.
89416         * lib/git-merge-changelog.c: Add comments regarding bzr, hg, diff3.
89418 2010-08-14  Matthias Bolte  <matthias.bolte@googlemail.com>
89420         pthread: fix pthread.h creation for srcdir != builddir
89421         * modules/pthread (Makefile.am): Fix the rule to work also in a
89422         non-srcdir build.
89424 2010-08-13  Karl Berry  <karl@gnu.org>
89426         * doc/regex.texi (Predefined Syntaxes): @smallexample.
89427         * doc/posix-*/*: force line break before @url of POSIX
89428         specifications.
89429         Suggested by Werner Lemberg.
89431 2010-08-10  Paul Eggert  <eggert@cs.ucla.edu>
89433         strtod: fix const diagnostic
89434         * lib/strtod.c (strtod): Don't assign const char * to char *,
89435         as this elicits a warning from GCC when warnings are enabled.
89437 2010-08-10  Pádraig Brady  <P@draigbrady.com>
89438         and Eric Blake  <eblake@redhat.com>
89440         copy-acl: ignore ENOTSUP on HP-UX
89441         * lib/acl-internal.h (ACL_NOT_WELL_SUPPORTED): Move definition up,
89442         so that it is available for HP-UX.
89443         * lib/copy-acl.c (qcopy_acl): Use it.
89444         Reported by Patrick M. Callahan.
89446 2010-08-10  Eric Blake  <eblake@redhat.com>
89448         open, chown: relax license
89449         * modules/open (License): Change to LGPLv2+, with consent by all
89450         authors, for use in augeas.
89451         * modules/chown (License): Likewise.
89452         * modules/lchown (Likewise): Likewise.
89453         Requested by Adam Stokes.
89455 2010-08-09  Karl Berry  <karl@gnu.org>
89457         * build-aux/ar-lib: new file, import from Automake.
89458         * config/srclist.txt: autocheck for updates.
89460 2010-08-09  Eric Blake  <eblake@redhat.com>
89462         readlinkat: adjust client modules
89463         * modules/areadlinkat (Depends-on): Use readlinkat, not
89464         symlinkat.
89465         * modules/areadlinkat-with-size (Depends-on): Likewise.
89467         mknod: be more vocal about danger of running tests as root
89468         * m4/mknod.m4 (gl_FUNC_MKNOD): Make it harder to run configure as
89469         root, since that is just asking for problems.
89470         Suggested by Bruno Haible, based on a report by Rainer Tammer.
89472         readlinkat: split into its own module
89473         * modules/symlinkat: Split readlinkat...
89474         * modules/readlinkat: ...into separate module.
89475         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Move readlinkat check...
89476         * m4/readlinkat.m4 (gl_FUNC_READLINAT): ...to new file.
89477         * lib/symlinkat.c (readlinkat): Move...
89478         * lib/readlinkat.c: ...into new file.
89479         * modules/symlinkat-tests: Split readlinkat test...
89480         * modules/readlinkat-tests: ...into separate module.
89481         * tests/test-symlinkat.c: Split...
89482         * tests/test-readlinkat.c: ...into new file.
89483         * NEWS: Document the split.
89484         * doc/posix-functions/readlinkat.texi (readlinkat): Likewise.
89485         * lib/unistd.in.h (readlinkat): Likewise.
89486         Suggested by Bruno Haible.
89488 2010-08-08  Bruno Haible  <bruno@clisp.org>
89490         memxfrm: Speed up.
89491         * lib/memxfrm.c (memxfrm): Allocate enough memory ahead of time, so
89492         that usually only one call to strxfrm is necessary for each string
89493         part.
89494         Reported by Paul Eggert <eggert@cs.ucla.edu>.
89496 2010-08-07  Karl Berry  <karl@gnu.org>
89498         * doc/posix-headers/limits.texi,
89499         * doc/posix-functions/malloc.texi,
89500         * doc/posix-functions/strsignal.texi: missing @item.
89501         * doc/ld-version-script.texi: spurious leading i.
89502         * doc/regex.texi (Interval Operators): no commas inside @var.
89504 2010-08-01  Bruno Haible  <bruno@clisp.org>
89506         Integrate the regex documentation.
89507         * doc/gnulib.texi: Define 'cn' index.
89508         (Regular expressions): New a chapter that includes regex.texi and
89509         regexprops-generic.texi.
89510         * doc/regex.texi: Remove boilerplate stuff. Use simplified @node
89511         syntax.
89513         Whitespace cleanup.
89514         * doc/regex.texi: Remove trailing spaces.
89516         Add regex documentation.
89517         * doc/regex.texi: New file. Taken from regex-0.12/doc/regex.texi in
89518         http://ftp.gnu.org/old-gnu/regex/regex-0.12.tar.gz.
89519         Written by Kathy A. Hargreaves and Karl Berry.
89521 2010-08-01  Bruno Haible  <bruno@clisp.org>
89523         link: Update documentation.
89524         * doc/posix-functions/link.texi: Update regarding Solaris.
89526 2010-07-31  Bruno Haible  <bruno@clisp.org>
89528         Update modules list.
89529         * MODULES.html.sh (Sorting functions <stdlib.h>): Add array-mergesort.
89530         (String handling <string.h>): Add memcmp2, memxfrm.
89531         (Container data structures): Add xlist, xsublist, xoset.
89532         (Core language properties): Add alignof, unused-parameter.
89533         (Process control, Numeric conversion functions <stdlib.h>): Renamed
89534         from Numeric conversion functions <stdlib.h>. Add _Exit, atoll.
89535         (Unibyte characters <ctype.h>): New section.
89536         (String handling <string.h>): New section.
89537         (Mathematics <math.h>): Add acos, acosl, asin, asinl, atan, atan2,
89538         atanl, cbrt, copysign, cos, cosh, cosl, erf, erfc, exp, expl, fabs,
89539         fmod, hypot, j0, j1, jn, ldexp, lgamma, log, log10, log1p, logb, logl,
89540         modf, nextafter, pow, remainder, rint, sin, sinh, sinl, sqrt, sqrtl,
89541         tan, tanh, tanl, y0, y1, yn.
89542         (Support for systems lacking POSIX:2008): Add alphasort, dirent,
89543         dprintf, dprintf-posix, duplocale, fcntl, getlogin, getopt-posix,
89544         grantpt, iconv-h, ioctl, isblank, langinfo, nl_langinfo, pread,
89545         ptsname, pwrite, scandir, servent, sys_utsname, ttyname_r, uname,
89546         unlockpt, vdprintf, vdprintf-posix.
89547         (Enhancements for POSIX:2008 functions): Add getopt-gnu. Remove getopt.
89548         (File system functions): Add concat-filename, sys_file, sys_ioctl,
89549         xconcat-filename.
89550         (File descriptor based Input/Output): Add dup3, fd-safer-flag,
89551         getdtablesize, pipe2, pipe2-safer.
89552         (Security): New section.
89553         (Networking functions): Add accept4.
89554         (Signal handling): Add sigpipe.
89555         (Internationalization functions): Add xstriconveh, mbmemcasecmp,
89556         mbmemcasecoll.
89557         (Unicode string functions): Add libunistring-optional, unistr/u*-cmp2,
89558         unistr/u*-strcoll, uniwbrk/*, uninorm/*, unicase/*.
89559         (Executing programs): Add findprog-lgpl, pipe-filter-gi,
89560         pipe-filter-ii.
89561         (Misc): Add argp-version-etc, login_tty, parse-duration.
89563 2010-07-31  Bruno Haible  <bruno@clisp.org>
89565         Improve doc in MODULES.html.
89566         * modules/linkat (Description): Add the word "function".
89567         * modules/mkfifo (Description): Likewise.
89568         * modules/mknod (Description): Likewise.
89569         * modules/remove (Description): Likewise.
89570         * modules/renameat (Description): Likewise.
89571         * modules/stat (Description): Likewise.
89572         * modules/symlink (Description): Likewise.
89573         * modules/unlink (Description): Likewise.
89575 2010-07-31  Bruno Haible  <bruno@clisp.org>
89577         ansi-c++-opt: Provide option --enable-c++/--disable-c++ when possible.
89578         * m4/ansi-c++.m4 (gl_CXX_CHOICE): In Autoconf 2.66 or newer, provide
89579         option --enable/disable-c++ instead of --enable/disable-cxx.
89580         * NEWS: Mention the change.
89582 2010-07-31  Bruno Haible  <bruno@clisp.org>
89584         readlink, areadlink: Relax test a bit.
89585         * tests/test-readlink.h (test_readlink): Accept EINVAL as an
89586         alternative to ENOTDIR.
89587         * tests/test-areadlink.h (test_areadlink): Likewise.
89588         Reported by Rainer Tammer.
89590 2010-07-31  Bruno Haible  <bruno@clisp.org>
89592         unistr/u8-strstr, unistr/u16-strstr: Optimize the one-character case.
89593         * lib/unistr/u-strstr.h (FUNC): When the needle contains only one
89594         character, perform the search using U_STRCHR.
89595         * lib/unistr/u8-strstr.c (U_STRMBTOUC): New macro.
89596         * lib/unistr/u16-strstr.c (U_STRMBTOUC): Likewise.
89597         * modules/unistr/u8-strstr (Depends-on): Add unistr/u8-strmbtouc.
89598         * modules/unistr/u16-strstr (Depends-on): Add unistr/u16-strmbtouc.
89599         Suggested by Paolo Bonzini.
89601 2010-07-31  Bruno Haible  <bruno@clisp.org>
89603         unistr/u*-strstr: Fix dependencies.
89604         * modules/unistr/u8-strstr (Depends-on): Add unistr/u8-strchr.
89605         * modules/unistr/u16-strstr (Depends-on): Add unistr/u16-strchr.
89606         * modules/unistr/u32-strstr (Depends-on): Add unistr/u32-strchr.
89608 2010-07-31  Bruno Haible  <bruno@clisp.org>
89610         unistr/u8-chr, unistr/u8-strchr: Optimize and add comments.
89611         * lib/unistr/u8-chr.c (u8_chr): Add comments. Remove a useless test at
89612         the beginning of the loop.
89613         * lib/unistr/u8-strchr.c (u8_strchr): Add comments. Don't fall through
89614         cases in 'switch' statement.
89616         unistr/u8-strchr: Fix several bugs.
89617         * lib/unistr/u8-strchr.c (u8_strchr): Don't search beyond the end of
89618         the string. When not found, return NULL, not a pointer near the end.
89620         More tests for unistr/u8-strchr.
89621         * tests/unistr/test-strchr.h (test_strchr): Renamed from main. Check
89622         that the function does not read past the first occurrence of the byte
89623         being searched.
89624         * tests/unistr/test-u8-strchr.c (main): New function, with more tests.
89625         * tests/unistr/test-u16-strchr.c (main): New function.
89626         * tests/unistr/test-u32-strchr.c (main): New function.
89628 2010-07-31  Bruno Haible  <bruno@clisp.org>
89630         posix-modules: Ignore backup files of documentation files.
89631         * posix-modules: grep only through files named *.texi.
89633 2010-07-31  Bruno Haible  <bruno@clisp.org>
89635         symlinkat: Fix documentation.
89636         * doc/posix-functions/readlinkat.texi: Fix module name.
89638 2010-07-31  Bruno Haible  <bruno@clisp.org>
89640         fchownat: Replace also when chown has the trailing slash bug.
89641         * m4/openat.m4 (gl_FUNC_FCHOWNAT): Move the test of REPLACE_CHOWN
89642         outside the gl_FUNC_FCHOWNAT_DEREF_BUG invocation. Fixes regression
89643         introduced on 2010-04-10.
89644         Reported by Rainer Tammer.
89646 2010-07-31  Bruno Haible  <bruno@clisp.org>
89648         linkat: Work around AIX 7.1 bug.
89649         * m4/linkat.m4 (gl_FUNC_LINKAT): Require AC_CANONICAL_HOST. Test
89650         whether linkat handles trailing slash correctly. If not, replace linkat
89651         and define LINKAT_TRAILING_SLASH_BUG.
89652         * lib/linkat.c (rpl_linkat): If LINKAT_TRAILING_SLASH_BUG is defined,
89653         check whether (fd1,file1) points to a directory if file1 or file2 ends
89654         in a slash. Code taken from lib/link.c.
89655         * doc/posix-functions/linkat.texi: Mention trailing slash bug.
89656         Reported by Rainer Tammer.
89658 2010-07-31  Bruno Haible  <bruno@clisp.org>
89660         Correctly determine whether pow is available in libc on AIX 7 with xlc.
89661         * m4/mathfunc.m4 (gl_MATHFUNC): Actually use the 'funcptr' variable.
89662         This disables an xlc optimization that was causing wrong test results.
89663         Reported by Rainer Tammer.
89665 2010-07-31  Bruno Haible  <bruno@clisp.org>
89667         iconv: Work around AIX 6.1..7.1 bug.
89668         * doc/posix-functions/iconv.texi: Mention AIX 6.1, 7.1 bug.
89669         * m4/iconv.m4 (AM_ICONV_LINK): Test against AIX 6.1, 7.1 bug. When
89670         cross-compiling, guess no on all versions of AIX.
89671         Reported by Rainer Tammer.
89673 2010-07-31  Bruno Haible  <bruno@clisp.org>
89675         readlink: Relax test a bit.
89676         * tests/test-readlink.h (test_readlink): Allow different errno value
89677         when readlink is called with a file name that ends in / and refers to
89678         a file.
89679         Suggested by Eric Blake.
89680         Reported by Rainer Tammer.
89682 2010-07-31  Bruno Haible  <bruno@clisp.org>
89684         copysign: Does not require -lm on glibc systems.
89685         * modules/copysign (configure.ac): Use gl_MATHFUNC, not
89686         gl_COMMON_DOUBLE_MATHFUNC.
89687         * m4/mathfunc.m4 (gl_COMMON_DOUBLE_MATHFUNC): Update comments.
89689 2010-07-31  Bruno Haible  <bruno@clisp.org>
89691         duplocale: Work around AIX 7.1 bug.
89692         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Let the test fail also when
89693         duplocale(LC_GLOBAL_LOCALE) returns (locale_t)0.
89694         * lib/duplocale.c (rpl_duplocale): Update comment.
89695         * doc/posix-functions/duplocale.texi: Mention the AIX 7.1 bug.
89696         Reported by Rainer Tammer.
89698 2010-07-30  Bruno Haible  <bruno@clisp.org>
89700         dirfd: Avoid link error on AIX 7.1.
89701         * lib/dirent.in.h (dirfd): Use modern idiom with REPLACE_DIRFD.
89702         * m4/dirfd.m4 (gl_FUNC_DIRFD): If the function is declared but does not
89703         exist, set REPLACE_DIRFD.
89704         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Initialize REPLACE_DIRFD.
89705         * modules/dirent (Makefile.am): Substitute REPLACE_DIRFD.
89706         * doc/posix-functions/dirfd.texi: Update.
89707         Reported by Rainer Tammer.
89709 2010-07-30  Eric Blake  <eblake@redhat.com>
89711         strtod: next round of AIX fixes
89712         * lib/strtod.c (strtod): Work around AIX bug of parsing p with no
89713         exponent.
89714         * tests/test-strtod.c (main): Enhance tests.
89715         * doc/posix-functions/strtod.texi (strtod): Document next bug.
89716         Reported by Rainer Tammer.
89718         futimens: fix configure check
89719         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Use correct logic.
89720         Reported by Bruno Haible.
89722 2010-07-30  Bruno Haible  <bruno@clisp.org>
89724         getline: Update regarding AIX.
89725         * doc/posix-functions/getline.texi: Mention bug on AIX 7.1.
89726         Reported by Rainer Tammer.
89728 2010-07-30  Bruno Haible  <bruno@clisp.org>
89730         wcwidth: Drop replacement on AIX 7.
89731         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): When cross-compiling, guess yes on
89732         AIX 7.
89733         Reported by Rainer Tammer.
89735 2010-07-30  Bruno Haible  <bruno@clisp.org>
89737         strtok_r: Avoid triggering bug in AIX 7.1 xlc compiler.
89738         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Don't cast an invalid address to
89739         a 'char *'.
89740         Reported by Rainer Tammer.
89742 2010-07-30  Bruno Haible  <bruno@clisp.org>
89744         unlink: Update regarding AIX.
89745         * doc/posix-functions/unlink.texi: Mention bug on AIX 7.1.
89746         * m4/unlink.m4 (gl_FUNC_UNLINK): Update comment.
89747         Reported by Rainer Tammer.
89749 2010-07-30  Bruno Haible  <bruno@clisp.org>
89751         symlink: Update regarding AIX.
89752         * doc/posix-functions/symlink.texi: Mention bug on AIX 7.1.
89753         * m4/symlink.m4 (gl_FUNC_SYMLINK): Update comment.
89754         Reported by Rainer Tammer.
89756 2010-07-30  Bruno Haible  <bruno@clisp.org>
89758         strndup: Update regarding AIX.
89759         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, guess yes on
89760         AIX 7.
89761         Reported by Rainer Tammer.
89763 2010-07-30  Bruno Haible  <bruno@clisp.org>
89765         stat: Update regarding AIX.
89766         * doc/posix-functions/stat.texi: Mention bug on AIX 7.1.
89767         * m4/stat.m4 (gl_FUNC_STAT): Update comment.
89768         Reported by Rainer Tammer.
89770 2010-07-30  Bruno Haible  <bruno@clisp.org>
89772         truncl: Fix autoconf test.
89773         * m4/truncl.m4 (gl_FUNC_TRUNCL): Add TRUNCL_LIBM to LIBS while testing
89774         whether truncl works.
89775         Reported by Rainer Tammer.
89777 2010-07-30  Bruno Haible  <bruno@clisp.org>
89779         round: Update regarding AIX.
89780         * m4/round.m4 (gl_FUNC_ROUND): When cross-compiling, guess no on AIX 7.
89781         * doc/posix-functions/round.texi: Mention bug on AIX 7.1.
89782         Reported by Rainer Tammer.
89784 2010-07-30  Bruno Haible  <bruno@clisp.org>
89786         rename: Update regarding AIX.
89787         * doc/posix-functions/rename.texi: Mention bug on AIX 7.1.
89788         * m4/rename.m4 (gl_FUNC_RENAME): Update comment.
89789         Reported by Rainer Tammer.
89791 2010-07-30  Bruno Haible  <bruno@clisp.org>
89793         printf.m4: Update regarding AIX.
89794         * m4/printf.m4: Update comments regarding AIX.
89795         Reported by Rainer Tammer.
89797 2010-07-30  Bruno Haible  <bruno@clisp.org>
89799         iconv: Update regarding AIX.
89800         * m4/iconv.m4 (AM_ICONV_LINK): When cross-compiling, guess yes on
89801         AIX 7.
89802         Reported by Rainer Tammer.
89804 2010-07-30  Bruno Haible  <bruno@clisp.org>
89806         getopt: Update regarding AIX.
89807         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): When cross-compiling, guess
89808         no on AIX.
89809         * doc/posix-functions/getopt.texi: Mention that AIX has the optind bug.
89810         Reported by Rainer Tammer.
89812 2010-07-30  Bruno Haible  <bruno@clisp.org>
89814         ldexpl; Update regarding AIX.
89815         * m4/ldexpl.m4 (gl_FUNC_LDEXPL_WORKS): When cross-compiling, guess yes
89816         on AIX 7.
89817         Reported by Rainer Tammer.
89819 2010-07-30  Bruno Haible  <bruno@clisp.org>
89821         frexpl: Update regarding AIX.
89822         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): When cross-compiling, guess yes
89823         on AIX 7.
89824         Reported by Rainer Tammer.
89826 2010-07-30  Bruno Haible  <bruno@clisp.org>
89828         open, fopen: Update regarding AIX.
89829         * m4/open.m4 (gl_FUNC_OPEN): Adjust cross-compiling guess for AIX.
89830         * m4/fopen.m4 (gl_FUNC_FOPEN): Likewise.
89831         * doc/posix-functions/open.texi: Mention the trailing-slash bug on AIX.
89832         * doc/posix-functions/fopen.texi: Likewise.
89833         Reported by Rainer Tammer.
89835 2010-07-30  Bruno Haible  <bruno@clisp.org>
89837         chown: Update doc regarding AIX.
89838         * doc/posix-functions/chown.texi: Mention bug on AIX 7.1.
89839         * m4/chown.m4 (gl_FUNC_CHOWN): Update comment.
89840         Reported by Rainer Tammer.
89842 2010-07-30  Eric Blake  <eblake@redhat.com>
89844         strtod: fix bug in replacement function on AIX
89845         * lib/strtod.c (strtod): Special case broken "0x" parse in
89846         underlying strtod.
89847         * tests/test-strtod.c (main): Document AIX 7.1 bugs.
89848         * doc/posix-functions/strtod.texi (strtod): Likewise.
89849         Reported by Rainer Tammer.
89851 2010-07-30  Bruno Haible  <bruno@clisp.org>
89853         mbrlen: Fix cross-compilation guess for AIX.
89854         * m4/mbrlen.m4 (gl_MBRLEN_INCOMPLETE_STATE): Fix cross-compilation
89855         guess. Leftover from 2008-12-22.
89857 2010-07-30  Bruno Haible  <bruno@clisp.org>
89859         mbrtowc: Fix cross-compilation guess for AIX.
89860         * m4/mbrtowc.m4 (gl_MBRTOWC_INCOMPLETE_STATE): Fix cross-compilation
89861         guess. Leftover from 2008-12-21.
89863 2010-07-29  Peter O'Gorman  <pogma@thewrittenword.com>  (tiny change)
89865         init.sh: work around trap limitation of some shells
89866         * tests/init.sh (setup_): Move exit trap outside of shell function.
89868 2010-07-29  Eric Blake  <eblake@redhat.com>
89870         strtod: aid debugging
89871         * m4/strtod.m4(gl_FUNC_STRTOD): Use distinct exit status to aid
89872         understanding why strtod is rejected.
89874 2010-07-28  Bruno Haible  <bruno@clisp.org>
89876         unistr/u*-chr, unistr/u*-strchr: Fix link errors and warnings.
89877         * lib/unistr/u8-chr.c: Include <string.h>.
89878         * tests/unistr/test-u8-chr.c: Likewise.
89879         * tests/unistr/test-u16-chr.c: Likewise.
89880         * tests/unistr/test-u32-chr.c: Likewise.
89881         * tests/unistr/test-u8-strchr.c: Likewise.
89882         * tests/unistr/test-u16-strchr.c: Likewise.
89883         * tests/unistr/test-u32-strchr.c: Likewise.
89884         * modules/unistr/u8-chr-tests (Depends-on): Add unistr/u32-set.
89885         * modules/unistr/u16-chr-tests (Depends-on): Likewise.
89886         * modules/unistr/u8-strchr-tests (Depends-on): Likewise.
89887         * modules/unistr/u16-strchr-tests (Depends-on): Likewise.
89889 2010-07-28  Bruno Haible  <bruno@clisp.org>
89891         Use spaces for indentation, not tabs.
89892         * lib/**/*.[hcy] except lib/reg*.[hc]: Untabify.
89894 2010-07-27  Bruno Haible  <bruno@clisp.org>
89896         mbspcasecmp: Fix function specification.
89897         * lib/string.in.h (mbspcasecmp): Fix specification comment.
89898         * lib/mbspcasecmp.c (mbspcasecmp): Likewise.
89899         Reported by Eric Blake <eblake@redhat.com>.
89901 2010-07-26  Paul R. Eggert  <eggert@cs.ucla.edu>
89903         timespec: use cast and not conditional, as truncation isn't possible
89904         * lib/timespec.h (timespec_cmp): Use cast to pacify gcc -Wconversion
89905         instead of a conditional.  Comment about the situation in more detail.
89906         This undoes most of the 2009-10-29 patch.
89908 2010-07-23  Paolo Bonzini  <pbonzini@redhat.com>
89910         unistr/u8-chr, unistr/u8-strchr: use Boyer-Moore like algorithm.
89911         * lib/unistr/u8-chr.c: Add Boyer-Moore like operation.
89912         * lib/unistr/u8-strchr.c: Likewise.
89913         * modules/unistr/u8-chr: Depend on memchr.
89915         unistr/u*-strchr: add tests
89916         * modules/unistr/u8-strchr-tests: New file.
89917         * modules/unistr/u16-strchr-tests: New file.
89918         * modules/unistr/u32-strchr-tests: New file.
89919         * tests/unistr/test-strchr.h: New file.
89920         * tests/unistr/test-u8-strchr.c: New file.
89921         * tests/unistr/test-u16-strchr.c: New file.
89922         * tests/unistr/test-u32-strchr.c: New file.
89924         unistr/u*-chr: test multibyte sequences more
89925         * tests/unistr/test-chr.h: Do complete testing of the characters in the
89926         test vector.
89927         * tests/unistr/test-u8-chr.c (U_UCTOMB): Define.
89928         * tests/unistr/test-u16-chr.c (U_UCTOMB): Likewise.
89929         * tests/unistr/test-u32-chr.c (U_UCTOMB): Likewise.
89931         unistr/u*-chr: test multibyte sequences
89932         * tests/unistr/test-chr.h: Put characters above 0-127 in the test input.
89934         unistr/u*-chr: prepare for multibyte tests
89935         * modules/unistr/u8-chr-tests: Depend on u32-to-u8.
89936         * modules/unistr/u16-chr-tests: Depend on u32-to-u16.
89937         * tests/unistr/test-chr.h: Build initial version as UCS-4 then convert.
89938         * tests/unistr/test-u8-chr.c (U32_TO_U): Define.
89939         * tests/unistr/test-u16-chr.c (U32_TO_U): Likewise.
89940         * tests/unistr/test-u32-chr.c (U32_TO_U): Likewise.
89942 2010-07-18  Bruno Haible  <bruno@clisp.org>
89944         unistr/u8-strchr: Optimize non-ASCII argument case.
89945         * lib/unistr/u8-strchr.c (u8_strchr): Compare the last byte first,
89946         because the first byte often matches anyway.
89947         Reported by Pádraig Brady <P@draigbrady.com>.
89949 2010-07-15  Karl Berry  <karl@gnu.org>
89951         * config/srclist.txt (fdl.texi): only one copy, from gnustandards.
89953 2010-07-14  Paul R. Eggert  <eggert@cs.ucla.edu>
89955         getcwd: on Solaris, work better if ancestors are inaccessible
89956         * lib/getcwd.c (__getcwd): If getcwd returns EINVAL for zero
89957         buffer and size, try again with a large buffer.  This works better
89958         on Solaris, since its getcwd succeeds even if the path to the root
89959         is inaccessible, and this is helpful in common cases such as .zfs
89960         hidden directories.  Problem reported by J Chapman Flack in
89961         http://lists.gnu.org/r/bug-tar/2010-06/msg00000.html
89962         Use system getcwd if it's declared, not merely if it's partly
89963         working; use the partly-working test only to avoid needless effort
89964         if the system getcwd fails.
89965         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Omit
89966         comment that was already obsolete and is now even more obsolete.
89967         * modules/getcwd (Depends-on): Depend on strdup, since __getcwd
89968         now might call strdup.
89970 2010-07-13  Paul R. Eggert  <eggert@cs.ucla.edu>
89972         pthread: Add enough so that coreutils/src/sort.c compiles.
89973         * lib/pthread.in.h: Add self to author comment.  Conditionalize on
89974         _GL_PTHREAD_H, not PTHREAD_H_, for consistency with the rest of
89975         gnulib. Include <sched.h> and <time.h>, as per POSIX.
89976         Include <sys/types.h>, in case it defines pthread_t.
89977         (pthread_t, pthread_attr_t, pthread_barrier_t, pthread_barrierattr_t):
89978         (pthread_cond_t, pthread_condattr_t, pthread_key_t, pthread_mutex_t):
89979         (pthread_mutexattr_t, pthread_once_t, pthread_rwlock_t):
89980         (pthread_rwlockattr_t, pthread_spinlock_t):
89981         New typedefs, if HAVE_PTHREAD_T is not defined.
89982         (PTHREAD_COND_INITIALIZER, PTHREAD_MUTEX_INITIALIZER):
89983         (PTHREAD_ONCE_INIT, PTHREAD_RWLOCK_INITIALIZER):
89984         (PTHREAD_BARRIER_SERIAL_THREAD, PTHREAD_CANCEL_DEFERRED):
89985         (PTHREAD_CANCEL_ASYNCHRONOUS, PTHREAD_CANCEL_ENABLE):
89986         (PTHREAD_CANCEL_DISABLE, PTHREAD_CANCELED, PTHREAD_CREATE_JOINABLE):
89987         (PTHREAD_CREATE_DETACHED, PTHREAD_INHERIT_SCHED):
89988         (PTHREAD_EXPLICIT_SCHED, PTHREAD_MUTEX_DEFAULT, PTHREAD_MUTEX_NORMAL):
89989         (PTHREAD_MUTEX_ERRORCHECK, PTHREAD_MUTEX_RECURSIVE):
89990         (PTHREAD_MUTEX_STALLED, PTHREAD_MUTEX_ROBUST, PTHREAD_PRIO_NONE):
89991         (PTHREAD_PRIO_INHERIT, PTHREAD_PRIO_PROTECT, PTHREAD_PROCESS_PRIVATE):
89992         (PTHREAD_PROCESS_SHARED, PTHREAD_SCOPE_SYSTEM, PTHREAD_SCOPE_PROCESS):
89993         New macros.
89994         (pthread_cond_destroy, pthread_cond_init, pthread_cond_signal):
89995         (pthread_cond_wait, pthread_exit, pthread_mutex_destroy):
89996         (pthread_mutex_init, pthread_mutex_lock, pthread_mutex_unlock):
89997         (pthread_spin_init, pthread_spin_lock, pthread_spin_trylock);
89998         (pthread_spin_unlock): New dummy functions.
89999         (pthread_create): Return EAGAIN; don't set errno.
90000         * m4/pthread.m4 (gl_PTHREAD_CHECK): Check for pthread_t, and
90001         require AC_C_INLINE.
90002         * modules/pthread (Depends-on): Add sched, time.
90003         (pthread.h): Use AM_V_GEN.
90005 2010-07-13  Bruno Haible  <bruno@clisp.org>
90007         striconveh: Don't malloc memory if the result buffer is sufficient.
90008         * lib/striconveh.c (mem_cd_iconveh_internal): Use the provided result
90009         buffer if its size is sufficient.
90010         Reported by Ludovic Courtès <ludo@gnu.org>.
90012 2010-07-13  Bruno Haible  <bruno@clisp.org>
90014         strtod: Add safety check.
90015         * lib/strtod.c (ldexp): Abort if this dummy replacement gets called.
90017 2010-07-12  Bruno Haible  <bruno@clisp.org>
90019         Unify tests that set gl_cv_func_ldexpl_no_libm.
90020         * m4/ldexpl.m4 (gl_CHECK_LDEXPL_NO_LIBM): New macro, extracted from
90021         gl_FUNC_LDEXPL.
90022         (gl_FUNC_LDEXPL): Invoke it.
90023         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
90025 2010-07-12  Bruno Haible  <bruno@clisp.org>
90027         Unify tests that set gl_cv_func_ldexp_no_libm.
90028         * m4/ldexp.m4: New file, based on m4/mathfunc.m4.
90029         * m4/strtod.m4 (gl_PREREQ_STRTOD): Require gl_CHECK_LDEXP_NO_LIBM.
90030         * modules/ldexp (Files): Remove m4/mathfunc.m4. Add m4/ldexp.m4.
90031         (configure.ac): Simply invoke gl_FUNC_LDEXP.
90032         * modules/strtod (Files): Add m4/ldexp.m4.
90034 2010-07-12  Bruno Haible  <bruno@clisp.org>
90036         Unify tests that set gl_cv_func_frexpl_no_libm.
90037         * m4/frexpl.m4 (gl_CHECK_FREXPL_NO_LIBM): New macro, extracted from
90038         gl_FUNC_FREXPL_NO_LIBM.
90039         (gl_FUNC_FREXPL, gl_FUNC_FREXPL_NO_LIBM): Invoke it.
90040         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
90042 2010-07-12  Bruno Haible  <bruno@clisp.org>
90044         Unify tests that set gl_cv_func_frexp_no_libm.
90045         * m4/frexp.m4 (gl_CHECK_FREXP_NO_LIBM): New macro, extracted from
90046         gl_FUNC_FREXP_NO_LIBM.
90047         (gl_FUNC_FREXP, gl_FUNC_FREXP_NO_LIBM): Require it.
90048         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Likewise.
90050 2010-07-12  Paul R. Eggert  <eggert@cs.ucla.edu>
90052         memcoll: clarify sizes versus lengths, document better, and tweak perf
90053         * lib/memcoll.c (strcoll_loop, memcoll0):
90054         Improve quality of descriptive comments.  Name variables
90055         consistently as to whether they are lengths (which do not include
90056         terminating null) versus sizes (which do).
90057         * lib/xmemcoll.c (xmemcoll0): Likewise.
90058         * lib/memcoll.c (strcoll_loop): Tweak the way that the diff is
90059         returned when s1size == 0; this is easier to compile and saves
90060         about 17% of memcoll's code space on x86-64 with GCC 4.1.2.
90062 2010-07-12  Bruno Haible  <bruno@clisp.org>
90064         Tests for module '_Exit'.
90065         * modules/_Exit-tests: New file.
90066         * tests/test-_Exit.sh: New file.
90067         * tests/test-_Exit.c: New file.
90069         New module '_Exit'.
90070         * lib/stdlib.in.h (__attribute__): New macro.
90071         (_Exit): New declaration.
90072         * lib/_Exit.c: New file.
90073         * m4/_Exit.m4: New file.
90074         * m4/stdlib_h.m4 (gl_STDLIB_H): Check whether _Exit is declared.
90075         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB__EXIT and HAVE__EXIT.
90076         * modules/stdlib (Makefile.am): Substitute GNULIB__EXIT and HAVE__EXIT.
90077         * modules/_Exit: New file.
90078         * tests/test-stdlib-c++.cc (_Exit): Check signature.
90079         * doc/posix-functions/_Exit_C99.texi: Mention the new module.
90081 2010-07-12  Paul R. Eggert  <eggert@cs.ucla.edu>
90083         strtod: make it more-accurate typically, and don't require libm
90084         * lib/strtod.c (_GL_ARG_NONNULL): Remove; no longer needed.
90085         Include limits.h.  Don't include string.h.
90086         (HAVE_LDEXP_IN_LIBC, HAVE_RAW_DECL_STRTOD): Define to 0 if not defined.
90087         (locale_isspace): New function, so that no casts are needed to
90088         check whether *s is a space.
90089         (ldexp): Provide an unused dummy if not available.
90090         (scale_radix_exp, parse_number, underlying_strtod): New functions.
90091         (strtod): Use them.  This implementation prefers to use the
90092         underlying strtod if available, falling back on our own code
90093         only to fix known bugs.  This is more likely to produce an
90094         accurate result.  Also, it avoids the use of libm functions.
90095         * m4/strtod.m4 (gl_FUNC_STRTOD): Don't invoke _AC_LIBOBJ_STRTOD;
90096         no longer needed.  Invoke AC_LIBOBJ([strtod]); don't know why this
90097         was absent, but it caused a test failure with coreutils.
90098         (gl_PREREQ_STRTOD): Check wither ldexp can be used without linking
90099         with libm.
90100         * modules/strtod (Makefile.am, Link): libm is no longer needed.
90101         * modules/strtod-tests (Makefile.am): Likewise.
90103 2010-07-11  Pádraig Brady  <P@draigBrady.com>
90104             Bruno Haible  <bruno@clisp.org>
90106         unistr/u8-strchr: Optimize ASCII argument case.
90107         * lib/unistr/u8-strchr.c (u8_strchr): For ASCII arguments, use strchr.
90109 2010-07-08  Paul Eggert  <eggert@cs.ucla.edu>
90111         (x)memcoll: minor tweaks
90112         * lib/memcoll.c (strcoll_loop): Prefer the style where 'const'
90113         is after the type that it qualifies.
90114         (memcoll0): Likewise.
90115         * lib/memcoll.h (memcoll0): Likewise.
90116         * lib/xmemcoll.c (collate_error, xmemcoll0): Likewise.
90117         * lib/xmemcoll.h (xmemcoll0): Likewise.
90118         * lib/memcoll.c (memcoll0): Correct the comment.  This function
90119         differs from memcoll in that the NUL byte is part of the argument.
90120         Omit the abort-checks, as performance is a real issue here.  Plus,
90121         the checks were wrong anyway (an off-by-one error).  Omit local
90122         variable 'diff', as it's a bit clearer that way.
90123         * m4/memcoll.m4 (gl_MEMCOLL): Omit AC_FUNC_STRCOLL, as it's
90124         no longer needed.
90126 2010-07-08  Chen Guo  <chenguo4@yahoo.com>
90128         (x)memcoll: speedup when input is known to be NUL delimited
90129         * lib/memcoll.c: Include stdlib.
90130         (memcoll0): New function.
90131         (strcoll_loop): New function, refactored for use in both memcoll
90132         and memcoll0.
90133         * lib/memcoll.h (memcoll0): Add prototype.
90134         * lib/xmemcoll.c (xmemcoll0): New function.
90135         (collate_error): New function, refactored for use in both xmemcoll
90136         and xmemcoll0.
90137         * lib/xmemcoll.h (xmemcoll0): Add prototype.
90138         * m4/memcoll.m4: add inline invocation.
90140 2010-07-06  Pádraig Brady  <P@draigBrady.com>
90142         * build-aux/bootstrap: Remove any local translations
90143         from the translation project synchronization directory,
90144         so that local only translations are not distributed.
90146 2010-07-04  Bruno Haible  <bruno@clisp.org>
90148         fsusage: Clarify which code applies to which platforms.
90149         * m4/fsusage.m4 (gl_FSUSAGE): Clarify which test succeeds on which
90150         platform.
90151         * lib/fsusage.c (get_fs_usage): Likewise.
90153 2010-07-04  Bruno Haible  <bruno@clisp.org>
90155         havelib: Fix bug when AC_LIB_FROMPACKAGE is used more than twice.
90156         * m4/lib-link.m4 (AC_LIB_FROMPACKAGE): Use m4_defn.
90157         Reported by Martin Lambers <marlam@marlam.de>.
90159 2010-07-04  Jim Meyering  <meyering@redhat.com>
90161         hash: once again explicitly disallow insertion of NULL
90162         * lib/hash.c (hash_insert0): Reinstate just-removed test:
90163         inserting a NULL pointer cannot work with these functions.
90164         Add a comment with details.
90165         This reverts part of the 2010-07-01 commit, 5bef1a35
90166         "hash: extend module to deal with non-pointer keys".
90168 2010-07-01  Bruno Haible  <bruno@clisp.org>
90170         stdbool: Update doc.
90171         * doc/posix-headers/stdbool.texi: Mention OpenBSD bug.
90172         Info from Christian Weisgerber <naddy@mips.inka.de>.
90174 2010-07-01  Jim Meyering  <meyering@redhat.com>
90176         hash: extend module to deal with non-pointer keys
90177         * lib/hash.c (hash_insert0): New interface, much like hash_insert
90178         but that allows insertion of non-pointer entries.
90179         Do not disallow an ENTRY value of NULL.
90180         (hash_insert): This is now just a thin wrapper.  Call hash_insert0.
90181         * lib/hash.h (hash_insert0): Declare.
90183 2010-07-01  Christian Weisgerber  <naddy@mips.inka.de>  (tiny change)
90185         gettext: Use AC_GNU_SOURCE as a fallback for AC_USE_SYSTEM_EXTENSIONS.
90186         * m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): When AC_USE_SYSTEM_EXTENSIONS is
90187         not present (i.e. with autoconf 2.59 and when using gettextize, not
90188         gnulib), require AC_GNU_SOURCE instead.
90190 2010-07-01  Ian Beckwith  <ianb@erislabs.net>
90192         idpriv-drop: Fix tests.
90193         * tests/test-idpriv-drop.su.sh: Refer to the test-idpriv-drop program,
90194         not to the test-idpriv-droptemp program.
90196 2010-06-29  Bruno Haible  <bruno@clisp.org>
90198         string: Fix syntax error with g++ 2.96.
90199         * lib/string.in.h (__pure__): Remove definition.
90200         (_GL_ATTRIBUTE_PURE): New macro.
90201         (memchr, memmem, memrchr, rawmemchr, strchrnul, strnlen, strpbrk,
90202         strstr, strcasestr): Use it instead of __attribute__ ((__pure__)).
90203         Reported by Christian Weisgerber <naddy@mips.inka.de>.
90205 2010-06-28  Ian Beckwith  <ianb@erislabs.net>
90207         unitypes: Fix bug introduced on 2010-05-18.
90208         * modules/unitypes (Files): Really add m4/libunistring-base.m4.
90210 2010-06-22  Eric Blake  <eblake@redhat.com>
90212         memmem: slight optimization
90213         * lib/str-two-way.h (critical_factorization): Update comments.
90214         Reduce work during factorization phase.
90215         Reported by Carlos Bueno <carlos@bueno.org>.
90217 2010-06-21  Bruno Haible  <bruno@clisp.org>
90219         Fix HAVE_CALLOC_POSIX misnomer.
90220         * lib/stdlib.in.h (calloc): Use REPLACE_CALLOC instead of
90221         !HAVE_CALLOC_POSIX.
90222         * m4/calloc.m4 (gl_REPLACE_CALLOC): Set REPLACE_CALLOC instead of
90223         HAVE_CALLOC_POSIX.
90224         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_CALLOC
90225         instead of HAVE_CALLOC_POSIX.
90226         * modules/stdlib (Makefile.am): Substitute REPLACE_CALLOC instead of
90227         HAVE_CALLOC_POSIX.
90229         Use modern idiom for calloc() replacement.
90230         * modules/calloc (configure.ac): Invoke gl_FUNC_CALLOC_GNU instead of
90231         AC_FUNC_CALLOC.
90232         * m4/calloc.m4 (gl_FUNC_CALLOC_GNU): Renamed from AC_FUNC_CALLOC.
90233         Require gl_STDLIB_H_DEFAULTS. Invoke gl_REPLACE_CALLOC.
90234         (gl_FUNC_CALLOC_POSIX): Rely on gl_STDLIB_H_DEFAULTS to initialize
90235         HAVE_CALLOC_POSIX. Invoke gl_REPLACE_CALLOC.
90236         (gl_REPLACE_CALLOC): New macro.
90238 2010-06-21  Bruno Haible  <bruno@clisp.org>
90240         Fix HAVE_REALLOC_POSIX misnomer.
90241         * lib/stdlib.in.h (realloc): Use REPLACE_REALLOC instead of
90242         !HAVE_REALLOC_POSIX.
90243         * m4/realloc.m4 (gl_REPLACE_REALLOC): Set REPLACE_REALLOC instead of
90244         HAVE_REALLOC_POSIX.
90245         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_REALLOC
90246         instead of HAVE_REALLOC_POSIX.
90247         * modules/stdlib (Makefile.am): Substitute REPLACE_REALLOC instead of
90248         HAVE_REALLOC_POSIX.
90250         Use modern idiom for realloc() replacement.
90251         * modules/realloc (configure.ac): Invoke gl_FUNC_REALLOC_GNU instead of
90252         AC_FUNC_REALLOC.
90253         * m4/realloc.m4 (gl_FUNC_REALLOC_GNU): New macro, mostly copied from
90254         Autoconf's AC_FUNC_REALLOC.
90255         (gl_FUNC_REALLOC_POSIX): Rely on gl_STDLIB_H_DEFAULTS to initialize
90256         HAVE_REALLOC_POSIX. Invoke gl_REPLACE_REALLOC.
90257         (gl_REPLACE_REALLOC): New macro.
90258         Reported by Richard Lloyd <richard.lloyd@connectinternetsolutions.com>.
90260 2010-06-21  Bruno Haible  <bruno@clisp.org>
90262         Fix HAVE_MALLOC_POSIX misnomer.
90263         * lib/stdlib.in.h (malloc): Use REPLACE_MALLOC instead of
90264         !HAVE_MALLOC_POSIX.
90265         * m4/malloc.m4 (gl_REPLACE_MALLOC): Set REPLACE_MALLOC instead of
90266         HAVE_MALLOC_POSIX.
90267         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MALLOC
90268         instead of HAVE_MALLOC_POSIX.
90269         * modules/stdlib (Makefile.am): Substitute REPLACE_MALLOC instead of
90270         HAVE_MALLOC_POSIX.
90272         Use modern idiom for malloc() replacement.
90273         * modules/malloc (configure.ac): Invoke gl_FUNC_MALLOC_GNU instead of
90274         AC_FUNC_MALLOC.
90275         * m4/malloc.m4 (gl_FUNC_MALLOC_GNU): New macro, mostly copied from
90276         Autoconf's AC_FUNC_MALLOC.
90277         (gl_FUNC_MALLOC_POSIX): Rely on gl_STDLIB_H_DEFAULTS to initialize
90278         HAVE_MALLOC_POSIX. Invoke gl_REPLACE_MALLOC.
90279         (gl_REPLACE_MALLOC): New macro.
90280         Reported by Richard Lloyd <richard.lloyd@connectinternetsolutions.com>.
90282 2010-06-20  Richard Lloyd  <richard.lloyd@connectinternetsolutions.com>
90284         stdio.in.h: fix compilation failure when using HP-UX 11's C compiler
90285         * lib/stdio.in.h: Remove excess _GL_CXXALIAS_RPL macro argument.
90286         This macro takes 3 arguments, not 4.
90288 2010-06-15  Giuseppe Scrivano  <gscrivano@gnu.org>
90290         ipv6: fix detection under mingw
90291         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Include <ws2tcpip.h> for struct
90292         in6_addr.
90294 2010-06-14  Ben Pfaff  <blp@cs.stanford.edu>
90296         * m4/strtod.m4 (gl_FUNC_STRTOD): Factor out common code.  Assume
90297         that strtod() works when cross-compiling to a glibc version known
90298         to work.
90300 2010-06-15  Bruno Haible  <bruno@clisp.org>
90302         * m4/strtod.m4 (gl_FUNC_STRTOD): Stop using AC_FUNC_STRTOD.
90304 2010-06-15  René Berber  <r.berber@computer.org>  (tiny change)
90306         select: Correct timeout.
90307         * lib/select.c (rpl_select): Compute wait_timeout correctly.
90309 2010-06-14  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
90311         git-version-gen: init shell var to avoid env var influence
90312         * build-aux/git-version-gen (v): Init shell var to empty.
90314 2010-06-14  Paul Eggert  <eggert@cs.ucla.edu>
90316         priv-set: Don't assume that priv.h exists merely because getppriv does.
90317         See Jan Andersen's bug report about AIX 5L in
90318         http://lists.gnu.org/r/bug-tar/2010-06/msg00019.html
90319         * m4/priv-set.m4 (gl_PRIV_SET): Check for priv.h.
90320         * lib/priv-set.c: Do nothing unless HAVE_PRIV_H.
90321         * lib/priv-set.h: Likewise.
90322         * tests/test-priv-set.c: Likewise.
90324 2010-06-13  Bruno Haible  <bruno@clisp.org>
90326         relocatable: Make it easier to test whether to install wrappers.
90327         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): New automake conditional
90328         RELOCATABLE_VIA_WRAPPER.
90330 2010-06-13  Bruno Haible  <bruno@clisp.org>
90332         gnulib-tool: Display specified modules and dependencies differently.
90333         * gnulib-tool (func_show_module_list): New function.
90334         (func_import, func_create_testdir): Invoke it.
90335         Reported by Thien-Thi Nguyen <ttn@gnuvola.org>.
90337 2010-06-13  Bruno Haible  <bruno@clisp.org>
90339         gnulib-tool: Align code of func_import and func_create_testdir.
90340         * gnulib-tool (func_create_testdir): Rename variable saved_modules to
90341         specified_modules.
90343 2010-06-12  Jim Meyering  <meyering@redhat.com>
90345         test-inttostr: avoid spurious failure on Solaris 9
90346         * tests/test-inttostr.c (main): Skip the test when snprintf fails
90347         to accept "%ju".  Reported by Bruno Haible.
90349 2010-06-11  Jim Meyering  <meyering@redhat.com>
90351         test-sys_socket: mark variables as used more readably
90352         * tests/test-sys_socket.c (main): Mark otherwise unused variables
90353         as "used" explicitly via (void) statement casts.  This is more
90354         readable than using them in an artificial return expression.
90355         Suggestion from Bruno Haible.
90357 2010-06-11  Bruno Haible  <bruno@clisp.org>
90359         Avoid some more warnings from "gcc -Wwrite-strings".
90360         * tests/test-argp.c (test_optional): Change 5th and 6th argument type
90361         to 'const char *'.
90362         * tests/test-c-strstr.c (main): Add 'const' to variable declaration.
90363         * tests/test-c-strcasestr.c (main): Likewise.
90364         * tests/test-mbscasestr1.c (main): Likewise.
90365         * tests/test-mbscasestr2.c (main): Likewise.
90366         * tests/test-memmem.c (main): Likewise.
90367         * tests/test-strstr.c (main): Likewise.
90368         * tests/test-strcasestr.c (main): Likewise.
90370 2010-06-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
90372         init.sh: change framework_failure_ to fail with status 99, not 1
90373         * tests/init.sh (framework_failure_): Exit 99, not 1.  This informs
90374         automake's parallel-tests rule that this is an unexpected failure,
90375         even if the test is listed in XFAIL_TESTS.
90377 2010-06-11  Jim Meyering  <meyering@redhat.com>
90379         test-inttostr: avoid warnings about 4-6KB literal strings
90380         * tests/test-inttostr.c: Don't use <assert.h>.  Instead, ...
90381         Include "macros.h", for its definition of ASSERT.
90382         (CK): s/assert/ASSERT/
90383         * modules/inttostr-tests (Files): Add macros.h.
90385         init.sh: don't use $ME_ or skip_ before they are defined
90386         * tests/init.sh: Hoist definitions of $ME_ and skip_ to precede
90387         their first uses.  Also hoist their companions: warn_, fail_,
90388         framework_failure_, $stderr_fileno.  Prompted by a patch from
90389         Stefano Lattarini.
90391         test-sys_socket: avoid set-but-not-used warnings from gcc
90392         * tests/test-sys_socket.c (main): Use "i" and "x", in order to
90393         avoid warning about set-but-not-used variables.
90395         test-xvasprintf: avoid 'const' discard warnings
90396         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Use
90397         "const" when assigning from literal strings.
90398         (test_xasprintf): Add "void" in function argument list to placate
90399         -Wstrict-prototypes and to be consistent with test_xvasprintf above.
90401         tests: avoid compilation warnings in argmatch and exclude tests...
90402         in packages that define ARGMATCH_DIE_DECL, like coreutils.
90403         * tests/test-exclude.c [ARGMATCH_DIE_DECL]: Also declare the function.
90404         Since it always exits, declare with the "noreturn" attribute.
90405         * tests/test-argmatch.c: Likewise.
90407         tests: avoid 'const' discard warnings in mbsstr tests
90408         * tests/test-mbsstr1.c (main): Add "const" to avoid trivial warning.
90409         * tests/test-mbsstr2.c (main): Likewise.
90411         test-verify: avoid warning from gcc's -Wmissing-declarations
90412         * tests/test-verify.c (function): Declare to be static.
90414         test-inttostr.c: include <string.h> for use of strcmp
90415         * tests/test-inttostr.c: Include <string.h> for strcmp declaration.
90417         test-linkat: avoid failed assertion on "other" architectures
90418         * tests/test-linkat.c: Include <sys/stat.h>, for declarations of stat,
90419         lstat, mkdir.  Patch by John Rigby, to fix FTBFS on armel, powerpc,
90420         sparc: https://bugs.launchpad.net/bugs/591968
90422 2010-06-11  Jim Meyering  <meyering@redhat.com>
90424         printf.m4: avoid autoconf's "Expanded Before Required" warning
90425         * m4/printf.m4 (gl_SNPRINTF_RETVAL_C99): Define using AC_DEFUN_ONCE,
90426         rather than AC_DEFUN, to avoid the classic "Expanded Before Required"
90427         autoconf warning.
90429 2010-06-10  Ben Pfaff  <blp@cs.stanford.edu>
90431         Replacement header templates are now named with ".in", not "_".
90432         * doc/gnulib-intro.texi: Correct.
90434 2010-06-10  Jim Meyering  <meyering@redhat.com>
90436         inttostr-tests: depend on snprintf, not snprintf-posix
90437         * modules/inttostr-tests (Depends-on): Depend on snprintf, not
90438         snprintf-posix, to avoid this aclocal failure:
90439           missing file gnulib-tests/vasnprintf.c
90440           configure.ac:45: error: expected source file, required through \
90441           AC_LIBSOURCES, not found
90443 2010-06-10  Jim Meyering  <meyering@redhat.com>
90445         inttostr: add a new function, inttostr, and tests
90446         The namesake function was not available.  The existence of the
90447         template file, inttostr.c makes its addition nontrivial.
90448         * lib/anytostr.c: Rename from inttostr.c.
90449         (anytostr): Rename from inttostr.
90450         * lib/inttostr.c: New file.
90451         * modules/inttostr (Files): Add anytostr.c.
90452         (Makefile.am): Set lib_SOURCES instead of ...
90453         * m4/inttostr.m4: Remove uses of AC_LIBOBJ.
90454         * lib/imaxtostr.c: Update use.  s/inttostr/anytostr/
90455         * lib/offtostr.c: Likewise.
90456         * lib/uinttostr.c: Likewise.
90457         * lib/umaxtostr.c: Likewise.
90458         * modules/inttostr-tests: New file.
90459         * tests/test-inttostr.c: New file.  Test these functions.
90461 2010-06-09  Ben Pfaff  <blp@cs.stanford.edu>
90462             Bruno Haible  <bruno@clisp.org>
90464         Add "Extending Gnulib" chapter to manual.
90465         * doc/gnulib.texi (Writing Modules): Add cross-reference to new
90466         chapter.
90467         (Extending Gnulib): New chapter.
90468         * doc/gnulib-intro.texi (Openness): Add cross-reference to new
90469         chapter.
90471 2010-06-09  Bruno Haible  <bruno@clisp.org>
90473         Avoid relocwrapper link errors due to gnulib replacement functions.
90474         * lib/areadlink.c: Use the system's malloc, realloc functions.
90475         (areadlink): Set errno to ENOMEM explicitly.
90476         * modules/areadlink (Depends-on): Remove malloc-posix.
90477         Reported by Ben Pfaff <blp@cs.stanford.edu>.
90479 2010-06-09  Bruno Haible  <bruno@clisp.org>
90481         Avoid relocwrapper link errors due to gnulib replacement functions.
90482         * lib/canonicalize-lgpl.c: Use the system's malloc function.
90483         * lib/malloca.c: Likewise.
90484         * lib/relocatable.c: Likewise.
90485         * lib/progreloc.c: Use the system's malloc, sprintf functions.
90486         * lib/relocwrapper.c: Use the system's fprintf, malloc functions.
90487         * lib/setenv.c: Use the system's malloc, realloc functions.
90488         * lib/strerror.c: Use the system's sprintf function.
90489         Reported by Ben Pfaff <blp@cs.stanford.edu>.
90491 2010-06-04  Bruno Haible  <bruno@clisp.org>
90493         Prefer documented low-level autoconf macro names.
90494         * m4/lib-link.m4: Use m4_translit instead of translit.
90495         * m4/environ.m4: Likewise.
90496         * m4/mathfunc.m4: Likewise.
90497         * m4/onceonly.m4: Likewise.
90498         * m4/stdint.m4: Likewise.
90499         Suggested by Eric Blake.
90501 2010-06-04  Martin Lambers  <marlam@marlam.de>
90502             Bruno Haible  <bruno@clisp.org>
90504         havelib: Allow library names with '+' characters.
90505         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
90506         AC_LIB_FROMPACKAGE, AC_LIB_LINKFLAGS_BODY): Convert '+' in name to '_'.
90508 2010-06-09  Bruno Haible  <bruno@clisp.org>
90510         Module setenv does not depend on 'malloc-posix', 'realloc-posix'.
90511         * lib/setenv.c (__add_to_environ): Set errno to ENOMEM when malloc or
90512         realloc failed.
90514 2010-06-08  Peter Simons  <simons@cryp.to>
90516         maint.mk: make the news-check rule more configurable
90517         * top/maint.mk (news-check-lines-spec): New variable.
90518         (news-check): Use "sed -n 1,10p" in place of "head".
90520 2010-06-07  Jim Meyering  <meyering@redhat.com>
90522         do-release-commit-and-tag: fix typo in --help
90523         * build-aux/do-release-commit-and-tag (Usage): Fix typo in --help.
90525         regex: avoid new dead-code warning with gcc-4.6.0
90526         * lib/regex_internal.c (re_string_reconstruct): #if-0-out a dead
90527         if-block containing a while-loop.  It's been unused for at least
90528         5 years.
90530 2010-06-05  Bruno Haible  <bruno@clisp.org>
90532         * doc/posix-functions/strcoll.texi: Mention Solaris limitation.
90533         Reported by River Tarnell <river.tarnell@wikimedia.de> via Eric Blake.
90535 2010-06-04  Bruno Haible  <bruno@clisp.org>
90537         Update to GNU gettext 0.18.1.
90538         * modules/gettext (configure.ac): Require gettext infrastructure from
90539         version 0.18.1.
90541 2010-06-03  Bruno Haible  <bruno@clisp.org>
90543         Don't use AC_LIBOBJ with file names in subdirectories.
90544         * m4/libunistring-base.m4 (gl_LIBUNISTRING_MODULE): Renamed from
90545         gl_LIBUNISTRING_LIBSOURCE. Take a module name as argument, not a file
90546         name. Define an automake conditional. Don't invoke AC_LIBOBJ.
90547         * m4/libunistring.m4 (gl_LIBUNISTRING): Update AC_BEFORE invocation.
90548         * modules/uni*/* (configure.ac): Use gl_LIBUNISTRING_MODULE instead of
90549         gl_LIBUNISTRING_LIBSOURCE.
90550         (Makefile.am): Augment lib_SOURCES here, conditionally.
90551         * NEWS: Drop requirement for Automake option 'subdir-objects'.
90553 2010-06-03  Bruno Haible  <bruno@clisp.org>
90555         Simplify gl_LIBUNISTRING_VERSION_CMP expansion.
90556         * m4/libunistring-base.m4 (gl_LIBUNISTRING_VERSION_CMP): Ensure
90557         expansion does not end with a newline.
90558         (gl_LIBUNISTRING_LIBSOURCE, gl_LIBUNISTRING_LIBHEADER): Avoid
90559         unnecessary newline.
90561 2010-06-03  Bruno Haible  <bruno@clisp.org>
90563         Reduce dependencies.
90564         * tests/test-quotearg.h: New file, extracted from
90565         tests/test-quotearg.c.
90566         * tests/test-quotearg-simple.c: New file, extracted from
90567         tests/test-quotearg.c.
90568         * tests/test-quotearg.c: Don't include <ctype.h>.
90569         (struct result_strings, struct result_groups, LQ, RQ, LQ_ENC, RQ_ENC,
90570         RQ_ESC, inputs, compare, use_quotearg_buffer, use_quotearg,
90571         use_quote_double_quotes, use_quotearg_colon): Moved to
90572         tests/test-quotearg.h.
90573         (results_g, flag_results, custom_quotes, custom_results): Moved
90574         to tests/test-quotearg-simple.c.
90575         (main): Moved the part that does not depend on gettext to
90576         tests/test-quotearg-simple.c. Return 77 if the test cannot be
90577         performed.
90578         * modules/quotearg-simple: New file.
90579         * modules/quotearg-simple-tests: New file.
90580         * modules/quotearg (Depends-on): Add quotearg-simple.
90581         * modules/quotearg-tests (Status): Mark as gettext-dependent-test.
90582         (Files): Add tests/test-quotearg.h.
90583         Reported by Paolo Bonzini.
90585 2010-06-03  Bruno Haible  <bruno@clisp.org>
90587         Reduce dependencies.
90588         * modules/acl (Depends-on): Add gettext-h. Remove gettext.
90590 2010-06-03  Bruno Haible  <bruno@clisp.org>
90592         time: Undefine more broken macros.
90593         * lib/time.in.h: Undefine broken localtime_r and gmtime_r macros only
90594         for pthread-win32. Undefine also asctime_r, ctime_r, rand_r, strtok_r.
90595         Reported by Eric Blake.
90597 2010-06-03  Bruno Haible  <bruno@clisp.org>
90599         Choose among AC_DEFUN_ONCE, AC_DEFUN in a way that aclocal understands.
90600         * m4/iconv.m4 (gl_iconv_AC_DEFUN): New macro.
90601         (AM_ICONV): Define it through gl_iconv_AC_DEFUN.
90602         * m4/libunistring.m4 (gl_libunistring_AC_DEFUN): New macro.
90603         (gl_LIBUNISTRING): Define it through gl_libunistring_AC_DEFUN.
90604         Reported by Ludovic Courtès <ludo@gnu.org>.
90606 2010-06-02  Eric Blake  <eblake@redhat.com>
90608         time: work with mingw + pthreads-win32 library
90609         * m4/time_h.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Set new variable
90610         if timespec is defined only in pthread.h.
90611         * modules/time (Makefile.am): Substitute it.
90612         * lib/time.in.h (!TIME_H_DEFINES_STRUCT_TIMESPEC): Include
90613         <pthread.h>, when needed.
90614         (GNULIB_TIME_R): Undefine broken localtime_r and gmtime_r macros
90615         from the library.
90617 2010-05-31  Bruno Haible  <bruno@clisp.org>
90619         Avoid expanding two macros in the wrong order.
90620         * m4/libunistring-base.m4 (gl_LIBUNISTRING_LIB_PREPARE): Require
90621         gl_LIBUNISTRING if it is defined.
90622         * m4/libunistring.m4 (gl_LIBUNISTRING): Define using AC_DEFUN_ONCE for
90623         autoconf >= 2.64.
90624         Reported by Ludovic Courtès <ludo@gnu.org>.
90626 2010-05-27  Jim Meyering  <meyering@redhat.com>
90628         maint.mk: also prohibit "#undef" of always-defined symbols
90629         * top/maint.mk (def_sym_regex): Handle #undef as well as #define.
90630         Allow more than one space before the symbol name.
90631         (sc_prohibit_always-defined_macros): Use grep's -E, now that
90632         the regexp uses alternation.
90634 2010-05-26  Eric Blake  <eblake@redhat.com>
90636         maint.mk: avoid echo -e
90637         * top/maint.mk (gzip_rsyncable, _ignore_case, _sc_say_and_exit):
90638         Convert all uses of echo -* to printf.
90639         Reported by Matthias Bolte.
90641 2010-05-25  Bruno Haible  <bruno@clisp.org>
90643         Update to GNU gettext 0.18, part 2.
90644         * build-aux/po/Makefile.in.in: Update to GNU gettext 0.18.
90645         Reported by Martin von Gagern <Martin.vGagern@gmx.net>.
90647 2010-05-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
90649         Add missing include in test-pwrite.c.
90650         * tests/test-pwrite.c: Include string.h, for strcmp.
90652 2010-05-24  Bruno Haible  <bruno@clisp.org>
90654         * NEWS: Mention requirement for Automake option 'subdir-objects'.
90656 2010-05-24  Bruno Haible  <bruno@clisp.org>
90658         Don't use conversion with transliteration in u{8,16,32}_strcoll.
90659         * lib/unistr/u-strcoll.h (FUNC): Use U_STRCONV_TO_ENCODING with
90660         iconveh_error argument.
90661         * lib/unistr/u8-strcoll.c: Define U_STRCONV_TO_ENCODING instead of
90662         U_STRCONV_TO_LOCALE.
90663         * lib/unistr/u16-strcoll.c: Likewise.
90664         * lib/unistr/u32-strcoll.c: Likewise.
90665         * modules/unistr/u8-strcoll (Depends-on): Add
90666         uniconv/u8-strconv-to-enc, localcharset. Remove
90667         uniconv/u8-strconv-to-locale.
90668         (configure.ac): Bump version number.
90669         * modules/unistr/u16-strcoll (Depends-on): Add
90670         uniconv/u16-strconv-to-enc, localcharset. Remove
90671         uniconv/u16-strconv-to-locale.
90672         (configure.ac): Bump version number.
90673         * modules/unistr/u32-strcoll (Depends-on): Add
90674         uniconv/u32-strconv-to-enc, localcharset. Remove
90675         uniconv/u32-strconv-to-locale.
90676         (configure.ac): Bump version number.
90678 2010-05-24  Bruno Haible  <bruno@clisp.org>
90680         Avoid a test failure on NetBSD 5.0.
90681         * tests/test-striconveh.c (main): On NetBSD, skip a test that triggers
90682         an iconv() bug.
90684 2010-05-24  Bruno Haible  <bruno@clisp.org>
90686         Adjust #include directive style.
90687         * modules/regex (Includes): Recommend to write <regex.h>.
90689 2010-05-24  Bruno Haible  <bruno@clisp.org>
90691         regex: Don't require alloca.
90692         * modules/regex (Depends-on): Remove alloca. Add alloca-opt.
90693         * lib/regex_internal.h (alloca): Ensure it's defined even if we call it
90694         only inside if (0).
90696 2010-05-23  Jim Meyering  <meyering@redhat.com>
90698         test-renameat.c: include <sys/stat.h>
90699         * tests/test-renameat.c: Include <sys/stat.h>; required for
90700         definition of S_IS* macros.
90702 2010-05-23  Ben Pfaff  <blp@cs.stanford.edu>
90704         Update maintainer documentation for 'relocatable-prog' module.
90705         * doc/relocatable-maint.texi: Update.
90706         Comments by Bruno Haible.
90708 2010-05-23  Bruno Haible  <bruno@clisp.org>
90710         git-merge-changelog: Enable --split-merged-entry by default.
90711         * lib/git-merge-changelog.c (main): Set split_merged_entry to true.
90712         (usage): Don't mention this option any more.
90713         Reported by Ralf Wildenhues.
90715 2010-05-23  Jim Meyering  <meyering@redhat.com>
90717         test-pwrite: do not leave behind a test file named "out"
90718         Revert commit d8fa18472a54c1cb2674c296b3d82443f234d5f7.
90719         The trivial-looking use of init.sh is really necessary.
90720         It ensures that the temporary file, "out", is created in
90721         a temporary directory, and removed upon termination.
90722         * tests/test-pwrite.sh: Re-add file.
90723         * modules/pwrite-tests: Reference it.
90725 2010-05-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
90727         Fix output redirection buglet in init.sh.
90728         * tests/init.sh: Fix redirection of stderr.
90730 2010-05-20  Simon Josefsson  <simon@josefsson.org>
90732         * modules/valgrind-tests (configure.ac): Invoke gl_VALGRIND_TESTS.
90734 2010-05-17  Simon Josefsson  <simon@josefsson.org>
90736         * modules/valgrind-tests: New file.
90737         * m4/valgrind-tests.m4: New file.
90738         * doc/valgrind-tests.texi: New file.
90739         * doc/gnulib.texi (Running self-tests under valgrind): New
90740         section.
90742 2010-05-19  Bruno Haible  <bruno@clisp.org>
90744         Clean up dead code in recent commit.
90745         * m4/libunistring-base.m4 (gl_LIBUNISTRING_VERSION_CMP): Include the
90746         body of gl_LIBUNISTRING_VERSION_CMP_ORIG as fallback.
90747         (gl_LIBUNISTRING_VERSION_CMP_ORIG): Remove macro.
90748         Suggested by Paolo Bonzini.
90750 2010-05-19  Bruno Haible  <bruno@clisp.org>
90752         Avoid valgrind error reports from libunistring.
90753         * lib/libunistring.valgrind: New file, based on lib/malloca.valgrind.
90754         * modules/libunistring (Files): Add it.
90755         * modules/libunistring-optional (Files): Likewise.
90757 2010-05-18  Paolo Bonzini  <bonzini@gnu.org>
90758             Bruno Haible  <bruno@clisp.org>
90760         New module 'libunistring-optional'.
90761         * modules/libunistring-optional: New file.
90762         * m4/libunistring-base.m4: New file.
90763         * m4/libunistring-optional.m4: New file.
90764         * lib/unicase.in.h: Renamed from lib/unicase.h.
90765         * lib/uniconv.in.h: Renamed from lib/uniconv.h.
90766         * lib/unictype.in.h: Renamed from lib/unictype.h.
90767         * lib/unilbrk.in.h: Renamed from lib/unilbrk.h.
90768         * lib/uniname.in.h: Renamed from lib/uniname.h.
90769         * lib/uninorm.in.h: Renamed from lib/uninorm.h.
90770         * lib/unistdio.in.h: Renamed from lib/unistdio.h.
90771         * lib/unistr.in.h: Renamed from lib/unistr.h.
90772         * lib/unitypes.in.h: Renamed from lib/unitypes.h.
90773         * lib/uniwbrk.in.h: Renamed from lib/uniwbrk.h.
90774         * lib/uniwidth.in.h: Renamed from lib/uniwidth.h.
90775         * m4/libunistring.m4 (gl_LIBUNISTRING_CORE): Renamed from
90776         gl_LIBUNISTRING. If the library was found, determine the installed
90777         version and set LIBUNISTRING_VERSION.
90778         (gl_LIBUNISTRING): New macro, as a wrapper arount it. Document that it
90779         sets LIBUNISTRING_VERSION. If the module libunistring-optional is used,
90780         handle a configuration option --with-included-libunistring.
90781         * modules/libunistring (Files): Add m4/absolute-header.m4.
90782         * modules/unicase/base (Files): Use unicase.in.h instead of unicase.h.
90783         Add m4/libunistring-base.m4.
90784         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
90785         (Makefile.am): Build unicase.h from unicase.in.h.
90786         * modules/uniconv/base (Files): Use uniconv.in.h instead of uniconv.h.
90787         Add m4/libunistring-base.m4.
90788         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
90789         (Makefile.am): Build uniconv.h from uniconv.in.h.
90790         * modules/unictype/base (Files): Use unictype.in.h instead of
90791         unictype.h. Add m4/libunistring-base.m4.
90792         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
90793         (Makefile.am): Build unictype.h from unictype.in.h.
90794         * modules/unilbrk/base (Files): Use unilbrk.in.h instead of unilbrk.h.
90795         Add m4/libunistring-base.m4.
90796         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
90797         (Makefile.am): Build unilbrk.h from unilbrk.in.h.
90798         * modules/uniname/base (Files): Use uniname.in.h instead of uniname.h.
90799         Add m4/libunistring-base.m4.
90800         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
90801         (Makefile.am): Build uniname.h from uniname.in.h.
90802         * modules/uninorm/base (Files): Use uninorm.in.h instead of uninorm.h.
90803         Add m4/libunistring-base.m4.
90804         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
90805         (Makefile.am): Build uninorm.h from uninorm.in.h.
90806         * modules/unistdio/base (Files): Use unistdio.in.h instead of
90807         unistdio.h. Add m4/libunistring-base.m4.
90808         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
90809         (Makefile.am): Build unistdio.h from unistdio.in.h.
90810         * modules/unistr/base (Files): Use unistr.in.h instead of unistr.h.
90811         Add m4/libunistring-base.m4.
90812         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
90813         (Makefile.am): Build unistr.h from unistr.in.h.
90814         * modules/unitypes (Files): Use unitypes.in.h instead of unitypes.h.
90815         Add m4/libunistring-base.m4.
90816         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
90817         (Makefile.am): Build unitypes.h from unitypes.in.h.
90818         * modules/uniwbrk/base (Files): Use uniwbrk.in.h instead of uniwbrk.h.
90819         Add m4/libunistring-base.m4.
90820         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
90821         (Makefile.am): Build uniwbrk.h from uniwbrk.in.h.
90822         * modules/uniwidth/base (Files): Use uniwidth.in.h instead of
90823         uniwidth.h. Add m4/libunistring-base.m4.
90824         (configure.ac): Invoke gl_LIBUNISTRING_LIBHEADER.
90825         (Makefile.am): Build uniwidth.h from uniwidth.in.h.
90826         * modules/unicase/empty-prefix-context: Use gl_LIBUNISTRING_LIBSOURCE
90827         instead of augmenting lib_SOURCES.
90828         * modules/unicase/empty-suffix-context: Likewise.
90829         * modules/unicase/locale-language: Likewise.
90830         * modules/unicase/tolower: Likewise.
90831         * modules/unicase/totitle: Likewise.
90832         * modules/unicase/toupper: Likewise.
90833         * modules/unicase/u8-casecmp: Likewise.
90834         * modules/unicase/u8-casecoll: Likewise.
90835         * modules/unicase/u8-casefold: Likewise.
90836         * modules/unicase/u8-casexfrm: Likewise.
90837         * modules/unicase/u8-ct-casefold: Likewise.
90838         * modules/unicase/u8-ct-tolower: Likewise.
90839         * modules/unicase/u8-ct-totitle: Likewise.
90840         * modules/unicase/u8-ct-toupper: Likewise.
90841         * modules/unicase/u8-is-cased: Likewise.
90842         * modules/unicase/u8-is-casefolded: Likewise.
90843         * modules/unicase/u8-is-lowercase: Likewise.
90844         * modules/unicase/u8-is-titlecase: Likewise.
90845         * modules/unicase/u8-is-uppercase: Likewise.
90846         * modules/unicase/u8-prefix-context: Likewise.
90847         * modules/unicase/u8-suffix-context: Likewise.
90848         * modules/unicase/u8-tolower: Likewise.
90849         * modules/unicase/u8-totitle: Likewise.
90850         * modules/unicase/u8-toupper: Likewise.
90851         * modules/unicase/u16-casecmp: Likewise.
90852         * modules/unicase/u16-casecoll: Likewise.
90853         * modules/unicase/u16-casefold: Likewise.
90854         * modules/unicase/u16-casexfrm: Likewise.
90855         * modules/unicase/u16-ct-casefold: Likewise.
90856         * modules/unicase/u16-ct-tolower: Likewise.
90857         * modules/unicase/u16-ct-totitle: Likewise.
90858         * modules/unicase/u16-ct-toupper: Likewise.
90859         * modules/unicase/u16-is-cased: Likewise.
90860         * modules/unicase/u16-is-casefolded: Likewise.
90861         * modules/unicase/u16-is-lowercase: Likewise.
90862         * modules/unicase/u16-is-titlecase: Likewise.
90863         * modules/unicase/u16-is-uppercase: Likewise.
90864         * modules/unicase/u16-prefix-context: Likewise.
90865         * modules/unicase/u16-suffix-context: Likewise.
90866         * modules/unicase/u16-tolower: Likewise.
90867         * modules/unicase/u16-totitle: Likewise.
90868         * modules/unicase/u16-toupper: Likewise.
90869         * modules/unicase/u32-casecmp: Likewise.
90870         * modules/unicase/u32-casecoll: Likewise.
90871         * modules/unicase/u32-casefold: Likewise.
90872         * modules/unicase/u32-casexfrm: Likewise.
90873         * modules/unicase/u32-ct-casefold: Likewise.
90874         * modules/unicase/u32-ct-tolower: Likewise.
90875         * modules/unicase/u32-ct-totitle: Likewise.
90876         * modules/unicase/u32-ct-toupper: Likewise.
90877         * modules/unicase/u32-is-cased: Likewise.
90878         * modules/unicase/u32-is-casefolded: Likewise.
90879         * modules/unicase/u32-is-lowercase: Likewise.
90880         * modules/unicase/u32-is-titlecase: Likewise.
90881         * modules/unicase/u32-is-uppercase: Likewise.
90882         * modules/unicase/u32-prefix-context: Likewise.
90883         * modules/unicase/u32-suffix-context: Likewise.
90884         * modules/unicase/u32-tolower: Likewise.
90885         * modules/unicase/u32-totitle: Likewise.
90886         * modules/unicase/u32-toupper: Likewise.
90887         * modules/unicase/ulc-casecmp: Likewise.
90888         * modules/unicase/ulc-casecoll: Likewise.
90889         * modules/unicase/ulc-casexfrm: Likewise.
90890         * modules/uniconv/u8-conv-from-enc: Likewise.
90891         * modules/uniconv/u8-conv-to-enc: Likewise.
90892         * modules/uniconv/u8-strconv-from-enc: Likewise.
90893         * modules/uniconv/u8-strconv-from-locale: Likewise.
90894         * modules/uniconv/u8-strconv-to-enc: Likewise.
90895         * modules/uniconv/u8-strconv-to-locale: Likewise.
90896         * modules/uniconv/u16-conv-from-enc: Likewise.
90897         * modules/uniconv/u16-conv-to-enc: Likewise.
90898         * modules/uniconv/u16-strconv-from-enc: Likewise.
90899         * modules/uniconv/u16-strconv-from-locale: Likewise.
90900         * modules/uniconv/u16-strconv-to-enc: Likewise.
90901         * modules/uniconv/u16-strconv-to-locale: Likewise.
90902         * modules/uniconv/u32-conv-from-enc: Likewise.
90903         * modules/uniconv/u32-conv-to-enc: Likewise.
90904         * modules/uniconv/u32-strconv-from-enc: Likewise.
90905         * modules/uniconv/u32-strconv-from-locale: Likewise.
90906         * modules/uniconv/u32-strconv-to-enc: Likewise.
90907         * modules/uniconv/u32-strconv-to-locale: Likewise.
90908         * modules/unictype/bidicategory-byname: Likewise.
90909         * modules/unictype/bidicategory-name: Likewise.
90910         * modules/unictype/bidicategory-of: Likewise.
90911         * modules/unictype/bidicategory-test: Likewise.
90912         * modules/unictype/block-list: Likewise.
90913         * modules/unictype/block-test: Likewise.
90914         * modules/unictype/category-C: Likewise.
90915         * modules/unictype/category-Cc: Likewise.
90916         * modules/unictype/category-Cf: Likewise.
90917         * modules/unictype/category-Cn: Likewise.
90918         * modules/unictype/category-Co: Likewise.
90919         * modules/unictype/category-Cs: Likewise.
90920         * modules/unictype/category-L: Likewise.
90921         * modules/unictype/category-Ll: Likewise.
90922         * modules/unictype/category-Lm: Likewise.
90923         * modules/unictype/category-Lo: Likewise.
90924         * modules/unictype/category-Lt: Likewise.
90925         * modules/unictype/category-Lu: Likewise.
90926         * modules/unictype/category-M: Likewise.
90927         * modules/unictype/category-Mc: Likewise.
90928         * modules/unictype/category-Me: Likewise.
90929         * modules/unictype/category-Mn: Likewise.
90930         * modules/unictype/category-N: Likewise.
90931         * modules/unictype/category-Nd: Likewise.
90932         * modules/unictype/category-Nl: Likewise.
90933         * modules/unictype/category-No: Likewise.
90934         * modules/unictype/category-P: Likewise.
90935         * modules/unictype/category-Pc: Likewise.
90936         * modules/unictype/category-Pd: Likewise.
90937         * modules/unictype/category-Pe: Likewise.
90938         * modules/unictype/category-Pf: Likewise.
90939         * modules/unictype/category-Pi: Likewise.
90940         * modules/unictype/category-Po: Likewise.
90941         * modules/unictype/category-Ps: Likewise.
90942         * modules/unictype/category-S: Likewise.
90943         * modules/unictype/category-Sc: Likewise.
90944         * modules/unictype/category-Sk: Likewise.
90945         * modules/unictype/category-Sm: Likewise.
90946         * modules/unictype/category-So: Likewise.
90947         * modules/unictype/category-Z: Likewise.
90948         * modules/unictype/category-Zl: Likewise.
90949         * modules/unictype/category-Zp: Likewise.
90950         * modules/unictype/category-Zs: Likewise.
90951         * modules/unictype/category-and: Likewise.
90952         * modules/unictype/category-and-not: Likewise.
90953         * modules/unictype/category-byname: Likewise.
90954         * modules/unictype/category-name: Likewise.
90955         * modules/unictype/category-none: Likewise.
90956         * modules/unictype/category-of: Likewise.
90957         * modules/unictype/category-or: Likewise.
90958         * modules/unictype/category-test: Likewise.
90959         * modules/unictype/combining-class: Likewise.
90960         * modules/unictype/ctype-alnum: Likewise.
90961         * modules/unictype/ctype-alpha: Likewise.
90962         * modules/unictype/ctype-blank: Likewise.
90963         * modules/unictype/ctype-cntrl: Likewise.
90964         * modules/unictype/ctype-digit: Likewise.
90965         * modules/unictype/ctype-graph: Likewise.
90966         * modules/unictype/ctype-lower: Likewise.
90967         * modules/unictype/ctype-print: Likewise.
90968         * modules/unictype/ctype-punct: Likewise.
90969         * modules/unictype/ctype-space: Likewise.
90970         * modules/unictype/ctype-upper: Likewise.
90971         * modules/unictype/ctype-xdigit: Likewise.
90972         * modules/unictype/decimal-digit: Likewise.
90973         * modules/unictype/digit: Likewise.
90974         * modules/unictype/mirror: Likewise.
90975         * modules/unictype/numeric: Likewise.
90976         * modules/unictype/property-alphabetic: Likewise.
90977         * modules/unictype/property-ascii-hex-digit: Likewise.
90978         * modules/unictype/property-bidi-arabic-digit: Likewise.
90979         * modules/unictype/property-bidi-arabic-right-to-left: Likewise.
90980         * modules/unictype/property-bidi-block-separator: Likewise.
90981         * modules/unictype/property-bidi-boundary-neutral: Likewise.
90982         * modules/unictype/property-bidi-common-separator: Likewise.
90983         * modules/unictype/property-bidi-control: Likewise.
90984         * modules/unictype/property-bidi-embedding-or-override: Likewise.
90985         * modules/unictype/property-bidi-eur-num-separator: Likewise.
90986         * modules/unictype/property-bidi-eur-num-terminator: Likewise.
90987         * modules/unictype/property-bidi-european-digit: Likewise.
90988         * modules/unictype/property-bidi-hebrew-right-to-left: Likewise.
90989         * modules/unictype/property-bidi-left-to-right: Likewise.
90990         * modules/unictype/property-bidi-non-spacing-mark: Likewise.
90991         * modules/unictype/property-bidi-other-neutral: Likewise.
90992         * modules/unictype/property-bidi-pdf: Likewise.
90993         * modules/unictype/property-bidi-segment-separator: Likewise.
90994         * modules/unictype/property-bidi-whitespace: Likewise.
90995         * modules/unictype/property-byname: Likewise.
90996         * modules/unictype/property-combining: Likewise.
90997         * modules/unictype/property-composite: Likewise.
90998         * modules/unictype/property-currency-symbol: Likewise.
90999         * modules/unictype/property-dash: Likewise.
91000         * modules/unictype/property-decimal-digit: Likewise.
91001         * modules/unictype/property-default-ignorable-code-point: Likewise.
91002         * modules/unictype/property-deprecated: Likewise.
91003         * modules/unictype/property-diacritic: Likewise.
91004         * modules/unictype/property-extender: Likewise.
91005         * modules/unictype/property-format-control: Likewise.
91006         * modules/unictype/property-grapheme-base: Likewise.
91007         * modules/unictype/property-grapheme-extend: Likewise.
91008         * modules/unictype/property-grapheme-link: Likewise.
91009         * modules/unictype/property-hex-digit: Likewise.
91010         * modules/unictype/property-hyphen: Likewise.
91011         * modules/unictype/property-id-continue: Likewise.
91012         * modules/unictype/property-id-start: Likewise.
91013         * modules/unictype/property-ideographic: Likewise.
91014         * modules/unictype/property-ids-binary-operator: Likewise.
91015         * modules/unictype/property-ids-trinary-operator: Likewise.
91016         * modules/unictype/property-ignorable-control: Likewise.
91017         * modules/unictype/property-iso-control: Likewise.
91018         * modules/unictype/property-join-control: Likewise.
91019         * modules/unictype/property-left-of-pair: Likewise.
91020         * modules/unictype/property-line-separator: Likewise.
91021         * modules/unictype/property-logical-order-exception: Likewise.
91022         * modules/unictype/property-lowercase: Likewise.
91023         * modules/unictype/property-math: Likewise.
91024         * modules/unictype/property-non-break: Likewise.
91025         * modules/unictype/property-not-a-character: Likewise.
91026         * modules/unictype/property-numeric: Likewise.
91027         * modules/unictype/property-other-alphabetic: Likewise.
91028         * modules/unictype/property-other-default-ignorable-code-point: Likewise.
91029         * modules/unictype/property-other-grapheme-extend: Likewise.
91030         * modules/unictype/property-other-id-continue: Likewise.
91031         * modules/unictype/property-other-id-start: Likewise.
91032         * modules/unictype/property-other-lowercase: Likewise.
91033         * modules/unictype/property-other-math: Likewise.
91034         * modules/unictype/property-other-uppercase: Likewise.
91035         * modules/unictype/property-paired-punctuation: Likewise.
91036         * modules/unictype/property-paragraph-separator: Likewise.
91037         * modules/unictype/property-pattern-syntax: Likewise.
91038         * modules/unictype/property-pattern-white-space: Likewise.
91039         * modules/unictype/property-private-use: Likewise.
91040         * modules/unictype/property-punctuation: Likewise.
91041         * modules/unictype/property-quotation-mark: Likewise.
91042         * modules/unictype/property-radical: Likewise.
91043         * modules/unictype/property-sentence-terminal: Likewise.
91044         * modules/unictype/property-soft-dotted: Likewise.
91045         * modules/unictype/property-space: Likewise.
91046         * modules/unictype/property-terminal-punctuation: Likewise.
91047         * modules/unictype/property-test: Likewise.
91048         * modules/unictype/property-titlecase: Likewise.
91049         * modules/unictype/property-unassigned-code-value: Likewise.
91050         * modules/unictype/property-unified-ideograph: Likewise.
91051         * modules/unictype/property-uppercase: Likewise.
91052         * modules/unictype/property-variation-selector: Likewise.
91053         * modules/unictype/property-white-space: Likewise.
91054         * modules/unictype/property-xid-continue: Likewise.
91055         * modules/unictype/property-xid-start: Likewise.
91056         * modules/unictype/property-zero-width: Likewise.
91057         * modules/unictype/scripts: Likewise.
91058         * modules/unictype/syntax-c-ident: Likewise.
91059         * modules/unictype/syntax-c-whitespace: Likewise.
91060         * modules/unictype/syntax-java-ident: Likewise.
91061         * modules/unictype/syntax-java-whitespace: Likewise.
91062         * modules/unilbrk/u8-possible-linebreaks: Likewise.
91063         * modules/unilbrk/u8-width-linebreaks: Likewise.
91064         * modules/unilbrk/u16-possible-linebreaks: Likewise.
91065         * modules/unilbrk/u16-width-linebreaks: Likewise.
91066         * modules/unilbrk/u32-possible-linebreaks: Likewise.
91067         * modules/unilbrk/u32-width-linebreaks: Likewise.
91068         * modules/unilbrk/ulc-possible-linebreaks: Likewise.
91069         * modules/unilbrk/ulc-width-linebreaks: Likewise.
91070         * modules/uniname/uniname: Likewise.
91071         * modules/uninorm/canonical-decomposition: Likewise.
91072         * modules/uninorm/composition: Likewise.
91073         * modules/uninorm/decomposing-form: Likewise.
91074         * modules/uninorm/decomposition: Likewise.
91075         * modules/uninorm/filter: Likewise.
91076         * modules/uninorm/nfc: Likewise.
91077         * modules/uninorm/nfd: Likewise.
91078         * modules/uninorm/nfkc: Likewise.
91079         * modules/uninorm/nfkd: Likewise.
91080         * modules/uninorm/u8-normalize: Likewise.
91081         * modules/uninorm/u8-normcmp: Likewise.
91082         * modules/uninorm/u8-normcoll: Likewise.
91083         * modules/uninorm/u8-normxfrm: Likewise.
91084         * modules/uninorm/u16-normalize: Likewise.
91085         * modules/uninorm/u16-normcmp: Likewise.
91086         * modules/uninorm/u16-normcoll: Likewise.
91087         * modules/uninorm/u16-normxfrm: Likewise.
91088         * modules/uninorm/u32-normalize: Likewise.
91089         * modules/uninorm/u32-normcmp: Likewise.
91090         * modules/uninorm/u32-normcoll: Likewise.
91091         * modules/uninorm/u32-normxfrm: Likewise.
91092         * modules/unistdio/u8-asnprintf: Likewise.
91093         * modules/unistdio/u8-asprintf: Likewise.
91094         * modules/unistdio/u8-snprintf: Likewise.
91095         * modules/unistdio/u8-sprintf: Likewise.
91096         * modules/unistdio/u8-u8-asnprintf: Likewise.
91097         * modules/unistdio/u8-u8-asprintf: Likewise.
91098         * modules/unistdio/u8-u8-snprintf: Likewise.
91099         * modules/unistdio/u8-u8-sprintf: Likewise.
91100         * modules/unistdio/u8-u8-vasnprintf: Likewise.
91101         * modules/unistdio/u8-u8-vasprintf: Likewise.
91102         * modules/unistdio/u8-u8-vsnprintf: Likewise.
91103         * modules/unistdio/u8-u8-vsprintf: Likewise.
91104         * modules/unistdio/u8-vasnprintf: Likewise.
91105         * modules/unistdio/u8-vasprintf: Likewise.
91106         * modules/unistdio/u8-vsnprintf: Likewise.
91107         * modules/unistdio/u8-vsprintf: Likewise.
91108         * modules/unistdio/u16-asnprintf: Likewise.
91109         * modules/unistdio/u16-asprintf: Likewise.
91110         * modules/unistdio/u16-snprintf: Likewise.
91111         * modules/unistdio/u16-sprintf: Likewise.
91112         * modules/unistdio/u16-u16-asnprintf: Likewise.
91113         * modules/unistdio/u16-u16-asprintf: Likewise.
91114         * modules/unistdio/u16-u16-snprintf: Likewise.
91115         * modules/unistdio/u16-u16-sprintf: Likewise.
91116         * modules/unistdio/u16-u16-vasnprintf: Likewise.
91117         * modules/unistdio/u16-u16-vasprintf: Likewise.
91118         * modules/unistdio/u16-u16-vsnprintf: Likewise.
91119         * modules/unistdio/u16-u16-vsprintf: Likewise.
91120         * modules/unistdio/u16-vasnprintf: Likewise.
91121         * modules/unistdio/u16-vasprintf: Likewise.
91122         * modules/unistdio/u16-vsnprintf: Likewise.
91123         * modules/unistdio/u16-vsprintf: Likewise.
91124         * modules/unistdio/u32-asnprintf: Likewise.
91125         * modules/unistdio/u32-asprintf: Likewise.
91126         * modules/unistdio/u32-snprintf: Likewise.
91127         * modules/unistdio/u32-sprintf: Likewise.
91128         * modules/unistdio/u32-u32-asnprintf: Likewise.
91129         * modules/unistdio/u32-u32-asprintf: Likewise.
91130         * modules/unistdio/u32-u32-snprintf: Likewise.
91131         * modules/unistdio/u32-u32-sprintf: Likewise.
91132         * modules/unistdio/u32-u32-vasnprintf: Likewise.
91133         * modules/unistdio/u32-u32-vasprintf: Likewise.
91134         * modules/unistdio/u32-u32-vsnprintf: Likewise.
91135         * modules/unistdio/u32-u32-vsprintf: Likewise.
91136         * modules/unistdio/u32-vasnprintf: Likewise.
91137         * modules/unistdio/u32-vasprintf: Likewise.
91138         * modules/unistdio/u32-vsnprintf: Likewise.
91139         * modules/unistdio/u32-vsprintf: Likewise.
91140         * modules/unistdio/ulc-asnprintf: Likewise.
91141         * modules/unistdio/ulc-asprintf: Likewise.
91142         * modules/unistdio/ulc-fprintf: Likewise.
91143         * modules/unistdio/ulc-snprintf: Likewise.
91144         * modules/unistdio/ulc-sprintf: Likewise.
91145         * modules/unistdio/ulc-vasnprintf: Likewise.
91146         * modules/unistdio/ulc-vasprintf: Likewise.
91147         * modules/unistdio/ulc-vfprintf: Likewise.
91148         * modules/unistdio/ulc-vsnprintf: Likewise.
91149         * modules/unistdio/ulc-vsprintf: Likewise.
91150         * modules/unistr/u8-check: Likewise.
91151         * modules/unistr/u8-chr: Likewise.
91152         * modules/unistr/u8-cmp: Likewise.
91153         * modules/unistr/u8-cmp2: Likewise.
91154         * modules/unistr/u8-cpy: Likewise.
91155         * modules/unistr/u8-cpy-alloc: Likewise.
91156         * modules/unistr/u8-endswith: Likewise.
91157         * modules/unistr/u8-mblen: Likewise.
91158         * modules/unistr/u8-mbsnlen: Likewise.
91159         * modules/unistr/u8-mbtouc: Likewise.
91160         * modules/unistr/u8-mbtouc-unsafe: Likewise.
91161         * modules/unistr/u8-mbtoucr: Likewise.
91162         * modules/unistr/u8-move: Likewise.
91163         * modules/unistr/u8-next: Likewise.
91164         * modules/unistr/u8-prev: Likewise.
91165         * modules/unistr/u8-set: Likewise.
91166         * modules/unistr/u8-startswith: Likewise.
91167         * modules/unistr/u8-stpcpy: Likewise.
91168         * modules/unistr/u8-stpncpy: Likewise.
91169         * modules/unistr/u8-strcat: Likewise.
91170         * modules/unistr/u8-strchr: Likewise.
91171         * modules/unistr/u8-strcmp: Likewise.
91172         * modules/unistr/u8-strcoll: Likewise.
91173         * modules/unistr/u8-strcpy: Likewise.
91174         * modules/unistr/u8-strcspn: Likewise.
91175         * modules/unistr/u8-strdup: Likewise.
91176         * modules/unistr/u8-strlen: Likewise.
91177         * modules/unistr/u8-strmblen: Likewise.
91178         * modules/unistr/u8-strmbtouc: Likewise.
91179         * modules/unistr/u8-strncat: Likewise.
91180         * modules/unistr/u8-strncmp: Likewise.
91181         * modules/unistr/u8-strncpy: Likewise.
91182         * modules/unistr/u8-strnlen: Likewise.
91183         * modules/unistr/u8-strpbrk: Likewise.
91184         * modules/unistr/u8-strrchr: Likewise.
91185         * modules/unistr/u8-strspn: Likewise.
91186         * modules/unistr/u8-strstr: Likewise.
91187         * modules/unistr/u8-strtok: Likewise.
91188         * modules/unistr/u8-to-u16: Likewise.
91189         * modules/unistr/u8-to-u32: Likewise.
91190         * modules/unistr/u8-uctomb: Likewise.
91191         * modules/unistr/u16-check: Likewise.
91192         * modules/unistr/u16-chr: Likewise.
91193         * modules/unistr/u16-cmp: Likewise.
91194         * modules/unistr/u16-cmp2: Likewise.
91195         * modules/unistr/u16-cpy: Likewise.
91196         * modules/unistr/u16-cpy-alloc: Likewise.
91197         * modules/unistr/u16-endswith: Likewise.
91198         * modules/unistr/u16-mblen: Likewise.
91199         * modules/unistr/u16-mbsnlen: Likewise.
91200         * modules/unistr/u16-mbtouc: Likewise.
91201         * modules/unistr/u16-mbtouc-unsafe: Likewise.
91202         * modules/unistr/u16-mbtoucr: Likewise.
91203         * modules/unistr/u16-move: Likewise.
91204         * modules/unistr/u16-next: Likewise.
91205         * modules/unistr/u16-prev: Likewise.
91206         * modules/unistr/u16-set: Likewise.
91207         * modules/unistr/u16-startswith: Likewise.
91208         * modules/unistr/u16-stpcpy: Likewise.
91209         * modules/unistr/u16-stpncpy: Likewise.
91210         * modules/unistr/u16-strcat: Likewise.
91211         * modules/unistr/u16-strchr: Likewise.
91212         * modules/unistr/u16-strcmp: Likewise.
91213         * modules/unistr/u16-strcoll: Likewise.
91214         * modules/unistr/u16-strcpy: Likewise.
91215         * modules/unistr/u16-strcspn: Likewise.
91216         * modules/unistr/u16-strdup: Likewise.
91217         * modules/unistr/u16-strlen: Likewise.
91218         * modules/unistr/u16-strmblen: Likewise.
91219         * modules/unistr/u16-strmbtouc: Likewise.
91220         * modules/unistr/u16-strncat: Likewise.
91221         * modules/unistr/u16-strncmp: Likewise.
91222         * modules/unistr/u16-strncpy: Likewise.
91223         * modules/unistr/u16-strnlen: Likewise.
91224         * modules/unistr/u16-strpbrk: Likewise.
91225         * modules/unistr/u16-strrchr: Likewise.
91226         * modules/unistr/u16-strspn: Likewise.
91227         * modules/unistr/u16-strstr: Likewise.
91228         * modules/unistr/u16-strtok: Likewise.
91229         * modules/unistr/u16-to-u32: Likewise.
91230         * modules/unistr/u16-to-u8: Likewise.
91231         * modules/unistr/u16-uctomb: Likewise.
91232         * modules/unistr/u32-check: Likewise.
91233         * modules/unistr/u32-chr: Likewise.
91234         * modules/unistr/u32-cmp: Likewise.
91235         * modules/unistr/u32-cmp2: Likewise.
91236         * modules/unistr/u32-cpy: Likewise.
91237         * modules/unistr/u32-cpy-alloc: Likewise.
91238         * modules/unistr/u32-endswith: Likewise.
91239         * modules/unistr/u32-mblen: Likewise.
91240         * modules/unistr/u32-mbsnlen: Likewise.
91241         * modules/unistr/u32-mbtouc: Likewise.
91242         * modules/unistr/u32-mbtouc-unsafe: Likewise.
91243         * modules/unistr/u32-mbtoucr: Likewise.
91244         * modules/unistr/u32-move: Likewise.
91245         * modules/unistr/u32-next: Likewise.
91246         * modules/unistr/u32-prev: Likewise.
91247         * modules/unistr/u32-set: Likewise.
91248         * modules/unistr/u32-startswith: Likewise.
91249         * modules/unistr/u32-stpcpy: Likewise.
91250         * modules/unistr/u32-stpncpy: Likewise.
91251         * modules/unistr/u32-strcat: Likewise.
91252         * modules/unistr/u32-strchr: Likewise.
91253         * modules/unistr/u32-strcmp: Likewise.
91254         * modules/unistr/u32-strcoll: Likewise.
91255         * modules/unistr/u32-strcpy: Likewise.
91256         * modules/unistr/u32-strcspn: Likewise.
91257         * modules/unistr/u32-strdup: Likewise.
91258         * modules/unistr/u32-strlen: Likewise.
91259         * modules/unistr/u32-strmblen: Likewise.
91260         * modules/unistr/u32-strmbtouc: Likewise.
91261         * modules/unistr/u32-strncat: Likewise.
91262         * modules/unistr/u32-strncmp: Likewise.
91263         * modules/unistr/u32-strncpy: Likewise.
91264         * modules/unistr/u32-strnlen: Likewise.
91265         * modules/unistr/u32-strpbrk: Likewise.
91266         * modules/unistr/u32-strrchr: Likewise.
91267         * modules/unistr/u32-strspn: Likewise.
91268         * modules/unistr/u32-strstr: Likewise.
91269         * modules/unistr/u32-strtok: Likewise.
91270         * modules/unistr/u32-to-u16: Likewise.
91271         * modules/unistr/u32-to-u8: Likewise.
91272         * modules/unistr/u32-uctomb: Likewise.
91273         * modules/uniwbrk/u8-wordbreaks: Likewise.
91274         * modules/uniwbrk/u16-wordbreaks: Likewise.
91275         * modules/uniwbrk/u32-wordbreaks: Likewise.
91276         * modules/uniwbrk/ulc-wordbreaks: Likewise.
91277         * modules/uniwbrk/wordbreak-property: Likewise.
91278         * modules/uniwidth/u8-strwidth: Likewise.
91279         * modules/uniwidth/u8-width: Likewise.
91280         * modules/uniwidth/u16-strwidth: Likewise.
91281         * modules/uniwidth/u16-width: Likewise.
91282         * modules/uniwidth/u32-strwidth: Likewise.
91283         * modules/uniwidth/u32-width: Likewise.
91284         * modules/uniwidth/width: Likewise.
91285         * modules/unicase/cased-tests (Makefile.am): Link all test programs
91286         with $(LIBUNISTRING).
91287         * modules/unicase/ignorable-tests: Likewise.
91288         * modules/unicase/locale-language-tests: Likewise.
91289         * modules/unicase/tolower-tests: Likewise.
91290         * modules/unicase/totitle-tests: Likewise.
91291         * modules/unicase/toupper-tests: Likewise.
91292         * modules/unicase/u8-casecmp-tests: Likewise.
91293         * modules/unicase/u8-casecoll-tests: Likewise.
91294         * modules/unicase/u8-casefold-tests: Likewise.
91295         * modules/unicase/u8-is-cased-tests: Likewise.
91296         * modules/unicase/u8-is-casefolded-tests: Likewise.
91297         * modules/unicase/u8-is-lowercase-tests: Likewise.
91298         * modules/unicase/u8-is-titlecase-tests: Likewise.
91299         * modules/unicase/u8-is-uppercase-tests: Likewise.
91300         * modules/unicase/u8-tolower-tests: Likewise.
91301         * modules/unicase/u8-totitle-tests: Likewise.
91302         * modules/unicase/u8-toupper-tests: Likewise.
91303         * modules/unicase/u16-casecmp-tests: Likewise.
91304         * modules/unicase/u16-casecoll-tests: Likewise.
91305         * modules/unicase/u16-casefold-tests: Likewise.
91306         * modules/unicase/u16-is-cased-tests: Likewise.
91307         * modules/unicase/u16-is-casefolded-tests: Likewise.
91308         * modules/unicase/u16-is-lowercase-tests: Likewise.
91309         * modules/unicase/u16-is-titlecase-tests: Likewise.
91310         * modules/unicase/u16-is-uppercase-tests: Likewise.
91311         * modules/unicase/u16-tolower-tests: Likewise.
91312         * modules/unicase/u16-totitle-tests: Likewise.
91313         * modules/unicase/u16-toupper-tests: Likewise.
91314         * modules/unicase/u32-casecmp-tests: Likewise.
91315         * modules/unicase/u32-casecoll-tests: Likewise.
91316         * modules/unicase/u32-casefold-tests: Likewise.
91317         * modules/unicase/u32-is-cased-tests: Likewise.
91318         * modules/unicase/u32-is-casefolded-tests: Likewise.
91319         * modules/unicase/u32-is-lowercase-tests: Likewise.
91320         * modules/unicase/u32-is-titlecase-tests: Likewise.
91321         * modules/unicase/u32-is-uppercase-tests: Likewise.
91322         * modules/unicase/u32-tolower-tests: Likewise.
91323         * modules/unicase/u32-totitle-tests: Likewise.
91324         * modules/unicase/u32-toupper-tests: Likewise.
91325         * modules/unicase/ulc-casecmp-tests: Likewise.
91326         * modules/unicase/ulc-casecoll-tests: Likewise.
91327         * modules/uniconv/u8-conv-from-enc-tests: Likewise.
91328         * modules/uniconv/u8-conv-to-enc-tests: Likewise.
91329         * modules/uniconv/u8-strconv-from-enc-tests: Likewise.
91330         * modules/uniconv/u8-strconv-to-enc-tests: Likewise.
91331         * modules/uniconv/u16-conv-from-enc-tests: Likewise.
91332         * modules/uniconv/u16-conv-to-enc-tests: Likewise.
91333         * modules/uniconv/u16-strconv-from-enc-tests: Likewise.
91334         * modules/uniconv/u16-strconv-to-enc-tests: Likewise.
91335         * modules/uniconv/u32-conv-from-enc-tests: Likewise.
91336         * modules/uniconv/u32-conv-to-enc-tests: Likewise.
91337         * modules/uniconv/u32-strconv-from-enc-tests: Likewise.
91338         * modules/uniconv/u32-strconv-to-enc-tests: Likewise.
91339         * modules/unictype/bidicategory-byname-tests: Likewise.
91340         * modules/unictype/bidicategory-name-tests: Likewise.
91341         * modules/unictype/bidicategory-of-tests: Likewise.
91342         * modules/unictype/bidicategory-test-tests: Likewise.
91343         * modules/unictype/block-list-tests: Likewise.
91344         * modules/unictype/block-of-tests: Likewise.
91345         * modules/unictype/block-test-tests: Likewise.
91346         * modules/unictype/category-C-tests: Likewise.
91347         * modules/unictype/category-Cc-tests: Likewise.
91348         * modules/unictype/category-Cf-tests: Likewise.
91349         * modules/unictype/category-Cn-tests: Likewise.
91350         * modules/unictype/category-Co-tests: Likewise.
91351         * modules/unictype/category-Cs-tests: Likewise.
91352         * modules/unictype/category-L-tests: Likewise.
91353         * modules/unictype/category-Ll-tests: Likewise.
91354         * modules/unictype/category-Lm-tests: Likewise.
91355         * modules/unictype/category-Lo-tests: Likewise.
91356         * modules/unictype/category-Lt-tests: Likewise.
91357         * modules/unictype/category-Lu-tests: Likewise.
91358         * modules/unictype/category-M-tests: Likewise.
91359         * modules/unictype/category-Mc-tests: Likewise.
91360         * modules/unictype/category-Me-tests: Likewise.
91361         * modules/unictype/category-Mn-tests: Likewise.
91362         * modules/unictype/category-N-tests: Likewise.
91363         * modules/unictype/category-Nd-tests: Likewise.
91364         * modules/unictype/category-Nl-tests: Likewise.
91365         * modules/unictype/category-No-tests: Likewise.
91366         * modules/unictype/category-P-tests: Likewise.
91367         * modules/unictype/category-Pc-tests: Likewise.
91368         * modules/unictype/category-Pd-tests: Likewise.
91369         * modules/unictype/category-Pe-tests: Likewise.
91370         * modules/unictype/category-Pf-tests: Likewise.
91371         * modules/unictype/category-Pi-tests: Likewise.
91372         * modules/unictype/category-Po-tests: Likewise.
91373         * modules/unictype/category-Ps-tests: Likewise.
91374         * modules/unictype/category-S-tests: Likewise.
91375         * modules/unictype/category-Sc-tests: Likewise.
91376         * modules/unictype/category-Sk-tests: Likewise.
91377         * modules/unictype/category-Sm-tests: Likewise.
91378         * modules/unictype/category-So-tests: Likewise.
91379         * modules/unictype/category-Z-tests: Likewise.
91380         * modules/unictype/category-Zl-tests: Likewise.
91381         * modules/unictype/category-Zp-tests: Likewise.
91382         * modules/unictype/category-Zs-tests: Likewise.
91383         * modules/unictype/category-and-not-tests: Likewise.
91384         * modules/unictype/category-and-tests: Likewise.
91385         * modules/unictype/category-byname-tests: Likewise.
91386         * modules/unictype/category-name-tests: Likewise.
91387         * modules/unictype/category-none-tests: Likewise.
91388         * modules/unictype/category-of-tests: Likewise.
91389         * modules/unictype/category-or-tests: Likewise.
91390         * modules/unictype/category-test-withtable-tests: Likewise.
91391         * modules/unictype/combining-class-tests: Likewise.
91392         * modules/unictype/ctype-alnum-tests: Likewise.
91393         * modules/unictype/ctype-alpha-tests: Likewise.
91394         * modules/unictype/ctype-blank-tests: Likewise.
91395         * modules/unictype/ctype-cntrl-tests: Likewise.
91396         * modules/unictype/ctype-digit-tests: Likewise.
91397         * modules/unictype/ctype-graph-tests: Likewise.
91398         * modules/unictype/ctype-lower-tests: Likewise.
91399         * modules/unictype/ctype-print-tests: Likewise.
91400         * modules/unictype/ctype-punct-tests: Likewise.
91401         * modules/unictype/ctype-space-tests: Likewise.
91402         * modules/unictype/ctype-upper-tests: Likewise.
91403         * modules/unictype/ctype-xdigit-tests: Likewise.
91404         * modules/unictype/decimal-digit-tests: Likewise.
91405         * modules/unictype/digit-tests: Likewise.
91406         * modules/unictype/mirror-tests: Likewise.
91407         * modules/unictype/numeric-tests: Likewise.
91408         * modules/unictype/property-alphabetic-tests: Likewise.
91409         * modules/unictype/property-ascii-hex-digit-tests: Likewise.
91410         * modules/unictype/property-bidi-arabic-digit-tests: Likewise.
91411         * modules/unictype/property-bidi-arabic-right-to-left-tests: Likewise.
91412         * modules/unictype/property-bidi-block-separator-tests: Likewise.
91413         * modules/unictype/property-bidi-boundary-neutral-tests: Likewise.
91414         * modules/unictype/property-bidi-common-separator-tests: Likewise.
91415         * modules/unictype/property-bidi-control-tests: Likewise.
91416         * modules/unictype/property-bidi-embedding-or-override-tests: Likewise.
91417         * modules/unictype/property-bidi-eur-num-separator-tests: Likewise.
91418         * modules/unictype/property-bidi-eur-num-terminator-tests: Likewise.
91419         * modules/unictype/property-bidi-european-digit-tests: Likewise.
91420         * modules/unictype/property-bidi-hebrew-right-to-left-tests: Likewise.
91421         * modules/unictype/property-bidi-left-to-right-tests: Likewise.
91422         * modules/unictype/property-bidi-non-spacing-mark-tests: Likewise.
91423         * modules/unictype/property-bidi-other-neutral-tests: Likewise.
91424         * modules/unictype/property-bidi-pdf-tests: Likewise.
91425         * modules/unictype/property-bidi-segment-separator-tests: Likewise.
91426         * modules/unictype/property-bidi-whitespace-tests: Likewise.
91427         * modules/unictype/property-byname-tests: Likewise.
91428         * modules/unictype/property-combining-tests: Likewise.
91429         * modules/unictype/property-composite-tests: Likewise.
91430         * modules/unictype/property-currency-symbol-tests: Likewise.
91431         * modules/unictype/property-dash-tests: Likewise.
91432         * modules/unictype/property-decimal-digit-tests: Likewise.
91433         * modules/unictype/property-default-ignorable-code-point-tests: Likewise.
91434         * modules/unictype/property-deprecated-tests: Likewise.
91435         * modules/unictype/property-diacritic-tests: Likewise.
91436         * modules/unictype/property-extender-tests: Likewise.
91437         * modules/unictype/property-format-control-tests: Likewise.
91438         * modules/unictype/property-grapheme-base-tests: Likewise.
91439         * modules/unictype/property-grapheme-extend-tests: Likewise.
91440         * modules/unictype/property-grapheme-link-tests: Likewise.
91441         * modules/unictype/property-hex-digit-tests: Likewise.
91442         * modules/unictype/property-hyphen-tests: Likewise.
91443         * modules/unictype/property-id-continue-tests: Likewise.
91444         * modules/unictype/property-id-start-tests: Likewise.
91445         * modules/unictype/property-ideographic-tests: Likewise.
91446         * modules/unictype/property-ids-binary-operator-tests: Likewise.
91447         * modules/unictype/property-ids-trinary-operator-tests: Likewise.
91448         * modules/unictype/property-ignorable-control-tests: Likewise.
91449         * modules/unictype/property-iso-control-tests: Likewise.
91450         * modules/unictype/property-join-control-tests: Likewise.
91451         * modules/unictype/property-left-of-pair-tests: Likewise.
91452         * modules/unictype/property-line-separator-tests: Likewise.
91453         * modules/unictype/property-logical-order-exception-tests: Likewise.
91454         * modules/unictype/property-lowercase-tests: Likewise.
91455         * modules/unictype/property-math-tests: Likewise.
91456         * modules/unictype/property-non-break-tests: Likewise.
91457         * modules/unictype/property-not-a-character-tests: Likewise.
91458         * modules/unictype/property-numeric-tests: Likewise.
91459         * modules/unictype/property-other-alphabetic-tests: Likewise.
91460         * modules/unictype/property-other-default-ignorable-code-point-tests:
91461         Likewise.
91462         * modules/unictype/property-other-grapheme-extend-tests: Likewise.
91463         * modules/unictype/property-other-id-continue-tests: Likewise.
91464         * modules/unictype/property-other-id-start-tests: Likewise.
91465         * modules/unictype/property-other-lowercase-tests: Likewise.
91466         * modules/unictype/property-other-math-tests: Likewise.
91467         * modules/unictype/property-other-uppercase-tests: Likewise.
91468         * modules/unictype/property-paired-punctuation-tests: Likewise.
91469         * modules/unictype/property-paragraph-separator-tests: Likewise.
91470         * modules/unictype/property-pattern-syntax-tests: Likewise.
91471         * modules/unictype/property-pattern-white-space-tests: Likewise.
91472         * modules/unictype/property-private-use-tests: Likewise.
91473         * modules/unictype/property-punctuation-tests: Likewise.
91474         * modules/unictype/property-quotation-mark-tests: Likewise.
91475         * modules/unictype/property-radical-tests: Likewise.
91476         * modules/unictype/property-sentence-terminal-tests: Likewise.
91477         * modules/unictype/property-soft-dotted-tests: Likewise.
91478         * modules/unictype/property-space-tests: Likewise.
91479         * modules/unictype/property-terminal-punctuation-tests: Likewise.
91480         * modules/unictype/property-test-tests: Likewise.
91481         * modules/unictype/property-titlecase-tests: Likewise.
91482         * modules/unictype/property-unassigned-code-value-tests: Likewise.
91483         * modules/unictype/property-unified-ideograph-tests: Likewise.
91484         * modules/unictype/property-uppercase-tests: Likewise.
91485         * modules/unictype/property-variation-selector-tests: Likewise.
91486         * modules/unictype/property-white-space-tests: Likewise.
91487         * modules/unictype/property-xid-continue-tests: Likewise.
91488         * modules/unictype/property-xid-start-tests: Likewise.
91489         * modules/unictype/property-zero-width-tests: Likewise.
91490         * modules/unictype/scripts-tests: Likewise.
91491         * modules/unictype/syntax-c-ident-tests: Likewise.
91492         * modules/unictype/syntax-c-whitespace-tests: Likewise.
91493         * modules/unictype/syntax-java-ident-tests: Likewise.
91494         * modules/unictype/syntax-java-whitespace-tests: Likewise.
91495         * modules/unilbrk/u8-possible-linebreaks-tests: Likewise.
91496         * modules/unilbrk/u8-width-linebreaks-tests: Likewise.
91497         * modules/unilbrk/u16-possible-linebreaks-tests: Likewise.
91498         * modules/unilbrk/u16-width-linebreaks-tests: Likewise.
91499         * modules/unilbrk/u32-possible-linebreaks-tests: Likewise.
91500         * modules/unilbrk/u32-width-linebreaks-tests: Likewise.
91501         * modules/unilbrk/ulc-possible-linebreaks-tests: Likewise.
91502         * modules/unilbrk/ulc-width-linebreaks-tests: Likewise.
91503         * modules/uniname/uniname-tests: Likewise.
91504         * modules/uninorm/canonical-decomposition-tests: Likewise.
91505         * modules/uninorm/compat-decomposition-tests: Likewise.
91506         * modules/uninorm/composition-tests: Likewise.
91507         * modules/uninorm/decomposing-form-tests: Likewise.
91508         * modules/uninorm/decomposition-tests: Likewise.
91509         * modules/uninorm/filter-tests: Likewise.
91510         * modules/uninorm/nfc-tests: Likewise.
91511         * modules/uninorm/nfd-tests: Likewise.
91512         * modules/uninorm/nfkc-tests: Likewise.
91513         * modules/uninorm/nfkd-tests: Likewise.
91514         * modules/uninorm/u8-normcmp-tests: Likewise.
91515         * modules/uninorm/u8-normcoll-tests: Likewise.
91516         * modules/uninorm/u16-normcmp-tests: Likewise.
91517         * modules/uninorm/u16-normcoll-tests: Likewise.
91518         * modules/uninorm/u32-normcmp-tests: Likewise.
91519         * modules/uninorm/u32-normcoll-tests: Likewise.
91520         * modules/unistdio/u8-asnprintf-tests: Likewise.
91521         * modules/unistdio/u8-vasnprintf-tests: Likewise.
91522         * modules/unistdio/u8-vasprintf-tests: Likewise.
91523         * modules/unistdio/u8-vsnprintf-tests: Likewise.
91524         * modules/unistdio/u8-vsprintf-tests: Likewise.
91525         * modules/unistdio/u16-asnprintf-tests: Likewise.
91526         * modules/unistdio/u16-vasnprintf-tests: Likewise.
91527         * modules/unistdio/u16-vasprintf-tests: Likewise.
91528         * modules/unistdio/u16-vsnprintf-tests: Likewise.
91529         * modules/unistdio/u16-vsprintf-tests: Likewise.
91530         * modules/unistdio/u32-asnprintf-tests: Likewise.
91531         * modules/unistdio/u32-vasnprintf-tests: Likewise.
91532         * modules/unistdio/u32-vasprintf-tests: Likewise.
91533         * modules/unistdio/u32-vsnprintf-tests: Likewise.
91534         * modules/unistdio/u32-vsprintf-tests: Likewise.
91535         * modules/unistdio/ulc-asnprintf-tests: Likewise.
91536         * modules/unistdio/ulc-vasnprintf-tests: Likewise.
91537         * modules/unistdio/ulc-vasprintf-tests: Likewise.
91538         * modules/unistdio/ulc-vsnprintf-tests: Likewise.
91539         * modules/unistdio/ulc-vsprintf-tests: Likewise.
91540         * modules/unistr/u8-check-tests: Likewise.
91541         * modules/unistr/u8-chr-tests: Likewise.
91542         * modules/unistr/u8-cmp-tests: Likewise.
91543         * modules/unistr/u8-cmp2-tests: Likewise.
91544         * modules/unistr/u8-cpy-alloc-tests: Likewise.
91545         * modules/unistr/u8-cpy-tests: Likewise.
91546         * modules/unistr/u8-mblen-tests: Likewise.
91547         * modules/unistr/u8-mbsnlen-tests: Likewise.
91548         * modules/unistr/u8-mbtouc-tests: Likewise.
91549         * modules/unistr/u8-mbtouc-unsafe-tests: Likewise.
91550         * modules/unistr/u8-mbtoucr-tests: Likewise.
91551         * modules/unistr/u8-move-tests: Likewise.
91552         * modules/unistr/u8-next-tests: Likewise.
91553         * modules/unistr/u8-prev-tests: Likewise.
91554         * modules/unistr/u8-set-tests: Likewise.
91555         * modules/unistr/u8-stpcpy-tests: Likewise.
91556         * modules/unistr/u8-stpncpy-tests: Likewise.
91557         * modules/unistr/u8-strcat-tests: Likewise.
91558         * modules/unistr/u8-strcmp-tests: Likewise.
91559         * modules/unistr/u8-strcoll-tests: Likewise.
91560         * modules/unistr/u8-strcpy-tests: Likewise.
91561         * modules/unistr/u8-strdup-tests: Likewise.
91562         * modules/unistr/u8-strlen-tests: Likewise.
91563         * modules/unistr/u8-strmblen-tests: Likewise.
91564         * modules/unistr/u8-strmbtouc-tests: Likewise.
91565         * modules/unistr/u8-strncat-tests: Likewise.
91566         * modules/unistr/u8-strncmp-tests: Likewise.
91567         * modules/unistr/u8-strncpy-tests: Likewise.
91568         * modules/unistr/u8-strnlen-tests: Likewise.
91569         * modules/unistr/u8-to-u16-tests: Likewise.
91570         * modules/unistr/u8-to-u32-tests: Likewise.
91571         * modules/unistr/u8-uctomb-tests: Likewise.
91572         * modules/unistr/u16-check-tests: Likewise.
91573         * modules/unistr/u16-chr-tests: Likewise.
91574         * modules/unistr/u16-cmp-tests: Likewise.
91575         * modules/unistr/u16-cmp2-tests: Likewise.
91576         * modules/unistr/u16-cpy-alloc-tests: Likewise.
91577         * modules/unistr/u16-cpy-tests: Likewise.
91578         * modules/unistr/u16-mblen-tests: Likewise.
91579         * modules/unistr/u16-mbsnlen-tests: Likewise.
91580         * modules/unistr/u16-mbtouc-tests: Likewise.
91581         * modules/unistr/u16-mbtouc-unsafe-tests: Likewise.
91582         * modules/unistr/u16-mbtoucr-tests: Likewise.
91583         * modules/unistr/u16-move-tests: Likewise.
91584         * modules/unistr/u16-next-tests: Likewise.
91585         * modules/unistr/u16-prev-tests: Likewise.
91586         * modules/unistr/u16-set-tests: Likewise.
91587         * modules/unistr/u16-stpcpy-tests: Likewise.
91588         * modules/unistr/u16-stpncpy-tests: Likewise.
91589         * modules/unistr/u16-strcat-tests: Likewise.
91590         * modules/unistr/u16-strcmp-tests: Likewise.
91591         * modules/unistr/u16-strcoll-tests: Likewise.
91592         * modules/unistr/u16-strcpy-tests: Likewise.
91593         * modules/unistr/u16-strdup-tests: Likewise.
91594         * modules/unistr/u16-strlen-tests: Likewise.
91595         * modules/unistr/u16-strmblen-tests: Likewise.
91596         * modules/unistr/u16-strmbtouc-tests: Likewise.
91597         * modules/unistr/u16-strncat-tests: Likewise.
91598         * modules/unistr/u16-strncmp-tests: Likewise.
91599         * modules/unistr/u16-strncpy-tests: Likewise.
91600         * modules/unistr/u16-strnlen-tests: Likewise.
91601         * modules/unistr/u16-to-u32-tests: Likewise.
91602         * modules/unistr/u16-to-u8-tests: Likewise.
91603         * modules/unistr/u16-uctomb-tests: Likewise.
91604         * modules/unistr/u32-check-tests: Likewise.
91605         * modules/unistr/u32-chr-tests: Likewise.
91606         * modules/unistr/u32-cmp-tests: Likewise.
91607         * modules/unistr/u32-cmp2-tests: Likewise.
91608         * modules/unistr/u32-cpy-alloc-tests: Likewise.
91609         * modules/unistr/u32-cpy-tests: Likewise.
91610         * modules/unistr/u32-mblen-tests: Likewise.
91611         * modules/unistr/u32-mbsnlen-tests: Likewise.
91612         * modules/unistr/u32-mbtouc-tests: Likewise.
91613         * modules/unistr/u32-mbtouc-unsafe-tests: Likewise.
91614         * modules/unistr/u32-mbtoucr-tests: Likewise.
91615         * modules/unistr/u32-move-tests: Likewise.
91616         * modules/unistr/u32-next-tests: Likewise.
91617         * modules/unistr/u32-prev-tests: Likewise.
91618         * modules/unistr/u32-set-tests: Likewise.
91619         * modules/unistr/u32-stpcpy-tests: Likewise.
91620         * modules/unistr/u32-stpncpy-tests: Likewise.
91621         * modules/unistr/u32-strcat-tests: Likewise.
91622         * modules/unistr/u32-strcmp-tests: Likewise.
91623         * modules/unistr/u32-strcoll-tests: Likewise.
91624         * modules/unistr/u32-strcpy-tests: Likewise.
91625         * modules/unistr/u32-strdup-tests: Likewise.
91626         * modules/unistr/u32-strlen-tests: Likewise.
91627         * modules/unistr/u32-strmblen-tests: Likewise.
91628         * modules/unistr/u32-strmbtouc-tests: Likewise.
91629         * modules/unistr/u32-strncat-tests: Likewise.
91630         * modules/unistr/u32-strncmp-tests: Likewise.
91631         * modules/unistr/u32-strncpy-tests: Likewise.
91632         * modules/unistr/u32-strnlen-tests: Likewise.
91633         * modules/unistr/u32-to-u16-tests: Likewise.
91634         * modules/unistr/u32-to-u8-tests: Likewise.
91635         * modules/unistr/u32-uctomb-tests: Likewise.
91636         * modules/uniwbrk/u8-wordbreaks-tests: Likewise.
91637         * modules/uniwbrk/u16-wordbreaks-tests: Likewise.
91638         * modules/uniwbrk/u32-wordbreaks-tests: Likewise.
91639         * modules/uniwbrk/ulc-wordbreaks-tests: Likewise.
91640         * modules/uniwidth/u8-strwidth-tests: Likewise.
91641         * modules/uniwidth/u8-width-tests: Likewise.
91642         * modules/uniwidth/u16-strwidth-tests: Likewise.
91643         * modules/uniwidth/u16-width-tests: Likewise.
91644         * modules/uniwidth/u32-strwidth-tests: Likewise.
91645         * modules/uniwidth/u32-width-tests: Likewise.
91646         * modules/uniwidth/width-tests: Likewise.
91648 2010-05-18  Richard Jones  <rjones@redhat.com>
91650         doc: users.txt: list hivex
91651         * users.txt: Add hivex.
91653 2010-05-18  Richard Jones  <rjones@redhat.com>
91655         doc: users.txt: list febootstrap
91656         * users.txt: Add febootstrap.
91658 2010-05-17  Giuseppe Scrivano  <gscrivano@gnu.org>
91660         bootstrap: fix an error when gnulib is not used as a git submodule
91661         * build-aux/bootstrap (gnulib_path): If its length is zero then
91662         assign "gnulib" to it.
91663         * build-aux/bootstrap: Redirect "git clone -h" stderr to stdout.
91665 2010-05-16  Bruno Haible  <bruno@clisp.org>
91667         Avoid autoconf warnings about AM_ICONV.
91668         * m4/iconv.m4 (AM_ICONV): Define using AC_DEFUN_ONCE for autoconf >=
91669         2.64.
91671 2010-05-16  Bruno Haible  <bruno@clisp.org>
91673         absolute-header: Make the macro usable in more situations.
91674         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER_ONE): New macro, extracted
91675         from gl_ABSOLUTE_HEADER.
91676         (gl_ABSOLUTE_HEADER): Use it. Fix comment.
91678 2010-05-16  James Youngman  <jay@gnu.org>
91680         doc: update users.txt
91681         * users.txt: Add CSSC.
91683 2010-05-16  Jim Meyering  <meyering@redhat.com>
91685         init.sh: fix an error in the previous change; add more comments
91686         * tests/init.sh: Compare exit code in loop against 9, not 2.
91687         Patch by Bruno Haible.
91688         Make the two tests more similar by adding an empty "then" clause.
91689         Add comments.
91691         init.sh: avoid unnecessary shell re-exec
91692         * tests/init.sh: Improve the re-exec-required check to first test the
91693         current shell.  If it passes the test, do not search for a shell that
91694         does pass, and do not re-exec.  This test is particularly contorted to
91695         avoid triggering misbehavior in Solaris 10's /bin/sh whereby any use
91696         of $(...) evokes a syntax error and causes immediate shell exit with
91697         status 2.  Bruno Haible reported that the re-exec made it impossible
91698         to single-step through any init.sh-using script.
91700 2010-05-16  Bruno Haible  <bruno@clisp.org>
91702         Fix collision between gnulib's and libintl's printf replacements.
91703         * lib/stdio.in.h (_GL_STDIO_STRINGIZE,
91704         _GL_STDIO_MACROEXPAND_AND_STRINGIZE): New macros.
91705         (printf): When using GNU C, map the __printf__ function to rpl_printf
91706         via __asm__. When not using GNU C, define rpl_printf instead of
91707         __printf__.
91708         * lib/printf.c: Ignore DEPENDS_ON_LIBINTL. Undoes the 2010-03-25
91709         commit.
91710         * lib/stdio-write.c: Ignore DEPENDS_ON_LIBINTL. Undoes the 2009-08-10
91711         commit.
91712         * m4/asm-underscore.m4: New file.
91713         * m4/stdio_h.m4 (gl_STDIO_H): Require gl_ASM_SYMBOL_PREFIX.
91714         * modules/stdio (Files): Add m4/asm-underscore.m4.
91715         (Makefile.am): Substitute ASM_SYMBOL_PREFIX.
91716         Reported by Ben Pfaff.
91718 2010-05-16  Bruno Haible  <bruno@clisp.org>
91720         verify: Avoid skipping the test on openSUSE 11.0.
91721         * tests/test-verify.sh: Unset MALLOC_PERTURB_.
91723 2010-05-13  Bruno Haible  <bruno@clisp.org>
91725         Avoid useless warnings from G++.
91726         * build-aux/c++defs.h (_GL_CXXALIASWARN_2, _GL_CXXALIASWARN1_2): Don't
91727         use _GL_WARN_ON_USE or _GL_WARN_ON_USE_CXX when optimizing.
91728         Reported by Jarno Rajahalme <jarno.rajahalme@nsn.com>.
91730 2010-05-11  Jim Meyering  <meyering@redhat.com>
91732         maint.mk: tweak preceding change
91733         * top/maint.mk (gl_extract_significant_defines_): Make exclusion
91734         regexps tighter by anchoring at EOL, and make the new group "shy"
91735         for slightly decreased overhead.
91737 2010-05-11  Eric Blake  <eblake@redhat.com>
91739         maint.mk: gnulib doesn't guarantee NSIG
91740         * top/maint.mk (gl_extract_significant_defines_): Exclude NSIG.
91742 2010-05-10  Peter O'Gorman  <pogma@thewrittenword.com>
91744         test-pwrite.c: Remove unused variable declaration.
91745         * tests/test-pwrite.c (main): Remove read_buf declaration.
91747         Remove useless test-pwrite.sh file.
91748         * tests/test-pwrite.sh: Delete file.
91749         * modules/pwrite-tests: Remove references.
91750         Reported by Bruno Haible.
91752 2010-05-10  Peter O'Gorman  <pogma@thewrittenword.com>
91754         init.sh: fix a typo
91755         * tests/init.sh: Correct typo in MALLOC_PERTURB_ initialization.
91757 2010-05-10  Jim Meyering  <meyering@redhat.com>
91759         maint.mk: avoid using a temporary file in the always-defined-macros check
91760         * top/maint.mk (.re-defmac): Remove rule.
91761         (gl_trap_): Remove definition.
91762         (sc_prohibit_always-defined_macros): Rewrite not to create and
91763         depend on a temporary file.  Instead, depend on GNU grep's ability
91764         to read a list of regular expressions from stdin when given "-f -".
91766 2010-05-09  Bruno Haible  <bruno@clisp.org>
91768         Update to GNU gettext 0.18, part 1.
91769         * m4/gettext.m4: Update to GNU gettext 0.18.
91770         * m4/intl.m4: Likewise.
91771         * m4/po.m4: Likewise.
91772         * modules/gettext (Files): Add m4/fcntl-o.m4.
91773         (configure.ac): Require gettext infrastructure from version 0.18.
91775 2010-05-09  Jim Meyering  <meyering@redhat.com>
91777         init.sh: enable MALLOC_PERTURB_
91778         * tests/init.sh: Enable glibc's malloc-perturbing option.
91780         maint.mk: improve sc_cross_check_PATH_usage_in_tests
91781         With my recent change in init.sh from the two-line form:
91782             -#   : ${srcdir=.}
91783             -#   . "$srcdir/init.sh"; path_prepend_ .
91784             +#   . "${srcdir=.}/init.sh"; path_prepend_ .
91785         I noticed that using the one-line form would cause this test
91786         to fail with a false-positive, or to stop working altogether,
91787         depending on whether help-version changed or all the tests did.
91788         * top/maint.mk (_hv_regex): Remove this definition.
91789         (_hv_regex_weak): Use a weak regex to select all init.sh-sourcing files.
91790         (_hv_regex_strong): Use a stronger regex to check for conformance.
91791         (sc_cross_check_PATH_usage_in_tests): Rewrite to use the above.
91792         Give a separate diagnostic for lack of conforming use.
91794         maint.mk: prohibit definition of symbols defined by gnulib
91795         * top/maint.mk (sc_prohibit_always-defined_macros): Reject the
91796         definition of symbols defined by gnulib.
91798 2010-05-09  Bruno Haible  <bruno@clisp.org>
91800         acl: Avoid test failure on Cygwin-hosted mingw.
91801         * tests/test-set-mode-acl.sh: Skip test if USE_ACL is 0.
91803 2010-05-09  Bruno Haible  <bruno@clisp.org>
91805         error: Use system's fcntl function.
91806         * lib/error.c (fcntl): Undefine.
91808 2010-05-09  Jim Meyering  <meyering@redhat.com>
91810         verify: adjust formatting to be more consistent
91811         * lib/verify.h (_GL_GENSYM): Add a space before each of a few
91812         argument-list '('s, and after one comma.
91814 2010-05-09  Bruno Haible  <bruno@clisp.org>
91816         error: More reliable output on mingw.
91817         * lib/error.c: Include <windows.h>.
91818         (is_open): New function.
91819         (flush_stdout): Call it instead of fcntl, also if F_GETFL is not
91820         defined.
91822 2010-05-09  Bruno Haible  <bruno@clisp.org>
91824         vasnprintf: Fix syntax errors in libintl build on mingw.
91825         * lib/vasnprintf.c (VASNPRINTF): Move a closing brace. Undefine
91826         pad_ourselves and prec_ourselves after use.
91828 2010-05-08  Bruno Haible  <bruno@clisp.org>
91830         * lib/config.charset: Update comments for Cygwin 1.7.
91831         * lib/localcharset.c: Likewise.
91833 2010-05-07  Jim Meyering  <meyering@redhat.com>
91835         init.sh: improve comments
91836         * tests/init.sh: Recommend the one-line init.sh-sourcing idiom:
91837         . "${srcdir=.}/init.sh"; path_prepend_ .
91838         Add a note about path_prepend_ and the alternative of using
91839         TESTS_ENVIRONMENT.
91841 2010-05-06  Sergey Poznyakoff  <gray@gnu.org.ua>
91843         exclude: Unescape hashed patterns in wildcard mode.
91844         * lib/exclude.c (add_exclude): Unescape the pattern before adding it
91845         to the hash list.
91846         * tests/test-exclude8.sh: New test case.
91847         * modules/exclude-tests: Add new test.
91849 2010-05-05  Eric Blake  <eblake@redhat.com>
91851         verify: automate tests
91852         * modules/verify-tests: New module.
91853         * tests/test-verify.sh: New file.
91854         * tests/test-verify.c: Guard each negative test with a unique id.
91855         Also avoid warning about unused left hand of comma expressions.
91857 2010-05-05  Paul Eggert  <eggert@cs.ucla.edu>
91859         Further improvements to verify.h, suggested by Eric Blake.
91860         * lib/verify.h (_GL_CONCAT, _GL_CONCAT0, _GL_GENSYM): Renamed from
91861         the GL_* versions, to avoid collision with OpenGL.
91862         (_GL_COUNTER): New macro, so that we can fall back on __LINE__ if
91863         __COUNTER__ doesn't work.  Test that __COUNTER__ increments rather
91864         than testing merely whether it's defined.
91866         Modify verify.h to pacify gcc -Wredundant_decls.
91867         * lib/verify.h (GL_CONCAT, GL_CONCAT0, GL_GENSYM): New macros.
91868         These use the prefix "GL_" since they're likely to be useful elsewhere.
91869         We may need to break them out into a different .h file.
91870         (__COUNTER__): Define to 0 if the compiler doesn't support it.
91871         (verify) [!defined __cplusplus]: Use them to avoid duplicate decls
91872         of verify_function__.
91874 2010-05-05  Peter O'Gorman  <pogma@thewrittenword.com>
91876         Tests for module pwrite.
91877         * modules/pwrite-tests: New file.
91878         * tests/test-pwrite.sh: New file.
91879         * tests/test-pwrite.c: New file.
91881         New module pwrite.
91882         * lib/unistd.in.h (pwrite): New declaration.
91883         * lib/pwrite.c: New file, from glibc with modifications.
91884         * m4/pwrite.m4: New file.
91885         * m4/unistd_h.m4 (gl_UNISTD_H): Test whether pwrite is declared.
91886         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_PWRITE, HAVE_PWRITE,
91887         REPLACE_PWRITE.
91888         * modules/pwrite: New file.
91889         * modules/unistd (Makefile.am): Substitute GNULIB_PWRITE, HAVE_PWRITE,
91890         REPLACE_PWRITE.
91891         * tests/test-unistd-c++.cc: Check GNULIB_NAMESPACE::pwrite.
91892         * doc/posix-functions/pwrite.texi: Mention the new module.
91894 2010-05-05  Peter O'Gorman  <pogma@thewrittenword.com>
91896         pread: Update documentation.
91897         * doc/posix-functions/pread.texi: Mention the 'pread' module.
91899 2010-05-04  Eric Blake  <eblake@redhat.com>
91901         docs: update cygwin progress
91902         * doc/posix-functions/wctob.texi (wctob): Cygwin 1.7.6 will fix
91903         this bug.
91904         * doc/glibc-functions/get_nprocs_conf.texi (get_nprocs_conf):
91905         Added in cygwin 1.7.2.
91906         * doc/glibc-functions/get_phys_pages.texi (get_phys_pages):
91907         Likewise.
91908         * doc/glibc-functions/get_avphys_pages.texi (get_avphys_pages):
91909         Likewise.
91910         * doc/glibc-functions/dup3.texi (dup3): Likewise.
91911         * doc/glibc-functions/pipe2.texi (pipe2): Likewise.
91912         * doc/glibc-functions/accept4.texi (accept4): Likewise.
91913         * doc/posix-functions/strfmon.texi (strfmon): Likewise.
91914         * doc/glibc-functions/get_nprocs.texi (get_nprocs): Likewise.
91915         Mention nproc module.
91916         * doc/glibc-functions/xdr_uint16_t.texi (xdr_uint16_t): Mention
91917         bug in cygwin 1.7.5 addition.
91918         * doc/glibc-functions/xdr_uint32_t.texi (xdr_uint32_t): Likewise.
91919         * doc/glibc-functions/xdr_uint64_t.texi (xdr_uint64_t): Likewise.
91920         * doc/glibc-functions/xdr_uint8_t.texi (xdr_uint8_t): Likewise.
91921         * doc/glibc-functions/xdr_array.texi (xdr_array): Added in cygwin
91922         1.7.5.
91923         * doc/glibc-functions/xdr_bool.texi (xdr_bool): Likewise.
91924         * doc/glibc-functions/xdr_bytes.texi (xdr_bytes): Likewise.
91925         * doc/glibc-functions/xdr_char.texi (xdr_char): Likewise.
91926         * doc/glibc-functions/xdr_double.texi (xdr_double): Likewise.
91927         * doc/glibc-functions/xdr_enum.texi (xdr_enum): Likewise.
91928         * doc/glibc-functions/xdr_float.texi (xdr_float): Likewise.
91929         * doc/glibc-functions/xdr_free.texi (xdr_free): Likewise.
91930         * doc/glibc-functions/xdr_hyper.texi (xdr_hyper): Likewise.
91931         * doc/glibc-functions/xdr_int.texi (xdr_int): Likewise.
91932         * doc/glibc-functions/xdr_int16_t.texi (xdr_int16_t): Likewise.
91933         * doc/glibc-functions/xdr_int32_t.texi (xdr_int32_t): Likewise.
91934         * doc/glibc-functions/xdr_int64_t.texi (xdr_int64_t): Likewise.
91935         * doc/glibc-functions/xdr_int8_t.texi (xdr_int8_t): Likewise.
91936         * doc/glibc-functions/xdr_long.texi (xdr_long): Likewise.
91937         * doc/glibc-functions/xdr_longlong_t.texi (xdr_longlong_t):
91938         Likewise.
91939         * doc/glibc-functions/xdr_netobj.texi (xdr_netobj): Likewise.
91940         * doc/glibc-functions/xdr_opaque.texi (xdr_opaque): Likewise.
91941         * doc/glibc-functions/xdr_pointer.texi (xdr_pointer): Likewise.
91942         * doc/glibc-functions/xdr_reference.texi (xdr_reference):
91943         Likewise.
91944         * doc/glibc-functions/xdr_short.texi (xdr_short): Likewise.
91945         * doc/glibc-functions/xdr_sizeof.texi (xdr_sizeof): Likewise.
91946         * doc/glibc-functions/xdr_string.texi (xdr_string): Likewise.
91947         * doc/glibc-functions/xdr_u_char.texi (xdr_u_char): Likewise.
91948         * doc/glibc-functions/xdr_u_hyper.texi (xdr_u_hyper): Likewise.
91949         * doc/glibc-functions/xdr_u_int.texi (xdr_u_int): Likewise.
91950         * doc/glibc-functions/xdr_u_long.texi (xdr_u_long): Likewise.
91951         * doc/glibc-functions/xdr_u_longlong_t.texi (xdr_u_longlong_t):
91952         Likewise.
91953         * doc/glibc-functions/xdr_u_short.texi (xdr_u_short): Likewise.
91954         * doc/glibc-functions/xdr_union.texi (xdr_union): Likewise.
91955         * doc/glibc-functions/xdr_vector.texi (xdr_vector): Likewise.
91956         * doc/glibc-functions/xdr_void.texi (xdr_void): Likewise.
91957         * doc/glibc-functions/xdr_wrapstring.texi (xdr_wrapstring):
91958         Likewise.
91959         * doc/glibc-functions/xdrmem_create.texi (xdrmem_create):
91960         Likewise.
91961         * doc/glibc-functions/xdrrec_create.texi (xdrrec_create):
91962         Likewise.
91963         * doc/glibc-functions/xdrrec_endofrecord.texi
91964         (xdrrec_endofrecord): Likewise.
91965         * doc/glibc-functions/xdrrec_eof.texi (xdrrec_eof): Likewise.
91966         * doc/glibc-functions/xdrrec_skiprecord.texi (xdrrec_skiprecord):
91967         Likewise.
91968         * doc/glibc-functions/xdrstdio_create.texi (xdrstdio_create):
91969         Likewise.
91971 2010-05-04  Jim Meyering  <meyering@redhat.com>
91973         gendocs.sh: make its "-s FILE" option more useful
91974         * build-aux/gendocs.sh: When honoring the -s FILE option, update
91975         $PACKAGE to reflect the probably-different basename of "FILE".
91977 2010-05-03  Giuseppe Scrivano  <gscrivano@gnu.org>
91979         bootstrap: don't ignore download_po_files failure
91980         * build-aux/bootstrap (update_po_files): Don't ignore download_po_files
91981         failure.
91983 2010-05-03  Jim Meyering  <meyering@redhat.com>
91985         maint.mk: allow to pass options to gendocs.sh
91986         * top/maint.mk (web-manual): Pass gendocs_options_ to gendocs.sh.
91987         (gendocs_options_): New overridable variable.
91989         gnu-web-doc-update: don't ignore configure or build failure
91990         * build-aux/gnu-web-doc-update: Exit nonzero upon internal failure.
91992         announce-gen: backslash-escape '@'s in --help output
91993         * build-aux/announce-gen: Fix syntax errors.
91995         maint.mk, announce-gen: allow project-specific announcement mail headers
91996         * top/maint.mk (translation_project_): Define default.
91997         (announcement_Cc_, announcement_mail_headers_): Likewise.
91998         (announcement): Invoke announce-gen with new --mail-headers option.
91999         * build-aux/announce-gen: New option: --mail-headers=HEADERS.
92001         test-xalloc-die: avoid unwarranted test failure on OpenSolaris 5.11
92002         * tests/test-xalloc-die.sh: Redirect stdout before stderr, (i.e.,
92003         "> out 2> err", rather than "2> err > out").  Otherwise, with /bin/sh
92004         on OpenSolaris 5.11 snv_134, we would end up with a stray "1> out"
92005         line in the "err2" output file when running "make check" in verbose
92006         mode (i.e., with set -x enabled).
92008 2010-05-03  Bruno Haible  <bruno@clisp.org>
92010         wctob: Fix for weird platforms.
92011         * lib/wctob.c (wctob): When wint_t is larger than wchar_t, check the
92012         argument value.
92014 2010-05-03  Jim Meyering  <meyering@redhat.com>
92016         maint.mk: prohibit unwarranted use of <strings.h>
92017         * top/maint.mk (sc_prohibit_strings_without_use): Reject inclusion of
92018         strings.h in a file that does not also use strcasecmp, strncasecmp,
92019         ffs or ffsll.
92021         maint.mk: remove obsolete comments
92022         * top/maint.mk: Remove stale, commented-out rules.
92024 2010-05-02  Bruno Haible  <bruno@clisp.org>
92026         wcwidth: Declare also when it's aliased.
92027         * lib/wchar.in.h (wcwidth): Don't test whether wcwidth is defined as a
92028         macro.
92030 2010-05-02  Bruno Haible  <bruno@clisp.org>
92032         Fix regression from 2010-04-25.
92033         * gnulib-tool (func_modules_transitive_closure): Check the status of
92034         all modules, not only of the tests that are of the form foo-tests where
92035         foo is a module.
92037 2010-05-02  Bruno Haible  <bruno@clisp.org>
92039         wctob: Work around nasty Cygwin 1.7.2 bug.
92040         * m4/wctob.m4 (gl_FUNC_WCTOB): Detect the Cygwin bug.
92041         * doc/posix-functions/wctob.texi: Mention the Cygwin bug.
92043 2010-05-01  Bruno Haible  <bruno@clisp.org>
92045         fpurge: Sharper test.
92046         * tests/test-fpurge.c (main): Add one more ftell check.
92047         * modules/fpurge-tests (Depends-on): Add ftell.
92048         Suggested by Eric Blake.
92050 2010-05-01  Bruno Haible  <bruno@clisp.org>
92052         ftello: Another test.
92053         * tests/test-ftello3.c: New file.
92054         * modules/ftello-tests (Files): Add it.
92055         (Makefile.am): Add it to TESTS and check_PROGRAMS. Augment
92056         MOSTLYCLEANFILES.
92058         ftell: Another test.
92059         * tests/test-ftell3.c: New file.
92060         * modules/ftell-tests (Files): Add it.
92061         (Makefile.am): Add it to TESTS and check_PROGRAMS. Augment
92062         MOSTLYCLEANFILES.
92064 2010-05-01  Bruno Haible  <bruno@clisp.org>
92066         ftell, ftello: Work around Solaris bug.
92067         * m4/ftello.m4 (gl_FUNC_FTELLO): Detect Solaris bug.
92068         * lib/ftello.c: Include stdio-impl.h.
92069         (ftello): On Solaris, when _IOWRT is set, compute the result without
92070         looking at _IOREAD.
92071         * modules/ftello (Files): Add lib/stdio-impl.h.
92072         * doc/posix-functions/ftell.texi: Mention Solaris bug.
92073         * doc/posix-functions/ftello.texi: Likewise.
92074         Reported by Eric Blake.
92076 2010-05-01  Bruno Haible  <bruno@clisp.org>
92078         freading: Adapt to special meaning of _IOREAD flag on Solaris.
92079         * lib/freading.c (freading): On Solaris, ignore the _IOREAD flag if
92080         the _IOWRT flag is also set.
92082 2010-05-01  Bruno Haible  <bruno@clisp.org>
92084         Fix doc about a HP-UX stdio bug.
92085         * doc/posix-functions/ftell.texi: Mark HP-UX bug as unfixed.
92086         * doc/posix-functions/ftello.texi: Likewise.
92088 2010-05-01  Bruno Haible  <bruno@clisp.org>
92090         lseek test: Fix failure on Solaris.
92091         * tests/test-lseek.sh: Partially revert 2010-04-20 commit. Consume all
92092         output.
92094 2010-04-30  Jim Meyering  <meyering@redhat.com>
92096         bootstrap: don't ignore failure to generate po*/Makevars
92097         * build-aux/bootstrap (with_gettext): Don't ignore failure
92098         to create po/Makevars or runtime-po/Makevars.
92100 2010-04-29  Eric Blake  <eblake@redhat.com>
92102         headers: relax license to LGPLv2+
92103         * modules/fcntl-h (License): Relax license.
92104         * modules/getopt-posix (License): Likewise.
92105         * modules/locale (License): Likewise.
92106         * modules/math (License): Likewise.
92107         * modules/pty (License): Likewise.
92108         * modules/sched (License): Likewise.
92109         * modules/search (License): Likewise.
92110         * modules/spawn (License): Likewise.
92111         * modules/stdarg (License): Likewise.
92112         * modules/sysexits (License): Likewise.
92114 2010-04-29  Jim Meyering  <meyering@redhat.com>
92116         inttypes: relax license to LGPLv2+
92117         * modules/inttypes (License): Relax license.
92119 2010-04-29  Simon Josefsson  <simon@josefsson.org>
92121         * top/maint.mk (indent): Run twice to produce idempotent results.
92123 2010-04-28  Bruno Haible  <bruno@clisp.org>
92125         getdate: Generate getdate.c in the source directory.
92126         * modules/getdate (Makefile.am): Add rule for getdate.c. Augment
92127         MOSTLYCLEANFILES.
92128         Suggested by Daniel Richard G. <skunk@iskunk.org> and Ralf Wildenhues.
92130 2010-04-27  Andreas Gruenbacher  <agruen@suse.de>  (tiny change)
92132         * lib/utimens.c: On Tru64, the timestamp parameter of utimens(2)
92133         is not declared as a const *; avoid warnings in that case.
92135 2010-04-28  Eric Blake  <eblake@redhat.com>
92137         canonicalize-lgpl: avoid compiler warning
92138         * lib/canonicalize-lgpl.c (versioned_symbol): Avoid an 'empty
92139         declaration' / 'extraneous semicolon' warning with some compilers.
92140         Reported by Andreas Gruenbacher.
92142 2010-04-28  Jim Meyering  <meyering@redhat.com>
92144         init.sh: ensure a more reliable exit status when exiting via trap
92145         * tests/init.sh (setup_): Don't rely on $? in signal handler.
92146         Inspired by patches from Dmitry V. Levin.
92147         Also trap on signal 3 (SIGQUIT).
92149 2010-04-27  Bruno Haible  <bruno@clisp.org>
92151         Update doc about utimes().
92152         * doc/posix-functions/utimes.texi: Mention the OSF/1 problem and the
92153         'utimens' module.
92154         Reported by Andreas Gruenbacher <agruen@suse.de>.
92156 2010-04-27  Eric Blake  <eblake@redhat.com>
92158         full-read, full-write: relax license
92159         * modules/full-read (License): Drop to LGPLv2+.
92160         * modules/full-write (License): Likewise.
92161         * modules/safe-read (License): Likewise.
92162         * modules/safe-write (License): Likewise.
92164         pthread: mention library for linking
92165         * modules/pthread (Link): Mention $(LIB_PTHREAD).
92167 2010-04-27  Jim Meyering  <meyering@redhat.com>
92169         maint.mk: fix a bug introduced in last change
92170         * top/maint.mk (gl_assured_headers_): Now that all names are on
92171         one line, use sed's "g" modifier.  Note that while the \.in\.h LHS
92172         is not anchored to end of word, it should be adequate.
92174         maint.mk: avoid side-effect in latest syntax-check
92175         * top/maint.mk (sc_prohibit_always_true_header_tests): Rework not
92176         to run commands via $(shell...), and hence to incur cost only when
92177         the new rule is actually run.
92179         maint.mk: syntax-check: prohibit HAVE_<header>_H that are always true
92180         Derive the list of guaranteed header names from gnulib/lib/*.in.h,
92181         and use that to create a regexp used to detect all #if HAVE_..._H uses.
92182         * top/maint.mk (sc_prohibit_always_true_header_tests): New rule.
92183         (gl_assured_headers_, az_, AZ_): Define.
92184         (gl_header_upper_case_or_, gl_have_header_regex_): Define.
92186 2010-04-26  Jim Meyering  <jim@meyering.net>
92187             Bruno Haible  <bruno@clisp.org>
92189         gnulib-common.m4: make glibc write diagnostics to stderr, not /dev/tty
92190         * m4/gnulib-common.m4 (gl_COMMON_BODY): Set LIBC_FATAL_STDERR_.
92191         Prompted by an exchange with Gilles Espinasse.
92193 2010-04-26  Jim Meyering  <meyering@redhat.com>
92195         git-version-gen: aesthetic tweak
92196         * build-aux/git-version-gen: Use "$nl" rather than a literal,
92197         so that the command remains on a single line.
92199 2010-04-26  Eric Blake  <eblake@redhat.com>
92201         git-version-gen: allow use on EBCDIC hosts
92202         * build-aux/git-version-gen (dirty): Use literal rather than tying
92203         ourselves to ascii.
92204         Reported by Steve Goetze.
92206 2010-04-25  Bruno Haible  <bruno@clisp.org>
92208         netdb: Add support for GNULIB_POSIXCHECK.
92209         * lib/netdb.in.h: Include warn-on-use.h.
92210         (getaddrinfo, freeaddrinfo, gai_strerror, getnameinfo): Warn if these
92211         functions are used when GNULIB_POSIXCHECK is defined and the
92212         getaddrinfo module is not in use.
92213         * m4/netdb_h.m4 (gl_HEADER_NETDB): Test whether getaddrinfo,
92214         freeaddrinfo, gai_strerror, getnameinfo are declared.
92215         * modules/netdb (Depends-on): Add warn-on-use.
92216         (Makefile.am): Include warn-on-use.h in netdb.h.
92218 2010-04-24  Ian Beckwith  <ianb@erislabs.net>
92220         build: avoid "make check" failure without .git/ directory
92221         * Makefile (sc_prefer_ac_check_funcs_once): Skip this test when
92222         there is no .git/ directory.
92224 2010-04-25  Bruno Haible  <bruno@clisp.org>
92226         ptsname: Fix misuse of ttyname_r.
92227         * lib/ptsname.c (__ptsname_r): Use __ttyname_r's return value instead
92228         of errno.
92230 2010-04-25  Bruno Haible  <bruno@clisp.org>
92232         ttyname_r: Make it work on Solaris 10.
92233         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Define HAVE_POSIXDECL_TTYNAME_R
92234         if the system function has the POSIX declaration. Test whether the
92235         function fails if the buffer is less than 128 bytes large.
92236         * lib/ttyname_r.c (ttyname_r): Handle both possible declarations of the
92237         system's ttyname_r function. Provide a reasonably large buffer.
92238         * modules/ttyname_r (Depends-on): Add extensions.
92239         * doc/posix-functions/ttyname_r.texi: Mention the Solaris problem.
92241 2010-04-25  Bruno Haible  <bruno@clisp.org>
92243         Use the 'extensions' module for some more functions on Solaris.
92244         * doc/posix-functions/asctime_r.texi: Recommend to use the 'extensions'
92245         module.
92246         * doc/posix-functions/ctime_r.texi: Likewise.
92247         * doc/posix-functions/getgrgid_r.texi: Likewise.
92248         * doc/posix-functions/getgrnam_r.texi: Likewise.
92249         * doc/posix-functions/getpwnam_r.texi: Likewise.
92250         * doc/posix-functions/getpwuid_r.texi: Likewise.
92251         * doc/posix-functions/readdir_r.texi: Likewise.
92252         * doc/posix-functions/sigwait.texi: Likewise.
92253         * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Add comment.
92254         * doc/posix-functions/getlogin_r.texi: Mark Solaris problem as fixed.
92256 2010-04-25  Bruno Haible  <bruno@clisp.org>
92258         ttyname_r: Make it work on MacOS X 10.4 and Solaris 10.
92259         * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Test whether the system function
92260         has the POSIX declaration. Set REPLACE_TTYNAME_R if not.
92261         * lib/ttyname_r.c: Include <limits.h>.
92262         (ttyname_r): Define using the system's ttyname_r function, if it exists
92263         and not on Solaris.
92264         * lib/unistd.in.h (ttyname_r): Replace function if REPLACE_TTYNAME_R is
92265         set.
92266         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_TTYNAME_R.
92267         * modules/unistd (Makefile.am): Substitute REPLACE_TTYNAME_R.
92268         * doc/posix-functions/ttyname_r.texi: Mark the problem as fixed.
92269         Reported by Simon Josefsson.
92271 2010-04-25  Bruno Haible  <bruno@clisp.org>
92273         Mention effects of _POSIX_PTHREAD_SEMANTICS on Solaris.
92274         * doc/posix-functions/asctime_r.texi: Mention the Solaris problem.
92275         * doc/posix-functions/ctime_r.texi: Likewise.
92276         * doc/posix-functions/getgrgid_r.texi: Likewise.
92277         * doc/posix-functions/getgrnam_r.texi: Likewise.
92278         * doc/posix-functions/getlogin_r.texi: Likewise.
92279         * doc/posix-functions/getpwnam_r.texi: Likewise.
92280         * doc/posix-functions/getpwuid_r.texi: Likewise.
92281         * doc/posix-functions/readdir_r.texi: Likewise.
92282         * doc/posix-functions/sigwait.texi: Likewise.
92283         * doc/posix-functions/ttyname_r.texi: Likewise.
92284         Reported by Simon Josefsson.
92286 2010-04-25  Bruno Haible  <bruno@clisp.org>
92288         gnulib-tool: Don't include hairy tests of dependencies in testdirs.
92289         * gnulib-tool (func_usage): Document that --with-*-tests options apply
92290         also to --create-testdir.
92291         (func_acceptable): Don't consider the status of *-tests modules here.
92292         (func_modules_transitive_closure): Consider it here, before including a
92293         test module.
92294         (func_import, func_create_testdir): Set inc_all_direct_tests,
92295         inc_all_indirect_tests.
92296         * doc/gnulib.texi (Extra tests modules): Document new behaviour of
92297         --create-testdir and --create-megatestdir.
92299 2010-04-25  Bruno Haible  <bruno@clisp.org>
92301         gnulib-tool: Add --without-*-tests options.
92302         * gnulib-tool (func_usage): Document the --without-*-tests options.
92303         (excl_cxx_tests, excl_longrunning_tests, excl_privileged_tests,
92304         excl_unportable_tests): New variables.
92305         Fail if they are specified with --import or --update.
92306         (func_acceptable): Respect the excl_*_tests variables.
92307         (func_import): Set the excl_*_tests variables to empty.
92309 2010-04-25  Simon Josefsson  <simon@josefsson.org>
92310             Bruno Haible  <bruno@clisp.org>
92312         Work around a MacOS X 10.4 bug with openpty.
92313         * doc/glibc-functions/openpty.texi: Mention the MacOS X 10.4 bug.
92314         * tests/test-openpty.c (main): Close the master side explicitly.
92316 2010-04-25  Bruno Haible  <bruno@clisp.org>
92318         strnlen: Fix a C++ test error on MacOS X and Solaris.
92319         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Don't set REPLACE_STRNLEN to 1 if
92320         the function is not declared.
92321         Reported by Jarno Rajahalme <jarno.rajahalme@nsn.com> and
92322         Simon Josefsson.
92324 2010-04-24  Bruno Haible  <bruno@clisp.org>
92326         Avoid a gcc warning.
92327         * tests/test-vasprintf.c (test_vasprintf, test_asprintf): Pass argument
92328         of correct type for %08lx directive.
92329         Reported by Eric Blake.
92331 2010-04-24  Bruno Haible  <bruno@clisp.org>
92333         vasnprintf: Correct errno value in case of out-of-memory.
92334         * lib/vasnprintf.c (VASNPRINTF): Set errno to 0 before calling SNPRINTF
92335         or sprintf. Use the errno value from SNPRINTF or sprintf.
92336         Reported by Ian Beckwith <ianb@erislabs.net>.
92338 2010-04-24  Bruno Haible  <bruno@clisp.org>
92340         ansi-c++-opt: Find correct compiler when cross-compiling.
92341         * m4/ansi-c++.m4 (gl_PROG_ANSI_CXX): Use AC_CHECK_TOOLS instead of
92342         AC_CHECK_PROGS.
92343         Reported by Simon Josefsson.
92345 2010-04-24  Giuseppe Scrivano  <gscrivano@gnu.org>
92347         vc-list-files: Add support for subversion
92348         * build-aux/vc-list-files: Use "svn list" to generate the list of
92349         files controlled by subversion.
92351 2010-04-23  Jim Meyering  <meyering@redhat.com>
92353         vc-list-files tests: convert to use init.sh
92354         * tests/test-vc-list-files-cvs.sh: Invoke "$srcdir/init.sh" and
92355         path_prepend_.
92356         Use Exit, not exit.
92357         Use skip_ rather than open coding it.
92358         Remove trap set-up and compare definitions.
92359         * tests/test-vc-list-files-git.sh: Likewise.
92360         * modules/vc-list-files-tests (Files): Add tests/init.sh.
92362 2010-04-22  Simon Josefsson  <simon@josefsson.org>
92364         * top/maint.mk (sc_prohibit_backup_files): Prohibit checked in
92365         backup files.
92367 2010-04-21  Simon Josefsson  <simon@josefsson.org>
92369         * tests/test-vasprintf.c (test_vasprintf, test_asprintf): Test %08lx.
92371 2010-04-20  Eric Blake  <eblake@redhat.com>
92373         tests: be robust to ignored SIGPIPE
92374         * tests/test-select-in.sh: Consume all output.
92375         * tests/test-lseek.sh: Check correct exit status, while avoiding
92376         EPIPE.
92378 2010-04-20  Simon Josefsson  <simon@josefsson.org>
92379             Bruno Haible  <bruno@clisp.org>
92381         visibility: Don't use -fvisibility if it leads to a warning.
92382         * m4/visibility.m4 (gl_VISIBILITY): Check whether -Werror is usable. If
92383         yes, don't pretend that visibility works if it leads to a warning.
92384         Reported by Mike Gran <spk121@yahoo.com>.
92386 2010-04-20  Andreas Gruenbacher  <agruen@suse.de>
92388         * build-aux/bootstrap: Use "git -h" for testing for supported options
92389         instead of "git --help".  The short-form option only shows a summary,
92390         and doesn't layout the full man page.  Grep for the full option name
92391         in the summary, too.
92393 2010-04-19  Bruno Haible  <bruno@clisp.org>
92395         relocatable: Drop the need to define RELOCATABLE_STRIP in Makefile.am.
92396         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Set RELOCATABLE_STRIP.
92397         * doc/relocatable-maint.texi (Supporting Relocation): Remove the
92398         mention of RELOCATABLE_STRIP.
92399         Reported by Sylvain Beucler <beuc@beuc.net>.
92401 2010-04-19  Bruno Haible  <bruno@clisp.org>
92403         * lib/diffseq.h: Fix typo in comment.
92404         Reported by Eric Blake.
92406 2010-04-19  Bruno Haible  <bruno@clisp.org>
92408         ioctl: Move autoconf macro to a .m4 file.
92409         * m4/ioctl.m4: New file, extracted from modules/ioctl.
92410         * modules/ioctl (Files): Add it.
92411         (configure.ac): Simply invoke gl_FUNC_IOCTL.
92412         Reported by Ian Beckwith <ianb@erislabs.net>.
92414 2010-04-18  Andreas Gruenbacher  <agruen@suse.de>
92415             Bruno Haible  <bruno@clisp.org>
92417         diffseq: Accommodate use-case with abstract arrays.
92418         * lib/diffseq.h (struct context): Remove xvec, yvec fields if ELEMENT
92419         is not defined.
92420         (diag, compareseq): Remove local variables xv, yv if ELEMENT is not
92421         defined. Use local macro XREF_YREF_EQUAL instead of EQUAL.
92423 2010-04-18  Bruno Haible  <bruno@clisp.org>
92425         * doc/posix-headers/stdbool.texi: More precise wording.
92427 2010-04-17  Jim Meyering  <meyering@redhat.com>
92429         maint.mk: use gnu-style indentation in an embedded perl script
92430         * top/maint.mk (detect_empty_lines_at_EOF_): Clean up formatting.
92431         Rename variable: s/two/last_two_bytes/
92433 2010-04-16  Eric Blake  <eblake@redhat.com>
92435         test-stdbool: skip test that fails with Solaris CC
92436         * tests/test-stdbool.c (f): Skip test that causes compilation
92437         error under buggy C++ compiler.
92438         * lib/stdbool.in.h: Document the limitation.
92439         * doc/posix-headers/stdbool.texi (stdbool.h): Likewise.
92441         setenv: allow compilation with C++
92442         * lib/setenv.c (__add_to_environ): Add a cast.  Also, drop use of
92443         register keyword.
92445         stdint: allow test to pass with C++
92446         * tests/test-stdint.c: Define __STDC_CONSTANT_MACROS, for glibc.
92448         getopt: allow compilation with C++
92449         * lib/getopt_int.h (__ordering): Hoist enum declaration outside
92450         struct.
92451         * lib/getopt.c (_getopt_internal_r): Use correct type.
92452         Reported by Dagobert Michelson, via Joel E. Denny.
92454 2010-04-16  Bruno Haible  <bruno@clisp.org>
92456         Override netdb.h always.
92457         * modules/netdb (Makefile.am): Augment BUILT_SOURCES always.
92458         * m4/netdb_h.m4 (gl_HEADER_NETDB): Don't set NETDB_H.
92459         Reported by Ludovic Courtès <ludo@gnu.org>.
92461 2010-04-15  Bruno Haible  <bruno@clisp.org>
92463         openpty: Fix mistake from 2010-03-21.
92464         * m4/pty.m4 (gl_FUNC_OPENPTY): Define HAVE_OPENPTY when openpty exists.
92465         Reported by Simon Josefsson.
92467 2010-04-15  Eric Blake  <eblake@redhat.com>
92469         test-forkpty: fix expected signature
92470         * tests/test-forkpty.c (SIGNATURE_CHECK): Add appropriate const.
92471         Reported by Simon Josefsson.
92473 2010-04-15  Jim Meyering  <meyering@redhat.com>
92475         maint.mk: texinfo_suffix_re_: correct the default regexp
92476         * top/maint.mk (texinfo_suffix_re_): Fix default regexp.
92478         * top/maint.mk (sc_texinfo_acronym): Improve filename regexp, and
92479         make it configurable via texinfo_suffix_re_.
92481 2010-04-14  Eric Blake  <eblake@redhat.com>
92483         strtok_r: relax license to LGPLv2+
92484         * modules/strtok_r (License): Relax license.
92485         Reported by Matthias Bolte.
92487 2010-04-14  Simon Josefsson  <simon@josefsson.org>
92489         * lib/gc-libgcrypt.c (gc_init): Use MIN_GCRYPT_VERSION set to
92490         version 1.4.4 by default instead of requiring the libgcrypt
92491         version used during build.  This makes it possible to use the
92492         application with older but still binary compatible libgcrypt
92493         versions.
92495 2010-04-13  Eric Blake  <eblake@redhat.com>
92497         getopt-gnu: match recent glibc fixes and posix ruling
92498         * tests/test-getopt.h (test_getopt): Strengthen tests of leading
92499         '+' handling, when requesting extensions.
92500         * tests/test-getopt_long.h (test_getopt_long): Strengthen test of
92501         'W;' handling.
92502         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Detect glibc 2.11 bug.
92503         * doc/posix-functions/getopt.texi (getopt): Document this.
92504         * doc/glibc-functions/getopt_long.texi (getopt_long): Likewise.
92505         * doc/glibc-functions/getopt_long_only.texi (getopt_long_only):
92506         Likewise.
92508         getopt: merge bug fixes from glibc
92509         * lib/getopt.c (_getopt_internal_r): Use correct message for 'W;'
92510         diagnostics.  Honor '+:' correctly.  Reject ';'.
92512         getopt-posix: detect MacOS bug
92513         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Reject MacOS botch of
92514         optind when missing a required argument.
92515         * doc/posix-functions/getopt.texi (getopt): Document the bug.
92516         * doc/glibc-functions/getopt_long.texi (getopt_long): Likewise.
92517         * doc/glibc-functions/getopt_long_only.texi (getopt_long_only):
92518         Likewise.
92520         getopt-posix: avoid spurious failure on Solaris
92521         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Check for getopt_clip as
92522         an indicator that setting optind=1 is sufficient for reset.
92524         getopt-posix: avoid spurious failure on FreeBSD
92525         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Check for optreset even
92526         in POSIX mode, since the m4 test uses it.
92528         gnulib-tool: silence warning on BSD sh
92529         * gnulib-tool: Avoid leaking warning about unknown 'declare'.
92531 2010-04-13  Jim Meyering  <meyering@redhat.com>
92533         doc: users.txt: GNU patch now uses gnulib
92534         * users.txt: Add patch.
92536 2010-04-12  Jim Meyering  <meyering@redhat.com>
92538         maint.mk: generate more concise timing data for syntax-check rules
92539         * top/maint.mk ($(sc_z_rules_)): Remove the ":", "sc_" prefix and
92540         " done" from each line that reports a syntax-check test duration.
92542 2010-04-12  Andreas Gruenbacher  <agruen@suse.de>
92544         git-version-gen: use "git update-index..." rather than "git status"
92545         * build-aux/git-version-gen: Use git update-index --refresh, not
92546         "git status".  With some versions of git, "git status" would fail
92547         to update the index and result in an unwarranted "-dirty" suffix.
92549 2010-04-11  Jim Meyering  <meyering@redhat.com>
92551         openat: correct formatting (no semantic change)
92552         * m4/openat.m4 (gl_FUNC_FCHOWNAT): Correct formatting in AC_DEFINE.
92553         Suggested by Bruno Haible.
92555 2010-04-11  Bruno Haible  <bruno@clisp.org>
92557         Stricter declaration checking in testdirs.
92558         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
92559         If for_tests is true, augment AM_CPPFLAGS to define
92560         GNULIB_STRICT_CHECKING.
92561         * build-aux/warn-on-use.h (_GL_WARN_ON_USE, _GL_WARN_ON_USE_CXX): When
92562         GNULIB_STRICT_CHECKING is defined, verify that the function is
92563         declared.
92565 2010-04-11  Paolo Bonzini  <bonzini@gnu.org>
92566             Bruno Haible  <bruno@clisp.org>
92568         libunistring: Improve configure output.
92569         * m4/libunistring.m4 (gl_LIBUNISTRING): Check for libiconv first.
92570         Don't say "consider installing GNU libunistring" when checking again
92571         with libiconv.
92573 2010-04-11  Bruno Haible  <bruno@clisp.org>
92575         libunistring: Correct value of $LTLIBUNISTRING.
92576         * m4/libunistring.m4 (gl_LIBUNISTRING): When it depends on libiconv,
92577         correct the value of $LTLIBUNISTRING.
92579 2010-04-11  Bruno Haible  <bruno@clisp.org>
92581         havelib: Add static libraries to LIBS in the right order.
92582         * m4/lib-link.m4 (AC_LIB_HAVE_LINKFLAGS): When $LIB[]NAME contains no
92583         -l options, prepend it to $LIBS, instead of appending it to $LIBS.
92585 2010-04-11  Bruno Haible  <bruno@clisp.org>
92587         libunistring: Detect libunistring also when it depends on libiconv.
92588         * m4/libunistring.m4 (gl_LIBUNISTRING): Unset the cached result before
92589         the second AC_LIB_HAVE_LINKFLAGS invocation.
92591 2010-04-11  James Youngman  <jay@gnu.org>
92593         close-stream: declare local scalars to be "const"
92594         * lib/close-stream.c (close_stream): Make boolean variables const
92595         to document the fact that we set but do not change them.
92597 2010-04-11  Bruno Haible  <bruno@clisp.org>
92599         * m4/libunistring.m4 (gl_LIBUNISTRING): Fix typo in comment.
92601 2010-04-11  Jim Meyering  <meyering@redhat.com>
92603         maint.mk: don't include dist-check.mk
92604         * top/maint.mk: Remove bogus include directive.
92606         maint.mk: improve empty-line-at-EOF check
92607         * top/maint.mk (sc_prohibit_empty_lines_at_EOF): Use Perl-based
92608         solution, rather than tail+Perl-based one.  The latter would read
92609         a few kilobytes from the end of each file, and did not handle empty
92610         files properly.
92612         maint.mk: print the elapsed time for each syntax-check rule
92613         * top/maint.mk (sc_m_rules_): Save start time in a file.
92614         (sc_z_rules_): New rules: remove temp file and print elapsed time.
92615         (local-check): Interpose the .z rules
92617 2010-04-11  Jim Meyering  <meyering@redhat.com>
92619         maint.mk: detect_empty_lines_at_EOF_: avoid FP for an empty file
92620         * top/maint.mk (detect_empty_lines_at_EOF_): Don't confuse an
92621         empty file with one that ends in an empty line.
92623 2010-04-10  Bruno Haible  <bruno@clisp.org>
92625         mkdir: Make it work on mingw64.
92626         * lib/sys_stat.in.h: Include <direct.h> together with <io.h>.
92627         * lib/mkdir.c: Update comment.
92628         Reported by Roman Donchenko (Роман Донченко) <dxdragon@yandex.ru>.
92630 2010-04-10  Bruno Haible  <bruno@clisp.org>
92632         Don't override improved macro from newer autoconf.
92633         * m4/gnulib-common.m4 (AC_C_RESTRICT): Don't define for
92634         autoconf >= 2.62.
92635         Reported by Joel E. Denny <jdenny@clemson.edu>.
92637 2010-04-10  Jim Meyering  <meyering@redhat.com>
92639         maint.mk: new syntax-check rule: prohibit empty lines at end of file
92640         * top/maint.mk (sc_prohibit_empty_lines_at_EOF): New rule.
92642         maint.mk: correct a diagnostic
92643         * top/maint.mk (sc_prohibit_HAVE_MBRTOWC): Fix obsolete use of $re
92644         in diagnostic; now use $prohibit.
92646 2010-04-10  Bruno Haible  <address@hidden>
92648         fchownat: Fix a C++ test error on Solaris 8.
92649         * m4/openat.m4 (gl_FUNC_FCHOWNAT): Don't set REPLACE_FCHOWNAT to 1 if
92650         the function does not exist.
92652 2010-04-10  Bruno Haible  <bruno@clisp.org>
92654         vasnprintf: Add more tests.
92655         * tests/test-vasnprintf-posix.c: Include <errno.h>.
92656         (test_function): Test converting an invalid wide string.
92658         vasnprintf: Correct handling of unconvertible wide string arguments.
92659         * lib/vasnprintf.c (MAX_ROOM_NEEDED): New function, extracted from
92660         VASNPRINTF.
92661         (VASNPRINTF): Use it. After snprintf failed, allocate more memory only
92662         if HAVE_SNPRINTF_RETVAL_C99 is false and the allocated memory is
92663         smaller than the expected maximum need for the directive. Set errno to
92664         EILSEQ, not EINVAL, when the directive is 'c' or 's'.
92665         (local_strnlen, local_wcslen, local_wcsnlen): Update conditions.
92666         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Require AC_C_INLINE and
92667         gl_SNPRINTF_RETVAL_C99. Define HAVE_SNPRINTF_RETVAL_C99.
92668         * modules/vasnprintf (Files): Add m4/printf.m4.
92669         Reported by Jarno Rajahalme <jarno.rajahalme@nsn.com>.
92671 2010-04-10  Bruno Haible  <bruno@clisp.org>
92673         vasnprintf: Fix crash in %ls directive.
92674         * lib/vasnprintf.c (VASNPRINTF): Don't abort when a unconvertible wide
92675         string is passed as argument to %ls, with no precision and no width.
92676         Reported by Jarno Rajahalme <jarno.rajahalme@nsn.com>.
92678 2010-04-10  Bruno Haible  <bruno@clisp.org>
92680         vasnprintf: Fix multiple test failures on mingw.
92681         * lib/vasnprintf.c (SNPRINTF) [mingw]: Define to snprintf, not
92682         _snprintf, or snwprintf, not _snwprintf.
92684 2010-04-10  Bruno Haible  <bruno@clisp.org>
92686         write: Fix a C++ test error on mingw.
92687         * lib/unistd.in.h (write): Use _GL_CXXALIAS_SYS_CAST.
92689 2010-04-10  Bruno Haible  <bruno@clisp.org>
92691         vasnprintf test: Reduce code duplication.
92692         * tests/test-vasnprintf.c (test_function): New function, extracted from
92693         test_vasnprintf.
92694         (test_vasnprintf, test_asnprintf): Invoke it.
92696 2010-04-10  Bruno Haible  <bruno@clisp.org>
92698         strnlen: Fix warning in C++ mode on MacOS X.
92699         * lib/string.in.h (strnlen): Use the modern idiom.
92700         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set REPLACE_STRNLEN to 1, instead of
92701         defining strnlen as a macro already in <config.h>.
92702         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
92703         REPLACE_STRNLEN.
92704         * modules/string (Makefile.am): Substitute REPLACE_STRNLEN.
92705         Reported by Jarno Rajahalme <jarno.rajahalme@nsn.com>.
92707 2010-04-08  James Youngman  <jay@gnu.org>
92709         * doc/manywarnings.texi (manywarnings): Add missing parenthesis in
92710         the example.
92712 2010-04-09  Jim Meyering  <meyering@redhat.com>
92714         maint.mk: print better diagnostic when there is no $(_hv_file)
92715         * top/maint.mk (sc_cross_check_PATH_usage_in_tests): Skip test and
92716         announce that when $(_hv_file) (aka help-version) does not exist.
92718         init.sh: run tr in the "C" locale to avoid multibyte interpretation
92719         * tests/init.sh (rand_bytes_): Run tr in the "C" locale so it does
92720         not try to interpret its random input bytes.  Jarno Rajahalme reported
92721         that ./test-xalloc-die.sh would fail with "tr: Illegal byte sequence".
92722         on Darwin 10.3.0 with LC_CTYPE=UTF-8.
92723         (mktempd_): Likewise, just in case.
92725         ftruncate: add two years to projected module removal date: 2012
92726         * m4/ftruncate.m4: Adjust comments.
92728         ftruncate: mark module as obsolete; even MinGW provides it, now
92729         * modules/ftruncate (Status): Obsolete.
92730         (Notice): Say that.
92731         * doc/posix-functions/ftruncate.texi: Don't say MinGW lacks it.
92732         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/9203
92734 2010-04-08  Bruno Haible  <bruno@clisp.org>
92736         Fix side effects from tests-related modules.
92737         * modules/dprintf-posix (Comment): New section.
92738         * modules/fprintf-posix (Comment): Likewise.
92739         * modules/obstack-printf-posix (Comment): Likewise.
92740         * modules/printf-posix (Comment): Likewise.
92741         * modules/snprintf-posix (Comment): Likewise.
92742         * modules/sprintf-posix (Comment): Likewise.
92743         * modules/vasnprintf-posix (Comment): Likewise.
92744         * modules/vasprintf-posix (Comment): Likewise.
92745         * modules/vdprintf-posix (Comment): Likewise.
92746         * modules/vfprintf-posix (Comment): Likewise.
92747         * modules/vprintf-posix (Comment): Likewise.
92748         * modules/vsnprintf-posix (Comment): Likewise.
92749         * modules/vsprintf-posix (Comment): Likewise.
92750         * modules/xprintf-posix (Comment): Likewise.
92751         * modules/xvasprintf-posix (Comment): Likewise.
92752         * modules/ceilf-tests (Depends-on): Remove fprintf-posix.
92753         * modules/floorf-tests (Depends-on): Likewise.
92754         * modules/round-tests (Depends-on): Likewise.
92755         * modules/roundf-tests (Depends-on): Likewise.
92756         * modules/trunc-tests (Depends-on): Likewise.
92757         * modules/truncf-tests (Depends-on): Likewise.
92758         * tests/test-ceilf2.c (check): Don't invoke fprintf if the
92759         'fprintf-posix' module is not present.
92760         * tests/test-floorf2.c (check): Likewise.
92761         * tests/test-trunc2.c (check): Likewise.
92762         * tests/test-truncf2.c (check): Likewise.
92763         * tests/test-round2.c (equal): Likewise.
92764         Reported by Jarno Rajahalme <jarno.rajahalme@nsn.com>.
92766 2010-04-07  Karl Berry  <karl@gnu.org>
92768         * config/srclist.txt,
92769         * config/srclistvars.sh,
92770         * config/srclist-update: doc fixes.
92772 2010-04-07  Jim Meyering  <meyering@redhat.com>
92774         maint.mk: add a PATH crosschecking syntax-check rule
92775         * top/maint.mk (sc_cross_check_PATH_usage_in_tests): New rule.
92776         Useful if you use a test like the one in help-version (coreutils,
92777         diffutils, grep, gzip) that ensures $(VERSION) matches what is
92778         printed by prog --version.
92780 2010-04-06  Bruno Haible  <bruno@clisp.org>
92782         Fix link error on mingw.
92783         * modules/unistd-c++-tests (test_unistd_c___LDADD): Add LIBSOCKET.
92784         * modules/fcntl-h-c++-tests (test_fcntl_h_c___LDADD): Likewise.
92786 2010-04-06  Bruno Haible  <bruno@clisp.org>
92788         Assume rmdir exists.
92789         * lib/rmdir.c (rpl_rmdir): Remove code that invokes the rmdir program.
92791 2010-04-06  Giuseppe Scrivano  <gscrivano@gnu.org>
92793         doc: update users.txt
92794         * users.txt: Add gcal.
92796 2010-04-06  Jim Meyering  <meyering@redhat.com>
92798         init.sh: simply unset TMPDIR rather than risking env -i
92799         * tests/init.sh (mktempd_): Using env -i is rather harsh, and
92800         although it probably works fine on all Unix-based systems, some
92801         systems (Cygwin?) cannot tolerate a totally cleared environment.
92802         Suggestion from Eric Blake.
92804 2010-04-06  Jim Meyering  <meyering@redhat.com>
92806         init.sh: portability fix: use env's POSIX-specified -i option not -u
92807         * tests/init.sh (mktempd_): Use env -i and set PATH explicitly rather
92808         than unportable env -u.  Solaris 5.11's env lacks support for -u.
92810 2010-04-05  Bruno Haible  <bruno@clisp.org>
92812         btowc: Work around Cygwin 1.7.2 bug.
92813         * m4/btowc.m4 (gl_FUNC_BTOWC): Set REPLACE_BTOWC to 1 if the function
92814         does not map NUL to 0.
92815         * doc/posix-functions/btowc.texi: Mention the Cygwin bug.
92817 2010-04-05  Bruno Haible  <bruno@clisp.org>
92819         Make the multithread modules work on Cygwin 1.7.2.
92820         * m4/threadlib.m4 (gl_THREADLIB_BODY): Improve the test whether
92821         imported symbols can be declared weak, so that it returns "no" on
92822         Cygwin 1.7.2.
92824 2010-04-05  Bruno Haible  <bruno@clisp.org>
92826         Use the module 'strncat'.
92827         * modules/unistr/u8-strncat (Depends-on): Add strncat.
92829         Tests for module 'strncat'.
92830         * modules/strncat-tests: New file.
92831         * tests/test-strncat.c: New file.
92833         New module 'strncat'.
92834         * lib/string.in.h (strncat): New declaration.
92835         * lib/strncat.c: New file, based on lib/unistr/u-strncat.h.
92836         * m4/strncat.m4: New file, based on m4/memchr.m4.
92837         * modules/strncat: New file.
92838         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Also check whether strncat
92839         is declared.
92840         (gl_HEADER_STRING_H_DEFAULTS): Initialize GNULIB_STRNCAT,
92841         REPLACE_STRNCAT.
92842         * modules/string (Makefile.am): Substitute GNULIB_STRNCAT,
92843         REPLACE_STRNCAT.
92844         * doc/posix-functions/strncat.texi: Mention the Solaris bug and the new
92845         module.
92846         * tests/test-string-c++.cc: Check signature of strncat.
92848 2010-04-05  Jim Meyering  <meyering@redhat.com>
92850         xstrtoumax-tests: convert to use init.sh
92851         * modules/xstrtoumax-tests (Files): Add tests/init.sh.
92852         * tests/test-xstrtoumax.sh: Invoke "$srcdir/init.sh" and path_prepend_.
92853         Use Exit, not exit.
92854         Remove uses of $EXEEXT and "./" to run a program in the current dir.
92856         xstrtoimax-tests: convert to use init.sh
92857         * modules/xstrtoimax-tests (Files): Add tests/init.sh.
92858         * tests/test-xstrtoimax.sh: Invoke "$srcdir/init.sh" and path_prepend_.
92859         Use Exit, not exit.
92860         Remove uses of $EXEEXT and "./" to run a program in the current dir.
92862 2010-04-05  Bruno Haible  <bruno@clisp.org>
92864         sys_socket: Avoid #define replacements in C++ mode.
92865         * lib/sys_socket.in.h (close, gethostname, select): In C++, attach a
92866         warning to the function if possible, rather than #defining the symbol
92867         to a dysfunctional alias.
92869 2010-04-05  Bruno Haible  <bruno@clisp.org>
92871         fseeko: Fix C++ test error on mingw.
92872         * m4/fseeko.m4 (gl_HAVE_FSEEKO): New macro, extracted from
92873         gl_FUNC_FSEEKO.
92874         (gl_REPLACE_FSEEKO): Also set REPLACE_FSEEKO if appropriate.
92875         (gl_FUNC_FSEEKO): Require gl_HAVE_FSEEKO. Update.
92876         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Don't fiddle with internals of the
92877         fseeko module. Instead, invoke gl_REPLACE_FSEEKO.
92879 2010-04-05  Bruno Haible  <bruno@clisp.org>
92881         duplocale: Improve test output.
92882         * tests/test-duplocale.c (main): Print reason for skipped test.
92884 2010-04-05  Bruno Haible  <bruno@clisp.org>
92886         Assume rmdir exists.
92887         * m4/rmdir.m4 (gl_FUNC_RMDIR): Remove test whether rmdir exists.
92888         * doc/posix-functions/rmdir.texi: Remove mention of "old platforms".
92890 2010-04-05  Bruno Haible  <bruno@clisp.org>
92892         Fix link error on Solaris 8 with cc.
92893         * modules/pty-c++-tests (test_pty_c___LDADD): Add LIBINTL.
92895 2010-04-05  Bruno Haible  <bruno@clisp.org>
92897         frexpl: Fix a C++ test error on Solaris 8 and Cygwin.
92898         * lib/math.in.h (frexpl): Fix condition on _GL_CXXALIASWARN invocation.
92900 2010-04-05  Bruno Haible  <bruno@clisp.org>
92902         vasprintf: Update documentation.
92903         * doc/glibc-functions/asprintf.texi: Mention the 'vasprintf' module.
92905 2010-04-05  Bruno Haible  <bruno@clisp.org>
92907         ptsname: Improve test.
92908         * tests/test-ptsname.c (main): Also try the various master names of BSD
92909         systems.
92911 2010-04-05  Bruno Haible  <bruno@clisp.org>
92913         memchr: Avoid a possible C++ test error.
92914         * lib/string.in.h (memchr): Provide declaration if function is missing.
92915         * m4/memchr.m4 (gl_FUNC_MEMCHR): If the function is missing, set
92916         HAVE_MEMCHR to 0, not REPLACE_MEMCHR to 1.
92917         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize HAVE_MEMCHR.
92918         * modules/string (Makefile.am): Substitute HAVE_MEMCHR.
92920 2010-04-05  Bruno Haible  <bruno@clisp.org>
92922         strtok_r: Improve idiom.
92923         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Invoke gl_PREREQ_STRDUP only when
92924         AC_LIBOBJ is used.
92926 2010-04-05  Bruno Haible  <bruno@clisp.org>
92928         strdup: Improve idiom.
92929         * m4/strdup.m4 (gl_FUNC_STRDUP): Invoke gl_PREREQ_STRDUP only when
92930         AC_LIBOBJ is used.
92931         (gl_FUNC_STRDUP_POSIX): When strdup is missing and malloc is not POSIX
92932         compliant, don't set REPLACE_STRDUP to 1. Invoke gl_PREREQ_STRDUP only
92933         when AC_LIBOBJ is used.
92935 2010-04-05  Bruno Haible  <bruno@clisp.org>
92937         mbsinit, mbrtowc, wcrtomb: Improve idioms.
92938         * m4/mbsinit.m4 (gl_FUNC_MBSINIT): When the function does not exist,
92939         don't set REPLACE_MBSINIT to 1.
92940         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): When the function does not exist,
92941         don't set REPLACE_MBRTOWC to 1.
92942         * m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): When the function does not
92943         exist, don't set REPLACE_MBSRTOWCS to 1.
92944         * m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): When the function does not
92945         exist, don't set REPLACE_MBSNRTOWCS to 1.
92946         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): When the function does not exist,
92947         don't set REPLACE_WCRTOMB to 1.
92948         * m4/wcsrtombs.m4 (gl_FUNC_WCSRTOMBS): When the function does not
92949         exist, don't set REPLACE_WCSRTOMBS to 1.
92950         * m4/wcsnrtombs.m4 (gl_FUNC_WCSNRTOMBS): When the function does not
92951         exist, don't set REPLACE_WCSNRTOMBS to 1.
92953 2010-04-05  Bruno Haible  <bruno@clisp.org>
92955         ldexpl: Improve idiom.
92956         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): When the function is not declared,
92957         make sure to set HAVE_DECL_LDEXPL to 0.
92959 2010-04-05  Jim Meyering  <meyering@redhat.com>
92961         xstrtol-tests: convert to use init.sh
92962         * modules/xstrtol-tests (Files): Add tests/init.sh.
92963         * tests/test-xstrtol.sh: Invoke "$srcdir/init.sh" and path_prepend_.
92964         Use Exit, not exit.
92965         Remove uses of $EXEEXT and "./" to run a program in the current dir.
92967         atexit-tests: convert to use init.sh
92968         * modules/atexit-tests (Files): Add tests/init.sh.
92969         * tests/test-atexit.sh: Invoke "$srcdir/init.sh" and path_prepend_.
92970         Use Exit, not exit.
92971         Remove uses of $EXEEXT and "./" to run a program in the current dir.
92973         init.sh: fix typo
92974         * tests/init.sh: Restore omitted ":" before stderr_fileno_ initialization.
92976         init.sh: make it easier for a test script to write to the tty, ...
92977         when using automake's parallel-tests mode.
92978         * tests/init.sh (stderr_fileno_): Define overridable variable.
92979         (warn_): New function, to use it.
92980         (fail_, skip_, framework_failure_): Use warn_.
92982 2010-04-04  Bruno Haible  <bruno@clisp.org>
92984         btowc: Avoid warning.
92985         * lib/btowc.c: Include <stdlib.h>.
92986         Reported by Hauke Fath <hauke@espresso.rhein-neckar.de>.
92988 2010-04-04  Hauke Fath  <hauke@espresso.rhein-neckar.de>  (tiny change)
92989             Bruno Haible  <bruno@clisp.org>
92991         wchar: Port to NetBSD 1.5.
92992         * lib/wchar.in.h (WEOF): Provide fallback also when wint_t exists.
92993         * lib/wctype.in.h (WEOF): Likewise.
92995 2010-04-04  Hauke Fath  <hauke@espresso.rhein-neckar.de>  (tiny change)
92996             Bruno Haible  <bruno@clisp.org>
92998         Port extended stdio to NetBSD 1.5.
92999         * lib/stdio-impl.h [NetBSD]: Include <sys/param.h>.
93000         (struct __sfileext, fp_ub): Define the "old way" for NetBSD 1.5Z and
93001         older.
93003 2010-04-04  Bruno Haible  <bruno@clisp.org>
93005         string: Remove unused substitution.
93006         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
93007         HAVE_DECL_STRERROR.
93008         * modules/string (Makefile.am): Don't substitute HAVE_DECL_STRERROR.
93010 2010-04-04  Bruno Haible  <bruno@clisp.org>
93012         strtod: Avoid a possible C++ test error.
93013         * m4/strtod.m4 (gl_FUNC_STRTOD): When setting HAVE_STRTOD to 0, don't
93014         set REPLACE_STRTOD.
93016 2010-04-04  Bruno Haible  <bruno@clisp.org>
93018         strerror: Update documentation.
93019         * doc/posix-functions/strerror.texi: Remove mention of old platforms.
93021 2010-04-04  Bruno Haible  <bruno@clisp.org>
93023         stdio: Fix some C++ test errors on Solaris 8 with GCC.
93024         * lib/stdio.in.h (vdprintf, vfprintf, vprintf, vsprintf): Use
93025         _GL_CXXALIAS_SYS_CAST.
93027 2010-04-04  Bruno Haible  <bruno@clisp.org>
93029         frexpl: Fix a C++ test error on Solaris 8 and Cygwin.
93030         * m4/frexpl.m4 (gl_FUNC_FREXPL, gl_FUNC_FREXPL_NO_LIBM): When the
93031         function is not declared, set HAVE_DECL_FREXPL to 0, instead of setting
93032         REPLACE_FREXPL to 1.
93033         * doc/posix-functions/frexpl.texi: Update documentation.
93035 2010-04-04  Bruno Haible  <bruno@clisp.org>
93037         math: Fix some C++ test errors on Solaris 8 and Cygwin.
93038         * lib/math.in.h (cosl, logl, sinl): Use simpler idiom.
93040 2010-04-04  Bruno Haible  <bruno@clisp.org>
93042         Implement nanosleep for native Windows.
93043         * lib/nanosleep.c (nanosleep): New implementation for native Windows.
93045 2010-04-04  Bruno Haible  <bruno@clisp.org>
93047         math: Fix some C++ test errors on Solaris 8.
93048         * lib/math.in.h (truncf, trunc): Use simpler idiom.
93050 2010-04-04  Bruno Haible  <bruno@clisp.org>
93052         math: Fix some C++ test errors on Cygwin.
93053         * lib/math.in.h (ceilf, ceill, floorf, floorl, roundf, round, roundl,
93054         truncl): Provide declaration if the system does not have it.
93055         * m4/ceilf.m4 (gl_FUNC_CEILF): If the function is not declared, set
93056         HAVE_DECL_CEILF to 0, not REPLACE_CEILF to 1.
93057         * m4/ceill.m4 (gl_FUNC_CEILL): If the function is not declared, set
93058         HAVE_DECL_CEILL to 0, not REPLACE_CEILL to 1.
93059         * m4/floorf.m4 (gl_FUNC_FLOORF): If the function is not declared, set
93060         HAVE_DECL_FLOORF to 0, not REPLACE_FLOORF to 1.
93061         * m4/floorl.m4 (gl_FUNC_FLOORL): If the function is not declared, set
93062         HAVE_DECL_FLOORL to 0, not REPLACE_FLOORL to 1.
93063         * m4/round.m4 (gl_FUNC_ROUND): If the function is not declared, set
93064         HAVE_DECL_ROUND to 0, not REPLACE_ROUND to 1.
93065         * m4/roundf.m4 (gl_FUNC_ROUNDF): If the function is not declared, set
93066         HAVE_DECL_ROUNDF to 0, not REPLACE_ROUNDF to 1.
93067         * m4/roundl.m4 (gl_FUNC_ROUNDL): If the function is not declared, set
93068         HAVE_DECL_ROUNDL to 0, not REPLACE_ROUNDL to 1.
93069         * m4/truncl.m4 (gl_FUNC_TRUNCL): If the function is not declared, set
93070         HAVE_DECL_TRUNCL to 0, not REPLACE_TRUNCL to 1.
93071         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_CEILF,
93072         HAVE_DECL_CEILL, HAVE_DECL_FLOORF, HAVE_DECL_FLOORL, HAVE_DECL_ROUND,
93073         HAVE_DECL_ROUNDF, HAVE_DECL_ROUNDL, HAVE_DECL_TRUNCL.
93074         * modules/math (Makefile.am): Substitute HAVE_DECL_CEILF,
93075         HAVE_DECL_CEILL, HAVE_DECL_FLOORF, HAVE_DECL_FLOORL, HAVE_DECL_ROUND,
93076         HAVE_DECL_ROUNDF, HAVE_DECL_ROUNDL, HAVE_DECL_TRUNCL.
93078 2010-04-04  Bruno Haible  <bruno@clisp.org>
93080         * m4/ceilf.m4 (gl_FUNC_CEILF): Remove redundant AC_SUBST invocation.
93081         * m4/ceill.m4 (gl_FUNC_CEILL): Likewise.
93082         * m4/floorf.m4 (gl_FUNC_FLOORF): Likewise.
93083         * m4/floorl.m4 (gl_FUNC_FLOORL): Likewise.
93084         * m4/isfinite.m4 (gl_ISFINITE): Likewise.
93085         * m4/isinf.m4 (gl_ISINF): Likewise.
93086         * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
93088 2010-04-04  Bruno Haible  <bruno@clisp.org>
93090         * m4/trunc.m4 (gl_FUNC_TRUNC): Remove redundant AC_SUBST invocation.
93091         * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
93093 2010-04-04  Bruno Haible  <bruno@clisp.org>
93095         * m4/tmpfile.m4 (gl_FUNC_TMPFILE): Renamed from gl_TMPFILE.
93096         * modules/tmpfile (configure.ac): Update.
93098         tmpfile: Fix C++ test error on mingw.
93099         * lib/stdio.in.h (tmpfile): New declaration.
93100         * m4/tmpfile.m4 (gl_TMPFILE): Require gl_STDIO_H_DEFAULTS. Set
93101         REPLACE_TMPFILE instead of defining tmpfile as a macro in config.h.
93102         * modules/tmpfile (Depends-on): Add stdio.
93103         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
93104         * m4/stdio_h.m4 (gl_STDIO_H): Also check whether tmpfile is declared.
93105         (gl_STDIO_H_DEFAULTS): Initialize GNULIB_TMPFILE and REPLACE_TMPFILE.
93106         * modules/stdio (Makefile.am): Substitute GNULIB_TMPFILE and
93107         REPLACE_TMPFILE.
93108         * tests/test-stdio-c++.cc (tmpfile): Verify signature.
93110 2010-04-04  Bruno Haible  <bruno@clisp.org>
93112         ioctl: Fix C++ test error on mingw.
93113         * lib/ioctl.c (ioctl): Renamed from rpl_ioctl.
93114         * lib/sys_ioctl.in.h (ioctl): When SYS_IOCTL_H_HAVE_WINSOCK2_H is 1,
93115         use _GL_FUNCDECL_SYS, not _GL_FUNCDECL_RPL.
93117 2010-04-03  Bruno Haible  <bruno@clisp.org>
93119         wcwidth: Fix C++ test error on mingw.
93120         * lib/wcwidth.c (wcwidth): Renamed from rpl_wcwidth.
93121         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): If the wcwidth function does not
93122         exist, don't set REPLACE_WCWIDTH. Instead, rely on HAVE_DECL_WCWIDTH.
93124 2010-04-03  Bruno Haible  <bruno@clisp.org>
93126         nanosleep: Fix C++ test error on mingw.
93127         * lib/nanosleep.c (nanosleep): Renamed from rpl_nanosleep.
93128         * lib/time.in.h (nanosleep): Use modern idiom.
93129         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): When the system does not have a
93130         nanosleep function, set HAVE_NANOSLEEP to 0, instead of setting
93131         REPLACE_NANOSLEEP to 1.
93132         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize HAVE_NANOSLEEP.
93133         * modules/time (Makefile.am): Substitute HAVE_NANOSLEEP.
93135 2010-04-03  Bruno Haible  <bruno@clisp.org>
93137         strptime: Fix C++ test error on mingw.
93138         * lib/time.in.h (strptime): Use HAVE_STRPTIME, not REPLACE_STRPTIME.
93139         * m4/strptime.m4 (gl_FUNC_STRPTIME): Set HAVE_STRPTIME, not
93140         REPLACE_STRPTIME. Invoke gl_PREREQ_STRPTIME.
93141         (gl_PREREQ_STRPTIME): New macro, extracted from gl_FUNC_STRPTIME.
93142         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize HAVE_STRPTIME,
93143         not REPLACE_STRPTIME.
93144         * modules/time (Makefile.am): Substitute HAVE_STRPTIME, not
93145         REPLACE_STRPTIME.
93147 2010-04-03  Bruno Haible  <bruno@clisp.org>
93149         timegm: Fix C++ test error on mingw.
93150         * lib/time.in.h (timegm): Use modern idiom.
93151         * m4/timegm.m4 (gl_FUNC_TIMEGM): When timegm does not exist, set
93152         HAVE_TIMEGM to 0, not REPLACE_TIMEGM to 1.
93153         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize HAVE_TIMEGM.
93154         * modules/time (Makefile.am): Substitute HAVE_TIMEGM.
93156 2010-04-03  Bruno Haible  <bruno@clisp.org>
93158         timegm: Assume declaration if function exists.
93159         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume timegm is declared if and only
93160         if it exists. Don't clobber ac_cv_func_timegm.
93162 2010-04-03  Bruno Haible  <bruno@clisp.org>
93164         time_r: Fix C++ test error on mingw.
93165         * lib/time.in.h (localtime_r, gmtime_r): Use modern idiom.
93166         * m4/time_r.m4 (gl_TIME_R): When localtime_r does not exist, set
93167         HAVE_LOCALTIME_R to 0, not REPLACE_LOCALTIME_R to 1.
93168         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize HAVE_LOCALTIME_R.
93169         * modules/time (Makefile.am): Substitute HAVE_LOCALTIME_R.
93171 2010-04-03  Bruno Haible  <bruno@clisp.org>
93173         time_r: Minor updates.
93174         * modules/time_r (Description): Mention the provided functions.
93175         * lib/time_r.c: Don't include <string.h>.
93176         * doc/posix-functions/gmtime_r.texi: Mention the 'time_r' module.
93177         * doc/posix-functions/localtime_r.texi: Likewise.
93179 2010-04-03  Bruno Haible  <bruno@clisp.org>
93181         time: Fix regression introduced on 2010-03-08.
93182         * m4/time_h.m4 (gl_TIME_MODULE_INDICATOR): Require
93183         gl_HEADER_TIME_H_DEFAULTS, not gl_HEADER_STRING_H_DEFAULTS.
93185 2010-04-03  Jim Meyering  <meyering@redhat.com>
93187         maint.mk: don't silently disable project-specific syntax-check rules
93188         * top/maint.mk (_prohibit_regexp): Define, to help people realize
93189         that they need to convert their project-specific syntax-check rules
93190         to use the new _sc_search_regexp.
93192 2010-04-03  Bruno Haible  <bruno@clisp.org>
93194         fchdir: Fix regression introduced on 2010-03-08.
93195         * lib/unistd.in.h (fchdir): Fix declaration.
93196         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Set HAVE_FCHDIR, not REPLACE_FCHDIR.
93197         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize HAVE_FCHDIR, not
93198         REPLACE_FCHDIR.
93199         * modules/unistd (Makefile.am): Substitute HAVE_FCHDIR, not
93200         REPLACE_FCHDIR.
93202 2010-04-03  Bruno Haible  <bruno@clisp.org>
93204         getpagesize: Fix C++ test error on mingw.
93205         * lib/unistd.in.h (getpagesize): Don't use _GL_CXXALIASWARN if the
93206         system does not declare the function.
93207         * m4/getpagesize.m4 (gl_FUNC_GETPAGESIZE): Also check whether it's
93208         declared.
93209         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
93210         HAVE_DECL_GETPAGESIZE.
93211         * modules/unistd (Makefile.am): Substitute HAVE_DECL_GETPAGESIZE.
93213 2010-04-03  Bruno Haible  <bruno@clisp.org>
93215         stdio: Make C++ tests work on mingw.
93216         * lib/stdio.in.h (getline): Don't use _GL_CXXALIASWARN if the system
93217         does not declare the function.
93219 2010-04-03  Bruno Haible  <bruno@clisp.org>
93221         ftello: Fix C++ test error on mingw.
93222         * lib/stdio.in.h (ftello): Use modern idiom.
93223         * lib/ftello.c (ftello): Renamed from rpl_ftello.
93224         * m4/ftello.m4 (gl_FUNC_FTELLO): Distinguish the case that the function
93225         is missing and that it needs to be replaced.
93226         (gl_REPLACE_FTELLO): Don't set REPLACE_FTELLO here.
93227         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize HAVE_FTELLO.
93228         * modules/stdio (Makefile.am): Substitute HAVE_FTELLO.
93230 2010-04-03  Bruno Haible  <bruno@clisp.org>
93232         fseeko: Fix C++ test error on mingw.
93233         * lib/stdio.in.h (fseeko): Use modern idiom.
93234         * lib/fseeko.c (fseeko): Renamed from rpl_fseeko.
93235         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Distinguish the case that the function
93236         is missing and that it needs to be replaced.
93237         (gl_REPLACE_FSEEKO): Don't set REPLACE_FSEEKO here.
93238         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize HAVE_FSEEKO.
93239         * modules/stdio (Makefile.am): Substitute HAVE_FSEEKO.
93241 2010-04-03  Bruno Haible  <bruno@clisp.org>
93243         mkstemp: Fix C++ test error on mingw.
93244         * lib/stdlib.in.h (mkstemp): Use modern idiom.
93245         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Distinguish the case that the
93246         function is missing and that it needs to be replaced.
93247         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_MKSTEMP.
93248         * modules/stdlib (Makefile.am): Substitute HAVE_MKSTEMP.
93250 2010-04-03  Bruno Haible  <bruno@clisp.org>
93252         stpncpy: Fix C++ test error on mingw.
93253         * lib/string.in.h (stpncpy): Use modern idiom.
93254         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Distinguish the case that the
93255         function is missing and that it needs to be replaced.
93256         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
93257         REPLACE_STPNCPY.
93258         * modules/string (Makefile.am): Substitute REPLACE_STPNCPY.
93260 2010-04-03  Bruno Haible  <bruno@clisp.org>
93262         sys_stat: Fix C++ test error on mingw.
93263         * build-aux/c++defs.h (_GL_CXXALIAS_RPL_CAST_1): New macro.
93264         * lib/sys_stat.in.h (lchmod): Use it instead of _GL_CXXALIAS_RPL_1.
93266 2010-04-03  Bruno Haible  <bruno@clisp.org>
93268         pty: Update doc.
93269         * doc/glibc-headers/pty.texi: Mention changes done since 2010-03-18.
93271 2010-04-03  Bruno Haible  <bruno@clisp.org>
93273         unistd: Fix C++ test error on mingw.
93274         * lib/unistd.in.h (getcwd): Use _GL_CXXALIAS_SYS_CAST.
93276 2010-04-03  Bruno Haible  <bruno@clisp.org>
93278         Update doc regarding mingw.
93279         * doc/glibc-functions/openpty.texi: Update regarding mingw.
93280         * doc/glibc-functions/login_tty.texi: Likewise.
93281         * doc/glibc-functions/forkpty.texi: Likewise.
93283 2010-04-03  Bruno Haible  <bruno@clisp.org>
93285         stdlib: Avoid compilation failure of c-strtold on mingw.
93286         * lib/stdlib.in.h: Don't include <unistd.h> on native Windows systems.
93288 2010-04-03  Bruno Haible  <bruno@clisp.org>
93290         locale: Make C++ tests work on Cygwin and mingw.
93291         * lib/locale.in.h (duplocale): Don't use _GL_CXXALIASWARN if gnulib
93292         cannot provide the function.
93293         Reported by Simon Josefsson.
93295 2010-04-03  Bruno Haible  <bruno@clisp.org>
93297         localename: Port to MacOS X 10.6.
93298         * lib/localename.c (gl_locale_name_thread_unsafe): On MacOS X, try the
93299         memory layout of the locales in MacOS X 10.6 as well.
93300         Reported by Panu Kekäläinen <panu@kekalainen.eu>.
93302 2010-04-02  Bruno Haible  <bruno@clisp.org>
93304         gnulib-tool: Ensure that long-running tests are executed last.
93305         * gnulib-tool (func_emit_tests_Makefile_am): Emit the code for long-
93306         running tests after the one for the other tests.
93308 2010-04-02  Bruno Haible  <bruno@clisp.org>
93310         gnulib-tool: Ensure the tests in the main directory are executed first.
93311         * gnulib-tool (func_emit_tests_Makefile_am): Initialize SUBDIRS to
93312         start with the current directory.
93314 2010-04-02  Bruno Haible  <bruno@clisp.org>
93316         Tests for module 'havelib', moved here from GNU gettext.
93317         * modules/havelib-tests: New file, from gettext/autoconf-lib-link with
93318         modifications.
93319         * tests/havelib/README: New file, from gettext/autoconf-lib-link.
93320         * tests/havelib/Makefile.am: New file, from gettext/autoconf-lib-link
93321         with modifications.
93322         * tests/havelib/rpath-1: New file, from gettext/autoconf-lib-link with
93323         modifications.
93324         * tests/havelib/rpath-1a: New file, from gettext/autoconf-lib-link.
93325         * tests/havelib/rpath-1b: New file, from gettext/autoconf-lib-link.
93326         * tests/havelib/rpath-2_a: New file, from gettext/autoconf-lib-link
93327         with modifications.
93328         * tests/havelib/rpath-2_b: New file, from gettext/autoconf-lib-link
93329         with modifications.
93330         * tests/havelib/rpath-2aaa: New file, from gettext/autoconf-lib-link.
93331         * tests/havelib/rpath-2aab: New file, from gettext/autoconf-lib-link.
93332         * tests/havelib/rpath-2aac: New file, from gettext/autoconf-lib-link.
93333         * tests/havelib/rpath-2aad: New file, from gettext/autoconf-lib-link.
93334         * tests/havelib/rpath-2aba: New file, from gettext/autoconf-lib-link.
93335         * tests/havelib/rpath-2abb: New file, from gettext/autoconf-lib-link.
93336         * tests/havelib/rpath-2abc: New file, from gettext/autoconf-lib-link.
93337         * tests/havelib/rpath-2abd: New file, from gettext/autoconf-lib-link.
93338         * tests/havelib/rpath-2baa: New file, from gettext/autoconf-lib-link.
93339         * tests/havelib/rpath-2bab: New file, from gettext/autoconf-lib-link.
93340         * tests/havelib/rpath-2bac: New file, from gettext/autoconf-lib-link.
93341         * tests/havelib/rpath-2bad: New file, from gettext/autoconf-lib-link.
93342         * tests/havelib/rpath-2bba: New file, from gettext/autoconf-lib-link.
93343         * tests/havelib/rpath-2bbb: New file, from gettext/autoconf-lib-link.
93344         * tests/havelib/rpath-2bbc: New file, from gettext/autoconf-lib-link.
93345         * tests/havelib/rpath-2bbd: New file, from gettext/autoconf-lib-link.
93346         * tests/havelib/rpath-3_a: New file, from gettext/autoconf-lib-link
93347         with modifications.
93348         * tests/havelib/rpath-3_b: New file, from gettext/autoconf-lib-link
93349         with modifications.
93350         * tests/havelib/rpath-3aaa: New file, from gettext/autoconf-lib-link.
93351         * tests/havelib/rpath-3aab: New file, from gettext/autoconf-lib-link.
93352         * tests/havelib/rpath-3aac: New file, from gettext/autoconf-lib-link.
93353         * tests/havelib/rpath-3aad: New file, from gettext/autoconf-lib-link.
93354         * tests/havelib/rpath-3aae: New file, from gettext/autoconf-lib-link.
93355         * tests/havelib/rpath-3aaf: New file, from gettext/autoconf-lib-link.
93356         * tests/havelib/rpath-3aag: New file, from gettext/autoconf-lib-link.
93357         * tests/havelib/rpath-3aah: New file, from gettext/autoconf-lib-link.
93358         * tests/havelib/rpath-3aba: New file, from gettext/autoconf-lib-link.
93359         * tests/havelib/rpath-3abb: New file, from gettext/autoconf-lib-link.
93360         * tests/havelib/rpath-3abc: New file, from gettext/autoconf-lib-link.
93361         * tests/havelib/rpath-3abd: New file, from gettext/autoconf-lib-link.
93362         * tests/havelib/rpath-3abe: New file, from gettext/autoconf-lib-link.
93363         * tests/havelib/rpath-3abf: New file, from gettext/autoconf-lib-link.
93364         * tests/havelib/rpath-3abg: New file, from gettext/autoconf-lib-link.
93365         * tests/havelib/rpath-3abh: New file, from gettext/autoconf-lib-link.
93366         * tests/havelib/rpath-3baa: New file, from gettext/autoconf-lib-link.
93367         * tests/havelib/rpath-3bab: New file, from gettext/autoconf-lib-link.
93368         * tests/havelib/rpath-3bac: New file, from gettext/autoconf-lib-link.
93369         * tests/havelib/rpath-3bad: New file, from gettext/autoconf-lib-link.
93370         * tests/havelib/rpath-3bae: New file, from gettext/autoconf-lib-link.
93371         * tests/havelib/rpath-3baf: New file, from gettext/autoconf-lib-link.
93372         * tests/havelib/rpath-3bag: New file, from gettext/autoconf-lib-link.
93373         * tests/havelib/rpath-3bah: New file, from gettext/autoconf-lib-link.
93374         * tests/havelib/rpath-3bba: New file, from gettext/autoconf-lib-link.
93375         * tests/havelib/rpath-3bbb: New file, from gettext/autoconf-lib-link.
93376         * tests/havelib/rpath-3bbc: New file, from gettext/autoconf-lib-link.
93377         * tests/havelib/rpath-3bbd: New file, from gettext/autoconf-lib-link.
93378         * tests/havelib/rpath-3bbe: New file, from gettext/autoconf-lib-link.
93379         * tests/havelib/rpath-3bbf: New file, from gettext/autoconf-lib-link.
93380         * tests/havelib/rpath-3bbg: New file, from gettext/autoconf-lib-link.
93381         * tests/havelib/rpath-3bbh: New file, from gettext/autoconf-lib-link.
93382         * tests/havelib/rpathx/rpathx.c: New file, from
93383         gettext/autoconf-lib-link.
93384         * tests/havelib/rpathx/Makefile.am: New file, from
93385         gettext/autoconf-lib-link.
93386         * tests/havelib/rpathx/configure.ac: New file, from
93387         gettext/autoconf-lib-link with modifications.
93388         * tests/havelib/rpathy/rpathy.c: New file, from
93389         gettext/autoconf-lib-link.
93390         * tests/havelib/rpathy/Makefile.am: New file, from
93391         gettext/autoconf-lib-link.
93392         * tests/havelib/rpathy/configure.ac: New file, from
93393         gettext/autoconf-lib-link with modifications.
93394         * tests/havelib/rpathz/rpathz.c: New file, from
93395         gettext/autoconf-lib-link.
93396         * tests/havelib/rpathz/Makefile.am: New file, from
93397         gettext/autoconf-lib-link.
93398         * tests/havelib/rpathz/configure.ac: New file, from
93399         gettext/autoconf-lib-link with modifications.
93400         * tests/havelib/rpathlx/usex.c: New file, from
93401         gettext/autoconf-lib-link.
93402         * tests/havelib/rpathlx/Makefile.am: New file, from
93403         gettext/autoconf-lib-link.
93404         * tests/havelib/rpathlx/configure.ac: New file, from
93405         gettext/autoconf-lib-link with modifications.
93406         * tests/havelib/rpathly/usey.c: New file, from
93407         gettext/autoconf-lib-link.
93408         * tests/havelib/rpathly/Makefile.am: New file, from
93409         gettext/autoconf-lib-link.
93410         * tests/havelib/rpathly/configure.ac: New file, from
93411         gettext/autoconf-lib-link with modifications.
93412         * tests/havelib/rpathlz/usez.c: New file, from
93413         gettext/autoconf-lib-link.
93414         * tests/havelib/rpathlz/Makefile.am: New file, from
93415         gettext/autoconf-lib-link.
93416         * tests/havelib/rpathlz/configure.ac: New file, from
93417         gettext/autoconf-lib-link with modifications.
93418         * tests/havelib/rpathlyx/usey.c: New file, from
93419         gettext/autoconf-lib-link.
93420         * tests/havelib/rpathlyx/Makefile.am: New file, from
93421         gettext/autoconf-lib-link.
93422         * tests/havelib/rpathlyx/configure.ac: New file, from
93423         gettext/autoconf-lib-link with modifications.
93424         * tests/havelib/rpathlzyx/usez.c: New file, from
93425         gettext/autoconf-lib-link.
93426         * tests/havelib/rpathlzyx/Makefile.am: New file, from
93427         gettext/autoconf-lib-link.
93428         * tests/havelib/rpathlzyx/configure.ac: New file, from
93429         gettext/autoconf-lib-link with modifications.
93430         * tests/havelib/rpathcfg.sh: New file, from gettext/autoconf-lib-link
93431         with modifications.
93433 2010-04-02  Bruno Haible  <bruno@clisp.org>
93435         gnulib-tool: Create distributed built sources also for the tests.
93436         * gnulib-tool (func_create_testdir): Also generate distributed built
93437         sources in the tests directory.
93439 2010-04-02  Bruno Haible  <bruno@clisp.org>
93441         gnulib-tool: Obey user's environment variables.
93442         * gnulib-tool (func_create_testdir): When creating built sources,
93443         respect the environment variables for autoconf, automake, etc. given by
93444         the user.
93446 2010-04-02  Bruno Haible  <bruno@clisp.org>
93448         gnulib-tool: Provide the value of --m4-base to modules.
93449         * gnulib-tool (func_import, func_create_testdir): Emit a definition
93450         of gl_m4_base.
93452 2010-04-02  Eric Blake  <eblake@redhat.com>
93454         maint.mk: fix some fallout
93455         * NEWS: Document the incompatible change, and its effect on cfg.mk.
93456         * top/maint.mk (sc_prohibit_test_minus_ao): Update.
93458 2010-03-28  Jose E. Marchesi  <jemarch@gnu.org>
93460         maint.mk: _sc_search_regexp: generalize and rename from _prohibit_regexp
93461         * top/maint.mk (_sc_search_regexp): Rename from _prohibit_regexp.
93462         (sc_cast_of_argument_to_free): Adapt to use _sc_search_regexp.
93463         (sc_cast_of_x_alloc_return_value): Likewise.
93464         (sc_cast_of_alloca_return_value): Likewise.
93465         (sc_space_tab): Likewise.
93466         (sc_prohibit_atoi_atof): Likewise.
93467         (sc_prohibit_magic_number_exit): Likewise.
93468         (sc_error_exit_success): Likewise.
93469         (sc_file_system): Likewise.
93470         (sc_prohibit_have_config_h): Likewise.
93471         (sc_require_config_h): Likewise.
93472         (sc_prohibit_HAVE_MBRTOWC): Likewise.
93473         (sc_obsolete_symbols): Likewise.
93474         (sc_changelog): Likewise.
93475         (sc_program_name): Likewise.
93476         (sc_the_the): Likewise.
93477         (sc_trailing_blank): Likewise.
93478         (sc_two_space_separator_in_usage): Likewise.
93479         (sc_useless_cpp_parens): Likewise.
93480         (sc_GPL_version): Likewise.
93481         (sc_GFDL_version): Likewise.
93482         (sc_texinfo_acronym): Likewise.
93483         (sc_prohibit_cvs_keyword): Likewise.
93484         (sc_prohibit_stat_st_blocks): Likewise.
93485         (sc_prohibit_S_IS_definition): Likewise.
93486         (sc_redundant_const): Likewise.
93487         (sc_makefile_TAB_only_indentation): Likewise.
93488         (sc_m4_quote_check): Likewise.
93489         (sc_makefile_path_separator_check): Likewise.
93490         (sc_copyright_check): Likewise.
93491         (sc_Wundef_boolean): Likewise.
93492         (sc_vulnerable_makefile_CVE-2009-4029): Likewise.
93494         maint.mk: match 0 or more whitespace-before-function-call '('
93495         * top/maint.mk (sc_error_exit_success): Relax regexp to match uses
93496         that have zero or two-and-more spaces between the function name
93497         and the open parenthesis.
93498         (sc_error_message_warn_fatal): Likewise.
93499         (sc_error_message_uppercase): Likewise.
93500         (sc_error_message_period): Likewise.
93502 2010-03-31  Eric Blake  <eblake@redhat.com>
93504         maint.mk: check for [ as well as test
93505         * top/maint.mk (sc_prohibit_test_minus_ao): Extend test.
93506         Based on a libvirt report by Matthias Bolte.
93508         gnumakefile: don't squelch _version output
93509         * top/GNUmakefile (_version): Create one-shot dependency rather
93510         than using $(shell) when version must be regenerated.
93511         (_autoreconf): Run verbosely, by default.
93513         sys_time: avoid compiler warnings
93514         * lib/sys_time.in.h (includes): Ensure gcc pragma is
93515         unconditional, fixing regression from 2010-03-29.
93516         Reported by Simon Josefsson.
93518 2010-03-28  Jose E. Marchesi  <jemarch@gnu.org>
93520         maint.mk: s/_header_without_use/_sc_header_without_use/
93521         * top/maint.mk (_sc_header_without_use): Rename from _header_without_use.
93522         (sc_prohibit_assert_without_use): Use the new name.
93523         (sc_prohibit_close_stream_without_use): Likewise.
93524         (sc_prohibit_getopt_without_use): Likewise.
93525         (sc_prohibit_quotearg_without_use): Likewise.
93526         (sc_prohibit_quote_without_use): Likewise.
93527         (sc_prohibit_long_options_without_use): Likewise.
93528         (sc_prohibit_inttostr_without_use): Likewise.
93529         (sc_prohibit_ignore_value_without_use): Likewise.
93530         (sc_prohibit_error_without_use): Likewise.
93531         (sc_prohibit_xalloc_without_use): Likewise.
93532         (sc_prohibit_hash_without_use): Likewise.
93533         (sc_prohibit_hash_pjw_without_use): Likewise.
93534         (sc_prohibit_safe_read_without_use): Likewise.
93535         (sc_prohibit_argmatch_without_use): Likewise.
93536         (sc_prohibit_canonicalize_without_use): Likewise.
93537         (sc_prohibit_root_dev_ino_without_use): Likewise.
93538         (sc_prohibit_openat_without_use): Likewise.
93539         (sc_prohibit_c_ctype_without_use): Likewise.
93540         (sc_prohibit_signal_without_use): Likewise.
93541         (sc_prohibit_intprops_without_use): Likewise.
93543 2010-03-30  Eric Blake  <eblake@redhat.com>
93545         maint: improve module indicators
93546         * m4/gnulib-common.m4 (gl_MODULE_INDICATOR_SET_VARIABLE)
93547         (gl_MODULE_INDICATOR, gl_MODULE_INDICATOR_FOR_TESTS): Fit in 80
93548         columns, and avoid extra macro expansion.
93550         fdopendir: work around FreeBSD bug
93551         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): New witness.
93552         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Set it.
93553         * modules/dirent (Makefile.am): Substitute it.
93554         * lib/dirent.in.h (fdopendir): Supply missing FreeBSD
93555         declaration.
93556         * doc/posix-functions/fdopendir.texi (fdopendir): Document the
93557         fix.
93558         Reported by Christian Weisgerber <naddy@mips.inka.de>.
93560 2010-03-29  Bruno Haible  <bruno@clisp.org>
93562         Emit #pragma system_header after the inclusion guard, not before.
93563         * lib/arpa_inet.in.h: Emit #pragma system_header after the inclusion
93564         guard that spans the entire file, not before. This enables an
93565         optimization in GCC's preprocessor.
93566         * lib/ctype.in.h: Likewise.
93567         * lib/dirent.in.h: Likewise.
93568         * lib/errno.in.h: Likewise.
93569         * lib/float.in.h: Likewise.
93570         * lib/getopt.in.h: Likewise.
93571         * lib/iconv.in.h: Likewise.
93572         * lib/langinfo.in.h: Likewise.
93573         * lib/locale.in.h: Likewise.
93574         * lib/math.in.h: Likewise.
93575         * lib/netdb.in.h: Likewise.
93576         * lib/netinet_in.in.h: Likewise.
93577         * lib/pty.in.h: Likewise.
93578         * lib/sched.in.h: Likewise.
93579         * lib/se-selinux.in.h: Likewise.
93580         * lib/search.in.h: Likewise.
93581         * lib/spawn.in.h: Likewise.
93582         * lib/stdarg.in.h: Likewise.
93583         * lib/stdint.in.h: Likewise.
93584         * lib/string.in.h: Likewise.
93585         * lib/strings.in.h: Likewise.
93586         * lib/sys_file.in.h: Likewise.
93587         * lib/sys_ioctl.in.h: Likewise.
93588         * lib/sys_time.in.h: Likewise.
93589         * lib/sys_times.in.h: Likewise.
93590         * lib/sys_utsname.in.h: Likewise.
93591         * lib/sys_wait.in.h: Likewise.
93592         * lib/sysexits.in.h: Likewise.
93593         * lib/wctype.in.h: Likewise.
93595 2010-03-28  James Youngman  <jay@gnu.org>
93597         save-cwd: don't leak a file descriptor when the caller execs.
93598         * lib/save-cwd.c (save_cwd): set the close-on-exec flag for the
93599         saved file descriptor.
93600         * modules/save-cwd (Depends-on): Depend on cloexec.
93602 2010-03-29  Bruno Haible  <bruno@clisp.org>
93604         Remove vestiges of fts-lgpl module.
93605         * lib/fts_.h: Assume GNULIB_FTS is 1.
93606         * lib/fts.c: Likewise.
93607         * modules/fts (configure.ac): Remove gl_MODULE_INDICATOR invocation.
93609 2010-03-28  Bruno Haible  <bruno@clisp.org>
93611         Fix definition of tests witness macro.
93612         * gnulib-tool (func_import): Fix definition of witness macro.
93614 2010-03-28  Bruno Haible  <bruno@clisp.org>
93616         Fix ioctl's protoype on glibc systems.
93617         * lib/sys_ioctl.in.h (ioctl): If REPLACE_IOCTL is 1, use a wrapper. Use
93618         _GL_CXXALIAS_SYS, not _GL_CXXALIAS_SYS_CAST.
93619         * lib/ioctl.c (rpl_ioctl) [HAVE_IOCTL]: New wrapper.
93620         * modules/ioctl (configure.ac): Test whether ioctl has the POSIX
93621         signature. If not, arrange to replace the ioctl function.
93622         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H_DEFAULTS): Initialize
93623         REPLACE_IOCTL.
93624         * modules/sys_ioctl (Makefile.am): Substitute REPLACE_IOCTL.
93625         * doc/posix-functions/ioctl.texi: Mention the glibc problem.
93626         Reported by Ludovic Courtès <ludo@gnu.org>.
93628 2010-03-28  Javier Villavicencio  <the_paya@gentoo.org>
93630         exclude: fix the case of globs vs. EXCLUDE_INCLUDE
93631         * lib/exclude.c (excluded_file_pattern_p): Fix logic error that
93632         made it so grep -r --include=GLOB* ... did not work.
93634 2010-03-26  Jim Meyering  <meyering@redhat.com>
93635             Eric Blake  <eblake@redhat.com>
93637         maint.mk: prohibit use of test's -o and -a operators
93638         * top/maint.mk (sc_prohibit_test_minus_ao): New rule.
93640 2010-03-28  Bruno Haible  <bruno@clisp.org>
93642         Remove unused GNULIB_XYZ macro definitions.
93643         * modules/crypto/gc-camellia (configure.ac): Remove gl_MODULE_INDICATOR
93644         invocation.
93646 2010-03-28  Bruno Haible  <bruno@clisp.org>
93648         Mark privileged tests modules.
93649         * modules/idpriv-drop-tests (Status): New section.
93650         * modules/idpriv-droptemp-tests (Status): New section.
93652 2010-03-28  Bruno Haible  <bruno@clisp.org>
93654         Split C++ tests into separate tests modules.
93655         * modules/dirent-c++-tests: New file, extracted from
93656         modules/dirent-tests.
93657         * modules/dirent-tests: Depend on it.
93658         * modules/fcntl-h-c++-tests: New file, extracted from
93659         modules/fcntl-h-tests.
93660         * modules/fcntl-h-tests: Depend on it.
93661         * modules/glob-c++-tests: New file, extracted from modules/glob-tests.
93662         * modules/glob-tests: Depend on it.
93663         * modules/iconv-h-c++-tests: New file, extracted from
93664         modules/iconv-h-tests.
93665         * modules/iconv-h-tests: Depend on it.
93666         * modules/langinfo-c++-tests: New file, extracted from
93667         modules/langinfo-tests.
93668         * modules/langinfo-tests: Depend on it.
93669         * modules/locale-c++-tests: New file, extracted from
93670         modules/locale-tests.
93671         * modules/locale-tests: Depend on it.
93672         * modules/math-c++-tests: New file, extracted from modules/math-tests.
93673         * modules/math-tests: Depend on it.
93674         * modules/pty-c++-tests: New file, extracted from modules/pty-tests.
93675         * modules/pty-tests: Depend on it.
93676         * modules/search-c++-tests: New file, extracted from
93677         modules/search-tests.
93678         * modules/search-tests: Depend on it.
93679         * modules/signal-c++-tests: New file, extracted from
93680         modules/signal-tests.
93681         * modules/signal-tests: Depend on it.
93682         * modules/spawn-c++-tests: New file, extracted from
93683         modules/spawn-tests.
93684         * modules/spawn-tests: Depend on it.
93685         * modules/stdio-c++-tests: New file, extracted from
93686         modules/stdio-tests.
93687         * modules/stdio-tests: Depend on it.
93688         * modules/stdlib-c++-tests: New file, extracted from
93689         modules/stdlib-tests.
93690         * modules/stdlib-tests: Depend on it.
93691         * modules/string-c++-tests: New file, extracted from
93692         modules/string-tests.
93693         * modules/string-tests: Depend on it.
93694         * modules/sys_ioctl-c++-tests: New file, extracted from
93695         modules/sys_ioctl-tests.
93696         * modules/sys_ioctl-tests: Depend on it.
93697         * modules/sys_select-c++-tests: New file, extracted from
93698         modules/sys_select-tests.
93699         * modules/sys_select-tests: Depend on it.
93700         * modules/sys_socket-c++-tests: New file, extracted from
93701         modules/sys_socket-tests.
93702         * modules/sys_socket-tests: Depend on it.
93703         * modules/sys_stat-c++-tests: New file, extracted from
93704         modules/sys_stat-tests.
93705         * modules/sys_stat-tests: Depend on it.
93706         * modules/sys_time-c++-tests: New file, extracted from
93707         modules/sys_time-tests.
93708         * modules/sys_time-tests: Depend on it.
93709         * modules/time-c++-tests: New file, extracted from modules/time-tests.
93710         * modules/time-tests: Depend on it.
93711         * modules/unistd-c++-tests: New file, extracted from
93712         modules/unistd-tests.
93713         * modules/unistd-tests: Depend on it.
93714         * modules/wchar-c++-tests: New file, extracted from
93715         modules/wchar-tests.
93716         * modules/wchar-tests: Depend on it.
93717         * modules/wctype-c++-tests: New file, extracted from
93718         modules/wctype-tests.
93719         * modules/wctype-tests: Depend on it.
93720         Reported by Simon Josefsson.
93722 2010-03-28  Bruno Haible  <bruno@clisp.org>
93724         gnulib-tool: Allow 'foo-tests' module even if there is no module 'foo'.
93725         * gnulib-tool (func_exists_module): New function, extracted from
93726         func_verify_module.
93727         (func_verify_module): Use it.
93728         (func_get_dependencies): Synthetize a dependency from 'foo-tests' to
93729         'foo' only if 'foo' exists.
93730         * doc/gnulib.texi (Extra tests modules): Explain how to split a tests
93731         module.
93733 2010-03-28  Bruno Haible  <bruno@clisp.org>
93735         gnulib-tool: Add support for special categories of tests.
93736         * gnulib-tool: New options --with-c++-tests, --with-longrunning-tests,
93737         --with-privileged-tests, --with-unportable-tests, --with-all-tests.
93738         (func_usage): Document them.
93739         (inc_cxx_tests, inc_longrunning_tests, inc_privileged_tests,
93740         inc_unportable_tests, inc_all_tests): New variables.
93741         (func_acceptable): Consider these variables.
93742         (func_modules_transitive_closure): Make it work when the 'Status' field
93743         consists of multiple words.
93744         (func_import): Store and restore the values of inc_cxx_tests,
93745         inc_longrunning_tests, inc_privileged_tests, inc_unportable_tests,
93746         inc_all_tests in gnulib-comp.m4.
93747         (func_create_testdir): Set inc_all_tests to true.
93748         * doc/gnulib.texi (Extra tests modules): New section.
93749         Suggested by Jim Meyering.
93751 2010-03-28  Bruno Haible  <bruno@clisp.org>
93753         ansi-c++-opt: Allow turning off the C++ build by default.
93754         * m4/ansi-c++.m4 (gl_CXX_CHOICE): Let CXX_CHOICE default to 'no' if
93755         gl_CXX_CHOICE_DEFAULT_NO is defined.
93756         Requested by Eric Blake.
93758 2010-03-28  Bruno Haible  <bruno@clisp.org>
93760         unistd: Avoid #define replacements in C++ mode.
93761         * lib/unistd.in.h (socket, connect, accept, bind, getpeername,
93762         getsockname, getsockopt, listen, recv, send, recvfrom, sendto,
93763         setsockopt, shutdown, select): In C++, attach a warning to the function
93764         if possible, rather than #defining the symbol to a dysfunctional alias.
93765         Reported by John W. Eaton <jwe@gnu.org>.
93767 2010-03-28  Bruno Haible  <bruno@clisp.org>
93769         Fix link errors on mingw.
93770         * lib/sys_ioctl.in.h (ioctl): Fix declaration idiom.
93771         * modules/sys_ioctl-tests (Makefile.am): Link test-sys_ioctl-c++ with
93772         $(LIBSOCKET).
93773         * modules/sys_select-tests (Makefile.am): Link test-sys_select-c++ with
93774         $(LIBSOCKET).
93776 2010-03-28  Bruno Haible  <bruno@clisp.org>
93777             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
93779         lib-ignore: Determine different options for different compilers.
93780         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Set a variable which
93781         depends on the current language (C/C++/Fortran). Don't set LDFLAGS.
93782         Add comments.
93783         (_gl_IGNORE_UNUSED_LIBRARIES_OPTIONS): New macro.
93784         * NEWS: Mention the change.
93786 2010-03-27  Bruno Haible  <bruno@clisp.org>
93788         Remove unused GNULIB_XYZ macro definitions.
93789         * modules/dup3 (configure.ac): Remove gl_MODULE_INDICATOR invocation.
93790         * modules/fseek (configure.ac): Likewise.
93791         * modules/ioctl (configure.ac): Likewise.
93792         * modules/open (configure.ac): Likewise.
93793         * modules/stdlib-safer (configure.ac): Likewise.
93795 2010-03-27  Bruno Haible  <bruno@clisp.org>
93797         Add a remark about certain modules.
93798         * modules/malloc (Comment): New section.
93799         * modules/realloc (Comment): Likewise.
93800         * modules/sigpipe (Comment): Likewise.
93802 2010-03-27  Bruno Haible  <bruno@clisp.org>
93804         Resolve conflict between the two kinds of module indicators.
93805         * m4/gnulib-common.m4 (gl_MODULE_INDICATOR_FOR_TESTS): Define
93806         GNULIB_TEST_XYZ instead of GNULIB_XYZ.
93807         * modules/canonicalize (configure.ac): Invoke
93808         gl_MODULE_INDICATOR_FOR_TESTS.
93809         * tests/test-canonicalize-lgpl.c: Test GNULIB_TEST_XYZ instead of
93810         GNULIB_XYZ.
93811         * tests/test-dirent-c++.cc: Likewise.
93812         * tests/test-dirent-safer.c: Likewise.
93813         * tests/test-dup2.c: Likewise.
93814         * tests/test-fchdir.c: Likewise.
93815         * tests/test-fcntl-h-c++.cc: Likewise.
93816         * tests/test-getopt.c: Likewise.
93817         * tests/test-getopt.h: Likewise.
93818         * tests/test-langinfo-c++.cc: Likewise.
93819         * tests/test-locale-c++.cc: Likewise.
93820         * tests/test-math-c++.cc: Likewise.
93821         * tests/test-pty-c++.cc: Likewise.
93822         * tests/test-search-c++.cc: Likewise.
93823         * tests/test-signal-c++.cc: Likewise.
93824         * tests/test-spawn-c++.cc: Likewise.
93825         * tests/test-stdio-c++.cc: Likewise.
93826         * tests/test-stdlib-c++.cc: Likewise.
93827         * tests/test-string-c++.cc: Likewise.
93828         * tests/test-sys_ioctl-c++.cc: Likewise.
93829         * tests/test-sys_select-c++.cc: Likewise.
93830         * tests/test-sys_socket-c++.cc: Likewise.
93831         * tests/test-sys_stat-c++.cc: Likewise.
93832         * tests/test-sys_time-c++.cc: Likewise.
93833         * tests/test-time-c++.cc: Likewise.
93834         * tests/test-unistd-c++.cc: Likewise.
93835         * tests/test-wchar-c++.cc: Likewise.
93836         * tests/uninorm/test-u8-nfc.c: Likewise.
93837         * tests/uninorm/test-u8-nfd.c: Likewise.
93838         * tests/uninorm/test-u8-nfkc.c: Likewise.
93839         * tests/uninorm/test-u8-nfkd.c: Likewise.
93840         * tests/uninorm/test-u16-nfc.c: Likewise.
93841         * tests/uninorm/test-u16-nfd.c: Likewise.
93842         * tests/uninorm/test-u16-nfkc.c: Likewise.
93843         * tests/uninorm/test-u16-nfkd.c: Likewise.
93844         * tests/uninorm/test-u32-nfc.c: Likewise.
93845         * tests/uninorm/test-u32-nfc-big.c: Likewise.
93846         * tests/uninorm/test-u32-nfd.c: Likewise.
93847         * tests/uninorm/test-u32-nfd-big.c: Likewise.
93848         * tests/uninorm/test-u32-nfkc.c: Likewise.
93849         * tests/uninorm/test-u32-nfkc-big.c: Likewise.
93850         * tests/uninorm/test-u32-nfkd.c: Likewise.
93851         * tests/uninorm/test-u32-nfkd-big.c: Likewise.
93852         * tests/uninorm/test-u32-normalize-big.c: Likewise.
93854 2010-03-27  Bruno Haible  <bruno@clisp.org>
93856         Distinguish two kinds of module indicators.
93857         * m4/gnulib-common.m4 (gl_MODULE_INDICATOR_FOR_TESTS): Renamed from
93858         gl_MODULE_INDICATOR.
93859         (gl_MODULE_INDICATOR): New macro.
93860         * m4/dirent_h.m4 (gl_DIRENT_MODULE_INDICATOR): Invoke
93861         gl_MODULE_INDICATOR_FOR_TESTS instead of gl_MODULE_INDICATOR.
93862         * m4/fcntl_h.m4 (gl_FCNTL_MODULE_INDICATOR): Likewise.
93863         * m4/langinfo_h.m4 (gl_LANGINFO_MODULE_INDICATOR): Likewise.
93864         * m4/locale_h.m4 (gl_LOCALE_MODULE_INDICATOR): Likewise.
93865         * m4/math_h.m4 (gl_MATH_MODULE_INDICATOR): Likewise.
93866         * m4/pty_h.m4 (gl_PTY_MODULE_INDICATOR): Likewise.
93867         * m4/search_h.m4 (gl_SEARCH_MODULE_INDICATOR): Likewise.
93868         * m4/signal_h.m4 (gl_SIGNAL_MODULE_INDICATOR): Likewise.
93869         * m4/spawn_h.m4 (gl_SPAWN_MODULE_INDICATOR): Likewise.
93870         * m4/stdio_h.m4 (gl_STDIO_MODULE_INDICATOR): Likewise.
93871         * m4/stdlib_h.m4 (gl_STDLIB_MODULE_INDICATOR): Likewise.
93872         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Likewise.
93873         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_MODULE_INDICATOR): Likewise.
93874         * m4/sys_select_h.m4 (gl_SYS_SELECT_MODULE_INDICATOR): Likewise.
93875         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_MODULE_INDICATOR): Likewise.
93876         * m4/sys_stat_h.m4 (gl_SYS_STAT_MODULE_INDICATOR): Likewise.
93877         * m4/sys_time_h.m4 (gl_SYS_TIME_MODULE_INDICATOR): Likewise.
93878         * m4/time_h.m4 (gl_TIME_MODULE_INDICATOR): Likewise.
93879         * m4/unistd_h.m4 (gl_UNISTD_MODULE_INDICATOR): Likewise.
93880         * m4/wchar_h.m4 (gl_WCHAR_MODULE_INDICATOR): Likewise.
93881         * modules/cloexec (configure.ac): Likewise.
93882         * modules/getopt-gnu (configure.ac): Likewise.
93883         * modules/uninorm/u8-normalize (configure.ac): Likewise.
93884         * modules/uninorm/u16-normalize (configure.ac): Likewise.
93885         * modules/uninorm/u32-normalize (configure.ac): Likewise.
93886         * modules/fdopendir (configure.ac): Invoke gl_MODULE_INDICATOR.
93888 2010-03-27  Bruno Haible  <bruno@clisp.org>
93890         New module description field 'Comment'.
93891         * gnulib-tool: New option --extract-comment.
93892         (func_usage): Document it.
93893         (sed_extract_prog, sed_extract_field_header): Support 'Comment' field.
93894         (func_get_comment): New function.
93895         * modules/TEMPLATE-EXTENDED: Add a blank Comment field.
93897 2010-03-27  Bruno Haible  <bruno@clisp.org>
93899         Addendum to 2010-02-07 commit.
93900         * gnulib-tool (func_usage): Document --extract-applicability option.
93902 2010-03-27  Bruno Haible  <bruno@clisp.org>
93904         Use GNULIB_POSIXCHECK instead of GNULIB_PORTCHECK.
93905         * lib/time.in.h (asctime, asctime_r, ctime, ctime_r): Test
93906         GNULIB_POSIXCHECK, not GNULIB_PORTCHECK. Provide compile-time warnings
93907         rather than link errors.
93909 2010-03-27  Bruno Haible  <bruno@clisp.org>
93911         Avoid side effects from tests-related modules on the compilation of lib.
93912         * m4/gnulib-common.m4 (gl_MODULE_INDICATOR_CONDITION): New macro.
93913         (gl_MODULE_INDICATOR_SET_VARIABLE): Use its expansion as a value.
93914         * gnulib-tool (func_emit_tests_Makefile_am): Accept a witness_macro
93915         parameter. Emit into AM_CPPFLAGS a definition of the designated C
93916         macro.
93917         (func_import): Define a witness macro. Assign it a value that depends
93918         on the current package. Override gl_MODULE_INDICATOR_CONDITION for the
93919         tests-related modules.
93920         (func_create_testdir): Update func_emit_tests_Makefile_am invocation.
93921         Reported by Jim Meyering.
93923 2010-03-27  Bruno Haible  <bruno@clisp.org>
93925         Factorize common .m4 code.
93926         * m4/gnulib-common.m4 (gl_MODULE_INDICATOR_SET_VARIABLE): New macro.
93927         * m4/arpa_inet_h.m4 (gl_ARPA_INET_MODULE_INDICATOR): Use it.
93928         * m4/ctype.m4 (gl_CTYPE_MODULE_INDICATOR): Likewise.
93929         * m4/dirent_h.m4 (gl_DIRENT_MODULE_INDICATOR): Likewise.
93930         * m4/fcntl_h.m4 (gl_FCNTL_MODULE_INDICATOR): Likewise.
93931         * m4/iconv_h.m4 (gl_ICONV_MODULE_INDICATOR): Likewise.
93932         * m4/inttypes.m4 (gl_INTTYPES_MODULE_INDICATOR): Likewise.
93933         * m4/langinfo_h.m4 (gl_LANGINFO_MODULE_INDICATOR): Likewise.
93934         * m4/locale_h.m4 (gl_LOCALE_MODULE_INDICATOR): Likewise.
93935         * m4/math_h.m4 (gl_MATH_MODULE_INDICATOR): Likewise.
93936         * m4/netdb_h.m4 (gl_NETDB_MODULE_INDICATOR): Likewise.
93937         * m4/pty_h.m4 (gl_PTY_MODULE_INDICATOR): Likewise.
93938         * m4/search_h.m4 (gl_SEARCH_MODULE_INDICATOR): Likewise.
93939         * m4/signal_h.m4 (gl_SIGNAL_MODULE_INDICATOR): Likewise.
93940         * m4/spawn_h.m4 (gl_SPAWN_MODULE_INDICATOR): Likewise.
93941         * m4/stddef_h.m4 (gl_STDDEF_MODULE_INDICATOR): Likewise.
93942         * m4/stdio_h.m4 (gl_STDIO_MODULE_INDICATOR): Likewise.
93943         * m4/stdlib_h.m4 (gl_STDLIB_MODULE_INDICATOR): Likewise.
93944         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Likewise.
93945         * m4/strings_h.m4 (gl_STRINGS_MODULE_INDICATOR): Likewise.
93946         * m4/sys_file_h.m4 (gl_HEADER_SYS_FILE_MODULE_INDICATOR): Likewise.
93947         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_MODULE_INDICATOR): Likewise.
93948         * m4/sys_select_h.m4 (gl_SYS_SELECT_MODULE_INDICATOR): Likewise.
93949         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_MODULE_INDICATOR): Likewise.
93950         * m4/sys_stat_h.m4 (gl_SYS_STAT_MODULE_INDICATOR): Likewise.
93951         * m4/sys_time_h.m4 (gl_SYS_TIME_MODULE_INDICATOR): Likewise.
93952         * m4/sys_times_h.m4 (gl_SYS_TIMES_MODULE_INDICATOR): Likewise.
93953         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_MODULE_INDICATOR): Likewise.
93954         * m4/sys_wait_h.m4 (gl_SYS_WAIT_MODULE_INDICATOR): Likewise.
93955         * m4/time_h.m4 (gl_TIME_MODULE_INDICATOR): Likewise.
93956         * m4/unistd_h.m4 (gl_UNISTD_MODULE_INDICATOR): Likewise.
93957         * m4/wchar_h.m4 (gl_WCHAR_MODULE_INDICATOR): Likewise.
93959 2010-03-27  Bruno Haible  <bruno@clisp.org>
93961         Fix a compilation error on Cygwin with g++ >= 4.3.
93962         * lib/sys_stat.in.h (lchmod): Don't warn about the use of this function
93963         if it is undefined or if we alias it to chmod.
93964         (lstat): Don't warn about the use of this function if it is undefined
93965         or if we alias it to stat.
93966         Reported by Simon Josefsson.
93968 2010-03-27  Bruno Haible  <bruno@clisp.org>
93970         * m4/getlogin.m4 (gl_FUNC_GETLOGIN): Renamed from gl_GETLOGIN.
93971         * modules/getlogin (configure.ac): Update.
93973         * m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Renamed from gl_GETLOGIN_R.
93974         * modules/getlogin_r (configure.ac): Update.
93976         * m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): Renamed from gl_INET_NTOP.
93977         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Update.
93978         * modules/inet_ntop (configure.ac): Update.
93980         * m4/inet_pton.m4 (gl_FUNC_INET_PTON): Renamed from gl_INET_PTON.
93981         * modules/inet_pton (configure.ac): Update.
93983         * m4/mbslen.m4 (gl_FUNC_MBSLEN): Renamed from gl_MBSLEN.
93984         * modules/mbslen (configure.ac): Update.
93986         * m4/pty.m4 (gl_FUNC_FORKPTY): Renamed from gl_FORKPTY.
93987         (gl_FUNC_OPENPTY): Renamed from gl_OPENPTY.
93988         * modules/forkpty (configure.ac): Update.
93989         * modules/openpty (configure.ac): Update.
93991 2010-03-26  Simon Josefsson  <simon@josefsson.org>
93993         * top/maint.mk (sc_texinfo_acronym): Don't infloop if there is
93994         no *.texi files.  Reported by Eric Blake <eblake@redhat.com>.
93996 2010-03-25  Eric Blake  <eblake@redhat.com>
93998         maint: use pragma consistently across replacement headers
93999         * lib/ctype.in.h (system_header): Hoist for consistent placement.
94000         * lib/dirent.in.h (system_header): Likewise.
94001         * lib/errno.in.h (system_header): Likewise.
94002         * lib/float.in.h (system_header): Likewise.
94003         * lib/getopt.in.h (system_header): Likewise.
94004         * lib/iconv.in.h (system_header): Likewise.
94005         * lib/inttypes.in.h (system_header): Likewise.
94006         * lib/langinfo.in.h (system_header): Likewise.
94007         * lib/locale.in.h (system_header): Likewise.
94008         * lib/math.in.h (system_header): Likewise.
94009         * lib/netdb.in.h (system_header): Likewise.
94010         * lib/netinet_in.in.h (system_header): Likewise.
94011         * lib/pty.in.h (system_header): Likewise.
94012         * lib/sched.in.h (system_header): Likewise.
94013         * lib/se-selinux.in.h (system_header): Likewise.
94014         * lib/search.in.h (system_header): Likewise.
94015         * lib/spawn.in.h (system_header): Likewise.
94016         * lib/stdarg.in.h (system_header): Likewise.
94017         * lib/stdint.in.h (system_header): Likewise.
94018         * lib/string.in.h (system_header): Likewise.
94019         * lib/strings.in.h (system_header): Likewise.
94020         * lib/sys_file.in.h (system_header): Likewise.
94021         * lib/sys_ioctl.in.h (system_header): Likewise.
94022         * lib/sys_socket.in.h (system_header): Likewise.
94023         * lib/sys_times.in.h (system_header): Likewise.
94024         * lib/sys_utsname.in.h (system_header): Likewise.
94025         * lib/sys_wait.in.h (system_header): Likewise.
94026         * lib/sysexits.in.h (system_header): Likewise.
94027         * lib/unistd.in.h (system_header): Likewise.
94028         * lib/wctype.in.h (system_header): Likewise.
94030         arpa/inet: fix mingw compilation warning
94031         * lib/arpa_inet.in.h (system_header): Hoist to be unconditional.
94032         Reported by Matthew Bolte.
94034 2010-03-25  Bruno Haible  <bruno@clisp.org>
94036         Avoid collision between gnulib wrapper and libintl wrapper.
94037         * lib/printf.c (printf): Don't define if a printf wrapper is already
94038         defined in intl/printf.c.
94039         Reported by Michel Boaventura <michel@michelboaventura.com>.
94041 2010-03-25  Bruno Haible  <bruno@clisp.org>
94043         Use ANSI C.
94044         * lib/readutmp.h (getutent): Provide ANSI C prototype.
94046 2010-03-25  Bruno Haible  <bruno@clisp.org>
94048         Minor formatting changes.
94049         * lib/acosl.c: Insert space before function argument list.
94050         * lib/argz.c: Likewise.
94051         * lib/asinl.c: Likewise.
94052         * lib/expl.c: Likewise.
94053         * lib/gen-uni-tables.c: Likewise.
94054         * lib/gettext.h: Likewise.
94055         * lib/glthread/lock.h: Likewise.
94056         * lib/tanl.c: Likewise.
94057         * lib/uniname/uniname.c: Likewise.
94058         * tests/test-idpriv-drop.c: Likewise.
94059         * tests/test-idpriv-droptemp.c: Likewise.
94060         * tests/test-lock.c: Likewise.
94061         * tests/test-tls.c: Likewise.
94062         * lib/argp-help.c: Insert space before function-like macro argument
94063         list.
94064         * lib/memcmp.c: Likewise.
94065         * tests/test-base64.c: Likewise.
94066         * lib/localename.c: Insert space before sizeof's argument list.
94067         * lib/safe-alloc.h: Likewise.
94068         * lib/file-set.h: Insert space before macro argument list.
94069         * tests/test-argp.c: Likewise.
94070         * lib/argp-namefrob.h: Insert space before function parameter list.
94071         * lib/getaddrinfo.c: Likewise.
94072         * lib/netdb.in.h: Likewise.
94073         * lib/parse-duration.h: Likewise.
94074         * lib/parse-duration.c: Likewise.
94075         * lib/poll.c: Likewise.
94076         * lib/select.c: Likewise.
94077         * lib/trim.h: Likewise.
94078         * tests/test-usleep.c: Likewise.
94079         * lib/ldexpl.c: Insert space before function parameter list and before
94080         function argument list.
94081         * lib/logl.c: Likewise.
94082         * lib/sqrtl.c: Likewise.
94083         * lib/trim.c: Likewise.
94084         * lib/cosl.c: Use GNU style indentation. Insert space before function
94085         argument list.
94086         * lib/sinl.c: Likewise.
94087         * lib/tsearch.c: Insert space after 'for'.
94088         Reported by Jim Meyering.
94090 2010-03-23  Pádraig Brady  <P@draigBrady.com>  (tiny change)
94092         * maint.mk (sc_Wundef_boolean): Check for the presence of the
94093         config header before grepping, as it's not present before
94094         autoreconf/configure are run.  Reported by Simon Josefsson.
94096 2010-03-23  Bruno Haible  <bruno@clisp.org>
94098         pt_chown: Make it work with automake < 1.11.
94099         * modules/pt_chown (Makefile.am): Define pkglibexecdir.
94100         Reported by Simon Josefsson.
94102 2010-03-23  Bruno Haible  <bruno@clisp.org>
94104         pt_chown: Don't depend on GPLed modules.
94105         * lib/pt_chown.c: Don't include idpriv.h.
94106         (main): Don't drop privileges.
94107         * modules/pt_chown (Depends-on): Remove idpriv-drop.
94108         Reported by Simon Josefsson.
94110 2010-03-24  Simon Josefsson  <simon@josefsson.org>
94112         * top/maint.mk (sc_texinfo_acronym): Add rule, based on
94113         suggestions from karl@freefriends.org (Karl Berry).
94115 2010-03-22  Eric Blake  <eblake@redhat.com>
94117         gethostname: further tweaks
94118         * lib/unistd.in.h (includes): Only worry about <winsock2.h> if we
94119         are overriding gethostname.
94120         Suggested by Bruno Haible.
94122 2010-03-21  Bruno Haible  <bruno@clisp.org>
94124         Fix comments.
94125         * lib/forkpty.c (rpl_forkpty): Fix comment.
94126         * lib/openpty.c (rpl_openpty): Likewise.
94127         Reported by Eric Blake.
94129 2010-03-22  Eric Blake  <eblake@redhat.com>
94131         gethostname: fix build on mingw
94132         * lib/unistd.in.h (includes): Work around fact that mingw
94133         <winsock2.h> re-includes <unistd.h>, by avoiding any
94134         redeclarations if we are being included by <winsock2.h>.
94135         Reported by Matthias Bolte.
94137 2010-03-21  Bruno Haible  <bruno@clisp.org>
94139         forkpty: Provide replacement on AIX, HP-UX, IRIX, Solaris.
94140         * lib/forkpty.c (forkpty): New replacement function, from glibc with
94141         modifications.
94142         * lib/pty.in.h (forkpty): Update declaration. Add comments.
94143         * m4/pty.m4 (gl_FORKPTY): If forkpty is not declared, arrange to
94144         provide the replacement.
94145         * modules/forkpty (Depends-on): Add openpty, login_tty.
94146         * m4/pty_h.m4 (gl_PTY_H_DEFAULTS): Initialize HAVE_FORKPTY.
94147         * modules/pty (Makefile.am): Substitute HAVE_FORKPTY.
94148         * doc/glibc-functions/forkpty.texi: More supported platforms.
94149         * config/srclist.txt: Add forkpty.c (commented).
94151 2010-03-21  Bruno Haible  <bruno@clisp.org>
94153         * modules/forkpty-tests: Use the common TEMPLATE-TESTS.
94154         (Makefile.am): Verify that PTY_LIB is defined.
94156         * modules/openpty-tests: Use the common TEMPLATE-TESTS.
94158 2010-03-21  Bruno Haible  <bruno@clisp.org>
94160         Tests for module 'login_tty'.
94161         * modules/login_tty-tests: New file.
94162         * tests/test-login_tty.c: New file.
94164         New module 'login_tty'.
94165         * lib/login_tty.c: New file.
94166         * m4/pty.m4 (gl_FUNC_LOGIN_TTY): New macro.
94167         * modules/login_tty: New file.
94168         * doc/glibc-functions/login_tty.texi: Mention the new module.
94170 2010-03-21  Bruno Haible  <bruno@clisp.org>
94172         login_tty: Documentation.
94173         * doc/glibc-functions/login_tty.texi: New file.
94174         * doc/gnulib.texi (Glibc <utmp.h>): Include it.
94176 2010-03-21  Bruno Haible  <bruno@clisp.org>
94178         pty: Consistent macro naming.
94179         * m4/pty_h.m4 (gl_PTY_H): Renamed from gl_PTY.
94180         * m4/pty.m4 (gl_FORKPTY, gl_OPENPTY): Update.
94181         * modules/pty (configure.ac): Update.
94183 2010-03-21  Bruno Haible  <bruno@clisp.org>
94185         Tests for openpty: Make stricter.
94186         * tests/test-openpty.c (main): Add test of canonical processing and
94187         erase.
94188         * modules/openpty-tests (Makefile.am): Verify that PTY_LIB is defined.
94190         openpty: Provide replacement on AIX, HP-UX, IRIX, Solaris.
94191         * lib/openpty.c (openpty): New replacement function.
94192         * lib/pty.in.h: Include <termios.h>.
94193         (openpty): Update declaration. Add comments.
94194         * m4/pty.m4 (gl_OPENPTY): Require AC_USE_SYSTEM_EXTENSIONS. If openpty
94195         is not declared, arrange to provide the replacement. Check for _getpty
94196         and posix_openpt.
94197         * modules/openpty (Depends-on): Add extensions, fcntl-h, ioctl.
94198         * m4/pty_h.m4 (gl_PTY_H_DEFAULTS): Initialize HAVE_OPENPTY.
94199         * modules/pty (Makefile.am): Substitute HAVE_OPENPTY.
94200         * modules/pty-tests (test_pty_c___LDADD): New variable.
94201         * doc/glibc-functions/openpty.texi: More supported platforms.
94203 2010-03-21  Bruno Haible  <bruno@clisp.org>
94205         setenv: Tweaks.
94206         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Include necessary headers in
94207         the test program.
94208         * doc/posix-functions/setenv.texi: Update platforms list.
94210 2010-03-21  Bruno Haible  <bruno@clisp.org>
94212         New module 'unlockpt'.
94213         * lib/unlockpt.c: New file, from glibc with modifications.
94214         * m4/unlockpt.m4: New file.
94215         * modules/unlockpt: New file.
94216         * lib/stdlib.in.h (unlockpt): New declaration.
94217         * m4/stdlib_h.m4 (gl_STDLIB_H): Check whether unlockpt is declared.
94218         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_UNLOCKPT, HAVE_UNLOCKPT.
94219         * modules/stdlib (Makefile.am): Substitute GNULIB_UNLOCKPT,
94220         HAVE_UNLOCKPT.
94221         * doc/posix-functions/unlockpt.texi: Mention the new module.
94222         * tests/test-stdlib-c++.cc: Check GNULIB_NAMESPACE::unlockpt.
94223         * config/srclist.txt: Add unlockpt.c (commented).
94225 2010-03-21  Jim Meyering  <meyering@redhat.com>
94227         maint.mk: prohibit inclusion of "intprops.h" without use
94228         * top/maint.mk (sc_prohibit_intprops_without_use): New rule.
94230 2010-03-21  Bruno Haible  <bruno@clisp.org>
94232         New module 'grantpt'.
94233         * lib/grantpt.c: New file, from glibc with modifications.
94234         * m4/grantpt.m4: New file.
94235         * modules/grantpt: New file.
94236         * lib/stdlib.in.h (grantpt): New declaration.
94237         * m4/stdlib_h.m4 (gl_STDLIB_H): Check whether grantpt is declared.
94238         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_GRANTPT, HAVE_GRANTPT.
94239         * modules/stdlib (Makefile.am): Substitute GNULIB_GRANTPT,
94240         HAVE_GRANTPT.
94241         * doc/posix-functions/grantpt.texi: Mention the new module.
94242         * tests/test-stdlib-c++.cc: Check GNULIB_NAMESPACE::grantpt.
94243         * config/srclist.txt: Add grantpt.c (commented).
94245 2010-03-21  Bruno Haible  <bruno@clisp.org>
94247         New module 'pt_chown'.
94248         * lib/pt_chown.c: New file, from glibc with modifications.
94249         * lib/pty-private.h: New file, from glibc with modifications.
94250         * modules/pt_chown: New file.
94251         * config/srclist.txt: Add pt_chown.c, pty-private.h (commented).
94253 2010-03-21  Bruno Haible  <bruno@clisp.org>
94255         Tests for module 'ptsname'.
94256         * modules/ptsname-tests: New file.
94257         * tests/test-ptsname.c: New file.
94259         New module 'ptsname'.
94260         * lib/ptsname.c: New file, from glibc with modifications.
94261         * m4/ptsname.m4: New file.
94262         * modules/ptsname: New file.
94263         * lib/stdlib.in.h (ptsname): New declaration.
94264         * m4/stdlib_h.m4 (gl_STDLIB_H): Check whether ptsname is declared.
94265         (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_PTSNAME, HAVE_PTSNAME.
94266         * modules/stdlib (Makefile.am): Substitute GNULIB_PTSNAME,
94267         HAVE_PTSNAME.
94268         * doc/posix-functions/ptsname.texi: Mention the new module.
94269         * tests/test-stdlib-c++.cc: Check GNULIB_NAMESPACE::ptsname.
94270         * config/srclist.txt: Add ptsname.c (commented).
94272 2010-03-21  Bruno Haible  <bruno@clisp.org>
94274         Tests for module 'ttyname_r'.
94275         * modules/ttyname_r-tests: New file.
94276         * tests/test-ttyname_r.c: New file.
94278         New module 'ttyname_r'.
94279         * lib/ttyname_r.c: New file.
94280         * m4/ttyname_r.m4: New file.
94281         * modules/ttyname_r: New file.
94282         * lib/unistd.in.h (ttyname_r): New declaration.
94283         * m4/unistd_h.m4 (gl_UNISTD_H): Check whether ttyname_r is declared.
94284         (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_TTYNAME_R, HAVE_TTYNAME_R.
94285         * modules/unistd (Makefile.am): Substitute GNULIB_TTYNAME_R,
94286         HAVE_TTYNAME_R.
94287         * tests/test-unistd-c++.cc: Check GNULIB_NAMESPACE::ttyname_r.
94288         * doc/posix-functions/ttyname_r.texi: Mention the new module.
94290 2010-03-20  Bruno Haible  <bruno@clisp.org>
94292         signal: Undefine macro definitions in C++ mode.
94293         * lib/signal.in.h (sigismember, sigemptyset, sigaddset, sigdelset,
94294         sigfillset): Undefine macro definitions from the system header in C++
94295         mode.
94296         Reported by John W. Eaton <jwe@gnu.org>.
94298 2010-03-20  Bruno Haible  <bruno@clisp.org>
94300         Ensure no #include statements inside extern "C" { ... }.
94301         * lib/obstack.h: Shrink extern "C" { ... } region so that it does not
94302         contain #include statements.
94303         * lib/time.in.h: Likewise.
94305 2010-03-20  Bruno Haible  <bruno@clisp.org>
94307         Make _GL_WARN_ON_USE usable in C++ and C mode in the same compilation.
94308         * build-aux/warn-on-use.h (_GL_WARN_EXTERN_C): New macro.
94309         (_GL_WARN_ON_USE, _GL_WARN_ON_USE_CXX): Likewise.
94310         Reported by John W. Eaton <jwe@gnu.org>.
94312 2010-03-20  Bruno Haible  <bruno@clisp.org>
94314         * m4/unlink.m4 (gl_FUNC_UNLINK): Fix last commit.
94315         Reported by Jim Meyering.
94317 2010-03-20  Bruno Haible  <bruno@clisp.org>
94319         pipe: Set errno upon failure.
94320         * lib/pipe.h: Specify that when -1 is returned, errno is set.
94321         * lib/pipe.c (create_pipe): Set errno when returning -1. Use the right
94322         errno value in error message.
94324 2010-03-20  Bruno Haible  <bruno@clisp.org>
94325             Jim Meyering  <meyering@redhat.com>
94327         lchown: Avoid "unused variable" warning.
94328         * lib/lchown.c (rpl_lchown): Move variable 'st' into #if block.
94330 2010-03-20  Bruno Haible  <bruno@clisp.org>
94332         Work around unlink() bug on MacOS X 10.5.6.
94333         * lib/unlink.c (rpl_unlink): If UNLINK_PARENT_BUG is defined, fail when
94334         attempting to unlink a parent directory.
94335         * m4/unlink.m4 (gl_FUNC_UNLINK): Require AC_CANONICAL_HOST. Test for
94336         MacOS X 10.5 bug. If the bug is present, define UNLINK_PARENT_BUG and
94337         activate for the replacement function.
94338         * doc/posix-functions/unlink.texi: Mention the MacOS X 10.5 bug.
94340 2010-03-20  Bruno Haible  <bruno@clisp.org>
94342         Fix link errors on Solaris 8.
94343         * modules/dirent-tests (test_dirent_c___LDADD): Add LIB_NANOSLEEP.
94344         * modules/wctype-tests (test_wctype_c___LDADD): Likewise.
94346 2010-03-19  Jim Meyering  <meyering@redhat.com>
94348         regcomp.c: make non-_LIBC implementation of build_range_exp consistent
94349         The _LIBC implementation of build_range_exp correctly honors the
94350         RE_NO_EMPTY_RANGES flag when checking for reversed range endpoints.
94351         However, the non-_LIBC implementation would ignore that syntax-bit
94352         flag and return REG_ERANGE unconditionally.
94353         This change makes it honor that flag.
94354         * lib/regcomp.c (build_range_exp) [!_LIBC]: Add a parameter: "syntax".
94355         Make two pointer parameters "const".
94356         Use "syntax" bits in order to honor RE_NO_EMPTY_RANGES.
94357         (parse_bracket_exp): Update caller.
94359         regex.m4: correct the reversed range endpoint ([b-a]) test
94360         * m4/regex.m4: When requiring that [b-a] evoke failure,
94361         use RE_NO_EMPTY_RANGES.  This makes this entire configure-time
94362         test pass once again for x86-based systems.
94364 2010-03-19  Bruno Haible  <bruno@clisp.org>
94366         scandir: Fix link error on Solaris 8.
94367         * lib/scandir.c (_D_EXACT_NAMLEN, _D_ALLOC_NAMLEN): New fallback
94368         macros.
94370 2010-03-19  Bruno Haible  <bruno@clisp.org>
94372         getusershell: Fix documentation.
94373         * doc/glibc-functions/endusershell.texi: Refer to the getusershell
94374         module.
94375         * doc/glibc-functions/setusershell.texi: Likewise.
94377         getusershell: Provide declaration, missing on Solaris 9.
94378         * lib/unistd.in.h (getusershell, setusershell, endusershell): Declare
94379         also if HAVE_GETUSERSHELL && !HAVE_DECL_GETUSERSHELL.
94380         * m4/getusershell.m4 (gl_FUNC_GETUSERSHELL): When the function exists,
94381         check whether it is declared. Set HAVE_DECL_GETUSERSHELL.
94382         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
94383         HAVE_DECL_GETUSERSHELL, not HAVE_GETUSERSHELL.
94384         * modules/unistd (Makefile.am): Substitute HAVE_DECL_GETUSERSHELL, not
94385         HAVE_GETUSERSHELL.
94386         * doc/glibc-functions/getusershell.texi: Mention the Solaris problem.
94388 2010-03-19  Bruno Haible  <bruno@clisp.org>
94390         wctype: Provide iswblank function.
94391         * lib/wctype.in.h (iswblank): Provide a replacement also when iswcntrl
94392         exists and is fine.
94393         * m4/wctype_h.m4 (gl_WCTYPE_H): Also check whether iswcntrl exists.
94394         * modules/wctype (Makefile.am): Substitute HAVE_ISWBLANK.
94395         * tests/test-wctype.c (main): Re-enable the iswblank tests.
94396         * doc/posix-functions/iswblank.texi: Update.
94398 2010-03-19  Bruno Haible  <bruno@clisp.org>
94400         Tests of module 'pty' in C++ mode.
94401         * modules/pty-tests: New file.
94402         * tests/test-pty-c++.cc: New file.
94403         * m4/pty_h.m4 (gl_PTY_MODULE_INDICATOR): Invoke gl_MODULE_INDICATOR.
94405 2010-03-19  Eric Blake  <eblake@redhat.com>
94407         logb: fix documentation
94408         * doc/posix-functions/logb.texi (logb): Gnulib fixes the cygwin
94409         1.5 declaration bug.
94411         forkpty, openpty: prefer glibc's const-safe prototype
94412         * lib/forkpty.c (rpl_forkpty): New file.
94413         * lib/openpty.c (rpl_openpty): Likewise.
94414         * modules/forkpty (Files): Distribute it.
94415         * modules/openpty (Files): Likewise.
94416         * m4/pty_h.m4 (gl_PTY_H_DEFAULTS): Add new witnesses.  Move decl
94417         check...
94418         * m4/pty.m4 (gl_FORKPTY, gl_OPENPTY): ...here.  Request
94419         replacement for non-const BSD signature.
94420         * modules/pty (Makefile.am): Substitute witnesses.
94421         * lib/pty.in.h (forkpty, openpty): Declare replacements.
94422         * tests/test-forkpty.c: Update signature check.
94423         * tests/test-openpty.c: Likewise.
94424         * doc/glibc-functions/forkpty.texi (forkpty): Document the fix.
94425         * doc/glibc-functions/openpty.texi (openpty): Likewise.
94427         forkpty, openpty: split functions into new modules
94428         * modules/pty (Makefile.am): Substitute new witnesses.
94429         (Libraries): Move library detection...
94430         * modules/forkpty: ...into new module.
94431         * modules/openpty: Another new module.
94432         * modules/pty-tests: Rename and split...
94433         * modules/forkpty-tests: ...to this...
94434         * modules/openpty-tests: ...and this.
94435         * tests/test-pty.c: Rename and split...
94436         * tests/test-forkpty.c: ...to this...
94437         * tests/test-openpty.c: ...and this.
94438         * m4/pty_h.m4 (gl_PTY_H_DEFAULTS): Add new witnesses.
94439         (gl_PTY): Split library searching...
94440         * m4/pty.m4 (gl_PTY_LIB): ...into new file.
94441         (gl_FORKPTY, gl_OPENPTY): New macros.
94442         * lib/pty.in.h (forkpty, openpty): Honor new witnesses.
94443         * NEWS: Mention the split.
94444         * MODULES.html.sh (Misc): Document the modules.
94445         * doc/glibc-functions/forkpty.texi (forkpty): Likewise.
94446         * doc/glibc-functions/openpty.texi (openpty): Likewise.
94448         pty: improve replacement header
94449         * lib/pty.in.h: New file.
94450         * modules/pty (Files): Ship it.
94451         (Makefile.am): Always build replacement.
94452         * m4/pty.m4: Rename...
94453         * m4/pty_h.m4: ...to this.
94454         (gl_PTY): Modernize setting of witness macros; update check of
94455         forkpty to take proper advantage of cache.
94456         (gl_PTY_MODULE_INDICATOR, gl_PTY_H_DEFAULTS): New macros.
94458         getopt: avoid compiler warning
94459         * lib/getopt.c (attribute_hidden): Remove unused macro.
94461 2010-03-18  Bruno Haible  <bruno@clisp.org>
94463         Fix link errors on Solaris 8.
94464         * modules/iconv-h-tests (test_iconv_h_c___LDADD): Add LIB_NANOSLEEP.
94465         * modules/search-tests (test_search_c___LDADD): Likewise.
94466         * modules/signal-tests (test_signal_c___LDADD): Likewise.
94467         * modules/spawn-tests (test_spawn_c___LDADD): Likewise.
94468         * modules/stdio-tests (test_stdio_c___LDADD): Likewise.
94469         * modules/sys_select-tests (test_sys_select_c___LDADD): Likewise.
94470         * modules/sys_socket-tests (test_sys_socket_c___LDADD): Likewise.
94471         * modules/sys_time-tests (test_sys_time_c___LDADD): Likewise.
94472         * modules/wchar-tests (test_wchar_c___LDADD): Likewise.
94474 2010-03-18  Bruno Haible  <bruno@clisp.org>
94476         Fix bug introduced on 2010-03-14.
94477         * m4/spawn_h.m4 (gl_HAVE_POSIX_SPAWN): New macro.
94478         (gl_SPAWN_H): Require it.
94479         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Likewise.
94480         Reported by Simon Josefsson.
94482 2010-03-18  Bruno Haible  <bruno@clisp.org>
94484         Fix typo introduced on 2009-12-31.
94485         * m4/spawn_h.m4 (gl_SPAWN_H): Check for the declaration of
94486         posix_spawn_file_actions_adddup2.
94488 2010-03-17  Bert Wesarg  <bert.wesarg@googlemail.com>  (tiny change)
94489         and Eric Blake  <eblake@redhat.com>
94491         test-vc-list-files-git: make more robust
94492         * tests/test-vc-list-files-git.sh: Unset problematic environment
94493         variables.  Chain commands together.
94495 2010-03-17  Ludovic Courtès  <ludo@gnu.org>  (tiny change)
94497         * m4/pty.m4: Unset $ac_cv_have_decl_forkpty before the second
94498         `AC_CHECK_DECL' invocation.
94500 2010-03-15  Sergey Poznyakoff  <gray@gnu.org.ua>
94502         * lib/inttostr.c (inttostr): Make sure the invocation of verify
94503         appears before executable statements. Suggested by Petr Sumbera
94504         <Petr.Sumbera@Sun.COM>.
94506 2010-03-14  Bruno Haible  <bruno@clisp.org>
94508         * tests/test-flock.c (test_exclusive): Comment out a test that causes
94509         portability problems. Instead use a simpler test.
94510         (main): Check that invalid arguments are rejected only on Linux.
94512 2010-03-14  Bruno Haible  <bruno@clisp.org>
94514         Fix bug introduced on 2009-12-31.
94515         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Invoke
94516         gl_PREREQ_SYS_H_WINSOCK2 always.
94517         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise. Remove
94518         SYS_SOCKET_H variable.
94519         * m4/sys_file_h.m4 (gl_HEADER_SYS_FILE_H): Remove test for flock.
94520         Update comments.
94521         * m4/ctype.m4 (gl_CTYPE_H): Update comments.
94522         * m4/langinfo_h.m4 (gl_LANGINFO_H): Likewise.
94523         * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Likewise.
94524         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H): Likewise.
94525         * m4/sys_wait_h.m4 (gl_SYS_WAIT_H): Likewise.
94527 2010-03-14  Bruno Haible  <bruno@clisp.org>
94529         Fix values returned by sinl, cosl.
94530         * lib/trigl.h: Add specification comments.
94531         * lib/sincosl.c (kernel_sinl, kernel_cosl): Fix comments and formula
94532         that combines the values from the precomputed table with the values of
94533         the Chebyshev polynomials.
94535 2010-03-14  Bruno Haible  <bruno@clisp.org>
94537         Fix compilation error when modules 'posix_spawn[p]' are not used.
94538         * m4/spawn_h.m4 (gl_SPAWN_H): Set HAVE_POSIX_SPAWN here.
94539         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): ... not here.
94541 2010-03-14  Bruno Haible  <bruno@clisp.org>
94543         Fix compilation error on mingw when module 'time_r' is not used.
94544         * lib/time.in.h (localtime_r, gmtime_r): Declare only if GNULIB_TIME_R
94545         is 1.
94546         * tests/test-time-c++.cc (localtime_r, gmtime_r): Likewise.
94547         * modules/time_r (configure.ac): Invoke gl_TIME_MODULE_INDICATOR.
94548         * modules/time (Makefile.am): Substitute GNULIB_TIME_R.
94549         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_TIME_R.
94551 2010-03-14  Bruno Haible  <bruno@clisp.org>
94553         Fix compilation error with Sun C.
94554         * lib/strtol.c: Use LLONG_MIN instead of GCC specific LONG_LONG_MIN.
94555         Use LLONG_MAX instead of GCC specific LONG_LONG_MAX. Use ULLONG_MAX
94556         instead of GCC specific ULONG_LONG_MAX.
94557         * lib/xstrtoll.c: Likewise.
94558         * lib/xstrtoull.c: Likewise.
94560 2010-03-13  Bruno Haible  <bruno@clisp.org>
94562         Allow the user to disable C++ code and tests.
94563         * m4/ansi-c++.m4 (gl_CXX_CHOICE): New macro.
94564         (gl_PROG_ANSI_CXX): Require it.
94566 2010-03-13  Bruno Haible  <bruno@clisp.org>
94568         * DEPENDENCIES (libtool): Mention libtool 2.2.x requirement in special
94569         cases.
94571 2010-03-13  Bruno Haible  <bruno@clisp.org>
94573         Test that gnulib does not break the standard C++ headers.
94574         * tests/test-locale-c++2.cc: New file.
94575         * modules/locale-tests (Files): Add it.
94576         (Makefile.am): Compile it for test-locale-c++.
94577         * tests/test-math-c++2.cc: New file.
94578         * modules/math-tests (Files): Add it.
94579         (Makefile.am): Compile it for test-math-c++.
94580         * tests/test-signal-c++2.cc: New file.
94581         * modules/signal-tests (Files): Add it.
94582         (Makefile.am): Compile it for test-signal-c++.
94583         * tests/test-stdio-c++2.cc: New file.
94584         * modules/stdio-tests (Files): Add it.
94585         (Makefile.am): Compile it for test-stdio-c++.
94586         * tests/test-stdlib-c++2.cc: New file.
94587         * modules/stdlib-tests (Files): Add it.
94588         (Makefile.am): Compile it for test-stdlib-c++.
94589         * tests/test-string-c++2.cc: New file.
94590         * modules/string-tests (Files): Add it.
94591         (Makefile.am): Compile it for test-string-c++.
94592         * tests/test-time-c++2.cc: New file.
94593         * modules/time-tests (Files): Add it.
94594         (Makefile.am): Compile it for test-time-c++.
94595         Reported by John W. Eaton <jwe@gnu.org>.
94597 2010-03-13  Bruno Haible  <bruno@clisp.org>
94599         * gnulib-tool (func_usage): Clarify which options are available for
94600         --create-testdir and --create-megatestdir.
94602 2010-03-13  Bruno Haible  <bruno@clisp.org>
94604         Fix compilation error with glibc >= 2.10 and g++ >= 4.4.
94605         * build-aux/warn-on-use.h (_GL_WARN_ON_USE_CXX): New macro.
94606         * build-aux/c++defs.h (_GL_CXXALIASWARN1): New macro.
94607         * lib/string.in.h (memchr, memrchr, rawmemchr, strchrnul, strpbrk,
94608         strstr, strcasestr): Use _GL_CXXALIASWARN1 instead of _GL_CXXALIASWARN
94609         when appropriate.
94610         Reported by Jim Meyering.
94612 2010-03-12  Simon Josefsson  <simon@josefsson.org>
94614         * gnulib-tool (func_import): Explain origin of code.
94616 2010-03-12  Bruno Haible  <bruno@clisp.org>
94618         Fix problem with automake's definition of CXXLINK.
94619         * gnulib-tool (func_create_testdir): After LT_INIT, also use LT_LANG.
94620         Reported by Simon Josefsson and Ludovic Courtès.
94622 2010-03-12  Bruno Haible  <bruno@clisp.org>
94624         * doc/gnulib-intro.texi (Steady Development): Mention Ian Beckwith's
94625         stable releases.
94627 2010-03-11  Bruno Haible  <bruno@clisp.org>
94629         Fix problems with overloaded C++ definitions of memchr, strpbrk, etc.
94630         * build-aux/c++defs.h (_GL_CXXALIAS_SYS_CAST2): Make it work regardless
94631         whether the system provides one variant or multiple variants of the
94632         function.
94633         * lib/string.in.h (memchr, strpbrk): Use _GL_CXXALIAS_SYS_CAST2 for all
94634         C++ compilers.
94635         (memrchr, rawmemchr, strchrnul, strstr, strcasestr): Use
94636         _GL_CXXALIAS_SYS_CAST2 instead of _GL_CXXALIAS_SYS.
94637         Reported by Jim Meyering.
94639 2010-03-09  Simon Josefsson  <simon@josefsson.org>
94641         * gnulib-tool (LIBTOOLPATH): Fix cut'n'paste bug.
94643 2010-03-08  Bruno Haible  <bruno@clisp.org>
94645         gnulib-tool: Add support for --libtool in --create-testdir.
94646         * gnulib-tool (LIBTOOLPATH, LIBTOOLIZE): New variables.
94647         (func_create_testdir): Emit LT_INIT invocations. Invoke LIBTOOLIZE.
94649 2010-03-08  Eric Blake  <eblake@redhat.com>
94651         gnulib-tool.texi: mention possibility of git submodule
94652         * doc/gnulib-tool.texi (VCS Issues): Add details about using git
94653         submodules.
94654         * doc/.gitignore: Ignore another generated file.
94656 2010-03-08  Karl Berry  <karl@gnu.org>
94658         * doc/gnulib-tool.texi (VCS Issues): Mention third option
94659         of committing gnulib files while skipping others.
94661 2010-03-07  Bruno Haible  <bruno@clisp.org>
94663         Tests of module 'wctype' in C++ mode.
94664         * tests/test-wctype-c++.cc: New file.
94665         * modules/wctype-tests (Files): Add it and tests/signature.h.
94666         (Depends-on): Add ansi-c++-opt.
94667         (Makefile.am): Arrange to compile and run test-wctype-c++.
94669         Tests of module 'wchar' in C++ mode.
94670         * tests/test-wchar-c++.cc: New file.
94671         * modules/wchar-tests (Files): Add it and tests/signature.h.
94672         (Depends-on): Add ansi-c++-opt.
94673         (Makefile.am): Arrange to compile and run test-wchar-c++.
94674         * m4/wchar_h.m4 (gl_WCHAR_MODULE_INDICATOR): Invoke
94675         gl_MODULE_INDICATOR.
94677         Tests of module 'unistd' in C++ mode.
94678         * tests/test-unistd-c++.cc: New file.
94679         * modules/unistd-tests (Files): Add it and tests/signature.h.
94680         (Depends-on): Add ansi-c++-opt.
94681         (Makefile.am): Arrange to compile and run test-unistd-c++.
94682         * m4/unistd_h.m4 (gl_UNISTD_MODULE_INDICATOR): Invoke
94683         gl_MODULE_INDICATOR.
94685         Tests of module 'time' in C++ mode.
94686         * tests/test-time-c++.cc: New file.
94687         * modules/time-tests (Files): Add it and tests/signature.h.
94688         (Depends-on): Add ansi-c++-opt.
94689         (Makefile.am): Arrange to compile and run test-time-c++.
94690         * m4/time_h.m4 (gl_TIME_MODULE_INDICATOR): Invoke gl_MODULE_INDICATOR.
94692         Tests of module 'sys_time' in C++ mode.
94693         * tests/test-sys_time-c++.cc: New file.
94694         * modules/sys_time-tests (Files): Add it and tests/signature.h.
94695         (Depends-on): Add ansi-c++-opt.
94696         (Makefile.am): Arrange to compile and run test-sys_time-c++.
94697         * m4/sys_time_h.m4 (gl_SYS_TIME_MODULE_INDICATOR): Invoke
94698         gl_MODULE_INDICATOR.
94700         Tests of module 'sys_stat' in C++ mode.
94701         * tests/test-sys_stat-c++.cc: New file.
94702         * modules/sys_stat-tests (Files): Add it and tests/signature.h.
94703         (Depends-on): Add ansi-c++-opt.
94704         (Makefile.am): Arrange to compile and run test-sys_stat-c++.
94705         * m4/sys_stat_h.m4 (gl_SYS_STAT_MODULE_INDICATOR): Invoke
94706         gl_MODULE_INDICATOR.
94708         Tests of module 'sys_socket' in C++ mode.
94709         * tests/test-sys_socket-c++.cc: New file.
94710         * modules/sys_socket-tests (Files): Add it and tests/signature.h.
94711         (Depends-on): Add ansi-c++-opt.
94712         (Makefile.am): Arrange to compile and run test-sys_socket-c++.
94713         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_MODULE_INDICATOR): Invoke
94714         gl_MODULE_INDICATOR.
94716         Tests of module 'sys_select' in C++ mode.
94717         * tests/test-sys_select-c++.cc: New file.
94718         * modules/sys_select-tests (Files): Add it and tests/signature.h.
94719         (Depends-on): Add ansi-c++-opt.
94720         (Makefile.am): Arrange to compile and run test-sys_select-c++.
94721         * m4/sys_select_h.m4 (gl_SYS_SELECT_MODULE_INDICATOR): Invoke
94722         gl_MODULE_INDICATOR.
94724         Tests of module 'sys_ioctl' in C++ mode.
94725         * tests/test-sys_ioctl-c++.cc: New file.
94726         * modules/sys_ioctl-tests (Files): Add it and tests/signature.h.
94727         (Depends-on): Add ansi-c++-opt.
94728         (Makefile.am): Arrange to compile and run test-sys_ioctl-c++.
94729         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_MODULE_INDICATOR): Invoke
94730         gl_MODULE_INDICATOR.
94732         Tests of module 'string' in C++ mode.
94733         * tests/test-string-c++.cc: New file.
94734         * modules/string-tests (Files): Add it and tests/signature.h.
94735         (Depends-on): Add ansi-c++-opt.
94736         (Makefile.am): Arrange to compile and run test-string-c++.
94737         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Invoke
94738         gl_MODULE_INDICATOR.
94740         Tests of module 'stdlib' in C++ mode.
94741         * tests/test-stdlib-c++.cc: New file.
94742         * modules/stdlib-tests (Files): Add it and tests/signature.h.
94743         (Depends-on): Add ansi-c++-opt.
94744         (Makefile.am): Arrange to compile and run test-stdlib-c++.
94745         * m4/stdlib_h.m4 (gl_STDLIB_MODULE_INDICATOR): Invoke
94746         gl_MODULE_INDICATOR.
94748         Tests of module 'stdio' in C++ mode.
94749         * tests/test-stdio-c++.cc: New file.
94750         * modules/stdio-tests (Files): Add it and tests/signature.h.
94751         (Depends-on): Add ansi-c++-opt.
94752         (Makefile.am): Arrange to compile and run test-stdio-c++.
94753         * m4/stdio_h.m4 (gl_STDIO_MODULE_INDICATOR): Invoke
94754         gl_MODULE_INDICATOR.
94756         Tests of module 'spawn' in C++ mode.
94757         * tests/test-spawn-c++.cc: New file.
94758         * modules/spawn-tests (Files): Add it and tests/signature.h.
94759         (Depends-on): Add ansi-c++-opt.
94760         (Makefile.am): Arrange to compile and run test-spawn-c++.
94761         * m4/spawn_h.m4 (gl_SPAWN_MODULE_INDICATOR): Invoke
94762         gl_MODULE_INDICATOR.
94764         Tests of module 'signal' in C++ mode.
94765         * tests/test-signal-c++.cc: New file.
94766         * modules/signal-tests (Files): Add it and tests/signature.h.
94767         (Depends-on): Add ansi-c++-opt.
94768         (Makefile.am): Arrange to compile and run test-signal-c++.
94769         * m4/signal_h.m4 (gl_SIGNAL_MODULE_INDICATOR): Invoke
94770         gl_MODULE_INDICATOR.
94772         Tests of module 'search' in C++ mode.
94773         * tests/test-search-c++.cc: New file.
94774         * modules/search-tests (Files): Add it and tests/signature.h.
94775         (Depends-on): Add ansi-c++-opt.
94776         (Makefile.am): Arrange to compile and run test-search-c++.
94777         * m4/search_h.m4 (gl_SEARCH_MODULE_INDICATOR): Invoke
94778         gl_MODULE_INDICATOR.
94780         Tests of module 'math' in C++ mode.
94781         * tests/test-math-c++.cc: New file.
94782         * modules/math-tests (Files): Add it and tests/signature.h.
94783         (Depends-on): Add ansi-c++-opt.
94784         (Makefile.am): Arrange to compile and run test-math-c++.
94785         * m4/math_h.m4 (gl_MATH_MODULE_INDICATOR): Invoke gl_MODULE_INDICATOR.
94787         Tests of module 'locale' in C++ mode.
94788         * tests/test-locale-c++.cc: New file.
94789         * modules/locale-tests (Files): Add it and tests/signature.h.
94790         (Depends-on): Add ansi-c++-opt.
94791         (Makefile.am): Arrange to compile and run test-locale-c++.
94792         * m4/locale_h.m4 (gl_LOCALE_MODULE_INDICATOR): Invoke
94793         gl_MODULE_INDICATOR.
94795         Tests of module 'langinfo' in C++ mode.
94796         * tests/test-langinfo-c++.cc: New file.
94797         * modules/langinfo-tests (Files): Add it and tests/signature.h.
94798         (Depends-on): Add ansi-c++-opt.
94799         (Makefile.am): Arrange to compile and run test-langinfo-c++.
94800         * m4/langinfo_h.m4 (gl_LANGINFO_MODULE_INDICATOR): Invoke
94801         gl_MODULE_INDICATOR.
94803         Tests of module 'iconv-h' in C++ mode.
94804         * tests/test-iconv-h-c++.cc: New file.
94805         * modules/iconv-h-tests (Files): Add it and tests/signature.h.
94806         (Depends-on): Add ansi-c++-opt.
94807         (Makefile.am): Arrange to compile and run test-iconv-h-c++.
94809         Tests of module 'glob' in C++ mode.
94810         * tests/test-glob-c++.cc: New file.
94811         * modules/glob-tests (Files): Add it.
94812         (Depends-on): Add ansi-c++-opt.
94813         (Makefile.am): Arrange to compile and run test-glob-c++.
94815         Tests of module 'fcntl-h' in C++ mode.
94816         * tests/test-fcntl-h-c++.cc: New file.
94817         * modules/fcntl-h-tests (Files): Add it and tests/signature.h.
94818         (Depends-on): Add ansi-c++-opt.
94819         (Makefile.am): Arrange to compile and run test-fcntl-h-c++.
94820         * m4/fcntl_h.m4 (gl_FCNTL_MODULE_INDICATOR): Invoke
94821         gl_MODULE_INDICATOR.
94823         Tests of module 'dirent' in C++ mode.
94824         * tests/test-dirent-c++.cc: New file.
94825         * modules/dirent-tests (Files): Add it and tests/signature.h.
94826         (Depends-on): Add ansi-c++-opt.
94827         (Makefile.am): Arrange to compile and run test-dirent-c++.
94828         * m4/dirent_h.m4 (gl_DIRENT_MODULE_INDICATOR): Invoke
94829         gl_MODULE_INDICATOR.
94831         New module 'ansi-c++-opt'.
94832         * modules/ansi-c++-opt: New file.
94833         * m4/ansi-c++.m4: New file, from GNU gettext with modifications.
94835         Document C++ namespace mode.
94836         * doc/gnulib.texi (A C++ namespace for gnulib): New section.
94838         wctype: Avoid #define replacements in C++ mode.
94839         * lib/wctype.in.h: Include c++defs.h, warn-on-use.h.
94840         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower,
94841         iswprint, iswpunct, iswspace, iswupper, iswxdigit, towlower, towupper):
94842         In C++, define a namespaced alias symbol.
94843         * m4/wctype_h.m4 (gl_WCTYPE_H): Don't set WCTYPE_H.
94844         * modules/wctype (Depends-on): Add c++defs, warn-on-use.
94845         (Makefile.am): Provide a wctype.h replacement always. Update wctype.h
94846         rule.
94848         wchar: Avoid #define replacements in C++ mode.
94849         * lib/wchar.in.h: Include c++defs.h.
94850         (btowc, wctob, mbsinit, mbrtowc, mbrlen, mbsrtowcs, mbsnrtowcs,
94851         wcrtomb, wcsrtombs, wcsnrtombs): In C++, define a namespaced alias
94852         symbol.
94853         (wcwidth): Likewise. Fix prototype to be POSIX compliant.
94854         * modules/wchar (Depends-on): Add c++defs.
94855         (Makefile.am): Update wchar.h rule.
94857         unistd: Avoid #define replacements in C++ mode.
94858         * lib/unistd.in.h: Include c++defs.h.
94859         (chown, close, dup, dup2, dup3, euidaccess, faccessat, fchdir,
94860         fchownat, fsync, ftruncate, getcwd, getdomainname, getdtablesize,
94861         getgroups, gethostname, getlogin, getlogin_r, getpagesize,
94862         getusershell, setusershell, endusershell, lchown, link, linkat, lseek,
94863         pipe2, pread, readlink, readlinkat, rmdir, sleep, symlink, symlinkat,
94864         unlink, unlinkat, usleep, write): In C++, define a namespaced alias
94865         symbol.
94866         (environ): Update.
94867         * modules/unistd (Depends-on): Add c++defs.
94868         (Makefile.am): Update unistd.h rule.
94870         time: Avoid #define replacements in C++ mode.
94871         * lib/time.in.h: Include c++defs.h, warn-on-use.h.
94872         (nanosleep, mktime, localtime_r, gmtime_r, strptime, timegm): In C++,
94873         define a namespaced alias symbol.
94874         * m4/time_h.m4 (gl_TIME_MODULE_INDICATOR): New macro.
94875         (gl_HEADER_TIME_H_DEFAULTS): Initialize also GNULIB_MKTIME,
94876         GNULIB_NANOSLEEP, GNULIB_STRPTIME, GNULIB_TIMEGM.
94877         * modules/time (Depends-on): Add c++defs, warn-on-use.
94878         (Makefile.am): Update time.h rule.
94879         * modules/mktime (configure.ac): Invoke gl_TIME_MODULE_INDICATOR.
94880         * modules/nanosleep (configure.ac): Likewise.
94881         * modules/strptime (configure.ac): Likewise.
94882         * modules/timegm (configure.ac): Likewise.
94884         sys_time: Avoid #define replacements in C++ mode.
94885         * lib/sys_time.in.h: Include c++defs.h.
94886         (gettimeofday): In C++, define a namespaced alias symbol.
94887         * modules/sys_time (Depends-on): Add c++defs.
94888         (Makefile.am): Update sys/time.h rule.
94890         sys_stat: Avoid #define replacements in C++ mode.
94891         * lib/sys_stat.in.h: Include c++defs.h.
94892         (fchmodat, fstat, fstatat, futimens, lchmod, lstat, mkdir, mkdirat,
94893         mkfifo, mkfifoat, mknod, mknodat, utimensat): In C++, define a
94894         namespaced alias symbol.
94895         In C++, define a namespaced alias symbol.
94896         * modules/sys_stat (Depends-on): Add c++defs.
94897         (Makefile.am): Update sys/stat.h rule.
94899         sys_socket: Avoid #define replacements in C++ mode.
94900         * lib/sys_socket.in.h: Handle the case of recursive include on Cygwin.
94901         Include c++defs.h. Include warn-on-use.h earlier. Enable the function
94902         definitions also when the system has a <sys/socket.h>.
94903         (socket, connect, accept, bind, getpeername, getsockname, getsockopt,
94904         listen, recv, send, recvfrom, sendto, setsockopt, shutdown, accept4):
94905         In C++, define a namespaced alias symbol.
94906         * modules/sys_socket (Depends-on): Add c++defs.
94907         (Makefile.am): Update sys/socket.h rule.
94909         sys_select: Avoid #define replacements in C++ mode.
94910         * lib/sys_select.in.h: Include c++defs.h. Enable the function
94911         definitions also when the system has a <sys/select.h>.
94912         (select): In C++, define a namespaced alias symbol.
94913         * modules/sys_select (Depends-on): Add c++defs.
94914         (Makefile.am): Update sys/select.h rule.
94916         sys_ioctl: Avoid #define replacements in C++ mode.
94917         * lib/sys_ioctl.in.h: Include c++defs.h.
94918         (ioctl): In C++, define a namespaced alias symbol.
94919         * modules/sys_ioctl (Depends-on): Add c++defs.
94920         (Makefile.am): Update sys/ioctl.h rule.
94922         string: Avoid #define replacements in C++ mode.
94923         * lib/string.in.h: Include c++defs.h.
94924         (stpncpy): Define to rpl_stpncpy, not gnu_stpncpy.
94925         (memchr, memmem, mempcpy, memrchr, rawmemchr, stpcpy, stpncpy,
94926         strchrnul, strdup, strndup, strnlen, strpbrk, strsep, strstr,
94927         strcasestr, strtok_r, mbslen, mbschr, mbsrchr, mbspbrk, strerror,
94928         strsignal, strverscmp): In C++, define a namespaced alias symbol.
94929         * modules/string (Depends-on): Add c++defs.
94930         (Makefile.am): Update string.h rule.
94932         stdlib: Avoid #define replacements in C++ mode.
94933         * lib/stdlib.in.h: Include c++defs.h.
94934         (atoll, calloc, canonicalize_file_name, getloadavg, getsubopt, malloc,
94935         mkdtemp, mkostemp, mkostemps, mkstemp, mkstemps, putenv, random_r,
94936         srandom_r, initstate_r, setstate_r, realloc, realpath, rpmatch, setenv,
94937         strtod, strtoll, strtoull, unsetenv): In C++, define a namespaced alias
94938         symbol.
94939         * modules/stdlib (Depends-on): Add c++defs.
94940         (Makefile.am): Update stdlib.h rule.
94942         stdio: Avoid #define replacements in C++ mode.
94943         * lib/stdio.in.h: Include c++defs.h.
94944         (dprintf, fclose, fflush, fopen, fprintf, fpurge, fputc, fputs,
94945         freopen, fseek, fseeko, ftell, ftello, fwrite, getdelim, getline,
94946         obstack_printf, obstack_vprintf, perror, popen, printf, fputc, putchar,
94947         puts, remove, rename, renameat, snprintf, sprintf, asprintf, vasprintf,
94948         vdprintf, vfprintf, vprintf, vsnprintf, vsprintf): In C++, define a
94949         namespaced alias symbol.
94950         * modules/stdio (Depends-on): Add c++defs.
94951         (Makefile.am): Update stdio.h rule.
94953         spawn: Avoid #define replacements in C++ mode.
94954         * lib/spawn.in.h: Include c++defs.h.
94955         (posix_spawn, posix_spawnp, posix_spawnattr_init,
94956         posix_spawnattr_destroy, posix_spawnattr_getsigdefault,
94957         posix_spawnattr_setsigdefault, posix_spawnattr_getsigmask,
94958         posix_spawnattr_setsigmask, posix_spawnattr_getflags,
94959         posix_spawnattr_setflags, posix_spawnattr_getpgroup,
94960         posix_spawnattr_setpgroup, posix_spawnattr_getschedpolicy,
94961         posix_spawnattr_setschedpolicy, posix_spawnattr_getschedparam,
94962         posix_spawnattr_setschedparam, posix_spawn_file_actions_init,
94963         posix_spawn_file_actions_destroy, posix_spawn_file_actions_addopen,
94964         posix_spawn_file_actions_addclose, posix_spawn_file_actions_adddup2):
94965         In C++, define a namespaced alias symbol.
94966         * modules/spawn (Depends-on): Add c++defs.
94967         (Makefile.am): Update spawn.h rule.
94969         signal: Avoid #define replacements in C++ mode.
94970         * lib/signal.in.h: Include c++defs.h.
94971         (sigismember, sigemptyset, sigaddset, sigdelset, sigfillset,
94972         sigpending, sigprocmask, signal, raise, sigaction): In C++, define a
94973         namespaced alias symbol.
94974         * modules/signal (Depends-on): Add c++defs.
94975         (Makefile.am): Update signal.h rule.
94977         search: Avoid #define replacements in C++ mode.
94978         * lib/search.in.h: Include c++defs.h.
94979         (_gl_search_compar_fn, _gl_search_action_fn): New types.
94980         (tsearch, tfind, tdelete, twalk): In C++, define a namespaced alias
94981         symbol.
94982         * modules/search (Depends-on): Add c++defs.
94983         (Makefile.am): Update search.h rule.
94985         math: Avoid #define replacements in C++ mode.
94986         * lib/math.in.h: Include c++defs.h.
94987         (frexp, acosl, asinl, atanl, ceilf, ceill, cosl, expl, floorf, floorl,
94988         frexpl, ldexpl, logl, roundf, round, roundl, sinl, sqrtl, tanl, truncf,
94989         trunc, truncl): In C++, define a namespaced alias symbol.
94990         * modules/math (Depends-on): Add c++defs.
94991         (Makefile.am): Update math.h rule.
94993         locale: Avoid #define replacements in C++ mode.
94994         * lib/locale.in.h: Include c++defs.h.
94995         (duplocale): In C++, define a namespaced alias symbol.
94996         * m4/locale_h.m4 (gl_LOCALE_H_DEFAULTS): Initialize HAVE_DUPLOCALE.
94997         * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Set HAVE_DUPLOCALE.
94998         * modules/locale (Depends-on): Add c++defs.
94999         (Makefile.am): Update locale.h rule. Substitute HAVE_DUPLOCALE.
95001         langinfo: Avoid #define replacements in C++ mode.
95002         * lib/langinfo.in.h: Include c++defs.h.
95003         (nl_langinfo): In C++, define a namespaced alias symbol.
95004         * modules/langinfo (Depends-on): Add c++defs.
95005         (Makefile.am): Update langinfo.h rule.
95007         iconv-h: Avoid #define replacements in C++ mode.
95008         * lib/iconv.in.h: Include c++defs.h, warn-on-use.h.
95009         (iconv_open, iconv, iconv_close): In C++, define a namespaced alias
95010         symbol.
95011         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Invoke gl_REPLACE_ICONV_H
95012         whenever iconv is present.
95013         * modules/iconv-h (Depends-on): Add c++defs, warn-on-use.
95014         (Makefile.am): Update iconv.h rule.
95016         glob: Avoid #define replacements in C++ mode.
95017         * lib/glob.in.h: Include c++defs.h, warn-on-use.h.
95018         (_gl_glob_errfunc_fn): New type.
95019         (glob, globfree, glob_pattern_p): In C++, define a namespaced alias
95020         symbol.
95021         * modules/glob (Depends-on): Add c++defs, warn-on-use.
95022         (Makefile.am): Update glob.h rule.
95024         fcntl-h: Avoid #define replacements in C++ mode.
95025         * lib/fcntl.in.h: Include c++defs.h.
95026         (fcntl, open, openat): In C++, define a namespaced alias symbol.
95027         * modules/fcntl-h (Depends-on): Add c++defs.
95028         (Makefile.am): Update fcntl.h rule.
95030         dirent: Avoid #define replacements in C++ mode.
95031         * lib/dirent.in.h: Include c++defs.h.
95032         (closedir, fdopendir, opendir, scandir, alphasort): In C++, define a
95033         namespaced alias symbol.
95034         (dirfd): Update declaration.
95035         * modules/dirent (Depends-on): Add c++defs.
95036         (Makefile.am): Update dirent.h rule.
95038         ctype: Make it usable in C++ code.
95039         * lib/ctype.in.h: Include c++defs.h.
95040         (isblank): Declare as extern "C".
95041         * modules/ctype (Depends-on): Add c++defs.
95042         (Makefile.am): Update ctype.h rule.
95044         New module 'c++defs'.
95045         * modules/c++defs: New file.
95046         * build-aux/c++defs.h: New file.
95047         Reported by John W. Eaton <jwe@gnu.org>.
95049 2010-03-07  Bruno Haible  <bruno@clisp.org>
95051         logb: Provide missing declaration for Cygwin.
95052         * lib/math.in.h (logb): New declaration.
95053         * m4/logb.m4: New file.
95054         * modules/logb (Files): Add m4/logb.m4.
95055         (Depends-on): Add math.
95056         (configure.ac): Invoke gl_FUNC_LOGB, gl_MATH_MODULE_INDICATOR.
95057         * m4/math_h.m4 (gl_MATH_H): Check also for logb declaration.
95058         (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOGB, HAVE_DECL_LOGB.
95059         * modules/math (Makefile.am): Substitute GNULIB_LOGB, HAVE_DECL_LOGB.
95060         * doc/posix-functions/logb.texi: Mention the Cygwin bug.
95062 2010-03-07  Bruno Haible  <bruno@clisp.org>
95064         Fix test-cond link error.
95065         * tests/test-cond.c: Include <stdio.h>.
95067 2010-03-07  Bruno Haible  <bruno@clisp.org>
95069         Fix test-dirent-safer link error.
95070         * modules/dirent-safer-tests (Makefile.am): Define
95071         test_dirent_safer_LDADD.
95073 2010-03-07  Bruno Haible  <bruno@clisp.org>
95075         * gnulib-tool (func_create_testdir): Don't use 'lib-ignore' module
95076         among default module list.
95078 2010-03-07  Bruno Haible  <bruno@clisp.org>
95080         Fix link error on platforms with GNU libiconv.
95081         * modules/unistr/u8-strcoll-tests (Makefile): Define
95082         test_u8_strcoll_LDADD.
95083         * modules/unistr/u16-strcoll-tests (Makefile): Define
95084         test_u16_strcoll_LDADD.
95085         * modules/unistr/u32-strcoll-tests (Makefile): Define
95086         test_u32_strcoll_LDADD.
95088 2010-03-07  Bruno Haible  <bruno@clisp.org>
95090         Use POSIX declarations for socket functions.
95091         * lib/sys_socket.in.h (rpl_connect, rpl_accept, rpl_bind,
95092         rpl_getpeername, rpl_getsockname, rpl_recv, rpl_send, rpl_recvfrom,
95093         rpl_sendto): Change declaration to match POSIX.
95094         * lib/connect.c (rpl_connect): Likewise.
95095         * lib/accept.c (rpl_accept): Likewise.
95096         * lib/bind.c (rpl_bind): Likewise.
95097         * lib/getpeername.c (rpl_getpeername): Likewise.
95098         * lib/getsockname.c (rpl_getsockname): Likewise.
95099         * lib/recv.c (rpl_recv): Likewise.
95100         * lib/send.c (rpl_send): Likewise.
95101         * lib/recvfrom.c (rpl_recvfrom): Likewise.
95102         * lib/sendto.c (rpl_sendto): Likewise.
95104 2010-03-06  Bruno Haible  <bruno@clisp.org>
95106         Clarify access, euidaccess, faccessat.
95107         * doc/posix-functions/faccessat.texi: Mention security problem under
95108         "Other problems", not "Portability problems".
95109         * doc/posix-functions/access.texi: Likewise. Mention a related security
95110         problem.
95111         * doc/glibc-functions/euidaccess.texi: Mention security problems.
95112         * lib/euidaccess.c: Add comments about platforms.
95113         * lib/unistd.in.h (access, euidaccess): Add warnings.
95115 2010-03-07  Bruno Haible  <bruno@clisp.org>
95117         Ensure posix_spawnattr_{get,set}sched{policy,param} are defined.
95118         * lib/spawn.in.h (POSIX_SPAWN_SETSCHEDPARAM): Define fallback.
95119         (POSIX_SPAWN_SETSCHEDULER): Likewise.
95120         (POSIX_SPAWN_USEVFORK): Define in a way that works when
95121         POSIX_SPAWN_SETSCHEDPARAM and POSIX_SPAWN_SETSCHEDULER are zero.
95122         (posix_spawnattr_getschedpolicy, posix_spawnattr_setschedpolicy): Also
95123         declare when POSIX_SPAWN_SETSCHEDULER is zero.
95124         (posix_spawnattr_getschedparam, posix_spawnattr_setschedparam): Also
95125         declare when POSIX_SPAWN_SETSCHEDPARAM is zero.
95126         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Test whether
95127         POSIX_SPAWN_SETSCHEDULER or POSIX_SPAWN_SETSCHEDPARAM are zero.
95128         * modules/posix_spawnattr_getschedparam (configure.ac): Enable the
95129         replacement also when POSIX_SPAWN_SETSCHEDPARAM is zero.
95130         * modules/posix_spawnattr_setschedparam (configure.ac): Likewise.
95131         * modules/posix_spawnattr_getschedpolicy (configure.ac): Enable the
95132         replacement also when POSIX_SPAWN_SETSCHEDULER is zero.
95133         * modules/posix_spawnattr_setschedpolicy (configure.ac): Likewise.
95134         * lib/spawnattr_getschedparam.c (posix_spawnattr_getschedparam): Do
95135         nothing if POSIX_SPAWN_SETSCHEDPARAM is zero.
95136         * lib/spawnattr_setschedparam.c (posix_spawnattr_setschedparam):
95137         Likewise.
95138         * lib/spawnattr_getschedpolicy.c (posix_spawnattr_getschedpolicy): Do
95139         nothing if POSIX_SPAWN_SETSCHEDULER is zero.
95140         * lib/spawnattr_setschedpolicy.c (posix_spawnattr_setschedpolicy):
95141         Likewise.
95142         * tests/test-spawn.c (main): Make it work when
95143         POSIX_SPAWN_SETSCHEDPARAM and POSIX_SPAWN_SETSCHEDULER are zero.
95145 2010-03-07  Bruno Haible  <bruno@clisp.org>
95147         Fix incorrect Makefile.am generation in German locale.
95148         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
95149         Execute sed command with character range in C locale.
95151 2010-03-06  Bruno Haible  <bruno@clisp.org>
95153         Tests for module 'iconv-h'.
95154         * modules/iconv-h-tests: New file.
95155         * tests/test-iconv-h.c: New file.
95157         New module 'iconv-h'.
95158         * modules/iconv-h: New file.
95159         * modules/iconv_open (Files): Remove lib/iconv.in.h, m4/iconv_h.m4.
95160         (Depends-on): Add iconv-h. Remove include_next, arg-nonnull.
95161         (configure.ac): Remove gl_ICONV_H.
95162         (Makefile.am): Remove rule for iconv.h.
95164 2010-03-06  Bruno Haible  <bruno@clisp.org>
95166         More consistent naming of *.m4 files.
95167         * m4/wctype_h.m4: Renamed from m4/wctype.m4.
95168         * modules/wctype (Files): Update.
95170         More consistent naming of *.m4 files.
95171         * m4/wchar_h.m4: Renamed from m4/wchar.m4.
95172         * modules/wchar (Files): Update.
95174 2010-03-06  Jim Meyering  <meyering@redhat.com>
95176         euidaccess: relax license to LGPLv2+
95177         * modules/euidaccess (License): Relax to LGPLv2+.
95179 2010-03-06  Bruno Haible  <bruno@clisp.org>
95181         Prefer lib_SOURCES over unconditional AC_LIBOBJ.
95182         * modules/exitfail (configure.ac): Remove AC_LIBOBJ invocation.
95183         (Makefile.am): Augment lib_SOURCES instead.
95185 2010-03-04  Jim Meyering  <meyering@redhat.com>
95187         utime: remove obsolete module
95188         This module, like autoconf's AC_FUNC_UTIME_NULL macro, has been
95189         unnecessary for years, and has been marked as obsolete for 10 months.
95190         * modules/utime: Remove file.
95191         * lib/utime.c: Remove file.
95192         * m4/utime.m4: Remove file.
95193         * m4/utimes-null.m4: Remove file.
95194         * doc/posix-functions/utime.texi (utime): Remove reference to
95195         the module.  Move the sole "fixed by gnulib" item into the
95196         "problems not fixed by Gnulib" list.
95197         * MODULES.html.sh (func_all_modules): Remove reference to "utime".
95199 2010-03-05  Simon Josefsson  <simon@josefsson.org>
95201         * modules/exit (License): Relax license to LGPLv2+.
95202         (Status): Mark as obsolete.
95203         * NEWS: Mention deprecated 'exit' module.
95204         * doc/posix-functions/exit.texi: Recommend 'stdlib' module instead
95205         of now obsolete 'exit'.
95207 2010-03-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
95209         fts-lgpl: remove unused module
95210         * modules/fts-lgpl: Remove.
95211         * MODULES.html.sh (func_all_modules): Adjust.
95212         * check-module (find_included_lib_files): Adjust.
95213         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove.
95215 2010-03-02  Ben Walton  <bwalton@artsci.utoronto.ca>  (tiny change)
95217         copy-acl: enhance Solaris ACL error handling
95218         * lib/copy-acl.c (qcopy_acl): Also ignore EOPNOTSUPP.
95219         * lib/set-mode-acl.c (qset_acl): Likewise.
95221 2010-03-02  Bruno Haible  <bruno@clisp.org>
95223         spawn: Don't override the system defined values on FreeBSD 8.
95224         * lib/spawn.in.h (POSIX_SPAWN_RESETIDS, POSIX_SPAWN_SETPGROUP,
95225         POSIX_SPAWN_SETSIGDEF, POSIX_SPAWN_SETSIGMASK,
95226         POSIX_SPAWN_SETSCHEDPARAM, POSIX_SPAWN_SETSCHEDULER): Don't redefine
95227         if HAVE_POSIX_SPAWN is 1.
95228         Reported by Johan van Selst <johans@stack.nl> via Eric Blake.
95230 2010-03-01  Bruno Haible  <bruno@clisp.org>
95232         * doc/gnulib-tool.texi (Initial import): Clarify the requirements
95233         regarding Automake.
95235 2010-02-25  Bruno Haible  <bruno@clisp.org>
95237         Fix breakage of gnulib-tool with ksh, introduced on 2010-02-21.
95238         * gnulib-tool: Define 'echo' as a function only before the ksh alias
95239         setting, not afterwards.
95240         Reported by Ben Walton <bwalton@artsci.utoronto.ca>.
95242 2010-02-24  Eric Blake  <eblake@redhat.com>
95244         bootstrap, git-version-gen: use timestamp
95245         * build-aux/git-version-gen (scriptversion): Force UTC.
95246         * build-aux/bootstrap (scriptversion): New variable.
95248         bootstrap: allow older git
95249         * build-aux/bootstrap (GNULIB_SRCDIR): Add fallback if git is
95250         older than 1.6.4.  Requested by the libvirt project.
95252 2010-02-23  Eric Blake  <eblake@redhat.com>
95254         warn-on-use: work with old autoconf
95255         * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Accomodate older
95256         AS_VAR semantics of autoconf 2.60.
95257         Reported by Bruno Haible.
95259         bootstrap: improve some comments
95260         * build-aux/bootstrap: Drop unneeded emacs hint.  Add some
95261         clarification comments.
95263         gettimeofday: provide correct function
95264         * lib/gettimeofday.c (gettimeofday): Provide rpl_gettimeofday only
95265         when replacement is declared, otherwise provide gettimeofday.
95266         Reported by Michael Goffioul.
95268 2010-02-23  Jim Meyering  <meyering@redhat.com>
95270         lib-ignore: relax license to "unlimited", not LGPLv2+
95271         * modules/lib-ignore (License): Relax to "unlimited".
95273 2010-02-23  Jim Meyering  <meyering@redhat.com>
95275         lib-ignore: relax license to LGPLv2+
95276         * modules/lib-ignore (License): Relax to LGPLv2+.
95278 2010-02-22  Eric Blake  <eblake@redhat.com>
95280         lseek: avoid bash 3.2 broken pipe bug
95281         * m4/lseek.m4 (gl_FUNC_LSEEK): Drain pipe, to avoid spurious
95282         warning from bash 3.2.
95283         Reported by Ben Pfaff, with analysis from Bruno Haible.
95285         bootstrap: support non-FSF copyright holder
95286         * build-aux/bootstrap (COPYRIGHT_HOLDER, with_gettext): Allow
95287         bootstrap.conf override of COPYRIGHT_HOLDER.
95288         (MSGID_BUGS_ADDRESS): Allow URL rather than email.
95290         bootstrap: interoperate with gettext 0.14.1
95291         * build-aux/bootstrap (slurp): Fix typo when using older gettext.
95293         bootstrap: allow for alternate submodule location
95294         * build-aux/bootstrap (gnulib_path): New variable; use instead of
95295         hardcoding submodule location.
95296         (gnulib_mk): Allow direct use of Makefile.am.
95298         bootstrap: use GNULIB_SRCDIR to reduce disk usage
95299         * build-aux/bootstrap (GNULIB_SRCDIR): If set, use as a reference,
95300         rather than reconfiguring where the submodule points.
95302         gettimeofday: restore support for platforms that lack function
95303         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Also compile
95304         replacement if function is missing.
95305         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_DEFAULTS): New witness.
95306         * modules/sys_time (Makefile.am): Substitute it.
95307         * lib/sys_time.in.h (gettimeofday): Check it.
95308         Reported by Michael Goffioul.
95310 2010-02-21  Bruno Haible  <bruno@clisp.org>
95312         * lib/stdio.in.h (obstack_printf): Fix typo.
95314 2010-02-21  Jose E. Marchesi  <jemarch@gnu.org>
95316         vc-list-files: use bzr ls's -R option
95317         * build-aux/vc-list-files: Invoke bazaar to generate a recursive
95318         list of versioned files based on 'dir' (usage of -R in 'bzr ls').
95320 2010-02-21  Jim Meyering  <meyering@redhat.com>
95322         init.sh: fix EXEEXT shims to work also for names like test-prog
95323         * tests/init.sh: Re-exec a better shell, when needed.
95324         If the current shell lacks support for posix $(...), an init.sh-using
95325         test will now try to find a shell that supports that.  If EXEEXT is
95326         nonempty, we also require support for hyphen-in-alias-name and shell
95327         substitutions like ${var#glob}.  Failure to find such a shell results
95328         in a skipped test.
95330 2010-02-21  Bruno Haible  <bruno@clisp.org>
95332         Really work around "broken pipe" error message from bash 3.2.
95333         * gnulib-tool (func_reset_sigpipe): Remove function.
95334         (echo): In bash 3.2, define to a function that uses printf.
95335         Analyzed by Ralf Wildenhues, Chet Ramey, Ben Pfaff.
95337 2010-02-20  Bruno Haible  <bruno@clisp.org>
95339         Restore support for automake 1.9.6 with autoconf 2.61.
95340         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): Ensure MKDIR_P is AC_SUBSTed.
95341         Reported by James Youngman <jay@gnu.org>.
95343 2010-02-20  Bruno Haible  <bruno@clisp.org>
95345         Improve *printf warning condition.
95346         * lib/stdio.in.h (fprintf, printf, vfprintf, vprintf): Emit warning
95347         also if GNULIB_POSIXCHECK is defined, the *-posix module is not used,
95348         and the function is overridden due to SIGPIPE emulation.
95350 2010-02-20  Bruno Haible  <bruno@clisp.org>
95352         * lib/stdio.in.h: Tweak comments.
95354 2010-02-19  Bruno Haible  <bruno@clisp.org>
95356         Make it easier to find modules. New gnulib-tool option '--find'.
95357         * gnulib-tool: New option --find.
95358         (func_usage): Document it.
95359         (func_sanitize_modulelist): New function, extracted from
95360         func_all_modules.
95361         (func_all_modules): Invoke it.
95362         * doc/gnulib-tool.texi (Which modules?): New node.
95364 2010-02-18  Markus Duft  <mduft@gentoo.org>  (tiny change)
95366         * lib/sys_select.in.h: Provide select replacement even if
95367         sys/select.h exists on a system, for Interix.
95369 2010-02-18  Jim Meyering  <meyering@redhat.com>
95371         init.sh: don't use $(...) just yet
95372         * tests/init.sh (create_exe_shim_functions_): Use `...`, not $(...),
95373         to accommodate e.g., Solaris' /bin/sh.
95375 2010-02-17  Bruno Haible  <bruno@clisp.org>
95377         * doc/posix-headers/netdb.texi: Mention NetBSD 5.0 problem.
95378         Reported by Ludovic Courtès <ludo@gnu.org>.
95380 2010-02-16  Simon Josefsson  <simon@josefsson.org>
95382         * modules/userspec-tests (test_userspec_LDADD): Add variable, for
95383         linking with -lintl.
95385 2010-02-17  Simon Josefsson  <simon@josefsson.org>
95387         * lib/netdb.in.h (AI_V4MAPPED, AI_ALL, AI_ADDRCONFIG): Define to 0
95388         if not provided by the system's netdb.h.  Reported by
95389         ludo@gnu.org (Ludovic Courtès).
95391 2010-02-15  Jim Meyering  <meyering@redhat.com>
95393         init.sh: improve portability and efficiency
95394         * tests/init.sh (find_exe_basenames_): Remove unnecessary use of
95395         "dummy" in a for loop.
95396         Use '!', not '^' to select the complement of a character set used
95397         in a "case" statement.
95398         Use shell variable manipulation, a la ${...%.exe}, rather than sed.
95399         Suggestions from Eric Blake.
95401         init.sh: automatically accommodate programs with the .exe suffix
95402         Automatically arrange for an invocation of "prog" to execute the
95403         program named "prog$EXEEXT" (usually prog.exe).  Thus, all invocations
95404         may use the simpler "prog", yet still work when built on a system
95405         that requires specifying the added suffix.
95406         Do this by constructing a function named "prog" that invokes
95407         "prog.exe" for each .exe file in selected directories.
95408         * tests/init.sh (find_exe_basenames_): New function.
95409         (create_exe_shim_functions_): New function.
95410         (path_prepend_): Use it.
95412         maint.mk: mark syntax-check sc_*.m rules as .PHONY
95413         * top/maint.mk ($(syntax-check-rules)): Add .PHONY, so that
95414         "make -t syntax-check" doesn't create a ton of sc_*.m files.
95416 2010-02-14  Jim Meyering  <meyering@redhat.com>
95418         maint.mk: prohibit inclusion of "hash-pjw.h" without_use
95419         * top/maint.mk (sc_prohibit_hash_without_use): Re-add "@".
95420         (sc_prohibit_hash_pjw_without_use): New rule.
95422         maint.mk: allow the default upload destination dir to be overridden
95423         * top/maint.mk (upload_dest_dir_): Define with a default that
95424         preserves the status quo.
95425         (emit_upload_commands): Use it, rather than hard-coding $(PACKAGE).
95426         Reported by Peter Simons.
95428         maint.mk: prohibit inclusion of "hash.h" without_use
95429         * top/maint.mk (sc_prohibit_hash_without_use): New rule.
95431 2010-02-10  Jim Meyering  <meyering@redhat.com>
95433         maint.mk: prohibit inclusion of "ignore-value.h" without_use
95434         * top/maint.mk (sc_prohibit_ignore_value_without_use): New rule.
95436 2010-02-09  Eric Blake  <ebb9@byu.net>
95437         and Bruno Haible  <bruno@clisp.org>
95439         obstack-printf-posix: ensure declaration
95440         * m4/obstack-printf.m4 (gl_DECL_OBSTACK_PRINTF): New macro,
95441         extracted from gl_FUNC_OBSTACK_PRINTF.
95442         (gl_FUNC_OBSTACK_PRINTF): Invoke it.
95443         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_POSIX):
95444         Likewise.
95445         * lib/stdio.in.h (obstack_printf, obstack_vprintf): Declare also
95446         if GNULIB_OBSTACK_PRINTF_POSIX is 1 and GNULIB_OBSTACK_PRINTF is
95447         0.
95449 2010-02-08  Bruno Haible  <bruno@clisp.org>
95451         gnulib-tool: Fix typo in 2010-02-07 commit.
95452         * gnulib-tool (func_get_dependencies): Fix typo in last commit.
95453         Reported by Eric Blake.
95455 2010-02-07  Bruno Haible  <bruno@clisp.org>
95457         gnulib-tool: Fix up caching patches.
95458         * gnulib-tool: New options --cache-modules, --no-cache-modules. Remove
95459         option --no-cache. Use associative arrays when supported by the shell.
95460         (sed_comments): New variable.
95461         (modcache): Renamed from do_cache.
95462         (sed_extract_field_header): Renamed from sed_extract_cache_prog. Don't
95463         abbreviate unnecessarily.
95464         (have_associative): New variable.
95465         (func_cache_var): Define correctly for bash 1.x. Define in an optimized
95466         way also for ksh and zsh.
95467         (func_init_sed_convert_to_cache_statements): New function, extracted
95468         from func_cache_lookup_module. Add support for associative arrays.
95469         Don't set the c_MODULE_cached variable here. Ignore all lines before
95470         the first field header. Remove only the final newline, not all trailing
95471         newlines. Support empty fields correctly. Limit the use of 'eval' to
95472         assignments.
95473         (func_get_description, func_get_status, func_get_notice,
95474         func_get_applicability, func_get_filelist, func_get_dependencies,
95475         func_get_autoconf_early_snippet, func_get_autoconf_snippet,
95476         func_get_automake_snippet, func_get_include_directive,
95477         func_get_link_directive, func_get_license, func_get_maintainer):
95478         Update documentation. List the unoptimized code first. Add support for
95479         associative arrays. Limit the use of 'eval' to assignments.
95480         (func_get_applicability): Undo stylistic pessimisations.
95481         (func_get_automake_snippet, func_get_include_directive): Reduce code
95482         duplication.
95483         (func_modules_transitive_closure, func_modules_add_dummy,
95484         func_modules_notice, func_modules_to_filelist, func_add_file,
95485         func_update_file, func_emit_lib_Makefile_am, func_emit_po_Makevars,
95486         func_emit_po_POTFILES_in, func_emit_tests_Makefile_am, func_import,
95487         func_create_testdir, func_create_megatestdir): Update documentation.
95489 2010-01-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
95491         * gnulib-tool (func_cache_lookup_module): Store the module name
95492         belonging to the cache variable; error out if two different
95493         module names map to the same cache variable name.
95495 2010-01-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
95497         gnulib-tool: Make caching optional.
95498         * gnulib-tool: Accept option --no-cache, turning off $do_cache.
95499         Update matching short versions of --no-changelog.
95500         (func_usage): Update.
95501         (sed_extract_cache_prog): Renamed from ...
95502         (sed_extract_prog): ... this; revert to old extraction script.
95503         (func_get_description, func_get_status)
95504         (func_get_notice, func_get_applicability, func_get_filelist)
95505         (func_get_dependencies, func_get_autoconf_early_snippet)
95506         (func_get_autoconf_snippet, func_get_automake_snippet)
95507         (func_get_include_directive, func_get_link_directive)
95508         (func_get_license, func_get_maintainer): If $do_cache is false,
95509         use old, non-caching extraction scripts.
95510         Suggestion by Bruno Haible.
95512 2010-01-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
95514         gnulib-tool: cache module metainformation.
95515         * gnulib-tool (sed_extract_prog): Match newline before each
95516         header, and rewrite header to a shell variable suffix.
95517         (func_cache_var, func_cache_lookup_module): New functions,
95518         to turn a module name into a cache variable prefix, and to
95519         look up and cache module metainformation.
95520         (func_get_description, func_get_status)
95521         (func_get_notice, func_get_applicability, func_get_filelist)
95522         (func_get_dependencies, func_get_autoconf_early_snippet)
95523         (func_get_autoconf_snippet, func_get_automake_snippet)
95524         (func_get_include_directive, func_get_link_directive)
95525         (func_get_license, func_get_maintainer): Use
95526         func_cache_lookup_module.
95528 2010-02-07  Bruno Haible  <bruno@clisp.org>
95530         fnctl: Fix missing dependency.
95531         * modules/fcntl (Depends-on): Add getdtablesize.
95532         Reported by John W. Eaton <jwe@gnu.org>.
95534 2010-02-05  Sergey Poznyakoff  <gray@gnu.org.ua>
95536         Argp: fix recognition of short alias options.
95538         * lib/argp-parse.c (convert_options): Fix improper use of
95539         `|' between character values.
95540         * tests/test-argp.c (group1_option): New alias option
95541         --read (-r).
95542         (group1_parser): Special handling for 'r'.
95543         (test15): New test case.
95544         (test_fun): Add test15.
95545         * tests/test-argp-2.sh: Update expected --help and --usage
95546         outputs.
95548 2010-02-05  Sergey Poznyakoff  <gray@gnu.org.ua>
95550         * tests/test-argp.c: Fix indentation.
95552 2010-02-04  Eric Blake  <ebb9@byu.net>
95554         gettimeofday: expose type of second argument
95555         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Do better detection
95556         of glibc extension signature, and define GETTIMEOFDAY_TIMEZONE.
95557         * tests/test-gettimeofday.c: Use it to silence warning.
95558         * doc/posix-functions/gettimeofday.texi (gettimeofday): Document
95559         the issue.
95561 2010-02-03  Jim Meyering  <meyering@redhat.com>
95563         regcomp.c: avoid the sole warning from gcc's -Wtype-limits
95564         * lib/regcomp.c (TYPE_SIGNED): Define.
95565         (parse_dup_op): Use it to avoid the sole warning from -Wtype-limits.
95567         regcomp.c: avoid a new -Wshadow warning
95568         * lib/regcomp.c (create_initial_state): Do not shadow local "err".
95570 2010-02-01  Jim Meyering  <meyering@redhat.com>
95572         removing useless parentheses in cpp #define directives
95573         For motivation, see commit c0221df4, "define STREQ(a,b)
95574         consistently, removing useless parentheses"
95575         * lib/memcmp.c (CMP_LT_OR_GT): Remove useless parentheses.
95576         * lib/mountlist.c (MNT_IGNORE): Likewise.
95577         * lib/trim.h (trim, trim_trailing, trim_leading): Likewise.
95579 2010-02-01  Eric Blake  <ebb9@byu.net>
95581         sys_time: use link-warning
95582         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Split defaults...
95583         (gl_HEADER_SYS_TIME_H_DEFAULTS): ...into new macro.
95584         (gl_SYS_TIME_MODULE_INDICATOR): New macro.
95585         * modules/sys_time (Depends-on): Add warn-on-use.
95586         (Makefile.am): Always build replacement.
95587         (configure.ac): Update substitutions.
95588         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY)
95589         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Include defaults, and no longer
95590         bother with SYS_TIME_H.
95591         * modules/gettimeofday (configure.ac): Declare indicator.
95592         * lib/sys_time.in.h (gettimeofday): Warn if gnulib module is not
95593         in use.
95595         closein-tests: silence compiler warning
95596         * tests/test-closein.c (main): Ignore fread result.
95597         * modules/closein-tests (Depends-on): Add ignore-value.
95599         tests: silence warning about system return
95600         * tests/test-areadlink-with-size.c (main): Ignore system result.
95601         * tests/test-areadlink.c (main): Likewise.
95602         * tests/test-areadlinkat-with-size.c (main): Likewise.
95603         * tests/test-areadlinkat.c (main): Likewise.
95604         * tests/test-canonicalize-lgpl.c (main): Likewise.
95605         * tests/test-canonicalize.c (main): Likewise.
95606         * tests/test-chown.c (main): Likewise.
95607         * tests/test-fchownat.c (main): Likewise.
95608         * tests/test-fdutimensat.c (main): Likewise.
95609         * tests/test-fstatat.c (main): Likewise.
95610         * tests/test-futimens.c (main): Likewise.
95611         * tests/test-lchown.c (main): Likewise.
95612         * tests/test-link.c (main): Likewise.
95613         * tests/test-linkat.c (main): Likewise.
95614         * tests/test-lstat.c (main): Likewise.
95615         * tests/test-mkdir.c (main): Likewise.
95616         * tests/test-mkdirat.c (main): Likewise.
95617         * tests/test-mkfifo.c (main): Likewise.
95618         * tests/test-mkfifoat.c (main): Likewise.
95619         * tests/test-mknod.c (main): Likewise.
95620         * tests/test-readlink.c (main): Likewise.
95621         * tests/test-remove.c (main): Likewise.
95622         * tests/test-rename.c (main): Likewise.
95623         * tests/test-renameat.c (main): Likewise.
95624         * tests/test-rmdir.c (main): Likewise.
95625         * tests/test-symlink.c (main): Likewise.
95626         * tests/test-symlinkat.c (main): Likewise.
95627         * tests/test-unlink.c (main): Likewise.
95628         * tests/test-unlinkat.c (main): Likewise.
95629         * tests/test-utimens.c (main): Likewise.
95630         * tests/test-utimensat.c (main): Likewise.
95631         * modules/areadlink-tests (Depends-on): Add ignore-value.
95632         * modules/areadlink-with-size-tests (Depends-on): Likewise.
95633         * modules/areadlinkat-tests (Depends-on): Likewise.
95634         * modules/areadlinkat-with-size-tests (Depends-on): Likewise.
95635         * modules/canonicalize-lgpl-tests (Depends-on): Likewise.
95636         * modules/canonicalize-tests (Depends-on): Likewise.
95637         * modules/chown-tests (Depends-on): Likewise.
95638         * modules/fdutimensat-tests (Depends-on): Likewise.
95639         * modules/futimens-tests (Depends-on): Likewise.
95640         * modules/lchown-tests (Depends-on): Likewise.
95641         * modules/link-tests (Depends-on): Likewise.
95642         * modules/linkat-tests (Depends-on): Likewise.
95643         * modules/lstat-tests (Depends-on): Likewise.
95644         * modules/mkdir-tests (Depends-on): Likewise.
95645         * modules/mkfifo-tests (Depends-on): Likewise.
95646         * modules/mkfifoat-tests (Depends-on): Likewise.
95647         * modules/mknod-tests (Depends-on): Likewise.
95648         * modules/openat-tests (Depends-on): Likewise.
95649         * modules/readlink-tests (Depends-on): Likewise.
95650         * modules/remove-tests (Depends-on): Likewise.
95651         * modules/rename-tests (Depends-on): Likewise.
95652         * modules/renameat-tests (Depends-on): Likewise.
95653         * modules/rmdir-tests (Depends-on): Likewise.
95654         * modules/symlink-tests (Depends-on): Likewise.
95655         * modules/symlinkat-tests (Depends-on): Likewise.
95656         * modules/unlink-tests (Depends-on): Likewise.
95657         * modules/utimens-tests (Depends-on): Likewise.
95658         * modules/utimensat-tests (Depends-on): Likewise.
95660 2010-01-31  Bruno Haible  <bruno@clisp.org>
95662         Perform the same test for many <math.h> functions.
95663         * m4/mathfunc.m4 (gl_COMMON_DOUBLE_MATHFUNC,
95664         gl_COMMON_DOUBLE_MATHFUNC_TEST): New macros.
95665         * m4/sqrt.m4 (gl_FUNC_SQRT): Invoke gl_COMMON_DOUBLE_MATHFUNC instead
95666         of gl_MATHFUNC.
95667         * modules/acos (configure.ac): Likewise.
95668         * modules/asin (configure.ac): Likewise.
95669         * modules/atan (configure.ac): Likewise.
95670         * modules/atan2 (configure.ac): Likewise.
95671         * modules/cbrt (configure.ac): Likewise.
95672         * modules/copysign (configure.ac): Likewise.
95673         * modules/cos (configure.ac): Likewise.
95674         * modules/cosh (configure.ac): Likewise.
95675         * modules/erf (configure.ac): Likewise.
95676         * modules/erfc (configure.ac): Likewise.
95677         * modules/exp (configure.ac): Likewise.
95678         * modules/fmod (configure.ac): Likewise.
95679         * modules/hypot (configure.ac): Likewise.
95680         * modules/j0 (configure.ac): Likewise.
95681         * modules/j1 (configure.ac): Likewise.
95682         * modules/jn (configure.ac): Likewise.
95683         * modules/lgamma (configure.ac): Likewise.
95684         * modules/log (configure.ac): Likewise.
95685         * modules/log10 (configure.ac): Likewise.
95686         * modules/log1p (configure.ac): Likewise.
95687         * modules/pow (configure.ac): Likewise.
95688         * modules/remainder (configure.ac): Likewise.
95689         * modules/sin (configure.ac): Likewise.
95690         * modules/sinh (configure.ac): Likewise.
95691         * modules/tan (configure.ac): Likewise.
95692         * modules/tanh (configure.ac): Likewise.
95693         * modules/y0 (configure.ac): Likewise.
95694         * modules/y1 (configure.ac): Likewise.
95695         * modules/yn (configure.ac): Likewise.
95696         Suggested by Paolo Bonzini.
95698 2010-01-31  Bruno Haible  <bruno@clisp.org>
95700         * m4/getline.m4 (gl_FUNC_GETLINE): Add comment about REPLACE_GETLINE.
95702 2010-01-31  Bruno Haible  <bruno@clisp.org>
95704         Work around getdelim() bug on FreeBSD 8.0.
95705         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Test whether getdelim supports an
95706         initially NULL line. Set REPLACE_GETDELIM if getdelim exists but does
95707         not work.
95708         * lib/stdio.in.h (getdelim): Define as an alias if REPLACE_GETDELIM
95709         is 1.
95710         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize REPLACE_GETDELIM.
95711         * modules/stdio (Makefile.am): Also substitute REPLACE_GETDELIM.
95712         * tests/test-getdelim.c (main): Also test result for a NULL buffer and
95713         a non-zero size.
95714         * doc/posix-functions/getdelim.texi: Mention the FreeBSD bug.
95716 2010-01-31  Bruno Haible  <bruno@clisp.org>
95718         Work around getline() bug on FreeBSD 8.0.
95719         * m4/getline.m4 (gl_FUNC_GETLINE): Also test result for a NULL buffer
95720         and a non-zero size.
95721         * tests/test-getline.c (main): Likewise.
95722         * doc/posix-functions/getline.texi: Mention the FreeBSD bug.
95723         Reported by Dennis <noordsij@cs.helsinki.fi> via Eric Blake.
95725 2010-01-28  Eric Blake  <ebb9@byu.net>
95727         regex: fix build failure
95728         * lib/regex_internal.h (__GNUC_PREREQ): Define for non-glibc
95729         platforms.
95731 2010-01-28  Jim Meyering  <meyering@redhat.com>
95733         regex: do not ignore memory allocation failure
95734         * lib/regex_internal.c (create_cd_newstate): Detect
95735         re_node_set_init_copy failure.   Extracted from glibc commit
95736         2da42bc06566bc89785e580fa1ac89b4c9f2a63c.
95738         regex: sync more white-space changes from libc
95739         * lib/regex_internal.c: White-space only changes.
95740         * lib/regexec.c: Likewise.
95742         regex: add many uses of __attribute_warn_unused_result__
95743         * lib/regex_internal.c: Use __attribute_warn_unused_result__.
95744         * lib/regexec.c: Likewise.
95745         Extracted from a messy glibc commit.
95747         regcomp.c: spelling and merge-artifact from glibc
95748         * lib/regcomp.c: Merge remainder of glibc's
95749         2da42bc06566bc89785e580fa1ac89b4c9f2a63c.
95751         regcomp.c: sync white-space changes from glibc
95752         * lib/regcomp.c: Merge to accommodate white space
95753         changes from glibc's 2da42bc06566bc89785e580fa1ac89b4c9f2a63c.
95755         regcomp.c: do not ignore internal return values
95756         * lib/regcomp.c: Do not ignore internal return values.
95757         This is from glibc's 2da42bc06566bc89785e580fa1ac89b4c9f2a63c,
95758         but without its white-space changes and spelling fixes.
95760         regex_internal.h: define __attribute_warn_unused_result__
95761         * lib/regex_internal.h (__attribute_warn_unused_result__): Define.
95763         maint: add a syntax-check rule to check for vulnerable Makefile.in
95764         * top/maint.mk (sc_vulnerable_makefile_CVE-2009-4029): New rule.
95766 2010-01-27  Jim Meyering  <meyering@redhat.com>
95768         ncftpput-ftp: clean up spaces
95769         * build-aux/ncftpput-ftp: Make Copyright line consistent.
95770         Remove trailing blanks.
95772 2010-01-27  Simon Josefsson  <simon@josefsson.org>
95774         * build-aux/git-version-gen: Fix copyright statement.
95775         * build-aux/gnupload: Likewise.
95776         * tests/test-arcfour.c: Likewise.
95777         * tests/test-arctwo.c: Likewise.
95778         * tests/test-count-one-bits.c: Likewise.
95779         * tests/test-crc.c: Likewise.
95780         * tests/test-des.c: Likewise.
95781         * tests/test-gc-arcfour.c: Likewise.
95782         * tests/test-gc-arctwo.c: Likewise.
95783         * tests/test-gc-des.c: Likewise.
95784         * tests/test-gc-hmac-md5.c: Likewise.
95785         * tests/test-gc-hmac-sha1.c: Likewise.
95786         * tests/test-gc-md2.c: Likewise.
95787         * tests/test-gc-md4.c: Likewise.
95788         * tests/test-gc-md5.c: Likewise.
95789         * tests/test-gc-pbkdf2-sha1.c: Likewise.
95790         * tests/test-gc-rijndael.c: Likewise.
95791         * tests/test-gc-sha1.c: Likewise.
95792         * tests/test-gc.c: Likewise.
95793         * tests/test-gethostname.c: Likewise.
95794         * tests/test-gettimeofday.c: Likewise.
95795         * tests/test-hash.c: Likewise.
95796         * tests/test-hmac-md5.c: Likewise.
95797         * tests/test-hmac-sha1.c: Likewise.
95798         * tests/test-md2.c: Likewise.
95799         * tests/test-md4.c: Likewise.
95800         * tests/test-md5.c: Likewise.
95801         * tests/test-memchr.c: Likewise.
95802         * tests/test-memchr2.c: Likewise.
95803         * tests/test-memcmp.c: Likewise.
95804         * tests/test-memmem.c: Likewise.
95805         * tests/test-memrchr.c: Likewise.
95806         * tests/test-rawmemchr.c: Likewise.
95807         * tests/test-read-file.c: Likewise.
95808         * tests/test-rijndael.c: Likewise.
95809         * tests/test-sockets.c: Likewise.
95810         * tests/test-strchrnul.c: Likewise.
95811         * tests/test-strstr.c: Likewise.
95812         * tests/test-strtod.c: Likewise.
95813         * build-aux/ncftpput-ftp: Likewise.
95815 2010-01-26  Eric Blake  <ebb9@byu.net>
95817         ignore-value: update recommended header name
95818         * modules/ignore-value (Include): Only use <> for headers that
95819         exist in glibc.
95821 2010-01-26  Jim Meyering  <meyering@redhat.com>
95823         test-userspec.c: avoid compiler warnings
95824         * tests/test-userspec.c (main): Avoid shadowing ("uid"),
95825         and "initialization discards qualifiers..." warnings.
95826         Put the first "uid" in its own scope, and make char* members "const".
95828 2010-01-25  Bruno Haible  <bruno@clisp.org>
95830         gnulib-tool: Make warning diagnostics consistent.
95831         * gnulib-tool (func_warning): New function.
95832         Use it everywhere where gnulib-tool produces output to stderr and it is
95833         not a fatal error.
95835 2010-01-25  Bruno Haible  <bruno@clisp.org>
95837         Fix test dependencies.
95838         * modules/xstrtol-tests (Depends-on): Add inttypes.
95839         * modules/xstrtoll-tests (Depends-on): Likewise. Remove xstrtoll.
95841 2010-01-25  Pádraig Brady  <P@draigBrady.com>
95843         syntax-check: detect incorrect boolean macro values in config.h
95844         * modules/maintainer-makefile (configure.ac): Parameterize the location
95845         of config.h which will be available to makefiles as $(CONFIG_INCLUDE).
95846         The logic is from Eric Blake and the location indicated by Jim Meyering.
95847         Note the more natural CONFIG_HEADER name is prohibited by automake
95848         for backwards compatibility reasons.
95849         * top/maint.mk (sc_Wundef_boolean): New rule.
95851 2010-01-25  Jim Meyering  <meyering@redhat.com>
95853         bootstrap: detect MacOS 10.6's shasum, too
95854         * build-aux/bootstrap: Also recognize MacOS 10.6's shasum.
95855         Suggested by Thomas Treichl <Thomas.Treichl@gmx.net>.
95857 2010-01-23  Jim Meyering  <meyering@redhat.com>
95859         xstrtoll: new module
95860         * modules/xstrtoll: New file.
95861         * MODULES.html.sh (Numeric conversion functions): Add xstrtoll.
95862         * lib/xstrtol.h [HAVE_LONG_LONG_INT]: Declare xstrtoll and xstrtoull.
95863         * lib/xstrtoll.c, lib/xstrtoull.c: New files.
95864         ./configure fails if you use this module and lack "long long".
95865         * modules/xstrtoll-tests: New module.
95866         * tests/test-xstrtoll.c, tests/test-xstrtoull.c: New files.
95867         * tests/test-xstrtoll.sh: Like test-xstrtol.c, but use the
95868         new init.sh-based test framework.
95870 2010-01-24  Bruno Haible  <bruno@clisp.org>
95872         Tests for module 'yn'.
95873         * modules/yn-tests: New file.
95874         * tests/test-yn.c: New file.
95876         Tests for module 'y1'.
95877         * modules/y1-tests: New file.
95878         * tests/test-y1.c: New file.
95880         Tests for module 'y0'.
95881         * modules/y0-tests: New file.
95882         * tests/test-y0.c: New file.
95884         Tests for module 'tanh'.
95885         * modules/tanh-tests: New file.
95886         * tests/test-tanh.c: New file.
95888         Tests for module 'tan'.
95889         * modules/tan-tests: New file.
95890         * tests/test-tan.c: New file.
95892         Tests for module 'sqrt'.
95893         * modules/sqrt-tests: New file.
95894         * tests/test-sqrt.c: New file.
95896         Tests for module 'sinh'.
95897         * modules/sinh-tests: New file.
95898         * tests/test-sinh.c: New file.
95900         Tests for module 'sin'.
95901         * modules/sin-tests: New file.
95902         * tests/test-sin.c: New file.
95904         Tests for module 'rint'.
95905         * modules/rint-tests: New file.
95906         * tests/test-rint.c: New file.
95908         Tests for module 'remainder'.
95909         * modules/remainder-tests: New file.
95910         * tests/test-remainder.c: New file.
95912         Tests for module 'pow'.
95913         * modules/pow-tests: New file.
95914         * tests/test-pow.c: New file.
95916         Tests for module 'nextafter'.
95917         * modules/nextafter-tests: New file.
95918         * tests/test-nextafter.c: New file.
95920         Tests for module 'modf'.
95921         * modules/modf-tests: New file.
95922         * tests/test-modf.c: New file.
95924         Tests for module 'logb'.
95925         * modules/logb-tests: New file.
95926         * tests/test-logb.c: New file.
95928         Tests for module 'log1p'.
95929         * modules/log1p-tests: New file.
95930         * tests/test-log1p.c: New file.
95932         Tests for module 'log10'.
95933         * modules/log10-tests: New file.
95934         * tests/test-log10.c: New file.
95936         Tests for module 'log'.
95937         * modules/log-tests: New file.
95938         * tests/test-log.c: New file.
95940         Tests for module 'lgamma'.
95941         * modules/lgamma-tests: New file.
95942         * tests/test-lgamma.c: New file.
95944         Tests for module 'ldexp'.
95945         * modules/ldexp-tests: New file.
95946         * tests/test-ldexp.c: New file.
95948         Tests for module 'jn'.
95949         * modules/jn-tests: New file.
95950         * tests/test-jn.c: New file.
95952         Tests for module 'j1'.
95953         * modules/j1-tests: New file.
95954         * tests/test-j1.c: New file.
95956         Tests for module 'j0'.
95957         * modules/j0-tests: New file.
95958         * tests/test-j0.c: New file.
95960         Tests for module 'hypot'.
95961         * modules/hypot-tests: New file.
95962         * tests/test-hypot.c: New file.
95964         Tests for module 'fmod'.
95965         * modules/fmod-tests: New file.
95966         * tests/test-fmod.c: New file.
95968         Tests for module 'fabs'.
95969         * modules/fabs-tests: New file.
95970         * tests/test-fabs.c: New file.
95972         Tests for module 'exp'.
95973         * modules/exp-tests: New file.
95974         * tests/test-exp.c: New file.
95976         Tests for module 'erfc'.
95977         * modules/erfc-tests: New file.
95978         * tests/test-erfc.c: New file.
95980         Tests for module 'erf'.
95981         * modules/erf-tests: New file.
95982         * tests/test-erf.c: New file.
95984         Tests for module 'cosh'.
95985         * modules/cosh-tests: New file.
95986         * tests/test-cosh.c: New file.
95988         Tests for module 'cos'.
95989         * modules/cos-tests: New file.
95990         * tests/test-cos.c: New file.
95992         Tests for module 'copysign'.
95993         * modules/copysign-tests: New file.
95994         * tests/test-copysign.c: New file.
95996         Tests for module 'cbrt'.
95997         * modules/cbrt-tests: New file.
95998         * tests/test-cbrt.c: New file.
96000         Tests for module 'atan2'.
96001         * modules/atan2-tests: New file.
96002         * tests/test-atan2.c: New file.
96004         Tests for module 'atan'.
96005         * modules/atan-tests: New file.
96006         * tests/test-atan.c: New file.
96008         Tests for module 'asin'.
96009         * modules/asin-tests: New file.
96010         * tests/test-asin.c: New file.
96012         Tests for module 'acos'.
96013         * modules/acos-tests: New file.
96014         * tests/test-acos.c: New file.
96016 2010-01-24  Bruno Haible  <bruno@clisp.org>
96018         Fix tests for common <math.h> functions.
96019         * m4/mathfunc.m4 (gl_MATHFUNC): Take two additional parameters. Use a
96020         code snippet that references the function pointer, rather than merely
96021         calling the function. Substitute the FUNC_LIBM variable.
96022         * m4/sqrt.m4 (gl_FUNC_SQRT): Update gl_MATHFUNC invocation.
96023         * modules/acos (configure.ac): Likewise.
96024         * modules/asin (configure.ac): Likewise.
96025         * modules/atan (configure.ac): Likewise.
96026         * modules/atan2 (configure.ac): Likewise.
96027         * modules/cbrt (configure.ac): Likewise.
96028         * modules/copysign (configure.ac): Likewise.
96029         * modules/cos (configure.ac): Likewise.
96030         * modules/cosh (configure.ac): Likewise.
96031         * modules/erf (configure.ac): Likewise.
96032         * modules/erfc (configure.ac): Likewise.
96033         * modules/exp (configure.ac): Likewise.
96034         * modules/fabs (configure.ac): Likewise.
96035         * modules/fmod (configure.ac): Likewise.
96036         * modules/hypot (configure.ac): Likewise.
96037         * modules/j0 (configure.ac): Likewise.
96038         * modules/j1 (configure.ac): Likewise.
96039         * modules/jn (configure.ac): Likewise.
96040         * modules/ldexp (configure.ac): Likewise.
96041         * modules/lgamma (configure.ac): Likewise.
96042         * modules/log (configure.ac): Likewise.
96043         * modules/log10 (configure.ac): Likewise.
96044         * modules/log1p (configure.ac): Likewise.
96045         * modules/logb (configure.ac): Likewise.
96046         * modules/modf (configure.ac): Likewise.
96047         * modules/nextafter (configure.ac): Likewise.
96048         * modules/pow (configure.ac): Likewise.
96049         * modules/remainder (configure.ac): Likewise.
96050         * modules/rint (configure.ac): Likewise.
96051         * modules/sin (configure.ac): Likewise.
96052         * modules/sinh (configure.ac): Likewise.
96053         * modules/tan (configure.ac): Likewise.
96054         * modules/tanh (configure.ac): Likewise.
96055         * modules/y0 (configure.ac): Likewise.
96056         * modules/y1 (configure.ac): Likewise.
96057         * modules/yn (configure.ac): Likewise.
96059 2010-01-24  Bruno Haible  <bruno@clisp.org>
96061         Tests: Defeat inlining of math functions by GCC >= 4.3.0.
96062         * tests/test-acosl.c (x): New variable.
96063         (main): Store argument in x and fetch it from x.
96064         * tests/test-asinl.c (x): New variable.
96065         (main): Store argument in x and fetch it from x.
96066         * tests/test-atanl.c (x): New variable.
96067         (main): Store argument in x and fetch it from x.
96068         * tests/test-cosl.c (x): New variable.
96069         (main): Store argument in x and fetch it from x.
96070         * tests/test-expl.c (x): New variable.
96071         (main): Store argument in x and fetch it from x.
96072         * tests/test-logl.c (x): New variable.
96073         (main): Store argument in x and fetch it from x.
96074         * tests/test-sinl.c (x): New variable.
96075         (main): Store argument in x and fetch it from x.
96076         * tests/test-sqrtl.c (x): New variable.
96077         (main): Store argument in x and fetch it from x.
96078         * tests/test-tanl.c (x): New variable.
96079         (main): Store argument in x and fetch it from x.
96081 2010-01-24  Bruno Haible  <bruno@clisp.org>
96083         Provide EXEEXT and srcdir in TESTS_ENVIRONMENT by default.
96084         * gnulib-tool (func_emit_tests_Makefile_am): Add EXEEXT and srcdir
96085         assignments to the initial TESTS_ENVIRONMENT.
96086         * doc/gnulib.texi (Unit test modules): Document it.
96087         * modules/acl-tests (Makefile.am): Drop EXEEXT assignment from
96088         TESTS_ENVIRONMENT.
96089         * modules/btowc-tests (Makefile.am): Likewise.
96090         * modules/c-stack-tests (Makefile.am): Likewise.
96091         * modules/c-strcase-tests (Makefile.am): Likewise.
96092         * modules/copy-file-tests (Makefile.am): Likewise.
96093         * modules/mbmemcasecmp-tests (Makefile.am): Likewise.
96094         * modules/mbmemcasecoll-tests (Makefile.am): Likewise.
96095         * modules/mbrtowc-tests (Makefile.am): Likewise.
96096         * modules/mbscasecmp-tests (Makefile.am): Likewise.
96097         * modules/mbscasestr-tests (Makefile.am): Likewise.
96098         * modules/mbschr-tests (Makefile.am): Likewise.
96099         * modules/mbscspn-tests (Makefile.am): Likewise.
96100         * modules/mbsinit-tests (Makefile.am): Likewise.
96101         * modules/mbsncasecmp-tests (Makefile.am): Likewise.
96102         * modules/mbsnrtowcs-tests (Makefile.am): Likewise.
96103         * modules/mbspbrk-tests (Makefile.am): Likewise.
96104         * modules/mbspcasecmp-tests (Makefile.am): Likewise.
96105         * modules/mbsrchr-tests (Makefile.am): Likewise.
96106         * modules/mbsrtowcs-tests (Makefile.am): Likewise.
96107         * modules/mbsspn-tests (Makefile.am): Likewise.
96108         * modules/mbsstr-tests (Makefile.am): Likewise.
96109         * modules/nl_langinfo-tests (Makefile.am): Likewise.
96110         * modules/unicase/locale-language-tests (Makefile.am): Likewise.
96111         * modules/unistdio/u16-vasnprintf-tests (Makefile.am): Likewise.
96112         * modules/unistdio/u32-vasnprintf-tests (Makefile.am): Likewise.
96113         * modules/unistdio/u8-vasnprintf-tests (Makefile.am): Likewise.
96114         * modules/unistdio/ulc-vasnprintf-tests (Makefile.am): Likewise.
96115         * modules/uniwbrk/ulc-wordbreaks-tests (Makefile.am): Likewise.
96116         * modules/vasnprintf-posix-tests (Makefile.am): Likewise.
96117         * modules/wcrtomb-tests (Makefile.am): Likewise.
96118         * modules/wcsnrtombs-tests (Makefile.am): Likewise.
96119         * modules/wcsrtombs-tests (Makefile.am): Likewise.
96120         * modules/quotearg-tests (Makefile.am): Drop EXEEXT and srcdir
96121         assignments from TESTS_ENVIRONMENT.
96122         * modules/argp-tests (Makefile.am): Drop TESTS_ENVIRONMENT
96123         augmentation.
96124         * modules/argp-version-etc-tests (Makefile.am): Likewise.
96125         * modules/atexit-tests (Makefile.am): Likewise.
96126         * modules/binary-io-tests (Makefile.am): Likewise.
96127         * modules/closein-tests (Makefile.am): Likewise.
96128         * modules/dprintf-posix-tests (Makefile.am): Likewise.
96129         * modules/exclude-tests (Makefile.am): Likewise.
96130         * modules/fflush-tests (Makefile.am): Likewise.
96131         * modules/fpending-tests (Makefile.am): Likewise.
96132         * modules/fprintf-posix-tests (Makefile.am): Likewise.
96133         * modules/freadahead-tests (Makefile.am): Likewise.
96134         * modules/freadptr-tests (Makefile.am): Likewise.
96135         * modules/freadseek-tests (Makefile.am): Likewise.
96136         * modules/fseek-tests (Makefile.am): Likewise.
96137         * modules/fseeko-tests (Makefile.am): Likewise.
96138         * modules/ftell-tests (Makefile.am): Likewise.
96139         * modules/ftello-tests (Makefile.am): Likewise.
96140         * modules/idpriv-drop-tests (Makefile.am): Likewise.
96141         * modules/idpriv-droptemp-tests (Makefile.am): Likewise.
96142         * modules/lseek-tests (Makefile.am): Likewise.
96143         * modules/parse-duration-tests (Makefile.am): Likewise.
96144         * modules/perror-tests (Makefile.am): Likewise.
96145         * modules/pipe-filter-gi-tests (Makefile.am): Likewise.
96146         * modules/pipe-filter-ii-tests (Makefile.am): Likewise.
96147         * modules/pipe-tests (Makefile.am): Likewise.
96148         * modules/pread-tests (Makefile.am): Likewise.
96149         * modules/printf-posix-tests (Makefile.am): Likewise.
96150         * modules/select-tests (Makefile.am): Likewise.
96151         * modules/sigpipe-tests (Makefile.am): Likewise.
96152         * modules/tsearch-tests (Makefile.am): Likewise.
96153         * modules/unicase/ulc-casecmp-tests (Makefile.am): Likewise.
96154         * modules/unicase/ulc-casecoll-tests (Makefile.am): Likewise.
96155         * modules/uniname/uniname-tests (Makefile.am): Likewise.
96156         * modules/uniwidth/width-tests (Makefile.am): Likewise.
96157         * modules/vdprintf-posix-tests (Makefile.am): Likewise.
96158         * modules/version-etc-tests (Makefile.am): Likewise.
96159         * modules/vfprintf-posix-tests (Makefile.am): Likewise.
96160         * modules/vprintf-posix-tests (Makefile.am): Likewise.
96161         * modules/xalloc-die-tests (Makefile.am): Likewise.
96162         * modules/xprintf-posix-tests (Makefile.am): Likewise.
96163         * modules/xstrtoimax-tests (Makefile.am): Likewise.
96164         * modules/xstrtol-tests (Makefile.am): Likewise.
96165         * modules/xstrtoumax-tests (Makefile.am): Likewise.
96166         * modules/yesno-tests (Makefile.am): Likewise.
96167         Suggested by Jim Meyering.
96169 2010-01-24  Bruno Haible  <bruno@clisp.org>
96171         More documentation.
96172         * doc/gnulib.texi (Writing modules): New chapter.
96173         (Miscellaneous Notes): Move sections "Comments" and "Header files" to
96174         the new chapter.
96176 2010-01-24  Jim Meyering  <meyering@redhat.com>
96178         maint.mk: do not prepend "./" after filtering
96179         * top/maint.mk (_prepend_srcdir_prefix): New variable
96180         (VC_LIST_EXCEPT): Use it to avoid prepending (post-filter)
96181         "./" when $(srcdir) is ".".
96183         define STREQ(a,b) consistently, removing useless parentheses
96184         #define STREQ(a, b) (strcmp ((a), (b)) == 0) is over-parenthesized,
96185         since the only risk is that "a" or "b" contains an unparenthesized
96186         comma, but if either did that, STREQ would have 3 or more arguments.
96187         Hence, #define STREQ(a, b) (strcmp (a, b) == 0) is better.
96188         * lib/fts.c (STREQ): Remove unnecessary parentheses.
96189         * lib/hash-triple.c (STREQ): Likewise.
96190         * tests/test-argv-iter.c (STREQ): Use a and b, not s1 and s2.
96191         * lib/getugroups.c (STREQ): Likewise.
96193 2010-01-23  Jim Meyering  <meyering@redhat.com>
96195         maint.mk: fix syntax-check in a non-srcdir build directory
96196         * top/maint.mk (_dot_escaped_srcdir): Remove erroneous backslash,
96197         introduced in my 2010-01-21 commit, a6da6c45.  Reported by Eric Blake.
96199 2010-01-22  Jim Meyering  <meyering@redhat.com>
96201         userspec: add unit tests
96202         * tests/test-userspec.c: New file.
96203         * modules/userspec-tests: Likewise.
96205 2010-01-21  Jim Meyering  <meyering@redhat.com>
96207         maint.mk: handle source file names containing "." robustly
96208         * top/maint.mk (_dot_escaped_srcdir): Define.
96209         (VC_LIST): Use it in LHS of sed substitution.
96211 2010-01-21  Jiri Denemark  <jdenemar@redhat.com>
96213         maint.mk: fix VC_LIST_EXCEPT for srcdir != builddir
96214         * top/maint.mk (VC_LIST_EXCEPT): Preprocess the output of
96215         $(VC_LIST) to remove a prefix of '$(srcdir)/', so that it works
96216         from a non-srcdir build.
96218 2010-01-20  Eric Blake  <ebb9@byu.net>
96220         warn-on-use: use instead of link-warning
96221         * modules/stdio (Depends-on, Makefile.am): Drop link-warning.
96222         * modules/unistd (Depends-on, Makefile.am): Likewise.
96223         * modules/arpa_inet (Depends-on): Replace link-warning with
96224         warn-on-use.
96225         (Makefile.am): Update rules accordingly.
96226         * modules/ctype (Depends-on, Makefile.am): Likewise.
96227         * modules/dirent (Depends-on, Makefile.am): Likewise.
96228         * modules/fcntl-h (Depends-on, Makefile.am): Likewise.
96229         * modules/inttypes (Depends-on, Makefile.am): Likewise.
96230         * modules/langinfo (Depends-on, Makefile.am): Likewise.
96231         * modules/locale (Depends-on, Makefile.am): Likewise.
96232         * modules/math (Depends-on, Makefile.am): Likewise.
96233         * modules/search (Depends-on, Makefile.am): Likewise.
96234         * modules/signal (Depends-on, Makefile.am): Likewise.
96235         * modules/spawn (Depends-on, Makefile.am): Likewise.
96236         * modules/stdlib (Depends-on, Makefile.am): Likewise.
96237         * modules/string (Depends-on, Makefile.am): Likewise.
96238         * modules/strings (Depends-on, Makefile.am): Likewise.
96239         * modules/sys_file (Depends-on, Makefile.am): Likewise.
96240         * modules/sys_ioctl (Depends-on, Makefile.am): Likewise.
96241         * modules/sys_select (Depends-on, Makefile.am): Likewise.
96242         * modules/sys_socket (Depends-on, Makefile.am): Likewise.
96243         * modules/sys_stat (Depends-on, Makefile.am): Likewise.
96244         * modules/sys_times (Depends-on, Makefile.am): Likewise.
96245         * modules/sys_utsname (Depends-on, Makefile.am): Likewise.
96246         * modules/wchar (Depends-on, Makefile.am): Likewise.
96247         * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Check which functions
96248         should be poisoned.
96249         * m4/ctype.m4 (gl_CTYPE_H): Likewise.
96250         * m4/dirent_h.m4 (gl_DIRENT_H): Likewise.
96251         * m4/fcntl_h.m4 (gl_FCNTL_H): Likewise.
96252         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
96253         * m4/langinfo_h.m4 (gl_LANGINFO_H): Likewise.
96254         * m4/locale_h.m4 (gl_LOCALE_H): Likewise.
96255         * m4/math_h.m4 (gl_MATH_H): Likewise.
96256         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
96257         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
96258         * m4/spawn_h.m4 (gl_SPAWN_H): Likewise.
96259         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
96260         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
96261         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Likewise.
96262         * m4/strings_h.m4 (gl_HEADER_STRINGS_H_BODY): Likewise.
96263         * m4/sys_file_h.m4 (gl_HEADER_SYS_FILE_H_DEFAULTS): Likewise.
96264         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H): Likewise.
96265         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
96266         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
96267         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
96268         * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Likewise.
96269         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H): Likewise.
96270         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
96271         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
96272         * lib/arpa_inet.in.h: Use _GL_WARN_ON_USE instead of
96273         GL_LINK_WARNING.
96274         * lib/ctype.in.h: Likewise.
96275         * lib/dirent.in.h: Likewise.
96276         * lib/fcntl.in.h: Likewise.
96277         * lib/inttypes.in.h: Likewise.
96278         * lib/langinfo.in.h: Likewise.
96279         * lib/locale.in.h: Likewise.
96280         * lib/math.in.h: Likewise.
96281         * lib/search.in.h: Likewise.
96282         * lib/signal.in.h: Likewise.
96283         * lib/spawn.in.h: Likewise.
96284         * lib/stdio.in.h: Likewise.
96285         * lib/stdlib.in.h: Likewise.
96286         * lib/string.in.h: Likewise.
96287         * lib/strings.in.h: Likewise.
96288         * lib/sys_file.in.h: Likewise.
96289         * lib/sys_ioctl.in.h: Likewise.
96290         * lib/sys_select.in.h: Likewise.
96291         * lib/sys_socket.in.h: Likewise.
96292         * lib/sys_stat.in.h: Likewise.
96293         * lib/sys_times.in.h: Likewise.
96294         * lib/sys_utsname.in.h: Likewise.
96295         * lib/unistd.in.h: Likewise.
96296         * lib/wchar.in.h: Likewise.
96298 2010-01-20  Bruno Haible  <bruno@clisp.org>
96300         Avoid duplicate -lm.
96301         * m4/isnan.m4 (gl_ISNAN): Avoid duplicate -lm in $ISNAN_LIBM.
96302         * m4/round.m4 (gl_FUNC_ROUND): Avoid duplicate -lm in $ROUND_LIBM.
96303         * m4/roundf.m4 (gl_FUNC_ROUNDF): Avoid duplicate -lm in $ROUNDF_LIBM.
96304         * m4/roundl.m4 (gl_FUNC_ROUNDL): Avoid duplicate -lm in $ROUNDL_LIBM.
96305         * m4/acosl.m4 (gl_FUNC_ACOSL): Avoid duplicate -lm in $ACOSL_LIBM.
96306         * m4/cosl.m4 (gl_FUNC_COSL): Avoid duplicate -lm in $COSL_LIBM.
96307         * m4/logl.m4 (gl_FUNC_LOGL): Avoid duplicate -lm in $LOGL_LIBM.
96308         * m4/sinl.m4 (gl_FUNC_SINL): Avoid duplicate -lm in $SINL_LIBM.
96309         * m4/sqrtl.m4 (gl_FUNC_SQRTL): Avoid duplicate -lm in $SQRTL_LIBM.
96310         * m4/tanl.m4 (gl_FUNC_TANL): Avoid duplicate -lm in $TANL_LIBM.
96311         * m4/asinl.m4 (gl_FUNC_ASINL): Same change, for consistency.
96312         * m4/atanl.m4 (gl_FUNC_ATANL): Likewise.
96313         Reported by Paolo Bonzini.
96315 2010-01-19  Bruno Haible  <bruno@clisp.org>
96317         langinfo, nl_langinfo: Relicense under LGPLv2+.
96318         * modules/langinfo (License): Change to LGPLv2+.
96319         * modules/nl_langinfo (License): Likewise.
96320         Patch by David Lutterkort <lutter@redhat.com>.
96322 2010-01-19  Bruno Haible  <bruno@clisp.org>
96324         Avoid compilation error with cc on OSF/1 5.1.
96325         * lib/fcntl.in.h: Include <unistd.h> after the #include_next <fcntl.h>
96326         statement, not before.
96327         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
96329 2010-01-18  Bruno Haible  <bruno@clisp.org>
96331         Avoid a link error due to the __printf__ symbol.
96332         * lib/stdio.in.h (__attribute__): Define to empty also for gcc 2.5.x
96333         and 2.6.x.
96334         (__format__, __printf__): Remove definitions.
96335         * lib/argp-fmtstream.h: Likewise.
96336         * lib/argp.h: Likewise.
96337         * lib/error.h: Likewise.
96338         * lib/vasnprintf.h: Likewise.
96339         * lib/xprintf.h: Likewise.
96340         * lib/xvasprintf.h: Likewise.
96341         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
96343 2010-01-18  Bruno Haible  <bruno@clisp.org>
96345         Tests for module 'tanl'.
96346         * modules/tanl-tests: New file.
96347         * tests/test-tanl.c: New file.
96349         Tests for module 'sqrtl'.
96350         * modules/sqrtl-tests: New file.
96351         * tests/test-sqrtl.c: New file.
96353         Tests for module 'sinl'.
96354         * modules/sinl-tests: New file.
96355         * tests/test-sinl.c: New file.
96357         Tests for module 'logl'.
96358         * modules/logl-tests: New file.
96359         * tests/test-logl.c: New file.
96361         Tests for module 'expl'.
96362         * modules/expl-tests: New file.
96363         * tests/test-expl.c: New file.
96365         Tests for module 'cosl'.
96366         * modules/cosl-tests: New file.
96367         * tests/test-cosl.c: New file.
96369         Tests for module 'atanl'.
96370         * modules/atanl-tests: New file.
96371         * tests/test-atanl.c: New file.
96373         Tests for module 'asinl'.
96374         * modules/asinl-tests: New file.
96375         * tests/test-asinl.c: New file.
96377         Tests for module 'acosl'.
96378         * modules/acosl-tests: New file.
96379         * tests/test-acosl.c: New file.
96381         New modules acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl, tanl.
96382         * lib/math.in.h (acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl,
96383         tanl): Use the standard gnulib idiom.
96384         * lib/cosl.c: Don't include trigl.c and sincosl.c.
96385         * lib/sinl.c: Likewise.
96386         * lib/tanl.c: Don't include trigl.c.
96387         (kernel_tanl): Make static.
96388         * lib/sincosl.c: Include trigl.h first.
96389         * lib/trigl.c: Likewise.
96390         * m4/acosl.m4: New file.
96391         * m4/asinl.m4: New file.
96392         * m4/atanl.m4: New file.
96393         * m4/cosl.m4: New file.
96394         * m4/expl.m4: New file.
96395         * m4/logl.m4: New file.
96396         * m4/sinl.m4: New file.
96397         * m4/sqrtl.m4: New file.
96398         * m4/tanl.m4: New file.
96399         * m4/mathl.m4: Remove file.
96400         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_* and HAVE_*
96401         variables for acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl, tanl.
96402         Don't initialize GNULIB_MATHL.
96403         * modules/acosl: New file.
96404         * modules/asinl: New file.
96405         * modules/atanl: New file.
96406         * modules/cosl: New file.
96407         * modules/expl: New file.
96408         * modules/logl: New file.
96409         * modules/sinl: New file.
96410         * modules/sqrtl: New file.
96411         * modules/tanl: New file.
96412         * modules/math (Makefile.am): Substitute GNULIB_* and HAVE_* variables
96413         for acosl, asinl, atanl, cosl, expl, logl, sinl, sqrtl, tanl. Don't
96414         substitute GNULIB_MATHL.
96415         * modules/mathl: Rewritten.
96416         * doc/posix-functions/acosl.texi: Mention the 'acosl' module.
96417         * doc/posix-functions/asinl.texi: Mention the 'asinl' module.
96418         * doc/posix-functions/atanl.texi: Mention the 'atanl' module.
96419         * doc/posix-functions/cosl.texi: Mention the 'cosl' module.
96420         * doc/posix-functions/expl.texi: Mention the 'expl' module.
96421         * doc/posix-functions/logl.texi: Mention the 'logl' module.
96422         * doc/posix-functions/sinl.texi: Mention the 'sinl' module.
96423         * doc/posix-functions/sqrtl.texi: Mention the 'sqrtl' module.
96424         * doc/posix-functions/tanl.texi: Mention the 'tanl' module.
96426 2010-01-18  Bruno Haible  <bruno@clisp.org>
96428         sqrt: Make gl_FUNC_SQRT requirable.
96429         * m4/sqrt.m4: New file.
96430         * modules/sqrt (Files): Add it.
96431         (configure.ac): Invoke gl_FUNC_SQRT.
96433 2010-01-18  Bruno Haible  <bruno@clisp.org>
96435         New modules for common <math.h> functions.
96436         * m4/mathfunc.m4: New file.
96437         * modules/acos: New file.
96438         * modules/asin: New file.
96439         * modules/atan: New file.
96440         * modules/atan2: New file.
96441         * modules/cbrt: New file.
96442         * modules/copysign: New file.
96443         * modules/cos: New file.
96444         * modules/cosh: New file.
96445         * modules/erf: New file.
96446         * modules/erfc: New file.
96447         * modules/exp: New file.
96448         * modules/fabs: New file.
96449         * modules/fmod: New file.
96450         * modules/hypot: New file.
96451         * modules/j0: New file.
96452         * modules/j1: New file.
96453         * modules/jn: New file.
96454         * modules/ldexp: New file.
96455         * modules/lgamma: New file.
96456         * modules/log: New file.
96457         * modules/log10: New file.
96458         * modules/log1p: New file.
96459         * modules/logb: New file.
96460         * modules/modf: New file.
96461         * modules/nextafter: New file.
96462         * modules/pow: New file.
96463         * modules/remainder: New file.
96464         * modules/rint: New file.
96465         * modules/sin: New file.
96466         * modules/sinh: New file.
96467         * modules/sqrt: New file.
96468         * modules/tan: New file.
96469         * modules/tanh: New file.
96470         * modules/y0: New file.
96471         * modules/y1: New file.
96472         * modules/yn: New file.
96473         * doc/posix-functions/acos.texi: Mention the 'acos' module.
96474         * doc/posix-functions/asin.texi: Mention the 'asin' module.
96475         * doc/posix-functions/atan.texi: Mention the 'atan' module.
96476         * doc/posix-functions/atan2.texi: Mention the 'atan2' module.
96477         * doc/posix-functions/cbrt.texi: Mention the 'cbrt' module.
96478         * doc/posix-functions/copysign.texi: Mention the 'copysign' module.
96479         * doc/posix-functions/cos.texi: Mention the 'cos' module.
96480         * doc/posix-functions/cosh.texi: Mention the 'cosh' module.
96481         * doc/posix-functions/erf.texi: Mention the 'erf' module.
96482         * doc/posix-functions/erfc.texi: Mention the 'erfc' module.
96483         * doc/posix-functions/exp.texi: Mention the 'exp' module.
96484         * doc/posix-functions/fabs.texi: Mention the 'fabs' module.
96485         * doc/posix-functions/fmod.texi: Mention the 'fmod' module.
96486         * doc/posix-functions/hypot.texi: Mention the 'hypot' module.
96487         * doc/posix-functions/j0.texi: Mention the 'j0' module.
96488         * doc/posix-functions/j1.texi: Mention the 'j1' module.
96489         * doc/posix-functions/jn.texi: Mention the 'jn' module.
96490         * doc/posix-functions/ldexp.texi: Mention the 'ldexp' module.
96491         * doc/posix-functions/lgamma.texi: Mention the 'lgamma' module.
96492         * doc/posix-functions/log.texi: Mention the 'log' module.
96493         * doc/posix-functions/log10.texi: Mention the 'log10' module.
96494         * doc/posix-functions/log1p.texi: Mention the 'log1p' module.
96495         * doc/posix-functions/logb.texi: Mention the 'logb' module.
96496         * doc/posix-functions/modf.texi: Mention the 'modf' module.
96497         * doc/posix-functions/nextafter.texi: Mention the 'nextafter' module.
96498         * doc/posix-functions/pow.texi: Mention the 'pow' module.
96499         * doc/posix-functions/remainder.texi: Mention the 'remainder' module.
96500         * doc/posix-functions/rint.texi: Mention the 'rint' module.
96501         * doc/posix-functions/sin.texi: Mention the 'sin' module.
96502         * doc/posix-functions/sinh.texi: Mention the 'sinh' module.
96503         * doc/posix-functions/sqrt.texi: Mention the 'sqrt' module.
96504         * doc/posix-functions/tan.texi: Mention the 'tan' module.
96505         * doc/posix-functions/tanh.texi: Mention the 'tanh' module.
96506         * doc/posix-functions/y0.texi: Mention the 'y0' module.
96507         * doc/posix-functions/y1.texi: Mention the 'y1' module.
96508         * doc/posix-functions/yn.texi: Mention the 'yn' module.
96510 2010-01-18  Jim Meyering  <meyering@redhat.com>
96512         ignore-value: relax license to LGPLv2+
96513         * modules/ignore-value (License): Relax to LGPLv2+.
96515         getdate: don't leak when TZ contains two or more '"'s
96516         * lib/getdate.y (get_date): Don't leak a copy of TZ for each
96517         double quote in TZ after the first one.
96519         readtokens: do not leak internal token_lengths buffer
96520         * lib/readtokens.c (readtokens): Free the local, lengths,
96521         when the supplied "token_lengths" parameter is NULL.
96523 2010-01-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
96525         Fix a couple of missing LIBTHREAD link failures on AIX.
96526         * modules/git-merge-changelog (git_merge_changelog_LDADD): Add
96527         $(LIBTHREAD).
96528         * modules/strsignal-tests (test_strsignal_LDADD): Likewise.
96530         Link test-poll against INET_PTON_LIB.
96531         * modules/poll-tests (test_poll_LDADD): Add $(INET_PTON_LIB),
96532         for inet_pton on Solaris 10.
96534 2010-01-17  Bruno Haible  <bruno@clisp.org>
96536         unistdio/*-sprintf: Fix typo in module description.
96537         * modules/unistdio/u8-sprintf (Depends-on): Fix typo.
96538         * modules/unistdio/u8-u8-sprintf (Depends-on): Likewise.
96539         * modules/unistdio/u16-sprintf (Depends-on): Likewise.
96540         * modules/unistdio/u16-u16-sprintf (Depends-on): Likewise.
96541         * modules/unistdio/u32-sprintf (Depends-on): Likewise.
96542         * modules/unistdio/u32-u32-sprintf (Depends-on): Likewise.
96543         * modules/unistdio/ulc-sprintf (Depends-on): Likewise.
96544         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
96546 2010-01-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
96548         gnulib-tool: fix filelist for AIX, HP-UX ksh.
96549         * gnulib-tool (func_filter_filelist): Do not quote possibly-empty
96550         variables in shell case patterns, for AIX and HP-UX ksh.
96552         Split large sed scripts, for HP-UX sed.
96553         * modules/stdio: Split sed scripts around 50 sed commands,
96554         to avoid HP-UX limit of 99 commands, in the near future.
96555         * modules/string: Likewise.
96556         * modules/unistd: Likewise.
96558         gnulib-tool: avoid writing in the current directory.
96559         * gnulib-tool (func_emit_lib_Makefile_am)
96560         (func_emit_tests_Makefile_am): Put temporary files in $tmp,
96561         not in the current directory, so concurrent gnulib-tool
96562         instances do not interfere.
96564 2010-01-16  Jim Meyering  <meyering@redhat.com>
96566         doc: update users.txt
96567         * users.txt: Add grep.
96568         (diffutils, gzip): Update URLs.
96570 2010-01-12  Bruno Haible  <bruno@clisp.org>
96572         posix_spawn: Avoid test failure on Cygwin.
96573         * tests/test-posix_spawn3.c (DATA_FILENAME) [CYGWIN]: Use less risky
96574         characters.
96575         Reported by Simon Josefsson.
96577 2010-01-12  Bruno Haible  <bruno@clisp.org>
96579         * tests/test-cond.c (main): When skipping the test, show the reason.
96581 2010-01-12  Simon Josefsson  <simon@josefsson.org>
96583         * lib/striconv.c (str_cd_iconv): Avoid if before free.
96585 2010-01-12  Simon Josefsson  <simon@josefsson.org>
96587         * top/maint.mk (VC_LIST_EXCEPT): Filter list through
96588         VC_LIST_ALWAYS_EXCLUDE_REGEX.
96590 2010-01-12  Eric Blake  <ebb9@byu.net>
96592         build: guarantee AS_VAR_IF
96593         * m4/warnings.m4 (gl_WARN_ADD): Use autoconf name.
96594         (gl_AS_VAR_IF): Move...
96595         * m4/gnulib-common.m4 (AS_VAR_IF): ...here.
96596         Reported by Simon Josefsson.
96598 2010-01-12  Simon Josefsson  <simon@josefsson.org>
96600         * lib/stdio.in.h: Fix typo.
96602 2010-01-12  Simon Josefsson  <simon@josefsson.org>
96604         * m4/gc.m4: Check if linking to libgcrypt also needs linking to
96605         libgpg-error.
96607 2010-01-12  Simon Josefsson  <simon@josefsson.org>
96609         * tests/test-xalloc-die.sh: Use $EXEEXT.
96611 2010-01-12  Simon Josefsson  <simon@josefsson.org>
96612             Bruno Haible  <bruno@clisp.org>
96614         getlogin, getlogin_r: Avoid test failure.
96615         * tests/test-getlogin.c: Include <stdio.h>.
96616         (main): Skip the test when the function fails because stdin is not a
96617         tty.
96618         * tests/test-getlogin_r.c: Include <stdio.h>.
96619         (main): Skip the test when the function fails because stdin is not a
96620         tty.
96622 2010-01-11  Eric Blake  <ebb9@byu.net>
96624         tests: avoid more large file warnings
96625         * tests/test-fflush.c: Avoid warning about ftell use.
96626         * tests/test-fseek.c: Avoid warning about fseek use.
96628 2010-01-10  Bruno Haible  <bruno@clisp.org>
96630         nproc: Work better on Linux when /proc and /sys are not mounted.
96631         * lib/nproc.c (num_processors): Use num_processors_via_affinity_mask ()
96632         as lower bound when, on glibc/Linux systems,
96633         sysconf (_SC_NPROCESSORS_CONF) returns 1.
96634         Suggested by Pádraig Brady <P@draigbrady.com>.
96635         Reported by Dmitry V. Levin <ldv@altlinux.org>.
96637         nproc: Refactor.
96638         * lib/nproc.c (num_processors_via_affinity_mask): New function,
96639         extracted from num_processors.
96640         (num_processors): Call it.
96642 2010-01-11  Jim Meyering  <meyering@redhat.com>
96644         utimecmp: avoid new warning from upcoming gcc-4.5.0
96645         * lib/utimecmp.c (BILLION): Define using #define rather than an
96646         anonymous enum, to placate upcoming gcc-4.5.0's -Wenum-compare.
96648 2010-01-11  Eric Blake  <ebb9@byu.net>
96650         math: add portability warnings for classification macros
96651         * modules/math (Depends-on): Add warn-on-use.
96652         (Makefile.am): Provide new substitutions.
96653         * m4/math_h.m4 (gl_MATH_H): Require inline.
96654         * lib/math.in.h (_GL_WARN_REAL_FLOATING_DECL)
96655         (_GL_WARN_REAL_FLOATING_IMPL): New helper macros.
96656         (isfinite, isinf, isnan, signbit) [GNULIB_POSIXCHECK]: Use them to
96657         implement warnings.
96659         unistd: warn on use of environ without module
96660         * modules/unistd (Depends-on): Add warn-on-use.
96661         (Makefile.am): Provide new substitutions.
96662         * m4/unistd_h.m4 (gl_UNISTD_H): Check for inline and environ.
96663         * lib/unistd.in.h (environ): Wrap with a warning helper function.
96665         stdio: warn on suspicious uses
96666         * modules/stdio (Depends-on): Add warn-on-use.
96667         (Makefile.am): Provide new substitutions.
96668         * m4/stdio_h.m4 (gl_STDIO_H): Check for inline, ftello, and
96669         fseeko.
96670         * lib/stdio.in.h (gets): Always warn on use.
96671         (fseek, ftell): Adjust when warnings are issued, and honor
96672         _GL_NO_LARGE_FILES as a way to silence the warning.
96673         * tests/test-fpurge.c [!GNULIB_FSEEK]: Use new means to squelch
96674         any warning about large file offsets.
96675         * tests/test-freadable.c [!GNULIB_FSEEK]: Likewise.
96676         * tests/test-freading.c [!GNULIB_FSEEK]: Likewise.
96677         * tests/test-fseeko.c [!GNULIB_FSEEK]: Likewise.
96678         * tests/test-ftell.c [!GNULIB_FSEEK]: Likewise.
96679         * tests/test-ftello.c [!GNULIB_FSEEK]: Likewise.
96680         * tests/test-fwritable.c [!GNULIB_FSEEK]: Likewise.
96681         * tests/test-fwriting.c [!GNULIB_FSEEK]: Likewise.
96682         * tests/test-getopt.c [!GNULIB_FTELL]: Likewise.
96684         warn-on-use: new module
96685         * modules/warn-on-use: New file.
96686         * build-aux/warn-on-use.h: Likewise.
96687         * m4/warn-on-use.m4: Likewise.
96688         * MODULES.html.sh (Support for building): Mention it.
96690 2010-01-10  Bruno Haible  <bruno@clisp.org>
96692         Tests for module 'unistr/u32-strdup'.
96693         * modules/unistr/u32-strdup-tests: New file.
96694         * tests/unistr/test-u32-strdup.c: New file.
96696         Tests for module 'unistr/u16-strdup'.
96697         * modules/unistr/u16-strdup-tests: New file.
96698         * tests/unistr/test-u16-strdup.c: New file.
96700         Tests for module 'unistr/u8-strdup'.
96701         * modules/unistr/u8-strdup-tests: New file.
96702         * tests/unistr/test-u8-strdup.c: New file.
96703         * tests/unistr/test-strdup.h: New file.
96705         Tests for module 'unistr/u32-strncmp'.
96706         * modules/unistr/u32-strncmp-tests: New file.
96707         * tests/unistr/test-u32-strncmp.c: New file.
96709         Tests for module 'unistr/u16-strncmp'.
96710         * modules/unistr/u16-strncmp-tests: New file.
96711         * tests/unistr/test-u16-strncmp.c: New file.
96713         Tests for module 'unistr/u8-strncmp'.
96714         * modules/unistr/u8-strncmp-tests: New file.
96715         * tests/unistr/test-u8-strncmp.c: New file.
96716         * tests/unistr/test-strncmp.h: New file.
96718         Tests for module 'unistr/u32-strcoll'.
96719         * modules/unistr/u32-strcoll-tests: New file.
96720         * tests/unistr/test-u32-strcoll.c: New file.
96722         Tests for module 'unistr/u16-strcoll'.
96723         * modules/unistr/u16-strcoll-tests: New file.
96724         * tests/unistr/test-u16-strcoll.c: New file.
96726         Tests for module 'unistr/u8-strcoll'.
96727         * modules/unistr/u8-strcoll-tests: New file.
96728         * tests/unistr/test-u8-strcoll.c: New file.
96730         Tests for module 'unistr/u32-strcmp'.
96731         * modules/unistr/u32-strcmp-tests: New file.
96732         * tests/unistr/test-u32-strcmp.c: New file.
96733         * tests/unistr/test-u32-strcmp.h: New file.
96735         Tests for module 'unistr/u16-strcmp'.
96736         * modules/unistr/u16-strcmp-tests: New file.
96737         * tests/unistr/test-u16-strcmp.c: New file.
96738         * tests/unistr/test-u16-strcmp.h: New file.
96740         Tests for module 'unistr/u8-strcmp'.
96741         * modules/unistr/u8-strcmp-tests: New file.
96742         * tests/unistr/test-u8-strcmp.c: New file.
96743         * tests/unistr/test-u8-strcmp.h: New file.
96744         * tests/unistr/test-strcmp.h: New file.
96746         Tests for module 'unistr/u32-strncat'.
96747         * modules/unistr/u32-strncat-tests: New file.
96748         * tests/unistr/test-u32-strncat.c: New file.
96750         Tests for module 'unistr/u16-strncat'.
96751         * modules/unistr/u16-strncat-tests: New file.
96752         * tests/unistr/test-u16-strncat.c: New file.
96754         Tests for module 'unistr/u8-strncat'.
96755         * modules/unistr/u8-strncat-tests: New file.
96756         * tests/unistr/test-u8-strncat.c: New file.
96757         * tests/unistr/test-strncat.h: New file.
96759         Tests for module 'unistr/u32-strcat'.
96760         * modules/unistr/u32-strcat-tests: New file.
96761         * tests/unistr/test-u32-strcat.c: New file.
96763         Tests for module 'unistr/u16-strcat'.
96764         * modules/unistr/u16-strcat-tests: New file.
96765         * tests/unistr/test-u16-strcat.c: New file.
96767         Tests for module 'unistr/u8-strcat'.
96768         * modules/unistr/u8-strcat-tests: New file.
96769         * tests/unistr/test-u8-strcat.c: New file.
96770         * tests/unistr/test-strcat.h: New file.
96772         Tests for module 'unistr/u32-stpncpy'.
96773         * modules/unistr/u32-stpncpy-tests: New file.
96774         * tests/unistr/test-u32-stpncpy.c: New file.
96776         Tests for module 'unistr/u16-stpncpy'.
96777         * modules/unistr/u16-stpncpy-tests: New file.
96778         * tests/unistr/test-u16-stpncpy.c: New file.
96780         Tests for module 'unistr/u8-stpncpy'.
96781         * modules/unistr/u8-stpncpy-tests: New file.
96782         * tests/unistr/test-u8-stpncpy.c: New file.
96783         * tests/unistr/test-stpncpy.h: New file.
96785         Tests for module 'unistr/u32-strncpy'.
96786         * modules/unistr/u32-strncpy-tests: New file.
96787         * tests/unistr/test-u32-strncpy.c: New file.
96789         Tests for module 'unistr/u16-strncpy'.
96790         * modules/unistr/u16-strncpy-tests: New file.
96791         * tests/unistr/test-u16-strncpy.c: New file.
96793         Tests for module 'unistr/u8-strncpy'.
96794         * modules/unistr/u8-strncpy-tests: New file.
96795         * tests/unistr/test-u8-strncpy.c: New file.
96796         * tests/unistr/test-strncpy.h: New file.
96798         Tests for module 'unistr/u32-stpcpy'.
96799         * modules/unistr/u32-stpcpy-tests: New file.
96800         * tests/unistr/test-u32-stpcpy.c: New file.
96802         Tests for module 'unistr/u16-stpcpy'.
96803         * modules/unistr/u16-stpcpy-tests: New file.
96804         * tests/unistr/test-u16-stpcpy.c: New file.
96806         Tests for module 'unistr/u8-stpcpy'.
96807         * modules/unistr/u8-stpcpy-tests: New file.
96808         * tests/unistr/test-u8-stpcpy.c: New file.
96809         * tests/unistr/test-stpcpy.h: New file.
96811         Tests for module 'unistr/u32-strcpy'.
96812         * modules/unistr/u32-strcpy-tests: New file.
96813         * tests/unistr/test-u32-strcpy.c: New file.
96815         Tests for module 'unistr/u16-strcpy'.
96816         * modules/unistr/u16-strcpy-tests: New file.
96817         * tests/unistr/test-u16-strcpy.c: New file.
96819         Tests for module 'unistr/u8-strcpy'.
96820         * modules/unistr/u8-strcpy-tests: New file.
96821         * tests/unistr/test-u8-strcpy.c: New file.
96822         * tests/unistr/test-strcpy.h: New file.
96824         Tests for module 'unistr/u32-strnlen'.
96825         * modules/unistr/u32-strnlen-tests: New file.
96826         * tests/unistr/test-u32-strnlen.c: New file.
96828         Tests for module 'unistr/u16-strnlen'.
96829         * modules/unistr/u16-strnlen-tests: New file.
96830         * tests/unistr/test-u16-strnlen.c: New file.
96832         Tests for module 'unistr/u8-strnlen'.
96833         * modules/unistr/u8-strnlen-tests: New file.
96834         * tests/unistr/test-u8-strnlen.c: New file.
96835         * tests/unistr/test-strnlen.h: New file.
96837         Tests for module 'unistr/u32-strlen'.
96838         * modules/unistr/u32-strlen-tests: New file.
96839         * tests/unistr/test-u32-strlen.c: New file.
96841         Tests for module 'unistr/u16-strlen'.
96842         * modules/unistr/u16-strlen-tests: New file.
96843         * tests/unistr/test-u16-strlen.c: New file.
96845         Tests for module 'unistr/u8-strlen'.
96846         * modules/unistr/u8-strlen-tests: New file.
96847         * tests/unistr/test-u8-strlen.c: New file.
96849         Tests for module 'unistr/u32-prev'.
96850         * modules/unistr/u32-prev-tests: New file.
96851         * tests/unistr/test-u32-prev.c: New file.
96853         Tests for module 'unistr/u16-prev'.
96854         * modules/unistr/u16-prev-tests: New file.
96855         * tests/unistr/test-u16-prev.c: New file.
96857         Tests for module 'unistr/u8-prev'.
96858         * modules/unistr/u8-prev-tests: New file.
96859         * tests/unistr/test-u8-prev.c: New file.
96861         Tests for module 'unistr/u32-next'.
96862         * modules/unistr/u32-next-tests: New file.
96863         * tests/unistr/test-u32-next.c: New file.
96865         Tests for module 'unistr/u16-next'.
96866         * modules/unistr/u16-next-tests: New file.
96867         * tests/unistr/test-u16-next.c: New file.
96869         Tests for module 'unistr/u8-next'.
96870         * modules/unistr/u8-next-tests: New file.
96871         * tests/unistr/test-u8-next.c: New file.
96873         Tests for module 'unistr/u32-strmbtouc'.
96874         * modules/unistr/u32-strmbtouc-tests: New file.
96875         * tests/unistr/test-u32-strmbtouc.c: New file.
96877         Tests for module 'unistr/u16-strmbtouc'.
96878         * modules/unistr/u16-strmbtouc-tests: New file.
96879         * tests/unistr/test-u16-strmbtouc.c: New file.
96881         Tests for module 'unistr/u8-strmbtouc'.
96882         * modules/unistr/u8-strmbtouc-tests: New file.
96883         * tests/unistr/test-u8-strmbtouc.c: New file.
96885         Tests for module 'unistr/u32-strmblen'.
96886         * modules/unistr/u32-strmblen-tests: New file.
96887         * tests/unistr/test-u32-strmblen.c: New file.
96889         Tests for module 'unistr/u16-strmblen'.
96890         * modules/unistr/u16-strmblen-tests: New file.
96891         * tests/unistr/test-u16-strmblen.c: New file.
96893         Tests for module 'unistr/u8-strmblen'.
96894         * modules/unistr/u8-strmblen-tests: New file.
96895         * tests/unistr/test-u8-strmblen.c: New file.
96897         Tests for module 'unistr/u32-cpy-alloc'.
96898         * modules/unistr/u32-cpy-alloc-tests: New file.
96899         * tests/unistr/test-u32-cpy-alloc.c: New file.
96901         Tests for module 'unistr/u16-cpy-alloc'.
96902         * modules/unistr/u16-cpy-alloc-tests: New file.
96903         * tests/unistr/test-u16-cpy-alloc.c: New file.
96905         Tests for module 'unistr/u8-cpy-alloc'.
96906         * modules/unistr/u8-cpy-alloc-tests: New file.
96907         * tests/unistr/test-u8-cpy-alloc.c: New file.
96908         * tests/unistr/test-cpy-alloc.h: New file.
96910         Tests for module 'unistr/u32-mbsnlen'.
96911         * modules/unistr/u32-mbsnlen-tests: New file.
96912         * tests/unistr/test-u32-mbsnlen.c: New file.
96914         Tests for module 'unistr/u16-mbsnlen'.
96915         * modules/unistr/u16-mbsnlen-tests: New file.
96916         * tests/unistr/test-u16-mbsnlen.c: New file.
96918         Tests for module 'unistr/u8-mbsnlen'.
96919         * modules/unistr/u8-mbsnlen-tests: New file.
96920         * tests/unistr/test-u8-mbsnlen.c: New file.
96922         Tests for module 'unistr/u32-chr'.
96923         * modules/unistr/u32-chr-tests: New file.
96924         * tests/unistr/test-u32-chr.c: New file.
96926         Tests for module 'unistr/u16-chr'.
96927         * modules/unistr/u16-chr-tests: New file.
96928         * tests/unistr/test-u16-chr.c: New file.
96930         Tests for module 'unistr/u8-chr'.
96931         * modules/unistr/u8-chr-tests: New file.
96932         * tests/unistr/test-u8-chr.c: New file.
96933         * tests/unistr/test-chr.h: New file, based on tests/test-memchr.c.
96935         Tests for module 'unistr/u32-cmp2'.
96936         * modules/unistr/u32-cmp2-tests: New file.
96937         * tests/unistr/test-u32-cmp2.c: New file.
96939         Tests for module 'unistr/u16-cmp2'.
96940         * modules/unistr/u16-cmp2-tests: New file.
96941         * tests/unistr/test-u16-cmp2.c: New file.
96943         Tests for module 'unistr/u8-cmp2'.
96944         * modules/unistr/u8-cmp2-tests: New file.
96945         * tests/unistr/test-u8-cmp2.c: New file.
96946         * tests/unistr/test-cmp2.h: New file, based on tests/unistr/test-cmp.h.
96948         Tests for module 'unistr/u32-cmp'.
96949         * modules/unistr/u32-cmp-tests: New file.
96950         * tests/unistr/test-u32-cmp.c: New file.
96952         Tests for module 'unistr/u16-cmp'.
96953         * modules/unistr/u16-cmp-tests: New file.
96954         * tests/unistr/test-u16-cmp.c: New file.
96956         Tests for module 'unistr/u8-cmp'.
96957         * modules/unistr/u8-cmp-tests: New file.
96958         * tests/unistr/test-u8-cmp.c: New file.
96959         * tests/unistr/test-cmp.h: New file, based on tests/test-memcmp.c.
96961         Tests for module 'unistr/u32-set'.
96962         * modules/unistr/u32-set-tests: New file.
96963         * tests/unistr/test-u32-set.c: New file.
96965         Tests for module 'unistr/u16-set'.
96966         * modules/unistr/u16-set-tests: New file.
96967         * tests/unistr/test-u16-set.c: New file.
96969         Tests for module 'unistr/u8-set'.
96970         * modules/unistr/u8-set-tests: New file.
96971         * tests/unistr/test-u8-set.c: New file.
96972         * tests/unistr/test-set.h: New file.
96974         Tests for module 'unistr/u32-move'.
96975         * modules/unistr/u32-move-tests: New file.
96976         * tests/unistr/test-u32-move.c: New file.
96978         Tests for module 'unistr/u16-move'.
96979         * modules/unistr/u16-move-tests: New file.
96980         * tests/unistr/test-u16-move.c: New file.
96982         Tests for module 'unistr/u8-move'.
96983         * modules/unistr/u8-move-tests: New file.
96984         * tests/unistr/test-u8-move.c: New file.
96985         * tests/unistr/test-move.h: New file.
96987         Tests for module 'unistr/u32-cpy'.
96988         * modules/unistr/u32-cpy-tests: New file.
96989         * tests/unistr/test-u32-cpy.c: New file.
96991         Tests for module 'unistr/u16-cpy'.
96992         * modules/unistr/u16-cpy-tests: New file.
96993         * tests/unistr/test-u16-cpy.c: New file.
96995         Tests for module 'unistr/u8-cpy'.
96996         * modules/unistr/u8-cpy-tests: New file.
96997         * tests/unistr/test-u8-cpy.c: New file.
96998         * tests/unistr/test-cpy.h: New file.
97000 2010-01-09  Bruno Haible  <bruno@clisp.org>
97002         Tests for module 'unistr/u32-uctomb'.
97003         * modules/unistr/u32-uctomb-tests: New file.
97004         * tests/unistr/test-u32-uctomb.c: New file.
97006         Tests for module 'unistr/u16-uctomb'.
97007         * modules/unistr/u16-uctomb-tests: New file.
97008         * tests/unistr/test-u16-uctomb.c: New file.
97010         Tests for module 'unistr/u8-uctomb'.
97011         * modules/unistr/u8-uctomb-tests: New file.
97012         * tests/unistr/test-u8-uctomb.c: New file.
97014         Tests for module 'unistr/u32-mbtoucr'.
97015         * modules/unistr/u32-mbtoucr-tests: New file.
97016         * tests/unistr/test-u32-mbtoucr.c: New file.
97018         Tests for module 'unistr/u16-mbtoucr'.
97019         * modules/unistr/u16-mbtoucr-tests: New file.
97020         * tests/unistr/test-u16-mbtoucr.c: New file.
97022         Tests for module 'unistr/u8-mbtoucr'.
97023         * modules/unistr/u8-mbtoucr-tests: New file.
97024         * tests/unistr/test-u8-mbtoucr.c: New file.
97026         Tests for module 'unistr/u32-mbtouc'.
97027         * modules/unistr/u32-mbtouc-tests: New file.
97028         * tests/unistr/test-u32-mbtouc.c: New file.
97030         Tests for module 'unistr/u16-mbtouc'.
97031         * modules/unistr/u16-mbtouc-tests: New file.
97032         * tests/unistr/test-u16-mbtouc.c: New file.
97034         Tests for module 'unistr/u8-mbtouc'.
97035         * modules/unistr/u8-mbtouc-tests: New file.
97036         * tests/unistr/test-u8-mbtouc.c: New file.
97038         Tests for module 'unistr/u32-mbtouc-unsafe'.
97039         * modules/unistr/u32-mbtouc-unsafe-tests: New file.
97040         * tests/unistr/test-u32-mbtouc-unsafe.c: New file.
97041         * tests/unistr/test-u32-mbtouc.h: New file.
97043         Tests for module 'unistr/u16-mbtouc-unsafe'.
97044         * modules/unistr/u16-mbtouc-unsafe-tests: New file.
97045         * tests/unistr/test-u16-mbtouc-unsafe.c: New file.
97046         * tests/unistr/test-u16-mbtouc.h: New file.
97048         Tests for module 'unistr/u8-mbtouc-unsafe'.
97049         * modules/unistr/u8-mbtouc-unsafe-tests: New file.
97050         * tests/unistr/test-u8-mbtouc-unsafe.c: New file.
97051         * tests/unistr/test-u8-mbtouc.h: New file.
97053         Tests for module 'unistr/u32-mblen'.
97054         * modules/unistr/u32-mblen-tests: New file.
97055         * tests/unistr/test-u32-mblen.c: New file.
97057         Tests for module 'unistr/u16-mblen'.
97058         * modules/unistr/u16-mblen-tests: New file.
97059         * tests/unistr/test-u16-mblen.c: New file.
97061         Tests for module 'unistr/u8-mblen'.
97062         * modules/unistr/u8-mblen-tests: New file.
97063         * tests/unistr/test-u8-mblen.c: New file.
97065         Tests for module 'unistr/u32-to-u16'.
97066         * modules/unistr/u32-to-u16-tests: New file.
97067         * tests/unistr/test-u32-to-u16.c: New file.
97069         Tests for module 'unistr/u32-to-u8'.
97070         * modules/unistr/u32-to-u8-tests: New file.
97071         * tests/unistr/test-u32-to-u8.c: New file.
97073         Tests for module 'unistr/u16-to-u32'.
97074         * modules/unistr/u16-to-u32-tests: New file.
97075         * tests/unistr/test-u16-to-u32.c: New file.
97077         Tests for module 'unistr/u16-to-u8'.
97078         * modules/unistr/u16-to-u8-tests: New file.
97079         * tests/unistr/test-u16-to-u8.c: New file.
97081         Tests for module 'unistr/u8-to-u32'.
97082         * modules/unistr/u8-to-u32-tests: New file.
97083         * tests/unistr/test-u8-to-u32.c: New file.
97085         Tests for module 'unistr/u8-to-u16'.
97086         * modules/unistr/u8-to-u16-tests: New file.
97087         * tests/unistr/test-u8-to-u16.c: New file.
97089         Tests for module 'unistr/u32-check'.
97090         * modules/unistr/u32-check-tests: New file.
97091         * tests/unistr/test-u32-check.c: New file.
97093         Tests for module 'unistr/u16-check'.
97094         * modules/unistr/u16-check-tests: New file.
97095         * tests/unistr/test-u16-check.c: New file.
97097         Tests for module 'unistr/u8-check'.
97098         * modules/unistr/u8-check-tests: New file.
97099         * tests/unistr/test-u8-check.c: New file.
97101         * tests/unictype/test-categ_byname.c: Include <stdbool.h>.
97102         (category_equals): New function.
97103         (main): Add more tests.
97104         * modules/unictype/category-byname-tests (Depends-on): Add stdbool.
97106         * tests/unictype/test-bidi_byname.c (main): Add more tests.
97108 2010-01-10  Bruno Haible  <bruno@clisp.org>
97110         unistr/u*-strcoll: Try harder to distinguish different strings.
97111         * lib/unistr/u-strcoll.h (FUNC): When sl1 and sl2 are the same,
97112         compare s1 and s2 to see if they are different.
97114 2010-01-10  Bruno Haible  <bruno@clisp.org>
97116         unistr/u*-stpncpy: Fix the return value.
97117         * lib/unistr.h (u8_stpncpy, u16_stpncpy, u32_stpncpy): Make the
97118         description of the return value consistent with stpncpy in glibc.
97119         * lib/unistr/u-stpncpy.h (FUNC): Return the pointer past the last
97120         written non-NUL unit.
97122 2010-01-10  Bruno Haible  <bruno@clisp.org>
97124         unistr/u*-next: Add missing dependencies.
97125         * modules/unistr/u8-next (Depends-on): Add unistr/u8-strmbtouc.
97126         * modules/unistr/u16-next (Depends-on): Add unistr/u16-strmbtouc.
97127         * modules/unistr/u32-next (Depends-on): Add unistr/u32-strmbtouc.
97129 2010-01-10  Bruno Haible  <bruno@clisp.org>
97131         unistr/u8-mbsnlen: Fix return value for incomplete character.
97132         * lib/unistr/u8-mbsnlen.c (u8_mbsnlen): Use u8_mbtoucr instead of
97133         u8_mblen.
97134         * modules/unistr/u8-mbsnlen (Depends-on): Add unistr/u8-mbtoucr.
97135         Remove unistr/u8-mblen.
97136         * lib/unistr/u16-mbsnlen.c (u16_mbsnlen): Use u16_mbtoucr instead of
97137         u16_mblen.
97138         * modules/unistr/u16-mbsnlen (Depends-on): Add unistr/u16-mbtoucr.
97139         Remove unistr/u16-mblen.
97141 2010-01-10  Bruno Haible  <bruno@clisp.org>
97143         wchar: Fix compilation error when <wchar.h> is used from coreutils.
97144         * lib/wchar.in.h: Treat __need_wint_t like __need_mbstate_t.
97145         Reported by Brian Gough <bjg@gnu.org> and
97146         Chris Clayton <chris2553@googlemail.com> via
97147         Mike Frysinger <vapier@gentoo.org> and Jim Meyering <jim@meyering.net>.
97149 2010-01-09  Bruno Haible  <bruno@clisp.org>
97151         unistr/u16-to-u32: Reject invalid input.
97152         * lib/unistr/u16-to-u32.c (u16_to_u32): Call u16_mbtoucr instead of
97153         u16_mbtouc.
97154         * modules/unistr/u16-to-u32 (Depends-on): Add unistr/u16-mbtoucr.
97155         Remove unistr/u16-mbtouc.
97157         unistr/u16-to-u8: Reject invalid input.
97158         * lib/unistr/u16-to-u8.c (u16_to_u8): Call u16_mbtoucr instead of
97159         u16_mbtouc.
97160         * modules/unistr/u16-to-u8 (Depends-on): Add unistr/u16-mbtoucr.
97161         Remove unistr/u16-mbtouc.
97163         unistr/u8-to-u32: Reject invalid input.
97164         * lib/unistr/u8-to-u32.c (u8_to_u32): Call u8_mbtoucr instead of
97165         u8_mbtouc.
97166         * modules/unistr/u8-to-u32 (Depends-on): Add unistr/u8-mbtoucr.
97167         Remove unistr/u8-mbtouc.
97169         unistr/u8-to-u16: Reject invalid input.
97170         * lib/unistr/u8-to-u16.c (u8_to_u16): Call u8_mbtoucr instead of
97171         u8_mbtouc.
97172         * modules/unistr/u8-to-u16 (Depends-on): Add unistr/u8-mbtoucr.
97173         Remove unistr/u8-mbtouc.
97175 2010-01-09  Bruno Haible  <bruno@clisp.org>
97177         Tests for module 'getlogin'.
97178         * modules/getlogin-tests: New file.
97179         * tests/test-getlogin.c: New file.
97181         New module 'getlogin'.
97182         * lib/unistd.in.h (getlogin): New declaration.
97183         * lib/getlogin.c: New file.
97184         * m4/getlogin.m4: New file.
97185         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GETLOGIN,
97186         HAVE_GETLOGIN.
97187         * modules/unistd (Makefile.am): Substitute GNULIB_GETLOGIN,
97188         HAVE_GETLOGIN.
97189         * modules/getlogin: New file.
97190         * doc/posix-functions/getlogin.texi: Mention the new module.
97191         Reported by John W. Eaton <jwe@gnu.org>.
97193 2010-01-09  Bruno Haible  <bruno@clisp.org>
97195         getlogin_r: Support for native Windows.
97196         * lib/getlogin_r.c: Include <windows.h>
97197         (getlogin_r): Implement for native Windows.
97198         * tests/test-getlogin_r.c (main): Also test with a huge buffer.
97199         Reported by Tatsuro MATSUOKA <tmacchant5@yahoo.co.jp>
97200         via John W. Eaton <jwe@gnu.org>.
97202 2010-01-09  Bruno Haible  <bruno@clisp.org>
97204         getlogin_r: Small fixes.
97205         * lib/getlogin_r.c (getlogin_r): Don't set errno if the function
97206         succeeds.
97207         * m4/getlogin_r.m4 (gl_GETLOGIN_R): Require gl_USE_SYSTEM_EXTENSIONS
97208         before testing whether getlogin_r is declared. No need to set
97209         HAVE_DECL_GETLOGIN_R to 1.
97210         (gl_PREREQ_GETLOGIN_R): Don't check for the getlogin_r declaration.
97212 2010-01-09  Bruno Haible  <bruno@clisp.org>
97214         * lib/unistd.in.h (getlogin_r): Add comment.
97216 2010-01-09  Bruno Haible  <bruno@clisp.org>
97218         Tests for module 'getlogin_r'.
97219         * modules/getlogin_r-tests: New file.
97220         * tests/test-getlogin_r.c: New file.
97222 2010-01-09  Jim Meyering  <meyering@redhat.com>
97224         maint.mk: extend proper_name_utf8-vs-LIBICONV-checking rule
97225         * top/maint.mk (sc_proper_name_utf8_requires_ICONV): Adapt to work
97226         also when $(LIBICONV) is part of LDADD, rather than ${prog}_LDADD.
97228 2010-01-08  Simon Josefsson  <simon@josefsson.org>
97230         * lib/dup2.c (rpl_dup2): Improve comment.
97232 2010-01-08  Eric Blake  <ebb9@byu.net>
97234         maint.mk: allow packages to add makefile @@ exceptions
97235         * top/maint.mk (_makefile_at_at_check_exceptions): New hook.
97236         (sc_makefile_check): Rename...
97237         (sc_makefile_at_at_check): ...to this, and use hook.
97239         dup2: work around mingw bug
97240         * lib/dup2.c (rpl_dup2): Sanitize return value on mingw.
97241         Reported by Simon Josefsson.
97243 2010-01-07  John W. Eaton  <jwe@octave.org>  (tiny change)
97245         glob: Fix C++ compilation.
97246         * lib/glob.in.h [__cplusplus]: Define __BEGIN_DECLS and __END_DECLS for
97247         C++.
97249 2010-01-07  Bruno Haible  <bruno@clisp.org>
97251         Fix indentation of wctype.in.h, broken since 2007-01-06.
97252         * lib/wctype.in.h: Fix indentation of preprocessor directives.
97254 2010-01-07  Bruno Haible  <bruno@clisp.org>
97256         mbslen: Avoid collision with system function.
97257         * lib/string.in.h [MirBSD]: Include <wchar.h>.
97258         (mbslen): Undefine first. Alias mbslen to rpl_mbslen.
97259         * m4/mbslen.m4: New file.
97260         * modules/mbslen (Files): Add it.
97261         (configure.ac): Invoke gl_MBSLEN.
97262         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize HAVE_MBSLEN.
97263         * modules/string (Makefile.am): Substitute HAVE_MBSLEN.
97264         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>
97265         via Ian Beckwith <ianb@erislabs.net>.
97267 2010-01-07  Bruno Haible  <bruno@clisp.org>
97269         dirent: Document the last fix.
97270         * doc/posix-headers/dirent.texi: Document the bug of missing 'ino_t'.
97272 2010-01-07  Bruno Haible  <bruno@clisp.org>
97274         stdio: Ensure <stdio.h> defines off_t, ssize_t, va_list.
97275         * lib/stdio.in.h: Include <sys/types.h> unconditionally.
97276         * tests/test-stdio.c: Verify that fpos_t, off_t, size_t, ssize_t,
97277         va_list are defined.
97278         * doc/posix-headers/stdio.texi: Document the bug of missing types.
97279         Reported by Eric Blake.
97281 2010-01-07  Bruno Haible  <bruno@clisp.org>
97283         xlist, xoset: Fix missing dependency bug, introduced on 2009-12-13.
97284         * modules/xlist (Depends-on): Add 'list',
97285         * modules/xoset (Depends-on): Add 'oset'.
97286         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
97288 2010-01-07  Bruno Haible  <bruno@clisp.org>
97290         * doc/posix-functions/strcasecmp.texi: Clarify the platforms.
97291         * doc/posix-functions/strncasecmp.texi: Likewise.
97293 2010-01-07  Bruno Haible  <bruno@clisp.org>
97295         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Simplify logic.
97297 2010-01-07  John W. Eaton  <jwe@octave.org>
97299         wctype: allow C++ use
97300         * lib/wctype.in.h: Add extern "C" block for C++.
97302 2010-01-06  Eric Blake  <ebb9@byu.net>
97304         maint.mk: detect incorrect GFDL usage
97305         * top/maint.mk (_GFDL_regexp, sc_GFDL_version): New rule.
97307 2010-01-06  Jim Meyering  <meyering@redhat.com>
97308         and Eric Blake  <ebb9@byu.net>
97310         maint.mk: ignore multi-line copyright in NEWS
97311         * top/maint.mk (NEWS_hash): Add immunity to multi-line copyright.
97313 2010-01-06  Eric Blake  <ebb9@byu.net>
97315         select: add missing dependency
97316         * modules/select-tests (Depends-on): Move sockets dependency...
97317         * modules/select (Depends-on): ...here.
97318         Reported by Ian Beckwith.
97320         doc: regenerate INSTALL
97321         * doc/INSTALL: Reflect recent autoconf update.
97322         * doc/INSTALL.ISO: Likewise.
97323         * doc/INSTALL.UTF-8: Likewise.
97325         pread: fix compilation on glibc
97326         * m4/pread.m4 (gl_FUNC_PREAD): Request all interfaces.
97327         Reported by Ralf Wildenhues.
97329         dirent: fix test failure
97330         * lib/dirent.in.h (includes): Guarantee ino_t.
97331         Reported by Ralf Wildenhues.
97333 2010-01-06  Petr Salinger  <Petr.Salinger@seznam.cz>  (tiny change)
97335         linkat, renameat: avoid bad free
97336         * lib/at-func2.c (at_func2): Fix typo.
97337         Reported via Ian Beckwith, from http://bugs.debian.org/561117.
97339 2010-01-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
97341         cleanup after gl_FUNC_READLINK, for gl_FUNC_SYMLINK test
97342         * m4/readlink.m4 (gl_FUNC_READLINK): Remove conftest.lnk2,
97343         to avoid failure of symlink test later.
97345 2010-01-06  Eric Blake  <ebb9@byu.net>
97347         stdio, unistd: guarantee ssize_t
97348         * lib/unistd.in.h (includes): Ensure that types required by POSIX
97349         2008 are exposed when needed.
97350         * lib/stdio.in.h (includes): Likewise.
97351         Reported by Ralf Wildenhues.
97353 2010-01-06  Paolo Bonzini  <bonzini@gnu.org>
97355         nl_langinfo: do not call AC_CHECK_FUNC_ONCE inside if.
97356         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Do not call
97357         AC_CHECK_FUNC_ONCE inside if, do not adjust ac_cv_func_nl_langinfo.
97359 2010-01-06  Jim Meyering  <meyering@redhat.com>
97361         readtokens: this module *does* require xalloc.h
97362         It uses only functions that were omitted by the old syntax-check rule.
97363         * lib/readtokens.c: Include "xalloc.h" once again.
97364         * modules/readtokens (Depends-on): Add xalloc.
97365         This reverts part of 0e0f8f12ec241c0f1c1f21f960bb5cf908a0fa3c.
97367 2010-01-05  Eric Blake  <ebb9@byu.net>
97369         maint: support 'make announcement' from a VPATH build
97370         * top/maint.mk (announcement): Look for correct NEWS file.
97372 2010-01-05  Aurelien Jarno  <aurelien@aurel32.net>  (tiny change)
97374         utimens (fdutimens): ignore a negative FD, per contract
97375         * lib/utimens.c (fdutimens) [HAVE_FUTIMENS]: Call futimens only
97376         when we have a valid file descriptor.  Otherwise, using a brand
97377         new glibc (with just-patched futimens that now fails with EBADF)
97378         would cause this function to fail with ENOSYS.
97379         Reported by Guillaume Ayoub in http://bugs.debian.org/563726.
97380         See also http://bugzilla.redhat.com/552320.
97382 2010-01-05  Eric Blake  <ebb9@byu.net>
97384         strcase: document what it provides
97385         * doc/posix-functions/strcasecmp.texi (strcasecmp): Mention the
97386         gnulib module.
97387         * doc/posix-functions/strncasecmp.texi (strncasecmp): Likewise.
97388         Reported by Dilyan Palauzov <Dilyan.Palauzov@aegee.org>.
97390 2010-01-05  Jim Meyering  <meyering@redhat.com>
97392         maint: remove useless inclusions of "xalloc.h"
97393         * lib/getloadavg.c: Remove useless inclusion of "xalloc.h".
97394         * lib/readtokens.c: Likewise.
97395         * lib/same.c: Likewise.
97396         * modules/getloadavg (Depends-on): Remove xalloc.
97397         * modules/readtokens: Likewise.
97398         * modules/same: Likewise.
97400         maint.mk: include 4 more function names in alloca.h-checking regexp
97401         * top/maint.mk (sc_prohibit_xalloc_without_use): Use more complete
97402         regexp.  Before, we would give a false-positive (saying alloca.h
97403         is included unnecessarily) when the only uses involved omitted symbols.
97405         xalloc.h: use consistent formatting
97406         * lib/xalloc.h: Move declarations to start in the first column.
97408 2010-01-05  Eric Blake  <ebb9@byu.net>
97410         mkdir: avoid xalloc
97411         * lib/mkdir.c (includes): Drop unused header.
97412         Reported by John W. Eaton.
97414 2010-01-04  Jim Meyering  <meyering@redhat.com>
97416         nl_langinfo: avoid configure-time syntax error
97417         * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): When we've already tested
97418         for nl_langinfo.h, AC_CHECK_FUNCS_ONCE([nl_langinfo]) expands to
97419         the empty string.  Don't let that provoke a shell syntax error.
97421         regcomp, regexec, fnmatch: avoid array bounds read error
97422         * lib/regcomp.c (build_equiv_class): From glibc:
97423         Use only the low 24 bits of a findidx return value as an index
97424         into the weights array.  Patch by Ulrich Drepper:
97425         http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=b7d1c5fa30
97426         * lib/regexec.c (check_node_accept_bytes): Likewise.
97427         * lib/fnmatch_loop.c (FCT): Likewise.
97429         regcomp: skip collseq lookup when there are no rules
97430         * lib/regcomp.c (lookup_collation_sequence_value): From glibc:
97431         http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a532a41df58
97433         regcomp: recognize ill-formed { } expressions
97434         * lib/regcomp.c (parse_dup_op): From glibc:
97435         http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a87cd2894cb
97437         regcomp: fix typo in comment
97438         * lib/regcomp.c (duplicate_node_closure): Sync from glibc.
97439         s/satisfy/satisfies/.
97441         regcomp: sync from glibc: remove dead store
97442         * lib/regcomp.c (duplicate_node_closure): Remove useless
97443         search_duplicated_node call and dead store.
97445         regcomp: sync from glibc; always use nl_langinfo
97446         * lib/regcomp.c (init_dfa) [!LIBC]: Always use nl_langinfo (CODESET),
97447         now that gnulib provides it.  Recognize UTF8 as well as UTF-8.
97448         * modules/regex (Depends-on): Add nl_langinfo.
97450 2010-01-04  Eric Blake  <ebb9@byu.net>
97452         fdopendir: fix configure test
97453         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Check for existing file.
97455 2010-01-01  Bruno Haible  <bruno@clisp.org>
97457         wchar: Remove unused configure check.
97458         * m4/wchar.m4 (gl_WCHAR_H): Don't test whether <wchar.h> is standalone.
97460 2010-01-01  Eric Blake  <ebb9@byu.net>
97462         headers: make check of system header explicit
97463         * m4/netdb_h.m4 (gl_HEADER_NETDB): Don't exploit knowledge of
97464         gl_CHECK_NEXT_HEADER internals, but call AC_CHECK_HEADERS_ONCE
97465         ourselves.
97466         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
97467         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
97468         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Likewise.
97469         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise, for gt_INTTYPES_PRI
97470         internals.
97471         * m4/wchar.m4 (gl_WCHAR_H): Skip followup test if header is
97472         missing.
97473         Suggested by Bruno Haible.
97475 2010-01-01  Jim Meyering  <meyering@redhat.com>
97477         ChangeLog: tweak to eliminate unnecessary copyright line
97478         * ChangeLog: Remove a copyright line that was mistakenly updated
97479         by today's update-copyright run.  Reported by Eric Blake.
97481         test-update-copyright: don't let envvar setting cause test failure
97482         * tests/test-update-copyright.sh: Set UPDATE_COPYRIGHT_MAX_LINE_LENGTH.
97484 2010-01-01  Bruno Haible  <bruno@clisp.org>
97486         localename: Avoid gcc warning.
97487         * lib/localename.c (gl_locale_name_thread_unsafe): Don't define this
97488         function if it is not used.
97490 2010-01-01  Jim Meyering  <meyering@redhat.com>
97492         update nearly all FSF copyright year lists to include 2010
97493         Use the same procedure as for 2009, outlined in
97494         http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
97496         version-etc: set COPYRIGHT_YEAR to 2010
97497         * lib/version-etc.c (COPYRIGHT_YEAR): Manually update the enum.
97499 2009-12-31  Eric Blake  <ebb9@byu.net>
97501         doc: correct availability of cygwin 1.5.x getopt
97502         * doc/posix-functions/optarg.texi (optarg): Cygwin supplies getopt
97503         variables.
97504         * doc/posix-functions/opterr.texi (opterr): Likewise.
97505         * doc/posix-functions/optind.texi (optind): Likewise.
97506         * doc/posix-functions/optopt.texi (optopt): Likewise.
97507         * doc/posix-functions/tzname.texi (tzname): Likewise.
97509         openat: update maintainer
97510         * modules/openat (Maintainer): Add myself.
97512         utimens: avoid shadowing warning
97513         * lib/utimens.c (fdutimens, lutimens): Consolidate separate stat
97514         buffers into one, to avoid shadowing, as well as avoiding a
97515         redundant stat.
97516         Reported by Jim Meyering.
97518         test-dup2: avoid compiler warning
97519         * tests/test-dup2.c (is_inheritable): Only define if used.
97521 2010-01-01  Bruno Haible  <bruno@clisp.org>
97523         vasnprintf: Avoid passing an 'rpl_mbstate_t *' to the system's wcrtomb.
97524         * lib/vasnprintf.c (VASNPRINTF): If GNULIB_defined_mbstate_t is
97525         defined, use wctomb instead of wcrtomb.
97527 2010-01-01  Bruno Haible  <bruno@clisp.org>
97529         iconv: Reject native Solaris iconv.
97530         * m4/iconv.m4 (AM_ICONV_LINK): Recognize native Solaris iconv() bug.
97531         * doc/posix-functions/iconv.texi: Document native Solaris iconv() bug.
97533 2009-12-31  Bruno Haible  <bruno@clisp.org>
97535         * tests/test-signal.c (main): Remove test of 'SIG'.
97537 2009-12-31  Bruno Haible  <bruno@clisp.org>
97539         spawn: Fix incomplete fix.
97540         * lib/spawn.in.h (posix_spawnattr_getflags, posix_spawnattr_setflags,
97541         posix_spawnattr_getpgroup, posix_spawnattr_setpgroup): Correct the link
97542         warnings for GNULIB_POSIXCHECK again.
97543         Reported by Eric Blake.
97545 2009-12-31  Bruno Haible  <bruno@clisp.org>
97547         Avoid namespace pollution on glibc systems.
97548         * lib/spawn.in.h: Don't include <sched.h>, <signal.h> on glibc systems.
97549         * lib/sys_times.in.h: Don't include <time.h> on glibc systems.
97550         * lib/wchar.in.h: Don't include <stddef.h>, <stdio.h>, <time.h> on
97551         glibc systems.
97553 2009-12-31  Bruno Haible  <bruno@clisp.org>
97555         * m4/wchar.m4 (gl_WCHAR_H): Remove gl_STDDEF_H invocation.
97556         (gl_REPLACE_WCHAR_H): Turn into a no-op.
97557         * m4/arpa_inet_h.m4 (gl_REPLACE_ARPA_INET_H): Likewise.
97558         * m4/dirent_h.m4 (gl_REPLACE_DIRENT_H): Likewise.
97559         * m4/locale_h.m4 (gl_REPLACE_LOCALE_H): Likewise.
97560         * m4/spawn_h.m4 (gl_REPLACE_SPAWN_H): Likewise.
97561         * m4/sys_ioctl_h.m4 (gl_REPLACE_SYS_IOCTL_H): Likewise.
97563 2009-12-31  Bruno Haible  <bruno@clisp.org>
97565         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Invoke
97566         gl_CHECK_NEXT_HEADERS before testing ac_cv_header_sys_select_h, not
97567         afterwards.
97569 2009-12-31  Bruno Haible  <bruno@clisp.org>
97571         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H_DEFAULTS): Don't set
97572         SYS_UTSNAME_H.
97574 2009-12-31  Bruno Haible  <bruno@clisp.org>
97576         spawn: Fix misapplied patch.
97577         * lib/spawn.in.h (posix_spawnattr_getflags, posix_spawnattr_setflags,
97578         posix_spawnattr_getpgroup, posix_spawnattr_setpgroup): Correct the link
97579         warnings for GNULIB_POSIXCHECK.
97581 2009-12-31  Bruno Haible  <bruno@clisp.org>
97583         times: Update after sys_times changed.
97584         * m4/times.m4: New file, extracted from modules/times. Set HAVE_TIMES.
97585         * modules/times (Files): Add it.
97586         (configure.ac): Invoke gl_FUNC_TIMES.
97588 2009-12-31  Bruno Haible  <bruno@clisp.org>
97590         Use AC_C_INLINE where necessary.
97591         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Require AC_C_INLINE.
97592         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Likewise.
97593         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
97594         * m4/mbchar.m4 (gl_MBCHAR): Likewise.
97595         * m4/mbfile.m4 (gl_MBFILE): Likewise.
97596         * m4/mbiter.m4 (gl_MBITER): Likewise.
97597         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
97598         * m4/stat.m4 (gl_FUNC_STAT): Likewise.
97599         * m4/wait-process.m4 (gl_WAIT_PROCESS): Likewise.
97600         * modules/u64 (configure.ac): Likewise.
97602 2009-12-31  Bruno Haible  <bruno@clisp.org>
97604         Use AC_C_INLINE instead of module 'inline' where possible.
97605         * modules/inline (Description): Clarify purpose.
97606         * m4/count-one-bits.m4 (gl_COUNT_ONE_BITS): Require AC_C_INLINE.
97607         * modules/count-one-bits (Depends-on): Remove inline.
97608         * m4/openat.m4 (gl_PREREQ_OPENAT): Require AC_C_INLINE.
97609         * modules/openat (Depends-on): Remove inline.
97610         * modules/fdutimensat (Depends-on, configure.ac): Require AC_C_INLINE
97611         instead of depending on module 'inline'.
97612         * modules/filevercmp (Depends-on, configure.ac): Likewise.
97613         * modules/unicase/cased (Depends-on, configure.ac): Likewise.
97614         * modules/unicase/ignorable (Depends-on, configure.ac): Likewise.
97615         * modules/unictype/category-of (Depends-on, configure.ac): Likewise.
97616         * modules/unictype/category-test (Depends-on, configure.ac): Likewise.
97617         * modules/unictype/ctype-alnum (Depends-on, configure.ac): Likewise.
97618         * modules/unictype/ctype-alpha (Depends-on, configure.ac): Likewise.
97619         * modules/unictype/ctype-blank (Depends-on, configure.ac): Likewise.
97620         * modules/unictype/ctype-cntrl (Depends-on, configure.ac): Likewise.
97621         * modules/unictype/ctype-digit (Depends-on, configure.ac): Likewise.
97622         * modules/unictype/ctype-graph (Depends-on, configure.ac): Likewise.
97623         * modules/unictype/ctype-lower (Depends-on, configure.ac): Likewise.
97624         * modules/unictype/ctype-print (Depends-on, configure.ac): Likewise.
97625         * modules/unictype/ctype-punct (Depends-on, configure.ac): Likewise.
97626         * modules/unictype/ctype-space (Depends-on, configure.ac): Likewise.
97627         * modules/unictype/ctype-upper (Depends-on, configure.ac): Likewise.
97628         * modules/unictype/ctype-xdigit (Depends-on, configure.ac): Likewise.
97629         * modules/unictype/property-alphabetic (Depends-on, configure.ac):
97630         Likewise.
97631         * modules/unictype/property-ascii-hex-digit (Depends-on,
97632         configure.ac): Likewise.
97633         * modules/unictype/property-bidi-arabic-digit (Depends-on,
97634         configure.ac): Likewise.
97635         * modules/unictype/property-bidi-arabic-right-to-left (Depends-on,
97636         configure.ac): Likewise.
97637         * modules/unictype/property-bidi-block-separator (Depends-on,
97638         configure.ac): Likewise.
97639         * modules/unictype/property-bidi-boundary-neutral (Depends-on,
97640         configure.ac): Likewise.
97641         * modules/unictype/property-bidi-common-separator (Depends-on,
97642         configure.ac): Likewise.
97643         * modules/unictype/property-bidi-control (Depends-on, configure.ac):
97644         Likewise.
97645         * modules/unictype/property-bidi-embedding-or-override (Depends-on,
97646         configure.ac): Likewise.
97647         * modules/unictype/property-bidi-eur-num-separator (Depends-on,
97648         configure.ac): Likewise.
97649         * modules/unictype/property-bidi-eur-num-terminator (Depends-on,
97650         configure.ac): Likewise.
97651         * modules/unictype/property-bidi-european-digit (Depends-on,
97652         configure.ac): Likewise.
97653         * modules/unictype/property-bidi-hebrew-right-to-left (Depends-on,
97654         configure.ac): Likewise.
97655         * modules/unictype/property-bidi-left-to-right (Depends-on,
97656         configure.ac): Likewise.
97657         * modules/unictype/property-bidi-non-spacing-mark (Depends-on,
97658         configure.ac): Likewise.
97659         * modules/unictype/property-bidi-other-neutral (Depends-on,
97660         configure.ac): Likewise.
97661         * modules/unictype/property-bidi-pdf (Depends-on, configure.ac):
97662         Likewise.
97663         * modules/unictype/property-bidi-segment-separator (Depends-on,
97664         configure.ac): Likewise.
97665         * modules/unictype/property-bidi-whitespace (Depends-on,
97666         configure.ac): Likewise.
97667         * modules/unictype/property-combining (Depends-on, configure.ac):
97668         Likewise.
97669         * modules/unictype/property-composite (Depends-on, configure.ac):
97670         Likewise.
97671         * modules/unictype/property-currency-symbol (Depends-on,
97672         configure.ac): Likewise.
97673         * modules/unictype/property-dash (Depends-on, configure.ac): Likewise.
97674         * modules/unictype/property-decimal-digit (Depends-on, configure.ac):
97675         Likewise.
97676         * modules/unictype/property-default-ignorable-code-point (Depends-on,
97677         configure.ac): Likewise.
97678         * modules/unictype/property-deprecated (Depends-on, configure.ac):
97679         Likewise.
97680         * modules/unictype/property-diacritic (Depends-on, configure.ac):
97681         Likewise.
97682         * modules/unictype/property-extender (Depends-on, configure.ac):
97683         Likewise.
97684         * modules/unictype/property-format-control (Depends-on, configure.ac):
97685         Likewise.
97686         * modules/unictype/property-grapheme-base (Depends-on, configure.ac):
97687         Likewise.
97688         * modules/unictype/property-grapheme-extend (Depends-on, configure.ac):
97689         Likewise.
97690         * modules/unictype/property-grapheme-link (Depends-on, configure.ac):
97691         Likewise.
97692         * modules/unictype/property-hex-digit (Depends-on, configure.ac):
97693         Likewise.
97694         * modules/unictype/property-hyphen (Depends-on, configure.ac):
97695         Likewise.
97696         * modules/unictype/property-id-continue (Depends-on, configure.ac):
97697         Likewise.
97698         * modules/unictype/property-id-start (Depends-on, configure.ac):
97699         Likewise.
97700         * modules/unictype/property-ideographic (Depends-on, configure.ac):
97701         Likewise.
97702         * modules/unictype/property-ids-binary-operator (Depends-on,
97703         configure.ac): Likewise.
97704         * modules/unictype/property-ids-trinary-operator (Depends-on,
97705         configure.ac): Likewise.
97706         * modules/unictype/property-ignorable-control (Depends-on,
97707         configure.ac): Likewise.
97708         * modules/unictype/property-iso-control (Depends-on, configure.ac):
97709         Likewise.
97710         * modules/unictype/property-join-control (Depends-on, configure.ac):
97711         Likewise.
97712         * modules/unictype/property-left-of-pair (Depends-on, configure.ac):
97713         Likewise.
97714         * modules/unictype/property-line-separator (Depends-on, configure.ac):
97715         Likewise.
97716         * modules/unictype/property-logical-order-exception (Depends-on,
97717         configure.ac): Likewise.
97718         * modules/unictype/property-lowercase (Depends-on, configure.ac):
97719         Likewise.
97720         * modules/unictype/property-math (Depends-on, configure.ac): Likewise.
97721         * modules/unictype/property-non-break (Depends-on, configure.ac):
97722         Likewise.
97723         * modules/unictype/property-not-a-character (Depends-on, configure.ac):
97724         Likewise.
97725         * modules/unictype/property-numeric (Depends-on, configure.ac):
97726         Likewise.
97727         * modules/unictype/property-other-alphabetic (Depends-on,
97728         configure.ac): Likewise.
97729         * modules/unictype/property-other-default-ignorable-code-point
97730         (Depends-on, configure.ac): Likewise.
97731         * modules/unictype/property-other-grapheme-extend (Depends-on,
97732         configure.ac): Likewise.
97733         * modules/unictype/property-other-id-continue (Depends-on,
97734         configure.ac): Likewise.
97735         * modules/unictype/property-other-id-start (Depends-on, configure.ac):
97736         Likewise.
97737         * modules/unictype/property-other-lowercase (Depends-on, configure.ac):
97738         Likewise.
97739         * modules/unictype/property-other-math (Depends-on, configure.ac):
97740         Likewise.
97741         * modules/unictype/property-other-uppercase (Depends-on, configure.ac):
97742         Likewise.
97743         * modules/unictype/property-paired-punctuation (Depends-on,
97744         configure.ac): Likewise.
97745         * modules/unictype/property-paragraph-separator (Depends-on,
97746         configure.ac): Likewise.
97747         * modules/unictype/property-pattern-syntax (Depends-on, configure.ac):
97748         Likewise.
97749         * modules/unictype/property-pattern-white-space (Depends-on,
97750         configure.ac): Likewise.
97751         * modules/unictype/property-private-use (Depends-on, configure.ac):
97752         Likewise.
97753         * modules/unictype/property-punctuation (Depends-on, configure.ac):
97754         Likewise.
97755         * modules/unictype/property-quotation-mark (Depends-on, configure.ac):
97756         Likewise.
97757         * modules/unictype/property-radical (Depends-on, configure.ac):
97758         Likewise.
97759         * modules/unictype/property-sentence-terminal (Depends-on,
97760         configure.ac): Likewise.
97761         * modules/unictype/property-soft-dotted (Depends-on, configure.ac):
97762         Likewise.
97763         * modules/unictype/property-space (Depends-on, configure.ac): Likewise.
97764         * modules/unictype/property-terminal-punctuation (Depends-on,
97765         configure.ac): Likewise.
97766         * modules/unictype/property-titlecase (Depends-on, configure.ac):
97767         Likewise.
97768         * modules/unictype/property-unassigned-code-value (Depends-on,
97769         configure.ac): Likewise.
97770         * modules/unictype/property-unified-ideograph (Depends-on,
97771         configure.ac): Likewise.
97772         * modules/unictype/property-uppercase (Depends-on, configure.ac):
97773         Likewise.
97774         * modules/unictype/property-variation-selector (Depends-on,
97775         configure.ac): Likewise.
97776         * modules/unictype/property-white-space (Depends-on, configure.ac):
97777         Likewise.
97778         * modules/unictype/property-xid-continue (Depends-on, configure.ac):
97779         Likewise.
97780         * modules/unictype/property-xid-start (Depends-on, configure.ac):
97781         Likewise.
97782         * modules/unictype/property-zero-width (Depends-on, configure.ac):
97783         Likewise.
97784         * modules/unictype/syntax-c-ident (Depends-on, configure.ac): Likewise.
97785         * modules/unictype/syntax-java-ident (Depends-on, configure.ac):
97786         Likewise.
97788 2009-12-31  Bruno Haible  <bruno@clisp.org>
97790         Remove unnecessary AC_C_INLINE invocation.
97791         * m4/popen.m4 (gl_PREREQ_POPEN): Don't invoke AC_C_INLINE. Not needed
97792         since 2009-08-21.
97794 2009-12-31  Jim Meyering  <meyering@redhat.com>
97796         maint.mk: don't require explicit gpg_key_ID in cfg.mk
97797         * top/maint.mk (gpg_key_ID): Derive key ID from signed release tag.
97798         With this change, we can all remove the gpg_key_ID = ... definition
97799         from our respective cfg.mk files.
97801         maint.mk: create announcement template in ~/, not in /tmp
97802         * top/maint.mk (emit_upload_commands): Adjust.
97803         (release-prep): Emit into ~/announce-..., not /tmp/announce-...
97804         Remove temporary file, .ci-msg.
97806 2009-12-31  Eric Blake  <ebb9@byu.net>
97808         link-warning: always build headers with link warnings
97809         * modules/arpa_inet (Makefile.am): Always build replacement
97810         header.
97811         * modules/ctype (Makefile.am): Likewise.
97812         * modules/dirent (Makefile.am): Likewise.
97813         * modules/inttypes (Makefile.am): Likewise.
97814         * modules/langinfo (Makefile.am): Likewise.
97815         * modules/locale (Makefile.am): Likewise.
97816         * modules/spawn (Makefile.am): Likewise.
97817         * modules/sys_file (Makefile.am): Likewise.
97818         * modules/sys_ioctl (Makefile.am): Likewise.
97819         * modules/sys_select (Makefile.am): Likewise.
97820         * modules/sys_socket (Makefile.am): Likewise.
97821         * modules/sys_times (Makefile.am): Likewise.
97822         * modules/sys_utsname (Makefile.am): Likewise.
97823         * modules/sys_wait (Makefile.am): Likewise.
97824         * modules/wchar (Makefile.am): Likewise.
97825         * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET)
97826         (gl_ARPA_INET_H_DEFAULTS): Drop unneeded variable.
97827         * m4/ctype.m4 (gl_CTYPE_H_DEFAULTS): Likewise.
97828         * m4/isblank.m4 (gl_FUNC_ISBLANK): Likewise.
97829         * m4/dirent_h.m4 (gl_REPLACE_DIRENT_H, gl_DIRENT_H_DEFAULTS):
97830         Likewise.
97831         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
97832         * m4/langinfo_h.m4 (gl_LANGINFO_H): Likewise.
97833         * m4/locale_h.m4 (gl_REPLACE_LOCALE_H, gl_LOCALE_H_DEFAULTS):
97834         Likewise.
97835         * m4/spawn_h.m4 (gl_REPLACE_SPAWN_H, gl_SPAWN_H_DEFAULTS):
97836         Likewise.
97837         * m4/sys_file_h.m4 (gl_HEADER_SYS_FILE_H): Likewise.
97838         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H, gl_REPLACE_SYS_IOCTL_H)
97839         (gl_SYS_IOCTL_H_DEFAULTS): Likewise.
97840         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
97841         * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Likewise.
97842         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H)
97843         (gl_SYS_UTSNAME_H_DEFAULTS): Likewise.
97844         * m4/wchar.m4 (gl_WCHAR_H, gl_REPLACE_WCHAR_H)
97845         (gl_WCHAR_H_DEFAULTS): Likewise.
97847 2009-12-31  Eric Blake  <ebb9@byu.net>
97849         signal, spawn: use link warnings
97850         * lib/signal.in.h (sigset_t): Make unconditional.
97851         (sigismember, sigemptyset, sigaddset, sigdelset, sigfillset)
97852         (sigpending, sigprocmask, sigaction): Add link warnings.
97853         * lib/spawn.in.h (posix_spawn, posix_spawnp, posix_spawnattr_init)
97854         (posix_spawnattr_destroy, posix_spawnattr_getsigdefault)
97855         (posix_spawnattr_setsigdefault, posix_spawnattr_getsigmask)
97856         (posix_spawnattr_setsigmask, posix_spawnattr_getflags)
97857         (posix_spawnattr_setflags, posix_spawnattr_getpgroup)
97858         (posix_spawnattr_setpgroup, posix_spawnattr_getschedpolicy)
97859         (posix_spawnattr_setschedpolicy, posix_spawnattr_getschedparam)
97860         (posix_spawnattr_setschedparam, posix_spawn_file_actions_init)
97861         (posix_spawn_file_actions_destroy)
97862         (posix_spawn_file_actions_addopen)
97863         (posix_spawn_file_actions_addclose)
97864         (posix_spawn_file_actions_adddup2): Likewise.
97865         * m4/signal_h.m4 (gl_SIGNAL_H): Guarantee uid_t.
97866         * tests/test-signal.c (main): Enhance test.
97868         spawn: improve wrapper support
97869         * m4/spawn_h.m4 (gl_SPAWN_H): Check for type existence.
97870         (gl_SPAWN_H_DEFAULTS): New defaults.
97871         * modules/spawn (Makefile.am): Substitute them.
97872         * lib/spawn.in.h: (posix_spawnattr_t, posix_spawn_file_actions_t):
97873         Only declare if missing or broken.
97875         sys_times, sys_utsname: use include_next
97876         * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Support wrapping an existing
97877         header.
97878         (gl_SYS_TIMES_H_DEFAULTS): Add another variable.
97879         * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H)
97880         (gl_SYS_UTSNAME_H_DEFAULTS): Likewise.
97881         * modules/sys_times (Depends-on): Add include_next.
97882         (Makefile.am): Substitute additional values.
97883         * modules/sys_utsname (Depends-on, Makefile.am): Likewise.
97884         * lib/sys_times.in.h (includes): Include native header, if
97885         available.
97886         * lib/sys_utsname.in.h (includes): Likewise.
97887         * tests/test-sys_times.c (main): Enhance test.
97889         fdutimensat: revert prior patch
97890         * modules/fdutimensat (Depends-on): Re-add inline; it is needed by
97891         utimens.h.
97892         Reported by Bruno Haible.
97894 2009-12-30  Eric Blake  <ebb9@byu.net>
97896         sys_wait: drop link-warning dependency
97897         * modules/sys_wait (Depends-on, Makefile.am): Drop unneeded
97898         link-warning efforts.
97899         * lib/sys_wait.in.h: Likewise.
97901         fdutimensat: remove bogus dependency
97902         * modules/fdutimensat (Depends-on): Drop inline.
97904         unistd: fix typo
97905         * lib/unistd.in.h (linkat) [GNULIB_POSIXCHECK]: Fix typo.
97907 2009-12-30  Bruno Haible  <bruno@clisp.org>
97909         Fix compilation error with Solaris cc.
97910         * lib/unicase/u8-is-invariant.c: Include <stdbool.h>.
97911         * lib/unicase/u16-is-invariant.c: Likewise.
97912         * lib/unicase/u32-is-invariant.c: Likewise.
97913         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
97915 2009-12-30  Bruno Haible  <bruno@clisp.org>
97917         Fix test crash.
97918         * tests/test-localename.c (test_locale_name_thread): Skip unavailable
97919         locales.
97920         Reported by Simon Josefsson <simon@josefsson.org>.
97922 2009-12-30  Bruno Haible  <bruno@clisp.org>
97924         Fix compilation error on most platforms.
97925         * tests/test-localename.c (categories): Define only if HAVE_NEWLOCALE.
97926         Reported by Simon Josefsson <simon@josefsson.org>
97927         and Nelson H. F. Beebe <beebe@math.utah.edu>.
97929 2009-12-30  Eric Blake  <ebb9@byu.net>
97931         futimens, utimensat: work around ntfs-3g bug
97932         * lib/utimensat.c (rpl_utimensat): Drop attempts to cache whether
97933         a ctime bug is present, and expand workaround to cover ntfs-3g.
97934         * lib/utimens.c (fdutimens, lutimens): Likewise.
97935         (utimensat_ctime_really, detect_ctime_bug): Drop cache mechanism.
97936         (validate_timespec): Adjust return value.
97937         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Update comment.
97938         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise.
97939         Reported by ctrn3e8 <ctrn3e8@gmail.com>.
97941 2009-12-29  Eric Blake  <ebb9@byu.net>
97943         link-warning: make usage consistent
97944         * modules/ctype (Depends-on): Add link-warning.
97945         (Makefile.am): Update rules accordingly.
97946         * modules/langinfo (Depends-on, Makefile.am): Likewise.
97947         * modules/locale (Depends-on, Makefile.am): Likewise.
97948         * modules/sys_file (Makefile.am): Likewise.
97949         * modules/getopt-posix (Makefile.am): Delete unused link warning
97950         efforts.
97951         * lib/ctype.in.h (GL_LINK_WARNING): Ensure definition before use.
97952         * lib/langinfo.in.h (GL_LINK_WARNING): Likewise.
97953         * lib/locale.in.h (GL_LINK_WARNING): Likewise.
97954         * lib/sys_file.in.h (GL_LINK_WARNING): Likewise.
97956         stdio: remove unused variables
97957         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Remove unused variables.
97958         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Likewise.
97959         * m4/ftello.m4 (gl_FUNC_FTELLO): Likewise.
97961         tests: test more substitute headers
97962         * modules/ctype-tests: New file.
97963         * modules/dirent-tests: Likewise.
97964         * modules/spawn-tests: Likewise.
97965         * modules/sys_file-tests: Likewise.
97966         * modules/sys_ioctl-tests: Likewise.
97967         * modules/sys_wait-tests: Likewise.
97968         * tests/test-ctype.c: Likewise.
97969         * tests/test-dirent.c: Likewise.
97970         * tests/test-spawn.c: Likewise.
97971         * tests/test-sys_file.c: Likewise.
97972         * tests/test-sys_ioctl.c: Likewise.
97973         * tests/test-sys_wait.c: Likewise.
97974         * m4/spawn_h.m4 (gl_SPAWN_H): Replace header if it is missing.
97975         * lib/sys_file.in.h (LOCK_SH, LOCK_EX, LOCK_UN, LOCK_NB): Provide
97976         whether or not flock is in use.
97978         tests: remove License section from module
97979         * modules/arpa_inet-tests: Remove unneeded section.
97980         * modules/byteswap-tests: Likewise.
97981         * modules/ceilf-tests: Likewise.
97982         * modules/ceill-tests: Likewise.
97983         * modules/crypto/des-tests: Likewise.
97984         * modules/crypto/gc-arcfour-tests: Likewise.
97985         * modules/crypto/gc-arctwo-tests: Likewise.
97986         * modules/crypto/gc-des-tests: Likewise.
97987         * modules/crypto/gc-hmac-md5-tests: Likewise.
97988         * modules/crypto/gc-hmac-sha1-tests: Likewise.
97989         * modules/crypto/gc-md2-tests: Likewise.
97990         * modules/crypto/gc-md4-tests: Likewise.
97991         * modules/crypto/gc-md5-tests: Likewise.
97992         * modules/crypto/gc-pbkdf2-sha1-tests: Likewise.
97993         * modules/crypto/gc-rijndael-tests: Likewise.
97994         * modules/crypto/gc-sha1-tests: Likewise.
97995         * modules/crypto/gc-tests: Likewise.
97996         * modules/crypto/md2-tests: Likewise.
97997         * modules/crypto/md4-tests: Likewise.
97998         * modules/fcntl-h-tests: Likewise.
97999         * modules/floorf-tests: Likewise.
98000         * modules/floorl-tests: Likewise.
98001         * modules/frexp-nolibm-tests: Likewise.
98002         * modules/frexp-tests: Likewise.
98003         * modules/frexpl-nolibm-tests: Likewise.
98004         * modules/frexpl-tests: Likewise.
98005         * modules/getaddrinfo-tests: Likewise.
98006         * modules/inttypes-tests: Likewise.
98007         * modules/isfinite-tests: Likewise.
98008         * modules/isinf-tests: Likewise.
98009         * modules/ldexpl-tests: Likewise.
98010         * modules/locale-tests: Likewise.
98011         * modules/math-tests: Likewise.
98012         * modules/netdb-tests: Likewise.
98013         * modules/netinet_in-tests: Likewise.
98014         * modules/printf-frexp-tests: Likewise.
98015         * modules/printf-frexpl-tests: Likewise.
98016         * modules/priv-set-tests: Likewise.
98017         * modules/random_r-tests: Likewise.
98018         * modules/round-tests: Likewise.
98019         * modules/roundf-tests: Likewise.
98020         * modules/roundl-tests: Likewise.
98021         * modules/search-tests: Likewise.
98022         * modules/select-tests: Likewise.
98023         * modules/signal-tests: Likewise.
98024         * modules/stdbool-tests: Likewise.
98025         * modules/stddef-tests: Likewise.
98026         * modules/stdint-tests: Likewise.
98027         * modules/stdio-tests: Likewise.
98028         * modules/stdlib-tests: Likewise.
98029         * modules/string-tests: Likewise.
98030         * modules/strings-tests: Likewise.
98031         * modules/sys_select-tests: Likewise.
98032         * modules/sys_socket-tests: Likewise.
98033         * modules/sys_stat-tests: Likewise.
98034         * modules/sys_time-tests: Likewise.
98035         * modules/sys_utsname-tests: Likewise.
98036         * modules/sysexits-tests: Likewise.
98037         * modules/time-tests: Likewise.
98038         * modules/trunc-tests: Likewise.
98039         * modules/truncf-tests: Likewise.
98040         * modules/truncl-tests: Likewise.
98041         * modules/tsearch-tests: Likewise.
98042         * modules/unistd-tests: Likewise.
98043         * modules/wchar-tests: Likewise.
98044         * modules/wctype-tests: Likewise.
98046         tests: fix license on several tests
98047         * tests/test-des.c: Update to GPLv3+.
98048         * tests/test-flock.c: Likewise.
98049         * tests/test-fsync.c: Likewise.
98050         * tests/test-futimens.h: Likewise.
98051         * tests/test-gc-arcfour.c: Likewise.
98052         * tests/test-gc-arctwo.c: Likewise.
98053         * tests/test-gc-des.c: Likewise.
98054         * tests/test-gc-hmac-md5.c: Likewise.
98055         * tests/test-gc-hmac-sha1.c: Likewise.
98056         * tests/test-gc-md2.c: Likewise.
98057         * tests/test-gc-md4.c: Likewise.
98058         * tests/test-gc-md5.c: Likewise.
98059         * tests/test-gc-pbkdf2-sha1.c: Likewise.
98060         * tests/test-gc-rijndael.c: Likewise.
98061         * tests/test-gc-sha1.c: Likewise.
98062         * tests/test-gc.c: Likewise.
98063         * tests/test-getcwd.c: Likewise.
98064         * tests/test-link.c: Likewise.
98065         * tests/test-link.h: Likewise.
98066         * tests/test-lutimens.h: Likewise.
98067         * tests/test-md2.c: Likewise.
98068         * tests/test-md4.c: Likewise.
98069         * tests/test-mkdir.h: Likewise.
98070         * tests/test-rename.c: Likewise.
98071         * tests/test-rename.h: Likewise.
98072         * tests/test-safe-alloc.c: Likewise.
98073         * tests/test-utimens-common.h: Likewise.
98074         * tests/test-utimens.h: Likewise.
98076         maint: sync license texts
98077         * config/srclist.txt: Add gpl-1.3.texi, lgpl-1.3.texi.
98078         * doc/gpl-3.0.texi: Revert copyright year update.
98079         * doc/lgpl-3.0.texi: Likewise.
98081 2009-12-29  Jim Meyering  <meyering@redhat.com>
98083         update nearly all FSF copyright year lists to include 2009
98084         The files named by the following are exempted:
98085             grep -v '^#' config/srclist.txt|grep -v '^$' | while read src dst; do
98086               test -f "$dst" && { echo "$dst"; continue; }
98087               test -d "$dst" || continue
98088               echo "$dst"/$(basename "$src")
98089             done > exempt
98090             git ls-files tests/unictype >> exempt
98091         In the remaining files, convert to all-interval notation if
98092         - there is already at least one year interval like 2000-2003
98093         - the file is maintained by me
98094         - the file is in lib/uni*/, where that style already prevails
98095         Otherwise, use update-copyright's default.
98097 2009-12-29  Simon Josefsson  <simon@josefsson.org>
98098         and Eric Blake  <ebb9@byu.net>
98100         tests: don't require debug system() to pass
98101         * tests/test-lstat.h (test_lstat_func): Move debug cleanup...
98102         * tests/test-rmdir.h (test_rmdir_func): Likewise.
98103         * tests/test-unlink.h (test_unlink_func): Likewise.
98104         * tests/test-fstatat.c (main): ...into callers.
98105         * tests/test-lstat.c (main): Likewise.
98106         * tests/test-rmdir.c (main): Likewise.
98107         * tests/test-unlink.c (main): Likewise.
98108         * tests/test-unlinkat.c (main): Likewise.
98109         * tests/test-areadlink-with-size.c (main): Don't require a
98110         debug-only system call to pass, aiding cross-testing to mingw.
98111         * tests/test-areadlink.c (main): Likewise.
98112         * tests/test-areadlinkat-with-size.c (main): Likewise.
98113         * tests/test-areadlinkat.c (main): Likewise.
98114         * tests/test-canonicalize-lgpl.c (main): Likewise.
98115         * tests/test-canonicalize.c (main): Likewise.
98116         * tests/test-chown.c (main): Likewise.
98117         * tests/test-fchownat.c (main): Likewise.
98118         * tests/test-lchown.c (main): Likewise.
98119         * tests/test-fdutimensat.c (main): Likewise.
98120         * tests/test-futimens.c (main): Likewise.
98121         * tests/test-link.c (main): Likewise.
98122         * tests/test-linkat.c (main): Likewise.
98123         * tests/test-mkdir.c (main): Likewise.
98124         * tests/test-mkdirat.c (main): Likewise.
98125         * tests/test-mkfifo.c (main): Likewise.
98126         * tests/test-mkfifoat.c (main): Likewise.
98127         * tests/test-mknod.c (main): Likewise.
98128         * tests/test-readlink.c (main): Likewise.
98129         * tests/test-remove.c (main): Likewise.
98130         * tests/test-rename.c (main): Likewise.
98131         * tests/test-renameat.c (main): Likewise.
98132         * tests/test-symlink.c (main): Likewise.
98133         * tests/test-symlinkat.c (main): Likewise.
98134         * tests/test-utimens.c (main): Likewise.
98135         * tests/test-utimensat.c (main): Likewise.
98137 2009-12-29  Simon Josefsson  <simon@josefsson.org>
98139         * modules/selinux-h (selinux/selinux.h, selinux/context.h): Depend
98140         on $(UNUSED_PARAMETER_H) to avoid build failure.
98142 2009-12-28  Jim Meyering  <meyering@redhat.com>
98144         update-copyright: you may specify a max. line length other than 72
98145         * build-aux/update-copyright: Honor $UPDATE_COPYRIGHT_MAX_LINE_LENGTH.
98147         maint: use consistent FSF copyright line syntax
98148         * lib/posixtm.c: Add missing comma in FSF copyright line.
98149         * lib/posixtm.h: Likewise.
98150         * lib/getugroups.c: Add missing ", Inc.".
98152         pmccabe2html: emit consistent FSF copyright; remove trailing blanks
98153         * build-aux/pmccabe2html: Insert comma before "Inc." in emitted
98154         FSF copyright line.  Remove trailing blanks.
98156 2009-12-28  Eric Blake  <ebb9@byu.net>
98158         test-dup2: reduce dependencies
98159         * modules/cloexec (Configure.ac): Set witness.
98160         * modules/dup2-tests (Depends-on): Drop cloexec.
98161         * tests/test-dup2.c (main): Skip portion of test if cloexec module
98162         not present.
98163         Suggested by Bruno Haible.
98165 2009-12-26  Bruno Haible  <bruno@clisp.org>
98167         Remove an unneeded dependency.
98168         * modules/fseterr (Depends-on): Remove dup2.
98170 2009-12-26  Eric Blake  <ebb9@byu.net>
98172         tests: use macros.h in more places
98173         * tests/macros.h (ASSERT): Depend on ASSERT_STREAM.
98174         (ASSERT_STREAM): Provide default of stderr.
98175         * tests/test-dirent-safer.c: Include macros.h, using alternate
98176         stream for assertions.
98177         * tests/test-dup-safer.c: Likewise.
98178         * tests/test-freopen-safer.c: Likewise.
98179         * tests/test-getopt.c: Likewise.
98180         * tests/test-openat-safer.c: Likewise.
98181         * tests/test-pipe.c: Likewise.
98182         * tests/test-popen-safer.c: Likewise.
98183         * modules/dirent-safer-tests (Files): Include macros.h.
98184         * modules/unistd-safer-tests (Files): Likewise.
98185         * modules/freopen-safer-tests (Files): Likewise.
98186         * modules/getopt-posix-tests (Files): Likewise.
98187         * modules/openat-safer-tests (Files): Likewise.
98188         * modules/pipe-tests (Files): Likewise.
98190 2009-12-26  Bruno Haible  <bruno@clisp.org>
98192         javacomp-script: Portability fix.
98193         * m4/javacomp.m4 (gt_JAVACOMP): Fix creation of conftestver.class so
98194         that it also works on Solaris.
98196 2009-12-26  Bruno Haible  <bruno@clisp.org>
98198         localename: Fix storage allocation of gl_locale_name_thread's result.
98199         * lib/localename.c (SIZE_BITS, string_hash, struct hash_node,
98200         HASH_TABLE_SIZE, struniq_hash_table, struniq_lock, struniq): Define on
98201         all platforms that have 'uselocale'.
98202         (gl_locale_name_thread_unsafe): New function, extracted from
98203         gl_locale_name_thread.
98204         (gl_locale_name_thread): Call struniq on all platforms that have
98205         'uselocale'.
98206         * tests/test-localename.c (test_locale_name_thread): Check that the
98207         resulting strings are permanently allocated.
98208         * modules/localename-tests (Depends-on): Add strdup.
98210 2009-12-26  Bruno Haible  <bruno@clisp.org>
98212         * tests/test-localename.c (categories): Fill in the strings.
98214 2009-12-26  Jim Meyering  <meyering@redhat.com>
98216         isdir: complete the removal of m4/isdir.m4
98217         * modules/isdir (configure.ac): Remove reference to gl_ISDIR.
98219         isdir: clean up, since at least grep still uses it
98220         * lib/isdir.c: Include "isdir.h".
98221         (S_ISDIR): Remove now-unneeded definition.
98222         * modules/isdir (Files): Add lib/isdir.h.
98223         * lib/isdir.h: New file, with declaration.
98224         * m4/isdir.m4: Remove file -- unneeded.
98226 2009-12-25  Bruno Haible  <bruno@clisp.org>
98228         selinux-h: Make generated .h files standalone.
98229         * lib/se-context.in.h: Arrange to include _GL_UNUSED_PARAMETER
98230         definition. Use _GL_UNUSED_PARAMETER instead of _GL_UNUSED.
98231         * lib/se-selinux.in.h: Likewise.
98232         * modules/selinux-h (Depends-on): Add unused-parameter.
98233         (Makefile.am): Insert definition of _GL_UNUSED_PARAMETER into
98234         selinux/selinux.h and selinux/context.h.
98235         Suggested by Eric Blake.
98237 2009-12-25  Bruno Haible  <bruno@clisp.org>
98239         Move gl_FCNTL_O_FLAGS to a separate .m4 file.
98240         * m4/fcntl-o.m4: New file, extracted from m4/fcntl_h.m4.
98241         * m4/fcntl_h.m4 (gl_FCNTL_O_FLAGS): Remove macro.
98242         * modules/fcntl-h (Files): Add m4/fcntl-o.m4.
98243         * modules/localcharset (Files): Likewise. Remove m4/fcntl_h.m4.
98245 2009-12-24  Bruno Haible  <bruno@clisp.org>
98247         openat: Fix warning.
98248         * lib/openat-proc.c: Include <unistd.h>.
98250 2009-12-24  Bruno Haible  <bruno@clisp.org>
98252         New module 'unused-parameter'.
98253         * build-aux/unused-parameter.h: New file, extracted from earlier
98254         gnulib-common.m4.
98255         * modules/unused-parameter: New file.
98256         * lib/unistr.h: Include unused-parameter.h.
98257         (u32_mbtouc_unsafe, u32_mbtouc): Use _GL_UNUSED_PARAMETER instead of
98258         _GL_UNUSED.
98259         * modules/unistr/base (Depends-on): Add unused-parameter.
98261 2009-12-24  Bruno Haible  <bruno@clisp.org>
98263         Add missing dependencies to 'extensions' module.
98264         * m4/extensions.m4: Add comment.
98265         * modules/accept4 (Depends-on): Add extensions.
98266         * modules/dup3 (Depends-on): Likewise.
98267         * modules/fcntl (Depends-on): Likewise.
98268         * modules/futimens (Depends-on): Likewise.
98269         * modules/mknod (Depends-on): Likewise.
98270         * modules/pipe2 (Depends-on): Likewise.
98271         * modules/stat-time (Depends-on): Likewise.
98272         * modules/strcasestr-simple (Depends-on): Likewise.
98273         * modules/strsignal (Depends-on): Likewise.
98274         * modules/utimensat (Depends-on): Likewise.
98275         * modules/localcharset (Depends-on): Likewise. Needed because of
98276         gl_FCNTL_O_FLAGS.
98277         * modules/wcrtomb (Depends-on): Likewise. Needed because of
98278         AC_TYPE_MBSTATE_T.
98279         * modules/wcsnrtombs (Depends-on): Likewise.
98280         * modules/wcsrtombs (Depends-on): Likewise.
98282 2009-12-24  Bruno Haible  <bruno@clisp.org>
98284         binary-io: Avoid gcc warning due to SET_BINARY.
98285         * lib/binary-io.h (SET_BINARY): Cast the result to void.
98286         Reported by Jim Meyering <jim@meyering.net>. Suggestion by Eric Blake.
98288 2009-12-24  Bruno Haible  <bruno@clisp.org>
98290         Avoid future namespace pollution on glibc systems.
98291         * lib/arpa_inet.in.h: Don't include <sys/socket.h> on glibc systems.
98292         * lib/sys_ioctl.in.h: Don't include <unistd.h> on glibc systems.
98293         * lib/sys_select.in.h: Don't include <sys/time.h> and <string.h> on
98294         glibc systems.
98296 2009-12-24  Bruno Haible  <bruno@clisp.org>
98298         Refactor common macros used in tests.
98299         * tests/macros.h: New file.
98300         * tests/test-areadlink.c: Include macros.h. Don't include <stdio.h>
98301         and/or <stdlib.h>, if appropriate.
98302         (ASSERT, SIZEOF): Remove macros.
98303         * tests/test-areadlink-with-size.c: Likewise.
98304         * tests/test-areadlinkat.c: Likewise.
98305         * tests/test-areadlinkat-with-size.c: Likewise.
98306         * tests/test-argmatch.c: Likewise.
98307         * tests/test-argv-iter.c: Likewise.
98308         * tests/test-array-mergesort.c: Likewise.
98309         * tests/test-array_list.c: Likewise.
98310         * tests/test-array_oset.c: Likewise.
98311         * tests/test-avltree_list.c: Likewise.
98312         * tests/test-avltree_oset.c: Likewise.
98313         * tests/test-avltreehash_list.c: Likewise.
98314         * tests/test-base64.c: Likewise.
98315         * tests/test-binary-io.c: Likewise.
98316         * tests/test-bitrotate.c: Likewise.
98317         * tests/test-btowc.c: Likewise.
98318         * tests/test-byteswap.c: Likewise.
98319         * tests/test-c-ctype.c: Likewise.
98320         * tests/test-c-stack.c: Likewise.
98321         * tests/test-c-strcasecmp.c: Likewise.
98322         * tests/test-c-strcasestr.c: Likewise.
98323         * tests/test-c-strncasecmp.c: Likewise.
98324         * tests/test-c-strstr.c: Likewise.
98325         * tests/test-canonicalize-lgpl.c: Likewise.
98326         * tests/test-canonicalize.c: Likewise.
98327         * tests/test-carray_list.c: Likewise.
98328         * tests/test-ceilf1.c: Likewise.
98329         * tests/test-ceilf2.c: Likewise.
98330         * tests/test-ceill.c: Likewise.
98331         * tests/test-chown.c: Likewise.
98332         * tests/test-cloexec.c: Likewise.
98333         * tests/test-copy-acl.c: Likewise.
98334         * tests/test-copy-file.c: Likewise.
98335         * tests/test-count-one-bits.c: Likewise.
98336         * tests/test-dprintf-posix.c: Likewise.
98337         * tests/test-dup2.c: Likewise.
98338         * tests/test-dup3.c: Likewise.
98339         * tests/test-duplocale.c: Likewise.
98340         * tests/test-fbufmode.c: Likewise.
98341         * tests/test-fchdir.c: Likewise.
98342         * tests/test-fchownat.c: Likewise.
98343         * tests/test-fcntl-safer.c: Likewise.
98344         * tests/test-fcntl.c: Likewise.
98345         * tests/test-fdopendir.c: Likewise.
98346         * tests/test-fdutimensat.c: Likewise.
98347         * tests/test-fflush2.c: Likewise.
98348         * tests/test-file-has-acl.c: Likewise.
98349         * tests/test-filevercmp.c: Likewise.
98350         * tests/test-flock.c: Likewise.
98351         * tests/test-floorf1.c: Likewise.
98352         * tests/test-floorf2.c: Likewise.
98353         * tests/test-floorl.c: Likewise.
98354         * tests/test-fnmatch.c: Likewise.
98355         * tests/test-fopen.h: Likewise.
98356         * tests/test-fpending.c: Likewise.
98357         * tests/test-fprintf-posix.c: Likewise.
98358         * tests/test-fpurge.c: Likewise.
98359         * tests/test-freadable.c: Likewise.
98360         * tests/test-freadahead.c: Likewise.
98361         * tests/test-freading.c: Likewise.
98362         * tests/test-freadptr.c: Likewise.
98363         * tests/test-freadptr2.c: Likewise.
98364         * tests/test-freadseek.c: Likewise.
98365         * tests/test-freopen.c: Likewise.
98366         * tests/test-frexp.c: Likewise.
98367         * tests/test-frexpl.c: Likewise.
98368         * tests/test-fseek.c: Likewise.
98369         * tests/test-fseeko.c: Likewise.
98370         * tests/test-fstatat.c: Likewise.
98371         * tests/test-fstrcmp.c: Likewise.
98372         * tests/test-fsync.c: Likewise.
98373         * tests/test-ftell.c: Likewise.
98374         * tests/test-ftello.c: Likewise.
98375         * tests/test-func.c: Likewise.
98376         * tests/test-futimens.c: Likewise.
98377         * tests/test-fwritable.c: Likewise.
98378         * tests/test-fwriting.c: Likewise.
98379         * tests/test-getcwd.c: Likewise.
98380         * tests/test-getdate.c: Likewise.
98381         * tests/test-getdelim.c: Likewise.
98382         * tests/test-getdtablesize.c: Likewise.
98383         * tests/test-getgroups.c: Likewise.
98384         * tests/test-getline.c: Likewise.
98385         * tests/test-getndelim2.c: Likewise.
98386         * tests/test-glob.c: Likewise.
98387         * tests/test-hash.c: Likewise.
98388         * tests/test-i-ring.c: Likewise.
98389         * tests/test-iconv-utf.c: Likewise.
98390         * tests/test-iconv.c: Likewise.
98391         * tests/test-idpriv-drop.c: Likewise.
98392         * tests/test-idpriv-droptemp.c: Likewise.
98393         * tests/test-inet_ntop.c: Likewise.
98394         * tests/test-inet_pton.c: Likewise.
98395         * tests/test-isblank.c: Likewise.
98396         * tests/test-isfinite.c: Likewise.
98397         * tests/test-isinf.c: Likewise.
98398         * tests/test-isnan.c: Likewise.
98399         * tests/test-isnand.h: Likewise.
98400         * tests/test-isnanf.h: Likewise.
98401         * tests/test-isnanl.h: Likewise.
98402         * tests/test-lchown.c: Likewise.
98403         * tests/test-ldexpl.c: Likewise.
98404         * tests/test-link.c: Likewise.
98405         * tests/test-linkat.c: Likewise.
98406         * tests/test-linked_list.c: Likewise.
98407         * tests/test-linkedhash_list.c: Likewise.
98408         * tests/test-localename.c: Likewise.
98409         * tests/test-lseek.c: Likewise.
98410         * tests/test-lstat.c: Likewise.
98411         * tests/test-mbmemcasecmp.c: Likewise.
98412         * tests/test-mbmemcasecoll.c: Likewise.
98413         * tests/test-mbrtowc.c: Likewise.
98414         * tests/test-mbscasecmp.c: Likewise.
98415         * tests/test-mbscasestr1.c: Likewise.
98416         * tests/test-mbscasestr2.c: Likewise.
98417         * tests/test-mbscasestr3.c: Likewise.
98418         * tests/test-mbscasestr4.c: Likewise.
98419         * tests/test-mbschr.c: Likewise.
98420         * tests/test-mbscspn.c: Likewise.
98421         * tests/test-mbsinit.c: Likewise.
98422         * tests/test-mbsncasecmp.c: Likewise.
98423         * tests/test-mbsnrtowcs.c: Likewise.
98424         * tests/test-mbspbrk.c: Likewise.
98425         * tests/test-mbspcasecmp.c: Likewise.
98426         * tests/test-mbsrchr.c: Likewise.
98427         * tests/test-mbsrtowcs.c: Likewise.
98428         * tests/test-mbsspn.c: Likewise.
98429         * tests/test-mbsstr1.c: Likewise.
98430         * tests/test-mbsstr2.c: Likewise.
98431         * tests/test-mbsstr3.c: Likewise.
98432         * tests/test-memchr.c: Likewise.
98433         * tests/test-memchr2.c: Likewise.
98434         * tests/test-memcmp.c: Likewise.
98435         * tests/test-memmem.c: Likewise.
98436         * tests/test-memrchr.c: Likewise.
98437         * tests/test-mkdir.c: Likewise.
98438         * tests/test-mkdirat.c: Likewise.
98439         * tests/test-mkfifo.c: Likewise.
98440         * tests/test-mkfifoat.c: Likewise.
98441         * tests/test-mknod.c: Likewise.
98442         * tests/test-nanosleep.c: Likewise.
98443         * tests/test-nl_langinfo.c: Likewise.
98444         * tests/test-obstack-printf.c: Likewise.
98445         * tests/test-open.c: Likewise.
98446         * tests/test-openat.c: Likewise.
98447         * tests/test-pipe-filter-gi1.c: Likewise.
98448         * tests/test-pipe-filter-gi2-main.c: Likewise.
98449         * tests/test-pipe-filter-ii1.c: Likewise.
98450         * tests/test-pipe-filter-ii2-main.c: Likewise.
98451         * tests/test-pipe2.c: Likewise.
98452         * tests/test-popen.h: Likewise.
98453         * tests/test-posixtm.c: Likewise.
98454         * tests/test-pread.c: Likewise.
98455         * tests/test-printf-frexp.c: Likewise.
98456         * tests/test-printf-frexpl.c: Likewise.
98457         * tests/test-printf-posix.c: Likewise.
98458         * tests/test-priv-set.c: Likewise.
98459         * tests/test-quotearg.c: Likewise.
98460         * tests/test-random_r.c: Likewise.
98461         * tests/test-rawmemchr.c: Likewise.
98462         * tests/test-rbtree_list.c: Likewise.
98463         * tests/test-rbtree_oset.c: Likewise.
98464         * tests/test-rbtreehash_list.c: Likewise.
98465         * tests/test-readlink.c: Likewise.
98466         * tests/test-remove.c: Likewise.
98467         * tests/test-rename.c: Likewise.
98468         * tests/test-renameat.c: Likewise.
98469         * tests/test-rmdir.c: Likewise.
98470         * tests/test-round1.c: Likewise.
98471         * tests/test-roundf1.c: Likewise.
98472         * tests/test-roundl.c: Likewise.
98473         * tests/test-safe-alloc.c: Likewise.
98474         * tests/test-sameacls.c: Likewise.
98475         * tests/test-set-mode-acl.c: Likewise.
98476         * tests/test-setenv.c: Likewise.
98477         * tests/test-sigaction.c: Likewise.
98478         * tests/test-signbit.c: Likewise.
98479         * tests/test-sleep.c: Likewise.
98480         * tests/test-snprintf-posix.c: Likewise.
98481         * tests/test-snprintf.c: Likewise.
98482         * tests/test-sprintf-posix.c: Likewise.
98483         * tests/test-stat-time.c: Likewise.
98484         * tests/test-stat.c: Likewise.
98485         * tests/test-strcasestr.c: Likewise.
98486         * tests/test-strchrnul.c: Likewise.
98487         * tests/test-strerror.c: Likewise.
98488         * tests/test-striconv.c: Likewise.
98489         * tests/test-striconveh.c: Likewise.
98490         * tests/test-striconveha.c: Likewise.
98491         * tests/test-strsignal.c: Likewise.
98492         * tests/test-strstr.c: Likewise.
98493         * tests/test-strtod.c: Likewise.
98494         * tests/test-strverscmp.c: Likewise.
98495         * tests/test-symlink.c: Likewise.
98496         * tests/test-symlinkat.c: Likewise.
98497         * tests/test-trunc1.c: Likewise.
98498         * tests/test-trunc2.c: Likewise.
98499         * tests/test-truncf1.c: Likewise.
98500         * tests/test-truncf2.c: Likewise.
98501         * tests/test-truncl.c: Likewise.
98502         * tests/test-uname.c: Likewise.
98503         * tests/test-unlink.c: Likewise.
98504         * tests/test-unlinkat.c: Likewise.
98505         * tests/test-unsetenv.c: Likewise.
98506         * tests/test-usleep.c: Likewise.
98507         * tests/test-utimens.c: Likewise.
98508         * tests/test-utimensat.c: Likewise.
98509         * tests/test-vasnprintf-posix.c: Likewise.
98510         * tests/test-vasnprintf-posix2.c: Likewise.
98511         * tests/test-vasnprintf.c: Likewise.
98512         * tests/test-vasprintf-posix.c: Likewise.
98513         * tests/test-vasprintf.c: Likewise.
98514         * tests/test-vdprintf-posix.c: Likewise.
98515         * tests/test-vfprintf-posix.c: Likewise.
98516         * tests/test-vprintf-posix.c: Likewise.
98517         * tests/test-vsnprintf-posix.c: Likewise.
98518         * tests/test-vsnprintf.c: Likewise.
98519         * tests/test-vsprintf-posix.c: Likewise.
98520         * tests/test-wcrtomb.c: Likewise.
98521         * tests/test-wcsnrtombs.c: Likewise.
98522         * tests/test-wcsrtombs.c: Likewise.
98523         * tests/test-wctype.c: Likewise.
98524         * tests/test-wcwidth.c: Likewise.
98525         * tests/test-xfprintf-posix.c: Likewise.
98526         * tests/test-xmemdup0.c: Likewise.
98527         * tests/test-xprintf-posix.c: Likewise.
98528         * tests/test-xvasprintf.c: Likewise.
98529         * tests/unicase/test-locale-language.c: Likewise.
98530         * tests/unicase/test-mapping-part1.h: Likewise.
98531         * tests/unicase/test-predicate-part1.h: Likewise.
98532         * tests/unicase/test-u8-casecmp.c: Likewise.
98533         * tests/unicase/test-u8-casecoll.c: Likewise.
98534         * tests/unicase/test-u8-casefold.c: Likewise.
98535         * tests/unicase/test-u8-is-cased.c: Likewise.
98536         * tests/unicase/test-u8-is-casefolded.c: Likewise.
98537         * tests/unicase/test-u8-is-lowercase.c: Likewise.
98538         * tests/unicase/test-u8-is-titlecase.c: Likewise.
98539         * tests/unicase/test-u8-is-uppercase.c: Likewise.
98540         * tests/unicase/test-u8-tolower.c: Likewise.
98541         * tests/unicase/test-u8-totitle.c: Likewise.
98542         * tests/unicase/test-u8-toupper.c: Likewise.
98543         * tests/unicase/test-u16-casecmp.c: Likewise.
98544         * tests/unicase/test-u16-casecoll.c: Likewise.
98545         * tests/unicase/test-u16-casefold.c: Likewise.
98546         * tests/unicase/test-u16-is-cased.c: Likewise.
98547         * tests/unicase/test-u16-is-casefolded.c: Likewise.
98548         * tests/unicase/test-u16-is-lowercase.c: Likewise.
98549         * tests/unicase/test-u16-is-titlecase.c: Likewise.
98550         * tests/unicase/test-u16-is-uppercase.c: Likewise.
98551         * tests/unicase/test-u16-tolower.c: Likewise.
98552         * tests/unicase/test-u16-totitle.c: Likewise.
98553         * tests/unicase/test-u16-toupper.c: Likewise.
98554         * tests/unicase/test-u32-casecmp.c: Likewise.
98555         * tests/unicase/test-u32-casecoll.c: Likewise.
98556         * tests/unicase/test-u32-casefold.c: Likewise.
98557         * tests/unicase/test-u32-is-cased.c: Likewise.
98558         * tests/unicase/test-u32-is-casefolded.c: Likewise.
98559         * tests/unicase/test-u32-is-lowercase.c: Likewise.
98560         * tests/unicase/test-u32-is-titlecase.c: Likewise.
98561         * tests/unicase/test-u32-is-uppercase.c: Likewise.
98562         * tests/unicase/test-u32-tolower.c: Likewise.
98563         * tests/unicase/test-u32-totitle.c: Likewise.
98564         * tests/unicase/test-u32-toupper.c: Likewise.
98565         * tests/unicase/test-ulc-casecmp.c: Likewise.
98566         * tests/unicase/test-ulc-casecoll.c: Likewise.
98567         * tests/uniconv/test-u8-conv-from-enc.c: Likewise.
98568         * tests/uniconv/test-u8-conv-to-enc.c: Likewise.
98569         * tests/uniconv/test-u8-strconv-from-enc.c: Likewise.
98570         * tests/uniconv/test-u8-strconv-to-enc.c: Likewise.
98571         * tests/uniconv/test-u16-conv-from-enc.c: Likewise.
98572         * tests/uniconv/test-u16-conv-to-enc.c: Likewise.
98573         * tests/uniconv/test-u16-strconv-from-enc.c: Likewise.
98574         * tests/uniconv/test-u16-strconv-to-enc.c: Likewise.
98575         * tests/uniconv/test-u32-conv-from-enc.c: Likewise.
98576         * tests/uniconv/test-u32-conv-to-enc.c: Likewise.
98577         * tests/uniconv/test-u32-strconv-from-enc.c: Likewise.
98578         * tests/uniconv/test-u32-strconv-to-enc.c: Likewise.
98579         * tests/unictype/test-bidi_byname.c: Likewise.
98580         * tests/unictype/test-bidi_name.c: Likewise.
98581         * tests/unictype/test-bidi_of.c: Likewise.
98582         * tests/unictype/test-bidi_test.c: Likewise.
98583         * tests/unictype/test-block_list.c: Likewise.
98584         * tests/unictype/test-block_of.c: Likewise.
98585         * tests/unictype/test-block_test.c: Likewise.
98586         * tests/unictype/test-categ_and.c: Likewise.
98587         * tests/unictype/test-categ_and_not.c: Likewise.
98588         * tests/unictype/test-categ_byname.c: Likewise.
98589         * tests/unictype/test-categ_name.c: Likewise.
98590         * tests/unictype/test-categ_none.c: Likewise.
98591         * tests/unictype/test-categ_of.c: Likewise.
98592         * tests/unictype/test-categ_or.c: Likewise.
98593         * tests/unictype/test-categ_test_withtable.c: Likewise.
98594         * tests/unictype/test-combining.c: Likewise.
98595         * tests/unictype/test-decdigit.c: Likewise.
98596         * tests/unictype/test-digit.c: Likewise.
98597         * tests/unictype/test-mirror.c: Likewise.
98598         * tests/unictype/test-numeric.c: Likewise.
98599         * tests/unictype/test-pr_byname.c: Likewise.
98600         * tests/unictype/test-pr_test.c: Likewise.
98601         * tests/unictype/test-predicate-part1.h: Likewise.
98602         * tests/unictype/test-scripts.c: Likewise.
98603         * tests/unictype/test-sy_c_ident.c: Likewise.
98604         * tests/unictype/test-sy_java_ident.c: Likewise.
98605         * tests/unilbrk/test-u8-possible-linebreaks.c: Likewise.
98606         * tests/unilbrk/test-u8-width-linebreaks.c: Likewise.
98607         * tests/unilbrk/test-u16-possible-linebreaks.c: Likewise.
98608         * tests/unilbrk/test-u16-width-linebreaks.c: Likewise.
98609         * tests/unilbrk/test-u32-possible-linebreaks.c: Likewise.
98610         * tests/unilbrk/test-u32-width-linebreaks.c: Likewise.
98611         * tests/unilbrk/test-ulc-possible-linebreaks.c: Likewise.
98612         * tests/unilbrk/test-ulc-width-linebreaks.c: Likewise.
98613         * tests/uninorm/test-canonical-decomposition.c: Likewise.
98614         * tests/uninorm/test-compat-decomposition.c: Likewise.
98615         * tests/uninorm/test-composition.c: Likewise.
98616         * tests/uninorm/test-decomposing-form.c: Likewise.
98617         * tests/uninorm/test-decomposition.c: Likewise.
98618         * tests/uninorm/test-u8-nfc.c: Likewise.
98619         * tests/uninorm/test-u8-nfd.c: Likewise.
98620         * tests/uninorm/test-u8-nfkc.c: Likewise.
98621         * tests/uninorm/test-u8-nfkd.c: Likewise.
98622         * tests/uninorm/test-u8-normcmp.c: Likewise.
98623         * tests/uninorm/test-u8-normcoll.c: Likewise.
98624         * tests/uninorm/test-u16-nfc.c: Likewise.
98625         * tests/uninorm/test-u16-nfd.c: Likewise.
98626         * tests/uninorm/test-u16-nfkc.c: Likewise.
98627         * tests/uninorm/test-u16-nfkd.c: Likewise.
98628         * tests/uninorm/test-u16-normcmp.c: Likewise.
98629         * tests/uninorm/test-u16-normcoll.c: Likewise.
98630         * tests/uninorm/test-u32-nfc.c: Likewise.
98631         * tests/uninorm/test-u32-nfd.c: Likewise.
98632         * tests/uninorm/test-u32-nfkc.c: Likewise.
98633         * tests/uninorm/test-u32-nfkd.c: Likewise.
98634         * tests/uninorm/test-u32-normalize-big.c: Likewise.
98635         * tests/uninorm/test-u32-normcmp.c: Likewise.
98636         * tests/uninorm/test-u32-normcoll.c: Likewise.
98637         * tests/uninorm/test-uninorm-filter-nfc.c: Likewise.
98638         * tests/unistdio/test-u8-asnprintf1.c: Likewise.
98639         * tests/unistdio/test-u8-vasnprintf1.c: Likewise.
98640         * tests/unistdio/test-u8-vasnprintf2.c: Likewise.
98641         * tests/unistdio/test-u8-vasnprintf3.c: Likewise.
98642         * tests/unistdio/test-u8-vasprintf1.c: Likewise.
98643         * tests/unistdio/test-u8-vsnprintf1.c: Likewise.
98644         * tests/unistdio/test-u8-vsprintf1.c: Likewise.
98645         * tests/unistdio/test-u16-asnprintf1.c: Likewise.
98646         * tests/unistdio/test-u16-vasnprintf1.c: Likewise.
98647         * tests/unistdio/test-u16-vasnprintf2.c: Likewise.
98648         * tests/unistdio/test-u16-vasnprintf3.c: Likewise.
98649         * tests/unistdio/test-u16-vasprintf1.c: Likewise.
98650         * tests/unistdio/test-u16-vsnprintf1.c: Likewise.
98651         * tests/unistdio/test-u16-vsprintf1.c: Likewise.
98652         * tests/unistdio/test-u32-asnprintf1.c: Likewise.
98653         * tests/unistdio/test-u32-vasnprintf1.c: Likewise.
98654         * tests/unistdio/test-u32-vasnprintf2.c: Likewise.
98655         * tests/unistdio/test-u32-vasnprintf3.c: Likewise.
98656         * tests/unistdio/test-u32-vasprintf1.c: Likewise.
98657         * tests/unistdio/test-u32-vsnprintf1.c: Likewise.
98658         * tests/unistdio/test-u32-vsprintf1.c: Likewise.
98659         * tests/unistdio/test-ulc-asnprintf1.c: Likewise.
98660         * tests/unistdio/test-ulc-vasnprintf1.c: Likewise.
98661         * tests/unistdio/test-ulc-vasnprintf2.c: Likewise.
98662         * tests/unistdio/test-ulc-vasnprintf3.c: Likewise.
98663         * tests/unistdio/test-ulc-vasprintf1.c: Likewise.
98664         * tests/unistdio/test-ulc-vsnprintf1.c: Likewise.
98665         * tests/unistdio/test-ulc-vsprintf1.c: Likewise.
98666         * tests/uniwbrk/test-u8-wordbreaks.c: Likewise.
98667         * tests/uniwbrk/test-u16-wordbreaks.c: Likewise.
98668         * tests/uniwbrk/test-u32-wordbreaks.c: Likewise.
98669         * tests/uniwbrk/test-ulc-wordbreaks.c: Likewise.
98670         * tests/uniwidth/test-u8-strwidth.c: Likewise.
98671         * tests/uniwidth/test-u8-width.c: Likewise.
98672         * tests/uniwidth/test-u16-strwidth.c: Likewise.
98673         * tests/uniwidth/test-u16-width.c: Likewise.
98674         * tests/uniwidth/test-u32-strwidth.c: Likewise.
98675         * tests/uniwidth/test-u32-width.c: Likewise.
98676         * tests/uniwidth/test-uc_width.c: Likewise.
98677         * tests/uniwidth/test-uc_width2.c: Likewise.
98678         * modules/acl-tests (Files): Add tests/macros.h.
98679         * modules/areadlink-tests (Files): Likewise.
98680         * modules/areadlink-with-size-tests (Files): Likewise.
98681         * modules/areadlinkat-tests (Files): Likewise.
98682         * modules/areadlinkat-with-size-tests (Files): Likewise.
98683         * modules/argmatch-tests (Files): Likewise.
98684         * modules/argv-iter-tests (Files): Likewise.
98685         * modules/array-list-tests (Files): Likewise.
98686         * modules/array-mergesort-tests (Files): Likewise.
98687         * modules/array-oset-tests (Files): Likewise.
98688         * modules/avltree-list-tests (Files): Likewise.
98689         * modules/avltree-oset-tests (Files): Likewise.
98690         * modules/avltreehash-list-tests (Files): Likewise.
98691         * modules/base64-tests (Files): Likewise.
98692         * modules/binary-io-tests (Files): Likewise.
98693         * modules/bitrotate-tests (Files): Likewise.
98694         * modules/btowc-tests (Files): Likewise.
98695         * modules/byteswap-tests (Files): Likewise.
98696         * modules/c-ctype-tests (Files): Likewise.
98697         * modules/c-stack-tests (Files): Likewise.
98698         * modules/c-strcase-tests (Files): Likewise.
98699         * modules/c-strcasestr-tests (Files): Likewise.
98700         * modules/c-strstr-tests (Files): Likewise.
98701         * modules/canonicalize-lgpl-tests (Files): Likewise.
98702         * modules/canonicalize-tests (Files): Likewise.
98703         * modules/carray-list-tests (Files): Likewise.
98704         * modules/ceilf-tests (Files): Likewise.
98705         * modules/ceill-tests (Files): Likewise.
98706         * modules/chown-tests (Files): Likewise.
98707         * modules/cloexec-tests (Files): Likewise.
98708         * modules/copy-file-tests (Files): Likewise.
98709         * modules/count-one-bits-tests (Files): Likewise.
98710         * modules/dprintf-posix-tests (Files): Likewise.
98711         * modules/dup2-tests (Files): Likewise.
98712         * modules/dup3-tests (Files): Likewise.
98713         * modules/duplocale-tests (Files): Likewise.
98714         * modules/fbufmode-tests (Files): Likewise.
98715         * modules/fchdir-tests (Files): Likewise.
98716         * modules/fcntl-safer-tests (Files): Likewise.
98717         * modules/fcntl-tests (Files): Likewise.
98718         * modules/fdopendir-tests (Files): Likewise.
98719         * modules/fdutimensat-tests (Files): Likewise.
98720         * modules/fflush-tests (Files): Likewise.
98721         * modules/filevercmp-tests (Files): Likewise.
98722         * modules/flock-tests (Files): Likewise.
98723         * modules/floorf-tests (Files): Likewise.
98724         * modules/floorl-tests (Files): Likewise.
98725         * modules/fnmatch-tests (Files): Likewise.
98726         * modules/fopen-safer-tests (Files): Likewise.
98727         * modules/fopen-tests (Files): Likewise.
98728         * modules/fpending-tests (Files): Likewise.
98729         * modules/fprintf-posix-tests (Files): Likewise.
98730         * modules/fpurge-tests (Files): Likewise.
98731         * modules/freadable-tests (Files): Likewise.
98732         * modules/freadahead-tests (Files): Likewise.
98733         * modules/freading-tests (Files): Likewise.
98734         * modules/freadptr-tests (Files): Likewise.
98735         * modules/freadseek-tests (Files): Likewise.
98736         * modules/freopen-tests (Files): Likewise.
98737         * modules/frexp-nolibm-tests (Files): Likewise.
98738         * modules/frexp-tests (Files): Likewise.
98739         * modules/frexpl-nolibm-tests (Files): Likewise.
98740         * modules/frexpl-tests (Files): Likewise.
98741         * modules/fseek-tests (Files): Likewise.
98742         * modules/fseeko-tests (Files): Likewise.
98743         * modules/fstrcmp-tests (Files): Likewise.
98744         * modules/fsync-tests (Files): Likewise.
98745         * modules/ftell-tests (Files): Likewise.
98746         * modules/ftello-tests (Files): Likewise.
98747         * modules/func-tests (Files): Likewise.
98748         * modules/futimens-tests (Files): Likewise.
98749         * modules/fwritable-tests (Files): Likewise.
98750         * modules/fwriting-tests (Files): Likewise.
98751         * modules/getcwd-tests (Files): Likewise.
98752         * modules/getdate-tests (Files): Likewise.
98753         * modules/getdelim-tests (Files): Likewise.
98754         * modules/getdtablesize-tests (Files): Likewise.
98755         * modules/getgroups-tests (Files): Likewise.
98756         * modules/getline-tests (Files): Likewise.
98757         * modules/getndelim2-tests (Files): Likewise.
98758         * modules/glob-tests (Files): Likewise.
98759         * modules/hash-tests (Files): Likewise.
98760         * modules/i-ring-tests (Files): Likewise.
98761         * modules/iconv-tests (Files): Likewise.
98762         * modules/iconv_open-utf-tests (Files): Likewise.
98763         * modules/idpriv-drop-tests (Files): Likewise.
98764         * modules/idpriv-droptemp-tests (Files): Likewise.
98765         * modules/inet_ntop-tests (Files): Likewise.
98766         * modules/inet_pton-tests (Files): Likewise.
98767         * modules/isblank-tests (Files): Likewise.
98768         * modules/isfinite-tests (Files): Likewise.
98769         * modules/isinf-tests (Files): Likewise.
98770         * modules/isnan-tests (Files): Likewise.
98771         * modules/isnand-nolibm-tests (Files): Likewise.
98772         * modules/isnand-tests (Files): Likewise.
98773         * modules/isnanf-nolibm-tests (Files): Likewise.
98774         * modules/isnanf-tests (Files): Likewise.
98775         * modules/isnanl-nolibm-tests (Files): Likewise.
98776         * modules/isnanl-tests (Files): Likewise.
98777         * modules/lchown-tests (Files): Likewise.
98778         * modules/ldexpl-tests (Files): Likewise.
98779         * modules/link-tests (Files): Likewise.
98780         * modules/linkat-tests (Files): Likewise.
98781         * modules/linked-list-tests (Files): Likewise.
98782         * modules/linkedhash-list-tests (Files): Likewise.
98783         * modules/localename-tests (Files): Likewise.
98784         * modules/lseek-tests (Files): Likewise.
98785         * modules/lstat-tests (Files): Likewise.
98786         * modules/mbmemcasecmp-tests (Files): Likewise.
98787         * modules/mbmemcasecoll-tests (Files): Likewise.
98788         * modules/mbrtowc-tests (Files): Likewise.
98789         * modules/mbscasecmp-tests (Files): Likewise.
98790         * modules/mbscasestr-tests (Files): Likewise.
98791         * modules/mbschr-tests (Files): Likewise.
98792         * modules/mbscspn-tests (Files): Likewise.
98793         * modules/mbsinit-tests (Files): Likewise.
98794         * modules/mbsncasecmp-tests (Files): Likewise.
98795         * modules/mbsnrtowcs-tests (Files): Likewise.
98796         * modules/mbspbrk-tests (Files): Likewise.
98797         * modules/mbspcasecmp-tests (Files): Likewise.
98798         * modules/mbsrchr-tests (Files): Likewise.
98799         * modules/mbsrtowcs-tests (Files): Likewise.
98800         * modules/mbsspn-tests (Files): Likewise.
98801         * modules/mbsstr-tests (Files): Likewise.
98802         * modules/memchr-tests (Files): Likewise.
98803         * modules/memchr2-tests (Files): Likewise.
98804         * modules/memcmp-tests (Files): Likewise.
98805         * modules/memmem-tests (Files): Likewise.
98806         * modules/memrchr-tests (Files): Likewise.
98807         * modules/mkdir-tests (Files): Likewise.
98808         * modules/mkfifo-tests (Files): Likewise.
98809         * modules/mkfifoat-tests (Files): Likewise.
98810         * modules/mknod-tests (Files): Likewise.
98811         * modules/nanosleep-tests (Files): Likewise.
98812         * modules/nl_langinfo-tests (Files): Likewise.
98813         * modules/obstack-printf-tests (Files): Likewise.
98814         * modules/open-tests (Files): Likewise.
98815         * modules/openat-tests (Files): Likewise.
98816         * modules/pipe-filter-gi-tests (Files): Likewise.
98817         * modules/pipe-filter-ii-tests (Files): Likewise.
98818         * modules/pipe2-tests (Files): Likewise.
98819         * modules/popen-safer-tests (Files): Likewise.
98820         * modules/popen-tests (Files): Likewise.
98821         * modules/posixtm-tests (Files): Likewise.
98822         * modules/pread-tests (Files): Likewise.
98823         * modules/printf-frexp-tests (Files): Likewise.
98824         * modules/printf-frexpl-tests (Files): Likewise.
98825         * modules/printf-posix-tests (Files): Likewise.
98826         * modules/priv-set-tests (Files): Likewise.
98827         * modules/quotearg-tests (Files): Likewise.
98828         * modules/random_r-tests (Files): Likewise.
98829         * modules/rawmemchr-tests (Files): Likewise.
98830         * modules/rbtree-list-tests (Files): Likewise.
98831         * modules/rbtree-oset-tests (Files): Likewise.
98832         * modules/rbtreehash-list-tests (Files): Likewise.
98833         * modules/readlink-tests (Files): Likewise.
98834         * modules/remove-tests (Files): Likewise.
98835         * modules/rename-tests (Files): Likewise.
98836         * modules/renameat-tests (Files): Likewise.
98837         * modules/rmdir-tests (Files): Likewise.
98838         * modules/round-tests (Files): Likewise.
98839         * modules/roundf-tests (Files): Likewise.
98840         * modules/roundl-tests (Files): Likewise.
98841         * modules/safe-alloc-tests (Files): Likewise.
98842         * modules/setenv-tests (Files): Likewise.
98843         * modules/sigaction-tests (Files): Likewise.
98844         * modules/signbit-tests (Files): Likewise.
98845         * modules/sleep-tests (Files): Likewise.
98846         * modules/snprintf-posix-tests (Files): Likewise.
98847         * modules/snprintf-tests (Files): Likewise.
98848         * modules/sprintf-posix-tests (Files): Likewise.
98849         * modules/stat-tests (Files): Likewise.
98850         * modules/stat-time-tests (Files): Likewise.
98851         * modules/strcasestr-tests (Files): Likewise.
98852         * modules/strchrnul-tests (Files): Likewise.
98853         * modules/strerror-tests (Files): Likewise.
98854         * modules/striconv-tests (Files): Likewise.
98855         * modules/striconveh-tests (Files): Likewise.
98856         * modules/striconveha-tests (Files): Likewise.
98857         * modules/strsignal-tests (Files): Likewise.
98858         * modules/strstr-tests (Files): Likewise.
98859         * modules/strtod-tests (Files): Likewise.
98860         * modules/strverscmp-tests (Files): Likewise.
98861         * modules/symlink-tests (Files): Likewise.
98862         * modules/symlinkat-tests (Files): Likewise.
98863         * modules/trunc-tests (Files): Likewise.
98864         * modules/truncf-tests (Files): Likewise.
98865         * modules/truncl-tests (Files): Likewise.
98866         * modules/uname-tests (Files): Likewise.
98867         * modules/unicase/cased-tests (Files): Likewise.
98868         * modules/unicase/ignorable-tests (Files): Likewise.
98869         * modules/unicase/locale-language-tests (Files): Likewise.
98870         * modules/unicase/tolower-tests (Files): Likewise.
98871         * modules/unicase/totitle-tests (Files): Likewise.
98872         * modules/unicase/toupper-tests (Files): Likewise.
98873         * modules/unicase/u8-casecmp-tests (Files): Likewise.
98874         * modules/unicase/u8-casecoll-tests (Files): Likewise.
98875         * modules/unicase/u8-casefold-tests (Files): Likewise.
98876         * modules/unicase/u8-is-cased-tests (Files): Likewise.
98877         * modules/unicase/u8-is-casefolded-tests (Files): Likewise.
98878         * modules/unicase/u8-is-lowercase-tests (Files): Likewise.
98879         * modules/unicase/u8-is-titlecase-tests (Files): Likewise.
98880         * modules/unicase/u8-is-uppercase-tests (Files): Likewise.
98881         * modules/unicase/u8-tolower-tests (Files): Likewise.
98882         * modules/unicase/u8-totitle-tests (Files): Likewise.
98883         * modules/unicase/u8-toupper-tests (Files): Likewise.
98884         * modules/unicase/u16-casecmp-tests (Files): Likewise.
98885         * modules/unicase/u16-casecoll-tests (Files): Likewise.
98886         * modules/unicase/u16-casefold-tests (Files): Likewise.
98887         * modules/unicase/u16-is-cased-tests (Files): Likewise.
98888         * modules/unicase/u16-is-casefolded-tests (Files): Likewise.
98889         * modules/unicase/u16-is-lowercase-tests (Files): Likewise.
98890         * modules/unicase/u16-is-titlecase-tests (Files): Likewise.
98891         * modules/unicase/u16-is-uppercase-tests (Files): Likewise.
98892         * modules/unicase/u16-tolower-tests (Files): Likewise.
98893         * modules/unicase/u16-totitle-tests (Files): Likewise.
98894         * modules/unicase/u16-toupper-tests (Files): Likewise.
98895         * modules/unicase/u32-casecmp-tests (Files): Likewise.
98896         * modules/unicase/u32-casecoll-tests (Files): Likewise.
98897         * modules/unicase/u32-casefold-tests (Files): Likewise.
98898         * modules/unicase/u32-is-cased-tests (Files): Likewise.
98899         * modules/unicase/u32-is-casefolded-tests (Files): Likewise.
98900         * modules/unicase/u32-is-lowercase-tests (Files): Likewise.
98901         * modules/unicase/u32-is-titlecase-tests (Files): Likewise.
98902         * modules/unicase/u32-is-uppercase-tests (Files): Likewise.
98903         * modules/unicase/u32-tolower-tests (Files): Likewise.
98904         * modules/unicase/u32-totitle-tests (Files): Likewise.
98905         * modules/unicase/u32-toupper-tests (Files): Likewise.
98906         * modules/unicase/ulc-casecmp-tests (Files): Likewise.
98907         * modules/unicase/ulc-casecoll-tests (Files): Likewise.
98908         * modules/uniconv/u8-conv-from-enc-tests (Files): Likewise.
98909         * modules/uniconv/u8-conv-to-enc-tests (Files): Likewise.
98910         * modules/uniconv/u8-strconv-from-enc-tests (Files): Likewise.
98911         * modules/uniconv/u8-strconv-to-enc-tests (Files): Likewise.
98912         * modules/uniconv/u16-conv-from-enc-tests (Files): Likewise.
98913         * modules/uniconv/u16-conv-to-enc-tests (Files): Likewise.
98914         * modules/uniconv/u16-strconv-from-enc-tests (Files): Likewise.
98915         * modules/uniconv/u16-strconv-to-enc-tests (Files): Likewise.
98916         * modules/uniconv/u32-conv-from-enc-tests (Files): Likewise.
98917         * modules/uniconv/u32-conv-to-enc-tests (Files): Likewise.
98918         * modules/uniconv/u32-strconv-from-enc-tests (Files): Likewise.
98919         * modules/uniconv/u32-strconv-to-enc-tests (Files): Likewise.
98920         * modules/unictype/bidicategory-byname-tests (Files): Likewise.
98921         * modules/unictype/bidicategory-name-tests (Files): Likewise.
98922         * modules/unictype/bidicategory-of-tests (Files): Likewise.
98923         * modules/unictype/bidicategory-test-tests (Files): Likewise.
98924         * modules/unictype/block-list-tests (Files): Likewise.
98925         * modules/unictype/block-of-tests (Files): Likewise.
98926         * modules/unictype/block-test-tests (Files): Likewise.
98927         * modules/unictype/category-C-tests (Files): Likewise.
98928         * modules/unictype/category-Cc-tests (Files): Likewise.
98929         * modules/unictype/category-Cf-tests (Files): Likewise.
98930         * modules/unictype/category-Cn-tests (Files): Likewise.
98931         * modules/unictype/category-Co-tests (Files): Likewise.
98932         * modules/unictype/category-Cs-tests (Files): Likewise.
98933         * modules/unictype/category-L-tests (Files): Likewise.
98934         * modules/unictype/category-Ll-tests (Files): Likewise.
98935         * modules/unictype/category-Lm-tests (Files): Likewise.
98936         * modules/unictype/category-Lo-tests (Files): Likewise.
98937         * modules/unictype/category-Lt-tests (Files): Likewise.
98938         * modules/unictype/category-Lu-tests (Files): Likewise.
98939         * modules/unictype/category-M-tests (Files): Likewise.
98940         * modules/unictype/category-Mc-tests (Files): Likewise.
98941         * modules/unictype/category-Me-tests (Files): Likewise.
98942         * modules/unictype/category-Mn-tests (Files): Likewise.
98943         * modules/unictype/category-N-tests (Files): Likewise.
98944         * modules/unictype/category-Nd-tests (Files): Likewise.
98945         * modules/unictype/category-Nl-tests (Files): Likewise.
98946         * modules/unictype/category-No-tests (Files): Likewise.
98947         * modules/unictype/category-P-tests (Files): Likewise.
98948         * modules/unictype/category-Pc-tests (Files): Likewise.
98949         * modules/unictype/category-Pd-tests (Files): Likewise.
98950         * modules/unictype/category-Pe-tests (Files): Likewise.
98951         * modules/unictype/category-Pf-tests (Files): Likewise.
98952         * modules/unictype/category-Pi-tests (Files): Likewise.
98953         * modules/unictype/category-Po-tests (Files): Likewise.
98954         * modules/unictype/category-Ps-tests (Files): Likewise.
98955         * modules/unictype/category-S-tests (Files): Likewise.
98956         * modules/unictype/category-Sc-tests (Files): Likewise.
98957         * modules/unictype/category-Sk-tests (Files): Likewise.
98958         * modules/unictype/category-Sm-tests (Files): Likewise.
98959         * modules/unictype/category-So-tests (Files): Likewise.
98960         * modules/unictype/category-Z-tests (Files): Likewise.
98961         * modules/unictype/category-Zl-tests (Files): Likewise.
98962         * modules/unictype/category-Zp-tests (Files): Likewise.
98963         * modules/unictype/category-Zs-tests (Files): Likewise.
98964         * modules/unictype/category-and-not-tests (Files): Likewise.
98965         * modules/unictype/category-and-tests (Files): Likewise.
98966         * modules/unictype/category-byname-tests (Files): Likewise.
98967         * modules/unictype/category-name-tests (Files): Likewise.
98968         * modules/unictype/category-none-tests (Files): Likewise.
98969         * modules/unictype/category-of-tests (Files): Likewise.
98970         * modules/unictype/category-or-tests (Files): Likewise.
98971         * modules/unictype/category-test-withtable-tests (Files): Likewise.
98972         * modules/unictype/combining-class-tests (Files): Likewise.
98973         * modules/unictype/ctype-alnum-tests (Files): Likewise.
98974         * modules/unictype/ctype-alpha-tests (Files): Likewise.
98975         * modules/unictype/ctype-blank-tests (Files): Likewise.
98976         * modules/unictype/ctype-cntrl-tests (Files): Likewise.
98977         * modules/unictype/ctype-digit-tests (Files): Likewise.
98978         * modules/unictype/ctype-graph-tests (Files): Likewise.
98979         * modules/unictype/ctype-lower-tests (Files): Likewise.
98980         * modules/unictype/ctype-print-tests (Files): Likewise.
98981         * modules/unictype/ctype-punct-tests (Files): Likewise.
98982         * modules/unictype/ctype-space-tests (Files): Likewise.
98983         * modules/unictype/ctype-upper-tests (Files): Likewise.
98984         * modules/unictype/ctype-xdigit-tests (Files): Likewise.
98985         * modules/unictype/decimal-digit-tests (Files): Likewise.
98986         * modules/unictype/digit-tests (Files): Likewise.
98987         * modules/unictype/mirror-tests (Files): Likewise.
98988         * modules/unictype/numeric-tests (Files): Likewise.
98989         * modules/unictype/property-alphabetic-tests (Files): Likewise.
98990         * modules/unictype/property-ascii-hex-digit-tests (Files): Likewise.
98991         * modules/unictype/property-bidi-arabic-digit-tests (Files): Likewise.
98992         * modules/unictype/property-bidi-arabic-right-to-left-tests (Files):
98993         Likewise.
98994         * modules/unictype/property-bidi-block-separator-tests (Files):
98995         Likewise.
98996         * modules/unictype/property-bidi-boundary-neutral-tests (Files):
98997         Likewise.
98998         * modules/unictype/property-bidi-common-separator-tests (Files):
98999         Likewise.
99000         * modules/unictype/property-bidi-control-tests (Files): Likewise.
99001         * modules/unictype/property-bidi-embedding-or-override-tests (Files):
99002         Likewise.
99003         * modules/unictype/property-bidi-eur-num-separator-tests (Files):
99004         Likewise.
99005         * modules/unictype/property-bidi-eur-num-terminator-tests (Files):
99006         Likewise.
99007         * modules/unictype/property-bidi-european-digit-tests (Files): Likewise.
99008         * modules/unictype/property-bidi-hebrew-right-to-left-tests (Files):
99009         Likewise.
99010         * modules/unictype/property-bidi-left-to-right-tests (Files): Likewise.
99011         * modules/unictype/property-bidi-non-spacing-mark-tests (Files):
99012         Likewise.
99013         * modules/unictype/property-bidi-other-neutral-tests (Files): Likewise.
99014         * modules/unictype/property-bidi-pdf-tests (Files): Likewise.
99015         * modules/unictype/property-bidi-segment-separator-tests (Files):
99016         Likewise.
99017         * modules/unictype/property-bidi-whitespace-tests (Files): Likewise.
99018         * modules/unictype/property-byname-tests (Files): Likewise.
99019         * modules/unictype/property-combining-tests (Files): Likewise.
99020         * modules/unictype/property-composite-tests (Files): Likewise.
99021         * modules/unictype/property-currency-symbol-tests (Files): Likewise.
99022         * modules/unictype/property-dash-tests (Files): Likewise.
99023         * modules/unictype/property-decimal-digit-tests (Files): Likewise.
99024         * modules/unictype/property-default-ignorable-code-point-tests (Files):
99025         Likewise.
99026         * modules/unictype/property-deprecated-tests (Files): Likewise.
99027         * modules/unictype/property-diacritic-tests (Files): Likewise.
99028         * modules/unictype/property-extender-tests (Files): Likewise.
99029         * modules/unictype/property-format-control-tests (Files): Likewise.
99030         * modules/unictype/property-grapheme-base-tests (Files): Likewise.
99031         * modules/unictype/property-grapheme-extend-tests (Files): Likewise.
99032         * modules/unictype/property-grapheme-link-tests (Files): Likewise.
99033         * modules/unictype/property-hex-digit-tests (Files): Likewise.
99034         * modules/unictype/property-hyphen-tests (Files): Likewise.
99035         * modules/unictype/property-id-continue-tests (Files): Likewise.
99036         * modules/unictype/property-id-start-tests (Files): Likewise.
99037         * modules/unictype/property-ideographic-tests (Files): Likewise.
99038         * modules/unictype/property-ids-binary-operator-tests (Files): Likewise.
99039         * modules/unictype/property-ids-trinary-operator-tests (Files):
99040         Likewise.
99041         * modules/unictype/property-ignorable-control-tests (Files): Likewise.
99042         * modules/unictype/property-iso-control-tests (Files): Likewise.
99043         * modules/unictype/property-join-control-tests (Files): Likewise.
99044         * modules/unictype/property-left-of-pair-tests (Files): Likewise.
99045         * modules/unictype/property-line-separator-tests (Files): Likewise.
99046         * modules/unictype/property-logical-order-exception-tests (Files):
99047         Likewise.
99048         * modules/unictype/property-lowercase-tests (Files): Likewise.
99049         * modules/unictype/property-math-tests (Files): Likewise.
99050         * modules/unictype/property-non-break-tests (Files): Likewise.
99051         * modules/unictype/property-not-a-character-tests (Files): Likewise.
99052         * modules/unictype/property-numeric-tests (Files): Likewise.
99053         * modules/unictype/property-other-alphabetic-tests (Files): Likewise.
99054         * modules/unictype/property-other-default-ignorable-code-point-tests
99055         (Files): Likewise.
99056         * modules/unictype/property-other-grapheme-extend-tests (Files):
99057         Likewise.
99058         * modules/unictype/property-other-id-continue-tests (Files): Likewise.
99059         * modules/unictype/property-other-id-start-tests (Files): Likewise.
99060         * modules/unictype/property-other-lowercase-tests (Files): Likewise.
99061         * modules/unictype/property-other-math-tests (Files): Likewise.
99062         * modules/unictype/property-other-uppercase-tests (Files): Likewise.
99063         * modules/unictype/property-paired-punctuation-tests (Files): Likewise.
99064         * modules/unictype/property-paragraph-separator-tests (Files): Likewise.
99065         * modules/unictype/property-pattern-syntax-tests (Files): Likewise.
99066         * modules/unictype/property-pattern-white-space-tests (Files): Likewise.
99067         * modules/unictype/property-private-use-tests (Files): Likewise.
99068         * modules/unictype/property-punctuation-tests (Files): Likewise.
99069         * modules/unictype/property-quotation-mark-tests (Files): Likewise.
99070         * modules/unictype/property-radical-tests (Files): Likewise.
99071         * modules/unictype/property-sentence-terminal-tests (Files): Likewise.
99072         * modules/unictype/property-soft-dotted-tests (Files): Likewise.
99073         * modules/unictype/property-space-tests (Files): Likewise.
99074         * modules/unictype/property-terminal-punctuation-tests (Files):
99075         Likewise.
99076         * modules/unictype/property-test-tests (Files): Likewise.
99077         * modules/unictype/property-titlecase-tests (Files): Likewise.
99078         * modules/unictype/property-unassigned-code-value-tests (Files):
99079         Likewise.
99080         * modules/unictype/property-unified-ideograph-tests (Files): Likewise.
99081         * modules/unictype/property-uppercase-tests (Files): Likewise.
99082         * modules/unictype/property-variation-selector-tests (Files): Likewise.
99083         * modules/unictype/property-white-space-tests (Files): Likewise.
99084         * modules/unictype/property-xid-continue-tests (Files): Likewise.
99085         * modules/unictype/property-xid-start-tests (Files): Likewise.
99086         * modules/unictype/property-zero-width-tests (Files): Likewise.
99087         * modules/unictype/scripts-tests (Files): Likewise.
99088         * modules/unictype/syntax-c-ident-tests (Files): Likewise.
99089         * modules/unictype/syntax-c-whitespace-tests (Files): Likewise.
99090         * modules/unictype/syntax-java-ident-tests (Files): Likewise.
99091         * modules/unictype/syntax-java-whitespace-tests (Files): Likewise.
99092         * modules/unilbrk/u8-possible-linebreaks-tests (Files): Likewise.
99093         * modules/unilbrk/u8-width-linebreaks-tests (Files): Likewise.
99094         * modules/unilbrk/u16-possible-linebreaks-tests (Files): Likewise.
99095         * modules/unilbrk/u16-width-linebreaks-tests (Files): Likewise.
99096         * modules/unilbrk/u32-possible-linebreaks-tests (Files): Likewise.
99097         * modules/unilbrk/u32-width-linebreaks-tests (Files): Likewise.
99098         * modules/unilbrk/ulc-possible-linebreaks-tests (Files): Likewise.
99099         * modules/unilbrk/ulc-width-linebreaks-tests (Files): Likewise.
99100         * modules/uninorm/canonical-decomposition-tests (Files): Likewise.
99101         * modules/uninorm/compat-decomposition-tests (Files): Likewise.
99102         * modules/uninorm/composition-tests (Files): Likewise.
99103         * modules/uninorm/decomposing-form-tests (Files): Likewise.
99104         * modules/uninorm/decomposition-tests (Files): Likewise.
99105         * modules/uninorm/filter-tests (Files): Likewise.
99106         * modules/uninorm/nfc-tests (Files): Likewise.
99107         * modules/uninorm/nfd-tests (Files): Likewise.
99108         * modules/uninorm/nfkc-tests (Files): Likewise.
99109         * modules/uninorm/nfkd-tests (Files): Likewise.
99110         * modules/uninorm/u8-normcmp-tests (Files): Likewise.
99111         * modules/uninorm/u8-normcoll-tests (Files): Likewise.
99112         * modules/uninorm/u16-normcmp-tests (Files): Likewise.
99113         * modules/uninorm/u16-normcoll-tests (Files): Likewise.
99114         * modules/uninorm/u32-normcmp-tests (Files): Likewise.
99115         * modules/uninorm/u32-normcoll-tests (Files): Likewise.
99116         * modules/unistdio/u8-asnprintf-tests (Files): Likewise.
99117         * modules/unistdio/u8-vasnprintf-tests (Files): Likewise.
99118         * modules/unistdio/u8-vasprintf-tests (Files): Likewise.
99119         * modules/unistdio/u8-vsnprintf-tests (Files): Likewise.
99120         * modules/unistdio/u8-vsprintf-tests (Files): Likewise.
99121         * modules/unistdio/u16-asnprintf-tests (Files): Likewise.
99122         * modules/unistdio/u16-vasnprintf-tests (Files): Likewise.
99123         * modules/unistdio/u16-vasprintf-tests (Files): Likewise.
99124         * modules/unistdio/u16-vsnprintf-tests (Files): Likewise.
99125         * modules/unistdio/u16-vsprintf-tests (Files): Likewise.
99126         * modules/unistdio/u32-asnprintf-tests (Files): Likewise.
99127         * modules/unistdio/u32-vasnprintf-tests (Files): Likewise.
99128         * modules/unistdio/u32-vasprintf-tests (Files): Likewise.
99129         * modules/unistdio/u32-vsnprintf-tests (Files): Likewise.
99130         * modules/unistdio/u32-vsprintf-tests (Files): Likewise.
99131         * modules/unistdio/ulc-asnprintf-tests (Files): Likewise.
99132         * modules/unistdio/ulc-vasnprintf-tests (Files): Likewise.
99133         * modules/unistdio/ulc-vasprintf-tests (Files): Likewise.
99134         * modules/unistdio/ulc-vsnprintf-tests (Files): Likewise.
99135         * modules/unistdio/ulc-vsprintf-tests (Files): Likewise.
99136         * modules/uniwbrk/u8-wordbreaks-tests (Files): Likewise.
99137         * modules/uniwbrk/u16-wordbreaks-tests (Files): Likewise.
99138         * modules/uniwbrk/u32-wordbreaks-tests (Files): Likewise.
99139         * modules/uniwbrk/ulc-wordbreaks-tests (Files): Likewise.
99140         * modules/uniwidth/u8-strwidth-tests (Files): Likewise.
99141         * modules/uniwidth/u8-width-tests (Files): Likewise.
99142         * modules/uniwidth/u16-strwidth-tests (Files): Likewise.
99143         * modules/uniwidth/u16-width-tests (Files): Likewise.
99144         * modules/uniwidth/u32-strwidth-tests (Files): Likewise.
99145         * modules/uniwidth/u32-width-tests (Files): Likewise.
99146         * modules/uniwidth/width-tests (Files): Likewise.
99147         * modules/unlink-tests (Files): Likewise.
99148         * modules/unsetenv-tests (Files): Likewise.
99149         * modules/usleep-tests (Files): Likewise.
99150         * modules/utimens-tests (Files): Likewise.
99151         * modules/utimensat-tests (Files): Likewise.
99152         * modules/vasnprintf-posix-tests (Files): Likewise.
99153         * modules/vasnprintf-tests (Files): Likewise.
99154         * modules/vasprintf-posix-tests (Files): Likewise.
99155         * modules/vasprintf-tests (Files): Likewise.
99156         * modules/vdprintf-posix-tests (Files): Likewise.
99157         * modules/vfprintf-posix-tests (Files): Likewise.
99158         * modules/vprintf-posix-tests (Files): Likewise.
99159         * modules/vsnprintf-posix-tests (Files): Likewise.
99160         * modules/vsnprintf-tests (Files): Likewise.
99161         * modules/vsprintf-posix-tests (Files): Likewise.
99162         * modules/wcrtomb-tests (Files): Likewise.
99163         * modules/wcsnrtombs-tests (Files): Likewise.
99164         * modules/wcsrtombs-tests (Files): Likewise.
99165         * modules/wctype-tests (Files): Likewise.
99166         * modules/wcwidth-tests (Files): Likewise.
99167         * modules/xmemdup0-tests (Files): Likewise.
99168         * modules/xprintf-posix-tests (Files): Likewise.
99169         * modules/xvasprintf-tests (Files): Likewise.
99171 2009-12-24  Eric Blake  <ebb9@byu.net>
99173         test-nanosleep: fix typo
99174         * tests/test-nanosleep.c (SIGNATURE_CHECK): Fix typo in previous
99175         patch.
99176         Reported by Bruno Haible.
99178 2009-12-24  Bruno Haible  <bruno@clisp.org>
99180         Reduce namespace pollution on glibc systems.
99181         * lib/inttypes.in.h: Don't include <stdint.h> on glibc systems.
99182         * lib/stdlib.in.h: Don't include <stdint.h>, <unistd.h> on glibc
99183         systems.
99184         * lib/unistd.in.h: Don't include <stdio.h>, <fcntl.h>, <stdlib.h>,
99185         <getopt.h> on glibc systems.
99186         * lib/fcntl.in.h: Don't include <sys/stat.h>, <unistd.h> on glibc
99187         systems.
99188         * lib/fcntl.c: Include <unistd.h> here instead.
99190 2009-12-24  Bruno Haible  <bruno@clisp.org>
99192         * lib/stdlib.in.h (includes): Fix typo in today's commit.
99194 2009-12-24  Eric Blake  <ebb9@byu.net>
99196         tests: add signature checks
99197         * tests/signature.h (SIGNATURE_CHECK): New file.
99198         * modules/atexit-tests (Files): Use it.
99199         * modules/btowc-tests (Files): Likewise.
99200         * modules/canonicalize-lgpl-tests (Files): Likewise.
99201         * modules/ceilf-tests (Files): Likewise.
99202         * modules/ceill-tests (Files): Likewise.
99203         * modules/chown-tests (Files): Likewise.
99204         * modules/dprintf-posix-tests (Files): Likewise.
99205         * modules/dup2-tests (Files): Likewise.
99206         * modules/dup3-tests (Files): Likewise.
99207         * modules/duplocale-tests (Files): Likewise.
99208         * modules/fchdir-tests (Files): Likewise.
99209         * modules/fcntl-tests (Files): Likewise.
99210         * modules/fdopendir-tests (Files): Likewise.
99211         * modules/fflush-tests (Files): Likewise.
99212         * modules/flock-tests (Files): Likewise.
99213         * modules/floorf-tests (Files): Likewise.
99214         * modules/floorl-tests (Files): Likewise.
99215         * modules/fnmatch-tests (Files): Likewise.
99216         * modules/fopen-tests (Files): Likewise.
99217         * modules/fprintf-posix-tests (Files): Likewise.
99218         * modules/freopen-tests (Files): Likewise.
99219         * modules/frexp-nolibm-tests (Files): Likewise.
99220         * modules/frexp-tests (Files): Likewise.
99221         * modules/frexpl-nolibm-tests (Files): Likewise.
99222         * modules/frexpl-tests (Files): Likewise.
99223         * modules/fseek-tests (Files): Likewise.
99224         * modules/fseeko-tests (Files): Likewise.
99225         * modules/fsync-tests (Files): Likewise.
99226         * modules/ftell-tests (Files): Likewise.
99227         * modules/ftello-tests (Files): Likewise.
99228         * modules/futimens-tests (Files): Likewise.
99229         * modules/getaddrinfo-tests (Files): Likewise.
99230         * modules/getcwd-tests (Files): Likewise.
99231         * modules/getdelim-tests (Files): Likewise.
99232         * modules/getdtablesize-tests (Files): Likewise.
99233         * modules/getgroups-tests (Files): Likewise.
99234         * modules/gethostname-tests (Files): Likewise.
99235         * modules/getline-tests (Files): Likewise.
99236         * modules/getopt-posix-tests (Files): Likewise.
99237         * modules/gettimeofday-tests (Files): Likewise.
99238         * modules/glob-tests (Files): Likewise.
99239         * modules/iconv-tests (Files): Likewise.
99240         * modules/inet_ntop-tests (Files): Likewise.
99241         * modules/inet_pton-tests (Files): Likewise.
99242         * modules/isblank-tests (Files): Likewise.
99243         * modules/lchown-tests (Files): Likewise.
99244         * modules/ldexpl-tests (Files): Likewise.
99245         * modules/link-tests (Files): Likewise.
99246         * modules/linkat-tests (Files): Likewise.
99247         * modules/lseek-tests (Files): Likewise.
99248         * modules/lstat-tests (Files): Likewise.
99249         * modules/mbrtowc-tests (Files): Likewise.
99250         * modules/mbsinit-tests (Files): Likewise.
99251         * modules/mbsnrtowcs-tests (Files): Likewise.
99252         * modules/mbsrtowcs-tests (Files): Likewise.
99253         * modules/memchr-tests (Files): Likewise.
99254         * modules/memcmp-tests (Files): Likewise.
99255         * modules/memmem-tests (Files): Likewise.
99256         * modules/memrchr-tests (Files): Likewise.
99257         * modules/mkdir-tests (Files): Likewise.
99258         * modules/mkfifo-tests (Files): Likewise.
99259         * modules/mkfifoat-tests (Files): Likewise.
99260         * modules/mknod-tests (Files): Likewise.
99261         * modules/nanosleep-tests (Files): Likewise.
99262         * modules/nl_langinfo-tests (Files): Likewise.
99263         * modules/obstack-printf-tests (Files): Likewise.
99264         * modules/open-tests (Files): Likewise.
99265         * modules/openat-tests (Files): Likewise.
99266         * modules/perror-tests (Files): Likewise.
99267         * modules/pipe2-tests (Files): Likewise.
99268         * modules/poll-tests (Files): Likewise.
99269         * modules/popen-tests (Files): Likewise.
99270         * modules/posix_spawn-tests (Files): Likewise.
99271         * modules/posix_spawnp-tests (Files): Likewise.
99272         * modules/pread-tests (Files): Likewise.
99273         * modules/printf-posix-tests (Files): Likewise.
99274         * modules/pty-tests (Files): Likewise.
99275         * modules/random_r-tests (Files): Likewise.
99276         * modules/rawmemchr-tests (Files): Likewise.
99277         * modules/readlink-tests (Files): Likewise.
99278         * modules/remove-tests (Files): Likewise.
99279         * modules/rename-tests (Files): Likewise.
99280         * modules/renameat-tests (Files): Likewise.
99281         * modules/rmdir-tests (Files): Likewise.
99282         * modules/round-tests (Files): Likewise.
99283         * modules/roundf-tests (Files): Likewise.
99284         * modules/roundl-tests (Files): Likewise.
99285         * modules/select-tests (Files): Likewise.
99286         * modules/setenv-tests (Files): Likewise.
99287         * modules/sigaction-tests (Files): Likewise.
99288         * modules/sleep-tests (Files): Likewise.
99289         * modules/snprintf-posix-tests (Files): Likewise.
99290         * modules/snprintf-tests (Files): Likewise.
99291         * modules/sprintf-posix-tests (Files): Likewise.
99292         * modules/stat-tests (Files): Likewise.
99293         * modules/strcasestr-tests (Files): Likewise.
99294         * modules/strchrnul-tests (Files): Likewise.
99295         * modules/strerror-tests (Files): Likewise.
99296         * modules/strsignal-tests (Files): Likewise.
99297         * modules/strstr-tests (Files): Likewise.
99298         * modules/strtod-tests (Files): Likewise.
99299         * modules/strverscmp-tests (Files): Likewise.
99300         * modules/symlink-tests (Files): Likewise.
99301         * modules/symlinkat-tests (Files): Likewise.
99302         * modules/times-tests (Files): Likewise.
99303         * modules/trunc-tests (Files): Likewise.
99304         * modules/truncf-tests (Files): Likewise.
99305         * modules/truncl-tests (Files): Likewise.
99306         * modules/tsearch-tests (Files): Likewise.
99307         * modules/uname-tests (Files): Likewise.
99308         * modules/unlink-tests (Files): Likewise.
99309         * modules/unsetenv-tests (Files): Likewise.
99310         * modules/usleep-tests (Files): Likewise.
99311         * modules/utimensat-tests (Files): Likewise.
99312         * modules/vasprintf-tests (Files): Likewise.
99313         * modules/vdprintf-posix-tests (Files): Likewise.
99314         * modules/vfprintf-posix-tests (Files): Likewise.
99315         * modules/vprintf-posix-tests (Files): Likewise.
99316         * modules/vsnprintf-posix-tests (Files): Likewise.
99317         * modules/vsnprintf-tests (Files): Likewise.
99318         * modules/vsprintf-posix-tests (Files): Likewise.
99319         * modules/wcrtomb-tests (Files): Likewise.
99320         * modules/wcsnrtombs-tests (Files): Likewise.
99321         * modules/wcsrtombs-tests (Files): Likewise.
99322         * modules/wcwidth-tests (Files): Likewise.
99323         * tests/test-isfinite.c (isfinite): Ensure macro declaration.
99324         * tests/test-isinf.c (isinf): Likewise.
99325         * tests/test-isnan.c (isnan): Likewise.
99326         * tests/test-signbit.c (signbit): Likewise.
99327         * tests/test-select.c (FD_CLR, FD_ISSET, FD_SET, FD_ZERO): Ensure
99328         declaration, either as macro or with correct signature.
99329         (select): Ensure function under test is declared with correct
99330         signature in correct header.
99331         * tests/test-atexit.c (atexit): Likewise.
99332         * tests/test-btowc.c (btowc): Likewise.
99333         * tests/test-canonicalize-lgpl.c (realpath)
99334         (canonicalize_file_name): Likewise.
99335         * tests/test-ceilf1.c (ceilf): Likewise.
99336         * tests/test-ceill.c (ceill): Likewise.
99337         * tests/test-chown.c (chown): Likewise.
99338         * tests/test-dprintf-posix.c (dprintf): Likewise.
99339         * tests/test-dup2.c (dup2): Likewise.
99340         * tests/test-dup3.c (dup3): Likewise.
99341         * tests/test-duplocale.c (duplocale): Likewise.
99342         * tests/test-fchdir.c (fchdir): Likewise.
99343         * tests/test-fchownat.c (fchownat): Likewise.
99344         * tests/test-fcntl.c (fcntl): Likewise.
99345         * tests/test-fdopendir.c (fdopendir): Likewise.
99346         * tests/test-fflush.c (fflush): Likewise.
99347         * tests/test-flock.c (flock): Likewise.
99348         * tests/test-floorf1.c (floorf): Likewise.
99349         * tests/test-floorl.c (floorl): Likewise.
99350         * tests/test-fnmatch.c (fnmatch): Likewise.
99351         * tests/test-fopen.c (fopen): Likewise.
99352         * tests/test-fprintf-posix.c (fprintf): Likewise.
99353         * tests/test-freopen.c (freopen): Likewise.
99354         * tests/test-frexp.c (frexp): Likewise.
99355         * tests/test-frexpl.c (frexpl): Likewise.
99356         * tests/test-fseek.c (fseek): Likewise.
99357         * tests/test-fseeko.c (fseeko): Likewise.
99358         * tests/test-fstatat.c (fstatat): Likewise.
99359         * tests/test-fsync.c (fsync): Likewise.
99360         * tests/test-ftell.c (ftell): Likewise.
99361         * tests/test-ftello.c (ftello): Likewise.
99362         * tests/test-futimens.c (futimens): Likewise.
99363         * tests/test-getaddrinfo.c (getaddrinfo, freeaddrinfo)
99364         (gai_strerror): Likewise.
99365         * tests/test-getcwd.c (getcwd): Likewise.
99366         * tests/test-getdelim.c (getdelim): Likewise.
99367         * tests/test-getdtablesize.c (getdtablesize): Likewise.
99368         * tests/test-getgroups.c (getgroups): Likewise.
99369         * tests/test-gethostname.c (gethostname): Likewise.
99370         * tests/test-getline.c (getline): Likewise.
99371         * tests/test-getopt.c (getopt, getopt_long, getopt_long_only):
99372         Likewise.
99373         * tests/test-gettimeofday.c (gettimeofday): Likewise.
99374         * tests/test-glob.c (glob, globfree): Likewise.
99375         * tests/test-iconv.c (iconv, iconv_open, iconv_close): Likewise.
99376         * tests/test-inet_ntop.c (inet_ntop): Likewise.
99377         * tests/test-inet_pton.c (inet_pton): Likewise.
99378         * tests/test-isblank.c (isblank): Likewise.
99379         * tests/test-lchown.c (lchown): Likewise.
99380         * tests/test-ldexpl.c (ldexpl): Likewise.
99381         * tests/test-link.c (link): Likewise.
99382         * tests/test-linkat.c (linkat): Likewise.
99383         * tests/test-lseek.c (lseek): Likewise.
99384         * tests/test-lstat.c (lstat): Likewise.
99385         * tests/test-mbrtowc.c (mbrtowc): Likewise.
99386         * tests/test-mbsinit.c (mbsinit): Likewise.
99387         * tests/test-mbsnrtowcs.c (mbsnrtowcs): Likewise.
99388         * tests/test-mbsrtowcs.c (mbsrtowcs): Likewise.
99389         * tests/test-memchr.c (memchr): Likewise.
99390         * tests/test-memcmp.c (memcmp): Likewise.
99391         * tests/test-memmem.c (memmem): Likewise.
99392         * tests/test-memrchr.c (memrchr): Likewise.
99393         * tests/test-mkdir.c (mkdir): Likewise.
99394         * tests/test-mkdirat.c (mkdirat): Likewise.
99395         * tests/test-mkfifo.c (mkfifo): Likewise.
99396         * tests/test-mkfifoat.c (mkfifoat, mknodat): Likewise.
99397         * tests/test-mknod.c (mknod): Likewise.
99398         * tests/test-nanosleep.c (nanosleep): Likewise.
99399         * tests/test-nl_langinfo.c (nl_langinfo): Likewise.
99400         * tests/test-obstack-printf.c (obstack_printf, obstack_vprintf):
99401         Likewise.
99402         * tests/test-open.c (open): Likewise.
99403         * tests/test-openat.c (openat): Likewise.
99404         * tests/test-perror.c (perror): Likewise.
99405         * tests/test-pipe2.c (pipe2): Likewise.
99406         * tests/test-poll.c (poll): Likewise.
99407         * tests/test-popen.c (popen, pclose): Likewise.
99408         * tests/test-posix_spawn1.c (posix_spawnp, posix_spawnattr_init)
99409         (posix_spawnattr_destroy, posix_spawnattr_setsigmask)
99410         (posix_spawnattr_setflags, posix_spawn_file_actions_init)
99411         (posix_spawn_file_actions_destroy)
99412         (posix_spawn_file_actions_addclose)
99413         (posix_spawn_file_actions_addopen)
99414         (posix_spawn_file_actions_adddup2): Likewise.
99415         * tests/test-posix_spawn3.c (posix_spawn): Likewise.
99416         * tests/test-pread.c (pread): Likewise.
99417         * tests/test-printf-posix.c (printf): Likewise.
99418         * tests/test-pty.c (openpty, forkpty): Likewise.
99419         * tests/test-random_r.c (srandom_r, initstate_r, setstate_r)
99420         (random_r): Likewise.
99421         * tests/test-rawmemchr.c (rawmemchr): Likewise.
99422         * tests/test-readlink.c (readlink): Likewise.
99423         * tests/test-remove.c (remove): Likewise.
99424         * tests/test-rename.c (rename): Likewise.
99425         * tests/test-renameat.c (renameat): Likewise.
99426         * tests/test-rmdir.c (rmdir): Likewise.
99427         * tests/test-round1.c (round): Likewise.
99428         * tests/test-roundf1.c (roundf): Likewise.
99429         * tests/test-roundl.c (roundl): Likewise.
99430         * tests/test-setenv.c (setenv): Likewise.
99431         * tests/test-sigaction.c (sigaction): Likewise.
99432         * tests/test-sleep.c (sleep): Likewise.
99433         * tests/test-snprintf.c (snprintf): Likewise.
99434         * tests/test-sprintf-posix.c (sprintf): Likewise.
99435         * tests/test-stat.c (stat): Likewise.
99436         * tests/test-stpncpy.c (stpncpy): Likewise.
99437         * tests/test-strcasestr.c (strcasestr): Likewise.
99438         * tests/test-strchrnul.c (strchrnul): Likewise.
99439         * tests/test-strerror.c (strerror): Likewise.
99440         * tests/test-strsignal.c (strsignal): Likewise.
99441         * tests/test-strstr.c (strstr): Likewise.
99442         * tests/test-strtod.c (strtod): Likewise.
99443         * tests/test-strverscmp.c (strverscmp): Likewise.
99444         * tests/test-symlink.c (symlink): Likewise.
99445         * tests/test-symlinkat.c (symlinkat, readlinkat): Likewise.
99446         * tests/test-times.c (times): Likewise.
99447         * tests/test-trunc1.c (trunc): Likewise.
99448         * tests/test-truncf1.c (truncf): Likewise.
99449         * tests/test-truncl.c (truncl): Likewise.
99450         * tests/test-tsearch.c (tdelete, tfind, tsearch, twalk):
99451         Likewise.
99452         * tests/test-uname.c (uname): Likewise.
99453         * tests/test-unlink.c (unlink): Likewise.
99454         * tests/test-unlinkat.c (unlinkat): Likewise.
99455         * tests/test-unsetenv.c (unsetenv): Likewise.
99456         * tests/test-usleep.c (usleep): Likewise.
99457         * tests/test-utimensat.c (utimensat): Likewise.
99458         * tests/test-vasprintf.c (asprintf, vasprintf): Likewise.
99459         * tests/test-vdprintf-posix.c (vdprintf): Likewise.
99460         * tests/test-vfprintf-posix.c (vfprintf): Likewise.
99461         * tests/test-vprintf-posix.c (vprintf): Likewise.
99462         * tests/test-vsnprintf.c (vsnprintf): Likewise.
99463         * tests/test-vsprintf-posix.c (vsprintf): Likewise.
99464         * tests/test-wcrtomb.c (wcrtomb): Likewise.
99465         * tests/test-wcsnrtombs.c (wcsnrtombs): Likewise.
99466         * tests/test-wcsrtombs.c (wcsrtombs): Likewise.
99467         * tests/test-wcwidth.c (wcwidth): Likewise.
99469         build: pull in conditional headers during GNULIB_POSIXCHECK
99470         * lib/stdio.in.h (includes): Using GNULIB_POSIXCHECK also requires
99471         definitions from any conditionally-included headers.
99472         * lib/stdlib.in.h (includes): Likewise.
99473         * lib/unistd.in.h (includes): Likewise.
99475 2009-12-24  Bruno Haible  <bruno@clisp.org>
99477         * tests/test-argv-iter.c: Include header file being tested immediately
99478         after config.h.
99479         * tests/test-base64.c: Likewise.
99480         * tests/test-flock.c: Likewise.
99481         * tests/test-fsync.c: Likewise.
99482         * tests/test-getdate.c: Likewise.
99483         * tests/test-getndelim2.c: Likewise.
99484         * tests/test-isfinite.c: Likewise.
99485         * tests/test-isinf.c: Likewise.
99486         * tests/test-strerror.c: Likewise.
99487         * tests/test-strsignal.c: Likewise.
99489 2009-12-23  Eric Blake  <ebb9@byu.net>
99491         unistd: work around cygwin bug
99492         * lib/unistd.in.h (includes): Pick up headers needed for cygwin.
99493         * doc/posix-functions/unlinkat.texi (unlinkat): Document the bug.
99494         * doc/posix-functions/symlinkat.texi (symlinkat): Likewise.
99496 2009-12-23  Bruno Haible  <bruno@clisp.org>
99498         localename: More tests.
99499         * tests/test-localename.c (SIZEOF): New macro.
99500         (categories): New variable.
99501         (test_locale_name, test_locale_name_posix, test_locale_name_environ,
99502         test_locale_name_default): Add test w.r.t. thread locale.
99503         (test_locale_name_thread): New function.
99504         (main): Invoke it.
99506         localename: Make aware of thread locale.
99507         * lib/localename.h (gl_locale_name_thread): New declaration.
99508         (gl_locale_name, gl_locale_name_posix, gl_locale_name_default): Clarify
99509         behaviour with respect to thread locale.
99510         * lib/localename.c: Include <limits.h>, <stddef.h>, <xlocale.h>,
99511         <langinfo.h>, glthread/lock.h.
99512         (SIZE_BITS): New macro.
99513         (string_hash): New function.
99514         (struct hash_node): New type.
99515         (HASH_TABLE_SIZE): New macro.
99516         (struniq_hash_table, struniq_lock): New variables.
99517         (struniq): New function.
99518         (gl_locale_name_thread): New function.
99519         (gl_locale_name): Invoke it.
99520         * m4/localename.m4 (gl_LOCALENAME): Test for uselocale function.
99521         * modules/localename (Depends-on): Add lock.
99522         Reported by Mike Gran <spk121@yahoo.com>.
99524 2009-12-23  Eric Blake  <ebb9@byu.net>
99526         va-args: new module
99527         * modules/va-args: New file.
99528         * m4/va-args.m4 (gl_VA_ARGS): Likewise.
99529         * MODULES.html.sh (Core language properties): Mention it.
99531         gnulib-common: prefer _GL_UNUSED over _UNUSED_PARAMETER_
99532         * m4/gnulib-common.m4 (gl_COMMON): Create a more-appropriately
99533         named alias for __attribute__((__unused__)).
99534         * lib/chown.c: Update client.
99535         * lib/fchmodat.c: Likewise.
99536         * lib/fts.c: Likewise.
99537         * lib/getdate.y: Likewise.
99538         * lib/getgroups.c: Likewise.
99539         * lib/getopt.c: Likewise.
99540         * lib/getugroups.c: Likewise.
99541         * lib/mkdir.c: Likewise.
99542         * lib/mkfifo.c: Likewise.
99543         * lib/mkfifoat.c: Likewise.
99544         * lib/mknod.c: Likewise.
99545         * lib/mknodat.c: Likewise.
99546         * lib/readlink.c: Likewise.
99547         * lib/se-context.in.h: Likewise.
99548         * lib/se-selinux.in.h: Likewise.
99549         * lib/sockets.c: Likewise.
99550         * lib/symlink.c: Likewise.
99551         * lib/symlinkat.c: Likewise.
99552         * lib/unicodeio.c: Likewise.
99553         * lib/unistr.h: Likewise.
99554         * tests/test-areadlink.c: Likewise.
99555         * tests/test-areadlinkat.c: Likewise.
99556         * tests/test-filenamecat.c: Likewise.
99557         * tests/test-fseeko.c: Likewise.
99558         * tests/test-ftello.c: Likewise.
99559         * tests/test-getdate.c: Likewise.
99560         * tests/test-getgroups.c: Likewise.
99561         * tests/test-gethostname.c: Likewise.
99562         * tests/test-quotearg.c: Likewise.
99563         * tests/test-version-etc.c: Likewise.
99564         * tests/test-xalloc-die.c: Likewise.
99565         * tests/test-xfprintf-posix.c: Likewise.
99566         * tests/test-xprintf-posix.c: Likewise.
99567         * tests/test-xvasprintf.c: Likewise.
99569         tests: avoid compiler warnings
99570         * tests/test-fcntl.c (main): Delete unused parameters.
99571         * tests/test-freopen-safer.c (main): Likewise.
99572         * tests/test-xalloc-die.c (main): Mark unused parameters.
99573         * tests/test-fseeko.c (main): Likewise.
99574         * tests/test-ftello.c (main): Likewise.
99575         * tests/test-nanosleep.c (main): Avoid declaration warning.
99576         * tests/test-sleep.c (main): Likewise.
99577         * tests/test-unsetenv.c (main): Silence warning about string
99578         literal.
99579         * m4/setenv.m4 (gl_FUNC_UNSETENV): Likewise.
99581 2009-12-23  Bruno Haible  <bruno@clisp.org>
99583         * tests/test-localename.c (test_locale_name): New function, extracted
99584         from main. Also test mixed situations.
99585         (test_locale_name_posix, test_locale_name_environ,
99586         test_locale_name_default): New functions.
99587         (main): Invoke them all.
99588         * modules/localename-tests (configure.ac): Test for newlocale.
99590 2009-12-23  Bruno Haible  <bruno@clisp.org>
99592         unistd: Ensure getcwd gets declared before being overridden.
99593         * lib/unistd.in.h: Conditionally include <io.h>.
99595 2009-12-22  Bruno Haible  <bruno@clisp.org>
99597         wchar: Diagnose broken combination of glibc and gcc versions and flags.
99598         * m4/wchar.m4 (gl_WCHAR_H_INLINE_OK): New macro.
99599         (gl_WCHAR_H): Invoke it.
99600         * m4/btowc.m4 (gl_FUNC_BTOWC): Require it.
99601         * doc/posix-headers/wchar.texi: Mention the interoperability problem.
99602         Reported by Karl Berry <karl@freefriends.org>.
99604 2009-12-22  Eric Blake  <ebb9@byu.net>
99606         math, unistd: avoid redundant includes
99607         * lib/math.in.h (isnan): No need to re-include <math.h>.
99608         * lib/unistd.in.h (getcwd): Likewise, for <stdlib.h>.
99610         getsubopt: work around cygwin bug
99611         * lib/stdlib.in.h (includes): Move unistd inclusion sooner, to
99612         avoid conflicting with system getsubopt.
99613         * doc/posix-functions/getsubopt.texi (getsubopt): Document the
99614         bug.
99616         getopt: synchronize from glibc
99617         * lib/getopt.c (_getopt_initialize, _getopt_internal_r): Swap
99618         parameter order.  Adjust all callers.
99619         (_getopt_internal_r, main): Adjust quoting in error messages.
99620         Drop considerations for outdated POSIX 1003.2 error message.
99621         * lib/getopt1.c (_getopt_long_r, _getopt_long_only_r): Adjust
99622         callers.
99623         * lib/getopt_int.h (_getopt_internal_r): Adjust prototype.
99625         test-getopt: test stderr behavior
99626         * modules/getopt-posix-tests (Depends-on): Add dup2.
99627         * tests/test-getopt.c (ASSERT): Avoid stderr.
99628         (main): Move stderr to a temporary file.
99629         * tests/test-getopt.h (getopt_loop): No longer manipulate opterr.
99630         Instead, add parameter to inform caller if output occurred.
99631         (test_getopt): Adjust all existing tests to expect silence, and
99632         add new tests of leading ":".
99633         * doc/glibc-functions/getopt_long.texi (getopt_long): Document
99634         glibc shortcomings with leading "-:" or "+:" in optstring.
99635         * doc/glibc-functions/getopt_long_only.texi (getopt_long_only):
99636         Likewise.
99637         * doc/posix-functions/getopt.texi (getopt): Likewise.
99639         test-getopt: enhance test
99640         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Require that getopt_long
99641         supports optind=0.
99642         * tests/test-getopt.c (OPTIND_MIN): Move...
99643         * tests/test-getopt.h (OPTIND_MIN): ...here.
99644         * tests/test-getopt_long.h (test_getopt_long): Add more coverage.
99645         Require that optind=0 works, since modern BSD supports it in
99646         addition to optreset, and since coreutils expects it.
99647         (test_getopt_long_only): New test.
99648         * doc/glibc-functions/getopt_long.texi (getopt_long): Document
99649         glibc shortcomings with 'W;', and enforcement of optind=0.
99650         * doc/glibc-functions/getopt_long_only.texi (getopt_long_only):
99651         Likewise.
99653 2009-12-21  Bruno Haible  <bruno@clisp.org>
99655         localename: Improvements for MacOS X and Cygwin.
99656         * lib/localename.h (gl_locale_name_environ): New declaration.
99657         * lib/localename.c (gl_locale_name_environ): New function, extracted from
99658         gl_locale_name_posix. Ignore dummy LANG values on MacOS X and Cygwin.
99659         (gl_locale_name_posix): Invoke it.
99660         (gl_locale_name_default): Add comments. Use Windows native API also on
99661         Cygwin.
99663 2009-12-21  Bruno Haible  <bruno@clisp.org>
99665         Update list of Win32 locale ids.
99666         * lib/localename.c (LANG_ROMANSH): Renamed from LANG_RHAETO_ROMANCE.
99667         (LANG_SAMI): Renamed from LANG_SAAMI.
99668         (LANG_BASHKIR, LANG_LUXEMBOURGISH, LANG_GREENLANDIC,
99669         LANG_MAPUDUNGUN, LANG_MOHAWK, LANG_BRETON, LANG_OCCITAN, LANG_CORSICAN,
99670         LANG_ALSATIAN, LANG_YAKUT, LANG_KICHE, LANG_KINYARWANDA, LANG_WOLOF,
99671         LANG_DARI, LANG_SCOTTISH_GAELIC): New macros.
99672         (SUBLANG_AFRIKAANS_SOUTH_AFRICA, SUBLANG_ALBANIAN_ALBANIA,
99673         SUBLANG_ALSATIAN_FRANCE, SUBLANG_AMHARIC_ETHIOPIA,
99674         SUBLANG_ARMENIAN_ARMENIA, SUBLANG_ASSAMESE_INDIA,
99675         SUBLANG_BASHKIR_RUSSIA, SUBLANG_BASQUE_BASQUE,
99676         SUBLANG_BELARUSIAN_BELARUS, SUBLANG_BRETON_FRANCE,
99677         SUBLANG_BULGARIAN_BULGARIA, SUBLANG_CAMBODIAN_CAMBODIA,
99678         SUBLANG_CATALAN_SPAIN, SUBLANG_CORSICAN_FRANCE,
99679         SUBLANG_CZECH_CZECH_REPUBLIC, SUBLANG_DANISH_DENMARK,
99680         SUBLANG_DARI_AFGHANISTAN, SUBLANG_DIVEHI_MALDIVES,
99681         SUBLANG_DUTCH_SURINAM, SUBLANG_ESTONIAN_ESTONIA,
99682         SUBLANG_FAEROESE_FAROE_ISLANDS, SUBLANG_FARSI_IRAN,
99683         SUBLANG_FINNISH_FINLAND, SUBLANG_FRISIAN_NETHERLANDS,
99684         SUBLANG_GALICIAN_SPAIN, SUBLANG_GEORGIAN_GEORGIA,
99685         SUBLANG_GREEK_GREECE, SUBLANG_GREENLANDIC_GREENLAND,
99686         SUBLANG_GUJARATI_INDIA, SUBLANG_HAUSA_NIGERIA_LATIN,
99687         SUBLANG_HEBREW_ISRAEL, SUBLANG_HINDI_INDIA, SUBLANG_HUNGARIAN_HUNGARY,
99688         SUBLANG_ICELANDIC_ICELAND, SUBLANG_IGBO_NIGERIA,
99689         SUBLANG_INDONESIAN_INDONESIA, SUBLANG_INUKTITUT_CANADA,
99690         SUBLANG_INUKTITUT_CANADA_LATIN, SUBLANG_IRISH_IRELAND,
99691         SUBLANG_JAPANESE_JAPAN, SUBLANG_KANNADA_INDIA,
99692         SUBLANG_KAZAK_KAZAKHSTAN, SUBLANG_KICHE_GUATEMALA,
99693         SUBLANG_KINYARWANDA_RWANDA, SUBLANG_KONKANI_INDIA,
99694         SUBLANG_KYRGYZ_KYRGYZSTAN, SUBLANG_LAO_LAOS, SUBLANG_LATVIAN_LATVIA,
99695         SUBLANG_LITHUANIAN_LITHUANIA, SUBLANG_LOWER_SORBIAN_GERMANY,
99696         SUBLANG_LUXEMBOURGISH_LUXEMBOURG, SUBLANG_MACEDONIAN_MACEDONIA,
99697         SUBLANG_MALAYALAM_INDIA, SUBLANG_MALTESE_MALTA,
99698         SUBLANG_MAORI_NEW_ZEALAND, SUBLANG_MAPUDUNGUN_CHILE,
99699         SUBLANG_MARATHI_INDIA, SUBLANG_MOHAWK_CANADA, SUBLANG_NEPALI_NEPAL,
99700         SUBLANG_OCCITAN_FRANCE, SUBLANG_ORIYA_INDIA,
99701         SUBLANG_PASHTO_AFGHANISTAN, SUBLANG_POLISH_POLAND,
99702         SUBLANG_ROMANSH_SWITZERLAND, SUBLANG_SAMI_NORTHERN_NORWAY,
99703         SUBLANG_SAMI_NORTHERN_SWEDEN, SUBLANG_SAMI_NORTHERN_FINLAND,
99704         SUBLANG_SAMI_LULE_NORWAY, SUBLANG_SAMI_LULE_SWEDEN,
99705         SUBLANG_SAMI_SOUTHERN_NORWAY, SUBLANG_SAMI_SOUTHERN_SWEDEN,
99706         SUBLANG_SAMI_SKOLT_FINLAND, SUBLANG_SAMI_INARI_FINLAND,
99707         SUBLANG_SANSKRIT_INDIA, SUBLANG_SINHALESE_SRI_LANKA,
99708         SUBLANG_SLOVAK_SLOVAKIA, SUBLANG_SLOVENIAN_SLOVENIA,
99709         SUBLANG_SOTHO_SOUTH_AFRICA, SUBLANG_SWAHILI_KENYA,
99710         SUBLANG_SWEDISH_SWEDEN, SUBLANG_SYRIAC_SYRIA,
99711         SUBLANG_TAGALOG_PHILIPPINES, SUBLANG_TAJIK_TAJIKISTAN,
99712         SUBLANG_TAMIL_INDIA, SUBLANG_TATAR_RUSSIA, SUBLANG_TELUGU_INDIA,
99713         SUBLANG_THAI_THAILAND, SUBLANG_TSWANA_SOUTH_AFRICA,
99714         SUBLANG_TURKISH_TURKEY, SUBLANG_TURKMEN_TURKMENISTAN,
99715         SUBLANG_UKRAINIAN_UKRAINE, SUBLANG_UPPER_SORBIAN_GERMANY,
99716         SUBLANG_VIETNAMESE_VIETNAM, SUBLANG_WELSH_UNITED_KINGDOM,
99717         SUBLANG_WOLOF_SENEGAL, SUBLANG_XHOSA_SOUTH_AFRICA,
99718         SUBLANG_YAKUT_RUSSIA, SUBLANG_YI_PRC, SUBLANG_YORUBA_NIGERIA,
99719         SUBLANG_ZULU_SOUTH_AFRICA): New macros.
99720         (gl_locale_name_from_win32_LANGID): Handle also the territory neutral
99721         locale ids. Add support for Alsatian, Bashkir, Breton, Corsican, Dari,
99722         Greenlandic, K'iche', Kinyarwanda, Luxembourgish, Mapudungun, Mohawk,
99723         Occitan, Scottish Gaelic, Wolof, Yakut. Change language code for Yi.
99724         Add more languages and countries for Sami, Sorbian. Add more countries
99725         for Serbian, Dutch. Add more scripts for Inuktitut. Be more precise
99726         for Pashto. Change country for Syriac, Tswana.
99728 2009-12-21  Eric Blake  <ebb9@byu.net>
99730         test-utimens: avoid spurious failure
99731         * tests/test-chown.h (nap): Factor...
99732         * tests/nap.h: ...into new file.
99733         * tests/test-lchown.h (nap): Avoid duplication.
99734         * tests/test-utimens-common.h (nap): Use shared implementation,
99735         necessary on file systems with 1-second resolution.
99736         * modules/chown-tests (Files): Include new file.
99737         * modules/fdutimensat-tests (Files): Likewise.
99738         * modules/futimens-tests (Files): Likewise.
99739         * modules/lchown-tests (Files): Likewise.
99740         * modules/openat-tests (Files): Likewise.
99741         * modules/utimens-tests (Files): Likewise.
99742         * modules/utimensat-tests (Files): Likewise.
99744 2009-12-19  Eric Blake  <ebb9@byu.net>
99746         futimens, utimensat: work around Linux bug
99747         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Detect ctime bug.
99748         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise.
99749         * lib/utimensat.c (rpl_utimensat): Work around it.
99750         * lib/futimens.c (rpl_futimens): Adjust comment.
99752         utimens: work around Linux ctime bug
99753         * lib/utimens.c (detect_ctime_bug): New helper function.
99754         (update_timespec): Differentiate between workaround needed for
99755         this bug vs. what is needed for systems that lack utimensat.
99756         (fdutimens, lutimens): Work around bug.
99758         utimens: check for ctime update
99759         * tests/test-utimens-common.h (check_ctime): Define.
99760         * tests/test-utimens.h (test_utimens): Expose the Linux bug.
99761         * tests/test-futimens.h (test_futimens): Likewise.
99762         * tests/test-lutimens.h (test_lutimens): Likewise.
99763         * doc/posix-functions/futimens.texi (futimens): Document the bug.
99764         * doc/posix-functions/utimensat.texi (utimensat): Likewise.
99766 2009-12-19  Bruno Haible  <bruno@clisp.org>
99768         dprintf-posix: Check against memory leak fixed on 2009-12-15.
99769         * tests/test-dprintf-posix2.sh: New file.
99770         * tests/test-dprintf-posix2.c: New file.
99771         * modules/dprintf-posix-tests (Files): Add them.
99772         (configure.ac): Check for getrlimit and setrlimit.
99773         (Makefile.am): Augment TESTS and CHECK_PROGRAMS.
99775 2009-12-19  Bruno Haible  <bruno@clisp.org>
99777         fprintf-posix: Check against memory leak fixed on 2009-12-15.
99778         * tests/test-fprintf-posix3.sh: New file.
99779         * tests/test-fprintf-posix3.c: New file.
99780         * modules/fprintf-posix-tests (Files): Add them.
99781         (Makefile.am): Augment TESTS and CHECK_PROGRAMS.
99783 2009-12-19  Eric Blake  <ebb9@byu.net>
99785         dirfd: fix prototype
99786         * lib/dirent.in.h (dirfd): Argument is not const, per POSIX.
99787         * lib/dirfd.c (dirfd): Likewise.
99789         canonicalize: reduce memory usage
99790         * lib/canonicalize.c (canonicalize_filename_mode): Trim the
99791         allocation to size.
99792         Reported by Solar Designer <solar@openwall.com>.
99794 2009-12-19  Bruno Haible  <bruno@clisp.org>
99796         New module attribute 'Applicability'.
99797         * modules/TEMPLATE-EXTENDED: New field 'Applicability'.
99798         * gnulib-tool: New option --extract-applicability.
99799         (func_usage): Document it.
99800         (sed_extract_prog): Recognize it.
99801         (func_get_applicability): New function.
99802         (func_import): Generalize handling of 'link-warning' module.
99803         * modules/link-warning (Applicability): New section.
99804         * modules/arg-nonnull (Applicability): New section.
99805         Repoted by Simon Josefsson <simon@josefsson.org>.
99807 2009-12-19  Bruno Haible  <bruno@clisp.org>
99809         fflush: tweak
99810         * lib/fflush.c (update_fpos_cache): Don't use fpos_t on Cygwin.
99811         * lib/fseeko.c (rpl_fseeko): Likewise.
99813 2009-12-16  José E. Marchesi  <jemarch@gnu.org>  (tiny change)
99815         * lib/gl_list.h: Fix typo in comment.
99817 2009-12-16  Eric Blake  <ebb9@byu.net>
99819         fcntl: use to simplify other modules
99820         * modules/cloexec (Depends-on): Add fcntl.
99821         * modules/fchdir (Depends-on): Likewise.
99822         * modules/fd-safer-flag (Depends-on): Likewise.
99823         * modules/unistd-safer (Depends-on): Likewise.
99824         * modules/dup3 (configure.ac): Set module indicator.
99825         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Replace fcntl if fchdir is
99826         missing.
99827         * lib/fchdir.c (_gl_register_dup): Fix comment.
99828         * lib/cloexec.c (dup_cloexec): Simplify, by relying on fcntl.
99829         * lib/dup-safer.c (dup_safer): Likewise.
99830         * lib/dup-safer-flag.c (dup_safer_flag): Likewise.
99831         * lib/dup3.c (dup3): Likewise.
99832         * tests/test-fchdir.c (main): Enhance test.
99833         Fixes a dup_cloexec bug reported by Ondřej Vašík.
99835         fcntl: port portions of fcntl to mingw
99836         * m4/fcntl.m4 (gl_FUNC_FCNTL): Also build fcntl.c on mingw.
99837         * lib/fcntl.c (fcntl) <F_DUPFD, F_DUPFD_CLOEXEC, F_GETFD>: Provide
99838         replacement for mingw.
99839         * modules/fcntl (Description): Update.
99840         (Depends-on): Add dup2.
99841         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Add witness.
99842         * modules/fcntl-h (Makefile.am): Substitute it.
99843         * lib/fcntl.in.h (fcntl): Update declaration.
99844         (F_DUPFD, F_GETFD): New macros, when needed.
99845         * doc/posix-headers/fcntl.texi (fcntl.h): Update documentation.
99846         * doc/posix-functions/fcntl.texi (fcntl): Likewise.
99847         * tests/test-fcntl.c (check_flags, main): Enhance test for items
99848         we now guarantee.
99850         fcntl: work around cygwin bug in F_DUPFD
99851         * m4/fcntl.m4 (gl_REPLACE_FCNTL): New macro.
99852         (gl_FUNC_FCNTL): Use it.  Test for F_DUPFD bug.
99853         * lib/fcntl.c (rpl_fcntl) <F_DUPFD>: Work around it.
99854         <F_DUPFD_CLOEXEC>: Reduce calls to _gl_register_dup.
99855         * doc/posix-functions/fcntl.texi (fcntl): Document it.
99857         fcntl: support F_DUPFD_CLOEXEC on systems with fcntl
99858         * modules/fcntl (Files): List new files.
99859         (configure.ac): Run a test.
99860         * m4/fcntl.m4 (gl_FUNC_FCNTL): New file.
99861         * lib/fcntl.c (rpl_fcntl): Likewise.
99862         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Add witness defaults.
99863         (gl_FCNTL_H): Always replace fcntl.h.
99864         * modules/fcntl-h (Makefile.am): Substitute witnesses.
99865         * lib/fcntl.in.h (fcntl): Declare replacement.
99866         (F_DUPFD_CLOEXEC, GNULIB_defined_F_DUPFD_CLOEXEC): New macro when
99867         needed, plus a witness.
99868         * doc/posix-functions/fcntl.texi (fcntl): Document this.
99869         * doc/posix-headers/fcntl.texi (fcntl.h): Likewise.
99870         * tests/test-fcntl.c: New file.
99871         * modules/fcntl-tests: Likewise.
99873         binary-io: avoid potential compilation warning
99874         * lib/binary-io.h [__DJGPP__]: Avoid null preprocessor
99875         directives.
99877         fflush: avoid compilation error on NetBSD
99878         * lib/fflush.c (update_fpos_cache): Use a union to safely convert
99879         between off_t and fpos_t, since the latter is sometimes a struct.
99880         * lib/fseeko.c (rpl_fseeko): Likewise.
99881         Reported by Alexander Nasonov <alnsn@yandex.ru>.
99883 2009-12-15  Eric Blake  <ebb9@byu.net>
99885         fcntl-h, stdio, sys_ioctl: fix declarations
99886         * lib/stdio.in.h (dprintf): Use of link warning on a variadic
99887         function must not take arguments.
99888         * lib/sys_ioctl.in.h (ioctl): Likewise.
99889         * lib/fcntl.in.h (openat): Likewise.  Declare extern.
99890         (open): Add a link warning.
99892 2009-12-15  Jim Meyering  <meyering@redhat.com>
99894         areadlink, areadlink-with-size: relax license to LGPLv2+
99895         * modules/areadlink (License): Relax to LGPLv2+.
99896         * modules/areadlink-with-size (License): Likewise.
99898 2009-12-15  Joel E. Denny  <jdenny@clemson.edu>
99899             Bruno Haible  <bruno@clisp.org>
99901         *printf: Fix memory leak.
99902         * lib/fprintf.c (fprintf): Free memory allocated by vasnprintf.
99903         * lib/vfprintf.c (vfprintf): Likewise.
99904         * lib/dprintf.c (dprintf): Likewise.
99905         * lib/vdprintf.c (vdprintf): Likewise.
99907 2009-12-14  Eric Blake  <ebb9@byu.net>
99909         accept4: adjust module dependencies
99910         * modules/accept4 (Depends-on): Use fcntl-h, not fcntl.
99912         utimens: one more try at avoiding compiler warning
99913         * lib/utimens.c (lutimens): Lower scope of result.
99915 2009-12-13  Bruno Haible  <bruno@clisp.org>
99917         Move the malloc checking from module 'list' to new module 'xlist'.
99918         * modules/xlist: New file.
99919         * lib/gl_xlist.h: New file.
99920         * lib/gl_xlist.c: New file.
99921         * lib/gl_list.h (gl_list_create_empty, gl_list_create,
99922         gl_list_node_set_value, gl_list_set_at, gl_list_add_first,
99923         gl_list_add_last, gl_list_add_before, gl_list_add_after,
99924         gl_list_nx_add_at, gl_sortedlist_add): Disable declarations.
99925         (gl_list_nx_create_empty, gl_list_nx_create, gl_list_node_nx_set_value,
99926         gl_list_nx_set_at, gl_list_nx_add_first, gl_list_nx_add_last,
99927         gl_list_nx_add_before, gl_list_nx_add_after, gl_list_nx_add_at,
99928         gl_sortedlist_nx_add): New declarations.
99929         (struct gl_list_implementation): Rename and change methods accordingly.
99930         (gl_list_nx_create_empty): Renamed from gl_list_create_empty.
99931         (gl_list_nx_create): Renamed from gl_list_create.
99932         (gl_list_node_nx_set_value): Renamed from gl_list_node_set_value.
99933         (gl_list_nx_set_at): Renamed from gl_list_set_at.
99934         (gl_list_nx_add_first): Renamed from gl_list_add_first.
99935         (gl_list_nx_add_last): Renamed from gl_list_add_last.
99936         (gl_list_nx_add_before): Renamed from gl_list_add_before.
99937         (gl_list_nx_add_after): Renamed from gl_list_add_after.
99938         (gl_list_nx_add_at): Renamed from gl_list_add_at.
99939         (gl_sortedlist_nx_add): Renamed from gl_sortedlist_add.
99940         * lib/gl_list.c (gl_list_nx_create_empty): Renamed from
99941         gl_list_create_empty.
99942         (gl_list_nx_create): Renamed from gl_list_create.
99943         (gl_list_node_nx_set_value): Renamed from gl_list_node_set_value.
99944         (gl_list_nx_set_at): Renamed from gl_list_set_at.
99945         (gl_list_nx_add_first): Renamed from gl_list_add_first.
99946         (gl_list_nx_add_last): Renamed from gl_list_add_last.
99947         (gl_list_nx_add_before): Renamed from gl_list_add_before.
99948         (gl_list_nx_add_after): Renamed from gl_list_add_after.
99949         (gl_list_nx_add_at): Renamed from gl_list_add_at.
99950         (gl_sortedlist_nx_add): Renamed from gl_sortedlist_add.
99951         * lib/gl_array_list.c: Don't include xalloc.h.
99952         (gl_array_nx_create_empty): Renamed from gl_array_create_empty. Return
99953         NULL upon out-of-memory.
99954         (gl_array_nx_create): Renamed from gl_array_create. Return NULL upon
99955         out-of-memory.
99956         (gl_array_node_nx_set_value): Renamed from gl_array_node_set_value.
99957         Change return type to 'int'.
99958         (gl_array_nx_set_at): Renamed from gl_array_set_at.
99959         (grow): Change return type to 'int'. Return -1 upon out-of-memory.
99960         (gl_array_nx_add_first): Renamed from gl_array_add_first. Return NULL
99961         upon out-of-memory.
99962         (gl_array_nx_add_last): Renamed from gl_array_add_last. Return NULL
99963         upon out-of-memory.
99964         (gl_array_nx_add_before): Renamed from gl_array_add_before. Return NULL
99965         upon out-of-memory.
99966         (gl_array_nx_add_after): Renamed from gl_array_add_after. Return NULL
99967         upon out-of-memory.
99968         (gl_array_nx_add_at): Renamed from gl_array_add_at. Return NULL upon
99969         out-of-memory.
99970         (gl_array_sortedlist_nx_add): Renamed from gl_array_sortedlist_add.
99971         Update.
99972         (gl_array_list_implementation): Update.
99973         * lib/gl_carray_list.c: Don't include xalloc.h.
99974         (gl_carray_nx_create_empty): Renamed from gl_carray_create_empty.
99975         Return NULL upon out-of-memory.
99976         (gl_carray_nx_create): Renamed from gl_carray_create. Return NULL upon
99977         out-of-memory.
99978         (gl_carray_node_nx_set_value): Renamed from gl_carray_node_set_value.
99979         Change return type to 'int'.
99980         (gl_carray_nx_set_at): Renamed from gl_carray_set_at.
99981         (grow): Change return type to 'int'. Return -1 upon out-of-memory.
99982         (gl_carray_nx_add_first): Renamed from gl_carray_add_first. Return NULL
99983         upon out-of-memory.
99984         (gl_carray_nx_add_last): Renamed from gl_carray_add_last. Return NULL
99985         upon out-of-memory.
99986         (gl_carray_nx_add_at): Renamed from gl_carray_add_at. Return NULL upon
99987         out-of-memory.
99988         (gl_carray_nx_add_before): Renamed from gl_carray_add_before. Update.
99989         (gl_carray_nx_add_after): Renamed from gl_carray_add_after. Update.
99990         (gl_carray_sortedlist_nx_add): Renamed from gl_carray_sortedlist_add.
99991         Update.
99992         (gl_carray_list_implementation): Update.
99993         * lib/gl_anyhash_list2.h (hash_resize): Do nothing upon out-of-memory.
99994         * lib/gl_anylinked_list2.h (gl_linked_nx_create_empty): Renamed from
99995         gl_linked_create_empty. Return NULL upon out-of-memory.
99996         (gl_linked_nx_create): Renamed from gl_linked_create. Return NULL upon
99997         out-of-memory.
99998         (gl_linked_node_nx_set_value): Renamed from gl_linked_node_set_value.
99999         Change return type to 'int'. Return -1 upon out-of-memory.
100000         (gl_linked_nx_set_at): Renamed from gl_linked_set_at. Return NULL upon
100001         out-of-memory.
100002         (gl_linked_nx_add_first): Renamed from gl_linked_add_first. Return NULL
100003         upon out-of-memory.
100004         (gl_linked_nx_add_last): Renamed from gl_linked_add_last. Return NULL
100005         upon out-of-memory.
100006         (gl_linked_nx_add_before): Renamed from gl_linked_add_before. Return
100007         NULL upon out-of-memory.
100008         (gl_linked_nx_add_after): Renamed from gl_linked_add_after. Return NULL
100009         upon out-of-memory.
100010         (gl_linked_nx_add_at): Renamed from gl_linked_add_at. Return NULL upon
100011         out-of-memory.
100012         (gl_linked_sortedlist_nx_add): Renamed from gl_linked_sortedlist_add.
100013         Update.
100014         * lib/gl_linked_list.c: Don't include xalloc.h.
100015         (gl_linked_list_implementation): Update.
100016         * lib/gl_linkedhash_list.c: Don't include xalloc.h.
100017         (add_to_bucket): Change return type to 'int'.
100018         (gl_linkedhash_list_implementation): Update.
100019         * lib/gl_anytree_list1.h (free_subtree): New function.
100020         * lib/gl_anytree_list2.h (gl_tree_nx_create_empty): Renamed from
100021         gl_tree_create_empty. Return NULL upon out-of-memory.
100022         (gl_tree_node_nx_set_value): Renamed from gl_tree_node_set_value.
100023         Change return type to 'int'. Return -1 upon out-of-memory.
100024         (gl_tree_nx_set_at): Renamed from gl_tree_set_at. Return NULL upon
100025         out-of-memory.
100026         (gl_tree_nx_add_at): Renamed from gl_tree_add_at. Update.
100027         (gl_tree_remove_node): New function, moved here from
100028         lib/gl_anyavltree_list2.h and lib/gl_anyrbtree_list2.h.
100029         (gl_tree_sortedlist_nx_add): Renamed from gl_tree_sortedlist_add.
100030         Update.
100031         * lib/gl_anyavltree_list2.h (create_subtree_with_contents): Use
100032         malloc, not xmalloc. Return NULL upon out-of-memory.
100033         (gl_tree_nx_create): Renamed from gl_tree_create. Return NULL upon
100034         out-of-memory.
100035         (gl_tree_remove_node_from_tree): New function, extracted from
100036         gl_tree_remove_node.
100037         (gl_tree_nx_add_first): Renamed from gl_tree_add_first. Return NULL
100038         upon out-of-memory.
100039         (gl_tree_nx_add_last): Renamed from gl_tree_add_last. Return NULL upon
100040         out-of-memory.
100041         (gl_tree_nx_add_before): Renamed from gl_tree_add_before. Return NULL
100042         upon out-of-memory.
100043         (gl_tree_nx_add_after): Renamed from gl_tree_add_after. Return NULL
100044         upon out-of-memory.
100045         (gl_tree_remove_node): Remove function. Moved to gl_anytree_list2.h.
100046         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents): Use malloc,
100047         not xmalloc. Return NULL upon out-of-memory.
100048         (gl_tree_nx_create): Renamed from gl_tree_create. Return NULL upon
100049         out-of-memory.
100050         (gl_tree_remove_node_from_tree): New function, extracted from
100051         gl_tree_remove_node.
100052         (gl_tree_nx_add_first): Renamed from gl_tree_add_first. Return NULL
100053         upon out-of-memory.
100054         (gl_tree_nx_add_last): Renamed from gl_tree_add_last. Return NULL upon
100055         out-of-memory.
100056         (gl_tree_nx_add_before): Renamed from gl_tree_add_before. Return NULL
100057         upon out-of-memory.
100058         (gl_tree_nx_add_after): Renamed from gl_tree_add_after. Return NULL
100059         upon out-of-memory.
100060         (gl_tree_remove_node): Remove function. Moved to gl_anytree_list2.h.
100061         * lib/gl_avltree_list.c: Don't include xalloc.h. Include
100062         gl_anytree_list1.h before gl_anyavltree_list2.h.
100063         (gl_avltree_list_implementation): Update.
100064         * lib/gl_rbtree_list.c: Don't include xalloc.h. Include
100065         gl_anytree_list1.h before gl_anyavltree_list2.h.
100066         (gl_rbtree_list_implementation): Update.
100067         * lib/gl_anytreehash_list1.h (add_to_bucket, add_nodes_to_buckets):
100068         Change return type to 'int'. Return -1 upon out-of-memory. Use
100069         __builtin_expect.
100070         * lib/gl_avltreehash_list.c: Don't include xalloc.h.
100071         (gl_avltreehash_list_implementation): Update.
100072         * lib/gl_rbtreehash_list.c: Don't include xalloc.h.
100073         (gl_rbtreehash_list_implementation): Update.
100074         * modules/array-list (Depends-on): Remove xalloc.
100075         * modules/carray-list (Depends-on): Likewise.
100076         * modules/linked-list (Depends-on): Likewise.
100077         * modules/linkedhash-list (Depends-on): Likewise.
100078         * modules/avltree-list (Depends-on): Likewise.
100079         * modules/rbtree-list (Depends-on): Likewise.
100080         * modules/avltreehash-list (Depends-on): Likewise.
100081         * modules/rbtreehash-list (Depends-on): Likewise.
100083         * modules/xsublist: New file.
100084         * lib/gl_xsublist.h: New file.
100085         * lib/gl_xsublist.c: New file.
100086         * lib/gl_sublist.h (gl_sublist_create): Disable declaration.
100087         (gl_sublist_nx_create): New declaration.
100088         * lib/gl_sublist.c: Don't include xalloc.h.
100089         (gl_sublist_nx_create_empty): Renamed from gl_sublist_create_empty.
100090         (gl_sublist_nx_create_fill): Renamed from gl_sublist_create_fill.
100091         (gl_sublist_node_nx_set_value): Renamed from gl_sublist_node_set_value.
100092         Change return type to 'int'. Return -1 upon out-of-memory.
100093         (gl_sublist_nx_set_at): Renamed from gl_sublist_set_at. Return NULL
100094         upon out-of-memory.
100095         (gl_sublist_nx_add_first): Renamed from gl_sublist_add_first. Return
100096         NULL upon out-of-memory.
100097         (gl_sublist_nx_add_last): Renamed from gl_sublist_add_last. Return NULL
100098         upon out-of-memory.
100099         (gl_sublist_nx_add_before): Renamed from gl_sublist_add_before. Return
100100         NULL upon out-of-memory.
100101         (gl_sublist_nx_add_after): Renamed from gl_sublist_add_after. Return
100102         NULL upon out-of-memory.
100103         (gl_sublist_nx_add_at): Renamed from gl_sublist_add_at. Return NULL
100104         upon out-of-memory.
100105         (gl_sublist_sortedlist_nx_add): Renamed from gl_sublist_sortedlist_add.
100106         (gl_sublist_list_implementation): Update.
100107         (gl_sublist_nx_create): Renamed from gl_sublist_create. Return NULL
100108         upon out-of-memory.
100109         * modules/sublist (Depends-on): Remove xalloc.
100111         * tests/test-array_list.c: Use gl_list_nx_* functions where possible.
100112         * tests/test-carray_list.c: Likewise.
100113         * tests/test-linked_list.c: Likewise.
100114         * tests/test-linkedhash_list.c: Likewise.
100115         * tests/test-avltree_list.c: Likewise.
100116         * tests/test-rbtree_list.c: Likewise.
100117         * tests/test-avltreehash_list.c: Likewise.
100118         * tests/test-rbtreehash_list.c: Likewise.
100119         * modules/array-list-tests (Makefile.am): Don't link with @LIBINTL@.
100120         * modules/carray-list-tests (Makefile.am): Likewise.
100121         * modules/linked-list-tests (Makefile.am): Likewise.
100122         * modules/linkedhash-list-tests (Makefile.am): Likewise.
100123         * modules/avltree-list-tests (Makefile.am): Likewise.
100124         * modules/rbtree-list-tests (Makefile.am): Likewise.
100125         * modules/avltreehash-list-tests (Makefile.am): Likewise.
100126         * modules/rbtreehash-list-tests (Makefile.am): Likewise.
100128         * NEWS: Mention the changes.
100130         * lib/clean-temp.c: Include gl_xlist.h.
100131         * modules/clean-temp (Depends-on): Add xlist.
100133         * lib/git-merge-changelog.c: Include gl_xlist.h instead of gl_list.h.
100134         * modules/git-merge-changelog (Depends-on): Add xlist. Remove list.
100136         * tests/test-array_oset.c: Include gl_xlist.h.
100137         * modules/array-oset-tests (Depends-on): Add xlist.
100139         Reported by José E. Marchesi <jemarch@gnu.org>.
100141 2009-12-13  Bruno Haible  <bruno@clisp.org>
100143         Move the malloc checking from module 'oset' to new module 'xoset'.
100144         * modules/xoset: New file.
100145         * lib/gl_xoset.h: New file.
100146         * lib/gl_xoset.c: New file.
100147         * lib/gl_oset.h (gl_oset_create_empty, gl_oset_add): Disable
100148         declarations.
100149         (gl_oset_nx_create_empty, gl_oset_nx_add): New declarations.
100150         (struct gl_oset_implementation): Rename and change methods accordingly.
100151         (gl_oset_nx_create_empty): Renamed from gl_oset_create_empty.
100152         (gl_oset_nx_add): Renamed from gl_oset_add. Change return type to
100153         'int'. Mark as __warn_unused_result__.
100154         * lib/gl_oset.c (gl_oset_nx_create_empty): Renamed from
100155         gl_oset_create_empty.
100156         (gl_oset_nx_add): Renamed from gl_oset_add. Change return type to
100157         'int'.
100158         * lib/gl_array_oset.c: Don't include xalloc.h.
100159         (gl_array_nx_create_empty): Renamed from gl_array_create_empty. Use
100160         malloc, not xmalloc.
100161         (grow): Change return type to 'int'. Don't call xalloc_die.
100162         (gl_array_nx_add_at): Renamed from gl_array_add_at. Change return type
100163         to 'int'.
100164         (gl_array_nx_add): Renamed from gl_array_add. Change return type to
100165         'int'.
100166         (gl_array_oset_implementation): Update.
100167         * lib/gl_anytree_oset.h (gl_tree_nx_create_empty): Renamed from
100168         gl_tree_create_empty.
100169         (gl_tree_nx_add): Renamed from gl_tree_add. Change return type to
100170         'int'.
100171         * lib/gl_avltree_oset.c: Don't include xalloc.h.
100172         (gl_tree_nx_add_first): Renamed from gl_tree_add_first. Use malloc, not
100173         xmalloc.
100174         (gl_tree_nx_add_before): Renamed from gl_tree_add_before. Use malloc,
100175         not xmalloc.
100176         (gl_tree_nx_add_after): Renamed from gl_tree_add_after. Use malloc, not
100177         xmalloc.
100178         (gl_avltree_oset_implementation): Update.
100179         * lib/gl_rbtree_oset.c: Don't include xalloc.h.
100180         (gl_tree_nx_add_first): Renamed from gl_tree_add_first. Use malloc, not
100181         xmalloc.
100182         (gl_tree_nx_add_before): Renamed from gl_tree_add_before. Use malloc,
100183         not xmalloc.
100184         (gl_tree_nx_add_after): Renamed from gl_tree_add_after. Use malloc, not
100185         xmalloc.
100186         (gl_rbtree_oset_implementation): Update.
100187         * modules/array-oset (Depends-on): Remove xalloc.
100188         * modules/avltree-oset (Depends-on): Likewise.
100189         * modules/rbtree-oset (Depends-on): Likewise.
100190         * tests/test-array_oset.c: Use gl_oset_nx_* functions where possible.
100191         * tests/test-avltree_oset.c: Likewise.
100192         * tests/test-rbtree_oset.c: Likewise.
100193         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
100194         * modules/avltree-oset-tests (Makefile.am): Don't link with @LIBINTL@.
100195         * modules/rbtree-oset-tests (Makefile.am): Likewise.
100196         * NEWS: Mention the change.
100198 2009-12-05  Alfred M. Szmidt  <ams@gnu.org>
100200         maint.mk: allow a project to override release-prep commands
100201         * top/maint.mk (alpha, beta, stable): Move release-preparatory
100202         commands into a new rule.
100203         (release-prep): New rule.
100204         (release-prep-hook): New overridable variable.
100206 2009-12-13  Bruno Haible  <bruno@clisp.org>
100208         * lib/localcharset.c (locale_charset): Fix comment about use of GetACP.
100210 2009-12-13  Jim Meyering  <meyering@redhat.com>
100212         maint.mk (null_AM_MAKEFLAGS, built_programs): remove unused definitions
100213         * top/maint.mk (null_AM_MAKEFLAGS, built_programs): Remove definitions.
100215 2009-12-12  Bruno Haible  <bruno@clisp.org>
100217         duplocale: Tweak.
100218         * lib/duplocale.c (rpl_duplocale): Mark categories array as 'const'.
100220 2009-12-12  Karl Berry  <karl@gnu.org>
100222         * config/srclist.txt (strtoll.c): tab changes, no more sync.
100224 2009-12-12  Bruno Haible  <bruno@clisp.org>
100226         * m4/po.m4: Undo incorrect untabification.
100228 2009-12-12  Bruno Haible  <bruno@clisp.org>
100230         c-strtod, c-strtold: Use multithread-safe implementation on MacOS X.
100231         * modules/c-strtod (Depends-on): Add locale.
100232         * modules/c-strtold (Depends-on): Likewise.
100234 2009-12-12  Bruno Haible  <bruno@clisp.org>
100236         * lib/localcharset.c (locale_charset): Add comment about use of GetACP.
100238 2009-12-11  Eric Blake  <ebb9@byu.net>
100240         setenv: relax requirement in light of POSIX ruling
100241         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Test handling of "" but
100242         not NULL.
100243         * tests/test-setenv.c (main): Relax test.
100244         * tests/test-unsetenv.c (main): Likewise.
100245         * doc/posix-functions/setenv.texi (setenv): Document this.
100246         * doc/posix-functions/unsetenv.texi (unsetenv): Likewise.
100248 2009-12-11  Bruno Haible  <bruno@clisp.org>
100250         New module 'fd-safer-flag'.
100251         * lib/dup-safer-flag.c: New file, extracted from lib/dup-safer.c.
100252         * lib/dup-safer.c (dup_safer_flag): Remove function.
100253         * lib/fd-safer-flag.c: New file, extracted from lib/fd-safer.c.
100254         * lib/fd-safer.c (fd_safer_flag): Remove function.
100255         * lib/unistd-safer.h (dup_safer_flag, fd_safer_flag): Update condition.
100256         * modules/cloexec (configure.ac): Drop indicator macro.
100257         * modules/fd-safer-flag: New file.
100258         * modules/pipe2-safer (Depends-on): Add fd-safer-flag. Remove cloexec.
100259         * modules/stdlib-safer (Depends-on): Add fd-safer-flag.
100260         * modules/unistd-safer-tests (Depends-on): Add fd-safer-flag.
100262 2009-12-11  Bruno Haible  <bruno@clisp.org>
100264         Tests for module 'nl_langinfo'.
100265         * modules/nl_langinfo-tests: New file.
100266         * tests/test-nl_langinfo.sh: New file.
100267         * tests/test-nl_langinfo.c: New file.
100269         New module 'nl_langinfo'.
100270         * lib/nl_langinfo.c: New file.
100271         * m4/nl_langinfo.m4: New file.
100272         * modules/nl_langinfo: New file.
100273         * doc/posix-functions/nl_langinfo.texi: Mention the new module.
100275 2009-12-11  Bruno Haible  <bruno@clisp.org>
100277         Tests for module 'langinfo'.
100278         * modules/langinfo-tests: New file.
100279         * tests/test-langinfo.c: New file.
100281         New module 'langinfo'.
100282         * lib/langinfo.in.h: New file.
100283         * m4/langinfo_h.m4: New file.
100284         * modules/langinfo: New file.
100285         * doc/posix-headers/langinfo.texi: Mention the new module.
100287 2009-12-11  Bruno Haible  <bruno@clisp.org>
100289         * lib/config.charset: Untabify.
100291 2009-12-11  Bruno Haible  <bruno@clisp.org>
100293         * modules/unistd-safer (configure.ac): Drop indicator macro.
100295 2009-12-11  Bruno Haible  <bruno@clisp.org>
100297         Move pipe2-safer code to its own file.
100298         * lib/pipe2-safer.c: New file, extracted from lib/pipe-safer.c.
100299         * lib/pipe-safer.c (pipe2_safer): Remove function.
100300         * modules/pipe2-safer (Files): Add lib/pipe2-safer.c.
100301         (Makefile.am): Add it to lib_SOURCES.
100303 2009-12-10  Bruno Haible  <bruno@clisp.org>
100305         * lib/recvfrom.c (rpl_recvfrom): Allow the from argument to be NULL.
100307 2009-12-10  Bruno Haible  <bruno@clisp.org>
100309         Declare which arguments expect non-NULL values, for GCC and clang.
100310         * build-aux/arg-nonnull.h: New file.
100311         * modules/arg-nonnull: New file.
100312         * lib/arpa_inet.in.h (_GL_ARG_NONNULL): New placeholder.
100313         (inet_ntop, inet_pton): Use it.
100314         * lib/dirent.in.h (_GL_ARG_NONNULL): New placeholder.
100315         (closedir, dirfd, opendir, scandir, alphasort): Use it.
100316         * lib/fcntl.in.h (_GL_ARG_NONNULL): New placeholder.
100317         (open, openat): Use it.
100318         * lib/fnmatch.in.h (_GL_ARG_NONNULL): New placeholder.
100319         (fnmatch): Use it.
100320         * lib/getopt.in.h (_GL_ARG_NONNULL): New placeholder.
100321         (getopt, getopt_long, getopt_long_only): Use it.
100322         * lib/glob.in.h (_GL_ARG_NONNULL): New placeholder.
100323         * lib/glob-libc.h (glob, globfree, glob64, globfree64, glob_pattern_p):
100324         Use it.
100325         * lib/iconv.in.h (_GL_ARG_NONNULL): New placeholder.
100326         (iconv_open): Use it.
100327         * lib/inttypes.in.h (_GL_ARG_NONNULL): New placeholder.
100328         (strtoimax, strtoumax): Use it.
100329         * lib/locale.in.h (_GL_ARG_NONNULL): New placeholder.
100330         (duplocale): Use it.
100331         * lib/math.in.h (_GL_ARG_NONNULL): New placeholder.
100332         (frexp, frexpl): Use it.
100333         * lib/netdb.in.h (_GL_ARG_NONNULL): New placeholder.
100334         (getaddrinfo, freeaddrinfo, getnameinfo): Use it.
100335         * lib/search.in.h (_GL_ARG_NONNULL): New placeholder.
100336         (tsearch, tfind, tdelete, twalk): Use it.
100337         * lib/signal.in.h (_GL_ARG_NONNULL): New placeholder.
100338         (sigismember, sigemptyset, sigaddset, sigdelset, sigfillset,
100339         sigpending): Use it.
100340         * lib/spawn.in.h (_GL_ARG_NONNULL): New placeholder.
100341         (posix_spawn, posix_spawnp, posix_spawnattr_init,
100342         posix_spawnattr_destroy, posix_spawnattr_getsigdefault,
100343         posix_spawnattr_setsigdefault, posix_spawnattr_getsigmask,
100344         posix_spawnattr_setsigmask, posix_spawnattr_getflags,
100345         posix_spawnattr_setflags, posix_spawnattr_getpgroup,
100346         posix_spawnattr_setpgroup, posix_spawnattr_getschedpolicy,
100347         posix_spawnattr_setschedpolicy, posix_spawnattr_getschedparam,
100348         posix_spawnattr_setschedparam, posix_spawn_file_actions_init,
100349         posix_spawn_file_actions_destroy, posix_spawn_file_actions_addopen,
100350         posix_spawn_file_actions_addclose, posix_spawn_file_actions_adddup2):
100351         Use it.
100352         * lib/stdio.in.h (_GL_ARG_NONNULL): New placeholder.
100353         (dprintf, fclose, fopen, fprintf, fpurge, fputc, fputs, freopen,
100354         rpl_fseek, fseeko, rpl_ftell, ftello, fwrite, getdelim, getline,
100355         obstack_printf, obstack_vprintf, popen, printf, putc, puts, remove,
100356         rename, renameat, snprintf, sprintf, asprintf, vasprintf, vdprintf,
100357         vfprintf, vprintf, vsnprintf, vsprintf): Use it.
100358         * lib/stdlib.in.h (_GL_ARG_NONNULL): New placeholder.
100359         (atoll, canonicalize_file_name, getloadavg, getsubopt, mkdtemp,
100360         mkostemp, mkostemps, mkstemp, mkstemps, putenv, srandom_r, initstate_r,
100361         setstate_r, random_r, realpath, rpmatch, setenv, strtod, strtoll,
100362         strtoull, unsetenv): Use it.
100363         * lib/string.in.h (_GL_ARG_NONNULL): New placeholder.
100364         (memchr, memmem, mempcpy, memrchr, rawmemchr, stpcpy, stpncpy,
100365         strchrnul, strdup, strndup, strnlen, strpbrk, strsep, strstr,
100366         strcasestr, strtok_r, mbslen, mbsnlen, mbschr, mbsrchr, mbsstr,
100367         mbscasecmp, mbsncasecmp, mbspcasecmp, mbscasestr, mbscspn, mbspbrk,
100368         mbsspn, mbssep, mbstok_r, strverscmp): Use it.
100369         * lib/strings.in.h (_GL_ARG_NONNULL): New placeholder.
100370         (strcasecmp, strncasecmp): Use it.
100371         * lib/sys_socket.in.h (_GL_ARG_NONNULL): New placeholder.
100372         (rpl_connect, rpl_bind, rpl_getpeername, rpl_getsockname,
100373         rpl_getsockopt, rpl_recv, rpl_send, rpl_recvfrom, rpl_sendto,
100374         rpl_setsockopt): Use it.
100375         * lib/sys_stat.in.h (_GL_ARG_NONNULL): New placeholder.
100376         (fchmodat, fstat, fstatat, lchmod, rpl_lstat, mkdir, mkdirat, mkfifo,
100377         mkfifoat, mknod, mknodat, stat, utimensat): Use it.
100378         * lib/sys_time.in.h (_GL_ARG_NONNULL): New placeholder.
100379         (gettimeofday): Use it.
100380         * lib/sys_times.in.h (_GL_ARG_NONNULL): New placeholder.
100381         (times): Use it.
100382         * lib/sys_utsname.in.h (_GL_ARG_NONNULL): New placeholder.
100383         (uname): Use it.
100384         * lib/time.in.h (_GL_ARG_NONNULL): New placeholder.
100385         (nanosleep, mktime, localtime_r, gmtime_r, strptime, timegm): Use it.
100386         * lib/unistd.in.h (_GL_ARG_NONNULL): New placeholder.
100387         (chown, euidaccess, faccessat, _gl_register_fd, fchownat,
100388         getdomainname, gethostname, getlogin_r, lchown, link, linkat, pipe2,
100389         pread, readlink, readlinkat, rmdir, symlink, symlinkat, unlink,
100390         unlinkat, write): Use it.
100391         * lib/wchar.in.h (_GL_ARG_NONNULL): New placeholder.
100392         (mbsrtowcs, mbsnrtowcs, wcsrtombs, wcsnrtombs): Use it.
100393         * lib/argv-iter.h: Include arg-nonnull.h.
100394         (_ATTRIBUTE_NONNULL_): Remove macro.
100395         (argv_iter_init_argv, argv_iter_init_stream, argv_iter,
100396         argv_iter_n_args, argv_iter_free): Use _GL_ARG_NONNULL.
100397         * lib/canonicalize-lgpl.c (_GL_ARG_NONNULL): Define, to defeat gcc
100398         optimization.
100399         * lib/getaddrinfo.c (_GL_ARG_NONNULL): Likewise.
100400         * lib/getdelim.c (_GL_ARG_NONNULL): Likewise.
100401         * lib/glob.c (_GL_ARG_NONNULL): Likewise.
100402         * lib/random_r.c (_GL_ARG_NONNULL): Likewise.
100403         * lib/setenv.c (_GL_ARG_NONNULL): Likewise.
100404         * lib/strtod.c (_GL_ARG_NONNULL): Likewise.
100405         * lib/tsearch.c (_GL_ARG_NONNULL): Likewise.
100406         * lib/unsetenv.c (_GL_ARG_NONNULL): Likewise.
100407         * modules/arpa_inet (Depends-on): Add arg-nonnull.
100408         (Makefile.am): Insert arg-nonnull.h into arpa/inet.h.
100409         * modules/dirent (Depends-on): Add arg-nonnull.
100410         (Makefile.am): Insert arg-nonnull.h into dirent.h.
100411         * modules/fcntl-h (Depends-on): Add arg-nonnull.
100412         (Makefile.am): Insert arg-nonnull.h into fcntl.h.
100413         * modules/fnmatch (Depends-on): Add arg-nonnull.
100414         (Makefile.am): Insert arg-nonnull.h into fnmatch.h.
100415         * modules/getopt-posix (Depends-on): Add arg-nonnull.
100416         (Makefile.am): Insert arg-nonnull.h into getopt.h.
100417         * modules/glob (Depends-on): Add arg-nonnull.
100418         (Makefile.am): Insert arg-nonnull.h into glob.h.
100419         * modules/iconv_open (Depends-on): Add arg-nonnull.
100420         (Makefile.am): Insert arg-nonnull.h into iconv.h.
100421         * modules/inttypes (Depends-on): Add arg-nonnull.
100422         (Makefile.am): Insert arg-nonnull.h into inttypes.h.
100423         * modules/locale (Depends-on): Add arg-nonnull.
100424         (Makefile.am): Insert arg-nonnull.h into locale.h.
100425         * modules/math (Depends-on): Add arg-nonnull.
100426         (Makefile.am): Insert arg-nonnull.h into math.h.
100427         * modules/netdb (Depends-on): Add arg-nonnull.
100428         (Makefile.am): Insert arg-nonnull.h into netdb.h.
100429         * modules/search (Depends-on): Add arg-nonnull.
100430         (Makefile.am): Insert arg-nonnull.h into search.h.
100431         * modules/signal (Depends-on): Add arg-nonnull.
100432         (Makefile.am): Insert arg-nonnull.h into signal.h.
100433         * modules/spawn (Depends-on): Add arg-nonnull.
100434         (Makefile.am): Insert arg-nonnull.h into spawn.h.
100435         * modules/stdio (Depends-on): Add arg-nonnull.
100436         (Makefile.am): Insert arg-nonnull.h into stdio.h.
100437         * modules/stdlib (Depends-on): Add arg-nonnull.
100438         (Makefile.am): Insert arg-nonnull.h into stdlib.h.
100439         * modules/string (Depends-on): Add arg-nonnull.
100440         (Makefile.am): Insert arg-nonnull.h into string.h.
100441         * modules/strings (Depends-on): Add arg-nonnull.
100442         (Makefile.am): Insert arg-nonnull.h into strings.h.
100443         * modules/sys_socket (Depends-on): Add arg-nonnull.
100444         (Makefile.am): Insert arg-nonnull.h into sys/socket.h.
100445         * modules/sys_stat (Depends-on): Add arg-nonnull.
100446         (Makefile.am): Insert arg-nonnull.h into sys/stat.h.
100447         * modules/sys_time (Depends-on): Add arg-nonnull.
100448         (Makefile.am): Insert arg-nonnull.h into sys/time.h.
100449         * modules/sys_times (Depends-on): Add arg-nonnull.
100450         (Makefile.am): Insert arg-nonnull.h into sys/times.h.
100451         * modules/sys_utsname (Depends-on): Add arg-nonnull.
100452         (Makefile.am): Insert arg-nonnull.h into sys/utsname.h.
100453         * modules/time (Depends-on): Add arg-nonnull.
100454         (Makefile.am): Insert arg-nonnull.h into time.h.
100455         * modules/unistd (Depends-on): Add arg-nonnull.
100456         (Makefile.am): Insert arg-nonnull.h into unistd.h.
100457         * modules/wchar (Depends-on): Add arg-nonnull.
100458         (Makefile.am): Insert arg-nonnull.h into wchar.h.
100459         * modules/argv-iter (Depends-on): Add arg-nonnull.
100460         * tests/test-canonicalize.c (null_ptr): New function.
100461         (main): Use it.
100462         * tests/test-canonicalize-lgpl.c (null_ptr): New function.
100463         (main): Use it.
100464         * tests/test-memmem.c (null_ptr): New function.
100465         (main): Use it.
100466         Reported by Jim Meyering.
100468 2009-12-10  Bruno Haible  <bruno@clisp.org>
100470         Use spaces for indentation, not tabs.
100471         * lib/**/*.[hcy] except lib/reg*.[hc]: Untabify.
100472         * m4/*.m4: Untabify.
100473         * build-aux/*.h: Untabify.
100474         * tests/**/*.[hc]: Untabify.
100475         * README: New section "Indent with spaces, not TABs", based on
100476         coreutils/HACKING and comments by Pádraig Brady and Paolo Bonzini.
100477         * NEWS: Mention the change.
100479 2009-12-10  Bruno Haible  <bruno@clisp.org>
100481         pty test: Fix link error.
100482         * modules/pty-tests (Makefile.am): Add the default LDADD value to
100483         test_pty_LDADD.
100485 2009-12-07  Simon Josefsson  <simon@josefsson.org>
100487         * modules/pty: New file.
100488         * modules/pty-tests: New file.
100489         * m4/pty.m4: New file.
100490         * tests/test-pty.c: New file.
100491         * doc/glibc-headers/pty.texi: Modified.
100492         * doc/glibc-functions/forkpty.texi: Modified.
100493         * doc/glibc-functions/openpty.texi: Modified.
100495 2009-12-10  Bruno Haible  <bruno@clisp.org>
100497         Avoid syntax error in C++ mode.
100498         * lib/stdio.in.h (rename): Don't use parameter name 'new'.
100500 2009-12-10  Bruno Haible  <bruno@clisp.org>
100502         Use sed with option -e.
100503         * gnulib-tool (func_version, func_emit_copyright_notice,
100504         func_emit_initmacro_end, func_import, func_create_testdir): Pass
100505         option -e to sed.
100506         * modules/link-warning (Makefile.am): Likewise.
100508 2009-12-10  Jim Meyering  <meyering@redhat.com>
100510         mgetgroups: do not write bytes beyond end of malloc'd buffer
100511         * lib/mgetgroups.c: Fix an off-by-one error.  When we have no
100512         username, we call getgroups with a one-element-shorter buffer,
100513         but still told it the length was original, max_n_groups.
100515 2009-12-09  Eric Blake  <ebb9@byu.net>
100517         cloexec: relax license
100518         * modules/cloexec (Maintainer): Add myself.
100519         (License): Use LGPL, not GPL.
100521         link-warning: optimize generation
100522         * modules/link-warning (Makefile.am): Reduce process usage.
100524 2009-12-09  Bruno Haible  <bruno@clisp.org>
100526         * doc/posix-functions/unsetenv.texi: Mention Solaris 10 bug for which a
100527         workaround was added on 2009-11-17.
100529 2009-12-09  Jim Meyering  <meyering@redhat.com>
100530             Bruno Haible  <bruno@clisp.org>
100532         link-warning: Allow extra lines at the top of build-aux/link-warning.h.
100533         * modules/link-warning (Makefile.am): Make the comment-removing sed
100534         command more robust in the face of bootstrap-prepended comment lines.
100536 2009-12-09  Bruno Haible  <bruno@clisp.org>
100538         * lib/mgetgroups.c (mgetgroups): Don't remove duplicates if there is at
100539         most one group.
100541 2009-12-09  Simon Josefsson  <simon@josefsson.org>
100542             Bruno Haible  <bruno@clisp.org>
100544         * build-aux/link-warning.h: Add copyright notice.
100545         * modules/link-warning (Makefile.am): Generate link-warning.h from
100546         build-aux/link-warning.h. Update LINK_WARNING_H accordingly.
100547         * NEWS: Mention change in link-warning module.
100548         * modules/arpa_inet (Makefile.am): Add dependency to arpa/inet.h.
100549         * modules/dirent (Makefile.am): Add dependency to dirent.h.
100550         * modules/fcntl-h (Makefile.am): Add dependency to fcntl.h.
100551         * modules/getopt-posix (Makefile.am): Add dependency to getopt.h.
100552         * modules/inttypes (Makefile.am): Add dependency to inttypes.h.
100553         * modules/math (Makefile.am): Add dependency to math.h.
100554         * modules/search (Makefile.am): Add dependency to search.h.
100555         * modules/signal (Makefile.am): Add dependency to signal.h.
100556         * modules/spawn (Makefile.am): Add dependency to spawn.h.
100557         * modules/stdio (Makefile.am): Add dependency to stdio.h.
100558         * modules/stdlib (Makefile.am): Add dependency to stdlib.h.
100559         * modules/string (Makefile.am): Add dependency to string.h.
100560         * modules/strings (Makefile.am): Add dependency to strings.h.
100561         * modules/sys_ioctl (Makefile.am): Add dependency to sys/ioctl.h.
100562         * modules/sys_select (Makefile.am): Add dependency to sys/select.h.
100563         * modules/sys_socket (Makefile.am): Add dependency to sys/socket.h.
100564         * modules/sys_stat (Makefile.am): Add dependency to sys/stat.h.
100565         * modules/sys_times (Makefile.am): Add dependency to sys/times.h.
100566         * modules/sys_utsname (Makefile.am): Add dependency to sys/utsname.h.
100567         * modules/sys_wait (Makefile.am): Add dependency to sys/wait.h.
100568         * modules/unistd (Makefile.am): Add dependency to unistd.h.
100569         * modules/wchar (Makefile.am): Add dependency to wchar.h.
100571 2009-12-09  Bruno Haible  <bruno@clisp.org>
100573         fchdir: Optimize away rpl_fstat when possible.
100574         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Set REPLACE_FSTAT only together with
100575         REPLACE_OPEN_DIRECTORY.
100576         * lib/fchdir.c (rpl_fstat): Define only when REPLACE_OPEN_DIRECTORY.
100578 2009-12-09  Bruno Haible  <bruno@clisp.org>
100580         * lib/fchdir.c: Update comment.
100582 2009-12-09  Bruno Haible  <bruno@clisp.org>
100584         * lib/cloexec.c (set_cloexec_flag): Clarify intent of dup2 call.
100586 2009-12-08  Eric Blake  <ebb9@byu.net>
100588         fchdir: avoid memory leak on re-registration.
100589         * lib/fchdir.c (ensure_dirs_slot): Avoid memory leak.
100591 2009-12-08  Jim Meyering  <meyering@redhat.com>
100593         init.sh: avoid Solaris 10 /bin/sh portability problem
100594         Solaris 10's /bin/sh does not pass '.' arguments 2.. to the
100595         sourced script:
100596           $ printf 'echo "$@"\n' > f; /bin/sh -c '. ./f bar'
100597           $ printf 'echo "$@"\n' > f; /bin/bash -c '. ./f bar'
100598           bar
100599         tests/init.sh relied on that, accepting a --set-path=DIR argument,
100600         and two tests used that idiom.
100601         * tests/init.sh: Update suggested usage comments.
100602         (path_prepend_): New function, to be used in place
100603         of the --src-path=DIR option.
100604         (setup_): Move PATH-prepending code into path_prepend_.
100605         * tests/test-pread.sh: Adapt to new usage.
100606         * tests/test-xalloc-die.sh: Likewise.
100608 2009-12-08  Simon Josefsson  <simon@josefsson.org>
100610         * doc/gnulib.texi (Glibc pty.h): Add.
100611         * doc/glibc-functions/forkpty.texi: Add.
100612         * doc/glibc-functions/openpty.texi: Add.
100613         Suggested by Bruno Haible.
100615 2009-12-08  Eric Blake  <ebb9@byu.net>
100617         fchdir: fix logic bugs
100618         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Fix logic bug.
100619         * tests/test-fchdir.c (main): Enhance test.
100620         * lib/fchdir.c (rpl_fstat): Always provide if fchdir replacement
100621         is in use.
100623         dup2: fix logic bugs
100624         * lib/dup2.c (dup2): Fix logic bugs.  Use HAVE_DUP2 rather than
100625         REPLACE_DUP2 to decide when rpl_dup2 is needed.
100626         * m4/dup2.m4 (gl_REPLACE_DUP2): Only define REPLACE_DUP2 when dup2
100627         exists.
100628         (gl_FUNC_DUP2): Drop unneeded AC_DEFINE.
100630 2009-12-07  Eric Blake  <ebb9@byu.net>
100632         unlink: fix m4 detection
100633         * m4/unlink.m4 (gl_FUNC_UNLINK): Include correct header.
100635         unistd-safer: add unit test
100636         * modules/unistd-safer-tests: New file.
100637         * tests/test-dup-safer.c: Likewise.
100638         * tests/test-cloexec.c (setmode): Avoid compiler warning.
100639         * tests/test-dup2.c (setmode): Likewise.
100640         * lib/cloexec.c (dup_cloexec): Fix mingw compile error.
100642         cloexec: preserve text vs. binary across dup_cloexec
100643         * lib/cloexec.c (dup_cloexec) [W32]: Query and use translation
100644         mode.
100645         * modules/dup2-tests (Depends-on): Add binary-io.
100646         * modules/cloexec-tests (Depends-on): Likewise.
100647         * tests/test-dup2.c (setmode, is_mode): New helpers.
100648         (main): Add tests that translation mode is preserved.
100649         * tests/test-cloexec.c (setmode, is_mode, main): Likewise.
100650         Reported by Bruno Haible.
100652         mgetgroups: reduce duplicate listings
100653         * lib/mgetgroups.c (mgetgroups): Reduce duplicates from the
100654         resulting array.
100655         * tests/test-chown.h (test_chown): Simplify client.
100656         * tests/test-lchown.h (test_lchown): Likewise.
100658 2009-12-06  Bruno Haible  <bruno@clisp.org>
100660         * lib/cloexec.c (dup_cloexec): Fix handling of _gl_register_dup return
100661         value.
100663 2009-12-06  Bruno Haible  <bruno@clisp.org>
100665         * lib/progname.c: Include stdio.h, stdlib.h.
100666         (set_program_name): Reject a NULL argument.
100668 2009-12-05  Eric Blake  <ebb9@byu.net>
100670         pipe2-safer: new module
100671         * modules/pipe2-safer: New file.
100672         * lib/unistd-safer.h (pipe2_safer): New prototype.
100673         * lib/unistd--.h (pipe2): New wrapper.
100674         * lib/pipe-safer.c (pipe2_safer): New function.
100675         * modules/pipe (Depends-on): Add pipe2-safer.
100676         * lib/pipe.c (create_pipe) [WIN32]: Let pipe2_safer do the work.
100678         stdlib-safer: preserve cloexec flag for mkostemp[s]
100679         * lib/mkstemp-safer.c (mkostemp_safer, mkostemps_safer): Use new
100680         fd_safer_flag.
100682         unistd-safer: allow preservation of cloexec status via flag
100683         * lib/unistd-safer.h (dup_safer_flag, fd_safer_flag): New
100684         prototypes.
100685         * lib/dup-safer.c (dup_safer_flag): New function.
100686         * lib/fd-safer.c (fd_safer_flag): Likewise.
100687         * modules/cloexec (configure.ac): Set witness.
100689         test-dup2: enhance test
100690         * modules/dup2-tests (Depends-on): Add cloexec.
100691         * tests/test-dup2.c (main): Enhance test.
100693         cloexec: add dup_cloexec
100694         * lib/cloexec.h (dup_cloexec): New prototype.  Add copyright
100695         header and comments.
100696         * lib/cloexec.c (set_cloexec_flag): Add comments.
100697         (dup_cloexec): New function, with mingw implementation borrowed
100698         from...
100699         * lib/w32spawn.h (dup_noinherit): ...here.
100700         * modules/execute (Depends-on): Add cloexec.
100701         * modules/pipe (Depends-on): Likewise.
100702         * modules/cloexec (Depends-on): Add dup2.
100703         * modules/cloexec-tests (Files): New file.
100704         * tests/test-cloexec.c: Likewise.
100706         test-xalloc-die: fix test for mingw
100707         * modules/xalloc-die-tests (Files): Add tests/init.sh.
100708         * tests/test-xalloc-die.sh: Rewrite to use init.sh.  Strip
100709         directory and .exe suffix off argv[0] output.
100711         test-fseeko: fix test for mingw
100712         * tests/test-fseeko.c (fseek): Redefine GL_LINK_WARNING, rather
100713         than undefining fseek, so test will pass on mingw.
100715 2009-12-05  Bruno Haible  <bruno@clisp.org>
100717         * lib/progname.h (set_program_name): Clarify specification.
100718         * lib/progname.c (set_program_name): Likewise.
100719         Reported by Jim Meyering.
100721 2009-12-05  Jim Meyering  <meyering@redhat.com>
100723         maint.mk: backslash-escape parens in default regexp
100724         * top/maint.mk (news-check-regexp): Now that we're using grep -E,
100725         backslash-escape the literal parentheses.
100727         maint.mk: news-date-check: use grep -E
100728         * top/maint.mk (today): Define a Make variable, not a...
100729         (news-date-check): ...shell variable.
100730         (news-date-regexp): Use the Make variable.
100731         Use grep's -E option.  Change the failing diagnostic to mention
100732         the variable, $(news-date-regexp).
100734 2009-12-04  Alfred M. Szmidt  <ams@gnu.org>
100736         maintainer-makefile: allow customization of NEWS entry format
100737         * top/maint.mk (news-date-regexp): New overridable variable.
100738         (news-date-check): Use it.
100740 2009-12-04  Eric Blake  <ebb9@byu.net>
100742         mgetgroups: add xgetgroups, and avoid ENOSYS failures
100743         * lib/mgetgroups.h (xgetgroups): New prototype.
100744         * lib/mgetgroups.c (xgetgroups): New wrapper.
100745         (mgetgroups): Handle ENOSYS.
100746         * modules/mgetgroups (Depends-on): Add realloc.
100747         Reported by Scott Harrison <scott.gnu.2009@scottrix.co.uk>.
100749         mgetgroups: avoid argument promotion issues with -1
100750         * lib/mgetgroups.c (mgetgroups): A cast is required when checking
100751         for invalid gid_t.
100752         * tests/test-chown.h (getegid, test_chown): Likewise.
100753         * tests/test-lchown.h (getegid, test_lchown): Likewise.
100755 2009-12-03  Paolo Bonzini  <bonzini@gnu.org>
100757         exclude: Fix header file problems.
100758         * lib/exclude.h: Add multiple inclusion guards and include stdbool.h.
100760 2009-12-01  Jim Meyering  <meyering@redhat.com>
100762         fts: fts_open: do not let an empty string cause immediate failure
100763         This is required in support of GNU rm, for which the command
100764         "rm A '' B" must process and remove both A and B, in spite of
100765         the empty string argument.
100766         * lib/fts.c (fts_open): Do not let the presence of an empty string
100767         cause fts_open to fail immediately.  Most fts-using tools must be
100768         able to process all arguments, in order, and can be expected to
100769         diagnose such arguments themselves.
100771 2009-11-30  Eric Blake  <ebb9@byu.net>
100773         utimens: fix compilation error
100774         * lib/utimens.c (lutimens) [!HAVE_UTIMENSAT && HAVE_LUTIMES]:
100775         Declare variable at right scope.
100777 2009-11-29  Jim Meyering  <meyering@redhat.com>
100779         bootstrap: handle perl-5.11's changed --version output
100780         * build-aux/bootstrap (get_version): Handle perl separately,
100781         since perl-5.11's --version output is different.
100783 2009-11-28  Jim Meyering  <meyering@redhat.com>
100785         userspec: depend on the inttostr module, too
100786         * modules/userspec (Depends-on): Add inttostr.
100788         userspec: disallow an ID that maps to (uid_t)-1 or (gid_t)-1
100789         * lib/userspec.c (parse_with_separator): Do not accept a user ID
100790         number of MAXUID when it evaluates to (uid_t) -1.
100791         Likewise for group ID.  Reported by Matt McCutchen in
100792         <http://savannah.gnu.org/bugs/?28113>
100794         userspec: reformat to use spaces, not TABs
100795         * lib/userspec.c: Expand TABs to spaces.
100796         Add Emacs' "indent-tabs-mode: nil" hint.
100798 2009-11-27  Eric Blake  <ebb9@byu.net>
100800         getopt-gnu: flush out another BSD bug
100801         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Test for the bug.
100802         * tests/test-getopt.c (main): Check POSIXLY_CORRECT first, to
100803         flush out BSD bug.
100804         * tests/test-getopt.h (test_getopt): End lists with NULL.
100805         * tests/test-getopt_long.h (test_getopt_long): Likewise.
100806         (test_getopt_long_posix): Enhance test.
100807         * modules/getopt-posix-tests (Depends-on): Add stdbool.
100808         * doc/glibc-functions/getopt_long.texi (getopt_long): Mention
100809         getopt-gnu.
100810         * doc/glibc-functions/getopt_long_only.texi (getopt_long_only):
100811         Likewise.
100813 2009-11-27  Simon Josefsson  <simon@josefsson.org>
100815         * modules/idpriv-droptemp-tests (Notice): Fix text.
100817 2009-11-27  Jim Meyering  <meyering@redhat.com>
100819         test-xalloc-die: avoid spurious failure due to libtool argv difference
100820         In a libtool-enabled project, this test would fail due to a difference
100821         in the emitted program name, e.g.,
100822         -test-xalloc-die: memory exhausted
100823         +/tmp/.../tests/.libs/lt-test-xalloc-die: memory exhausted
100824         Use program to avoid that.
100825         * modules/xalloc-die-tests (Depends-on): Add progname.
100826         * tests/test-xalloc-die.c: Include progname.h".
100827         (program_name): Remove decl.
100828         (main): Call set_program_name.
100829         * tests/test-xalloc-die.sh (compare): Remove unnecessary ${EXE}.
100831 2009-11-26  Richard Jones  <rjones@redhat.com>
100833         w32sock: leave win32 error in place.
100834         * lib/w32sock.h (set_winsock_errno): Do not call WSASetLastError.
100836 2009-11-26  Eric Blake  <ebb9@byu.net>
100838         init.sh: suggest to use skip_ and fail_ functions in comments
100839         * tests/init.sh: Add a sentence.
100841 2009-11-25  Bruno Haible  <bruno@clisp.org>
100843         init.sh: add documentation in comments
100844         * tests/init.sh: Add some developer and user documentation.
100846 2009-11-26  Jim Meyering  <meyering@redhat.com>
100848         init.sh: accommodate even those who specify bogus srcdir manually
100849         * tests/init.sh: Normally, srcdir is guaranteed by automake and
100850         configure-time tests to be sanitized, so that there is no need to
100851         use "$srcdir" in Makefile rules and shell scripts.  Using $srcdir
100852         (with no double quotes) suffices.  However, since tests may be
100853         invoked manually, and since you may explicitly set srcdir to the
100854         name of a directory containing spaces, do quote its uses here.
100855         * tests/test-pread.sh: Likewise.
100856         Suggested by Bruno Haible.
100858         test-pread.sh: avoid diagnostics for those who ignore SIGPIPE
100859         * tests/test-pread.sh: Write no data into the pipe, because
100860         test-pread actually reads none.  This avoids a diagnostic,
100861         "bash: echo: write error: Broken pipe", that arises in the unusual
100862         event something is ignoring SIGPIPE, and might be interpreted
100863         as some sort of failure.  Reported by Bruno Haible.
100865 2009-11-25  Jim Meyering  <meyering@redhat.com>
100867         test-pread: cover failure with ESPIPE and EINVAL
100868         * tests/test-pread.c (main): Test for failure, too.
100869         * tests/test-pread.sh: Invoke with stdin on a pipe.
100870         Suggested by Eric Blake.
100872         pread: improvement and fix
100873         * modules/pread (Depends-on): Depend on lseek, for portability to
100874         e.g., mingw.  Suggested by Eric Blake.
100875         * lib/pread.c (__libc_read): Define.  Reported by Richard W.M. Jones.
100877         unistd.in.h: correct declaration of pread
100878         * lib/unistd.in.h: Correct type of "buf" parameter: void*, not char*
100879         Reported by Richard W.M. Jones.
100881         test-pread.sh: distribute the test script
100882         * modules/pread-tests (Files): Include test-pread.sh.
100884         test-pread.sh: clean up
100885         * tests/test-pread.sh: Don't refer to $builddir. Just use equivalent ".".
100886         * modules/pread-tests (TESTS_ENVIRONMENT): Don't export builddir.
100887         That is unnecessary, since it's always ".".
100888         Suggestion from Eric Blake.
100890         test-pread.sh: make executable
100891         * tests/test-pread.sh: Set executable bit.
100892         Reported by Eric Blake.
100894         correct typo in test-pread.sh
100895         * tests/test-pread.sh: Add #! line.
100897         test pread
100898         * tests/test-pread.c: New file.
100899         * tests/test-pread.sh: Likewise.
100900         * modules/pread-tests: Likewise.
100902         pread: new module
100903         * modules/pread: New file.
100904         * lib/unistd.in.h (pread): Define/declare.
100905         * lib/pread.c (pread): New file.
100906         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Define defaults.
100907         * modules/unistd (Makefile.am): Substitute witnesses.
100908         * doc/posix-functions/pread.texi (pread): Update.
100909         * MODULES.html.sh: Add pread.
100911 2009-11-25  Jim Meyering  <meyering@redhat.com>
100913         tests/init.sh: new file to be used via most *.sh tests
100914         * tests/init.sh: New file.
100916 2009-11-25  Eric Blake  <ebb9@byu.net>
100918         utimens: work around older Linux failure with symlinks
100919         * lib/utimens.c (lutimensat_works_really): New variable.
100920         (fdutimens, lutimens): Use it to manage kernels that support
100921         nanosecond times on files, but not on symlinks.
100922         Reported by Ondřej Vašík.
100924         utimes: fix configure grammar
100925         * m4/utimes.m4 (gl_FUNC_UTIMES): Delete spurious word.
100927 2009-11-25  Paolo Bonzini  <bonzini@gnu.org>
100929         regex: Fix fastmap for multibyte character ranges.
100930         * lib/regcomp.c (re_compute_fastmap_iter): Add all multibyte lead
100931         characters when a multibyte character range is included.
100933 2009-11-22  Andy Wingo  <wingo@pobox.com>
100935         version-etc: work also with AM_INIT_AUTOMAKE's no-define option
100936         * lib/version-etc.c [!defined PACKAGE]: Define to PACKAGE_TARNAME.
100938 2009-11-24  Bruno Haible  <bruno@clisp.org>
100940         doc: Most *_l functions exist in MacOS X 10.5.
100941         * doc/posix-functions/duplocale.texi: Update platforms list.
100942         * doc/posix-functions/freelocale.texi: Likewise.
100943         * doc/posix-functions/newlocale.texi: Likewise.
100944         * doc/posix-functions/uselocale.texi: Likewise.
100945         * doc/posix-functions/isalnum_l.texi: Likewise.
100946         * doc/posix-functions/isalpha_l.texi: Likewise.
100947         * doc/posix-functions/isblank_l.texi: Likewise.
100948         * doc/posix-functions/iscntrl_l.texi: Likewise.
100949         * doc/posix-functions/isdigit_l.texi: Likewise.
100950         * doc/posix-functions/isgraph_l.texi: Likewise.
100951         * doc/posix-functions/islower_l.texi: Likewise.
100952         * doc/posix-functions/isprint_l.texi: Likewise.
100953         * doc/posix-functions/ispunct_l.texi: Likewise.
100954         * doc/posix-functions/isspace_l.texi: Likewise.
100955         * doc/posix-functions/isupper_l.texi: Likewise.
100956         * doc/posix-functions/iswalnum_l.texi: Likewise.
100957         * doc/posix-functions/iswalpha_l.texi: Likewise.
100958         * doc/posix-functions/iswblank_l.texi: Likewise.
100959         * doc/posix-functions/iswcntrl_l.texi: Likewise.
100960         * doc/posix-functions/iswctype_l.texi: Likewise.
100961         * doc/posix-functions/iswdigit_l.texi: Likewise.
100962         * doc/posix-functions/iswgraph_l.texi: Likewise.
100963         * doc/posix-functions/iswlower_l.texi: Likewise.
100964         * doc/posix-functions/iswprint_l.texi: Likewise.
100965         * doc/posix-functions/iswpunct_l.texi: Likewise.
100966         * doc/posix-functions/iswspace_l.texi: Likewise.
100967         * doc/posix-functions/iswupper_l.texi: Likewise.
100968         * doc/posix-functions/iswxdigit_l.texi: Likewise.
100969         * doc/posix-functions/isxdigit_l.texi: Likewise.
100970         * doc/posix-functions/nl_langinfo_l.texi: Likewise.
100971         * doc/posix-functions/strcasecmp_l.texi: Likewise.
100972         * doc/posix-functions/strcoll_l.texi: Likewise.
100973         * doc/posix-functions/strfmon_l.texi: Likewise.
100974         * doc/posix-functions/strftime_l.texi: Likewise.
100975         * doc/posix-functions/strncasecmp_l.texi: Likewise.
100976         * doc/posix-functions/strxfrm_l.texi: Likewise.
100977         * doc/posix-functions/tolower_l.texi: Likewise.
100978         * doc/posix-functions/toupper_l.texi: Likewise.
100979         * doc/posix-functions/towctrans_l.texi: Likewise.
100980         * doc/posix-functions/towlower_l.texi: Likewise.
100981         * doc/posix-functions/towupper_l.texi: Likewise.
100982         * doc/posix-functions/wcscoll_l.texi: Likewise.
100983         * doc/posix-functions/wcsxfrm_l.texi: Likewise.
100984         * doc/posix-functions/wctrans_l.texi: Likewise.
100985         * doc/posix-functions/wctype_l.texi: Likewise.
100986         * doc/glibc-functions/strptime_l.texi: Likewise.
100987         * doc/glibc-functions/strtod_l.texi: Likewise.
100988         * doc/glibc-functions/strtof_l.texi: Likewise.
100989         * doc/glibc-functions/strtol_l.texi: Likewise.
100990         * doc/glibc-functions/strtold_l.texi: Likewise.
100991         * doc/glibc-functions/strtoll_l.texi: Likewise.
100992         * doc/glibc-functions/strtoul_l.texi: Likewise.
100993         * doc/glibc-functions/strtoull_l.texi: Likewise.
100994         * doc/glibc-functions/wcsftime_l.texi: Likewise.
100995         * doc/glibc-functions/wcstod_l.texi: Likewise.
100996         * doc/glibc-functions/wcstof_l.texi: Likewise.
100997         * doc/glibc-functions/wcstol_l.texi: Likewise.
100998         * doc/glibc-functions/wcstold_l.texi: Likewise.
100999         * doc/glibc-functions/wcstoll_l.texi: Likewise.
101000         * doc/glibc-functions/wcstoul_l.texi: Likewise.
101001         * doc/glibc-functions/wcstoull_l.texi: Likewise.
101003 2009-11-24  Bruno Haible  <bruno@clisp.org>
101005         duplocale: Fix logic bug.
101006         * lib/duplocale.c: Don't include <langinfo.h>.
101007         (_NL_LOCALE_NAME): Remove macro.
101008         (rpl_duplocale): Use setlocale instead of nl_langinfo.
101009         * tests/test-duplocale.c (main): Also test duplocale after uselocale.
101011 2009-11-23  Jim Meyering  <meyering@redhat.com>
101013         test-update-copyright: don't hard-code /usr/bin/perl
101014         * tests/test-update-copyright.sh (YEAR): Use date +%Y, rather than
101015         perl to print the current year.  Gilles Espinasse reported that
101016         the replaced use of perl was hard-coded as /usr/bin/perl.
101018 2009-11-23  Bruno Haible  <bruno@clisp.org>
101020         duplocale: Add support for glibc 2.3.x.
101021         * lib/duplocale.c (rpl_duplocale): Add fallback code for glibc 2.3.x.
101023 2009-11-22  Bruno Haible  <bruno@clisp.org>
101025         vasnprintf: Tiny optimization.
101026         * lib/vasnprintf.c (decimal_point_char): Choose the fast path also on
101027         MacOS X.
101029 2009-11-22  Bruno Haible  <bruno@clisp.org>
101031         Tests for module 'duplocale'.
101032         * modules/duplocale-tests: New file.
101033         * tests/test-duplocale.c: New file.
101035         New module 'duplocale'.
101036         * m4/duplocale.m4: New file.
101037         * lib/locale.in.h (duplocale): New declaration.
101038         * lib/duplocale.c: New file.
101039         * m4/locale_h.m4 (gl_REPLACE_LOCALE_H, gl_LOCALE_MODULE_INDICATOR,
101040         gl_LOCALE_H_DEFAULTS): New macros.
101041         (gl_LOCALE_H): Require gl_LOCALE_H_DEFAULTS. Invoke
101042         gl_CHECK_NEXT_HEADERS unconditionally. Invoke gl_REPLACE_LOCALE_H.
101043         * modules/locale (Makefile.am): Substitute also GNULIB_DUPLOCALE,
101044         REPLACE_DUPLOCALE.
101045         * modules/duplocale: New file.
101046         * doc/posix-functions/duplocale.texi: Mention the glibc bug.
101048 2009-11-22  Bruno Haible  <bruno@clisp.org>
101050         * modules/locale-tests (configure.ac): Test for newlocale function.
101051         * tests/test-locale.c: When the system has extended locale functions,
101052         verify that <locale.h> defines locale_t and LC_GLOBAL_LOCALE.
101054         locale: Make locale_t available when possible.
101055         * lib/locale.in.h: Include <xlocale.h> when it exists.
101056         * m4/locale_h.m4 (gl_LOCALE_H): Check for <xlocale.h> and arrange to
101057         replace <locale.h> if it does not define locale_t but <xlocale.h> does.
101058         * modules/locale (Depends-on): Add extensions.
101059         (Makefile.am): Also substitute HAVE_XLOCALE_H.
101060         * doc/posix-headers/locale.texi: Document the problem with locale_t.
101062 2009-11-22  Bruno Haible  <bruno@clisp.org>
101064         Add comments.
101065         * m4/dirent_h.m4 (gl_DIRENT_H): Add comment about gl_CHECK_NEXT_HEADERS
101066         invocation.
101067         * m4/iconv_h.m4 (gl_ICONV_H): Likewise.
101068         * m4/spawn_h.m4 (gl_SPAWN_H): Likewise.
101069         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
101071 2009-11-22  Bruno Haible  <bruno@clisp.org>
101073         error: account for the possibility of freopen (stdout).
101074         * lib/error.c: Include <unistd.h>.
101075         (flush_stdout): New function, extracted from error and error_at_line.
101076         Determine stdout's fd dynamically.
101077         (error, error_at_line): Invoke flush_stdout.
101078         * m4/error.m4 (gl_PREREQ_ERROR): Require AC_C_INLINE.
101079         * modules/error (Depends-on): Add unistd.
101081 2009-11-22  Bruno Haible  <bruno@clisp.org>
101083         diffseq: Add comment.
101084         * lib/diffseq.h (IF_LINT): Add comment about pitfall.
101086 2009-11-22  Jim Meyering  <meyering@redhat.com>
101088         c-stack: avoid defining an unused static function
101089         * lib/c-stack.c (find_stack_direction): Do not define this function
101090         when it will not be used.
101092         diffseq: avoid spurious gcc warnings
101093         * lib/diffseq.h (IF_LINT2): Define.
101094         (compareseq): Use it to initialize two members of "part".
101095         This avoids two used-uninitialized warnings.
101097 2009-11-21  Jim Meyering  <meyering@redhat.com>
101099         c-stack: avoid "ignoring return value of `write'" warning
101100         * lib/c-stack.c: Include "ignore-value.h".
101101         (die): Explicitly ignore each write return value.
101102         * modules/c-stack (Depends-on): Add ignore-value.
101104 2009-11-21  Bruno Haible  <bruno@clisp.org>
101106         diffseq: reduce scope of variable 'best'.
101107         * lib/diffseq.h (diag) [USE_HEURISTIC]: Reduce scope of 'best'
101108         variable, earlier used for two different purposes.
101110 2009-11-21  Jim Meyering  <meyering@redhat.com>
101112         diffseq: remove useless assignment to "best"
101113         * lib/diffseq.h (diag) [USE_HEURISTIC]: Remove useless "best = 0"
101114         assignment.  At that point "best" is already guaranteed to be zero.
101116 2009-11-20  Eric Blake  <ebb9@byu.net>
101118         build: mention ftp redirector in release announcements
101119         * top/maint.mk (gnu_rel_host, url_dir_list): Provide defaults for
101120         values that used to come from cfg.mk; mention FTP redirect URL.
101121         * build-aux/announce-gen: Mention the mirror list.
101122         Suggested by Karl Berry.
101124         nanosleep: improve port to mingw
101125         * lib/nanosleep.c (rpl_nanosleep): Reject invalid arguments.
101126         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Incorporate LIBSOCKET into
101127         LIB_NANOSLEEP, but only when needed.
101128         * modules/select (Link): Document LIBSOCKET.
101129         * m4/select.m4 (gl_FUNC_SELECT): Ensure LIBSOCKET is defined early
101130         enough.
101132         nanosleep: work around cygwin bug
101133         * lib/nanosleep.c (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]:
101134         Fix logic bug when nanosleep fails.  Work around cygwin 1.5.x
101135         bug.
101136         (getnow): Delete, not needed.
101137         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): No longer require
101138         LIB_CLOCK_GETTIME.
101139         * modules/nanosleep (Depends-on): Add intprops and verify.  Drop
101140         clock-time, gettime.
101141         * doc/posix-functions/nanosleep.texi (nanosleep): Document the
101142         bug.
101143         * modules/nanosleep-tests: New test.
101144         * tests/test-nanosleep.c: New file.
101146         sleep: work around cygwin bug
101147         * lib/sleep.c (rpl_sleep): Work around the bug.
101148         * m4/sleep.m4 (gl_FUNC_SLEEP): Detect the bug.
101149         (gl_PREREQ_SLEEP): Delete unused macro.
101150         * modules/sleep (Depends-on): Add verify.
101151         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add default.
101152         * modules/unistd (Makefile.am): Substitute witness.
101153         * lib/unistd.in.h (sleep): Update prototype.
101154         * doc/posix-functions/sleep.texi (sleep): Document the bug.
101155         * tests/test-sleep.c (main) [HAVE_DECL_ALARM]: Test it.
101156         * modules/sleep-tests (Depends-on): Check for alarm.
101158 2009-11-20  Jim Meyering  <meyering@redhat.com>
101160         maint.mk: improve sc_prohibit_magic_number_exit
101161         * top/maint.mk (sc_prohibit_magic_number_exit): Tighten regexp
101162         so it does not match uses like System.exit(1).
101163         Add comments showing how to correct all offenders.
101165 2009-11-19  Eric Blake  <ebb9@byu.net>
101167         xalloc-die-tests: add missing library
101168         * modules/xalloc-die-tests (Makefile.am): Add LDADD line.
101170         test-xvasprintf: silence compiler warnings
101171         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Mask
101172         empty string from gcc.
101174 2009-11-19  Jim Meyering  <meyering@redhat.com>
101176         xfreopen: new module, from coreutils
101177         * modules/xfreopen: New module.
101178         * lib/xfreopen.c: New file.
101179         * lib/xfreopen.h: New file.
101180         * MODULES.html.sh (File stream based Input/Output"): Add it.
101182 2009-11-19  Eric Blake  <ebb9@byu.net>
101184         manywarnings: depend on warnings
101185         * modules/manywarnings (Depends-on): Add warnings.
101187         build: avoid compiler warnings
101188         * lib/select.c (rpl_select): Delete unused variable.
101189         * lib/setsockopt.c (rpl_setsockopt): Avoid incompatible pointer.
101191 2009-11-18  Eric Blake  <ebb9@byu.net>
101193         tests: avoid false negative with --with-packager
101194         * tests/test-version-etc.sh: Discard packager information.
101195         * tests/test-argp-version-etc-1.sh: Likewise.
101196         Reported by Mike Frysinger.
101198         utimens: fix regression on Solaris
101199         * m4/utimens.m4 (gl_UTIMENS): Check for BSD bug.
101200         * lib/utimens.c (fdutimens): Revert 2009-11-08 change; Solaris 10
101201         can only change fd timestamps via futimesat.  Instead, use an
101202         additional witness macro to avoid BSD bug.
101203         Reported by Jim Meyering.
101205 2009-11-17  Eric Blake  <ebb9@byu.net>
101207         usleep: use it to simplify tests
101208         * modules/stat-time-tests (Depends-on): Add usleep.
101209         (configure.ac): Drop usleep check.
101210         * modules/chown-tests (Depends-on, configure.ac): Likewise.
101211         * modules/lchown-tests (Depends-on, configure.ac): Likewise.
101212         * modules/fdutimensat-tests (Depends-on, configure.ac): Likewise.
101213         * modules/futimens-tests (Depends-on, configure.ac): Likewise.
101214         * modules/openat-tests (Depends-on, configure.ac): Likewise.
101215         * modules/utimens-tests (Depends-on, configure.ac): Likewise.
101216         * modules/utimensat-tests (Depends-on, configure.ac): Likewise.
101217         * modules/pipe-filter-gi-tests (Depends-on, configure.ac):
101218         Likewise.
101219         * tests/test-chown.h (nap): Rely on nicer usleep semantics.
101220         * tests/test-lchown.h (nap): Likewise.
101221         * tests/test-pipe-filter-gi2-main.c (small_nap): Likewise.
101222         * tests/test-stat-time.c (nap): Likewise.
101223         * tests/test-utimens-common.h (nap): Update comments.
101225         usleep: new module
101226         * modules/usleep: New file.
101227         * m4/usleep.m4 (gl_FUNC_USLEEP): Likewise.
101228         * lib/usleep.c (usleep): Likewise.
101229         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add defaults.
101230         * modules/unistd (Makefile.am): Substitute witnesses.
101231         * lib/unistd.in.h (usleep): Add declaration.
101232         * doc/pastposix-functions/usleep.texi (usleep): Document this.
101233         * MODULES.html.sh (Date and time): Likewise.
101234         * modules/usleep-tests (Depends-on): New test.
101235         * tests/test-usleep.c: New file.
101237         chown: work around OpenBSD bug
101238         * lib/chown.c (rpl_chown): Work around the bug.
101239         * lib/lchown.c (rpl_lchown): Attempt to do likewise.
101240         * m4/chown.m4 (gl_FUNC_CHOWN): Test for ctime bug.
101241         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check for lchmod.
101242         * modules/chown (Depends-on): Add stdbool.
101243         * modules/lchown (Depends-on): Likewise.
101244         * doc/posix-functions/chown.texi (chown): Document the bug.
101245         * doc/posix-functions/lchown.texi (lchown): Likewise.
101246         * tests/test-lchown.h (test_chown): Relax test.
101248         mkstemp: avoid conflict with C++ keyword template
101249         * lib/mkdtemp.c (mkdtemp): Change spelling of template.
101250         * lib/mkostemp.c (mkostemp): Likewise.
101251         * lib/mkostemps.c (mkostemps): Likewise.
101252         * lib/mkstemp.c (mkstemp): Likewise.
101253         * lib/mkstemps.c (mkstemps): Likewise.
101255         xalloc-die-tests: optimize
101256         * tests/test-xalloc-die.sh: Reduce number of processes.
101258 2009-11-17  Simon Josefsson  <simon@josefsson.org>
101260         * gnulib-tool: Support LGPLv3+ licenses in module files.  Tiny
101261         patch from ludo@gnu.org (Ludovic Courtès).
101263 2009-11-17  Jim Meyering  <meyering@redhat.com>
101265         version-etc: use proper license string
101266         * modules/version-etc (License): Use LGPL, not LGPLv3+.
101267         * modules/version-etc-fsf: Likewise.
101269 2009-11-17  Simon Josefsson  <simon@josefsson.org>
101271         * tests/test-xalloc-die.sh: Add license.  Check that nothing is
101272         printed to stdout.  Deal with EOL differences.
101274 2009-11-17  Eric Blake  <ebb9@byu.net>
101276         unsetenv: work around Solaris bug
101277         * m4/setenv.m4 (gl_FUNC_UNSETENV): Check for bug.
101278         * lib/unsetenv.c (rpl_unsetenv): Work around it.
101279         Reported by Jim Meyering.
101281         vasnprintf: avoid compiler warnings
101282         * lib/vasnprintf.c (VASNPRINTF): Avoid shadowing our own local
101283         variables.
101284         * lib/printf-args.c (PRINTF_FETCHARGS): Avoid type mismatch.
101286 2009-11-17  Simon Josefsson  <simon@josefsson.org>
101288         * modules/xalloc-die-tests (Makefile.am): Drop XFAIL_TESTS
101289         settings since xalloc-die is no longer the self test,
101290         xalloc-die.sh is.
101292 2009-11-17  Jim Meyering  <meyering@redhat.com>
101294         test-xalloc-die.sh: make the code agree with the commit log
101295         * tests/test-xalloc-die.sh: Put "." at the front of $PATH, not
101296         at the end, just in case you happen to have a test-xalloc-die
101297         program in some other PATH directory.
101299         test-xalloc-die.sh: fix a portability bug
101300         * tests/test-xalloc-die.sh: Do not invoke via ./test-xalloc-die.
101301         Instead, set PATH to start with "." and invoke via "test-xalloc-die".
101302         Otherwise, argv[0] (as often seen in diagnostics) would be too
101303         system-dependent, sometimes with, and sometimes without the leading "./".
101305         version-etc-fsf: relax license to LGPLv3+
101306         * modules/version-etc-fsf (License): Relax license.
101308 2009-11-16  Eric Blake  <ebb9@byu.net>
101310         xalloc-die-tests: avoid printing null pointer
101311         * modules/xalloc-die-tests (Files, Makefile.am): Wrap execution in
101312         shell script.
101313         * tests/test-xalloc-die.c (program_name): Declare.
101314         * tests/test-xalloc-die.sh (tmpfiles): New file.
101316         setenv, unsetenv: work around various bugs
101317         * lib/setenv.c (setenv) [!HAVE_SETENV]: Resync from glibc.
101318         (setenv) [HAVE_SETENV]: Work around bugs.
101319         * lib/unsetenv.c (unsetenv) [HAVE_UNSETENV]: Work around bugs.
101320         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE, gl_FUNC_UNSETENV): Check
101321         for bugs.
101322         (gl_FUNC_SETENV): Write in terms of gl_FUNC_SETENV_SEPARATE.
101323         * m4/environ.m4 (gl_ENVIRON): Avoid expand-before-require.
101324         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Update defaults.
101325         * modules/stdlib (Makefile.am): Update substitutions.
101326         * lib/stdlib.in.h (setenv, unsetenv): Update prototypes.
101327         * doc/posix-functions/setenv.texi (setenv): Document the bugs.
101328         * doc/posix-functions/unsetenv.texi (unsetenv): Likewise.
101329         * modules/setenv-tests: New test.
101330         * modules/unsetenv-tests: Likewise.
101331         * tests/test-setenv.c: New file.
101332         * tests/test-unsetenv.c: Likewise.
101334 2009-11-16  Jim Meyering  <meyering@redhat.com>
101336         version-etc: relax license to LGPLv3+
101337         * modules/version-etc (License): Relax license.
101339         better AC_REQUIRE expanded-before-required-warning avoidance
101340         * m4/chown.m4 (gl_FUNC_CHOWN, gl_FUNC_CHOWN_FOLLOWS_SYMLINK): Define
101341         with AC_DEFUN_ONCE, rather than AC_DEFUN, to avoid AC_REQUIRE warnings.
101342         Suggested by Eric Blake.  This change also reverts commit 1b712ba8,
101343         which is no longer needed.
101345 2009-11-16  Eric Blake  <ebb9@byu.net>
101347         test-freading: clean up temporary file
101348         * tests/test-freading.c (main): Remove file on success, and use
101349         ASSERT more liberally.
101350         Reported by Jim Meyering.
101352 2009-11-16  Jim Meyering  <meyering@redhat.com>
101354         avoid new AC_REQUIRE expanded-before-required warnings
101355         * modules/chown (configure.ac): Require gl_FUNC_CHOWN, rather than
101356         merely using it.
101357         * modules/euidaccess (configure.ac): Likewise for gl_FUNC_EUIDACCESS.
101358         * modules/faccessat (configure.ac): Likewise for gl_FUNC_FACCESSAT.
101360 2009-11-15  Simon Josefsson  <simon@josefsson.org>
101362         * tests/test-xalloc-die.c: New file.
101363         * modules/xalloc-die-tests: New file.
101364         * gnulib-tool (func_emit_tests_Makefile_am): Also initialize
101365         XFAIL_TESTS so it can be appended by modules.
101367 2009-11-15  Simon Josefsson  <simon@josefsson.org>
101369         * lib/gc-pbkdf2-sha1.c: Remove comments from RFC 2898.  Reported
101370         by Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>.
101372 2009-11-14  Eric Blake  <ebb9@byu.net>
101374         fnmatch: avoid compiler warning
101375         * lib/fnmatch_loop.c (NEW_PATTERN): Coerce addition to unsigned,
101376         to silence compiler warning about mismatch signedness in ?:.
101377         Reported by Robert Millan.
101379         intprops: add double-inclusion guard
101380         * lib/intprops.h: Allow idempotent includes.
101381         Suggested by Bruce Korb.
101383         openat: detect Solaris fchownat bug
101384         * lib/fchownat.c (rpl_fchownat): Work around Solaris bug.  Avoid
101385         penalizing glibc chownat when only lchownat is broken.
101386         * m4/openat.m4 (gl_FUNC_FCHOWNAT): Replace fchownat if there are
101387         trailing slash bugs.
101388         * doc/posix-functions/fchownat.texi (fchownat): Document the bug.
101389         * modules/openat-tests (Files): Include more files.
101390         (Depends-on): Add mgetgroups, sleep, stat-time.
101391         (configure.ac): Add additional checks.
101392         (Makefile.am): Build new test.
101393         * tests/test-fchownat.c: New file.
101395         lchown: detect Solaris and FreeBSD bug
101396         * lib/lchown.c (rpl_lchown): Work around bug.
101397         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check for trailing slash bugs.
101398         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness.
101399         * modules/unistd (Makefile.am): Populate it.
101400         * lib/unistd.in.h (lchown): Update declaration.
101401         * doc/posix-functions/lchown.texi (lchown): Document the bug.
101402         * modules/lchown-tests: New file.
101403         * tests/test-lchown.h (test_lchown): Likewise.
101404         * tests/test-lchown.c (main): Likewise.
101406         chown: detect Solaris and FreeBSD bug
101407         * lib/chown.c (rpl_chown): Work around bug.
101408         * m4/chown.m4 (gl_FUNC_CHOWN): Check for trailing slash bugs.
101409         (gl_PREREQ_CHOWN): Delete.
101410         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness.
101411         * modules/unistd (Makefile.am): Populate it.
101412         * lib/unistd.in.h (chown): Update declaration.
101413         * lib/lchown.c (chown): Update client.
101414         * modules/lchown (Depends-on): Add lstat.
101415         * doc/posix-functions/chown.texi (chown): Document the bug.
101416         * doc/posix-functions/getgroups.texi (getgroups): Document
101417         getgroups pitfall.
101418         * modules/chown-tests: New file.
101419         * tests/test-chown.h (test_chown): Likewise.
101420         * tests/test-chown.c (main): Likewise.
101422 2009-11-14  Robert Millan  <rmh.grub@aybabtu.com>  (tiny change)
101424         gnulib-tool: correctly detect absence of m4 directories
101425         * gnulib-tool: Avoid extra newline on data passed to wc -l.
101427 2009-11-14  Jim Meyering  <meyering@redhat.com>
101429         maint.mk: Prohibit inclusion of "xalloc.h" without use.
101430         * top/maint.mk (sc_prohibit_close_stream_without_use): New rule.
101432 2009-11-14  John W. Eaton  <jwe@gnu.org>
101434         strftime.h: wrap function declaration in extern "C" block
101435         * lib/strftime.h (nstrftime) [__cplusplus]: Wrap declaration.
101437 2009-11-13  Eric Blake  <ebb9@byu.net>
101439         getgroups: avoid compiler warning
101440         * lib/getgroups.c (rpl_getgroups): Delete shadowed variable.
101442         getgroups: work around FreeBSD bug
101443         * lib/getgroups.c (rpl_getgroups): Work around the bug.
101444         * m4/getgroups.m4 (gl_FUNC_GETGROUPS): Detect the bug.
101445         * doc/posix-functions/getgroups.texi (getgroups): Document it.
101446         * tests/test-getgroups.c (main): Fix buffer overrun.
101448         getgroups: avoid compilation failure
101449         * lib/getgroups.c (includes): Include <stdint.h> for SIZE_MAX.
101450         * modules/getgroups (Depends-on): Add stdint.
101452 2009-11-13  Jim Meyering  <meyering@redhat.com>
101454         test-getgroups: avoid compilation failure
101455         * tests/test-getgroups.c: Include <stdint.h> for use of SIZE_MAX.
101457 2009-11-13  Eric Blake  <ebb9@byu.net>
101459         mgetgroups: new module, taken from coreutils
101460         * modules/mgetgroups: New file.
101461         * lib/mgetgroups.h: Likewise.
101462         * lib/mgetgroups.c (mgetgroups): Likewise.
101463         * m4/mgetgroups.m4 (gl_MGETGROUPS): Likewise.
101464         * MODULES.html.sh (Users and groups): Mention it.
101466         getgroups: don't expose GETGROUPS_T to user
101467         * lib/getgroups.c (rpl_getgroups): Change signature.  Copy array
101468         an element at a time if GETGROUPS_T is wrong size.
101469         * lib/getugroups.h (getugroups): Change signature.
101470         * lib/unistd.in.h (getgroups): Likewise.
101471         * m4/getgroups.m4 (gl_FUNC_GETGROUPS): Use replacement if
101472         signature needs fixing.
101473         * m4/getugroups.m4 (gl_GETUGROUPS): No longer need
101474         AC_TYPE_GETGROUPS.
101475         * modules/group-member (Depends-on): Add getgroups.
101476         * lib/group-member.c (group_info, get_group_info): Use gid_t.
101477         (group_member): Rely on getgroups replacement.
101478         * lib/getugroups.c (getugroups): Use gid_t.
101479         * tests/test-getgroups.c (main): Likewise.
101480         * NEWS: Mention the signature change.
101481         * doc/posix-functions/getgroups.texi (getgroups): Mention the
101482         problem with signature.
101483         * doc/glibc-functions/setgroups.texi (setgroups): Mention that
101484         GETGROUPS_T is still useful for setgroups.
101486         getgroups, getugroups: provide stubs for mingw
101487         * lib/getgroups.c (getgroups): Provide ENOSYS stub for mingw.
101488         * lib/getugroups.c (getugroups): Likewise.
101489         * m4/getgroups.m4 (gl_FUNC_GETGROUPS): Check for missing
101490         function.  Modernize replacement scheme.
101491         (gl_PREREQ_GETGROUPS): Delete.
101492         * m4/getugroups.m4 (gl_GETUGROUPS): Check for <grp.h>.
101493         * modules/getgroups (configure.ac): Declare witness.
101494         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add default.
101495         * modules/unistd (Depends-on): Substitute witness.
101496         * lib/unistd.in.h (getgroups): Declare replacement.
101498         getgroups: avoid calling exit
101499         * modules/getgroups (Depends-on): Add malloc-posix and unistd,
101500         drop xalloc.
101501         * modules/getgroups-tests (Depends-on, Makefile.am): Drop unneeded
101502         dependencies.
101503         * lib/getgroups.c (rpl_getgroups): Fail with ENOMEM rather than
101504         exiting, in the rare case of malloc failure.
101506         getgroups: fix logic error
101507         * lib/getgroups.c (rpl_getgroups): Don't fail if current process
101508         has more than 20 groups.
101509         * modules/getgroups-tests: New test.
101510         * tests/test-getgroups.c: New file.
101512 2009-11-13  Simon Josefsson  <simon@josefsson.org>
101514         * tests/test-base64.c: Improve.
101516 2009-11-13  Simon Josefsson  <simon@josefsson.org>
101518         * tests/test-xvasprintf.c: Fix memory leak, suggested by Eric
101519         Blake <ebb9@byu.net>.
101521 2009-11-13  Simon Josefsson  <simon@josefsson.org>
101523         * tests/test-xvasprintf.c: Add %s%s related checks.
101525 2009-11-12  Eric Blake  <ebb9@byu.net>
101527         version-etc: match standards.texi style
101528         * lib/version-etc.c (emit_bug_reporting_address): Drop periods,
101529         and use <> only for URLs.
101531 2009-11-10  Kamil Dudka  <kdudka@redhat.com>
101533         fts: do not fail on a submount during traversal
101534         * lib/fts.c (fts_build): Read the stat info again after opening
101535         a directory if the FTS_TIGHT_CYCLE_CHECK flag is set.
101536         Original report at http://bugzilla.redhat.com/501848.
101538 2009-11-12  Jim Meyering  <meyering@redhat.com>
101540         bootstrap: sync from coreutils
101541         * build-aux/bootstrap (bootstrap_epilogue): New function.
101542         Use git_modules_config in one more place.  This make bootstrap's
101543         --gnulib-srcdir option more useful for testing.
101545         bootstrap: generalize autoheader check
101546         * build-aux/bootstrap: Look for AC_CONFIG_HEADER as well as
101547         AC_CONFIG_HEADERS.
101549 2009-11-11  Eric Blake  <ebb9@byu.net>
101551         mkfifoat: use new modules for Solaris and BSD bugs
101552         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Simplify.
101553         * lib/mkfifoat.c (mknodat): Split...
101554         * lib/mknodat.c (mknodat): ...into new file.
101555         * modules/mkfifoat (Files): Ship new file.
101556         (Depends-on): Add mkfifo, mknod.
101557         * modules/mkfifoat-tests (Files): Reuse mkfifo tests.
101558         (Depends-on): Add symlink.
101559         * tests/test-mkfifoat.c (main): Enhance test.  Drop portions now
101560         redundant with test_mkfifo.h.
101561         (do_mkfifoat, do_mknodat): New helpers.
101563         mknod: new module
101564         * modules/mknod: New file.
101565         * m4/mknod.m4 (gl_FUNC_MKNOD): Likewise.
101566         * lib/mknod.c (mknod): Likewise.
101567         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Set witness
101568         defaults.
101569         * modules/sys_stat (Makefile.am): Substitute them.
101570         * lib/sys_stat.in.h (mknod): Declare replacement.
101571         * MODULES.html.sh (Support for systems lacking POSIX:2008):
101572         Document it.
101573         * doc/posix-functions/mknod.texi (mknod): Likewise.
101574         * modules/mknod-tests: New test.
101575         * tests/test-mknod.c: Likewise.
101577         mkfifo: new module
101578         * modules/mkfifo: New file.
101579         * m4/mkfifo.m4 (gl_FUNC_MKFIFO): Likewise.
101580         * lib/mkfifo.c (mkfifo): Likewise.
101581         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Set witness
101582         defaults.
101583         * modules/sys_stat (Makefile.am): Substitute them.
101584         * lib/sys_stat.in.h (mkfifo): Declare replacement.
101585         * MODULES.html.sh (Support for systems lacking POSIX:2008):
101586         Document it.
101587         * doc/posix-functions/mkfifo.texi (mkfifo): Likewise.
101588         * modules/mkfifo-tests: New test.
101589         * tests/test-mkfifo.h (test_mkfifo): New file, borrowed in part
101590         from test-mkfifoat.c.
101591         * tests/test-mkfifo.c: New file.
101593         readlink: detect FreeBSD bug
101594         * m4/readlink.m4 (gl_FUNC_READLINK): Also detect FreeBSD bug with
101595         slash on symlink.
101596         * doc/posix-functions/readlink.texi (readlink): Document the bug.
101597         * tests/test-readlink.h (test_readlink): Enhance test.
101599         symlink: detect FreeBSD bug
101600         * m4/symlink.m4 (gl_FUNC_SYMLINK): Also detect FreeBSD bug with
101601         slash on symlink.
101602         * doc/posix-functions/symlink.texi (symlink): Document the bug.
101603         * tests/test-symlink.h (test_symlink): Enhance test.
101605 2009-11-10  Eric Blake  <ebb9@byu.net>
101607         link: detect FreeBSD bug
101608         * m4/link.m4 (gl_FUNC_LINK): Also detect FreeBSD bug with slash on
101609         symlink.
101610         * doc/posix-functions/link.texi (link): Document the bug.
101611         * tests/test-link.h (test_link): Enhance test.
101612         * tests/test-linkat.c (main): Update caller.
101614         unlink, remove: detect FreeBSD bug
101615         * m4/unlink.m4 (gl_FUNC_UNLINK): Also detect FreeBSD bug with
101616         slash on symlink.
101617         * doc/posix-functions/unlink.texi (unlink): Document the bug.
101618         * doc/posix-functions/remove.texi (remove): Likewise.
101619         * tests/test-unlink.h (test_unlink): Enhance test.
101620         * tests/test-remove.c (main): Likewise.
101622 2009-11-09  Eric Blake  <ebb9@byu.net>
101624         rename: detect FreeBSD bug
101625         * m4/rename.m4 (gl_FUNC_RENAME): Also detect FreeBSD bug with
101626         slash on symlink.
101627         * modules/renameat-tests (Depends-on): Add filenamecat.
101628         * tests/test-rename.h (test_rename): Allow one more errno.
101629         * tests/test-renameat.c (main): Likewise.
101630         * doc/posix-functions/rename.texi (rename): Document the bug.
101632         open: detect FreeBSD bug
101633         * m4/open.m4 (gl_FUNC_OPEN): Also detect FreeBSD bug with slash on
101634         symlink.
101635         * doc/posix-functions/open.texi (open): Document the bug.
101636         * doc/posix-functions/utimes.texi (utimes): Likewise.
101637         * tests/test-open.h (test_open): Add parameters, and test symlink
101638         handling.
101639         * tests/test-open.c (main): Adjust caller.
101640         * tests/test-fcntl-safer.c (main): Likewise.
101641         * modules/open-tests (Depends-on): Add stdbool, symlink.
101642         * modules/fcntl-safer-tests (Depends-on): Likewise.
101643         * tests/test-openat.c (main): Add test-open tests.
101645         stat: detect FreeBSD bug
101646         * m4/stat.m4 (gl_FUNC_STAT): Also detect FreeBSD bug with slash on
101647         symlink.
101648         * doc/posix-functions/stat.texi (stat): Document the bug.
101649         * tests/test-stat.h (test_stat_func): Add argument.
101650         * tests/test-stat.c (main): Adjust caller.
101651         * tests/test-fstatat.c (main): Likewise.
101652         * modules/stat-tests (Depends-on): Add stdbool, symlink.
101653         Reported by Jim Meyering.
101655 2009-11-09  James Youngman  <jay@gnu.org>
101657         strftime.c: include ignore-value.h only when FPRINTFTIME is defined
101658         * lib/strftime.c: Correct placement of #include "ignore-value.h".
101660 2009-11-08  Jim Meyering  <meyering@redhat.com>
101662         utimens: remove invalid futimesat call
101663         * lib/utimens.c (fdutimens): Remove invalid futimesat call.
101664         It used the file descriptor of the target file as the DIR_FD
101665         parameter and NULL as the file name.  That caused failure with
101666         errno == EFAULT on FreeBSD-8.0-rc2
101668 2009-11-07  Eric Blake  <ebb9@byu.net>
101670         fflush, freadseek: use fseeko, not fseek
101671         * lib/fflush.c (clear_ungetc_buffer_preserving_position)
101672         (clear_ungetc_buffer): Avoid potential problems on large files.
101673         * lib/freadseek.c (freadseek): Likewise.
101674         * modules/freadseek (Depends-on): Add fseeko.
101675         * modules/fseek (configure.ac): Set a witness.
101676         * tests/test-fflush.c (main): Use fseeko.
101677         * tests/test-fpurge.c (fseek): Disable link warning.
101678         * tests/test-freadable.c (fseek): Likewise.
101679         * tests/test-freading.c (fseek): Likewise.
101680         * tests/test-fseeko.c (fseek): Likewise.
101681         * tests/test-ftell.c (fseek): Likewise.
101682         * tests/test-ftello.c (fseek): Likewise.
101683         * tests/test-fwritable.c (fseek): Likewise.
101684         * tests/test-fwriting.c (fseek): Likewise.
101686 2009-11-06  Simon Josefsson  <simon@josefsson.org>
101688         * modules/memchr (Depends-on): Drop getpagesize dependency.
101690 2009-11-06  Simon Josefsson  <simon@josefsson.org>
101692         * build-aux/pmccabe2html: Disable execute bit.  Suggested by
101693         Reported by Ludovic Courtès.
101694         * build-aux/pmccabe2html: Improve example usage.
101695         * build-aux/pmccabe2html: Drop #! header.  Doc fix.
101697 2009-11-06  Jim Meyering  <meyering@redhat.com>
101699         do-release-commit-and-tag: New module.
101700         Automate the release-commit and tag process.
101701         * build-aux/do-release-commit-and-tag: New script, from coreutils.
101702         * modules/do-release-commit-and-tag: New file.
101703         * MODULES.html.sh (Support for maintaining and releasing): Add it.
101705 2009-11-06  Simon Josefsson  <simon@josefsson.org>
101707         * modules/select-tests (test_select_LDADD): Add $(INET_PTON_LIB)
101708         because test-select.c uses inet_pton.
101710 2009-11-06  Simon Josefsson  <simon@josefsson.org>
101712         * m4/getaddrinfo.m4: Add content of INET_NTOP_LIB to
101713         GETADDRINFO_LIB.  Bump serial number.
101714         * modules/getaddrinfo (Link): Only mention GETADDRINFO_LIB again.
101715         Suggested by Eric Blake <ebb9@byu.net>.
101717 2009-11-05  Eric Blake  <ebb9@byu.net>
101719         strtod: detect darwin bug
101720         * m4/strtod.m4 (gl_FUNC_STRTOD): Filter out darwin bug on "nan(".
101721         Reported by Leo Davis.
101723         freopen-safer: new module
101724         * modules/freopen-safer: New module.
101725         * m4/stdio-safer.m4 (gl_FREOPEN_SAFER): New macro.
101726         * lib/freopen-safer.c (freopen_safer): New file.
101727         * lib/stdio-safer.h (freopen_safer): New declaration.
101728         * lib/stdio--.h (freopen): New override.
101729         * MODULES.html.sh (File stream based Input/Output): Mention it.
101730         * doc/posix-functions/freopen.texi (freopen): Mention pitfalls and
101731         freopen-safer module.
101732         * doc/posix-functions/stderr.texi (stderr): Likewise.
101733         * doc/posix-functions/stdin.texi (stdin): Likewise.
101734         * doc/posix-functions/stdout.texi (stdout): Likewise.
101735         * modules/freopen-safer-tests: New test.
101736         * tests/test-reopen-safer.c: New file.
101738 2009-11-05  Jim Meyering  <meyering@redhat.com>
101740         maint.mk: Prohibit inclusion of "close-stream.h" without use.
101741         * top/maint.mk (sc_prohibit_close_stream_without_use): New rule.
101743 2009-11-05  Simon Josefsson  <simon@josefsson.org>
101745         * modules/pmccabe2html (configure.ac): Check for pmccabe tool.
101747 2009-11-05  Simon Josefsson  <simon@josefsson.org>
101749         * modules/getaddrinfo (Link): Add $(INET_NTOP_LIB).
101751 2009-11-05  Simon Josefsson  <simon@josefsson.org>
101753         Fix link error.
101754         * m4/inet_ntop.m4 (gl_INET_NTOP): Fix test of AC_SEARCH_LIBS result.
101755         * m4/inet_pton.m4 (gl_INET_PTON): Likewise.
101757 2009-11-05  Simon Josefsson  <simon@josefsson.org>
101759         * tests/test-func.c: Also test value of __func__.
101761 2009-11-05  Simon Josefsson  <simon@josefsson.org>
101763         * tests/test-sys_socket.c: Use smaller constant value, sa_family_t
101764         may be an 8-bit type.  Reported by Bruno Haible <bruno@clisp.org>.
101766 2009-11-05  Bruno Haible  <bruno@clisp.org>
101768         Fix link error.
101769         * m4/inet_ntop.m4 (gl_INET_NTOP): Fix test of AC_SEARCH_LIBS result.
101770         * m4/inet_pton.m4 (gl_INET_PTON): Likewise.
101771         Reported by Brad Hards <bradh@frogmouth.net> via Simon Josefsson.
101773 2009-11-05  Bruno Haible  <bruno@clisp.org>
101775         Tests for module 'inet_pton'.
101776         * modules/inet_pton-tests: New file.
101777         * tests/test-inet_pton.c: New file.
101779 2009-11-05  Bruno Haible  <bruno@clisp.org>
101781         Tests for module 'inet_ntop'.
101782         * modules/inet_ntop-tests: New file.
101783         * tests/test-inet_ntop.c: New file.
101785 2009-11-04  Eric Blake  <ebb9@byu.net>
101787         stdlib-safer: wrap all mkstemp variants
101788         * modules/mkostemp (configure.ac): Set witness.
101789         * modules/mkostemps (configure.ac): Likewise.
101790         * modules/mkstemps (configure.ac): Likewise.
101791         * lib/stdlib-safer.h (mkostemp_safer, mkostemps_safer)
101792         (mkstemps_safer): Wrap more functions.
101793         * lib/stdlib--.h (mkostemp, mkostemps, mkstemps): Default the
101794         wrapping.
101795         * lib/mkstemp-safer.c (mkostemp_safer, mkostemps_safer)
101796         (mkstemps_safer): Implement the wrappers.
101798         mkstemps, mkostemps: new modules
101799         * modules/mkostemps: New module.
101800         * modules/mkstemps: Likewise.
101801         * lib/mkostemps.c (mkostemps): New file.
101802         * lib/mkstemps.c (mkstemps): Likewise.
101803         * m4/mkostemps.m4 (gl_FUNC_MKOSTEMPS): Likewise.
101804         * m4/mkstemps.m4 (gl_FUNC_MKSTEMPS): Likewise.
101805         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Add witnesses.
101806         * modules/stdlib (Makefile.am): Substitute them.
101807         * lib/stdlib.in.h (mkostemps, mkstemps): Declare them.
101808         * doc/glibc-functions/mkstemps.texi (mkstemps): New file.
101809         * doc/glibc-functions/mkostemps.texi (mkostemps): Likewise.
101810         * doc/gnulib.texi (Glibc stdlib.h): Include them.
101811         * MODULES.html.sh (File system functions): Mention them.
101813         tempname: resync from glibc
101814         * lib/tempname.c (__gen_tempname): Add suffixlen argument.  Use
101815         same values for __GT_FILE as glibc.  Abort even when assertions
101816         are disabled.
101817         * lib/tempname.h (GT_FILE): Use glibc __GT_FILE, if available, and
101818         match its value otherwise.  Allow idempotent inclusion.
101819         * lib/mkdtemp.c (mkdtemp): Adjust caller.
101820         * lib/mkostemp.c (mkostemp): Likewise.
101821         * lib/mkstemp.c (mkstemp): Likewise.
101822         * lib/tmpfile.c (tmpfile): Likewise.
101823         * NEWS: Document this.
101825         utimens: fix use of futimens on older Linux
101826         * lib/utimens.c (fdutimens): Use updated, rather than original,
101827         timespec to avoid bug in older Linux kernel.
101828         Reported by Simon Josefsson.
101830 2009-11-04  Bruno Haible  <bruno@clisp.org>
101832         Make num_processors more flexible and consistent.
101833         * lib/nproc.h (enum nproc_query): New type.
101834         (num_processors): Add a 'query' argument.
101835         * lib/nproc.c: Include <stdlib.h>, <sched.h>, c-ctype.h.
101836         (num_processors): Add a 'query' argument. Test the value of the
101837         OMP_NUM_THREADS environment variable if requested. On Linux, NetBSD,
101838         mingw, count the number of CPUs available for the current process.
101839         * m4/nproc.m4 (gl_PREREQ_NPROC): Require AC_USE_SYSTEM_EXTENSIONS.
101840         Check for sched_getaffinity and sched_getaffinity_np.
101841         * modules/nproc (Depends-on): Add c-ctype, extensions.
101842         * NEWS: Mention the change.
101844 2009-11-03  Bruno Haible  <bruno@clisp.org>
101846         * NEWS: Document the new library dependencies of inet_ntop, inet_pton.
101848 2009-11-03  Jim Meyering  <meyering@redhat.com>
101850         test-getaddrinfo: avoid compilation failure on FreeBSD 7.2
101851         * tests/test-getaddrinfo.c (simple): Test for EAI_NODATA only
101852         if it is defined.
101854 2009-11-02  Eric Blake  <ebb9@byu.net>
101856         mktime, timegm: share common declaration
101857         * lib/mktime-internal.h: New file.
101858         * lib/mktime.c: Use it rather than open-coding a declaration.
101859         * lib/timegm.c: Likewise.
101860         * modules/mktime (Files): Ship it.
101861         * modules/timegm (Files): Likewise.
101862         Suggested by Bruno Haible.
101864         test-update-copyright: update test to match script changes
101865         * tests/test-update-copyright.sh: Avoid hard-coding perl
101866         location.  Don't update *.bak created by earlier runs.
101868 2009-11-02  Paul Eggert  <eggert@cs.ucla.edu>
101869             Simon Josefsson  <simon@josefsson.org>
101870             Bruno Haible  <bruno@clisp.org>
101872         Fix link error on Solaris 8.
101873         * m4/inet_pton.m4 (gl_INET_PTON): Search for the function inet_pton
101874         also in libnsl. Define also INET_PTON_LIB.
101875         * modules/inet_pton (Link): New section.
101877 2009-11-02  Simon Josefsson  <simon@josefsson.org>
101878             Bruno Haible  <bruno@clisp.org>
101880         * m4/inet_ntop.m4 (gl_INET_NTOP): Define also INET_NTOP_LIB.
101881         * modules/inet_ntop (Link): New section.
101882         Reported by Boyan Kasarov <bkasarov@gmail.com>.
101884 2009-11-02  Eric Blake  <ebb9@byu.net>
101886         maint: avoid compiler warnings in m4 macros
101887         * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Avoid unused variable.
101888         * m4/rmdir.m4 (gl_FUNC_RMDIR): Include correct header.
101890 2009-11-02  Simon Josefsson  <simon@josefsson.org>
101892         * m4/pmccabe2html.m4: Remove file.
101893         * modules/pmccabe2html: Drop pmccabe2html.m4.  Don't call m4
101894         function.  Change maintainer.
101895         * build-aux/pmccabe2html: Use /bin/sh with magic instead of
101896         hard-coding path to awk.  Tiny patch from ludo@gnu.org (Ludovic
101897         Courtès).
101899 2009-10-31  Eric Blake  <ebb9@byu.net>
101901         fseeko: fix m4 regression
101902         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Use modern macro.  Fixes
101903         regression from 2009-10-27.
101904         Reported by Ralf Wildenhues.
101906 2009-10-31  Jim Meyering  <meyering@redhat.com>
101908         inttostr: aesthetics and improved (compile-time) safety
101909         Define inttype_is_signed rather than inttype_is_unsigned,
101910         since the sole use is via "#if inttype_is_signed".
101911         * lib/imaxtostr.c (inttype_is_signed): Define this, rather than
101912         inttype_is_unsigned.
101913         * lib/offtostr.c (inttype_is_signed): Likewise.
101914         * lib/uinttostr.c (inttype_is_signed): Likewise.
101915         * lib/umaxtostr.c (inttype_is_signed): Likewise.
101916         * lib/inttostr.c (inttostr): Use verify to cross-check the
101917         inttype_is_signed value and the signedness of the actual type.
101918         * modules/inttostr (Depends-on): Add verify.
101920 2009-10-30  Eric Blake  <ebb9@byu.net>
101922         build: avoid compiler warnings
101923         * lib/fchmodat.c (lchmod): Mark unused variables.
101924         * lib/getopt.c (_getopt_initialize): Likewise.
101925         * lib/mktime.c (__mktime_internal): Provide prototype.
101926         * lib/inttostr.c (inttostr): Avoid compiler warning even with
101927         older gcc that do not understand #pragma GCC diagnostic.
101928         * lib/uinttostr.c (inttype_is_unsigned): Define.
101929         * lib/umaxtostr.c (inttype_is_unsigned): Likewise.
101931 2009-10-30  Michael Haubenwallner  <michael.haubenwallner@salomon.at>
101933         stat: fix compilation on AIX
101934         * lib/sys_stat.in.h (stat): Work with fact that large files on AIX
101935         only see struct stat64.
101937 2009-10-30  Eric Blake  <ebb9@byu.net>
101939         exclude: make more robust
101940         * lib/exclude.c (excluded_file_name): Abort on unexpected value,
101941         rather than masking a coding bug.
101942         Suggested by Bruno Haible.
101944 2009-10-30  Jim Meyering  <meyering@redhat.com>
101946         perl scripts: remove #!/usr/bin/perl in favor of more portable...
101947         Rather than putting #!/usr/bin/perl on the first line,
101948         start with a variant of what's recommended by "man perlrun" that
101949         invokes the first "perl" program from your shell's search path.
101950         * build-aux/gitlog-to-changelog: Replace #!... as above.
101951         Add a "Local Variables" perl mode setting.
101952         Prompted by a patch from Ludovic Courtès.
101953         Improved by Eric Blake.
101954         * build-aux/useless-if-before-free: Likewise.
101955         * build-aux/announce-gen: Likewise.
101956         * build-aux/update-copyright: Likewise.
101958 2009-10-29  Eric Blake  <ebb9@byu.net>
101960         filenamecat-lgpl: adjust clients
101961         * modules/linkat (Depends-on): Use filenamecat-lgpl, not
101962         filenamecat.
101963         * modules/renameat (Depends-on): Likewise.
101965         filenamecat: split into filenamecat-lgpl
101966         * modules/filenamecat-lgpl: New module.
101967         * modules/filenamecat (Files): Move library-safe files into
101968         filenamecat-lgpl.
101969         (Depends-on): Add filenamecat-lgpl.
101970         (configure.ac): Declare witness.
101971         * lib/filenamecat.h (file_name_concat): Only declare when using
101972         GPL module.
101973         * lib/filenamecat.c (longest_relative_suffix, mfile_name_concat):
101974         Move...
101975         * lib/filenamecat-lgpl.c: ...into new file.
101976         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT_LGPL): New macro.
101977         (gl_FILE_NAME_CONCAT): Use it.
101978         * MODULES.html.sh (File system functions): Mention new module.
101980         argp: avoid memory leak
101981         * modules/argp (Depends-on): Use dirname-lgpl, not dirname.
101982         * lib/argp-namefrob.h (__argp_base_name): Use last_component, not
101983         base_name, since the latter malloc()s and can call exit().
101984         Leak introduced 2006-07-03.
101986         dirname-lgpl: adjust clients that don't need full dirname
101987         * modules/backupfile (Depends-on): Use dirname-lgpl, not dirname.
101988         * modules/filenamecat (Depends-on): Likewise.
101989         * modules/linkat (Depends-on): Likewise.
101990         * modules/mkancesdirs (Depends-on): Likewise.
101991         * modules/mkdir (Depends-on): Likewise.
101992         * modules/openat (Depends-on): Likewise.
101993         * modules/savewd (Depends-on): Likewise.
101994         * modules/rename (Depends-on): Likewise.
101995         (License): Relax license.
101996         * modules/mkdir-tests (Depends-on): Drop progname.
101997         (Makefile.am): Delete unneeded LDADD.
101998         * modules/rename-tests (Depends-on, Makefile.am): Likewise.
102000         dirname: split into dirname-lgpl
102001         * modules/dirname-lgpl: New module.
102002         * modules/dirname (Files): Move library-safe files into
102003         dirname-lgpl.
102004         (Depends-on): Add dirname-lgpl.
102005         (configure.ac): Declare witness.
102006         * modules/double-slash-root (License): Relax license.
102007         * lib/dirname.h (base_name, dir_name): Only declare when using GPL
102008         module.
102009         * lib/dirname.c (dir_len, mdir_name): Move...
102010         * lib/dirname-lgpl.c: ...into new file.
102011         * lib/basename.c (last_component, base_len): Move...
102012         * lib/basename-lgpl.c: ...into new file.
102013         * m4/dirname.m4 (gl_DIRNAME_LGPL): New macro.
102014         (gl_DIRNAME): Use it.
102015         * MODULES.html.sh (Enhancements for POSIX:2008 functions):
102016         Mention new module.
102017         * modules/dirname-tests (Depends-on): Add progname.
102018         * tests/test-dirname.c (program_name): Delete.
102020         mkdir: make safe for libraries
102021         * modules/mkdir (Depends-on): Drop xalloc.
102022         * lib/mkdir.c (rpl_mkdir): Fail with ENOMEM rather than calling
102023         exit.
102025         tests: avoid some compiler warnings
102026         * tests/test-getaddrinfo.c (simple): Mark static, and allow string
102027         literals.
102028         * tests/test-memchr.c (main): Avoid type mismatch.
102029         * tests/test-arpa_inet.c (main): Avoid unused parameters.
102030         * tests/test-base64.c (main): Likewise.
102031         * tests/test-getdelim.c (main): Likewise.
102032         * tests/test-gethostname.c (main): Likewise.
102033         * tests/test-getline.c (main): Likewise.
102034         * tests/test-netinet_in.c (main): Likewise.
102035         * tests/test-select.c (open_server_socket, main): Likewise.
102036         * tests/test-select-stdin.c (main): Likewise.
102037         * tests/test-sockets.c (main): Likewise.
102038         * tests/test-strsignal.c (main): Likewise.
102039         * tests/test-sys_select.c (main): Likewise.
102040         * tests/test-sys_socket.c (main): Likewise.
102041         * tests/test-u64.c (main): Likewise.
102042         * tests/test-xfprintf-posix.c (main): Likewise.
102043         * tests/test-xvasprintf.c (test_xvasprintf, main): Likewise.
102045         sockets: avoid compiler warning
102046         * lib/sockets.c (gl_sockets_startup): Mark unused parameter.
102048         maint: detect usage(1) and other suspicious exits
102049         * top/maint.mk (sc_prohibit_magic_number_exit): New rule.
102051 2009-10-29  Jim Meyering  <meyering@redhat.com>
102053         timespec: long-to-int truncation could make timespec_cmp malfunction
102054         * lib/timespec.h (timespec_cmp): Do not interpret a difference of
102055         a multiple of 2^32 nanoseconds as no difference.
102057 2009-10-28  Jim Meyering  <meyering@redhat.com>
102059         fprintftime: wrap macro code argument in "do {...} while(0)"
102060         * lib/strftime.c (cpy) [FPRINTFTIME]: The second argument to the
102061         cpy macro must be a statement that can be followed by a semicolon.
102062         Now that the else clause contains a comment and is hence longer
102063         than one line, I require curly braces.  That in turn requires
102064         that we wrap this code block in the standard do...while(0).
102066         fprintftime: remove stray semicolon from previous change
102067         * lib/strftime.c (cpy) [FPRINTFTIME]: Remove trailing semicolon.
102069         fprintftime: avoid a warning about ignored fwrite return value
102070         * lib/strftime.c [FPRINTFTIME]: Include "ignore-value.h".
102071         (cpy) [FPRINTFTIME]: Ignore fwrite failure, even though technically,
102072         that is unsafe.
102073         * modules/fprintftime (Depends-on): Add ignore-value.
102075         exclude: avoid an unwarranted warning
102076         * lib/exclude.c (excluded_file_name): Initialize "rc" before switch.
102078 2009-10-27  Eric Blake  <ebb9@byu.net>
102080         fseek: avoid compilation failure when fflush is replaced
102081         * m4/fseek.m4 (gl_REPLACE_FSEEK): New macro.
102082         * m4/fseeko.m4 (gl_REPLACE_FSEEKO): Also replace fseek, if fseek
102083         module is in use.
102084         * lib/stdio.in.h (GNULIB_FSEEKO): Only poison fseek if fseek
102085         module is not in use; since REPLACE_FSEEK worked otherwise.
102086         (GNULIB_FTELLO): Likewise for ftell.
102087         Reported by Ian Beckwith and others.
102089 2009-10-27  Bruno Haible  <bruno@clisp.org>
102091         * lib/isnan.c (rpl_isnan[fdl]): Repeat the specification declaration.
102092         Reported by Jim Meyering.
102094 2009-10-27  Jim Meyering  <jim@meyering.net>
102095             Bruno Haible  <bruno@clisp.org>
102097         Avoid warning despite dropping the return value of fwrite.
102098         * lib/unicodeio.c: Include ignore-value.h.
102099         (fwrite_success_callback): Explicitly ignore fwrite's return value.
102100         * modules/unicodeio (Depends-on): Add ignore-value.
102102 2009-10-26  Eric Blake  <ebb9@byu.net>
102104         areadlinkat: fix fallback path
102105         * lib/at-func.c (AT_FUNC_NAME): Avoid signed comparison between
102106         pointer and zero.
102108 2009-10-22  Pádraig Brady  <P@draigBrady.com>
102110         Use a better IO block size for modern systems
102111         * lib/copy-file.c (copy_file_preserving): Used a 32KiB malloced buffer.
102112         * lib/md2.c: Likewise.
102113         * lib/md4.c: Likewise.
102114         * lib/md5.c: Likewise.
102115         * lib/sha1.c: Likewise.
102116         * lib/sha256.c: Likewise.
102117         * lib/sha512.c: Likewise.
102119 2009-10-22  Eric Blake  <ebb9@byu.net>
102121         tests: avoid several compiler warnings
102122         * tests/test-getcwd.c (main): Avoid buffer underflow.
102123         * tests/test-getdate.c (main): String literals are not safe with
102124         putenv, so use setenv.  Declare unused argument.
102125         * modules/getdate-tests (Depends-on): Add setenv.
102126         * tests/test-argv-iter.c (main): Declare unused argument.  Avoid
102127         problems with string literals in char *.
102128         * tests/test-hash.c (main): Avoid shadowing declaration.
102129         (insert_new): Treat string literals as char const *.
102130         * tests/test-getopt.h (test_getopt): Likewise.
102131         (getopt_loop): Alter types to minimize casting elsewhere.
102132         * tests/test-getopt_long.h (test_getopt_long, getopt_long_loop)
102133         (test_getopt_long_posix): Likewise.
102134         (do_getopt_long): Add wrapper to minimize casting.
102135         * tests/test-atexit.c (clear_temp_file): Use void.
102136         * tests/test-areadlink-with-size.c (main): Declare unused
102137         arguments.
102138         * tests/test-areadlink.c (main): Likewise.
102139         * tests/test-areadlinkat-with-size.c (main): Likewise.
102140         * tests/test-areadlinkat.c (main): Likewise.
102141         * tests/test-canonicalize-lgpl.c (main): Likewise.
102142         * tests/test-canonicalize.c (main): Likewise.
102143         * tests/test-dirent-safer.c (main): Likewise.
102144         * tests/test-dirname.c (main): Likewise.
102145         * tests/test-dup2.c (main): Likewise.
102146         * tests/test-fchdir.c (main): Likewise.
102147         * tests/test-fcntl-h.c (main): Likewise.
102148         * tests/test-fcntl-safer.c (main): Likewise.
102149         * tests/test-fdopendir.c (main): Likewise.
102150         * tests/test-fdutimensat.c (main): Likewise.
102151         * tests/test-fflush.c (main): Likewise.
102152         * tests/test-filenamecat.c (main): Likewise.
102153         * tests/test-filevercmp.c (main): Likewise.
102154         * tests/test-fopen-safer.c (main): Likewise.
102155         * tests/test-fopen.c (main): Likewise.
102156         * tests/test-fpending.c (main): Likewise.
102157         * tests/test-fpurge.c (main): Likewise.
102158         * tests/test-freading.c (main): Likewise.
102159         * tests/test-fstatat.c (main): Likewise.
102160         * tests/test-fsync.c (main): Likewise.
102161         * tests/test-futimens.c (main): Likewise.
102162         * tests/test-getndelim2.c (main): Likewise.
102163         * tests/test-gettimeofday.c (main): Likewise.
102164         * tests/test-getopt.c (main): Likewise.
102165         * tests/test-i-ring.c (main): Likewise.
102166         * tests/test-inttypes.c (main): Likewise.
102167         * tests/test-link.c (main): Likewise.
102168         * tests/test-lstat.c (main): Likewise.
102169         * tests/test-math.c (main): Likewise.
102170         * tests/test-md5.c (main): Likewise.
102171         * tests/test-memchr2.c (main): Likewise.
102172         * tests/test-memrchr.c (main): Likewise.
102173         * tests/test-mkdir.c (main): Likewise.
102174         * tests/test-mkdirat.c (main): Likewise.
102175         * tests/test-mkfifoat.c (main): Likewise.
102176         * tests/test-open.c (main): Likewise.
102177         * tests/test-openat-safer.c (main): Likewise.
102178         * tests/test-openat.c (main): Likewise.
102179         * tests/test-quotearg.c (main): Likewise.
102180         * tests/test-rawmemchr.c (main): Likewise.
102181         * tests/test-readlink.c (main): Likewise.
102182         * tests/test-remove.c (main): Likewise.
102183         * tests/test-rename.c (main): Likewise.
102184         * tests/test-renameat.c (main): Likewise.
102185         * tests/test-rmdir.c (main): Likewise.
102186         * tests/test-sha1.c (main): Likewise.
102187         * tests/test-signal.c (main): Likewise.
102188         * tests/test-sigaction.c (main): Likewise.
102189         * tests/test-stat.c (main): Likewise.
102190         * tests/test-stat-time.c (main): Likewise.
102191         * tests/test-stddef.c (main): Likewise.
102192         * tests/test-stdint.c (main): Likewise.
102193         * tests/test-stdio.c (main): Likewise.
102194         * tests/test-stdlib.c (main): Likewise.
102195         * tests/test-strchrnul.c (main): Likewise.
102196         * tests/test-strerror.c (main): Likewise.
102197         * tests/test-string.c (main): Likewise.
102198         * tests/test-strtod.c (main): Likewise.
102199         * tests/test-strverscmp.c (main): Likewise.
102200         * tests/test-symlink.c (main): Likewise.
102201         * tests/test-symlinkat.c (main): Likewise.
102202         * tests/test-sys_stat.c (main): Likewise.
102203         * tests/test-sys_time.c (main): Likewise.
102204         * tests/test-time.c (main): Likewise.
102205         * tests/test-unistd.c (main): Likewise.
102206         * tests/test-unlink.c (main): Likewise.
102207         * tests/test-unlinkat.c (main): Likewise.
102208         * tests/test-utimens.c (main): Likewise.
102209         * tests/test-utimensat.c (main): Likewise.
102210         * tests/test-version-etc.c (main): Likewise.
102211         * tests/test-wchar.c (main): Likewise.
102212         * tests/test-wctype.c (main): Likewise.
102213         * tests/test-xprintf-posix.c (main): Likewise.
102214         * tests/test-posixtm.c (main): Likewise.
102215         (STREQ): Delete unused macro.
102216         * tests/test-linkat.c (main): Declare unused arguments.  Avoid
102217         shadowed variables.
102218         * tests/test-memchr.c (main): Likewise.
102220 2009-10-21  Eric Blake  <ebb9@byu.net>
102222         areadlinkat: avoid failure on older glibc
102223         * lib/at-func.c (AT_FUNC_NAME): Check for explicit FUNC_FAIL,
102224         rather than mis-comparing 0 against FUNC_RESULT of char*.
102226 2009-10-21  Bruno Haible  <bruno@clisp.org>
102228         * modules/stpncpy (License): Relicense under LGPLv2+.
102229         Reported by David Lutterkort <lutter@redhat.com>.
102231 2009-10-20  Eric Blake  <ebb9@byu.net>
102233         utimensat: work around Solaris 9 bug
102234         * lib/utimens.c (fdutimens, lutimens): Force a stat if platform
102235         has trailing slash bugs.
102236         * tests/test-lutimens.h (test_lutimens): Enhance test.
102237         * tests/test-utimens.h (test_utimens): Likewise.
102238         * doc/posix-functions/utime.texi (utime): Enhance documentation.
102239         * doc/posix-functions/utimes.texi (utimes): Likewise.
102240         * doc/posix-functions/utimensat.texi (utimensat): Likewise.
102241         * doc/glibc-functions/futimesat.texi (futimesat): Likewise.
102242         * doc/glibc-functions/lutimes.texi (lutimes): Likewise.
102243         * doc/posix-functions/futimens.texi (futimens): Likewise.
102245         fdutimensat: new module
102246         * modules/fdutimensat: New file.
102247         * lib/fdutimensat.c (fdutimensat): Likewise.
102248         * lib/utimens.h (fdutimensat, lutimensat): Declare new functions.
102249         * MODULES.html.sh (File system functions): Mention module.
102250         * modules/fdutimensat-tests: New test.
102251         * tests/test-fdutimensat.c: Likewise.
102253         doc: regenerate INSTALL
102254         * doc/INSTALL: Reflect recent autoconf update.
102255         * doc/INSTALL.ISO: Likewise.
102256         * doc/INSTALL.UTF-8: Likewise.
102258 2009-10-20  Pádraig Brady  <P@draigBrady.com>
102260         acl: warn if ACL support is not detected
102261         * m4/acl.m4 (gl_FUNC_ACL): Output a warning if ACL support is not found.
102263 2009-10-19  Giuseppe Scrivano  <gscrivano@gnu.org>
102265         * lib/nproc.h: Add extern "C" block for C++.
102267 2009-10-18  Reuben Thomas  <rrt@sc3d.org>
102268             Bruno Haible  <bruno@clisp.org>
102270         * doc/posix-functions/isascii.texi: Document the 2 alternative APIs.
102271         * doc/posix-functions/isalnum.texi: Document the 4 alternative APIs.
102272         * doc/posix-functions/isalpha.texi: Likewise.
102273         * doc/posix-functions/isblank.texi: Likewise.
102274         * doc/posix-functions/iscntrl.texi: Likewise.
102275         * doc/posix-functions/isdigit.texi: Likewise.
102276         * doc/posix-functions/isgraph.texi: Likewise.
102277         * doc/posix-functions/islower.texi: Likewise.
102278         * doc/posix-functions/isprint.texi: Likewise.
102279         * doc/posix-functions/ispunct.texi: Likewise.
102280         * doc/posix-functions/isspace.texi: Likewise.
102281         * doc/posix-functions/isupper.texi: Likewise.
102282         * doc/posix-functions/isxdigit.texi: Likewise.
102284 2009-10-18  Bruno Haible  <bruno@clisp.org>
102286         Tests for module 'isblank'.
102287         * modules/isblank-tests: New file.
102288         * tests/test-isblank.c: New file.
102290         New module 'isblank'.
102291         * lib/isblank.c: New file.
102292         * m4/isblank.m4: New file.
102293         * modules/isblank: New file.
102294         * doc/posix-functions/isblank.texi: Mention the new module.
102296 2009-10-18  Bruno Haible  <bruno@clisp.org>
102298         New module 'ctype'.
102299         * lib/ctype.in.h: New file.
102300         * m4/ctype.m4: New file.
102301         * modules/ctype: New file.
102302         * doc/posix-headers/ctype.texi: Mention the new module.
102304 2009-10-18  Jim Meyering  <meyering@redhat.com>
102306         m4: stylistic-only: hoist AC_SUBST to be adjacent to initialization
102307         Declare a variable like LIB_CLOCK_GETTIME to be AC_SUBSTituted
102308         right after its initialization, rather than farther down.
102309         Keeping these in close proximity makes it easier to ensure
102310         that each such variable is initialized.  E.g.,
102312             LIB_CLOCK_GETTIME=
102313             AC_SUBST([LIB_CLOCK_GETTIME])
102315         This change also increments these serial numbers.
102316         * m4/clock_time.m4 (gl_CLOCK_TIME): Hoist AC_SUBST use.
102317         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
102318         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
102320 2009-10-18  Bruno Haible  <bruno@clisp.org>
102322         Don't let environment variables perturb build.
102323         * m4/gethrxtime.m4 (gl_GETHRXTIME): Initialize LIB_GETHRXTIME here...
102324         (gl_PREREQ_GETHRXTIME): ... not here.
102326 2009-10-18  Bruno Haible  <bruno@clisp.org>
102328         Avoid symlink attack in localcharset module.
102329         * lib/localcharset.c: Include <fcntl.h>, <unistd.h>.
102330         (O_NOFOLLOW): Define fallback.
102331         (get_charset_aliases): Don't open the file if it is a symbolic link.
102332         * m4/fcntl_h.m4 (gl_FCNTL_O_FLAGS): New macro, extracted from
102333         gl_FCNTL_H.
102334         (gl_FCNTL_H): Require it.
102335         * m4/localcharset.m4 (gl_LOCALCHARSET): Likewise.
102336         * modules/localcharset (Files): Add m4/fcntl_h.m4.
102337         Reported by Fergal Glynn <fglynn@veracode.com>.
102339 2009-10-18  Bruno Haible  <bruno@clisp.org>
102341         Implement nproc for mingw.
102342         * lib/nproc.c: Include <windows.h>
102343         (num_processors): On native Windows platforms, try GetSystemInfo.
102345 2009-10-18  Bruno Haible  <bruno@clisp.org>
102347         Implement nproc for IRIX.
102348         * lib/nproc.c: Include <sys/sysmp.h>.
102349         (num_processors): On IRIX systems, try sysmp.
102350         * m4/nproc.m4 (gl_PREREQ_NPROC): Check for sys/sysmp.h and sysmp.
102352 2009-10-18  Bruno Haible  <bruno@clisp.org>
102354         Implement nproc for HP-UX.
102355         * lib/nproc.c: Include <sys/pstat.h>
102356         (num_processors): On HP-UX systems, try pstat_getdynamic.
102357         * m4/nproc.m4 (gl_PREREQ_NPROC): Check for sys/pstat.h and
102358         pstat_getdynamic.
102360 2009-10-18  Giuseppe Scrivano  <gscrivano@gnu.org>
102361             Bruno Haible  <bruno@clisp.org>
102363         Implement nproc for NetBSD, OpenBSD.
102364         * lib/nproc.c: Include <sys/types.h>, <sys/param.h>, <sys/sysctl.h>.
102365         (ARRAY_SIZE): New macro.
102366         (num_processors): On BSD systems, try sysctl of HW_NCPU.
102367         * m4/nproc.m4: New file.
102368         * modules/nproc (Files): Add m4/nproc.m4.
102369         (configure.ac): Invoke gl_NPROC. Remove AC_LIBOBJ invocation.
102370         (Makefile.am): Instead, augment lib_SOURCES.
102372 2009-10-18  Bruno Haible  <bruno@clisp.org>
102374         Fix recognition of sys/sysctl.h on OpenBSD 4.0.
102375         * m4/physmem.m4 (gl_PHYSMEM): Before including sys/sysctl.h, include
102376         sys/param.h.
102378 2009-10-16  Eric Blake  <ebb9@byu.net>
102380         utimensat: new module
102381         * modules/utimensat: New file.
102382         * lib/utimensat.c (utimensat): Likewise.
102383         * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise.
102384         * lib/utimens.c (utimensat): Avoid recursion into rpl_utimensat,
102385         so we can work around Linux bugs.
102386         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Add witnesses.
102387         * modules/sys_stat (Makefile.am): Substitute them.
102388         * lib/sys_stat.in.h (utimensat): Declare it.
102389         * MODULES.html.sh (systems lacking POSIX:2008): Mention module.
102390         * doc/posix-functions/utimensat.texi (utimensat): Likewise.
102391         * modules/utimensat-tests: New test.
102392         * tests/test-utimensat.c: Likewise.
102394         utimens: let lutimens work on non-symlinks
102395         * lib/utimens.c (lutimens): Fall back to utimens rather than
102396         failing with ENOSYS, when file is not a symlink.
102397         (utimens): Reduce redirection.
102398         * tests/test-lutimens.h (test_lutimens): Update test to cover
102399         non-symlinks.
102400         * tests/test-utimens.h (test_utimens): Update test to cover
102401         symlinks.
102402         * tests/test-utimens.c (main): Update caller.
102404         utimens: cache whether utimensat syscall works
102405         * lib/utimens.c (utimensat_works_really): New cache variable.
102406         (fdutimens, lutimens): Use it to avoid failing syscall.
102408         test-stat-time, test-utimens: improve portability
102409         * tests/test-stat-time.c (nap): Lengthen delay to 20ms, for
102410         ext4 on alpha, and for cygwin.
102411         * tests/test-utimens-common.h: New file.
102412         (nap): Factor delays into single function.
102413         * tests/test-lutimens.h (test_lutimens): Use new header.
102414         * tests/test-futimens.h (test_futimens): Likewise.
102415         * tests/test-utimens.h (test_utimens): Likewise.  Also, force NFS
102416         timestamps to occur from same machine, as was done previously for
102417         test_utimens.
102418         * modules/utimens-tests (Files): Ship new file.
102419         * modules/futimens-tests (Files): Likewise.
102420         Reported in part by Jim Meyering.
102422         sys_stat: sort replacement declarations
102423         * lib/sys_stat.in.h: Sort declarations.
102424         * lib/futimens.c (futimens): Fix typo.
102426 2009-10-15  Jim Meyering  <meyering@redhat.com>
102428         don't let environment settings perturb build
102429         Setting the envvars, LIB_CLOCK_GETTIME, LIB_EACCESS or LIB_NANOSLEEP
102430         could cause a configure-time and/or build-time malfunction.
102431         Typically, a configure-time function-in-library test is performed
102432         via code like this:
102434           LIB_VAR=
102435           AC_SUBST([LIB_VAR])
102436           prefix_saved_LIBS=$LIBS
102437             AC_SEARCH_LIBS([FUNC], [LIB_NAME],
102438                        [test "$ac_cv_search_FUNC" = "none required" ||
102439                         LIB_VAR=$ac_cv_search_FUNC])
102440           LIBS=$prefix_saved_LIBS
102442         However, in each of the files affected by this change, the LIB_VAR=
102443         initialization was omitted.  Thus, when set in the environment, its
102444         value would propagate into generated Makefiles when FUNC is not found
102445         in LIB_NAME.
102446         * m4/clock_time.m4 (gl_CLOCK_TIME): Initialize AC_SUBST'd var.
102447         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
102448         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
102450 2009-10-14  Eric Blake  <ebb9@byu.net>
102452         fchdir: avoid infinite recursion in mingw
102453         * lib/fchdir.c (rpl_fstat): Call system fstat, rather than
102454         recursing.
102456         test-stat-time: port to mingw
102457         * tests/test-stat-time.c (force_unlink): Return a value.
102458         (test_ctime) [W32]: Fix compilation error.
102459         (nap): Don't call usleep with too large an argument.  Use
102460         force_unlink.
102461         * doc/pastposix-functions/usleep.texi (usleep): Document the
102462         portability issue.
102464 2009-10-13  Jim Meyering  <meyering@redhat.com>
102466         use AC_CHECK_FUNCS_ONCE, not AC_CHECK_FUNCS in modules/*
102467         * modules/pipe-filter-gi: Use AC_CHECK_FUNCS_ONCE, not AC_CHECK_FUNCS.
102468         * modules/pipe-filter-ii: Likewise.
102469         * modules/sys_socket-tests: Likewise.
102470         * modules/tsearch-tests: Likewise.
102471         * Makefile (sc_prefer_ac_check_funcs_once): New rule.
102472         (check): Depend on it.
102474 2009-10-12  Eric Blake  <ebb9@byu.net>
102476         utimens-tests: port to NFS file systems
102477         * tests/test-utimens.h (test_utimens): Refactor utimecmp
102478         comparisons to avoid spurious failures from timestamp drift
102479         between NFS machines.
102481 2009-10-12  Eric Blake  <ebb9@byu.net>
102483         stat-time-tests: minor cleanups
102484         * modules/stat-time-tests (configure.ac): Use AC_CHECK_FUNCS_ONCE.
102485         * tests/test-stat-time.c (nap): Separate assignment from call.
102486         Suggested by Paolo Bonzini and Bruno Haible.
102488         sys_stat: guarantee struct timespec
102489         * lib/sys_stat.in.h (includes): Always include <time.h>
102490         * modules/sys_stat (Depends-on): Add time.
102491         * tests/test-sys_stat.c: Guarantee struct timespec, as well as
102492         mode_t permission values.
102493         * doc/posix-headers/sys_stat.texi (sys/stat.h): Document how to
102494         get at subsecond timestamps.
102496 2009-10-10  Eric Blake  <ebb9@byu.net>
102498         futimens: new module
102499         * modules/futimens: New file.
102500         * lib/futimens.c (futimens): Likewise.
102501         * m4/futimens.m4 (gl_FUNC_FUTIMENS): Likewise.
102502         * lib/utimens.c (futimens): Avoid recursion into rpl_futimens, so
102503         we can work around Linux bugs.
102504         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Add witnesses.
102505         * modules/sys_stat (Makefile.am): Substitute them.
102506         * lib/sys_stat.in.h (futimens): Declare it.
102507         * MODULES.html.sh (systems lacking POSIX:2008): Mention module.
102508         * doc/posix-functions/futimens.texi (futimens): Likewise.
102509         * modules/futimens-tests: New test.
102510         * tests/test-futimens.c: Likewise.
102512         utimens: introduce fdutimens
102513         * lib/utimens.h (fdutimens): New prototype.
102514         * lib/utimens.c (gl_futimens): Move guts...
102515         (fdutimens): ...to new interface.
102516         * tests/test-utimens.c (do_fdutimens): Use it.
102518         utimens: add UTIME_NOW and UTIME_OMIT support
102519         * lib/utimens.c (validate_timespec, update_timespec): New helper
102520         functions.
102521         (gl_futimens, lutimens): Use them.
102522         * modules/utimens (Depends-on): Add gettime, lstat, stat-time,
102523         stdbool, sys_stat.
102524         (Link): Mention resulting library dependency.
102525         * modules/utimecmp (Link): Likewise.
102526         * modules/utimens-tests (Depends-on): Drop stat-time, stdbool.
102527         (Makefile.am): Pick up library dependency.
102528         * lib/sys_stat.in.h (UTIME_NOW, UTIME_OMIT): Guarantee a
102529         definition.
102530         * tests/test-sys_stat.c: Test the definitions.
102531         * doc/posix-headers/sys_stat.texi (sys/stat.h): Document this.
102532         * NEWS: Document library dependency.
102534         utimecmp: support symlink timestamps
102535         * lib/utimecmp.c (utimecmp): Use new interface.  Skip effort of
102536         hashing when possible.  Use pathconf when available.
102537         (SYSCALL_RESOLUTION): Recognize tighter resolution.
102538         * modules/utimecmp (Depends-on): Add lstat.
102540         utimens: add lutimens interface
102541         * lib/utimens.c (lutimens): New function.
102542         * m4/utimens.m4 (gl_UTIMENS): Check for lutimes.
102543         * lib/utimens.h (lutimens): Declare new interface.
102544         * tests/test-utimens.c (main): Enhance test.
102545         * tests/test-lutimens.h (test_lutimens): New file.
102546         * modules/utimens-tests (Files): Distribute it.
102547         (Depends-on): Add symlink.
102548         (configure.ac): Check for usleep.
102550         utimens: validate futimens usage
102551         * lib/utimens.c (gl_futimens): Require valid fd up front, using
102552         fewer syscalls on failure later on.  Avoid compiler warning on
102553         mingw.
102554         * modules/utimens (Depends-on): Add dup2.
102556         utimens: add test
102557         * modules/utimens-tests: New test.
102558         * tests/test-utimens.h: New file.
102559         * tests/test-futimens.h: Likewise.
102560         * tests/test-utimens.c: Likewise.
102562         doc: mention timestamp portability issues
102563         * doc/glibc-functions/lutimes.texi (lutimes): Refer to utimensat
102564         instead.
102565         * doc/posix-functions/utime.texi (utime): Likewise.
102566         * doc/posix-functions/utimes.texi (utimes): Likewise.
102567         * doc/glibc-functions/futimes.texi (futimes): Refer to futimens
102568         instead.
102569         * doc/posix-functions/futimens.texi (futimens): Mention utimens
102570         module.
102571         * doc/posix-functions/utimensat.texi (utimensat): Likewise.
102572         Mention weakness with symlink timestamps.
102573         * doc/glibc-functions/futimesat.texi (futimesat): New file; refer
102574         to utimensat/futimens instead.
102575         * doc/gnulib.texi (Glibc sys/time.h): Include new file.
102577         test-dup2: enhance test
102578         * tests/test-dup2.c (main): Also check AT_FDCWD.
102580         test-stat-time: avoid more spurious failures
102581         * tests/test-stat-time.c (nap): Wait for 15ms rather than 2ms, for
102582         xfs; and avoid race if the two timestamps cross quantization edge.
102584         relocatable: prefer 'file system' over 'filesystem'
102585         * m4/relocatable-lib.m4 (gl_RELOCATABLE_NOP): Use AS_HELP_STRING.
102586         (gl_RELOCATABLE_LIBRARY_BODY): Fix spelling.
102587         * doc/relocatable-maint.texi (Supporting Relocation): Likewise.
102588         * doc/relocatable.texi (Enabling Relocatability): Likewise.
102589         * lib/relocatable.c (compute_curr_prefix): Likewise.
102591 2009-10-10  Jim Meyering  <meyering@redhat.com>
102593         stat-time-tests: check for the usleep function
102594         * modules/stat-time-tests (configure.ac): Now that we test HAVE_USLEEP.
102596 2009-10-10  Bruno Haible  <bruno@clisp.org>
102598         * modules/xnanosleep: Put the Link section after the Include section.
102600 2009-10-09  Eric Blake  <ebb9@byu.net>
102602         dup2: work around FreeBSD 6.1 bug
102603         * m4/dup2.m4 (gl_FUNC_DUP2): Detect bug.
102604         * doc/posix-functions/dup2.texi (dup2): Document it.
102605         Reported by Nelson H. F. Beebe and Jim Meyering.
102607         test-stat-time: port to buggy NFS clients
102608         * tests/test-stat-time.c (main) [W32]: Reduce ifdefs.
102609         (test_ctime): Also skip test if mtime and ctime are skewed.
102611         maint: prefer 'file system' over 'filesystem'
102612         * doc/posix-functions/fstatat.texi (fstatat): Likewise.
102613         * doc/posix-functions/lstat.texi (lstat): Likewise.
102614         * lib/file-has-acl.c (file_has_acl): Likewise.
102615         * lib/fwriteerror.c [TEST]: Likewise.
102616         * tests/test-areadlink.h (test_areadlink): Likewise.
102617         * tests/test-areadlinkat-with-size.c (main): Likewise.
102618         * tests/test-areadlinkat.c (main): Likewise.
102619         * tests/test-canonicalize-lgpl.c (main): Likewise.
102620         * tests/test-canonicalize.c (main): Likewise.
102621         * tests/test-fstatat.c (main): Likewise.
102622         * tests/test-linkat.c (main): Likewise.
102623         * tests/test-lstat.h (test_lstat_func): Likewise.
102624         * tests/test-mkdir.h (test_mkdir): Likewise.
102625         * tests/test-readlink.h (test_readlink): Likewise.
102626         * tests/test-remove.c (main): Likewise.
102627         * tests/test-rename.h (test_rename): Likewise.
102628         * tests/test-renameat.c (main): Likewise.
102629         * tests/test-rmdir.h (test_rmdir_func): Likewise.
102630         * tests/test-symlink.h (test_symlink): Likewise.
102631         * tests/test-symlinkat.c (main): Likewise.
102632         * tests/test-unlink.h (test_unlink_func): Likewise.
102633         * tests/test-unlinkat.c (main): Likewise.
102635         maint: make realtime library usage explicit
102636         * modules/gethrxtime (Link): Mention LIB_GETHRXTIME.
102637         * modules/gettime (Link): Mention LIB_CLOCK_GETTIME.
102638         * modules/settime (Link): Likewise.
102639         * modules/xnanosleep (Link): Mention LIB_NANOSLEEP.
102641         test-stat-time: speed up execution
102642         * tests/test-stat-time.c (test_ctime) [!W32]: Avoid compiler
102643         warning on mingw.
102644         (nap): New helper function.
102645         (prepare_test): Use it to reduce sleep time.
102646         (test_mtime, test_ctime, test_birthtime): Allow for subsecond
102647         execution.
102648         * modules/stat-time-tests (configure.ac): Check for usleep.
102650 2009-10-09  Jim Meyering  <meyering@redhat.com>
102652         selinux-h: always use getfilecon wrappers
102653         * lib/getfilecon.c: New file.
102654         * lib/se-selinux.in.h: Use a better inclusion guard symbol name.
102655         [HAVE_SELINUX_SELINUX_H]: Include-next <selinux/selinux.h>.
102656         [!HAVE_SELINUX_SELINUX_H]: Use better parameter names.
102657         (fgetfilecon): Provide a stub.
102658         * m4/selinux-selinux-h.m4 (gl_HEADERS_SELINUX_SELINUX_H): Don't
102659         AC_SUBST SELINUX_SELINUX_H, since now we're generating that
102660         file unconditionally.
102661         When <selinux/selinux.h> is found, arrange to use wrappers.
102662         * modules/selinux-h (Files): Add getfilecon.c.
102663         (Makefile.am): Substitute include-next-related bits
102664         into the now-always-generated selinux/selinux.h file.
102665         * doc/glibc-functions/lgetfilecon.texi: New file.
102666         * doc/glibc-functions/fgetfilecon.texi: New file.
102667         * doc/glibc-functions/getfilecon.texi: New file.
102668         * doc/glibc-functions/getfilecon-desc.texi: New file.
102669         * doc/gnulib.texi (Glibc selinux/selinux.h): New section, by
102670         which to pull in the new files.
102671         * MODULES.html.sh (Misc): Add selinux-h.
102673 2009-10-08  Jim Meyering  <meyering@redhat.com>
102675         unistd: fix comment typo
102676         * lib/unistd.in.h (euidaccess): Fix a comment typo.
102678 2009-10-08  Eric Blake  <ebb9@byu.net>
102680         areadlink: use SIZE_MAX consistently
102681         * modules/areadlink (Depends-on): Add stdint.
102682         * modules/areadlink-with-size (Depends-on): Likewise.
102683         * lib/areadlink-with-size.c (includes): Drop stdio, since stdlib
102684         gives NULL; drop sys/types, since unistd gives size_t; and add
102685         stdint for SIZE_MAX.
102686         (SIZE_MAX): Rely on headers.
102687         * lib/areadlinkat-with-size.c (includes): Drop stdio, sys/types,
102688         and add stdint.
102689         * lib/areadlink.c (includes): Drop sys/types, and add stdint.
102690         (SIZE_MAX): Likewise.
102691         (INITIAL_BUF_SIZE): Turn into enum.
102692         * lib/areadlinkat.c (INITIAL_BUF_SIZE): Likewise.
102694 2009-10-08  Jim Meyering  <meyering@redhat.com>
102696         areadlinkat: avoid compilation failure
102697         * lib/areadlinkat.c: Include <stdint.h> for use of SIZE_MAX.
102698         Fix typo in comment.
102700 2009-10-07  Eric Blake  <ebb9@byu.net>
102702         areadlinkat-with-size: new module
102703         * modules/areadlinkat-with-size: New module.
102704         * lib/areadlinkat-with-size.c (areadlinkat_with_size): New file.
102705         * lib/areadlink.h (areadlinkat): Declare it.
102706         * MODULES.html.sh (File system functions): Mention it.
102707         * modules/areadlinkat-with-size-tests: New test.
102708         * tests/test-areadlinkat-with-size.c: New file.
102710         xreadlinkat: new module
102711         * modules/xreadlinkat: New module.
102712         * lib/xreadlinkat.c (xreadlinkat): New file.
102713         * lib/xreadlink.h (xreadlinkat): Declare it.
102714         * MODULES.html.sh (File system functions): Mention it.
102716         areadlinkat: new module
102717         * lib/at-func.c (FUNC_FAIL): New define.
102718         (AT_FUNC_NAME, VALIDATE_FLAG): Use it rather than raw -1.
102719         * modules/areadlinkat: New module.
102720         * lib/linkat.c (areadlinkat): Move...
102721         * lib/areadlinkat.c (areadlinkat): ...to new file.
102722         * lib/areadlink.h (areadlinkat): Declare it.
102723         * modules/linkat (Depends-on): Add areadlinkat.
102724         * MODULES.html.sh (File system functions): Mention it.
102725         * modules/areadlinkat-tests: New test.
102726         * tests/test-areadlinkat.c: New file.
102728         areadlink, areadlink-with-size: add tests
102729         * modules/areadlink-tests: New test.
102730         * modules/areadlink-with-size-tests: Likewise.
102731         * tests/test-areadlink.h: New file.
102732         * tests/test-areadlink.c: Likewise.
102733         * tests/test-areadlink-with-size.c: Likewise.
102735         maint: minor cleanups
102736         * lib/fts.c (ATTRIBUTE_UNUSED): Delete; use gnulib-guaranteed
102737         _UNUSED_PARAMETER_ instead.
102738         * lib/getdate.y (ATTRIBUTE_UNUSED): Likewise.
102739         * lib/utimens.c (ATTRIBUTE_UNUSED): Likewise.
102740         * modules/linkat-tests (Files): Distribute test-link.h.
102742         openat, utimens: whitespace cleanup
102743         * lib/openat.c: Prefer space throughout, rather than mix of 8
102744         spaces vs. tabs.
102745         * lib/at-func.c: Likewise.
102746         * lib/utimens.c: Likewise.
102748         openat: avoid using wrong fd
102749         * lib/openat.c (openat_permissive): Reject user's fd if saving the
102750         working directory chooses same fd.
102751         * lib/at-func.c (AT_FUNC_NAME): Likewise.
102753         mkdir, mkdirat: fix cygwin 1.5.x bug
102754         * lib/mkdir.c (rpl_mkdir) [FUNC_MKDIR_DOT_BUG]: Work around bug.
102755         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Move...
102756         * m4/mkdir.m4 (gl_FUNC_MKDIR): ...here, and add check for cygwin
102757         bug.
102758         (gl_PREREQ_MKDIR): Delete unused macro.
102759         * modules/mkdir (Files): Track file rename.
102760         (configure.ac): Update macro name.
102761         * modules/openat (Depends-on): Add mkdir.
102762         * doc/posix-functions/mkdir.texi (mkdir): Document the bug.
102764         mkdir, mkdirat: add tests
102765         * modules/mkdir-tests: New test.
102766         * tests/test-mkdir.h: New file.
102767         * tests/test-mkdir.c: Likewise.
102768         * tests/test-mkdirat.c: Likewise.
102769         * modules/openat-tests (Files): Add new files.
102770         (Makefile.am): Run new test.
102772 2009-10-06  Eric Blake  <ebb9@byu.net>
102774         doc: tweak *at function documentation
102775         * doc/posix-functions/faccessat.texi (faccessat): Mention
102776         known issue with replacement.
102777         * doc/posix-functions/fchdir.texi (fchdir): Likewise.
102778         * doc/posix-functions/linkat.texi (linkat): Likewise.
102779         * doc/posix-functions/mkfifoat.texi (mkfifoat): Likewise.
102780         * doc/posix-functions/mknodat.texi (mknodat): Likewise.
102781         * doc/posix-functions/readlinkat.texi (readlinkat): Likewise.
102782         * doc/posix-functions/renameat.texi (renameat): Likewise.
102783         * doc/posix-functions/symlinkat.texi (symlinkat): Likewise.
102785         openat: fix GNU/Hurd bug in unlinkat
102786         * m4/openat.m4 (gl_FUNC_OPENAT): Replace unlinkat if unlink is
102787         broken.
102788         * doc/posix-functions/unlink.texi (unlink): Document this.
102789         * doc/posix-functions/unlinkat.texi (unlinkat): Likewise.
102791         fdopendir: fix GNU/Hurd bug
102792         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Check for Hurd bug in
102793         allowing non-directory fds.
102794         * lib/fdopendir.c (rpl_fdopendir): Work around it.
102795         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): New witness.
102796         * modules/dirent (Makefile.am): Substitute it.
102797         * lib/dirent.in.h (fdopendir): Declare replacement.
102798         * doc/posix-functions/fdopendir.texi (fdopendir): Document this.
102799         * tests/test-fdopendir.c (main): Test something other than
102800         /dev/null, since on Hurd that behaves like a directory.
102802         test-symlink: port to GNU/Hurd
102803         * tests/test-symlink.h (test_symlink): Relax expected errno.
102805         doc: tweak more cygwin information
102806         * doc/glibc-headers/getopt.texi (getopt.h): Cygwin 1.7 getopt is
102807         now compatible with glibc.
102808         * doc/posix-functions/getopt.texi (getopt): Likewise.
102810         getopt-gnu: add another test
102811         * tests/test-getopt_long.h (test_getopt_long_posix): New test, to
102812         guarantee behavior relied on by m4.
102813         * tests/test-getopt.c (main): Use it.
102814         * modules/getopt-posix-tests (Depends-on): Add setenv.
102815         See http://lists.gnu.org/r/bug-m4/2006-09/msg00028.html.
102817         getopt: fix compilation on darwin
102818         * lib/getopt.in.h (includes): Leave breadcrumbs during system
102819         include.
102820         * lib/unistd.in.h (getopt): Use them to avoid recursive include.
102821         Reported by Ludovic Courtès.
102823 2009-10-06  Bruno Haible  <bruno@clisp.org>
102825         * modules/size_max (Description): Discourage its use.
102826         Reported by Simon Josefsson.
102828 2009-10-06  Jim Meyering  <meyering@redhat.com>
102830         linkat: avoid compilation failure
102831         * lib/linkat.c: Include <stdint.h> for use of SIZE_MAX.
102833 2009-10-05  Eric Blake  <ebb9@byu.net>
102835         linkat: support Linux 2.6.17
102836         * m4/linkat.m4 (gl_FUNC_LINKAT): Default to always replacing
102837         linkat on Linux, but allow cache variable override.
102838         * lib/linkat.c (rpl_linkat): Define override.
102839         * modules/linkat (Depends-on): Add symlinkat.
102840         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add new default.
102841         * modules/unistd (Makefile.am): Substitute it.
102842         * lib/unistd.in.h (linkat): Declare replacement.
102843         Reported by Pádraig Brady.
102845         quotearg: port test to systems with C.UTF-8 locale
102846         * tests/test-quotearg.c (struct result_strings): Add another
102847         member, differentiating between C.ASCII and C.UTF-8 handling.
102848         (compare_strings): Add parameter.
102849         (main): Adjust all callers.
102851         getopt: avoid clash with FreeBSD _getopt_internal
102852         * lib/getopt.in.h (_getopt_internal): Override the name.
102853         * lib/getopt_int.h (includes): Pick up any overrides.
102854         Reported by Reuben Thomas.
102856         hash: allow C89 compilation
102857         * lib/hash.c (check_tuning): Move declaration before statement.
102858         Reported by Reuben Thomas.
102860 2009-10-05  Karl Berry  <karl@gnu.org>
102862         * doc/gnulib.texi: @include execvpe.texi, missing for several days.
102864 2009-10-04  Paolo Bonzini  <bonzini@gnu.org>
102865             Bruno Haible  <bruno@clisp.org>
102867         * lib/uname.c (uname): Use a table-driven algorithm to compute
102868         Windows NT versions.
102870 2009-10-04  Bruno Haible  <bruno@clisp.org>
102872         * lib/progname.c (set_program_name): Also remove the "lt-" prefix from
102873         program_invocation_short_name.
102874         * modules/progname (configure.ac): Test for presence of
102875         program_invocation_short_name.
102876         Reported by Sergey Poznyakoff <gray@gnu.org.ua>.
102878 2009-10-04  Bruno Haible  <bruno@clisp.org>
102880         * lib/progname.c (set_program_name): Fix comment.
102881         Reported by Jim Meyering.
102883 2009-10-03  Paolo Bonzini  <bonzini@gnu.org>
102884             Bruno Haible  <bruno@clisp.org>
102886         * lib/uname.c: Include <string.h>.
102887         (uname): Do only one call to GetVersionEx in the common case.
102889 2009-10-03  Paolo Bonzini  <bonzini@gnu.org>
102890             Bruno Haible  <bruno@clisp.org>
102892         * lib/uname.c (VER_PLATFORM_WIN32_CE, PROCESSOR_ARCHITECTURE_AMD64,
102893         PROCESSOR_ARCHITECTURE_IA32_ON_WIN64): Define fallbacks.
102894         (uname): Add support for Windows CE and various non-x86 CPU types.
102896 2009-10-03  Bruno Haible  <bruno@clisp.org>
102898         * gnulib-tool (func_create_testdir): Conditionally emit AM_PROG_CC_C_O
102899         invocation to tests/configure.ac.
102900         Reported by Ian Beckwith <ianb@erislabs.net>.
102902 2009-10-02  Eric Blake  <ebb9@byu.net>
102904         fchdir: avoid compiler warning
102905         * lib/fchdir.c (canonicalize_file_name)
102906         [!HAVE_CANONICALIZE_FILE_NAME]: Avoid compiler warning on mingw.
102908         test-open: support mingw errno values
102909         * tests/test-open.h (test_open): Relax test.
102910         * tests/test-fopen.h (test_fopen): Likewise.
102911         * tests/test-openat-safer.c (main): Likewise.
102913         open: fix opening directory on mingw
102914         * lib/open.c (open) [REPLACE_OPEN_DIRECTORY]: Correct typo.
102916         test-open: on GNU/Hurd, /dev/null is a directory
102917         * tests/test-fopen.h (main): Rename...
102918         (test_fopen): ...to this.  Use a guaranteed non-directory when
102919         confirming open behavior on trailing slash.
102920         * tests/test-openat-safer.c (main): Likewise.
102921         * tests/test-open.h (main): Likewise....
102922         (test_open): ...to this.
102923         * tests/test-fopen.c (main): Adjust caller.
102924         * tests/test-fopen-safer.c (main): Likewise.
102925         * tests/test-open.c (main): Likewise.
102926         * tests/test-fcntl-safer.c (main): Likewise.
102927         Reported by Samuel Thibault.
102929         rename, fchdir: don't ignore chdir failure
102930         * lib/fchdir.c (get_name): Abort on unexpected chdir failure.
102931         * lib/rename.c (rpl_rename) [W32]: Likewise.
102932         (rpl_rename) [RENAME_DEST_EXISTS_BUG]: Avoid one case of losing
102933         an empty destination directory if source cannot be renamed,
102934         although there is still possibility for failure.
102935         * doc/posix-functions/rename.texi (rename): Document the race.
102936         Reported by Jim Meyering.
102938         maint: cleanup whitespace in recent commits
102939         * lib/rename.c (rpl_rename): Remove tabs.
102940         * tests/test-link.h (test_link): Likewise.
102941         * lib/fchdir.c (get_name): Likewise.
102942         Reported by Jim Meyering.
102944 2009-10-02  Ben Pfaff  <blp@gnu.org>
102946         relocatable-prog-wrapper: Add missing dependency on
102947         double-slash-root.
102948         * modules/relocatable-prog-wrapper: Add dependency.
102949         Reported by Ian Beckwith <ianb@erislabs.net>.
102951 2009-10-02  Eric Blake  <ebb9@byu.net>
102953         renameat: fix Solaris bugs
102954         * m4/renameat.m4 (gl_FUNC_RENAMEAT): Replace renameat if rename
102955         needed fixing.
102956         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): New witness.
102957         * modules/stdio (Makefile.am): Substitute it.
102958         * lib/stdio.in.h (renameat): Declare replacement.
102959         * lib/renameat.c (rpl_renameat): Implement fix.
102961         renameat: new module
102962         * modules/renameat: New file.
102963         * lib/renameat.c (renameat): Likewise.
102964         * m4/renameat.m4 (gl_FUNC_RENAMEAT): Likewise.
102965         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add witnesses.
102966         * modules/stdio (Makefile.am): Substitute them.
102967         * lib/stdio.in.h (renameat): Declare it.
102968         * MODULES.html.sh (systems lacking POSIX:2008): Mention module.
102969         * doc/posix-functions/renameat.texi (renameat): Likewise.
102970         * modules/renameat-tests: New test.
102971         * tests/test-renameat.c: Likewise.
102973         rename: fix mingw bugs
102974         * lib/rename.c (rpl_rename) [W32]: Fix trailing slash and
102975         directory overwrite bugs.
102977         rename: fix another cygwin 1.5 bug
102978         * m4/rename.m4 (gl_FUNC_RENAME): Split cygwin bugs into two
102979         checks.
102980         * lib/rename.c (rpl_rename): Don't penalize NetBSD with
102981         unnecessary cygwin workarounds.  Also work around bug with moving
102982         full directory onto an empty one.
102983         * modules/rename (Depends-on): Add canonicalize-lgpl, rmdir.
102985         rename-dest-slash: merge into rename module
102986         * modules/rename-dest-slash (Status): Mark obsolete.
102987         (Depends-on): Add rename.
102988         (Files): Let rename do it all.
102989         * m4/rename.m4 (gl_FUNC_RENAME): Also test for NetBSD bugs,
102990         subsuming the test from gl_FUNC_RENAME_TRAILING_DEST_SLASH...
102991         * m4/rename-dest-slash.m4: ...so this file can be deleted.
102992         * lib/rename-dest-slash.c (rpl_rename_dest_slash): Delete.
102993         * lib/rename.c (rpl_rename): Update comments.
102995         rename: fix cygwin 1.5.x bugs
102996         * m4/rename.m4 (gl_FUNC_RENAME): Detect cygwin bugs.
102997         * lib/rename.c (rpl_rename): Work around them.
102998         * modules/rename (Depends-on): Add same-inode.
103000         rename: fix Solaris 10 bug
103001         * m4/rename.m4 (gl_FUNC_RENAME): Detect Solaris bug.
103002         * lib/rename.c (rpl_rename): Don't cripple POSIX behavior if this
103003         was the only bug.
103005         rename: fix Solaris 9 bug
103006         * lib/rename.c (rpl_rename): Rewrite to recognize trailing slash
103007         on non-directory.  Avoid calling exit.
103008         * modules/rename (Depends-on): Drop xalloc; add lstat, stdbool,
103009         strdup.
103010         * modules/rename-tests (Depends-on): Drop lstat.
103011         * m4/rename.m4 (gl_FUNC_RENAME): Detect Solaris bug.
103012         (gl_PREREQ_RENAME): Delete unused macro.
103014         rename-dest-slash: fix NetBSD bug
103015         * lib/rename-dest-slash.c (rpl_rename_dest_slash): Detect hard
103016         links.
103017         * modules/rename-dest-slash (Depends-on): Add same-inode.
103019         rename-tests: new test, exposes several platform bugs
103020         * modules/rename-tests: New file.
103021         * tests/test-rename.h: Likewise.
103022         * tests/test-rename.c: Likewise.
103023         * doc/posix-functions/rename.texi (rename): Improve documentation,
103024         including bugs that will eventually be fixed in gnulib.
103026 2009-10-02  Paolo Bonzini  <bonzini@gnu.org>
103028         * lib/uname.c: Include <stdlib.h>
103029         (uname): Assume version info is available.
103031 2009-10-02  Jim Meyering  <meyering@redhat.com>
103033         gnu-web-doc-update: correct --help output
103034         * build-aux/gnu-web-doc-update: Make --help output relevant.
103036         gnu-web-doc-update: add standard options
103037         * build-aux/gnu-web-doc-update: Add --help, --version, etc.
103039         gnu-web-doc-update: New module.
103040         Use this script to automatically update the on-line web documentation
103041         for your GNU project at http://www.gnu.org/software/$pkg/manual/
103042         * modules/gnu-web-doc-update: New file, from coreutils.
103043         * build-aux/gnu-web-doc-update: New script.
103045 2009-10-01  Paolo Bonzini  <bonzini@gnu.org>
103047         link: LoadLibrary is not needed.
103048         * lib/link.c: Use GetModuleHandle.
103050 2009-10-01  Eric Blake  <ebb9@byu.net>
103052         getopt: bump serial number
103053         * m4/getopt.m4: Increment serial number, to account for 2009-09-24
103054         change.
103056         tests: tighten link, rmdir, and remove tests
103057         * tests/test-link.h (includes): No need to use <config.h> here.
103058         Clean up if directory hard link was created, otherwise test for
103059         trailing '.'.
103060         * tests/test-linkat.c (main): Simplify.
103061         * tests/test-remove.c (main): Enhance test for trailing '.'.
103062         * tests/test-rmdir.h (test_rmdir_func): Likewise.
103064 2009-10-01  Jim Meyering  <meyering@redhat.com>
103066         maint.mk: requiring "make major" was annoying, for a "minor" release.
103067         What is intended is "stable", to contrast with alpha and beta,
103068         so require "make stable", not "make major".
103069         * build-aux/announce-gen (%valid_release_types): s/major/stable/.
103070         (get_tool_versions): Likewise.
103071         * top/maint.mk (ALL_RECURSIVE_TARGETS): s/major/stable/
103073 2009-09-30  Ben Pfaff  <blp@gnu.org>
103075         Fix broken build of replacement for Windows tmpfile().
103076         * lib/tmpfile.c (tmpfile): Fix call to gen_tempname() to provide
103077         flags argument added along with the 'mkostemp' module.
103079 2009-09-28  Bruno Haible  <bruno@clisp.org>
103081         Avoid identifier clash with POSIX function 'remove' defined as a macro.
103082         * lib/gl_list.h (struct gl_list_implementation): Rename field 'remove'
103083         to 'remove_elt'.
103084         (gl_list_remove): Update.
103085         * lib/gl_list.c (gl_list_remove): Update.
103086         * lib/gl_oset.h (struct gl_oset_implementation): Rename field 'remove'
103087         to 'remove_elt'.
103088         (gl_oset_remove): Update.
103089         * lib/gl_list.c (gl_oset_remove): Update.
103090         Reported by Eric Blake.
103092 2009-09-28  Eric Blake  <ebb9@byu.net>
103094         doc: mention yet more cygwin 1.7 status
103095         * doc/posix-functions/fexecve.texi (fexecve): Now implemented in
103096         cygwin.
103097         * doc/glibc-functions/execvpe.texi (execvpe): New file.
103098         * doc/gnulib.texi (Glibc unistd.h): Mention it.
103100         argp: fix test failure
103101         * lib/argp-help.c (hol_entry_cmp): Don't use _tolower on values
103102         that are not upper-case.  Pass correct range to tolower.
103104 2009-09-27  Jim Meyering  <meyering@redhat.com>
103106         test-yesno: work around sparc-dash here-document infelicity
103107         Without this change, the literal \177 byte in a here document
103108         would make dash 0.5.5.1-3 access uninitialized memory.
103109         * tests/test-yesno.sh: Don't put the \177 byte in the here document.
103110         Instead, use a marker, "@", and filter through tr to create the desired
103111         contents.  Reported as <http://bugs.debian.org/548493> by Kurt Roeckx.
103113 2009-09-27  Bruno Haible  <bruno@clisp.org>
103115         Disable untested support for new flavours of ACLs on AIX.
103116         * lib/file-has-acl.c (file_has_acl): Mark newer AIX code as work in
103117         progress.
103118         * lib/set-mode-acl.c (qset_acl): Likewise.
103120 2008-12-07  Bruno Haible  <bruno@clisp.org>
103122         Add support for new flavours of ACLs on AIX. (Untested.)
103123         * lib/file-has-acl.c [AIX] (acl_nfs4_nontrivial): New function.
103124         (file_has_acl): Add support for newer AIX.
103125         * lib/set-mode-acl.c (qset_acl): Likewise.
103126         * tests/test-sameacls.c (main): Fix use of aclx_get function. Hint by
103127         Rainer Tammer <tammer@tammer.net>.
103129 2009-09-26  Eric Blake  <ebb9@byu.net>
103131         argp: fix compilation of getopt
103132         * lib/getopt.in.h (includes): Use different guard than glibc.
103133         Reported by Sergey Poznyakoff.
103135         doc: mention more cygwin 1.7 status
103136         * doc/posix-functions/access.texi (access): Mention cygwin 1.5
103137         bug.
103138         * doc/posix-functions/execl.texi (execl): Likewise.
103139         * doc/posix-functions/execle.texi (execle): Likewise.
103140         * doc/posix-functions/execlp.texi (execlp): Likewise.
103141         * doc/posix-functions/execv.texi (execv): Likewise.
103142         * doc/posix-functions/execve.texi (execve): Likewise.
103143         * doc/posix-functions/execvp.texi (execvp): Likewise.
103144         * doc/glibc-functions/canonicalize_file_name.texi
103145         (canonicalize_file_name): Cygwin 1.7 now provides this.
103146         * doc/glibc-functions/euidaccess.texi (euidaccess): Likewise.
103147         * doc/posix-functions/fchmodat.texi (fchmodat): Mention limitation
103148         on AT_SYMLINK_NOFOLLOW.
103150 2009-09-24  Eric Blake  <ebb9@byu.net>
103152         test-linkat: make test more robust
103153         * tests/test-linkat.c (main): Avoid collision with EEXIST.
103155         getopt: fix inclusion guards for cygwin
103156         * modules/getopt-posix (Depends-on): Add include-next.
103157         (Makefile.am): Substitute more items in replacement header.
103158         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Also check for native
103159         <getopt.h>.
103160         * lib/getopt.in.h (includes): Use split inclusion guard, and
103161         prefer <getopt.h> over include <unistd.h> when one is present.
103162         (option): Also override name of 'struct option'.
103164         same-inode: revert prior change; it is not yet ready
103165         * NEWS: Undo mention of this change.
103166         * lib/same-inode.h (same-inode.h): Undo tri-state change.
103167         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Update caller.
103168         * lib/cycle-check.c (cycle_check): Likewise.
103169         * lib/same.c (same_name): Likewise.
103170         * lib/at-func2.c (at_func2): Likewise.
103172 2009-09-23  Eric Blake  <ebb9@byu.net>
103174         linkat: new module
103175         * modules/linkat: New file.
103176         * lib/at-func2.c (at_func2): Likewise.
103177         * lib/linkat.c (linkat): Likewise.
103178         * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise.
103179         * lib/openat-priv.h (at_func2): Add declaration.
103180         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witnesses.
103181         * modules/unistd (Makefile.am): Substitute them.
103182         * lib/unistd.in.h (linkat): Declare it.
103183         * MODULES.html.sh (systems lacking POSIX:2008): Mention module.
103184         * doc/posix-functions/linkat.texi (linkat): Likewise.
103185         * doc/posix-functions/link.texi (link): Tweak wording.
103186         * tests/test-link.c (main): Move guts...
103187         * tests/test-link.h (test_link): ...into new file.
103188         * modules/linkat-tests: New test.
103189         * tests/test-linkat.c: Likewise.
103190         * modules/link-tests (Files): Ship new file.
103191         (Depends-on): Add stdbool.
103193         dirname: add library-safe mdir_name
103194         * lib/dirname.h (mdir_name): New prototype.
103195         * lib/dirname.c (dir_name): Move guts...
103196         (mdir_name): ...to new function that avoids xalloc_die.
103198         fchdir: another mingw fix
103199         * modules/fchdir (Depends-on): Drop canonicalize-lgpl.
103200         * lib/fchdir.c (get_name): New helper method; skips canonicalize
103201         on mingw (where it has not yet been ported), and make it optional
103202         elsewhere.
103203         (_gl_register_fd): Use it.
103205         same-inode: make SAME_INODE tri-state, to port to mingw
103206         * NEWS: Mention this change.
103207         * lib/same-inode.h (same-inode.h): Recognize mingw limitation of
103208         st_ino always being 0.
103209         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Update caller.
103210         * lib/cycle-check.c (cycle_check): Likewise.
103211         * lib/same.c (same_name): Likewise.
103213         lstat: avoid mingw compilation error
103214         * m4/lstat.m4 (gl_FUNC_LSTAT): Avoid duplicate calls to
103215         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, and deal with missing
103216         lstat ourselves.
103217         * lib/lstat.c [!HAVE_LSTAT]: Do nothing if <sys/stat.h> override
103218         was adequate.
103219         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Let lstat module handle
103220         the checks for lstat.
103221         (gl_SYS_STAT_H_DEFAULTS): Set default for HAVE_LSTAT.
103223         link: fix test failure on Solaris 9
103224         * lib/link.c (rpl_link): Don't assume link will catch bogus
103225         trailing slash on source.
103227         test-symlinkat: enhance test
103228         * tests/test-readlink.c (main): Move guts...
103229         * tests/test-readlink.h (test_readlink): ...into new file.
103230         * tests/test-symlink.c (main): Move guts...
103231         * tests/test-symlink.h (test_symlink): ...into new file.
103232         * tests/test-symlinkat.c (main): Use new files for further
103233         coverage.
103234         (do_symlink, do_readlink): New helper functions.
103235         * modules/symlink-tests (Files): Ship new file.
103236         (Depends-on): Add stdbool.
103237         * modules/readlink-tests (Files): Ship new file.
103238         (Depends-on): Add stdbool.
103239         * modules/symlinkat-tests (Files): Use new files.
103241 2009-09-23  Eric Blake  <ebb9@byu.net>
103243         readlink: document portability issue with symlink length
103244         * doc/posix-functions/lstat.texi (lstat): Mention that some file
103245         systems have bogus st_size on symlinks, and mention the
103246         areadlink-with-size module.
103247         * doc/posix-functions/fstatat.texi (fstatat): Likewise.
103248         * doc/posix-functions/readlink.texi (readlink): Mention the
103249         areadlink module, and ERANGE failure.
103250         * doc/posix-functions/readlinkat.texi (readlinkat): Likewise.
103251         * tests/test-readlink.c (main): Relax test for AIX, HP-UX.
103253         readlink: fix Solaris 9 bug with trailing slash
103254         * lib/readlink.c (rpl_readlink): Work around trailing slash bug.
103255         * m4/readlink.m4 (gl_FUNC_READLINK): Detect the bug.
103256         * doc/posix-functions/readlink.texi (readlink): Document this.
103257         * modules/readlink-tests: New test.
103258         * tests/test-readlink.c: Likewise.
103260         readlink: fix cygwin 1.5.x bug with return type
103261         * m4/readlink.m4 (gl_FUNC_READLINK): Require correct signature.
103262         * lib/unistd.in.h (readlink): Use ssize_t.
103263         * lib/readlink.c (readlink): Likewise.
103264         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness.
103265         * modules/unistd (Makefile.am): Substitute it.
103266         * lib/unistd.in.h (readlink): Declare replacement.
103267         * doc/posix-functions/readlink.texi (readlink): Document this.
103269         symlink: use throughout gnulib
103270         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Omit symlink check.
103271         * lib/symlinkat.c (symlinkat) [!HAVE_SYMLINK]: Document why
103272         symlink is not used.
103273         * modules/symlinkat (Depends-on): Add symlink.
103274         * modules/canonicalize-lgpl-tests (Depends-on): Likewise.
103275         * modules/canonicalize-tests (Depends-on): Likewise.
103276         * modules/lstat-tests (Depends-on): Likewise.
103277         * modules/openat-tests (Depends-on): Likewise.
103278         * modules/remove-tests (Depends-on): Likewise.
103279         * modules/rmdir-tests (Depends-on): Likewise.
103280         * modules/unlink-tests (Depends-on): Likewise.
103281         * tests/test-canonicalize-lgpl.c (symlink): Delete stub.
103282         * tests/test-canonicalize.c (symlink): Likewise.
103283         * tests/test-fstatat.c (symlink): Likewise.
103284         * tests/test-lstat.c (symlink): Likewise.
103285         * tests/test-remove.c (symlink): Likewise.
103286         * tests/test-rmdir.c (symlink): Likewise.
103287         * tests/test-unlink.c (symlink): Likewise.
103288         * tests/test-unlinkat.c (symlink): Likewise.
103290         symlink: new module, for Solaris 9 bug
103291         * modules/symlink: New file.
103292         * m4/symlink.m4 (gl_FUNC_SYMLINK): Likewise.
103293         * lib/symlink.c: Likewise.
103294         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add defaults.
103295         * modules/unistd (Makefile.am): Substitute them.
103296         * lib/unistd.in.h (symlink): Declare replacement.
103297         * MODULES.html.sh (File system functions): Mention it.
103298         * doc/posix-functions/symlink.texi (symlink): Likewise.
103299         * modules/symlink-tests: New test.
103300         * tests/test-symlink.c: Likewise.
103302 2009-09-23  Bruno Haible  <bruno@clisp.org>
103304         * gnulib-tool (func_import): Add 'link-warning' to testsrelated_modules
103305         when needed.
103306         Test case: gnulib-tool --import --with-tests atexit inttypes.
103307         Reported by Pauli Miettinen <pauli.miettinen@cs.helsinki.fi>.
103309 2009-09-23  Bruno Haible  <bruno@clisp.org>
103311         * gnulib-tool (func_emit_tests_Makefile_am): Set uses_subdirs in a
103312         subcommand, not in a subshell.
103314 2009-09-22  Eric Blake  <ebb9@byu.net>
103316         unistd: sort replacement declarations
103317         * lib/unistd.in.h: Sort declarations.
103319         open, openat: minor optimization
103320         * lib/open.c (open): If open succeeded, len is non-zero.
103321         * lib/openat.c (rpl_openat): Likewise.
103323         link-follow: ensure correct result
103324         * m4/fcntl_h.m4 (gl_FCNTL_H): Clean up temporary file.
103325         * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Likewise, and
103326         distinguish between possible failures.
103328 2009-09-21  Eric Blake  <ebb9@byu.net>
103330         fts: avoid compiler warning
103331         * lib/fts.c (dirent_inode_sort_may_be_useful)
103332         (leaf_optimization_applies) [!__linux__]: Mark unused parameters.
103334 2009-09-19  Bruno Haible  <bruno@clisp.org>
103336         * lib/progreloc.c (canonicalize_file_name): New declaration.
103338 2009-09-19  Eric Blake  <ebb9@byu.net>
103340         link: fix quoting
103341         * m4/link.m4 (gl_FUNC_LINK): Fix shell quoting.
103343         openat: fix openat bugs on Solaris 9
103344         * lib/openat.c (rpl_openat): Work around Solaris 9 bug.
103345         * m4/openat.m4 (gl_FUNC_OPENAT): Also replace openat on Solaris.
103346         * modules/openat (Depends-on): Add open.
103347         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Provide new default.
103348         * modules/fcntl-h (Makefile.am): Substitute it.
103349         * lib/fcntl.in.h (openat): Declare replacement.
103350         * doc/posix-functions/openat.texi (openat): Document this.
103352         openat: move fstatat and unlinkat into correct files
103353         * m4/openat.m4 (gl_FUNC_OPENAT): Adjust which files will be
103354         compiled.
103355         * lib/openat.c (fstatat, unlinkat): Move...
103356         * lib/fstatat.c (fstatat): ...into correct files.
103357         * lib/unlinkat.c (unlinkat): Likewise.
103359         openat: fix unlinkat bugs on Solaris 9
103360         * lib/unlinkat.c (unlinkat): New file.
103361         * modules/openat (Depends-on): Add unlink.
103362         (Files): Distribute it.
103363         * m4/openat.m4 (gl_FUNC_OPENAT): Mark unlinkat for replacement if
103364         trailing slash behavior is broken.
103365         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness.
103366         * modules/unistd (Makefile.am): Substitute it.
103367         * lib/unistd.in.h (unlinkat): Declare replacement.
103368         * doc/posix-functions/unlinkat.texi (unlinkat): Document this.
103370         openat: fix fstatat bugs on Solaris 9
103371         * lib/fstatat.c (rpl_fstatat): Copy recent fixes from lstat and
103372         stat.
103373         * doc/posix-functions/fstatat.texi (fstatat): Document this.
103375         test-unlinkat: enhance test, to expose Solaris 9 bug
103376         * tests/test-unlink.c (main): Factor guts...
103377         * tests/test-unlink.h (test_rmdir_func): ...into new file.
103378         * tests/test-rmdir.h (test_rmdir_func): Add parameter.
103379         * tests/test-rmdir.c (main): Adjust caller.
103380         * tests/test-unlinkat.c (main): Likewise.  Add unlink tests.
103381         (unlinker): New helper function.
103382         (rmdirat): Enhance check.
103383         * modules/rmdir-tests (Depends-on): Add stdbool.
103384         * modules/unlink-tests (Depends-on): Likewise.
103385         (Files): Add test-unlink.h.
103386         * modules/openat-tests (Files): Likewise.
103387         (Depends-on): Add unlinkdir.
103389         test-fstatat: new test, to expose Solaris 9 bugs
103390         * tests/test-stat.c (main): Factor guts...
103391         * tests/test-stat.h (test_stat_func): ...into new file.
103392         * tests/test-lstat.c (main): Factor guts...
103393         * tests/test-lstat.h (test_lstat_func): ...into new file.
103394         * tests/test-fstatat.c: New file.
103395         * modules/stat-tests (Files): Add test-stat.h.
103396         * modules/lstat-tests (Files): Add test-lstat.h.
103397         (Depends-on): Add stdbool.
103398         * modules/openat-tests (Depends-on): Add pathmax.
103399         (Files): Add test-lstat.h, test-stat.h, test-fstatat.c.
103400         (Makefile.am): Run new test.
103402         remove: new module, for mingw and Solaris 9 bugs
103403         * modules/remove: New file.
103404         * lib/remove.c: Likewise.
103405         * m4/remove.m4 (gl_FUNC_REMOVE): Likewise.
103406         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add witnesses.
103407         * modules/stdio (Makefile.am): Use them.
103408         * lib/stdio.in.h (remove): Declare replacement.
103409         * MODULES.html.sh (systems lacking POSIX:2008): Mention module.
103410         * doc/posix-functions/remove.texi (remove): Likewise.
103411         * modules/remove-tests: New test.
103412         * tests/test-remove.c: Likewise.
103414         unlink: new module, for Solaris 9 bug
103415         * modules/unlink: New file.
103416         * lib/unlink.c: Likewise.
103417         * m4/unlink.m4 (gl_FUNC_UNLINK): Likewise.
103418         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witnesses.
103419         * modules/unistd (Makefile.am): Use them.
103420         * lib/unistd.in.h (stat): Declare replacement.
103421         * MODULES.html.sh (systems lacking POSIX:2008): Mention module.
103422         * doc/posix-functions/unlink.texi (unlink): Likewise.
103423         * modules/unlink-tests: New test.
103424         * tests/test-unlink.c: Likewise.
103426         lstat: fix Solaris 9 bug
103427         * lib/lstat.c (lstat): Also check for trailing slash on
103428         non-symlink, non-directories.  Use stat module to simplify logic.
103429         * doc/posix-functions/lstat.texi (lstat): Document it.
103430         * modules/lstat-tests (Depends-on): Add errno, same-inode.
103431         (configure.ac): Check for symlink.
103432         * tests/test-lstat.c (main): Add more tests.
103434         stat: add as dependency to other modules
103435         * modules/chown (Depends-on): Add stat.
103436         * modules/euidaccess (Depends-on): Likewise.
103437         * modules/fchdir (Depends-on): Likewise.
103438         * modules/isdir (Depends-on): Likewise.
103439         * modules/link (Depends-on): Likewise.
103440         * modules/lstat (Depends-on): Likewise.
103441         * modules/mkdir-p (Depends-on): Likewise.
103442         * modules/modechange (Depends-on): Likewise.
103443         * modules/open (Depends-on): Likewise.
103444         * modules/readlink (Depends-on): Likewise.
103445         * modules/same (Depends-on): Likewise.
103447         stat: fix Solaris 9 bug
103448         * m4/stat.m4 (gl_FUNC_STAT): Detect Solaris 9 bug with trailing
103449         slash.
103450         * lib/stat.c (rpl_stat): Work around it.
103451         * doc/posix-functions/stat.texi (stat): Update documentation.
103453         stat: new module, for mingw bug
103454         * modules/stat: New file.
103455         * lib/stat.c: Likewise.
103456         * m4/stat.m4 (gl_FUNC_STAT): Likewise.
103457         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Add witnesses.
103458         * modules/sys_stat (Makefile.am): Use them.
103459         * lib/sys_stat.in.h (stat): Declare replacement.
103460         * lib/openat.c (fstatat): Deal with lstat and stat being function
103461         macros.
103462         * modules/openat (Depends-on): Add inline.
103463         * MODULES.html.sh (systems lacking POSIX:2008): Mention module.
103464         * doc/posix-functions/stat.texi (stat): Likewise.
103465         * modules/stat-tests: New test.
103466         * tests/test-stat.c: Likewise.
103468 2009-09-19  Jim Meyering  <meyering@redhat.com>
103470         syntax-check: detect unnecessary inclusion of canonicalize.h
103471         * top/maint.mk (sc_prohibit_canonicalize_without_use): New rule.
103473 2009-09-19  Eric Blake  <ebb9@byu.net>
103475         canonicalize-lgpl: adjust clients to use correct header
103476         * m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE)
103477         (gl_CANONICALIZE_LGPL): Use correct shell quoting.
103478         * modules/relocatable-prog-wrapper (Files): Drop canonicalize.h.
103479         * lib/fchdir.c (includes): Use <stdlib.h>, not "canonicalize.h".
103480         * lib/progreloc.c (includes): Likewise.
103482 2009-09-19  Jim Meyering  <meyering@redhat.com>
103484         test-posixtm.c: correct a comment
103485         * tests/test-posixtm.c: Correct first-line comment.
103486         Spotted by Eric Blake.
103488 2009-09-16  Jim Meyering  <meyering@redhat.com>
103490         posixtm-tests: make T const-correct; add a test case
103491         * tests/test-posixtm.c (T): Declare const.
103492         Add a test for -(2^31+1).
103493         Remove useless can-succeed-only-in-2002 test.
103495         posixtm-tests: adjust the sole failing test
103496         * tests/test-posixtm.c: Correct 0000-01-01 00:00:00 test so that
103497         expected output matches what mktime now produces.  Cross-checked via
103498         erlang's calendar:datetime_to_gregorian_seconds({{1970,1,1},{0,0,0}})
103500         posixtm: move #ifdef'd tests into a new module
103501         * lib/posixtm.c (posixtime): Remove #ifdef'd tests.  Move to...
103502         * tests/test-posixtm.c: ... this new file.
103503         * modules/posixtm-tests: New module.
103505 2009-09-19  Eric Blake  <ebb9@byu.net>
103507         openat: simplify use of at-func.c
103508         * lib/at-func.c (includes): Include prerequisites here, to
103509         simplify requirements on client files.
103510         * lib/openat-priv.h: Add double-inclusion guard.
103511         * lib/faccessat.c (includes): Simplify.
103512         * lib/fchmodat.c (includes): Likewise.
103513         * lib/fchownat.c (includes): Likewise.
103514         * lib/mkdirat.c (includes): Likewise.
103515         * lib/mkfifoat.c (includes): Likewise.
103516         * lib/symlinkat.c (includes): Likewise.
103518         openat: allow return of fd 0
103519         * modules/chdir-long (Depends-on): Relax openat-safer to openat.
103520         * modules/save-cwd (Depends-on): Replace fcntl-safer with
103521         unistd-safer.
103522         * lib/chdir-long.c (includes): Replace "fcntl--.h" with
103523         <fcntl.h>; this module does not leak fds.
103524         * lib/openat.c (includes): Do not use "fcntl_safer"; plain openat
103525         must be allowed to return 0, leaving openat_safer to add the
103526         safety.
103527         (openat_permissive): Avoid writing to just-opened fd 2 if
103528         restoring the current directory fails.
103529         * lib/openat-die.c (openat_restore_fail): Add comment.
103530         * lib/save-cwd.c (includes): Make "fcntl--.h" conditional.
103531         (save_cwd): Guarantee safe fd, but without use of open_safer.
103532         * tests/test-openat.c: New test.
103533         * modules/openat-tests (Files, Makefile.am): Distribute and build
103534         new file.
103536         relocatable-prog-wrapper: fix build
103537         * modules/relocatable-prog-wrapper (Files): Update name of
103538         canonicalize m4 file, broken on 2009-09-17.
103539         Reported by emad hajjar <aleppos@hotmail.com>.
103541 2009-09-19  Bruno Haible  <bruno@clisp.org>
103543         * lib/safe-alloc.h: Use the standard header with GPL copyright.
103544         * lib/safe-alloc.c: Likewise.
103545         Reported by Ian Beckwith <ianb@erislabs.net>.
103547 2009-09-18  Bruno Haible  <bruno@clisp.org>
103549         * gnulib-tool: Add advice to "cannot find configure.ac" error message.
103550         Reported by <erobles@sensacd.com.mx>.
103552 2009-09-17  Eric Blake  <ebb9@byu.net>
103554         canonicalize: in CAN_ALL_BUT_LAST, allow trailing slash
103555         * lib/canonicalize.c (canonicalize_filename_mode): Skip trailing
103556         slashes when checking if last component is missing.
103557         * tests/test-canonicalize.c (main): Test this.
103559         canonicalize, canonicalize-lgpl: honor // if distinct from /
103560         * modules/canonicalize (Files): Add double-slash-root.m4.
103561         * modules/canonicalize-lgpl (Files): Likewise.
103562         * m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE)
103563         (gl_CANONICALIZE_LGPL_SEPARATE): Add dependency.
103564         * lib/canonicalize.c (DOUBLE_SLASH_IS_DISTINCT_ROOT): Provide
103565         fallback definition.
103566         (canonicalize_filename_mode): Use it to protect //.
103567         * lib/canonicalize-lgpl.c (DOUBLE_SLASH_IS_DISTINCT_ROOT)
103568         (__realpath): Likewise.
103569         * tests/test-canonicalize.c (main): Test this.
103570         * tests/test-canonicalize-lgpl.c (main): Likewise.
103571         * modules/canonicalize-tests (Depends-on): Add same-inode.
103572         * modules/canonicalize-lgpl-tests (Depends-on): Likewise.
103574         canonicalize-lgpl: fix glibc bug with trailing slash
103575         * m4/canonicalize-lgpl.m4: Move contents...
103576         * m4/canonicalize.m4: ...here.
103577         (gl_CANONICALIZE_LGPL): Factor realpath check...
103578         (gl_FUNC_REALPATH_WORKS): ...into new macro.  Enhance to catch
103579         glibc 2.3.5 bug, fixed 2005-04-27.
103580         (gl_FUNC_CANONICALIZE_FILENAME_MODE): Use it.
103581         (gl_PREREQ_CANONICALIZE_LGPL): Inline...
103582         (gl_CANONICALIZE_LGPL_SEPARATE): ...into this macro.
103583         * modules/canonicalize-lgpl (Files): Manage file rename.
103584         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Provide default.
103585         * modules/stdlib (Makefile.am): Substitute witness.
103586         * lib/stdlib.in.h (canonicalize_file_name): Declare if replacement
103587         is needed.
103588         * lib/canonicalize-lgpl.c: Also compile if canonicalize_file_name
103589         replacement is required.
103590         * lib/canonicalize.c (canonicalize_file_name): Likewise.
103591         * doc/glibc-functions/canonicalize_file_name.texi
103592         (canonicalize_file_name): Document this.
103593         * doc/posix-functions/realpath.texi (realpath): Likewise.
103595         canonicalize-lgpl: reject non-directory with trailing slash
103596         * lib/canonicalize-lgpl.c (__realpath): Synchronize with glibc.
103597         * tests/test-canonicalize-lgpl.c (main): Enhance test.  This
103598         catches failures in glibc 2.3.5.
103599         * tests/test-canonicalize.c (main): Likewise.
103601         canonicalize-lgpl: use native realpath if it works
103602         * lib/canonicalize-lgpl.c (realpath): Guard with
103603         FUNC_REALPATH_WORKS.
103604         * lib/stdlib.in.h (realpath): Make declaration optional based on
103605         HAVE_REALPATH.
103606         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL): Check whether
103607         native realpath works.
103608         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Provide default.
103609         * modules/stdlib (Makefile.am): Substitute witness.
103611         canonicalize, canonicalize-lgpl: use <stdlib.h>
103612         * modules/canonicalize-lgpl (Files): Drop canonicalize.h.
103613         (Include): Mention <stdlib.h>.
103614         (configure.ac): Mention functions we provide.
103615         * modules/canonicalize (configure.ac): Likewise.
103616         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL): Always replace
103617         realpath if canonicalize_file_name is missing.
103618         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Provide defaults.
103619         * modules/stdlib (Makefile.am): Substitute witnesses.
103620         * lib/stdlib.in.h (canonicalize_file_name, realpath): Declare.
103621         * lib/canonicalize-lgpl.c (includes): Adjust accordingly.
103622         * lib/canonicalize.h (canonicalize_file_name): Drop declaration.
103623         * NEWS: Document this.
103624         * doc/glibc-functions/canonicalize_file_name.texi
103625         (canonicalize_file_name): Likewise.
103626         * doc/posix-functions/realpath.texi (realpath): Likewise.
103627         * tests/test-canonicalize-lgpl.c (includes): Use <stdlib.h>.
103629         test-canonicalize: consolidate into single C program
103630         * tests/test-canonicalize.sh: Delete; move setup into...
103631         * tests/test-canonicalize.c (main): ...the program, making it
103632         easier to run in debugger.  Add some tests.
103633         * modules/canonicalize-tests (Files): Remove unused file.
103634         (Depends-on): Add progname.
103635         (configure.ac, Makefile.am): Simplify.
103637         test-canonicalize-lgpl: consolidate into single C program
103638         * tests/test-canonicalize-lgpl.sh: Delete; move setup into...
103639         * tests/test-canonicalize-lgpl.c (main): ...the program, making it
103640         easier to run in debugger.  Add some tests.
103641         * modules/canonicalize-lgpl-tests (Files): Remove unused file.
103642         (configure.ac, Makefile.am): Simplify.
103644         canonicalize: avoid resolvepath
103645         * m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE): Delete
103646         unnecessary checks.
103647         * lib/canonicalize.c (includes): Simplify.
103648         (canonicalize_file_name): Drop resolvepath implementation.
103649         * modules/canonicalize (Depends-on): Drop filenamecat.
103651         canonicalize: don't lose errno
103652         * lib/canonicalize.c (canonicalize_filename_mode): Protect errno
103653         over calls to free.
103655         canonicalize: simplify errno handling
103656         * lib/canonicalize.c (__set_errno): Delete macro, and use direct
103657         assignment.
103659         canonicalize, canonicalize-lgpl: update module dependencies
103660         * modules/canonicalize (Depends-on): Add extensions, lstat,
103661         pathmax, stdlib.
103662         (Files): Drop pathmax.h.
103663         (configure.ac): Adjust macro name.
103664         * modules/canonicalize-lgpl (Depends-on): Add errno, extensions,
103665         lstat, stdlib, sys_stat.
103666         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Rename...
103667         (gl_FUNC_CANONICALIZE_FILENAME_MODE): ...to this, and require
103668         extensions.
103669         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL)
103670         (gl_CANONICALIZE_LGPL_SEPARATE): Require extensions.
103671         (gl_PREREQ_CANONICALIZE_LGPL): Assume unistd.h.
103672         * lib/canonicalize.h (canonicalize_file_name): Use <stdlib.h>
103673         declaration, if available.
103674         * lib/canonicalize-lgpl.c [HAVE_READLINK]: Delete this condition;
103675         we can rely on the readlink module.
103676         (MAXSYMLINKS): Also consult SYMLOOP_MAX.
103677         (includes): Use <unistd.h> unconditionally.
103679 2009-09-17  Eric Blake  <ebb9@byu.net>
103681         maint: make Include sections of modules consistent
103682         * modules/alloca: Use only header name; no need to list #include.
103683         * modules/alloca-opt: Likewise.
103684         * modules/arpa_inet: Likewise.
103685         * modules/canon-host: Likewise.
103686         * modules/configmake: Likewise.
103687         * modules/dirent: Likewise.
103688         * modules/eealloc: Likewise.
103689         * modules/environ: Likewise.
103690         * modules/fchdir: Likewise.
103691         * modules/fcntl: Likewise.
103692         * modules/fcntl-h: Likewise.
103693         * modules/gethrxtime: Likewise.
103694         * modules/gettime: Likewise.
103695         * modules/ignore-value: Likewise.
103696         * modules/inet_ntop: Likewise.
103697         * modules/inet_pton: Likewise.
103698         * modules/inttypes: Likewise.
103699         * modules/isnand-nolibm: Likewise.
103700         * modules/isnanf-nolibm: Likewise.
103701         * modules/mbchar: Likewise.
103702         * modules/mbfile: Likewise.
103703         * modules/mbiter: Likewise.
103704         * modules/mbuiter: Likewise.
103705         * modules/netdb: Likewise.
103706         * modules/netinet_in: Likewise.
103707         * modules/nproc: Likewise.
103708         * modules/pagealign_alloc: Likewise.
103709         * modules/poll: Likewise.
103710         * modules/printf-frexp: Likewise.
103711         * modules/pthread: Likewise.
103712         * modules/putenv: Likewise.
103713         * modules/random_r: Likewise.
103714         * modules/relocatable-prog: Likewise.
103715         * modules/search: Likewise.
103716         * modules/select: Likewise.
103717         * modules/selinux-h: Likewise.
103718         * modules/settime: Likewise.
103719         * modules/signal: Likewise.
103720         * modules/size_max: Likewise.
103721         * modules/socklen: Likewise.
103722         * modules/ssize_t: Likewise.
103723         * modules/stdarg: Likewise.
103724         * modules/stdbool: Likewise.
103725         * modules/stddef: Likewise.
103726         * modules/stdint: Likewise.
103727         * modules/stdio: Likewise.
103728         * modules/stdlib: Likewise.
103729         * modules/string: Likewise.
103730         * modules/strings: Likewise.
103731         * modules/sys_file: Likewise.
103732         * modules/sys_ioctl: Likewise.
103733         * modules/sys_select: Likewise.
103734         * modules/sys_socket: Likewise.
103735         * modules/sys_stat: Likewise.
103736         * modules/sys_time: Likewise.
103737         * modules/sys_times: Likewise.
103738         * modules/sys_utsname: Likewise.
103739         * modules/sys_wait: Likewise.
103740         * modules/sysexits: Likewise.
103741         * modules/time: Likewise.
103742         * modules/times: Likewise.
103743         * modules/tmpfile: Likewise.
103744         * modules/trim: Likewise.
103745         * modules/unistd: Likewise.
103746         * modules/wchar: Likewise.
103747         * modules/wctype: Likewise.
103749 2009-09-17  Bruno Haible  <bruno@clisp.org>
103751         Make getdate.y compile on QNX and NetBSD 5 / i386.
103752         * m4/getdate.m4 (gl_GETDATE): Conditionally define
103753         TIME_T_FITS_IN_LONG_INT.
103754         * lib/getdate.y (long_time_t): New type.
103755         (relative_time): Change type of 'seconds' field to long_time_t.
103756         (get_date): Update types of local variables. Check against overflow
103757         during conversion from long_time_t to time_t.
103758         Reported by Matt Kraai <kraai@ftbfs.org>
103759         and Hasso Tepper <hasso@netbsd.org>.
103761 2009-09-17  Bruno Haible  <bruno@clisp.org>
103763         * modules/COPYING: Update copyright years.
103764         * modules/README: Likeiwse.
103765         * doc/gnulib-intro.texi (Copyright): Use a wildcard year.
103766         Reported by Ian Beckwith <ianb@erislabs.net>.
103768 2009-09-17  Ian Beckwith  <ianb@erislabs.net>  (tiny change)
103770         * users.txt: Update references for gnuit package.
103772 2009-09-17  Ian Beckwith  <ianb@erislabs.net>  (tiny change)
103774         * m4/getdelim.m4: Fix typo in copyright line.
103776 2009-09-17  Bruno Haible  <bruno@clisp.org>
103778         * lib/atoll.c: Use the standard header with GPL copyright.
103779         * lib/argz.in.h: Likewise.
103780         * lib/glob.c: Likewise.
103781         * lib/glob-libc.h: Likewise.
103782         * lib/random_r.c: Likewise.
103783         * lib/siglist.h: Likewise.
103784         * lib/strsignal.c: Likewise.
103785         Reported by Ian Beckwith <ianb@erislabs.net>.
103787 2009-09-17  Eric Blake  <ebb9@byu.net>
103789         rmdir: ensure correct dependency order
103790         * m4/rmdir.m4 (gl_FUNC_RMDIR): Require unistd defaults.
103792 2009-09-17  Bruno Haible  <bruno@clisp.org>
103794         Disable assertion that fails on NetBSD 5 / i386.
103795         * lib/mktime.c (ydhms_diff): Disable assertion about time_t size.
103796         Reported by Sam Steingold <sds@gnu.org>
103797         and Hasso Tepper <hasso@netbsd.org>.
103799 2009-09-16  Eric Blake  <ebb9@byu.net>
103801         unlinkdir: port to mingw
103802         * m4/unlinkdir.m4 (gl_UNLINKDIR): Add mingw to list of platforms
103803         on which no one can unlink a directory.
103805         stdlib: sort witness names
103806         * modules/stdlib (Makefile.am): Sort replacements.
103807         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Likewise.
103808         * lib/stdlib.in.h: Likewise.
103810         parse-duration-tests: avoid link failure
103811         * modules/parse-duration-tests (test_parse_duration_LDADD): Add
103812         LIBINTL.
103813         Reported by Tom G. Christensen.
103815         openat-tests: ensure unlinkat behaves like rmdir
103816         * tests/test-rmdir.c (main): Factor guts...
103817         * tests/test-rmdir.h (test_rmdir_func): ...into new file.
103818         * modules/rmdir-tests (Files): Ship new file.
103819         * modules/openat-tests: New test.
103820         * tests/test-unlinkat.c: Likewise.
103822         rmdir-errno: mark obsolete, it is unsafe for cross-compilation
103823         * modules/rmdir-errno (Status, Notice): Now obsolete.
103825         rmdir: work around cygwin 1.5.x and mingw bugs
103826         * m4/rmdir.m4 (gl_FUNC_RMDIR): Detect the bugs.
103827         * lib/rmdir.c (rmdir): Work around it.
103828         * modules/rmdir (Status, Notice): No longer obsolete.
103829         (Files): Add dos.m4.
103830         (Depends-on): Add unistd.
103831         (configure.ac): Set witnesses.
103832         (License): Relax to LGPLv2+.
103833         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set defaults.
103834         * modules/unistd (Makefile.am): Substitute witnesses.
103835         * lib/unistd.in.h (rmdir): Declare replacement.
103836         * doc/posix-functions/rmdir.texi (rmdir): Document this.
103837         * modules/rmdir-tests: New tests.
103838         * tests/test-rmdir.c: Likewise.
103840 2009-09-15  Eric Blake  <ebb9@byu.net>
103842         fchdir: improve use of replacement functions
103843         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Set appropriate witnesses.
103844         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Add REPLACE_FSTAT.
103845         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Add REPLACE_OPENDIR,
103846         REPLACE_CLOSEDIR.
103847         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add REPLACE_DUP.
103848         * modules/sys_stat (Makefile.am): Substitute correct witness.
103849         * modules/dirent (Makefile.am): Likewise.
103850         * modules/unistd (Makefile.am): Likewise.
103851         * lib/dirent.in.h (opendir, closedir): Use better witnesses.
103852         * lib/unistd.in.h (dup): Likewise.
103853         * lib/sys_stat.in.h (fstat): Likewise.
103855         maint: ignore gnulib-tool temp files
103856         * .gitignore: Ignore files created during gnulib-tool --test.
103858 2009-09-13  Jim Meyering  <meyering@redhat.com>
103860         posixtm: don't reject a time that specify "60" as the number of seconds
103861         * lib/posixtm.c (posixtime): The code to reject invalid dates
103862         would also reject a time specified with the .60 suffix.
103863         But POSIX allows that, in order to accommodate leap seconds.
103864         So don't reject it.
103865         (main): Adjust tests accordingly.
103866         * modules/posixtm (Depends-on): Add stpcpy.
103868 2009-09-11  Jim Meyering  <meyering@redhat.com>
103870         announce-gen: include [$release_type] in emitted Subject:
103871         * build-aux/announce-gen (get_tool_versions): Include [$release_type],
103872         e.g., [stable] in the emitted Subject: line.
103874 2009-09-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
103876         Remove obsolete macros from several modules.
103877         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Replace
103878         obsolete Autoconf macros with their modern counterparts.
103879         * m4/check-math-lib.m4 (gl_CHECK_MATH_LIB): Likewise.
103880         * m4/gc-camellia.m4 (gl_GC_CAMELLIA): Likewise.
103881         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Likewise.
103882         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
103883         * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): Likewise.
103884         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
103885         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Likewise.
103886         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Likewise.
103887         * m4/poll.m4 (gl_FUNC_POLL): Likewise.
103888         * m4/readline.m4 (gl_FUNC_READLINE): Likewise.
103889         * m4/round.m4 (gl_FUNC_ROUND): Likewise.
103890         * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
103891         * m4/select.m4 (gl_FUNC_SELECT): Likewise.
103892         * m4/sockets.m4 (gl_SOCKETS): Likewise.
103893         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Likewise.
103894         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Likewise.
103895         * m4/sysexits.m4 (gl_SYSEXITS): Likewise.
103896         * m4/time_r.m4 (gl_TIME_R): Likewise.
103897         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Likewise.
103898         * m4/vararrays.m4 (AC_C_VARARRAYS): Likewise.
103899         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
103901         Fix copyright header in build-aux scripts.
103902         * build-aux/git-version-gen: Fix copyright header to match GPLv3
103903         recommendation.
103904         * build-aux/ncftpput-ftp: Likewise.
103905         * build-aux/update-copyright: Likewise.
103907 2009-09-09  Eric Blake  <ebb9@byu.net>
103909         test-link: allow Linux choice of errno
103910         * tests/test-link.c (main): Relax test for alternate error.
103912         strndup: fix improper m4 caching
103913         * m4/strndup.m4 (gl_FUNC_STRNDUP): Rework to avoid side effects
103914         inside AC_CACHE_CHECK.  Use REPLACE_STRNDUP, not HAVE_STRNDUP.
103915         (gl_PREREQ_STRNDUP): Delete.
103916         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Update default.
103917         * modules/string (Makefile.am): Substitute it.
103918         * lib/string.in.h (strndup): Modernize prototype.
103920         getcwd: port to mingw
103921         * m4/getcwd.m4 (gl_FUNC_GETCWD): Mingw directories are very
103922         different from the POSIX assumptions made throughout the getcwd
103923         module; fortunately, the mingw getcwd does not need replacement.
103924         (gl_FUNC_GETCWD_NULL): Skip test on mingw.
103925         * modules/getcwd-tests: New test.
103926         * tests/test-getcwd.c: Likewise.
103928         link: fix platform bugs
103929         * m4/link.m4 (gl_FUNC_LINK): Detect Solaris and Cygwin bugs.
103930         * lib/link.c (link): Work around them.  Fix related mingw bug.
103931         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add REPLACE_LINK.
103932         * modules/unistd (Makefile.am): Substitute it.
103933         * lib/unistd.in.h (link): Declare replacement.
103934         * doc/posix-functions/link.texi (link): Document this.
103935         * modules/link (Depends-on): Add strdup-posix, sys_stat.
103937         test-link: consolidate into single C program, test more cases
103938         * tests/test-link.sh: Delete.
103939         * tests/test-link.c: Test more error conditions.  Exposes bugs on
103940         at least Cygwin and Solaris.
103941         * modules/link-tests (Files): Remove unused file.
103942         (Depends-on): Add errno, sys_stat.
103943         (Makefile.am): Simplify.
103945 2009-09-08  Bruno Haible  <bruno@clisp.org>
103947         Work around towlower, towupper bug on mingw.
103948         * lib/wctype.in.h (towlower, towupper) [__MINGW32__]: New replacements.
103949         * m4/wctype.m4 (gl_WCTYPE_H): Replace <wctype.h> also on mingw.
103950         * doc/posix-functions/towlower.texi: Mention the mingw bug.
103951         * doc/posix-functions/towupper.texi: Likewise.
103952         Reported by Eric Blake.
103954 2009-09-08  Jim Meyering  <meyering@redhat.com>
103956         build: don't try to run autoheader if we don't use it
103957         * build-aux/bootstrap: Define AUTOHEADER=true when AC_CONFIG_HEADERS
103958         is not used in configure.ac.
103960 2009-09-08  Eric Blake  <ebb9@byu.net>
103962         euidaccess: fix compilation error
103963         * lib/euidaccess.c (includes): Add <fcntl.h>, for AT_EACCESS.
103965         rawmemchr: relax license
103966         * modules/rawmemchr (License): Derived from glibc, so LGPLv2+ is
103967         okay.
103968         Reported by Jim Meyering.
103970         mkfifoat: new module
103971         * modules/mkfifoat: New file.
103972         * lib/mkfifoat.c: Likewise.
103973         * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Likewise.
103974         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Add witnesses.
103975         * modules/sys_stat (Makefile.am): Use them.
103976         * lib/sys_stat.in.h (mkfifoat, mknodat): Declare them.
103977         * MODULES.html.sh (File system functions): Mention module.
103978         * doc/posix-functions/mkfifoat.texi (mkfifoat): Likewise.
103979         * doc/posix-functions/mknodat.texi (mknodat): Likewise.
103980         * modules/mkfifoat-tests: New test.
103981         * tests/test-mkfifoat.c: Likewise.
103983         strchrnul: relax license
103984         * modules/strchrnul (License): Derived from glibc, so LGPLv2+ is
103985         okay.
103986         Reported by Jim Meyering.
103988 2009-09-08  Eric Blake  <ebb9@byu.net>
103990         fstatat: fix compilation on Solaris
103991         * lib/fstatat.c (includes): Add fcntl.h.
103992         Reported by Pádraig Brady.
103994 2009-09-07  Eric Blake  <ebb9@byu.net>
103996         rename: modernize replacement
103997         * modules/rename (Depends-on): Add stdio.
103998         (configure.ac): Declare witness.
103999         * m4/rename.m4 (gl_FUNC_RENAME): Ensure dependency order, and let
104000         stdio take care of replacement.
104001         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add new defaults.
104002         * modules/stdio (Makefile.am): Substitute them.
104003         * lib/stdio.in.h (rename): Declare replacement.
104004         * lib/rename.c (includes): Allow cross-compilation to non-windows
104005         machines.
104006         * doc/posix-functions/rename.texi (rename): Improve
104007         documentation.
104009         stdio: sort witness names
104010         * modules/stdio (Makefile.am): Sort replacements.
104011         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
104012         * lib/stdio.in.h: Likewise.
104014         getcwd: minor cleanups
104015         * lib/getcwd.c (AT_FDCWD): Delete; rely on <fcntl.h> instead.
104016         (is_ENAMETOOLONG): Delete; ENAMETOOLONG is portable.
104018         openat: provide more convenience names
104019         * modules/faccessat (configure.ac): Add C witness.
104020         * lib/unistd.in.h (readlinkat): Fix typo.
104021         * lib/openat.h (statat, lstatat, accessat, euidaccessat): New
104022         convenience wrappers.
104023         * top/maint.mk (sc_prohibit_openat_without_use): Allow these
104024         wrappers in syntax checks.
104026 2009-09-06  Eric Blake  <ebb9@byu.net>
104028         doc: fix comments in recent patches
104029         * lib/faccessat.c: Mention correct function.
104030         * lib/fchmodat.c: Likewise.
104031         * lib/fchownat.c: Likewise.
104032         * lib/symlinkat.c: Likewise.
104033         * doc/posix-headers/fcntl.texi (fcntl.h): Cygwin 1.7 has AT_*
104034         constants.
104036         faccessat, symlinkat: continue cleanup of previous patch
104037         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Ensure dependency order.
104038         * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Likewise.
104039         * modules/unistd (Makefile.am): Substitute GNULIB_READLINKAT.
104040         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Offer GNULIB_READLINKAT.
104041         * modules/symlinkat (configure.ac): Set GNULIB_READLINKAT.
104042         * lib/unistd.in.h (readlinkat): Declare if GNULIB_READLINKAT is
104043         set.
104045 2009-09-06  Bruno Haible  <bruno@clisp.org>
104047         * lib/sys_stat.in.h (fchmodat): Declare if GNULIB_FCHMODAT is set.
104048         (fstatat): Declare if GNULIB_FSTATAT is set.
104049         (mkdirat): Declare if GNULIB_MKDIRAT is set.
104050         * lib/unistd.in.h (fchownat): Declare if GNULIB_FCHOWNAT is set.
104051         (unlinkat): Declare if GNULIB_UNLINKAT is set.
104052         * modules/fcntl-h (Files): Remove m4/openat.m4.
104053         * modules/sys_stat (Files): Remove m4/openat.m4.
104054         (Makefile.am): Substitute GNULIB_FCHMODAT, GNULIB_FSTATAT,
104055         GNULIB_MKDIRAT instead of GNULIB_OPENAT.
104056         * modules/unistd (Files): Remove m4/openat.m4.
104057         (Makefile.am): Substitute GNULIB_FCHOWNAT, GNULIB_UNLINKAT instead of
104058         GNULIB_OPENAT.
104059         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Initialize GNULIB_OPENAT,
104060         HAVE_OPENAT here. Don't require gl_OPENAT_DEFAULTS.
104061         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize
104062         GNULIB_FCHMODAT, GNULIB_FSTATAT, GNULIB_MKDIRAT, HAVE_FCHMODAT,
104063         HAVE_FSTATAT, HAVE_MKDIRAT, REPLACE_FSTATAT here. Don't require
104064         gl_OPENAT_DEFAULTS.
104065         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_FCHOWNAT,
104066         GNULIB_UNLINKAT, HAVE_FCHOWNAT, HAVE_UNLINKAT, REPLACE_FCHOWNAT here.
104067         Don't require gl_OPENAT_DEFAULTS.
104068         * m4/openat.m4 (gl_FUNC_OPENAT): Require gl_FCNTL_H_DEFAULTS,
104069         gl_SYS_STAT_H_DEFAULTS, gl_UNISTD_H_DEFAULTS. Set GNULIB_FCHMODAT,
104070         GNULIB_FSTATAT, GNULIB_MKDIRAT, GNULIB_FCHOWNAT, GNULIB_UNLINKAT.
104071         (gl_OPENAT_DEFAULTS): Remove macro.
104073 2009-09-06  Bruno Haible  <bruno@clisp.org>
104075         * modules/openat (configure.ac): Remove unneeded witness.
104077 2009-09-06  Bruno Haible  <bruno@clisp.org>
104079         Set errno to ENOSYS when a function is entirely unsupported.
104080         * lib/chown.c (rpl_chown) [!HAVE_CHOWN]: Set errno to ENOSYS instead of
104081         EOPNOTSUPP.
104082         * lib/lchown.c (lchown) [!HAVE_CHOWN]: Likewise.
104083         * modules/chown (Depends-on): Remove errno.
104085 2009-09-06  Bruno Haible  <bruno@clisp.org>
104087         * doc/posix-headers/fcntl.texi (AT_*): Mention affected platforms.
104089 2009-09-06  Bruno Haible  <bruno@clisp.org>
104091         * lib/sys_stat.in.h: Fix preprocessor command indentation.
104093 2009-09-06  Ben Pfaff  <blp@gnu.org>
104094             Bruno Haible  <bruno@clisp.org>
104096         Work around a glibc bug in strtok_r.
104097         * lib/string.in.h (strtok_r): Replace if REPLACE_STRTOK_R is set.
104098         Undefine if UNDEFINE_STRTOK_R is set.
104099         * lib/strtok_r.c (strtok_r, __strtok_r) [!_LIBC]: Don't undefine.
104100         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
104101         REPLACE_STRTOK_R and UNDEFINE_STRTOK_R.
104102         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Check against the glibc bug.
104103         * modules/string (Makefile.am): Substitute REPLACE_STRTOK_R,
104104         UNDEFINE_STRTOK_R.
104105         * doc/posix-functions/strtok_r.texi: Mention the glibc 2.7 bug.
104107 2009-09-06  Sergey Poznyakoff  <gray@gnu.org.ua>
104109         exclude: minor fix
104110         * lib/exclude.c: Include wctype.h
104112 2009-09-06  Akim Demaille  <demaille@gostai.com>
104114         bootstrap: improve error message
104115         * build-aux/bootstrap (find_tool): Upon failure, report the list
104116         of candidates.
104117         Honor the initial value of the envvar.
104119 2009-09-05  Eric Blake  <ebb9@byu.net>
104121         symlinkat: new module
104122         * modules/symlinkat: New file.
104123         * lib/symlinkat.c: Likewise.
104124         * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Likewise.
104125         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witnesses.
104126         * modules/unistd (Makefile.am): Use them.
104127         * lib/unistd.in.h (symlinkat, readlinkat): Declare them.
104128         (faccessat) [GNULIB_POSIXCHECK]: Fix typo.
104129         * lib/at-func.c (FUNC_RESULT): New macro, defaulting to int.
104130         * MODULES.html.sh (File system functions): Mention module.
104131         * doc/posix-functions/symlinkat.texi (symlinkat): Likewise.
104132         * doc/posix-functions/readlinkat.texi (readlinkat): Likewise.
104133         * modules/symlinkat-tests: New test.
104134         * tests/test-symlinkat.c: Likewise.
104136         test-openat-safer: add more checks
104137         * tests/test-openat-safer.c (main): Check more code paths.
104139 2009-09-05  Jim Meyering  <meyering@redhat.com>
104141         syntax-check: detect unnecessary inclusion of openat.h
104142         * top/maint.mk (sc_prohibit_openat_without_use): New rule.
104144 2009-09-05  Bruno Haible  <bruno@clisp.org>
104146         Support towlower, towupper.
104147         * doc/posix-functions/towlower.texi: Mention module wctype.
104148         * doc/posix-functions/towupper.texi: Likewise.
104149         * lib/wctype.in.h (towlower, towupper): New functions.
104150         * tests/test-wctype.c: Include stdio.h, stdlib.h.
104151         (ASSERT): New macro.
104152         (e): New variable.
104153         (main): Test also towlower, towupper. Test WEOF argument.
104154         Reported by Alan Hourihane <alanh@fairlite.co.uk>.
104156 2009-09-05  Bruno Haible  <bruno@clisp.org>
104158         Fix conversion behaviour when the input is invalid.
104159         * lib/striconveh.c (mem_cd_iconveh_internal): Fix storing of question
104160         mark occurring in first pass of indirect conversion.
104161         * tests/test-striconveh.c (main): Test conversion of invalid ASCII
104162         input.
104163         Found by clang's static analyzer.
104165 2009-09-05  Bruno Haible  <bruno@clisp.org>
104167         * tests/test-striconveh.c (main): Test indirect conversion on platforms
104168         where direct conversion is possible.
104170 2009-09-04  Eric Blake  <ebb9@byu.net>
104172         openat: fail with ENOENT on empty name
104173         * lib/openat-proc.c (openat_proc_name): Special-case the empty
104174         buffer.
104176         link-follow: fix logic bug in prior patch
104177         * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): Fix bug that
104178         reversed sense of yes and no in prior patch.  Avoid confusing
104179         compilation failure with desired semantics.
104181         link-follow: accommodate mingw and cross-compilation
104182         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Rename...
104183         (gl_FUNC_LINK_FOLLOWS_SYMLINK): ...to this.  Change
104184         cross-compilation results to -1, to make linkat easier to
104185         implement when cross-compiling.  Trivially support mingw.
104186         * modules/link-follow (configure.ac): Call new name.
104187         * NEWS: Mention this.
104189 2009-09-03  Eric Blake  <ebb9@byu.net>
104191         faccessat: compile replacement
104192         * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Build replacement when
104193         needed.
104195         fts: fix compilation error
104196         * lib/fts.c (includes): Re-add "openat.h", for
104197         openat_needs_fchdir.
104199         faccessat: new module
104200         * modules/faccessat: New file.
104201         * lib/faccessat.c: Likewise.
104202         * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Likewise.
104203         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness.
104204         * modules/unistd (Makefile.am): Use it.
104205         * lib/unistd.in.h (faccessat): Declare it.
104206         (F_OK, X_OK, W_OK, R_OK): Provide definitions.
104207         * lib/fcntl.in.h (AT_SYMLINK_FOLLOW, AT_EACCESS): Likewise.
104208         * MODULES.html.sh (File system functions): Mention it.
104209         * doc/posix-functions/faccessat.texi (faccessat): Likewise.
104210         * doc/posix-headers/fcntl.texi (fcntl.h): Likewise.
104212         euidaccess: prefer POSIX over non-standard implementation
104213         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Check for faccessat.
104214         * lib/euidaccess.c (euidaccess): Use it if available.
104216         openat: make template easier to use
104217         * lib/at-func.c (CALL_FUNC): Allow AT_FUNC_USE_F1_COND and
104218         AT_FUNC_F2 to be undefined.
104219         (VALIDATE_FLAG): New macro; use it to reject bad flags.
104220         (AT_FUNC_USE_F1_COND): Change sense to just flag bit.
104221         * lib/fchmodat.c (AT_FUNC_USE_F1_COND): Adjust.
104222         * lib/fchownat.c (AT_FUNC_USE_F1_COND): Likewise.
104223         * lib/openat.c (AT_FUNC_USE_F1_COND) [fstatat, unlinkat]:
104224         Likewise.
104225         * lib/mkdirat.c (AT_FUNC_F2, AT_FUNC_USE_F1_COND): Delete.
104226         * lib/selinux-at.c (AT_FUNC_F2, AT_FUNC_USE_F1_COND)
104227         [getfileconat, lgetfileconat, setfileconat, lsetfileconat]:
104228         Likewise.
104230         openat: declare in POSIX headers
104231         * NEWS: Mention this.
104232         * modules/openat (configure.ac): Declare witnesses.
104233         (Depends-on): Add fcntl-h, sys_stat, unistd.
104234         (Include): Mention correct headers.
104235         * modules/fcntl-h (Depends-on): Add link-warning.
104236         (Files): Add openat.m4.
104237         (Makefile.am): Substitute witnesses.
104238         * modules/sys_stat (Files, Makefile.am): Likewise.
104239         * modules/unistd (Files, Makefile.am): Likewise.
104240         * m4/openat.m4 (gl_FUNC_OPENAT, gl_FUNC_FCHOWNAT): Set witnesses.
104241         (gl_OPENAT_DEFAULTS): New macro.
104242         * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Use it.
104243         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Likewise.
104244         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Likewise.
104245         (SYS_STAT_H): Remove unused variable.
104246         * doc/posix-headers/fcntl.texi (fcntl.h): Update content.
104247         * lib/fcntl--.h (includes): Remove unneeded header.
104248         * lib/openat-safer.c (includes): Likewise.
104249         * lib/openat.h (AT_FDCWD, AT_SYMLINK_NOFOLLOW, AT_REMOVEDIR)
104250         (openat, fstatat, unlinkat, mkdirat, fchmodat, fchownat): Move to
104251         appropriate headers.
104252         (__OPENAT_PREFIX): Delete.
104253         * lib/fcntl.in.h (openat): Provide declaration.
104254         (AT_FDCWD): Fix Solaris bug.
104255         (AT_SYMLINK_NOFOLLOW, AT_REMOVEDIR): Provide macros.
104256         * lib/sys_stat.in.h (fstatat, mkdirat): Provide declaration.
104257         * lib/fchmodat.c (includes):  Adjust to find declaration.
104258         * lib/fchownat.c (includes): Likewise.
104259         * lib/mkdirat.c (includes): Likewise.
104260         * lib/fstatat.c (includes): Likewise.  Ensure original fstatat is
104261         still visible.
104263 2009-09-02  Eric Blake  <ebb9@byu.net>
104265         errno: use consistently
104266         * lib/c-stack.c (ENOTSUP): <errno.h> guarantees a definition.
104267         * lib/canonicalize-lgpl.c (ENAMETOOLONG): Likewise.
104268         * lib/canonicalize.c (ELOOP): Likewise.
104269         * lib/inet_ntop.c (EAFNOSUPPORT): Likewise.
104270         * lib/inet_pton.c (EAFNOSUPPORT): Likewise.
104271         * lib/lchown.c (EOPNOTSUPP): Likewise.
104272         * lib/openat-priv.h (ENOSYS, EOPNOTSUPP): Likewise.
104273         * lib/savewd.c (ESTALE): Likewise.
104274         * lib/settime.c (ENOSYS): Likewise.
104275         * lib/utimens.c (ENOSYS): Likewise.
104276         * lib/xgethostname.c (ENAMETOOLONG): Likewise.
104277         * lib/chdir-safer.c (ELOOP): Likewise.
104278         (chdir_no_follow): Use HAVE_READLINK, not ELOOP, as witness.
104279         * modules/c-stack (Depends-on): Add errno.
104280         * modules/canonicalize (Depends-on): Likewise.
104281         * modules/chdir-safer (Depends-on): Likewise.
104282         * modules/fdopendir (Depends-on): Likewise.
104283         * modules/inet_ntop (Depends-on): Likewise.
104284         * modules/inet_pton (Depends-on): Likewise.
104285         * modules/lchown (Depends-on): Likewise.
104286         * modules/openat (Depends-on): Likewise.
104287         * modules/savewd (Depends-on): Likewise.
104288         * modules/settime (Depends-on): Likewise.
104289         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Check for readlink.
104291         fts: avoid leaking fds
104292         * modules/fts (Depends-on): Add cloexec.
104293         * lib/fts.c (opendirat, diropen, fts_build): Set close-on-exec
104294         flag.
104296         fts: make directory fds more robust
104297         * lib/fts.c (O_DIRECTORY): Let <fcntl.h> take care of this.
104298         (opendirat): Specify O_DIRECTORY, and add fallbacks for safety.
104300         backupfile, chdir-long, fts, savedir: make safer
104301         * lib/backupfile.c (includes): Use "dirent--.h", since
104302         numbered_backup can write to stderr during readdir.
104303         * lib/savedir.c (includes): Likewise.
104304         * lib/chdir-long.c (includes): Use "fcntl--.h", since openat
104305         emulation can write to stderr on failure.
104306         * lib/fts.c (includes) [!_LIBC]: Likewise for opendir and openat.
104307         * lib/getcwd.c: Document why opendir_safer is unused.
104308         * lib/glob.c: Likewise.
104309         * lib/scandir.c: Likewise.
104310         * lib/openat-proc.c: Likewise, for open_safer.
104311         * modules/backupfile (Depends-on): Add dirent-safer.
104312         * modules/savedir (Depends-on): Likewise.
104313         * modules/fts (Depends-on): Add dirent-safer and openat-safer.
104314         * modules/chdir-long (Depends-on): Add openat-safer.
104316         openat-safer: new module
104317         * modules/openat-safer: New file.
104318         * lib/openat-safer.c: Likewise.
104319         * m4/fcntl-safer.m4 (gl_OPENAT_SAFER): New macro.
104320         * lib/fcntl-safer.h (openat_safer): Declare.
104321         * lib/fcntl--.h (openat): Override.
104322         * MODULES.html.sh (File descriptor based I/O): Mention it.
104323         * lib/openat.h: Add double-inclusion guards.
104324         * lib/openat.c (includes): Only include "fcntl-safer.h", not
104325         "fcntl--.h", so we can implement openat.
104326         * modules/openat-safer-tests: New test.
104327         * tests/test-openat-safer.c: New file.
104329         dirent-safer: new module
104330         * modules/dirent-safer: New file.
104331         * lib/dirent--.h: Likewise.
104332         * lib/dirent-safer.h: Likewise.
104333         * lib/opendir-safer.c: Likewise.
104334         * m4/dirent-safer.m4: Likewise.
104335         * MODULES.html.sh (Enhancements for POSIX:2008): Mention it.
104336         * modules/dirent-safer-tests: New test.
104337         * tests/test-dirent-safer.c: New file.
104338         * lib/fdopendir.c (includes): Ensure fdopendir is also safe.
104340         fdopendir: optimize on mingw
104341         * lib/unistd.in.h (_gl_directory_name): New prototype.
104342         * lib/fchdir.c (_gl_directory_name): Implement it.
104343         (fchdir): Use it to simplify implementation.
104344         * lib/fdopendir.c (fdopendir) [REPLACE_FCHDIR]: Use metadata from
104345         fchdir, when available, to avoid calling [f]chdir().
104347         fdopendir: split into its own module
104348         * lib/openat.c (fdopendir): Move...
104349         * lib/fdopendir.c: ...into new file.
104350         * modules/fdopendir: New module.
104351         * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): New file.
104352         * modules/openat (Depends-on): Add fdopendir.
104353         * m4/openat.m4 (gl_FUNC_OPENAT): No longer need to check for
104354         fdopendir here.
104355         * modules/savedir (Depends-on): Only need fdopendir, not full
104356         openat.
104357         * lib/savedir.c (include): Use <dirent.h>, not "openat.h".
104358         * lib/openat.h (fdopendir): Drop prototype.
104359         * lib/dirent.in.h (fdopendir): Provide prototype.
104360         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Add replacements.
104361         * modules/dirent (Makefile.am): Substitute them.
104362         * MODULES.html.sh (File system functions): Mention it.
104363         * doc/posix-functions/fdopendir.texi (fdopendir): Likewise.
104364         * modules/fdopendir-tests: New file.
104365         * tests/test-fdopendir.c: Likewise.
104367         fchdir: use more consistent macro convention
104368         * lib/fcntl.in.h (_gl_register_fd): Move declaration to unistd.
104369         * lib/sys_stat.in.h (rpl_fstat): Declare via make-time
104370         REPLACE_FCHDIR, rather than relying on config.h macros.
104371         * lib/unistd.in.h (fchdir): Move all fchdir internal declarations
104372         inside a single make-time REPLACE_FCHDIR block, rather than using
104373         the config.h FCHDIR_REPLACEMENT.
104374         * m4/fchdir.m4 (gl_FUNC_FCHDIR): REPLACE_FCHDIR was already
104375         AC_SUBST'd, also AC_DEFINE it.  Don't define FCHDIR_REPLACEMENT.
104376         Manage fstat replacement.
104377         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Pick up
104378         REPLACE_FCHDIR.
104379         * modules/sys_stat (Files): Add m4/unistd_h.m4.
104380         (Makefile.am): Substitute REPLACE_FCHDIR.
104381         * lib/close.c (rpl_close): Use REPLACE_FCHDIR, not
104382         FCHDIR_REPLACEMENT.
104383         * lib/dup-safer.c (dup_safer): Likewise.
104384         * lib/dup2.c (rpl_dup2): Likewise.
104385         * lib/dup3.c (rpl_dup3): Likewise.
104386         * lib/open.c (rpl_open): Likewise.
104388         fchdir: simplify error handling, and support dup3
104389         * modules/fchdir (Depends-on): Use strdup-posix, not strdup.  Add
104390         stdbool, malloc-posix, realloc-posix.
104391         * lib/fchdir.c (struct dir_info_t): Delete saved_errno.
104392         (ensure_dirs_slot): Return false on allocation failure.
104393         (rpl_dup2): Delete.
104394         (_gl_register_dup): New function.
104395         (_gl_unregister_fd, rpl_opendir, rpl_dup): Update callers.
104396         (_gl_register_fd): Close fd on allocation failure.
104397         * lib/fcntl.in.h (_gl_register_fd): Update signature.
104398         * lib/unistd.in.h (_gl_register_dup) [FCHDIR_REPLACEMENT]: New
104399         prototype.
104400         (rpl_dup2_fchdir): Delete prototype.
104401         * lib/open.c (open): Update caller.
104402         * lib/dup2.c (dup2): Track fchdir metadata.
104403         * lib/dup3.c (dup3): Likewise.
104404         * m4/dup2.m4 (gl_REPLACE_DUP2): New macro.
104405         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Use it.
104407 2009-09-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
104409         * gnulib-tool (func_create_testdir, func_create_megatestdir): Use
104410         AC_CONFIG_HEADERS instead of AM_CONFIG_HEADER. Use AC_CONFIG_FILES and
104411         don't pass arguments to AC_OUTPUT.
104413 2009-09-02  Bruno Haible  <bruno@clisp.org>
104415         * modules/mkdtemp (License): Relicense under LGPLv2+.
104416         Reported by Paolo Bonzini.
104418 2009-09-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
104420         Replace uses of obsolete autoconf macros in Jim's modules.
104421         The Autoconf macros AC_TRY_CPP, AC_TRY_COMPILE, AC_TRY_LINK and
104422         AC_TRY_RUN have been obsolete since Autoconf 2.55, and each use
104423         can evoke a warning from autoconf when run with -Wobsolete
104424         enabled.  They were declared obsolete for good reasons (see
104425         the `AC_FOO_IFELSE vs AC_TRY_FOO' node in the Autoconf manual,
104426         recently renamed to `AC_ACT_IFELSE vs AC_TRY_ACT'), and we
104427         should not continue using the deprecated macros.
104428         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Replace
104429         obsolete Autoconf macros with modern counterparts.
104430         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
104431         * m4/dos.m4 (gl_AC_DOS): Likewise.
104432         * m4/fpending.m4 (gl_FUNC_FPENDING): Likewise.
104433         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Likewise.
104434         * m4/getloadavg.m4 (gl_PREREQ_GETLOADAVG): Likewise.
104435         * m4/jm-winsz1.m4 (gl_WINSIZE_IN_PTEM): Likewise.
104436         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Likewise.
104437         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Likewise.
104438         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Likewise.
104439         * m4/mode_t.m4 (gl_PROMOTED_TYPE_MODE_T): Likewise.
104440         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
104441         Likewise.
104442         * m4/rename.m4 (gl_FUNC_RENAME): Likewise.
104443         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
104444         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Likewise.
104445         * m4/st_dm_mode.m4 (AC_STRUCT_ST_DM_MODE): Likewise.
104446         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
104447         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
104449 2009-09-01  Eric Blake  <ebb9@byu.net>
104451         fchdir: fix off-by-one bug in previous patch
104452         * lib/fchdir.c (rpl_fstat): Use correct bounds.
104453         (_gl_unregister_fd): Delete useless if.
104455 2009-09-01  Daniel P. Berrange  <berrange@redhat.com>
104457         maint.mk: sort the list of syntax-check rules
104458         * top/maint.mk (syntax-check-rules): Sort syntax-check rules, so it's
104459         easier to get a sense of progress when the rules are run sequentially
104460         and take a long time.
104462 2009-09-01  Simon Josefsson  <simon@josefsson.org>
104464         * modules/arpa_inet: Use $(MKDIR_P) instead of @MKDIR_P@.
104465         * modules/netinet_in: Likewise.
104466         * modules/sys_file: Likewise.
104467         * modules/sys_ioctl: Likewise.
104468         * modules/sys_select: Likewise.
104469         * modules/sys_socket: Likewise.
104470         * modules/sys_stat: Likewise.
104471         * modules/sys_time: Likewise.
104472         * modules/sys_times: Likewise.
104473         * modules/sys_utsname: Likewise.
104474         * modules/sys_wait: Likewise.
104476 2009-09-01  Jim Meyering  <meyering@redhat.com>
104478         fts: help ensure that return values are not ignored
104479         * lib/fts_.h (__GNUC_PREREQ): Define.
104480         (__attribute_warn_unused_result__): Define.
104481         (fts_children, fts_close, fts_open, fts_read): Declare with
104482         __attribute_warn_unused_result__.
104484         fts: fts_close now fails also when closing a dir file descriptor fails
104485         * lib/fts.c (fts_close): Detect close failure, not just fchdir failure,
104486         and propagate to caller, along with errno.
104488         announce-gen: correct formatting in --help output
104489         * build-aux/announce-gen (usage): Move the one-line description in
104490         --help output "up", to where it belongs, just after Usage:.
104492 2009-08-31  Eric Blake  <ebb9@byu.net>
104494         fchdir: port to mingw
104495         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Check for mingw bug.
104496         * lib/open.c (open) [FCHDIR_REPLACEMENT]: If directories can't be
104497         opened, then use a substitute.
104498         * lib/sys_stat.in.h (fstat) [REPLACE_OPEN_DIRECTORY]: Declare
104499         replacement.
104500         * lib/fchdir.c (fstat) [REPLACE_OPEN_DIRECTORY]: Implement it.
104501         (_gl_register_fd): No need to check stat if open already filters
104502         all directories.
104503         (fchdir): Fix error condition to match POSIX.
104504         * modules/fchdir (Depends-on): Add sys_stat.
104505         * doc/posix-functions/open.texi (open): Document the limitation.
104506         * modules/fchdir-tests: New file.
104507         * tests/test-fchdir.c: Likewise.
104509         canonicalize: allow cross-testing from cygwin to mingw
104510         * modules/canonicalize-tests (configure.ac): Define HAVE_SYMLINK.
104511         (Makefile.am): Pass it through TESTS_ENVIRONMENT.
104512         * modules/canonicalize-lgpl-tests (configure.ac, Makefile.am):
104513         Likewise.
104514         * tests/test-canonicalize.sh: Also skip test if 'ln -s' works, but
104515         target does not support symlinks.
104516         * tests/test-canonicalize-lgpl.sh: Likewise.
104518         chown: avoid compilation warning on mingw
104519         * m4/chown.m4 (gl_FUNC_CHOWN): Recognize missing chown.
104520         * lib/chown.c (rpl_chown) [!HAVE_CHOWN]: Always return failure on
104521         mingw.
104522         * lib/lchown.c (lchown) [!HAVE_CHOWN]: Likewise.
104523         * modules/chown (Depends-on): Add errno.
104525 2009-08-31  Stefano Lattarini  <stefano.lattarini@gmail.com>  (tiny change)
104527         * gnulib-tool: Fix test whether $CONFIG_SHELL has a working 'echo'
104528         command.
104530 2009-08-31  Jim Meyering  <meyering@redhat.com>
104532         canonicalize: remove useless initialization
104533         * lib/canonicalize.c (canonicalize_filename_mode): Remove useless
104534         initialization of local, "end".
104536 2009-08-30  Bruno Haible  <bruno@clisp.org>
104538         Fix an unnecessary error on Solaris 10 on NFSv3 file systems.
104539         * lib/set-mode-acl.c (qset_acl) [Solaris 10 new]: Treat EOPNOTSUPP like
104540         ENOSYS.
104542 2009-08-30  Bruno Haible  <bruno@clisp.org>
104544         * tests/test-pipe-filter-ii1.sh: Prefer /usr/xpg6/bin/tr over
104545         /usr/xpg4/bin/tr when it exists.
104546         * tests/test-pipe-filter-gi1.sh: Likewise.
104548 2009-08-30  Bruno Haible  <bruno@clisp.org>
104550         Work around deficient /usr/bin/id program on Solaris.
104551         * tests/test-file-has-acl.sh (ID): New variable.
104552         * tests/test-set-mode-acl.sh (ID): Likewise.
104553         * tests/test-copy-acl.sh (ID): Likewise.
104554         * tests/test-copy-file.sh (ID): Likewise.
104556 2009-08-30  Bruno Haible  <bruno@clisp.org>
104558         New module 'xstriconveh'.
104559         * lib/xstriconveh.h: New file.
104560         * lib/xstriconveh.c: New file.
104561         * modules/xstriconveh: New file.
104563 2009-08-30  Bruno Haible  <bruno@clisp.org>
104565         Make it easier to use mem_cd_iconveh.
104566         * lib/striconveh.h (iconveh_t): New type.
104567         (iconveh_open, iconveh_close): New declarations.
104568         (mem_cd_iconveh, str_cd_iconveh): Replace the three iconv_t arguments
104569         with a single 'const iconveh_t *' argument.
104570         * lib/striconveh.c (iconveh_open, iconveh_close): New functions.
104571         (mem_cd_iconveh, str_cd_iconveh): Replace the three iconv_t arguments
104572         with a single 'const iconveh_t *' argument.
104573         (mem_iconveh, str_iconveh): Use iconveh_open, iconveh_close.
104574         * tests/test-striconveh.c (main): Update.
104575         * NEWS: Mention the change.
104577 2009-08-30  Bruno Haible  <bruno@clisp.org>
104579         * doc/posix-functions/iconv_open.texi: Mention indirect conversion
104580         problem.
104582 2009-08-30  Bruno Haible  <bruno@clisp.org>
104584         Work around iconv_open problem on Solaris.
104585         * lib/iconv_open-solaris.gperf: New file.
104586         * lib/iconv_open.c (ICONV_FLAVOR_SOLARIS): New macro.
104587         * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Also handle Solaris.
104588         * modules/iconv_open (Files): Add lib/iconv_open-solaris.gperf.
104589         (Makefile.am): Add rule for iconv_open-solaris.h. Augment
104590         BUILT_SOURCES, MOSTLYCLEANFILES, MAINTAINERCLEANFILES, EXTRA_DIST.
104591         * doc/posix-functions/iconv_open.texi: Mention the Solaris problem.
104593 2009-08-29  Jim Meyering  <meyering@redhat.com>
104595         maint.mk: remove more coreutils-specific targets; XZ_OPT=-9ev
104596         * top/maint.mk (cvs-check): Remove target; it was just an alias
104597         to the better-named vc-diff-check.
104598         (maintainer-distcheck): Remove rule.  It was used only from
104599         the (alpha/beta/major) target, and all of its commands but one
104600         were coreutils-specific.
104601         (vc-dist): Remove rule.
104602         (alpha beta major): Run "$(MAKE) distcheck" explicitly.
104603         Run vc-diff-check, not vc-dist.
104604         Run $(MAKE) dist with XZ_OPT=-9ev.  Note spelling, with "-".
104606 2009-08-27  Bruno Haible  <bruno@clisp.org>
104608         * tests/test-bitrotate.c (main): Remove test that uses a shift count
104609         of 0.
104611 2009-08-27  Bruno Haible  <bruno@clisp.org>
104613         * tests/test-func.c (main): Don't verify sizeof __func__ on SunPRO C
104614         compilers.
104615         * doc/func.texi: Document the SunPRO C bug.
104617 2009-08-27  Bruno Haible  <bruno@clisp.org>
104619         Fix link error on Solaris.
104620         * tests/test-parse-duration.c (xstrdup): Remove function.
104622 2009-08-26  Pádraig Brady  <P@draigbrady.com>
104624         ignore-value: handle pointer types, too
104625         * lib/ignore-value.h (__attribute__): Remove definition.
104626         (ignore_value): Remove use of "__attribute__ ((unused))" in favor
104627         of a more concise and more-often effective "(void) i" statement.
104628         (ignore_ptr): New function to suppress warnings from functions that
104629         return pointers, and to make it explicit that one function doesn't
104630         handle all cases.
104632 2009-08-25  Bruno Haible  <bruno@clisp.org>
104634         dup2: work around a Linux bug.
104635         * m4/dup2.m4 (gl_FUNC_DUP2): Test for the Linux bug.
104636         * lib/dup2.c (rpl_dup2): Correct the return value if it is -EBADF.
104637         * doc/posix-functions/dup2.texi: Mention the Linux bug.
104638         Reported by Simon Josefsson.
104640 2009-08-25  Jim Meyering  <meyering@redhat.com>
104642         libguestfs uses gnulib
104643         * users.txt: Add libguestfs.
104645 2009-08-24  Eric Blake  <ebb9@byu.net>
104647         dup2, pipe2: fix some recent test failures on cygwin 1.5.x
104648         * lib/pipe2.c (includes): Add binary-io.h.
104649         * lib/dup2.c (rpl_dup2): Correct buggy errno value.
104651 2009-08-24  Bruno Haible  <bruno@clisp.org>
104653         Tolerate declared but missing accept4 syscall.
104654         * lib/accept4.c (accept4): Invoke original accept4 function first, if
104655         available.
104656         * lib/sys_socket.in.h (accept4): If the function is already present,
104657         override it.
104658         * m4/accept4.m4 (gl_FUNC_ACCEPT4): Remove AC_LIBOBJ invocation.
104659         * modules/accept4 (Makefile.am): Compile accept4.c always.
104660         Reported by Paolo Bonzini and Eric Blake.
104662 2009-08-23  Bruno Haible  <bruno@clisp.org>
104664         New module 'accept4'.
104665         * lib/sys_socket.in.h (accept4): New declaration.
104666         * lib/accept4.c: New file.
104667         * m4/accept4.m4: New file.
104668         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_H_DEFAULTS): Initialize
104669         GNULIB_ACCEPT4, HAVE_ACCEPT4.
104670         * modules/sys_socket (Makefile.am): Substitute GNULIB_ACCEPT4,
104671         HAVE_ACCEPT4.
104672         * modules/accept4: New file.
104673         * doc/glibc-functions/accept4.texi: Mention the new module.
104675 2009-08-24  Jim Meyering  <meyering@redhat.com>
104677         progname: also set global program_invocation_name, when possible
104678         Before this change, a libtool-enabled program that calls glibc's
104679         error function would report the program name as
104680         "/abs/dir/.libs/lt-program_name" rather than the desired program_name.
104681         * modules/progname (configure.ac): Check for a declaration of
104682         program_invocation_name.
104683         * lib/progname.c:  Include <errno.h>.
104684         (set_program_name) [HAVE_DECL_PROGRAM_INVOCATION_NAME]:
104685         Set program_invocation_name.
104687 2009-08-23  Bruno Haible  <bruno@clisp.org>
104689         * lib/dup3.c: Include <string.h>.
104691 2009-08-23  Bruno Haible  <bruno@clisp.org>
104693         * lib/dup3.c (dup3): Test only once whether the system actually exists.
104694         * lib/pipe2.c (pipe2): Likewise.
104695         Suggested by Eric Blake.
104697 2009-08-23  Bruno Haible  <bruno@clisp.org>
104699         Tolerate declared but missing dup3 syscall.
104700         * lib/dup3.c (dup3): Invoke original dup3 function first, if available.
104701         * lib/unistd.in.h (dup3): If the function is already present,
104702         override it.
104703         * m4/dup3.m4 (gl_FUNC_DUP3): Remove AC_LIBOBJ invocation.
104704         * modules/dup3 (Makefile.am): Compile dup3.c always.
104705         Reported by Paolo Bonzini.
104707 2009-08-23  Bruno Haible  <bruno@clisp.org>
104709         Tolerate declared but missing pipe2 syscall.
104710         * lib/pipe2.c (pipe2): Invoke original pipe2 function first, if
104711         available.
104712         * lib/unistd.in.h (pipe2): If the function is already present,
104713         override it.
104714         * m4/pipe2.m4 (gl_FUNC_PIPE2): Remove AC_LIBOBJ invocation.
104715         * modules/pipe2 (Makefile.am): Compile pipe2.c always.
104716         Reported by Paolo Bonzini.
104718 2009-08-23  Bruno Haible  <bruno@clisp.org>
104720         * lib/pipe2.c (pipe2): Move #ifs inside function.
104722 2009-08-22  Joel E. Denny  <jdenny@clemson.edu>
104724         quotearg: document limitations of quote_these_too
104725         * lib/quotearg.c (quotearg_buffer_restyled): Add comments where
104726         those limitations are created.
104727         * lib/quotearg.h (set_char_quoting): Document that digits and
104728         letters that are special after backslash are not permitted.
104729         (quotearg_char): Cross-reference set_char_quoting documentation.
104731 2009-08-23  Joel E. Denny  <jdenny@clemson.edu>
104733         quotearg: implement custom_quoting_style
104734         * lib/quotearg.c: (struct quoting_options): Add left_quote and
104735         right_quote fields.
104736         (set_custom_quoting): New public function.
104737         (quotearg_buffer_restyled): Add left_quote and right_quote
104738         arguments, handle them very much like locale quoting, and update
104739         all uses.
104740         (quotearg_n_custom): New public function.
104741         (quotearg_n_custom_mem): New public function.
104742         (quotearg_custom): New public function.
104743         (quotearg_custom_mem): New public function.
104744         * lib/quotearg.h: Prototype and document new public functions.
104745         (enum quoting_style): For escape_quoting_style and
104746         clocale_quoting_style, comment that QA_SPLIT_TRIGRAPHS is
104747         ignored even though they're otherwise like c_quoting_style.
104748         Add custom_quoting_style member and document with comparison to
104749         clocale_quoting_style.
104750         * tests/test-quotearg.c (custom_quotes): New array.
104751         (custom_results): New array.
104752         (main): Extend to test custom quoting.
104754 2009-08-22  Joel E. Denny  <jdenny@clemson.edu>
104756         quotearg: fix right quote escaping when it's in quote_these_too
104757         * lib/quotearg.c (quotearg_buffer_restyled): Upon seeing a right
104758         quote, be sure to prepend only one backslash.
104759         * tests/test-quotearg.c (use_quote_double_quotes): New function.
104760         (main): Test it.
104762 2009-08-22  Joel E. Denny  <jdenny@clemson.edu>
104764         quotearg-tests: test escaping of embedded locale quotes
104765         * tests/test-quotearg.c (struct result_strings): Add member for
104766         new input.
104767         (LQ_ENC, RQ_ENC, RQ_ESC): New macros.
104768         (inputs): Add new input.
104769         (results_g): Add expected results.
104770         (flag_results): Likewise.
104771         (locale_results): Likewise.
104772         (compare_strings): Check those.
104774 2009-08-23  Bruno Haible  <bruno@clisp.org>
104776         Tests for module 'dup3'.
104777         * modules/dup3-tests: New file.
104778         * tests/test-dup3.c: New file.
104780         New module 'dup3'.
104781         * lib/unistd.in.h (dup3): New declaration.
104782         * lib/dup3.c: New file.
104783         * m4/dup3.m4: New file.
104784         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_DUP3 and
104785         HAVE_DUP3.
104786         * modules/unistd (Makefile.am): Substitute GNULIB_DUP3 and HAVE_DUP3.
104787         * modules/dup3: New file.
104788         * doc/glibc-functions/dup3.texi: Mention the new module.
104790 2009-08-23  Bruno Haible  <bruno@clisp.org>
104792         Tweak the dup2 test.
104793         * tests/test-dup2.c (main): Create the test file empty. Verify that an
104794         out-of-range fd yields EBADF. Verify that after writing to /dev/null,
104795         the test file is still empty. Fix argument order of lseek.
104797 2009-08-23  Bruno Haible  <bruno@clisp.org>
104799         Avoid test link errors when the modules getopt-gnu, gettext are used.
104800         * modules/getopt-posix-tests (Makefile.am): Define test_getopt_LDADD.
104801         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
104803 2009-08-23  Bruno Haible  <bruno@clisp.org>
104805         Fix getdtablesize() on mingw.
104806         * lib/getdtablesize.c (getdtablesize): Implement differently.
104807         * lib/unistd.in.h (getdtablesize): Improve comment.
104809 2009-08-23  Bruno Haible  <bruno@clisp.org>
104811         New module 'mkostemp'.
104812         Based on Ulrich Drepper's 2007-08-10 change in glibc.
104813         * lib/stdlib.in.h (mksotemp): New declaration.
104814         * lib/mkostemp.c: New file, from glibc with modifications.
104815         * lib/tempname.h (GT_FILE): Remove outdated comment.
104816         (gen_tempname): Add flags argument.
104817         * lib/tempname.c (__GT_BIGFILE): Remove macro.
104818         (__GT_FILE): Map to 1.
104819         (small_open, large_open): Remove macros.
104820         (__gen_tempname): Add flags argument. Remove code for __GT_BIGFILE.
104821         * lib/mkstemp.c (mkstemp): Update.
104822         * lib/mkdtemp.c (mkdtemp): Likewise.
104823         * m4/mkostemp.m4: New file.
104824         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_MKOSTEMP,
104825         HAVE_MKOSTEMP.
104826         * modules/stdlib (Makefile.am): Substitute GNULIB_MKOSTEMP,
104827         HAVE_MKOSTEMP.
104828         * modules/mkostemp: New file, based on modules/mkstemp.
104829         * doc/glibc-functions/mkostemp.texi: Mention the new module.
104830         * NEWS: Mention the change.
104832 2009-08-23  Bruno Haible  <bruno@clisp.org>
104834         * lib/pipe2.c (pipe2): Support O_TEXT, O_BINARY on all platforms.
104835         Reported by Eric Blake.
104837 2009-08-23  Bruno Haible  <bruno@clisp.org>
104839         * lib/pipe2.c (pipe2): Fix test of fcntl's return value.
104840         Reported by Eric Blake.
104842 2009-08-23  Bruno Haible  <bruno@clisp.org>
104844         * modules/fchdir (Depends-on): Use fcntl-h instead of fcntl.
104845         * modules/pipe2 (Depends-on): Likewise.
104847 2009-08-23  Eric Blake  <ebb9@byu.net>
104849         fcntl-h: add O_TTY_INIT support
104850         * lib/fcntl.in.h (O_TTY_INIT): Support another POSIX macro.
104851         * tests/test-fcntl-h.c (o): Test it.
104852         * doc/posix-headers/fcntl.texi (fcntl.h): Update documentation.
104854         fcntl-h: rename from fcntl, in preparation for fcntl(2)
104855         * modules/fcntl: Move <fcntl.h> header replacement...
104856         * modules/fcntl-h: ...to new name, so as not to collide with
104857         like-named function.
104858         * tests/test-fcntl.c: Rename...
104859         * tests/test-fcntl-h.c: ...to this.  Test FD_CLOEXEC.
104860         * modules/fcntl-tests: Rename...
104861         * modules/fcntl-h-tests: ...to this.  Update test file name.
104862         * modules/chdir-long (Depends-on): Update clients.
104863         * modules/chdir-safer (Depends-on): Likewise.
104864         * modules/fcntl-safer (Depends-on): Likewise.
104865         * modules/fts (Depends-on): Likewise.
104866         * modules/mkancesdirs (Depends-on): Likewise.
104867         * modules/mkdir-p (Depends-on): Likewise.
104868         * modules/open (Depends-on): Likewise.
104869         * modules/savewd (Depends-on): Likewise.
104870         * MODULES.html.sh (systems lacking POSIX:2008): Update name.
104871         * doc/posix-headers/fcntl.texi (fcntl.h): Update documentation.
104873 2009-08-22  Bruno Haible  <bruno@clisp.org>
104875         * modules/binary-io (License): Relicense under LGPL.
104876         * modules/pipe2 (License): Likewise.
104878 2009-08-22  Bruno Haible  <bruno@clisp.org>
104880         * lib/pipe-filter-ii.c (pipe_filter_ii_execute): Fix test of fcntl's
104881         return value.
104882         * lib/pipe-filter-gi.c (filter_init): Likewise.
104883         Reported by Eric Blake.
104885 2009-08-22  Bruno Haible  <bruno@clisp.org>
104887         * lib/pipe.c (create_pipe): Use pipe2 instead of _pipe.
104888         * modules/pipe (Depends-on): Add pipe2.
104890 2009-08-22  Bruno Haible  <bruno@clisp.org>
104892         Tests for module 'pipe2'.
104893         * modules/pipe2-tests: New file.
104894         * tests/test-pipe2.c: New file.
104896         New module 'pipe2'.
104897         * lib/unistd.in.h (pipe2): New declaration.
104898         * lib/pipe2.c: New file.
104899         * m4/pipe2.m4: New file.
104900         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_PIPE2 and
104901         HAVE_PIPE2.
104902         * modules/unistd (Makefile.am): Substitute GNULIB_PIPE2 and HAVE_PIPE2.
104903         * modules/pipe2: New file.
104904         * doc/glibc-functions/pipe2.texi: Mention the new module.
104906 2009-08-22  Bruno Haible  <bruno@clisp.org>
104908         Reference some new glibc functions.
104909         * doc/glibc-functions/accept4.texi: New file.
104910         * doc/glibc-functions/dup3.texi: New file.
104911         * doc/glibc-functions/mkostemp.texi: New file.
104912         * doc/glibc-functions/pipe2.texi: New file.
104913         * doc/gnulib.texi (Glibc stdlib.h): Refer to mkostemp.
104914         (Glibc sys/socket.h): Refer to accept4.
104915         (Glibc unistd.h): Refer to dup3, pipe2.
104916         Reported by Eric Blake.
104918 2009-08-22  Jim Meyering  <meyering@redhat.com>
104919             Bruno Haible  <bruno@clisp.org>
104921         annotate automake snippets with $(AM_V_GEN) and $(AM_V_at)
104922         This makes it so packages using automake-1.11's silent-rules option
104923         can print e.g., a single "GEN    configmake.h" line, rather than
104924         the 30+ statements that perform the job.  If you want to see the
104925         actual commands, you can still run "make V=1".
104926         * modules/alloca-opt: Add $(AM_V_GEN) and $(AM_V_at) prefixes
104927         so that make output is abbreviated when those variables are defined
104928         appropriately.
104929         * modules/argz: Likewise.
104930         * modules/arpa_inet: Likewise.
104931         * modules/byteswap: Likewise.
104932         * modules/configmake: Likewise.
104933         * modules/dirent: Likewise.
104934         * modules/errno: Likewise.
104935         * modules/fcntl: Likewise.
104936         * modules/float: Likewise.
104937         * modules/fnmatch: Likewise.
104938         * modules/getopt-posix: Likewise.
104939         * modules/glob: Likewise.
104940         * modules/iconv_open: Likewise.
104941         * modules/inttypes: Likewise.
104942         * modules/localcharset: Likewise.
104943         * modules/locale: Likewise.
104944         * modules/math: Likewise.
104945         * modules/netdb: Likewise.
104946         * modules/netinet_in: Likewise.
104947         * modules/poll: Likewise.
104948         * modules/posix_spawnp-tests: Likewise.
104949         * modules/sched: Likewise.
104950         * modules/search: Likewise.
104951         * modules/selinux-h: Likewise.
104952         * modules/signal: Likewise.
104953         * modules/spawn: Likewise.
104954         * modules/stdarg: Likewise.
104955         * modules/stdbool: Likewise.
104956         * modules/stddef: Likewise.
104957         * modules/stdint: Likewise.
104958         * modules/stdio: Likewise.
104959         * modules/stdlib: Likewise.
104960         * modules/string: Likewise.
104961         * modules/strings: Likewise.
104962         * modules/sys_file: Likewise.
104963         * modules/sys_ioctl: Likewise.
104964         * modules/sys_select: Likewise.
104965         * modules/sys_socket: Likewise.
104966         * modules/sys_stat: Likewise.
104967         * modules/sys_time: Likewise.
104968         * modules/sys_times: Likewise.
104969         * modules/sys_utsname: Likewise.
104970         * modules/sys_wait: Likewise.
104971         * modules/sysexits: Likewise.
104972         * modules/time: Likewise.
104973         * modules/unistd: Likewise.
104974         * modules/wchar: Likewise.
104975         * modules/wctype: Likewise.
104977 2009-08-22  Jim Meyering  <meyering@redhat.com>
104979         announce-gen: detect write failure
104980         * build-aux/announce-gen: Add Coda at end.
104981         Remove equivalent-but-more-verbose block at top.
104983 2009-08-19  Akim Demaille  <demaille@gostai.com>
104985         bootstrap: --help to stdout.
104986         * bootstrap (usage): Don't send --help to stderr.
104987         Use a here doc instead of a long string.
104989 2009-08-21  Eric Blake  <ebb9@byu.net>
104991         test-popen-safer: split from test-popen
104992         * tests/test-popen.c (main): Move...
104993         * tests/test-popen.h: ...into new file.
104994         * tests/test-popen-safer2.c: New file.
104995         * modules/popen-tests (Files): Add test-popen.h.
104996         * modules/popen-safer-tests (Files): Add test-popen-safer2.c.
104997         Suggested by Bruno Haible.
104999         test-fcntl-safer: split from test-open
105000         * tests/test-open.c (main): Move...
105001         * tests/test-open.h: ...into new file.
105002         * tests/test-fcntl-safer.c: New file.
105003         * modules/open-tests (Files): Add test-open.h.
105004         * modules/fcntl-safer-tests: New file.
105005         Suggested by Bruno Haible.
105007         test-fopen-safer: split from test-fopen
105008         * tests/test-fopen.c (main): Move...
105009         * tests/test-fopen.h: ...into new file.
105010         * tests/test-fopen-safer.c: New file.
105011         * modules/fopen-tests (Files): Add test-fopen.h.
105012         * modules/fopen-safer-tests: New file.
105013         Suggested by Bruno Haible.
105015 2009-08-21  Paolo Bonzini  <bonzini@gnu.org>
105017         popen-safer: test O_CLOEXEC at run-time.
105018         * lib/popen-safer.c: Test O_CLOEXEC at run-time.
105020 2009-08-21  Paolo Bonzini  <bonzini@gnu.org>
105022         fcntl: move more flags to the header
105023         * lib/cloexec.c: Do not define FD_CLOEXEC here.
105024         * lib/popen-safer.c: Do not alias O_NOINHERIT to O_CLOEXEC here.
105025         * lib/fcntl.in.h: Do both things here.
105027 2009-08-21  Jim Meyering  <meyering@redhat.com>
105029         consistently remove $@-t before redirecting to it
105030         * modules/argz: Remove $@-t and $@ before redirecting to the former.
105031         * modules/alloca-opt: Likewise.
105032         * modules/byteswap: Likewise.
105033         * modules/fnmatch: Likewise.
105034         * modules/getopt-posix: Likewise.
105035         * modules/glob: Likewise.
105036         * modules/poll: Likewise.
105037         * modules/posix_spawnp-tests: Likewise.
105038         * modules/sys_socket: Likewise.
105039         * modules/sysexits: Likewise.
105041 2009-08-21  Eric Blake  <ebb9@byu.net>
105043         popen: simplify access to original popen
105044         * lib/popen.c (rpl_popen): No need to worry about popen being a
105045         macro.
105046         Reported by Bruno Haible.
105048 2009-08-20  Eric Blake  <ebb9@byu.net>
105050         build: avoid some compiler warnings
105051         * lib/selinux-at.h: Use dir_fd, not dirfd, to avoid shadowing.
105052         * lib/exclude.c (fnmatch_pattern_has_wildcards): Use correct
105053         type.
105054         (new_exclude_segment, excluded_file_pattern_p)
105055         (excluded_file_name_p): Reduce scope.
105056         * lib/vasnprintf.c (decimal_point_char): Avoid warning on
105057         old-style declaration.
105059 2009-08-20  Simon Josefsson  <simon@josefsson.org>
105061         * tests/test-exclude1.sh: Handle Windows EOL.
105062         * tests/test-exclude2.sh: Likewise.
105063         * tests/test-exclude3.sh: Likewise.
105064         * tests/test-exclude4.sh: Likewise.
105065         * tests/test-exclude5.sh: Likewise.
105066         * tests/test-exclude6.sh: Likewise.
105067         * tests/test-exclude7.sh: Likewise.
105069 2009-08-19  Akim Demaille  <demaille@gostai.com>
105071         bootstrap: find sha1sum when named gsha1sum.
105072         * bootstrap (find_tool): New.
105073         ($SHA1SUM): New.
105074         Use it.
105076 2009-08-20  Jim Meyering  <meyering@redhat.com>
105078         maint.mk: _header_without_use: fix a quoting bug and remove a bash'ism
105079         * top/maint.mk (_header_without_use): Use "\\\\", not "\\" in the sed
105080         expression that converts "." in a file name to "\." in the resulting
105081         regexp.  Start with a dummy statement, so that prior shell variable
105082         definitions are expanded portably.  Reported by Simon Josefsson.
105084 2009-08-20  Paolo Bonzini  <bonzini@gnu.org>
105086         Fix polling for writeability of a screen buffer.
105087         * lib/poll.c: Distinguish input and screen buffers for the
105088         Win32 implementation.
105089         * lib/select.c: Likewise.
105091 2009-08-19  Eric Blake  <ebb9@byu.net>
105093         popen-safer: prevent popen from clobbering std descriptors
105094         * modules/popen-safer: New file.
105095         * lib/popen-safer.c: Likewise.
105096         * m4/stdio-safer.m4 (gl_POPEN_SAFER): New macro.
105097         * lib/stdio--.h (popen): Provide override.
105098         * lib/stdio-safer.h (popen_safer): Provide declaration.
105099         * tests/test-popen.c (includes): Partially test this.
105100         * modules/popen-safer-tests: New file, for more tests.
105101         * tests/test-popen-safer.c: Likewise.
105102         * MODULES.html.sh (file stream based Input/Output): Mention it.
105104         tests: test some of the *-safer modules
105105         * modules/fopen-safer (Depends-on): Add fopen.
105106         * modules/fcntl-safer (Depends-on): Add fcntl.
105107         * modules/stdlib-safer (Depends-on): Add stdlib.
105108         (configure.ac): Set indicator.
105109         * modules/unistd-safer (configure.ac): Likewise.
105110         * modules/tmpfile-safer (configure.ac): Likewise.
105111         (Depends-on): Add tmpfile.
105112         * lib/stdio--.h (fopen, tmpfile): Don't override unless module is
105113         active.
105114         * tests/test-fopen.c (includes): Test safer versions when they are
105115         in use.
105116         * tests/test-open.c (includes): Likewise.
105118         popen: fix cygwin 1.5 bug when stdin closed
105119         * doc/posix-functions/popen.texi (popen): Document cygwin bugs.
105120         * modules/popen: New file.
105121         * modules/popen-tests: Likewise.
105122         * tests/test-popen.c: Likewise.
105123         * m4/popen.m4: Likewise.
105124         * lib/popen.c: Likewise.
105125         * lib/stdio.in.h (popen): New declaration.
105126         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add popen.
105127         * modules/stdio (Makefile.am): Likewise.
105128         * MODULES.html.sh (systems lacking POSIX:2008): Mention it.
105130 2009-08-17  Joel E. Denny  <jdenny@clemson.edu>
105132         maint.mk: give full control over update-copyright exclusions
105133         * top/maint.mk (VC_LIST_EXCEPT): Instead of ChangeLog, use
105134         ${VC_LIST_EXCEPT_DEFAULT-ChangeLog} as the default exclusion.
105135         (update-copyright): Don't force inclusion of top-level
105136         ChangeLog.  Don't force exclusion of all COPYING files, but make
105137         them the default exclusion instead.
105139 2009-08-16  Bruno Haible  <bruno@clisp.org>
105141         Fix test failures on Solaris 10.
105142         * tests/uniconv/test-u8-conv-from-enc.c (main): Disable autodetect_jp
105143         tests when Solaris iconv() is used.
105144         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
105145         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
105146         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
105147         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
105148         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
105150 2009-08-16  Bruno Haible  <bruno@clisp.org>
105152         Fix test failures on Solaris 10.
105153         * tests/test-pipe-filter-ii1.sh: Determine the filename of a working
105154         'tr' program and pass it as first argument.
105155         * tests/test-pipe-filter-gi1.sh: Likewise.
105156         * tests/test-pipe-filter-ii1.c (main): Except the filename of a 'tr'
105157         program as first argument.
105158         * tests/test-pipe-filter-gi1.c (main): Likewise.
105160 2009-08-16  Eric Blake  <ebb9@byu.net>
105162         fpurge: fix previous commits
105163         * modules/fpurge (Makefile.am): Make replacement conditional,
105164         partially reverting 2007-04-29 change; missed in previous
105165         attempt.
105166         * m4/fpurge.m4 (gl_FUNC_FPURGE): Also compile fpurge.c when fpurge
105167         is missing.
105169 2009-08-16  Bruno Haible  <bruno@clisp.org>
105171         Clarify fpurge's effect on the file position.
105172         * lib/stdio.in.h (fpurge): Specify the file position after fpurge.
105173         * tests/test-fpurge.c (main): Make a second pass for checking the file
105174         position.
105176 2009-08-16  Bruno Haible  <bruno@clisp.org>
105178         * m4/fpurge.m4 (gl_FUNC_FPURGE): Don't compile fpurge.c if only the
105179         declaration of fpurge is missing.
105180         * tests/test-fpurge.c (main): Check that the file has not more contents
105181         than expected. Close the file before removing it.
105183 2009-08-15  Eric Blake  <ebb9@byu.net>
105185         fpurge: don't wrap working cygwin implementation
105186         * lib/fpurge.c (fpurge): Fix comment typo.
105187         * m4/fpurge.m4 (gl_FUNC_FPURGE): Detect BSD bug, allowing cygwin
105188         1.7 to avoid replacement.
105189         * tests/test-fpurge.c (main): Enhance test.
105191 2009-08-15  Eric Blake  <ebb9@byu.net>
105192         and Jim Meyering  <meyering@redhat.com>
105194         test-update-copyright: skip if perl is insufficient
105195         * tests/test-update-copyright.sh: Failure to run maintainer tool
105196         should not cause testsuite failure on cygwin 1.5.
105198 2009-08-14  Eric Blake  <ebb9@byu.net>
105200         doc: mention more functions added in cygwin 1.7.0
105201         * doc/posix-headers/limits.texi (limits.h): Update for recent
105202         cygwin additions.
105203         * doc/posix-headers/wordexp.texi (wordexp.h): Likewise.
105204         * doc/posix-functions/wordexp.texi (wordexp): Likewise.
105205         * doc/posix-functions/wordfree.texi (wordfree): Likewise.
105206         * doc/posix-functions/setlocale.texi (setlocale): Likewise.
105207         * doc/posix-functions/nl_langinfo.texi (nl_langinfo): Likewise.
105209 2009-08-14  Eric Blake  <ebb9@byu.net>
105211         maint.mk: simplify update-copyright rule
105212         * top/maint.mk (update-copyright-local): Delete, and document how
105213         to do it in cfg.mk instead.
105214         (update-copyright-exclude-regexp): Delete, and document how to do
105215         it in .x-update-copyright instead.
105216         (update-copyright): Simplify, thanks to VC_LIST_EXCEPT.  Don't
105217         exclude ChangeLog.
105219 2009-08-14  Bruno Haible  <bruno@clisp.org>
105221         * m4/wchar.m4 (gl_WCHAR_H): Undo invalid optimization in last commit.
105223 2009-08-14  Joel E. Denny  <jdenny@clemson.edu>
105225         maint.mk: support update-copyright-env
105226         * top/maint.mk (update-copyright-env): Define place-holder.
105227         (update-copyright): Expand $(update-copyright-env) before
105228         invoking update-copyright.
105230 2009-08-14  Joel E. Denny  <jdenny@clemson.edu>
105232         update-copyright: implement forced reformatting
105233         * build-aux/update-copyright: Implement and document
105234         UPDATE_COPYRIGHT_FORCE.
105235         * tests/test-update-copyright.sh: Test it.
105237 2009-08-14  Eric Blake  <ebb9@byu.net>
105238         and Bruno Haible  <bruno@clisp.org>
105240         stddef: fix NetBSD 5.0 NULL bug, rather than working around it
105241         * tests/test-locale.c: Revert previous patch related to NULL.
105242         * tests/test-stdio.c: Likewise.
105243         * tests/test-stdlib.c: Likewise.
105244         * tests/test-string.c: Likewise.
105245         * tests/test-unistd.c: Likewise.
105246         * modules/time-tests (Depends-on): Add verify.
105247         * modules/wchar-tests (Depends-on): Likewise.
105248         * tests/test-time.c: Test for NULL compliance.
105249         * tests/test-wchar.c: Likewise.
105250         * modules/locale (Depends-on): Add stddef.
105251         * modules/stdio (Depends-on): Likewise.
105252         * modules/stdlib (Depends-on): Likewise.
105253         * modules/string (Depends-on): Likewise.
105254         * modules/time (Depends-on): Likewise.
105255         * modules/unistd (Depends-on): Likewise.
105256         * modules/wchar (Depends-on): Likewise.
105257         * lib/locale.in.h (includes): Use <stddef.h> to fix NULL.
105258         * lib/stdlib.in.h (includes): Likewise.
105259         * lib/string.in.h (includes): Likewise.
105260         * lib/time.in.h (includes): Likewise.
105261         * lib/unistd.in.h (includes): Likewise.
105262         * m4/locale_h.m4 (gl_LOCALE_H): Replace locale.h if stddef.h was
105263         replaced.
105264         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
105265         * m4/stddef_h.m4: New file.
105266         * modules/stddef: Likewise.
105267         * lib/stddef.in.h: Likewise.
105268         * modules/stddef-tests: Likewise.
105269         * tests/test-stddef.c: Likewise.
105270         * MODULES.html.sh (Basic types <stddef.h>): Mention new module.
105271         * doc/posix-headers/stddef.texi (stddef.h): Document the bug.
105272         * doc/posix-headers/locale.texi (locale.h): Likewise.
105273         * doc/posix-headers/stdio.texi (stdio.h): Likewise.
105274         * doc/posix-headers/stdlib.texi (stdlib.h): Likewise.
105275         * doc/posix-headers/string.texi (string.h): Likewise.
105276         * doc/posix-headers/time.texi (time.h): Likewise.
105277         * doc/posix-headers/unistd.texi (unistd.h): Likewise.
105278         * doc/posix-headers/wchar.texi (wchar.h): Likewise.
105280 2009-08-14  Eric Blake  <ebb9@byu.net>
105282         doc: improve git diff of texinfo files
105283         * .gitattributes: Add rule for *.texi files, with hint on how to
105284         use it.
105285         Copied from m4, and based on a report by Bruno Haible.
105287 2009-08-14  Bruno Haible  <bruno@clisp.org>
105289         Disable multithread support by default on Cygwin 1.5.x for real.
105290         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Fix last commit.
105292 2009-08-14  Joel E. Denny  <jdenny@clemson.edu>
105294         update-copyright: much ado about intervals
105295         * build-aux/update-copyright: Implement and document
105296         UPDATE_COPYRIGHT_USE_INTERVALS to control expansion and collapse
105297         of copyright year intervals.
105298         Also, document UPDATE_COPYRIGHT_YEAR.
105299         * tests/test-update-copyright.sh: Test it.
105301         update-copyright: convert 2-digit to 4-digit years
105302         * build-aux/update-copyright: Implement and document.
105303         * tests/test-update-copyright.sh: Update.
105305 2009-08-14  Jim Meyering  <meyering@redhat.com>
105307         test-exclude: avoid coreutils "make check" failure
105308         * tests/test-exclude.c (ARGMATCH_DIE_DECL) [ARGMATCH_DIE_DECL]: Define,
105309         just as in test-argmatch.c.
105311 2009-08-13  Eric Blake  <ebb9@byu.net>
105313         test-dup2: fix bad assumption
105314         * tests/test-dup2.c (main): Tolerate leaked fds from environment.
105315         Reported by Peter Breitenlohner <peb@mppmu.mpg.de>.
105317         test-version-etc: fix CRLF portability issue
105318         * tests/test-version-etc.sh: Use tr, not sed, as not all sed
105319         recognize \r.
105320         * tests/test-argp-version-etc-1.sh: Likewise.
105322         getopt: update client modules
105323         * modules/argp (Depends-on): Use getopt-gnu.
105324         * modules/git-merge-changelog (Depends-on): Likewise.
105325         * modules/long-options (Depends-on): Likewise.
105326         * modules/xstrtol (Depends-on): Likewise.
105328 2009-08-13  Simon Josefsson  <simon@josefsson.org>
105330         * tests/test-version-etc.sh: Don't fail on different
105331         project/version.  Don't fail on CRLF differences.  Rewrite to use
105332         multiple -e instead of multiple sed forks, suggested by Eric Blake
105333         <ebb9@byu.net>.
105334         * tests/test-argp-version-etc-1.sh: Likewise.
105336 2009-08-13  Simon Josefsson  <simon@josefsson.org>
105338         * tests/test-version-etc.sh: Don't fail on different
105339         project/version.
105341 2009-08-12  Bruno Haible  <bruno@clisp.org>
105343         Tests for modules 'getopt-posix', 'getopt-gnu'.
105344         * modules/getopt-posix-tests: New file.
105345         * tests/test-getopt.c: New file.
105346         * tests/test-getopt.h: New file.
105347         * tests/test-getopt_long.h: New file.
105349         New modules 'getopt-posix', 'getopt-gnu'.
105350         * modules/getopt-gnu: New file, renamed from modules/getopt.
105351         * modules/getopt-posix: New file.
105352         * modules/getopt: Turn into an obsolete alias for getopt-gnu.
105353         * m4/getopt.m4 (gl_FUNC_GETOPT_POSIX, gl_FUNC_GETOPT_GNU): New macros.
105354         (gl_GETOPT): Remove macro.
105355         (gl_GETOPT_CHECK_HEADERS): Do some checks only for gl_FUNC_GETOPT_GNU.
105356         Disable the test against BSD systems that declare optreset. Test
105357         against mingw bug. Test against lack of support of optional arguments
105358         on many platforms.
105359         * doc/glibc-headers/getopt.texi: Update module name and list of
105360         relevant platforms.
105361         * doc/posix-functions/getopt.texi: Mention modules 'getopt-posix' and
105362         'getopt-gnu' and more portability problems.
105363         * NEWS: Mention the changes.
105365 2009-08-12  Bruno Haible  <bruno@clisp.org>
105367         Ensure that optarg etc. get declared by <unistd.h>.
105368         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Require
105369         AC_USE_SYSTEM_EXTENSIONS.
105370         * modules/getopt (Depends-on): Add 'extensions'.
105372 2009-08-12  Bruno Haible  <bruno@clisp.org>
105374         Avoid test link errors.
105375         * modules/pipe-filter-ii-tests (Makefile.am): Define
105376         test_pipe_filter_ii1_LDADD and test_pipe_filter_ii2_main_LDADD.
105377         * modules/pipe-filter-gi-tests (Makefile.am): Define
105378         test_pipe_filter_gi1_LDADD and test_pipe_filter_gi2_main_LDADD.
105379         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
105381 2009-08-12  Bruno Haible  <bruno@clisp.org>
105383         * m4/getopt.m4 (gl_REPLACE_GETOPT): New macro, was called
105384         gl_GETOPT_SUBSTITUTE before.
105385         (gl_GETOPT): Use it.
105386         * m4/argp.m4 (gl_ARGP): Update.
105387         Reported by Sergey Poznyakoff.
105389         * m4/getopt.m4: Reorder macros.
105390         (gl_GETOPT): Inline gl_GETOPT_SUBSTITUTE.
105391         (gl_GETOPT_SUBSTITUTE): Remove macro.
105393 2009-08-12  Sergey Poznyakoff  <gray@gnu.org.ua>
105395         Minor improvement in gitlog-to-changelog
105397         * build-aux/gitlog-to-changelog: New option `--format' makes
105398         output format string configurable.
105400 2009-08-12  Sergey Poznyakoff  <gray@gnu.org.ua>
105402         Optimize exclude: use hash tables for non-wildcard patterns.
105404         * lib/exclude.c: Include hash.h and mbuiter.h
105405         (struct exclude_pattern, exclude_segment): New data types.
105406         (struct exclude): Rewrite.
105407         (fnmatch_pattern_has_wildcards): New function.
105408         (new_exclude_segment, free_exclude_segment): New functions.
105409         (excluded_file_pattern_p, excluded_file_name_p): New functions.
105410         (excluded_file_name, add_exclude): Rewrite using new struct exclude.
105411         * lib/exclude.h (is_fnmatch_pattern): New prototype.
105412         * modules/exclude: Depend on hash and mbuiter.
105414         * modules/exclude-tests: New file.
105415         * tests/test-exclude.c: New file.
105416         * tests/test-exclude1.sh: New file.
105417         * tests/test-exclude2.sh: New file.
105418         * tests/test-exclude3.sh: New file.
105419         * tests/test-exclude4.sh: New file.
105420         * tests/test-exclude5.sh: New file.
105421         * tests/test-exclude6.sh: New file.
105422         * tests/test-exclude7.sh: New file.
105424 2009-08-12  Bruno Haible  <bruno@clisp.org>
105426         Ensure that getopt() gets declared by <unistd.h>.
105427         * lib/unistd.in.h: Conditionally include getopt.h.
105428         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Require gl_UNISTD_H_DEFAULTS.
105429         Set GNULIB_UNISTD_H_GETOPT.
105430         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
105431         GNULIB_UNISTD_H_GETOPT.
105432         * modules/unistd (Makefile.am): Substitute GNULIB_UNISTD_H_GETOPT.
105434 2009-08-12  Bruno Haible  <bruno@clisp.org>
105436         Clarify logic.
105437         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS, gl_GETOPT_IFELSE): Use
105438         gl_replace_getopt instead of GETOPT_H.
105440 2009-08-12  Bruno Haible  <bruno@clisp.org>
105442         * m4/getopt.m4: Add comments.
105444 2009-08-12  Bruno Haible  <bruno@clisp.org>
105446         Disable multithread support by default on Cygwin 1.5.x.
105447         * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): On Cygwin 1.5.x and older,
105448         set gl_use_threads=no if not specified otherwise.
105450 2009-08-11  Bruno Haible  <bruno@clisp.org>
105452         Avoid compilation error on NetBSD 5.0.
105453         * tests/test-locale.c: Write sizeof (NULL) instead of sizeof NULL.
105454         * tests/test-stdio.c: Likewise.
105455         * tests/test-stdlib.c: Likewise.
105456         * tests/test-string.c: Likewise.
105457         * tests/test-unistd.c: Likewise.
105458         Reported by Greg Troxel <gdt@ir.bbn.com>
105459         at <https://savannah.gnu.org/support/?106973>.
105461 2009-08-11  Bruno Haible  <bruno@clisp.org>
105463         * modules/dup2-tests (Depends-on): Remove close.
105465         Undo 2009-07-19 commit.
105466         * modules/acl-tests (Depends-on): Remove close.
105467         * modules/binary-io-tests (Depends-on): Likewise.
105468         * modules/closein-tests (Depends-on): Likewise.
105469         * modules/flock-tests (Depends-on): Likewise.
105470         * modules/fsync-tests (Depends-on): Likewise.
105471         * modules/lseek-tests (Depends-on): Likewise.
105472         * modules/pipe-tests (Depends-on): Likewise.
105473         * modules/posix_spawn-tests (Depends-on): Likewise.
105474         * modules/posix_spawnp-tests (Depends-on): Likewise.
105475         * modules/stat-time-tests (Depends-on): Likewise.
105476         * modules/yesno-tests (Depends-on): Likewise.
105478 2009-08-10  Bruno Haible  <bruno@clisp.org>
105480         * lib/vasnprintf.c (DCHAR_SET): Undefine at the end.
105482 2009-08-10  Bruno Haible  <bruno@clisp.org>
105484         Fix a gcc warning.
105485         * lib/write.c (rpl_write): Cast result of _get_osfhandle.
105487 2009-08-10  Bruno Haible  <bruno@clisp.org>
105489         Don't optimize AC_LIBOBJs, as they may appear in different contexts.
105490         * m4/close.m4 (gl_REPLACE_CLOSE): Execute AC_LIBOBJ unconditionally,
105491         not only the first time.
105492         * m4/fclose.m4 (gl_REPLACE_FCLOSE): Likewise.
105493         * m4/open.m4 (gl_REPLACE_OPEN): Likewise.
105494         * m4/strstr.m4 (gl_FUNC_STRSTR): Execute AC_LIBOBJ when REPLACE_STRSTR
105495         is 1, not only the first time.
105497 2009-08-10  Bruno Haible  <bruno@clisp.org>
105499         Make it possible to use module 'gethostname' without module 'close'.
105500         * lib/unistd.in.h (close): Evoke a link error only if
105501         UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS is set.
105502         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
105503         UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS.
105504         * modules/unistd (Makefile.am): Substitute
105505         UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS.
105506         * lib/sys_ioctl.in.h (ioctl): Evoke a link error only if
105507         SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS is set.
105508         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H_DEFAULTS): Initialize
105509         SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS.
105510         * modules/sys_ioctl (Makefile.am): Substitute
105511         SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS.
105512         * modules/socket (configure.ac): On native Windows, set
105513         UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS and
105514         SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS.
105515         Reported by Sam Steingold <sds@gnu.org>.
105517 2009-08-10  Bruno Haible  <bruno@clisp.org>
105519         * m4/close.m4 (gl_FUNC_CLOSE): Add comment.
105520         * modules/ioctl (configure.ac): Likewise.
105522 2009-08-10  Bruno Haible  <bruno@clisp.org>
105524         Avoid collision between gnulib wrapper and libintl wrapper.
105525         * lib/stdio-write.c (printf): Don't define if a printf wrapper is
105526         already defined in intl/printf.c.
105527         (vprintf): Test REPLACE_VPRINTF_POSIX, not REPLACE_VFPRINTF_POSIX.
105528         (vfprintf): Test REPLACE_VFPRINTF_POSIX, not REPLACE_VPRINTF_POSIX.
105530 2009-08-09  Bruno Haible  <bruno@clisp.org>
105532         Make <sys/select.h> really self-contained, also on Solaris 10.
105533         * lib/sys_select.in.h: Include <string.h>.
105534         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Test also against
105535         Solaris 10 problem.
105536         * tests/test-sys_select.c (main): Add check that FD_ZERO can be used.
105537         * doc/posix-headers/sys_select.texi: Mention the Solaris 10 problem.
105538         Reported by Jim Meyering.
105540 2009-08-09  Bruno Haible  <bruno@clisp.org>
105542         Avoid warnings from 'aclocal' that are due to a use of macro name
105543         AM_XGETTEXT_OPTION that is not defined in automake.
105544         * modules/argp (configure.ac): Hide use of AM_XGETTEXT_OPTION from
105545         automake.
105546         * modules/error (configure.ac): Likewise.
105547         * modules/propername (configure.ac): Likewise.
105548         * modules/vasprintf (configure.ac): Likewise.
105549         * modules/verror (configure.ac): Likewise.
105550         * modules/xprintf (configure.ac): Likewise.
105551         * modules/xvasprintf (configure.ac): Likewise.
105553 2009-08-08  Bruno Haible  <bruno@clisp.org>
105555         Avoid compilation error in C++ mode.
105556         * lib/gettimeofday.c (rpl_gettimeofday): Cast timezone argument.
105557         Reported by Sam Steingold <sds@gnu.org>.
105559 2009-08-08  Bruno Haible  <bruno@clisp.org>
105561         * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): Define HOST_NAME_MAX also
105562         for the various Unix platforms.
105563         * doc/posix-headers/limits.texi: Update platforms list regarding
105564         HOST_NAME_MAX.
105565         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
105567 2009-08-07  Jim Meyering  <meyering@redhat.com>
105569         selinux-at: fix typo in a comment
105570         * lib/selinux-at.h: s/getfileconat/getfilecon/ in a comment.
105571         Spotted by Paolo Bonzini.
105573         selinux-at: remove redundant m4 code, add documentation
105574         * modules/selinux-at (configure.ac): Remove redundant code.
105575         LIB_SELINUX is already set via the dependent module, selinux-h.
105576         (Include): Add quotes around selinux-at.h.
105577         * lib/selinux-at.h: Add documentation.
105578         Reported by Bruno Haible in
105579         http://marc.info/?l=gnulib-bug&m=124958988300749
105581 2009-08-07  Bruno Haible  <bruno@clisp.org>
105583         Avoid link error on MacOS X 10.3 and 10.4.
105584         * lib/argp-ba.c (argp_program_bug_address): Explicitly zero-initialize
105585         on non-ELF systems.
105586         * lib/argp-pv.c (argp_program_version): Likewise.
105587         Reported by Simon Josefsson.
105589 2009-08-07  Simon Josefsson  <simon@josefsson.org>
105591         * tests/test-version-etc.sh: Use $EXEEXT.
105593 2009-08-06  Joel E. Denny  <jdenny@clemson.edu>
105595         update-copyright: update documentation to point to maint.mk
105596         * build-aux/update-copyright: Here.
105598 2009-08-06  Jim Meyering  <meyering@redhat.com>
105600         maint.mk: support update-copyright-local
105601         * top/maint.mk (update-copyright-local): Define place-holder.
105602         (update-copyright): Depend on $(update-copyright-local).
105604 2009-08-06  Jim Meyering  <meyering@redhat.com>
105606         selinux-at: new module
105607         Initially written for coreutils, this module will soon be
105608         used by findutils, too.
105609         * MODULES.html.sh [Misc]: Add selinux-at.
105610         * lib/selinux-at.h: New file, from coreutils.
105611         * lib/selinux-at.c: Likewise.
105612         * modules/selinux-at: Likewise.
105613         (License): Change from LGPL to GPL, since it depends
105614         on the GPL'd openat module.
105616         doc: update README
105617         * README: Remove references to cogito.
105618         Remove cvs-repo-updating instructions from 2007.
105619         Don't imply that CVS is better if you have limited disk space.
105621 2009-08-05  Joel E. Denny  <jdenny@clemson.edu>
105623         update-copyright: support C-style comments
105624         * build-aux/update-copyright: Implement and document.
105625         * tests/test-update-copyright.sh: Test.
105627 2009-08-05  Joel E. Denny  <jdenny@clemson.edu>
105629         update-copyright: support omitted "(C)"
105630         * build-aux/update-copyright: Implement and document.  Also,
105631         allow variable whitespace before "(C)".
105632         * tests/test-update-copyright.sh: Test.
105634 2009-08-05  Joel E. Denny  <jdenny@clemson.edu>
105636         update-copyright: don't trip on non-FSF copyright statements
105637         * build-aux/update-copyright: Fix so that the first correctly
105638         formatted FSF copyright statement is recognized no matter what
105639         appears before it.  Update documentation.
105640         * tests/test-update-copyright.sh: Test that.
105642 2009-08-05  Joel E. Denny  <jdenny@clemson.edu>
105644         update-copyright: clean up code a little
105645         * build-aux/update-copyright: Append "_re" to the name of any
105646         variable holding a regular expression.
105647         Replace "old" and "new" with "stmt" in variable names.
105648         Do not accept 2-digit UPDATE_COPYRIGHT_YEAR, which was not
105649         handled correctly.
105650         Format code more consistently.
105652 2009-08-05  Joel E. Denny  <jdenny@clemson.edu>
105654         update-copyright-tests: improve portability
105655         * tests/test-update-copyright.sh: Use cmp if diff cannot handle
105656         -u or /dev/null.  Suggested by Jim Meyering and Eric Blake.
105658 2009-08-03  Joel E. Denny  <jdenny@clemson.edu>
105660         update-copyright: support @copyright{} and &copy;
105661         * build-aux/update-copyright: Implement and document.
105662         * tests/test-update-copyright.sh: Test.
105664 2009-08-04  Jim Meyering  <meyering@redhat.com>
105666         update-copyright-tests: correctly test EOL=\r\n handling
105667         * tests/test-update-copyright.sh: Put \r at the end of some lines
105668         for the dos-eol tests.  Based on a patch by Joel E. Denny.
105670         maint.mk: make update-copyright exclusion list more configurable
105671         * top/maint.mk (update-copyright): Default to excluding COPYING,
105672         but allow an override, in case someone does want to update that file.
105674         maint.mk: don't update copyright date in COPYING
105675         * top/maint.mk (update-copyright): Exclude COPYING.
105677         maint.mk: add a copyright-updating rule
105678         * top/maint.mk (update-copyright): New rule.
105679         Derived from coreutils/Makefile.am.
105681         update-copyright: rename some variables
105682         * build-aux/update-copyright: Rename a few variables for clarity.
105683         Tweak syntax.  List Joel E. Denny as coauthor.
105685 2009-08-03  Joel E. Denny  <jdenny@clemson.edu>
105687         update-copyright: fix bug for 2-digit last year and add tests
105688         * build-aux/update-copyright: Fix bug.
105689         Use UPDATE_COPYRIGHT_YEAR from environment as current year if
105690         specified.
105691         * modules/update-copyright-tests: New
105692         * tests/test-update-copyright.sh: New.
105694 2009-07-31  Joel E. Denny  <jdenny@clemson.edu>
105696         update-copyright: handle leading tabs in line prefix
105697         * build-aux/update-copyright: Count leading tabs as 8 spaces
105698         when computing margin.  This helps with the formatting of
105699         ChangeLogs, for example.
105700         Fix documentation a little.
105702 2009-07-31  Joel E. Denny  <jdenny@clemson.edu>
105704         update-copyright: support EOL=\r\n
105705         * build-aux/update-copyright: Implement that.
105707 2009-07-31  Joel E. Denny  <jdenny@clemson.edu>
105709         update-copyright: automatically format copyright statements
105710         * build-aux/update-copyright: Implement that.
105711         Also, be a little more predictable and safer by always failing
105712         when the full copyright format is not perfectly recognized as an
105713         unbroken whole.  Discussed at
105714         <http://lists.gnu.org/r/bug-gnulib/2009-07/msg00131.html>.
105715         Rewrite documentation.
105717 2009-08-03  Bruno Haible  <bruno@clisp.org>
105719         * m4/iconv.m4 (AM_ICONV): Fix displayed message with autoconf-2.64.
105721 2009-08-02  Bruno Haible  <bruno@clisp.org>
105723         Tests for module 'uname'.
105724         * modules/uname-tests: New file.
105725         * tests/test-uname.c: New file.
105727         New module 'uname'.
105728         * lib/uname.c: New file.
105729         * m4/uname.m4: New file.
105730         * modules/uname: New file.
105731         * doc/posix-functions/uname.texi: Mention the new module.
105733 2009-08-02  Bruno Haible  <bruno@clisp.org>
105735         Tests for module 'sys_utsname'.
105736         * modules/sys_utsname-tests: New file.
105737         * tests/test-sys_utsname.c: New file.
105739         New module 'sys_utsname'.
105740         * lib/sys_utsname.in.h: New file, based on glibc's <sys/utsname.h>.
105741         * m4/sys_utsname_h.m4: New file.
105742         * modules/sys_utsname: New file.
105743         * doc/posix-headers/sys_utsname.texi: Mention the new module.
105745 2009-08-02  Bruno Haible  <bruno@clisp.org>
105747         Implicitly initialize the sockets library.
105748         * lib/gethostname.c: Include sockets.h.
105749         (rpl_gethostname): Invoke gl_sockets_startup.
105750         * lib/socket.c: Include sockets.h.
105751         (rpl_socket): Invoke gl_sockets_startup.
105752         * modules/gethostname (Depends-on): Add sockets.
105753         * modules/socket (Depends-on): Likewise.
105754         * tests/test-poll.c: Don't include sockets.h.
105755         (main): Don't invoke gl_sockets_startup.
105756         * tests/test-select.c: Don't include sockets.h.
105757         (main): Don't invoke gl_sockets_startup.
105759 2009-08-02  Bruno Haible  <bruno@clisp.org>
105761         Allow multiple calls to gl_sockets_startup.
105762         * lib/sockets.c (initialized_sockets_version): New variable.
105763         (gl_sockets_startup): Do nothing if already called for this or a higher
105764         version.
105765         (gl_sockets_cleanup): Reset initialized_sockets_version.
105767 2009-08-03  Simon Josefsson  <simon@josefsson.org>
105769         * tests/test-argp-version-etc-1.sh: Use EXEEXT.  Don't fail on
105770         different project/version.
105772 2009-08-02  Paolo Bonzini  <bonzini@gnu.org>
105773             Bruno Haible  <bruno@clisp.org>
105775         Tests for module 'pipe-filter-gi'.
105776         * modules/pipe-filter-gi-tests: New file.
105777         * tests/test-pipe-filter-gi1.sh: New file.
105778         * tests/test-pipe-filter-gi1.c: New file.
105779         * tests/test-pipe-filter-gi2.sh: New file.
105780         * tests/test-pipe-filter-gi2-main.c: New file.
105781         * tests/test-pipe-filter-gi2-child.c: New file.
105783         New module 'pipe-filter-gi'.
105784         * lib/pipe-filter-gi.c: New file.
105785         * modules/pipe-filter-gi: New file.
105787 2009-08-02  Bruno Haible  <bruno@clisp.org>
105788             Paolo Bonzini  <bonzini@gnu.org>
105790         Tests for module 'pipe-filter-ii'.
105791         * modules/pipe-filter-ii-tests: New file.
105792         * tests/test-pipe-filter-ii1.sh: New file.
105793         * tests/test-pipe-filter-ii1.c: New file.
105794         * tests/test-pipe-filter-ii2.sh: New file.
105795         * tests/test-pipe-filter-ii2-main.c: New file.
105796         * tests/test-pipe-filter-ii2-child.c: New file.
105798         New module 'pipe-filter-ii'.
105799         * lib/pipe-filter.h: New file.
105800         * lib/pipe-filter-ii.c: New file.
105801         * lib/pipe-filter-aux.h: New file.
105802         * modules/pipe-filter-ii: New file.
105804 2009-08-02  Simon Josefsson  <simon@josefsson.org>
105806         * lib/gc-libgcrypt.c: Change copyright to FSF.
105807         * lib/gc-gnulib.c: Likewise.
105809 2009-08-02  Martin Lambers  <marlam@marlam.de>  (tiny change)
105811         * lib/gethostname.c: Include limits.h.
105813 2009-08-02  Simon Josefsson  <simon@josefsson.org>
105814             Bruno Haible  <bruno@clisp.org>
105816         Ensure HOST_NAME_MAX as part of the gethostname module.
105817         * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): On native Windows platforms,
105818         define also HOST_NAME_MAX.
105819         * tests/test-gethostname.c: Include <limits.h>.
105820         (main): Check also HOST_NAME_MAX.
105821         * doc/posix-headers/limits.texi: Document the mingw problem.
105823 2009-08-02  Bruno Haible  <bruno@clisp.org>
105825         * lib/gethostname.c (gethostname): Fix handling of large len argument.
105826         Add comments.
105828 2009-03-31  Simon Josefsson  <simon@josefsson.org>
105830         * lib/gethostname.c: Add Windows wrapper.
105831         * m4/gethostname.m4: Look for gethostname in -lws2_32.
105832         * modules/gethostname: Depend on sys_socket & errno, for also
105833         added lib/w32sock.h.  Add GETHOSTNAME_LIB link directive.
105834         * modules/gethostname-tests: Link to @GETHOSTNAME_LIB@.
105836 2009-07-31  Jim Meyering  <meyering@redhat.com>
105838         getloadavg: fix symbol name in comment
105839         * lib/getloadavg.c: Correct a typo I introduced when adding
105840         comments to Matt's change: s/NLIST_POINTER/N_NAME_POINTER/.
105841         Matt Kraai spotted the problem.
105843 2009-07-29  Matt Kraai  <mkraai@beckman.com>
105845         getloadavg: check whether n_name is a pointer, for QNX 6.4.1
105846         * lib/getloadavg.c (getloadavg): Use the strcpy-into-nlist.n_name
105847         code also if ! defined N_NAME_POINTER.
105848         * m4/getloadavg.m4 (gl_GETLOADAVG): Add a link-test for N_NAME_POINTER.
105849         This is required on QNX 6.4.1, where /usr/include/nlist.h exists,
105850         but the n_name member is a 12-byte array.
105852 2009-07-29  Joel E. Denny  <jdenny@clemson.edu>
105854         update-copyright: generalize comment handling
105855         * build-aux/update-copyright: Handle copyright statements
105856         within more comment styles.
105857         Document usage.
105858         Report any file with an external copyright holder or parse failure.
105860 2009-07-29  Jim Meyering  <meyering@redhat.com>
105862         mktime: correct setting of REPLACE_MKTIME
105863         * m4/mktime.m4 (gl_FUNC_MKTIME): Set REPLACE_MKTIME=0, when required.
105865         update-copyright: new module
105866         * modules/update-copyright: New file.
105867         * build-aux/update-copyright: New file.
105868         * MODULES.html.sh (maint+release support): Add update-copyright.
105870 2009-07-27  Bruno Haible  <bruno@clisp.org>
105872         Fix compilation error when <ctime> is used and mktime is replaced.
105873         * lib/time.in.h (mktime): New declaration.
105874         * m4/mktime.m4 (gl_FUNC_MKTIME): Require gl_HEADER_TIME_H_DEFAULTS. Set
105875         REPLACE_MKTIME instead of defining mktime in config.h.
105876         * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize REPLACE_MKTIME.
105877         * modules/time (Makefile.am): Substitute REPLACE_MKTIME.
105878         Reported by Ross McFarland <rwmcfa1@neces.com>.
105880 2009-07-27  Bruno Haible  <bruno@clisp.org>
105882         * lib/math.in.h (cosl, logl, sinl): Undefine before declaring it.
105883         Reported by Matt Kraai <mkraai@beckman.com>.
105885 2009-07-25  Jim Meyering  <meyering@redhat.com>
105887         maint.mk: avoid warnings about missing files
105888         * top/maint.mk (PREV_VERSION): Suppress stderr, to hide a
105889         diagnostic when .prev-version does not exist.
105890         (_cfg_mk): Define, so it can be empty when cfg.mk does not exist.
105891         (syntax-check-rules): Use $(_cfg_mk) to avoid a diagnostic about
105892         nonexistent cfg.mk.
105893         Suggestions from Simon Josefsson.
105895 2009-07-25  Bruno Haible  <bruno@clisp.org>
105897         * lib/math.in.h (cosl, logl, sinl): Don't declare if they are already
105898         defined as macros. Needed on QNX 6.4.1.
105899         Reported by Matt Kraai <mkraai@beckman.com>.
105901 2009-07-23  Jim Meyering  <meyering@redhat.com>
105903         maint.mk: invoke "make dist" with a working value of XZ_OPT
105904         * top/maint.mk (vc-dist): Use no "-" in the value of XZ_OPT.
105906 2009-07-22  Matt Kraai  <mkraai@beckman.com>  (tiny change)
105908         Make fseeko.c compile on QNX.
105909         * lib/fseeko.c (rpl_fseeko): Use the numerical value of _MWRITE.
105911 2009-07-22  Peter Simons  <simons@cryp.to>
105913         C++: wrap md2,md5,sha1,etc. function declarations in extern "C" scope
105914         * lib/md2.h [__cplusplus]: Wrap declarations in extern "C" scope.
105915         * lib/md4.h: Likewise.
105916         * lib/md5.h: Likewise.
105917         * lib/sha1.h: Likewise.
105918         * lib/sha256.h: Likewise.
105919         * lib/sha512.h: Likewise.
105921         tests-sha1: don't assign literal string to 'char *' variable
105922         * tests/test-sha1.c (main): Declare locals with "const" to match
105923         attributes of the right hand side.
105925 2009-07-21  Eric Blake  <ebb9@byu.net>
105927         dup2: fix more mingw problems
105928         * lib/dup2.c (rpl_dup2) [_WIN32]: Avoid hanging when duplicating
105929         fd to itself.
105930         * doc/posix-functions/dup2.texi (dup2): Document the bug.
105931         * lib/unistd.in.h (dup2) [REPLACE_FCHDIR]: Avoid name collision.
105932         * lib/fchdir.c (dup2): Manage preprocessor macros correctly.
105933         (rpl_dup2_fchdir): Rename from rpl_dup2, and let dup2 module take
105934         care of mingw bugs.
105936 2009-07-21  Jim Meyering  <meyering@redhat.com>
105938         vc-list-files: avoid failure when /bin/sh is dash
105939         * build-aux/vc-list-files: Avoid a shell portability problem with dash.
105940         On some Debian based systems, /bin/sh is a symlink to dash, and running
105941         this command would omit the "/" following each 'tests' prefix:
105942           dash -x build-aux/vc-list-files -C . tests
105943         That is because bash and dash work differently:
105944           $ for i in bash dash; do $i -c 'a=odd; a=ok b=$a; echo '$i' $b'; done
105945           bash ok
105946           dash odd
105948 2009-07-21  Eric Blake  <ebb9@byu.net>
105950         dup2-tests: test previous patch
105951         * modules/dup2-tests: New file.
105952         * tests/test-dup2.c: Likewise.
105953         * tests/test-open.c (main): Avoid unspecified behavior.
105954         * tests/test-pipe.c (child_main): Use dup2 semantics to simplify
105955         test.
105957         dup2: work around mingw and cygwin 1.5 bug
105958         * m4/dup2.m4 (gl_FUNC_DUP2): Detect mingw bug.
105959         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness.
105960         * modules/unistd (Makefile.am): Substitute it.
105961         * lib/unistd.in.h (dup2): Declare the replacement.
105962         * lib/dup2.c (dup2) [REPLACE_DUP2]: Implement it.
105963         * doc/posix-functions/dup2.texi (dup2): Document the bugs.
105964         * lib/fchdir.c (rpl_dup2): Don't collide with mingw replacement.
105965         * modules/execute (Depends-on): Add dup2.
105966         * modules/fseterr (Depends-on): Likewise.
105967         * modules/pipe (Depends-on): Likewise.
105968         * modules/posix_spawn-internal (Depends-on): Likewise.
105970 2009-07-21  Bruno Haible  <bruno@clisp.org>
105972         * modules/.gitattributes: New file.
105974 2009-07-20  Bruno Haible  <bruno@clisp.org>
105976         * tests/test-pipe.c (BACKUP_STDERR_FILENO): New macro.
105977         (main): Use it.
105979 2009-07-20  Eric Blake  <ebb9@byu.net>
105981         test-pipe: make a bit more robust.
105982         * tests/test-pipe.c (myerr): Allow error messages regardless of
105983         what we do to stderr.
105984         (test_pipe): Rearrange to avoid deadlock.
105985         (child_main): Try a larger read, to ensure we avoided deadlock.
105986         * lib/pipe.c (create_pipe) [_WIN32]: Fix comment.
105987         * lib/pipe.h (create_pipe_bidi): Document potential for deadlock
105988         if misused.
105990 2009-07-19  Jim Meyering  <meyering@redhat.com>
105992         fts: avoid false-positive cycle-detection
105993         * lib/fts.c (fts_read): Reinitialize cycle-detection data structures
105994         for each new command line argument.
105996 2009-07-19  Bruno Haible  <bruno@clisp.org>
105998         Fix build error on mingw with the modules sys_select and unistd.
105999         * modules/acl-tests (Depends-on): Add close.
106000         * modules/binary-io-tests (Depends-on): Likewise.
106001         * modules/closein-tests (Depends-on): Likewise.
106002         * modules/flock-tests (Depends-on): Likewise.
106003         * modules/fsync-tests (Depends-on): Likewise.
106004         * modules/lseek-tests (Depends-on): Likewise.
106005         * modules/pipe-tests (Depends-on): Likewise.
106006         * modules/posix_spawn-tests (Depends-on): Likewise.
106007         * modules/posix_spawnp-tests (Depends-on): Likewise.
106008         * modules/stat-time-tests (Depends-on): Likewise.
106009         * modules/yesno-tests (Depends-on): Likewise.
106011 2009-07-19  Bruno Haible  <bruno@clisp.org>
106013         Unify conditionals.
106014         * lib/pipe.h: Detect native Win32 by looking at _WIN32 and __WIN32__
106015         macros, not at the compiler macros.
106016         * lib/pipe.c: Likewise.
106017         * lib/execute.c: Likewise.
106018         * lib/spawni.c: Likewise.
106020 2009-07-19  Bruno Haible  <bruno@clisp.org>
106022         Fix handling of closed stdin/stdout/stderr on mingw.
106023         * lib/w32spawn.h: Include unistd.h.
106024         (dup_noinherit): Return -1 if the old handle is invalid. Allocate new
106025         file descriptor with O_NOINHERIT flag.
106026         (fd_safer_noinherit): New function, based on fd-safer.c.
106027         (dup_safer_noinherit): New function, based on dup-safer.c.
106028         (undup_safer_noinherit): New function.
106029         * lib/execute.c (execute) [WIN32]: Use dup_safer_noinherit instead of
106030         dup_noinherit. Use undup_safer_noinherit instead of dup2 and close.
106031         * lib/pipe.c (create_pipe) [WIN32]: Likewise. Use fd_safer_noinherit
106032         instead of fd_safer.
106033         * tests/test-pipe.c: Include <windows.h>.
106034         (child_main) [WIN32]: Test the handle of STDERR_FILENO, not its close()
106035         result.
106037         * tests/test-pipe.c (child_main, parent_main): New functions, extracted
106038         from main.
106039         (test_pipe): Pass an extra argument for disambiguation.
106040         (main): Invoke parent_main or child_main.
106042         * tests/test-pipe.c (test_pipe): Pass slave_process = true argument
106043         consistently.
106045 2009-07-18  Eric Blake  <ebb9@byu.net>
106047         test-pipe: fix mingw build
106048         * tests/test-pipe.c (main): Avoid fcntl on mingw.
106050 2009-07-18  Bruno Haible  <bruno@clisp.org>
106052         * modules/pipe-tests (Makefile.am): Fix typo.
106054 2009-07-18  Eric Blake  <ebb9@byu.net>
106056         error: fix mingw build
106057         * lib/error.c (error, error_at_line): Avoid fcntl on mingw.
106058         Reported by Bruno Haible.
106060         error: avoid undefined use of stdout
106061         * lib/error.c (error, error_at_line): Check that fd 1 is open
106062         before flushing stdout.  Avoids a crash on cygwin when libsigsegv
106063         is handling faults and the close_stdout module wants to report the
106064         detection of closed stdout as an error.
106066 2009-07-17  Eric Blake  <ebb9@byu.net>
106068         pipe: be robust in face of closed fds
106069         * lib/pipe.c (create_pipe): Closed standard descriptors in parent
106070         should cause child to misbehave.
106071         * modules/pipe-tests: New module.
106072         * tests/test-pipe.c: New file.
106073         * tests/test-pipe.sh: New file.
106074         Reported by Akim Demaille.
106076 2009-07-14  Bruno Haible  <bruno@clisp.org>
106078         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Guess it works on glibc systems.
106079         Reported by anonymous kc.
106081 2009-07-07  Jim Meyering  <meyering@redhat.com>
106083         maint.mk: don't look for translatable strings in *.m4 or *.mk
106084         * top/maint.mk (sc_po_check): Skip *.m4 and *.mk files,
106085         when searching for translatable strings.
106087 2009-07-05  Jim Meyering  <meyering@redhat.com>
106089         remove superfluous parentheses in STREQ definition
106090         * tests/test-argv-iter.c (STREQ): Remove redundant parentheses.
106091         * lib/getugroups.c (STREQ): Likewise.
106092         * lib/fnmatch.c (STREQ): Likewise.
106093         Spotted by Bruno Haible.
106095 2009-07-04  Jim Meyering  <meyering@redhat.com>
106097         argv-iter: new module
106098         * MODULES.html.sh: Add argv-iter.
106099         * lib/argv-iter.c, lib/argv-iter.h: New files.
106100         * modules/argv-iter: New file.
106101         * modules/argv-iter-tests: New file.
106102         * tests/test-argv-iter.c: Test it.
106104 2009-07-04  Bruno Haible  <bruno@clisp.org>
106106         Fix assertion.
106107         * lib/git-merge-changelog.c (compute_mapping): In the case where file1
106108         contains more exact copies of a given entry than file2, leave the extra
106109         copies unpaired rather than aborting.
106110         Reported by Eric Blake.
106112 2009-07-02  Bruno Haible  <bruno@clisp.org>
106114         Speedup git-merge-changelog for git cherry-pick.
106115         * lib/git-merge-changelog.c (struct entries_mapping): New type.
106116         (entries_mapping_get): New function, extracted from compute_mapping.
106117         (entries_mapping_reverse_get): New function.
106118         (compute_mapping): Add a 'full' argument. Return the result in a
106119         'struct entries_mapping'.
106120         (main): Update. Access the mappings through entries_mapping_get.
106121         Reported by Eric Blake.
106123 2009-07-02  Bruno Haible  <bruno@clisp.org>
106125         * lib/git-merge-changelog.c (compute_mapping): Fix determination of
106126         best_i.
106128 2009-07-02  Bruno Haible  <bruno@clisp.org>
106130         Speed up approximate search for matching ChangeLog entries.
106131         * lib/git-merge-changelog.c (entry_fstrcmp): Add a lower_bound
106132         argument. Call fstrcmp_bounded instead of fstrcmp.
106133         (compute_mapping, try_split_merged_entry, main): Update callers.
106135 2009-07-02  Bruno Haible  <bruno@clisp.org>
106137         * lib/git-merge-changelog.c (main): Add comment about git cherry-pick.
106139 2009-06-30  Bruno Haible  <bruno@clisp.org>
106141         Reduce the number of uc_is_cased calls.
106142         * lib/unicase.h (casing_suffix_context_t): Add
106143         'first_char_except_ignorable' field.
106144         * lib/unicase/context.h (SCC_FINAL_SIGMA_MASK): Remove macro.
106145         (SCC_MORE_ABOVE_MASK, SCC_BEFORE_DOT_MASK): Update.
106146         * lib/unicase/empty-suffix-context.c (unicase_empty_suffix_context):
106147         Update initializer.
106148         * lib/unicase/u-casemap.h (FUNC): Don't invoke uc_is_cased on
106149         case-ignorable characters.
106150         * lib/unicase/u-ct-totitle.h (FUNC): Likewise.
106151         * lib/unicase/u-suffix-context.h (FUNC2): Don't call uc_is_cased here.
106152         * modules/unicase/u8-suffix-context (Depends-on): Remove unicase/cased.
106153         * modules/unicase/u16-suffix-context (Depends-on): Likewise.
106154         * modules/unicase/u32-suffix-context (Depends-on): Likewise.
106156 2009-06-30  Bruno Haible  <bruno@clisp.org>
106158         Tests for module 'unicase/ignorable'.
106159         * modules/unicase/ignorable-tests: New file.
106160         * tests/unicase/test-ignorable.c: New file, generated by
106161         gen-uni-tables.
106163         Tests for module 'unicase/cased'.
106164         * modules/unicase/cased-tests: New file.
106165         * tests/unicase/test-cased.c: New file, generated by gen-uni-tables.
106166         * tests/unicase/test-predicate-part1.h: New file, derived from
106167         tests/unictype/test-predicate-part1.h.
106168         * tests/unicase/test-predicate-part2.h: New file, same as
106169         tests/unictype/test-predicate-part2.h.
106171         Fix evaluation of "Before C" condition of FINAL_SIGMA.
106172         * lib/gen-uni-tables.c (is_cased, is_case_ignorable): New functions.
106173         (output_casing_properties): New function.
106174         (main): Call it.
106175         * lib/unicase/cased.h: New file, generated by gen-uni-tables.
106176         * lib/unicase/cased.c: Include unictype/bitmap.h.
106177         (uc_is_cased): Define through a bitmap lookup.
106178         * lib/unicase/ignorable.h: New file, generated by gen-uni-tables.
106179         * lib/unicase/ignorable.c: Include unictype/bitmap.h.
106180         (uc_is_case_ignorable): Define through a bitmap lookup.
106181         * modules/unicase/cased (Files): Add lib/unicase/cased.h,
106182         lib/unictype/bitmap.h.
106183         (Depends-on): Add inline. Clean up.
106184         * modules/unicase/ignorable (Files): Add lib/unicase/ignorable.h,
106185         lib/unictype/bitmap.h.
106186         (Depends-on): Add inline. Clean up.
106187         * tests/unicase/test-u8-tolower.c (main): Add more tests of FINAL_SIGMA
106188         recognition.
106189         * tests/unicase/test-u16-tolower.c (main): Likewise.
106190         * tests/unicase/test-u32-tolower.c (main): Likewise.
106192 2009-06-30  Bruno Haible  <bruno@clisp.org>
106194         * lib/unicase/u8-casemap.c: Don't include uniwbrk.h.
106195         * lib/unicase/u16-casemap.c: Likewise.
106196         * lib/unicase/u32-casemap.c: Likewise.
106198 2009-06-29  Bruno Haible  <bruno@clisp.org>
106200         Define u32_casefold as a wrapper around u32_ct_casefold.
106201         * lib/unicase/u32-casefold.c: Update.
106202         * modules/unicase/u32-casefold (Depends-on): Add
106203         unicase/u32-ct-casefold, unicase/empty-prefix-context,
106204         unicase/empty-suffix-context. Clean up.
106206         Define u16_casefold as a wrapper around u16_ct_casefold.
106207         * lib/unicase/u16-casefold.c: Update.
106208         * modules/unicase/u16-casefold (Depends-on): Add
106209         unicase/u16-ct-casefold, unicase/empty-prefix-context,
106210         unicase/empty-suffix-context. Clean up.
106212         Define u8_casefold as a wrapper around u8_ct_casefold.
106213         * lib/unicase/u-casefold.h (FUNC): Delegate to U_CT_CASEFOLD.
106214         * lib/unicase/u8-casefold.c: Update.
106215         * modules/unicase/u8-casefold (Depends-on): Add unicase/u8-ct-casefold,
106216         unicase/empty-prefix-context, unicase/empty-suffix-context. Clean up.
106218         Define u32_totitle as a wrapper around u32_ct_totitle.
106219         * lib/unicase/u32-totitle.c: Update.
106220         * modules/unicase/u32-totitle (Depends-on): Add unicase/u32-ct-totitle,
106221         unicase/empty-prefix-context, unicase/empty-suffix-context. Clean up.
106223         Define u16_totitle as a wrapper around u16_ct_totitle.
106224         * lib/unicase/u16-totitle.c: Update.
106225         * modules/unicase/u16-totitle (Depends-on): Add unicase/u16-ct-totitle,
106226         unicase/empty-prefix-context, unicase/empty-suffix-context. Clean up.
106228         Define u8_totitle as a wrapper around u8_ct_totitle.
106229         * lib/unicase/u-totitle.h (is_cased, is_case_ignorable): Remove
106230         functions.
106231         (FUNC): Delegate to U_CT_TOTITLE.
106232         * lib/unicase/u8-totitle.c: Update.
106233         * modules/unicase/u8-totitle (Depends-on): Add unicase/u8-ct-totitle,
106234         unicase/empty-prefix-context, unicase/empty-suffix-context. Clean up.
106236         * lib/unicase/u32-tolower.c (u32_tolower): Update u32_casemap
106237         invocation.
106238         * modules/unicase/u32-tolower (Depends-on): Add
106239         unicase/empty-prefix-context, unicase/empty-suffix-context.
106241         * lib/unicase/u16-tolower.c (u16_tolower): Update u16_casemap
106242         invocation.
106243         * modules/unicase/u16-tolower (Depends-on): Add
106244         unicase/empty-prefix-context, unicase/empty-suffix-context.
106246         * lib/unicase/u8-tolower.c (u8_tolower): Update u8_casemap invocation.
106247         * modules/unicase/u8-tolower (Depends-on): Add
106248         unicase/empty-prefix-context, unicase/empty-suffix-context.
106250         * lib/unicase/u32-toupper.c (u32_toupper): Update u32_casemap
106251         invocation.
106252         * modules/unicase/u32-toupper (Depends-on): Add
106253         unicase/empty-prefix-context, unicase/empty-suffix-context.
106255         * lib/unicase/u16-toupper.c (u16_toupper): Update u16_casemap
106256         invocation.
106257         * modules/unicase/u16-toupper (Depends-on): Add
106258         unicase/empty-prefix-context, unicase/empty-suffix-context.
106260         * lib/unicase/u8-toupper.c (u8_toupper): Update u8_casemap invocation.
106261         * modules/unicase/u8-toupper (Depends-on): Add
106262         unicase/empty-prefix-context, unicase/empty-suffix-context.
106264         New module 'unicase/u32-ct-casefold'.
106265         * lib/unicase/u32-ct-casefold.c: New file.
106266         * modules/unicase/u32-ct-casefold: New file.
106268         New module 'unicase/u16-ct-casefold'.
106269         * lib/unicase/u16-ct-casefold.c: New file.
106270         * modules/unicase/u16-ct-casefold: New file.
106272         New module 'unicase/u8-ct-casefold'.
106273         * lib/unicase/u8-ct-casefold.c: New file.
106274         * lib/unicase/u-ct-casefold.h: New file, derived from
106275         lib/unicase/u-casefold.h.
106276         * modules/unicase/u8-ct-casefold: New file.
106278         New module 'unicase/u32-ct-totitle'.
106279         * lib/unicase/u32-ct-totitle.c: New file.
106280         * modules/unicase/u32-ct-totitle: New file.
106282         New module 'unicase/u16-ct-totitle'.
106283         * lib/unicase/u16-ct-totitle.c: New file.
106284         * modules/unicase/u16-ct-totitle: New file.
106286         New module 'unicase/u8-ct-totitle'.
106287         * lib/unicase/u8-ct-totitle.c: New file.
106288         * lib/unicase/u-ct-totitle.h: New file, derived from
106289         lib/unicase/u-totitle.h.
106290         * modules/unicase/u8-ct-totitle: New file.
106292         New module 'unicase/u32-ct-tolower'.
106293         * lib/unicase/u32-ct-tolower.c: New file.
106294         * modules/unicase/u32-ct-tolower: New file.
106296         New module 'unicase/u16-ct-tolower'.
106297         * lib/unicase/u16-ct-tolower.c: New file.
106298         * modules/unicase/u16-ct-tolower: New file.
106300         New module 'unicase/u8-ct-tolower'.
106301         * lib/unicase/u8-ct-tolower.c: New file.
106302         * modules/unicase/u8-ct-tolower: New file.
106304         New module 'unicase/u32-ct-toupper'.
106305         * lib/unicase/u32-ct-toupper.c: New file.
106306         * modules/unicase/u32-ct-toupper: New file.
106308         New module 'unicase/u16-ct-toupper'.
106309         * lib/unicase/u16-ct-toupper.c: New file.
106310         * modules/unicase/u16-ct-toupper: New file.
106312         New module 'unicase/u8-ct-toupper'.
106313         * lib/unicase/u8-ct-toupper.c: New file.
106314         * modules/unicase/u8-ct-toupper: New file.
106316         Add context arguments to u*_casemap functions.
106317         * lib/unicase/unicasemap.h: Include unicase.h.
106318         (u8_casemap, u16_casemap, u32_casemap): Add prefix_context and
106319         suffix_context arguments.
106320         * lib/unicase/u-casemap.h (is_cased, is_case_ignorable): Remove
106321         functions.
106322         (FUNC): Add prefix_context and suffix_context arguments. Use
106323         uc_is_cased and uc_is_case_ignorable.
106324         * lib/unicase/u8-casemap.c: Include caseprop.h and context.h.
106325         * lib/unicase/u16-casemap.c: Likewise.
106326         * lib/unicase/u32-casemap.c: Likewise.
106327         * modules/unicase/u8-casemap (Files): Add lib/unicase/context.h.
106328         (Depends-on): Add unicase/cased, unicase/ignorable. Clean up.
106329         * modules/unicase/u16-casemap (Files): Add lib/unicase/context.h.
106330         (Depends-on): Add unicase/cased, unicase/ignorable. Clean up.
106331         * modules/unicase/u32-casemap (Files): Add lib/unicase/context.h.
106332         (Depends-on): Add unicase/cased, unicase/ignorable. Clean up.
106334         New module 'unicase/u32-suffix-context'.
106335         * lib/unicase/u32-suffix-context.c: New file.
106336         * modules/unicase/u32-suffix-context: New file.
106338         New module 'unicase/u16-suffix-context'.
106339         * lib/unicase/u16-suffix-context.c: New file.
106340         * modules/unicase/u16-suffix-context: New file.
106342         New module 'unicase/u8-suffix-context'.
106343         * lib/unicase/u8-suffix-context.c: New file.
106344         * lib/unicase/u-suffix-context.h: New file.
106345         * modules/unicase/u8-suffix-context: New file.
106347         New module 'unicase/empty-suffix-context'.
106348         * lib/unicase/empty-suffix-context.c: New file.
106349         * modules/unicase/empty-suffix-context: New file.
106351         New module 'unicase/u32-prefix-context'.
106352         * lib/unicase/u32-prefix-context.c: New file.
106353         * modules/unicase/u32-prefix-context: New file.
106355         New module 'unicase/u16-prefix-context'.
106356         * lib/unicase/u16-prefix-context.c: New file.
106357         * modules/unicase/u16-prefix-context: New file.
106359         New module 'unicase/u8-prefix-context'.
106360         * lib/unicase/u8-prefix-context.c: New file.
106361         * lib/unicase/u-prefix-context.h: New file.
106362         * lib/unicase/context.h: New file.
106363         * modules/unicase/u8-prefix-context: New file.
106365         New module 'unicase/empty-prefix-context'.
106366         * lib/unicase/empty-prefix-context.c: New file.
106367         * modules/unicase/empty-prefix-context: New file.
106369         New module 'unicase/ignorable'.
106370         * lib/unicase/ignorable.c: New file.
106371         * modules/unicase/ignorable: New file.
106373         New module 'unicase/cased'.
106374         * lib/unicase/caseprop.h: New file.
106375         * lib/unicase/cased.c: New file.
106376         * modules/unicase/cased: New file.
106378         New functions for case mapping of substrings.
106379         * lib/unicase.h (casing_prefix_context_t): New type.
106380         (unicase_empty_prefix_context): New variable.
106381         (u8_casing_prefix_context, u16_casing_prefix_context,
106382         u32_casing_prefix_context, u8_casing_prefixes_context,
106383         u16_casing_prefixes_context, u32_casing_prefixes_context): New
106384         declarations.
106385         (casing_suffix_context_t): New type.
106386         (unicase_empty_suffix_context): New variable.
106387         (u8_casing_suffix_context, u16_casing_suffix_context,
106388         u32_casing_suffix_context, u8_casing_suffixes_context,
106389         u16_casing_suffixes_context, u32_casing_suffixes_context,
106390         u8_ct_toupper, u16_ct_toupper, u32_ct_toupper, u8_ct_tolower,
106391         u16_ct_tolower, u32_ct_tolower, u8_ct_totitle, u16_ct_totitle,
106392         u32_ct_totitle, u8_ct_casefold, u16_ct_casefold, u32_ct_casefold): New
106393         declarations.
106395 2009-06-28  Jim Meyering  <meyering@redhat.com>
106397         boostrap: indent only with spaces
106398         * build-aux/bootstrap: Indent only with spaces, never TABs.
106400         bootstrap: split long lines
106401         * build-aux/bootstrap: Keep line length < 80.
106403         bootstrap: sync from coreutils
106404         * build-aux/bootstrap: Honor variables like $ACLOCAL, etc.,
106405         just as autoreconf does.  Verify a list of prerequisite
106406         package-name,version-number pairs if defined in bootstrap.conf.
106407         Refer to README-prereq, if prerequisites are not satisfied.
106409 2009-06-27  Eric Blake  <ebb9@byu.net>
106411         tests: add test for bogus NULL definition
106412         * tests/test-stdio.c: Ensure POSIX 2008 requirement on NULL.
106413         * tests/test-stdlib.c: Likewise.
106414         * tests/test-string.c: Likewise.
106415         * tests/test-locale.c: Likewise.
106416         * tests/test-unistd.c: Likewise.
106417         * modules/stdio-tests (Depends-on): Add verify.
106418         * modules/stdlib-tests (Depends-on): Likewise.
106419         * modules/string-tests (Depends-on): Likewise.
106420         * modules/locale-tests (Depends-on): Likewise.
106421         * modules/unistd-tests (Depends-on): Likewise.
106423 2009-06-27  Paolo Bonzini  <bonzini@gnu.org>
106425         * m4/selinux-context-h (gl_HEADERS_SELINUX_CONTEXT_H): Remove
106426         self-explaining comment.
106427         * m4/selinux-selinux-h: Update serial.
106428         (gl_LIBSELINUX): New macro, adding a warning for missing development
106429         packages to code extracted from...
106430         (gl_HEADERS_SELINUX_SELINUX_H): ... this one.  Require gl_LIBSELINUX.
106431         Add warning for missing development packages here, too.
106433 2009-06-26  Paolo Bonzini  <bonzini@gnu.org>
106435         * build-aux/bootstrap: Do not use GIT_CONFIG_LOCAL.
106437 2009-06-25  Eric Blake  <ebb9@byu.net>
106439         version-etc: fix regression
106440         * lib/version-etc.h (ATTRIBUTE_SENTINEL): Define for new enough
106441         gcc.
106442         (version_etc): Use it, to catch bugs with trailing NULL.
106443         * lib/version-etc.c (version_etc_arn): Delete unused argument.
106444         (version_etc_va): Fix logic bug.
106445         * modules/version-etc-tests: Add test.
106446         * tests/test-version-etc.c: New file.
106447         * tests/test-version-etc.sh: Likewise.
106449 2009-06-25  Sam Steingold  <sds@gnu.org>
106451         * mbrtowc.m4 (gl_MBRTOWC_SANITYCHECK): Include <stdlib.h>, for the
106452         mbtowc declaration.
106454 2009-06-25  Eric Blake  <ebb9@byu.net>
106456         fpurge: migrate into <stdio.h>
106457         * lib/fpurge.h: Delete...
106458         * lib/stdio.in.h (fpurge): ...and declare here, instead.
106459         * lib/fpurge.c (fpurge): Change declaring header.
106460         * modules/fpurge (Files): Drop deleted file.
106461         (Depends-on): Add stdio.
106462         (configure.ac): Set witness.
106463         * modules/stdio (Makefile.am): Support fpurge macros.
106464         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
106465         * m4/fpurge.m4 (gl_FUNC_FPURGE): Set appropriate variables.
106466         * lib/fflush.c: Update client.
106467         * tests/test-fpurge.c: Likewise.
106468         * NEWS: Mention the change.
106470 2009-06-25  Sergey Poznyakoff  <gray@gnu.org.ua>
106472         * lib/argp-version-etc.c (program_authors): Add const
106473         qualifier.
106474         * lib/version-etc.c: Fix typos in the comments.
106475         * modules/argp-version-etc: Depends on version-etc.
106477 2009-06-25  Sergey Poznyakoff  <gray@gnu.org.ua>
106479         argp-version-etc: new module.
106481         * lib/argp-version-etc.c: New file.
106482         * lib/argp-version-etc.h: New file.
106483         * modules/argp-version-etc: New file.
106484         * modules/argp-version-etc-tests: New file.
106485         * tests/test-argp-version-etc.c: New test.
106486         * tests/test-argp-version-etc-1.sh: New test.
106488 2009-06-25  Sergey Poznyakoff  <gray@gnu.org.ua>
106490         Provide additional interfaces and documentation for version-etc
106491         module.
106493         * lib/version-etc.c (version_etc_arn, version_etc_ar): New
106494         interfaces.
106495         * lib/version-etc.h (version_etc_arn, version_etc_ar): New
106496         prototypes.
106498 2009-06-24  Bruno Haible  <bruno@clisp.org>
106500         * m4/lib-link.m4 (AC_LIB_HAVE_LINKFLAGS): Fix description of
106501         HAVE_LIB${NAME} macro.
106502         Reported by Sam Steingold <sds@gnu.org>.
106504 2009-06-23  Simon Josefsson  <simon@josefsson.org>
106506         * modules/hash-tests (test_hash_LDADD): Link to libintl when
106507         needed.
106509 2009-06-21  Bruno Haible  <bruno@clisp.org>
106511         Make two consecutive identical invocations of AC_LIB_HAVE_LINKFLAGS
106512         work.
106513         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Reset HAVE_LIB${NAME}
106514         together with LIB${NAME}, LTLIB${NAME}.
106515         Reported by Sam Steingold <sds@gnu.org>.
106517 2009-06-20  Jim Meyering  <meyering@redhat.com>
106519         tests: make sc_require_test_exit_idiom more generic
106520         * top/maint.mk (Exit_witness_file): New overridable variable.
106521         (sc_require_test_exit_idiom): Don't hard-code tests/test-lib.sh.
106522         Relax test for /^Exit \$fail$$/ to just /^Exit ./.
106524 2009-06-19  Jim Meyering  <meyering@redhat.com>
106526         hash: reverse order of src/dst parameters in an internal interface
106527         * lib/hash.c (transfer_entries): Reverse order of parameters to
106528         put DST before SRC.  Adjust callers.
106530         tests: test-hash: avoid wholesale duplication
106531         * tests/test-hash.c (main): Don't copy/paste a 60-line loop.
106532         Instead, use a loop and add a single conditional.
106534         tests: test-hash: allow seed selection via a command line argument
106535         * tests/test-hash.c (get_seed): New function.
106536         (main): Use it.
106538 2009-06-19  Eric Blake  <ebb9@byu.net>
106540         hash: avoid memory leak on allocation failure
106541         * lib/hash.c: (hash_rehash): Avoid memory leak on allocation
106542         failure.  Factor repeated algorithm...
106543         (transfer_entries): ...into new helper routine.
106544         (hash_delete): React to hash_rehash return value.
106546         hash: reduce memory pressure in hash_rehash no-op case
106547         * lib/hash.c (next_prime): Avoid overflow.
106548         (hash_initialize): Factor bucket size computation...
106549         (compute_bucket_size): ...into new helper function.
106550         (hash_rehash): Use new function and open coding to reduce memory
106551         pressure, and avoid a memory leak in USE_OBSTACK code.
106552         Reported by Jim Meyering.
106554 2009-06-18  Eric Blake  <ebb9@byu.net>
106556         hash: make rotation more obvious
106557         * modules/hash (Depends-on): Add bitrotate and stdint.
106558         * lib/bitrotate.h (rotl_sz, rotr_sz): New functions.
106559         * lib/hash.c (headers): Drop limits.h.  Add stdint.h.
106560         (SIZE_MAX): Rely on headers for definition.
106561         (hash_string) [USE_DIFF_HASH]: Use rotl_sz.
106562         (raw_hasher): Use rotr_sz.
106563         Suggested by Jim Meyering.
106565         hash: fix memory leak in last patch
106566         * lib/hash.c (hash_rehash): Avoid memory leak.
106568         hash: avoid no-op rehashing
106569         * lib/hash.c (hash_rehash): Recognize useless rehash attempts.
106571         hash: provide default callback functions
106572         * lib/hash.c (raw_hasher, raw_comparator): New functions.
106573         (hash_initialize): Use them as defaults.
106574         * tests/test-hash.c (main): Test this.
106576         hash: minor optimization
106577         * lib/hash.c (hash_lookup, hash_find_entry): Avoid function call
106578         when possible.
106579         (hash_initialize): Document this promise.
106580         (hash_do_for_each, hash_clear, hash_free): Use C89 syntax.
106581         * tests/test-hash.c (hash_compare_strings): Test this.
106583 2009-06-18  Bruno Haible  <bruno@clisp.org>
106585         * m4/strstr.m4 (gl_FUNC_STRSTR): Skip linear time test if strstr is
106586         going to be replaced anyway.
106588 2009-06-18  Bruno Haible  <bruno@clisp.org>
106590         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Invoke AC_LIBOBJ only
106591         in one place.
106592         (gl_FUNC_STRCASESTR): Skip linear time test if strcasestr is going to
106593         be replaced anyway.
106595 2009-06-18  Eric Blake  <ebb9@byu.net>
106597         hash: check for resize before insertion
106598         * lib/hash.c (hash_insert): Check whether bucket usage exceeds
106599         threshold before insertion, so that a pathological hash_rehash
106600         that fills every bucket can still trigger another rehash.
106602 2009-06-18  Jim Meyering  <meyering@redhat.com>
106604         hash-tests: add a loop around the small tests
106605         * tests/test-hash.c (main): Repeat small tests with selected
106606         small initial table sizes.
106608 2009-06-17  Eric Blake  <ebb9@byu.net>
106610         hash: minor cleanups
106611         * lib/hash.h (hash_entry): Make opaque, by moving...
106612         * lib/hash.c (hash_entry): ...here.
106613         (hash_insert): Clarify restrictions on what can be inserted.
106614         (hash_get_next): Clarify when it is safe to remove an element
106615         during traversal.
106616         (check_tuning): Skip verification when tuning is known safe.
106617         (hash_initialize): Clarify restrictions on tuning.
106619 2009-06-17  Jim Meyering  <jim@meyering.net>
106620         and Eric Blake  <ebb9@byu.net>
106622         hash-tests: new module
106623         * modules/hash-tests: New file.
106624         * tests/test-hash.c: New file.
106626 2009-06-17  Eric Blake  <ebb9@byu.net>
106628         strstr-simple: document new module
106629         * MODULES.html.sh: Document new module.
106631         strstr, strcasestr: replace on platforms with broken memchr
106632         * modules/strstr: Split into...
106633         * modules/strstr-simple: ...new module that does not care about
106634         performance, but does care about glibc bug.
106635         * m4/strstr.m4 (gl_FUNC_STRSTR): Split...
106636         (gl_FUNC_STRSTR_SIMPLE): ...into new macro, which replaces strstr
106637         if platform memchr is broken, per Debian bug 521737.
106638         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): React to broken
106639         memchr.
106640         * m4/memchr.m4 (gl_FUNC_MEMCHR): Only expand once.
106641         * doc/posix-functions/strstr.texi (strstr): Document the fix.
106642         * doc/glibc-functions/strcasestr.texi (strcasestr): Likewise.
106643         * modules/mountlist (Depends-on): Add strstr-simple.
106644         * modules/gen-uni-tables (Depends-on): Likewise.
106645         * modules/argz (Depends-on): Add strstr.
106647 2009-06-17  Bruno Haible  <bruno@clisp.org>
106649         * modules/posix_spawn-internal (Depends-on): Add errno.
106651 2009-06-17  Bruno Haible  <bruno@clisp.org>
106653         Define missing ESTALE on Interix 3.5.
106654         * lib/errno.in.h (ESTALE): Assign a value if missing.
106655         * lib/strerror.c (rpl_strerror): Handle missing ESTALE and ECANCELED.
106656         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Also test whether ESTALE is
106657         missing.
106658         * doc/posix-headers/errno.texi: Mention the Interix bug.
106659         Reported by Jay Krell <jay.krell@cornell.edu> via Eric Blake.
106661 2009-06-15  Eric Blake  <ebb9@byu.net>
106663         memchr, memchr2: add valgrind exception
106664         * lib/memchr.valgrind: New file.
106665         * lib/memchr2.valgrind: New file.
106666         * modules/memchr (Files): Distribute valgrind file.
106667         * modules/memchr2 (Files): Likewise.
106669         docs: memchr is no longer obsolete
106670         * MODULES.html.sh: Move memchr from obsolete to string.h section.
106671         * lib/string.in.h (memchr): Simplify logic.
106673 2009-06-14  Jim Meyering  <meyering@redhat.com>
106675         link-follow: fix the "checking..." message to not mention trailing slash
106676         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): This test has
106677         never considered trailing slashes.
106679 2009-06-14  Bruno Haible  <bruno@clisp.org>
106681         * m4/memchr.m4: Mention also the bug on IA-64.
106682         * doc/posix-functions/memchr.texi: Likewise.
106684 2009-06-12  Eric Blake  <ebb9@byu.net>
106686         memchr: detect broken x86_64 and alpha implementations
106687         * modules/memchr-tests (Depends-on): Move mmap detection...
106688         * modules/memchr (Depends-on): ...here.
106689         (configure.ac): Set indicator.
106690         * lib/string.in.h (memchr): Declare replacement.
106691         * modules/string (Makefile.am): Trigger replacement.
106692         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Likewise.
106693         * m4/memchr.m4 (gl_FUNC_MEMCHR): Use mmap to detect platform
106694         bugs.
106695         * doc/posix-functions/memchr.texi (memchr): Document the bug.
106696         * modules/getpagesize (License): Relax license.
106698 2009-06-11  Bruno Haible  <bruno@clisp.org>
106700         * lib/idpriv.h: Add more references.
106702 2009-06-08  Bruno Haible  <bruno@clisp.org>
106704         Tests for module 'idpriv-droptemp'.
106705         * modules/idpriv-droptemp-tests: New file.
106706         * tests/test-idpriv-droptemp.sh: New file.
106707         * tests/test-idpriv-droptemp.su.sh: New file.
106708         * tests/test-idpriv-droptemp.c: New file.
106710         New module 'idpriv-droptemp'.
106711         * lib/idpriv-droptemp.c: New file.
106712         * modules/idpriv-droptemp: New file.
106714 2009-06-08  Bruno Haible  <bruno@clisp.org>
106716         Tests for module 'idpriv-drop'.
106717         * modules/idpriv-drop-tests: New file.
106718         * tests/test-idpriv-drop.sh: New file.
106719         * tests/test-idpriv-drop.su.sh: New file.
106720         * tests/test-idpriv-drop.c: New file.
106722         New module 'idpriv-drop'.
106723         * lib/idpriv.h: New file.
106724         * lib-idpriv-drop.c: New file.
106725         * m4/idpriv.m4: New file.
106726         * modules/idpriv-drop: New file.
106728 2009-06-08  Bruno Haible  <bruno@clisp.org>
106730         * modules/unistdio/u8-vasnprintf (Depends-on): Add memchr.
106731         * modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
106732         * modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
106733         * modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
106734         * modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
106735         * modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
106736         * modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
106738 2009-06-08  Eric Blake  <ebb9@byu.net>
106740         test-strstr: use memory fence, when possible
106741         * tests/test-strstr.c (main): Use memory fence, in order to be
106742         more likely to trigger Debian bug 521737.
106743         * modules/strstr-tests (Files): Pull in additional files.
106745         memchr: no longer obsolete, for wider field testing
106746         * modules/memchr (Status, Notice): Delete, this module is no
106747         longer obsolete.
106748         * modules/vasnprintf (Depends-on): Add memchr.
106750 2009-06-07  Jim Meyering  <meyering@redhat.com>
106752         hash: declare some functions with the warn_unused_result attribute
106753         * lib/hash.h (__attribute__, ATTRIBUTE_WUR): Define.
106755 2009-06-07  Bruno Haible  <bruno@clisp.org>
106757         * tests/test-alignof.c: Don't test int64_t if it does not exist.
106758         Reported by Eric Blake.
106760 2009-06-06  Eric Blake  <ebb9@byu.net>
106762         test-alignof: fix typo with long double
106763         * tests/test-alignof.c (CHECK): Use longdouble typedef to avoid
106764         compiler error.
106766 2009-06-06  Neil Jerram  <neil@ossau.uklinux.net>  (tiny change)
106768         Escape non-texinfo { and }s.
106769         * doc/ld-output-def.texi (Visual Studio Compatibility): Fix
106770         markup error.
106772 2009-06-04  Jim Meyering  <meyering@redhat.com>
106774         gitlog-to-changelog: don't infloop on an empty commit log
106775         * build-aux/gitlog-to-changelog: Warn about an empty log message.
106776         Reported by Boris Petersen <transacid@centerim.org>.
106778 2009-06-03  Mike Frysinger  <vapier@gentoo.org>
106780         version-etc: extend for packagers
106781         Add three new configure options, intended for packagers:
106782           --with-packager="packager name"
106783           --with-packager-version="packager-specific version"
106784           --with-packager-bug-reports="packager bug reporting"
106785         An example with coreutils:
106786           $ ./configure \
106787             --with-packager=Gentoo \
106788             --with-packager-bug-report=http://bugs.gentoo.org/ \
106789             --with-packager-version="patchset 1.6"
106790           $ ./src/ls --version | head -n2
106791           ls (GNU coreutils) 7.1-dirty
106792           Packaged by Gentoo (patchset 1.6)
106793         Note that the bug reporting info via --help doesn't show up because
106794         coreutils uses its own custom emit_bug_reporting_address() implementation
106795         in src/system.h.  If it didn't, it'd look like:
106796           $ ./src/ls --help | tail -n4
106797           Report bugs to <bug-coreutils@gnu.org>.
106798           Report Gentoo bugs to <http://bugs.gentoo.org/>.
106799           GNU coreutils home page: <http://www.gnu.org/software/coreutils/>.
106800           General help using GNU software: <http://www.gnu.org/gethelp/>.
106801         * lib/version-etc.c: Print new information, if provided.
106802         * m4/version-etc.m4: New file.
106803         * modules/version-etc (Files): Add m4/version-etc.m4.
106804         (configure.ac): Add gl_VERSION_ETC.
106806 2009-05-31  Bruno Haible  <bruno@clisp.org>
106808         * tests/test-alignof.c: Include <stdint.h>. Check also 'long double'
106809         and 'int64_t'.
106810         * modules/alignof-tests (Dependencies): Add stdint.
106811         Reported by Eric Blake.
106813 2009-05-31  Bruno Haible  <bruno@clisp.org>
106815         * lib/alignof.h (alignof_slot, alignof_type, alignof): Document
106816         restriction due to compiler bugs.
106817         Reported by Eric Blake.
106819 2009-05-31  Simon Josefsson  <simon@josefsson.org>
106820             Bruno Haible  <bruno@clisp.org>
106822         Fix test-alignof failure.
106823         * lib/alignof.h (alignof_slot): New macro.
106824         (alignof_type): New macro, with the same semantics as the previous
106825         'alignof'.
106826         (alignof): Alias to alignof_slot.
106827         * tests/test-alignof.c (CHECK): Check alignof_slot, not alignof. Also
106828         check that the results are usable as constant expressions.
106830 2009-05-31  Bruno Haible  <bruno@clisp.org>
106832         * tests/zerosize-ptr.h (zerosize_ptr): Specify more details.
106833         * tests/test-memchr.c (main): Check that memchr does not read past the
106834         first occurrence of the byte.
106835         * tests/test-strstr.c (main): Update comment.
106836         Suggested by Eric Blake.
106838 2009-05-30  Bruno Haible  <bruno@clisp.org>
106840         * doc/ld-output-def.texi (Visual Studio Compatibility): Explain in more
106841         detail how to use dumpbin.
106842         Reported by David Byron <dbyron@dbyron.com>.
106844 2009-06-02  Simon Josefsson  <simon@josefsson.org>
106846         * tests/test-parse-duration.sh: Don't use non-portable 'read -u3'.
106848 2009-06-02  Simon Josefsson  <simon@josefsson.org>
106850         * m4/manywarnings.m4: Add GCC 4.4 warnings.
106852 2009-05-28  Bruno Haible  <bruno@clisp.org>
106854         * gnulib-tool (func_import): Don't do HAVE_CONFIG_H replacements on
106855         build-aux/ files.
106857 2009-05-28  Simon Josefsson  <simon@josefsson.org>
106859         * gnulib-tool (func_import): Transform license on build-aux/ files too.
106861 2009-05-27  Simon Josefsson  <simon@josefsson.org>
106863         * gnulib-tool (sed_transform_main_lib_file)
106864         (sed_transform_testsrelated_lib_file): : Don't use non-POSIX
106865         regexps.
106867 2009-05-26  Simon Josefsson  <simon@josefsson.org>
106869         * tests/test-strstr.c: Add another self-test.
106870         * tests/test-strstr.c: Rewrite to use malloc/strcpy instead of
106871         strdup.  Suggested by Eric Blake  <ebb9@byu.net>.
106873 2009-05-23  Bruno Haible  <bruno@clisp.org>
106875         * doc/havelib.texi (AC_LIB_HAVE_LINKFLAGS): Update for 2009-04-26
106876         change.
106878 2009-05-21  Bruno Haible  <bruno@clisp.org>
106880         Simplify use of mode_t varargs.
106881         * lib/open.c (open): Use PROMOTED_MODE_T instead of a conditional that
106882         uses 'mode_t' or 'int'.
106883         * lib/openat.c (openat): Likewise.
106884         * lib/open-safer.c (open_safer): Likewise.
106885         * m4/mode_t.m4: New file.
106886         * m4/open.m4 (gl_PREREQ_OPEN): Require gl_PROMOTED_TYPE_MODE_T.
106887         * m4/openat.m4 (gl_PREREQ_OPENAT): Likewise.
106888         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Likewise.
106889         * modules/open (Files): Add m4/mode_t.m4.
106890         * modules/openat (Files): Likewise.
106891         * modules/fcntl-safer (Files): Likewise.
106892         Suggested by Eric Blake.
106894 2009-05-21  Pádraig Brady  <P@draigbrady.com>
106896         * doc/glibc-functions/fallocate.texi: New file.
106897         * doc/gnulib.texi: Include it.
106899 2009-05-21  Eric Blake  <ebb9@byu.net>
106900             Bruno Haible  <bruno@clisp.org>
106902         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Remove redundant m4_quote
106903         invocations.
106904         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Likewise.
106906 2009-05-21  Eric Blake  <ebb9@byu.net>
106907             Bruno Haible  <bruno@clisp.org>
106909         Second attempt to work around an AIX 5.3, 6.1 compiler bug with
106910         include_next. Fix of 2008-11-20 commit.
106911         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Also set
106912         NEXT_AS_FIRST_DIRECTIVE_FOO_H.
106913         * lib/math.in.h: Use NEXT_AS_FIRST_DIRECTIVE_MATH_H instead of
106914         NEXT_MATH_H.
106915         * modules/math (Makefile.am): Substitute NEXT_AS_FIRST_DIRECTIVE_MATH_H
106916         instead of NEXT_MATH_H.
106918 2009-05-21  Bruno Haible  <bruno@clisp.org>
106920         Avoid redefinition warnings for SIZE_MAX.
106921         * m4/size_max.m4 (gl_SIZE_MAX): Avoid redefining SIZE_MAX in config.h.
106922         Reported by Simon Josefsson.
106924 2009-05-21  Bruno Haible  <bruno@clisp.org>
106926         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_CACHE_CHECK instead of
106927         AC_CACHE_VAL.
106929 2009-05-20  Bruno Haible  <bruno@clisp.org>
106931         Make zeroptr.h work on mingw.
106932         * tests/zerosize-ptr.h: Test for the presence of <sys/mman.h> and
106933         mprotect.
106934         * modules/memchr-tests (configure.ac): Also test for sys/mman.h.
106935         * modules/memchr2-tests (configure.ac): Likewise.
106936         * modules/memcmp-tests (configure.ac): Likewise.
106937         * modules/memmem-tests (configure.ac): Likewise.
106938         * modules/memrchr-tests (configure.ac): Likewise.
106939         Reported by Simon Josefsson.
106941 2009-05-20  Simon Josefsson  <simon@josefsson.org>
106943         * tests/test-glob.c: Include string.h for strcmp prototype.
106945 2009-05-20  Simon Josefsson  <simon@josefsson.org>
106947         * modules/getdelim (Depends-on): Add explicit stdint, although it
106948         was implicitly already pulled in via realloc-posix.
106949         * lib/getdelim.c: Get SIZE_MAX from stdint.h.
106951 2009-05-20  Simon Josefsson  <simon@josefsson.org>
106953         MinGW and IRIX does not have sa_family_t type.  Reported by "Tom
106954         G. Christensen" <tgc@jupiterrise.com>.
106955         * m4/sys_socket_h.m4: Check for sa_family_t.
106956         * lib/sys_socket.in.h: Typedef sa_family_t when needed.
106957         * modules/sys_socket: Substitute HAVE_SA_FAMILY_T.
106958         * tests/test-sys_socket.c: Check that sa_family_t works.
106960 2009-05-18  Eric Blake  <ebb9@byu.net>
106962         maint.mk: allow gnulib_dir in VPATH build
106963         * top/maint.mk (gnulib_dir): Make relative to $(srcdir).
106965 2009-05-15  Jim Meyering  <meyering@redhat.com>
106967         maint.mk: Give gnulib_dir a default definition.
106968         * top/maint.mk (gnulib_dir): Define to 'gnulib', by default.
106969         Thus, most packages no longer need to specify this variable in cfg.mk
106971 2009-05-14  Tom Prince  <tom.prince@ualberta.net>  (tiny change)
106973         rename.m4: fix typos that would make non-mingw cross-configure fail
106974         * m4/rename.m4 (gl_FUNC_RENAME): Fix typos.
106976 2009-05-13  Eric Blake  <ebb9@byu.net>
106978         mmap-anon: avoid out-of-order autoconf expansion
106979         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Use correct
106980         SYSTEM_EXTENSIONS macro to silence warnings from autoconf 2.63b.
106981         * modules/memchr-tests (Depends-on): Add extensions.
106982         * modules/memchr2-tests (Depends-on): Add extensions.
106983         * modules/memcmp-tests (Depends-on): Add extensions.
106984         * modules/memmem-tests (Depends-on): Add extensions.
106985         * modules/memrchr-tests (Depends-on): Add extensions.
106987 2009-05-13  Bruno Haible  <bruno@clisp.org>
106989         Make some tests ISO C 99 compliant.
106990         * tests/zerosize-ptr.h: New file.
106991         * tests/test-memchr.c: Include zerosize-ptr.h.
106992         (main): Use a zero-size object pointer instead of NULL.
106993         * tests/test-memchr2.c: Include zerosize-ptr.h.
106994         (main): Use a zero-size object pointer instead of NULL.
106995         * tests/test-memcmp.c: Include zerosize-ptr.h.
106996         (main): Use a zero-size object pointer instead of NULL.
106997         * tests/test-memmem.c: Include zerosize-ptr.h.
106998         (main): Use a zero-size object pointer instead of NULL.
106999         * tests/test-memrchr.c: Include zerosize-ptr.h.
107000         (main): Use a zero-size object pointer instead of NULL.
107001         * modules/memchr-tests (Files): Add tests/zerosize-ptr.h,
107002         m4/mmap-anon.m4.
107003         (Depends-on): Add getpagesize.
107004         (configure.ac): Invoke gl_FUNC_MMAP_ANON. Check for mprotect.
107005         * modules/memchr2-tests (Files): Add tests/zerosize-ptr.h,
107006         m4/mmap-anon.m4.
107007         (Depends-on): Add getpagesize.
107008         (configure.ac): Invoke gl_FUNC_MMAP_ANON. Check for mprotect.
107009         * modules/memcmp-tests (Files): Add tests/zerosize-ptr.h,
107010         m4/mmap-anon.m4.
107011         (Depends-on): Add getpagesize.
107012         (configure.ac): Invoke gl_FUNC_MMAP_ANON. Check for mprotect.
107013         * modules/memmem-tests (Files): Add tests/zerosize-ptr.h,
107014         m4/mmap-anon.m4.
107015         (Depends-on): Add getpagesize.
107016         (configure.ac): Invoke gl_FUNC_MMAP_ANON. Check for mprotect.
107017         * modules/memrchr-tests (Files): Add tests/zerosize-ptr.h,
107018         m4/mmap-anon.m4.
107019         (Depends-on): Add getpagesize.
107020         (configure.ac): Invoke gl_FUNC_MMAP_ANON. Check for mprotect.
107022 2009-05-12  Bruno Haible  <bruno@clisp.org>
107024         Tests for module 'alignof'.
107025         * modules/alignof-tests: New file.
107026         * tests/test-alignof.c: New file.
107028 2009-05-12  Bruno Haible  <bruno@clisp.org>
107030         Fix alignof macro.
107031         * lib/alignof.h (alignof): Remove special cases for AIX and HP-UX
107032         vendor compilers that are always correct.
107034 2009-05-12  Bruno Haible  <bruno@clisp.org>
107036         Make the MAP_ANONYMOUS detection work on HP-UX 11.
107037         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check whether mmap exists, but
107038         not whether its fully works.
107040 2009-05-12  Bruno Haible  <bruno@clisp.org>
107042         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Add comments.
107044 2009-05-12  Jim Meyering  <meyering@redhat.com>
107046         * top/maint.mk: Adjust backslash alignment.
107048 2009-05-11  Simon Josefsson  <simon@josefsson.org>
107050         * top/maint.mk: Make $(srcdir)/build-aux configurable.
107052 2009-05-11  Eric Blake  <ebb9@byu.net>
107054         argp: avoid undefined behavior
107055         * lib/argp-fmtstream.c (weak_alias): Pass correct types to ctype
107056         macros.
107058 2009-05-08  Simon Josefsson  <simon@josefsson.org>
107060         * tests/test-vc-list-files-git.sh: Do git config of user.email and
107061         user.name to prevent git commit from complaining.
107063 2009-05-10  Bruno Haible  <bruno@clisp.org>
107065         * gnulib-tool (func_import, func_create_testdir, copy-file): Change
107066         sed_rewrite_old_files, sed_rewrite_new_files, sed_rewrite_files so that
107067         it rewrites every file name only once.
107068         Reported by Simon Josefsson. Helped by Ralf Wildenhues.
107070 2009-05-08  Bruno Haible  <bruno@clisp.org>
107072         * lib/sys_socket.in.h (_SS_PADSIZE): Use a conditional expression
107073         instead of 'max'.
107075 2009-05-08  Simon Josefsson  <simon@josefsson.org>
107077         * m4/sys_socket_h.m4: Test for ws2tcpip.h earlier, needed for
107078         sockaddr_storage test.
107080 2009-05-07  Simon Josefsson  <simon@josefsson.org>
107082         * modules/sys_socket (Makefile.am): Substitute
107083         HAVE_STRUCT_SOCKADDR_STORAGE.  Depend on alignof.
107084         * m4/sys_socket_h.m4: Check for sockaddr_storage.
107085         * lib/sys_socket.in.h (sockaddr_storage): Define when needed.
107086         * tests/test-sys_socket.c: Check sockaddr_storage.
107088 2009-05-08  Bruno Haible  <bruno@clisp.org>
107090         New module 'alignof'.
107091         * lib/alignof.h: New file.
107092         * modules/alignof: New file.
107094 2009-05-04  David Bartley  <dtbartle@csclub.uwaterloo.ca>
107095             Bruno Haible  <bruno@clisp.org>
107097         Fix test-file-has-acl on FreeBSD.
107098         * tests/test-file-has-acl.sh: Also test a directory. On FreeBSD, the
107099         mask is implicitly added.
107100         * tests/test-file-has-acl.c: Include <signal.h>.
107101         (main): Terminate the test after 5 seconds.
107102         * modules/acl-tests (configure.ac): Check for alarm function.
107104 2009-05-04  Bruno Haible  <bruno@clisp.org>
107106         Exploit new semantics of AC_DEFUN_ONCE available since 2009-01-26.
107107         * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Remove outdated comment.
107108         * modules/errno (configure.ac): Drop AC_REQUIRE.
107109         * m4/multiarch.m4 (gl_MULTIARCH): Remove outdated comment.
107110         * modules/multiarch (configure.ac): Drop AC_REQUIRE.
107112 2009-05-04  Simon Josefsson  <simon@josefsson.org>
107114         * modules/glob-tests: New module.
107115         * tests/test-glob.c: Add.
107117 2009-05-04  Simon Josefsson  <simon@josefsson.org>
107119         * modules/fnmatch-tests: New module.
107120         * tests/test-fnmatch.c: Add.
107122 2009-05-04  Eric Blake  <ebb9@byu.net>
107124         maint: make the new no-submodule-changes rule VPATH-safe
107125         * top/maint.mk (no-submodule-changes): Don't assume a srcdir build.
107127 2009-05-04  David Bartley  <dtbartle@csclub.uwaterloo.ca>
107128             Bruno Haible  <bruno@clisp.org>
107130         acl: Fix infinite loop on FreeBSD.
107131         * lib/acl_entries.c (acl_entries) [Linux, FreeBSD]: Fix interpretation
107132         of return value from acl_get_entry.
107133         * lib/file-has-acl.c (acl_access_nontrivial) [Linux, FreeBSD]:
107134         Likewise.
107136 2009-05-03  Bruno Haible  <bruno@clisp.org>
107138         * lib/acl-internal.h (acl_entries): Clarify return value.
107139         * lib/acl_entries.c (acl_entries): Likewise.
107141 2009-05-04  David Bartley  <dtbartle@csclub.uwaterloo.ca>
107143         Bug fix in acl module.
107144         * lib/set-mode-acl.c: Use correct struct with ACL_SETACL.
107146 2009-05-03  Bruno Haible  <bruno@clisp.org>
107148         Create gperf-generated file in the source dir, not in the build dir.
107149         * modules/iconv_open (iconv_open-aix.h, iconv_open-hpux.h,
107150         iconv_open-irix.h, iconv_open-osf.h): Create file in the source tree.
107151         * modules/unicase/locale-language (unicase/locale-languages.h):
107152         Likewise.
107153         * modules/unicase/special-casing (unicase/special-casing-table.h):
107154         Likewise.
107155         * modules/unictype/property-byname (unictype/pr_byname.h): Likewise.
107156         * modules/unictype/scripts (unictype/scripts_byname.h): Likewise.
107157         * modules/uninorm/composition (uninorm/composition-table.h): Likewise.
107158         Reported by Ralf Wildenhues.
107160 2009-05-03  Bruno Haible  <bruno@clisp.org>
107162         * modules/fnmatch (Description, configure.ac): Taken from
107163         fnmatch-posix.
107164         * modules/fnmatch-posix: Turn into a symbolic reference to the
107165         'fnmatch' module, and deprecate.
107166         * doc/posix-functions/fnmatch.texi: Mention the fnmatch module.
107168 2009-05-03  Bruno Haible  <bruno@clisp.org>
107170         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF,
107171         gl_PREREQ_VASNPRINTF_LONG_DOUBLE): Define through AC_DEFUN_ONCE.
107172         Reported by Ralf Wildenhues.
107174 2009-05-04  Simon Josefsson  <simon@josefsson.org>
107176         * m4/fnmatch.m4: Fix fnmatch re-define.
107178 2009-04-27  David Bartley  <dtbartle@csclub.uwaterloo.ca>
107180         priv-set: new module and tests; adapt write-any-file
107181         * lib/priv-set.c: New file.
107182         * lib/priv-set.h: New file.
107183         * lib/unlinkdir.c: Make cannot_unlink_dir thread-safe.
107184         * lib/write-any-file.c: Simplify by using priv-set module.
107185         * m4/priv-set.m4: New file.
107186         * modules/priv-set: New file.
107187         * modules/unlinkdir: Add dependency on priv-set module.
107188         * modules/write-any-file: Likewise.
107190         Tests for module 'priv-set'.
107191         * modules/priv-set-tests: New file.
107192         * tests/test-priv-set.c: New file.
107194 2009-05-03  Jim Meyering  <meyering@redhat.com>
107195             Bruno Haible  <bruno@clisp.org>
107197         * lib/propername.c (proper_name_utf8): Ignore no-op translations;
107198         use the converted UTF-8 variant of the name instead.
107200 2009-05-03  Jim Meyering  <meyering@redhat.com>
107202         tests: tighten some getdate tests
107203         * tests/test-getdate.c (main): Tighten tests: require equality,
107204         not just greater than.  Set TZ envvar to UTC0.
107206 2009-05-03  Giuseppe Scrivano  <gscrivano@gnu.org>
107208         getdate: correctly interpret "next monday" when run on a Monday
107209         * lib/getdate.y (get_date): Correct the calculation of tm_mday so
107210         that e.g., "next tues" (when run on a tuesday) results in a date
107211         that is one week in the future, and not today's date.
107212         I.e., add a week when the wday is the same as the current one.
107213         Reported by Tom Broadhurst in http://savannah.gnu.org/bugs/?25406,
107214         and earlier by Martin Bernreuther and Jan Minář.
107215         * tests/test-getdate.c (main): Check that "next DAY" is always in
107216         the future and that "last DAY" is always in the past.
107218 2009-05-02  Jim Meyering  <meyering@redhat.com>
107220         build: ensure that a release build fails when a submodule is unclean
107221         * top/maint.mk (no-submodule-changes): New rule.
107222         (alpha beta major): Depend on it.
107224 2009-05-02  Bruno Haible  <bruno@clisp.org>
107226         Remove incompatibility between modules fnmatch-posix and fnmatch-gnu.
107227         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX, gl_FUNC_FNMATCH_GNU): Use a
107228         shell variable gl_fnmatch_required to detect which variant is
107229         requested.
107230         (_AC_FUNC_FNMATCH_IF, _AC_LIBOBJ_FNMATCH): Remove macros. Inlined into
107231         gl_FUNC_FNMATCH_POSIX.
107232         * gnulib-tool (func_create_testdir, func_create_megatestdir): Don't
107233         exclude fnmatch-posix.
107235 2009-05-02  Bruno Haible  <bruno@clisp.org>
107237         Relicense mbsrtowcs and strnlen1 under LGPLv2+.
107238         * modules/mbsrtowcs (License): Change to LGPLv2+.
107239         * modules/strnlen1 (License): Likewise.
107240         Reported by Simon Josefsson.
107242 2009-05-02  Bruno Haible  <bruno@clisp.org>
107244         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Say "guessing no" instead of
107245         "cross".
107246         (gl_FUNC_FNMATCH_POSIX, gl_FUNC_FNMATCH_GNU): Update. Don't assume that
107247         gnulib-tool was called with option --source-base=lib.
107249 2009-05-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
107251         Use automake *-local hooks without commands, for extensibility.
107252         * modules/localcharset (Makefile.am): Rename install-exec-local
107253         rule to install-exec-localcharset, and make it a prerequisite of
107254         install-exec-local.  Likewise, rename the uninstall-local rule to
107255         uninstall-localcharset, and make it a prerequisite of the former.
107257 2009-05-01  Bruno Haible  <bruno@clisp.org>
107259         * lib/wchar.in.h (wcsnrtombs): Define if REPLACE_WCSNRTOMBS is 1.
107260         * m4/wcsnrtombs.m4 (gl_FUNC_WCSRTOMBS): Invoke gl_MBSTATE_T_BROKEN, and
107261         set REPLACE_WCSNRTOMBS if mbstate_t must be replaced.
107262         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCSNRTOMBS.
107263         * modules/wchar (Makefile.am): Substitute REPLACE_WCSNRTOMBS.
107264         * modules/wcsnrtombs (Files): Add m4/mbrtowc.m4, m4/locale-ja.m4,
107265         m4/locale-zh.m4, m4/codeset.m4.
107267         * m4/wcsrtombs.m4 (gl_FUNC_WCSNRTOMBS): Invoke gl_MBSTATE_T_BROKEN, and
107268         set REPLACE_WCSRTOMBS if mbstate_t must be replaced.
107269         * modules/wcsrtombs (Files): Add m4/mbrtowc.m4, m4/locale-ja.m4,
107270         m4/locale-zh.m4.
107272         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Invoke gl_MBSTATE_T_BROKEN, and set
107273         REPLACE_WCRTOMB if mbstate_t must be replaced.
107274         * modules/wcrtomb (Files): Add m4/mbrtowc.m4.
107275         Reported by Jens Rehsack <rehsack@googlemail.com> via Eric Blake.
107277 2009-05-01  Bruno Haible  <bruno@clisp.org>
107279         Avoid compiler warnings when redefining macros defined by <libintl.h>.
107280         * lib/gettext.h [!ENABLE_NLS] (gettext, dgettext, dcgettext, ngettext,
107281         dngettext, dcngettext, textdomain, bindtextdomain,
107282         bind_textdomain_codeset): Undefine before redefining.
107284 2009-04-30  Bruno Haible  <bruno@clisp.org>
107286         Fix bug introduced on 2009-04-25.
107287         * lib/math.in.h (gl_signbitf_OPTIMIZED_MACRO,
107288         gl_signbitd_OPTIMIZED_MACRO, gl_signbitl_OPTIMIZED_MACRO): New macros.
107289         * lib/signbitf.c (gl_signbitd): Undefine if gl_signbitf_OPTIMIZED_MACRO
107290         is defined.
107291         * lib/signbitd.c (gl_signbitd): Undefine if gl_signbitd_OPTIMIZED_MACRO
107292         is defined.
107293         * lib/signbitl.c (gl_signbitd): Undefine if gl_signbitl_OPTIMIZED_MACRO
107294         is defined.
107295         Reported by Elbert_Pol <elbert.pol@gmail.com>.
107297 2009-04-28  Bruno Haible  <bruno@clisp.org>
107299         Comment tweaks.
107300         * lib/unistr.h (u*_cmp2): Clarify what memcmp2 is.
107301         * lib/uninorm.h (u*_normxfrm): Fix description of return value.
107302         * lib/unicase.h (u*_casexfrm): Likewise.
107303         Reported by Paolo Bonzini.
107305 2009-04-28  Bruno Haible  <bruno@clisp.org>
107307         Fix a compilation error.
107308         * lib/mbsrtowcs-state.c (_gl_mbsrtowcs_state): Fix initializer.
107309         * lib/wcsrtombs-state.c (_gl_wcsrtombs_state): Likewise.
107310         Reported by Jim Meyering.
107312 2009-04-27  Bruno Haible  <bruno@clisp.org>
107314         New module 'libunistring'.
107315         * modules/libunistring: New file.
107316         * m4/libunistring.m4: New file.
107317         * MODULES.html.sh (Unicode string functions): Add it.
107319 2009-04-27  Eric Blake  <ebb9@byu.net>
107321         maint.mk: allow package-specific header to provide <config.h>
107322         * top/maint.mk (sc_require_config_h): New variable.
107323         (sc_require_config_h, sc_require_config_h_first): Use it.
107325 2009-04-27  Simon Josefsson  <simon@josefsson.org>
107327         * top/maint.mk (sc_avoid_if_before_free): Except
107328         useless-if-before-free script.
107330 2009-04-27  Eric Blake  <ebb9@byu.net>
107332         maintainer-makefile: depend on all required helper scripts
107333         * modules/maintainer-makefile (Depends-on): Add vc-list-files and
107334         useless-if-before-free.
107335         * top/maint.mk (VC_LIST, sc_avoid_if_before_free): Use local
107336         version, rather than assuming gnulib checkout is available.
107337         Reported by Simen Josefsson.
107339 2009-04-26  Bruno Haible  <bruno@clisp.org>
107341         Make the lib vs. lib64 recognition work on openSUSE 11 with "gcc -m32".
107342         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Ignore paths that end in
107343         "../" or "..".
107345 2009-04-26  Bruno Haible  <bruno@clisp.org>
107347         * m4/lib-link.m4 (AC_LIB_HAVE_LINKFLAGS): Accept a fifth argument.
107348         * m4/libsigsegv.m4 (gl_LIBSIGSEGV): Simplify by using
107349         AC_LIB_HAVE_LINKFLAGS.
107351 2009-04-26  Bruno Haible  <bruno@clisp.org>
107353         Simplify calling convention of u*_conv_from_encoding.
107354         * lib/uniconv.h (u8_conv_from_encoding, u16_conv_from_encoding,
107355         u32_conv_from_encoding): Expect a resultbuf argument and return the
107356         result directly as a pointer.
107357         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Likewise.
107358         * lib/uniconv/u-conv-from-enc.h (FUNC): Likewise.
107359         * lib/uniconv/u-strconv-from-enc.h (FUNC): Update.
107360         * lib/unicase/ulc-casecmp.c (ulc_u8_casefold): Update.
107361         * lib/unicase/ulc-casexfrm.c (ulc_casexfrm): Update.
107362         * lib/unilbrk/ulc-possible-linebreaks.c (ulc_possible_linebreaks):
107363         Update.
107364         * lib/unilbrk/ulc-width-linebreaks.c (ulc_width_linebreaks): Update.
107365         * lib/uniwbrk/ulc-wordbreaks.c (ulc_wordbreaks): Update.
107366         * lib/vasnprintf.c (VASNPRINTF): Update.
107367         * tests/uniconv/test-u8-conv-from-enc.c (main): Update.
107368         * tests/uniconv/test-u16-conv-from-enc.c (main): Update.
107369         * tests/uniconv/test-u32-conv-from-enc.c (main): Update.
107370         * NEWS: Mention the change.
107372 2009-04-26  Bruno Haible  <bruno@clisp.org>
107374         Simplify calling convention of u*_conv_to_encoding.
107375         * lib/uniconv.h (u8_conv_to_encoding, u16_conv_to_encoding,
107376         u32_conv_to_encoding): Expect a resultbuf argument and return the
107377         result directly as a pointer.
107378         * lib/uniconv/u8-conv-to-enc.c (u8_conv_to_encoding): Likewise.
107379         * lib/uniconv/u-conv-to-enc.h (FUNC): Likewise. Preserve errno while
107380         freeing scaled_offsets if mem_iconveha failed.
107381         * lib/unicase/u-casexfrm.h (FUNC): Update.
107382         * lib/uninorm/u-normxfrm.h (FUNC): Update.
107383         * lib/vasnprintf.c (VASNPRINTF): Update.
107384         * tests/uniconv/test-u8-conv-to-enc.c (main): Update.
107385         * tests/uniconv/test-u16-conv-to-enc.c (main): Update.
107386         * tests/uniconv/test-u32-conv-to-enc.c (main): Update.
107387         * NEWS: Mention the change.
107389 2009-04-26  Bruno Haible  <bruno@clisp.org>
107391         Avoid test failures on AIX and OSF/1.
107392         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Avoid calling
107393         malloc(0).
107394         * lib/uniconv/u8-conv-to-enc.c (u8_conv_to_encoding): Likewise.
107395         * lib/unilbrk/ulc-possible-linebreaks.c (ulc_possible_linebreaks):
107396         Likewise.
107397         * lib/unilbrk/ulc-width-linebreaks.c (ulc_width_linebreaks): Likewise.
107398         * lib/uniwbrk/ulc-wordbreaks.c (ulc_wordbreaks): Likewise.
107399         * lib/uniconv/u-conv-to-enc.h (FUNC): Likewise. Fix memory leak.
107400         * lib/unistr/u-cpy-alloc.h (FUNC): Call malloc(1) instead of malloc(0).
107401         * doc/posix-functions/malloc.texi: Document the portability problem
107402         related to malloc(0).
107404 2009-04-26  Bruno Haible  <bruno@clisp.org>
107406         * modules/unistr/u8-cpy-alloc (Depends-on): Add malloc-posix.
107407         * modules/unistr/u16-cpy-alloc (Depends-on): Likewise.
107408         * modules/unistr/u32-cpy-alloc (Depends-on): Likewise.
107410 2009-04-25  Bruno Haible  <bruno@clisp.org>
107412         Avoid link error when creating a namespace clean library.
107413         * lib/math.in.h (gl_signbitf, gl_signbitd, gl_signbitl): Don't define
107414         as macro with arguments if already defined as an alias.
107415         * lib/signbitf.c (gl_signbitf): Don't undefine.
107416         * lib/signbitd.c (gl_signbitd): Don't undefine.
107417         * lib/signbitl.c (gl_signbitl): Don't undefine.
107419 2009-04-25  Jim Meyering  <meyering@redhat.com>
107421         vc-list-files: fix another quoting bug
107422         * build-aux/vc-list-files: Avoid sed backslash expansion
107423         of pathological directory names.
107425 2009-04-25  Eric Blake  <ebb9@byu.net>
107427         vc-list-files: fix shell quoting error
107428         * build-aux/vc-list-files: Protect against $ in $dir.  Normalize
107429         timestamp.
107431 2009-04-25  Jim Meyering  <meyering@redhat.com>
107433         vc-list-files: restore lost functionality with subdir argument
107434         * build-aux/vc-list-files: When given a non-"." sub-directory
107435         argument, substitute the $dir/ prefix back onto each resulting name.
107436         Otherwise, coreutils' root_tests check would fail.
107438 2009-04-24  Eric Blake  <ebb9@byu.net>
107440         vc-list-files: ignore git symlinks
107441         * build-aux/vc-list-files (.git): Use ls-tree and a filter, rather
107442         than ls-files, to ignore git symlinks.
107444         maint.mk: import improvements from m4
107445         * top/maint.mk (VC-tag): Use signing key from cfg.mk.
107446         (move_if_change): Delete unused macro.
107447         (news-date-check, vc-diff-check): Support VPATH builds.
107448         (announcement): Likewise.  Split --bootstrap-tools list...
107449         (boostrap-tools): ...into separate list, which can be overridden
107450         in cfg.mk.
107451         (sc_avoid_if_before_free): Point to $(gnulib_dir), rather than
107452         requiring dependency on useless-if-before-free module.
107453         (VC_LIST, VC_LIST_EXCEPT): Likewise for vc-list-files module.
107454         Support VPATH builds.
107456 2009-04-24  Jim Meyering  <meyering@redhat.com>
107458         maint.mk: remove coreutils-specific rules and variables
107459         * top/maint.mk (bin, taint-distcheck, coreutils-path-check, t): Remove.
107460         (fake_home, install-transform-check, my-instcheck, pfx, TMPDIR): Remove.
107461         (t_prefix, t_taint, tp, warn_cflags, write_loser, my-distcheck): Remove.
107463         maint.mk: remove obsolete rule
107464         * top/maint.mk (rel-check): Remove rule.
107465         (WGET, WGETFLAGS): Remove now-unused variables.
107467 2009-04-24  Simon Josefsson  <simon@josefsson.org>
107469         * top/maint.mk (makefile-check): Renamed to sc_makefile_check for
107470         consistency.
107472         * modules/vc-list-files-tests (TESTS_ENVIRONMENT): Use
107473         '$(PATH_SEPARATOR)' instead of ':'.
107475 2009-04-24  Simon Josefsson  <simon@josefsson.org>
107477         * lib/getopt1.c (main): Use 'const' for static array.
107479 2009-04-24  Simon Josefsson  <simon@josefsson.org>
107481         * top/maint.mk: Sync with coreutils.
107482         * NEWS: Explain incompatibilities.
107484 2009-04-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
107485             Bruno Haible  <bruno@clisp.org>
107487         Fix cross-compilation results.
107488         * m4/btowc.m4 (gl_FUNC_BTOWC): Use no-op statement, rather than empty
107489         statement, as third argument of AC_TRY_RUN.
107490         * m4/mbrtowc.m4 (gl_MBRTOWC_INCOMPLETE_STATE, gl_MBRTOWC_SANITYCHECK,
107491         gl_MBRTOWC_NULL_ARG, gl_MBRTOWC_RETVAL, gl_MBRTOWC_NUL_RETVAL):
107492         Likewise.
107493         * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Likewise.
107494         * m4/wcsrtombs.m4 (gl_WCSRTOMBS_TERMINATION, gl_WCSRTOMBS_NULL):
107495         Likewise.
107496         * m4/wctob.m4 (gl_FUNC_WCTOB): Likewise.
107497         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise. Update for AIX 4.3.
107498         * doc/posix-functions/wcrtomb.texi: Mention the bug on AIX 4.3.
107500 2009-04-20  Bruno Haible  <bruno@clisp.org>
107502         Avoid test failure on mingw.
107503         * tests/uniwidth/test-uc_width2.sh: Convert newlines in output.
107505 2009-04-20  Bruno Haible  <bruno@clisp.org>
107507         Avoid compilation error on mingw.
107508         * modules/localename-tests (Depends-on): Add locale.
107510 2009-04-19  Bruno Haible  <bruno@clisp.org>
107512         Support for building a shared library on Windows platforms.
107513         * tests/uninorm/test-nfc.c (n): Don't define if WOE32DLL.
107514         (main): Test the presence of UNINORM_NFC here.
107515         * tests/uninorm/test-nfd.c (n): Don't define if WOE32DLL.
107516         (main): Test the presence of UNINORM_NFD here.
107517         * tests/uninorm/test-nfkc.c (n): Don't define if WOE32DLL.
107518         (main): Test the presence of UNINORM_NFKC here.
107519         * tests/uninorm/test-nfkd.c (n): Don't define if WOE32DLL.
107520         (main): Test the presence of UNINORM_NFKD here.
107522 2009-04-19  Bruno Haible  <bruno@clisp.org>
107524         Avoid a compiler warning.
107525         * tests/uninorm/test-u32-normalize-big.c (read_normalization_test_file):
107526         Change type of variable 'sequence'.
107528 2009-04-19  Bruno Haible  <bruno@clisp.org>
107530         * modules/configmake (Makefile.am): When the contents of configmake.h
107531         does not change, arrange to preserve its modification time.
107533 2009-04-17  Simon Josefsson  <simon@josefsson.org>
107535         * top/maint.mk (PO_DOMAIN): New variable, allows overriding of
107536         gettext domain.
107538 2009-04-16  Jim Meyering  <meyering@redhat.com>
107540         useless-if-before-free: improve conversion code
107541         * build-aux/useless-if-before-free: Adjust code-in-comment to match
107542         "...!= 0" as well as "...!= NULL".  emacs has one of the former.
107544 2009-04-14  Bruno Haible  <bruno@clisp.org>
107546         * modules/fcntl (Depends-on): Add extensions.
107547         * m4/fcntl_h.m4 (gl_FCNTL_H): Add a comment.
107549 2009-04-12  Ben Pfaff  <blp@gnu.org>
107551         Make fcntl module detect O_NOATIME, O_NOFOLLOW on GNU/Linux.
107552         * m4/fcntl_h.m4 (gl_FCNTL_H): Require AC_USE_SYSTEM_EXTENSIONS.
107554 2009-03-20  Ben Pfaff  <blp@gnu.org>
107556         Make rename replace existing destinations on Windows.
107557         * m4/rename.m4: Add test for Mingw.
107558         * lib/rename.c: Add rename replacement that uses MoveFileEx with
107559         MOVEFILE_REPLACE_EXISTING to replace existing destination files.
107560         * doc/posix-functions/rename.texi: Document.
107562 2009-04-10  Bruno Haible  <bruno@clisp.org>
107564         New include file "iconveh.h".
107565         * lib/iconveh.h: New file, extracted from lib/striconveh.h.
107566         * lib/striconveh.h: Include it.
107567         (enum iconv_ilseq_handler): Remove definition.
107568         * lib/striconveha.h: Include <stddef.h> and iconveh.h instead of
107569         striconveh.h.
107570         * lib/striconveha.c: Include striconveh.h.
107571         * lib/uniconv.h: Include iconveh.h instead of striconveh.h.
107572         * modules/striconveh (Files): Add lib/iconveh.h.
107573         * modules/uniconv/base (Files): Add lib/iconveh.h. Remove
107574         lib/striconveh.h.
107576 2009-04-10  Bruno Haible  <bruno@clisp.org>
107578         * lib/uniconv.h: Update comment.
107580 2009-04-10  Bruno Haible  <bruno@clisp.org>
107582         * lib/unistr/u8-mbtouc-aux.c: Inside libunistring, define the function
107583         always.
107584         * lib/unistr/u8-mbtouc-unsafe-aux.c: Likewise.
107585         * lib/unistr/u16-mbtouc-aux.c: Likewise.
107586         * lib/unistr/u16-mbtouc-unsafe-aux.c: Likewise.
107587         * lib/unistr/u8-mbtouc.c: Inside libunistring, include
107588         "unistring-notinline.h", so that the function gets defined always.
107589         * lib/unistr/u8-mbtouc-unsafe.c: Likewise.
107590         * lib/unistr/u8-uctomb.c: Likewise.
107591         * lib/unistr/u16-mbtouc.c: Likewise.
107592         * lib/unistr/u16-mbtouc-unsafe.c: Likewise.
107593         * lib/unistr/u16-uctomb.c: Likewise.
107594         * lib/unistr/u32-mbtouc.c: Likewise.
107595         * lib/unistr/u32-mbtouc-unsafe.c: Likewise.
107596         * lib/unistr/u32-uctomb.c: Likewise.
107598 2009-04-10  Bruno Haible  <bruno@clisp.org>
107600         Mark 'utime' obsolete.
107601         * modules/utime (Status, Notice): New sections.
107602         Suggested by Jim Meyering.
107604         Fix cross-compile guess for utime test.
107605         * m4/utime.m4 (AC_FUNC_UTIME_NULL): Add definition from newest unstable
107606         autoconf.
107607         * doc/posix-functions/utime.texi: Give more precisions.
107608         Reported by Jan <ipif@ymail.com>.
107610 2009-04-09  Kamil Dudka  <kdudka@redhat.com>
107612         filevercmp: correct today's change
107613         * lib/filevercmp.c: Also handle coreutils' test inputs.
107614         * tests/test-filevercmp.c: Add inputs from one of coreutils' test scripts.
107616         Fix regression in 'filevercmp' module. Thanks Sven Joachim
107617         for reporting it.
107618         * lib/filevercmp.c: Special handle for "", "." and "..".
107619         * tests/test-filevercmp.c: Enlarge the set suite.
107621 2009-04-07  Jim Meyering  <meyering@redhat.com>
107623         useless-if-before-free: show how to remove braced useless free, too
107624         * build-aux/useless-if-before-free: still only in a comment, though.
107626 2009-04-07  Reuben Thomas  <rrt@sc3d.org>
107628         maint.mk: import changes to syntax-check macros from coreutils
107629         * top/maint.mk (_prohibit_regexp, _header_without_use): Define.
107630         Use them in the relevant macros.
107632 2009-04-06  Bruno Haible  <bruno@clisp.org>
107634         Fix unportable use of bit-fields.
107635         * lib/unicase/special-casing.h (struct special_casing_rule): Change the
107636         bit-field type from 'int' to 'signed int'. Otherwise Solaris cc,
107637         AIX xlc, and OSF/1 cc interpret it as 'unsigned int'.
107639 2009-04-06  Bruno Haible  <bruno@clisp.org>
107641         Avoid test failures on AIX and OSF/1.
107642         * tests/unicase/test-u8-casefold.c (check): Account for the possibility
107643         that malloc(0) = NULL.
107644         * tests/unicase/test-u8-tolower.c (check): Likewise.
107645         * tests/unicase/test-u8-totitle.c (check): Likewise.
107646         * tests/unicase/test-u8-toupper.c (check): Likewise.
107647         * tests/unicase/test-u16-casefold.c (check): Likewise.
107648         * tests/unicase/test-u16-tolower.c (check): Likewise.
107649         * tests/unicase/test-u16-totitle.c (check): Likewise.
107650         * tests/unicase/test-u16-toupper.c (check): Likewise.
107651         * tests/unicase/test-u32-casefold.c (check): Likewise.
107652         * tests/unicase/test-u32-tolower.c (check): Likewise.
107653         * tests/unicase/test-u32-totitle.c (check): Likewise.
107654         * tests/unicase/test-u32-toupper.c (check): Likewise.
107655         * tests/uninorm/test-u8-nfc.c (check): Likewise.
107656         * tests/uninorm/test-u8-nfd.c (check): Likewise.
107657         * tests/uninorm/test-u8-nfkc.c (check): Likewise.
107658         * tests/uninorm/test-u8-nfkd.c (check): Likewise.
107659         * tests/uninorm/test-u16-nfc.c (check): Likewise.
107660         * tests/uninorm/test-u16-nfd.c (check): Likewise.
107661         * tests/uninorm/test-u16-nfkc.c (check): Likewise.
107662         * tests/uninorm/test-u16-nfkd.c (check): Likewise.
107663         * tests/uninorm/test-u32-nfc.c (check): Likewise.
107664         * tests/uninorm/test-u32-nfd.c (check): Likewise.
107665         * tests/uninorm/test-u32-nfkc.c (check): Likewise.
107666         * tests/uninorm/test-u32-nfkd.c (check): Likewise.
107668 2009-04-05  Bruno Haible  <bruno@clisp.org>
107670         Work around an autoconf limitation.
107671         * gnulib-tool (func_emit_lib_Makefile_am): Omit the "Reproduce by"
107672         comment line if it would be longer than 3 KB.
107674 2009-04-05  Bruno Haible  <bruno@clisp.org>
107676         Avoid test failure with libiconv-1.13.
107677         * tests/test-striconveh.c (main): Allow result of libiconv 1.13 as one
107678         of the expected test results.
107680 2009-04-05  Bruno Haible  <bruno@clisp.org>
107682         * gnulib-tool (func_emit_lib_Makefile_am): Don't add the library to
107683         noinst_LTLIBRARIES if the Makefile.am in the same directory specifies
107684         that it should be installed.
107686 2009-04-05  Bruno Haible  <bruno@clisp.org>
107688         * gnulib-tool: New option --copy-file.
107689         (func_usage): Document it.
107690         (func_dest_tmpfilename): Moved out of func_import.
107691         (func_add_file, func_update_file): New functions, extracted from
107692         func_import.
107693         (func_import): Update.
107695 2009-04-05  Karl Berry  <karl@gnu.org>
107697         * README: prominently mention gnulib-tool.
107698         Rearrange sections so getting the code is near the top.
107700 2009-04-05  Bruno Haible  <bruno@clisp.org>
107702         * lib/unicase.h: Mention u*_cmp2.
107703         * lib/unicase/u-casecmp.h (FUNC): Invoke U_CMP2 instead of U_CMP.
107704         * lib/unicase/u8-casecmp.c: Use u8_cmp2 instead of u8_cmp.
107705         * lib/unicase/ulc-casecmp.c: Likewise.
107706         * lib/unicase/u16-casecmp.c: Use u16_cmp2 instead of u16_cmp.
107707         * lib/unicase/u32-casecmp.c: Use u32_cmp2 instead of u32_cmp.
107708         * modules/unicase/u8-casecmp (Depends-on): Add unistr/u8-cmp2, remove
107709         unistr/u8-cmp.
107710         * modules/unicase/ulc-casecmp (Depends-on): Likewise.
107711         * modules/unicase/u16-casecmp (Depends-on): Add unistr/u16-cmp2, remove
107712         unistr/u16-cmp.
107713         * modules/unicase/u32-casecmp (Depends-on): Add unistr/u32-cmp2, remove
107714         unistr/u32-cmp.
107716         * lib/uninorm.h: Mention u*_cmp2.
107717         * lib/uninorm/u-normcmp.h (FUNC): Invoke U_CMP2 instead of U_CMP.
107718         * lib/uninorm/u8-normcmp.c: Use u8_cmp2 instead of u8_cmp.
107719         * lib/uninorm/u16-normcmp.c: Use u16_cmp2 instead of u16_cmp.
107720         * lib/uninorm/u32-normcmp.c: Use u32_cmp2 instead of u32_cmp.
107721         * modules/uninorm/u8-normcmp (Depends-on): Add unistr/u8-cmp2, remove
107722         unistr/u8-cmp.
107723         * modules/uninorm/u16-normcmp (Depends-on): Add unistr/u16-cmp2, remove
107724         unistr/u16-cmp.
107725         * modules/uninorm/u32-normcmp (Depends-on): Add unistr/u32-cmp2, remove
107726         unistr/u32-cmp.
107728         New module 'unistr/u32-cmp2'.
107729         * lib/unistr/u32-cmp2.c: New file.
107730         * modules/unistr/u32-cmp2: New file.
107732         New module 'unistr/u16-cmp2'.
107733         * lib/unistr/u16-cmp2.c: New file.
107734         * modules/unistr/u16-cmp2: New file.
107736         New module 'unistr/u8-cmp2'.
107737         * lib/unistr.h (u8_cmp2, u16_cmp2, u32_cmp2): New declarations.
107738         * lib/unistr/u8-cmp2.c: New file.
107739         * lib/unistr/u-cmp2.h: New file.
107740         * modules/unistr/u8-cmp2: New file.
107742 2009-04-05  Bruno Haible  <bruno@clisp.org>
107744         * lib/unictype.h (uc_property_is_valid): New macro.
107745         * tests/unictype/test-pr_byname.c (main): Use it.
107747         * lib/unistr.h: Doc fixes.
107748         * lib/uniconv.h: Doc fixes.
107749         * lib/unictype.h: Doc fixes.
107751 2009-04-03  Paul Eggert  <eggert@cs.ucla.edu>
107753         Port coreutils 7.2 to Solaris 8.
107755         * modules/arpa_inet (arpa/inet.h): Depend on arpa_inet.in.h.
107756         * m4/inet_ntop.m4 (gl_INET_NTOP): Search for inet_ntop in -lnsl,
107757         for Solaris 8.  This is a bit of a hack, as it means it's the
107758         caller's responsibility to add -lnsl if needed, but most likely it
107759         won't be needed since only getaddrinfo uses this and getaddrinfo
107760         isn't needed on Solaris 8.
107762         * modules/fnmatch (Depends-on): Add mbsrtowcs, to fix a porting
107763         problem to Solaris 8 encountered with coreutils 7.2, which
107764         resulted in a message "fnmatch.c:292: warning: passing argument 4
107765         of 'mbsrtowcs' from incompatible pointer type".  Also, add mbsinit
107766         at the suggestion of Bruno Haible, since fnmatch uses mbsinit.
107768 2009-04-03  Simon Josefsson  <simon@josefsson.org>
107770         * m4/ld-version-script.m4: Add FIXME comment.
107772 2009-04-02  Simon Josefsson  <simon@josefsson.org>
107774         * doc/ld-output-def.texi: Use DLL_VERSION instead of confusing
107775         SOVERSION variable.
107777 2009-04-02  Bruno Haible  <bruno@clisp.org>
107779         * Makefile (info, html, dvi, pdf): Combine the rules.
107780         Suggested by Jim Meyering.
107782 2009-04-01  Bruno Haible  <bruno@clisp.org>
107784         * Makefile (info, html, dvi, pdf): New targets.
107785         Reported by Reuben Thomas <rrt@sc3d.org>.
107787 2009-04-01  Bruno Haible  <bruno@clisp.org>
107789         * doc/gnulib-tool.texi (Invoking gnulib-tool): Document how gnulib-tool
107790         can be put into PATH.
107791         Reported by Reuben Thomas <rrt@sc3d.org>. Suggested by Karl Berry.
107793 2009-04-01  Bruno Haible  <bruno@clisp.org>
107795         * doc/lib-symbol-visibility.texi: Follow texinfo style conventions.
107797 2009-04-01  Bruno Haible  <bruno@clisp.org>
107799         Rename module 'visibility'.
107800         * modules/lib-symbol-visibility: Renamed from modules/visibility.
107801         * doc/lib-symbol-visibility.texi: Renamed from visibility.texi.
107802         * doc/gnulib.texi: Update.
107803         * MODULES.html.sh (Misc): Update.
107804         * NEWS: Mention the change.
107806 2009-04-01  Simon Josefsson  <simon@josefsson.org>
107808         * modules/lib-msvc-compat: New module.  Thanks to Bruno Haible
107809         <bruno@clisp.org>, Ralf Wildenhues <Ralf.Wildenhues@gmx.de>, and
107810         Eric Blake <ebb9@byu.net> for review.
107811         * MODULES.html.sh: Add lib-msvc-compat.
107812         * doc/gnulib.texi: Link to new section.
107813         * m4/ld-output-def.m4: New file.
107814         * doc/ld-output-def.texi: New file.
107816 2009-04-01  Simon Josefsson  <simon@josefsson.org>
107818         Rename ld-version-script to lib-symbol-versions.  Suggested by
107819         Bruno Haible <bruno@clisp.org>.
107820         * modules/ld-version-script: Renamed to lib-symbol-versions.
107821         * doc/ld-version-script.texi: Fix module name.
107822         * MODULES.html.sh: Add lib-symbol-versions.
107824 2009-03-31  Simon Josefsson  <simon@josefsson.org>
107826         * modules/u64-tests: New file.
107827         * tests/test-u64.c: New file.
107829 2009-03-04  Simon Josefsson  <simon@josefsson.org>
107831         * MODULES.html.sh: Mention u64.
107832         * modules/u64: New module.
107833         * modules/crypto/sha512: Depend on u64 module instead of providing
107834         u64.h.
107836 2009-03-27  Eric Blake  <ebb9@byu.net>
107838         test-strerror: make debugging EAI_SYSTEM easier
107839         * modules/getaddrinfo-tests (Depends-on): Add strerror.
107840         * test-getaddrinfo.c (simple) [ENABLE_DEBUGGING]: Report errno if
107841         failure was EAI_SYSTEM.
107843 2009-03-25  Bruno Haible  <bruno@clisp.org>
107845         Fix a problem with --enable-relocatable on Solaris 7.
107846         * modules/relocatable-prog-wrapper (Depends-on): Add environ. Needed
107847         since 2008-02-24.
107849 2009-03-25  Eric Blake  <ebb9@byu.net>
107851         test-sockets: avoid gcc warning
107852         * tests/test-sockets.c (main): Silence compiler warning.
107854 2009-03-25  Paul Eggert  <eggert@cs.ucla.edu>
107856         New modules nproc, pthread, contributed by Glen Lenker.
107858         * MODULES.html.sh: Add pthread, nproc.
107859         * lib/nproc.c: New file.
107860         * lib/nproc.h: New file.
107861         * lib/pthread.in.h: New file.
107862         * m4/pthread.m4: New file.
107863         * modules/nproc: New file.
107864         * modules/pthread: New file.
107866 2009-03-24  Simon Josefsson  <simon@josefsson.org>
107868         * modules/unicase/locale-language-tests (test_locale_language_LDADD):
107869         New variable.
107871 2009-03-24  Kamil Dudka  <kdudka@redhat.com>
107873         filevercmp: handle simple~ and numbered.~3~ backup suffixes
107874         * lib/filevercmp.c: Handle simple~ and numbered.~3~ backup suffixes.
107875         * tests/test-filevercmp.c: Add tests for backup suffixes.
107877 2009-03-24  Simon Josefsson  <simon@josefsson.org>
107879         * modules/stdlib (Depends-on): Add stdint, needed when defining
107880         struct random_data on, for example, HP-UX 10.20.  Reported by
107881         Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
107883 2009-03-24  Simon Josefsson  <simon@josefsson.org>
107885         * lib/readline.c (readline): Call fflush on stdout after printing
107886         prompt.
107888 2009-03-20  Bruno Haible  <bruno@clisp.org>
107890         Remove dependency from 'close' module to -lws2_32 on native Windows.
107891         * lib/close-hook.h: New file.
107892         * lib/close-hook.c: New file.
107893         * lib/close.c: Include close-hook.h. Don't include <sys/socket.h>,
107894         w32sock.h.
107895         (_gl_close_fd_maybe_socket): Remove function.
107896         (rpl_close): Invoke execute_all_close_hooks instead of
107897         _gl_close_fd_maybe_socket.
107898         * lib/sockets.c: Include close-hook.h, w32sock.h.
107899         (close_fd_maybe_socket): New function, essentially from lib/close.c.
107900         (close_sockets_hook): New variable.
107901         (gl_sockets_startup): Register close_fd_maybe_socket as a hook.
107902         (gl_sockets_cleanup): Unregister it.
107903         * lib/unistd.in.h (HAVE__GL_CLOSE_FD_MAYBE_SOCKET): Remove macro.
107904         * m4/close.m4 (gl_REPLACE_CLOSE): Undo 2009-02-05 change.
107905         * modules/close-hook: New file.
107906         * modules/close (Files): Remove lib/w32sock.h.
107907         (Depends-on): Add close-hook.
107908         (Link): Remove section.
107909         * modules/sockets (Files): Add lib/w32sock.h.
107910         (Depends-on): Add close-hook.
107911         * modules/sys_socket (configure.ac): Remove gl_MODULE_INDICATOR
107912         invocation.
107913         * NEWS: Mention that LIB_CLOSE is gone.
107915 2009-03-23  Eric Blake  <ebb9@byu.net>
107917         signal-tests: test previous patch
107918         * tests/test-signal.c: New file.
107919         * modules/signal-tests: Likewise.
107921         signal.h: always support 'volatile sig_atomic_t'
107922         * m4/signal_h.m4 (gl_SIGNAL_H): Check for AIX limitation.
107923         (gl_SIGNAL_H_DEFAULTS): Add a default.
107924         * modules/signal (Makefile.am): Substitute if needed.
107925         * lib/signal.in.h (sig_atomic_t): Redefine if needed, so that
107926         users can blindly add volatile.
107927         * doc/posix-headers/signal.texi (signal.h): Document it.
107928         Reported by Matthew Woehlke.
107930 2009-03-23  Jim Meyering  <meyering@redhat.com>
107932         pathmax: PATH_MAX: use pathconf only when available
107933         * lib/pathmax.h (PATH_MAX): Select the pathconf-using definition
107934         only if HAVE_PATHCONF is defined.  Patch by Sylvain Beucler.
107935         * m4/pathmax.m4 (gl_PATHMAX): Check for pathconf.
107936         This avoids a link failure in a PSP cross-compilation environment
107937         described in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/17048
107939         * lib/vasnprintf.c (divide): Fix typo in comment.
107941 2009-03-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
107943         * gnulib-tool (func_filter_filelist): Fix comment.
107945 2009-03-20  Bruno Haible  <bruno@clisp.org>
107947         Make sockets.h self-contained.
107948         * lib/sockets.c: Include sockets.h first.
107949         * lib/sockets.h: Include <sys/socket.h> before using the SOCKET type.
107951 2009-03-19  Eric Blake  <ebb9@byu.net>
107953         doc: mention more functions added in cygwin 1.7.0
107954         * doc/posix-functions/log2.texi: Mention recent cygwin 1.7.0
107955         addition.
107956         * doc/posix-functions/log2f.texi: Likewise.
107958 2009-03-19  Jim Meyering  <meyering@redhat.com>
107960         fsusage: avoid syntax error due to statement-before-declaration
107961         * lib/fsusage.c (get_fs_usage): Put warning-avoidance statement
107962         after all declarations.  Reported by Matthew Woehlke in
107963         http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/16231
107965 2009-03-18  Eric Blake  <ebb9@byu.net>
107967         build-aux/compile: sync from automake
107968         * build-aux/compile: New file, from automake.
107969         * config/srclist.txt: Mention build-aux/compile.
107971 2009-03-17  Bruno Haible  <bruno@clisp.org>
107973         * lib/git-merge-changelog.c: Fix typo in comment.
107974         Reported by Reuben Thomas <rrt@sc3d.org>.
107976 2009-03-17  Reuben Thomas  <rrt@sc3d.org>
107978         * m4/regex.m4: update and improve help for
107979         --without-included-regex.
107981 2009-03-17  Simon Josefsson  <simon@josefsson.org>
107983         * modules/isnanl-nolibm-tests (Files): Add tests/nan.h to avoid
107984         failure on missing include files.
107986 2009-03-17  Eric Blake  <ebb9@byu.net>
107988         doc: mention more functions added in cygwin 1.7.0
107989         * doc/posix-functions/fwprintf.texi: Mention recent cygwin 1.7.0
107990         addition.
107991         * doc/posix-functions/fwscanf.texi: Likewise.
107992         * doc/posix-functions/swprintf.texi: Likewise.
107993         * doc/posix-functions/swscanf.texi: Likewise.
107994         * doc/posix-functions/vfwprintf.texi: Likewise.
107995         * doc/posix-functions/vfwscanf.texi: Likewise.
107996         * doc/posix-functions/vswprintf.texi: Likewise.
107997         * doc/posix-functions/vswscanf.texi: Likewise.
107998         * doc/posix-functions/vwprintf.texi: Likewise.
107999         * doc/posix-functions/vwscanf.texi: Likewise.
108000         * doc/posix-functions/wcscasecmp.texi: Likewise.
108001         * doc/posix-functions/wcsdup.texi: Likewise.
108002         * doc/posix-functions/wcsftime.texi: Likewise.
108003         * doc/posix-functions/wcsncasecmp.texi: Likewise.
108004         * doc/posix-functions/wprintf.texi: Likewise.
108005         * doc/posix-functions/wscanf.texi: Likewise.
108006         * doc/glibc-functions/gethostbyname2.texi: Likewise.
108008 2009-03-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
108010         maint.mk: really add $(AM_MAKEFLAGS)
108011         * top/maint.mk (init-coverage, build-coverage): `$(AM_MAKEFLAGS)'
108012         was inadvertently omitted in the last commit.
108013         Spotted by Bruno Haible.
108015         maint.mk: use $(MAKE) $(AM_MAKEFLAGS) not make
108016         * top/maint.mk (init-coverage, build-coverage): Use `$(MAKE)
108017         $(AM_MAKEFLAGS)' rather than plain `make'.
108019         gnulib-tool: execute $MAKE not make
108020         * gnulib-tool: Default $MAKE to 'make'.
108021         (func_create_testdir, func_create_megatestdir): Use $MAKE rather
108022         than make.  Initialize $MAKE in the do-autobuild script.
108024         gnulib-tool: use $MAKE not make in generated files
108025         * gnulib-tool (func_create_megatestdir): Use $MAKE rather than
108026         make, in generated files.  Initialize $MAKE in the do-autobuild
108027         script.
108029         * top/GNUmakefile (_have-git-version-gen): Fix typo.
108031         GNUmakefile: disable parallelism only for multiple, recursive targets
108032         * top/GNUmakefile (ALL_RECURSIVE_TARGETS): New macro; allow user
108033         additions in the Makefile.
108034         (AM_RECURSIVE_TARGETS): New macro, override only if not provided
108035         by Automake.
108036         (.NOTPARALLEL): Only disable parallel builds if multiple targets
108037         are listed on the command line and at least one of them is
108038         listed in $(ALL_RECURSIVE_TARGETS).
108040 2009-03-14  Bruno Haible  <bruno@clisp.org>
108042         * modules/unilbrk/u8-possible-linebreaks (Depends-on): Replace
108043         utf8-ucs4-unsafe with unistr/u8-mbtouc-unsafe.
108044         * modules/unilbrk/u8-width-linebreaks (Depends-on): Likewise.
108045         * modules/unilbrk/u16-possible-linebreaks (Depends-on): Replace
108046         utf16-ucs4-unsafe with unistr/u16-mbtouc-unsafe.
108047         * modules/unilbrk/u16-width-linebreaks (Depends-on): Likewise.
108048         * modules/unistr/u8-chr (Depends-on): Replace ucs4-utf8 with
108049         unistr/u8-uctomb.
108050         * modules/unistr/u8-strchr (Depends-on): Likewise.
108051         * modules/unistr/u8-strrchr (Depends-on): Likewise.
108052         * modules/unistr/u16-chr (Depends-on): Replace ucs4-utf16 with
108053         unistr/u16-uctomb.
108054         * modules/unistr/u16-strchr (Depends-on): Likewise.
108055         * modules/unistr/u16-strrchr (Depends-on): Likewise.
108057 2009-03-12  Bruno Haible  <bruno@clisp.org>
108059         Work around select() bug on Interix 3.5.
108060         * lib/sys_select.in.h (select): Also replace if REPLACE_SELECT is 1.
108061         * lib/select.c (rpl_select): Add an implementation for Unix platforms.
108062         * m4/select.m4: New file.
108063         * m4/sys_select_h.m4 (gl_SYS_SELECT_H_DEFAULTS): Initialize REPLACE_SELECT.
108064         * modules/sys_select (Makefile.am): Substitute REPLACE_SELECT.
108065         * modules/select (Files): Add m4/select.m4.
108066         (configure.ac): Move conditional to m4/select.m4. Invoke gl_FUNC_SELECT.
108067         * modules/nanosleep (Depends-on): Add select.
108068         * modules/poll (Depends-on): Likewise.
108069         * doc/posix-functions/select.texi: Mention the Interix bug.
108070         Reported by Markus Duft <mduft@gentoo.org>.
108072         * lib/select.c: Renamed from lib/winsock-select.c.
108073         * modules/select (Files): Add lib/select.c, remove
108074         lib/winsock-select.c.
108075         (configure.ac): Update.
108077 2009-03-12  Jim Meyering  <meyering@redhat.com>
108079         avoid gcc warnings about unused macro definitions
108080         * lib/readtokens.c (STREQ): Remove unused definition.
108081         * lib/xmalloc.c (SIZE_MAX): Likewise.
108082         * lib/openat-die.c (N_): Likewise.
108083         * lib/mountlist.c (SIZE_MAX): Remove definition.
108084         Instead, include <stdint.h>.
108085         * lib/readutmp.c: Likewise.
108086         * modules/readutmp (Depends-on): Add stdint.
108087         * modules/mountlist (Depends-on): Add stdint.
108088         * lib/userspec.c (ISDIGIT): Move definition into #if block where used.
108090 2009-03-10  Bruno Haible  <bruno@clisp.org>
108092         Tests for module 'mbmemcasecoll'.
108093         * modules/mbmemcasecoll-tests: New file.
108094         * tests/test-mbmemcasecoll1.sh: New file.
108095         * tests/test-mbmemcasecoll2.sh: New file.
108096         * tests/test-mbmemcasecoll3.sh: New file.
108097         * tests/test-mbmemcasecoll.c: New file.
108099         New module 'mbmemcasecoll'.
108100         * lib/mbmemcasecoll.h: New file.
108101         * lib/mbmemcasecoll.c: New file.
108102         * modules/mbmemcasecoll: New file.
108104         * tests/test-mbmemcasecmp.h: New file, extracted from
108105         tests/test-mbmemcasecmp.c.
108106         * tests/test-mbmemcasecmp.c: Include test-mbmemcasecmp.h.
108107         (test_ascii, test_iso_8859_1, test_utf_8): Remove functions.
108108         (main): Update.
108109         * modules/mbmemcasecmp-tests (Files): Add tests/test-mbmemcasecmp.h.
108111 2009-03-09  Bruno Haible  <bruno@clisp.org>
108113         Tests for module 'mbmemcasecmp'.
108114         * modules/mbmemcasecmp-tests: New file.
108115         * tests/test-mbmemcasecmp1.sh: New file.
108116         * tests/test-mbmemcasecmp2.sh: New file.
108117         * tests/test-mbmemcasecmp3.sh: New file.
108118         * tests/test-mbmemcasecmp.c: New file.
108120         New module 'mbmemcasecmp'.
108121         * lib/mbmemcasecmp.h: New file.
108122         * lib/mbmemcasecmp.c: New file.
108123         * modules/mbmemcasecmp: New file.
108125 2009-03-09  Bruno Haible  <bruno@clisp.org>
108127         Tests for module 'unicase/ulc-casecoll'.
108128         * modules/unicase/ulc-casecoll-tests: New file.
108129         * tests/unicase/test-ulc-casecoll1.sh: New file.
108130         * tests/unicase/test-ulc-casecoll2.sh: New file.
108131         * tests/unicase/test-ulc-casecoll.c: New file.
108133         New module 'unicase/ulc-casecoll'.
108134         * lib/unicase.h (ulc_casecoll): New declaration.
108135         * lib/unicase/ulc-casecoll.c: New file.
108136         * modules/unicase/ulc-casecoll: New file.
108138         New module 'unicase/ulc-casexfrm'.
108139         * lib/unicase.h (ulc_casexfrm): New declaration.
108140         * lib/unicase/ulc-casexfrm.c: New file.
108141         * modules/unicase/ulc-casexfrm: New file.
108143 2009-03-09  Bruno Haible  <bruno@clisp.org>
108145         Followup to 2008-12-22 commit: Remove unnecessary AC_FUNC_MBRTOWC
108146         invocations.
108148         * m4/mbscasecmp.m4: Remove file.
108149         * modules/mbscasecmp (Files): Remove it and m4/mbrtowc.m4
108150         (configure.ac): Remove gl_FUNC_MBSCASECMP invocation.
108152         * m4/mbscasestr.m4: Remove file.
108153         * modules/mbscasestr (Files): Remove it and m4/mbrtowc.m4
108154         (configure.ac): Remove gl_FUNC_MBSCASESTR invocation.
108156         * m4/mbschr.m4: Remove file.
108157         * modules/mbschr (Files): Remove it and m4/mbrtowc.m4
108158         (configure.ac): Remove gl_FUNC_MBSCHR invocation.
108160         * m4/mbscspn.m4: Remove file.
108161         * modules/mbscspn (Files): Remove it and m4/mbrtowc.m4
108162         (configure.ac): Remove gl_FUNC_MBSCSPN invocation.
108164         * m4/mbslen.m4: Remove file.
108165         * modules/mbslen (Files): Remove it and m4/mbrtowc.m4
108166         (configure.ac): Remove gl_FUNC_MBSLEN invocation.
108168         * m4/mbsncasecmp.m4: Remove file.
108169         * modules/mbsncasecmp (Files): Remove it and m4/mbrtowc.m4
108170         (configure.ac): Remove gl_FUNC_MBSNCASECMP invocation.
108172         * m4/mbsnlen.m4: Remove file.
108173         * modules/mbsnlen (Files): Remove it and m4/mbrtowc.m4
108174         (configure.ac): Remove gl_FUNC_MBSNLEN invocation.
108176         * m4/mbspbrk.m4: Remove file.
108177         * modules/mbspbrk (Files): Remove it and m4/mbrtowc.m4
108178         (configure.ac): Remove gl_FUNC_MBSPBRK invocation.
108180         * m4/mbspcasecmp.m4: Remove file.
108181         * modules/mbspcasecmp (Files): Remove it and m4/mbrtowc.m4
108182         (configure.ac): Remove gl_FUNC_MBSPCASECMP invocation.
108184         * m4/mbsrchr.m4: Remove file.
108185         * modules/mbsrchr (Files): Remove it and m4/mbrtowc.m4
108186         (configure.ac): Remove gl_FUNC_MBSRCHR invocation.
108188         * m4/mbssep.m4: Remove file.
108189         * modules/mbssep (Files): Remove it and m4/mbrtowc.m4
108190         (configure.ac): Remove gl_FUNC_MBSSEP invocation.
108192         * m4/mbsspn.m4: Remove file.
108193         * modules/mbsspn (Files): Remove it and m4/mbrtowc.m4
108194         (configure.ac): Remove gl_FUNC_MBSSPN invocation.
108196         * m4/mbsstr.m4: Remove file.
108197         * modules/mbsstr (Files): Remove it and m4/mbrtowc.m4
108198         (configure.ac): Remove gl_FUNC_MBSSTR invocation.
108200         * m4/mbstok_r.m4: Remove file.
108201         * modules/mbstok_r (Files): Remove it and m4/mbrtowc.m4
108202         (configure.ac): Remove gl_FUNC_MBSTOK_R invocation.
108204         * m4/mbswidth.m4 (gl_MBSWIDTH): Remove AC_FUNC_MBRTOWC invocation.
108206         * m4/quotearg.m4 (gl_QUOTEARG): Remove mbsinit test and
108207         AC_TYPE_MBSTATE_T, AC_FUNC_MBRTOWC invocations.
108209         * modules/trim (configure.ac): Remove AC_FUNC_MBRTOWC invocation.
108211 2009-03-08  Bruno Haible  <bruno@clisp.org>
108213         Tests for module 'unicase/ulc-casecmp'.
108214         * modules/unicase/ulc-casecmp-tests: New file.
108215         * tests/unicase/test-ulc-casecmp1.sh: New file.
108216         * tests/unicase/test-ulc-casecmp2.sh: New file.
108217         * tests/unicase/test-ulc-casecmp.c: New file.
108219         New module 'unicase/ulc-casecmp'.
108220         * lib/unicase.h (ulc_casecmp): New declaration.
108221         * lib/unicase/ulc-casecmp.c: New file.
108222         * lib/unicase/u-casecmp.h (FUNC): Change argument types to
108223         'const SRC_UNIT *'.
108224         * lib/unicase/u8-casecmp.c (SRC_UNIT): Define like UNIT.
108225         * lib/unicase/u16-casecmp.c (SRC_UNIT): Likewise.
108226         * lib/unicase/u32-casecmp.c (SRC_UNIT): Likewise.
108227         * modules/unicase/ulc-casecmp: New file.
108229         Tests for module 'unicase/u32-is-cased'.
108230         * modules/unicase/u32-is-cased-tests: New file.
108231         * tests/unicase/test-u32-is-cased.c: New file.
108233         Tests for module 'unicase/u16-is-cased'.
108234         * modules/unicase/u16-is-cased-tests: New file.
108235         * tests/unicase/test-u16-is-cased.c: New file.
108237         Tests for module 'unicase/u8-is-cased'.
108238         * modules/unicase/u8-is-cased-tests: New file.
108239         * tests/unicase/test-u8-is-cased.c: New file.
108240         * tests/unicase/test-is-cased.h: New file.
108242         New module 'unicase/u32-is-cased'.
108243         * lib/unicase/u32-is-cased.c: New file.
108244         * modules/unicase/u32-is-cased: New file.
108246         New module 'unicase/u16-is-cased'.
108247         * lib/unicase/u16-is-cased.c: New file.
108248         * modules/unicase/u16-is-cased: New file.
108250         New module 'unicase/u8-is-cased'.
108251         * lib/unicase/u8-is-cased.c: New file.
108252         * lib/unicase/u-is-cased.h: New file.
108253         * modules/unicase/u8-is-cased: New file.
108255         Tests for module 'unicase/u32-is-casefolded'.
108256         * modules/unicase/u32-is-casefolded-tests: New file.
108257         * tests/unicase/test-u32-is-casefolded.c: New file.
108259         Tests for module 'unicase/u16-is-casefolded'.
108260         * modules/unicase/u16-is-casefolded-tests: New file.
108261         * tests/unicase/test-u16-is-casefolded.c: New file.
108263         Tests for module 'unicase/u8-is-casefolded'.
108264         * modules/unicase/u8-is-casefolded-tests: New file.
108265         * tests/unicase/test-u8-is-casefolded.c: New file.
108266         * tests/unicase/test-is-casefolded.h: New file.
108268         New module 'unicase/u32-is-casefolded'.
108269         * lib/unicase/u32-is-casefolded.c: New file.
108270         * modules/unicase/u32-is-casefolded: New file.
108272         New module 'unicase/u16-is-casefolded'.
108273         * lib/unicase/u16-is-casefolded.c: New file.
108274         * modules/unicase/u16-is-casefolded: New file.
108276         New module 'unicase/u8-is-casefolded'.
108277         * lib/unicase/u8-is-casefolded.c: New file.
108278         * modules/unicase/u8-is-casefolded: New file.
108280         Tests for module 'unicase/u32-is-titlecase'.
108281         * modules/unicase/u32-is-titlecase-tests: New file.
108282         * tests/unicase/test-u32-is-titlecase.c: New file.
108284         Tests for module 'unicase/u16-is-titlecase'.
108285         * modules/unicase/u16-is-titlecase-tests: New file.
108286         * tests/unicase/test-u16-is-titlecase.c: New file.
108288         Tests for module 'unicase/u8-is-titlecase'.
108289         * modules/unicase/u8-is-titlecase-tests: New file.
108290         * tests/unicase/test-u8-is-titlecase.c: New file.
108291         * tests/unicase/test-is-titlecase.h: New file.
108293         New module 'unicase/u32-is-titlecase'.
108294         * lib/unicase/u32-is-titlecase.c: New file.
108295         * modules/unicase/u32-is-titlecase: New file.
108297         New module 'unicase/u16-is-titlecase'.
108298         * lib/unicase/u16-is-titlecase.c: New file.
108299         * modules/unicase/u16-is-titlecase: New file.
108301         New module 'unicase/u8-is-titlecase'.
108302         * lib/unicase/u8-is-titlecase.c: New file.
108303         * modules/unicase/u8-is-titlecase: New file.
108305         Tests for module 'unicase/u32-is-lowercase'.
108306         * modules/unicase/u32-is-lowercase-tests: New file.
108307         * tests/unicase/test-u32-is-lowercase.c: New file.
108309         Tests for module 'unicase/u16-is-lowercase'.
108310         * modules/unicase/u16-is-lowercase-tests: New file.
108311         * tests/unicase/test-u16-is-lowercase.c: New file.
108313         Tests for module 'unicase/u8-is-lowercase'.
108314         * modules/unicase/u8-is-lowercase-tests: New file.
108315         * tests/unicase/test-u8-is-lowercase.c: New file.
108316         * tests/unicase/test-is-lowercase.h: New file.
108318         New module 'unicase/u32-is-lowercase'.
108319         * lib/unicase/u32-is-lowercase.c: New file.
108320         * modules/unicase/u32-is-lowercase: New file.
108322         New module 'unicase/u16-is-lowercase'.
108323         * lib/unicase/u16-is-lowercase.c: New file.
108324         * modules/unicase/u16-is-lowercase: New file.
108326         New module 'unicase/u8-is-lowercase'.
108327         * lib/unicase/u8-is-lowercase.c: New file.
108328         * modules/unicase/u8-is-lowercase: New file.
108330         Tests for module 'unicase/u32-is-uppercase'.
108331         * modules/unicase/u32-is-uppercase-tests: New file.
108332         * tests/unicase/test-u32-is-uppercase.c: New file.
108334         Tests for module 'unicase/u16-is-uppercase'.
108335         * modules/unicase/u16-is-uppercase-tests: New file.
108336         * tests/unicase/test-u16-is-uppercase.c: New file.
108338         Tests for module 'unicase/u8-is-uppercase'.
108339         * modules/unicase/u8-is-uppercase-tests: New file.
108340         * tests/unicase/test-u8-is-uppercase.c: New file.
108341         * tests/unicase/test-is-uppercase.h: New file.
108343         New module 'unicase/u32-is-uppercase'.
108344         * lib/unicase/u32-is-uppercase.c: New file.
108345         * modules/unicase/u32-is-uppercase: New file.
108347         New module 'unicase/u16-is-uppercase'.
108348         * lib/unicase/u16-is-uppercase.c: New file.
108349         * modules/unicase/u16-is-uppercase: New file.
108351         New module 'unicase/u8-is-uppercase'.
108352         * lib/unicase/u8-is-uppercase.c: New file.
108353         * modules/unicase/u8-is-uppercase: New file.
108355         New module 'unicase/u32-is-invariant'.
108356         * lib/unicase/u32-is-invariant.c: New file.
108357         * modules/unicase/u32-is-invariant: New file.
108359         New module 'unicase/u16-is-invariant'.
108360         * lib/unicase/u16-is-invariant.c: New file.
108361         * modules/unicase/u16-is-invariant: New file.
108363         New module 'unicase/u8-is-invariant'.
108364         * lib/unicase/u8-is-invariant.c: New file.
108365         * lib/unicase/invariant.h: New file.
108366         * lib/unicase/u-is-invariant.h: New file.
108367         * modules/unicase/u8-is-invariant: New file.
108369         Tests for module 'unicase/u32-casecoll'.
108370         * modules/unicase/u32-casecoll-tests: New file.
108371         * tests/unicase/test-u32-casecoll.c: New file.
108373         Tests for module 'unicase/u16-casecoll'.
108374         * modules/unicase/u16-casecoll-tests: New file.
108375         * tests/unicase/test-u16-casecoll.c: New file.
108377         Tests for module 'unicase/u8-casecoll'.
108378         * modules/unicase/u8-casecoll-tests: New file.
108379         * tests/unicase/test-u8-casecoll.c: New file.
108381         New module 'unicase/u32-casecoll'.
108382         * lib/unicase/u32-casecoll.c: New file.
108383         * modules/unicase/u32-casecoll: New file.
108385         New module 'unicase/u16-casecoll'.
108386         * lib/unicase/u16-casecoll.c: New file.
108387         * modules/unicase/u16-casecoll: New file.
108389         New module 'unicase/u8-casecoll'.
108390         * lib/unicase/u8-casecoll.c: New file.
108391         * lib/unicase/u-casecoll.h: New file.
108392         * modules/unicase/u8-casecoll: New file.
108394         New module 'unicase/u32-casexfrm'.
108395         * lib/unicase/u32-casexfrm.c: New file.
108396         * modules/unicase/u32-casexfrm: New file.
108398         New module 'unicase/u16-casexfrm'.
108399         * lib/unicase/u16-casexfrm.c: New file.
108400         * modules/unicase/u16-casexfrm: New file.
108402         New module 'unicase/u8-casexfrm'.
108403         * lib/unicase/u8-casexfrm.c: New file.
108404         * lib/unicase/u-casexfrm.h: New file.
108405         * modules/unicase/u8-casexfrm: New file.
108407         Tests for module 'unicase/u32-casecmp'.
108408         * modules/unicase/u32-casecmp-tests: New file.
108409         * tests/unicase/test-u32-casecmp.c: New file.
108411         Tests for module 'unicase/u16-casecmp'.
108412         * modules/unicase/u16-casecmp-tests: New file.
108413         * tests/unicase/test-u16-casecmp.c: New file.
108415         Tests for module 'unicase/u8-casecmp'.
108416         * modules/unicase/u8-casecmp-tests: New file.
108417         * tests/unicase/test-u8-casecmp.c: New file.
108418         * tests/unicase/test-casecmp.h: New file.
108420         New module 'unicase/u32-casecmp'.
108421         * lib/unicase/u32-casecmp.c: New file.
108422         * modules/unicase/u32-casecmp: New file.
108424         New module 'unicase/u16-casecmp'.
108425         * lib/unicase/u16-casecmp.c: New file.
108426         * modules/unicase/u16-casecmp: New file.
108428         New module 'unicase/u8-casecmp'.
108429         * lib/unicase/u8-casecmp.c: New file.
108430         * lib/unicase/u-casecmp.h: New file.
108431         * modules/unicase/u8-casecmp: New file.
108433         Tests for module 'unicase/u32-casefold'.
108434         * modules/unicase/u32-casefold-tests: New file.
108435         * tests/unicase/test-u32-casefold.c: New file.
108437         Tests for module 'unicase/u16-casefold'.
108438         * modules/unicase/u16-casefold-tests: New file.
108439         * tests/unicase/test-u16-casefold.c: New file.
108441         Tests for module 'unicase/u8-casefold'.
108442         * modules/unicase/u8-casefold-tests: New file.
108443         * tests/unicase/test-u8-casefold.c: New file.
108445         New module 'unicase/u32-casefold'.
108446         * lib/unicase/u32-casefold.c: New file.
108447         * modules/unicase/u32-casefold: New file.
108449         New module 'unicase/u16-casefold'.
108450         * lib/unicase/u16-casefold.c: New file.
108451         * modules/unicase/u16-casefold: New file.
108453         New module 'unicase/u8-casefold'.
108454         * lib/unicase/u8-casefold.c: New file.
108455         * lib/unicase/u-casefold.h: New file.
108456         * modules/unicase/u8-casefold: New file.
108458         New module 'unicase/tocasefold'.
108459         * lib/unicase/casefold.h: New file.
108460         * lib/unicase/tocasefold.c: New file.
108461         * lib/unicase/tocasefold.h: New file, generated by gen-uni-tables.c.
108462         * modules/unicase/tocasefold: New file.
108464         Tests for module 'unicase/u32-totitle'.
108465         * modules/unicase/u32-totitle-tests: New file.
108466         * tests/unicase/test-u32-totitle.c: New file.
108468         Tests for module 'unicase/u16-totitle'.
108469         * modules/unicase/u16-totitle-tests: New file.
108470         * tests/unicase/test-u16-totitle.c: New file.
108472         Tests for module 'unicase/u8-totitle'.
108473         * modules/unicase/u8-totitle-tests: New file.
108474         * tests/unicase/test-u8-totitle.c: New file.
108476         New module 'unicase/u32-totitle'.
108477         * lib/unicase/u32-totitle.c: New file.
108478         * modules/unicase/u32-totitle: New file.
108480         New module 'unicase/u16-totitle'.
108481         * lib/unicase/u16-totitle.c: New file.
108482         * modules/unicase/u16-totitle: New file.
108484         New module 'unicase/u8-totitle'.
108485         * lib/unicase/u8-totitle.c: New file.
108486         * lib/unicase/u-totitle.h: New file.
108487         * modules/unicase/u8-totitle: New file.
108489         Tests for module 'unicase/u32-tolower'.
108490         * modules/unicase/u32-tolower-tests: New file.
108491         * tests/unicase/test-u32-tolower.c: New file.
108493         Tests for module 'unicase/u16-tolower'.
108494         * modules/unicase/u16-tolower-tests: New file.
108495         * tests/unicase/test-u16-tolower.c: New file.
108497         Tests for module 'unicase/u8-tolower'.
108498         * modules/unicase/u8-tolower-tests: New file.
108499         * tests/unicase/test-u8-tolower.c: New file.
108501         New module 'unicase/u32-tolower'.
108502         * lib/unicase/u32-tolower.c: New file.
108503         * modules/unicase/u32-tolower: New file.
108505         New module 'unicase/u16-tolower'.
108506         * lib/unicase/u16-tolower.c: New file.
108507         * modules/unicase/u16-tolower: New file.
108509         New module 'unicase/u8-tolower'.
108510         * lib/unicase/u8-tolower.c: New file.
108511         * modules/unicase/u8-tolower: New file.
108513         Tests for module 'unicase/u32-toupper'.
108514         * modules/unicase/u32-toupper-tests: New file.
108515         * tests/unicase/test-u32-toupper.c: New file.
108517         Tests for module 'unicase/u16-toupper'.
108518         * modules/unicase/u16-toupper-tests: New file.
108519         * tests/unicase/test-u16-toupper.c: New file.
108521         Tests for module 'unicase/u8-toupper'.
108522         * modules/unicase/u8-toupper-tests: New file.
108523         * tests/unicase/test-u8-toupper.c: New file.
108525         New module 'unicase/u32-toupper'.
108526         * lib/unicase/u32-toupper.c: New file.
108527         * modules/unicase/u32-toupper: New file.
108529         New module 'unicase/u16-toupper'.
108530         * lib/unicase/u16-toupper.c: New file.
108531         * modules/unicase/u16-toupper: New file.
108533         New module 'unicase/u8-toupper'.
108534         * lib/unicase/u8-toupper.c: New file.
108535         * modules/unicase/u8-toupper: New file.
108537         New module 'unicase/u32-casemap'.
108538         * lib/unicase/u32-casemap.c: New file.
108539         * modules/unicase/u32-casemap: New file.
108541         New module 'unicase/u16-casemap'.
108542         * lib/unicase/u16-casemap.c: New file.
108543         * modules/unicase/u16-casemap: New file.
108545         New module 'unicase/u8-casemap'.
108546         * lib/unicase/unicasemap.h: New file.
108547         * lib/unicase/u8-casemap.c: New file.
108548         * lib/unicase/u-casemap.h: New file.
108549         * modules/unicase/u8-casemap: New file.
108551         New module 'unicase/special-casing'.
108552         * lib/unicase/special-casing.h: New file.
108553         * lib/unicase/special-casing.c: New file.
108554         * lib/unicase/special-casing-table.gperf: New file, generated by
108555         gen-uni-tables.c.
108556         * modules/unicase/special-casing: New file.
108558         Tests for module 'unicase/locale-language'.
108559         * modules/unicase/locale-language-tests: New file.
108560         * tests/unicase/test-locale-language.sh: New file.
108561         * tests/unicase/test-locale-language.c: New file.
108563         New module 'unicase/locale-language'.
108564         * lib/unicase/locale-language.c: New file.
108565         * lib/unicase/locale-languages.gperf: New file.
108566         * modules/unicase/locale-language: New file.
108568         Generate more tables for case conversion and case folding.
108569         * lib/gen-uni-tables.c (SCC_*): New enum items.
108570         (struct special_casing_rule): New type.
108571         (casing_rules, num_casing_rules, allocated_casing_rules): New
108572         variables.
108573         (add_casing_rule, fill_casing_rules): New functions.
108574         (struct casefold_rule): New type.
108575         (casefolding_rules, num_casefolding_rules,
108576         allocated_casefolding_rules): New variables.
108577         (fill_casefolding_rules): New function.
108578         (unicode_casefold): New variable.
108579         (to_casefold, redistribute_casefolding_rules, compare_casing_rules,
108580         sort_casing_rules, output_casing_rules): New functions.
108581         (main): Accept to more arguments: SpecialCasing.txt and
108582         CaseFolding.txt. Invoke fill_casing_rules, fill_casefolding_rules,
108583         redistribute_casefolding_rules, sort_casing_rules, output_casing_rules.
108584         Output mapping for casefolding.
108586         * lib/unicase.h: Include stdbool.h, uninorm.h.
108587         (u8_toupper, u16_toupper, u32_toupper, u8_tolower, u16_tolower,
108588         u32_tolower, u8_totitle, u16_totitle, u32_totitle): Add nf argument.
108589         (u8_casefold, u16_casefold, u32_casefold): Add iso639_language and nf
108590         arguments.
108591         (u8_casecmp, u16_casecmp, u32_casecmp): Add iso639_language, nf,
108592         resultp arguments.
108593         (u8_casexfrm, u16_casexfrm, u32_casexfrm): New declarations.
108594         (u8_casecoll, u16_casecoll, u32_casecoll): Add iso639_language, nf,
108595         resultp arguments.
108596         (u8_is_uppercase, u16_is_uppercase, u32_is_uppercase, u8_is_lowercase,
108597         u16_is_lowercase, u32_is_lowercase, u8_is_titlecase, u16_is_titlecase,
108598         u32_is_titlecase, u8_is_casefolded, u16_is_casefolded,
108599         u32_is_casefolded, u8_is_cased, u16_is_cased, u32_is_cased): New
108600         declarations.
108601         * modules/unicase/base (Depends-on): Add uninorm/base, stdbool.
108603 2009-03-08  Bruno Haible  <bruno@clisp.org>
108605         * lib/uninorm.h (u8_normcmp, u16_normcmp, u32_normcmp, u8_normcoll,
108606         u16_normcoll, u32_normcoll): Rename argument 'result' to 'resultp'.
108607         * lib/uninorm/u-normcmp.h (FUNC): Likewise.
108608         * lib/uninorm/u-normcoll.h (FUNC): Likewise.
108610 2009-03-07  Bruno Haible  <bruno@clisp.org>
108612         Adjust u*_normcmp, u*_normcoll API.
108613         * lib/uninorm.h (u8_normcmp, u16_normcmp, u32_normcmp, u8_normcoll,
108614         u16_normcoll, u32_normcoll): Change failure conventions.
108615         * lib/uninorm/u-normcmp.h (FUNC): Upon failure, store the error code in
108616         errno and return -1.
108617         * lib/uninorm/u-normcoll.h (FUNC): Likewise.
108619 2009-03-07  Bruno Haible  <bruno@clisp.org>
108621         Tests for module 'uninorm/u32-normcoll'.
108622         * modules/uninorm/u32-normcoll-tests: New file.
108623         * tests/uninorm/test-u32-normcoll.c: New file.
108625         Tests for module 'uninorm/u16-normcoll'.
108626         * modules/uninorm/u16-normcoll-tests: New file.
108627         * tests/uninorm/test-u16-normcoll.c: New file.
108629         Tests for module 'uninorm/u8-normcoll'.
108630         * modules/uninorm/u8-normcoll-tests: New file.
108631         * tests/uninorm/test-u8-normcoll.c: New file.
108633 2009-03-07  Bruno Haible  <bruno@clisp.org>
108635         * tests/uninorm/test-u32-normcmp.h: New file, extracted from
108636         tests/uninorm/test-u32-normcmp.c.
108637         * tests/uninorm/test-u32-normcmp.c: Include it.
108638         (test_nonascii): New function, extracted from main. Add some more
108639         tests.
108640         (main): Invoke test_ascii and test_nonascii.
108641         * modules/uninorm/u32-normcmp-tests (Files): Add
108642         tests/uninorm/test-u32-normcmp.h.
108643         (Depends-on): Remove uninorm/u32-normcmp.
108645         * tests/uninorm/test-u16-normcmp.h: New file, extracted from
108646         tests/uninorm/test-u16-normcmp.c.
108647         * tests/uninorm/test-u16-normcmp.c: Include it.
108648         (test_nonascii): New function, extracted from main. Add some more
108649         tests.
108650         (main): Invoke test_ascii and test_nonascii.
108651         * modules/uninorm/u16-normcmp-tests (Files): Add
108652         tests/uninorm/test-u16-normcmp.h.
108653         (Depends-on): Remove uninorm/u16-normcmp.
108655         * tests/uninorm/test-u8-normcmp.h: New file, extracted from
108656         tests/uninorm/test-u8-normcmp.c.
108657         * tests/uninorm/test-u8-normcmp.c: Include it.
108658         (test_nonascii): New function, extracted from main. Add some more
108659         tests.
108660         (main): Invoke test_ascii and test_nonascii.
108661         * modules/uninorm/u8-normcmp-tests (Files): Add
108662         tests/uninorm/test-u8-normcmp.h.
108663         (Depends-on): Remove uninorm/u8-normcmp.
108665 2009-03-07  Bruno Haible  <bruno@clisp.org>
108667         New module 'uninorm/u32-normcoll'.
108668         * lib/uninorm/u32-normcoll.c: New file.
108669         * modules/uninorm/u32-normcoll: New file.
108671         New module 'uninorm/u16-normcoll'.
108672         * lib/uninorm/u16-normcoll.c: New file.
108673         * modules/uninorm/u16-normcoll: New file.
108675         New module 'uninorm/u8-normcoll'.
108676         * lib/uninorm.h (u8_normcoll, u16_normcoll, u32_normcoll): New
108677         declarations.
108678         * lib/uninorm/u8-normcoll.c: New file.
108679         * lib/uninorm/u-normcoll.h: New file.
108680         * modules/uninorm/u8-normcoll: New file.
108682         New module 'uninorm/u32-normxfrm'.
108683         * lib/uninorm/u32-normxfrm.c: New file.
108684         * modules/uninorm/u32-normxfrm: New file.
108686         New module 'uninorm/u16-normxfrm'.
108687         * lib/uninorm/u16-normxfrm.c: New file.
108688         * modules/uninorm/u16-normxfrm: New file.
108690         New module 'uninorm/u8-normxfrm'.
108691         * lib/uninorm.h (u8_normxfrm, u16_normxfrm, u32_normxfrm): New
108692         declarations.
108693         * lib/uninorm/u8-normxfrm.c: New file.
108694         * lib/uninorm/u-normxfrm.h: New file.
108695         * modules/uninorm/u8-normxfrm: New file.
108697 2009-03-07  Bruno Haible  <bruno@clisp.org>
108699         * modules/uninorm/u8-normcmp (Depends-on): Add uninorm/base.
108700         * modules/uninorm/u16-normcmp (Depends-on): Likewise.
108701         * modules/uninorm/u32-normcmp (Depends-on): Likewise.
108703 2009-03-07  Bruno Haible  <bruno@clisp.org>
108705         New module 'memxfrm'.
108706         * lib/memxfrm.h: New file.
108707         * lib/memxfrm.c: New file.
108708         * modules/memxfrm: New file.
108710 2009-03-07  Bruno Haible  <bruno@clisp.org>
108712         New module 'memcmp2'.
108713         * lib/memcmp2.h: New file.
108714         * lib/memcmp2.c: New file.
108715         * modules/memcmp2: New file.
108717 2009-03-07  Bruno Haible  <bruno@clisp.org>
108719         Tests for module 'uninorm/decomposing-form'.
108720         * modules/uninorm/decomposing-form-tests: New file.
108721         * tests/uninorm/test-decomposing-form.c: New file.
108723         New module 'uninorm/decomposing-form'.
108724         * lib/uninorm.h (uninorm_decomposing_form): New declaration.
108725         * lib/uninorm/normalize-internal.h (struct unicode_normalization_form):
108726         Add 'decomposing_variant' field.
108727         * lib/uninorm/decomposing-form.c: New file.
108728         * lib/uninorm/nfc.c (uninorm_nfc): Update.
108729         * lib/uninorm/nfd.c (uninorm_nfd): Update.
108730         * lib/uninorm/nfkc.c (uninorm_nfkc): Update.
108731         * lib/uninorm/nfkd.c (uninorm_nfkd): Update.
108732         * modules/uninorm/decomposing-form: New file.
108733         * modules/uninorm/nfc (Depends-on): Add uninorm/nfd.
108734         * modules/uninorm/nfkc (Depends-on): Add uninorm/nfkd.
108736 2009-03-07  Bruno Haible  <bruno@clisp.org>
108738         * lib/uninorm/u-normcmp.h (FUNC): Use stack=allocated buffers for small
108739         strings.
108741 2009-03-06  Bruno Haible  <bruno@clisp.org>
108743         Tests for module 'uninorm/u32-normcmp'.
108744         * tests/uninorm/test-u32-normcmp.c: New file.
108745         * modules/uninorm/u32-normcmp-tests: New file.
108747         Tests for module 'uninorm/u16-normcmp'.
108748         * tests/uninorm/test-u16-normcmp.c: New file.
108749         * modules/uninorm/u16-normcmp-tests: New file.
108751         Tests for module 'uninorm/u8-normcmp'.
108752         * tests/uninorm/test-u8-normcmp.c: New file.
108753         * modules/uninorm/u8-normcmp-tests: New file.
108755         New module 'uninorm/u32-normcmp'.
108756         * lib/uninorm/u32-normcmp.c: New file.
108757         * modules/uninorm/u32-normcmp: New file.
108759         New module 'uninorm/u16-normcmp'.
108760         * lib/uninorm/u16-normcmp.c: New file.
108761         * modules/uninorm/u16-normcmp: New file.
108763         New module 'uninorm/u8-normcmp'.
108764         * lib/uninorm.h (u8_normcmp, u16_normcmp, u32_normcmp): New
108765         declarations.
108766         * lib/uninorm/u8-normcmp.c: New file.
108767         * lib/uninorm/u-normcmp.h: New file.
108768         * modules/uninorm/u8-normcmp: New file.
108770 2009-03-06  Bruno Haible  <bruno@clisp.org>
108772         * lib/w32spawn.h (dup_noinherit): Add cast, to avoid gcc warning.
108773         Reported by Eric Blake.
108775 2009-03-06  Eric Blake  <ebb9@byu.net>
108776             Bruno Haible  <bruno@clisp.org>
108778         * lib/spawni.c (__spawni) [WIN32_NATIVE]: Define as a stub.
108779         * modules/posix_spawn-tests (configure.ac): Define POSIX_SPAWN_PORTED
108780         condition.
108781         (Makefile.am): Do nothing if POSIX_SPAWN_PORTED is false.
108782         * modules/posix_spawnp-tests (configure.ac): Define POSIX_SPAWN_PORTED
108783         condition.
108784         (Makefile.am): Do nothing if POSIX_SPAWN_PORTED is false.
108786 2009-03-06  Eric Blake  <ebb9@byu.net>
108788         * lib/execute.c (execute) [WIN32_NATIVE]: Cast arguments of spawnvpe,
108789         to avoid compiler warnings.
108790         * lib/pipe.c (create_pipe) [WIN32_NATIVE]: Likewise.
108792 2009-03-05  Bruno Haible  <bruno@clisp.org>
108794         * tests/test-ftell.c (main): Disable test beyond end of file on
108795         FreeMiNT.
108796         Patch by Alan Hourihane <alanh@fairlite.co.uk>.
108798 2009-03-05  Kamil Dudka  <kdudka@redhat.com>
108800         * lib/filevercmp.c: Move hidden files up in ordering.
108801         * tests/test-filevercmp.c: Add tests for hidden files.
108803 2009-03-04  Bruno Haible  <bruno@clisp.org>
108805         * modules/visibility (Makefile.am): Augment AM_CFLAGS.
108806         * gnulib-tool (func_emit_lib_Makefile_am): Emit initialization of
108807         AM_CFLAGS.
108808         Reported by Simon Josefsson.
108810 2009-03-03  Bruno Haible  <bruno@clisp.org>
108812         * doc/visibility.texi: Recommend to use HAVE_VISIBILITY as a C macro.
108813         Reported by Simon Josefsson.
108815         * doc/ld-version-script.texi: Update node reference.
108817 2009-03-03  Bruno Haible  <bruno@clisp.org>
108819         * modules/visibility (License): Change to 'unlimited'.
108820         Suggested by Simon Josefsson.
108822 2009-03-03  Jim Meyering  <meyering@redhat.com>
108824         unlinkdir: cannot_unlink_dir may modify process state
108825         * lib/unlinkdir.c (cannot_unlink_dir): Add a comment warning that
108826         it's neither thread-safe nor appropriate for use in a library.
108828 2009-03-03  Eric Blake  <ebb9@byu.net>
108830         test-closein: silence test under Darwin
108831         * tests/test-closein.sh: Ignore stderr from cat, since we don't
108832         care if it dies from EPIPE or EBADF.
108834 2009-03-03  Bruno Haible  <bruno@clisp.org>
108836         * doc/gnulib.texi: Include visibility.texi and ld-version-script.texi
108837         earlier.
108838         * doc/visibility.texi: Fix @node and @section.
108840 2009-03-03  Simon Josefsson  <simon@josefsson.org>
108842         * doc/gnulib.texi: Link to sections for ld version script and
108843         visibility.
108844         * doc/visibility.texi: Add @node and @section.
108845         * modules/ld-version-script: New module.
108846         * m4/ld-version-script.m4: New file.
108847         * doc/ld-version-script.texi: New file.
108849 2009-03-02  David Lutterkort  <lutter@redhat.com>
108851         * lib/safe-alloc.h (__GNUC_PREREQ): New macro.
108852         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
108854 2009-03-02  Bruno Haible  <bruno@clisp.org>
108856         * doc/visibility.texi: Mention libtool's -export-symbols option.
108858 2009-03-02  Jim Meyering  <meyering@redhat.com>
108860         announce-gen: new option: --no-print-checksums
108861         * build-aux/announce-gen (usage): Describe it.
108862         (print_checksums): Print a newline here, not in the [*] footnote.
108863         (main): Honor it.
108865 2009-03-01  Bruno Haible  <bruno@clisp.org>
108867         Use socklen_t in the native Windows replacements prototypes.
108868         * lib/sys_socket.in.h (rpl_getsockopt, rpl_setsockopt): Use socklen_t
108869         instead of 'int'.
108870         * lib/getsockopt.c (rpl_getsockopt): Likewise.
108871         * lib/setsockopt.c (rpl_setsockopt): Likewise.
108872         * modules/getsockopt (Depends-on): Add socklen.
108873         * modules/setsockopt (Depends-on): Add socklen.
108875 2009-03-01  Bruno Haible  <bruno@clisp.org>
108877         * gnulib-tool (sed): Do alias as "sed --posix" if sed's version is at
108878         least 4.2.
108880 2009-03-01  Eric Blake  <ebb9@byu.net>
108881             Bruno Haible  <bruno@clisp.org>
108883         * lib/wait-process.h (wait_subprocess): Describe effect of termsigp on
108884         error messages.
108885         * lib/wait-process.c (wait_subprocess): Omit error message about
108886         deadly signal sent to the child of termsigp != NULL.
108888 2009-03-01  Eric Blake  <ebb9@byu.net>
108890         * lib/wait-process.c (wait_subprocess): Remove unnecessary cast.
108892 2009-03-01  Bruno Haible  <bruno@clisp.org>
108894         Avoid a gcc warning.
108895         * tests/test-sched.c (b): Make global.
108896         Reported by Eric Blake.
108898 2009-01-19  Martin Lambers  <marlam@marlam.de>
108900         Provide POSIX semantics for socket timeout options on W32.
108901         * lib/setsockopt.c: Convert struct timeval to milliseconds on W32.
108902         * lib/getsockopt.c: Convert milliseconds to struct timeval on W32.
108903         * modules/setsockopt: Depend on sys_time module for struct timeval.
108904         * modules/getsockopt: Depend on sys_time module for struct timeval.
108906 2009-03-01  Simon Josefsson  <simon@josefsson.org>
108908         * lib/gai_strerror.c (values): Use EAI_INPROGRESS instead of
108909         __USE_GNU, for consistency with netdb.in.h.
108910         Reported by Alan Hourihane <alanh@fairlite.co.uk>.
108912 2009-03-01  Bruno Haible  <bruno@clisp.org>
108914         More support for FreeMiNT.
108915         * lib/fseeko.c (rpl_fseeko): Complete last commit.
108916         Reported by Alan Hourihane <alanh@fairlite.co.uk>.
108918 2009-03-01  Bruno Haible  <bruno@clisp.org>
108920         More support for FreeMiNT.
108921         * lib/fpurge.c (fpurge): Correct last commit.
108922         Reported by Alan Hourihane <alanh@fairlite.co.uk>.
108924 2009-03-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
108926         Fix unportable awk script in vc-list-files.
108927         * build-aux/vc-list-files: In the replacement awk script, use
108928         substr with a second argument of 1, not zero.
108929         Report by Simon Josefsson.
108931 2009-02-28  Bruno Haible  <bruno@clisp.org>
108933         More support for FreeMiNT.
108934         * lib/freading.c (freading) [__MINT__]: Use new macros that were added
108935         to FreeMiNT today.
108936         * lib/fwriting.c (fwriting): Likewise.
108937         Based on patch by Alan Hourihane <alanh@fairlite.co.uk>.
108939 2009-02-28  Bruno Haible  <bruno@clisp.org>
108941         * tests/test-freadseek.c (main): Disable test beyond end of file on
108942         FreeMiNT.
108943         * tests/test-ftello.c (main): Likewise.
108944         Patch by Alan Hourihane <alanh@fairlite.co.uk>.
108946 2009-02-28  Bruno Haible  <bruno@clisp.org>
108948         Add tentative support for FreeMiNT.
108949         * lib/fbufmode.c (fbufmode) [__MINT__]: Add conditional code.
108950         * lib/fpurge.c (fpurge): Likewise.
108951         * lib/freadable.c (freadable): Likewise.
108952         * lib/freading.c (freading): Likewise.
108953         * lib/freadptr.c (freadptr): Likewise.
108954         * lib/freadseek.c (freadptrinc): Likewise.
108955         * lib/fseeko.c (rpl_fseeko): Likewise.
108956         * lib/fseterr.c (fseterr): Likewise.
108957         * lib/fwritable.c (fwritable): Likewise.
108958         * lib/fwriting.c (fwriting): Likewise.
108959         * lib/freadahead.c (freadahead): Likewise, based on code by Alan
108960         Hourihane.
108961         Reported by Alan Hourihane <alanh@fairlite.co.uk>.
108963 2009-02-28  Bruno Haible  <bruno@clisp.org>
108965         * lib/wait-process.h (wait_subprocess): Clarify restriction regarding
108966         SIGCHLD.
108967         Reported by Jim Meyering.
108969 2009-02-28  Bruno Haible  <bruno@clisp.org>
108971         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LS): Separate the two first tests.
108972         Mention the results of these tests on various platforms.
108973         * doc/posix-functions/fprintf.texi: Mention platforms in canonical
108974         order.
108975         * doc/posix-functions/printf.texi: Likewise.
108976         * doc/posix-functions/snprintf.texi: Likewise.
108977         * doc/posix-functions/sprintf.texi: Likewise.
108978         * doc/posix-functions/vfprintf.texi: Likewise.
108979         * doc/posix-functions/vprintf.texi: Likewise.
108980         * doc/posix-functions/vsnprintf.texi: Likewise.
108981         * doc/posix-functions/vsprintf.texi: Likewise.
108982         * doc/glibc-functions/obstack_printf.texi: Likewise.
108983         * doc/glibc-functions/obstack_vprintf.texi: Likewise.
108985 2009-02-28  Bruno Haible  <bruno@clisp.org>
108987         * build-aux/po/Makefile.in.in: Update from GNU gettext 0.17.
108988         Reported by Loïc Minier <lool@dooz.org>.
108990 2009-02-27  Bruno Haible  <bruno@clisp.org>
108992         * gnulib-tool (func_import): Make the sed expression used to create the
108993         sed script for updating the .gitignore file POSIX compliant.
108994         Reported by Eric Blake.
108996 2009-02-27  Bruno Haible  <bruno@clisp.org>
108998         * gnulib-tool (sed): Don't alias as "sed --posix".
108999         Reported by Eric Blake.
109001 2009-02-27  Bruno Haible  <bruno@clisp.org>
109003         Avoid test link errors.
109004         * modules/uninorm/nfc-tests (test_u32_nfc_big_LDADD): New variable.
109005         * modules/uninorm/nfd-tests (test_u32_nfd_big_LDADD): New variable.
109006         * modules/uninorm/nfkc-tests (test_u32_nfkc_big_LDADD): New variable.
109007         * modules/uninorm/nfkd-tests (test_u32_nfkd_big_LDADD): New variable.
109008         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
109010 2009-02-27  Bruno Haible  <bruno@clisp.org>
109012         Avoid spurious "(cached)" in configure output.
109013         * m4/gnulib-common.m4 (gl_CACHE_VAL_SILENT): New macro.
109014         * m4/ceil.m4 (gl_FUNC_CEIL_LIBS): Use it instead of AC_CACHE_VAL.
109015         * m4/ceilf.m4 (gl_FUNC_CEILF_LIBS): Likewise.
109016         * m4/ceill.m4 (gl_FUNC_CEILL_LIBS): Likewise.
109017         * m4/floor.m4 (gl_FUNC_FLOOR_LIBS): Likewise.
109018         * m4/floorf.m4 (gl_FUNC_FLOORF_LIBS): Likewise.
109019         * m4/floorl.m4 (gl_FUNC_FLOORL_LIBS): Likewise.
109020         * m4/stdarg.m4 (gl_STDARG_H): Likewise.
109021         Reported by Eric Blake.
109023 2009-02-27  Eric Blake  <ebb9@byu.net>
109025         printf: fix regression in previous patch
109026         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LS): Fix compilation error.
109028 2009-02-27  Bruno Haible  <bruno@clisp.org>
109030         * lib/inttypes.in.h: Test merely whether _LP64 is defined, not its
109031         value.
109032         * lib/stdint.in.h: Likewise.
109033         Suggested by Eric Blake. Reported by Peter Bray <pdb_ml@yahoo.com.au>.
109035 2009-02-27  Eric Blake  <ebb9@byu.net>
109037         doc: mention more functions added in cygwin 1.7.0
109038         * doc/posix-functions/mbsnrtowcs.texi: Mention recent cygwin 1.7.0
109039         addition.
109040         * doc/posix-functions/open_wmemstream.texi: Likewise.
109041         * doc/posix-functions/wcsnlen.texi: Likewise.
109042         * doc/posix-functions/wcsnrtombs.texi: Likewise.
109043         * doc/posix-functions/wcstod.texi: Likewise.
109044         * doc/posix-functions/wcstof.texi: Likewise.
109045         * doc/posix-functions/wcstoimax.texi: Likewise.
109046         * doc/posix-functions/wcstok.texi: Likewise.
109047         * doc/posix-functions/wcstoumax.texi: Likewise.
109049         Detect bug in cygwin 1.5.x *printf on 1-character %ls.
109050         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LS): Enhance filter.
109051         * doc/posix-functions/fprintf.texi: Update.
109052         * doc/posix-functions/printf.texi: Update.
109053         * doc/posix-functions/snprintf.texi: Update.
109054         * doc/posix-functions/sprintf.texi: Update.
109055         * doc/posix-functions/vfprintf.texi: Update.
109056         * doc/posix-functions/vprintf.texi: Update.
109057         * doc/posix-functions/vsnprintf.texi: Update.
109058         * doc/posix-functions/vsprintf.texi: Update.
109059         * doc/glibc-functions/obstack_printf.texi: Update.
109060         * doc/glibc-functions/obstack_vprintf.texi: Update.
109062 2009-02-26  Eric Blake  <ebb9@byu.net>
109064         avoid gcc 3.4.3 bug on long double NaN on Irix 6.5
109065         * tests/nan.h (NaNl): Rewrite as function on Irix, to avoid
109066         compilation bug by using runtime conversion.
109067         * m4/isfinite.m4 (gl_ISFINITE): Likewise.
109068         * m4/isnanl.m4 (gl_FUNC_ISNANL): Likewise.
109069         * modules/ceill-tests (Files): Use nan.h.
109070         * modules/floorl-tests (Files): Likewise.
109071         * modules/frexpl-tests (Files): Likewise.
109072         * modules/isnanl-tests (Files): Likewise.
109073         * modules/ldexpl-tests (Files): Likewise.
109074         * modules/roundl-tests (Files): Likewise.
109075         * modules/truncl-tests (Files): Likewise.
109076         * tests/test-ceill.c (main): Use a working NaN.
109077         * tests/test-floorl.c (main): Likewise.
109078         * tests/test-frexpl.c (main): Likewise.
109079         * tests/test-isnan.c (test_long_double): Likewise.
109080         * tests/test-isnanl.h (main): Likewise.
109081         * tests/test-ldexpl.h (main): Likewise.
109082         * tests/test-roundl.h (main): Likewise.
109083         * tests/test-truncl.h (main): Likewise.
109084         See http://lists.gnu.org/r/bug-gnulib/2009-02/msg00190.html.
109086 2009-02-26  Eric Blake  <ebb9@byu.net>
109087             Bruno Haible  <bruno@clisp.org>
109089         Work around a *printf bug with %ls on Solaris.
109090         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LS): Also test whether, when a
109091         precision is specified, sprintf stops converting the wide string
109092         argument when the number of bytes that have been produced by this
109093         conversion equals or exceeds the precision.
109094         * doc/posix-functions/fprintf.texi: Update.
109095         * doc/posix-functions/printf.texi: Update.
109096         * doc/posix-functions/snprintf.texi: Update.
109097         * doc/posix-functions/sprintf.texi: Update.
109098         * doc/posix-functions/vfprintf.texi: Update.
109099         * doc/posix-functions/vprintf.texi: Update.
109100         * doc/posix-functions/vsnprintf.texi: Update.
109101         * doc/posix-functions/vsprintf.texi: Update.
109102         * doc/glibc-functions/obstack_printf.texi: Update.
109103         * doc/glibc-functions/obstack_vprintf.texi: Update.
109105 2009-02-26  Eric Blake  <ebb9@byu.net>
109107         stdlib: favor compiler check of random.h
109108         * m4/stdlib_h.m4 (gl_STDLIB_H): Skip preprocessor check.  Needed
109109         to avoid an ObjC random.h installed by Swarm.
109111 2009-02-26  Bruno Haible  <bruno@clisp.org>
109113         Work around *printf bug with %g directive and 0.0 on HP-UX 10.20.
109114         * m4/printf.m4 (gl_PRINTF_INFINITE): Also test for %g output of -0.0.
109115         Reported by Gary V. Vaughan <gary@gnu.org>.
109117 2009-02-26  Bruno Haible  <bruno@clisp.org>
109119         Fix *printf behaviour regarding the %ls directive.
109120         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LS): New macro.
109121         * lib/vasnprintf.c (local_wcslen, VASNPRINTF): Handle
109122         NEED_PRINTF_DIRECTIVE_LS.
109123         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_LS): New macro.
109124         (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): Invoke it.
109125         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
109126         gl_PREREQ_VASNPRINTF_DIRECTIVE_LS and test its result. Invoke
109127         gl_PREREQ_VASNPRINTF_DIRECTIVE_LS.
109128         * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_POSIX): Likewise.
109129         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_POSIX): Likewise.
109130         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
109131         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
109132         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
109133         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
109134         * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_POSIX): Likewise.
109135         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
109136         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
109137         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
109138         * doc/posix-functions/fprintf.texi: Update.
109139         * doc/posix-functions/printf.texi: Update.
109140         * doc/posix-functions/snprintf.texi: Update.
109141         * doc/posix-functions/sprintf.texi: Update.
109142         * doc/posix-functions/vfprintf.texi: Update.
109143         * doc/posix-functions/vprintf.texi: Update.
109144         * doc/posix-functions/vsnprintf.texi: Update.
109145         * doc/posix-functions/vsprintf.texi: Update.
109146         * doc/glibc-functions/obstack_printf.texi: Update.
109147         * doc/glibc-functions/obstack_vprintf.texi: Update.
109148         Reported by Eric Blake.
109150 2009-02-25  Bruno Haible  <bruno@clisp.org>
109152         * m4/mbrtowc.m4 (gl_MBRTOWC_NUL_RETVAL): Update guess for Solaris 8
109153         with known value.
109154         Reported by Gary V. Vaughan <gary@gnu.org>.
109156 2009-02-25  Bruno Haible  <bruno@clisp.org>
109158         Work around mbrtowc bug in zh_CN.GB18030 locale on Solaris 8.
109159         * m4/mbrtowc.m4 (gl_MBRTOWC_SANITYCHECK): New macro.
109160         (gl_MBSTATE_T_BROKEN): Invoke it. Replace mbstate_t when it says "no".
109161         * doc/posix-functions/mbrtowc.texi: Document the Solaris 8 bug.
109162         Reported by Gary V. Vaughan <gary@gnu.org>.
109164 2009-02-25  Bruno Haible  <bruno@clisp.org>
109166         Work around broken INT8_MAX, UINT8_MAX etc. values on HP-UX 11.23.
109167         * m4/stdint.m4 (gl_STDINT_H): Also check whether the expansions of
109168         INT8_MAX, UINT8_MAX etc. contain casts to elementary types.
109169         * doc/posix-headers/stdint.texi: Mention the HP-UX bug.
109170         Reported by Gary V. Vaughan <gary@gnu.org>.
109172 2009-02-25  Eric Blake  <ebb9@byu.net>
109174         tests: skip fseek/ftell tests if ungetc is broken
109175         * m4/ungetc.m4: New file.
109176         * modules/fseek-tests: Split test, so ungetc dependency is
109177         separate from rest of test.
109178         * modules/fseeko-tests: Likewise.
109179         * modules/ftell-tests: Likewise.
109180         * modules/ftello-tests: Likewise.
109181         * tests/test-fseek.c (main): Isolate ungetc dependency.
109182         * tests/test-fseeko.c (main): Likewise.
109183         * tests/test-ftell.c (main): Likewise.
109184         * tests/test-ftello.c (main): Likewise.
109185         * tests/test-fseek2.sh: New file.
109186         * tests/test-fseeko2.sh: Likewise.
109187         * tests/test-ftell2.sh: Likewise.
109188         * tests/test-ftello2.sh: Likewise.
109190 2009-02-25  Ondřej Vašík  <ovasik@redhat.com>
109192         test-getaddrinfo: fix usage of skip return code 77
109193         * tests/test-gettaddrinfo.c: Return skip code 77 only
109194         for first occurrence of skip (4x77 is not 77)
109196 2009-02-25  Gary V. Vaughan  <gary@gnu.org>
109198         strtod: avoid C99 decl-after-statement
109199         * m4/strtod.m4 (gl_FUNC_STRTOD): Rearrange declaration.
109201 2009-02-24  Eric Blake  <ebb9@byu.net>
109203         strtod: detect HP-UX 11.31 bug
109204         * m4/strtod.m4 (gl_FUNC_STRTOD): Detect errno handling bug.
109205         Reported by Gary V. Vaughan.
109207 2009-02-23  Bruno Haible  <bruno@clisp.org>
109209         Fix invalid read past end of memory block.
109210         * lib/vasnprintf.c (DCHAR_SET): Define.
109211         (local_wcslen): Define only when needed.
109212         (local_strnlen, local_wcsnlen): New functions.
109213         (VASNPRINTF) [!USE_SNPRINTF && HAVE_WCHAR_T]: Implement the %s and %ls
109214         directives that involve a conversion ourselves.
109215         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for strnlen,
109216         wcsnlen, mbrtowc, wcrtomb.
109217         * tests/test-vasnprintf-posix.c (test_function): Add tests for %.*s.
109218         * tests/test-vasprintf-posix.c (test_function): Likewise.
109219         * tests/test-snprintf-posix.h (test_function): Likewise.
109220         * tests/test-sprintf-posix.h (test_function): Likewise.
109221         Reported by Ben Pfaff <blp@cs.stanford.edu>.
109223 2009-02-22  Bruno Haible  <bruno@clisp.org>
109225         Implement new clarified decomposition of Hangul syllables.
109226         * lib/uninorm/decomposition.c (uc_decomposition): For Hangul syllables
109227         of type LTV, return only a pairwise decomposition.
109228         * lib/uninorm/canonical-decomposition.c (uc_canonical_decomposition):
109229         Likewise.
109230         * tests/uninorm/test-decomposition.c (main): Updated expected result.
109231         * tests/uninorm/test-canonical-decomposition.c (main): Likewise.
109232         * tests/uninorm/test-compat-decomposition.c (main): Likewise.
109234 2009-02-22  Bruno Haible  <bruno@clisp.org>
109236         * lib/uninorm/u-normalize-internal.h (FUNC): At the end, handle
109237         zero-length results and shrink excess allocated memory.
109238         * tests/uninorm/test-u8-nfc.c (test_u8_nfc): Check empty string result.
109239         * tests/uninorm/test-u8-nfd.c (test_u8_nfd): Likewise.
109240         * tests/uninorm/test-u8-nfkc.c (test_u8_nfkc): Likewise.
109241         * tests/uninorm/test-u8-nfkd.c (test_u8_nfkd): Likewise.
109242         * tests/uninorm/test-u16-nfc.c (test_u16_nfc): Likewise.
109243         * tests/uninorm/test-u16-nfd.c (test_u16_nfd): Likewise.
109244         * tests/uninorm/test-u16-nfkc.c (test_u16_nfkc): Likewise.
109245         * tests/uninorm/test-u16-nfkd.c (test_u16_nfkd): Likewise.
109246         * tests/uninorm/test-u32-nfc.c (test_u32_nfc): Likewise.
109247         * tests/uninorm/test-u32-nfd.c (test_u32_nfd): Likewise.
109248         * tests/uninorm/test-u32-nfkc.c (test_u32_nfkc): Likewise.
109249         * tests/uninorm/test-u32-nfkd.c (test_u32_nfkd): Likewise.
109251 2009-02-21  Bruno Haible  <bruno@clisp.org>
109253         * doc/gnulib.texi: Include safe-alloc.texi earlier.
109254         * doc/safe-alloc.texi: Terminate sentences with a period. Use two
109255         spaces after a period. Put a space between a macro name and its
109256         argument list. Trivial rewordings.
109257         * lib/safe-alloc.c: Include safe-alloc.h right after config.h.
109258         * tests/test-safe-alloc.c: Likewise. Include stdlib.h.
109259         (main): Return 0 explicitly.
109261 2009-02-21  Bruno Haible  <bruno@clisp.org>
109263         Tests for module 'uninorm/filter'.
109264         * tests/uninorm/test-uninorm-filter-nfc.c: New file.
109265         * modules/uninorm/filter-tests: New file.
109267         New module 'uninorm/filter'.
109268         * lib/uninorm.h (uninorm_filter_create, uninorm_filter_write,
109269         uninorm_filter_flush, uninorm_filter_free): New declarations.
109270         * lib/uninorm/uninorm-filter.c: New file.
109271         * modules/uninorm/filter: New file.
109273 2009-02-21  Bruno Haible  <bruno@clisp.org>
109275         Tests for module 'uninorm/nfkc'.
109276         * tests/uninorm/test-nfkc.c: New file.
109277         * tests/uninorm/test-u8-nfkc.c: New file.
109278         * tests/uninorm/test-u16-nfkc.c: New file.
109279         * tests/uninorm/test-u32-nfkc.c: New file.
109280         * tests/uninorm/test-u32-nfkc-big.sh: New file.
109281         * tests/uninorm/test-u32-nfkc-big.c: New file.
109282         * modules/uninorm/nfkc-tests: New file.
109284         New module 'uninorm/nfkc'.
109285         * lib/uninorm/nfkc.c: New file.
109286         * modules/uninorm/nfkc: New file.
109288         Tests for module 'uninorm/nfkd'.
109289         * tests/uninorm/test-nfkd.c: New file.
109290         * tests/uninorm/test-u8-nfkd.c: New file.
109291         * tests/uninorm/test-u16-nfkd.c: New file.
109292         * tests/uninorm/test-u32-nfkd.c: New file.
109293         * tests/uninorm/test-u32-nfkd-big.sh: New file.
109294         * tests/uninorm/test-u32-nfkd-big.c: New file.
109295         * modules/uninorm/nfkd-tests: New file.
109297         New module 'uninorm/nfkd'.
109298         * lib/uninorm/nfkd.c: New file.
109299         * modules/uninorm/nfkd: New file.
109301         Tests for module 'uninorm/nfc'.
109302         * tests/uninorm/test-nfc.c: New file.
109303         * tests/uninorm/test-u8-nfc.c: New file.
109304         * tests/uninorm/test-u16-nfc.c: New file.
109305         * tests/uninorm/test-u32-nfc.c: New file.
109306         * tests/uninorm/test-u32-nfc-big.sh: New file.
109307         * tests/uninorm/test-u32-nfc-big.c: New file.
109308         * modules/uninorm/nfc-tests: New file.
109310         New module 'uninorm/nfc'.
109311         * lib/uninorm/nfc.c: New file.
109312         * modules/uninorm/nfc: New file.
109314         Tests for module 'uninorm/nfd'.
109315         * tests/uninorm/test-nfd.c: New file.
109316         * tests/uninorm/test-u8-nfd.c: New file.
109317         * tests/uninorm/test-u16-nfd.c: New file.
109318         * tests/uninorm/test-u32-nfd.c: New file.
109319         * tests/uninorm/test-u32-nfd-big.sh: New file.
109320         * tests/uninorm/test-u32-nfd-big.c: New file.
109321         * tests/uninorm/test-u32-normalize-big.h: New file.
109322         * tests/uninorm/test-u32-normalize-big.c: New file.
109323         * tests/uninorm/NormalizationTest.txt: New file, created from
109324         Unicode 5.1.0 NormalizationTest.txt.
109325         * modules/uninorm/nfd-tests: New file.
109327         New module 'uninorm/nfd'.
109328         * lib/uninorm/nfd.c: New file.
109329         * modules/uninorm/nfd: New file.
109331         New module 'uninorm/u32-normalize'.
109332         * lib/uninorm/u32-normalize.c: New file.
109333         * modules/uninorm/u32-normalize: New file.
109335         New module 'uninorm/u16-normalize'.
109336         * lib/uninorm/u16-normalize.c: New file.
109337         * modules/uninorm/u16-normalize: New file.
109339         New module 'uninorm/u8-normalize'.
109340         * lib/uninorm/u8-normalize.c: New file.
109341         * lib/uninorm/normalize-internal.h: New file.
109342         * lib/uninorm/u-normalize-internal.h: New file.
109343         * modules/uninorm/u8-normalize: New file.
109345         New module 'uninorm/decompose-internal'.
109346         * lib/uninorm/decompose-internal.c: New file.
109347         * modules/uninorm/decompose-internal: New file.
109349         Tests for module 'uninorm/composition'.
109350         * tests/uninorm/test-composition.c: New file.
109351         * modules/uninorm/composition-tests: New file.
109353         New module 'uninorm/composition'.
109354         * lib/uninorm/composition.c: New file.
109355         * lib/uninorm/composition-table.gperf: New file, generated by
109356         gen-uni-tables.
109357         * modules/uninorm/composition: New file.
109359         Tests for module 'uninorm/compat-decomposition'.
109360         * tests/uninorm/test-compat-decomposition.c: New file.
109361         * modules/uninorm/compat-decomposition-tests: New file.
109363         New module 'uninorm/compat-decomposition'.
109364         * lib/uninorm/decompose-internal.h: New file.
109365         * lib/uninorm/compat-decomposition.c: New file.
109366         * modules/uninorm/compat-decomposition: New file.
109368         Tests for module 'uninorm/canonical-decomposition'.
109369         * tests/uninorm/test-canonical-decomposition.c: New file.
109370         * modules/uninorm/canonical-decomposition-tests: New file.
109372         New module 'uninorm/canonical-decomposition'.
109373         * lib/uninorm/canonical-decomposition.c: New file.
109374         * modules/uninorm/canonical-decomposition: New file.
109376         Tests for module 'uninorm/decomposition'.
109377         * tests/uninorm/test-decomposition.c: New file.
109378         * modules/uninorm/decomposition-tests: New file.
109380         New module 'uninorm/decomposition'.
109381         * lib/uninorm/decomposition.c: New file.
109382         * modules/uninorm/decomposition: New file.
109384         New module 'uninorm/decomposition-table'.
109385         * lib/uninorm/decomposition-table.h: New file.
109386         * lib/uninorm/decomposition-table.c: New file.
109387         * lib/uninorm/decomposition-table1.h: New file, generated by
109388         gen-uni-tables.
109389         * lib/uninorm/decomposition-table2.h: New file, generated by
109390         gen-uni-tables.
109391         * modules/uninorm/decomposition-table: New file.
109393         * lib/gen-uni-tables.c (MAX_DECOMP_LENGTH): New macro.
109394         (UC_DECOMP_*): New enumeration items.
109395         (get_decomposition): New function.
109396         (struct decomp_table): New type.
109397         (output_decomposition, output_decomposition_tables): New functions.
109398         (unicode_composition_exclusions): New variable.
109399         (fill_composition_exclusions, debug_output_composition_tables): New
109400         functions.
109401         (main): Accept one more argument. Invoke fill_composition_exclusions.
109402         Output decomposition and composition tables.
109404         New module 'uninorm/base'.
109405         * lib/uninorm.h: New file.
109406         * lib/unictype.h: Update comment.
109407         * modules/uninorm/base: New file.
109409 2009-02-21  David Lutterkort  <lutter@redhat.com>
109411         Tests for module 'safe-alloc'.
109412         * tests/test-safe-alloc.c: New file.
109413         * modules/safe-alloc-tests: New file.
109415         New module 'safe-alloc'.
109416         * lib/safe-alloc.h: New file.
109417         * lib/safe-alloc.c: New file.
109418         * m4/safe-alloc.m4: New file.
109419         * modules/safe-alloc: New file.
109420         * doc/safe-alloc.texi: New file.
109421         * doc/gnulib.texi: Include it.
109422         * MODULES.html.sh (Memory management functions <stdlib.h>): Add
109423         safe-alloc.
109425 2009-02-18  Bruno Haible  <bruno@clisp.org>
109427         Fix link error on non-glibc systems.
109428         * modules/uniwbrk/ulc-wordbreaks-tests (test_ulc_wordbreaks_LDADD): New
109429         variable.
109430         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
109432 2009-02-18  Jim Meyering  <meyering@redhat.com>
109434         fts: avoid used-uninitialized error due to recent change
109435         * lib/fts.c (fts_read): Guard uses of the new member,
109436         parent->fts_n_dirs_remaining, since it's not relevant for
109437         the parent of a directory specified on the command-line.
109439 2009-02-17  James Youngman  <jay@gnu.org>
109440             Bruno Haible  <bruno@clisp.org>
109442         * m4/include_next.m4: Reformulate comment.
109444 2009-02-16  Jim Meyering  <meyering@redhat.com>
109446         fts: add #if guards so that the fts_lgpl module still builds
109447         * lib/fts.c: Guard just-added hash-table-using parts with
109448         #if GNULIB_FTS, so as not to break builds of the fts_lgpl module.
109449         Reported by Simon Josefsson.
109451 2009-02-15  Bruno Haible  <bruno@clisp.org>
109453         * modules/array-mergesort-tests: New file.
109454         * tests/test-array-mergesort.c: New file.
109456         New module 'array-mergesort'.
109457         * modules/array-mergesort: New file.
109458         * lib/array-mergesort.h: New file.
109460 2009-02-15  Bruno Haible  <bruno@clisp.org>
109462         Fix 2009-02-07 commit.
109463         * lib/gen-uni-tables.c (output_predicate, output_category,
109464         output_combclass, output_bidi_category, output_decimal_digit,
109465         output_digit, output_numeric, output_mirror, output_scripts,
109466         output_ident_category, output_simple_mapping): Fix format directives.
109467         (output_lbp, output_wbp): Don't convert -1 to a size_t implicitly.
109469 2009-02-15  Albert Chin-A-Young  <china@thewrittenword.com>
109471         * m4/include_next.m4: Update comment about IBM C 9.0/10.1 bug, now that
109472         fixes are available from IBM.
109474 2009-02-13  Jim Meyering  <meyering@redhat.com>
109476         fts: arrange not to stat non-directories in more cases
109477         This makes GNU find (when it doesn't need to stat each file)
109478         *much* more efficient at traversing reiserfs file systems.
109479         * lib/fts_.h (struct ftsent) [fts_n_dirs_remaining]: New member.
109480         (struct FTS) [fts_leaf_optimization_works_ht]: Add member.
109481         * lib/fts.c (fts_close): Free ->fts_leaf_optimization_works_ht.
109482         (S_MAGIC_REISERFS, S_MAGIC_PROC): Define.
109483         (leaf_optimization_applies): New function.
109484         (LCO_hash, LCO_compare): New helper functions.
109485         (link_count_optimize_ok): New function.
109486         (fts_stat): Initialize new member (if dir).
109487         (fts_read): Decrement parent's fts_n_dirs_remaining count if
109488         we've just stat'ed a directory.  Skip the stat call when possible.
109489         ---
109490         Note this AFS-related exchange:
109491         http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=143111
109492         and note find's pioctl call in find/fstype.c.
109493         But that is necessary only if you want to enable the
109494         optimization for AFS, and for now, I don't.
109496         fts: move a function definition "up" (no semantic change)
109497         * lib/fts.c (dirent_inode_sort_may_be_useful): Move definition
109498         "up" to precede upcoming use of a related function.
109500 2009-02-11  Jim Meyering  <meyering@redhat.com>
109502         fts: correct internal computation of nlinks (optimization-related)
109503         * lib/fts.c (fts_build): ISSET(FTS_NOSTAT) has no bearing on
109504         whether the current entry is a directory, so don't test it.
109506 2009-02-10  Bruno Haible  <bruno@clisp.org>
109508         Tests for module 'uniwbrk/ulc-wordbreaks'.
109509         * modules/uniwbrk/ulc-wordbreaks-tests: New file.
109510         * tests/uniwbrk/test-ulc-wordbreaks.sh: New file.
109511         * tests/uniwbrk/test-ulc-wordbreaks.c: New file.
109513         Tests for module 'uniwbrk/u32-wordbreaks'.
109514         * modules/uniwbrk/u32-wordbreaks-tests: New file.
109515         * tests/uniwbrk/test-u32-wordbreaks.c: New file.
109517         Tests for module 'uniwbrk/u16-wordbreaks'.
109518         * modules/uniwbrk/u16-wordbreaks-tests: New file.
109519         * tests/uniwbrk/test-u16-wordbreaks.c: New file.
109521         Tests for module 'uniwbrk/u8-wordbreaks'.
109522         * modules/uniwbrk/u8-wordbreaks-tests: New file.
109523         * tests/uniwbrk/test-u8-wordbreaks.c: New file.
109525 2009-02-10  Bruno Haible  <bruno@clisp.org>
109527         * modules/uniwbrk/u8-wordbreaks (Depends-on): Add uniwbrk/wordbreak
109528         property.
109529         * modules/uniwbrk/u16-wordbreaks (Depends-on): Likewise.
109530         * modules/uniwbrk/u32-wordbreaks (Depends-on): Likewise.
109531         * modules/uniwbrk/ulc-wordbreaks (Depends-on): Add localcharset.
109533 2009-02-10  Simon Josefsson  <simon@josefsson.org>
109535         * m4/sockets.m4: Call AC_C_INLINE since sockets.h now can use
109536         inline keywords.  Reported by Bruno Haible <bruno@clisp.org>.
109538 2009-02-10  Bruno Haible  <bruno@clisp.org>
109540         * lib/unilbrk/lbrktables.h: Renamed from lib/unilbrk/tables.h.
109541         * lib/unilbrk/lbrktables.c: Renamed from lib/unilbrk/tables.c.
109542         * modules/unilbrk/tables (Files, Makefile.am, Include): Update.
109543         * lib/unilbrk/u8-possible-linebreaks.c: Update.
109544         * lib/unilbrk/u16-possible-linebreaks.c: Likewise.
109545         * lib/unilbrk/u32-possible-linebreaks.c: Likewise.
109547 2009-02-09  Simon Josefsson  <simon@josefsson.org>
109549         * lib/sockets.h (gl_fd_to_handle): New function.
109551         * tests/test-sockets.c: Call gl_fd_to_handle.
109553 2009-02-09  Bruno Haible  <bruno@clisp.org>
109555         * doc/havelib.texi: Document the conventions on bi-arch systems.
109557 2009-02-08  Bruno Haible  <bruno@clisp.org>
109559         Document the AC_LIB_LINKFLAGS macro.
109560         * doc/havelib.texi: New file, mostly written on 2005-05-24.
109561         * doc/gnulib.texi: Include it.
109563 2009-02-08  Bruno Haible  <bruno@clisp.org>
109565         Fix wrong order of sections, compared to TOC.
109566         * doc/gnulib.texi: Include relocatable-maint.texi after the
109567         "Regular expressions" node, not before.
109569 2009-02-08  Bruno Haible  <bruno@clisp.org>
109571         Tests for module 'unicase/totitle'.
109572         * modules/unicase/totitle-tests: New file.
109574         Tests for module 'unicase/tolower'.
109575         * modules/unicase/tolower-tests: New file.
109577         Tests for module 'unicase/toupper'.
109578         * modules/unicase/toupper-tests: New file.
109579         * tests/unicase/test-mapping-part1.h: New file.
109580         * tests/unicase/test-mapping-part2.h: New file.
109582         New module 'unicase/totitle'.
109583         * modules/unicase/totitle: New file.
109584         * lib/unicase/totitle.c: New file.
109586         New module 'unicase/tolower'.
109587         * modules/unicase/tolower: New file.
109588         * lib/unicase/tolower.c: New file.
109590         New module 'unicase/toupper'.
109591         * modules/unicase/toupper: New file.
109592         * lib/unicase/toupper.c: New file.
109593         * lib/unicase/simple-mapping.h: New file.
109595         * lib/gen-uni-tables.c (output_simple_mapping_test): New function.
109596         (mapping_table): New structure.
109597         (output_simple_mapping): New function.
109598         (main): Invoke output_simple_mapping_test and output_simple_mapping.
109599         * modules/gen-uni-tables (Description): Update.
109600         * lib/unicase/toupper.h: New file, automatically generated by
109601         gen-uni-tables.
109602         * lib/unicase/tolower.h: New file, automatically generated by
109603         gen-uni-tables.
109604         * lib/unicase/totitle.h: New file, automatically generated by
109605         gen-uni-tables.
109606         * tests/unicase/test-uc_toupper.c: New file, automatically generated by
109607         gen-uni-tables.
109608         * tests/unicase/test-uc_tolower.c: New file, automatically generated by
109609         gen-uni-tables.
109610         * tests/unicase/test-uc_totitle.c: New file, automatically generated by
109611         gen-uni-tables.
109613         New module 'unicase/base'.
109614         * modules/unicase/base: New file.
109615         * lib/unicase.h: New file.
109617 2009-02-08  Bruno Haible  <bruno@clisp.org>
109619         New module 'uniwbrk/ulc-wordbreaks'.
109620         * modules/uniwbrk/ulc-wordbreaks: New file.
109621         * lib/uniwbrk/ulc-wordbreaks.c: New file.
109623         New module 'uniwbrk/u32-wordbreaks'.
109624         * modules/uniwbrk/u32-wordbreaks: New file.
109625         * lib/uniwbrk/u32-wordbreaks.c: New file.
109627         New module 'uniwbrk/u16-wordbreaks'.
109628         * modules/uniwbrk/u16-wordbreaks: New file.
109629         * lib/uniwbrk/u16-wordbreaks.c: New file.
109631         New module 'uniwbrk/u8-wordbreaks'.
109632         * modules/uniwbrk/u8-wordbreaks: New file.
109633         * lib/uniwbrk/u8-wordbreaks.c: New file.
109634         * lib/uniwbrk/u-wordbreaks.h: New file.
109636         New module 'uniwbrk/table'.
109637         * modules/uniwbrk/table: New file.
109638         * lib/uniwbrk/wbrktable.h: New file.
109639         * lib/uniwbrk/wbrktable.c: New file.
109641         New module 'uniwbrk/wordbreak-property'.
109642         * modules/uniwbrk/wordbreak-property: New file.
109643         * lib/uniwbrk/wordbreak-property.c: New file.
109645         * lib/gen-uni-tables.c (WBP_*): New enum items.
109646         (get_wbp, debug_output_wbp, debug_output_wbrk_tables): New functions.
109647         (unicode_org_wbp): New variable.
109648         (fill_org_wbp, debug_output_org_wbp, debug_output_org_wbrk_tables):
109649         New functions.
109650         (wbp_table): New structure.
109651         (output_wbp, output_wbrk_tables): New functions.
109652         (main): Accept additional argument. Invoke fill_org_wbp,
109653         debug_output_wbrk_tables, debug_output_org_wbrk_tables,
109654         output_wbrk_tables.
109655         * modules/gen-uni-tables (Description): Update.
109656         * lib/uniwbrk/wbrkprop.h: New file, automatically generated by
109657         gen-uni-tables.
109659         New module 'uniwbrk/base'.
109660         * modules/uniwbrk/base: New file.
109661         * lib/uniwbrk.h: New file.
109663 2009-02-08  Bruno Haible  <bruno@clisp.org>
109665         Update to Unicode 5.1.0.
109666         * lib/gen-uni-tables.c (is_property_alphabetic): Include
109667         U+2185..U+2188.
109668         (is_property_default_ignorable_code_point): Don't include characters
109669         of category Cc or Cs and not-a-characters.
109670         (get_lbp): Assume REVISION_22. Special handling of U+0609, U+060A,
109671         U+0D79, U+109E, U+109F, U+A60C.
109672         * lib/unictype/bidi_of.h: Regenerated.
109673         * lib/unictype/blocks.h: Regenerated.
109674         * lib/unictype/categ_C.h: Regenerated.
109675         * lib/unictype/categ_Cf.h: Regenerated.
109676         * lib/unictype/categ_Cn.h: Regenerated.
109677         * lib/unictype/categ_L.h: Regenerated.
109678         * lib/unictype/categ_Ll.h: Regenerated.
109679         * lib/unictype/categ_Lm.h: Regenerated.
109680         * lib/unictype/categ_Lo.h: Regenerated.
109681         * lib/unictype/categ_Lu.h: Regenerated.
109682         * lib/unictype/categ_M.h: Regenerated.
109683         * lib/unictype/categ_Mc.h: Regenerated.
109684         * lib/unictype/categ_Me.h: Regenerated.
109685         * lib/unictype/categ_Mn.h: Regenerated.
109686         * lib/unictype/categ_N.h: Regenerated.
109687         * lib/unictype/categ_Nd.h: Regenerated.
109688         * lib/unictype/categ_Nl.h: Regenerated.
109689         * lib/unictype/categ_No.h: Regenerated.
109690         * lib/unictype/categ_P.h: Regenerated.
109691         * lib/unictype/categ_Pd.h: Regenerated.
109692         * lib/unictype/categ_Pe.h: Regenerated.
109693         * lib/unictype/categ_Pf.h: Regenerated.
109694         * lib/unictype/categ_Pi.h: Regenerated.
109695         * lib/unictype/categ_Po.h: Regenerated.
109696         * lib/unictype/categ_Ps.h: Regenerated.
109697         * lib/unictype/categ_S.h: Regenerated.
109698         * lib/unictype/categ_Sk.h: Regenerated.
109699         * lib/unictype/categ_Sm.h: Regenerated.
109700         * lib/unictype/categ_So.h: Regenerated.
109701         * lib/unictype/categ_of.h: Regenerated.
109702         * lib/unictype/combining.h: Regenerated.
109703         * lib/unictype/ctype_alnum.h: Regenerated.
109704         * lib/unictype/ctype_alpha.h: Regenerated.
109705         * lib/unictype/ctype_graph.h: Regenerated.
109706         * lib/unictype/ctype_lower.h: Regenerated.
109707         * lib/unictype/ctype_print.h: Regenerated.
109708         * lib/unictype/ctype_punct.h: Regenerated.
109709         * lib/unictype/ctype_upper.h: Regenerated.
109710         * lib/unictype/decdigit.h: Regenerated.
109711         * lib/unictype/digit.h: Regenerated.
109712         * lib/unictype/mirror.h: Regenerated.
109713         * lib/unictype/numeric.h: Regenerated.
109714         * lib/unictype/pr_alphabetic.h: Regenerated.
109715         * lib/unictype/pr_bidi_arabic_digit.h: Regenerated.
109716         * lib/unictype/pr_bidi_arabic_right_to_left.h: Regenerated.
109717         * lib/unictype/pr_bidi_boundary_neutral.h: Regenerated.
109718         * lib/unictype/pr_bidi_eur_num_terminator.h: Regenerated.
109719         * lib/unictype/pr_bidi_left_to_right.h: Regenerated.
109720         * lib/unictype/pr_bidi_non_spacing_mark.h: Regenerated.
109721         * lib/unictype/pr_bidi_other_neutral.h: Regenerated.
109722         * lib/unictype/pr_combining.h: Regenerated.
109723         * lib/unictype/pr_dash.h: Regenerated.
109724         * lib/unictype/pr_decimal_digit.h: Regenerated.
109725         * lib/unictype/pr_default_ignorable_code_point.h: Regenerated.
109726         * lib/unictype/pr_deprecated.h: Regenerated.
109727         * lib/unictype/pr_diacritic.h: Regenerated.
109728         * lib/unictype/pr_extender.h: Regenerated.
109729         * lib/unictype/pr_format_control.h: Regenerated.
109730         * lib/unictype/pr_grapheme_base.h: Regenerated.
109731         * lib/unictype/pr_grapheme_extend.h: Regenerated.
109732         * lib/unictype/pr_grapheme_link.h: Regenerated.
109733         * lib/unictype/pr_id_continue.h: Regenerated.
109734         * lib/unictype/pr_id_start.h: Regenerated.
109735         * lib/unictype/pr_ideographic.h: Regenerated.
109736         * lib/unictype/pr_ignorable_control.h: Regenerated.
109737         * lib/unictype/pr_lowercase.h: Regenerated.
109738         * lib/unictype/pr_math.h: Regenerated.
109739         * lib/unictype/pr_numeric.h: Regenerated.
109740         * lib/unictype/pr_other_alphabetic.h: Regenerated.
109741         * lib/unictype/pr_other_default_ignorable_code_point.h: Regenerated.
109742         * lib/unictype/pr_other_grapheme_extend.h: Regenerated.
109743         * lib/unictype/pr_other_id_continue.h: Regenerated.
109744         * lib/unictype/pr_other_lowercase.h: Regenerated.
109745         * lib/unictype/pr_other_math.h: Regenerated.
109746         * lib/unictype/pr_punctuation.h: Regenerated.
109747         * lib/unictype/pr_sentence_terminal.h: Regenerated.
109748         * lib/unictype/pr_soft_dotted.h: Regenerated.
109749         * lib/unictype/pr_terminal_punctuation.h: Regenerated.
109750         * lib/unictype/pr_unassigned_code_value.h: Regenerated.
109751         * lib/unictype/pr_unified_ideograph.h: Regenerated.
109752         * lib/unictype/pr_uppercase.h: Regenerated.
109753         * lib/unictype/pr_xid_continue.h: Regenerated.
109754         * lib/unictype/pr_xid_start.h: Regenerated.
109755         * lib/unictype/pr_zero_width.h: Regenerated.
109756         * lib/unictype/scripts.h: Regenerated.
109757         * lib/unictype/scripts_byname.gperf: Regenerated.
109758         * lib/unictype/sy_java_ident.h: Regenerated.
109759         * lib/unilbrk/lbrkprop1.h: Regenerated.
109760         * lib/unilbrk/lbrkprop2.h: Regenerated.
109761         * tests/unictype/test-categ_C.c: Regenerated.
109762         * tests/unictype/test-categ_Cf.c: Regenerated.
109763         * tests/unictype/test-categ_Cn.c: Regenerated.
109764         * tests/unictype/test-categ_L.c: Regenerated.
109765         * tests/unictype/test-categ_Ll.c: Regenerated.
109766         * tests/unictype/test-categ_Lm.c: Regenerated.
109767         * tests/unictype/test-categ_Lo.c: Regenerated.
109768         * tests/unictype/test-categ_Lu.c: Regenerated.
109769         * tests/unictype/test-categ_M.c: Regenerated.
109770         * tests/unictype/test-categ_Mc.c: Regenerated.
109771         * tests/unictype/test-categ_Me.c: Regenerated.
109772         * tests/unictype/test-categ_Mn.c: Regenerated.
109773         * tests/unictype/test-categ_N.c: Regenerated.
109774         * tests/unictype/test-categ_Nd.c: Regenerated.
109775         * tests/unictype/test-categ_Nl.c: Regenerated.
109776         * tests/unictype/test-categ_No.c: Regenerated.
109777         * tests/unictype/test-categ_P.c: Regenerated.
109778         * tests/unictype/test-categ_Pd.c: Regenerated.
109779         * tests/unictype/test-categ_Pe.c: Regenerated.
109780         * tests/unictype/test-categ_Pf.c: Regenerated.
109781         * tests/unictype/test-categ_Pi.c: Regenerated.
109782         * tests/unictype/test-categ_Po.c: Regenerated.
109783         * tests/unictype/test-categ_Ps.c: Regenerated.
109784         * tests/unictype/test-categ_S.c: Regenerated.
109785         * tests/unictype/test-categ_Sk.c: Regenerated.
109786         * tests/unictype/test-categ_Sm.c: Regenerated.
109787         * tests/unictype/test-categ_So.c: Regenerated.
109788         * tests/unictype/test-ctype_alnum.c: Regenerated.
109789         * tests/unictype/test-ctype_alpha.c: Regenerated.
109790         * tests/unictype/test-ctype_graph.c: Regenerated.
109791         * tests/unictype/test-ctype_lower.c: Regenerated.
109792         * tests/unictype/test-ctype_print.c: Regenerated.
109793         * tests/unictype/test-ctype_punct.c: Regenerated.
109794         * tests/unictype/test-ctype_upper.c: Regenerated.
109795         * tests/unictype/test-decdigit.h: Regenerated.
109796         * tests/unictype/test-digit.h: Regenerated.
109797         * tests/unictype/test-numeric.h: Regenerated.
109798         * tests/unictype/test-pr_alphabetic.c: Regenerated.
109799         * tests/unictype/test-pr_bidi_arabic_digit.c: Regenerated.
109800         * tests/unictype/test-pr_bidi_arabic_right_to_left.c: Regenerated.
109801         * tests/unictype/test-pr_bidi_boundary_neutral.c: Regenerated.
109802         * tests/unictype/test-pr_bidi_eur_num_terminator.c: Regenerated.
109803         * tests/unictype/test-pr_bidi_left_to_right.c: Regenerated.
109804         * tests/unictype/test-pr_bidi_non_spacing_mark.c: Regenerated.
109805         * tests/unictype/test-pr_bidi_other_neutral.c: Regenerated.
109806         * tests/unictype/test-pr_combining.c: Regenerated.
109807         * tests/unictype/test-pr_dash.c: Regenerated.
109808         * tests/unictype/test-pr_decimal_digit.c: Regenerated.
109809         * tests/unictype/test-pr_default_ignorable_code_point.c: Regenerated.
109810         * tests/unictype/test-pr_deprecated.c: Regenerated.
109811         * tests/unictype/test-pr_diacritic.c: Regenerated.
109812         * tests/unictype/test-pr_extender.c: Regenerated.
109813         * tests/unictype/test-pr_format_control.c: Regenerated.
109814         * tests/unictype/test-pr_grapheme_base.c: Regenerated.
109815         * tests/unictype/test-pr_grapheme_extend.c: Regenerated.
109816         * tests/unictype/test-pr_grapheme_link.c: Regenerated.
109817         * tests/unictype/test-pr_id_continue.c: Regenerated.
109818         * tests/unictype/test-pr_id_start.c: Regenerated.
109819         * tests/unictype/test-pr_ideographic.c: Regenerated.
109820         * tests/unictype/test-pr_ignorable_control.c: Regenerated.
109821         * tests/unictype/test-pr_lowercase.c: Regenerated.
109822         * tests/unictype/test-pr_math.c: Regenerated.
109823         * tests/unictype/test-pr_numeric.c: Regenerated.
109824         * tests/unictype/test-pr_other_alphabetic.c: Regenerated.
109825         * tests/unictype/test-pr_other_default_ignorable_code_point.c:
109826         Regenerated.
109827         * tests/unictype/test-pr_other_grapheme_extend.c: Regenerated.
109828         * tests/unictype/test-pr_other_id_continue.c: Regenerated.
109829         * tests/unictype/test-pr_other_lowercase.c: Regenerated.
109830         * tests/unictype/test-pr_other_math.c: Regenerated.
109831         * tests/unictype/test-pr_punctuation.c: Regenerated.
109832         * tests/unictype/test-pr_sentence_terminal.c: Regenerated.
109833         * tests/unictype/test-pr_soft_dotted.c: Regenerated.
109834         * tests/unictype/test-pr_terminal_punctuation.c: Regenerated.
109835         * tests/unictype/test-pr_unassigned_code_value.c: Regenerated.
109836         * tests/unictype/test-pr_unified_ideograph.c: Regenerated.
109837         * tests/unictype/test-pr_uppercase.c: Regenerated.
109838         * tests/unictype/test-pr_xid_continue.c: Regenerated.
109839         * tests/unictype/test-pr_xid_start.c: Regenerated.
109840         * tests/unictype/test-pr_zero_width.c: Regenerated.
109842         Update to Unicode 5.1.0.
109843         * lib/uniwidth/width.c (nonspacing_table_data): Add U+0487,
109844         U+0616..U+061A, U+0A51, U+0A75, U+0B44, U+0B62..U+0B63, U+0C62..U+0C63,
109845         U+0D44, U+0D62..U+0D63, U+1033..U+1035, U+103A, U+103D..U+103E,
109846         U+105E..U+1060, U+1071..U+1074, U+1082, U+1085..U+1086, U+108D,
109847         U+1B80..U+1B81, U+1BA2..U+1BA5, U+1BA8..U+1BA9, U+1C2C..U+1C33,
109848         U+1C36..U+1C37, U+1DCB..U+1DE6, U+2064, U+20F0, U+2DE0..U+2DFF,
109849         U+A66F..U+A672, U+A67C..U+A67D, U+A8C4, U+A926..U+A92D, U+A947..U+A951,
109850         U+AA29..U+AA2E, U+AA31..U+AA32, U+AA35..U+AA36, U+AA43, U+AA4C,
109851         U+FE24..U+FE26, U+101FD. Remove U+1929..U+192B.
109852         (nonspacing_table_ind): Update.
109853         * tests/uniwidth/test-uc_width2.sh: Update expected result.
109855         Update to Unicode 5.1.0.
109856         * lib/uniname/gen-uninames.lisp (main): Add the range 0x1Fxxx to the
109857         code transform.
109858         * lib/uniname/uniname.c (unicode_character_name,
109859         unicode_name_character): Add the range 0x1Fxxx to the code transform.
109860         * lib/uniname/uninames.h: Regenerated.
109861         * tests/uniname/UnicodeDataNames.txt: Update to Unicode 5.1.0.
109863 2009-02-07  Bruno Haible  <bruno@clisp.org>
109865         Merge gen-ctype and gen-lbrk into a single program.
109866         * lib/gen-uni-tables.c: New file, incorporating
109867         lib/unictype/gen-ctype.c and lib/unilbrk/gen-lbrk.c.
109868         Add directory prefixes to the names of the generated files.
109869         * lib/unictype/gen-ctype.c: Remove file.
109870         * lib/unilbrk/gen-lbrk.c: Remove file.
109871         * modules/gen-uni-tables: New file.
109872         * modules/unictype/gen-ctype: Remove file.
109873         * modules/unilbrk/gen-lbrk: Remove file.
109875 2009-02-07  Bruno Haible  <bruno@clisp.org>
109877         * lib/unistr.h (u8_strcoll, u16_strcoll, u32_strcoll): New declations.
109879         New module 'unistr/u32-strcoll'.
109880         * modules/unistr/u32-strcoll: New file.
109881         * lib/unistr/u32-strcoll.c: New file.
109883         New module 'unistr/u16-strcoll'.
109884         * modules/unistr/u16-strcoll: New file.
109885         * lib/unistr/u16-strcoll.c: New file.
109887         New module 'unistr/u8-strcoll'.
109888         * modules/unistr/u8-strcoll: New file.
109889         * lib/unistr/u8-strcoll.c: New file.
109890         * lib/unistr/u-strcoll.h: New file.
109892 2009-02-07  Bruno Haible  <bruno@clisp.org>
109894         * test-mbrtowc4.sh (LOCALE_ZH_CN): Fix default value.
109895         * test-mbsnrtowcs4.sh (LOCALE_ZH_CN): Likewise.
109896         * test-mbsrtowcs4.sh (LOCALE_ZH_CN): Likewise.
109897         * test-wcrtomb.sh (LOCALE_ZH_CN): Likewise.
109898         * test-wcsnrtombs4.sh (LOCALE_ZH_CN): Likewise.
109899         * test-wcsrtombs4.sh (LOCALE_ZH_CN): Likewise.
109901 2009-02-07  Bruno Haible  <bruno@clisp.org>
109903         Make 64-bit clean.
109904         * lib/unictype/gen-ctype.c (output_predicate, output_category,
109905         output_combclass, output_bidi_category, output_decimal_digit,
109906         output_digit, output_numeric, output_mirror, output_scripts,
109907         output_ident_category): Use proper width specifier in format strings.
109909 2009-02-07  Bruno Haible  <bruno@clisp.org>
109911         * doc/posix-functions/dirfd.texi: Clarify situation on mingw. Document
109912         failure behaviour.
109914 2009-02-07  Jim Meyering  <meyering@redhat.com>
109916         regex: avoid compilation failure with upcoming gcc-4.4
109917         * lib/regex_internal.h: Revert e48d8b47fb3eee81d341b71c3e006efe9e3433a7
109918         [workaround for PGC prior to 6.1-2].  Otherwise, we'd get this:
109919         "... error: integer overflow in preprocessor expression".
109921 2009-02-05  Ben Pfaff  <blp@gnu.org>
109923         Fix link errors on Windows when close module is used.
109924         * modules/close: Add $(LIB_CLOSE) to Link section.
109925         * m4/close.m4 (gl_REPLACE_CLOSE): Substitute -lws2_32 into
109926         $(LIB_CLOSE) on Windows.
109928 2009-02-05  Jim Meyering  <meyering@redhat.com>
109930         still avoid unused-parameter warnings, but do it cleanly
109931         * lib/fsusage.c (UNUSED_PARAM): Remove definition.
109932         (get_fs_usage): Cast to void instead.
109933         * lib/mountlist.c (UNUSED_PARAM): Remove definition.
109934         (dev_from_mount_options, read_file_system_list): Cast to void.
109935         Prompted by Bruno Haible.
109937 2009-02-04  Jim Meyering  <meyering@redhat.com>
109939         fsusage.c: correct copyright year
109940         * lib/fsusage.c: Reflect year in which the change is pushed into
109942         avoid misc. warnings
109943         * lib/fsusage.c (UNUSED_PARAM): Define.
109944         (get_fs_usage): Mark parameter "disk" as unused.
109945         * lib/getugroups.c (getgrent): Use "void" in prototype.
109946         * lib/mountlist.c: Mark unused parameters.
109947         (read_file_system_list): Declare a local with "const".
109948         * lib/nanosleep.c (getnow): Declare static.
109949         * lib/strftime.c: Include strftime.h, for declaration of nstrftime.
109951         dirfd: set errno upon failure
109952         * lib/dirfd.c: Include <errno.h>.
109953         Set errno to ENOTSUP when returning -1.
109954         * modules/dirfd (Depends-on): Add errno.
109955         Suggested by John Kodis <kodis@comcast.net>.
109957 2009-02-01  Bruno Haible  <bruno@clisp.org>
109959         Don't assume sizeof (long) >= sizeof (void *).
109960         * lib/memcmp.c: Include stdint.h.
109961         (memcmp_bytes): Change argument types to op_t. Change type of srcp1,
109962         srcp2 to 'const byte *'.
109963         (memcmp_common_alignment, memcmp_not_common_alignment): Change argument
109964         types to uintptr_t.
109965         (rpl_memcmp): Change type of srcp1, srcp2 to 'uintptr_t'.
109966         * modules/memcmp (Depends-on): Add stdint.
109967         Reported by Ozkan Sezer <sezeroz@gmail.com>.
109969 2009-01-30  Eric Blake  <ebb9@byu.net>
109971         fix more require-before-expand issues
109972         * m4/pmccabe2html.m4 (gl_PMCCABE2HTML): Require, rather than
109973         expand, AC_PROG_AWK.
109974         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): Use AC_DEFUN_ONCE.
109976 2009-01-28  Eric Blake  <ebb9@byu.net>
109978         version-etc: use consistent URL formatting
109979         * lib/version-etc.c (emit_bug_reporting_address, version_etc_va):
109980         Improve formatting.  Use fputs for string without %.
109982 2009-01-28  Jim Meyering  <meyering@redhat.com>
109984         00gnulib.m4: add m4 quotes in shell comment to avoid autoconf warning
109985         * m4/00gnulib.m4 (AC_DEFUN_ONCE): Add quotes to avoid an
109986         "underquoted definition of NAME" from autoconf-2.59.
109988 2009-01-28  Bruno Haible  <bruno@clisp.org>
109990         * doc/gnulib.texi: Add "Obsolete modules" to index.
109992 2009-01-28  Jim Meyering  <meyering@redhat.com>
109994         useless-if-before-free: recognize more variants
109995         * build-aux/useless-if-before-free: Also recognize e.g.,
109996         if (NULL != p) free (p);
109998 2009-01-27  Mark McLoughlin  <markmc@redhat.com>
110000         test-getaddrinfo: skip (don't fail) this test when there's no network
110001         * tests/test-getaddrinfo.c: Skip test upon failure with EAI_AGAIN,
110002         on the presumption that it means you lack network access.
110004 2009-01-26  Jim Meyering  <meyering@redhat.com>
110006         fflush: avoid warnings on modern systems
110007         * lib/fflush.c (rpl_fflush): Move declarations of locals,
110008         pos and result, into scopes where they're used.
110010 2009-01-26  Eric Blake  <ebb9@byu.net>
110012         Silence warning reintroduced by recent extensions patch.
110013         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS)
110014         (gl_USE_SYSTEM_EXTENSIONS): Use AC_DEFUN_ONCE to silence newer
110015         autoconf.
110017         Backport improved autoconf semantics of AC_DEFUN_ONCE.
110018         * m4/00gnulib.m4: New file.
110019         * gnulib-tool (func_get_filelist): Always use it.
110020         * m4/gnulib-common.m4 (gl_COMMON): Force the file to be used.
110021         Reported by Bruno Haible, with suggestions from Paolo Bonzini.
110023 2009-01-25  Bruno Haible  <bruno@clisp.org>
110025         Make test-quotearg work on MacOS X and AIX.
110026         * tests/test-quotearg.sh: New file.
110027         * tests/locale/fr/LC_MESSAGES/test-quotearg.po: New file.
110028         * tests/locale/fr/LC_MESSAGES/test-quotearg.mo: New file.
110029         * tests/test-quotearg.c: Include <locale.h> and gettext.h. Don't
110030         include <libintl.h>.
110031         (fake_locale): Remove variable.
110032         (gettext, dgettext, dcgettext): Remove functions.
110033         (main): Instead of setting a fake locale, set a real locale. Call
110034         textdomain and bindtextdomain.
110035         * modules/quotearg-tests (Files): Add the new files.
110036         (Depends-on): Add gettext, setenv, unsetenv.
110037         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
110038         (Makefile.am): Add test-quotearg.sh to TESTS, remove test-quotearg.
110039         Augment TESTS_ENVIRONMENT.
110041 2009-01-25  Bruno Haible  <bruno@clisp.org>
110043         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove special code that hid the
110044         fr_FR.ISO8859-1 locale on MacOS X.
110045         * m4/locale-ja.m4 (gt_LOCALE_JA): Remove special code that hid the
110046         ja_JP.eucJP locale on MacOS X.
110047         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Remove special code that hid the
110048         zh_CN.GB18030 locale on MacOS X.
110050 2009-01-25  Bruno Haible  <bruno@clisp.org>
110052         Avoid link errors on MacOS X 10.3.
110053         * lib/mbsrtowcs-state.c (_gl_mbsrtowcs_state): Add initializer.
110054         * lib/wcsrtombs-state.c (_gl_wcsrtombs_state): Likewise.
110056 2009-01-25  Bruno Haible  <bruno@clisp.org>
110058         * lib/pipe.c: On Unix, assume HAVE_POSIX_SPAWN and use posix_spawnp.
110059         * m4/pipe.m4 (gl_PIPE): Remove tests for vfork() based code.
110060         * modules/pipe (Files): Remove m4/posix_spawn.m4.
110061         (Depends-on): Add spawn, posix_spawnp, posix_spawn_file_actions_init,
110062         posix_spawn_file_actions_addclose, posix_spawn_file_actions_adddup2,
110063         posix_spawn_file_actions_addopen, posix_spawn_file_actions_destroy,
110064         posix_spawnattr_init, posix_spawnattr_setsigmask,
110065         posix_spawnattr_setflags, posix_spawnattr_destroy.
110067         * lib/execute.c: On Unix, assume HAVE_POSIX_SPAWN and use posix_spawnp.
110068         * m4/execute.m4 (gl_EXECUTE): Remove tests for vfork() based code.
110069         * modules/execute (Files): Remove m4/posix_spawn.m4.
110070         (Depends-on): Add spawn, posix_spawnp, posix_spawn_file_actions_init,
110071         posix_spawn_file_actions_addopen, posix_spawn_file_actions_destroy,
110072         posix_spawnattr_init, posix_spawnattr_setsigmask,
110073         posix_spawnattr_setflags, posix_spawnattr_destroy.
110075 2009-01-25  Bruno Haible  <bruno@clisp.org>
110077         * lib/glthread/threadlib.c: Include <stdlib.h>.
110079 2009-01-25  Bruno Haible  <bruno@clisp.org>
110081         * lib/glthread/threadlib.c (dummy): New declaration.
110083 2009-01-25  Bruno Haible  <bruno@clisp.org>
110085         * lib/mbrtowc.c (mbrtowc): Distinguish invalid and incomplete
110086         multibyte characters also for the GB18030 encoding. Don't crash when
110087         the encoding is unknown and nstate = 0. Needed on OSF/1 5.1.
110089 2009-01-25  Bruno Haible  <bruno@clisp.org>
110091         Avoid redefining 'struct random_data' on OSF/1 5.1.
110092         * lib/stdlib.in.h: Include <random.h> if it exists.
110093         * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether <random.h> exists. Set
110094         HAVE_RANDOM_H. Include <random.h> when testing whether
110095         'struct random_data' exists.
110096         * modules/stdlib (Makefile.am): Substitute HAVE_RANDOM_H.
110098 2009-01-25  Bruno Haible  <bruno@clisp.org>
110100         Don't install charset.alias on MacOS X >= 10.3.
110101         * lib/localcharset.c (DARWIN7): New macro.
110102         (get_charset_aliases): Hardcode the result for Darwin7.
110103         * modules/localcharset (install-exec-local): Don't install
110104         charset.alias on MacOS X >= 10.3, if the file does not yet exist.
110106 2009-01-25  Bruno Haible  <bruno@clisp.org>
110108         Don't install charset.alias on mingw and Cygwin.
110109         * modules/localcharset (install-exec-local): Don't install
110110         charset.alias on mingw and Cygwin, if the file does not yet exist.
110111         The result for these platforms is hardcoded in localcharset.c.
110113 2009-01-25  Bruno Haible  <bruno@clisp.org>
110115         Make it possible again to use AC_GNU_SOURCE together with gnulib.
110116         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_GNU_SOURCE
110117         before requiring AC_USE_SYSTEM_EXTENSIONS.
110119 2009-01-25  Jim Meyering  <meyering@redhat.com>
110121         c-strtod: avoid warnings
110122         * lib/c-strtod.c (C_STRTOD): Cast nptr to (char *) to avoid
110123         "assignment discards qualifiers from pointer target type" warnings.
110125 2009-01-24  Bruno Haible  <bruno@clisp.org>
110127         Add support for non-UTF-8 locales on MacOS X.
110128         * lib/config.charset: Add CP1131, ARMSCII-8, PT154 to the list of
110129         canonical encodings. For Darwin 7 and newer, don't map traditional
110130         encodings to UTF-8.
110131         Reported by Vincent Lefevre <vincent@vinc17.org>
110132         at <http://savannah.gnu.org/bugs/?25235>.
110134 2009-01-24  Bruno Haible  <bruno@clisp.org>
110136         * doc/gnulib.texi (Obsolete modules): New section.
110137         Reported by Mike Frysinger <vapier@gentoo.org>.
110139 2009-01-24  Bruno Haible  <bruno@clisp.org>
110141         * doc/Makefile (%.pdf): Clarify where to find texmf.cnf.
110142         (%.dvi): New rule.
110144 2009-01-24  Bruno Haible  <bruno@clisp.org>
110146         * lib/c-strtod.h (c_strtod, c_strtold): Adjust specification.
110147         Reported by Eric Blake.
110149 2009-01-24  Bruno Haible  <bruno@clisp.org>
110151         * lib/c-stack.c (segv_handler): If !HAVE_XSI_STACK_OVERFLOW_HEURISTIC,
110152         set signo = 0 also if info->si_code <= 0. Needed on HP-UX 11.11.
110153         Reported by Gary V. Vaughan <gary@gnu.org>.
110155 2009-01-24  Bruno Haible  <bruno@clisp.org>
110157         * lib/c-strtod.h (c_strtod, c_strtold): Add specification.
110159 2009-01-23  Bruno Haible  <bruno@clisp.org>
110161         Make c-strtod, c-strtold usable in libraries.
110162         * lib/c-strtod.c: Include string.h instead of xalloc.h.
110163         (C_STRTOD): Call strdup instead of xstrdup.
110164         * modules/c-strtod (Depends-on): Add strdup-posix, remove xalloc.
110165         * modules/c-strtold (Depends-on): Likewise.
110166         * doc/c-strtod.texi: Remove the sentence mentioning xalloc_die.
110167         * NEWS: Mention the change.
110168         Reported by Michael Gold <mgold@ncf.ca>.
110170 2009-01-23  Jim Meyering  <meyering@redhat.com>
110172         c-strtod: when ENDPTR is non-NULL, set *ENDPTR in new failure path
110173         * lib/c-strtod.c (C_STRTOD) [LC_ALL_MASKC]: Ensure that when
110174         ENDPTR is non-NULL, *ENDPTR is set to NPTR upon failure.
110176 2009-01-23  Simon Josefsson  <simon@josefsson.org>
110178         * lib/version-etc.c: Add emit_bug_reporting_address, inspired by
110179         GNU CoreUtils.
110180         * lib/version-etc.h: Add prototype for emit_bug_reporting_address.
110181         * modules/version-etc (Description): Update.
110183 2009-01-22  Bruno Haible  <bruno@clisp.org>
110185         Cache the C locale object.
110186         * lib/c-strtod.c (c_locale_cache): New variable.
110187         (c_locale): New function.
110188         (C_STRTOD): Use it, and don't call freelocale.
110189         * m4/c-strtod.m4 (gl_C_STRTOD, gl_C_STRTOLD): Require AC_C_INLINE.
110190         Suggested by Paolo Bonzini.
110192 2009-01-21  Bruno Haible  <bruno@clisp.org>
110194         * lib/getloadavg.c (getloadavg): Check c_strtod result against error
110195         conditions other than overflow.
110197 2009-01-21  Bruno Haible  <bruno@clisp.org>
110199         * lib/c-strtod.c: Include errno.h.
110200         (C_STRTOD): Check against NULL return from newlocale. Preserve errno
110201         value from STRTOD_L and STRTOD.
110203 2009-01-21  Bruno Haible  <bruno@clisp.org>
110204         and Jim Meyering  <meyering@redhat.com>
110206         nanosleep: skip configure test (fail it) for apple universal builds
110207         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_MULTIARCH. In Apple
110208         universal builds, assume that nanosleep does not work.
110209         * modules/nanosleep (Depends-on): Add multiarch.
110211         mktime: skip configure test (fail it) for apple universal builds
110212         * m4/mktime.m4 (AC_FUNC_MKTIME): Require gl_MULTIARCH. In Apple
110213         universal builds, assume that mktime does not work.
110214         * modules/mktime (Depends-on): Add multiarch.
110216 2009-01-21  Eric Blake  <ebb9@byu.net>
110218         multiarch: avoid expand-before-require warning
110219         * modules/multiarch (configure.ac): Require, rather than expand,
110220         gl_MULTIARCH.
110221         * m4/multiarch.m4 (gl_MULTIARCH_BODY): Merge...
110222         (gl_MULTIARCH): ...into this macro, and use AC_DEFUN_ONCE to
110223         enforce that all clients require it.  Partial reversion of
110224         2008-12-29 patch.
110226         error: avoid expand-before-require warning
110227         * modules/errno (configure.ac): Require, rather than expand,
110228         gl_HEADER_ERRNO_H.
110229         * m4/errno_h.m4 (gl_HEADER_ERRNO_H_BODY): Merge...
110230         (gl_HEADER_ERRNO_H): ...into this macro, and use AC_DEFUN_ONCE to
110231         enforce that all clients require it.
110233         gnulib-tool: avoid warnings from using obsolete AC_GNU_SOURCE
110234         * gnulib-tool (func_dest_tmpfilename, func_create_testdir): Using
110235         obsolete AC_GNU_SOURCE causes out-of-order expansion; avoid it,
110236         and rely solely on gl_USE_SYSTEM_EXTENSIONS.
110238 2009-01-21  Paolo Bonzini  <bonzini@gnu.org>
110240         Revert:
110241         2009-01-20  Paolo Bonzini  <bonzini@gnu.org>
110243         regex: do not depend on obsolete modules.
110244         * modules/regex: Remove memcmp and memmove.
110246 2009-01-20  Bruno Haible  <bruno@clisp.org>
110248         Make the 'link' module link on Windows NT 4.
110249         * lib/link.c (_WIN32_WINNT): Don't define.
110250         (CreateHardLinkFuncType): New type.
110251         (CreateHardLinkFunc, initialized): New variables.
110252         (initialize): New function.
110253         (link): Invoke CreateHardLink indirectly through the function pointer.
110255 2009-01-20  Bruno Haible  <bruno@clisp.org>
110257         Fix compilation failure on mingw.
110258         * tests/test-link.c (main): Don't assume that EOPNOTSUPP exists.
110260 2009-01-20  Michael Gold  <mgold@ncf.ca>  (tiny change)
110262         * doc/c-strtod.texi: Mention a couple of restrictions.
110264 2009-01-20  Jim Meyering  <meyering@redhat.com>
110266         gettimeofday: move more declarations out of functions
110267         * lib/gettimeofday.c: Move extern declarations of tzset and
110268         gmtime out of containing functions.  Prompted by Bruno Haible.
110270 2009-01-20  Paolo Bonzini  <bonzini@gnu.org>
110272         regex: do not depend on obsolete modules.
110273         * modules/regex: Remove memcmp and memmove.
110275 2009-01-19  Bruno Haible  <bruno@clisp.org>
110277         Don't use AC_REQUIRE([AC_C_BIGENDIAN]).
110278         * modules/uniconv/u16-conv-from-enc (configure.ac): Require
110279         gl_BIGENDIAN, not AC_C_BIGENDIAN.
110280         * modules/uniconv/u16-conv-to-enc (configure.ac): Likewise.
110281         * modules/uniconv/u16-strconv-to-enc (configure.ac): Likewise.
110283 2009-01-19  Bruno Haible  <bruno@clisp.org>
110285         * tests/test-link.c: Include <errno.h>.
110286         (main): Exit with code 77 when a hard link cannot be created due to
110287         the file system.
110288         * tests/test-link.sh: Skip test when a hard link cannot be created due
110289         to the file system.
110290         Suggested by Eric Blake.
110292 2009-01-19  Martin Lambers  <marlam@marlam.de>
110294         * modules/link-tests: New file.
110295         * tests/test-link.sh: New file.
110296         * tests/test-link.c: New file.
110298 2009-01-19  Eric Blake  <ebb9@byu.net>
110300         doc: mention another function added in cygwin 1.7.0
110301         * doc/glibc-functions/glob_pattern_p.texi (glob_pattern_p):
110302         Another new function in cygwin 1.7.
110304 2009-01-19  Bruno Haible  <bruno@clisp.org>
110306         Don't use AC_REQUIRE([AC_C_BIGENDIAN]).
110307         * m4/gnulib-common.m4 (gl_BIGENDIAN): New macro.
110308         * m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Require
110309         gl_BIGENDIAN, not AC_C_BIGENDIAN.
110310         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Likewise.
110311         * m4/isinf.m4 (gl_ISINFL_WORKS): Likewise.
110312         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Likewise.
110313         * m4/md4.m4 (gl_MD4): Likewise.
110314         * m4/md5.m4 (gl_MD5): Likewise.
110315         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Likewise.
110316         * m4/sha1.m4 (gl_SHA1): Likewise.
110317         * m4/sha256.m4 (gl_SHA256): Likewise.
110318         * m4/sha512.m4 (gl_SHA512): Likewise.
110320 2009-01-19  Bruno Haible  <bruno@clisp.org>
110322         * modules/uniname/uniname-tests (Depends-on): Add progname.
110323         * tests/uniname/test-uninames.c: Include progname.h.
110324         (main): Call set_program_name.
110326         * modules/unistdio/u8-vsprintf-tests (Depends-on): Add progname.
110327         * tests/unistdio/test-u8-vsprintf1.c: Include progname.h.
110328         (main): Call set_program_name.
110330         * modules/unistdio/u8-vsnprintf-tests (Depends-on): Add progname.
110331         * tests/unistdio/test-u8-vsnprintf1.c: Include progname.h.
110332         (main): Call set_program_name.
110334         * modules/unistdio/u16-vsprintf-tests (Depends-on): Add progname.
110335         * tests/unistdio/test-u16-vsprintf1.c: Include progname.h.
110336         (main): Call set_program_name.
110338         * modules/unistdio/u16-vsnprintf-tests (Depends-on): Add progname.
110339         * tests/unistdio/test-u16-vsnprintf1.c: Include progname.h.
110340         (main): Call set_program_name.
110342         * modules/unistdio/u32-vsprintf-tests (Depends-on): Add progname.
110343         * tests/unistdio/test-u32-vsprintf1.c: Include progname.h.
110344         (main): Call set_program_name.
110346         * modules/unistdio/u32-vsnprintf-tests (Depends-on): Add progname.
110347         * tests/unistdio/test-u32-vsnprintf1.c: Include progname.h.
110348         (main): Call set_program_name.
110350         * modules/unistdio/ulc-vsprintf-tests (Depends-on): Add progname.
110351         * tests/unistdio/test-ulc-vsprintf1.c: Include progname.h.
110352         (main): Call set_program_name.
110354         * modules/unistdio/ulc-vsnprintf-tests (Depends-on): Add progname.
110355         * tests/unistdio/test-ulc-vsnprintf1.c: Include progname.h.
110356         (main): Call set_program_name.
110358 2009-01-19  Eric Blake  <ebb9@byu.net>
110360         test-unistd: test previous patch
110361         * tests/test-unistd.c: Test *_FILENO macros.
110363         unistd: guarantee STDIN_FILENO here, for OS/2 EMX
110364         * lib/unistd.in.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
110365         Guarantee a definition.
110366         * doc/posix-headers/unistd.texi (unistd.h): Document the bug.
110367         * modules/unistd-safer (Depends-on): Add dependency on unistd.
110368         * lib/c-stack.c (STDERR_FILENO): Rely on <unistd.h>.
110369         * lib/dup-safer.c (STDERR_FILENO): Likewise.
110370         * lib/execute.c (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
110371         Likewise.
110372         * lib/fd-safer.c (STDIN_FILENO, STDERR_FILENO): Likewise.
110373         * lib/fopen-safer.c (STDERR_FILENO): Likewise.
110374         * lib/pipe.c (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
110375         Likewise.
110376         * lib/tmpfile-safer.c (STDERR_FILENO): Likewise.
110377         * tests/test-posix_spawn1.c (STDIN_FILENO, STDOUT_FILENO)
110378         (STDERR_FILENO): Likewise.
110379         * tests/test-posix_spawn2.c (STDIN_FILENO, STDOUT_FILENO)
110380         (STDERR_FILENO): Likewise.
110381         * tests/test-posix_spawn3.c (STDIN_FILENO, STDOUT_FILENO)
110382         (STDERR_FILENO): Likewise.
110383         Reported by Elbert Pol.
110385 2009-01-19  Eric Blake  <ebb9@byu.net>
110387         doc: mention more functions added in cygwin 1.7.0
110388         * doc/posix-functions/abort.texi (abort): Update wording related
110389         to cygwin.
110390         * doc/posix-functions/daylight.texi (daylight): Likewise.
110391         * doc/posix-functions/optarg.texi (optarg): Likewise.
110392         * doc/posix-functions/optarg.texi (opterr): Likewise.
110393         * doc/posix-functions/optarg.texi (optind): Likewise.
110394         * doc/posix-functions/optarg.texi (optopt): Likewise.
110395         * doc/posix-functions/wprintf.texi (wprintf): Cygwin wprintf never
110396         worked in 1.5.x, and was withdrawn in 1.7.
110397         * doc/posix-functions/vwprintf.texi (vwprintf): Likewise.
110398         * doc/posix-functions/fprintf.texi (fprintf): Tighten mention of
110399         cygwin versions.
110400         * doc/posix-functions/perror.texi (perror): Likewise.
110401         * doc/posix-functions/printf.texi (printf): Likewise.
110402         * doc/posix-functions/snprintf.texi (snprintf): Likewise.
110403         * doc/posix-functions/sprintf.texi (sprintf): Likewise.
110404         * doc/posix-functions/vfprintf.texi (vfprintf): Likewise.
110405         * doc/posix-functions/vprintf.texi (vprintf): Likewise.
110406         * doc/posix-functions/vsnprintf.texi (vsnprintf): Likewise.
110407         * doc/posix-functions/vsprintf.texi (vsprintf): Likewise.
110408         * doc/glibc-functions/obstack_printf.texi (obstack_printf):
110409         Likewise.
110410         * doc/glibc-functions/obstack_vprintf.texi (obstack_vprintf):
110411         Likewise.
110412         * doc/glibc-functions/cfmakeraw.texi (cfmakeraw): Cygwin 1.7 adds
110413         this function.
110414         * doc/glibc-functions/in6addr_any.texi (in6addr_any): Likewise.
110415         * doc/glibc-functions/in6addr_loopback.texi (in6addr_loopback):
110416         Likewise.
110417         * doc/glibc-functions/updwtmpx.texi (updwtmpx): Likewise.
110418         * doc/posix-functions/_Exit_C99.texi (_Exit): Likewise.
110419         * doc/posix-functions/confstr.texi (confstr): Likewise.
110420         * doc/posix-functions/dprintf.texi (dprintf): Likewise.
110421         * doc/posix-functions/fgetwc.texi (fgetwc): Likewise.
110422         * doc/posix-functions/fgetws.texi (fgetws): Likewise.
110423         * doc/posix-functions/fputwc.texi (fputwc): Likewise.
110424         * doc/posix-functions/fputws.texi (fputws): Likewise.
110425         * doc/posix-functions/fwide.texi (fwide): Likewise.
110426         * doc/posix-functions/getwc.texi (getwc): Likewise.
110427         * doc/posix-functions/getwchar.texi (getwchar): Likewise.
110428         * doc/posix-functions/putwc.texi (putwc): Likewise.
110429         * doc/posix-functions/putwchar.texi (putwchar): Likewise.
110430         * doc/posix-functions/sigignore.texi (sigignore): Likewise.
110431         * doc/posix-functions/ungetwc.texi (ungetwc): Likewise.
110432         * doc/posix-functions/vdprintf.texi (vdprintf): Likewise.
110433         * doc/posix-functions/wcpcpy.texi (wcpcpy): Likewise.
110434         * doc/posix-functions/wcpncpy.texi (wcpncpy): Likewise.
110435         * doc/posix-functions/wcstol.texi (wcstol): Likewise.
110436         * doc/posix-functions/wcstoll.texi (wcstoll): Likewise.
110437         * doc/posix-functions/wcstoul.texi (wcstoul): Likewise.
110438         * doc/posix-functions/wcstoull.texi (wcstoull): Likewise.
110439         * doc/posix-functions/wcsxfrm.texi (wcsxfrm): Likewise.
110441 2009-01-19  Daniel P. Berrange  <berrange@redhat.com>
110443         ioctl: avoid warning: no previous prototype for 'rpl_ioctl'
110444         * lib/ioctl.c: Include <sys/ioctl.h>.
110446 2009-01-19  Simon Josefsson  <simon@josefsson.org>
110448         * modules/getdate-tests (Depends-on): Add progname.
110449         * tests/test-getdate.c: Use progname module, to avoid link errors
110450         on non-glibc systems.
110452 2009-01-18  Simon Josefsson  <simon@josefsson.org>
110454         * modules/filenamecat-tests (Depends-on): Add progname.
110455         * modules/fstrcmp-tests (Depends-on): Likewise.
110457         * tests/test-filenamecat.c: Use progname module, to avoid link
110458         errors on non-glibc systems.
110459         * tests/test-fstrcmp.c: Likewise.
110461 2009-01-19  Daniel P. Berrange  <berrange@redhat.com>
110463         gettimeofday: avoid warning: nested extern declaration of 'localtime'
110464         * lib/gettimeofday.c: Move extern declaration out of function.
110466 2009-01-18  Bruno Haible  <bruno@clisp.org>
110468         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't test for mblen and mbrlen.
110469         * lib/strftime.c (HAVE_MBLEN, HAVE_MBRLEN): Remove macros.
110470         (MULTIBYTE_IS_FORMAT_SAFE): Define to 1 on all platforms except OSF/1.
110472 2009-01-18  Bruno Haible  <bruno@clisp.org>
110474         * lib/strftime.c (MEMPCPY): Remove unused macro.
110475         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't test for mempcpy.
110477 2009-01-18  Martin Lambers  <marlam@marlam.de>
110479         New module 'link'.
110480         * lib/unistd.in.h (link): New declaration.
110481         * lib/link.c: New file.
110482         * m4/link.m4: New file.
110483         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_LINK,
110484         HAVE_LINK.
110485         * modules/unistd (Makefile.am): Substitute GNULIB_LINK, HAVE_LINK.
110486         * modules/link: New file.
110487         * doc/posix-functions/link.texi: Mention the new module.
110489 2009-01-18  Bruno Haible  <bruno@clisp.org>
110491         * tests/test-avltree_list.c (main): Call set_program_name.
110492         * tests/test-avltree_oset.c (main): Likewise.
110493         * tests/test-obstack-printf.c: Include progname.h.
110494         (main): Call set_program_name.
110495         * tests/test-quotearg.c: Include progname.h.
110496         (main): Call set_program_name.
110497         * tests/test-xmemdup0.c: Include progname.h.
110498         (main): Call set_program_name.
110500 2009-01-18  Bruno Haible  <bruno@clisp.org>
110502         New module 'alphasort'.
110503         * lib/dirent.in.h (alphasort): New declaration.
110504         * lib/alphasort.c: New file, from glibc with modifications.
110505         * m4/alphasort.m4: New file.
110506         * modules/alphasort: New file.
110507         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Initialize GNULIB_ALPHASORT,
110508         HAVE_ALPHASORT.
110509         * modules/dirent (Makefile.am): Substitute GNULIB_ALPHASORT,
110510         HAVE_ALPHASORT.
110511         * doc/posix-functions/alphasort.texi: Mention the new module and the
110512         portability problems.
110514 2009-01-18  Bruno Haible  <bruno@clisp.org>
110516         New module 'scandir'.
110517         * lib/dirent.in.h (scandir): New declaration.
110518         * lib/scandir.c: New file, from glibc with modifications.
110519         * m4/scandir.m4: New file.
110520         * modules/scandir: New file.
110521         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Initialize GNULIB_SCANDIR,
110522         HAVE_SCANDIR.
110523         * modules/dirent (Makefile.am): Substitute GNULIB_SCANDIR,
110524         HAVE_SCANDIR.
110525         * doc/posix-functions/scandir.texi: Mention the new module and the
110526         portability problems.
110528 2009-01-17  Bruno Haible  <bruno@clisp.org>
110530         * gnulib-tool (func_remove_prefix): Escape all dots in the prefix.
110531         Update documentation.
110532         (func_remove_suffix): Escape all dots in the suffix. Update
110533         documentation.
110534         (func_filter_filelist): Update documentation.
110535         Reported by Ralf Wildenhues.
110537 2009-01-17  Bruno Haible  <bruno@clisp.org>
110539         * modules/dprintf-posix-tests: New file.
110540         * tests/test-dprintf-posix.sh: New file.
110541         * tests/test-dprintf-posix.c: New file.
110543         New modules 'dprintf', 'dprintf-posix'.
110544         * lib/stdio.in.h (dprintf): New declaration.
110545         * lib/dprintf.c: New file.
110546         * m4/dprintf.m4: New file.
110547         * m4/dprintf-posix.m4: New file.
110548         * modules/dprintf: New file.
110549         * modules/dprintf-posix: New file.
110550         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize GNULIB_DPRINTF,
110551         HAVE_DPRINTF, REPLACE_DPRINTF.
110552         * modules/stdio (Makefile.am): Substitute also GNULIB_DPRINTF,
110553         HAVE_DPRINTF, REPLACE_DPRINTF.
110554         * doc/posix-functions/dprintf.texi: Mention the new modules.
110556 2009-01-17  Bruno Haible  <bruno@clisp.org>
110558         * modules/vdprintf-posix-tests: New file.
110559         * tests/test-vdprintf-posix.sh: New file.
110560         * tests/test-vdprintf-posix.c: New file.
110562         New modules 'vdprintf', 'vdprintf-posix'.
110563         * lib/stdio.in.h (vdprintf): New declaration.
110564         * lib/vdprintf.c: New file.
110565         * m4/vdprintf.m4: New file.
110566         * m4/vdprintf-posix.m4: New file.
110567         * modules/vdprintf: New file.
110568         * modules/vdprintf-posix: New file.
110569         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize GNULIB_VDPRINTF,
110570         HAVE_VDPRINTF, REPLACE_VDPRINTF.
110571         * modules/stdio (Makefile.am): Substitute also GNULIB_VDPRINTF,
110572         HAVE_VDPRINTF, REPLACE_VDPRINTF.
110573         * doc/posix-functions/vdprintf.texi: Mention the new modules.
110575 2009-01-17  Bruno Haible  <bruno@clisp.org>
110577         Fix replacement of fopen on mingw.
110578         * m4/fopen.m4 (gl_FUNC_FOPEN): Define FOPEN_TRAILING_SLASH_BUG also on
110579         mingw.
110581 2009-01-17  Bruno Haible  <bruno@clisp.org>
110583         Fix compilation error on HP-UX 11.00, present since 2008-09-24.
110584         * lib/fopen.c: Include <sys/types.h> and <sys/types.h>.
110586 2009-01-17  Bruno Haible  <bruno@clisp.org>
110588         Avoid test-fflush2.sh failure on mingw.
110589         * tests/test-fflush2.c: Include binary-io.h.
110590         (main): Put standard input into binary mode.
110591         * modules/fflush-tests (Depends-on): Add binary-io.
110593 2009-01-17  Bruno Haible  <bruno@clisp.org>
110595         * lib/wchar.in.h: In another particular situation, include only the
110596         system's <wchar.h> file.
110597         (_GL_ALREADY_INCLUDING_WCHAR_H): New macro.
110598         Reported by Albert Chin-A-Young <china@thewrittenword.com>
110599         and Thomas Guyot-Sionnest <dermoth@aei.ca>.
110601 2009-01-17  Bruno Haible  <bruno@clisp.org>
110603         Support for stripping executables in --enable-relocatable.
110604         * build-aux/install-reloc: Expect one more argument, or an environment
110605         variable RELOC_STRIP_PROG. If set, strip the destination program and
110606         its wrapper.
110607         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): In INSTALL_PROGRAM_ENV, set
110608         RELOC_STRIP_PROG.
110609         * doc/relocatable-maint.texi (Supporting Relocation): Mention the need
110610         to set RELOCATABLE_STRIP.
110611         * NEWS: Mention the new Makefile requirement.
110613 2009-01-17  Bruno Haible  <bruno@clisp.org>
110615         * build-aux/install-reloc: Remove debugging information left over by
110616         C compiler on MacOS X.
110618 2009-01-17  Bruno Haible  <bruno@clisp.org>
110620         Update use of _NSGetExecutablePath after API change in MacOS X 10.4.
110621         * lib/progreloc.c (find_executable): Fix type of pointer passed to
110622         _NSGetExecutablePath.
110624 2009-01-16  Jim Meyering  <meyering@redhat.com>
110626         strerror: avoid warnings about discarding "const"
110627         * lib/strerror.c (rpl_strerror): Instead of returning a const
110628         string from each and every "case", use a variable, and add a single
110629         cast after the switch.
110631 2009-01-16  Albert Chin-A-Young  <china@thewrittenword.com>
110633         * lib/arpa_inet.in.h: Add extern "C" block for C++.
110635 2009-01-16  Bruno Haible  <bruno@clisp.org>
110637         * m4/printf.m4 (gl_SNPRINTF_SIZE1, gl_VSNPRINTF_ZEROSIZE_C99): Use an
110638         array initializer syntax that also works in C++ mode.
110639         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
110641 2009-01-16  Jim Meyering  <meyering@redhat.com>
110643         poll: suppress a warning
110644         * lib/poll.c: Use #pragma GCC diagnostic ignored "-Wtype-limits"
110645         to ignore "...unsigned expression < 0 is always false" warnings.
110647 2009-01-16  Daniel P. Berrange  <berrange@redhat.com>
110649         poll: remove declarations of unused variables
110650         * lib/poll.c (poll) [WIN32_NATIVE]: Remove declarations of unused
110651         sockbuf and optlen.
110653 2009-01-15  Bruno Haible  <bruno@clisp.org>
110655         Make fflush-after-ungetc POSIX compliant on BSD systems.
110656         * lib/fflush.c (clear_ungetc_buffer_preserving_position): New function.
110657         (clear_ungetc_buffer): Implement also for other systems.
110658         (rpl_fflush): On glibc systems, invoke
110659         clear_ungetc_buffer_preserving_position. Otherwise, invoke
110660         clear_ungetc_buffer after fetching the stream's position, not before.
110662 2009-01-15  Bruno Haible  <bruno@clisp.org>
110664         Make fflush-after-ungetc POSIX compliant on glibc systems.
110665         * m4/fflush.m4 (gl_FUNC_FFLUSH): Test also the behaviour of fflush
110666         after ungetc.
110667         * lib/fflush.c (clear_ungetc_buffer): Implement for glibc systems.
110668         (rpl_fflush): On glibc systems, simply call the system's fflush
110669         function after clearing the ungetc buffer.
110670         * lib/fseeko.c (rpl_fseeko): Don't try to lseek past the end of file.
110671         Instead, lseek only to the end of file, then use the system's fseeko
110672         for the rest. On glibc systems, reset the EOF indicator bit.
110674 2009-01-15  Jim Meyering  <meyering@redhat.com>
110676         openmp.m4: revert quote-adding change, for portability to older autoconf
110677         * m4/openmp.m4: Remove the quotes added on 2009-01-14.
110678         This reverts part of 42d1eda5dcce2d68deab7a642e7f29bcd7144a0d.
110679         Simon Josefsson noticed the problem when using autoconf-2.61.
110681 2009-01-15  Bruno Haible  <bruno@clisp.org>
110683         * tests/test-fflush2.sh: Invoke test-fflush2 twice.
110684         * tests/test-fflush2.c (ASSERT): Always fail.
110685         (main): Add two tests for fflush() after ungetc(), taking into account
110686         the Austin Group's clarification.
110687         Suggested by Eric Blake.
110689 2009-01-15  Albert Chin-A-Young  <china@thewrittenword.com>
110691         mktime.m4: remove K&R-style function prototypes
110692         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove K&R-style function prototypes
110693         for the Sun C++ compiler.
110695 2009-01-14  Bruno Haible  <bruno@clisp.org>
110697         * lib/stdint.in.h (_GL_JUST_INCLUDE_SYSTEM_WCHAR_H): New macro, defined
110698         while including <wchar.h>.
110699         * lib/wchar.in.h: In two particular situations on HP-UX, include only
110700         the system's <wchar.h> file.
110701         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
110703 2009-01-14  Bruno Haible  <bruno@clisp.org>
110705         * m4/csharp.m4: Don't mention gettext on the serial number line.
110706         * m4/csharpexec.m4: Likewise.
110707         * m4/eaccess.m4: Likewise.
110708         * m4/javaexec.m4: Likewise.
110709         * m4/sig_atomic_t.m4: Likewise.
110710         * m4/tmpdir.m4: Likewise.
110711         * m4/intldir.m4: Bump gettext version.
110712         * m4/lib-ld.m4: Likewise.
110714 2009-01-14  Bruno Haible  <bruno@clisp.org>
110716         * lib/progname.c (set_program_name): Add more comments.
110717         Reported by Sergey Poznyakoff <gray@gnu.org.ua>.
110719 2009-01-14  Simon Josefsson  <simon@josefsson.org>
110721         * lib/sys_stat.in.h: Include sys/types.h for nlink_t on systems
110722         were sys/stat.h does not define it.
110724 2009-01-14  Jim Meyering  <meyering@redhat.com>
110726         many *.m4 files: improve m4 quoting
110727         99% of this change was performed by running the following commands:
110728         git ls-files | grep '\.m4$' | xargs perl -pi \
110729           -e 's/(AC_\w+\()([^[()]+?)([,)])/$1\[$2]$3/g;' \
110730           -e 's/(AC_\w+\((?:\[[^,]+?\], ){1})([^,[()]+?)([,)])/$1\[$2]$3/g;' \
110731           -e 's/(AC_\w+\((?:\[[^,]+?\], ){2})([^,[()]+?)([,)])/$1\[$2]$3/g;' \
110732           -e 's/(AC_\w+\((?:\[[^,]+?\], ){3})([^,[()]+?)([,)])/$1\[$2]$3/g'
110733         perl -pi -e 's/\[\.\.\.\]/.../' m4/onceonly.m4
110734         The remainder were to add Copyright dates, increment serial numbers,
110735         undo some changes in comments, exclude m4/intl.m4, and add quotes
110736         around the "1" in ",1" where the unusual spacing prohibited the
110737         above regexps from doing the job.  For more details, see
110738         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/16175>.
110739         * m4/acl.m4: Modified.
110740         * m4/afs.m4: Likewise.
110741         * m4/alloca.m4: Likewise.
110742         * m4/argp.m4: Likewise.
110743         * m4/argz.m4: Likewise.
110744         * m4/atexit.m4: Likewise.
110745         * m4/bison-i18n.m4: Likewise.
110746         * m4/bison.m4: Likewise.
110747         * m4/byteswap.m4: Likewise.
110748         * m4/c-stack.m4: Likewise.
110749         * m4/c-strtod.m4: Likewise.
110750         * m4/calloc.m4: Likewise.
110751         * m4/canonicalize-lgpl.m4: Likewise.
110752         * m4/chown.m4: Likewise.
110753         * m4/clock_time.m4: Likewise.
110754         * m4/codeset.m4: Likewise.
110755         * m4/copy-file.m4: Likewise.
110756         * m4/csharp.m4: Likewise.
110757         * m4/csharpcomp.m4: Likewise.
110758         * m4/csharpexec.m4: Likewise.
110759         * m4/d-ino.m4: Likewise.
110760         * m4/d-type.m4: Likewise.
110761         * m4/dirfd.m4: Likewise.
110762         * m4/double-slash-root.m4: Likewise.
110763         * m4/eaccess.m4: Likewise.
110764         * m4/eealloc.m4: Likewise.
110765         * m4/environ.m4: Likewise.
110766         * m4/errno_h.m4: Likewise.
110767         * m4/euidaccess.m4: Likewise.
110768         * m4/execute.m4: Likewise.
110769         * m4/fatal-signal.m4: Likewise.
110770         * m4/fchdir.m4: Likewise.
110771         * m4/fcntl_h.m4: Likewise.
110772         * m4/fileblocks.m4: Likewise.
110773         * m4/filenamecat.m4: Likewise.
110774         * m4/findprog.m4: Likewise.
110775         * m4/flexmember.m4: Likewise.
110776         * m4/fnmatch.m4: Likewise.
110777         * m4/fopen.m4: Likewise.
110778         * m4/fpending.m4: Likewise.
110779         * m4/fprintf-posix.m4: Likewise.
110780         * m4/free.m4: Likewise.
110781         * m4/frexp.m4: Likewise.
110782         * m4/frexpl.m4: Likewise.
110783         * m4/fsusage.m4: Likewise.
110784         * m4/ftruncate.m4: Likewise.
110785         * m4/gc-camellia.m4: Likewise.
110786         * m4/gc-random.m4: Likewise.
110787         * m4/gc.m4: Likewise.
110788         * m4/getaddrinfo.m4: Likewise.
110789         * m4/getcwd-abort-bug.m4: Likewise.
110790         * m4/getcwd-path-max.m4: Likewise.
110791         * m4/getdate.m4: Likewise.
110792         * m4/getdomainname.m4: Likewise.
110793         * m4/getgroups.m4: Likewise.
110794         * m4/gethostname.m4: Likewise.
110795         * m4/gethrxtime.m4: Likewise.
110796         * m4/getline.m4: Likewise.
110797         * m4/getloadavg.m4: Likewise.
110798         * m4/getndelim2.m4: Likewise.
110799         * m4/getpass.m4: Likewise.
110800         * m4/gettext.m4: Likewise.
110801         * m4/gettime.m4: Likewise.
110802         * m4/gettimeofday.m4: Likewise.
110803         * m4/gnulib-common.m4: Likewise.
110804         * m4/group-member.m4: Likewise.
110805         * m4/host-os.m4: Likewise.
110806         * m4/iconv.m4: Likewise.
110807         * m4/iconv_open.m4: Likewise.
110808         * m4/inet_ntop.m4: Likewise.
110809         * m4/inet_pton.m4: Likewise.
110810         * m4/inline.m4: Likewise.
110811         * m4/intldir.m4: Likewise.
110812         * m4/intlmacosx.m4: Likewise.
110813         * m4/intmax.m4: Likewise.
110814         * m4/intmax_t.m4: Likewise.
110815         * m4/inttypes.m4: Likewise.
110816         * m4/inttypes_h.m4: Likewise.
110817         * m4/inttypes-pri.m4: Likewise.
110818         * m4/isapipe.m4: Likewise.
110819         * m4/isnand.m4: Likewise.
110820         * m4/isnanf.m4: Likewise.
110821         * m4/isnanl.m4: Likewise.
110822         * m4/javacomp.m4: Likewise.
110823         * m4/javaexec.m4: Likewise.
110824         * m4/jm-winsz1.m4: Likewise.
110825         * m4/jm-winsz2.m4: Likewise.
110826         * m4/lchown.m4: Likewise.
110827         * m4/lcmessage.m4: Likewise.
110828         * m4/ldexpl.m4: Likewise.
110829         * m4/lib-ld.m4: Likewise.
110830         * m4/lib-link.m4: Likewise.
110831         * m4/libsigsegv.m4: Likewise.
110832         * m4/link-follow.m4: Likewise.
110833         * m4/localcharset.m4: Likewise.
110834         * m4/locale-fr.m4: Likewise.
110835         * m4/locale-ja.m4: Likewise.
110836         * m4/locale-tr.m4: Likewise.
110837         * m4/locale-zh.m4: Likewise.
110838         * m4/lock.m4: Likewise.
110839         * m4/longlong.m4: Likewise.
110840         * m4/ls-mntd-fs.m4: Likewise.
110841         * m4/lstat.m4: Likewise.
110842         * m4/malloc.m4: Likewise.
110843         * m4/mathl.m4: Likewise.
110844         * m4/mbrtowc.m4: Likewise.
110845         * m4/mbstate_t.m4: Likewise.
110846         * m4/mbswidth.m4: Likewise.
110847         * m4/memchr.m4: Likewise.
110848         * m4/memcmp.m4: Likewise.
110849         * m4/memcpy.m4: Likewise.
110850         * m4/memmem.m4: Likewise.
110851         * m4/memmove.m4: Likewise.
110852         * m4/mempcpy.m4: Likewise.
110853         * m4/memrchr.m4: Likewise.
110854         * m4/memset.m4: Likewise.
110855         * m4/minmax.m4: Likewise.
110856         * m4/mkdir-slash.m4: Likewise.
110857         * m4/mkdtemp.m4: Likewise.
110858         * m4/mktime.m4: Likewise.
110859         * m4/mmap-anon.m4: Likewise.
110860         * m4/mountlist.m4: Likewise.
110861         * m4/nanosleep.m4: Likewise.
110862         * m4/nls.m4: Likewise.
110863         * m4/nocrash.m4: Likewise.
110864         * m4/open.m4: Likewise.
110865         * m4/openat.m4: Likewise.
110866         * m4/openmp.m4: Likewise.
110867         * m4/pathmax.m4: Likewise.
110868         * m4/perl.m4: Likewise.
110869         * m4/physmem.m4: Likewise.
110870         * m4/pipe.m4: Likewise.
110871         * m4/po.m4: Likewise.
110872         * m4/poll.m4: Likewise.
110873         * m4/posixtm.m4: Likewise.
110874         * m4/posixver.m4: Likewise.
110875         * m4/printf-frexp.m4: Likewise.
110876         * m4/printf-frexpl.m4: Likewise.
110877         * m4/printf-posix.m4: Likewise.
110878         * m4/printf-posix-rpl.m4: Likewise.
110879         * m4/printf.m4: Likewise.
110880         * m4/progtest.m4: Likewise.
110881         * m4/putenv.m4: Likewise.
110882         * m4/readline.m4: Likewise.
110883         * m4/readlink.m4: Likewise.
110884         * m4/readutmp.m4: Likewise.
110885         * m4/realloc.m4: Likewise.
110886         * m4/regex.m4: Likewise.
110887         * m4/relocatable.m4: Likewise.
110888         * m4/relocatable-lib.m4: Likewise.
110889         * m4/rename-dest-slash.m4: Likewise.
110890         * m4/rename.m4: Likewise.
110891         * m4/rmdir-errno.m4: Likewise.
110892         * m4/rmdir.m4: Likewise.
110893         * m4/roundf.m4: Likewise.
110894         * m4/roundl.m4: Likewise.
110895         * m4/rpmatch.m4: Likewise.
110896         * m4/save-cwd.m4: Likewise.
110897         * m4/selinux-selinux-h.m4: Likewise.
110898         * m4/setenv.m4: Likewise.
110899         * m4/settime.m4: Likewise.
110900         * m4/sig2str.m4: Likewise.
110901         * m4/sig_atomic_t.m4: Likewise.
110902         * m4/signalblocking.m4: Likewise.
110903         * m4/signbit.m4: Likewise.
110904         * m4/sigpipe.m4: Likewise.
110905         * m4/sockets.m4: Likewise.
110906         * m4/sockpfaf.m4: Likewise.
110907         * m4/st_dm_mode.m4: Likewise.
110908         * m4/stat-time.m4: Likewise.
110909         * m4/stdbool.m4: Likewise.
110910         * m4/stdint.m4: Likewise.
110911         * m4/stdint_h.m4: Likewise.
110912         * m4/stpcpy.m4: Likewise.
110913         * m4/stpncpy.m4: Likewise.
110914         * m4/strcase.m4: Likewise.
110915         * m4/strchrnul.m4: Likewise.
110916         * m4/strcspn.m4: Likewise.
110917         * m4/strdup.m4: Likewise.
110918         * m4/strftime.m4: Likewise.
110919         * m4/strndup.m4: Likewise.
110920         * m4/strnlen.m4: Likewise.
110921         * m4/strpbrk.m4: Likewise.
110922         * m4/strptime.m4: Likewise.
110923         * m4/strsep.m4: Likewise.
110924         * m4/strtod.m4: Likewise.
110925         * m4/strtoimax.m4: Likewise.
110926         * m4/strtok_r.m4: Likewise.
110927         * m4/strtol.m4: Likewise.
110928         * m4/strtoll.m4: Likewise.
110929         * m4/strtoul.m4: Likewise.
110930         * m4/strtoull.m4: Likewise.
110931         * m4/strtoumax.m4: Likewise.
110932         * m4/strverscmp.m4: Likewise.
110933         * m4/threadlib.m4: Likewise.
110934         * m4/timegm.m4: Likewise.
110935         * m4/tm_gmtoff.m4: Likewise.
110936         * m4/tmpdir.m4: Likewise.
110937         * m4/tmpfile.m4: Likewise.
110938         * m4/tzset.m4: Likewise.
110939         * m4/uintmax_t.m4: Likewise.
110940         * m4/unlinkdir.m4: Likewise.
110941         * m4/unlocked-io.m4: Likewise.
110942         * m4/uptime.m4: Likewise.
110943         * m4/userspec.m4: Likewise.
110944         * m4/utimbuf.m4: Likewise.
110945         * m4/utime.m4: Likewise.
110946         * m4/utimes-null.m4: Likewise.
110947         * m4/utimes.m4: Likewise.
110948         * m4/vararrays.m4: Likewise.
110949         * m4/vasnprintf.m4: Likewise.
110950         * m4/vfprintf-posix.m4: Likewise.
110951         * m4/vprintf-posix.m4: Likewise.
110952         * m4/wait-process.m4: Likewise.
110953         * m4/wchar_t.m4: Likewise.
110954         * m4/wint_t.m4: Likewise.
110955         * m4/write-any-file.m4: Likewise.
110956         * m4/yield.m4: Likewise.
110958 2009-01-13  Bruno Haible  <bruno@clisp.org>
110960         Avoid test-copy-file.sh failures when ACL support insufficient.
110961         * modules/copy-file-tests (Makefile.am): Pass USE_ACL in
110962         TESTS_ENVIRONMENT.
110963         * tests/test-copy-file.sh: Skip the ACL comparisons if USE_ACL is 0.
110964         Reported by Jim Meyering.
110966 2009-01-13  Bruno Haible  <bruno@clisp.org>
110968         * modules/unistdio/u-printf-args (Files): Add m4/stdint_h.m4 and
110969         m4/inttypes_h.m4, needed by m4/intmax_t.m4.
110970         * modules/unistdio/u8-printf-parse (Files): Likewise.
110971         * modules/unistdio/u32-printf-parse (Files): Likewise.
110972         * modules/unistdio/ulc-printf-parse (Files): Likewise.
110974 2009-01-13  Simon Josefsson  <simon@josefsson.org>
110976         * modules/unistdio/u16-printf-parse (Files): Add m4/stdint_h.m4
110977         and m4/inttypes_h.m4 too.
110979 2009-01-12  Eric Blake  <ebb9@byu.net>
110981         tests: IRIX 6.2 cc can't compile -0.0 into .data
110982         * tests/test-ceill.c (minus_zero): Compute -0.0L at runtime,
110983         rather than at compile-time.
110984         * tests/test-floorl.c (minus_zero): Likewise.
110985         * tests/test-frexpl.c (minus_zero): Likewise.
110986         * tests/test-isnan.c (minus_zerol): Likewise.
110987         * tests/test-isnanl.h (minus_zero): Likewise.
110988         * tests/test-ldexpl.c (minus_zero): Likewise.
110989         * tests/test-roundl.c (minus_zero): Likewise.
110990         * tests/test-signbit.c (minus_zerol): Likewise.
110991         * tests/test-snprintf-posix.h (minus_zerol): Likewise.
110992         * tests/test-sprintf-posix.h (minus_zerol): Likewise.
110993         * tests/test-truncl.c (minus_zero): Likewise.
110994         * tests/test-vasnprintf-posix.c (minus_zerol): Likewise.
110995         * tests/test-vasprintf-posix.c (minus_zerol): Likewise.
110996         Reported by Tom G. Christensen and Nelson H. F. Beebe.
110998 2009-01-09  Paolo Bonzini  <bonzini@gnu.org>
111000         regex: fix glibc bug 9697
111001         * lib/regcomp.c (re_compile_fastmap_iter): Rewrite COMPLEX_BRACKET
111002         handling.
111004 2009-01-09  Paolo Bonzini  <bonzini@gnu.org>
111006         regex: fix glibc bug 697
111007         * lib/regexec.c (prune_impossible_nodes): Handle sifted_states[0]
111008         being NULL also if there are no backreferences.
111010 2009-01-09  Paolo Bonzini  <bonzini@gnu.org>
111012         regex: merge glibc changes
111013         * lib/regcomp.c (re_compile_fastmap_iter): Use __mbrtowc.
111014         * lib/regex_internal.c (build_wcs_buffer, build_wcs_upper_buffer,
111015         re_string_skip_chars, re_string_reconstruct): Likewise.
111016         * lib/regex_internal.h [!_LIBC] (__mbrtowc): New #define.
111018 2009-01-07  Jim Meyering  <meyering@redhat.com>
111020         poll: filter through cppi
111021         * lib/poll.c: Indent cpp directives to reflect nesting.
111023 2009-01-07  Daniel P. Berrange  <berrange@redhat.com>
111025         poll: don't return uninitialized
111026         * lib/poll.c (poll) [WIN32_NATIVE]: Initialize "rc".
111028 2009-01-06  Jeremy Olexa  <darkside@gentoo.org>  (tiny change)
111030         avoid compile failure on AIX 6.1
111031         * lib/getloadavg.c [HAVE_LIBPERFSTAT]: Include <sys/protosw.h>.
111032         Details in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/15465
111034 2009-01-04  Jim Meyering  <meyering@redhat.com>
111036         remove duplicate inclusion of <stdio.h>
111037         * tests/test-fprintf-posix.c: Likewise.
111038         * tests/test-printf-posix.c: Likewise.
111039         * tests/test-snprintf-posix.c: Likewise.
111040         * tests/test-sprintf-posix.c: Likewise.
111041         * tests/test-vasprintf-posix.c: Likewise.
111042         * tests/test-vfprintf-posix.c: Likewise.
111043         * tests/test-vprintf-posix.c: Likewise.
111044         * tests/test-vsnprintf-posix.c: Likewise.
111045         * tests/test-vsprintf-posix.c: Likewise.
111047 2009-01-03  Jim Meyering  <meyering@redhat.com>
111049         gnulib-tool: fix sed-based filtering
111050         * gnulib-tool (func_filter_filelist): Remove extra backslash
111051         in sed_fff_filter definition.
111053 2009-01-02  Jim Meyering  <meyering@redhat.com>
111055         strftime: avoid compilation failure on Solaris 2.6
111056         * modules/strftime (Depends-on): Add mbrlen and mbsinit.
111057         * lib/strftime.c [DO_MULTIBYTE]: Include <wchar.h> unconditionally.
111058         Don't #define mbrlen or mbsinit, since now they're guaranteed to
111059         be available.  Reported by Tom G. Christensen.  Details in
111060         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/16180>.
111062 2009-01-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
111063             Bruno Haible  <bruno@clisp.org>
111065         Speed up gnulib-tool by doing more string processing through shell
111066         built-ins.
111067         * gnulib-tool (fast_func_append): New variable.
111068         (func_remove_prefix, func_remove_suffix): New functions.
111069         (fast_func_remove_prefix, fast_func_remove_suffix): New variables.
111070         (func_filter_filelist): New function.
111071         (func_get_dependencies): Use func_remove_suffix instead of sed.
111072         (func_get_automake_snippet): Use func_filter_filelist instead of a
111073         subshell and sed invocation.
111075 2009-01-01  Bruno Haible  <bruno@clisp.org>
111077         Fix a security bug.
111078         * gnulib-tool (func_import, import, update): Don't allow the characters
111079         '"', '$', '`', '\' in macro arguments that become part of commands that
111080         are evaluated.
111082 2009-01-01  Bruno Haible  <bruno@clisp.org>
111084         * gnulib-tool (func_reset_sigpipe): Add more comments.
111086 2009-01-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
111088         * gnulib-tool (func_modules_add_dummy, func_emit_lib_Makefile_am,
111089         func_emit_tests_Makefile_am, func_import): Abort loops early if we
111090         already know the answer.
111092 2009-01-01  Jim Meyering  <meyering@redhat.com>
111094         * lib/version-etc.c (version_etc_va): Update copyright year.
111096 2008-12-30  Bruno Haible  <bruno@clisp.org>
111098         * m4/lib-prefix.m4 (AC_LIB_LINKFLAGS_BODY): Don't overwrite
111099         LIB${NAME}_PREFIX when considering the dependencies of lib${name}.
111100         Reported by Charles Wilson <cygwin@cwilson.fastmail.fm>.
111102 2008-12-29  Eric Blake  <ebb9@byu.net>
111104         multiarch: avoid autoconf AC_REQUIRE bug
111105         * m4/multiarch.m4 (gl_MULTIARCH): Split body...
111106         (gl_MULTIARCH_BODY): ...into new macro, to work around bug in Autoconf
111107         2.63 and older.
111108         Reported by Bruno Haible, and analyzed in
111109         http://lists.gnu.org/r/bug-autoconf/2008-12/msg00039.html
111111 2008-12-29  Bruno Haible  <bruno@clisp.org>
111113         * gnulib-tool (func_import): When generating sed-ignore-removed, handle
111114         files in subdirectories correctly.
111115         Reported by Ralf Wildenhues.
111117 2008-12-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
111119         * gnulib-tool (func_update_ignorelist): Use 'join - FILE'
111120         rather than 'join FILE -', for Solaris join.
111122 2008-12-29  Bruno Haible  <bruno@clisp.org>
111124         * m4/codeset.m4 (AM_LANGINFO_CODESET): More systematic m4 argument
111125         quoting.
111126         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
111127         * m4/glibc2.m4 (gt_GLIBC2): Likewise.
111128         * m4/glibc21.m4 (gl_GLIBC21): Likewise.
111129         * m4/iconv.m4 (AM_ICONV_LINK, AM_ICONV): Likewise.
111130         * m4/intdiv0.m4 (gt_INTDIV0): Likewise.
111131         * m4/intlmacosx.m4 (gt_INTL_MACOSX): Likewise.
111132         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Likewise.
111133         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Likewise.
111134         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
111135         * m4/lcmessage.m4 (gt_LC_MESSAGES): Likewise.
111136         * m4/nls.m4 (AM_NLS): Likewise.
111137         * m4/po.m4 (AM_PO_SUBDIRS): Likewise.
111138         * m4/printf-posix.m4 (gt_PRINTF_POSIX): Likewise.
111139         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
111140         * m4/size_max.m4 (gl_SIZE_MAX): Likewise.
111141         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Likewise.
111142         * m4/threadlib.m4 (gl_THREADLIB_BODY): Likewise.
111143         * m4/uintmax_t.m4 (gl_AC_TYPE_UINTMAX_T): Likewise.
111144         * m4/visibility.m4 (gl_VISIBILITY): Likewise.
111145         * m4/wchar_t.m4 (gt_TYPE_WCHAR_T): Likewise.
111146         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
111147         * m4/xsize.m4 (gl_XSIZE): Likewise.
111148         Suggested by Jim Meyering.
111150 2008-11-17  Bruce Korb  <bkorb@gnu.org>
111152         * lib/parse-duration.h: non-iso form accepts years, months weeks, too
111153         * lib/parse-duration.c: use a switch instead of cascading if's.
111155 2008-12-29  Eric Blake  <ebb9@byu.net>
111157         wchar.h: supply WEOF on Irix 5.3
111158         * lib/wchar.in.h (wint_t): Also supply WEOF.
111159         * lib/wctype.in.h (wint_t): Likewise.
111160         * doc/posix-headers/wchar.texi (wchar.h): Document the bug.
111161         * doc/posix-headers/wctype.texi (wctype.h): Likewise.
111162         Reported by Tom G. Christensen.
111164 2008-12-26  Bruno Haible  <bruno@clisp.org>
111166         * m4/multiarch.m4 (gl_MULTIARCH): Recognize also the architecture names
111167         i486, i586, i686.
111169 2008-12-26  Bruno Haible  <bruno@clisp.org>
111171         * lib/stdlib.in.h (struct random_data): Fix indentation of comments.
111173 2008-12-26  Bruno Haible  <bruno@clisp.org>
111175         * lib/stdint.in.h: Move the include of <wchar.h> down until after all
111176         the types are defined. Also conditionalize it on __STDC_LIMIT_MACROS,
111177         not __STDC_CONSTANT_MACROS.
111178         Reported by Nelson H. F. Beebe <beebe@math.utah.edu> via Eric Blake.
111180 2008-12-25  Bruno Haible  <bruno@clisp.org>
111182         Add support for universal builds to vasnprintf.
111183         * m4/printf.m4 (gl_PRINTF_ENOMEM): Require gl_MULTIARCH. In Apple
111184         universal builds, guess no.
111185         * modules/vasnprintf-posix (Depends-on): Add multiarch.
111186         * modules/vasprintf-posix (Depends-on): Likewise.
111187         * modules/fprintf-posix (Depends-on): Likewise.
111188         * modules/vfprintf-posix (Depends-on): Likewise.
111189         * modules/snprintf-posix (Depends-on): Likewise.
111190         * modules/vsnprintf-posix (Depends-on): Likewise.
111191         * modules/sprintf-posix (Depends-on): Likewise.
111192         * modules/vsprintf-posix (Depends-on): Likewise.
111193         * modules/unistdio/u8-vasnprintf (Depends-on): Likewise.
111194         * modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
111195         * modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
111196         * modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
111197         * modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
111198         * modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
111199         * modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
111201         Add support for universal builds to <inttypes.h>.
111202         * lib/inttypes.in.h (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX,
111203         _SCNu64_PREFIX): In Apple
111204         universal builds, define directly, using _LP64.
111205         * m4/inttypes.m4 (gl_INTTYPES_H): In Apple universal builds, set
111206         INT64_MAX_EQ_LONG_MAX and UINT64_MAX_EQ_ULONG_MAX to -1.
111207         * modules/inttypes (Depends-on): Add multiarch.
111208         (Makefile.am): Substitute APPLE_UNIVERSAL_BUILD.
111210         Add support for universal builds to <stdint.h>.
111211         * lib/stdint.in.h (PDFDIFF_MIN, PTRDIFF_MAX, SIZE_MAX): In Apple
111212         universal builds, define directly, using _LP64.
111213         * m4/stdint.m4 (gl_STDINT_TYPE_PROPERTIES): Require gl_MULTIARCH. In
111214         Apple universal builds, don't test for the size and suffix of ptrdiff_t
111215         and size_t.
111216         * modules/stdint (Depends-on): Add multiarch.
111217         (Makefile.am): Substitute APPLE_UNIVERSAL_BUILD.
111219         New module 'multiarch'.
111220         * modules/multiarch: New file.
111221         * m4/multiarch.m4: New file.
111223 2008-12-25  Bruno Haible  <bruno@clisp.org>
111225         * gnulib-tool (func_create_testdir): Avoid failure of mv command.
111227 2008-12-25  Bruno Haible  <bruno@clisp.org>
111229         * modules/btowc (License): Relicense under LGPLv2+.
111230         * modules/mbsinit (License): Likewise.
111231         * modules/mbrtowc (License): Likewise.
111232         * modules/wcrtomb (License): Likewise.
111233         * modules/streq (License): Likewise.
111234         Reported by David Lutterkort <lutter@redhat.com>.
111236 2008-12-23  Bruno Haible  <bruno@clisp.org>
111238         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Fix conditional and comment.
111240 2008-12-23  Bruno Haible  <bruno@clisp.org>
111242         Module getaddrinfo requires linking with $(GETADDRINFO_LIB).
111243         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Put link options into
111244         GETADDRINFO_LIB, not in LIBS.
111245         * modules/getaddrinfo (Link): Set to $(GETADDRINFO_LIB).
111246         * modules/canon-host (Link): Likewise.
111247         * NEWS: Mention the change.
111248         * modules/getaddrinfo-tests (test_getaddrinfo_LDADD): Add the
111249         GETADDRINFO_LIB.
111251 2008-12-22  Bruno Haible  <bruno@clisp.org>
111253         * doc/posix-functions/iswalnum_l.texi: Mention limitation of wchar_t.
111254         * doc/posix-functions/iswalpha_l.texi: Likewise.
111255         * doc/posix-functions/iswblank_l.texi: Likewise.
111256         * doc/posix-functions/iswcntrl_l.texi: Likewise.
111257         * doc/posix-functions/iswctype_l.texi: Likewise.
111258         * doc/posix-functions/iswdigit_l.texi: Likewise.
111259         * doc/posix-functions/iswgraph_l.texi: Likewise.
111260         * doc/posix-functions/iswlower_l.texi: Likewise.
111261         * doc/posix-functions/iswprint_l.texi: Likewise.
111262         * doc/posix-functions/iswpunct_l.texi: Likewise.
111263         * doc/posix-functions/iswspace_l.texi: Likewise.
111264         * doc/posix-functions/iswupper_l.texi: Likewise.
111265         * doc/posix-functions/iswxdigit_l.texi: Likewise.
111266         * doc/posix-functions/mbsnrtowcs.texi: Likewise.
111267         * doc/posix-functions/open_wmemstream.texi: Likewise.
111268         * doc/posix-functions/swscanf.texi: Likewise.
111269         * doc/posix-functions/towctrans_l.texi: Likewise.
111270         * doc/posix-functions/towlower.texi: Likewise.
111271         * doc/posix-functions/towlower_l.texi: Likewise.
111272         * doc/posix-functions/towupper.texi: Likewise.
111273         * doc/posix-functions/towupper_l.texi: Likewise.
111274         * doc/posix-functions/vfwprintf.texi: Likewise.
111275         * doc/posix-functions/vfwscanf.texi: Likewise.
111276         * doc/posix-functions/vswscanf.texi: Likewise.
111277         * doc/posix-functions/vwprintf.texi: Likewise.
111278         * doc/posix-functions/vwscanf.texi: Likewise.
111279         * doc/posix-functions/wcpcpy.texi: Likewise.
111280         * doc/posix-functions/wcpncpy.texi: Likewise.
111281         * doc/posix-functions/wcscasecmp.texi: Likewise.
111282         * doc/posix-functions/wcscasecmp_l.texi: Likewise.
111283         * doc/posix-functions/wcscoll_l.texi: Likewise.
111284         * doc/posix-functions/wcsdup.texi: Likewise.
111285         * doc/posix-functions/wcsncasecmp.texi: Likewise.
111286         * doc/posix-functions/wcsncasecmp_l.texi: Likewise.
111287         * doc/posix-functions/wcsnlen.texi: Likewise.
111288         * doc/posix-functions/wcsnrtombs.texi: Likewise.
111289         * doc/posix-functions/wcsxfrm_l.texi: Likewise.
111290         * doc/posix-functions/wctrans_l.texi: Likewise.
111291         * doc/posix-functions/wctype_l.texi: Likewise.
111292         * doc/glibc-functions/fgetwc_unlocked.texi: Likewise.
111293         * doc/glibc-functions/fgetws_unlocked.texi: Likewise.
111294         * doc/glibc-functions/fputwc_unlocked.texi: Likewise.
111295         * doc/glibc-functions/fputws_unlocked.texi: Likewise.
111296         * doc/glibc-functions/getwc_unlocked.texi: Likewise.
111297         * doc/glibc-functions/getwchar_unlocked.texi: Likewise.
111298         * doc/glibc-functions/putwc_unlocked.texi: Likewise.
111299         * doc/glibc-functions/putwchar_unlocked.texi: Likewise.
111300         * doc/glibc-functions/wcschrnul.texi: Likewise.
111301         * doc/glibc-functions/wcsftime_l.texi: Likewise.
111302         * doc/glibc-functions/wcstod_l.texi: Likewise.
111303         * doc/glibc-functions/wcstof_l.texi: Likewise.
111304         * doc/glibc-functions/wcstol_l.texi: Likewise.
111305         * doc/glibc-functions/wcstold_l.texi: Likewise.
111306         * doc/glibc-functions/wcstoll_l.texi: Likewise.
111307         * doc/glibc-functions/wcstoq.texi: Likewise.
111308         * doc/glibc-functions/wcstoul_l.texi: Likewise.
111309         * doc/glibc-functions/wcstoull_l.texi: Likewise.
111310         * doc/glibc-functions/wcstouq.texi: Likewise.
111311         * doc/glibc-functions/wmempcpy.texi: Likewise.
111313 2008-12-22  Ingo Weinhold  <ingo_weinhold@gmx.de>  (tiny change)
111314             Eric Blake  <ebb9@byu.net>
111315             Paolo Bonzini  <bonzini@gnu.org>
111316             Bruno Haible  <bruno@clisp.org>
111318         Make c-stack work on Haiku.
111319         * lib/c-stack.c (SA_ONSTACK): Define fallback.
111320         (c_stack_action): Use SA_ONSTACK flag.
111322 2008-12-22  Bruno Haible  <bruno@clisp.org>
111324         * m4/locale-fr.m4 (gt_LOCALE_FR_UTF8): Treat Haiku like BeOS.
111326 2008-12-22  Bruno Haible  <bruno@clisp.org>
111328         Work around mbrlen() bugs on AIX, HP-UX, OSF/1, Solaris.
111329         * m4/mbrlen.m4 (gl_FUNC_MBRLEN): Set REPLACE_MBRLEN if mbrtowc is
111330         being overridden.
111331         (gl_MBRLEN_INCOMPLETE_STATE, gl_MBRLEN_RETVAL, gl_MBRLEN_NUL_RETVAL):
111332         New macros.
111333         * lib/wchar.in.h (mbrlen): Override if REPLACE_MBRLEN is set.
111334         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_MBRLEN.
111335         * modules/wchar (Makefile.am): Substitute REPLACE_MBRLEN.
111336         * doc/posix-functions/mbrlen.texi: Mention the various platform bugs.
111338 2008-12-22  Bruno Haible  <bruno@clisp.org>
111340         * m4/mbrtowc.m4 (gl_MBRTOWC_INCOMPLETE_STATE): Remove unused variable
111341         from test code.
111343 2008-12-22  Eric Blake  <ebb9@byu.net>
111345         Avoid gcc warnings on cygwin.
111346         * lib/regex_internal.c (re_string_reconstruct) [!RE_ENABLE_I18N]:
111347         Avoid unused variable.
111348         * lib/regexec.c (check_arrival_add_next_nodes) [!RE_ENABLE_I18N]:
111349         Likewise.
111351 2008-12-22  Bruno Haible  <bruno@clisp.org>
111353         Remove HAVE_MBRTOWC conditionals.
111354         * lib/mbscasecmp.c: Include mbuiter.h unconditionally.
111355         (mbscasecmp): Assume mbrtowc function.
111356         * lib/mbscasestr.c: Include mbuiter.h unconditionally.
111357         (knuth_morris_pratt_multibyte, mbscasestr): Assume mbrtowc function.
111358         * lib/mbschr.c: Include mbuiter.h unconditionally.
111359         (mbschr): Assume mbrtowc function.
111360         * lib/mbscspn.c: Include mbuiter.h unconditionally.
111361         (mbscspn): Assume mbrtowc function.
111362         * lib/mbslen.c: Include mbuiter.h unconditionally.
111363         (mbslen): Assume mbrtowc function.
111364         * lib/mbsncasecmp.c: Include mbuiter.h unconditionally.
111365         (mbsncasecmp): Assume mbrtowc function.
111366         * lib/mbsnlen.c: Include mbiter.h unconditionally.
111367         (mbsnlen): Assume mbrtowc function.
111368         * lib/mbspbrk.c: Include mbuiter.h unconditionally.
111369         (mbspbrk): Assume mbrtowc function.
111370         * lib/mbspcasecmp.c: Include mbuiter.h unconditionally.
111371         (mbspcasecmp): Assume mbrtowc function.
111372         * lib/mbsrchr.c: Include mbuiter.h unconditionally.
111373         (mbsrchr): Assume mbrtowc function.
111374         * lib/mbssep.c: Include mbuiter.h unconditionally.
111375         (mbssep): Assume mbrtowc function.
111376         * lib/mbsspn.c: Include mbuiter.h unconditionally.
111377         (mbsspn): Assume mbrtowc function.
111378         * lib/mbsstr.c: Include mbuiter.h unconditionally.
111379         (knuth_morris_pratt_multibyte, mbsstr): Assume mbrtowc function.
111380         * lib/mbstok_r.c: Include mbuiter.h unconditionally.
111381         (mbstok_r): Assume mbrtowc function.
111382         * lib/propername.c: Include mbuiter.h unconditionally.
111383         (mbsstr_trimmed_wordbounded): Assume mbrtowc function.
111384         * lib/trim.c: Include mbchar.h, mbiter.h unconditionally.
111385         (trim2): Assume mbrtowc function.
111386         * lib/mbswidth.c (mbsinit): Remove fallback definition.
111387         (mbsnwidth): Assume mbrtowc function.
111388         * modules/mbswidth (Depends-on): Add mbrtowc, mbsinit.
111389         * lib/quotearg.c (MB_CUR_MAX, mbstate_t, mbrtowc, iswprint): Remove
111390         fallback definitions.
111391         * modules/quotearg (Depends-on): Add mbrtowc, mbsinit.
111393 2008-12-22  Bruno Haible  <bruno@clisp.org>
111395         * doc/posix-functions/mbtowc.texi: Mention a glibc bug.
111397 2008-12-22  Paolo Bonzini  <bonzini@gnu.org>
111399         * modules/regex: Request emulations for the mb*/wc* functions we need.
111400         * m4/regex.m4: Don't look for those functions here.
111401         * lib/regex_internal.h: Do not check HAVE_WCRTOMB and HAVE_MBRTOWC.
111403 2008-12-22  Bruno Haible  <bruno@clisp.org>
111405         * modules/fnmatch (Depends-on): Remove duplicated dependency.
111407 2008-12-21  Bruno Haible  <bruno@clisp.org>
111409         Make mbiter.h, mbuiter.h, mbfile.h usable unconditionally.
111410         * modules/mbiter (Depends-on): Add mbrtowc, mbsinit.
111411         (Include): Remove conditionalization.
111412         * modules/mbuiter (Depends-on): Add mbrtowc, mbsinit.
111413         (Include): Remove conditionalization.
111414         * modules/mbfile (Depends-on): Add mbrtowc, mbsinit.
111415         (Include): Remove conditionalization.
111416         * m4/mbiter.m4 (gl_MBITER): Deprecate the use of AC_FUNC_MBRTOWC.
111417         * m4/mbfile.m4 (gl_MBFILE): Likewise.
111418         * NEWS: Mention the change.
111419         Reported by Alan Hourihane <alanh@fairlite.co.uk>
111420         via Sergey Poznyakoff <gray@gnu.org.ua>.
111422 2008-12-21  Bruno Haible  <bruno@clisp.org>
111424         * MODULES.html.sh (Extended multibyte and wide character utilities
111425         <wchar.h>): Add btowc, wctob, mbsinit, mbrlen, mbrtowc, mbsrtowcs,
111426         wcrtomb, wcsrtombs.
111427         (Support for systems lacking POSIX:2008): Add accept, bind, close,
111428         connect, fclose, getpeername, getsockname, getsockopt, hostent, listen,
111429         mbsnrtowcs, posix_spawn*, recv, recvfrom, sched, select, send, sendto,
111430         setsockopt, shutdown, socket, spawn, sys_wait, wcsnrtombs, write.
111432 2008-12-21  Bruno Haible  <bruno@clisp.org>
111434         * MODULES.html.sh: Change section titles to refer to POSIX:2008.
111436 2008-12-21  Bruno Haible  <bruno@clisp.org>
111438         * modules/wcsnrtombs-tests: New file.
111439         * tests/test-wcsnrtombs1.sh: New file.
111440         * tests/test-wcsnrtombs2.sh: New file.
111441         * tests/test-wcsnrtombs3.sh: New file.
111442         * tests/test-wcsnrtombs4.sh: New file.
111443         * tests/test-wcsnrtombs.c: New file.
111445         New module 'wcsnrtombs'.
111446         * lib/wchar.in.h (wcsnrtombs): New declaration.
111447         * lib/wcsnrtombs.c: New file.
111448         * lib/wcsrtombs-state.c: New file.
111449         * lib/wcsrtombs.c: Refer to _gl_wcsrtombs_state.
111450         (internal_state): Remove variable.
111451         * m4/wcsnrtombs.m4: New file.
111452         * m4/wcsrtombs.m4 (gl_FUNC_WCSRTOMBS): Add wcsrtombs-state.c to the
111453         compilation units.
111454         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSNRTOMBS,
111455         HAVE_WCSNRTOMBS.
111456         * modules/wchar (Makefile.am): Substitute GNULIB_WCSNRTOMBS,
111457         HAVE_WCSNRTOMBS.
111458         * modules/wcsnrtombs: New file.
111459         * modules/wcsrtombs (Files): Add lib/wcsrtombs-state.c.
111460         * doc/posix-functions/wcsnrtombs.texi: Mention the new module.
111462 2008-12-21  Bruno Haible  <bruno@clisp.org>
111464         * modules/wcsrtombs-tests: New file.
111465         * tests/test-wcsrtombs1.sh: New file.
111466         * tests/test-wcsrtombs2.sh: New file.
111467         * tests/test-wcsrtombs3.sh: New file.
111468         * tests/test-wcsrtombs4.sh: New file.
111469         * tests/test-wcsrtombs.c: New file.
111471         New module 'wcsrtombs'.
111472         * lib/wchar.in.h (wcsrtombs): New declaration.
111473         * lib/wcsrtombs.c: New file.
111474         * m4/wcsrtombs.m4: New file.
111475         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSRTOMBS,
111476         HAVE_WCSRTOMBS, REPLACE_WCSRTOMBS.
111477         * modules/wchar (Makefile.am): Substitute GNULIB_WCSRTOMBS,
111478         HAVE_WCSRTOMBS, REPLACE_WCSRTOMBS.
111479         * modules/wcsrtombs: New file.
111480         * doc/posix-functions/wcsrtombs.texi: Mention the new module and the
111481         bugs.
111483 2008-12-21  Bruno Haible  <bruno@clisp.org>
111485         Work around a wcrtomb() bug on Solaris 10 and OSF/1 5.1.
111486         * lib/wchar.in.h (wcrtomb): Override if REPLACE_WCRTOMB is set.
111487         * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Test the return value of wcrtomb
111488         with NULL destination argument in various locales. Set REPLACE_WCRTOMB
111489         if not correct.
111490         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCRTOMB.
111491         * modules/wchar (Makefile.am): Substitute REPLACE_WCRTOMB.
111492         * modules/wcrtomb (Files): Add m4/locale-fr.m4, m4/locale-ja.m4,
111493         m4/locale-zh.m4, m4/codeset.m4.
111494         * doc/posix-functions/wcrtomb.texi: Document the bug.
111496 2008-12-21  Bruno Haible  <bruno@clisp.org>
111498         Work around a btowc() bug on IRIX 6.5.
111499         * lib/wchar.in.h (btowc): Override if REPLACE_BTOWC is set.
111500         * m4/btowc.m4 (gl_FUNC_BTOWC): Test whether btowc(EOF) is correct. Set
111501         REPLACE_WTOBC if not.
111502         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_BTOWC.
111503         * modules/wchar (Makefile.am): Substitute REPLACE_BTOWC.
111504         * doc/posix-functions/btowc.texi: Mention the IRIX bug.
111506 2008-12-21  Bruno Haible  <bruno@clisp.org>
111508         * modules/wcrtomb-tests: New file.
111509         * tests/test-wcrtomb.sh: New file.
111510         * tests/test-wcrtomb.c: New file.
111512         New module 'wcrtomb'.
111513         * lib/wchar.in.h (wcrtomb): New declaration.
111514         * lib/wcrtomb.c: New file.
111515         * m4/wcrtomb.m4: New file.
111516         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCRTOMB,
111517         HAVE_WCRTOMB.
111518         * modules/wchar (Makefile.am): Substitute GNULIB_WCRTOMB,
111519         HAVE_WCRTOMB.
111520         * modules/wcrtomb: New file.
111521         * doc/posix-functions/wcrtomb.texi: Mention the new module.
111523 2008-12-21  Bruno Haible  <bruno@clisp.org>
111525         * modules/mbrtowc (Files): Add m4/codeset.m4, needed by m4/locale-fr.m4.
111526         * modules/mbsrtowcs (Files): Likewise.
111527         * modules/wctob (Files): Likewise.
111528         * modules/c-strcase-tests (Files): Likewise.
111529         * modules/unistdio/u8-vasnprintf-tests (Files): Likewise.
111530         * modules/unistdio/u16-vasnprintf-tests (Files): Likewise.
111531         * modules/unistdio/u32-vasnprintf-tests (Files): Likewise.
111532         * modules/unistdio/ulc-vasnprintf-tests (Files): Likewise.
111533         * modules/vasnprintf-posix-tests (Files): Likewise.
111535 2008-12-21  William Pursell  <bill.pursell@gmail.com>
111537         gitlog-to-changelog: pass all command-line arguments to git-log
111538         * build-aux/gitlog-to-changelog: When producing a ChangeLog,
111539         it is sometimes convenient to filter the commits in various ways.
111540         gitlog-to-changelog only allows --since to specify a start date,
111541         but git-log itself supports many other filtering mechanisms.
111542         At the moment, I want to filter by branch name.  Rather than
111543         adding a --branch option to gitlog-to-changelog, it seems more
111544         flexible to simply pass all options directly to git-log and let
111545         git do the work.  Notice that this effectively makes --since a
111546         redundant option for gitlog-to-changelog, but removing it would
111547         require current usage to change since calls would then require
111548         an additional '--'.
111550 2008-12-21  Bruno Haible  <bruno@clisp.org>
111552         * modules/mbsnrtowcs-tests: New file.
111553         * tests/test-mbsnrtowcs1.sh: New file.
111554         * tests/test-mbsnrtowcs2.sh: New file.
111555         * tests/test-mbsnrtowcs3.sh: New file.
111556         * tests/test-mbsnrtowcs4.sh: New file.
111557         * tests/test-mbsnrtowcs.c: New file.
111559         New module 'mbsnrtowcs'.
111560         * lib/wchar.in.h (mbsnrtowcs): New declaration.
111561         * lib/mbsnrtowcs.c: New file.
111562         * lib/mbsrtowcs-state.c: New file.
111563         * lib/mbsrtowcs.c: Refer to _gl_mbsrtowcs_state.
111564         (internal_state): Remove variable.
111565         * m4/mbsnrtowcs.m4: New file.
111566         * m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): Add mbsrtowcs-state.c to the
111567         compilation units.
111568         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_MBSNRTOWCS,
111569         HAVE_MBSNRTOWCS, REPLACE_MBSNRTOWCS.
111570         * modules/wchar (Makefile.am): Substitute GNULIB_MBSNRTOWCS,
111571         HAVE_MBSNRTOWCS, REPLACE_MBSNRTOWCS.
111572         * modules/mbsnrtowcs: New file.
111573         * modules/mbsrtowcs (Files): Add lib/mbsrtowcs-state.c.
111574         * doc/posix-functions/mbsnrtowcs.texi: Mention the new module and a
111575         portability problem.
111577 2008-12-21  Bruno Haible  <bruno@clisp.org>
111579         Work around mbsrtowcs bug.
111580         * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): New macro.
111581         (gl_FUNC_MBSRTOWCS): Invoke it.
111582         * modules/mbsrtowcs (Files): Add m4/locale-fr.m4, m4/locale-ja.m4,
111583         m4/locale-zh.m4.
111584         * doc/posix-functions/mbsrtowcs.texi: Document the bug.
111586 2008-12-21  Bruno Haible  <bruno@clisp.org>
111588         * tests/test-mbsrtowcs.c (main): Execute the loop also for unlimited=1.
111590 2008-12-21  Bruno Haible  <bruno@clisp.org>
111592         Update doc for AIX.
111593         * doc/pastposix-functions/wcswcs.texi: Mention that AIX has only a
111594         16-bit wchar_t type.
111595         * doc/posix-functions/btowc.texi: Likewise.
111596         * doc/posix-functions/fgetwc.texi: Likewise.
111597         * doc/posix-functions/fgetws.texi: Likewise.
111598         * doc/posix-functions/fputwc.texi: Likewise.
111599         * doc/posix-functions/fputws.texi: Likewise.
111600         * doc/posix-functions/fwide.texi: Likewise.
111601         * doc/posix-functions/fwprintf.texi: Likewise.
111602         * doc/posix-functions/fwscanf.texi: Likewise.
111603         * doc/posix-functions/getwchar.texi: Likewise.
111604         * doc/posix-functions/getwc.texi: Likewise.
111605         * doc/posix-functions/iswalnum.texi: Likewise.
111606         * doc/posix-functions/iswalpha.texi: Likewise.
111607         * doc/posix-functions/iswblank.texi: Likewise.
111608         * doc/posix-functions/iswcntrl.texi: Likewise.
111609         * doc/posix-functions/iswctype.texi: Likewise.
111610         * doc/posix-functions/iswdigit.texi: Likewise.
111611         * doc/posix-functions/iswgraph.texi: Likewise.
111612         * doc/posix-functions/iswlower.texi: Likewise.
111613         * doc/posix-functions/iswprint.texi: Likewise.
111614         * doc/posix-functions/iswpunct.texi: Likewise.
111615         * doc/posix-functions/iswspace.texi: Likewise.
111616         * doc/posix-functions/iswupper.texi: Likewise.
111617         * doc/posix-functions/iswxdigit.texi: Likewise.
111618         * doc/posix-functions/mbrtowc.texi: Likewise.
111619         * doc/posix-functions/mbsrtowcs.texi: Likewise.
111620         * doc/posix-functions/mbstowcs.texi: Likewise.
111621         * doc/posix-functions/mbtowc.texi: Likewise.
111622         * doc/posix-functions/putwchar.texi: Likewise.
111623         * doc/posix-functions/putwc.texi: Likewise.
111624         * doc/posix-functions/swprintf.texi: Likewise.
111625         * doc/posix-functions/tolower.texi: Likewise.
111626         * doc/posix-functions/toupper.texi: Likewise.
111627         * doc/posix-functions/towctrans.texi: Likewise.
111628         * doc/posix-functions/ungetwc.texi: Likewise.
111629         * doc/posix-functions/vswprintf.texi: Likewise.
111630         * doc/posix-functions/wcrtomb.texi: Likewise.
111631         * doc/posix-functions/wcscat.texi: Likewise.
111632         * doc/posix-functions/wcschr.texi: Likewise.
111633         * doc/posix-functions/wcscmp.texi: Likewise.
111634         * doc/posix-functions/wcscoll.texi: Likewise.
111635         * doc/posix-functions/wcscpy.texi: Likewise.
111636         * doc/posix-functions/wcscspn.texi: Likewise.
111637         * doc/posix-functions/wcsftime.texi: Likewise.
111638         * doc/posix-functions/wcslen.texi: Likewise.
111639         * doc/posix-functions/wcsncat.texi: Likewise.
111640         * doc/posix-functions/wcsncmp.texi: Likewise.
111641         * doc/posix-functions/wcsncpy.texi: Likewise.
111642         * doc/posix-functions/wcspbrk.texi: Likewise.
111643         * doc/posix-functions/wcsrchr.texi: Likewise.
111644         * doc/posix-functions/wcsrtombs.texi: Likewise.
111645         * doc/posix-functions/wcsspn.texi: Likewise.
111646         * doc/posix-functions/wcsstr.texi: Likewise.
111647         * doc/posix-functions/wcstod.texi: Likewise.
111648         * doc/posix-functions/wcstof.texi: Likewise.
111649         * doc/posix-functions/wcstoimax.texi: Likewise.
111650         * doc/posix-functions/wcstok.texi: Likewise.
111651         * doc/posix-functions/wcstold.texi: Likewise.
111652         * doc/posix-functions/wcstoll.texi: Likewise.
111653         * doc/posix-functions/wcstol.texi: Likewise.
111654         * doc/posix-functions/wcstombs.texi: Likewise.
111655         * doc/posix-functions/wcstoull.texi: Likewise.
111656         * doc/posix-functions/wcstoul.texi: Likewise.
111657         * doc/posix-functions/wcstoumax.texi: Likewise.
111658         * doc/posix-functions/wcswidth.texi: Likewise.
111659         * doc/posix-functions/wcsxfrm.texi: Likewise.
111660         * doc/posix-functions/wctob.texi: Likewise.
111661         * doc/posix-functions/wctomb.texi: Likewise.
111662         * doc/posix-functions/wctrans.texi: Likewise.
111663         * doc/posix-functions/wctype.texi: Likewise.
111664         * doc/posix-functions/wcwidth.texi: Likewise.
111665         * doc/posix-functions/wmemchr.texi: Likewise.
111666         * doc/posix-functions/wmemcmp.texi: Likewise.
111667         * doc/posix-functions/wmemcpy.texi: Likewise.
111668         * doc/posix-functions/wmemmove.texi: Likewise.
111669         * doc/posix-functions/wmemset.texi: Likewise.
111670         * doc/posix-functions/wprintf.texi: Likewise.
111671         * doc/posix-functions/wscanf.texi: Likewise.
111673 2008-12-21  Bruno Haible  <bruno@clisp.org>
111675         Update doc for HP-UX 11.11.
111676         * doc/posix-functions/btowc.texi: Clarify that the function is missing
111677         in HP-UX version 11.00, not in all versions of HP-UX 11.
111678         * doc/posix-functions/fwide.texi: Likewise.
111679         * doc/posix-functions/fwprintf.texi: Likewise.
111680         * doc/posix-functions/fwscanf.texi: Likewise.
111681         * doc/posix-functions/inet_ntop.texi: Likewise.
111682         * doc/posix-functions/inet_pton.texi: Likewise.
111683         * doc/posix-functions/mbrlen.texi: Likewise.
111684         * doc/posix-functions/mbrtowc.texi: Likewise.
111685         * doc/posix-functions/mbsinit.texi: Likewise.
111686         * doc/posix-functions/mbsrtowcs.texi: Likewise.
111687         * doc/posix-functions/swprintf.texi: Likewise.
111688         * doc/posix-functions/swscanf.texi: Likewise.
111689         * doc/posix-functions/towctrans.texi: Likewise.
111690         * doc/posix-functions/vfwprintf.texi: Likewise.
111691         * doc/posix-functions/vswprintf.texi: Likewise.
111692         * doc/posix-functions/vwprintf.texi: Likewise.
111693         * doc/posix-functions/wcrtomb.texi: Likewise.
111694         * doc/posix-functions/wcsrtombs.texi: Likewise.
111695         * doc/posix-functions/wcsstr.texi: Likewise.
111696         * doc/posix-functions/wctob.texi: Likewise.
111697         * doc/posix-functions/wctrans.texi: Likewise.
111698         * doc/posix-functions/wmemchr.texi: Likewise.
111699         * doc/posix-functions/wmemcmp.texi: Likewise.
111700         * doc/posix-functions/wmemcpy.texi: Likewise.
111701         * doc/posix-functions/wmemmove.texi: Likewise.
111702         * doc/posix-functions/wmemset.texi: Likewise.
111703         * doc/posix-functions/wprintf.texi: Likewise.
111704         * doc/posix-functions/wscanf.texi: Likewise.
111706 2008-12-21  Bruno Haible  <bruno@clisp.org>
111708         Work around a portability problem.
111709         * tests/test-mbsrtowcs.c (main): Use a temporary conversion state.
111710         * doc/posix-functions/mbsrtowcs.texi: Document the portability problem.
111712 2008-12-20  Bruno Haible  <bruno@clisp.org>
111714         * lib/wchar.in.h (mbsrtowcs): Redefine if REPLACE_MBSRTOWCS is set.
111715         * m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): Invoke gl_MBSTATE_T_BROKEN. Set
111716         REPLACE_MBSRTOWCS if mbsrtowcs needs to be overridden.
111717         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_MBSRTOWCS.
111718         * modules/wchar (Makefile.am): Substitute REPLACE_MBSRTOWCS.
111720         Work around mbrtowc bugs on AIX, HP-UX, OSF/1, Solaris.
111721         * lib/wchar.in.h (mbstate_t): Redefine also if REPLACE_MBSTATE_T is
111722         set.
111723         (GNULIB_defined_mbstate_t): New macro.
111724         (mbsinit): Redefine if REPLACE_MBSINIT is set.
111725         (mbrtowc): Redefine if REPLACE_MBRTOWC is set.
111726         * lib/mbrtowc.c (rpl_mbrtowc): Add an alternative implementation that
111727         reuses the system's mbrtowc function but works around the bugs.
111728         * m4/mbrtowc.m4 (gl_MBSTATE_T_BROKEN, gl_MBRTOWC_INCOMPLETE_STATE,
111729         gl_MBRTOWC_NULL_ARG, gl_MBRTOWC_RETVAL, gl_MBRTOWC_NUL_RETVAL): New
111730         macros.
111731         (gl_FUNC_MBRTOWC): Invoke them. Set REPLACE_MBRTOWC if mbrtowc needs to
111732         be overridden. Optionally define MBRTOWC_NULL_ARG_BUG,
111733         MBRTOWC_RETVAL_BUG, MBRTOWC_NUL_RETVAL_BUG.
111734         * m4/mbsinit.m4 (gl_FUNC_MBSINIT): Invoke gl_MBSTATE_T_BROKEN. Set
111735         REPLACE_MBSINIT if mbsinit needs to be overridden.
111736         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_MBSTATE_T,
111737         REPLACE_MBSINIT, REPLACE_MBRTOWC.
111738         * modules/wchar (Makefile.am): Substitute REPLACE_MBSTATE_T,
111739         REPLACE_MBSINIT, REPLACE_MBRTOWC.
111740         * modules/mbrtowc (Files): Add m4/locale-fr.m4, m4/locale-ja.m4,
111741         m4/locale-zh.m4.
111742         (Depends): Add mbsinit.
111743         * modules/mbsinit (Depends): Add mbrtowc.
111744         * doc/posix-functions/mbrtowc.texi: Mention the various bugs.
111746 2008-12-20  Bruno Haible  <bruno@clisp.org>
111748         * tests/test-mbrtowc.c (main): Change sample string in EUC-JP encoding
111749         so that there are no conversion errors on AIX.
111750         * tests/test-mbsrtowcs.c (main): LIkewise.
111752 2008-12-20  Bruno Haible  <bruno@clisp.org>
111754         Work around wctob bug on Solaris <= 9.
111755         * lib/wchar.in.h (wctob): Redefine if REPLACE_WCTOB is set.
111756         * m4/wctob.m4 (gl_FUNC_WCTOB): Test whether wctob works.
111757         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCTOB.
111758         * modules/wchar (Makefile.am): Substitute REPLACE_WCTOB.
111759         * modules/wctob (Files): Add m4/locale-fr.m4.
111760         * doc/posix-functions/wctob.texi: Mention the Solaris bug.
111762 2008-12-20  Bruno Haible  <bruno@clisp.org>
111764         * doc/posix-functions/select.texi: Mention Solaris 2.6 bug with
111765         /dev/null.
111766         * tests/test-select-in.sh: Likewise.
111767         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
111769 2008-12-20  Bruno Haible  <bruno@clisp.org>
111771         Don't pretend that Cygwin has a ja_JP.EUC-JP locale.
111772         * m4/locale-ja.m4 (gt_LOCALE_JA): Add test for MB_CUR_MAX. Needed on
111773         Cygwin 1.5.x.
111775 2008-12-20  Bruno Haible  <bruno@clisp.org>
111777         Ensure mbstate_t is defined on HP-UX 11.11.
111778         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Require
111779         AC_CANONICAL_HOST. On HP-UX, define _XOPEN_SOURCE to 500.
111780         * m4/mbstate_t.m4 (AC_TYPE_MBSTATE_T): Require
111781         AC_USE_SYSTEM_EXTENSIONS.
111782         * modules/fnmatch (Depends-on): Add extensions.
111783         * modules/mbrlen (Depends-on): Likewise.
111784         * modules/mbrtowc (Depends-on): Likewise.
111785         * modules/mbsinit (Depends-on): Likewise.
111786         * modules/mbsrtowcs (Depends-on): Likewise.
111787         * modules/mbswidth (Depends-on): Likewise.
111788         * modules/quotearg (Depends-on): Likewise.
111789         * modules/strftime (Depends-on): Likewise.
111791 2008-12-20  Bruno Haible  <bruno@clisp.org>
111793         Ensure wctob is declared on IRIX 6.5.
111794         * lib/wchar.in.h (wctob): Declare also when HAVE_DECL_WCTOB is 0.
111795         * m4/wctob.m4 (gl_FUNC_WCTOB): Set HAVE_DECL_WCTOB instead of
111796         HAVE_WCTOB. Also test whether <wchar.h> declares wctob.
111797         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize HAVE_DECL_WCTOB instead
111798         of HAVE_WCTOB.
111799         * modules/wchar (Makefile.am): Substitute HAVE_DECL_WCTOB instead of
111800         HAVE_WCTOB.
111801         * doc/posix-functions/wctob.texi: Mention missing declaration on IRIX.
111803 2008-12-19  Bruno Haible  <bruno@clisp.org>
111805         * modules/mbsrtowcs-tests: New file.
111806         * tests/test-mbsrtowcs1.sh: New file.
111807         * tests/test-mbsrtowcs2.sh: New file.
111808         * tests/test-mbsrtowcs3.sh: New file.
111809         * tests/test-mbsrtowcs4.sh: New file.
111810         * tests/test-mbsrtowcs.c: New file.
111812         New module 'mbsrtowcs'.
111813         * lib/wchar.in.h (mbsrtowcs): New declaration.
111814         * lib/mbsrtowcs.c: New file.
111815         * m4/mbsrtowcs.m4: New file.
111816         * modules/mbsrtowcs: New file.
111817         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_MBSRTOWCS and
111818         HAVE_MBSRTOWCS.
111819         * modules/wchar (Makefile.am): Substitute GNULIB_MBSRTOWCS and
111820         HAVE_MBSRTOWCS.
111821         * doc/posix-functions/mbsrtowcs.texi: Document the new module.
111823 2008-12-19  Bruno Haible  <bruno@clisp.org>
111825         New module 'mbrlen'.
111826         * lib/wchar.in.h (mbrlen): New declaration.
111827         * lib/mbrlen.c: New file.
111828         * m4/mbrlen.m4: New file.
111829         * modules/mbrlen: New file.
111830         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_MBRLEN and
111831         HAVE_MBRLEN.
111832         * modules/wchar (Makefile.am): Substitute GNULIB_MBRLEN and
111833         HAVE_MBRLEN.
111834         * doc/posix-functions/mbrlen.texi: Document the new module.
111836 2008-12-19  Bruno Haible  <bruno@clisp.org>
111838         * lib/mbrtowc.c: Include verify.h. Verify an assumption.
111839         * modules/mbrtowc (Depends-on): Add verify.
111840         Suggested by Paul Eggert.
111842 2008-12-18  Bruno Haible  <bruno@clisp.org>
111844         * modules/mbsinit-tests: New file.
111845         * tests/test-mbsinit.sh: New file.
111846         * tests/test-mbsinit.c: New file.
111848 2008-12-18  Bruno Haible  <bruno@clisp.org>
111850         * modules/mbrtowc-tests: New file.
111851         * tests/test-mbrtowc1.sh: New file.
111852         * tests/test-mbrtowc2.sh: New file.
111853         * tests/test-mbrtowc3.sh: New file.
111854         * tests/test-mbrtowc4.sh: New file.
111855         * tests/test-mbrtowc.c: New file.
111857         New module 'mbrtowc'.
111858         * lib/wchar.in.h (mbstate_t): Override when the system does not have
111859         mbsinit and mbrtowc.
111860         (mbrtowc): New declaration.
111861         * lib/mbrtowc.c: New file.
111862         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC, gl_PREREQ_MBRTOWC): New macros.
111863         * modules/mbrtowc: New file.
111864         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_MBRTOWC and
111865         HAVE_MBRTOWC.
111866         * modules/wchar (Makefile.am): Substitute GNULIB_MBRTOWC and
111867         HAVE_MBRTOWC.
111868         * doc/posix-functions/mbrtowc.texi: Document the new module.
111870 2008-12-18  Bruno Haible  <bruno@clisp.org>
111872         New module 'wctob'.
111873         * lib/wchar.in.h (wctob): New declaration.
111874         * lib/wctob.c: New file.
111875         * m4/wctob.m4: New file.
111876         * modules/wctob: New file.
111877         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCTOB and
111878         HAVE_WCTOB.
111879         * modules/wchar (Makefile.am): Substitute GNULIB_WCTOB and HAVE_WCTOB.
111880         * doc/posix-functions/wctob.texi: Document the new module.
111882 2008-12-18  Bruno Haible  <bruno@clisp.org>
111884         * m4/mbsinit.m4 (gl_FUNC_MBSINIT): Invoke gl_REPLACE_WCHAR_H.
111885         * m4/btowc.m4 (gl_FUNC_BTOWC): Likewise.
111887 2008-12-18  Simon Josefsson  <simon@josefsson.org>
111889         * lib/flock.c: Use proper #if symbol in check.  Reported by "Tom
111890         G. Christensen" <tgc@jupiterrise.com>.
111892         * lib/flock.c: Need to include errno.h.  Reported by "Tom
111893         G. Christensen" <tgc@jupiterrise.com>.
111895         * lib/flock.c: Need to include string.h.  Reported by "Tom
111896         G. Christensen" <tgc@jupiterrise.com> and Eric Blake
111897         <ebb9@byu.net>.
111899 2008-12-18  Bruno Haible  <bruno@clisp.org>
111901         * m4/locale-ja.m4: New file, from GNU gettext.
111903 2008-12-17  Bruno Haible  <bruno@clisp.org>
111905         * m4/mbrtowc.m4 (AC_FUNC_MBRTOWC): Don't override in autoconf >= 2.60.
111906         Suggested by Eric Blake.
111908 2008-12-17  Bruno Haible  <bruno@clisp.org>
111910         * m4/errno_h.m4 (AC_COMPUTE_INT): Provide fallback definition.
111912 2008-12-17  Bruno Haible  <bruno@clisp.org>
111914         * lib/mbsinit.c: Include verify.h. Verify an assumption.
111915         * modules/mbsinit (Depends-on): Add verify.
111916         Suggested by Paul Eggert.
111918 2008-12-17  Bruno Haible  <bruno@clisp.org>
111920         * m4/mbrtowc.m4 (AC_FUNC_MBRTOWC): Renamed from gl_FUNC_MBRTOWC.
111921         * m4/mbfile.m4 (gl_MBFILE): Use AC_FUNC_MBRTOWC instead of
111922         gl_FUNC_MBRTOWC.
111923         * m4/mbiter.m4 (gl_MBITER): LIkewise.
111924         * m4/mbscasecmp.m4 (gl_PREREQ_MBSCASECMP): Likewise.
111925         * m4/mbscasestr.m4 (gl_PREREQ_MBSCASESTR): Likewise.
111926         * m4/mbschr.m4 (gl_PREREQ_MBSCHR): Likewise.
111927         * m4/mbscspn.m4 (gl_PREREQ_MBSCSPN): Likewise.
111928         * m4/mbslen.m4 (gl_PREREQ_MBSLEN): Likewise.
111929         * m4/mbsncasecmp.m4 (gl_PREREQ_MBSNCASECMP): Likewise.
111930         * m4/mbsnlen.m4 (gl_PREREQ_MBSNLEN): Likewise.
111931         * m4/mbspbrk.m4 (gl_PREREQ_MBSPBRK): Likewise.
111932         * m4/mbspcasecmp.m4 (gl_PREREQ_MBSPCASECMP): Likewise.
111933         * m4/mbsrchr.m4 (gl_PREREQ_MBSRCHR): Likewise.
111934         * m4/mbssep.m4 (gl_PREREQ_MBSSEP): Likewise.
111935         * m4/mbsspn.m4 (gl_PREREQ_MBSSPN): Likewise.
111936         * m4/mbsstr.m4 (gl_PREREQ_MBSSTR): Likewise.
111937         * m4/mbstok_r.m4 (gl_PREREQ_MBSTOK_R): Likewise.
111938         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
111939         * m4/quotearg.m4 (gl_QUOTEARG): Likewise.
111940         * modules/trim (configure.ac): Likewise.
111942 2008-12-17  Bruno Haible  <bruno@clisp.org>
111944         * modules/btowc-tests: New file.
111945         * tests/test-btowc1.sh: New file.
111946         * tests/test-btowc2.sh: New file.
111947         * tests/test-btowc.c: New file.
111949         New module 'btowc'.
111950         * lib/wchar.in.h (btowc): New declaration.
111951         * lib/btowc.c: New file.
111952         * m4/btowc.m4: New file.
111953         * modules/btowc: New file.
111954         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_BTOWC and
111955         HAVE_BTOWC.
111956         * modules/wchar (Makefile.am): Substitute GNULIB_BTOWC and HAVE_BTOWC.
111957         * doc/posix-functions/btowc.texi: Document the new module.
111959 2008-12-17  Bruno Haible  <bruno@clisp.org>
111961         New module 'mbsinit'.
111962         * lib/wchar.in.h (mbsinit): New declaration.
111963         * lib/mbsinit.c: New file.
111964         * m4/mbsinit.m4: New file.
111965         * modules/mbsinit: New file.
111966         * m4/wchar.m4 (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_MBSINIT and
111967         HAVE_MBSINIT.
111968         * modules/wchar (Makefile.am): Substitute GNULIB_MBSINIT and
111969         HAVE_MBSINIT.
111970         * doc/posix-functions/mbsinit.texi: Document the new module.
111972 2008-12-16  Bruno Haible  <bruno@clisp.org>
111974         * lib/unistd.in.h: Add comment.
111975         * tests/test-environ.c: Don't include <stdlib.h>.
111977 2008-12-16  Bruno Haible  <bruno@clisp.org>
111979         * lib/parse-duration.h (parse_duration): Document return value
111980         convention.
111981         * lib/parse-duration.c: Include specification header first. Add
111982         comments.
111983         (_): Remove macro.
111984         (parse_year_month_day, parse_hour_minute_second): Move side effects
111985         outside of strchr call.
111986         (parse_non_iso8601): Move side effects outside of isspace call.
111987         (parse_duration): Don't test errno is res != BAD_TIME. Remove fprintf
111988         call.
111990 2008-12-16  Bruno Haible  <bruno@clisp.org>
111992         * tests/test-parse-duration.sh: Produce no output when the test
111993         succeeds.
111995 2008-12-16  Bruno Haible  <bruno@clisp.org>
111997         * tests/test-parse-duration.sh: Fix quoting of $tmp and $tmpf
111998         expressions.
112000 2008-12-15  Bruno Haible  <bruno@clisp.org>
112002         * doc/glibc-functions/fgetxattr.texi: Tweak wording.
112003         * doc/glibc-functions/flistxattr.texi: Likewise.
112004         * doc/glibc-functions/fopencookie.texi: Likewise.
112005         * doc/glibc-functions/fremovexattr.texi: Likewise.
112006         * doc/glibc-functions/fsetxattr.texi: Likewise.
112007         * doc/glibc-functions/getxattr.texi: Likewise.
112008         * doc/glibc-functions/lgetxattr.texi: Likewise.
112009         * doc/glibc-functions/listxattr.texi: Likewise.
112010         * doc/glibc-functions/llistxattr.texi: Likewise.
112011         * doc/glibc-functions/lremovexattr.texi: Likewise.
112012         * doc/glibc-functions/lsetxattr.texi: Likewise.
112013         * doc/glibc-functions/removexattr.texi: Likewise.
112014         * doc/glibc-functions/setxattr.texi: Likewise.
112015         * doc/posix-functions/open_memstream.texi: Likewise.
112017 2008-12-15  Eric Blake  <ebb9@byu.net>
112019         Update doc for cygwin 1.7.
112020         * doc/posix-functions/faccessat.texi: Cygwin 1.7 added several new
112021         functions.
112022         * doc/posix-functions/fchmodat.texi: Likewise.
112023         * doc/posix-functions/fchownat.texi: Likewise.
112024         * doc/posix-functions/fdopendir.texi: Likewise.
112025         * doc/posix-functions/fmemopen.texi: Likewise.
112026         * doc/posix-functions/freeaddrinfo.texi: Likewise.
112027         * doc/posix-functions/fstatat.texi: Likewise.
112028         * doc/posix-functions/futimens.texi: Likewise.
112029         * doc/posix-functions/gai_strerror.texi: Likewise.
112030         * doc/posix-functions/getaddrinfo.texi: Likewise.
112031         * doc/posix-functions/getnameinfo.texi: Likewise.
112032         * doc/posix-functions/if_freenameindex.texi: Likewise.
112033         * doc/posix-functions/if_indextoname.texi: Likewise.
112034         * doc/posix-functions/if_nameindex.texi: Likewise.
112035         * doc/posix-functions/if_nametoindex.texi: Likewise.
112036         * doc/posix-functions/insque.texi: Likewise.
112037         * doc/posix-functions/linkat.texi: Likewise.
112038         * doc/posix-functions/llrint.texi: Likewise.
112039         * doc/posix-functions/llrintf.texi: Likewise.
112040         * doc/posix-functions/llrintl.texi: Likewise.
112041         * doc/posix-functions/lockf.texi: Likewise.
112042         * doc/posix-functions/lrintl.texi: Likewise.
112043         * doc/posix-functions/mkdirat.texi: Likewise.
112044         * doc/posix-functions/mkfifoat.texi: Likewise.
112045         * doc/posix-functions/mknodat.texi: Likewise.
112046         * doc/posix-functions/mq_close.texi: Likewise.
112047         * doc/posix-functions/mq_getattr.texi: Likewise.
112048         * doc/posix-functions/mq_notify.texi: Likewise.
112049         * doc/posix-functions/mq_open.texi: Likewise.
112050         * doc/posix-functions/mq_receive.texi: Likewise.
112051         * doc/posix-functions/mq_send.texi: Likewise.
112052         * doc/posix-functions/mq_setattr.texi: Likewise.
112053         * doc/posix-functions/mq_timedreceive.texi: Likewise.
112054         * doc/posix-functions/mq_timedsend.texi: Likewise.
112055         * doc/posix-functions/mq_unlink.texi: Likewise.
112056         * doc/posix-functions/open_memstream.texi: Likewise.
112057         * doc/posix-functions/openat.texi: Likewise.
112058         * doc/posix-functions/posix_fadvise.texi: Likewise.
112059         * doc/posix-functions/posix_fallocate.texi: Likewise.
112060         * doc/posix-functions/posix_madvise.texi: Likewise.
112061         * doc/posix-functions/posix_memalign.texi: Likewise.
112062         * doc/posix-functions/posix_openpt.texi: Likewise.
112063         * doc/posix-functions/readlinkat.texi: Likewise.
112064         * doc/posix-functions/remque.texi: Likewise.
112065         * doc/posix-functions/renameat.texi: Likewise.
112066         * doc/posix-functions/rintl.texi: Likewise.
112067         * doc/posix-functions/sem_unlink.texi: Likewise.
112068         * doc/posix-functions/shm_open.texi: Likewise.
112069         * doc/posix-functions/shm_unlink.texi: Likewise.
112070         * doc/posix-functions/signgam.texi: Likewise.
112071         * doc/posix-functions/sigset.texi: Likewise.
112072         * doc/posix-functions/stpcpy.texi: Likewise.
112073         * doc/posix-functions/stpncpy.texi: Likewise.
112074         * doc/posix-functions/strerror.texi: Likewise.
112075         * doc/posix-functions/strtod.texi: Likewise.
112076         * doc/posix-functions/symlinkat.texi: Likewise.
112077         * doc/posix-functions/unlinkat.texi: Likewise.
112078         * doc/posix-functions/utimensat.texi: Likewise.
112079         * doc/glibc-functions/bindresvport.texi: Likewise.
112080         * doc/glibc-functions/dn_expand.texi: Likewise.
112081         * doc/glibc-functions/exp10.texi: Likewise.
112082         * doc/glibc-functions/exp10f.texi: Likewise.
112083         * doc/glibc-functions/fgetxattr.texi: Likewise.
112084         * doc/glibc-functions/flistxattr.texi: Likewise.
112085         * doc/glibc-functions/fopencookie.texi: Likewise.
112086         * doc/glibc-functions/freeifaddrs.texi: Likewise.
112087         * doc/glibc-functions/fremovexattr.texi: Likewise.
112088         * doc/glibc-functions/fsetxattr.texi: Likewise.
112089         * doc/glibc-functions/getifaddrs.texi: Likewise.
112090         * doc/glibc-functions/getxattr.texi: Likewise.
112091         * doc/glibc-functions/lgetxattr.texi: Likewise.
112092         * doc/glibc-functions/listxattr.texi: Likewise.
112093         * doc/glibc-functions/llistxattr.texi: Likewise.
112094         * doc/glibc-functions/lremovexattr.texi: Likewise.
112095         * doc/glibc-functions/lsetxattr.texi: Likewise.
112096         * doc/glibc-functions/pow10.texi: Likewise.
112097         * doc/glibc-functions/pow10f.texi: Likewise.
112098         * doc/glibc-functions/rcmd_af.texi: Likewise.
112099         * doc/glibc-functions/removexattr.texi: Likewise.
112100         * doc/glibc-functions/res_init.texi: Likewise.
112101         * doc/glibc-functions/res_mkquery.texi: Likewise.
112102         * doc/glibc-functions/res_query.texi: Likewise.
112103         * doc/glibc-functions/res_querydomain.texi: Likewise.
112104         * doc/glibc-functions/res_send.texi: Likewise.
112105         * doc/glibc-functions/rresvport_af.texi: Likewise.
112106         * doc/glibc-functions/setxattr.texi: Likewise.
112107         * doc/glibc-functions/strcasestr.texi: Likewise.
112109 2008-12-15  Bruno Haible  <bruno@clisp.org>
112111         Fix compilation error on OSF/1 4.0.
112112         * lib/sys_select.in.h: When invoked from OSF/1 <sys/types.h> or
112113         <sys/time.h>, simply delegate to the system header.
112114         Reported by Daniel Richard G. <oss@teragram.com>.
112116 2008-12-15  Bruno Haible  <bruno@clisp.org>
112118         * doc/posix-functions/openat.texi: Mention the 'openat' module.
112119         * doc/posix-functions/fchmodat.texi: Likewise.
112120         * doc/posix-functions/fchownat.texi: Likewise.
112121         * doc/posix-functions/fdopendir.texi: Likewise.
112122         * doc/posix-functions/fstatat.texi: Likewise.
112123         * doc/posix-functions/mkdirat.texi: Likewise.
112124         * doc/posix-functions/unlinkat.texi: Likewise.
112126 2008-12-14  Bruno Haible  <bruno@clisp.org>
112128         Update doc for POSIX:2008.
112129         * doc/posix-functions/faccessat.texi: New file.
112130         * doc/posix-functions/fchmodat.texi: New file.
112131         * doc/posix-functions/fchownat.texi: New file.
112132         * doc/posix-functions/fdopendir.texi: New file.
112133         * doc/posix-functions/fstatat.texi: New file.
112134         * doc/posix-functions/futimens.texi: New file.
112135         * doc/posix-functions/linkat.texi: New file.
112136         * doc/posix-functions/mkdirat.texi: New file.
112137         * doc/posix-functions/mkfifoat.texi: New file.
112138         * doc/posix-functions/mknodat.texi: New file.
112139         * doc/posix-functions/open_wmemstream.texi: New file.
112140         * doc/posix-functions/openat.texi: New file.
112141         * doc/posix-functions/psiginfo.texi: New file.
112142         * doc/posix-functions/pthread_mutex_consistent.texi: New file.
112143         * doc/posix-functions/pthread_mutexattr_getrobust.texi: New file.
112144         * doc/posix-functions/pthread_mutexattr_setrobust.texi: New file.
112145         * doc/posix-functions/readlinkat.texi: New file.
112146         * doc/posix-functions/renameat.texi: New file.
112147         * doc/posix-functions/strerror_l.texi: New file.
112148         * doc/posix-functions/symlinkat.texi: New file.
112149         * doc/posix-functions/unlinkat.texi: New file.
112150         * doc/posix-functions/utimensat.texi: New file.
112151         * doc/gnulib.texi (Function Substitutes): Add these subsections.
112153 2008-12-14  Bruno Haible  <bruno@clisp.org>
112155         Update doc for POSIX:2008.
112156         * doc/posix-functions/alphasort.texi: Renamed from
112157         doc/glibc-functions/alphasort.texi.
112158         * doc/posix-functions/dirfd.texi: Renamed from
112159         doc/glibc-functions/dirfd.texi.
112160         * doc/posix-functions/dprintf.texi: Renamed from
112161         doc/glibc-functions/dprintf.texi.
112162         * doc/posix-functions/duplocale.texi: Renamed from
112163         doc/glibc-functions/duplocale.texi.
112164         * doc/posix-functions/fexecve.texi: Renamed from
112165         doc/glibc-functions/fexecve.texi.
112166         * doc/posix-functions/fmemopen.texi: Renamed from
112167         doc/glibc-functions/fmemopen.texi.
112168         * doc/posix-functions/freelocale.texi: Renamed from
112169         doc/glibc-functions/freelocale.texi.
112170         * doc/posix-functions/getdate_err.texi: Renamed from
112171         doc/glibc-functions/getdate_err.texi.
112172         * doc/posix-functions/isalnum_l.texi: Renamed from
112173         doc/glibc-functions/isalnum_l.texi.
112174         * doc/posix-functions/isalpha_l.texi: Renamed from
112175         doc/glibc-functions/isalpha_l.texi.
112176         * doc/posix-functions/isblank_l.texi: Renamed from
112177         doc/glibc-functions/isblank_l.texi.
112178         * doc/posix-functions/iscntrl_l.texi: Renamed from
112179         doc/glibc-functions/iscntrl_l.texi.
112180         * doc/posix-functions/isdigit_l.texi: Renamed from
112181         doc/glibc-functions/isdigit_l.texi.
112182         * doc/posix-functions/isgraph_l.texi: Renamed from
112183         doc/glibc-functions/isgraph_l.texi.
112184         * doc/posix-functions/islower_l.texi: Renamed from
112185         doc/glibc-functions/islower_l.texi.
112186         * doc/posix-functions/isprint_l.texi: Renamed from
112187         doc/glibc-functions/isprint_l.texi.
112188         * doc/posix-functions/ispunct_l.texi: Renamed from
112189         doc/glibc-functions/ispunct_l.texi.
112190         * doc/posix-functions/isspace_l.texi: Renamed from
112191         doc/glibc-functions/isspace_l.texi.
112192         * doc/posix-functions/isupper_l.texi: Renamed from
112193         doc/glibc-functions/isupper_l.texi.
112194         * doc/posix-functions/iswalnum_l.texi: Renamed from
112195         doc/glibc-functions/iswalnum_l.texi.
112196         * doc/posix-functions/iswalpha_l.texi: Renamed from
112197         doc/glibc-functions/iswalpha_l.texi.
112198         * doc/posix-functions/iswblank_l.texi: Renamed from
112199         doc/glibc-functions/iswblank_l.texi.
112200         * doc/posix-functions/iswcntrl_l.texi: Renamed from
112201         doc/glibc-functions/iswcntrl_l.texi.
112202         * doc/posix-functions/iswctype_l.texi: Renamed from
112203         doc/glibc-functions/iswctype_l.texi.
112204         * doc/posix-functions/iswdigit_l.texi: Renamed from
112205         doc/glibc-functions/iswdigit_l.texi.
112206         * doc/posix-functions/iswgraph_l.texi: Renamed from
112207         doc/glibc-functions/iswgraph_l.texi.
112208         * doc/posix-functions/iswlower_l.texi: Renamed from
112209         doc/glibc-functions/iswlower_l.texi.
112210         * doc/posix-functions/iswprint_l.texi: Renamed from
112211         doc/glibc-functions/iswprint_l.texi.
112212         * doc/posix-functions/iswpunct_l.texi: Renamed from
112213         doc/glibc-functions/iswpunct_l.texi.
112214         * doc/posix-functions/iswspace_l.texi: Renamed from
112215         doc/glibc-functions/iswspace_l.texi.
112216         * doc/posix-functions/iswupper_l.texi: Renamed from
112217         doc/glibc-functions/iswupper_l.texi.
112218         * doc/posix-functions/iswxdigit_l.texi: Renamed from
112219         doc/glibc-functions/iswxdigit_l.texi.
112220         * doc/posix-functions/isxdigit_l.texi: Renamed from
112221         doc/glibc-functions/isxdigit_l.texi.
112222         * doc/posix-functions/mbsnrtowcs.texi: Renamed from
112223         doc/glibc-functions/mbsnrtowcs.texi.
112224         * doc/posix-functions/mkdtemp.texi: Renamed from
112225         doc/glibc-functions/mkdtemp.texi.
112226         * doc/posix-functions/newlocale.texi: Renamed from
112227         doc/glibc-functions/newlocale.texi.
112228         * doc/posix-functions/nl_langinfo_l.texi: Renamed from
112229         doc/glibc-functions/nl_langinfo_l.texi.
112230         * doc/posix-functions/open_memstream.texi: Renamed from
112231         doc/glibc-functions/open_memstream.texi.
112232         * doc/posix-functions/opterr.texi: Renamed from
112233         doc/glibc-functions/opterr.texi.
112234         * doc/posix-functions/optind.texi: Renamed from
112235         doc/glibc-functions/optind.texi.
112236         * doc/posix-functions/optopt.texi: Renamed from
112237         doc/glibc-functions/optopt.texi.
112238         * doc/posix-functions/psignal.texi: Renamed from
112239         doc/glibc-functions/psignal.texi.
112240         * doc/posix-functions/scandir.texi: Renamed from
112241         doc/glibc-functions/scandir.texi.
112242         * doc/posix-functions/sched_get_priority_min.texi: Renamed from
112243         doc/glibc-functions/sched_get_priority_min.texi.
112244         * doc/posix-functions/signgam.texi: Renamed from
112245         doc/glibc-functions/signgam.texi.
112246         * doc/posix-functions/stpcpy.texi: Renamed from
112247         doc/glibc-functions/stpcpy.texi.
112248         * doc/posix-functions/stpncpy.texi: Renamed from
112249         doc/glibc-functions/stpncpy.texi.
112250         * doc/posix-functions/strcasecmp_l.texi: Renamed from
112251         doc/glibc-functions/strcasecmp_l.texi.
112252         * doc/posix-functions/strcoll_l.texi: Renamed from
112253         doc/glibc-functions/strcoll_l.texi.
112254         * doc/posix-functions/strfmon_l.texi: Renamed from
112255         doc/glibc-functions/strfmon_l.texi.
112256         * doc/posix-functions/strftime_l.texi: Renamed from
112257         doc/glibc-functions/strftime_l.texi.
112258         * doc/posix-functions/strncasecmp_l.texi: Renamed from
112259         doc/glibc-functions/strncasecmp_l.texi.
112260         * doc/posix-functions/strndup.texi: Renamed from
112261         doc/glibc-functions/strndup.texi.
112262         * doc/posix-functions/strnlen.texi: Renamed from
112263         doc/glibc-functions/strnlen.texi.
112264         * doc/posix-functions/strsignal.texi: Renamed from
112265         doc/glibc-functions/strsignal.texi.
112266         * doc/posix-functions/strxfrm_l.texi: Renamed from
112267         doc/glibc-functions/strxfrm_l.texi.
112268         * doc/posix-functions/timer_gettime.texi: Renamed from
112269         doc/glibc-functions/timer_gettime.texi.
112270         * doc/posix-functions/tolower_l.texi: Renamed from
112271         doc/glibc-functions/tolower_l.texi.
112272         * doc/posix-functions/toupper_l.texi: Renamed from
112273         doc/glibc-functions/toupper_l.texi.
112274         * doc/posix-functions/towctrans_l.texi: Renamed from
112275         doc/glibc-functions/towctrans_l.texi.
112276         * doc/posix-functions/towlower_l.texi: Renamed from
112277         doc/glibc-functions/towlower_l.texi.
112278         * doc/posix-functions/towupper_l.texi: Renamed from
112279         doc/glibc-functions/towupper_l.texi.
112280         * doc/posix-functions/uselocale.texi: Renamed from
112281         doc/glibc-functions/uselocale.texi.
112282         * doc/posix-functions/vdprintf.texi: Renamed from
112283         doc/glibc-functions/vdprintf.texi.
112284         * doc/posix-functions/wcpcpy.texi:
112285         Renamed from doc/glibc-functions/wcpcpy.texi.
112286         * doc/posix-functions/wcpncpy.texi: Renamed from
112287         doc/glibc-functions/wcpncpy.texi.
112288         * doc/posix-functions/wcscasecmp.texi: Renamed from
112289         doc/glibc-functions/wcscasecmp.texi.
112290         * doc/posix-functions/wcscasecmp_l.texi: Renamed from
112291         doc/glibc-functions/wcscasecmp_l.texi.
112292         * doc/posix-functions/wcscoll_l.texi: Renamed from
112293         doc/glibc-functions/wcscoll_l.texi.
112294         * doc/posix-functions/wcsdup.texi: Renamed from
112295         doc/glibc-functions/wcsdup.texi.
112296         * doc/posix-functions/wcsncasecmp.texi: Renamed from
112297         doc/glibc-functions/wcsncasecmp.texi.
112298         * doc/posix-functions/wcsncasecmp_l.texi: Renamed from
112299         doc/glibc-functions/wcsncasecmp_l.texi.
112300         * doc/posix-functions/wcsnlen.texi: Renamed from
112301         doc/glibc-functions/wcsnlen.texi.
112302         * doc/posix-functions/wcsnrtombs.texi: Renamed from
112303         doc/glibc-functions/wcsnrtombs.texi.
112304         * doc/posix-functions/wcsxfrm_l.texi: Renamed from
112305         doc/glibc-functions/wcsxfrm_l.texi.
112306         * doc/posix-functions/wctrans_l.texi: Renamed from
112307         doc/glibc-functions/wctrans_l.texi.
112308         * doc/posix-functions/wctype_l.texi: Renamed from
112309         doc/glibc-functions/wctype_l.texi.
112310         * doc/gnulib.texi (Function Substitutes): Add these subsections.
112311         (Glibc ctype.h, Glibc dirent.h, Glibc getopt.h, Glibc math.h,
112312         Glibc sched.h, Glibc signal.h, Glibc stdio.h, Glibc stdlib.h,
112313         Glibc string.h, Glibc time.h, Glibc unistd.h, Glibc wchar.h): Remove
112314         these subsections.
112315         (Glibc langinfo.h, Glibc locale.h, Glibc monetary.h, Glibc wctype.h):
112316         Remove sections.
112318 2008-12-14  Bruno Haible  <bruno@clisp.org>
112320         Update doc for POSIX:2008.
112321         * doc/posix-functions/*.texi: Update URL of POSIX specification.
112323 2008-12-14  Bruno Haible  <bruno@clisp.org>
112325         Update doc for POSIX:2008.
112326         * doc/pastposix-functions/bcmp.texi: Renamed from
112327         doc/posix-functions/bcmp.texi.
112328         * doc/pastposix-functions/bcopy.texi: Renamed from
112329         doc/posix-functions/bcopy.texi.
112330         * doc/pastposix-functions/bsd_signal.texi: Renamed from
112331         doc/posix-functions/bsd_signal.texi.
112332         * doc/pastposix-functions/bzero.texi: Renamed from
112333         doc/posix-functions/bzero.texi.
112334         * doc/pastposix-functions/ecvt.texi: Renamed from
112335         doc/posix-functions/ecvt.texi.
112336         * doc/pastposix-functions/fcvt.texi: Renamed from
112337         doc/posix-functions/fcvt.texi.
112338         * doc/pastposix-functions/ftime.texi: Renamed from
112339         doc/posix-functions/ftime.texi.
112340         * doc/pastposix-functions/gcvt.texi: Renamed from
112341         doc/posix-functions/gcvt.texi.
112342         * doc/pastposix-functions/getcontext.texi: Renamed from
112343         doc/posix-functions/getcontext.texi.
112344         * doc/pastposix-functions/gethostbyaddr.texi: Renamed from
112345         doc/posix-functions/gethostbyaddr.texi.
112346         * doc/pastposix-functions/gethostbyname.texi: Renamed from
112347         doc/posix-functions/gethostbyname.texi.
112348         * doc/pastposix-functions/getwd.texi: Renamed from
112349         doc/posix-functions/getwd.texi.
112350         * doc/pastposix-functions/h_errno.texi: Renamed from
112351         doc/posix-functions/h_errno.texi.
112352         * doc/pastposix-functions/index.texi: Renamed from
112353         doc/posix-functions/index.texi.
112354         * doc/pastposix-functions/makecontext.texi: Renamed from
112355         doc/posix-functions/makecontext.texi.
112356         * doc/pastposix-functions/mktemp.texi: Renamed from
112357         doc/posix-functions/mktemp.texi.
112358         * doc/pastposix-functions/pthread_attr_getstackaddr.texi: Renamed from
112359         doc/posix-functions/pthread_attr_getstackaddr.texi.
112360         * doc/pastposix-functions/pthread_attr_setstackaddr.texi: Renamed from
112361         doc/posix-functions/pthread_attr_setstackaddr.texi.
112362         * doc/pastposix-functions/rindex.texi: Renamed from
112363         doc/posix-functions/rindex.texi.
112364         * doc/pastposix-functions/scalb.texi: Renamed from
112365         doc/posix-functions/scalb.texi.
112366         * doc/pastposix-functions/setcontext.texi: Renamed from
112367         doc/posix-functions/setcontext.texi.
112368         * doc/pastposix-functions/swapcontext.texi: Renamed from
112369         doc/posix-functions/swapcontext.texi.
112370         * doc/pastposix-functions/ualarm.texi: Renamed from
112371         doc/posix-functions/ualarm.texi.
112372         * doc/pastposix-functions/usleep.texi: Renamed from
112373         doc/posix-functions/usleep.texi.
112374         * doc/pastposix-functions/vfork.texi: Renamed from
112375         doc/posix-functions/vfork.texi.
112376         * doc/pastposix-functions/wcswcs.texi: Renamed from
112377         doc/posix-functions/wcswcs.texi.
112378         * doc/gnulib.texi (Legacy Function Substitutes): New chapter.
112379         (Function Substitutes): Update.
112381 2008-12-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
112383         * modules/relocatable-prog-wrapper (Depends-on): Add errno, needed by
112384         m4/strerror.m4.
112386 2008-12-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
112387             Bruno Haible  <bruno@clisp.org>
112389         * modules/unilbrk/tables (Depends-on): Add unilbrk/base.
112391 2008-12-13  Bruno Haible  <bruno@clisp.org>
112393         * modules/strtoull (Depends-on): Remove unistd.
112395 2008-12-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
112397         * modules/strtoull (Depends-on): Add stdlib.
112399 2008-12-11  Simon Josefsson  <simon@josefsson.org>
112401         * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add more warnings.
112403 2008-12-10  Jim Meyering  <meyering@redhat.com>
112405         gl_ASSERT: don't say assertions are disabled when they're not
112406         * m4/assert.m4 (gl_ASSERT): Do not make configure report
112407         "checking whether to enable assertions... no", when they are in
112408         fact enabled.  This is solely a bug in the output of configure.
112409         In spite of saying "no", NDEBUG was not defined in that case.
112410         Also, as noted by Eric Blake, leave assertions enabled upon
112411         --enable-assert=INVALID.
112413 2008-12-10  Bruno Haible  <bruno@clisp.org>
112415         Change MODULES.html to refer to POSIX:2008 where possible.
112416         * MODULES.html.sh (POSIX2008_URL): New variable.
112417         (posix_headers): Remove sys/timeb, ucontext.
112418         (posix2001_headers): New variable.
112419         (posix_functions): Remove bcmp, bcopy, bsd_signal, bzero, ecvt, fcvt,
112420         ftime, gcvt, getcontext, gethostbyaddr, gethostbyname, getwd, h_errno,
112421         index, makecontext, mktemp, pthread_attr_getstackaddr,
112422         pthread_attr_setstackaddr, rindex, scalb, setcontext, swapcontext,
112423         ualarm, usleep, vfork, wcswcs. Add the new POSIX:2008 functions.
112424         (posix2001_functions): New variable.
112425         (func_module): Use URLs to POSIX:2008 where possible and to POSIX:2001
112426         otherwise.
112428 2008-12-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
112430         add missing include to parse-duration.c
112431         * lib/parse-duration.c: #include "xalloc.h", for xstrdup.
112432         * modules/parse-duration (Depends-on): Add xalloc.
112434         fix sed script reading maint.mk
112435         * top/maint.mk (MYSELF): New macro, define as $(srcdir)/$(ME).
112436         (syntax-check-rules): Use it.
112438 2008-12-09  Bruno Haible  <bruno@clisp.org>
112440         * m4/ldexpl.m4 (gl_FUNC_LDEXPL_WORKS): Add another check, that fails on
112441         MacOS X 10.4/PowerPC.
112442         Reported by Simon Josefsson.
112444 2008-12-08  Jim Meyering  <meyering@redhat.com>
112446         work around mingw's lack of some S_IF definitions
112447         * lib/fts.c (S_IFLNK, S_IFSOCK): Define if not already defined.
112448         Reported by Simon Josefsson.
112450 2008-12-08  Bruno Haible  <bruno@clisp.org>
112452         * m4/signbitl.m4 (gl_SIGNBIT_TEST_PROGRAM): Add a link check of signbit
112453         applied to variables. Needed on MacOS X 10.4/PowerPC.
112454         Reported by Simon Josefsson.
112456 2008-12-08  William Pursell  <bill.pursell@gmail.com>  (tiny change)
112457         and Eric Blake  <ebb9@byu.net>
112459         assert: honor --enable-assert
112460         * m4/assert.m4 (gl_ASSERT): Synchronize with autoconf 2.64, in
112461         order to honor --enable-assert, rather than treating it as a
112462         synonym for --disable-assert.
112464 2008-12-08  Jim Meyering  <meyering@redhat.com>
112466         * lib/posixtm.c: Remove now-useless declaration of mktime.
112468         * build-aux/announce-gen (get_tool_versions): Accept .xz tarballs.
112470 2008-12-07  Bruno Haible  <bruno@clisp.org>
112472         * tests/test-lock.c (test_lock, test_rwlock, test_recursive_lock,
112473         test_once): Mark functions as static.
112474         * tests/test-tls.c (test_tls): Likewise.
112476 2008-12-07  Bruno Haible  <bruno@clisp.org>
112478         * lib/striconveha.h (uniconv_register_autodetect): Renamed from
112479         iconv_register_autodetect.
112481 2008-12-07  Jim Meyering  <meyering@redhat.com>
112483         posixtm.c: avoid a warning
112484         * lib/posixtm.c (posixtime): Don't initialize tm0.
112485         It's no longer needed to placate gcc4's -Wuninitialized,
112486         and the attempt to placate would elicit a new warning.
112488         unicodeio.c: mark unused parameters
112489         * lib/unicodeio.c (exit_failure_callback): Mark unused parameter.
112490         (fallback_failure_callback): Likewise.
112492 2008-12-07  Bruno Haible  <bruno@clisp.org>
112494         * gnulib-tool (func_create_testdir): When building the tests
112495         subdirectory, ignore the modules gnumakefile and maintainer-makefile.
112496         Reported by Simon Josefsson.
112498 2008-12-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
112500         * doc/manywarnings.texi, doc/gnulib-intro.texi: Fix typos.
112502 2008-12-06  Bruno Haible  <bruno@clisp.org>
112504         * lib/c-stack.h (c_stack_action): Clarify possible side effects.
112505         Suggested by Eric Blake.
112507 2008-12-06  Bruno Haible  <bruno@clisp.org>
112509         Fix a c-stack test failure on MacOS X.
112510         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Require
112511         AC_CANONICAL_HOST. Define FAULT_YIELDS_SIGBUS. If set, install a signal
112512         handler for SIGBUS as well.
112513         * lib/c-stack.c (c_stack_action): If FAULT_YIELDS_SIGBUS is set,
112514         install a signal handler for SIGBUS as well.
112515         Reported by Bruce Dugan <bld0401@gmail.com> via Eric Blake.
112517 2008-12-06  Bruno Haible  <bruno@clisp.org>
112519         Advocacy documentation.
112520         * doc/gnulib-intro.texi (Benefits): New section.
112521         * doc/gnulib.texi: Update.
112523 2008-12-06  Bruno Haible  <bruno@clisp.org>
112525         Document the 'manywarnings' module.
112526         * doc/manywarnings.texi: New file.
112527         * doc/gnulib.texi: Include it.
112529 2008-12-05  Eric Blake  <ebb9@byu.net>
112531         tests: silence some gcc warnings
112532         * tests/test-getdate.c (LOG) [!DEBUG]: Mark no-op void.
112533         * tests/uniwidth/test-uc_width2.c (finish_interval): Avoid printf
112534         type mismatches.
112536 2008-12-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
112537             Bruno Haible  <bruno@clisp.org>
112539         * m4/openmp.m4 (AC_OPENMP): Do not define with Autoconf 2.62 or newer.
112541 2008-11-29  Jim Meyering  <meyering@redhat.com>
112543         unicodeio.c: mark unused parameters
112544         * lib/unicodeio.c (exit_failure_callback): Mark unused parameter.
112545         (fallback_failure_callback): Likewise.
112547         fts: fix a thinko
112548         * lib/fts.c (s_ifmt_shift_bits): Remove function.  Not needed after all.
112549         (set_stat_type): Return S_IF*-valued "type" directly.
112550         Prompted by James Youngman's spotting a related bug.
112551         Confirmed by further testing through find.
112553         fts: provide dirent.d_type via FTSENT.fts_statp, when possible
112554         * lib/fts.c (D_TYPE): Define.
112555         (DT_UNKNOWN, DT_BLK, DT_CHR) [HAVE_STRUCT_DIRENT_D_TYPE]: Define.
112556         (DT_DIR, DT_FIFO, DT_LNK, DT_REG, DT_SOCK): Likewise.
112557         (s_ifmt_shift_bits): New function.
112558         (set_stat_type): New function.
112559         (fts_build): When not calling fts_stat, call set_stat_type
112560         to propagate dirent.d_type info to fts_read caller.
112561         * lib/fts_.h (FTSENT) [FTS_DEFER_STAT]: Mention that
112562         fts_statp->st_mode type information may be valid.
112564 2008-11-28  Simon Josefsson  <simon@josefsson.org>
112566         * lib/sys_time.in.h: Add extern "C" block for C++.  Suggested by
112567         Brian Dessent <brian@dessent.net>.  Reported by Sam Steingold
112568         <sds@gnu.org>.
112570 2008-11-20  Bruno Haible  <bruno@clisp.org>
112572         Attempt to work around an AIX 5.3, 6.1 compiler bug with include_next.
112573         * lib/math.in.h: Use INCLUDE_NEXT_AS_FIRST_DIRECTIVE instead of
112574         INCLUDE_NEXT.
112575         * m4/include_next.m4 (gl_INCLUDE_NEXT): Set also
112576         INCLUDE_NEXT_AS_FIRST_DIRECTIVE.
112577         * modules/math (Makefile.am): Substitute
112578         INCLUDE_NEXT_AS_FIRST_DIRECTIVE instead of INCLUDE_NEXT.
112579         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
112581 2008-11-18  Alexandre Duret-Lutz  <adl@lrde.epita.fr>
112582             Bruno Haible  <bruno@clisp.org>
112584         * lib/stdint.in.h: Define all type macros so that their expansion is
112585         a single typedef'ed token. Fixes a compilation failure in Boost which
112586         does "using ::int8_t;".
112588 2008-11-18  Simon Josefsson  <simon@josefsson.org>
112590         * m4/manywarnings.m4: New file with gl_MANYWARN_COMPLEMENT and
112591         gl_MANYWARN_ALL_GCC.
112592         * m4/warnings.m4: Removed gl_WARN_SUPPORTED and
112593         gl_WARN_COMPLEMENT.  Suggested by Bruno Haible <bruno@clisp.org>.
112594         * modules/manywarnings: New file.
112595         * MODULES.html.sh: Mention manywarnings module.
112597 2008-11-18  Bruno Haible  <bruno@clisp.org>
112599         * doc/gnulib-tool.texi (Unit tests): New section.
112601 2008-11-18  Simon Josefsson  <simon@josefsson.org>
112603         * top/maint.mk (refresh-po): Fix sed regexp to avoid problems with
112604         paths like 'lib/po/foo.po'.
112606 2008-11-17  Simon Josefsson  <simon@josefsson.org>
112608         * m4/warnings.m4: Improve code.  Reported by Ralf Wildenhues
112609         <Ralf.Wildenhues@gmx.de> and Paolo Bonzini <bonzini@gnu.org>.
112611 2008-11-17  Simon Josefsson  <simon@josefsson.org>
112613         * m4/warnings.m4: Use CPPFLAGS to really check whether the
112614         parameter works.
112616 2008-11-17  Simon Josefsson  <simon@josefsson.org>
112618         * m4/warnings.m4: Add gl_WARN_COMPLEMENT and gl_WARN_SUPPORTED.
112620 2008-11-17  Bruce Korb  <bkorb@gnu.org>
112622         * modules/parse-duration-tests: New file.
112623         * tests/test-parse-duration.sh: New file.
112624         * tests/test-parse-duration.c: New file.
112626         New module 'parse-duration'.
112627         * lib/parse-duration.h: New file.
112628         * lib/parse-duration.c: New file.
112629         * modules/parse-duration: New file.
112631 2008-11-17  Bruno Haible  <bruno@clisp.org>
112633         * tests/test-select-out.sh: Comment out the first pipe test.
112634         Reported by Simon Josefsson.
112636 2008-11-17  Bruno Haible  <bruno@clisp.org>
112638         * modules/getaddrinfo (Depends-on): Add servent, hostent.
112639         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_SERVENT and
112640         gl_HOSTENT.
112642 2008-11-17  Bruno Haible  <bruno@clisp.org>
112644         * m4/sockets.m4 (gl_SOCKETS): After trying -lsocket, try also
112645         -lnetwork and -lnet. Needed for Haiku and BeOS.
112647 2008-11-16  Bruno Haible  <bruno@clisp.org>
112649         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix indentation.
112651 2008-11-16  Bruno Haible  <bruno@clisp.org>
112653         Avoid test failure on Haiku.
112654         * tests/test-fsync.c: Include <errno.h>.
112655         (main): Don't require that fsync (0) fails.
112657 2008-11-15  Bruno Haible  <bruno@clisp.org>
112659         New module 'hostent'.
112660         * modules/hostent: New file.
112661         * m4/hostent.m4: New file, based on code in m4/getaddrinfo.m4.
112663 2008-11-15  Bruno Haible  <bruno@clisp.org>
112665         New module 'servent'.
112666         * modules/servent: New file.
112667         * m4/servent.m4: New file, based on code in m4/getaddrinfo.m4.
112669 2008-11-15  Bruno Haible  <bruno@clisp.org>
112671         Avoid generating same test program with two different rules.
112672         * modules/frexp-nolibm-tests (Makefile.am): Rename test program from
112673         test-frexp to test-frexp-nolibm.
112674         * modules/frexpl-nolibm-tests (Makefile.am): Rename test program from
112675         test-frexpl to test-frexpl-nolibm.
112677 2008-11-15  Bruno Haible  <bruno@clisp.org>
112679         * modules/frexpl-tests (Makefile.am): Link test-frexpl with
112680         $(FREXPL_LIBM).
112682 2008-11-15  Bruno Haible  <bruno@clisp.org>
112684         * lib/netdb.in.h: Activate the definitions also when the system's
112685         <netdb.h> has 'struct addrinfo'.
112686         * m4/netdb_h.m4 (gl_HEADER_NETDB): Replace netdb.h also when it lacks
112687         EAI_OVERFLOW or AI_NUMERICSERV.
112688         * doc/posix-headers/netdb.texi: Document the problem.
112690 2008-11-15  Bruno Haible  <bruno@clisp.org>
112692         * tests/test-sched.c: Test also the existence of the SCHED_* macros.
112694         Make the 'sched' module work on platforms where <sched.h> exists but
112695         is incomplete (such as Haiku).
112696         * lib/sched.in.h; Include the system's <sched.h> if it exists.
112697         (SCHED_FIFO, SCHED_RR, SCHED_OTHER): New macros.
112698         * m4/sched_h.m4 (gl_SCHED_H): Test whether <sched.h> exists and also
112699         defines SCHED_FIFO, SCHED_RR, SCHED_OTHER. Set HAVE_SCHED_H,
112700         HAVE_STRUCT_SCHED_PARAM.
112701         * modules/sched (Depends-on): Add include_next.
112702         (Makefile.am): Substitute HAVE_SCHED_H, INCLUDE_NEXT,
112703         PRAGMA_SYSTEM_HEADER, NEXT_SCHED_H, HAVE_STRUCT_SCHED_PARAM.
112704         * doc/posix-headers/sched.texi: Document the issue.
112706 2008-11-13  Jim Meyering  <meyering@redhat.com>
112708         test-argp-2: avoid test failure when PACKAGE_BUGREPORT is defined
112709         * tests/test-argp-2.sh: When PACKAGE_BUGREPORT was defined, this
112710         test would fail due to the difference in the Report bugs to ...
112711         line.  The expected address is empty, "<>", while the actual
112712         would contain e.g., "<bug-tar@gnu.org>".  Filter out any address.
112714 2008-11-12  Bruno Haible  <bruno@clisp.org>
112716         lstat: don't compile lstat.c on systems lacking lstat
112717         * m4/lstat.m4 (gl_FUNC_LSTAT): Don't compile lstat.c on systems
112718         which don't have lstat; this is handled by lib/sys_stat.in.h already.
112719         Reported by Daniel P. Berrange via Jim Meyering.
112721 2008-11-12  Jim Meyering  <meyering@redhat.com>
112723         * lib/unicodeio.c (unicode_to_mb): Correct spelling of u8_uctomb.
112725 2008-11-12  Simon Josefsson  <simon@josefsson.org>
112727         * modules/warnings (configure.ac): Do AC_SUBST([WARN_CFLAGS]) here
112728         instead.
112730 2008-11-12  Bruno Haible  <bruno@clisp.org>
112732         * lib/unicodeio.c: Include unistr.h.
112733         (utf8_wctomb): Remove function.
112734         (unicode_to_mb): Use utf8_uctomb instead of utf8_wctomb.
112736 2008-11-12  Simon Josefsson  <simon@josefsson.org>
112738         * m4/warnings.m4 (gl_WARN_INIT): Remove, suggested by Ralf
112739         Wildenhues <Ralf.Wildenhues@gmx.de> and Bruno Haible
112740         <bruno@clisp.org>.
112741         * modules/warnings (configure.ac): Don't call gl_WARN_INIT.
112743 2008-11-12  Simon Josefsson  <simon@josefsson.org>
112745         * doc/warnings.texi: New file, from Bruno Haible <bruno@clisp.org>.
112746         * doc/gnulib.texi: Add section for warnings.
112748 2008-11-11  Bruno Haible  <bruno@clisp.org>
112750         * lib/sockets.h: Add a comment.
112752 2008-11-11  Karl Berry  <karl@gnu.org>
112754         * config/srclist.txt (fdl.texi): add, syncing from gnustandards.
112756 2008-11-11  Eric Blake  <ebb9@byu.net>
112758         fdl.texi: avoid git symlinks
112759         * doc/fdl.texi: Copy, rather than link, fdl-1.3.texi.
112761 2008-11-11  Paolo Bonzini  <bonzini@gnu.org>
112763         * m4/warnings.m4 (gl_WARN_ADD): Don't AC_SUBST the empty string.
112765 2008-11-11  Paolo Bonzini  <bonzini@gnu.org>
112767         * m4/warnings.m4 (gl_WARN_INIT): Substitute WARN_CFLAGS.
112768         (gl_WARN_ADD): Substitute $2 if literal.
112770 2008-11-11  Paolo Bonzini  <bonzini@gnu.org>
112772         * m4/warning.m4: Remove.
112774 2008-11-11  Paolo Bonzini  <bonzini@gnu.org>
112776         * m4/warnings.m4: Almost complete rewrite. :-)
112778 2008-11-10  Simon Josefsson  <simon@josefsson.org>
112780         * modules/warnings: New module.
112781         * m4/warnings.m4: New file.
112782         * MODULES.html.sh: Mention warnings module.
112783         With review improvements from Paolo Bonzini <bonzini@gnu.org> and
112784         Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
112786 2008-11-10  Eric Blake  <ebb9@byu.net>
112788         fdl.texi: make a symlink to the latest version
112789         * doc/standards.texi: Revert today's earlier change.
112790         * doc/fdl-1.2.texi: Rename from old fdl.texi...
112791         * doc/fdl.texi: ...and replace this with a symlink to the newer
112792         fdl-1.3.texi.
112794 2008-11-10  Bruno Haible  <bruno@clisp.org>
112796         * tests/test-select-fd.c (main): Accept the result file name as fourth
112797         argument.
112798         * tests/test-select-in.sh: Pass t-select-in.tmp as fourth argument.
112799         * tests/test-select-out.sh: Pass t-select-out.tmp as fourth argument.
112801 2008-11-10  Bruno Haible  <bruno@clisp.org>
112803         * lib/netdb.in.h: Use HAVE_STRUCT_ADDRINFO, HAVE_DECL_GETADDRINFO,
112804         HAVE_DECL_FREEADDRINFO, HAVE_DECL_GAI_STRERROR, HAVE_DECL_GETNAMEINFO
112805         as autoconf-substituted macros.
112806         * m4/netdb_h.m4 (gl_NETDB_H_DEFAULTS): Initialize these variables to 1.
112807         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require
112808         gl_NETDB_H_DEFAULTS. Set these variables.
112809         * modules/netdb (Makefile.am): Substitute these variables.
112811 2008-11-10  Eric Blake  <ebb9@byu.net>
112813         standards.texi: include correct file for FDL 1.3
112814         * doc/standards.texi (GNU Free Documentation License): Change
112815         include file to pull in FDL 1.3, not 1.2.
112817         fdl.texi: revert accidental change to license
112818         * doc/fdl.texi: This is FDL 1.2, not 1.3.
112820 2008-11-10  Bruno Haible  <bruno@clisp.org>
112822         * m4/printf.m4 (gl_PRINTF_ENOMEM): Guess yes on Haiku. Use the
112823         cross-compiling guesses also when the native compile gives no result.
112825 2008-11-10  Bruno Haible  <bruno@clisp.org>
112827         * lib/spawni.c (__spawni): Force variable into the stack.
112829 2008-11-10  Bruno Haible  <bruno@clisp.org>
112831         Add support for Haiku.
112832         * lib/fbufmode.c (fbufmode): Test a symbol that is not only defined on
112833         glibc and BeOS, but also on Haiku.
112834         * lib/fpurge.c (fpurge): Likewise.
112835         * lib/freadable.c (freadable): Likewise.
112836         * lib/freadahead.c (freadahead): Likewise.
112837         * lib/freading.c (freading): Likewise.
112838         * lib/freadptr.c (freadptr): Likewise.
112839         * lib/freadseek.c (freadptrinc): Likewise.
112840         * lib/fseeko.c (rpl_fseeko): Likewise.
112841         * lib/fseterr.c (fseterr): Likewise.
112842         * lib/fwritable.c (fwritable): Likewise.
112843         * lib/fwriting.c (fwriting): Likewise.
112844         Reported by Ingo Weinhold <ingo_weinhold@gmx.de>.
112846 2008-11-10  Ingo Weinhold  <ingo_weinhold@gmx.de>
112848         * lib/config.charset: Treat Haiku like BeOS.
112850 2008-11-10  Ingo Weinhold  <ingo_weinhold@gmx.de>
112852         * lib/binary-io.h (O_BINARY, O_TEXT): Treat Haiku like BeOS.
112853         * lib/fcntl.in.h (O_BINARY, O_TEXT): Likewise.
112855 2008-11-08  Bruno Haible  <bruno@clisp.org>
112857         * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H): Avoid using AC_CHECK_DECL inside
112858         AC_CACHE_CHECK.
112860 2008-11-08  Bruno Haible  <bruno@clisp.org>
112862         * modules/select-tests (configure.ac): Check for unistd.h, sys/wait.h.
112864 2008-11-08  Bruno Haible  <bruno@clisp.org>
112866         * tests/test-select-fd.c: New file.
112867         * tests/test-select-in.sh: New file.
112868         * tests/test-select-out.sh: New file.
112869         * tests/test-select-stdin.c: New file.
112870         * modules/select-tests (Files): Add the new files.
112871         (Depends-on): Add gettimeofday.
112872         (Makefile.am): Add test-select-in.sh, test-select-out.sh to TESTS.
112873         Set TESTS_ENVIRONMENT. Add test-select-fd, test-select-stdin to
112874         check_PROGRAMS. Define test_select_fd_LDADD, test_select_stdin_LDADD.
112876 2008-11-06  Alexander V. Lukyanov  <lav@netis.ru>
112877             Bruno Haible  <bruno@clisp.org>
112879         * lib/sys_stat.in.h: Enclose function definitions in extern "C".
112881 2008-10-12  Giuseppe Scrivano  <gscrivano@gnu.org>
112883         * build-aux/pmccabe2html: Added support for C++ source files.
112885 2008-11-05  Ben Pfaff  <blp@gnu.org>
112887         Fix lib/close.c build on Windows.
112888         * modules/close (Files): Add lib/w32sock.h.
112890 2008-11-05  Joel E. Denny  <jdenny@ces.clemson.edu>
112892         Accept Bison's NEWS format.
112893         * build-aux/announce-gen (print_news_deltas): Tweak
112894         $re_prefix.
112896 2008-11-04  Bruno Haible  <bruno@clisp.org>
112898         * modules/random_r (Maintainer): Add glibc.
112900 2008-11-04  Simon Josefsson  <simon@josefsson.org>
112902         * doc/alloca-opt.texi: Change license to GFDLv1.3+, as suggested
112903         by karl@freefriends.org (Karl Berry).
112904         * doc/alloca.texi: Likewise.
112905         * doc/c-ctype.texi: Likewise.
112906         * doc/c-strcase.texi: Likewise.
112907         * doc/c-strcaseeq.texi: Likewise.
112908         * doc/c-strcasestr.texi: Likewise.
112909         * doc/c-strstr.texi: Likewise.
112910         * doc/c-strtod.texi: Likewise.
112911         * doc/c-strtold.texi: Likewise.
112912         * doc/ctime.texi: Likewise.
112913         * doc/error.texi: Likewise.
112914         * doc/fdl.texi: Likewise.
112915         * doc/gcd.texi: Likewise.
112916         * doc/getdate.texi: Likewise.
112917         * doc/gnulib-intro.texi: Likewise.
112918         * doc/gnulib-tool.texi: Likewise.
112919         * doc/gnulib.texi: Likewise.
112920         * doc/inet_ntoa.texi: Likewise.
112921         * doc/maintain.texi: Likewise.
112922         * doc/make-stds.texi: Likewise.
112923         * doc/quote.texi: Likewise.
112924         * doc/regexprops-generic.texi: Likewise.
112925         * doc/standards.texi: Likewise.
112926         * doc/verify.texi: Likewise.
112927         * doc/visibility.texi: Likewise.
112928         * doc/gnulib.texi (GNU Free Documentation License): Include
112929         fdl-1.3.texi instead of fdl.texi.
112931 2008-11-04  Simon Josefsson  <simon@josefsson.org>
112933         * doc/fdl-1.3.texi: New file, from
112934         <http://www.gnu.org/licenses/fdl-1.3.texi>.
112935         * modules/fdl-1.3: Add.
112936         * MODULES.html.sh: Add fdl-1.3.
112938 2008-11-03  Bruno Haible  <bruno@clisp.org>
112940         Make determination of absolute name of header file work with AIX xlc.
112941         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Require
112942         AC_CANONICAL_HOST. On AIX, use "$CPP -C" rather than "$CPP" for
112943         preprocessing.
112944         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Likewise.
112945         Reported by Gary V. Vaughan <gary@thewrittenword.com>.
112947 2008-11-03  Simon Josefsson  <simon@josefsson.org>
112949         * top/maint.mk (COVERAGE_CCOPTS): Use --coverage instead of
112950         -fprofile-arcs -ftest-coverage.  Suggested by Ludovic Courtès
112951         <ludo@gnu.org>.
112953 2008-11-02  Bruno Haible  <bruno@clisp.org>
112955         Mark 'strpbrk' obsolete.
112956         * modules/strpbrk (Status, Notice): New sections.
112957         * modules/strtok_r (Depends-on): Add strpbrk.
112959 2008-11-02  Bruno Haible  <bruno@clisp.org>
112961         Mark 'strdup' obsolete.
112962         * modules/strdup (Status, Notice): New sections.
112963         * modules/findprog (Depends-on): Add strdup.
112964         * modules/getaddrinfo (Depends-on): Likewise.
112965         * modules/localename (Depends-on): Likewise.
112966         * modules/relocatable-lib (Depends-on): Likewise.
112967         * modules/relocatable-lib-lgpl (Depends-on): Likewise.
112968         * modules/relocatable-prog (Depends-on): Likewise.
112969         * modules/trim (Depends-on): Likewise.
112970         * modules/unictype/gen-ctype (Depends-on): Likewise.
112971         * modules/unilbrk/gen-lbrk (Depends-on): Likewise.
112973 2008-11-02  Bruno Haible  <bruno@clisp.org>
112975         Mark 'strcspn' obsolete.
112976         * modules/strcspn (Status, Notice): New sections.
112978 2008-11-02  Bruno Haible  <bruno@clisp.org>
112980         Mark 'rmdir' obsolete.
112981         * modules/rmdir (Status, Notice): New sections.
112982         * modules/clean-temp (Depends-on): Add rmdir.
112983         * modules/openat (Depends-on): Likewise.
112985 2008-11-02  Bruno Haible  <bruno@clisp.org>
112987         Mark 'raise' obsolete.
112988         * modules/raise (Status, Notice): New sections.
112989         (Include): Specify <signal.h>.
112990         * modules/stdio (Depends-on): Add raise.
112991         * modules/write (Depends-on): Likewise.
112993 2008-11-02  Bruno Haible  <bruno@clisp.org>
112995         Mark 'memset' obsolete.
112996         * modules/memset (Status, Notice): New sections.
112998 2008-11-02  Bruno Haible  <bruno@clisp.org>
113000         Mark 'memmove' obsolete.
113001         * modules/memmove (Status, Notice): New sections.
113002         * modules/argp (Depends-on): Add memmove.
113003         * modules/argz (Depends-on): Likewise.
113004         * modules/canonicalize (Depends-on): Likewise.
113005         * modules/canonicalize-lgpl (Depends-on): Likewise.
113006         * modules/fts (Depends-on): Likewise.
113007         * modules/getcwd (Depends-on): Likewise.
113008         * modules/human (Depends-on): Likewise.
113009         * modules/regex (Depends-on): Likewise.
113010         * modules/striconveh (Depends-on): Likewise.
113011         * modules/trim (Depends-on): Likewise.
113012         * modules/unistr/u8-move (Depends-on): Likewise.
113013         * modules/unistr/u16-move (Depends-on): Likewise.
113014         * modules/unistr/u32-move (Depends-on): Likewise.
113016 2008-11-02  Bruno Haible  <bruno@clisp.org>
113018         Mark 'memcpy' obsolete.
113019         * modules/memcpy (Status, Notice): New sections.
113021 2008-11-02  Bruno Haible  <bruno@clisp.org>
113023         Mark 'memcmp' obsolete.
113024         * modules/memcmp (Status, Notice): New sections.
113025         * modules/argmatch (Depends-on): Add memchr.
113026         * modules/backupfile (Depends-on): Likewise.
113027         * modules/c-strcasestr (Depends-on): Likewise.
113028         * modules/crypto/des (Depends-on): Likewise.
113029         * modules/csharpcomp (Depends-on): Likewise.
113030         * modules/fnmatch (Depends-on): Likewise.
113031         * modules/git-merge-changelog (Depends-on): Likewise.
113032         * modules/isnand (Depends-on): Likewise.
113033         * modules/isnand-nolibm (Depends-on): Likewise.
113034         * modules/isnanf (Depends-on): Likewise.
113035         * modules/isnanf-nolibm (Depends-on): Likewise.
113036         * modules/isnanl (Depends-on): Likewise.
113037         * modules/isnanl-nolibm (Depends-on): Likewise.
113038         * modules/mbchar (Depends-on): Likewise.
113039         * modules/memcoll (Depends-on): Likewise.
113040         * modules/quotearg (Depends-on): Likewise.
113041         * modules/regex (Depends-on): Likewise.
113042         * modules/relocatable-prog (Depends-on): Likewise.
113043         * modules/same (Depends-on): Likewise.
113044         * modules/signbit (Depends-on): Likewise.
113045         * modules/strcasestr-simple (Depends-on): Likewise.
113046         * modules/unictype/gen-ctype (Depends-on): Likewise.
113047         * modules/unilbrk/gen-lbrk (Depends-on): Likewise.
113048         * modules/uniname/uniname (Depends-on): Likewise.
113049         * modules/unistr/u8-cmp (Depends-on): Likewise.
113051 2008-11-02  Bruno Haible  <bruno@clisp.org>
113053         Mark 'memchr' obsolete.
113054         * modules/memchr (Status, Notice): New sections.
113055         * modules/argp (Depends-on): Add memchr.
113056         * modules/base64 (Depends-on): Likewise.
113057         * modules/c-strcasestr (Depends-on): Likewise.
113058         * modules/chdir-long (Depends-on): Likewise.
113059         * modules/fnmatch (Depends-on): Likewise.
113060         * modules/getsubopt (Depends-on): Likewise.
113061         * modules/git-merge-changelog (Depends-on): Likewise.
113062         * modules/glob (Depends-on): Likewise.
113063         * modules/strcasestr-simple (Depends-on): Likewise.
113064         * modules/strnlen (Depends-on): Likewise.
113066 2008-11-02  Bruno Haible  <bruno@clisp.org>
113068         Mark 'atexit' obsolete.
113069         * modules/atexit (Status, Notice): New sections.
113070         * modules/chdir-long (Depends-on): Add atexit.
113071         * modules/wait-process (Depends-on): Likewise.
113073 2008-11-02  Bruno Haible  <bruno@clisp.org>
113075         * gnulib-tool: New option --with-obsolete.
113076         (func_usage): Document it.
113077         (func_modules_transitive_closure): Drop obsolete dependencies if
113078         incobsolete is not true.
113079         (func_import): Read and save the incobsolete variable to the cache.
113081 2008-11-02  Bruno Haible  <bruno@clisp.org>
113083         * modules/TEMPLATE-EXTENDED: New field 'Status'.
113084         * gnulib-tool: New option --extract-status.
113085         (func_usage): Document it.
113086         (sed_extract_prog): Recognize it.
113087         (func_get_status): New function.
113089 2008-10-30  Simon Josefsson  <simon@josefsson.org>
113091         * modules/sockets (License): Change from LGPL to LGPLv2+.
113093 2008-10-28  Simon Josefsson  <simon@josefsson.org>
113095         * top/maint.mk: Add coverage rules, inspired by scripts in gnupdf.
113097 2008-10-28  Simon Josefsson  <simon@josefsson.org>
113099         * MODULES.html.sh (Support for systems lacking POSIX:2001):
113100         Mention times and sys_times.
113101         * modules/sys_times, modules/sys_times-tests: New modules.
113102         * modules/times, modules/times-tests: Likewise
113103         * m4/sys_times_h.m4: New file.
113104         * lib/sys_times.in.h: Likewise
113105         * lib/times.c: Likewise.
113106         * tests/test-sys_times.c: Likewise.
113107         * tests/test-times.c: Likewise.
113108         * doc/posix-headers/sys_times.texi: Update.
113109         * doc/posix-functions/times.texi: Update.
113111 2008-10-28  Jim Meyering  <meyering@redhat.com>
113113         * modules/tempname (Depends-on): Add lstat.
113115         * modules/lstat (License): Relicense: LGPL -> LGPLv2+.
113117 2008-10-28  Simon Josefsson  <simon@josefsson.org>
113119         * gnulib-tool (func_emit_tests_Makefile_am): Revert last commit.
113120         * modules/argp-tests (test_argp_LDADD): Set EXEEXT here instead,
113121         using idiom used elsewhere in gnulib.
113123 2008-10-27  Jim Meyering  <meyering@redhat.com>
113125         * modules/gethostname (License): Relicense: LGPL -> LGPLv2+.
113127 2008-10-27  Simon Josefsson  <simon@josefsson.org>
113129         * gnulib-tool (func_emit_tests_Makefile_am): Set EXEEXT in
113130         TESTS_ENVIRONMENT, for shell scripts that needs to call built
113131         programs.
113132         * tests/test-argp-2.sh: Use $EXEEXT when needed.
113134 2008-10-27  Simon Josefsson  <simon@josefsson.org>
113136         * lib/sys_stat.in.h (lstat): Fix declaration for mingw.
113138 2008-10-27  Bruno Haible  <bruno@clisp.org>
113140         * tests/test-lstat.c: Include <stdio.h>.
113142 2008-10-27  Simon Josefsson  <simon@josefsson.org>
113144         * modules/lstat-tests: New module.
113145         * tests/test-lstat.c: New file.
113147 2008-10-26  Jim Meyering  <meyering@redhat.com>
113149         * lib/mkdir.c (rpl_mkdir) [_WIN32...]: Mark mode as an unused parameter.
113151 2008-10-26  Simon Josefsson  <simon@josefsson.org>
113152             Bruno Haible  <bruno@clisp.org>
113154         Fix a clash between the type DATADIR on Windows and the macro DATADIR.
113155         * modules/configmake (Include): Add a note that the include must come
113156         after all system headers.
113157         * lib/javaversion.c: Include configmake.h after all other includes.
113159 2008-10-26  Bruno Haible  <bruno@clisp.org>
113161         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Set default of
113162         HAVE_STRUCT_RANDOM_DATA to 1.
113163         (gl_STDLIB_H): Simplify.
113165 2008-10-26  Simon Josefsson  <simon@josefsson.org>
113167         * m4/stdlib_h.m4: Check for struct random_data.  Initialize and
113168         substitute HAVE_STRUCT_RANDOM_DATA.
113169         * lib/stdlib.in.h [!HAVE_STRUCT_RANDOM_DATA]: Provide struct
113170         random_data.
113171         * modules/stdlib (Makefile.am): Substitute
113172         HAVE_STRUCT_RANDOM_DATA.
113174 2008-10-26  Simon Josefsson  <simon@josefsson.org>
113176         * doc/gnulib.texi (@copying): Use GFDLv1.2+.
113177         * doc/gnulib-intro.texi (Copyright): Likewise.
113179 2008-10-26  Simon Josefsson  <simon@josefsson.org>
113181         * doc/gnulib.texi (Header files): C++ fixes, based on Bruno's
113182         findings.
113184 2008-10-25  Ben Pfaff  <blp@cs.stanford.edu>
113185             Bruno Haible  <bruno@clisp.org>
113187         * lib/unistd.in.h: Include <winsock2.h>.
113188         (socket, connect,accept, bind, getpeername, getsockname, getsockopt,
113189         listen, recv, send, recvfrom, sendto, setsockopt, shutdown, select):
113190         Provide dummy declarations.
113191         (gethostname): Override.
113192         * lib/sys_socket.in.h (gethostname): Provide dummy declaration.
113193         * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): Invoke
113194         gl_PREREQ_SYS_H_WINSOCK2.
113195         * modules/gethostname (Files): Add m4/sys_socket_h.m4.
113196         * doc/posix-functions/gethostname.texi: More details.
113198 2008-10-25  Bruno Haible  <bruno@clisp.org>
113200         * m4/sys_socket_h.m4 (gl_PREREQ_SYS_H_WINSOCK2): Require
113201         gl_UNISTD_H_DEFAULTS, gl_SYS_IOCTL_H_DEFAULTS only if they exist.
113202         * modules/sys_socket (Files): Remove m4/unistd_h.m4, m4/sys_ioctl_h.m4.
113204         * lib/sys_socket.in.h (HAVE__GL_CLOSE_FD_MAYBE_SOCKET); Move macro from
113205         here ...
113206         * lib/unistd.in.h (HAVE__GL_CLOSE_FD_MAYBE_SOCKET); ... to here.
113207         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_H_DEFAULTS): Remove invocation of
113208         gl_UNISTD_H_DEFAULTS.
113210 2008-10-25  Eric Blake  <ebb9@byu.net>
113212         signbit: avoid spurious compiler failure
113213         * m4/signbit.m4 (gl_SIGNBIT_TEST_PROGRAM): Move non-constant
113214         declarations inside function.
113216 2008-10-24  Simon Josefsson  <simon@josefsson.org>
113217             Bruno Haible  <bruno@clisp.org>
113219         * lib/stdlib.in.h (@GNULIB_RANDOM_R@): Include stdint.h.
113220         * modules/random_r (Depends-on): Add stdint.
113222 2008-10-24  Bruno Haible  <bruno@clisp.org>
113224         * modules/intprops (License): Change to LGPLv2+, with approval by Paul
113225         Eggert.
113226         * modules/strerror (License): Likewise.
113228 2008-10-24  Jim Meyering  <meyering@redhat.com>
113230         sys_socket: fix typo that inhibited expansion of @GNULIB_SEND@
113231         * modules/sys_socket (Depends-on) [Depends-on]: Fix typo.
113233 2008-10-24  Eric Blake  <ebb9@byu.net>
113235         getgroups: fix compilation when getgroups is available
113236         * lib/getgroups.c (includes): Include <unistd.h> for getgroups,
113237         but with <config.h> override of getgroups disabled.
113239 2008-10-24  Simon Josefsson  <simon@josefsson.org>
113241         * doc/gnulib.texi (Header files): Add note about C++ problems.
113242         Explained by Bruno Haible <bruno@clisp.org>.
113244 2008-10-23  Bruno Haible  <bruno@clisp.org>
113246         Define a dummy SA_NODEFER macro on Interix.
113247         * lib/signal.in.h (SA_NODEFER): Define fallback.
113248         Reported by Aleksey Cheusov <cheusov@tut.by> via
113249         Thomas Klausner <wiz@netbsd.org> and Eric Blake.
113251 2008-10-23  Bruno Haible  <bruno@clisp.org>
113253         * modules/freadahead (License): Change to LGPLv2+.
113254         Suggested by Simon Josefsson.
113256 2008-10-23  Jim Meyering  <meyering@redhat.com>
113258         random_r: new module
113259         * modules/random_r: New file.
113260         * m4/random_r.m4: New file.
113261         * lib/random_r.c: New file, from glibc.
113262         * modules/random_r-tests: New file.
113263         * tests/test-random_r.c: New file.
113264         * lib/stdlib.in.h (srandom_r, initstate_r, setstate_r, random_r):
113265          Declare.
113266         (RAND_MAX): Define.
113267         * m4/stdlib_h.m4: Define and AC_SUBST GNULIB_RANDOM_R and HAVE_RANDOM_R.
113268         * modules/stdlib: Substitute them, too.
113269         * MODULES.html.sh (Extra functions based on POSIX:2001) [Misc]: Add it.
113270         * doc/glibc-functions/initstate_r.texi: Mention the new module.
113271         * doc/glibc-functions/random_r.texi: Likewise.
113272         * doc/glibc-functions/setstate_r.texi: Likewise.
113273         * doc/glibc-functions/srandom_r.texi: Likewise.
113274         * config/srclist.txt: Mention it.
113276 2008-10-23  David Lutterkort  <lutter@redhat.com>
113278         * modules/selinux-h: Search for LIB_SELINUX and mark it as a
113279         link requirement
113281 2008-10-23  Jim Meyering  <meyering@redhat.com>
113283         selinux-h: mark parameters of stub functions as intentionally unused
113284         * lib/se-selinux.in.h: Mark parameters as _UNUSED_PARAMETER_.
113285         * lib/se-context.in.h: Likewise.
113287 2008-10-22  Simon Josefsson  <simon@josefsson.org>
113289         * lib/sys_socket.in.h (FD_ISSET): Fix warnings under mingw.
113291 2008-10-22  Simon Josefsson  <simon@josefsson.org>
113293         * m4/getgroups.m4: Avoid invoking test with wrong parameters.
113295 2008-10-22  Eric Blake  <ebb9@byu.net>
113297         glthread/thread: avoid compiler warning
113298         * lib/glthread/thread.c (gl_thread_exit_func) [USE_WIN32_THREADS]:
113299         Add unreachable abort to silence compiler.
113301 2008-10-22  Eric Blake  <ebb9@byu.net>
113303         netdb: also supply struct addrinfo for cygwin 1.5.x
113304         * m4/netdb_h.m4 (gl_HEADER_NETDB): Check for incomplete header on
113305         older cygwin.
113306         * lib/netdb.in.h [!HAVE_STRUCT_ADDRINFO]: Also supply contents for
113307         cygwin.
113308         * doc/posix-headers/netdb.texi (netdb.h): Document this.
113310 2008-10-22  Bruno Haible  <bruno@clisp.org>
113312         * users.txt: Update entry about pspp.
113314 2008-10-21  Bruno Haible  <bruno@clisp.org>
113316         Simplification.
113317         * lib/sys_socket.in.h (_gl_close_fd_maybe_socket): Remove declaration.
113318         * lib/close.c (_gl_close_fd_maybe_socket): Make static.
113320         Simplification.
113321         * lib/ioctl.c (ioctl): Don't undefine.
113322         * lib/socket.c (socket): Don't undefine.
113324         Remove unused module indicator macros.
113325         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_MODULE_INDICATOR): Don't define
113326         GNULIB_$1 as a C macro.
113328         * doc/posix-functions/close.texi: Undo last change.
113329         * doc/posix-functions/ioctl.texi: Merge the two paragraphs about
113330         Windows platforms.
113332 2008-10-21  Bruno Haible  <bruno@clisp.org>
113334         Add gethostname() declaration to <unistd.h>.
113335         * lib/unistd.in.h (gethostname): New declaration.
113336         * lib/gethostname.c: Include <unistd.h>.
113337         * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): Require
113338         gl_UNISTD_H_DEFAULTS. Set HAVE_GETHOSTNAME.
113339         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GETHOSTNAME
113340         and HAVE_GETHOSTNAME.
113341         * modules/gethostname (Depends-on): Add unistd.
113342         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
113343         (Include): Specify <unistd.h>.
113344         * modules/unistd (Makefile.am): Substitute GNULIB_GETHOSTNAME and
113345         HAVE_GETHOSTNAME.
113346         * tests/test-gethostname.c: Include <unistd.h> first.
113348 2008-10-21  Bruno Haible  <bruno@clisp.org>
113350         * modules/poll-tests (Depends-on): Add sys_ioctl, ioctl.
113351         * modules/select-tests (Depends-on): Likewise.
113352         Reported by Simon Josefsson.
113354 2008-10-21  Simon Josefsson  <simon@josefsson.org>
113356         * lib/close.c: Add _gl_close_fd_maybe_socket from winsock.c.
113357         * lib/accept.c: New file, based on winsock.c.
113358         * lib/bind.c: New file, based on winsock.c.
113359         * lib/connect.c: New file, based on winsock.c.
113360         * lib/getpeername.c: New file, based on winsock.c.
113361         * lib/getsockname.c: New file, based on winsock.c.
113362         * lib/getsockopt.c: New file, based on winsock.c.
113363         * lib/ioctl.c: New file, based on winsock.c.
113364         * lib/listen.c: New file, based on winsock.c.
113365         * lib/recv.c: New file, based on winsock.c.
113366         * lib/recvfrom.c: New file, based on winsock.c.
113367         * lib/send.c: New file, based on winsock.c.
113368         * lib/sendto.c: New file, based on winsock.c.
113369         * lib/setsockopt.c: New file, based on winsock.c.
113370         * lib/shutdown.c: New file, based on winsock.c.
113371         * lib/socket.c: New file, based on winsock.c.
113372         * lib/w32sock.h: New file, based on winsock.c.
113373         * lib/winsock.c: Remove file.
113374         * modules/accept: Likewise.
113375         * modules/bind: Likewise.
113376         * modules/connect: Likewise.
113377         * modules/getpeername: Likewise.
113378         * modules/getsockname: Likewise.
113379         * modules/getsockopt: Likewise.
113380         * modules/ioctl: Likewise.
113381         * modules/listen: Likewise.
113382         * modules/recv: Likewise.
113383         * modules/recvfrom: Likewise.
113384         * modules/send: Likewise.
113385         * modules/sendto: Likewise.
113386         * modules/setsockopt: Likewise.
113387         * modules/shutdown: Likewise.
113388         * modules/socket: Use socket.c instead of winsock.c.
113389         * modules/sys_socket: Remove (unneeded?) dependency on winsock.c.
113390         * doc/posix-functions/accept.texi: Doc fix.
113391         * doc/posix-functions/bind.texi: Doc fix.
113392         * doc/posix-functions/close.texi: Doc fix.
113393         * doc/posix-functions/connect.texi: Doc fix.
113394         * doc/posix-functions/getpeername.texi: Doc fix.
113395         * doc/posix-functions/getsockname.texi: Doc fix.
113396         * doc/posix-functions/getsockopt.texi: Doc fix.
113397         * doc/posix-functions/ioctl.texi: Doc fix.
113398         * doc/posix-functions/listen.texi: Doc fix.
113399         * doc/posix-functions/recv.texi: Doc fix.
113400         * doc/posix-functions/recvfrom.texi: Doc fix.
113401         * doc/posix-functions/send.texi: Doc fix.
113402         * doc/posix-functions/sendto.texi: Doc fix.
113403         * doc/posix-functions/setsockopt.texi: Doc fix.
113404         * doc/posix-functions/shutdown.texi: Doc fix.
113405         * doc/posix-functions/socket.texi: Doc fix.
113407 2008-10-20  Bruno Haible  <bruno@clisp.org>
113409         Take into account the role of SIGABRT_COMPAT on Windows 2008.
113410         * lib/sigprocmask.c (SIGABRT_COMPAT, SIGABRT_COMPAT_MASK): New macros.
113411         (sigismember, sigaddset, sigdelset, sigfillset, rpl_signal): Handle it
113412         as an alias for SIGABRT.
113413         * lib/sigaction.c (SIGABRT_COMPAT): New macro.
113414         (sigaction): Map it to SIGABRT.
113415         Reported by Ramiro Polla <ramiro.polla@gmail.com> via Eric Blake.
113417 2008-10-20  Bruno Haible  <bruno@clisp.org>
113419         * lib/fts.c: Don't include lstat.h.
113420         * lib/openat.c: Include <sys/stat.h> instead of lstat.h.
113422         Move the lstat() declaration to <sys/stat.h>.
113423         * lib/lstat.h: Remove file.
113424         * lib/sys_stat.in.h: Add special invocation convention.
113425         (lstat): New declaration.
113426         * lib/lstat.c (orig_lstat): New function.
113427         (rpl_lstat): Use orig_lstat instead of lstat.
113428         * m4/lstat.m4 (gl_FUNC_LSTAT): Require gl_SYS_STAT_H_DEFAULTS and
113429         AC_C_INLINE. Set REPLACE_LSTAT.
113430         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize GNULIB_LSTAT
113431         and REPLACE_LSTAT.
113432         * modules/lstat (Files): Remove lib/lstat.h.
113433         (configure.ac): Invoke gl_SYS_STAT_MODULE_INDICATOR.
113434         (Include): Specify <sys/stat.h> instead of lstat.h.
113435         * modules/sys_stat (Makefile.am): Substitute GNULIB_LSTAT and
113436         REPLACE_LSTAT.
113437         * NEWS: Mention the change.
113439 2008-10-20  Bruno Haible  <bruno@clisp.org>
113441         * modules/posix_spawn-tests: New file.
113442         * tests/test-posix_spawn3.c: New file.
113444 2008-10-20  Bruno Haible  <bruno@clisp.org>
113446         * modules/posix_spawnp-tests (Depends-on): Add sys_wait.
113447         * tests/test-posix_spawn1.c (WTERMSIG, WCOREDUMP, WEXITSTATUS,
113448         WIFSIGNALED, WIFEXITED, WIFSTOPPED): Remove fallback definitions.
113449         * tests/test-posix_spawn2.c (WTERMSIG, WCOREDUMP, WEXITSTATUS,
113450         WIFSIGNALED, WIFEXITED, WIFSTOPPED): Likewise.
113452 2008-10-20  Bruno Haible  <bruno@clisp.org>
113454         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Test against another bug
113455         of posix_spawn on AIX 5.3.
113457 2008-10-20  Bruno Haible  <bruno@clisp.org>
113459         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Make the check on MacOS X.
113461 2008-10-20  Bruno Haible  <bruno@clisp.org>
113463         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Use AC_LANG_SOURCE instead
113464         of AC_LANG_PROGRAM.
113466 2008-10-20  Simon Josefsson  <simon@josefsson.org>
113468         * lib/netdb.in.h: Don't define GNU specific constants until they
113469         are supported or needed.  Reported by Bruno Haible
113470         <bruno@clisp.org>.
113472 2008-10-20  Simon Josefsson  <simon@josefsson.org>
113474         * lib/canon-host.c: Include netdb.h instead of getaddrinfo.h.
113476 2008-10-20  Simon Josefsson  <simon@josefsson.org>
113478         * lib/getaddrinfo.h: Remove file.
113479         * modules/getaddrinfo: Reflect move from getaddrinfo.h to netdb.h.
113480         * m4/getaddrinfo.m4: Call gl_HEADER_NETDB.  Don't check for netdb.h.
113481         * lib/netdb.in.h: Add declarations from getaddrinfo.h.
113482         * m4/netdb_h.m4: Initialize GNULIB_GETADDRINFO to 0.
113483         * modules/netdb: Substitute GNULIB_GETADDRINFO.
113484         * lib/getaddrinfo.c: Include netdb.h instead of getaddrinfo.h.
113485         * tests/test-getaddrinfo.c: Likewise.
113486         * lib/gai_strerror.c: Likewise.  Also drop HAVE_NETDB_H check.
113487         * NEWS: Mention change.
113489 2008-10-19  Bruno Haible  <bruno@clisp.org>
113491         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Remove unneeded code.
113493 2008-10-19  Bruno Haible  <bruno@clisp.org>
113495         * lib/wait-process.c: Include simply <sys/wait.h>.
113496         (waitpid, WTERMSIG, WCOREDUMP, WEXITSTATUS, WIFSIGNALED, WIFEXITED,
113497         WIFSTOPPED): Remove fallback definitions.
113498         * modules/wait-process (Depends-on): Add sys_wait.
113500         New module 'sys_wait'.
113501         * modules/sys_wait: New file.
113502         * lib/sys_wait.in.h: New file, partially copied from
113503         lib/wait-process.c.
113504         * m4/sys_wait_h.m4: New file.
113505         * doc/posix-headers/sys_wait.texi: Mention the new module.
113507 2008-10-19  Bruno Haible  <bruno@clisp.org>
113509         * m4/wait-process.m4 (gl_WAIT_PROCESS): Remove test for unistd.h.
113511 2008-10-19  Bruno Haible  <bruno@clisp.org>
113513         Assume that waitpid() fills an 'int' status, not a 'union wait'.
113514         * lib/wait-process.c (WAIT_T): Remove type.
113515         (WTERMSIG, WCOREDUMP, WEXITSTATUS): Define fallbacks using bit masks.
113516         (wait_subprocess): Update.
113518 2008-10-19  Bruno Haible  <bruno@clisp.org>
113520         New module 'atoll'.
113521         * modules/atoll: New file.
113522         * lib/stdlib.in.h (atoll): New declaration.
113523         * lib/atoll.c: New file, from glibc with modifications.
113524         * m4/atoll.m4: New file.
113525         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_ATOLL,
113526         HAVE_ATOLL.
113527         * modules/stdlib (Makefile.am): Substitute GNULIB_ATOLL, HAVE_ATOLL.
113528         * doc/posix-functions/atoll.texi: Mention the new module.
113530 2008-10-19  Bruno Haible  <bruno@clisp.org>
113532         Add strtoull() declaration to <stdlib.h>.
113533         * lib/stdlib.in.h (strtoull): New declaration.
113534         * m4/strtoull.m4 (gl_FUNC_STRTOLL): Require gl_STDLIB_H_DEFAULTS.
113535         Set HAVE_STRTOULL.
113536         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_STRTOULL,
113537         HAVE_STRTOULL.
113538         * modules/strtoull (Depends-on): Add stdlib.
113539         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
113540         * modules/stdlib (Makefile.am): Substitute GNULIB_STRTOULL,
113541         HAVE_STRTOULL.
113543 2008-10-19  Bruno Haible  <bruno@clisp.org>
113545         Add strtoll() declaration to <stdlib.h>.
113546         * lib/stdlib.in.h (strtoll): New declaration.
113547         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Require gl_STDLIB_H_DEFAULTS.
113548         Set HAVE_STRTOLL.
113549         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_STRTOLL,
113550         HAVE_STRTOLL.
113551         * modules/strtoll (Depends-on): Add stdlib.
113552         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
113553         * modules/stdlib (Makefile.am): Substitute GNULIB_STRTOLL, HAVE_STRTOLL.
113555 2008-10-19  Bruno Haible  <bruno@clisp.org>
113557         * modules/bcopy (Depends-on): Add strings.
113558         (Include): Specify <strings.h>.
113560 2008-10-19  Bruno Haible  <bruno@clisp.org>
113562         * doc/posix-functions/atexit.texi: Update doc regarding mingw.
113564 2008-10-19  Bruno Haible  <bruno@clisp.org>
113566         * lib/openat-die.c (openat_save_fail, openat_restore_fail): Rename
113567         the parameter from 'errno' to 'errnum'. Fixes a compilation error on
113568         mingw.
113570 2008-10-19  Bruno Haible  <bruno@clisp.org>
113572         * lib/atanl.c: Don't include isnanl.h.
113573         * lib/cosl.c: Likewise.
113574         * lib/ldexpl.c: Likewise.
113575         * lib/logl.c: Likewise.
113576         * lib/sinl.c: Likewise.
113577         * lib/sqrtl.c: Likewise.
113578         * lib/tanl.c: Likewise.
113580         Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
113581         * lib/isnanf.h: Remove file.
113582         * lib/isnand.h: Remove file.
113583         * lib/isnanl.h: Remove file.
113584         * lib/math.in.h: Include the contents of lib/isnanf.h, lib/isnand.h,
113585         lib/isnanl.h. Use HAVE_ISNANF, HAVE_ISNAND, HAVE_ISNANL as substituted
113586         macros.
113587         * m4/isnanf.m4 (gl_FUNC_ISNANF): Require gl_MATH_H_DEFAULTS. Set
113588         HAVE_ISNANF, don't define it as a C macro.
113589         * m4/isnand.m4 (gl_FUNC_ISNAND): Require gl_MATH_H_DEFAULTS. Set
113590         HAVE_ISNAND, don't define it as a C macro.
113591         * m4/isnanl.m4 (gl_FUNC_ISNANL): Require gl_MATH_H_DEFAULTS. Set
113592         HAVE_ISNANL, don't define it as a C macro.
113593         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_ISNAN[FDL] and
113594         HAVE_ISNAN[FDL].
113595         * modules/isnanf (Files): Remove lib/isnanf.h.
113596         (Depends-on): Add math.
113597         (configure.ac): Invoke gl_MATH_MODULE_INDICATOR.
113598         (Include): Specify <math.h> instead of isnanf.h.
113599         * modules/isnand (Files): Remove lib/isnand.h.
113600         (Depends-on): Add math.
113601         (configure.ac): Invoke gl_MATH_MODULE_INDICATOR.
113602         (Include): Specify <math.h> instead of isnand.h.
113603         * modules/isnanl (Files): Remove lib/isnanl.h.
113604         (Depends-on): Add math.
113605         (configure.ac): Invoke gl_MATH_MODULE_INDICATOR.
113606         (Include): Specify <math.h> instead of isnanl.h.
113607         * modules/math (Makefile.am): Substitute GNULIB_ISNAN[FDL] and
113608         HAVE_ISNAN[FDL].
113609         * tests/test-isnanf.c: Include <math.h> instead of isnanf.h.
113610         * tests/test-isnand.c: Include <math.h> instead of isnand.h.
113611         * tests/test-isnanl.c: Include <math.h> instead of isnanl.h.
113612         * NEWS: Mention the change.
113614 2008-10-18  Bruno Haible  <bruno@clisp.org>
113616         Add getusershell(), setusershell(), endusershell() declarations to
113617         <unistd.h>.
113618         * lib/unistd.in.h (getusershell, setusershell, endusershell): New
113619         declarations.
113620         * lib/getusershell.c: Include unistd.h.
113621         * m4/getusershell.m4 (gl_FUNC_GETUSERSHELL): Require
113622         gl_UNISTD_H_DEFAULTS and AC_USE_SYSTEM_EXTENSIONS. Set
113623         HAVE_GETUSERSHELL.
113624         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GETUSERSHELL
113625         and HAVE_GETUSERSHELL.
113626         * modules/getusershell (Depends-on): Add unistd, extensions.
113627         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
113628         (Include): Specify <unistd.h>.
113629         * modules/unistd (Makefile.am): Substitute GNULIB_GETUSERSHELL and
113630         HAVE_GETUSERSHELL.
113632 2008-10-18  Bruno Haible  <bruno@clisp.org>
113634         Add a getloadavg() declaration to <stdlib.h>.
113635         * lib/stdlib.in.h; Include <sys/loadavg.h> when needed for the
113636         getloadavg declaration.
113637         (getloadavg): New declaration.
113638         * lib/getloadavg.c: Include <stdlib.h> first.
113639         * m4/getloadavg.m4 (gl_GETLOADAVG): Require gl_STDLIB_H_DEFAULTS and
113640         AC_USE_SYSTEM_EXTENSIONS. Test whether sys/loadavg.h exists. Set
113641         HAVE_SYS_LOADAVG_H and HAVE_DECL_GETLOADAVG.
113642         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_GETLOADAVG,
113643         HAVE_SYS_LOADAVG_H, HAVE_DECL_GETLOADAVG.
113644         * modules/getloadavg (Depends-on): Add stdlib, extensions.
113645         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
113646         (Include): Specify <stdlib.h>.
113647         * modules/stdlib (Makefile.am): Substitute GNULIB_GETLOADAVG,
113648         HAVE_SYS_LOADAVG_H, HAVE_DECL_GETLOADAVG.
113650 2008-10-18  Bruno Haible  <bruno@clisp.org>
113652         * lib/dirchownmod.c: Don't include lchmod.h.
113654         Move the lchmod() declaration to <sys/stat.h>.
113655         * lib/lchmod.h: Remove file.
113656         * lib/sys_stat.in.h: Add placeholder for GL_LINK_WARNING.
113657         (lchmod): New declaration, moved here from lib/lchown.h.
113658         * m4/lchmod.m4 (gl_FUNC_LCHMOD): Require gl_SYS_STAT_H_DEFAULTS and
113659         AC_USE_SYSTEM_EXTENSIONS. Set HAVE_LCHMOD.
113660         * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize GNULIB_LCHMOD
113661         and HAVE_LCHMOD.
113662         * modules/lchmod (Files): Remove lib/lchmod.h.
113663         (Depends-on): Add sys_stat, extensions.
113664         (configure.ac): Invoke gl_SYS_STAT_MODULE_INDICATOR.
113665         (Include): Specify <sys/stat.h> instead of lchmod.h.
113666         * modules/sys_stat (Depends-on): Add link-warning.
113667         (Makefile.am): Substitute GNULIB_LCHMOD, HAVE_LCHMOD, and the
113668         definition of GL_LINK_WARNING.
113669         * NEWS: Mention the change.
113671 2008-10-18  Bruno Haible  <bruno@clisp.org>
113673         * lib/fchdir.c: Don't include dirfd.h.
113674         * lib/fts.c: Likewise.
113675         * lib/getcwd.c: Likewise.
113676         * lib/glob.c: Likewise.
113678         Move the dirfd() declaration to <dirent.h>.
113679         * lib/dirfd.h: Remove file.
113680         * lib/dirent.in.h: Add placeholder for GL_LINK_WARNING.
113681         (dirfd): New declaration.
113682         * lib/dirfd.c: Include <dirent.h> instead of dirfd.h.
113683         * m4/dirfd.m4 (gl_FUNC_DIRFD): Require gl_DIRENT_H_DEFAULTS and
113684         AC_USE_SYSTEM_EXTENSIONS. Invoke gl_REPLACE_DIRENT_H. Set
113685         HAVE_DECL_DIRFD.
113686         * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Initialize GNULIB_DIRFD and
113687         HAVE_DECL_DIRFD.
113688         * modules/dirfd (Files): Remove lib/dirfd.h.
113689         (Depends-on): Add dirent, extensions.
113690         (configure.ac): Invoke gl_DIRENT_MODULE_INDICATOR.
113691         (Include): Specify <dirent.h> instead of dirfd.h.
113692         * modules/dirent (Depends-on): Add link-warning.
113693         (Makefile.am): Substitute GNULIB_DIRFD, HAVE_DECL_DIRFD, and
113694         definition of GL_LINK_WARNING.
113695         * NEWS: Mention the change.
113697 2008-10-18  Bruno Haible  <bruno@clisp.org>
113699         Move the euidaccess() declaration to <unistd.h>.
113700         * lib/euidaccess.h: Remove file.
113701         * lib/unistd.in.h (euidaccess): New declaration.
113702         * lib/euidaccess.c: Don't include euidaccess.h.
113703         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Require gl_UNISTD_H_DEFAULTS.
113704         Don't check whether euidaccess is declared. Set HAVE_EUIDACCESS.
113705         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_EUIDACCESS
113706         and HAVE_EUIDACCESS.
113707         * modules/euidaccess (Files): Remove lib/euidaccess.h.
113708         (Depends-on): Add unistd.
113709         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
113710         (Include): Specify <unistd.h> instead of euidaccess.h.
113711         * modules/unistd (Makefile.am): Substitute GNULIB_EUIDACCESS and
113712         HAVE_EUIDACCESS.
113713         * NEWS: Mention the change.
113715 2008-10-18  Bruno Haible  <bruno@clisp.org>
113717         * lib/xgetdomainname.c: Include <unistd.h> instead of getdomainname.h.
113719         Move the getdomainname() declaration to <unistd.h>.
113720         * lib/getdomainname.h: Remove file.
113721         * lib/unistd.in.h (getdomainname): New declaration.
113722         * lib/getdomainname.c: Include <unistd.h> instead of getdomainname.h.
113723         * m4/getdomainname.m4 (gl_FUNC_GETDOMAINNAME): Require
113724         gl_UNISTD_H_DEFAULTS and AC_USE_SYSTEM_EXTENSIONS. Set
113725         HAVE_GETDOMAINNAME.
113726         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
113727         GNULIB_GETDOMAINNAME and HAVE_GETDOMAINNAME.
113728         * modules/getdomainname (Files): Remove lib/getdomainname.h.
113729         (Depends-on): Add unistd, extensions.
113730         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
113731         (Includes): Specify <unistd.h> instead of getdomainname.h.
113732         * modules/unistd (Makefile.am): Substitute GNULIB_GETDOMAINNAME and
113733         HAVE_GETDOMAINNAME.
113734         * NEWS: Mention the change.
113736 2008-10-18  Bruno Haible  <bruno@clisp.org>
113738         * modules/dirent: New file.
113739         * m4/dirent_h.m4: New file.
113740         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_DIRENT_H_DEFAULTS.
113741         Invoke gl_REPLACE_DIRENT_H. Don't assign DIRENT_H directly.
113742         * modules/fchdir (Files): Remove lib/dirent.in.h.
113743         (Depends-on): Add dirent.
113744         (Makefile.am): Move rules to modules/dirent.
113745         * doc/posix-headers/dirent.texi: Mention the new module.
113747 2008-10-18  Bruno Haible  <bruno@clisp.org>
113749         Avoid -Wunused-parameter warnings in public gnulib header files.
113750         * m4/gnulib-common.m4 (gl_COMMON_BODY): Define _UNUSED_PARAMETER_ as a
113751         macro.
113752         * lib/unistr.h (u32_mbtouc_unsafe, u32_mbtouc): Use it.
113754 2008-10-18  Bruno Haible  <bruno@clisp.org>
113756         * doc/glibc-functions/dirfd.texi: Mention the module 'dirfd'.
113757         * doc/glibc-functions/error.texi: Mention the module 'error'.
113758         * doc/glibc-functions/euidaccess.texi: Mention the module 'euidaccess'.
113759         * doc/glibc-functions/getdomainname.texi: Mention the module
113760         'getdomainname'.
113761         * doc/glibc-functions/getloadavg.texi: Mention the module 'getloadavg'.
113762         * doc/glibc-functions/getpagesize.texi: Mention the module
113763         'getpagesize'.
113764         * doc/glibc-functions/getusershell.texi: Mention the module
113765         'getusershell'.
113766         * doc/glibc-functions/isnanl.texi: Mention the module 'isnanl'.
113767         * doc/glibc-functions/lchmod.texi: Mention the module 'lchmod'.
113768         * doc/glibc-functions/mempcpy.texi: Mention the module 'mempcpy'.
113769         * doc/glibc-functions/memrchr.texi: Mention the module 'memrchr'.
113770         * doc/glibc-functions/mkdtemp.texi: Mention the module 'mkdtemp'.
113771         * doc/glibc-functions/rpmatch.texi: Mention the module 'rpmatch'.
113772         * doc/glibc-functions/stpcpy.texi: Mention the module 'stpcpy'.
113773         * doc/glibc-functions/stpncpy.texi: Mention the module 'stpncpy'.
113774         * doc/glibc-functions/strchrnul.texi: Mention the module 'strchrnul'.
113775         * doc/glibc-functions/strndup.texi: Mention the module 'strndup'.
113776         * doc/glibc-functions/strnlen.texi: Mention the module 'strnlen'.
113777         * doc/glibc-functions/strsep.texi: Mention the module 'strsep'.
113778         * doc/glibc-functions/timegm.texi: Mention the module 'timegm'.
113779         * doc/glibc-functions/vasprintf.texi: Mention the module 'vasprintf'.
113781 2008-10-17  Bruno Haible  <bruno@clisp.org>
113783         * m4/signbit.m4 (gl_SIGNBIT_TEST_PROGRAM): On platforms other than
113784         HP-UX and IRIX, use -0.0L.
113785         * tests/test-ceill.c (minus_zero): Likewise.
113786         * tests/test-floorl.c (minus_zero): Likewise.
113787         * tests/test-frexpl.c (minus_zero): Likewise.
113788         * tests/test-isnan.c (minus_zerol): Likewise.
113789         * tests/test-isnanl.h (minus_zero): Likewise.
113790         * tests/test-ldexpl.c (minus_zero): Likewise.
113791         * tests/test-roundl.c (minus_zero): Likewise.
113792         * tests/test-signbit.c (minus_zerol): Likewise.
113793         * tests/test-snprintf-posix.h (minus_zerol): Likewise.
113794         * tests/test-sprintf-posix.h (minus_zerol): Likewise.
113795         * tests/test-truncl.c (minus_zero): Likewise.
113796         * tests/test-vasnprintf-posix.c (minus_zerol): Likewise.
113797         * tests/test-vasprintf-posix.c (minus_zerol): Likewise.
113798         Reported by Markus Armbruster <armbru@redhat.com> via Jim Meyering
113799         and by Nelson H. F. Beebe <beebe@math.utah.edu> via Eric Blake.
113801 2008-10-17  Bruno Haible  <bruno@clisp.org>
113803         Avoid gcc warnings because of #pragma GCC system_header on older gcc.
113804         * lib/arpa_inet.in.h: Encloses reference to PRAGMA_SYSTEM_HEADER so
113805         that it gets activated only for gcc >= 3.0.
113806         * lib/dirent.in.h: Likewise.
113807         * lib/errno.in.h: Likewise.
113808         * lib/fcntl.in.h: Likewise.
113809         * lib/float.in.h: Likewise.
113810         * lib/iconv.in.h: Likewise.
113811         * lib/inttypes.in.h: Likewise.
113812         * lib/locale.in.h: Likewise.
113813         * lib/math.in.h: Likewise.
113814         * lib/netdb.in.h: Likewise.
113815         * lib/netinet_in.in.h: Likewise.
113816         * lib/search.in.h: Likewise.
113817         * lib/signal.in.h: Likewise.
113818         * lib/spawn.in.h: Likewise.
113819         * lib/stdarg.in.h: Likewise.
113820         * lib/stdint.in.h: Likewise.
113821         * lib/stdio.in.h: Likewise.
113822         * lib/stdlib.in.h: Likewise.
113823         * lib/string.in.h: Likewise.
113824         * lib/strings.in.h: Likewise.
113825         * lib/sys_file.in.h: Likewise.
113826         * lib/sys_ioctl.in.h: Likewise.
113827         * lib/sys_select.in.h: Likewise.
113828         * lib/sys_socket.in.h: Likewise.
113829         * lib/sys_stat.in.h: Likewise.
113830         * lib/sys_time.in.h: Likewise.
113831         * lib/sysexits.in.h: Likewise.
113832         * lib/time.in.h: Likewise.
113833         * lib/unistd.in.h: Likewise.
113834         * lib/wchar.in.h: Likewise.
113835         * lib/wctype.in.h: Likewise.
113836         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
113838 2008-10-17  Jim Meyering  <meyering@redhat.com>
113840         ignore-value: don't depend on inline module
113841         * modules/ignore-value (Depends-on): Remove 'inline'.
113842         (configure.ac): Instead, add AC_REQUIRE([AC_C_INLINE]) here.
113843         Suggestion from Bruno Haible.
113845 2008-10-17  Bruno Haible  <bruno@clisp.org>
113847         New implementation of condition variables for Win32.
113848         * lib/glthread/cond.h (struct gl_waitqueue_link): New type.
113849         (gl_linked_waitqueue_t): New type.
113850         (gl_cond_t): Use it.
113851         * lib/glthread/cond.c (struct gl_waitqueue_element): New type.
113852         (gl_waitqueue_init, gl_waitqueue_add, gl_waitqueue_remove,
113853         gl_waitqueue_notify_first, gl_waitqueue_notify_all): New functions.
113854         (glthread_cond_init_func, glthread_cond_wait_func,
113855         glthread_cond_timedwait_func, glthread_cond_signal_func,
113856         glthread_cond_broadcast_func, glthread_cond_destroy_func):
113857         Reimplemented on the basis of gl_linked_waitqueue_t.
113858         * lib/glthread/lock.h (gl_carray_waitqueue_t): Renamed from
113859         gl_waitqueue_t.
113860         (gl_rwlock_t): Update.
113861         * lib/glthread/lock.c (gl_waitqueue_t): Alias to gl_carray_waitqueue_t.
113863 2008-10-17  Simon Josefsson  <simon@josefsson.org>
113865         * modules/recvfrom (Depends-on): Add dependency on getpeername.
113866         Reported by Yoann Vandoorselaere <yoann@prelude-ids.org>.
113868 2008-10-17  Jim Meyering  <meyering@redhat.com>
113870         ignore-value: new module
113871         * modules/ignore-value: New file.
113872         * lib/ignore-value.h: New file.
113873         * MODULES.html.sh (Compiler warning management): New section,
113874         just for this module.  More to come.
113876 2008-10-16  Paul Eggert  <eggert@cs.ucla.edu>
113878         open-safer.c: avoid 'signed and unsigned in conditional...' warning
113879         * lib/open-safer.c (open_safer): Use an "if/else" statement in place
113880         of the ternary operator.  Reported by Reuben Thomas <rrt@sc3d.org>.
113882 2008-10-16  Jim Meyering  <meyering@redhat.com>
113884         openat-die.c: avoid 'no previous prototype' warning
113885         * lib/openat-die.c: Include "openat.h".
113886         Reported by Reuben Thomas <rrt@sc3d.org>.
113888 2008-10-16  Simon Josefsson  <simon@josefsson.org>
113890         * m4/netdb_h.m4: Assume that if netdb.h exists, it works.
113891         * lib/netdb.in.h: Fix typo.
113892         Reported by Bruno Haible  <bruno@clisp.org>
113894         * lib/netdb.in.h: Include sys/socket.h for platforms without
113895         netdb.h, to get structures like hostent on MinGW.
113896         * modules/netdb (Depends-on): Add sys_socket.
113898 2008-10-15  Simon Josefsson  <simon@josefsson.org>
113900         * modules/netdb, modules/netdb-tests: New file.
113901         * m4/netdb_h.m4: New file.
113902         * lib/netdb.in.h: Add, currently just an empty file pending
113903         definitions.
113904         * tests/test-netdb.c: New file.
113905         * doc/posix-headers/netdb.texi: Mention that we replace it if
113906         needed.
113907         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
113908         netdb.
113910 2008-10-15  Simon Josefsson  <simon@josefsson.org>
113912         * doc/gnulib.texi (Getaddrinfo and WINVER): Sync documentation
113913         with code.
113915 2008-10-13  Bruno Haible  <bruno@clisp.org>
113917         * lib/glthread/cond.c (glthread_cond_wait_func,
113918         glthread_cond_timedwait_func): Add a comment.
113920 2008-10-13  Yoann Vandoorselaere  <yoann@prelude-ids.org>
113922         * tests/test-poll.c: Include <sys/ioctl.h>, for ioctl().
113923         * tests/test-select.c: Likewise,
113925 2008-10-13  Bruno Haible  <bruno@clisp.org>
113927         * lib/glthread/cond.c (glthread_cond_wait_func,
113928         glthread_cond_timedwait_func): Fix variable name.
113929         Reported by Yoann Vandoorselaere <yoann@prelude-ids.org>.
113931 2008-10-13  Paolo Bonzini  <bonzini@gnu.org>
113933         fix getaddrinfo emulation for systems with struct sockaddr.sa_len
113934         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Detect
113935         struct sockaddr.sa_len.
113936         * lib/getaddrinfo.c (getaddrinfo): Set it if appropriate.
113938 2008-10-13  Simon Josefsson  <simon@josefsson.org>
113940         * build-aux/pmccabe2html: Add css and css_url parameters.
113942 2008-10-12  Bruno Haible  <bruno@clisp.org>
113944         * tests/test-sameacls.c (main) [AIX]: Clear type argument before
113945         calling aclx_get.
113946         Reported by Rainer Tammer <tammer@tammer.net>.
113948 2008-10-12  Bruno Haible  <bruno@clisp.org>
113950         Use msvcrt aware primitives for creation/termination of Win32 threads.
113951         * lib/glthread/thread.c: Include <process.h>.
113952         (glthread_create_func): Use _beginthreadex instead of CreateThread.
113953         (wrapper_func): Update signature.
113954         (gl_thread_exit_func): Use _endthreadex instead of EndThread.
113956 2008-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
113957             Bruno Haible  <bruno@clisp.org>
113959         Provide a Win32 implementation of the 'cond' module.
113960         * lib/glthread/cond.h [USE_WIN32]: New implementation.
113961         * lib/glthread/cond.c (glthread_cond_init_func,
113962         glthread_cond_wait_func, glthread_cond_timedwait_func,
113963         glthread_cond_signal_func, glthread_cond_broadcast_func,
113964         glthread_cond_destroy_func) [USE_WIN32]: New functions.
113965         * modules/cond (Dependencies): Add gettimeofday.
113967 2008-10-11  Bruno Haible  <bruno@clisp.org>
113969         Make sleep work on older versions of mingw.
113970         * m4/sleep.m4 (gl_FUNC_SLEEP): Test whether 'sleep' is declared, not
113971         only whether it exists.
113972         * doc/posix-functions/sleep.texi: Mention the problem with older
113973         versions of mingw.
113975 2008-10-11  Bruno Haible  <bruno@clisp.org>
113977         New module 'shutdown'.
113978         * modules/shutdown: New file.
113979         * lib/sys_socket.in.h (shutdown): New declaration.
113980         * lib/winsock.c (shutdown): New function.
113981         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_H_DEFAULTS): Initialize
113982         GNULIB_SHUTDOWN.
113983         * modules/sys_socket (Makefile.am): Substitute GNULIB_SHUTDOWN.
113984         * doc/posix-functions/shutdown.texi: Document the new module.
113986 2008-10-11  Jim Meyering  <meyering@redhat.com>
113988         * lib/fclose.c: Fix typo in comment: s/close/fclose/.
113990 2008-10-11  Bruno Haible  <bruno@clisp.org>
113992         New module 'fclose'.
113993         * modules/fclose: New file.
113994         * lib/stdio.in.h (fclose): New declaration.
113995         * lib/fclose.c: New file.
113996         * m4/fclose.m4: New file.
113997         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize GNULIB_FCLOSE,
113998         REPLACE_FCLOSE.
113999         * m4/close.m4 (gl_REPLACE_CLOSE): Invoke gl_REPLACE_FCLOSE.
114000         * modules/stdio (Makefile.am): Substitute GNULIB_FCLOSE,
114001         REPLACE_FCLOSE.
114002         * modules/close (Depends-on): fclose.
114003         * doc/posix-functions/fclose.texi: Mention the problem on Windows.
114005 2008-10-11  Bruno Haible  <bruno@clisp.org>
114007         * lib/winsock.c (_gl_close_fd_maybe_socket): If closesocket fails,
114008         set errno and don't call _close.
114010 2008-10-10  Bruno Haible  <bruno@clisp.org>
114012         * lib/copy-acl.c (qcopy_acl) [CYGWIN]: Call chmod before setting the
114013         ACL, not afterwards. Fixes test failure on Cygwin.
114015 2008-10-09  Ben Pfaff  <blp@gnu.org>
114017         * build-aux/announce-gen: Fix gnulib version related part of usage
114018         message.  Die with a useful error message if no tarballs are
114019         found.
114021 2008-10-10  Jim Meyering  <meyering@redhat.com>
114023         bootstrap: use git's --depth=N option only if it's supported
114024         * build-aux/bootstrap: Work with git-1.4.4.4, which does not
114025         recognize the --depth option.  Reported by Pádraig Brady.
114027 2008-10-09  Bruno Haible  <bruno@clisp.org>
114029         New module 'ioctl'.
114030         * modules/ioctl: New file.
114031         * lib/sys_socket.in.h (ioctl): Remove declaration.
114032         * lib/winsock.c: Include <sys/ioctl.h>.
114033         (rpl_ioctl): Define only of the gnulib module 'ioctl' is present.
114034         * m4/sys_socket_h.m4 (gl_PREREQ_SYS_H_WINSOCK2): Require
114035         gl_SYS_IOCTL_H_DEFAULTS. Set also SYS_IOCTL_H_HAVE_WINSOCK2_H.
114036         * modules/sys_socket (Files): Add m4/sys_ioctl_h.m4.
114037         * doc/posix-functions/ioctl.texi: Mention the new module.
114039 2008-10-09  Bruno Haible  <bruno@clisp.org>
114041         New module 'sys_ioctl'.
114042         * lib/sys_ioctl.in.h: New file.
114043         * m4/sys_ioctl_h.m4: New file.
114044         * modules/sys_ioctl: New file.
114045         * doc/glibc-headers/sys_ioctl.texi: Mention the new module.
114047 2008-10-09  Bruno Haible  <bruno@clisp.org>
114049         * lib/sys_socket.in.h (ioctl): Make signature POSIX compliant.
114050         * lib/winsock.c: Include <stdarg.h>.
114051         (rpl_ioctl): Change to second argument 'int' and then varargs.
114053 2008-10-09  Bruno Haible  <bruno@clisp.org>
114055         * m4/close.m4 (gl_FUNC_CLOSE): Arrange to replace the close() function
114056         when the sys_socket module is present and the system has <winsock2.h>.
114058 2008-10-09  Bruno Haible  <bruno@clisp.org>
114060         * doc/posix-functions/close.texi: Mention module 'close' instead of
114061         module 'sys_socket'.
114063 2008-10-09  Bruno Haible  <bruno@clisp.org>
114065         * doc/glibc-headers/sys_ioctl.texi: New file.
114066         * doc/gnulib.texi: Include it.
114068 2008-10-09  Paolo Bonzini  <bonzini@gnu.org>
114069             Bruno Haible  <bruno@clisp.org>
114071         Combine the two replacements of 'close'.
114072         * lib/sys_socket.in.h (close): Define to a reminder to include
114073         <unistd.h>.
114074         (_gl_close_fd_maybe_socket): New declaration.
114075         (HAVE__GL_CLOSE_FD_MAYBE_SOCKET): New macro.
114076         * lib/winsock.c (close): Remove undefinition.
114077         (_gl_close_fd_maybe_socket): Renamed from rpl_close. Define only when
114078         needed for the gnulib module 'close'.
114079         * lib/unistd.in.h (close): If the gnulib module 'close' is not used,
114080         define to an error symbol or to a warning, if suitable.
114081         * lib/close.c: Include <sys/socket.h>.
114082         (rpl_close): Invoke _gl_close_fd_maybe_socket when gnulib defines it.
114083         * m4/sys_socket_h.m4 (gl_PREREQ_SYS_H_WINSOCK2): Set also
114084         UNISTD_H_HAVE_WINSOCK2_H.
114085         (gl_SYS_SOCKET_H_DEFAULTS): Require gl_UNISTD_H_DEFAULTS.
114086         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
114087         UNISTD_H_HAVE_WINSOCK2_H.
114088         * modules/sys_socket (Files): Add m4/unistd_h.m4.
114089         (configure.ac): Set a module indicator.
114090         (Makefile.am): Substitute GNULIB_CLOSE.
114091         * modules/unistd (Makefile.am): Substitute UNISTD_H_HAVE_WINSOCK2_H.
114092         * modules/poll-tests (Depends-on): Add close.
114093         * modules/select-tests (Depends-on): Likewise.
114095 2008-10-09  Paolo Bonzini  <bonzini@gnu.org>
114096             Bruno Haible  <bruno@clisp.org>
114098         New module 'close'.
114099         * modules/close: New file.
114100         * lib/unistd.in.h (close): Move declaration out of the
114101         FCHDIR_REPLACEMENT scope.
114102         (_gl_unregister_fd): New declaration.
114103         * lib/close.c: New file.
114104         * lib/fchdir.c (rpl_close): Remove function.
114105         * m4/close.m4: New file.
114106         * m4/fchdir.m4 (gl_FUNC_FCHDIR): When replacing fchdir, also replace
114107         close.
114108         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_CLOSE and
114109         REPLACE_CLOSE.
114110         * modules/unistd (Makefile.am): Substitute GNULIB_CLOSE and
114111         REPLACE_CLOSE.
114112         * modules/fchdir (Depends-on): Add close.
114114 2008-10-09  Paolo Bonzini  <bonzini@gnu.org>
114115             Bruno Haible  <bruno@clisp.org>
114117         * lib/fcntl.in.h (open): Simplify conditionals.
114118         (_gl_register_fd): New declaration.
114119         * lib/fchdir.c (rpl_open): Remove function.
114120         * lib/open.c: When FCHDIR_REPLACEMENT is defined, compile the file
114121         also.
114122         (open): When FCHDIR_REPLACEMENT is defined, invoke _gl_register_fd.
114123         * m4/fchdir.m4 (gl_FUNC_FCHDIR): When replacing fchdir, also replace
114124         open.
114126 2008-10-09  Jim Meyering  <meyering@redhat.com>
114128         GNUmakefile: use the more name-space-friendly "_version"
114129         * top/GNUmakefile (_dummy): Update.
114130         (_version): Rename from "version".
114132 2008-10-09  Paolo Bonzini  <bonzini@gnu.org>
114133             Bruno Haible  <bruno@clisp.org>
114135         * lib/fchdir.c (_gl_unregister_fd): New functions, extracted from
114136         rpl_close.
114137         (_gl_register_fd): New function, extracted from rpl_open.
114138         (rpl_close, rpl_closedir): Use _gl_unregister_fd.
114139         (rpl_open, rpl_opendir): Use _gl_register_fd.
114141 2008-10-09  Paolo Bonzini  <bonzini@gnu.org>
114143         Fix organization of 'open' replacement.
114144         * m4/open.m4 (gl_REPLACE_OPEN): New macro.
114145         (gl_FUNC_OPEN): Use it.
114146         (gl_PREREQ_OPEN): Add a : to make the body non-empty.
114148 2008-10-08  Bruno Haible  <bruno@clisp.org>
114150         * modules/getdate-tests (test_getdata_LDADD): Add LIBINTL.
114152 2008-10-08  Simon Josefsson  <simon@josefsson.org>
114154         * m4/sys_socket_h.m4: Don't AC_LIBOBJ(winsock).  The file is
114155         AC_LIBOBJ'ed by each gnulib module that needs it (e.g., socket,
114156         listen).
114158 2008-10-08  Eric Blake  <ebb9@byu.net>
114160         GNUmakefile: add 'make version' target
114161         * top/GNUmakefile (_curr-ver): Split version update rules...
114162         (version): ...into a target.
114164 2008-10-07  Bruno Haible  <bruno@clisp.org>
114166         Use a more portable replacement expression for -0.0L.
114167         * m4/signbit.m4 (gl_SIGNBIT_TEST_PROGRAM): Use -LDBL_MIN * LDBL_MIN
114168         instead of -0.0L. Fix m4 quotation.
114170         * tests/test-signbit.c: Include <float.h>.
114171         (minus_zero): New variable.
114172         (test_signbitl): Use minus_zero instead of -zero.
114173         * modules/signbit-tests (Depends-on): Add float.
114175         * tests/test-ceill.c: Include <float.h>.
114176         (zero): Remove variable.
114177         (minus_zero): New variable.
114178         (main): Use minus_zero instead of -zero.
114179         * modules/ceill-tests (Depends-on): Add float.
114181         * tests/test-floorl.c: Include <float.h>.
114182         (zero): Remove variable.
114183         (minus_zero): New variable.
114184         (main): Use minus_zero instead of -zero.
114185         * modules/floorl-tests (Depends-on): Add float.
114187         * tests/test-roundl.c: Include <float.h>.
114188         (zero): Remove variable.
114189         (minus_zero): New variable.
114190         (main): Use minus_zero instead of -zero.
114191         * modules/roundl-tests (Depends-on): Add float.
114193         * tests/test-truncl.c: Include <float.h>.
114194         (zero): Remove variable.
114195         (minus_zero): New variable.
114196         (main): Use minus_zero instead of -zero.
114197         * modules/truncl-tests (Depends-on): Add float.
114199         * tests/test-frexpl.c (zero): Remove variable.
114200         (minus_zero): New variable.
114201         (main): Use minus_zero instead of -zero.
114202         * modules/frexpl-tests (Depends-on): Add float.
114204         * tests/test-isnan.c (zerol): Remove variable.
114205         (minus_zerol): New variable.
114206         (test_long_double): Use minus_zerol instead of -zerol.
114207         * modules/isnan-tests (Depends-on): Add float.
114209         * tests/test-isnanl.h (zero): Remove variable.
114210         (minus_zero): New variable.
114211         (main): Use minus_zero instead of -zero.
114212         * modules/isnanl-nolibm-tests (Depends-on): Add float.
114213         * modules/isnanl-tests (Depends-on): Add float.
114215         * tests/test-ldexpl.c (zero): Remove variable.
114216         (minus_zero): New variable.
114217         (main): Use minus_zero instead of -zero.
114218         * modules/ldexpl-tests (Depends-on): Add float.
114220         * tests/test-snprintf-posix.h (zerol): Remove variable.
114221         (minus_zerol): New variable.
114222         (test_function): Use minus_zerol instead of -zerol.
114223         * modules/snprintf-posix-tests (Depends-on): Add float.
114224         * modules/vsnprintf-posix-tests (Depends-on): Add float.
114226         * tests/test-sprintf-posix.h (zerol): Remove variable.
114227         (minus_zerol): New variable.
114228         (test_function): Use minus_zerol instead of -zerol.
114229         * modules/sprintf-posix-tests (Depends-on): Add float.
114230         * modules/vsprintf-posix-tests (Depends-on): Add float.
114232         * tests/test-vasnprintf-posix.c (zerol): Remove variable.
114233         (minus_zerol): New variable.
114234         (test_function): Use minus_zerol instead of -zerol.
114235         * modules/vasnprintf-posix-tests (Depends-on): Add float.
114237         * tests/test-vasprintf-posix.c (zerol): Remove variable.
114238         (minus_zerol): New variable.
114239         (test_function): Use minus_zerol instead of -zerol.
114240         * modules/vasprintf-posix-tests (Depends-on): Add float.
114242 2008-10-07  Simon Josefsson  <simon@josefsson.org>
114244         * MODULES.html.sh (Support for building documentation): Mention
114245         pmccabe2html.  Sort entries.
114247         Add pmccabe2html module, from gnupdf.
114248         * build-aux/pmccabe.css: New file.
114249         * build-aux/pmccabe2html: New file.
114250         * m4/pmccabe2html.m4: New file.
114251         * modules/pmccabe2html: New file.
114253 2008-10-07  Richard W.M. Jones  <rjones@redhat.com>
114255         flock: new module
114256         * MODULES.html.sh: Add to list of modules.
114257         * lib/flock.c: flock implementation for Windows and Unix systems
114258         which have fcntl.
114259         * doc/glibc-functions/flock.texi: Update documentation.
114260         * lib/sys_file.in.h: <sys/file.h> header file.
114261         * m4/flock.m4: M4 macros.
114262         * m4/sys_file_h.m4: M4 macros for replacement sys/file.h.
114263         * modules/flock: flock module.
114264         * modules/flock-tests: flock tests module.
114265         * modules/sys_file: sys/file.h module.
114266         * tests/test-flock.c: test suite for flock.
114268 2008-10-06  Jim Meyering  <meyering@redhat.com>
114270         bootstrap: check for LT_INIT more portably still ;-)
114271         * build-aux/bootstrap: Don't rely on \>, since it's not portable.
114272         Spotted by Bruno Haible.
114274 2008-10-06  Eric Blake  <ebb9@byu.net>
114276         test-signbit: avoid tripping Irix cc bug on -0.0L
114277         * tests/test-signbit.c (minus_zerol): Delete, and replace with
114278         '-zerol'.  This may break on HP-UX/hppa, but at least makes the
114279         entire testsuite consistent and avoids an Irix 6.2 bug.
114281 2008-10-05  Bruno Haible  <bruno@clisp.org>
114282             Jim Meyering  <jim@meyering.net>
114284         Add an option for ignoring EPIPE during close_stdout.
114285         * lib/closeout.h: Include <stdbool.h>.
114286         (close_stdout_set_ignore_EPIPE): New declaration.
114287         * lib/closeout.c: Include <stdbool.h>.
114288         (ignore_EPIPE): New variable.
114289         (close_stdout_set_ignore_EPIPE): New function.
114290         (close_stdout): Ignore EPIPE error if ignore_EPIPE is set.
114291         * lib/close-stream.c (close_stream): Mention the possible EPIPE
114292         failure.
114293         * modules/closeout (Depends-on): Add stdbool.
114295 2008-10-05  Bruno Haible  <bruno@clisp.org>
114297         * modules/accept: New file.
114298         * modules/bind: New file.
114299         * modules/connect: New file.
114300         * modules/getpeername: New file.
114301         * modules/getsockname: New file.
114302         * modules/getsockopt: New file.
114303         * modules/listen: New file.
114304         * modules/recv: New file.
114305         * modules/recvfrom: New file.
114306         * modules/send: New file.
114307         * modules/sendto: New file.
114308         * modules/setsockopt: New file.
114309         * modules/socket: New file.
114310         * lib/sys_socket.in.h: Include the GL_LINK_WARNING definition.
114311         (socket, connect, accept, bind, getpeername, getsockname, getsockopt,
114312         listen, recv, send, recvfrom, sendto, setsockopt): Declare only when
114313         the particular module is requested. Add a link warning when the
114314         particular module is not requested.
114315         * lib/winsock.c (rpl_socket, rpl_connect, rpl_accept, rpl_bind,
114316         rpl_getpeername, rpl_getsockname, rpl_getsockopt, rpl_listen, rpl_recv,
114317         rpl_send, rpl_recvfrom, rpl_sendto, rpl_setsockopt): Define only when
114318         the particular module is requested.
114319         * m4/sys_socket_h.m4 (gl_SYS_SOCKET_MODULE_INDICATOR,
114320         gl_SYS_SOCKET_H_DEFAULTS): New macros.
114321         (gl_HEADER_SYS_SOCKET): Require gl_SYS_SOCKET_H_DEFAULTS.
114322         * modules/sys_socket (Depends-on): Add link-warning.
114323         (Makeifle.am): Substitute GNULIB_SOCKET, GNULIB_CONNECT, GNULIB_ACCEPT,
114324         GNULIB_BIND, GNULIB_GETPEERNAME, GNULIB_GETSOCKNAME, GNULIB_GETSOCKOPT,
114325         GNULIB_LISTEN, GNULIB_RECV, GNULIB_SEND, GNULIB_RECVFROM,
114326         GNULIB_SENDTO, GNULIB_SETSOCKOPT, and the definition of
114327         GL_LINK_WARNING.
114328         * doc/posix-functions/accept.texi: Mention the new module 'accept'.
114329         * doc/posix-functions/bind.texi: Mention the new module 'bind'.
114330         * doc/posix-functions/connect.texi: Mention the new module 'connect'.
114331         * doc/posix-functions/getpeername.texi: Mention the new module
114332         'getpeername'.
114333         * doc/posix-functions/getsockname.texi: Mention the new module
114334         'getsockname'.
114335         * doc/posix-functions/getsockopt.texi: Mention the new module
114336         'getsockopt'.
114337         * doc/posix-functions/listen.texi: Mention the new module 'listen'.
114338         * doc/posix-functions/recv.texi: Mention the new module 'recv'.
114339         * doc/posix-functions/recvfrom.texi: Mention the new module 'recvfrom'.
114340         * doc/posix-functions/send.texi: Mention the new module 'send'.
114341         * doc/posix-functions/sendto.texi: Mention the new module 'sendto'.
114342         * doc/posix-functions/setsockopt.texi: Mention the new module
114343         'setsockopt'.
114344         * doc/posix-functions/socket.texi: Mention the new module 'socket'.
114345         * modules/poll-tests (Depends-on): Add socket, bind, getsockopt,
114346         listen, connect, accept.
114347         * modules/select-tests (Depends-on): Likewise.
114349 2008-10-05  Bruno Haible  <bruno@clisp.org>
114351         * lib/winsock.c (strerror): Remove unused #undef.
114352         (rpl_close): Remove unused local variable.
114354         * modules/sys_socket (Depends-on); Add errno.
114356 2008-10-05  Bruno Haible  <bruno@clisp.org>
114358         * lib/sys_select.in.h: Include the GL_LINK_WARNING definition.
114359         (select): Add a link warning when the 'select' module is not used.
114360         * modules/sys_select (Depends-on): Add link-warning.
114361         (Makefile.am): Substitute the definition of GL_LINK_WARNING.
114362         Suggested by Paolo Bonzini.
114364 2008-10-05  Jim Meyering  <meyering@redhat.com>
114366         bootstrap: check for LT_INIT more portably
114367         * build-aux/bootstrap: Avoid using grep -E, since it's not
114368         portable enough.  Suggestion from Bruno Haible.
114370 2008-10-05  Bruno Haible  <bruno@clisp.org>
114372         * doc/posix-headers/sys_select.texi: Mention 'struct timeval' problem
114373         as being fixed by gnulib.
114375 2008-10-05  Bruno Haible  <bruno@clisp.org>
114377         * modules/select-tests: New file, mostly copied from
114378         modules/sys_select-tests.
114379         * tests/test-select.c: New file, mostly copied from
114380         tests/test-sys_select.c.
114381         * tests/test-sys_select.c: Move most of the code to tests/test-select.c.
114382         * modules/sys_select-tests (Depends-on): Remove all dependencies.
114383         (Makefile.am): Remove test_sys_select_LDADD.
114385         * lib/sys_select.in.h (select): If GNULIB_SELECT is not set, define it
114386         to an undefined symbol, for an error message.
114387         * m4/sys_select_h.m4 (gl_SYS_SELECT_MODULE_INDICATOR): New macro.
114388         (gl_SYS_SELECT_H_DEFAULTS): New macro.
114389         (gl_HEADER_SYS_SELECT): Require it. Don't require compilation of
114390         winsock-select.c here.
114391         * modules/sys_select (Files): Remove lib/winsock-select.c.
114392         (Depends-on): Remove alloca.
114393         (Makefile.am): Substitute GNULIB_SELECT.
114394         * modules/select: New file.
114395         * doc/posix-functions/select.texi: Update.
114397 2008-10-05  Bruno Haible  <bruno@clisp.org>
114399         * lib/spawn_faction_addclose.c (__sysconf): Use getdtablesize always.
114400         * lib/spawn_faction_adddup2.c (__sysconf): Likewise.
114401         * lib/spawn_faction_addopen.c (__sysconf): Likewise.
114402         * modules/posix_spawn_file_actions_addclose (Depends-on): Add
114403         getdtablesize.
114404         * modules/posix_spawn_file_actions_adddup2 (Depends-on): Likewise.
114405         * modules/posix_spawn_file_actions_addopen (Depends-on): Likewise.
114407 2008-10-05  Bruno Haible  <bruno@clisp.org>
114409         * modules/getdtablesize-tests: New file.
114410         * tests/test-getdtablesize.c: New file.
114412         New module 'getdtablesize'.
114413         * lib/unistd.in.h (getdtablesize): New declaration.
114414         * lib/getdtablesize.c: New file.
114415         * m4/getdtablesize.m4: New file.
114416         * modules/getdtablesize: New file.
114417         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
114418         GNULIB_GETDTABLESIZE, HAVE_GETDTABLESIZE.
114419         * modules/unistd (Makefile.am): Substitute GNULIB_GETDTABLESIZE,
114420         HAVE_GETDTABLESIZE.
114421         * doc/glibc-functions/getdtablesize.texi: Mention the new module.
114423 2008-10-05  Bruno Haible  <bruno@clisp.org>
114425         * modules/sched (Makefile.am): Fix typo.
114426         Reported by Simon Josefsson.
114428 2008-10-05  Jim Meyering  <meyering@redhat.com>
114430         bootstrap: check for LT_INIT, too
114431         * build-aux/bootstrap: Both AC_PROG_LIBTOOL and AM_PROG_LIBTOOL
114432         are deprecated.  Suggestion from Ralf Wildenhues.
114434 2008-10-05  Bruno Haible  <bruno@clisp.org>
114436         * lib/spawn.in.h (POSIX_SPAWN_*): Use the system's values, rather than
114437         overriding them by ours.
114438         (POSIX_SPAWN_USEVFORK): Use the next free bit position.
114440 2008-10-05  Jim Meyering  <meyering@redhat.com>
114442         bootstrap: check for AC_PROG_LIBTOOL as well as AM_PROG_LIBTOOL
114443         * build-aux/bootstrap: Check for AC_PROG_LIBTOOL, as well as the
114444         obsolete AM_PROG_LIBTOOL.  Spotted by Debarshi Ray <rishi@gnu.org>.
114446 2008-10-04  Bruno Haible  <bruno@clisp.org>
114448         * modules/dup2 (License): Change to LGPLv2+.
114449         * modules/sleep (License): Likewise.
114450         * modules/perror (License): Likewise.
114451         * modules/fopen (License): Change to LGPLv2+, with approval by Eric
114452         Blake.
114453         * modules/signal (License): Likewise.
114454         * modules/sigprocmask (License): Likewise.
114455         * modules/raise (License): Change to LGPLv2+, with approval by Jim
114456         Meyering.
114458 2008-10-04  Bruno Haible  <bruno@clisp.org>
114460         * lib/spawn.in.h (POSIX_SPAWN_*): Undefine before redefining.
114461         Reported by Rainer Tammer <tammer@tammer.net>.
114463 2008-10-03  Paolo Bonzini  <bonzini@gnu.org>
114464             Bruno Haible  <bruno@clisp.org>
114466         * lib/errno.in.h (EWOULDBLOCK) [win32]: Define to EAGAIN.
114467         * lib/winsock.c (set_winsock_errno): Map WSAEWOULDBLOCK to EWOULDBLOCK.
114468         * lib/strerror.c (rpl_strerror): Remove error string for EWOULDBLOCK.
114470 2008-10-03  Kamil Dudka  <kdudka@redhat.com>
114472         filevercmp: new module
114473         * lib/filevercmp.h: New function filevercmp comparing version strings.
114474         * lib/filevercmp.c: Implementation of filevercmp function.
114475         * modules/filevercmp: Module metadata.
114476         * tests/test-filevercmp.c: Unit test for new module.
114477         * modules/filevercmp-tests: Unit test metadata.
114478         * MODULES.html.sh: Add filevercmp module.
114480 2008-10-03  Bruno Haible  <bruno@clisp.org>
114482         * lib/c-ctype.h: Add comment.
114483         Reported by Jim Meyering.
114485 2008-10-02  Bruno Haible  <bruno@clisp.org>
114487         * modules/posix_spawn-internal (Depends-on): Add 'open'.
114489 2008-10-02  Paolo Bonzini  <bonzini@gnu.org>
114491         * build-aux/bootstrap: Allow renaming bootstrap, and change the
114492         name of bootstrap.conf accordingly.
114494 2008-10-02  Paolo Bonzini  <bonzini@gnu.org>
114496         * build-aux/bootstrap: Install git-merge-changelog configuration
114497         items into .gitconfig if needed.
114499 2008-10-02  Paolo Bonzini  <bonzini@gnu.org>
114501         * build-aux/bootstrap: Recognize `gnulib' being a submodule in a
114502         git repository, and initialize/update it accordingly.
114504 2008-10-02  Richard W.M. Jones  <rjones@redhat.com>
114506         * modules/fsync-tests: New file.
114507         * tests/test-fsync.c: New file.
114509         New module 'fsync'.
114510         * lib/fsync.c: New file.
114511         * m4/fsync.m4: New file.
114512         * modules/fsync: New file.
114513         * lib/unistd.in.h (fsync): New declaration.
114514         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Define and AC_SUBST both
114515         GNULIB_FSYNC and HAVE_FSYNC.
114516         * modules/unistd: Substitute GNULIB_FSYNC and HAVE_FSYNC.
114517         * MODULES.html.sh (posix_functions): Add fsync.
114518         * doc/posix-functions/fsync.texi: Mention the new module.
114520 2008-10-02  Jim Meyering  <meyering@redhat.com>
114522         fts.c: sync with similar code from coreutils' remove.c
114523         * lib/fts.c (dirent_inode_sort_may_be_useful): Merge from coreutils.
114524         Guard also with "#if defined __linux__", since for now at least,
114525         this code is Linux-kernel-specific.
114527 2008-10-02  Jim Meyering  <meyering@redhat.com>
114529         fts: bug fixes
114530         * lib/fts.c: Remove unnecessary "defined" in cpp directive.
114531         Include <sys/vfs.h>, not <sys/statfs.h>.
114533         * m4/fts.m4 (gl_FUNC_FTS_CORE): Fix typo s/vfs/vfs.h/.
114534         Include <sys/vfs.h>, not <sys/statfs.h>.
114536 2008-10-01  Bruno Haible  <bruno@clisp.org>
114538         Avoid the broken posix_spawn function on AIX 5.3 and 6.1.
114539         * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): New macro.
114540         (gl_POSIX_SPAWN_BODY): Invoke it. Set REPLACE_POSIX_SPAWN if needed.
114541         * doc/posix-functions/posix_spawn.texi: Mention the AIX bugs.
114542         * doc/posix-functions/posix_spawnp.texi: Likewise.
114543         * m4/execute.m4 (gl_EXECUTE): Invoke gl_POSIX_SPAWN_WORKS, to check
114544         whether posix_spawn actually works.
114545         * m4/pipe.m4 (gl_PIPE): Likewise.
114546         * modules/execute (Files): Add m4/posix_spawn.m4.
114547         * modules/pipe (Files): Add m4/posix_spawn.m4.
114548         Reported and analyzed by Rainer Tammer <tammer@tammer.net>.
114550 2008-10-01  Jim Meyering  <meyering@redhat.com>
114552         remove trailing spaces
114553         * NEWS: Likewise.
114554         * lib/poll.c (poll): Likewise.
114555         * lib/sys_socket.in.h (SHUT_RDWR): Likewise.
114556         * lib/winsock.c (rpl_close): Likewise.
114557         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Likewise.
114558         * modules/yield: Likewise.
114559         * tests/test-poll.c (connect_to_socket, poll1): Likewise.
114560         * tests/test-sys_select.c (connect_to_socket): Likewise.
114562         fts.c: adjust a new interface to be more generally useful
114563         * lib/fts.c (dirent_inode_sort_may_be_useful): Take an FD parameter.
114564         (fts_build): Adjust caller.
114566 2008-09-30  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
114568         * modules/cond-tests: New file.
114569         * tests/test-cond.c: New file.
114571 2008-09-30  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
114572             Bruno Haible  <bruno@clisp.org>
114574         * modules/cond (Dependencies): Add errno, time.
114575         * lib/glthread/cond.h: Include <time.h>.
114576         (gl_cond_define, gl_cond_define_initialized): Use the same definition
114577         across platforms.
114579 2008-09-30  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
114580             Bruno Haible  <bruno@clisp.org>
114582         * m4/thread.m4 (gl_THREAD): Fix detection of pthread_atfork function.
114584 2008-09-30  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
114585             Bruno Haible  <bruno@clisp.org>
114587         * modules/tls-tests (Depends-on): Add thread, yield.
114588         (configure.ac): Remove all checks.
114589         (test_tls_LDADD): Use YIELD_LIB instead of LIBSCHED.
114590         * tests/test-tls.c (gl_thread_t, gl_thread_join, gl_thread_yield,
114591         gl_thread_self): Remove definitions. Include glthread/thread.h and
114592         glthread/yield.h instead.
114593         (test_tls): Pass an additional NULL argument to gl_thread_join.
114595 2008-09-30  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
114596             Bruno Haible  <bruno@clisp.org>
114598         * modules/lock-tests (Depends-on): Add thread, yield.
114599         (configure.ac): Remove all checks.
114600         (test_lock_LDADD): Use YIELD_LIB instead of LIBSCHED.
114601         * tests/test-lock.c (gl_thread_t, gl_thread_join, gl_thread_yield,
114602         gl_thread_self): Remove definitions. Include glthread/thread.h and
114603         glthread/yield.h instead.
114604         (test_lock, test_rwlock, test_recursive_lock, test_once): Pass an
114605         additional NULL argument to gl_thread_join.
114607 2008-09-30  Bruno Haible  <bruno@clisp.org>
114609         Fix the Win32 implementation of the 'thread' module.
114610         * lib/glthread/thread.h [USE_WIN32_THREADS] (gl_thread_t): Change to a
114611         pointer type.
114612         (gl_thread_self): Invoke gl_thread_self_func.
114613         (gl_thread_self_func): New declaration.
114614         * lib/glthread/thread.c [USE_WIN32_THREADS] (self_key): New variable.
114615         (do_init_self_key, init_self_key): New functions.
114616         (struct gl_thread_struct): Renamed from 'struct thread_extra'.
114617         Remove some fields.
114618         (running_threads, running_lock): Remove variables.
114619         (get_current_thread_handle): New function.
114620         (gl_thread_self_func, wrapper_func, glthread_create_func,
114621         glthread_join_func, gl_thread_exit_func): Largely rewritten and
114622         simplified.
114624 2008-09-30  Bruno Haible  <bruno@clisp.org>
114626         * lib/winsock-select.c (win32_poll_handle): Add shortcut for regular
114627         files.
114629 2008-09-30  Jim Meyering  <meyering@redhat.com>
114631         fts.m4: correct the test for statfs.f_type
114632         * m4/fts.m4 (gl_FUNC_FTS_CORE): Include <sys/statfs.h>
114633         when checking for statfs.f_type.
114635 2008-09-15  Simon Josefsson  <simon@josefsson.org>
114637         tests: avoid some compiler warnings
114638         * tests/test-memchr.c (main): Pass NULL indirectly.
114639         * tests/test-getdate.c (main): Remove unused variable 'ret'.
114641 2008-09-29  Ondřej Vašík  <ovasik@redhat.com>
114643         getdate.y: disallow countable dayshifts like "4 yesterday ago"
114644         * lib/getdate.y (relative_time_table) [tDAY_SHIFT]: New type for
114645         exactly specified dayshifts.
114646         (dayshift): New rule.
114647         (rel): Add dayshift.
114648         (relative_time_table) [tomorrow, yesterday, today, now]:
114649         Use tDAY_SHIFT in place of tDAY_UNIT.
114650         * tests/test-getdate.c: Add tests for now-disallowed countable
114651         dayshifts, e.g., "4 yesterday ago".
114653 2008-09-29  Bruno Haible  <bruno@clisp.org>
114655         * tests/test-posix_spawn1.c: Renamed from tests/test-posix_spawn.c.
114656         * tests/test-posix_spawn1.in.sh: Renamed from
114657         tests/test-posix_spawn.in.sh.
114658         * tests/test-posix_spawn2.c: New file.
114659         * tests/test-posix_spawn2.in.sh: New file.
114660         * modules/posix_spawnp-tests (Files): Update.
114661         (Makefile.am): Update. Add test-posix_spawn2 to the tests.
114663 2008-09-29  Bruno Haible  <bruno@clisp.org>
114665         Propagate effects of putenv/setenv/unsetenv to child processes.
114666         * lib/execute.c (execute): Use spawnvpe instead of spawnvp.
114667         * lib/pipe.c (create_pipe): Likewise.
114669 2008-09-29  Bruno Haible  <bruno@clisp.org>
114671         Enable use of shell scripts as executables in mingw.
114672         * lib/execute.c (execute): When spawnv fails with error ENOEXEC,
114673         run the program as a shell script.
114674         * lib/pipe.c (create_pipe): Likewise.
114675         * lib/w32spawn.h (prepare_spawn): Add a hidden element in front of the
114676         resulting array.
114678 2008-09-29  Eric Blake  <ebb9@byu.net>
114680         * m4/arpa_inet_h.m4 (gl_REPLACE_ARPA_INET_H): Fix typo.
114682 2008-08-24  Paolo Bonzini  <bonzini@gnu.org>
114684         * doc/posix-functions/accept.texi: Update mingw problems.
114685         * doc/posix-functions/bind.texi: Update mingw problems.
114686         * doc/posix-functions/close.texi: Update mingw problems.
114687         * doc/posix-functions/connect.texi: Update mingw problems.
114688         * doc/posix-functions/getpeername.texi: Update mingw problems.
114689         * doc/posix-functions/getsockname.texi: Update mingw problems.
114690         * doc/posix-functions/getsockopt.texi: Update mingw problems.
114691         * doc/posix-functions/ioctl.texi: Update mingw problems.
114692         * doc/posix-functions/listen.texi: Update mingw problems.
114693         * doc/posix-functions/recv.texi: Update mingw problems.
114694         * doc/posix-functions/recvfrom.texi: Update mingw problems.
114695         * doc/posix-functions/select.texi: Update mingw problems.
114696         * doc/posix-functions/send.texi: Update mingw problems.
114697         * doc/posix-functions/sendto.texi: Update mingw problems.
114698         * doc/posix-functions/setsockopt.texi: Update mingw problems.
114699         * doc/posix-functions/socket.texi: Update mingw problems.
114701 2008-09-29  Paolo Bonzini  <bonzini@gnu.org>
114702             Bruno Haible  <bruno@clisp.org>
114704         * lib/sys_select.in.h: Include sys/time.h.
114705         * m4/sys_select.h.m4: Test that struct timeval is fully defined.
114706         * modules/sys_select: Depend on sys_time.
114707         * tests/test-sys_select.c: Test that sys/select.h defines struct
114708         timeval fully.
114710 2008-09-29  Bruno Haible  <bruno@clisp.org>
114712         * lib/sys_socket.in.h: Wrap the definitions in 'extern "C"'.
114713         * lib/sys_select.in.h: Likewise.
114715 2008-09-29  Bruno Haible  <bruno@clisp.org>
114717         * lib/winsock.c (rpl_close, rpl_socket): Remove unused variables.
114719 2008-09-29  Bruno Haible  <bruno@clisp.org>
114721         * m4/sockets.m4 (gl_SOCKETS): Check also for the need to use -lsocket.
114722         Set LIBSOCKET instead of augmenting LIBS.
114723         * modules/sockets (Link): New section.
114724         * modules/sockets-tests (test_sockets_LDADD): New variable.
114725         * modules/sys_select-tests (test_sys_select_LDADD): New variable.
114726         * modules/poll-tests (test_poll_LDADD): New variable.
114727         * NEWS: Document the change.
114729 2008-09-29  Bruno Haible  <bruno@clisp.org>
114731         * m4/arpa_inet_h.m4 (gl_REPLACE_ARPA_INET_H): New macro.
114732         * m4/inet_ntop.m4 (gl_INET_NTOP): Invoke it instead of assigning
114733         ARPA_INET_H directly.
114734         * m4/inet_pton.m4 (gl_INET_PTON): Likewise.
114736 2008-09-28  Bruno Haible  <bruno@clisp.org>
114738         * m4/sys_socket_h.m4 (gl_PREREQ_SYS_H_WINSOCK2): New macro, extracted
114739         from gl_HEADER_SYS_SOCKET.
114740         (gl_HEADER_SYS_SOCKET): Invoke it.
114741         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
114743 2008-09-28  Bruno Haible  <bruno@clisp.org>
114745         * doc/posix-headers/sys_select.texi: Mention 'struct timeval' problem.
114746         * tests/test-sys_select.c: Include <sys/time.h>, for struct timeval.
114747         Needed on OSF/1 4.0.
114749 2008-09-28  Bruno Haible  <bruno@clisp.org>
114751         Override open more carefully.
114752         * lib/open.c (orig_open): New function.
114753         (rpl_open): Use orig_open instead of open.
114754         * lib/fcntl.in.h: Add special invocation convention.
114755         * m4/open.m4 (gl_PREREQ_OPEN): New macro.
114756         (gl_FUNC_OPEN): Invoke it.
114758         Override freopen more carefully.
114759         * lib/freopen.c (orig_freopen): New function.
114760         (rpl_freopen): Use orig_freopen instead of freopen.
114761         * m4/freopen.m4 (gl_PREREQ_FREOPEN): New macro.
114762         (gl_FUNC_FREOPEN): Invoke it.
114764         Override fopen more carefully.
114765         * lib/fopen.c (orig_fopen): New function.
114766         (rpl_fopen): Use orig_fopen instead of fopen.
114767         * m4/fopen.m4 (gl_PREREQ_FOPEN): New macro.
114768         (gl_FUNC_FOPEN): Invoke it.
114769         Needed on AIX. Reported by Rainer Tammer <tammer@tammer.net>.
114771 2008-09-28  Bruno Haible  <bruno@clisp.org>
114773         * lib/pipe.h (create_pipe_out, create_pipe_bidi): Add comment about
114774         SIGPIPE.
114776 2008-09-28  Bruno Haible  <bruno@clisp.org>
114778         * tests/test-sigaction.c (handler, main): Disable the check whether
114779         SA_RESETHAND has reverted the installed handler to SIG_DFL. Needed on
114780         glibc systems with LinuxThreads.
114782 2008-09-28  Bruno Haible  <bruno@clisp.org>
114784         * doc/posix-functions/freopen.texi: Mention the trailing slash problem.
114786         * lib/stdio.in.h (fopen, freopen): Undefine before redefining. Needed
114787         with AIX xlc.
114788         * lib/fcntl.in.h (open): Likewise.
114789         Reported by Rainer Tammer <tammer@tammer.net>.
114791 2008-09-28  Bruno Haible  <bruno@clisp.org>
114793         * modules/posix_spawnp-tests: New file.
114794         * tests/test-posix_spawn.c: New file.
114795         * tests/test-posix_spawn.in.sh: New file.
114797         New module 'posix_spawnp'.
114798         * modules/posix_spawnp: New file.
114799         * lib/spawnp.c: New file, from GNU libc with modifications.
114800         * doc/posix-functions/posix_spawnp.texi: Mention the new module.
114802         New module 'posix_spawn'.
114803         * modules/posix_spawn: New file.
114804         * lib/spawn.c: New file, from GNU libc with modifications.
114805         * doc/posix-functions/posix_spawn.texi: Mention the new module.
114807         New module 'posix_spawnattr_destroy'.
114808         * modules/posix_spawnattr_destroy: New file.
114809         * lib/spawnattr_destroy.c: New file, from GNU libc with modifications.
114810         * doc/posix-functions/posix_spawnattr_destroy.texi: Mention the new
114811         module.
114813         New module 'posix_spawnattr_setsigmask'.
114814         * modules/posix_spawnattr_setsigmask: New file.
114815         * lib/spawnattr_setsigmask.c: New file, from GNU libc with
114816         modifications.
114817         * doc/posix-functions/posix_spawnattr_setsigmask.texi: Mention the
114818         new module.
114820         New module 'posix_spawnattr_getsigmask'.
114821         * modules/posix_spawnattr_getsigmask: New file.
114822         * lib/spawnattr_getsigmask.c: New file, from GNU libc with
114823         modifications.
114824         * doc/posix-functions/posix_spawnattr_getsigmask.texi: Mention the
114825         new module.
114827         New module 'posix_spawnattr_setsigdefault'.
114828         * modules/posix_spawnattr_setsigdefault: New file.
114829         * lib/spawnattr_setdefault.c: New file, from GNU libc with
114830         modifications.
114831         * doc/posix-functions/posix_spawnattr_setsigdefault.texi: Mention the
114832         new module.
114834         New module 'posix_spawnattr_getsigdefault'.
114835         * modules/posix_spawnattr_getsigdefault: New file.
114836         * lib/spawnattr_getdefault.c: New file, from GNU libc with
114837         modifications.
114838         * doc/posix-functions/posix_spawnattr_getsigdefault.texi: Mention the
114839         new module.
114841         New module 'posix_spawnattr_setschedpolicy'.
114842         * modules/posix_spawnattr_setschedpolicy: New file.
114843         * lib/spawnattr_setschedpolicy.c: New file, from GNU libc with
114844         modifications.
114845         * doc/posix-functions/posix_spawnattr_setschedpolicy.texi: Mention the
114846         new module.
114848         New module 'posix_spawnattr_getschedpolicy'.
114849         * modules/posix_spawnattr_getschedpolicy: New file.
114850         * lib/spawnattr_getschedpolicy.c: New file, from GNU libc with
114851         modifications.
114852         * doc/posix-functions/posix_spawnattr_getschedpolicy.texi: Mention the
114853         new module.
114855         New module 'posix_spawnattr_setschedparam'.
114856         * modules/posix_spawnattr_setschedparam: New file.
114857         * lib/spawnattr_setschedparam.c: New file, from GNU libc with
114858         modifications.
114859         * doc/posix-functions/posix_spawnattr_setschedparam.texi: Mention the
114860         new module.
114862         New module 'posix_spawnattr_getschedparam'.
114863         * modules/posix_spawnattr_getschedparam: New file.
114864         * lib/spawnattr_getschedparam.c: New file, from GNU libc with
114865         modifications.
114866         * doc/posix-functions/posix_spawnattr_getschedparam.texi: Mention the
114867         new module.
114869         New module 'posix_spawnattr_setpgroup'.
114870         * modules/posix_spawnattr_setpgroup: New file.
114871         * lib/spawnattr_setpgroup.c: New file, from GNU libc with
114872         modifications.
114873         * doc/posix-functions/posix_spawnattr_setpgroup.texi: Mention the new
114874         module.
114876         New module 'posix_spawnattr_getpgroup'.
114877         * modules/posix_spawnattr_getpgroup: New file.
114878         * lib/spawnattr_getpgroup.c: New file, from GNU libc with
114879         modifications.
114880         * doc/posix-functions/posix_spawnattr_getpgroup.texi: Mention the new
114881         module.
114883         New module 'posix_spawnattr_setflags'.
114884         * modules/posix_spawnattr_setflags: New file.
114885         * lib/spawnattr_setflags.c: New file, from GNU libc with modifications.
114886         * doc/posix-functions/posix_spawnattr_setflags.texi: Mention the new
114887         module.
114889         New module 'posix_spawnattr_getflags'.
114890         * modules/posix_spawnattr_getflags: New file.
114891         * lib/spawnattr_getflags.c: New file, from GNU libc with modifications.
114892         * doc/posix-functions/posix_spawnattr_getflags.texi: Mention the new
114893         module.
114895         New module 'posix_spawnattr_init'.
114896         * modules/posix_spawnattr_init: New file.
114897         * lib/spawnattr_init.c: New file, from GNU libc with modifications.
114898         * doc/posix-functions/posix_spawnattr_init.texi: Mention the new
114899         module.
114901         New module 'posix_spawn_file_actions_destroy'.
114902         * modules/posix_spawn_file_actions_destroy: New file.
114903         * lib/spawn_faction_destroy.c: New file, from GNU libc with
114904         modifications.
114905         * doc/posix-functions/posix_spawn_file_actions_destroy.texi: Mention
114906         the new module.
114908         New module 'posix_spawn_file_actions_addopen'.
114909         * modules/posix_spawn_file_actions_addopen: New file.
114910         * lib/spawn_faction_addopen.c: New file, from GNU libc with
114911         modifications.
114912         * doc/posix-functions/posix_spawn_file_actions_addopen.texi: Mention
114913         the new module.
114915         New module 'posix_spawn_file_actions_adddup2'.
114916         * modules/posix_spawn_file_actions_adddup2: New file.
114917         * lib/spawn_faction_adddup2.c: New file, from GNU libc with
114918         modifications.
114919         * doc/posix-functions/posix_spawn_file_actions_adddup2.texi: Mention
114920         the new module.
114922         New module 'posix_spawn_file_actions_addclose'.
114923         * modules/posix_spawn_file_actions_addclose: New file.
114924         * lib/spawn_faction_addclose.c: New file, from GNU libc with
114925         modifications.
114926         * doc/posix-functions/posix_spawn_file_actions_addclose.texi: Mention
114927         the new module.
114929         New module 'posix_spawn_file_actions_init'.
114930         * modules/posix_spawn_file_actions_init: New file.
114931         * lib/spawn_faction_init.c: New file, from GNU libc with modifications.
114932         * doc/posix-functions/posix_spawn_file_actions_init.texi: Mention the
114933         new module.
114935         New module 'posix_spawn-internal'.
114936         * modules/posix_spawn-internal: New file.
114937         * lib/spawn_int.h: New file, from GNU libc with modifications.
114938         * lib/spawni.c: New file, from GNU libc with modifications.
114939         * m4/posix_spawn.m4: New file.
114941         New module 'spawn'.
114942         * modules/spawn: New file.
114943         * lib/spawn.in.h: New file, from GNU libc with modifications.
114944         * m4/spawn_h.m4: New file.
114945         * doc/posix-headers/spawn.texi: Mention the new module.
114947 2008-09-28  Bruno Haible  <bruno@clisp.org>
114949         * modules/sched-tests: New file.
114950         * tests/test-sched.c: New file.
114952         New module 'sched'.
114953         * modules/sched: New file.
114954         * lib/sched.in.h: New file.
114955         * m4/sched_h.m4: New file.
114956         * doc/posix-headers/sched.texi: Mention the new module.
114958 2008-09-27  Eric Blake  <ebb9@byu.net>
114960         Fix previous patch, and tweak references to $0.
114961         * posix-modules: Call func_gnulib_dir before using $gnulib_dir.
114962         (func_version, func_gnulib_dir): Don't call this program
114963         gnulib-tool.
114964         (func_gnulib_dir, func_tmpdir, func_fatal_error): Avoid shell bugs
114965         with using $0 in function.
114966         * gnulib-tool (func_gnulib_dir, func_tmpdir): Likewise.
114967         (func_fatal_error): Reuse the name the user invoked us with.
114969 2008-09-27  Bruno Haible  <bruno@clisp.org>
114971         * m4/iconv_h.m4 (gl_REPLACE_ICONV_H): New macro.
114972         (gl_ICONV_H_DEFAULTS): Initialize ICONV_H here...
114973         (gl_ICONV_H): Not here.
114974         * m4/iconv_open.m4 (gl_REPLACE_ICONV_OPEN): Invoke gl_REPLACE_ICONV_H
114975         instead of assigning ICONV_H directly.
114977         * m4/wchar.m4 (gl_REPLACE_WCHAR_H): New macro.
114978         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Invoke it instead of assigning
114979         WCHAR_H directly.
114981 2008-09-27  Bruno Haible  <bruno@clisp.org>
114983         * lib/arpa_inet.in.h: Include the GL_LINK_WARNING anchor.
114984         * modules/arpa_inet (Depends-on): Add link-warning.
114985         (Makefile.am): Insert the definition of GL_LINK-WARNING.
114986         * modules/unistd (Makefile.am): Likewise.
114988 2008-09-26  Bruno Haible  <bruno@clisp.org>
114990         * posix-modules (cvsdatestamp, last_checkin_date, version): Remove
114991         variables.
114992         (func_version): Essentially copied from gnulib-tool.
114993         (func_exit, func_gnulib_dir, func_tmpdir, func_fatal_error,
114994         func_readlink): Copied from gnulib-tool.
114996 2008-09-26  Bruno Haible  <bruno@clisp.org>
114998         * gnulib-tool (func_version): Change directory to $gnulib_dir before
114999         invoking git-version-gen.
115001 2008-09-26  Bruno Haible  <bruno@clisp.org>
115003         * posix-modules: Update to directory names changed on 2008-01-19.
115004         Remove commas in output before splitting into words. No more need to
115005         avoid 'ftruncate' since 2007-02-19.
115007 2008-09-26  Bruno Haible  <bruno@clisp.org>
115009         * doc/posix-headers/errno.texi: Remove mention of module 'EOVERFLOW'.
115011 2008-09-26  Bruno Haible  <bruno@clisp.org>
115013         * lib/fwriteerror.c (do_fwriteerror): Ignore error EPIPE.
115014         * modules/fwriteerror (Depends-on): Add errno.
115016 2008-09-26  Bruno Haible  <bruno@clisp.org>
115018         * tests/test-vc-list-files-git.sh: Explain reason for skipping test.
115019         * tests/test-vc-list-files-cvs.sh: Likewise.
115021 2008-09-26  Bruno Haible  <bruno@clisp.org>
115023         * doc/posix-headers/sys_resource.texi: Reorder items.
115025 2008-09-26  Jim Meyering  <meyering@redhat.com>
115027         fts: tweak inode comparison function
115028         * lib/fts.c (fts_compare_ino): Sort on increasing, not decreasing
115029         inode numbers, as documented.
115031         fts: sort dirent entries on inode number before traversing
115032         This avoids a quadratic, seek-related performance penalty when
115033         operating on a directory containing many entries (measurable at 10k;
115034         3.5 hours at 2 million entries with a cold cache) on certain types
115035         of file systems, including ext3 and ext4, but not tmpfs.
115036         * lib/fts.c (DT_MUST_BE, NOT_AN_INODE_NUMBER, D_INO): Define.
115037         (FTS_INODE_SORT_DIR_ENTRIES_THRESHOLD): Define if not defined.
115038         (S_MAGIC_TMPFS, S_MAGIC_NFS): Define.
115039         (fs_handles_readdir_ordered_dirents_efficiently): New function.
115040         (dirent_inode_sort_may_be_useful, fts_compare_ino): Likewise.
115041         (fts_build): Set the stat.st_ino member from D_INO.
115042         If it is likely to be useful, sort dirent entries on inode number.
115044         * m4/fts.m4 (gl_FUNC_FTS_CORE): Check for fstatfs, sys/vfs.h,
115045         and the struct statfs.f_type member.
115046         * modules/fts (Depends-on): Add d-ino.
115048 2008-09-26  Bruno Haible  <bruno@clisp.org>
115050         * modules/sigpipe-die (Depends-on): Add sigpipe.
115052         * lib/stdio.in.h (fprintf, vfprintf, printf, vprintf, fputc, putc,
115053         putchar, fputs, puts, fwrite): Replace when REPLACE_STDIO_WRITE_FUNCS
115054         and GNULIB_STDIO_H_SIGPIPE are set.
115055         * lib/stdio-write.c: New file.
115056         * m4/stdio_h.m4 (gl_STDIO_H): Set GNULIB_FPRINTF, GNULIB_PRINTF,
115057         GNULIB_VFPRINTF, GNULIB_VPRINTF, GNULIB_FPUTC, GNULIB_PUTC,
115058         GNULIB_PUTCHAR, GNULIB_FPUTS, GNULIB_PUTS, GNULIB_FWRITE,
115059         REPLACE_STDIO_WRITE_FUNCS.
115060         (gl_STDIO_H_DEFAULTS): Initialize GNULIB_FPRINTF, GNULIB_PRINTF,
115061         GNULIB_VFPRINTF, GNULIB_VPRINTF, GNULIB_FPUTC, GNULIB_PUTC,
115062         GNULIB_PUTCHAR, GNULIB_FPUTS, GNULIB_PUTS, GNULIB_FWRITE,
115063         GNULIB_STDIO_H_SIGPIPE, REPLACE_STDIO_WRITE_FUNCS.
115064         * modules/stdio (Files): Add lib/stdio-write.c.
115065         (Makefile.am): Substitute GNULIB_FPRINTF, GNULIB_PRINTF,
115066         GNULIB_VFPRINTF, GNULIB_VPRINTF, GNULIB_FPUTC, GNULIB_PUTC,
115067         GNULIB_PUTCHAR, GNULIB_FPUTS, GNULIB_PUTS, GNULIB_FWRITE,
115068         GNULIB_STDIO_H_SIGPIPE, REPLACE_STDIO_WRITE_FUNCS.
115069         * m4/fprintf-posix.m4 (gl_REPLACE_FPRINTF): Define
115070         REPLACE_FPRINTF_POSIX.
115071         * m4/printf-posix-rpl.m4 (gl_REPLACE_PRINTF): Define
115072         REPLACE_PRINTF_POSIX.
115073         * m4/vfprintf-posix.m4 (gl_REPLACE_VFPRINTF): Define
115074         REPLACE_VFPRINTF_POSIX.
115075         * m4/vprintf-posix.m4 (gl_REPLACE_VPRINTF): Define
115076         REPLACE_VPRINTF_POSIX.
115077         * doc/posix-functions/fprintf.texi: Mention the sigpipe module and the
115078         SIGPIPE issue.
115079         * doc/posix-functions/fputc.texi: Likewise.
115080         * doc/posix-functions/fputs.texi: Likewise.
115081         * doc/posix-functions/fwrite.texi: Likewise.
115082         * doc/posix-functions/printf.texi: Likewise.
115083         * doc/posix-functions/putc.texi: Likewise.
115084         * doc/posix-functions/putchar.texi: Likewise.
115085         * doc/posix-functions/puts.texi: Likewise.
115086         * doc/posix-functions/vfprintf.texi: Likewise.
115087         * doc/posix-functions/vprintf.texi: Likewise.
115089         * modules/safe-write (Depends-on): Add write.
115091         * modules/sigpipe-tests: New file.
115092         * tests/test-sigpipe.c: New file.
115093         * tests/test-sigpipe.sh: New file.
115095         * modules/write: New file.
115096         * lib/unistd.in.h: Include <sys/types.h>.
115097         (write): New declaration.
115098         * lib/write.c: New file.
115099         * m4/write.m4: New file.
115100         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
115101         GNULIB_UNISTD_H_SIGPIPE, GNULIB_WRITE, REPLACE_WRITE.
115102         * modules/unistd (Makefile.am): Substitute GNULIB_UNISTD_H_SIGPIPE,
115103         GNULIB_WRITE, REPLACE_WRITE.
115104         * doc/posix-functions/write.texi: Mention the write, sigpipe modules
115105         and the SIGPIPE issue.
115107         * lib/signal.in.h (SIGPIPE): Define to a replacement value.
115108         (raise): New declaration.
115109         * lib/sigprocmask.c (SIGPIPE_handler): New variable.
115110         (ext_signal): New function.
115111         (rpl_raise): New function.
115112         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Initialize
115113         GNULIB_SIGNAL_H_SIGPIPE.
115114         * modules/signal (Makefile.am): Substitute GNULIB_SIGNAL_H_SIGPIPE.
115115         * doc/posix-headers/signal.texi: Mention the SIGPIPE issue.
115117         * modules/sigpipe: New file.
115118         * m4/sigpipe.m4: New file.
115120 2008-09-25  Derek Price  <derek@ximbiot.com>
115121             Bruno Haible  <bruno@clisp.org>
115123         * gnulib-tool (func_import): Report all license incompatibilities, not
115124         just the first one.
115126 2008-09-25  Bruno Haible  <bruno@clisp.org>
115128         * gnulib-tool (func_import): When computing the edits, consider not
115129         only the Makefile.ams that exist but also those that will be generated.
115131 2008-09-25  Simon Josefsson  <simon@josefsson.org>
115133         * modules/sys_select-tests (Depends-on): Remove sys_select itself,
115134         fixes gnulib-tool --test warning about duplicate dependency.
115136 2008-09-25  Bruno Haible  <bruno@clisp.org>
115138         * gnulib-tool: Don't ask the user to perform edits in the generated
115139         Makefile.ams.
115140         (func_emit_lib_Makefile_am): Emit empty SUBDIRS. Execute edits that
115141         apply to the Makefile.am being generated.
115142         (func_emit_tests_Makefile_am): Execute edits that apply to the
115143         Makefile.am being generated.
115144         (func_import): Setup list of Makefile.am edits before emitting the
115145         Makefile.ams, not at the end.
115146         (func_create_testdir): Update.
115147         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
115149 2008-09-25  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
115151         * gnulib-tool (func_import): Store the --tests-base option in the
115152         comment in gnulib-cache.m4.
115154 2008-09-24  Paolo Bonzini  <bonzini@gnu.org>
115156         * NEWS: Document increased portability that sys_select now provides.
115158         * lib/sys_select.in.h: Install select wrapper.
115159         * lib/sys_socket.in.h: Use more descriptive name when there is no
115160         select wrapper.
115161         * lib/winsock-select.c: New.
115162         * m4/sys_select_h.m4: Compile lib/winsock-select.c if WinSock is used.
115163         Require gl_HEADER_SYS_SOCKET.
115164         * modules/sys_select: Depend on alloca, add lib/winsock-select.c.
115165         * modules/sys_select-tests: Copy dependencies from modules/poll-tests.
115166         * tests/test-sys_select.c: Add functional tests.
115168 2008-09-24  Eric Blake  <ebb9@byu.net>
115170         open, fopen: close fd leak in last patch
115171         * lib/open.c (rpl_open): Close fd before returning error.
115172         * lib/fopen.c (rpl_fopen): Close fd before returning error.
115173         * doc/posix-functions/open.texi (open): Document that Irix also
115174         has the bug.
115175         * doc/posix-functions/fopen.texi (fopen): Likewise.
115176         Reported by Paolo Bonzini.
115178 2008-09-24  Bruno Haible  <bruno@clisp.org>
115180         Ensure that a filename ending in a slash cannot be used to access a
115181         non-directory.
115182         * lib/open.c (rpl_open): When the filename ends in a slash, use fstat()
115183         to check whether it's really a directory.
115184         * lib/fopen.c: Include fcntl.h, unistd.h.
115185         (rpl_fopen): When the filename ends in a slash, use open(), fstat(),
115186         and fdopen().
115187         * modules/fopen (Depends-on): Add unistd.
115188         * tests/test-open.c (main): Try to open "/dev/null/" as a directory.
115189         * tests/test-fopen.c (main): Likewise.
115190         * doc/posix-functions/open.texi: Mention the HP-UX, Solaris bug.
115191         * doc/posix-functions/fopen.texi: Likewise.
115192         Reported by Eric Blake.
115194 2008-09-23  Eric Blake  <ebb9@byu.net>
115196         c-stack: avoid compiler optimizations when provoking overflow
115197         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Make
115198         recursion harder to optimize, to ensure a stack overflow occurs.
115199         * tests/test-c-stack.c (recurse): Likewise.
115200         Borrowed from libsigsegv.
115202         c-stack: work around Irix sigaltstack bug
115203         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Check
115204         whether sigaltstack uses wrong end of stack_t (copied in part from
115205         libsigsegv).
115206         * lib/c-stack.c (c_stack_action) [!HAVE_LIBSIGSEGV]: Work around
115207         Irix bug, without requiring an over-allocation.
115208         * doc/posix-functions/sigaltstack.texi (sigaltstack): Document the
115209         bug.
115211         fopen: document mingw bug on directories
115212         * doc/posix-functions/fopen.texi (fopen): Mention mingw bug for
115213         not allowing a stream visiting a directory, even though reading
115214         from such a stream is not portable.
115216 2008-09-23  Paolo Bonzini  <bonzini@gnu.org>
115218         * lib/poll.c: Rewrite.
115219         * modules/poll: Depend on alloca.
115221 2008-09-23  Paolo Bonzini  <bonzini@gnu.org>
115223         * lib/sys_socket.in.h: Do not implement rpl_setsockopt here,
115224         instead define prototypes for a full set of wrappers.  Ensure
115225         that Cygwin does not use the compatibility code, which is only
115226         for MinGW.
115227         * lib/winsock.c: New.
115228         * m4/sys_socket_h.m4: Compile lib/winsock.c if WinSock is being used.
115229         * modules/sys_socket: Add lib/winsock.c.
115231         * modules/poll-tests: Add errno and perror.
115232         * tests/test-poll.c: Use ioctl, not ioctlsocket.
115234 2008-09-23  Paolo Bonzini  <bonzini@gnu.org>
115236         * tests/test-poll.c: Downgrade minimum needed Winsock version.
115238 2008-09-23  Bruno Haible  <bruno@clisp.org>
115240         * doc/posix-functions/*: Add info about functions missing on IRIX 5.3.
115241         * doc/glibc-functions/*: Likewise.
115243 2008-09-23  Simon Josefsson  <simon@josefsson.org>
115245         * tests/test-perror.sh (tmpfiles): Cleanup temporary files on
115246         success.
115248 2008-09-22  Eric Blake  <ebb9@byu.net>
115249             Bruno Haible  <bruno@clisp.org>
115251         vasnprintf: fix x86/glibc regression on printf("%La", 0.0L)
115252         * lib/vasnprintf.c (VASNPRINTF): Support 0.0 on platforms that
115253         supply %A but mishandle pseudo-NaN.
115254         Reported by Simon Josefsson.
115256 2008-09-21  Bruno Haible  <bruno@clisp.org>
115258         * tests/test-lock.c (main): Tweak skip message.
115259         * tests/test-tls.c (main): Likewise.
115261 2008-09-21  Bruno Haible  <bruno@clisp.org>
115263         * m4/sigaction.m4 (gl_SIGACTION): Remove unnecessary AC_SUBST. Check
115264         whether 'struct sigaction' has sa_sigaction here...
115265         (gl_PREREQ_SIG_HANDLER_H): ... not here.
115266         (gl_PREREQ_SIGACTION): Remove unnecessary AC_SUBST.
115268 2008-09-21  Bruno Haible  <bruno@clisp.org>
115270         * MODULES.html.sh (Support for obsolete systems lacking ANSI C 89): New
115271         section.
115272         (Support for systems lacking ANSI C 89): Move stdlib, exit, strtol,
115273         strtoul, memchr, memcmp, memcpy, memmove, memset, strcspn, strpbrk to
115274         the new section.
115275         (Support for obsolete systems lacking POSIX:2001): New section.
115276         (String handling <string.h>): Move strdup to the new section.
115277         Suggested by Simon Josefsson and Paolo Bonzini.
115279 2008-09-21  Bruno Haible  <bruno@clisp.org>
115281         * tests/test-vasnprintf-posix.c (test_function): Allow 3-digit
115282         exponents in %e and %g results on 'long double'. Needed for mingw's
115283         improved *printf functions.
115284         * tests/test-vasprintf-posix.c (test_function): Likewise.
115285         * tests/test-snprintf-posix.h (test_function): Likewise.
115286         * tests/test-sprintf-posix.h (test_function): Likewise.
115287         Reported by Eric Blake.
115289 2008-09-21  Bruno Haible  <bruno@clisp.org>
115291         * tests/test-snprintf-posix.h (test_function): Remove useless ASSERTs.
115292         * tests/test-sprintf-posix.h (test_function): Likewise.
115294 2008-09-21  Bruno Haible  <bruno@clisp.org>
115296         * modules/getpass (Depends-on): Add strdup-posix.
115298         New module 'strdup-posix'.
115299         * modules/strdup-posix: New file.
115300         * m4/strdup.m4 (gl_FUNC_STRDUP_POSIX): New macro.
115301         * lib/string.in.h (strdup): Replace if REPLACE_STRDUP is 1.
115302         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
115303         REPLACE_STRDUP.
115304         * modules/string (Makefile.am): Substitute REPLACE_STRDUP.
115305         * doc/posix-functions/strdup.texi: Mention module strdup-posix.
115306         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
115307         strdup-posix.
115309         * modules/strdup (Depends-on): Remove malloc-posix.
115311 2008-09-20  Bruno Haible  <bruno@clisp.org>
115313         * lib/fstrcmp.c: Add data about branch probabilities, from Ralf
115314         Wildenhues.
115316 2008-09-20  Bruno Haible  <bruno@clisp.org>
115318         Ensure that wint_t gets defined on IRIX 5.3.
115319         * lib/wchar.in.h (wint_t): Define if not defined by the system.
115320         * lib/wctype.in.h (wint_t): Likewise.
115321         (__wctype_wint_t): Remove type.
115322         (isw*): Use wint_t instead of __wctype_wint_t.
115323         * m4/wchar.m4 (gl_WCHAR_H): Invoke gt_TYPE_WINT_T and set HAVE_WINT_T.
115324         * modules/wchar (Files): Add m4/wint_t.m4.
115325         (Makefile.am): Substitute HAVE_WINT_T.
115326         * tests/test-wchar.c: Check that wchar_t and wint_t are defined.
115327         * tests/test-wctype.c: Check that wint_t is defined.
115328         * doc/posix-headers/wchar.texi: Mention the IRIX 5 problem.
115329         * doc/posix-headers/wctype.texi: Likewise.
115330         Reported by Tom G. Christensen <tgc@jupiterrise.com>.
115332 2008-09-18  Bruno Haible  <bruno@clisp.org>
115334         * gnulib-tool (func_exit): Update comment.
115336 2008-09-18  Simon Josefsson  <simon@josefsson.org>
115338         * modules/getaddrinfo (Depends-on): Remove strdup, this module
115339         assumes strdup exists and does not depend on strdup to return
115340         ENOMEM on out of memory conditions.
115342 2008-09-18  Bruno Haible  <bruno@clisp.org>
115344         * lib/vasnprintf.c (VASNPRINTF): When printing ±0.0L in
115345         NEED_PRINTF_INFINITE_LONG_DOUBLE case with 'e' format, always use two
115346         digits for the exponent.
115348 2008-09-18  Jim Meyering  <meyering@redhat.com>
115349             Bruno Haible  <bruno@clisp.org>
115351         * lib/vasnprintf.c (decimal_point_char): Define also if
115352         NEED_PRINTF_INFINITE_LONG_DOUBLE.
115354 2008-09-16  Bruno Haible  <bruno@clisp.org>
115355         and Eric Blake  <ebb9@byu.net>
115357         vasnprintf: support Irix 5.3
115358         * lib/vasnprintf.c (VASNPRINTF): Also handle -0.0L on platforms
115359         that mishandle long double infinity.
115360         Reported by Tom G. Christensen.
115362 2008-09-16  Bruno Haible  <bruno@clisp.org>
115364         * doc/glibc-functions/scandir.texi: Mention the function is missing on
115365         Solaris 9.
115366         * doc/glibc-functions/alphasort.texi: Likewise.
115367         Reported by Michael Haubenwallner <michael.haubenwallner@salomon.at>.
115369 2008-09-16  Jim Meyering  <meyering@redhat.com>
115371         posix-shell.m4: reject opensolaris's "sh (AT&T Research) 1993-12-28 s+"
115372         * m4/posix-shell.m4 (gl_POSIX_SHELL): Reject a shell that lets
115373         a umask modification leak out of a subshell.  Otherwise, the
115374         opensolaris /bin/sh would be accepted and thus cause unwarranted
115375         failures in the coreutils test suite.
115377 2008-09-16  Paolo Bonzini  <bonzini@gnu.org>
115379         * tests/test-poll.c (connect_to_socket): Allow non-blocking connect
115380         to succeed.
115382 2008-09-16  Jim Meyering  <meyering@redhat.com>
115384         avoid spurious test failure when library is built without ACL support
115385         * m4/acl.m4 (USE_ACL): Define as a shell variable, too, for...
115386         * modules/acl-tests (Makefile.am) [TESTS_ENVIRONMENT]: Add USE_ACL.
115387         * tests/test-file-has-acl.sh: Skip if USE_ACL == 0.
115388         * tests/test-copy-acl.sh: Likewise.
115390 2008-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
115392         * lib/fstrcmp.c (fstrcmp_bounded): Use a second, less quick upper bound
115393         based on character occurrence counts.
115395 2008-09-15  Eric Blake  <ebb9@byu.net>
115397         tests: avoid some compiler warnings
115398         * tests/test-memchr.c (main): Pass NULL indirectly.
115399         * tests/test-closein.c (main): Avoid unused variable.
115401 2008-09-15  Bruno Haible  <bruno@clisp.org>
115403         * m4/errno_h.m4 (gl_HEADER_ERRNO_H_BODY): Test for all the macros that
115404         are missing on OpenBSD 4.0 individually.
115405         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
115407 2008-09-15  Bruno Haible  <bruno@clisp.org>
115409         * doc/posix-headers/errno.texi: Mention the Cygwin problem.
115410         * doc/posix-functions/strerror.texi: Mention also Cygwin.
115411         * doc/posix-functions/perror.texi: Likewise.
115412         * m4/errno_h.m4 (gl_HEADER_ERRNO_H_BODY): Test also whether ECANCELED
115413         is missing.
115414         Reported by Eric Blake.
115416         * lib/errno.in.h: Use replacement values >= 2000.
115417         Reported by Eric Blake.
115419 2008-09-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
115421         * lib/fstrcmp.c (EXTRA_CONTEXT_FIELDS): Add field 'edit_count_limit'.
115422         (EARLY_ABORT): Return true when the edit_count has grown too beyond the
115423         limit.
115424         (fstrcmp_bounded): Initialize the edit_count_limit. Return 0 when
115425         compareseq was aborted.
115427 2008-09-14  Bruno Haible  <bruno@clisp.org>
115429         * lib/fstrcmp.c (EXTRA_CONTEXT_FIELDS): Combine xvec_edit_count and
115430         yvec_edit_count.
115431         (NOTE_DELETE, NOTE_INSERT): Increment the combined edit count.
115432         (fstrcmp_bounded): Simplify result computation accordingly.
115434 2008-09-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
115436         * lib/fstrcmp.h (fstrcmp_bounded): New declaration.
115437         (fstrcmp): Define in terms of fstrcmp_bounded.
115438         * lib/fstrcmp.c (fstrcmp_bounded): Renamed from fstrcmp. Add
115439         lower_bound argument.
115440         Return quickly if the result is certainly < lower_bound.
115441         * tests/test-fstrcmp.c (check_fstrcmp): Test also fstrcmp_bounded.
115443 2008-09-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
115445         * lib/diffseq.h (EARLY_ABORT): New macro.
115446         (compareseq): Change return type to bool. Return true when EARLY_ABORT
115447         evaluates to true.
115449 2008-09-14  Bruno Haible  <bruno@clisp.org>
115451         * modules/perror-tests: New file.
115452         * tests/test-perror.sh: New file.
115453         * tests/test-perror.c: New file.
115455         New module 'perror'.
115456         * lib/stdio.in.h (perror): New declaration.
115457         * lib/perror.c: New file.
115458         * m4/perror.m4: New file.
115459         * modules/perror: New file.
115460         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add perror.
115461         * doc/posix-functions/perror.texi: Mention the perror module.
115462         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize GNULIB_PERROR,
115463         REPLACE_PERROR.
115464         * modules/stdio (Makefile.am): Substitute GNULIB_PERROR,
115465         REPLACE_PERROR.
115467 2008-09-14  Bruno Haible  <bruno@clisp.org>
115469         * modules/stdio (Makefile.am): Reorder to match the order in
115470         lib/stdio.in.h.
115471         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
115473 2008-09-13  Bruno Haible  <bruno@clisp.org>
115475         * lib/sys_socket.in.h (EINPROGRESS, ...): Remove definitions.
115477 2008-09-13  Bruno Haible  <bruno@clisp.org>
115479         Extend strerror to cover the added errno values.
115480         * lib/strerror.c: Include errno.h and winsock2.h if it exists.
115481         (rpl_strerror): Provide error messages for the added errno values and
115482         for the WSA* values.
115483         * m4/strerror.m4 (gl_FUNC_STRERROR): Test REPLACE_STRERROR.
115484         (gl_FUNC_STRERROR_SEPARATE): If errno.h is replaced, always replace
115485         strerror.
115486         (gl_PREREQ_STRERROR): Test whether winsock2.h exists.
115487         * modules/strerror (Depends-on): Add errno.
115488         * doc/posix-functions/strerror.texi: Document the change.
115489         * tests/test-strerror.c (main): Check also the string for ETIMEDOUT
115490         and EOVERFLOW.
115492 2008-09-13  Bruno Haible  <bruno@clisp.org>
115494         * modules/EOVERFLOW: Remove file.
115495         * m4/eoverflow.m4: Remove file.
115496         * modules/EOVERFLOW-tests: Remove file.
115497         * tests/test-EOVERFLOW.c: Remove file.
115498         * modules/fprintf-posix (Depends-on): Replace EOVERFLOW with errno.
115499         * modules/ftell (Depends-on): Likewise.
115500         * modules/getdelim (Depends-on): Likewise.
115501         * modules/getugroups (Depends-on): Likewise.
115502         * modules/poll (Depends-on): Likewise.
115503         * modules/snprintf (Depends-on): Likewise.
115504         * modules/sprintf-posix (Depends-on): Likewise.
115505         * modules/vasnprintf (Depends-on): Likewise.
115506         * modules/vasprintf (Depends-on): Likewise.
115507         * modules/vfprintf-posix (Depends-on): Likewise.
115508         * modules/vsnprintf (Depends-on): Likewise.
115509         * modules/vsprintf-posix (Depends-on): Likewise.
115510         * modules/xvasprintf (Depends-on): Likewise.
115511         * modules/unistdio/u8-vasnprintf (Depends-on): Likewise.
115512         * modules/unistdio/u8-vasprintf (Depends-on): Likewise.
115513         * modules/unistdio/u8-vsnprintf (Depends-on): Likewise.
115514         * modules/unistdio/u8-vsprintf (Depends-on): Likewise.
115515         * modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
115516         * modules/unistdio/u8-u8-vasprintf (Depends-on): Likewise.
115517         * modules/unistdio/u8-u8-vsnprintf (Depends-on): Likewise.
115518         * modules/unistdio/u8-u8-vsprintf (Depends-on): Likewise.
115519         * modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
115520         * modules/unistdio/u16-u16-vasprintf (Depends-on): Likewise.
115521         * modules/unistdio/u16-u16-vsnprintf (Depends-on): Likewise.
115522         * modules/unistdio/u16-u16-vsprintf (Depends-on): Likewise.
115523         * modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
115524         * modules/unistdio/u16-vasprintf (Depends-on): Likewise.
115525         * modules/unistdio/u16-vsnprintf (Depends-on): Likewise.
115526         * modules/unistdio/u16-vsprintf (Depends-on): Likewise.
115527         * modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
115528         * modules/unistdio/u32-vasprintf (Depends-on): Likewise.
115529         * modules/unistdio/u32-vsnprintf (Depends-on): Likewise.
115530         * modules/unistdio/u32-vsprintf (Depends-on): Likewise.
115531         * modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
115532         * modules/unistdio/u32-u32-vasprintf (Depends-on): Likewise.
115533         * modules/unistdio/u32-u32-vsnprintf (Depends-on): Likewise.
115534         * modules/unistdio/u32-u32-vsprintf (Depends-on): Likewise.
115535         * modules/unistdio/ulc-fprintf (Depends-on): Likewise.
115536         * modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
115537         * modules/unistdio/ulc-vasprintf (Depends-on): Likewise.
115538         * modules/unistdio/ulc-vfprintf (Depends-on): Likewise.
115539         * modules/unistdio/ulc-vsnprintf (Depends-on): Likewise.
115540         * modules/unistdio/ulc-vsprintf (Depends-on): Likewise.
115541         * MODULES.html.sh: Remove EOVERFLOW.
115542         * NEWS: Mention the change.
115544 2008-09-13  Bruno Haible  <bruno@clisp.org>
115546         * modules/errno-tests: New file.
115547         * tests/test-errno.c: New file, incorporating tests/test-EOVERFLOW.c.
115549         * lib/errno.in.h: New file.
115550         * m4/errno_h.m4: New file, borrowing from m4/eoverflow.m4.
115551         * modules/errno: New file.
115552         * doc/posix-headers/errno.texi: Update documentation.
115553         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add errno.
115555 2008-09-13  Bruno Haible  <bruno@clisp.org>
115557         * tests/test-poll.c: Use #if for native Windows, rather than testing
115558         __MSVCRT__.
115560 2008-09-13  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
115561             Bruno Haible  <bruno@clisp.org>
115563         * lib/glob.c: Don't include <pwd.h> on native Windows.
115564         (WINDOWS32): New macro.
115565         (glob) [WINDOW32]: Provide a reasonable replacement for getenv("HOME").
115567 2008-09-13  Bruno Haible  <bruno@clisp.org>
115569         * lib/glthread/cond.h [USE_SOLARIS_THREADS]
115570         (ETIMEDOUT): Remove macro.
115571         (glthread_cond_timedwait_multithreaded): New declaration.
115572         (glthread_cond_timedwait): Use it.
115573         * lib/glthread/cond.c [USE_SOLARIS_THREADS]
115574         (glthread_cond_timedwait_multithreaded): New function.
115576 2008-09-12  Paolo Bonzini  <bonzini@gnu.org>
115578         * modules/poll-tests: Do not check for io.h.
115579         * tests/test-poll.c: Check for __MSVCRT__ instead.
115581 2008-09-12  Paolo Bonzini  <bonzini@gnu.org>
115583         * lib/sys_socket.in.h (EINPROGRESS): Define for Winsock case.
115584         * modules/poll-tests: Add inet_pton, stdbool, sockets.
115585         * tests/test-poll.c: Use them.  Use _pipe on Windows.
115587 2008-09-12  Paolo Bonzini  <bonzini@gnu.org>
115589         * modules/poll-tests: New.
115590         * tests/test-poll.c: New.
115592 2008-09-12  Eric Blake  <ebb9@byu.net>
115594         frexp: test for NetBSD failure on -0.0
115595         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Enhance test, since some, but
115596         not all, bugs from NetBSD 3.0 have been fixed.
115597         * doc/posix-functions/frexp.texi (frexp): Document bug.
115598         Reported by Thomas Klausner.
115600         signbit: work around bug of HP-UX 10.20 cc with -0.0 literal
115601         * m4/signbit.m4 (gl_SIGNBIT_TEST_PROGRAM): Rewrite test to avoid
115602         literal -0.0.
115603         Reported by Jonathan C. Patschke <jp@centtech.com>.
115605 2008-09-11  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
115607         * lib/glthread/cond.h: Use dummy implementation also if
115608         USE_WIN32_THREADS.
115610 2008-09-11  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
115612         * modules/fnmatch-posix (License): Change to LGPLv2+.
115613         * modules/fnmatch-gnu (License): Likewise.
115615 2008-09-11  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
115617         * lib/poll.c (poll): Fix polling unconnected server sockets on WIN32.
115619 2008-09-11  Jim Meyering  <meyering@redhat.com>
115621         * users.txt: Add gtk-vnc.
115623 2008-09-08  Simon Josefsson  <simon@josefsson.org>
115625         * tests/test-bitrotate.c: Test 8/16-bit rotates with 0 and maximum
115626         rotate amounts.
115628         * lib/bitrotate.h: Doc fix, mention that N can be wider than minimally
115629         required for 16-bit and 8-bit rotates.
115630         * lib/bitrotate.h (rotl64, rotr64, rotl32, rotl32, rotl16, rotr16,
115631         rotl8, rotr8): Use UINT64_MAX, UINT32_MAX, UINT16_MAX, and
115632         UINT8_MAX instead of hard-coded constants.
115633         Suggested by Paul Eggert.
115635 2008-09-07  Bruno Haible  <bruno@clisp.org>
115637         * tests/test-striconveh.c (main): Check behaviour when converting from
115638         UTF-7.
115640         Make striconveh work better with stateful encodings.
115641         * lib/striconveh.c (iconv_carefully, iconv_carefully_1): Don't assume
115642         that iconv does not increment the inptr when returning -1/EINVAL.
115644 2008-09-07  Bruno Haible  <bruno@clisp.org>
115646         * build-aux/config.rpath: Update according to libtool-2.2.6.
115647         * build-aux/config.libpath: Likewise.
115649 2008-09-06  Bruno Haible  <bruno@clisp.org>
115651         * lib/freadahead.c (freadahead): Add conditional for SLOW_BUT_NO_HACKS.
115652         * lib/freadptr.c (freadptr): Likewise.
115653         * lib/freadseek.c (freadptrinc): Likewise.
115654         Reported by Simon Josefsson.
115656 2008-09-06  Bruno Haible  <bruno@clisp.org>
115658         * modules/freadptr (License): Change to LGPLv2+.
115659         * modules/freadseek (License): Likewise.
115660         Suggested by Eric Blake.
115662         * modules/memchr2 (License): Change to LGPLv2+.
115663         Approved by Eric Blake.
115665 2008-09-04  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
115666             Bruno Haible  <bruno@clisp.org>
115668         Make gnulib-tool work with native 'sed' on AIX.
115669         * gnulib-tool (sed_noop): New variable.
115670         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am, func_import,
115671         func_add_or_update, func_create_testdir): Use it to initialize sed
115672         script variables.
115673         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
115675 2008-09-04  Albert Chin  <bug-gnulib@mlists.thewrittenword.com>
115676             Bruno Haible  <bruno@clisp.org>
115678         * m4/include_next.m4 (gl_INCLUDE_NEXT): Add check whether #include_next
115679         also works after #include directives.
115681 2008-09-04  Ondřej Vašík  <ovasik@redhat.com>
115683         getdate.y: reject an out-of-range timezone value
115684         * lib/getdate.y (time_zone_hhmm): Reject any TZ offset that is outside
115685         the range [-24...+24].  When specified with only one or two digits,
115686         * tests/test-getdate.c: Tests for the fix.
115687         * doc/getdate.texi: Document this change.
115689 2008-09-03  Bruno Haible  <bruno@clisp.org>
115691         * doc/glibc-functions/strverscmp.texi: Mention the strverscmp module.
115693 2008-09-02  Simon Josefsson  <simon@josefsson.org>
115695         * lib/bitrotate.h (rotl64, rotr64): Add.  Suggested by Bruce Korb
115696         <bruce.korb@gmail.com> with ideas from Ben Pfaff
115697         <blp@cs.stanford.edu>, Bruno Haible <bruno@clisp.org> and Eric
115698         Blake <ebb9@byu.net>.
115700         * tests/test-bitrotate.c: Add more test vectors.
115702 2008-09-02  Eric Blake  <ebb9@byu.net>
115704         vasnprintf-posix: handle large precision via %.*d
115705         * lib/vasnprintf.c (VASNPRINTF): Don't pass precision to snprintf
115706         when handling it ourselves.
115707         * tests/test-vasnprintf-posix.c (test_function): Add test.
115708         * tests/test-snprintf-posix.h (test_function): Likewise.
115709         * tests/test-sprintf-posix.h (test_function): Likewise.
115710         * tests/test-vasprintf-posix.c (test_function): Likewise.
115711         Reported by Alain Guibert.
115713 2008-09-01  Eric Blake  <ebb9@byu.net>
115715         c-stack: make configure-time check more robust
115716         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Check for
115717         successful sigaction call.
115718         Reported by Tom G. Christensen.
115720 2008-09-01  Bruno Haible  <bruno@clisp.org>
115722         New module 'findprog-lgpl'.
115723         * modules/findprog-lgpl: New file.
115724         * lib/findprog-lgpl.c: New file.
115725         * lib/findprog.c: Compile nothing in findprog.c if findprog-lgpl.c is
115726         also compiled. Consider the possibly defined symbol IN_FINDPROG_LGPL
115727         to decide whether to use strdup or xstrdup, concatenated_filename or
115728         xconcatenated_filename.
115730 2008-09-01  Bruno Haible  <bruno@clisp.org>
115732         Split module 'concat-filename' into 'concat-filename' (LGPL) and
115733         'xconcat-filename' (GPL).
115734         * modules/concat-filename (Depends-on): Add malloc-posix, remove xalloc.
115735         (License): Change to LGPLv2+.
115736         * modules/xconcat-filename: New file.
115737         * lib/concat-filename.h (concatenated_filename): Change specification.
115738         (xconcatenated_filename): New declaration.
115739         * lib/concat-filename.c: Include errno.h, stdlib.h, not xalloc.h.
115740         (concatenated_filename): Use malloc instead of xalloc. Handle out-of-
115741         memory situations.
115742         * lib/xconcat-filename.c: New file.
115743         * NEWS: Mention the change.
115744         * lib/findprog.c: Include concat-filename.h, not filename.h.
115745         (find_in_path): Use xconcatenated_filename instead of
115746         concatenated_filename.
115747         * lib/javacomp.c: Include concat-filename.h, not filename.h.
115748         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
115749         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
115750         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
115751         is_oldgcj_14_13_usable, is_javac_usable): Use xconcatenated_filename
115752         instead of concatenated_filename.
115753         * lib/javaexec.c: Include concat-filename.h, not filename.h.
115754         (execute_java_class): Use xconcatenated_filename instead of
115755         concatenated_filename.
115756         * modules/findprog (Depends-on): Add xconcat-filename, remove filename.
115757         * modules/javacomp (Depends-on): Likewise.
115758         * modules/javaexec (Depends-on): Likewise.
115760 2008-09-01  Bruno Haible  <bruno@clisp.org>
115762         Split module 'filename' into 'filename' and 'concat-filename'.
115763         * modules/filename: Keep only lib/filename.h.
115764         (License): Change to LGPLv2+.
115765         * modules/concat-filename: New file, extracted from modules/filename.
115766         * lib/filename.h (concatenated_filename): Remove declaration.
115767         * lib/concat-filename.h: New file, extracted from lib/filename.h.
115768         * lib/concat-filename.c: Include concat-filename.h.
115769         * NEWS: Mention the change.
115771 2008-09-01  Simon Josefsson  <simon@josefsson.org>
115773         * lib/bitrotate.h (rotl8, rotr8): Add.
115775         * modules/bitrotate (configure.ac): Need
115776         AC_REQUIRE([AC_C_INLINE]).
115777         (Description): Mention stdint.h.  Reported by Bruno Haible
115778         <bruno@clisp.org>.
115780         * lib/bitrotate.h (rotr16, rotl16): Fix mask value.  Reported by
115781         Paolo Bonzini <bonzini@gnu.org>.
115783 2008-08-31  Bruno Haible  <bruno@clisp.org>
115785         Assume Solaris specific bi-arch conventions on Solaris systems.
115786         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): On Solaris in 64-bit
115787         mode, set acl_libdirstem to lib/64. Also set acl_libdirstem2.
115788         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): If acl_libdirstem does not
115789         work, try acl_libdirstem2 as fallback. Otherwise treat acl_libdirstem2
115790         like acl_libdirstem.
115791         (AC_LIB_LINKFLAGS_FROM_LIBS): Treat acl_libdirstem2 like
115792         acl_libdirstem.
115793         * NEWS: Mention the change.
115794         Reported by Ben Taylor <bentaylor.solx86@gmail.com>.
115796 2008-08-31  Jim Meyering  <meyering@redhat.com>
115798         * lib/strftime.h: Add comments describing the two added arguments.
115800         remove duplicate #include directives
115801         * lib/chdir-long.c [TEST_CHDIR]: Remove duplicate #include <stdio.h>.
115802         * lib/putenv.c: Remove duplicate #include <stdlib.h>.
115804 2008-08-31  Bruno Haible  <bruno@clisp.org>
115806         New module 'sigpipe-die'.
115807         * modules/sigpipe-die: New file.
115808         * lib/sigpipe-die.h: New file.
115809         * lib/sigpipe-die.c: New file.
115810         * MODULES.html.sh (Signal handling): Add sigpipe-die.
115812 2008-08-31  Bruno Haible  <bruno@clisp.org>
115814         Don't override previously installed signal handlers.
115815         * lib/fatal-signal.c (saved_sigactions): New variable.
115816         (uninstall_handlers): Reset the signal to the saved handler, not
115817         to SIG_DFL (except when ignored).
115818         (install_handlers): Save the previous handlers.
115820 2008-08-30  Bruno Haible  <bruno@clisp.org>
115822         * gnulib-tool (func_reset_sigpipe): New function.
115823         (func_get_automake_snippet, func_modules_transitive_closure,
115824         func_import): Invoke it before a join command that reads from stdin,
115825         to avoid "echo: write error: Broken pipe" error messages on stderr.
115826         Reported by Sam Steingold <sds@gnu.org>.
115828 2008-08-30  Bruno Haible  <bruno@clisp.org>
115830         * m4/fopen.m4 (gl_FUNC_FOPEN): Test against bug with trailing slash.
115831         Code copied from m4/open.m4.
115832         * lib/fopen.c (rpl_fopen): Return NULL if the mode specifies write
115833         access and the filename ends in a slash. Code copied from lib/open.c.
115834         * doc/posix-functions/fopen.texi: Document bug with trailing slash.
115835         * tests/test-fopen.c (main): Check against bug with trailing slash.
115837 2008-08-29  Bruno Haible  <bruno@clisp.org>
115839         Avoid some "gcc -pedantic" warnings.
115840         * m4/include_next.m4 (gl_INCLUDE_NEXT): Set also PRAGMA_SYSTEM_HEADER.
115841         * lib/arpa_inet.in.h: Use PRAGMA_SYSTEM_HEADER.
115842         * lib/dirent.in.h: Likewise.
115843         * lib/fcntl.in.h: Likewise.
115844         * lib/float.in.h: Likewise.
115845         * lib/iconv.in.h: Likewise.
115846         * lib/inttypes.in.h: Likewise.
115847         * lib/locale.in.h: Likewise.
115848         * lib/math.in.h: Likewise.
115849         * lib/netinet_in.in.h: Likewise.
115850         * lib/search.in.h: Likewise.
115851         * lib/signal.in.h: Likewise.
115852         * lib/stdarg.in.h: Likewise.
115853         * lib/stdint.in.h: Likewise.
115854         * lib/stdio.in.h: Likewise.
115855         * lib/stdlib.in.h: Likewise.
115856         * lib/string.in.h: Likewise.
115857         * lib/strings.in.h: Likewise.
115858         * lib/sys_select.in.h: Likewise.
115859         * lib/sys_socket.in.h: Likewise.
115860         * lib/sys_stat.in.h: Likewise.
115861         * lib/sys_time.in.h: Likewise.
115862         * lib/sysexits.in.h: Likewise.
115863         * lib/time.in.h: Likewise.
115864         * lib/unistd.in.h: Likewise.
115865         * lib/wchar.in.h: Likewise.
115866         * lib/wctype.in.h: Likewise.
115867         * modules/arpa_inet (Makefile.am): Also substitute PRAGMA_SYSTEM_HEADER.
115868         * modules/fchdir (Makefile.am): Likewise.
115869         * modules/fcntl (Makefile.am): Likewise.
115870         * modules/float (Makefile.am): Likewise.
115871         * modules/iconv_open (Makefile.am): Likewise.
115872         * modules/inttypes (Makefile.am): Likewise.
115873         * modules/locale (Makefile.am): Likewise.
115874         * modules/math (Makefile.am): Likewise.
115875         * modules/netinet_in (Makefile.am): Likewise.
115876         * modules/search (Makefile.am): Likewise.
115877         * modules/signal (Makefile.am): Likewise.
115878         * modules/stdarg (Makefile.am): Likewise.
115879         * modules/stdint (Makefile.am): Likewise.
115880         * modules/stdio (Makefile.am): Likewise.
115881         * modules/stdlib (Makefile.am): Likewise.
115882         * modules/string (Makefile.am): Likewise.
115883         * modules/strings (Makefile.am): Likewise.
115884         * modules/sys_select (Makefile.am): Likewise.
115885         * modules/sys_socket (Makefile.am): Likewise.
115886         * modules/sys_stat (Makefile.am): Likewise.
115887         * modules/sys_time (Makefile.am): Likewise.
115888         * modules/sysexits (Makefile.am): Likewise.
115889         * modules/time (Makefile.am): Likewise.
115890         * modules/unistd (Makefile.am): Likewise.
115891         * modules/wchar (Makefile.am): Likewise.
115892         * modules/wctype (Makefile.am): Likewise.
115893         Reported by Reuben Thomas <rrt@sc3d.org>.
115895 2008-08-29  Bruno Haible  <bruno@clisp.org>
115897         * m4/include_next.m4 (gl_INCLUDE_NEXT): Don't define HAVE_INCLUDE_NEXT
115898         any more.
115900 2008-08-29  Simon Josefsson  <simon@josefsson.org>
115902         * MODULES.html.sh (Misc): Add bitrotate.
115904         * modules/bitrotate: New file.
115906         * lib/bitrotate.h: New file.
115908         * modules/bitrotate-tests: New file.
115910         * tests/test-bitrotate.c: New file.
115912         * modules/crypto/gc-arctwo, modules/crypto/arctwo: Add dependency
115913         on the bitrotate module.
115915         * lib/arctwo.c: Use new bitrotate module.
115917 2008-08-29  Jim Meyering  <meyering@redhat.com>
115919         bootstrap: merge changes from coreutils
115920         * build-aux/bootstrap (cp_mark_as_generated): Preserve perms
115921         of copied files.  Remove a kludge, now that this is fixed.
115922         * build-aux/bootstrap: Fix unportable expr usage. (by Ralf Wildenhues)
115923         * build-aux/bootstrap: Remove $bt and $bt2 also when not using gettext.
115924         * build-aux/bootstrap: Remove coreutils-specific SUBDIRS-related code.
115926 2008-08-29  Bruno Haible  <bruno@clisp.org>
115928         * MODULES.html.sh: Remove --cvs-urls option.
115930 2008-08-28  Jose E. Marchesi  <jemarch@gnu.org>  (tiny change)
115932         maint.mk: adjust to file name change
115933         * top/maint.mk: s/Makefile.cfg/cfg.mk/.
115935 2008-08-28  Jim Meyering  <meyering@redhat.com>
115937         * modules/getndelim2 (License): Relicense to LGPLv2+.
115938         Approved by Richard Stallman for the version of 1995, and by
115939         Paul Eggert, Bruno Haible, Eric Blake for their contributions.
115941 2008-08-27  Paolo Bonzini  <bonzini@gnu.org>
115943         * lib/getdelim.c (flockfile, funlockfile): Make all of them
115944         dummy if one is not available.  Do not touch them if
115945         USE_UNLOCKED_IO, instead letting unlocked-io.h do that.
115946         (getc_maybe_unlocked): New.
115947         * m4/getdelim.m4 (gl_PREREQ_GETDELIM): Check for getc_unlocked.
115949 2008-08-26  Eric Blake  <ebb9@byu.net>
115951         doc/INSTALL: resync from autoconf
115952         * doc/Makefile (INSTALL, INSTALL.ISO, INSTALL.UTF-8): Simplify.
115953         (INSTALL_PRELUDE): Delete; this is done more efficiently by
115954         moving...
115955         * install.texi [!autoconf]: ...here.  Resync from autoconf.
115956         * INSTALL: Regenerate.
115957         * INSTALL.ISO: New file.
115958         * INSTALL.UTF-8: Likewise.
115960 2008-08-26  Jim Meyering  <meyering@redhat.com>
115962         GNUmakefile: cfg.mk definitions override default autoreconf-rerun policy
115963         * top/GNUmakefile (_is-dist-target, _is-install-target): Make
115964         these definitions conditional, so that they may be overridden, too.
115966 2008-08-26  Bruno Haible  <bruno@clisp.org>
115968         Generate INSTALL file variants with prettier quotes.
115969         * doc/Makefile (INSTALL_PRELUDE): New macro.
115970         (INSTALL): Use it.
115971         (INSTALL.ISO, INSTALL.UTF-8): New rules.
115973 2008-08-26  Bruno Haible  <bruno@clisp.org>
115975         Run makeinfo in an English locale.
115976         * doc/Makefile (MAKEINFO): New variable.
115978 2008-08-26  Bruno Haible  <bruno@clisp.org>
115980         * doc/Makefile (INSTALL): Use --no-validate instead of --no-warn.
115981         Suggested by Eric Blake.
115983 2008-08-25  Bruno Haible  <bruno@clisp.org>
115985         * doc/Makefile (INSTALL): Generate with @firstparagraphindent set.
115987 2008-08-25  Eric Blake  <ebb9@byu.net>
115989         c-stack: test that stack overflow can be caught
115990         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Also check
115991         that platform allows handling stack overflow; at least OS/2 EMX
115992         has sigaltstack, but crashes before transferring control to
115993         handler on stack overflow.
115994         * lib/c-stack.c [HAVE_SIGALTSTACK]: Adjust conditions to also
115995         check for HAVE_STACK_OVERFLOW_HANDLING.
115996         Reported by Elbert Pol.
115998 2008-08-25  Bruno Haible  <bruno@clisp.org>
116000         * doc/posix-functions/strftime.texi: Fix description of strftime
116001         module.
116003 2008-08-24  Bruno Haible  <bruno@clisp.org>
116005         * tests/uniwidth/test-uc_width2.c: New file.
116006         * tests/uniwidth/test-uc_width2.sh: New file.
116007         * modules/uniwidth/width-tests (Files): Add the new files.
116008         (TESTS): Add uniwidth/test-uc_width2.sh.
116009         (TESTS_ENVIRONMENT): New variable.
116010         (check_PROGRAMS): Add test-uc_width2.
116011         (test_uc_width2_SOURCES): New variable.
116013         Fix uc_width(0x00AB) bug, introduced on 2007-07-08.
116014         * lib/uniwidth/width.c (nonspacing_table_data): Set bit for 0x00AD,
116015         not 0x00AB.
116016         Reported by Alexander V. Lukyanov <lav@netis.ru>.
116018 2008-08-22  Eric Blake  <ebb9@byu.net>
116020         test-lock, test-tls: mention why a test is skipped
116021         * tests/test-lock.c (main) [!USE_*_THREADS]: Print why test is
116022         skipped.
116023         * tests/test-tls.c (main) [!USE_*_THREADS]: Likewise.
116025         count-one-bits: relax license
116026         * modules/count-one-bits (License): Relicense to LGPLv2+.
116027         Suggested by Ludovic Courtès, approved by Ben Pfaff.
116029 2008-08-22  Andreas Schwab  <schwab@suse.de>
116031         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_POSIX):
116032         Remove spurious space in assignment.
116034 2008-08-21  Simon Josefsson  <simon@josefsson.org>
116036         * m4/autobuild.m4: Use TZ=UTC0 instead of TZ=UTC.  Reported by
116037         Paul Eggert <eggert@CS.UCLA.EDU>.
116039 2008-08-20  Paolo Bonzini  <bonzini@gnu.org>
116041         * modules/gettext: Add m4/threadlib.m4.
116043 2008-08-19  Eric Blake  <ebb9@byu.net>
116045         test-c-stack: fix compilation failure on FreeBSD 5.0
116046         * tests/test-c-stack.c [HAVE_SETRLIMIT]: Include prerequisite
116047         headers before <sys/resource.h>.
116048         * doc/posix-headers/sys_resource.texi (sys/resource.h): Document
116049         the bug.
116050         Reported by Nelson H. F. Beebe.
116052         strverscmp: migrate from "strverscmp.h" to <string.h>
116053         * modules/string (Makefile.am): Add new hooks.
116054         * modules/strverscmp (Files): Remove strverscmp.h.
116055         (Depends-on): Add string.
116056         (configure.ac): Add indicator.
116057         (Include): Mention new header.
116058         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Provide new
116059         defaults.
116060         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP): Inform string module of
116061         results.
116062         * lib/strverscmp.h: Delete.
116063         * lib/string.in.h (strverscmp): Provide declaration, when needed.
116064         * tests/test-strverscmp.c (includes): Adjust client.
116065         * lib/check-version.c (includes): Likewise.
116066         * NEWS: Document the change.
116068         strverscmp: add unit test
116069         * modules/strverscmp-tests: New file.
116070         * tests/test-strverscmp.c: Likewise.
116072 2008-08-19  Simon Josefsson  <simon@josefsson.org>
116074         * lib/gc-gnulib.c: Indentation cleanup.  Add some comments
116075         regarding Windows crypto stuff, from Mono.
116077 2008-08-19  Adam Strzelecki  <ono@java.pl>  (tiny change)
116079         * lib/gc-gnulib.c: Use CRYPT_VERIFY_CONTEXT.  Try to use Intel CSP
116080         if present, for intel RND.  Return error on failures.
116082 2008-08-18  Ben Pfaff  <blp@gnu.org>
116084         gitlog-to-changelog: give better diagnostic for failed pipe-open
116085         * build-aux/gitlog-to-changelog: Improve error message: suggest
116086         that the version of Git may be too old.
116088 2008-08-18  Simon Josefsson  <simon@josefsson.org>
116090         * m4/autobuild.m4: Use TZ=UTC to avoid time zone complexity.  Use
116091         ISO 8601 format.  Suggested by Greg Troxel <gdt@ir.bbn.com>.
116093 2008-08-18  Bruno Haible  <bruno@clisp.org>
116095         * lib/glthread/thread.h [USE_SOLARIS_THREADS]: Use thread_in_use(), not
116096         pthread_in_use().
116098 2008-08-18  Bruno Haible  <bruno@clisp.org>
116100         * lib/glthread/threadlib.c: Include <pthread.h>.
116102 2008-08-18  Bruno Haible  <bruno@clisp.org>
116104         * lib/glthread/lock.h [USE_SOLARIS_THREADS]: Fix
116105         glthread_recursive_lock_* macros.
116106         * lib/glthread/lock.c (glthread_recursive_lock_destroy_multithreaded):
116107         Fix syntax error.
116109 2008-08-18  Bruno Haible  <bruno@clisp.org>
116111         * lib/glthread/thread.c: Avoid forcing a context switch right after
116112         thread creation.
116114 2008-08-17  Bruno Haible  <bruno@clisp.org>
116116         * lib/glthread/thread.c: New file, based on code from tests/test-lock.c.
116117         * lib/glthread/thread.h: Provide Win32 specific implementation.
116118         * modules/thread (Files): Add lib/glthread/thread.c.
116119         (Depends-on): Add lock.
116120         (Makefile.am): Add glthread/thread.c to lib_SOURCES.
116122 2008-08-17  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
116124         New module 'yield'.
116125         * modules/yield: New file.
116126         * lib/glthread/yield.h: New file.
116127         * m4/yield.m4: New file.
116128         * MODULES.html.sh (Multithreading): Add yield.
116130 2008-08-17  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
116132         New module 'thread'.
116133         * modules/thread: New file.
116134         * lib/glthread/thread.h: New file.
116135         * m4/thread.m4: New file.
116136         * MODULES.html.sh (Multithreading): Add thread.
116138 2008-08-17  Bruno Haible  <bruno@clisp.org>
116140         * lib/glthread/lock.h: Include <stdlib.h> always.
116141         * lib/glthread/tls.h: Likewise.
116142         * lib/glthread/cond.h: Likewise.
116144 2008-08-17  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
116146         New module 'cond'.
116147         * modules/cond: New file.
116148         * lib/glthread/cond.h: New file.
116149         * lib/glthread/cond.c: New file.
116150         * m4/cond.m4: New file.
116151         * MODULES.html.sh (Multithreading): Add cond.
116153 2008-08-16  Eric Blake  <ebb9@byu.net>
116155         c-stack: fix regression on Irix 5.3 from 2008-06-21
116156         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Move check for
116157         sa_sigaction...
116158         * m4/sigaction.m4 (gl_PREREQ_SIG_HANDLER_H): ...here.
116159         (gl_PREREQ_SIGACTION): Depend on sig-handler.h prereq's.
116160         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Set the default.
116161         * modules/signal (Makefile.am): Use the value.
116162         * lib/signal.in.h (sa_sigaction) [HAVE_SIGACTION
116163         && !HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define.
116164         * doc/posix-headers/signal.texi (signal.h): Document this
116165         portability issue.
116166         * doc/posix-functions/sigaction.texi (sigaction): Likewise.
116167         Reported by Tom G. Christensen.
116169 2008-08-17  Bruno Haible  <bruno@clisp.org>
116171         New module 'threadlib'.
116172         * modules/threadlib: New file.
116173         * lib/glthread/threadlib.c: New file, extracted from
116174         lib/glthread/lock.c.
116175         * lib/glthread/lock.c (dummy_thread_func, glthread_in_use): Remove
116176         functions.
116177         * m4/threadlib.m4: New file, from m4/lock.m4, renaming gl_LOCK to
116178         gl_THREADLIB and gl_LOCK_EARLY to gl_THREADLIB_EARLY.
116179         * m4/lock.m4 (gl_LOCK_EARLY, gl_LOCK_EARLY_BODY, gl_LOCK_BODY): Remove
116180         macros.
116181         (gl_LOCK): Just require gl_THREADLIB and perform checks for lock.h.
116182         (gl_DISABLE_THREADS): Remove macro.
116183         * modules/lock (Files): Remove build-aux/config.rpath.
116184         (Depends-on): Remove havelib. Add threadlib.
116185         (configure.ac-early): Remove section.
116186         * m4/tls.m4 (gl_TLS): Require gl_THREADLIB instead of gl_LOCK.
116187         * modules/tls (Depends-on): Remove lock. Add threadlib.
116188         (Link): New section, copied from threadlib.
116189         * MODULES.html.sh (Multithreading): Add threadlib.
116191 2008-08-14  Bruno Haible  <bruno@clisp.org>
116193         * lib/glthread/lock.h (glthread_lock_lock, glthread_lock_unlock,
116194         glthread_lock_destroy, glthread_rwlock_rdlock, glthread_rwlock_wrlock,
116195         glthread_rwlock_unlock, glthread_rwlock_destroy,
116196         glthread_recursive_lock_lock, glthread_recursive_lock_unlock,
116197         glthread_recursive_lock_destroy): Define as macros always.
116198         * lib/glthread/lock.c (glthread_lock_lock_func): Renamed from
116199         glthread_lock_lock.
116200         (glthread_lock_unlock_func): Renamed from glthread_lock_unlock.
116201         (glthread_lock_destroy_func): Renamed from glthread_lock_destroy.
116202         (glthread_rwlock_rdlock_func): Renamed from glthread_rwlock_rdlock.
116203         (glthread_rwlock_wrlock_func): Renamed from glthread_rwlock_wrlock.
116204         (glthread_rwlock_unlock_func): Renamed from glthread_rwlock_unlock.
116205         (glthread_rwlock_destroy_func): Renamed from glthread_rwlock_destroy.
116206         (glthread_recursive_lock_lock_func): Renamed from
116207         glthread_recursive_lock_lock.
116208         (glthread_recursive_lock_unlock_func): Renamed from
116209         glthread_recursive_lock_unlock.
116210         (glthread_recursive_lock_destroy_func): Renamed from
116211         glthread_recursive_lock_destroy.
116213 2008-08-14  Bruno Haible  <bruno@clisp.org>
116215         * lib/glthread/lock.h: Renamed from lib/lock.h.
116216         * lib/glthread/lock.c: Renamed from lib/lock.c. Update includes.
116217         * lib/glthread/tls.h: Renamed from lib/tls.h.
116218         * lib/glthread/tls.c: Renamed from lib/tls.c. Update includes.
116219         * lib/fstrcmp.c: Update includes.
116220         * lib/strsignal.c: Update includes.
116221         * modules/lock (Files, Makefile.am): Update.
116222         (Include): Change to "glthread/lock.h".
116223         * modules/tls (Files, Makefile.am): Update.
116224         (Include): Change to "glthread/tls.h".
116225         * tests/test-lock.c: Update includes.
116226         * tests/test-tls.c: Update includes.
116227         * NEWS: Mention the renamed header files.
116229 2008-08-11  Jim Meyering  <meyering@redhat.com>
116231         * lib/fts_.h: Fix grammar (insert a missing "is") in a comment.
116233 2008-08-11  Eric Blake  <ebb9@byu.net>
116235         test-c-stack: avoid C99-ism
116236         * tests/test-c-stack.c (main): Fix whitespace, move declaration
116237         before statement.
116238         Reported by Alain Guibert.
116240 2008-08-10  Jim Meyering  <meyering@redhat.com>
116242         ensure that return value of uinttostr et al are not ignored
116243         * lib/inttostr.h (__GNUC_PREREQ): Define.
116244         (__attribute_warn_unused_result__): Define.
116245         (offtostr, imaxtostr, umaxtostr, uinttostr): Apply the attribute.
116247 2008-08-07  Paolo Bonzini  <bonzini@gnu.org>
116249         * lib/lock.c (glthread_recursive_lock_init_multithreaded)
116250         [!PTHREAD_RECURSIVE_MUTEX_INITIALIZER]: Fix typo.
116252 2008-08-07  Jim Meyering  <meyering@redhat.com>
116254         * m4/inet_pton.m4: Fix typo in comment: s/inet_ntop/inet_pton/.
116256         * modules/mkstemp (License): Relicense under LGPLv2+.
116257         * modules/tempname (License): Likewise.
116259 2008-08-06  Bruno Haible  <bruno@clisp.org>
116261         * lib/poll.c (poll): Further micro-optimization.
116263 2008-08-06  Jim Meyering  <meyering@redhat.com>
116265         inet_pton.c: use locale-independent tolower
116266         * lib/inet_pton.c: Include <c-ctype.h> rather than <ctype.h>.
116267         (inet_pton6): Use c_tolower rather than tolower.
116268         * modules/inet_pton (Depends-on): Add c-ctype.
116270 2008-08-06  Paolo Bonzini  <bonzini@gnu.org>
116272         * lib/poll.c (poll): Avoid division when timeout is 0, cache
116273         _SC_OPEN_MAX, avoid repeated access to errno.  Check for nfd < 0.
116275 2008-08-06  Jim Meyering  <meyering@redhat.com>
116277         * modules/inet_pton (License): Relicense under LGPLv2+.
116279 2008-08-03  Bruno Haible  <bruno@clisp.org>
116281         Additional non-aborting API for lock and tls.
116282         * lib/lock.h: Include <errno.h>.
116283         (glthread_lock_init): New macro/function.
116284         (gl_lock_init): Define as wrapper around glthread_lock_init.
116285         (glthread_lock_lock): New macro/function.
116286         (gl_lock_lock): Define as wrapper around glthread_lock_lock.
116287         (glthread_lock_unlock): New macro/function.
116288         (gl_lock_unlock): Define as wrapper around glthread_lock_unlock.
116289         (glthread_lock_destroy): New macro/function.
116290         (gl_lock_destroy): Define as wrapper around glthread_lock_destroy.
116291         (glthread_rwlock_init): New macro/function.
116292         (gl_rwlock_init): Define as wrapper around glthread_rwlock_init.
116293         (glthread_rwlock_rdlock): New macro/function.
116294         (gl_rwlock_rdlock): Define as wrapper around glthread_rwlock_rdlock.
116295         (glthread_rwlock_wrlock): New macro/function.
116296         (gl_rwlock_wrlock): Define as wrapper around glthread_rwlock_wrlock.
116297         (glthread_rwlock_unlock): New macro/function.
116298         (gl_rwlock_unlock): Define as wrapper around glthread_rwlock_unlock.
116299         (glthread_rwlock_destroy): New macro/function.
116300         (gl_rwlock_destroy): Define as wrapper around glthread_rwlock_destroy.
116301         (glthread_recursive_lock_init): New macro/function.
116302         (gl_recursive_lock_init): Define as wrapper around
116303         glthread_recursive_lock_init.
116304         (glthread_recursive_lock_lock): New macro/function.
116305         (gl_recursive_lock_lock): Define as wrapper around
116306         glthread_recursive_lock_lock.
116307         (glthread_recursive_lock_unlock): New macro/function.
116308         (gl_recursive_lock_unlock): Define as wrapper around
116309         glthread_recursive_lock_unlock.
116310         (glthread_recursive_lock_destroy): New macro/function.
116311         (gl_recursive_lock_destroy): Define as wrapper around
116312         glthread_recursive_lock_destroy.
116313         (glthread_once): New macro/function.
116314         (gl_once): Define as wrapper around glthread_once.
116315         Update function declarations.
116316         * lib/lock.c (glthread_rwlock_init_multithreaded): Renamed from
116317         glthread_rwlock_init. Return error code.
116318         (glthread_rwlock_rdlock_multithreaded): Renamed from
116319         glthread_rwlock_rdlock. Return error code.
116320         (glthread_rwlock_wrlock_multithreaded): Renamed from
116321         glthread_rwlock_wrlock. Return error code.
116322         (glthread_rwlock_unlock_multithreaded): Renamed from
116323         glthread_rwlock_unlock. Return error code.
116324         (glthread_rwlock_destroy_multithreaded): Renamed from
116325         glthread_rwlock_destroy. Return error code.
116326         (glthread_recursive_lock_init_multithreaded): Renamed from
116327         glthread_recursive_lock_init. Return error code.
116328         (glthread_recursive_lock_lock_multithreaded): Renamed from
116329         glthread_recursive_lock_lock. Return error code.
116330         (glthread_recursive_lock_unlock_multithreaded): Renamed from
116331         glthread_recursive_lock_unlock. Return error code.
116332         (glthread_recursive_lock_destroy_multithreaded): Renamed from
116333         glthread_recursive_lock_destroy. Return error code.
116334         (glthread_once_call): Make static.
116335         (glthread_once_multithreaded): Renamed from glthread_once.
116336         * lib/tls.h: Include <errno.h>.
116337         (glthread_tls_key_init): New macro/function.
116338         (gl_tls_key_init): Define as wrapper around glthread_tls_key_init.
116339         (glthread_tls_set): New macro/function.
116340         (gl_tls_set): Define as wrapper around glthread_tls_set.
116341         (glthread_tls_key_destroy): New macro/function.
116342         (gl_tls_key_destroy): Define as wrapper around glthread_tls_key_destroy.
116343         Update function declarations.
116344         * lib/tls.c (glthread_tls_get_multithreaded): Renamed from
116345         glthread_tls_get.
116346         Suggested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
116348 2008-08-04  Eric Blake  <ebb9@byu.net>
116350         gnumakefile: use space, not TAB, outside of targets
116351         * top/GNUmakefile (_dummy): Fix whitespace error in prior edit.
116353 2008-08-02  Jim Meyering  <meyering@redhat.com>
116355         getdate.y: avoid locale-dependent date parsing failure
116356         In Turkish locales, getdate would fail to recognize keywords
116357         containing a lowercase "i".  The solution is not to rely on
116358         locale-sensitive case-conversion.
116359         * lib/getdate.y: Include <c-ctype.h> rather than <ctype.h>.
116360         (lookup_word): Use c_toupper in place of toupper.
116361         (yylex, get_date): Use c_ prefixed variants of isspace and isalpha, too.
116362         Reported by Vefa Bicakci <bicave@superonline.com> in
116363         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/14184>.
116364         * modules/getdate (Depends-on): Add c-ctype.
116366 2008-08-02  Bruno Haible  <bruno@clisp.org>
116368         * gnulib-tool (func_import): When updating or creating a .gitignore
116369         file, prepend each added line with a slash, and ignore leading slashes
116370         from the existing lines.
116371         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
116373 2008-08-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
116375         Portability fix for GNU make 3.79.1.
116376         * top/GNUmakefile: Avoid 'else COND', which older GNU make
116377         versions do not understand.
116379 2008-08-01  Bruno Haible  <bruno@clisp.org>
116381         Work around bug of HP-UX 10.20 cc with -0.0 literal.
116382         * tests/test-isnanf.h (zero): New variable.
116383         (main): Avoid literal -0.0f.
116384         * tests/test-isnand.h (zero): New variable.
116385         (main): Avoid literal -0.0.
116386         * tests/test-isnanl.h (zero): New variable.
116387         (main): Avoid literal -0.0L.
116388         * tests/test-isnan.c (zerof, zerod, zerol): New variables.
116389         (test_float, test_double, test_long_double): Avoid literals -0.0f,
116390         -0.0, -0.0L.
116391         * tests/test-signbit.c (test_signbitf): Avoid literal -0.0f.
116392         (test_signbitd): Avoid literal -0.0.
116393         (test_signbitl): Avoid literal -0.0L.
116394         * tests/test-ceilf1.c (zero): New variable.
116395         (main): Avoid literal -0.0f.
116396         * tests/test-ceill.c (zero): New variable.
116397         (main): Avoid literal -0.0L.
116398         * tests/test-floorf1.c (zero): New variable.
116399         (main): Avoid literal -0.0f.
116400         * tests/test-floorl.c (zero): New variable.
116401         (main): Avoid literal -0.0L.
116402         * tests/test-roundf1.c (zero): New variable.
116403         (main): Avoid literal -0.0f.
116404         * tests/test-round1.c (zero): New variable.
116405         (main): Avoid literal -0.0.
116406         * tests/test-roundl.c (zero): New variable.
116407         (main): Avoid literal -0.0L.
116408         * tests/test-truncf1.c (zero): New variable.
116409         (main): Avoid literal -0.0f.
116410         * tests/test-trunc1.c (zero): New variable.
116411         (main): Avoid literal -0.0.
116412         * tests/test-truncl.c (zero): New variable.
116413         (main): Avoid literal -0.0L.
116414         * tests/test-frexp.c (zero): New variable.
116415         (main): Avoid literal -0.0.
116416         * tests/test-frexpl.c (zero): New variable.
116417         (main): Avoid literal -0.0L.
116418         * tests/test-ldexpl.c (zero): New variable.
116419         (main): Avoid literal -0.0L.
116420         * tests/test-snprintf-posix.h (have_minus_zero): Avoid literal -0.0.
116421         (zerod, zerol): New variables.
116422         (test_function): Avoid literals -0.0, -0.0L.
116423         * tests/test-sprintf-posix.h (have_minus_zero): Avoid literal -0.0.
116424         (zerod, zerol): New variables.
116425         (test_function): Avoid literals -0.0, -0.0L.
116426         * tests/test-vasnprintf-posix.c (have_minus_zero): Avoid literal -0.0.
116427         (zerod, zerol): New variables.
116428         (test_function): Avoid literals -0.0, -0.0L.
116429         * tests/test-vasprintf-posix.c (have_minus_zero): Avoid literal -0.0.
116430         (zerod, zerol): New variables.
116431         (test_function): Avoid literals -0.0, -0.0L.
116432         * tests/test-strtod.c (zero): New variable.
116433         (main): Avoid literal -0.0.
116434         Reported by Jonathan C. Patschke <jp@centtech.com>.
116436 2008-07-31  Jim Meyering  <meyering@redhat.com>
116438         sha256.h: correct definition of SHA224_DIGEST_SIZE
116439         * lib/sha256.h (SHA224_DIGEST_SIZE): Define to 28, not 24.
116440         Reported by Paulie Pena IV <paulie4@gmail.com>.
116441         Define as 224 / 8, rather than as a literal.
116442         (SHA256_DIGEST_SIZE): Define as 256/8 rather than equivalent literal.
116443         * lib/sha512.h (SHA384_DIGEST_SIZE): Likewise, define as equiv: 384/8.
116444         (SHA512_DIGEST_SIZE): Likewise, define as equivalent quotient: 512/8.
116446 2008-07-31  Bruno Haible  <bruno@clisp.org>
116448         * lib/regex_internal.h (BITSET_WORD_BITS): Make first conditional work
116449         on HP-UX 10.20 with "cc -Ae". Fix second conditional.
116450         Reported by Jonathan Patschke <jp@centtech.com>.
116452 2008-07-31  Bruno Haible  <bruno@clisp.org>
116454         * gnulib-tool (func_import): Make change from 2008-06-23 more robust.
116455         Reported by Paolo Bonzini <bonzini@gnu.org>.
116457 2008-07-30  Eric Blake  <ebb9@byu.net>
116459         test-strtod: allow compilation without -lm
116460         * tests/test-strtod.c (main): Avoid link dependence on fabs.
116461         Reported by Dennis Clarke <blastwave@gmail.com>.
116463 2008-07-28  Jim Meyering  <meyering@redhat.com>
116465         bootstrap: work also when there are no .po files in po/
116466         * build-aux/bootstrap (update_po_files): Complete the change
116467         that I began in bc960df8c789c878f1c1c54a28a3c2648dead8d9.
116469 2008-07-27  Jim Meyering  <meyering@redhat.com>
116471         * users.txt: Add zile.
116473 2008-07-26  Ben Pfaff  <blp@gnu.org>
116475         Add missing dependencies on new m4/exponent[fdl].m4 files.
116476         * modules/isnanf-nolibm: Add m4/exponentf.m4.
116477         * modules/isnand-nolibm: Add m4/exponentd.m4.
116478         * modules/isnanl-nolibm: Add m4/exponentl.m4.
116479         * modules/signbit-tests: Use m4/exponent[fdl].m4 instead of
116480         m4/isnan[fdl].m4, because the macros actually used moved.
116481         Reported by Jim Meyering.
116483 2008-07-14  Ben Pfaff  <blp@gnu.org>
116485         Add isinf module.
116486         * lib/isinf.c: New file.
116487         * lib/math.in.h: Define isinf macro if we have decided to replace
116488         it.
116489         * m4/isinf.m4: New file.
116490         * m4/math_h.m4: Initialize and substitute variables for isinf
116491         module.
116492         * modules/isinf: New file.
116493         * modules/isinf-tests: New file.
116494         * modules/math: Add substitutions for new module.
116495         * tests/test-isinf.c: New file.
116496         * doc/posix-functions/isinf.texi: Mention new module.
116497         * MODULES.html.sh: Mention new module.
116499 2008-07-14  Ben Pfaff  <blp@gnu.org>
116501         Factor out some macros for use by additional modules.
116502         * m4/isnanf.m4 (gl_FLOAT_EXPONENT_LOCATION): Move into new file
116503         exponentf.m4.
116504         * m4/isnand.m4 (gl_DOUBLE_EXPONENT_LOCATION): Move into new file
116505         exponentd.m4.
116506         * m4/isnanl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Move into new
116507         file exponentl.m4.
116508         * m4/exponentf.m4: New file.
116509         * m4/exponentd.m4: New file.
116510         * m4/exponentl.m4: New file.
116511         * modules/isnanf: Use new file m4/exponentf.m4.
116512         * modules/isnand: Use new file m4/exponentd.m4.
116513         * modules/isnanl: Use new file m4/exponentl.m4.
116515 2008-07-23  Ulrich Drepper  <drepper@redhat.com>
116517         mktime.c: normalize tp->tm_isdst value to -1/0/1.
116518         * lib/mktime.c (__mktime_internal): Normalize tp->tm_isdst value.
116519         Reported by Michael Ringe <Michael.Ringe@gmx.de> in
116520         <http://sourceware.org/bugzilla/show_bug.cgi?id=6723>.
116522         * lib/canonicalize-lgpl.c (__realpath): Avoid buffer overflow after
116523         readlink on platforms without PATH_MAX.
116525 2008-07-21  Eric Blake  <ebb9@byu.net>
116527         Warn, not fail, on stale version.
116528         * top/GNUmakefile (_curr-ver): Tone down previous patch.
116530         Don't allow installation with stale devel version number.
116531         * top/GNUmakefile (_is-install-target): New macro.
116532         (_curr-ver): Forbid installation with stale version number.
116534 2008-07-20  Bruno Haible  <bruno@clisp.org>
116536         * modules/c-stack-tests (Makefile.am): Add LIBSIGSEGV to
116537         TESTS_ENVIRONMENT.
116538         * tests/test-c-stack2.sh: React differently if LIBSIGSEGV is in use.
116540 2008-07-20  Bruno Haible  <bruno@clisp.org>
116542         * lib/c-stack.h (c_stack_action): Add documentation.
116543         * lib/c-stack.c (c_stack_action): Remove incomplete documentation.
116545 2008-07-20  Bruno Haible  <bruno@clisp.org>
116547         * modules/canonicalize-lgpl (License): Relicense under LGPLv2+.
116548         * modules/readlink (License): Likewise.
116550 2008-07-17  Eric Blake  <ebb9@byu.net>
116552         * modules/c-stack (Link): Fix typo.
116554         Make c-stack use libsigsegv, when available.
116555         * modules/c-stack (Depends-on): Add libsigsegv.
116556         * modules/c-stack-tests (Makefile.am): Link with libsigsegv, if
116557         needed.
116558         * lib/c-stack.c (SIGSTKSZ): Define fallback.
116559         (segv_handler, overflow_handler, c_stack_action)
116560         [HAVE_LIBSIGSEGV && !HAVE_XSI_STACK_OVERFLOW_HEURISTIC]: Add new
116561         implementation when libsigsegv is available, but only when using
116562         the library is necessary.
116563         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Add
116564         comment, explaining why XSI check fails on Linux.
116565         (gl_PREREQ_C_STACK): Supply LIBCSTACK, LTLIBCSTACK.
116566         * tests/test-c-stack2.sh: Tweak skip message.
116567         * NEWS: Document new link-time requirements.
116569 2008-07-16  Eric Blake  <ebb9@byu.net>
116571         c-stack: Expose false positives when not using libsigsegv.
116572         * modules/c-stack-tests (Files): Expand test.
116573         * tests/test-c-stack.c (main): Add means to conditionally trigger
116574         non-overflow SIGSEGV.
116575         * tests/test-c-stack2.sh: New file.
116577 2008-07-14  Bruno Haible  <bruno@clisp.org>
116579         * m4/libsigsegv.m4: Remove unneeded AC_PREREQ.
116580         Reported by Eric Blake.
116582 2008-07-14  Sam Steingold  <sds@gnu.org>
116583             Bruno Haible  <bruno@clisp.org>
116585         New module libsigsegv.
116586         * modules/libsigsegv: New file.
116587         * m4/libsigsegv.m4: New file, from GNU clisp sigsegv.m4 with
116588         modifications.
116589         * MODULES.html.sh (Signal handling): New section.
116591 2008-07-14  Bruno Haible  <bruno@clisp.org>
116593         * modules/unictype/ctype-* (Description): Add the word "function".
116594         Improves the resulting doc in MODULES.html.
116596 2008-07-12  Ben Pfaff  <blp@gnu.org>
116598         Add longlong module.
116599         * modules/longlong: New file.
116601 2008-07-12  Bruno Haible  <bruno@clisp.org>
116603         * m4/isnan.m4 (gl_ISNAN): When the replacement is used, set ISNAN_LIBM
116604         to empty.
116606 2008-07-10  Ben Pfaff  <blp@gnu.org>
116608         Add isnan module.
116609         * doc/posix-functions/isnan.texi: Mention new module.
116610         * lib/math.in.h: Define isnan macro if we have decided to replace
116611         it.
116612         * m4/isnan.m4: New file.
116613         * m4/isnanl.m4 (gl_FUNC_ISNANL): Factor out some code into new
116614         macro gl_BUILD_ISNANL so that isnan.m4 can use that functionality
116615         also.
116616         (gl_FUNC_ISNANL_NO_LIBM): Factor out same code, to reduce
116617         redundancy.
116618         * m4/math_h.m4: Initialize and substitute variables for isnan
116619         module.
116620         * modules/isnan: New file.
116621         * modules/isnan-tests: New file.
116622         * modules/math: Add substitutions for new module.
116623         * tests/test-isnan.c: New file.
116624         * MODULES.html.sh: Mention new module.
116626 2008-07-10  Ben Pfaff  <blp@gnu.org>
116628         Add isnanf module.
116629         * lib/isnanf.m4: New file.
116630         * m4/isnanf.m4 (gl_FUNC_ISNANF): New macro.
116631         (gl_HAVE_ISNANF_IN_LIBM): New macro.
116632         (gl_BUILD_ISNANF): New macro used by gl_FUNC_ISNANF,
116633         gl_FUNC_ISNANF_NO_LIBM, and gl_FUNC_ISNAN.
116634         * modules/isnanf: New file.
116635         * modules/isnanf-tests: New file.
116636         * modules/isnanf-nolibm-tests: Add tests/test-isnanf.h to list of
116637         files.
116638         * tests/test-isnanf-nolibm.c: factored most of its contents into
116639         new file tests/test-isnanf.h.
116640         * tests/test-isnanf.h: New file.
116641         * tests/test-isnanf.c: New file.
116642         * MODULES.html.sh: Mention new module.
116643         * doc/glibc-functions/isnanf.texi: Mention new module.
116645 2008-07-10  Ben Pfaff  <blp@gnu.org>
116647         Add isnand module.
116648         * lib/isnand.h: New file.
116649         * m4/isnand.m4 (gl_FUNC_ISNAND): New macro.
116650         (gl_FUNC_ISNAND_NO_LIBM): Split partially into new macro
116651         gl_HAVE_ISNAND_NO_LIBM so that gl_FUNC_ISNAND can use that
116652         functionality also.
116653         (gl_BUILD_ISNAND): New macro used by gl_FUNC_ISNAND,
116654         gl_FUNC_ISNAND_NO_LIBM, and gl_FUNC_ISNAN.
116655         (gl_HAVE_ISNAND_IN_LIBM): New macro.
116656         * modules/isnand: New file.
116657         * modules/isnand-tests: New file.
116658         * modules/isnand-nolibm-tests: Add tests/test-isnand.h to list of
116659         files.
116660         * tests/test-isnand-nolibm.c: factored most of its contents into
116661         new file tests/test-isnand.h.
116662         * tests/test-isnand.h: New file.
116663         * tests/test-isnand.c: New file.
116664         * MODULES.html.sh: Mention new module.
116666 2008-07-10  Ben Pfaff  <blp@gnu.org>
116668         * lib/isnanf.h: Rename lib/isnanf-nolibm.h.
116669         * lib/isnand.h: Rename lib/isnand-nolibm.h.
116670         * tests/test-isnanf.c: Rename tests/test-isnanf-nolibm.c.
116671         * tests/test-isnand.c: Rename tests/test-isnand-nolibm.c.
116672         * modules/isnanf-nolibm: Update references to renamed files.
116673         * modules/isnand-nolibm: Likewise.
116674         * modules/isnanf-nolibm-tests: Likewise.
116675         * modules/isnand-nolibm-tests: Likewise.
116676         * lib/frexp.c: Likewise.
116677         * lib/isfinite.c: Likewise.
116678         * lib/signbitd.c: Likewise.
116679         * lib/signbitf.c: Likewise.
116680         * lib/vasnprintf.c: Likewise.
116681         * tests/test-ceilf1.c: Likewise.
116682         * tests/test-ceilf2.c: Likewise.
116683         * tests/test-floorf1.c: Likewise.
116684         * tests/test-floorf2.c: Likewise.
116685         * tests/test-frexp.c: Likewise.
116686         * tests/test-round1.c: Likewise.
116687         * tests/test-round2.c: Likewise.
116688         * tests/test-roundf1.c: Likewise.
116689         * tests/test-strtod.c: Likewise.
116690         * tests/test-trunc1.c: Likewise.
116691         * tests/test-trunc2.c: Likewise.
116692         * tests/test-truncf1.c: Likewise.
116693         * tests/test-truncf2.c: Likewise.
116694         * NEWS: Mention the renamed header files.
116696 2008-07-11  Jim Meyering  <meyering@redhat.com>
116698         vc-list-files: make the last-resort awk code more portable
116699         * build-aux/vc-list-files: Don't rely on awk's "sub" command.
116700         /bin/awk from OpenSolaris 11's SUNWesu version 2008.03.22.10.56
116701         does not support it.
116703 2008-07-10  Eric Blake  <ebb9@byu.net>
116705         Work with tar's bootstrap.
116706         * gnulib-tool (func_emit_initmacro_end): Use m4_defn in the case
116707         where LIBSOURCES_DIR contains .#bootmp but must not be treated as
116708         an m4 comment.
116710 2008-07-09  Jim Meyering  <meyering@redhat.com>
116712         posix-shell.m4: fix typo that made this test malfunction
116713         * m4/posix-shell.m4: Remove capitalization in variable name.
116715 2008-07-08  Bruno Haible  <bruno@clisp.org>
116717         * m4/onceonly.m4: Update comments.
116718         Reported by Ben Pfaff <blp@cs.stanford.edu>.
116720 2008-07-04  Jim Meyering  <meyering@redhat.com>
116722         * users.txt: Add vc-dwim.
116723         (bison, coreutils): Use the gitweb URL.
116725 2008-07-03  Jim Meyering  <meyering@redhat.com>
116727         * users.txt: Add libffcall.  From Sam Steingold.
116729 2008-07-03  Ondřej Vašík  <ovasik@redhat.com>
116731         getdate.y: do not ignore TZ with relative day, month or year offset
116732         * lib/getdate.y (get_date): Move the tz-handling block to follow the
116733         relative-date-handling, since otherwise, the latter would clobber the
116734         sole output (an updated Start value) of the tz-handling block.
116735         * tests/test-getdate.c: Tests for the fix
116737 2008-07-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
116739         Recognize 'foo_LIBRARIES += libgnu.a'.
116740         * gnulib-tool (func_emit_lib_Makefile_am): Recognize if a
116741         makefile snippet has already specified an installation location,
116742         also using '+='.
116744 2008-07-02  Ondřej Vašík  <ovasik@redhat.com>
116746         getdate.y: factor out common actions
116747         * lib/getdate.y (apply_relative_time, set_hhmmss): New functions.
116748         Use them in place of open-coded actions.
116750 2008-07-01  Simon Josefsson  <simon@josefsson.org>
116752         Add self-test for getdate module.
116753         * modules/getdate-tests: New file.
116754         * tests/test-getdate.c: New file.
116756 2008-06-29  Bruno Haible  <bruno@clisp.org>
116758         * gnulib-tool (func_import): Put gnulib-comp.m4 into .cvsignore or
116759         .gitignore.
116760         Reported by Sylvain Beucler <beuc@beuc.net>.
116762 2008-06-29  Bruno Haible  <bruno@clisp.org>
116764         * doc/gnulib-tool.texi (VCS Issues): Mention --no-vc-files option.
116765         * m4/gnulib-tool.m4: Update to match current gnulib-tool.
116767 2008-06-29  Bruno Haible  <bruno@clisp.org>
116769         * gnulib-tool (func_import): Recommend to put gnulib-cache.m4 into
116770         EXTRA_DIST.
116771         Reported by Sylvain Beucler <beuc@beuc.net>.
116773 2008-06-26  Jim Meyering  <meyering@redhat.com>
116775         make several modules depend on the "open" module
116776         This provides slightly increased consistency when opening-for-write
116777         the name of a non-directory spelled with a trailing slash.
116778         * modules/chdir-safer: Likewise.
116779         * modules/chown: Likewise.
116780         * modules/clean-temp: Likewise.
116781         * modules/copy-file: Likewise.
116782         * modules/fchdir: Likewise.
116783         * modules/fcntl-safer: Likewise.
116784         * modules/pipe: Likewise.
116785         * modules/utime: Likewise.
116786         Prompted by Eric Blake and Bruno Haible.
116788 2008-06-24  Andreas Schwab  <schwab@suse.de>
116790         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Don't test whether compound
116791         literals can be used as initializers for global variables.
116793 2008-06-23  Eric Blake  <ebb9@byu.net>
116795         Make gnulib-cache.m4 easier to diff.
116796         * gnulib-tool (func_import): Allow newlines when reading cached
116797         gl_MODULES, and generate newlines when creating gnulib-cache.m4.
116799 2008-06-23  Bruno Haible  <bruno@clisp.org>
116801         * m4/signalblocking.m4 (gl_PREREQ_SIG_HANDLER_H): Remove macro.
116802         (gl_PREREQ_SIGPROCMASK): Don't invoke it.
116803         * m4/sigaction.m4 (gl_PREREQ_SIG_HANDLER_H): New macro, moved here from
116804         m4/signalblocking.m4.
116805         (gl_PREREQ_SIGACTION): Don't invoke it.
116806         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Invoke
116807         gl_PREREQ_SIG_HANDLER_H.
116808         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Likewise.
116809         Don't check for sigaction here.
116811 2008-06-23  Bruno Haible  <bruno@clisp.org>
116813         * lib/fatal-signal.c (fatal_signal_handler): Update comment.
116814         (install_handlers): Don't set the SA_RESETHAND flag.
116816 2008-06-23  Bruno Haible  <bruno@clisp.org>
116818         * m4/sigaction.m4: Comment fixes.
116819         * lib/signal.in.h: Likewise.
116821 2008-06-23  Eric Blake  <ebb9@byu.net>
116823         Fix typo.
116824         * tests/test-sigaction.c (MASK_SA_FLAGS): Add missing operator.
116826         Avoid SA_ namespace.
116827         * tests/test-sigaction.c (MASK_SA_FLAGS): Rename from SA_MASK.
116828         Reported by Ralf Wildenhues.
116830         Avoid test failure due to SA_RESTORER.
116831         * tests/test-sigaction.c (SA_MASK): New macro.
116832         (main): Avoid failing due to extension flags being set.
116833         Reported by Jim Meyering.
116835         Revert use of sig-handler.h in sigprocmask.c.
116836         * modules/sigprocmask (Files): Don't rely on sig-handler.h, since
116837         it requires the existence of struct sigaction.
116838         * lib/sigprocmask.c (handler_t): Restore typedef.
116839         (rpl_signal, old_handlers): Use local type.
116841 2008-06-22  Bruno Haible  <bruno@clisp.org>
116843         * tests/test-stdint.c: Disable the INTMAX_MAX preprocessor test
116844         conditionally.
116845         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
116847 2008-06-22  Bruno Haible  <bruno@clisp.org>
116849         * doc/posix-functions/siginterrupt.texi: Move note.
116851         * lib/signal.in.h (SA_RESTART): New macro.
116852         * lib/sigaction.c: Update comment.
116854         * m4/sigaction.m4 (gl_SIGACTION): Require gl_SIGNAL_H_DEFAULTS.
116856         * m4/signalblocking.m4 (gl_PREREQ_SIG_HANDLER_H): New macro.
116857         (gl_PREREQ_SIGPROCMASK): Invoke it.
116858         * m4/sigaction.m4 (gl_PREREQ_SIGACTION): Likewise.
116860         * lib/nanosleep.c (rpl_nanosleep): Setup newact only when it is needed.
116862         * lib/sigprocmask.c: Update a comment.
116864 2008-06-21  Eric Blake  <ebb9@byu.net>
116866         Use sigaction module rather than signal().
116867         * modules/c-stack (Depends-on): Add sigaction.
116868         * modules/fatal-signal (Depends-on): Likewise.
116869         * modules/nanosleep (Depends-on): Likewise.
116870         * modules/sigprocmask (Files): Add sig-handler.h.
116871         * modules/sigaction (Files): Likewise.
116872         * lib/sig-handler.h (get_handler): New file, suggested by Paul
116873         Eggert.
116874         * lib/c-stack.c (SIGACTION_WORKS): Simplify conditions.
116875         (c_stack_action) [!SIGACTION_WORKS]: Use sigaction, not signal.
116876         * lib/fatal-signal.c (uninstall_handlers, install_handlers)
116877         (init_fatal_signals): Likewise.
116878         * lib/nanosleep.c (rpl_nanosleep): Likewise.
116879         (siginterrupt): Delete fallback.
116880         * lib/sigprocmask.c (handler_t, old_handlers): Use sa_handler_t
116881         instead.
116882         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Drop check for
116883         siginterrupt.
116885         New module sigaction, for mingw.
116886         * modules/sigaction: New module...
116887         * modules/sigaction-tests: ...and its test.
116888         * m4/sigaction.m4: New file.
116889         * lib/sigaction.c: Likewise.
116890         * tests/test-sigaction.c: Likewise.
116891         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Add sigaction variables.
116892         * modules/signal (Makefile.am): Likewise.
116893         * lib/signal.in.h (!@HAVE_SIGACTION@): Define replacements when
116894         needed.
116895         * doc/posix-headers/signal.texi (signal.h): Mention provided
116896         types.
116897         * doc/posix-functions/siginterrupt.texi (siginterrupt): Mention
116898         that sigaction is preferable.
116899         * doc/posix-functions/sigaction.texi (sigaction): Mention new
116900         module.
116901         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
116902         sigaction.
116904         Improve robustness of sigprocmask by overriding signal.
116905         * lib/signal.in.h (rpl_signal): Override signal when sigprocmask
116906         is in use.
116907         * lib/sigprocmask.c (blocked_handler): Reinstall block handler.
116908         (SIGKILL, SIGSTOP): Provide fallbacks.
116909         (rpl_signal): Implement.
116910         (old_handlers, blocked_set): Mark volatile, since sigprocmask and
116911         signal can be called inside handlers.
116913         Fix nanosleep module on mingw.
116914         * modules/nanosleep (Depends-on): Add sys_select.
116915         * lib/nanosleep.c (HAVE_SYS_SELECT_H): Rely on gnulib module.
116917         Fix licensing of sigprocmask.
116918         * modules/raise (License): Relicense as LGPL.
116920 2008-06-21  Bruno Haible  <bruno@clisp.org>
116922         * lib/propername.c (proper_name_utf8): Don't use the transliterated
116923         result if it contains question marks.
116924         Reported by Michael Geng <linux@michaelgeng.de>.
116926 2008-06-19  Bruno Haible  <bruno@clisp.org>
116928         Fix CVS-ism.
116929         * doc/gnulib.texi: Include updated-stamp.texi.
116930         * doc/Makefile (GNULIB_TEXI_FILES): New variable.
116931         (updated-stamp.texi): New rule.
116932         (gnulib.info): Depend on it.
116933         * doc/.gitignore: Add updated-stamp.texi.
116934         Based on a patch by Thien-Thi Nguyen <ttn@gnuvola.org>.
116936 2008-06-19  Bruno Haible  <bruno@clisp.org>
116938         * doc/Makefile (gnulib.info): Update and simplify dependencies.
116939         Reported by Thien-Thi Nguyen <ttn@gnuvola.org>.
116941 2008-06-19  Eric Blake  <ebb9@byu.net>
116943         Fix VPATH 'make dist' with GNU make and non-VCS tarball.
116944         * top/GNUmakefile (_curr-ver): Don't use $(srcdir) unnecessarily.
116945         Reported by Stepan Kasal.
116947 2008-06-18  Bruno Haible  <bruno@clisp.org>
116949         * lib/fatal-signal.c (init_fatal_signals): Add comment.
116950         Reported by Eric Blake.
116952 2008-06-18  Eric Blake  <ebb9@byu.net>
116954         Work around cygwin 1.5.25 strsignal bug.
116955         * tests/test-strsignal.c: Allow for const char *.
116956         * doc/glibc-functions/strsignal.texi (strsignal): Document the bug.
116958 2008-06-18  Simon Josefsson  <simon@josefsson.org>
116960         * users.txt: Update URL to article and add author/date
116961         information.
116963 2008-06-17  Bruno Haible  <bruno@clisp.org>
116965         New macro gl_DISABLE_THREADS.
116966         * m4/lock.m4 (gl_LOCK_EARLY_BODY): Use value gl_use_threads_default
116967         if the user did not pass --enable-threads or --disable-threads option.
116968         (gl_DISABLE_THREADS): New macro.
116969         Reported by Eric Blake <ebb9@byu.net>.
116971 2008-06-17  Bruno Haible  <bruno@clisp.org>
116973         * lib/tls.h (gl_tls_key_init): Evaluate the destructor argument also
116974         when the macro ignores it.
116975         Based on a patch by Eric Blake <ebb9@byu.net>.
116977 2008-06-17  Bruno Haible  <bruno@clisp.org>
116979         * modules/tls (License): Change to LGPLv2+.
116980         Reported by Eric Blake.
116982 2008-06-17  Eric Blake  <ebb9@byu.net>
116984         Simplify c-stack prerequisites.
116985         * lib/c-stack.c (includes): Remove unused <sys/resource.h>.
116986         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Posix 200x
116987         no longer requires <ucontext.h> to exist.  Optimize setrlimit
116988         check.
116989         (gl_PREREQ_C_STACK): Remove check for unused getcontext and
116990         <sys/resource.h>.
116992         Move c-stack test into testsuite.
116993         * modules/c-stack-tests: New file.
116994         * lib/c-stack.c [DEBUG]: Move test program...
116995         * tests/test-c-stack.c: ...into this new file.  Skip rather than
116996         fail test if sigaltstack is lacking.
116997         * tests/test-c-stack.sh: New driver file.
116999 2008-06-16  Eric Blake  <ebb9@byu.net>
117001         Use raise module consistently.
117002         * modules/fatal-signal (Depends-on): Add raise.
117003         * modules/sigprocmask (Depends-on): Likewise.
117004         * lib/fatal-signal.c (fatal_signal_handler): Rely on raise.
117005         * lib/sigprocmask.c (sigprocmask): Likewise.
117006         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Likewise.
117007         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Likewise.
117009         Fix compliance bug in sigpending.
117010         * lib/sigprocmask.c (sigpending): Return pending array via
117011         parameter, not return value.
117013 2008-06-14  Eric Blake  <ebb9@byu.net>
117015         Improve obstack-printf test code.
117016         * tests/test-obstack-printf.c (test_function): Fix comment, and
117017         simplify usage of obstack_* in macros.  Add a test for coverage.
117018         Reported by Bruno Haible.
117020 2008-06-14  Bruno Haible  <bruno@clisp.org>
117022         * lib/obstack_printf.c (obstack_vprintf): Define the stack-allocated
117023         array size as a constant, not as a const variable.
117024         * m4/obstack-printf.m4 (gl_FUNC_OBSTACK_PRINTF): Require
117025         AC_USE_SYSTEM_EXTENSIONS.
117026         * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_POSIX): Likewise.
117027         Test whether the obstack_printf function actually exists.
117028         * modules/obstack-printf (Depends-on): Add extensions.
117029         (Include): Remove obstack.h.
117030         * modules/obstack-printf-posix (Depends-on): Add extensions.
117031         (Include): Remove obstack.h.
117033 2008-06-13  Eric Blake  <ebb9@byu.net>
117035         Add obstack-printf and obstack-printf-posix modules.
117036         * modules/obstack-printf: New file.
117037         * modules/obstack-printf-posix: Likewise.
117038         * MODULES.html.sh (Misc): Mention them.
117039         * doc/glibc-functions/obstack_printf.texi (obstack_printf):
117040         Likewise.
117041         * doc/glibc-functions/obstack_vprintf.texi (obstack_vprintf):
117042         Likewise.
117043         * modules/stdio (Makefile.am): Accomodate new modules.
117044         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
117045         * lib/stdio.in.h (rpl_obstack_printf, rpl_obstack_vprintf):
117046         Declare.
117047         * lib/obstack_printf.c (obstack_printf, obstack_vprintf): New
117048         functions.
117049         * m4/obstack-printf.m4 (gl_OBSTACK_PRINTF)
117050         (gl_REPLACE_OBSTACK_PRINTF): New macros
117051         * m4/obstack-printf-posix.m4 (gl_OBSTACK_PRINTF_POSIX): Likewise.
117052         * tests/test-obstack-printf.c: New file.
117053         * modules/obstack-printf-tests: Likewise.
117054         * modules/obstack-printf-posix-tests: Likewise.
117056 2008-06-11  Bruno Haible  <bruno@clisp.org>
117058         * m4/open.m4 (gl_FUNC_OPEN): Add test against trailing slash bug.
117059         * lib/open.c: Include errno.h.
117060         (open): Fail when attempting to write to a file that has a trailing
117061         slash.
117062         * tests/test-open.c (main): Test against trailing slash bug.
117063         * doc/posix-functions/open.texi: Mention the trailing slash bug.
117065 2008-06-10  Bruno Haible  <bruno@clisp.org>
117067         * tests/test-vc-list-files-git.sh: Make double use of 'exit'. Needed
117068         for $? to work inside the trap command, with various /bin/sh-s.
117069         * tests/test-vc-list-files-cvs.sh: Likewise.
117071 2008-06-10  Bruno Haible  <bruno@clisp.org>
117073         * lib/acl-internal.h: Don't include gettext.h here.
117074         * lib/set-mode-acl.c: Include gettext.h here.
117075         * lib/copy-acl.c: Likewise.
117077 2008-06-10  Bruno Haible  <bruno@clisp.org>
117079         * lib/wait-process.h (wait_subprocess): Add termsigp argument.
117080         * lib/wait-process.c (wait_subprocess): Likewise.
117081         * lib/execute.h (execute): Add termsigp argument.
117082         * lib/execute.c (execute): Likewise.
117083         * lib/csharpcomp.c (compile_csharp_using_pnet,
117084         compile_csharp_using_mono, compile_csharp_using_sscli): Update.
117085         * lib/csharpexec.c (execute_csharp_using_pnet,
117086         execute_csharp_using_mono, execute_csharp_using_sscli): Update.
117087         * lib/javacomp.c (compile_using_envjavac, compile_using_gcj,
117088         compile_using_javac, compile_using_jikes, is_envjavac_gcj,
117089         is_envjavac_gcj43, is_gcj_present, is_gcj_43, is_javac_present,
117090         is_jikes_present): Update.
117091         * lib/javaexec.c (execute_java_class): Update.
117092         * lib/javaversion.c (execute_and_read_line): Update.
117093         * NEWS: Document the changes.
117094         Reported by Eric Blake.
117096 2008-06-10  Eric Blake  <ebb9@byu.net>
117098         Add missing include.
117099         * tests/test-strstr.c (includes): Add <signal.h>.
117100         * tests/test-strcasestr.c (includes): Likewise.
117101         * tests/test-memmem.c (includes): Likewise.
117103 2008-06-10  Bruno Haible  <bruno@clisp.org>
117105         * lib/wait-process.c (wait_subprocess): Add an assertion.
117107 2008-06-10  Bruno Haible  <bruno@clisp.org>
117109         * lib/wait-process.c (wait_subprocess): Try to fix waitid() based code.
117111 2008-06-10  Bruno Haible  <bruno@clisp.org>
117113         * tests/test-memmem.c (main): Reset SIGALRM to default handling before
117114         using alarm().
117115         * tests/test-strcasestr.c (main): Likewise.
117116         * tests/test-strstr.c (main): Likewise.
117118 2008-06-09  Bruno Haible  <bruno@clisp.org>
117120         Work around the Solaris 10 ACE ACLs ABI change.
117121         * lib/acl-internal.h (acl_nontrivial, acl_ace_nontrivial): Don't
117122         declare if ACL_NO_TRIVIAL is present.
117123         (ACE_ACCESS_ALLOWED_ACE_TYPE, ACE_ACCESS_DENIED_ACE_TYPE,
117124         NEW_ACE_OWNER, NEW_ACE_GROUP, NEW_ACE_IDENTIFIER_GROUP, ACE_EVERYONE,
117125         NEW_ACE_READ_DATA, NEW_ACE_WRITE_DATA, NEW_ACE_EXECUTE): New macros.
117126         * lib/file-has-acl.c (acl_nontrivial, acl_ace_nontrivial): Don't
117127         define if ACL_NO_TRIVIAL is present.
117128         (acl_ace_nontrivial): Detect whether the old or new ABI is in use,
117129         and use the current ABI.
117130         (file_has_acl): Use same #if condition as elsewhere.
117131         * lib/set-mode-acl.c (qset_acl): Detect whether the old or new ABI is
117132         in use, and use the current ABI.
117133         * doc/acl-resources.txt: More doc about newer Solaris 10 versions.
117134         Reported by Jim Meyering.
117136 2008-06-09  Eric Blake  <ebb9@byu.net>
117138         Work around environments that (stupidly) ignore SIGALRM.
117139         * m4/strstr.m4 (gl_FUNC_STRSTR): Reset SIGALRM to default handling
117140         before using alarm().
117141         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
117142         * m4/memmem.m4 (gl_FUNC_MEMMEM): Likewise.
117143         Reported by Ian Beckwith <ianb@erislabs.net>.
117145         Produce autobuild blurb earlier in log.
117146         * modules/autobuild (configure.ac-early): Move AB_INIT here.
117148 2008-06-09  Jim Meyering  <meyering@redhat.com>
117149         and Ondřej Vašík  <ovasik@redhat.com>
117151         utimens.c: correct kernel bug work-around
117152         Ondřej Vašík found that the invalid return value of 280 indicates
117153         failure, not success, and the kernel bug we're trying to work
117154         around affects not just the utimensat call, but also the fallback
117155         futimens call.
117156         * lib/utimens.c (gl_futimens) [HAVE_UTIMENSAT]: Simulate failure,
117157         not success.
117158         [HAVE_FUTIMENS]: Use the same work-around, here.
117160 2008-06-09  Jim Meyering  <meyering@redhat.com>
117162         add more guards around definition of ACE_-related code
117163         * lib/file-has-acl.c (acl_ace_nontrivial): Define only if
117164         ALLOW and ACE_OWNER are also defined.
117166 2008-06-08  Bruno Haible  <bruno@clisp.org>
117168         * lib/acl-internal.h: Add me as co-author.
117169         * lib/file-has-acl.c: Likewise.
117170         * lib/set-mode-acl.c: Likewise.
117171         * lib/copy-acl.c: Likewise.
117173 2008-06-08  Bruno Haible  <bruno@clisp.org>
117175         Add support for AIX ACLs.
117176         * lib/acl-internal.h (acl_nontrivial): New declaration.
117177         * lib/file-has-acl.c (acl_nontrivial): New function.
117178         (file_has_acl): Add implementation using AIX 4 ACL API.
117179         * lib/set-mode-acl.c (qset_acl): Likewise.
117180         * lib/copy-acl.c (qcopy_acl): Likewise.
117182 2008-06-08  Bruno Haible  <bruno@clisp.org>
117184         Add support for HP-UX ACLs.
117185         * lib/acl-internal.h (acl_nontrivial): New declaration.
117186         * lib/file-has-acl.c (acl_nontrivial): New function.
117187         (file_has_acl): Add implementation using HP-UX 11 ACL API.
117188         * lib/set-mode-acl.c (qset_acl): Likewise.
117189         * lib/copy-acl.c (qcopy_acl): Likewise.
117191 2008-06-08  Bruno Haible  <bruno@clisp.org>
117193         Add support for Cygwin ACLs.
117194         * lib/acl-internal.h (MODE_INSIDE_ACL): New macro for Solaris-like API.
117195         * lib/set-mode-acl.c (qset_acl) [!MODE_INSIDE_ACL]: Don't optimize away
117196         the chmod_or_fchmod call.
117197         * lib/copy-acl.c (qcopy_acl) [!MODE_INSIDE_ACL]: Likewise.
117199 2008-06-08  Bruno Haible  <bruno@clisp.org>
117201         Fix bug with setuid modes in Solaris 10+ code.
117202         * lib/set-mode-acl.c (qset_acl): Call chmod_or_fchmod when acl_set
117203         succeeded, when the mode contains some special bits.
117205 2008-06-08  Bruno Haible  <bruno@clisp.org>
117207         Add support for Solaris 7..10 ACLs.
117208         * lib/acl-internal.h (acl_nontrivial, acl_ace_nontrivial): New
117209         declarations.
117210         * lib/file-has-acl.c (acl_nontrivial, acl_ace_nontrivial): New
117211         functions.
117212         (file_has_acl): Add implementation using Solaris 7..10 ACL API.
117213         * lib/set-mode-acl.c (qset_acl): Likewise.
117214         * lib/copy-acl.c (qcopy_acl): Likewise.
117216 2008-06-08  Bruno Haible  <bruno@clisp.org>
117218         * lib/acl-internal.h (acl_extended_nontrivial) [MacOS X]: New
117219         declaration.
117220         * lib/file-has-acl.c (acl_extended_nontrivial) [MacOS X]: New function.
117221         (acl_access_nontrivial): Remove MacOS X case.
117222         (file_has_acl): Use acl_extended_nontrivial.
117223         * lib/copy-acl.c (qcopy_acl): Likewise.
117225 2008-06-08  Bruno Haible  <bruno@clisp.org>
117227         * lib/set-mode-acl.c (qset_acl): Trivial code simplifications.
117229 2008-06-08  Jim Meyering  <meyering@redhat.com>
117231         * modules/acl (Maintainer): Add Bruno Haible.
117233 2008-06-07  Bruno Haible  <bruno@clisp.org>
117235         Improve support for Tru64 ACLs.
117236         * lib/file-has-acl.c (file_has_acl): Don't test the ACL_TYPE_DEFAULT
117237         ACL on OSF/1.
117239 2008-06-07  Bruno Haible  <bruno@clisp.org>
117241         Add support for MacOS X ACLs.
117242         * lib/file-has-acl.c (file_has_acl): Use ACL_TYPE_EXTENDED instead of
117243         ACL_TYPE_ACCESS and ACL_TYPE_DEFAULT.
117244         * lib/set-mode-acl.c (qset_acl): Likewise.
117245         * lib/copy-acl.c (qcopy_acl): Likewise.
117247 2008-06-07  Bruno Haible  <bruno@clisp.org>
117249         Fix memory leak introduced on 2008-05-22.
117250         * lib/set-mode-acl.c (qset_acl) [!MODE_INSIDE_ACL]: Free ACLs after
117251         use.
117253 2008-06-07  Bruno Haible  <bruno@clisp.org>
117255         * lib/set-mode-acl.c (qset_acl): Use acl_init(), not acl_from_text(),
117256         to construct an empty ACL.
117258 2008-06-07  Bruno Haible  <bruno@clisp.org>
117260         * lib/set-mode-acl.c (chmod_or_fchmod): Document return value
117261         precisely.
117262         * lib/copy-acl.c (qcopy_acl): Trivial code simplifications.
117264 2008-06-07  Bruno Haible  <bruno@clisp.org>
117266         * lib/copy-acl.c (qcopy_acl): Make the #if branches independent.
117267         * lib/set-mode-acl.c (qset_acl): Choose better local variable names.
117269 2008-06-07  Bruno Haible  <bruno@clisp.org>
117271         * doc/posix-functions/_setjmp.texi: Explain the use of this function
117272         regardless of POSIX.
117273         * doc/posix-functions/_longjmp.texi: Likewise.
117274         * doc/posix-functions/setjmp.texi: Mention HP-UX as not counting as a
117275         SystemV platform in this case.
117277 2008-06-06  Eric Blake  <ebb9@byu.net>
117279         Document abort() bugs.
117280         * doc/posix-functions/abort.texi (abort): Mention anomalies.
117282         * doc/posix-functions/setjmp.texi (setjmp): Mingw has setjmp.
117283         * doc/posix-functions/sigsetjmp.texi (sigsetjmp): Cygwin has
117284         sigsetjmp.
117285         * doc/posix-functions/siglongjmp.texi (siglongjmp): Cygwin has
117286         siglongjmp, but only as a macro.
117287         * doc/posix-functions/_longjmp.texi (_longjmp): Mention that this
117288         is obsolete.
117289         * doc/posix-functions/_setjmp.texi (_setjmp): Likewise.
117291         Tweak documentation to cover cygwin argz bugs.
117292         * m4/argz.m4 (gl_FUNC_ARGZ): Mention date of last known cygwin
117293         argz bug fix; no code change needed since no cygwin releases
117294         occurred between the last fix and the bug being tested.
117295         * doc/glibc-functions/argz_add.texi (argz_add): Document the argz
117296         module and recently fixed cygwin bugs.
117297         * doc/glibc-functions/argz_add_sep.texi (argz_add_sep): Likewise.
117298         * doc/glibc-functions/argz_append.texi (argz_append): Likewise.
117299         * doc/glibc-functions/argz_count.texi (argz_count): Likewise.
117300         * doc/glibc-functions/argz_create.texi (argz_create): Likewise.
117301         * doc/glibc-functions/argz_create_sep.texi (argz_create_sep):
117302         Likewise.
117303         * doc/glibc-functions/argz_delete.texi (argz_delete): Likewise.
117304         * doc/glibc-functions/argz_extract.texi (argz_extract): Likewise.
117305         * doc/glibc-functions/argz_insert.texi (argz_insert): Likewise.
117306         * doc/glibc-functions/argz_next.texi (argz_next): Likewise.
117307         * doc/glibc-functions/argz_replace.texi (argz_replace): Likewise.
117308         * doc/glibc-functions/argz_stringify.texi (argz_stringify):
117309         Likewise.
117311         Avoid gcc warning on cygwin.
117312         * lib/copy-acl.c (qcopy_acl) [!HAVE_ACL_GET_FILE &&
117313         !ACL_NO_TRIVIAL]: Avoid unused variable.
117315 2008-06-05  Eric Blake  <ebb9@byu.net>
117317         Be tolerant of UNKNOWN version in gnulib-tool test dir.
117318         * top/GNUmakefile (_dummy): Warn rather than reconfigure if
117319         git-version-gen fails to come up with a version.
117320         Reported by Simon Josefsson.
117322 2008-06-05  Jim Meyering  <meyering@redhat.com>
117323             Paul Eggert  <eggert@cs.ucla.edu>
117325         utimens.c: work around a probable Linux kernel bug
117326         * lib/utimens.c (gl_futimens) [HAVE_UTIMENSAT]: Work around what
117327         appears to be a kernel bug that causes utimensat to return 280
117328         instead of 0, indicating success.
117330 2008-06-04  Bruno Haible  <bruno@clisp.org>
117332         * lib/copy-acl.c (qcopy_acl): Call qset_acl, not set_acl. Fixes
117333         2008-06-01 commit.
117335 2008-06-04  Bruno Haible  <bruno@clisp.org>
117337         * lib/acl-internal.h (acl_access_nontrivial): New declaration.
117338         * lib/file-has-acl.c (acl_access_nontrivial): New function.
117339         (file_has_acl): Use it. Save errno afterwards.
117340         * lib/copy-acl.c (qcopy_acl): Use acl_access_nontrivial.
117342 2008-06-03  Bruno Haible  <bruno@clisp.org>
117344         * lib/file-has-acl.c (file_has_acl): Put Solaris 10 code after POSIX-
117345         draft code. Simplify #ifs.
117346         * lib/set-mode-acl.c (qset_acl): Don't test for symlink if !USE_ACL.
117347         Put Solaris code after POSIX-draft code. Fix comments regarding
117348         Solaris 10, HP-UX. Mention Cygwin.
117349         * lib/copy-acl.c (qcopy_acl): Simplify #ifs.
117351 2008-06-03  Eric Blake  <ebb9@byu.net>
117353         Provide fallback for older kernels.
117354         * lib/utimens.c (gl_futimens) [HAVE_UTIMENSAT, HAVE_FUTIMENS]:
117355         Provide runtime fallback if kernel lacks support.
117356         Reported by Mike Frysinger.
117358 2008-06-02  Bruno Haible  <bruno@clisp.org>
117360         * lib/acl-internal.h (ACL_NOT_WELL_SUPPORTED): Include EOPNOTSUPP if
117361         it exists.
117363 2008-06-02  Bruno Haible  <bruno@clisp.org>
117365         * lib/acl_entries.c (acl_entries): Rewrite to use acl_get_entry.
117366         * lib/copy-acl.c (qcopy_acl): Update comment.
117368 2008-06-02  Bruno Haible  <bruno@clisp.org>
117370         * lib/acl-entries.h: Enclose most definitions in #ifs for POSIX-draft
117371         like ACL APIs.
117373 2008-06-02  Bruno Haible  <bruno@clisp.org>
117375         * tests/test-file-has-acl.sh: Use different code for Cygwin.
117376         * tests/test-set-mode-acl.sh: Likewise.
117377         * tests/test-copy-acl.sh: Likewise.
117378         * tests/test-copy-file.sh: Likewise.
117380 2008-06-02  Bruno Haible  <bruno@clisp.org>
117382         * tests/test-file-has-acl.sh: Remove unused code.
117384 2008-06-01  Bruno Haible  <bruno@clisp.org>
117386         * lib/copy-acl.c (qcopy_acl): New function, extracted from copy_acl.
117387         (copy_acl): Just a wrapper around qcopy_acl that emits the error
117388         messages.
117389         * lib/set-mode-acl.c (qset_acl): Document return value precisely.
117391 2008-06-01  Bruno Haible  <bruno@clisp.org>
117393         * m4/acl.m4 (gl_FUNC_ACL): Separate the POSIX-like and the Solaris
117394         tests. Test for libpacl, needed for OSF/1. Test for extended ACLs,
117395         needed for MacOS X. Test for HP-UX API. Test for newer and older AIX
117396         APIs.
117397         * modules/acl-tests (configure.ac): Remove tests now contained in
117398         m4/acl.m4.
117400 2008-06-02  Jim Meyering  <meyering@redhat.com>
117402         announce-gen: use a better key-server host name
117403         * build-aux/announce-gen (main): Recommend keys.gnupg.net, since
117404         it may be more consistently reliable.  Suggested by Werner Koch
117405         in <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/13717>.
117407 2008-06-01  Bruno Haible  <bruno@clisp.org>
117409         * lib/stdio-impl.h (fp_ub): Use fp_. Needed for DragonFly BSD.
117410         Reported by Voroskoi Andras <voroskoi@gmail.com>.
117412 2008-06-01  Voroskoi Andras  <voroskoi@gmail.com>  (tiny change)
117414         * lib/stdio-impl.h [__DragonFly__]: Fix typo.
117416 2008-06-01  Bruno Haible  <bruno@clisp.org>
117418         New ACL tests.
117419         * tests/test-file-has-acl.sh: New file.
117420         * tests/test-file-has-acl.c: New file.
117421         * tests/test-set-mode-acl.sh: New file.
117422         * tests/test-set-mode-acl.c: New file.
117423         * tests/test-copy-acl.sh: New file, based on tests/test-copy-file.sh.
117424         * tests/test-copy-acl.c: New file.
117425         * modules/acl-tests: New file, based on modules/copy-file-tests.
117426         * modules/copy-file-tests (Files): Remove tests/test-sameacls.c.
117427         (Depends-on): Add acl-tests.
117428         (configure.ac): Remove checks.
117429         (Makefile.am): Don't create test-sameacls program here any more.
117431 2008-06-01  Bruno Haible  <bruno@clisp.org>
117433         * tests/test-copy-file.sh: Portability fixes for Solaris, HP-UX, IRIX.
117434         * tests/test-sameacls.c: Include progname.h.
117435         (main): Invoke set_program_name. Portability fixes for MacOS X,
117436         Solaris, HP-UX.
117438 2008-06-01  Bruno Haible  <bruno@clisp.org>
117440         * lib/freadahead.c (freadahead) [__DragonFly__]: Use the __sreadahead
117441         function.
117442         Reported by VOROSKOI Andras <voroskoi@gmail.com>.
117444 2008-06-01  Bruno Haible  <bruno@clisp.org>
117446         * modules/rpmatch (Depends-on): Add strdup.
117448 2008-06-01  Bruno Haible  <bruno@clisp.org>
117450         * lib/pipe.c: Include unistd-safer.h.
117451         (create_pipe): Ensure the returned file descriptors are not in {0,1,2}.
117452         * modules/pipe (Depends-on): Add unistd-safer.
117454 2008-05-30  Simon Josefsson  <simon@josefsson.org>
117456         * modules/autobuild (configure.ac): Call AB_INIT.
117458 2008-05-30  Simon Josefsson  <simon@josefsson.org>
117460         * tests/test-getaddrinfo.c: Don't print debug messages by default.
117461         Suggested by Bruno Haible <bruno@clisp.org>.
117463 2008-05-30  Simon Josefsson  <simon@josefsson.org>
117465         * tests/test-base64.c: Cast size_t to unsigned long when invoking
117466         printf.  Use %lu instead of %d.  Reported by Bruno Haible
117467         <bruno@clisp.org>.
117469 2008-05-29  Eric Blake  <ebb9@byu.net>
117471         Prefer new POSIX 200x interfaces over futimesat.
117472         * m4/utimens.m4 (gl_UTIMENS): Check for futimens, utimensat.
117473         * lib/utimens.c (gl_futimens): Use them for nanosecond resolution
117474         when available.
117475         [HAVE_BUGGY_NFS_TIME_STAMPS]: Allow C89 compilation.
117477 2008-05-28  Bruno Haible  <bruno@clisp.org>
117479         * modules/stpcpy (License): Change to LGPLv2+.
117480         Requested by David Lutterkort <dlutter@redhat.com>.
117482 2008-05-27  Bruno Haible  <bruno@clisp.org>
117484         * lib/localename.c (SUBLANG_TIBETAN_BHUTAN): Force value 2. Needed for
117485         current mingw.
117486         Reported by Jose E. Marchesi <jemarch@gnu.org>.
117488 2008-05-27  Bruno Haible  <bruno@clisp.org>
117490         * modules/iconv_open (Link): New section, from module 'iconv'.
117491         * modules/striconv (Link): Likewise.
117492         * modules/striconveh (Link): Likewise.
117493         * modules/xstriconv (Link): Likewise.
117494         * modules/unicodeio (Link): Likewise.
117495         * modules/propername (Link): Likewise.
117496         Reported by Jim Meyering.
117498 2008-05-26  Jim Meyering  <meyering@redhat.com>
117500         sha256: do not artificially restrict buffer length to be < 2^32
117501         * lib/sha256.h (struct sha256_ctx) [buflen]: Change type from
117502         uint32_t to size_t.
117503         * lib/sha256.c (sha256_conclude_ctx): Change type of a local
117504         to match.
117506         avoid unaligned access errors, e.g., on sparc
117507         * lib/sha512.c (sha512_conclude_ctx): Use set_uint64 rather than
117508         direct access through a possibly-unaligned uint64* pointer.
117509         * lib/sha256.c (sha256_conclude_ctx): Use set_uint32 rather than
117510         direct access through a possibly-unaligned uint32* pointer.
117511         Prompted by this patch from Tom "spot" Callaway:
117512         http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13638
117514         sha512.c: fix typo in comment
117515         * lib/sha512.c (sha512_conclude_ctx): Length is 128-bit, not 64-bit.
117517 2008-05-25  Bruno Haible  <bruno@clisp.org>
117519         * lib/set-mode-acl.c: Renamed from lib/acl.c.
117520         * modules/acl (Files): Add lib/set-mode-acl.c, remove lib/acl.c.
117521         (Makefile.am): Update lib_SOURCES.
117523 2008-05-25  Bruno Haible  <bruno@clisp.org>
117525         * m4/acl.m4 (gl_FUNC_ACL): Don't set LIB_ACL_TRIVIAL.
117527 2008-05-25  Jim Meyering  <meyering@redhat.com>
117529         useless-if-before-free: freed expr may have white-space differences
117530         * build-aux/useless-if-before-free: Recognize cases in which the
117531         freed expression differs from the tested one in embedded white
117532         space, e.g., if (p[i + 1]) free(p[i+1]).  Correct thinko in prev:
117533         $1 was used, so we can't make any regexp shy.  Improved tests now
117534         detect this.
117536         useless-if-before-free: accept white space in the expression.
117537         * build-aux/useless-if-before-free: For now, any white space
117538         in the expression must be identical in the free argument.
117540         useless-if-before-free: efficiency tweak
117541         * build-aux/useless-if-before-free: Make the expression-matching
117542         regexp "shy".
117543         Make the *outer* regexp shy, not the expr-matching one.
117545         update code-in-comment to accept cast of free arg
117546         * build-aux/useless-if-before-free: Update regexp.
117548 2008-05-25  Bruno Haible  <bruno@clisp.org>
117550         * tests/test-sameacls.c: Renamed from tests/test-copy-file-sameacls.c.
117551         * modules/copy-file-tests (Files, Makefile.am): Update.
117552         * tests/test-copy-file.c (func_test_copy): Update.
117554 2008-05-24  Andreas Färber  <andreas.faerber@web.de>  (tiny change)
117556         * lib/stdbool.in.h [__HAIKU__]: Disable __BEOS__ workarounds.
117558 2008-05-23  Bruno Haible  <bruno@clisp.org>
117560         Improve support for ACLs on OSF/1.
117561         * lib/acl.c (qset_acl): For OSF/1, use a string that ends in a comma.
117562         Remove fallback for unknown flavors of ACLs.
117564 2008-05-22  Bruno Haible  <bruno@clisp.org>
117566         Add support for ACLs on OSF/1.
117567         * lib/acl-internal.h (acl_get_fd, acl_set_fd): New inline function
117568         replacements.
117569         (acl_free_text): New macro fallback.
117570         * lib/acl_entries.c (acl_entries): Use acl_free_text instead of
117571         acl_free.
117572         * m4/acl.m4 (gl_FUNC_ACL): Look also in libpacl library. Test for
117573         acl_free_text function. Require AC_C_INLINE.
117575 2008-05-22  Bruno Haible  <bruno@clisp.org>
117577         Make copy_acl work on MacOS X 10.5.
117578         * lib/acl-internal.h (MODE_INSIDE_ACL): New macro.
117579         (ACL_NOT_WELL_SUPPORTED): On MacOS X, also handle ENOENT.
117580         * lib/acl.c (qset_acl): Add different code branch for !MODE_INSIDE_ACL.
117581         If MODE_INSIDE_ACL, don't assume that every system has the same text
117582         representation for ACLs as FreeBSD.
117583         * lib/copy-acl.c (copy_acl): Add support for platforms with
117584         !MODE_INSIDE_ACL.
117585         * lib/file-has-acl.c (file_has_acl): Likewise.
117586         * m4/acl.m4 (gl_FUNC_ACL): Test for some functions that are witness of
117587         FreeBSD, MacOS X, or IRIX, respectively.
117589 2008-05-22  Bruno Haible  <bruno@clisp.org>
117591         * lib/acl.h: Don't include <sys/acl.h>.
117592         (GETACLCNT): Move fallback to lib/acl-internal.h.
117593         * lib/acl-internal.h: Include <sys/acl.h> here.
117594         (GETACLCNT): New macro fallback, moved here from lib/acl.h.
117596 2008-05-22  Bruno Haible  <bruno@clisp.org>
117598         Split off copy_acl function to separate file.
117599         * lib/copy-acl.c: New file, extracted from lib/acl.c.
117600         * lib/acl.c (copy_acl): Moved function to separate file.
117601         * m4/acl.m4 (gl_FUNC_ACL): Remove unconditional AC_LIBOBJs.
117602         * modules/acl (Files): Add lib/copy-acl.c.
117603         (Makefiles.am): Augment lib_SOURCES.
117605 2008-05-22  Bruno Haible  <bruno@clisp.org>
117607         * modules/copy-file-tests: New file.
117608         * tests/test-copy-file.sh: New file.
117609         * tests/test-copy-file.c: New file.
117610         * tests/test-copy-file-sameacls.c: New file.
117612 2008-05-22  Eric Blake  <ebb9@byu.net>
117614         Avoid gcc warning.
117615         * tests/test-memcmp.c (main): Pass NULL indirectly.
117617 2008-05-21  Bruno Haible  <bruno@clisp.org>
117619         Add reference doc about ACLs.
117620         * doc/acl-resources.txt: New file.
117621         * doc/acl-cygwin.txt: New file.
117623 2008-05-21  Bruno Haible  <bruno@clisp.org>
117625         Avoid one more warning from gcc.
117626         * lib/vasnprintf.c (IF_LINT): Update comments.
117627         (VASNPRINTF): Use it also for the 'prefix' array initializer.
117629 2008-05-21  Jim Meyering  <meyering@redhat.com>
117631         avoid a warning from gcc
117632         * lib/vasnprintf.c (IF_LINT): Define.
117633         (scale10_round_decimal_long_double):
117634         Use it to avoid a "may be used uninitialized" warning.
117635         (scale10_round_decimal_double): Likewise.
117637 2008-05-21  Simon Josefsson  <simon@josefsson.org>
117639         * m4/memcmp.m4: When cross-compiling, assume memcmp works if it is
117640         declared.
117642 2008-05-20  Bruno Haible  <bruno@clisp.org>
117644         * tests/test-memcmp.c (main): Test also the sign of the result. Test
117645         against two known bugs; code taken from autoconf's AC_FUNC_MEMCMP.
117647 2008-05-20  Simon Josefsson  <simon@josefsson.org>
117649         * modules/memcmp-tests: New file.
117650         * tests/test-memcmp.c: New file.
117652 2008-05-19  Bruno Haible  <bruno@clisp.org>
117654         * modules/propername (Notice, configure.ac): Put quoted "..." into
117655         --keyword option.
117656         * lib/propername.h: Update comments accordingly.
117657         Reported by Eric Blake.
117659 2008-05-19  Martin Lambers  <marlam@marlam.de>  (tiny change)
117661         * modules/getpass-gnu (Depends-on): Add fseeko.
117663 2008-05-19  Simon Josefsson  <simon@josefsson.org>
117665         * modules/base64-tests: New file.
117667 2008-05-19  Bo Borgerson  <gigabo@gmail.com>
117669         * lib/base64.c (base64_decode_ctx): If a decode context structure
117670         was passed in use it to ignore newlines.  If a context structure
117671         was _not_ passed in, continue to treat newlines as garbage (this
117672         is the historical behavior).  Formerly base64_decode.
117673         (base64_decode_alloc_ctx): Formerly base64_decode_alloc.  Now
117674         takes a decode context structure.
117675         * lib/base64.h (base64_decode): Macro for four-argument calls.
117676         (base64_decode_alloc): Likewise.
117677         * lib/base64.c (base64_decode_ctx): If a decode context structure
117678         was passed in use it to ignore newlines.  If a context structure
117679         was _not_ passed in, continue to treat newlines as garbage (this
117680         is the historical behavior).  Formerly base64_decode.
117681         (base64_decode_alloc_ctx): Formerly base64_decode_alloc.  Now
117682         takes a decode context structure.
117683         * lib/base64.h (base64_decode): Macro for four-argument calls.
117684         (base64_decode_alloc): Likewise.
117686 2008-05-19  Jim Meyering  <meyering@redhat.com>
117688         avoid a warning from gcc
117689         * lib/trim.c (IF_LINT): Define.
117690         (trim2): Use it to avoid a "may be used uninitialized" warning.
117692         Fix doc typo.
117693         * doc/glibc-functions/getpass.texi (getpass): s/PATH_MAX/PASS_MAX/.
117695 2008-05-19  Bruno Haible  <bruno@clisp.org>
117697         * doc/glibc-functions/getpass.texi: Document limits of other
117698         implementations.
117700 2008-05-19  Simon Josefsson  <simon@josefsson.org>
117701             Bruno Haible <bruno@clisp.org>
117703         * doc/glibc-functions/getpass.texi: Document gnulib implementation.
117705 2008-05-18  Bruno Haible  <bruno@clisp.org>
117707         * modules/propername: New file, from GNU gettext.
117708         * lib/propername.h: New file, from GNU gettext.
117709         * lib/propername.c: New file, from GNU gettext.
117710         * MODULES.html.sh (Internationalization functions): Add propername.
117712 2008-05-16  Jim Meyering  <meyering@redhat.com>
117713             Bruno Haible  <bruno@clisp.org>
117715         Avoid some warnings from "gcc -Wshadow".
117716         * lib/vasnprintf.c (exp, remainder): Define to different identifiers.
117718 2008-05-15  Eric Blake  <ebb9@byu.net>
117720         Extend previous patch to cygwin 1.7.0.
117721         * m4/memmem.m4 (gl_FUNC_MEMMEM): When cross-compiling, assume a
117722         fast implementation in cygwin >= 1.7.0.
117723         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
117724         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
117726 2008-05-15  Bruno Haible  <bruno@clisp.org>
117728         * m4/memmem.m4 (gl_FUNC_MEMMEM): When cross-compiling, assume a fast
117729         implementation in glibc >= 2.9.
117730         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
117731         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
117733 2008-05-15  Bruno Haible  <bruno@clisp.org>
117735         * MODULES.html.sh (Internationalization functions): Remove linebreak.
117736         (Unicode string functions): Add unilbrk/*.
117737         Reported by Karl Berry.
117739 2008-05-15  Eric Blake  <ebb9@byu.net>
117741         Fix violation of <stdbool.h> replacement in regex.
117742         * lib/regcomp.c (re_compile_internal): Avoid implicit cast to bool.
117743         * lib/regexec.c (re_search_internal): Likewise.
117744         Reported by Heinrich Mislik <Heinrich.Mislik@univie.ac.at>.
117746 2008-05-15  Jim Meyering  <meyering@redhat.com>
117748         avoid distracting test output when git or cvs is not found
117749         * tests/test-vc-list-files-cvs.sh: Suppress 'init' error output.
117750         * tests/test-vc-list-files-git.sh: Likewise.
117752 2008-05-15  Eric Blake  <ebb9@byu.net>
117754         Glibc finally accepted the memmem speedup code, bugzilla #5514.
117755         * doc/glibc-functions/memmem.texi (memmem): Mention last broken
117756         glibc version.
117757         * doc/glibc-functions/strcasestr.texi (strcasestr): Likewise.
117758         * doc/posix-functions/strstr.texi (strstr): Likewise.
117759         * lib/str-two-way.h (MAX): Sychronize with glibc.
117761 2008-05-15  Paolo Bonzini  <bonzini@gnu.org>
117763         * lib/regcomp.c (optimize_utf8): Add a note on why we test
117764         opr.ctx_type.
117765         (calc_first): Initialize constraint field.
117766         (duplicate_node_closure): Use it instead of special casing ANCHORS.
117767         Fix grammar.
117768         (duplicate_node): Merge constraint field for all node types.
117769         (calc_eclosure_iter): Look at constraint field for all node types.
117770         * lib/regex_internal.c (create_cd_newstate): Don't look at
117771         opr.ctx_type.
117773 2008-05-14  Bruno Haible  <bruno@clisp.org>
117775         Help GCC to do better code generation.
117776         * lib/eealloc.h (eemalloc) [GCC >= 3]: Declare with attribute 'malloc'.
117777         * lib/pagealign_alloc.h (pagealign_alloc, pagealign_xalloc): Likewise.
117778         * lib/xalloc.h (ATTRIBUTE_MALLOC): New macro.
117779         (xmalloc, xzalloc, xcalloc, xmemdup, xstrdup, xnmalloc, xcharalloc):
117780         Declare with attribute 'malloc' if supported.
117782 2008-05-14  Lasse Collin  <lasse.collin@tukaani.org>
117784         use "echo STR|wc -c" rather than unportable "expr length STR"
117785         * build-aux/mktempd (mktempd): Vendor-supplied expr from at least
117786         OpenBSD 4.3 and Solaris 10 do not honor expr's "length" function.
117788 2008-05-14  Jim Meyering  <meyering@redhat.com>
117790         use dd ibs=$n count=1 ... rather than less-portable head -c$n
117791         * build-aux/mktempd (rand_bytes): head's -cN option is not accepted
117792         by Solaris 10's /bin/head or by the one from HP-UX 11.x.
117793         Reported in http://sourceforge.net/forum/message.php?msg_id=4960334
117794         via Collin Lasse.
117796 2008-05-14  Eric Blake  <ebb9@byu.net>
117798         Avoid quadratic growth in gl_LIBSOURCES.
117799         * gnulib-tool (func_emit_initmacro_done): s/\(m4_append\)_uniq/\1/.
117800         Suggested by Bruno Haible.
117802         Test xmemdup0.
117803         * modules/xmemdup0-tests: New file.
117804         * tests/test-xmemdup0.c: Likewise.
117806 2008-05-13  Eric Blake  <ebb9@byu.net>
117808         Split xmemdup0 into its own module.
117809         * modules/xmemdup0: New file.
117810         * lib/xmemdup0.h: Likewise.
117811         * lib/xmemdup0.c: Likewise.
117812         * MODULES.html.sh (Memory management functions): Add xmemdup0.
117813         * lib/xalloc.h (xmemdup0): Remove.
117814         * lib/xmalloc.c (xmemdup0): Likewise.
117816 2008-05-13  Eric Blake  <ebb9@byu.net>
117817             Bruno Haible  <bruno@clisp.org>
117819         Reduce number of forks required during autoconf.
117820         * gnulib-tool (func_emit_initmacro_start): Prepare gl_LIBSOURCES_LIST
117821         and gl_LIBSOURCES_DIR.
117822         (func_emit_initmacro_end): Use them here in a single m4_syscmd...
117823         (func_emit_initmacro_done) <gl_LIBSOURCES>: ...rather than in one
117824         m4_syscmd per file.
117825         <m4_foreach_w>: Move...
117826         * m4/gnulib-common.m4 (m4_foreach_w): ...here.
117828 2008-05-13  Eric Blake  <ebb9@byu.net>
117830         * gnulib-tool: Fix various comment typos.
117832 2008-05-12  Bruno Haible  <bruno@clisp.org>
117834         Tailor the linebreaking algorithm.
117835         * lib/unilbrk/tables.c (unilbrk_table): Change (IS,AL) entry.
117837 2008-05-12  Bruno Haible  <bruno@clisp.org>
117839         Update to Unicode 5.0.0.
117840         * lib/unilbrk/tables.h (LBP_*): Add LBP_WJ, LBP_H2, LBP_H3, LBP_JL,
117841         LBP_JV, LBP_JT. Redistribute values.
117842         (unilbrk_table): Change size.
117843         * lib/unilbrk/tables.c (unilbrk_table): Change size. Update to match
117844         Unicode TR#14 rev. 22.
117845         * lib/unilbrk/gen-lbrk.c (LBP_*): Add LBP_WJ, LBP_H2, LBP_H3, LBP_JL,
117846         LBP_JV, LBP_JT. Redistribute values.
117847         (get_lbp): Update to match Unicode TR#14 rev. 21/22 and Unicode 5.0.0.
117848         (debug_output_lbp, fill_org_lbp, debug_output_org_lbp, output_lbp):
117849         Update.
117850         * lib/unilbrk/lbrkprop1.h: Regenerated.
117851         * lib/unilbrk/lbrkprop2.h: Regenerated.
117852         * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks):
117853         Change handling of LBP_CM after LBP_ZW. Update for new value of LBP_BK.
117854         * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
117855         Likewise.
117856         * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
117857         Likewise.
117858         * tests/unilbrk/test-u8-possible-linebreaks.c (main): Update expected
117859         result.
117860         * tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
117861         * tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
117862         * tests/unilbrk/test-ulc-possible-linebreaks.c (main): Likewise.
117863         * tests/unilbrk/test-u8-width-linebreaks.c (main): Likewise.
117864         * tests/unilbrk/test-u16-width-linebreaks.c (main): Likewise.
117865         * tests/unilbrk/test-u32-width-linebreaks.c (main): Likewise.
117867 2008-05-11  Bruno Haible  <bruno@clisp.org>
117869         * lib/unilbrk/gen-lbrk.c (output_lbp): Fix whitespace.
117871 2008-05-11  Bruno Haible  <bruno@clisp.org>
117873         * lib/unilbrk/gen-lbrk.c: New file, from GNU gettext (gen-lbrkprop.c).
117874         * modules/unilbrk/gen-lbrk: New file.
117876 2008-05-11  Bruno Haible  <bruno@clisp.org>
117878         * m4/sha256.m4 (gl_SHA256): Require AC_C_INLINE.
117879         * m4/sha512.m4 (gl_SHA512): Likewise.
117881 2008-05-11  Jim Meyering  <meyering@redhat.com>
117883         New modules: crypto/sha256, crypto/sha512 (from coreutils)
117884         * modules/crypto/sha256: New file.
117885         * modules/crypto/sha512: Likewise.
117886         * lib/sha256.c: Likewise.
117887         * lib/sha256.h: Likewise.
117888         * lib/sha512.c: Likewise.
117889         * lib/sha512.h: Likewise.
117890         * lib/u64.h: Likewise.
117891         * m4/sha256.m4: Likewise.
117892         * m4/sha512.m4: Likewise.
117893         * MODULES.html.sh (Cryptographic computations (low-level)): List them.
117895 2008-05-10  Bruno Haible  <bruno@clisp.org>
117897         * MODULES.html.sh (Environment variables <stdlib.h>): Add unsetenv.
117898         (Input/Output <stdio.h>): Add xprintf.
117899         (Signal handling <signal.h>): Add strsignal.
117900         (Cryptographic computations (high-level)): Add crypto/gc-camellia.
117901         (Core language properties): Add func.
117902         (Mathematics <math.h>): Add ceil, floor, frexp-nolibm.
117903         (Support for systems lacking POSIX:2001): Add environ, EOVERFLOW,
117904         strings.
117905         (Enhancements for POSIX:2001 functions): Add iconv_open-utf.
117906         (Input/output): New section.
117907         (File system functions): Add openat-die, stat-macros.
117908         (Networking functions): Add sockets.
117909         (Unicode string functions): Add unictype/*.
117910         (Support for building libraries and executables): Add gperf.
117911         (Support for building documentation): Add agpl-3.0.
117912         (Misc): Add nocrash.
117914 2008-05-10  Bruno Haible  <bruno@clisp.org>
117916         * modules/unictype/gen-ctype: New file.
117918 2008-05-10  Jim Meyering  <meyering@redhat.com>
117920         Make chdir-safer.c more efficient on a system with no symlinks.
117921         * lib/chdir-safer.c (chdir_no_follow): Skip lstat and fstat calls
117922         also if ELOOP is zero.  Suggested by Bruno Haible.
117924         Make chdir-safer.c slightly safer.
117925         * lib/chdir-safer.c (chdir_no_follow): Test HAVE_WORKING_O_NOFOLLOW,
117926         not O_NOFOLLOW, in case the latter is nonzero and open ignores it.
117928         Avoid compile failure on systems without ELOOP (like mingw).
117929         * lib/chdir-safer.c (ELOOP): Define if not already defined.
117930         Reported by Bruno Haible.
117932 2008-05-10  Bruno Haible  <bruno@clisp.org>
117934         * lib/unilbrk/ulc-common.c: Include c-strcaseeq.h instead of streq.h.
117935         (is_utf8_encoding): Use a case-insensitive comparison.
117936         * modules/unilbrk/ulc-common (Depends-on): Add c-strcaseeq. Remove
117937         streq.
117939 2008-05-10  Bruno Haible  <bruno@clisp.org>
117941         * lib/unilbrk/ulc-common.c: Don't include <stdlib.h>.
117942         (iconv_string_length, iconv_string_keeping_offsets): Remove functions.
117943         * lib/unilbrk/ulc-common.h (iconv_string_length,
117944         iconv_string_keeping_offsets): Remove declarations.
117945         * lib/unilbrk/ulc-possible-linebreaks.c: Include <string.h>, uniconv.h.
117946         Don't include <iconv.h>, streq.h, xsize.h.
117947         (ulc_possible_linebreaks): Use u8_conv_from_encoding for doing the
117948         conversion.
117949         * lib/unilbrk/ulc-width-linebreaks.c: Include uniconv.h. Don't include
117950         <iconv.h>, streq.h, xsize.h.
117951         (ulc_width_linebreaks): Use u8_conv_from_encoding for doing the
117952         conversion.
117953         * modules/unilbrk/ulc-common (Depends-on): Remove iconv.
117954         * modules/unilbrk/ulc-possible-linebreaks (Depends-on): Add
117955         uniconv/u8-conv-from-enc. Remove iconv_open, streq, xsize.
117956         * modules/unilbrk/ulc-width-linebreaks (Depends-on): Likewise.
117958 2008-05-10  Bruno Haible  <bruno@clisp.org>
117960         * modules/unilbrk/ulc-width-linebreaks-tests: New file.
117961         * tests/unilbrk/test-ulc-width-linebreaks.c: New file.
117963         * modules/unilbrk/u32-width-linebreaks-tests: New file.
117964         * tests/unilbrk/test-u32-width-linebreaks.c: New file.
117966         * modules/unilbrk/u16-width-linebreaks-tests: New file.
117967         * tests/unilbrk/test-u16-width-linebreaks.c: New file.
117969         * modules/unilbrk/u8-width-linebreaks-tests: New file.
117970         * tests/unilbrk/test-u8-width-linebreaks.c: New file.
117972         * modules/unilbrk/ulc-possible-linebreaks-tests: New file.
117973         * tests/unilbrk/test-ulc-possible-linebreaks.c: New file.
117975         * modules/unilbrk/u32-possible-linebreaks-tests: New file.
117976         * tests/unilbrk/test-u32-possible-linebreaks.c: New file.
117978         * modules/unilbrk/u16-possible-linebreaks-tests: New file.
117979         * tests/unilbrk/test-u16-possible-linebreaks.c: New file.
117981         * modules/unilbrk/u8-possible-linebreaks-tests: New file.
117982         * tests/unilbrk/test-u8-possible-linebreaks.c: New file.
117984 2008-05-10  Bruno Haible  <bruno@clisp.org>
117986         Split up 'linebreak' module.
117987         * lib/unilbrk.h: New file, based on lib/linebreak.h.
117988         * lib/unilbrk/lbrkprop1.h: New file, extracted from lib/lbrkprop.h.
117989         * lib/unilbrk/lbrkprop2.h: New file, renamed from lib/lbrkprop.h with
117990         modifications.
117991         * lib/unilbrk/tables.h: New file, extracted from lib/linebreak.c.
117992         * lib/unilbrk/tables.c: New file, extracted from lib/linebreak.c.
117993         * lib/unilbrk/u8-possible-linebreaks.c: New file, extracted from
117994         lib/linebreak.c.
117995         * lib/unilbrk/u16-possible-linebreaks.c: New file, extracted from
117996         lib/linebreak.c.
117997         * lib/unilbrk/u32-possible-linebreaks.c: New file, extracted from
117998         lib/linebreak.c.
117999         * lib/unilbrk/ulc-common.h: New file, extracted from lib/linebreak.c.
118000         * lib/unilbrk/ulc-common.c: New file, extracted from lib/linebreak.c.
118001         * lib/unilbrk/ulc-possible-linebreaks.c: New file, extracted from
118002         lib/linebreak.c.
118003         * lib/unilbrk/u8-width-linebreaks.c: New file, extracted from
118004         lib/linebreak.c.
118005         * lib/unilbrk/u16-width-linebreaks.c: New file, extracted from
118006         lib/linebreak.c.
118007         * lib/unilbrk/u32-width-linebreaks.c: New file, extracted from
118008         lib/linebreak.c.
118009         * lib/unilbrk/ulc-width-linebreaks.c: New file, extracted from
118010         lib/linebreak.c.
118011         * modules/unilbrk/base: New file.
118012         * modules/unilbrk/tables: New file.
118013         * modules/unilbrk/u8-possible-linebreaks: New file.
118014         * modules/unilbrk/u16-possible-linebreaks: New file.
118015         * modules/unilbrk/u32-possible-linebreaks: New file.
118016         * modules/unilbrk/ulc-common: New file.
118017         * modules/unilbrk/ulc-possible-linebreaks: New file.
118018         * modules/unilbrk/u8-width-linebreaks: New file.
118019         * modules/unilbrk/u16-width-linebreaks: New file.
118020         * modules/unilbrk/u32-width-linebreaks: New file.
118021         * modules/unilbrk/ulc-width-linebreaks: New file.
118022         * lib/linebreak.h: Remove file.
118023         * lib/linebreak.c: Remove file.
118024         * m4/linebreak.m4: Remove file.
118025         * modules/linebreak: Remove file.
118026         * NEWS: Mention the changes.
118028 2008-05-09  Eric Blake  <ebb9@byu.net>
118030         Add xmemdup0.
118031         * lib/xalloc.h (xmemdup0): New prototype and C++ typesafe
118032         implementation.
118033         * lib/xmalloc.c (xmemdup0): New C implementation.
118035 2008-05-08  Bruno Haible  <bruno@clisp.org>
118037         * m4/wctype.m4 (gl_WCTYPE_H): Correct indentation.
118039 2008-05-07  Eric Blake  <ebb9@byu.net>
118041         Support cross-compilation of <wctype.h>.
118042         * m4/wctype.m4 (gl_WCTYPE_H): Fix improper nesting in
118043         AC_CACHE_CHECK.
118045 2008-05-06  Soren Hansen  <soren@ubuntu.com>  (tiny change)
118047         * build-aux/vc-list-files: Add support for bzr.
118049 2008-05-03  Jim Meyering  <meyering@redhat.com>
118051         avoid failed assertion with tight malloc
118052         * tests/test-getndelim2.c: Correct an off-by-one assertion.
118054 2008-05-03  Simon Josefsson  <simon@josefsson.org>
118056         * m4/inet_pton.m4: Set HAVE_DECL_INET_PTON to 0 when declarations
118057         are needed from arpa/inet.h.
118058         * m4/inet_ntop.m4: Likewise, for HAVE_DECL_INET_NTOP.
118059         Reported by Bruno Haible.
118061 2008-05-02  Jim Meyering  <meyering@redhat.com>
118063         avoid compilation error on FreeBSD 6
118064         * tests/test-getaddrinfo.c [!defined EAI_NODATA] (EAI_NODATA): Define.
118066 2008-05-01  Jim Meyering  <meyering@redhat.com>
118068         useless-if-before-free: correct --help's exit status description
118069         * build-aux/useless-if-before-free (usage): Like grep, exit 0
118070         for one or more matches, etc.  Reported by Bruno Haible.
118072         vc-list-files: make the stand-alone gnulib test work
118073         * modules/vc-list-files-tests (configure.ac):
118074         Define and AC_SUBST abs_aux_dir.
118075         (Makefile.am) [TESTS_ENVIRONMENT]: Rather than passing
118076         $(abs_top_srcdir) to each script and having each of them
118077         duplicate the work of setting PATH, set PATH here, using
118078         the new variable, abs_aux_dir instead.
118079         * tests/test-vc-list-files-cvs.sh: Don't set PATH here.
118080         * tests/test-vc-list-files-git.sh: Likewise.
118081         Reported by Bruno Haible.
118083 2008-05-01  Bruno Haible  <bruno@clisp.org>
118085         * lib/getndelim2.c (getndelim2): Fix newsize computation during
118086         reallocation. Rename 'done' to 'found_delimiter'.
118088 2008-05-01  Jim Meyering  <meyering@redhat.com>
118090         vc-list-files: accommodate /bin/sh like the one from Solaris 10
118091         * build-aux/vc-list-files: Use `...`, not $(...).
118093 2008-04-30  Jim Meyering  <meyering@redhat.com>
118095         add tests for vc-list-files
118096         * modules/vc-list-files-tests: New module.
118097         * tests/test-vc-list-files-cvs.sh: New file.
118098         * tests/test-vc-list-files-git.sh: New file.
118100         avoid a warning from gcc
118101         * lib/getndelim2.c (IF_LINT): Define.
118102         (getndelim2): Use it to avoid a "may be used uninitialized" warning.
118104         vc-list-files: work properly with build-aux/cvsu, too
118105         * build-aux/vc-list-files: Hoist the "./"-removing code to apply
118106         to all cvs-based clauses.
118108         vc-list-files: work properly in the CVS+awk case, too
118109         * build-aux/vc-list-files: In the CVS+awk case, remove "./" prefix.
118111         vc-list-files: avoid use of ${*-*} that fails when /bin/sh is dash
118112         * build-aux/vc-list-files: Simplify ${*-*} to $dir, since we no longer
118113         take more than one file argument, so .  Add quotes, just in case $dir
118114         ever contains a shell meta-character.  Prompted by Soren Hansen in
118115         <http://thread.gmane.org/gmane.comp.emulators.libvirt/6221/focus=6240>.
118117 2008-04-29  Eric Blake  <ebb9@byu.net>
118119         Optimize getndelim2 to use block operations when possible.
118120         * modules/getndelim2 (Depends-on): Add stdbool, freadptr,
118121         freadseek, and memchr2.
118122         * lib/getndelim2.c (getndelim2): Use them for block reads.
118124 2008-04-29  Bruno Haible  <bruno@clisp.org>
118126         * m4/inet_ntop.m4 (gl_INET_NTOP): Require gl_USE_SYSTEM_EXTENSIONS.
118127         * m4/inet_pton.m4 (gl_INET_PTON): Likewise.
118128         * modules/inet_ntop (Depends-on): Add extensions.
118129         * modules/inet_pton (Depends-on): Likewise.
118130         Reported by Simon Josefsson.
118132 2008-04-29  Jim Meyering  <meyering@redhat.com>
118134         When the is more than one match in a block, match all of them.
118135         * build-aux/useless-if-before-free: Iterate through each block
118136         until there are no more matches.
118138         Fix broken useless-if-before-free script.
118139         * build-aux/useless-if-before-free: Fix typo: missing "?" after
118140         the expression to match cast of argument to free-like function.
118142 2008-04-29  Eric Blake  <ebb9@byu.net>
118144         Use new header.
118145         * lib/getaddrinfo.c (includes): s/"inet_ntop.h"/<arpa/inet.h>/.
118147 2008-04-29  Jim Meyering  <meyering@redhat.com>
118149         Avoid test segfault on x86_64 due to lack of inet_ntop declaration.
118150         * tests/test-getaddrinfo.c: Include <arpa/inet.h>, now guaranteed
118151         by gnulib to exist and to declare e.g., inet_ntop.
118152         Don't include "inet_ntop.h", now removed.
118154         * m4/arpa_inet_h.m4: Remove trailing blanks.
118156 2008-04-29  Eric Blake  <ebb9@byu.net>
118158         Silence valgrind on safe reads beyond potential array bounds.
118159         * lib/rawmemchr.valgrind: New file.
118160         * lib/strchrnul.valgrind: Likewise.
118161         * modules/rawmemchr (Files): Distribute new file.
118162         * modules/strchrnul (Files): Likewise.
118163         Suggested by Bruno Haible.
118165 2008-04-29  Bruno Haible  <bruno@clisp.org>
118167         * lib/arpa_inet.in.h: Include system's <arpa/inet.h> if it exists.
118168         (inet_ntop, inet_pton): Change portability warning's wording.
118169         * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Set HAVE_ARPA_INET_H.
118170         Invoke gl_CHECK_NEXT_HEADERS.
118171         (gl_ARPA_INET_H_DEFAULTS): Initialize ARPA_INET_H.
118172         * m4/inet_ntop.m4 (gl_INET_NTOP): Require gl_ARPA_INET_H_DEFAULTS and
118173         set ARPA_INET_H.
118174         * m4/inet_pton.m4 (gl_INET_PTON): Likewise.
118175         * modules/arpa_inet (Description): No longer only for systems that
118176         lack it.
118177         (Depends-on): Add include_next.
118178         (Makeile.am): Substitute INCLUDE_NEXT, NEXT_ARPA_INET_H,
118179         HAVE_ARPA_INET_H.
118181 2008-04-29  Jim Meyering  <meyering@redhat.com>
118183         * modules/mkdir (License): Re-license as LGPLv2+.
118185 2008-04-29  Bruno Haible  <bruno@clisp.org>
118187         * modules/rawmemchr (Maintainer): Set to Eric.
118188         * modules/strchrnul (Maintainer): Likewise.
118190 2008-04-29  Simon Josefsson  <simon@josefsson.org>
118192         * m4/arpa_inet_h.m4 (gl_ARPA_INET_H_DEFAULTS): Set
118193         HAVE_DECL_INET_NTOP and HAVE_DECL_INET_PTON.
118195         * modules/arpa_inet (arpa/inet.h): Use them.
118197 2008-04-28  Eric Blake  <ebb9@byu.net>
118199         Test getndelim2.
118200         * modules/getndelim2-tests: New file.
118201         * tests/test-getndelim2.c: Likewise.
118202         * lib/getndelim2.c (getndelim2): Never return 0.  Lock the
118203         stream.
118204         * m4/getndelim2.m4 (gl_GETNDELIM2): Check for lock functions.
118206         * MODULES.html.sh: Document new module.
118208 2008-04-20  Bruno Haible  <bruno@clisp.org>
118210         * lib/c-stack.c (die): Use raise.
118211         * modules/c-stack (Depends-on): Add raise.
118213 2008-04-28  Bruno Haible  <bruno@clisp.org>
118215         Expect rpmatch to be declared.
118216         * lib/yesno.c (rpmatch): Remove declaration.
118218         Declare rpmatch.
118219         * lib/stdlib.in.h (rpmatch): New declaration.
118220         * lib/rpmatch.c: Include <stdlib.h> first.
118221         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Require AC_USE_SYSTEM_EXTENSIONS and
118222         gl_STDLIB_H_DEFAULTS. Set HAVE_RPMATCH.
118223         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_RPMATCH,
118224         HAVE_RPMATCH.
118225         * modules/rpmatch (Depends-on): Add stdlib, extensions.
118226         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
118227         (Include): Set to <stdlib.h>.
118228         * modules/stdlib (Makefile.am): Substitute GNULIB_RPMATCH and
118229         HAVE_RPMATCH.
118230         * NEWS: Document the change.
118232 2008-04-28  Bruno Haible  <bruno@clisp.org>
118234         Change rpmatch to use nl_langinfo when appropriate.
118235         * lib/rpmatch.c: Include stdbool.h, string.h, langinfo.h.
118236         (N_): New macro.
118237         (localized_pattern): New function/macro.
118238         (try): Remove match, nomatch arguments. Copy the pattern into safe
118239         memory before caching it.
118240         (rpmatch): Use localized_pattern. Add translator comments.
118241         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Test for nl_langinfo and YESEXPR.
118242         Suggested by Eric Blake.
118243         * modules/rpmatch (Depends-on): Add stdbool.
118245 2008-04-28  Eric Blake  <ebb9@byu.net>
118247         Add rawmemchr module, matching glibc.
118248         * modules/string (Makefile.am): New indicator.
118249         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Set it.
118250         * lib/string.in.h (rawmemchr): Declare when appropriate.
118251         * modules/rawmemchr: New file.
118252         * m4/rawmemchr.m4: Likewise.
118253         * lib/rawmemchr.c: Likewise.
118254         * modules/rawmemchr-tests: Likewise.
118255         * tests/test-rawmemchr.c: Likewise.
118256         * doc/glibc-functions/rawmemchr.texi (rawmemchr): Document
118257         module.
118258         * modules/strchrnul (Depends-on): Add rawmemchr.
118259         * lib/strchrnul.c (strchrnul): Optimize a corner case.
118261         Whitespace cleanup.
118262         * tests/test-strchrnul.c: Reindent.
118263         * lib/strchrnul.c: Likewise.
118265         Optimize and test strchrnul.
118266         * lib/strchrnul.c (strchrnul): Rewrite to do parallel search.
118267         * modules/strchrnul-tests: New file.
118268         * tests/test-strchrnul.c: Likewise.
118270         Remove intprops dependency.
118271         * modules/memchr (Depends-on): Remove intprops.
118272         * modules/memrchr (Depends-on): Likewise.
118273         * modules/memchr2 (Depends-on): Likewise.
118274         * lib/memchr.c (__memchr): Hand-inline the TYPE_MAXIMUM check.
118275         * lib/memrchr.c (__memrchr): Likewise.
118276         * lib/memrchr2.c (memchr2): Likewise.
118277         Reported by Simon Josefsson.
118279 2008-04-28  Simon Josefsson  <simon@josefsson.org>
118281         * m4/sys_socket_h.m4: Move AC_REQUIRE([AC_C_INLINE]) to top.
118282         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
118284 2008-04-28  Simon Josefsson  <simon@josefsson.org>
118286         * lib/inet_ntop.h, lib/inet_pton.h: Remove files.
118288         * lib/inet_ntop.c: Include arpa/inet.h instead of inet_ntop.h.
118290         * lib/inet_pton.c: Include arpa/inet.h instead of inet_pton.h.
118292         * lib/arpa_inet.in.h [@GNULIB_INET_NTOP@]: Inline inet_ntop.h
118293         declarations.
118294         [@GNULIB_INET_PTON@]: Inline inet_pton.h declarations.
118296         * m4/inet_pton.m4: Don't check for header files.
118298         * m4/inet_ntop.m4: Don't check for header files.
118300 2008-04-28  Simon Josefsson  <simon@josefsson.org>
118302         * m4/sys_socket_h.m4: Require AC_C_INLINE when necessary.
118303         * lib/sys_socket.in.h (setsockopt): Use proper win32 tests (don't
118304         trigger for cygwin).
118305         Reported by Bruno Haible  <bruno@clisp.org>.
118307 2008-04-28  Bruno Haible  <bruno@clisp.org>
118309         * doc/posix-functions/strdup.texi: Mention mingw problem.
118311 2008-04-27  Bruno Haible  <bruno@clisp.org>
118313         * modules/stat-time-tests (Depends-on): Add sleep.
118314         * tests/test-stat-time.c (force_unlink): New function.
118315         (cleanup): Use it.
118316         (test_mtime): Remove the ctime related tests.
118317         (test_ctime): New function, containing the ctime related tests.
118318         (main): Call test_ctime, except on native Windows platforms.
118320 2008-04-27  Bruno Haible  <bruno@clisp.org>
118322         * lib/rpmatch.c (rpmatch): Add some comments.
118323         Reported by James Youngman <jay@gnu.org>.
118325 2008-04-27  Bruno Haible  <bruno@clisp.org>
118327         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Also test the behaviour on
118328         quiet NaNs.
118330 2008-04-27  Bruno Haible  <bruno@clisp.org>
118332         Make test-yesno.sh work on mingw.
118333         * tests/test-yesno.sh: Postprocess the output to convert CR/LF to LF.
118334         * tests/test-yesno.c: Include yesno.h first. Include binary-io.h.
118335         (main): Set stdin to binary mode.
118336         * modules/yesno-tests (Depends-on): Add binary-io.
118338 2008-04-27  Bruno Haible  <bruno@clisp.org>
118340         Fix 'isfinite' on x86, x86_64, ia64 platforms.
118341         * tests/test-isfinite.c (test_isfinitel): Also test the behavior on
118342         argument that lie outside the IEEE 854 domain.
118343         * m4/isfinite.m4 (gl_ISFINITEL_WORKS): New macro.
118344         (gl_ISFINITE): Use it.
118345         * doc/posix-functions/isfinite.texi: Document the fixed bugs.
118347 2008-04-27  Bruno Haible  <bruno@clisp.org>
118349         Allow local renaming in config.h.
118350         * lib/memrchr.c (memrchr): Don't undefine outside libc.
118352 2008-04-27  Bruno Haible  <bruno@clisp.org>
118354         * lib/memchr.c (__memchr): Change type of 'i'.
118355         * lib/memchr2.c (memchr2): Likewise.
118357 2008-04-26  Eric Blake  <ebb9@byu.net>
118358         and Bruno Haible  <bruno@clisp.org>
118360         Optimize and test memrchr.
118361         * modules/memrchr (Depends-on): Add intprops.
118362         * lib/memrchr.c (__memrchr): Avoid false positives in loop.
118363         * modules/memrchr-tests: New file.
118364         * tests/test-memrchr.c: New file.
118366 2008-04-26  Bruno Haible  <bruno@clisp.org>
118368         Add tentative support for DragonFly BSD.
118369         * lib/stdio-impl.h: Add macros for DragonFly BSD.
118370         * lib/fbufmode.c (fbufmode): Update conditionals. Use fp_ instead of
118371         fp.
118372         * lib/fflush.c (clear_ungetc_buffer, disable_seek_optimization,
118373         restore_seek_optimization, update_fpos_cache, rpl_fflush: Likewise.
118374         * lib/fpurge.c (fpurge): Likewise.
118375         * lib/freadable.c (freaadable): Likewise.
118376         * lib/freadahead.c (freadahead): Likewise.
118377         * lib/freading.c (freading): Likewise.
118378         * lib/freadptr.c (freadptr): Likewise.
118379         * lib/freadseek.c (freadptrinc): Likewise.
118380         * lib/fseeko.c (fseeko): Likewise.
118381         * lib/fseterr.c (fseterr): Likewise.
118382         * lib/fwritable.c (fwritable): Likewise.
118383         * lib/fwriting.c (fwriting): Likewise.
118385 2008-04-26  Bruno Haible  <bruno@clisp.org>
118387         * lib/stdio-impl.h: New file.
118388         * lib/fbufmode.c: Include stdio-impl.h.
118389         (fbufmode): Use fp_, remove redundant #defines.
118390         * lib/fflush.c: Include stdio-impl.h.
118391         (clear_ungetc_buffer): Remove redundant #defines.
118392         * lib/fpurge.c: Include stdio-impl.h.
118393         (fpurge): Remove redundant #defines.
118394         * lib/freadable.c: Include stdio-impl.h.
118395         (freadable): Remove redundant #defines.
118396         * lib/freadahead.c: Include stdio-impl.h.
118397         (freadahead): Remove redundant #defines.
118398         * lib/freading.c: Include stdio-impl.h.
118399         (freading): Remove redundant #defines.
118400         * lib/freadptr.c: Include stdio-impl.h.
118401         (freadptr): Remove redundant #defines.
118402         * lib/freadseek.c: Include stdio-impl.h.
118403         (freadptrinc): Remove redundant #defines.
118404         * lib/fseeko.c: Include stdio-impl.h.
118405         (rpl_fseeko): Remove redundant #defines.
118406         * lib/fseterr.c: Include stdio-impl.h.
118407         (fseterr): Remove redundant #defines.
118408         * lib/fwritable.c: Include stdio-impl.h.
118409         (fwritable: Remove redundant #defines.
118410         * lib/fwriting.c: Include stdio-impl.h.
118411         (fwriting): Remove redundant #defines.
118412         * modules/fbufmode (Files): Add lib/stdio-impl.h.
118413         * modules/fflush (Files): Likewise.
118414         * modules/fpurge (Files): Likewise.
118415         * modules/freadable (Files): Likewise.
118416         * modules/freadahead (Files): Likewise.
118417         * modules/freading (Files): Likewise.
118418         * modules/freadptr (Files): Likewise.
118419         * modules/freadseek (Files): Likewise.
118420         * modules/fseeko (Files): Likewise.
118421         * modules/fseterr (Files): Likewise.
118422         * modules/fwritable (Files): Likewise.
118423         * modules/fwriting (Files): Likewise.
118425 2008-04-26  Bruno Haible  <bruno@clisp.org>
118427         * lib/fflush.c (clear_ungetc_buffer, disable_seek_optimization,
118428         restore_seek_optimization, update_fpos_cache): New functions, extracted
118429         from rpl_fflush.
118430         (rpl_fflush): Use them.
118431         * m4/fflush.m4 (gl_PREREQ_FFLUSH): New macro.
118432         (gl_REPLACE_FFLUSH): Use it.
118434 2008-04-26  Bruno Haible  <bruno@clisp.org>
118436         * tests/test-xstrtol.sh: Work around limitation of an old 'tr' program
118437         on Solaris.
118438         * tests/test-xstrtoimax.sh: Likewise.
118439         * tests/test-xstrtoumax.sh: Likewise.
118440         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
118442 2008-04-26  Bruno Haible  <bruno@clisp.org>
118444         * modules/memchr-tests: New file.
118445         * tests/test-memchr.c; New file, based on tests/test-memchr2.c.
118447 2008-04-26  Eric Blake  <ebb9@byu.net>
118448             Bruno Haible  <bruno@clisp.org>
118450         * lib/memchr.c: Include intprops.h.
118451         (__memchr): Optimize parallel detection of matching bytes. Rename local
118452         variables. Add explanatory comments.
118454 2008-04-26  Bruno Haible  <bruno@clisp.org>
118456         Fix module 'memchr', broken since 2000-10-28.
118457         * lib/memchr.c: Outside glibc, define memchr, not __memchr.
118459 2008-04-26  Bruno Haible  <bruno@clisp.org>
118461         * lib/memchr2.c (memchr2): Rename local variables. Add explanatory
118462         comments.
118464 2008-04-25  Eric Blake  <ebb9@byu.net>
118466         Use native fstatat on cygwin 1.7.0.
118467         * m4/openat.m4 (gl_FUNC_OPENAT): Make sure lstat check is made
118468         first.
118470 2008-04-23  Eric Blake  <ebb9@byu.net>
118472         Improve memchr2 performance.
118473         * lib/memchr2.c (memchr2): Further optimize parallel detection of
118474         NUL bytes.
118475         * modules/memchr2 (Depends-on): Use intprops.h.
118477 2008-04-23  Simon Josefsson  <simon@josefsson.org>
118479         * lib/sys_socket.in.h (setsockopt): Be more type safe by declaring
118480         an inline function instead of a CPP macro.  Patch by Ben Pfaff
118481         <blp@cs.stanford.edu>.
118483 2008-04-23  Simon Josefsson  <simon@josefsson.org>
118485         * lib/arpa_inet.in.h: New file.
118487         * modules/arpa_inet (Files): Add lib/arpa_inet.in.h.
118488         (Makefile.am): Sed in substitute header file.
118490         * m4/arpa_inet_h.m4: Add gl_ARPA_INET_H_DEFAULTS and
118491         gl_ARPA_INET_MODULE_INDICATOR.  Use them.
118493         * modules/inet_ntop (configure.ac): Use
118494         gl_ARPA_INET_MODULE_INDICATOR.
118496         * modules/inet_pton (configure.ac): Use
118497         gl_ARPA_INET_MODULE_INDICATOR.
118499 2008-04-22  Jim Meyering  <meyering@redhat.com>
118501         * modules/verify (License): Re-license as LGPLv2+.
118503 2008-04-22  Simon Josefsson  <simon@josefsson.org>
118505         * lib/sys_socket.in.h: Define setsockopt macro to cast fourth
118506         parameter to void* as per POSIX standard (MinGW uses char*).
118508 2008-04-21  Bruno Haible  <bruno@clisp.org>
118510         * lib/wctype.in.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
118511         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
118512         Define to replacements if REPLACE_ISWCNTRL is 1.
118513         * m4/wctype.m4 (gl_WCTYPE_H): Test whether the isw* functions work.
118514         If not, set WCTYPE_H to nonempty and REPLACE_ISWCNTRL to 1.
118515         * modules/wctype (Makefile.am): Substitute REPLACE_ISWCNTRL.
118516         * doc/posix-functions/iswalnum.texi: Mention the 'wctype' module and
118517         what it fixes.
118518         * doc/posix-functions/iswalpha.texi: Likewise.
118519         * doc/posix-functions/iswblank.texi: Likewise.
118520         * doc/posix-functions/iswcntrl.texi: Likewise.
118521         * doc/posix-functions/iswdigit.texi: Likewise.
118522         * doc/posix-functions/iswgraph.texi: Likewise.
118523         * doc/posix-functions/iswlower.texi: Likewise.
118524         * doc/posix-functions/iswprint.texi: Likewise.
118525         * doc/posix-functions/iswpunct.texi: Likewise.
118526         * doc/posix-functions/iswspace.texi: Likewise.
118527         * doc/posix-functions/iswupper.texi: Likewise.
118528         * doc/posix-functions/iswxdigit.texi: Likewise.
118529         Reported by Alain Guibert.
118531 2008-04-21  Bruno Haible  <bruno@clisp.org>
118533         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Fix typo in last commit.
118534         Patch by Alain Guibert.
118536 2008-04-21  Bruno Haible  <bruno@clisp.org>
118538         Fix test failures on mingw.
118539         * tests/test-xstrtol.c (print_no_progname): New function.
118540         (main): Install it in error_print_progname hook.
118541         * tests/test-xstrtol.sh: Convert CR/LF to NL in output.
118542         * tests/test-xstrtoimax.sh: Likewise.
118543         * tests/test-xstrtoumax.sh: Likewise.
118545 2008-04-21  Bruno Haible  <bruno@clisp.org>
118547         Fix test failure on mingw.
118548         * tests/test-argp-2.sh (func_compare): Remove CRs from sed's output.
118550 2008-04-21  Bruno Haible  <bruno@clisp.org>
118552         * lib/localename.c (SUBLANG_TIBETAN_PRC, SUBLANG_TIBETAN_BHUTAN):
118553         Actually assign a value.
118555 2008-04-20  Bruno Haible  <bruno@clisp.org>
118557         Fix conflict between modules 'canonicalize' and 'canonicalize-lgpl',
118558         take 2.
118559         * lib/canonicalize.c (canonicalize_file_name): Elide if the
118560         'canonicalize-lgpl' module is also used.
118561         * lib/canonicalize-lgpl.c: Undo last change.
118562         * modules/canonicalize-lgpl (configure.ac): Invoke gl_MODULE_INDICATOR.
118564 2008-04-20  Bruno Haible  <bruno@clisp.org>
118566         * lib/mkdir.c (mkdir): Undefine after the includes, not right after
118567         config.h. Provide _mkdir based fallback for mingw.
118568         * lib/sys_stat.in.h (mkdir): Define through an 'extern' declaration
118569         if REPLACE_MKDIR is 1. Otherwise, test for mingw directly.
118570         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Require
118571         gl_SYS_STAT_H_DEFAULTS. When doing the replacement, set REPLACE_MKDIR
118572         rather than defining mkdir in config.h.
118573         * m4/sys_stat_h.m4 (gl_SYS_STAT_MODULE_INDICATOR): New macro.
118574         (gl_SYS_STAT_H_DEFAULTS): New macro.
118575         (gl_HEADER_SYS_STAT_H): Require it. Don't set HAVE_DECL_MKDIR and
118576         HAVE_IO_H any more.
118577         * modules/sys_stat (Makefile.am): Substitute REPLACE_MKDIR instead of
118578         HAVE_DECL_MKDIR and HAVE_IO_H.
118580 2008-04-20  Bruno Haible  <bruno@clisp.org>
118582         * lib/isapipe.c: Port to native Windows platforms.
118584 2008-04-20  Bruno Haible  <bruno@clisp.org>
118586         * lib/gc-gnulib.c: Include <windows.h> before <wincrypt.h>.
118588 2008-04-21  Eric Blake  <ebb9@byu.net>
118590         Work around preprocessors that don't handle UINTMAX_MAX.
118591         * lib/memchr2.c (memchr2): Avoid embedded #if.
118592         Reported by Alain Guibert, fix suggested by Bruno Haible.
118594 2008-04-21  Simon Josefsson  <simon@josefsson.org>
118596         * doc/posix-functions/strftime.texi (strftime): Explain better
118597         Windows incompatibility.  Suggested by Micah Cowan
118598         <micah@cowan.name>.
118600 2008-04-20  Bruno Haible  <bruno@clisp.org>
118602         * modules/uniconv/u32-conv-to-enc (Depends-on): Add unistr/u32-mblen,
118603         unistr/u8-mblen.
118605 2008-04-20  Bruno Haible  <bruno@clisp.org>
118607         Fix test failure on platforms with non-GNU iconv.
118608         * lib/uniconv/u16-conv-to-enc.c (u16_to_u8_lenient): New function.
118609         (U_TO_U8): Use it, rather than u16_to_u8.
118610         * lib/uniconv/u-conv-to-enc.h (FUNC): Allow an incomplete sequence of
118611         units at the end of the input string.
118612         * modules/uniconv/u16-conv-to-enc (Depends-on): Update.
118614 2008-04-20  Bruno Haible  <bruno@clisp.org>
118616         * tests/uniconv/test-u8-conv-to-enc.c (main): Accept result == NULL
118617         when the resulting length is 0.
118618         * tests/uniconv/test-u16-conv-to-enc.c (main): Likewise.
118620 2008-04-20  Bruno Haible  <bruno@clisp.org>
118622         * m4/roundf.m4 (gl_FUNC_ROUNDF): Add test whether roundf actually
118623         works.
118624         * doc/posix-functions/roundf.texi: Mention roundf bug on mingw.
118626 2008-04-20  Bruno Haible  <bruno@clisp.org>
118628         * tests/test-tsearch.c (main): Don't use initstate if it is missing.
118629         * modules/tsearch-tests (configure.ac): Test for initstate function.
118631 2008-04-20  Bruno Haible  <bruno@clisp.org>
118633         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Also provided a substitute
118634         for nlink_t if missing.
118635         * tests/test-sys_stat.c: Check the existence of the nlink_t type.
118637 2008-04-19  Bruno Haible  <bruno@clisp.org>
118639         Work around snprintf bug on Linux libc5.
118640         * m4/printf.m4 (gl_SNPRINTF_SIZE1): New macro.
118641         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
118642         gl_SNPRINTF_SIZE1.
118643         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
118644         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Likewise. Replace snprintf if
118645         that test failed.
118646         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Likewise.
118647         * lib/vasnprintf.c (USE_SNPRINTF): Set to 0 on Linux libc5 systems.
118648         * modules/snprintf (Files): Add m4/printf.m4.
118649         * modules/vsnprintf (Files): Likewise.
118650         * doc/posix-functions/snprintf.texi: Document Linux libc5 problem.
118651         * doc/posix-functions/vsnprintf.texi: Likewise.
118653 2008-04-19  Bruno Haible  <bruno@clisp.org>
118655         * lib/vasnprintf.c (floorlog10l, floorlog10): Reduce maximum error
118656         from 0.0058 to less than 10^-7.
118658 2008-04-19  Bruno Haible  <bruno@clisp.org>
118660         Fix rounding when a precision is given.
118661         * lib/vasnprintf.c (is_borderline): New function.
118662         (VASNPRINTF): For %e and %g, consider replacing the digits 10....0 with
118663         9...9x.
118664         * tests/test-vasnprintf-posix.c (test_function): Test rounding with %f,
118665         %e, %g.
118666         * tests/test-vasprintf-posix.c (test_function): Likewise.
118667         * tests/test-snprintf-posix.h (test_function): Likewise.
118668         * tests/test-sprintf-posix.h (test_function): Likewise.
118669         * tests/test-fprintf-posix.h (test_function): Test rounding with %f.
118670         * tests/test-printf-posix.h (test_function): Likewise.
118671         * tests/test-printf-posix.output: Update.
118672         Reported by John Darrington <john@darrington.wattle.id.au> via
118673         Ben Pfaff <blp@cs.stanford.edu>.
118675 2008-04-18  Simon Josefsson  <simon@josefsson.org>
118677         * doc/posix-functions/strftime.texi (strftime): Clarify platform.
118678         Suggested by Bruno Haible <bruno@clisp.org>.
118680 2008-04-17  Bruno Haible  <bruno@clisp.org>
118682         * lib/lock.h (gl_lock_destroy, gl_rwlock_destroy,
118683         gl_recursive_lock_destroy): Provide no-op definitions for the dummy
118684         implementation.
118685         Patch by Bruce Merry <bmerry@gmail.com>.
118687 2008-04-17  Simon Josefsson  <simon@josefsson.org>
118689         * doc/posix-functions/strftime.texi (strftime): Mention that %e
118690         doesn't work under Windows.
118692 2008-04-16  Bruno Haible  <bruno@clisp.org>
118694         * lib/localename.c (LANG_MAORI, LANG_QUECHUA, LANG_SOTHO, LANG_UIGHUR):
118695         New macros.
118696         (SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN,
118697         SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC,
118698         SUBLANG_CROATIAN_CROATIA, SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN,
118699         SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA, SUBLANG_MONGOLIAN_PRC,
118700         SUBLANG_QUECHUA_BOLIVIA, SUBLANG_QUECHUA_ECUADOR, SUBLANG_QUECHUA_PERU,
118701         SUBLANG_RUSSIAN_RUSSIA, SUBLANG_RUSSIAN_MOLDAVIA, SUBLANG_SPANISH_US,
118702         SUBLANG_TIBETAN_PRC, SUBLANG_TIBETAN_BHUTAN, SUBLANG_UIGHUR_PRC): New
118703         macros.
118704         (gl_locale_name_from_win32_LANGID): Refine code for Croatian/Bosnian,
118705         Mongolian, Russian, Spanish, Tibetan. Add code for Maori, Quechua,
118706         Northern Sotho, Uighur.
118708 2008-04-16  Bruno Haible  <bruno@clisp.org>
118710         * lib/localename.c (SUBLANG_SINDHI_INDIA): New macro.
118711         (SUBLANG_SINDHI_PAKISTAN): Change value from 1 to 2.
118712         (gl_locale_name_from_win32_LANGID): Fix code for Sindhi.
118713         Reported by Daniel Bergström <daniel@octocode.com>.
118715 2007-12-25  KJK::Hyperion  <hackbunny@reactos.com>
118716             Bruno Haible  <bruno@clisp.org>
118718         * lib/localename.c (gl_locale_name_canonicalize) [WIN32_NATIVE]: New
118719         function.
118720         (gl_locale_name_from_win32_LANGID, gl_locale_name_from_win32_LCID):
118721         New functions, mostly extracted from gl_locale_name_default.
118722         (gl_locale_name_default): Use gl_locale_name_from_win32_LCID.
118724 2008-04-16  Eric Blake  <ebb9@byu.net>
118726         Adjust strtod detection to catch glibc 2.7 bug.
118727         * m4/strtod.m4 (gl_FUNC_STRTOD): Test "nan()" behavior.
118728         Reported by John Gatewood Ham.
118730 2008-04-16  Bruno Haible  <bruno@clisp.org>
118732         Add tentative support for Linux libc5.
118733         * lib/fbufmode.c (fbufmode) [__GNU_LIBRARY__==1]: Reuse glibc2 code.
118734         * lib/fpurge.c (fpurge): Likewise.
118735         * lib/freadable.c (freadable): Likewise.
118736         * lib/freadahead.c (freadahead): Likewise.
118737         * lib/freading.c (freading): Likewise.
118738         * lib/freadptr.c (freadptr): Likewise.
118739         * lib/freadseek.c (freadptrinc): Likewise.
118740         * lib/fseeko.c (rpl_fseeko): Likewise.
118741         * lib/fseterr.c (fseterr): Likewise.
118742         * lib/fwritable.c (fwritable): Likewise.
118743         * lib/fwriting.c (fwriting): Likewise.
118744         Reported by Alain Guibert <alguibert+bts@free.fr>.
118746 2008-04-15  Bruno Haible  <bruno@clisp.org>
118748         * modules/mathl (configure.ac): Define module indicator.
118750 2008-04-15  Bruno Haible  <bruno@clisp.org>
118752         * lib/logl.c (logl): Remove unused variables.
118754 2008-04-15  Bruno Haible  <bruno@clisp.org>
118756         * lib/uniconv/u-conv-to-enc.h (FUNC): Fix return value when U_TO_U8
118757         fails.
118759 2008-04-15  Bruno Haible  <bruno@clisp.org>
118761         * lib/trim.c (trim2): Fix argument of isspace() macro.
118763 2008-04-15  Paolo Bonzini  <bonzini@gnu.org>
118765         * lib/tanl.c (kernel_tanl): Rename flag to invert, initialize it
118766         to 0.
118767         * lib/trigl.c (ieee754_rem_pio2l): Fix range checks.
118769 2008-04-14  Bruno Haible  <bruno@clisp.org>
118771         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Fix underquoting of
118772         AC_LANG_PROGRAM argument.
118773         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Likewise.
118774         * m4/gethrxtime.m4 (gl_ARITHMETIC_HRTIME_T): Likewise.
118775         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Likewise.
118776         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
118777         * m4/math_h.m4 (gl_MATH_H): Likewise.
118778         * m4/mbstate_t.m4 (AC_TYPE_MBSTATE_T): Likewise.
118779         * m4/memmem.m4 (gl_FUNC_MEMMEM): Likewise.
118780         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Likewise.
118781         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Likewise.
118782         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
118783         * m4/regex.m4 (gl_REGEX): Likewise.
118784         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Likewise.
118785         * m4/stdio_h.m4 (gl_STDIN_LARGE_OFFSET): Likewise.
118786         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
118787         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): Likewise.
118788         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
118789         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
118790         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
118791         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
118793 2008-04-14  Jim Meyering  <meyering@redhat.com>
118795         test-strtod: fix typos: s/abs/fabs/
118796         * tests/test-strtod.c (main): Use fabs, not narrowing-to-int "abs".
118798 2008-04-13  Bruno Haible  <bruno@clisp.org>
118800         Fix conflict between modules 'canonicalize' and 'canonicalize-lgpl'.
118801         * lib/canonicalize-lgpl.c: Elide the contents if the 'canonicalize'
118802         module is also used and while not building the reloc-wrapper.
118804 2008-04-13  Bruno Haible  <bruno@clisp.org>
118806         * tests/test-getaddrinfo.c (simple): Ignore EAI_NODATA error.
118808 2008-04-13  Bruno Haible  <bruno@clisp.org>
118810         Fix AIX compilation failure introduced on 2008-04-02.
118811         * tests/test-frexp.c (exp): Undefine before redefining.
118812         * tests/test-frexpl.c (exp): Likewise.
118814 2008-04-13  Bruno Haible  <bruno@clisp.org>
118816         Work around a HP-UX stdio bug.
118817         * tests/test-ftell.c (main): Disable the fseek/ftell test on HP-UX.
118818         * tests/test-ftello.c (main): Likewise.
118819         * doc/posix-functions/ftell.texi: Mention HP-UX bug.
118820         * doc/posix-functions/ftello.texi: Likewise.
118822 2008-04-13  Bruno Haible  <bruno@clisp.org>
118824         Make test-signbit pass on HP-UX/hppa.
118825         * tests/test-signbit.c (minus_zerol): New variable.
118826         (test_signbitl): Use it.
118828 2008-04-13  Bruno Haible  <bruno@clisp.org>
118830         Make truncl work on OSF/1 4.0.
118831         * m4/truncl.m4 (gl_FUNC_TRUNCL): Test whether truncl actually works.
118832         Set REPLACE_TRUNCL, not HAVE_DECL_TRUNCL.
118833         * lib/math.in.h (truncl): Test REPLACE_TRUNCL, not HAVE_DECL_TRUNCL.
118834         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_TRUNCL, not
118835         HAVE_DECL_TRUNCL.
118836         * modules/math (Makefile.am): Substitute REPLACE_TRUNCL, not
118837         HAVE_DECL_TRUNCL.
118838         * doc/posix-functions/truncl.texi: Document the OSF/1 4.0 problem.
118840 2008-04-13  Bruno Haible  <bruno@clisp.org>
118842         * lib/unictype.h: Remove trailing comma from enumeration definitions.
118844 2008-04-13  Bruno Haible  <bruno@clisp.org>
118846         * lib/count-one-bits.h (COUNT_ONE_BITS): Rewrite verification
118847         expression, so as to avoid HP-UX 11 cc compiler bug.
118849 2008-04-13  Bruno Haible  <bruno@clisp.org>
118851         * m4/regex.m4 (gl_PREREQ_REGEX): Also check for <libintl.h>.
118853 2008-04-13  Bruno Haible  <bruno@clisp.org>
118855         * lib/git-merge-changelog.c: Remove empty declaration outside of
118856         functions.
118858 2008-04-13  Bruno Haible  <bruno@clisp.org>
118860         * modules/quotearg-tests (Makefile.am): Define test_quotearg_LDADD.
118862 2008-04-13  Bruno Haible  <bruno@clisp.org>
118864         * doc/posix-headers/sys_socket.texi: Document the problem on EMX.
118865         * lib/sys_socket.in.h (SHUT_RD, SHUT_WR, SHUT_RDWR): Define if missing.
118866         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Replace <sys/socket.h>
118867         also if it exists but lacks definitions of the SHUT_* macros.
118868         * modules/sys_socket (Description): Update.
118869         Reported by Elbert Pol <e.pol@chello.nl>.
118871 2008-04-13  Bruno Haible  <bruno@clisp.org>
118873         * lib/localcharset.c (OS2): Don't redefine if already defined.
118874         Reported by Elbert Pol <e.pol@chello.nl>.
118876 2008-04-13  Bruno Haible  <bruno@clisp.org>
118878         * lib/binary-io.h [__EMX__]: Include <io.h>.
118879         Reported by Elbert Pol <e.pol@chello.nl>.
118881 2008-04-12  Bruno Haible  <bruno@clisp.org>
118883         * lib/fpucw.h: Enable the definitions also for x86_64.
118884         Needed for NetBSD/x86_64.
118885         Reported by Thomas Klausner <tk@giga.or.at>.
118887 2008-04-12  Bruno Haible  <bruno@clisp.org>
118889         * tests/test-strtod.c: Include isnand.h.
118890         (main): Use isnand instead of isnan.
118891         Reported by Jim Meyering.
118893 2008-04-12  Bruno Haible  <bruno@clisp.org>
118895         * m4/isnanf.m4 (gl_ISNANF_WORKS): Add a test for a special NaN.
118896         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
118898 2008-04-12  Jim Meyering  <meyering@redhat.com>
118900         * m4/math_h.m4 (gl_MATH_H): Fix typos.
118902 2008-04-12  Bruno Haible  <bruno@clisp.org>
118904         * lib/freadptr.c (freadptr) [__EMX__]: Fix wrong assertion.
118905         Reported by Elbert Pol <e.pol@chello.nl>.
118907 2008-04-12  Eric Blake  <ebb9@byu.net>
118909         Work around Solaris 10 math.h bug.
118910         * m4/math_h.m4 (gl_MATH_H): Check for bug.
118911         (gl_MATH_H_DEFAULTS): Set up default.
118912         * modules/math (Makefile.am): Replace new indicators.
118913         * lib/math.in.h (NAN, HUGE_VAL): Provide replacements.
118914         * tests/test-math.c (main): Test this.
118915         * m4/strtod.m4 (gl_FUNC_STRTOD): Don't rely on HUGE_VAL.
118916         * doc/posix-headers/math.texi (math.h): Mention bug.
118917         Reported by Nelson H. F. Beebe and Jim Meyering.
118919 2008-04-11  Bruno Haible  <bruno@clisp.org>
118921         Adapt to future versions of Apple GCC.
118922         * lib/argp-fmtstream.h (ARGP_FS_EI): Don't test __GNUC_GNU_INLINE__.
118923         Reported by Peter O'Gorman <peter@pogma.com>.
118925 2008-04-11  Bruno Haible  <bruno@clisp.org>
118927         * tests/test-getaddrinfo.c (simple): Ignore EAI_NONAME error.
118929 2008-04-11  Bruno Haible  <bruno@clisp.org>
118931         * modules/strsignal-tests (Makefile.am): Define test_strsignal_LDADD.
118933         * modules/getaddrinfo-tests (Makefile.am): Define
118934         test_getaddrinfo_LDADD.
118936 2008-04-11  Bruno Haible  <bruno@clisp.org>
118938         * lib/strsignal.c (_sys_siglist): Don't declare if already declared.
118939         (init): Fix syntax error.
118940         * m4/strsignal.m4 (gl_PREREQ_STRSIGNAL): Check whether _sys_siglist
118941         is declared.
118943 2008-04-11  Bruno Haible  <bruno@clisp.org>
118945         * lib/glob.c: Include <stdbool.h>. Needed at least with IRIX cc.
118946         * modules/glob (Depends-on): Add stdbool.
118948 2008-04-11  Bruno Haible  <bruno@clisp.org>
118950         * lib/trim.c: Include <string.h>.
118952 2008-04-11  Eric Blake  <ebb9@byu.net>
118954         Avoid compile failure on OS/2.
118955         * lib/regex_internal.h (internal_function): Disable optimization
118956         on OS/2 (__EMX__), where it caused compiler error.
118957         Reported by Elbert Pol.
118959 2008-04-11  Bruno Haible  <bruno@clisp.org>
118961         Flush the standard error stream before aborting. Needed on mingw.
118962         * tests/test-argmatch.c (ASSERT): Call fflush(stderr) before abort().
118963         * tests/test-array_list.c (ASSERT): Likewise.
118964         * tests/test-array_oset.c (ASSERT): Likewise.
118965         * tests/test-avltree_list.c (ASSERT): Likewise.
118966         * tests/test-avltree_oset.c (ASSERT): Likewise.
118967         * tests/test-avltreehash_list.c (ASSERT): Likewise.
118968         * tests/test-binary-io.c (ASSERT): Likewise.
118969         * tests/test-byteswap.c (ASSERT): Likewise.
118970         * tests/test-c-ctype.c (ASSERT): Likewise.
118971         * tests/test-c-strcasecmp.c (ASSERT): Likewise.
118972         * tests/test-c-strcasestr.c (ASSERT): Likewise.
118973         * tests/test-c-strncasecmp.c (ASSERT): Likewise.
118974         * tests/test-c-strstr.c (ASSERT): Likewise.
118975         * tests/test-canonicalize-lgpl.c (ASSERT): Likewise.
118976         * tests/test-canonicalize.c (ASSERT): Likewise.
118977         * tests/test-carray_list.c (ASSERT): Likewise.
118978         * tests/test-ceilf1.c (ASSERT): Likewise.
118979         * tests/test-ceilf2.c (ASSERT): Likewise.
118980         * tests/test-ceill.c (ASSERT): Likewise.
118981         * tests/test-count-one-bits.c (ASSERT): Likewise.
118982         * tests/test-fbufmode.c (ASSERT): Likewise.
118983         * tests/test-fflush2.c (ASSERT): Likewise.
118984         * tests/test-floorf1.c (ASSERT): Likewise.
118985         * tests/test-floorf2.c (ASSERT): Likewise.
118986         * tests/test-floorl.c (ASSERT): Likewise.
118987         * tests/test-fopen.c (ASSERT): Likewise.
118988         * tests/test-fpending.c (ASSERT): Likewise.
118989         * tests/test-fprintf-posix.c (ASSERT): Likewise.
118990         * tests/test-fpurge.c (ASSERT): Likewise.
118991         * tests/test-freadable.c (ASSERT): Likewise.
118992         * tests/test-freadahead.c (ASSERT): Likewise.
118993         * tests/test-freading.c (ASSERT): Likewise.
118994         * tests/test-freadptr.c (ASSERT): Likewise.
118995         * tests/test-freadptr2.c (ASSERT): Likewise.
118996         * tests/test-freadseek.c (ASSERT): Likewise.
118997         * tests/test-freopen.c (ASSERT): Likewise.
118998         * tests/test-frexp.c (ASSERT): Likewise.
118999         * tests/test-frexpl.c (ASSERT): Likewise.
119000         * tests/test-fseek.c (ASSERT): Likewise.
119001         * tests/test-fseeko.c (ASSERT): Likewise.
119002         * tests/test-fstrcmp.c (ASSERT): Likewise.
119003         * tests/test-ftell.c (ASSERT): Likewise.
119004         * tests/test-ftello.c (ASSERT): Likewise.
119005         * tests/test-func.c (ASSERT): Likewise.
119006         * tests/test-fwritable.c (ASSERT): Likewise.
119007         * tests/test-fwriting.c (ASSERT): Likewise.
119008         * tests/test-getdelim.c (ASSERT): Likewise.
119009         * tests/test-getline.c (ASSERT): Likewise.
119010         * tests/test-i-ring.c (ASSERT): Likewise.
119011         * tests/test-iconv-utf.c (ASSERT): Likewise.
119012         * tests/test-iconv.c (ASSERT): Likewise.
119013         * tests/test-isfinite.c (ASSERT): Likewise.
119014         * tests/test-isnand.c (ASSERT): Likewise.
119015         * tests/test-isnanf.c (ASSERT): Likewise.
119016         * tests/test-isnanl.h (ASSERT): Likewise.
119017         * tests/test-ldexpl.c (ASSERT): Likewise.
119018         * tests/test-linked_list.c (ASSERT): Likewise.
119019         * tests/test-linkedhash_list.c (ASSERT): Likewise.
119020         * tests/test-localename.c (ASSERT): Likewise.
119021         * tests/test-lseek.c (ASSERT): Likewise.
119022         * tests/test-mbscasecmp.c (ASSERT): Likewise.
119023         * tests/test-mbscasestr1.c (ASSERT): Likewise.
119024         * tests/test-mbscasestr2.c (ASSERT): Likewise.
119025         * tests/test-mbscasestr3.c (ASSERT): Likewise.
119026         * tests/test-mbscasestr4.c (ASSERT): Likewise.
119027         * tests/test-mbschr.c (ASSERT): Likewise.
119028         * tests/test-mbscspn.c (ASSERT): Likewise.
119029         * tests/test-mbsncasecmp.c (ASSERT): Likewise.
119030         * tests/test-mbspbrk.c (ASSERT): Likewise.
119031         * tests/test-mbspcasecmp.c (ASSERT): Likewise.
119032         * tests/test-mbsrchr.c (ASSERT): Likewise.
119033         * tests/test-mbsspn.c (ASSERT): Likewise.
119034         * tests/test-mbsstr1.c (ASSERT): Likewise.
119035         * tests/test-mbsstr2.c (ASSERT): Likewise.
119036         * tests/test-mbsstr3.c (ASSERT): Likewise.
119037         * tests/test-memchr2.c (ASSERT): Likewise.
119038         * tests/test-memmem.c (ASSERT): Likewise.
119039         * tests/test-open.c (ASSERT): Likewise.
119040         * tests/test-printf-frexp.c (ASSERT): Likewise.
119041         * tests/test-printf-frexpl.c (ASSERT): Likewise.
119042         * tests/test-printf-posix.c (ASSERT): Likewise.
119043         * tests/test-quotearg.c (ASSERT): Likewise.
119044         * tests/test-rbtree_list.c (ASSERT): Likewise.
119045         * tests/test-rbtree_oset.c (ASSERT): Likewise.
119046         * tests/test-rbtreehash_list.c (ASSERT): Likewise.
119047         * tests/test-round1.c (ASSERT): Likewise.
119048         * tests/test-roundf1.c (ASSERT): Likewise.
119049         * tests/test-roundl.c (ASSERT): Likewise.
119050         * tests/test-signbit.c (ASSERT): Likewise.
119051         * tests/test-sleep.c (ASSERT): Likewise.
119052         * tests/test-snprintf-posix.c (ASSERT): Likewise.
119053         * tests/test-snprintf.c (ASSERT): Likewise.
119054         * tests/test-sprintf-posix.c (ASSERT): Likewise.
119055         * tests/test-stat-time.c (ASSERT): Likewise.
119056         * tests/test-strcasestr.c (ASSERT): Likewise.
119057         * tests/test-strerror.c (ASSERT): Likewise.
119058         * tests/test-striconv.c (ASSERT): Likewise.
119059         * tests/test-striconveh.c (ASSERT): Likewise.
119060         * tests/test-striconveha.c (ASSERT): Likewise.
119061         * tests/test-strsignal.c (ASSERT): Likewise.
119062         * tests/test-strstr.c (ASSERT): Likewise.
119063         * tests/test-strtod.c (ASSERT): Likewise.
119064         * tests/test-trunc1.c (ASSERT): Likewise.
119065         * tests/test-trunc2.c (ASSERT): Likewise.
119066         * tests/test-truncf1.c (ASSERT): Likewise.
119067         * tests/test-truncf2.c (ASSERT): Likewise.
119068         * tests/test-truncl.c (ASSERT): Likewise.
119069         * tests/test-vasnprintf-posix.c (ASSERT): Likewise.
119070         * tests/test-vasnprintf-posix2.c (ASSERT): Likewise.
119071         * tests/test-vasnprintf.c (ASSERT): Likewise.
119072         * tests/test-vasprintf-posix.c (ASSERT): Likewise.
119073         * tests/test-vasprintf.c (ASSERT): Likewise.
119074         * tests/test-vfprintf-posix.c (ASSERT): Likewise.
119075         * tests/test-vprintf-posix.c (ASSERT): Likewise.
119076         * tests/test-vsnprintf-posix.c (ASSERT): Likewise.
119077         * tests/test-vsnprintf.c (ASSERT): Likewise.
119078         * tests/test-vsprintf-posix.c (ASSERT): Likewise.
119079         * tests/test-wcwidth.c (ASSERT): Likewise.
119080         * tests/test-xfprintf-posix.c (ASSERT): Likewise.
119081         * tests/test-xprintf-posix.c (ASSERT): Likewise.
119082         * tests/test-xvasprintf.c (ASSERT): Likewise.
119083         * tests/uniconv/test-u16-conv-from-enc.c (ASSERT): Likewise.
119084         * tests/uniconv/test-u16-conv-to-enc.c (ASSERT): Likewise.
119085         * tests/uniconv/test-u16-strconv-from-enc.c (ASSERT): Likewise.
119086         * tests/uniconv/test-u16-strconv-to-enc.c (ASSERT): Likewise.
119087         * tests/uniconv/test-u32-conv-from-enc.c (ASSERT): Likewise.
119088         * tests/uniconv/test-u32-conv-to-enc.c (ASSERT): Likewise.
119089         * tests/uniconv/test-u32-strconv-from-enc.c (ASSERT): Likewise.
119090         * tests/uniconv/test-u32-strconv-to-enc.c (ASSERT): Likewise.
119091         * tests/uniconv/test-u8-conv-from-enc.c (ASSERT): Likewise.
119092         * tests/uniconv/test-u8-conv-to-enc.c (ASSERT): Likewise.
119093         * tests/uniconv/test-u8-strconv-from-enc.c (ASSERT): Likewise.
119094         * tests/uniconv/test-u8-strconv-to-enc.c (ASSERT): Likewise.
119095         * tests/unictype/test-bidi_byname.c (ASSERT): Likewise.
119096         * tests/unictype/test-bidi_name.c (ASSERT): Likewise.
119097         * tests/unictype/test-bidi_of.c (ASSERT): Likewise.
119098         * tests/unictype/test-bidi_test.c (ASSERT): Likewise.
119099         * tests/unictype/test-block_list.c (ASSERT): Likewise.
119100         * tests/unictype/test-block_of.c (ASSERT): Likewise.
119101         * tests/unictype/test-block_test.c (ASSERT): Likewise.
119102         * tests/unictype/test-categ_and.c (ASSERT): Likewise.
119103         * tests/unictype/test-categ_and_not.c (ASSERT): Likewise.
119104         * tests/unictype/test-categ_byname.c (ASSERT): Likewise.
119105         * tests/unictype/test-categ_name.c (ASSERT): Likewise.
119106         * tests/unictype/test-categ_none.c (ASSERT): Likewise.
119107         * tests/unictype/test-categ_of.c (ASSERT): Likewise.
119108         * tests/unictype/test-categ_or.c (ASSERT): Likewise.
119109         * tests/unictype/test-categ_test_withtable.c (ASSERT): Likewise.
119110         * tests/unictype/test-combining.c (ASSERT): Likewise.
119111         * tests/unictype/test-decdigit.c (ASSERT): Likewise.
119112         * tests/unictype/test-digit.c (ASSERT): Likewise.
119113         * tests/unictype/test-mirror.c (ASSERT): Likewise.
119114         * tests/unictype/test-numeric.c (ASSERT): Likewise.
119115         * tests/unictype/test-pr_byname.c (ASSERT): Likewise.
119116         * tests/unictype/test-pr_test.c (ASSERT): Likewise.
119117         * tests/unictype/test-predicate-part1.h (ASSERT): Likewise.
119118         * tests/unictype/test-scripts.c (ASSERT): Likewise.
119119         * tests/unictype/test-sy_c_ident.c (ASSERT): Likewise.
119120         * tests/unictype/test-sy_java_ident.c (ASSERT): Likewise.
119121         * tests/unistdio/test-u16-asnprintf1.c (ASSERT): Likewise.
119122         * tests/unistdio/test-u16-vasnprintf1.c (ASSERT): Likewise.
119123         * tests/unistdio/test-u16-vasnprintf2.c (ASSERT): Likewise.
119124         * tests/unistdio/test-u16-vasnprintf3.c (ASSERT): Likewise.
119125         * tests/unistdio/test-u16-vasprintf1.c (ASSERT): Likewise.
119126         * tests/unistdio/test-u16-vsnprintf1.c (ASSERT): Likewise.
119127         * tests/unistdio/test-u16-vsprintf1.c (ASSERT): Likewise.
119128         * tests/unistdio/test-u32-asnprintf1.c (ASSERT): Likewise.
119129         * tests/unistdio/test-u32-vasnprintf1.c (ASSERT): Likewise.
119130         * tests/unistdio/test-u32-vasnprintf2.c (ASSERT): Likewise.
119131         * tests/unistdio/test-u32-vasnprintf3.c (ASSERT): Likewise.
119132         * tests/unistdio/test-u32-vasprintf1.c (ASSERT): Likewise.
119133         * tests/unistdio/test-u32-vsnprintf1.c (ASSERT): Likewise.
119134         * tests/unistdio/test-u32-vsprintf1.c (ASSERT): Likewise.
119135         * tests/unistdio/test-u8-asnprintf1.c (ASSERT): Likewise.
119136         * tests/unistdio/test-u8-vasnprintf1.c (ASSERT): Likewise.
119137         * tests/unistdio/test-u8-vasnprintf2.c (ASSERT): Likewise.
119138         * tests/unistdio/test-u8-vasnprintf3.c (ASSERT): Likewise.
119139         * tests/unistdio/test-u8-vasprintf1.c (ASSERT): Likewise.
119140         * tests/unistdio/test-u8-vsnprintf1.c (ASSERT): Likewise.
119141         * tests/unistdio/test-u8-vsprintf1.c (ASSERT): Likewise.
119142         * tests/unistdio/test-ulc-asnprintf1.c (ASSERT): Likewise.
119143         * tests/unistdio/test-ulc-vasnprintf1.c (ASSERT): Likewise.
119144         * tests/unistdio/test-ulc-vasnprintf2.c (ASSERT): Likewise.
119145         * tests/unistdio/test-ulc-vasnprintf3.c (ASSERT): Likewise.
119146         * tests/unistdio/test-ulc-vasprintf1.c (ASSERT): Likewise.
119147         * tests/unistdio/test-ulc-vsnprintf1.c (ASSERT): Likewise.
119148         * tests/unistdio/test-ulc-vsprintf1.c (ASSERT): Likewise.
119149         * tests/uniwidth/test-u16-strwidth.c (ASSERT): Likewise.
119150         * tests/uniwidth/test-u16-width.c (ASSERT): Likewise.
119151         * tests/uniwidth/test-u32-strwidth.c (ASSERT): Likewise.
119152         * tests/uniwidth/test-u32-width.c (ASSERT): Likewise.
119153         * tests/uniwidth/test-u8-strwidth.c (ASSERT): Likewise.
119154         * tests/uniwidth/test-u8-width.c (ASSERT): Likewise.
119155         * tests/uniwidth/test-uc_width.c (ASSERT): Likewise.
119156         Reported by Eric Blake.
119158 2008-04-11  Bruno Haible  <bruno@clisp.org>
119160         * lib/wchar.in.h: Tweak comment.
119162 2008-04-11  Bruno Haible  <bruno@clisp.org>
119164         Fix __GNUC_STDC_INLINE__ predefine with Apple GCC on MacOS X 10.5.
119165         * gnulib-tool (func_emit_initmacro_start): Emit an invocation of
119166         gl_COMMON.
119167         * m4/gnulib-common.m4 (gl_COMMON, gl_COMMON_BODY): New macros.
119169 2008-04-11  Bruno Haible  <bruno@clisp.org>
119171         * modules/git-merge-changelog (git_merge_changelog_LDADD): Add LIBINTL.
119173 2008-04-11  Simon Josefsson  <simon@josefsson.org>
119175         * lib/gc-gnulib.c: On Windows, use CryptGenRandom from CSP instead
119176         of attempting to use nonexistent /dev/*random.  Based on patch
119177         from Adam Strzelecki <ono@java.pl> in
119178         <http://lists.gnu.org/r/help-gsasl/2008-02/msg00000.html>.
119180 2008-04-08  Bruno Haible  <bruno@clisp.org>
119182         Add tentative support for emx+gcc.
119183         * lib/fbufmode.c (fbufmode) [__EMX__]: Add conditional code.
119184         * lib/fpurge.c (fpurge): Likewise.
119185         * lib/freadable.c (freadable): Likewise.
119186         * lib/freadahead.c (freadahead): Likewise.
119187         * lib/freading.c (freading): Likewise.
119188         * lib/freadptr.c (freadptr): Likewise.
119189         * lib/freadseek.c (freadptrinc): Likewise.
119190         * lib/fseeko.c (rpl_fseeko): Likewise.
119191         * lib/fseterr.c (fseterr): Likewise.
119192         * lib/fwritable.c (fwritable): Likewise.
119193         * lib/fwriting.c (fwriting): Likewise.
119194         * m4/fpending.m4 (gl_FUNC_FPENDING): Add a variant for emx+gcc.
119196 2008-04-09  Eric Blake  <ebb9@byu.net>
119198         Avoid some autoconf warnings.
119199         * m4/regex.m4 (gl_REGEX): s/AC_HELP_STRING/AS_HELP_STRING/.
119200         * m4/acl.m4 (gl_FUNC_ACL): Likewise.
119201         * m4/afs.m4 (gl_AFS): Likewise.
119202         * m4/gc-random.m4 (gl_GC_RANDOM): Likewise.
119203         * m4/include_next.m4 (gl_INCLUDE_NEXT): s/AC_FOREACH/m4_foreach_w/.
119204         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Likewise.
119205         * m4/stdint.m4 (gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED)
119206         (gl_INTEGER_TYPE_SUFFIX): Likewise.
119207         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE)
119208         (AC_CHECK_DECLS_ONCE): Likewise.
119209         Rename file...
119210         * m4/onceonly.m4: ...to this, and delete 2.54 variant, now that
119211         gnulib-tool requires autoconf 2.59 or better.
119212         * gnulib-tool (func_get_filelist): s/\(onceonly\)_2_57.m4/\1.m4/.
119214 2008-04-08  Eric Blake  <ebb9@byu.net>
119216         Use 'git describe --match' if present (added in git 1.5.5).
119217         * build-aux/git-version-gen: Limit result to tags that match 'v*'
119218         if possible.
119220 2008-04-08  Bruno Haible  <bruno@clisp.org>
119222         Add tentative support for OpenServer.
119223         * lib/fbufmode.c (fbufmode): Add conditional define for _flag, _base,
119224         _ptr, _cnt.
119225         * lib/fpurge.c (fpurge): Likewise.
119226         * lib/freadable.c (freadable): Likewise.
119227         * lib/freadahead.c (freadahead): Likewise.
119228         * lib/freading.c (freading): Likewise.
119229         * lib/freadptr.c (freadptr): Likewise.
119230         * lib/freadseek.c (freadptrinc): Likewise.
119231         * lib/fseeko.c (rpl_fseeko): Likewise.
119232         * lib/fseterr.c (fseterr): Likewise.
119233         * lib/fwritable.c (fwritable): Likewise.
119234         * lib/fwriting.c (fwriting): Likewise.
119235         Reported by Roger Cornelius <rac@tenzing.org> and
119236         Brian K. White <brian@aljex.com>.
119238 2008-04-06  Jim Meyering  <meyering@redhat.com>
119240         * gnulib-tool (func_add_or_update): s/backuped/backed up/ in diagnostic
119242 2008-04-06  Bruno Haible  <bruno@clisp.org>
119244         Avoid possible error with non-ASCII bytes in UTF-8 locales.
119245         * tests/test-fprintf-posix.sh: Use "LC_ALL=C tr" instead of "tr".
119246         * tests/test-printf-posix.sh: Likewise.
119247         * tests/test-vfprintf-posix.sh: Likewise.
119248         * tests/test-vprintf-posix.sh: Likewise.
119249         * tests/test-xprintf-posix.sh: Likewise.
119251 2008-04-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
119253         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT): Fix quoting,
119254         hide error from 'ls', needed on OS/2.
119255         Report by Elbert Pol <elbert.pol@gmail.com>.
119257 2008-04-04  Eric Blake  <ebb9@byu.net>
119259         Make test-fseeko.c failures meaningful.
119260         * tests/test-fseeko.c: Print line number on failure.
119261         * tests/test-fseek.c: Likewise.
119262         Reported by Nelson H. F. Beebe.
119264         Improve strtod bug detection check.
119265         * m4/strtod.m4 (gl_FUNC_STRTOD): Also check for hex-float parsing,
119266         required for Solaris 10.
119267         Reported by Bob Friesenhahn and Nelson H. F. Beebe.
119269 2008-04-04  Bruno Haible  <bruno@clisp.org>
119271         * modules/relocatable-prog-wrapper (Files): Add m4/environ.m4. Needed
119272         by m4/setenv.m4.
119274 2008-04-03  Eric Blake  <ebb9@byu.net>
119276         Ensure sane .version contents.
119277         * top/GNUmakefile (_dummy): Also delete .version when rebuilding
119278         version string.
119279         * build-aux/git-version-gen: Improve documentation.
119281         Make GNU make output nicer.
119282         * top/GNUmakefile [!_have-Makefile]: Add dependency on
119283         MAKECMDGOALS to enforce message for all command line targets.  Set
119284         srcdir for use in maint.mk.
119286         Another maintainer tweak.
119287         * top/GNUmakefile (_is-dist-target): Allow maintainer-distcheck as
119288         a target that regenerates version.
119290 2008-04-03  Jim Meyering  <meyering@redhat.com>
119292         vc-list-files: don't cause coreutils "make po-check" failure
119293         * build-aux/vc-list-files: Skip postprocessing when $2 is '.'
119295 2008-04-03  Eric Blake  <ebb9@byu.net>
119297         Allow VPATH usage of vc-list-files.
119298         * build-aux/vc-list-files (scriptversion): Add timestamp.
119299         (options): Add --help, --version, -C.
119300         (CVS): Support installed cvsu.
119302 2008-04-02  Bruno Haible  <bruno@clisp.org>
119304         Avoid some "statement with no effect" warnings from gcc.
119305         * tests/test-wctype.c (main): Explicitly ignore unused values.
119306         Reported by Jim Meyering.
119308 2008-04-02  Jim Meyering  <meyering@redhat.com>
119310         Avoid some warnings from "gcc -Wshadow".
119311         * tests/test-frexp.c (exp): Define to a different identifier.
119312         * tests/test-frexpl.c (exp): Likewise.
119314 2008-04-03  Jim Meyering  <meyering@redhat.com>
119316         bootstrap: remove dangling *.[ch] symlinks from lib
119317         * build-aux/bootstrap [dangling symlink removal]: Move find's
119318         -depth option to precede all others, to avoid a warning.
119319         Remove *.[ch] files too, and from "$source_base" (usually lib/).
119321 2008-04-02  Bruno Haible  <bruno@clisp.org>
119323         Avoid some warnings from "gcc -Wshadow".
119324         * tests/tests-vfprintf-posix.c (my_fprintf): Move after test_function.
119325         * tests/tests-vprintf-posix.c (my_printf): Move after test_function.
119326         * tests/tests-vsnprintf-posix.c (my_snprintf): Move after test_function.
119327         * tests/tests-vsprintf-posix.c (my_sprintf): Move after test_function.
119328         Reported by Jim Meyering.
119330 2008-04-01  Bruno Haible  <bruno@clisp.org>
119332         Fix test to work on IRIX 6.5 with cc.
119333         * tests/test-math.c (numeric_equal): New function.
119334         (main): Use it.
119336 2008-04-01  Bruno Haible  <bruno@clisp.org>
119338         * doc/posix-headers/math.texi: Refine documentation of NAN problem.
119340 2008-04-01  Bruno Haible  <bruno@clisp.org>
119342         * tests/test-vasnprintf-posix.c: Include nan.h instead of <math.h>.
119343         (test_function): Use NaNd, NaNl instead of NAN or 0.0L/0.0L.
119344         * modules/vasnprintf-posix-tests (Files): Add tests/nan.h.
119345         (Depends-on): Remove math.
119347         * tests/test-vasprintf-posix.c: Include nan.h instead of <math.h>.
119348         (test_function): Use NaNd, NaNl instead of NAN or 0.0L/0.0L.
119349         * modules/vasprintf-posix-tests (Files): Add tests/nan.h.
119350         (Depends-on): Remove math.
119352         * tests/test-snprintf-posix.h: Include nan.h instead of <math.h>.
119353         (test_function): Use NaNd, NaNl instead of NAN or 0.0L/0.0L.
119354         * modules/snprintf-posix-tests (Files): Add tests/nan.h.
119355         (Depends-on): Remove math.
119356         * modules/vsnprintf-posix-tests (Files): Add tests/nan.h.
119357         (Depends-on): Remove math.
119359         * tests/test-sprintf-posix.h: Include nan.h instead of <math.h>.
119360         (test_function): Use NaNd, NaNl instead of NAN or 0.0L/0.0L.
119361         * modules/sprintf-posix-tests (Files): Add tests/nan.h.
119362         (Depends-on): Remove math.
119363         * modules/vsprintf-posix-tests (Files): Add tests/nan.h.
119364         (Depends-on): Remove math.
119366         * tests/test-round1.c: Include nan.h.
119367         (main): Use NaNd instead of NAN.
119368         * modules/round-tests (Files): Add tests/nan.h.
119370         * tests/test-trunc1.c: Include nan.h.
119371         (main): Use NaNd instead of NAN.
119372         * modules/trunc-tests (Files): Add tests/nan.h.
119374         * tests/test-roundf1.c: Include nan.h.
119375         (main): Use NaNf instead of NAN.
119376         * modules/roundf-tests (Files): Add tests/nan.h.
119378         * tests/test-truncf1.c: Include nan.h.
119379         (main): Use NaNf instead of NAN.
119380         * modules/truncf-tests (Files): Add tests/nan.h.
119382         * tests/test-ceilf1.c: Include nan.h.
119383         (main): Use NaNf instead of NAN.
119384         * modules/ceilf-tests (Files): Add tests/nan.h.
119386         * tests/test-floorf1.c: Include nan.h.
119387         (main): Use NaNf instead of NAN.
119388         * modules/floorf-tests (Files): Add tests/nan.h.
119390         * tests/test-isnanf.c: Include nan.h instead of <math.h>.
119391         (main): Use NaNf instead of NAN.
119392         * modules/isnanf-nolibm-tests (Files): Add tests/nan.h.
119394         * tests/test-isnand.c: Include nan.h instead of <math.h>.
119395         (main): Use NaNd instead of NAN.
119396         * modules/isnand-nolibm-tests (Files): Add tests/nan.h.
119398         * tests/test-frexp.c: Include nan.h.
119399         (main): Use NaNd instead of NAN.
119400         * modules/frexp-tests (Files): Add tests/nan.h.
119402         * lib/isnan.c: Don't include <math.h>.
119403         (FUNC): Don't use NAN macro.
119404         * modules/isnand-nolibm (Depends-on): Remove math.
119405         * modules/isnanf-nolibm (Depends-on): Remove math.
119406         * modules/isnanl (Depends-on): Remove math.
119407         * modules/isnanl-nolibm (Depends-on): Remove math.
119409         * tests/nan.h: New file.
119411 2008-04-01  Eric Blake  <ebb9@byu.net>
119413         Fix typos.
119414         * tests/test-strtod.c (main): s/FLT_/DBL_/ for minimum and epsilon
119415         values to be the right type.
119417         For now, cater to gnulib strtod inaccuracies.
119418         * tests/test-strtod.c (main): Allow 1-ulp error on expected
119419         fractional results.  While not as nice from a QoI perspective, it
119420         is a quicker patch than correctly implementing decimal to binary
119421         rounding.
119423 2008-03-31  Eric Blake  <ebb9@byu.net>
119425         Guarantee a definition of NAN.
119426         * lib/math.in.h (NAN): Define if missing.
119427         * tests/test-math.c (main): Test it.
119428         * doc/posix-headers/math.texi (math.h): Document this.
119429         * lib/isnan.c (rpl_isnand): Use it.
119430         * tests/test-ceilf1.c (NaN): Delete, and use NAN instead.
119431         * tests/test-floorf1.c (NaN): Likewise.
119432         * tests/test-frexp.c (NaN): Likewise.
119433         * tests/test-isnand.c (NaN): Likewise.
119434         * tests/test-isnanf.c (NaN): Likewise.
119435         * tests/test-round1.c (NaN): Likewise.
119436         * tests/test-roundf1.c (NaN): Likewise.
119437         * tests/test-snprintf-posix.h (NaN): Likewise.
119438         * tests/test-sprintf-posix.h (NaN): Likewise.
119439         * tests/test-trunc1.c (NaN): Likewise.
119440         * tests/test-truncf1.c (NaN): Likewise.
119441         * tests/test-vasnprintf-posix.c (NaN): Likewise.
119442         * tests/test-vasprintf-posix.c (NaN): Likewise.
119443         * modules/isnand-nolibm (Depends-on): Add math.
119444         * modules/isnanf-nolibm (Depends-on): Likewise.
119445         * modules/isnanl (Depends-on): Likewise.
119446         * modules/isnanl-nolibm (Depends-on): Likewise.
119447         * modules/snprintf-posix-tests (Depends-on): Likewise.
119448         * modules/sprintf-posix-tests (Depends-on): Likewise.
119449         * modules/vsnprintf-posix-tests (Depends-on): Likewise.
119450         * modules/vsprintf-posix-tests (Depends-on): Likewise.
119451         * modules/vasnprintf-posix-tests (Depends-on): Likewise.
119452         * modules/vasprintf-posix-tests (Depends-on): Likewise.
119454 2008-03-31  Bruno Haible  <bruno@clisp.org>
119456         * tests/test-strtod.c (main): Update results for OSF/1 platforms.
119457         * doc/posix-functions/strtod.texi: Likewise.
119459 2008-03-31  Bruno Haible  <bruno@clisp.org>
119461         * tests/test-strtod.c (main): Don't use C99 syntax.
119463 2008-03-31  Bruno Haible  <bruno@clisp.org>
119465         * tests/test-strtod.c (main): Don't test NAN macro. Needed for Solaris.
119466         Reported by Eric Blake.
119468 2008-03-31  Jim Meyering  <meyering@redhat.com>
119470         Don't compare actual signbit return values.
119471         * tests/test-strtod.c (main): Rather, compare only their
119472         zero/non-zero nature.
119474 2008-03-31  Eric Blake  <ebb9@byu.net>
119476         More strtod documentation.
119477         * doc/posix-functions/strtod.texi (strtod): Interpret more test
119478         failures as distinct bugs.
119480 2008-03-30  Paul Eggert  <eggert@cs.ucla.edu>
119482         * lib/wchar.in.h [defined __need_mbstate_t]: Just include <wchar.h>.
119483         Problem reported by Erik Benada in
119484         <http://lists.gnu.org/r/bug-gnulib/2008-03/msg00249.html>.
119486 2008-03-30  Bruno Haible  <bruno@clisp.org>
119488         * tests/test-strtod.c: Add comments about which assertion fails on which
119489         platform.
119490         * doc/posix-functions/strtod.texi: Add info about many more platforms.
119492 2008-03-30  Eric Blake  <ebb9@byu.net>
119494         Test signbit behavior on zeros.
119495         * tests/test-signbit.c (test_signbitf): Add tests for zero.
119496         (test_signbitd, test_signbitl): Likewise.
119498         More strtod touchups.
119499         * tests/test-strtod.c (main): Ignore tests for signbit on NaN, and
119500         sign of negative underflow, for now.  Use .5, not .1.
119501         * doc/posix-functions/strtod.texi (strtod): Mention these
119502         limitations.
119503         Reported by Jim Meyering.
119505 2008-03-30  Bruno Haible  <bruno@clisp.org>
119507         * lib/striconveh.h (mem_iconveh, str_iconveh): Optimize the conversion
119508         from UTF-8 to UTF-8//TRANSLIT in the same way as from UTF-8 to UTF-8.
119510 2008-03-30  Bruno Haible  <bruno@clisp.org>
119512         Avoid failure when attempting to return empty iconv results on some
119513         platforms.
119514         * lib/striconveh.c (mem_cd_iconveh_internal): In the final memory
119515         allocation, don't report ENOMEM when the resulting string is empty.
119517 2008-03-30  Bruno Haible  <bruno@clisp.org>
119519         Fix buffer overrun.
119520         * lib/vasnprintf.c (VASNPRINTF): If !USE_SNPRINTF && pad_ourselves:
119521         Don't consider the width for tmp_length. Check count against tmp_length
119522         before doing the padding. Ensure enough allocation during padding.
119524 2008-03-30  Eric Blake  <ebb9@byu.net>
119526         strtod touchups.
119527         * lib/strtod.c (strtod): Avoid compiler warnings.
119528         Reported by Jim Meyering.
119530 2008-03-30  Bruno Haible  <bruno@clisp.org>
119532         * lib/unistdio/u-vsprintf.h (EOVERFLOW): Remove fallback.
119533         * modules/unistdio/ulc-vsprintf (Depends-on): Add EOVERFLOW.
119534         * modules/unistdio/u8-vsprintf (Depends-on): Add EOVERFLOW.
119535         * modules/unistdio/u8-u8-vsprintf (Depends-on): Add EOVERFLOW.
119536         * modules/unistdio/u16-vsprintf (Depends-on): Add EOVERFLOW.
119537         * modules/unistdio/u16-u16-vsprintf (Depends-on): Add EOVERFLOW.
119538         * modules/unistdio/u32-vsprintf (Depends-on): Add EOVERFLOW.
119539         * modules/unistdio/u32-u32-vsprintf (Depends-on): Add EOVERFLOW.
119541         * lib/unistdio/u-vsnprintf.h (EOVERFLOW): Remove fallback.
119542         * modules/unistdio/ulc-vsnprintf (Depends-on): Add EOVERFLOW.
119543         * modules/unistdio/u8-vsnprintf (Depends-on): Add EOVERFLOW.
119544         * modules/unistdio/u8-u8-vsnprintf (Depends-on): Add EOVERFLOW.
119545         * modules/unistdio/u16-vsnprintf (Depends-on): Add EOVERFLOW.
119546         * modules/unistdio/u16-u16-vsnprintf (Depends-on): Add EOVERFLOW.
119547         * modules/unistdio/u32-vsnprintf (Depends-on): Add EOVERFLOW.
119548         * modules/unistdio/u32-u32-vsnprintf (Depends-on): Add EOVERFLOW.
119550         * lib/unistdio/u-vasprintf.h (EOVERFLOW): Remove fallback.
119551         * modules/unistdio/ulc-vasprintf (Depends-on): Add EOVERFLOW.
119552         * modules/unistdio/u8-vasprintf (Depends-on): Add EOVERFLOW.
119553         * modules/unistdio/u8-u8-vasprintf (Depends-on): Add EOVERFLOW.
119554         * modules/unistdio/u16-vasprintf (Depends-on): Add EOVERFLOW.
119555         * modules/unistdio/u16-u16-vasprintf (Depends-on): Add EOVERFLOW.
119556         * modules/unistdio/u32-vasprintf (Depends-on): Add EOVERFLOW.
119557         * modules/unistdio/u32-u32-vasprintf (Depends-on): Add EOVERFLOW.
119559         * lib/unistdio/ulc-vfprintf.c (EOVERFLOW): Remove fallback.
119560         * modules/unistdio/ulc-vfprintf (Depends-on): Add EOVERFLOW.
119562         * lib/unistdio/ulc-fprintf.c (EOVERFLOW): Remove fallback.
119563         * modules/unistdio/ulc-fprintf (Depends-on): Add EOVERFLOW.
119565         * lib/xvasprintf.c (EOVERFLOW): Remove fallback.
119566         * modules/xvasprintf (Depends-on): Add EOVERFLOW.
119568         * lib/vsprintf.c (EOVERFLOW): Remove fallback.
119569         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Drop gl_EOVERFLOW.
119570         * modules/vsprintf-posix (Depends-on): Add EOVERFLOW.
119572         * lib/vsnprintf.c (EOVERFLOW): Remove fallback.
119573         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Drop gl_EOVERFLOW.
119574         * modules/vsnprintf (Depends-on): Add EOVERFLOW.
119576         * lib/vfprintf.c (EOVERFLOW): Remove fallback.
119577         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Drop gl_EOVERFLOW.
119578         * modules/vfprintf-posix (Depends-on): Add EOVERFLOW.
119580         * lib/vasprintf.c (EOVERFLOW): Remove fallback.
119581         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Drop gl_EOVERFLOW.
119582         * modules/vasprintf (Depends-on): Add EOVERFLOW.
119584         * lib/vasnprintf.c (EOVERFLOW): Remove fallback.
119585         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Drop gl_EOVERFLOW.
119586         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Drop gl_EOVERFLOW.
119587         * modules/vasnprintf (Files): Remove m4/eoverflow.m4.
119588         (Depends-on): Add EOVERFLOW.
119589         * modules/unistdio/ulc-vasnprintf (Files): Remove m4/eoverflow.m4.
119590         (Depends-on): Add EOVERFLOW.
119591         * modules/unistdio/u8-vasnprintf (Files): Remove m4/eoverflow.m4.
119592         (Depends-on): Add EOVERFLOW.
119593         * modules/unistdio/u8-u8-vasnprintf (Files): Remove m4/eoverflow.m4.
119594         (Depends-on): Add EOVERFLOW.
119595         * modules/unistdio/u16-vasnprintf (Files): Remove m4/eoverflow.m4.
119596         (Depends-on): Add EOVERFLOW.
119597         * modules/unistdio/u16-u16-vasnprintf (Files): Remove m4/eoverflow.m4.
119598         (Depends-on): Add EOVERFLOW.
119599         * modules/unistdio/u32-vasnprintf (Files): Remove m4/eoverflow.m4.
119600         (Depends-on): Add EOVERFLOW.
119601         * modules/unistdio/u32-u32-vasnprintf (Files): Remove m4/eoverflow.m4.
119602         (Depends-on): Add EOVERFLOW.
119604         * lib/sprintf.c (EOVERFLOW): Remove fallback.
119605         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Drop gl_EOVERFLOW.
119606         * modules/sprintf-posix (Depends-on): Add EOVERFLOW.
119608         * lib/snprintf.c (EOVERFLOW): Remove fallback.
119609         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Drop gl_EOVERFLOW.
119610         * modules/snprintf (Depends-on): Add EOVERFLOW.
119612         * lib/poll.c (EOVERFLOW): Remove fallback.
119613         * modules/poll (Depends-on): Add EOVERFLOW.
119615         * lib/getugroups.c (EOVERFLOW): Remove fallback.
119616         * modules/getugroups (Depends-on): Add EOVERFLOW.
119618         * lib/getdelim.c (EOVERFLOW): Remove fallback.
119619         * modules/getdelim (Depends-on): Add EOVERFLOW.
119621         * lib/ftell.c (EOVERFLOW): Remove fallback.
119622         * modules/ftell (Depends-on): Add EOVERFLOW.
119624         * lib/fprintf.c (EOVERFLOW): Remove fallback.
119625         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Drop gl_EOVERFLOW.
119626         * modules/fprintf-posix (Depends-on): Add EOVERFLOW.
119628         * lib/c-stack.c (EOVERFLOW): Remove unused fallback.
119630         * modules/EOVERFLOW-tests: New file.
119631         * tests/test-EOVERFLOW.c: New file.
119633         * modules/EOVERFLOW: New file.
119634         * doc/posix-headers/errno.texi: Mention EOVERFLOW portability problem.
119636 2008-03-30  Bruno Haible  <bruno@clisp.org>
119638         Fix bug introduced on 2007-06-10.
119639         * lib/vasnprintf.c (VASNPRINTF): When performing zero-padding, use
119640         spaces instead of 0 digits for 's' also when ENABLE_UNISTDIO.
119642 2008-03-30  Bruno Haible  <bruno@clisp.org>
119644         Improve freadseek's efficiency after ungetc.
119645         * lib/freadseek.c: Include freadahead.h.
119646         (freadptrinc): New function, extracted from freadseek.
119647         (freadseek): Use it in a loop. Use freadahead to determine the number
119648         of loop iterations.
119649         * modules/freadseek (Depends-on): Add freadahead.
119650         (configure.ac): Require AC_C_INLINE.
119652 2008-03-30  Bruno Haible  <bruno@clisp.org>
119654         * lib/freadseek.c (freadseek): Don't ignore the return value of
119655         freadptr.
119657 2008-03-29  Eric Blake  <ebb9@byu.net>
119659         Add hex float support.
119660         * modules/strtod (Depends-on): Add c-ctype.
119661         (Link): Mention POW_LIB.
119662         * lib/strtod.c (strtod): Recognize hex floats.  Don't allow
119663         whitespace between 'e' and exponent.
119664         * tests/test-strtod.c (main): Enable hex float tests.
119665         * doc/posix-functions/strtod.texi (strtod): Document what gnulib
119666         now provides.
119668         Document various strtod bugs, with some fixes.
119669         * doc/posix-functions/strtod.texi (strtod): Document bugs with
119670         "-0x", "inf", "nan", and hex constants.
119671         * doc/posix-functions/atof.texi (atof): Likewise.
119672         * modules/stdlib (Makefile.am): Support strtod.
119673         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Likewise.
119674         * m4/strtod.m4 (gl_FUNC_STRTOD): Fit in stdlib framework, and
119675         detect additional strtod bugs.
119676         * lib/stdlib.in.h (rpl_strtod): Add declarations.
119677         * lib/strtod.c (strtod): Return -0.0 on negative underflow.  Use
119678         bool where appropriate.  Parse 'inf' and 'nan'.
119679         * tests/test-strtod.c: New file.
119680         * modules/strtod (Depends-on): Add stdbool, stdlib.
119681         (configure.ac): Turn on module indicator.
119682         * modules/strtod-tests: New module.
119684 2008-03-29  Eric Blake  <ebb9@byu.net>
119686         Fix ftell on mingw.
119687         * lib/ftell.c (EOVERFLOW): Define if the system lacks it.
119688         * modules/ftell-tests (Depends-on): Add binary-io.
119689         * modules/ftello-tests (Depends-on): Likewise.
119690         * tests/test-ftell.c (main): Enhance test to cover behavior after
119691         ungetc.  Enforce binary mode.
119692         * tests/test-ftello.c (main): Likewise.
119694         Pass test-freadseek on cygwin.
119695         * modules/freadseek (Depends-on): Use freadptr, not freadahead.
119696         * lib/freadseek.c (freadseek): Don't increment beyond bounds of
119697         ungetc buffer.
119699         * tests/test-fflush2.c (main): Fix typo.
119701 2008-03-29  Bruno Haible  <bruno@clisp.org>
119703         * tests/test-fflush2.c (main): Temporarily disable the contents of
119704         this test.
119705         * m4/fflush.m4 (gl_FUNC_FFLUSH): Add a TODO.
119706         Reported by Eric Blake.
119708 2008-03-28  Simon Josefsson  <simon@josefsson.org>
119710         * lib/gc.h (enum Gc_hash): Add GC_SHA224.
119711         (GC_SHA224_DIGEST_SIZE): Add.
119713         * lib/gc-libgcrypt.c (gc_hash_open): Handle SHA-224.
119714         (gc_hash_digest_length): Likewise.
119715         (gc_hash_buffer): Likewise.
119717 2008-03-25  Bruno Haible  <bruno@clisp.org>
119719         * doc/gnulib-tool.texi (gettextize and autopoint): Explain in more
119720         detail which gettext release to use.
119721         Reported by Simon Josefsson.
119723 2008-03-26  Jim Meyering  <meyering@redhat.com>
119725         gnumakefile: remove file from $(top_builddir), not from $(top_srcdir)
119726         * modules/gnumakefile (clean-GNUmakefile): Also, use
119727         test ... && ... || : syntax rather than if-then ... fi.
119729         gnumakefile: Don't double-quote-expand $(VPATH) value.
119730         * modules/gnumakefile (clean-GNUmakefile): Use single quotes.
119732 2008-03-24  Eric Blake  <ebb9@byu.net>
119734         Alter GNUmakefile to install into top directory.
119735         * modules/maintainer-makefile: Split, and add dependency...
119736         * modules/gnumakefile: to this new module.
119737         * build-aux/GNUmakefile: Move...
119738         * top/GNUmakefile: ...here.
119739         * build-aux/maint.mk: Move...
119740         * top/maint.mk: ...here.
119741         * MODULES.html.sh (Support for maintaining...): Document new
119742         module.
119744 2008-03-23  Bruno Haible  <bruno@clisp.org>
119746         * gnulib-tool: New options --vc-files, --no-vc-files.
119747         (func_usage): Document them.
119748         (vc_files): New variable.
119749         (func_import): Consider vc_files.
119750         (func_create_testdir): Set vc_files to empty.
119751         Suggested by Jim Meyering and Karl Berry.
119753 2008-03-23  Bruno Haible  <bruno@clisp.org>
119755         Fix regex compilation error on HP-UX 11.
119756         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_TYPE_MBSTATE_T.
119757         * modules/regex (Files): Add m4/mbstate_t.m4.
119758         Reported by Ton Voon <ton.voon@altinity.com>.
119760 2008-03-23  Bruno Haible  <bruno@clisp.org>
119762         * doc/gnulib-tool.texi (gettextize and autopoint): New section.
119764 2008-03-23  Eric Blake  <ebb9@byu.net>
119765             Bruno Haible  <bruno@clisp.org>
119767         Install files from top/ in the destination directory.
119768         * gnulib-tool (func_get_automake_snippet): Synthesize an EXTRA_DIST
119769         augmentation also for the files from top/.
119770         (func_import, func_create_testdir): Rewrite file names:
119771         top/filename -> filename.
119773 2008-03-23  Bruno Haible  <bruno@clisp.org>
119775         Tweak "gnulib --version" output.
119776         * gnulib-tool (func_version): Replace "-dirty" suffix with "-modified".
119778 2008-03-23  Bruno Haible  <bruno@clisp.org>
119780         Tweak "gnulib --version" output.
119781         * gnulib-tool (func_version): Use date of last commit to ChangeLog,
119782         rather than contents of ChangeLog, when possible.
119784 2008-03-21  Eric Blake  <ebb9@byu.net>
119786         More --version tweaks.
119787         * gnulib-tool (func_version): Obey GNU Coding Standards.  Output
119788         date of last ChangeLog entry.
119790 2008-03-21  Jim Meyering  <meyering@redhat.com>
119792         * build-aux/GNUmakefile (_have-git-version-gen): Split long line.
119794 2008-03-20  Eric Blake  <ebb9@byu.net>
119796         VPATH fix.
119797         * build-aux/GNUmakefile (_have_git-version-gen): Look in correct dir.
119799 2008-03-20  Simon Josefsson  <simon@josefsson.org>
119801         * build-aux/GNUmakefile: Make git-version-gen optional.  Add
119802         _build-aux variable.  Suggested by Eric Blake <ebb9@byu.net>.
119804 2008-03-20  Eric Blake  <ebb9@byu.net>
119806         Sync GNUmakefile with coreutils.
119807         * build-aux/GNUmakefile (have-Makefile): Rename...
119808         (_have-Makefile): ...to this, for namespace consideration.
119809         (GNUmakefile.cfg): Include, if present.
119810         (_autoreconf): Define a default.
119811         (_is-dist-target): New rule for rebuilds to pick up intra-release
119812         version.
119813         (maint-cfg.mk): Rename...
119814         (cfg.mk): ...to this.
119816 2008-03-18  Jim Meyering  <meyering@redhat.com>
119818         New script and module: mktempd
119819         * MODULES.html.sh (maint+release support): Add mktempd.
119820         * build-aux/mktempd: New file.
119821         * modules/mktempd: New file.
119823 2008-03-15  Jim Meyering  <meyering@redhat.com>
119825         Undo last change.
119826         * lib/sha1.c, lib/md5.c: 63 != ~63.
119827         Reported by Andreas Schwab.
119829         sha1.c, md5.c: Hoist a redundant expression.
119830         * lib/sha1.c (sha1_process_bytes): AND-off the low bits in
119831         "ctx->buflen" only once, before calling *_process_block.
119832         * lib/md5.c (md5_process_bytes): Likewise.
119834 2008-03-14  Eric Blake  <ebb9@byu.net>
119836         Bump copyright year in files generated by gnulib-tool.
119837         * gnulib-tool (func_emit_copyright_notice): Extract copyright from
119838         gnulib-tool, rather than hard-coding it.
119840         Fix 'gnulib-tool --version' output to work with git.
119841         * gnulib-tool (func_gnulib_dir): New function, extracted from...
119842         (startup): ...here.
119843         (func_version): Use it to invoke git-version-gen, rather than
119844         relying on CVS keyword expansion.  Modernize wording.
119845         (cvsdatestamp, last_checkin_date, version): Kill unused
119846         variables.
119848 2008-03-12  Jim Meyering  <meyering@redhat.com>
119850         Recognize optional cast of the argument to free.
119851         * build-aux/useless-if-before-free: Update regexps.
119853         * build-aux/bootstrap (gnulib_tool): Remove trailing blanks.
119855 2008-03-11  Bruno Haible  <bruno@clisp.org>
119857         Extend AC_LIB_LINKFLAGS to the situation of several libraries provided
119858         by a single package.
119859         * m4/lib-link.m4 (AC_LIB_FROMPACKAGE): New macro.
119860         (AC_LIB_LINKFLAGS_BODY): Use the information stored by
119861         AC_LIB_FROMPACKAGE. Use AC_ARG_WITH instead of AC_LIB_ARG_WITH.
119862         Reported by Sam Steingold <sds@gnu.org>.
119864 2008-03-12  Sergey Poznyakoff  <gray@gnu.org.ua>
119866         * build-aux/bootstrap (version_controlled_file): Adapt for SVN
119867         repositories.
119869 2008-03-11  Bruno Haible  <bruno@clisp.org>
119871         Avoid conflicts between local macro definitions.
119872         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
119873         AC_LIB_LINKFLAGS_BODY): Use pushdef/popdef instead of define/undefine.
119875 2008-03-10  Peter O'Gorman  <bug-gnulib@mlists.thewrittenword.com>
119876             Bruno Haible  <bruno@clisp.org>
119878         Make va_copy work with some version of xlc on AIX 5.1.
119879         * lib/stdarg.in.h: New file.
119880         * m4/stdarg.m4 (gl_STDARG_H): Initialize STDARG_H and NEXT_STDARG_H.
119881         On AIX, use a <stdarg.h> file substitute.
119882         * modules/stdarg (Files): Add lib/stdarg.in.h.
119883         (Depends-on): Add include_next.
119884         (Makefile.am): Build a stdarg.h substitute if requested.
119885         * doc/posix-functions/va_copy.texi: Document the platforms lacking it.
119887 2008-03-10  Bruno Haible  <bruno@clisp.org>
119889         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Document a restriction.
119890         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Likewise.
119891         Reported by Peter O'Gorman <bug-gnulib@mlists.thewrittenword.com>.
119893 2008-03-10  Bruno Haible  <bruno@clisp.org>
119895         * modules/stdlib (Depends-on): Add include_next, remove
119896         absolute-header.
119898 2008-03-09  Bruno Haible  <bruno@clisp.org>
119900         * lib/freadahead.h (freadahead): Document more precisely.
119901         * lib/freadahead.c (freadahead): When an ungetc is in effect, return
119902         the sum of both buffer sizes.
119903         * tests/test-freadahead.c (main): Also test behaviour after ungetc.
119904         * NEWS: Document the change.
119906 2008-03-09  Bruno Haible  <bruno@clisp.org>
119908         Extend freadptr to return also the buffer size.
119909         * lib/freadptr.h (freadptr): Add sizep argument.
119910         * lib/freadptr.c: Include freadptr.h, not freadahead.h.
119911         (freadptr): Add sizep argument. Determine buffer size like freadahead
119912         does.
119913         * tests/test-freadptr.c: Don't include freadahead.h.
119914         (main): Adapt for new calling convention of freadptr.
119915         * tests/test-freadptr2.c: New file, based on tests/test-freadahead.c.
119916         * tests/test-freadptr2.sh: New file, based on tests/test-freadahead.sh.
119917         * modules/freadptr-tests (Files): Add tests/test-freadptr2.c,
119918         tests/test-freadptr2.sh.
119919         (Depends): Remove freadahead.
119920         (TESTS): Add test-freadptr2.sh.
119921         (check_PROGRAMS): Add test-freadptr2.
119923 2008-03-09  Bruno Haible  <bruno@clisp.org>
119925         * doc/Makefile (%.pdf): Explain how to remedy the save_size error.
119926         Report and solution by Simon Josefsson.
119928 2008-03-06  Bruno Haible  <bruno@clisp.org>
119930         Make fflush after ungetc work on BSD platforms.
119931         * lib/fflush.c (rpl_fflush): Discard ungetc buffer if possible.
119932         * tests/test-fflush2.c: New file.
119933         * tests/test-fflush2.sh: New file.
119934         * modules/fflush-tests (Files): Add tests/test-fflush2.sh,
119935         tests/test-fflush2.c.
119936         (Makefile.am): Build test-fflush2 and run test-fflush2.sh.
119937         * doc/posix-functions/fflush.texi: Document fflush after ungetc bug.
119939 2008-03-06  Eric Blake  <ebb9@byu.net>
119941         Likewise for ftello.
119942         * modules/ftello (Dependencies): Add extensions.
119943         * m4/ftello.m4 (gl_FUNC_FTELLO): Require AC_USE_SYSTEM_EXTENSIONS.
119945 2008-03-06  Bruno Haible  <bruno@clisp.org>
119947         * modules/fseeko (Dependencies): Add extensions.
119948         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Require AC_USE_SYSTEM_EXTENSIONS.
119949         Needed on glibc systems.
119951 2008-03-06  Bruno Haible  <bruno@clisp.org>
119953         * doc/gnulib-tool.texi (@nosuchmodulenote): Avoid line break inside
119954         email address.
119955         Reported by Thien-Thi Nguyen <ttn@gnuvola.org>.
119957 2008-03-06  Bruno Haible  <bruno@clisp.org>
119959         * users.txt: Add libgnupdf.
119961 2008-03-06  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
119963         * doc/gnulib-tool.texi (@nosuchmodulenote): New macro.
119964         (Header File Substitutes, Function Substitutes,
119965         Glibc Header File Substitutes, Glibc Function Substitutes): Use it.
119966         (Build robot for gnulib): Fix typo.
119968 2008-03-06  Bruno Haible  <bruno@clisp.org>
119970         * doc/gnulib-tool.texi (VCS Issues): Small updates.
119971         Reported by Thien-Thi Nguyen <ttn@gnuvola.org>.
119973 2008-03-06  Bruno Haible  <bruno@clisp.org>
119975         * doc/func.texi: New file, extracted from doc/gnulib.texi.
119976         * doc/gnulib.texi: Include it.
119978 2008-03-06  Simon Josefsson  <simon@josefsson.org>
119980         * modules/func (License): Change license to unlimited; there was
119981         no LGPL parts in the module anyway.
119983 2008-03-06  Simon Josefsson  <simon@josefsson.org>
119985         * modules/__func__: Renamed to modules/func.
119986         * modules/__func__-tests: Renamed to modules/func-tests.
119987         * tests/test-__func__.c: Renamed to tests/test-func.c.
119988         * m4/__func__.m4: Renamed to m4/func.m4.
119989         * doc/gnulib.texi (__func__): Section renamed to func.
119990         Suggested by Eric Blake <ebb9@byu.net>.
119992 2008-03-06  Simon Josefsson  <simon@josefsson.org>
119994         * doc/gnulib.texi (__func__): Use C99 terminology when talking
119995         about __func__.  Make example self-contained.  Suggested by Eric
119996         Blake <ebb9@byu.net>.
119998         * tests/test-__func__.c (main): Avoid extraneous () around __func.
119999         Suggested by Eric Blake <ebb9@byu.net>.
120001 2008-03-06  Simon Josefsson  <simon@josefsson.org>
120003         * modules/__func__: New file.
120004         * modules/__func__-tests: New file.
120005         * tests/test-__func__.c: New file.
120006         * m4/__func__.m4: New file.
120007         * doc/gnulib.texi (__func__): Document __func__ module.
120009 2008-03-05  Simon Josefsson  <simon@josefsson.org>
120011         * modules/byteswap (License): Re-license as LGPLv2+.
120013 2008-03-05  Simon Josefsson  <simon@josefsson.org>
120015         * doc/Makefile: Add pdf target.
120017 2008-03-05  Simon Josefsson  <simon@josefsson.org>
120019         * modules/inline (License): Use 'unlimited', since there are only
120020         *.m4 files in this module.
120022 2008-03-03  John E. Malmberg  <wb8tyw@qsl.net>  (tiny change)
120023             Bruno Haible  <bruno@clisp.org>
120025         Add support for HP C 7.1 on OpenVMS 8.3.
120026         * lib/alloca.in.h (alloca): Define as alias for DEC C on VMS.
120028 2008-03-03  John E. Malmberg  <wb8tyw@qsl.net>  (tiny change)
120030         Update VMS specifics.
120031         * lib/getopt.c [VMS]: Remove include of unixlib.h.
120033 2008-03-02  Jim Meyering  <meyering@redhat.com>
120035         Remove the last dependency on the "free" module.
120036         * m4/readutmp.m4 (gl_READUTMP): Don't require gl_FUNC_FREE.
120037         Reported by Bob Proulx.
120039         * lib/getdelim.c (getdelim): Don't leak memory upon failed realloc.
120041         Remove useless "if" tests before free.  Deprecate "free" module.
120042         * doc/posix-functions/free.texi: Mention that this
120043         module is no longer useful.
120044         * modules/free (Notice): Say this module is obsolete.
120045         * modules/readutmp (Depends-on): Remove free.
120046         * lib/save-cwd.c (free_cwd): Remove useless "if" before free.
120047         * lib/putenv.c (putenv): Likewise.
120048         * lib/gc-gnulib.c (gc_cipher_close): Likewise.
120049         * lib/getaddrinfo.c (freeaddrinfo): Likewise.
120050         * tests/test-c-strcasestr.c (main): Likewise.
120051         * tests/test-c-strstr.c (main): Likewise.
120052         * tests/test-mbscasestr1.c (main): Likewise.
120053         * tests/test-mbscasestr2.c (main): Likewise.
120054         * tests/test-mbsstr1.c (main): Likewise.
120055         * tests/test-mbsstr2.c (main): Likewise.
120056         * tests/test-memmem.c (main): Likewise.
120057         * tests/test-strcasestr.c (main): Likewise.
120058         * tests/test-striconv.c (main): Likewise.
120059         * tests/test-striconveh.c (main): Likewise.
120060         * tests/test-striconveha.c (main): Likewise.
120061         * tests/test-strstr.c (main): Likewise.
120063         * build-aux/git-version-gen: Adjust a comment and the Usage string.
120065         bootstrap: sync from coreutils again
120066         * build-aux/bootstrap: Remove dangling m4/*.m4 symlinks.
120068 2008-03-01  Jim Meyering  <meyering@redhat.com>
120070         bootstrap: sync from coreutils
120071         * build-aux/bootstrap (update_po_files): Copy a .po file into place
120072         also when the target doesn't exist.
120074 2008-03-01  Eric Blake  <ebb9@byu.net>
120076         Fix bugs in last patch.
120077         * lib/memchr2.c (memchr2): Fix typo.
120078         * tests/test-memchr2.c: Test previous bug, and don't use GNU
120079         extension.
120080         Reported by Bruce Korb.
120082         New module 'memchr2'.
120083         * modules/memchr2: New file.
120084         * modules/memchr2-tests: Likewise.
120085         * lib/memchr2.h: Likewise.
120086         * lib/memchr2.c: Likewise, based on memchr.c.
120087         * tests/test-memchr2.c: New test.
120088         * MODULES.html.sh (String handling): Add memchr2.
120090 2008-02-29  Bruno Haible  <bruno@clisp.org>
120092         * modules/freadseek-tests: New file.
120093         * tests/test-freadseek.sh: New file.
120094         * tests/test-freadseek.c: New file.
120096         New module 'freadseek'.
120097         * modules/freadseek: New file.
120098         * lib/freadseek.h: New file.
120099         * lib/freadseek.c: New file.
120100         * MODULES.html.sh (File stream based Input/Output): Add freadseek.
120102 2008-02-29  Sergey Poznyakoff  <gray@gnu.org.ua>
120104         * users.txt: Add anubis, cpio, mailfromd, mailutils, radius,
120105         wydawca.
120107         * m4/argp.m4 (gl_ARGP): Use AC_TRY_LINK to test if
120108         program_invocation_name and program_invocation_short_name are
120109         present.
120111 2008-02-28  Bruno Haible  <bruno@clisp.org>
120113         * tests/test-freadptr.c: Add a test for behaviour after ungetc.
120114         * tests/test-freadptr.sh: Also test non-seekable stdin.
120116 2008-02-28  Sergey Poznyakoff  <gray@gnu.org.ua>
120118         * build-aux/bootstrap (source_base, m4_base)
120119         (doc_base, tests_base): New variables.
120120         (gnulib_tool_options): Do not hardcode base directories, use
120121         the above variables instead.
120123 2008-02-28  Atsushi SAKAI  <sakaia@jp.fujitsu.com>
120125         * lib/xsize.h: Fix typo in comment: s/tupe/type/.
120127 2008-02-28  Bruno Haible  <bruno@clisp.org>
120129         * modules/freadptr-tests: New file.
120130         * tests/test-freadptr.sh: New file.
120131         * tests/test-freadptr.c: New file.
120133         New module 'freadptr'.
120134         * modules/freadptr: New file.
120135         * lib/freadptr.h: New file.
120136         * lib/freadptr.c: New file.
120137         * MODULES.html.sh (File stream based Input/Output): Add freadptr.
120139 2008-02-26  Karl Berry  <karl@freefriends.org>
120141         Sync from Libtool:
120142         * libltdl/argz.c (argz_add, argz_count): New functions.
120143         * libltdl/argz.in.h: Declare them.
120144         Report by Juan Manuel Guerrero <juan.guerrero@gmx.de>.
120146 2008-02-22  Bruno Haible  <bruno@clisp.org>
120148         * m4/time_r.m4 (gl_TIME_R): Also check that localtime_r's return type
120149         is a pointer type.  Needed for HP-UX 10.
120150         * doc/posix-functions/localtime_r.texi: Mention HP-UX 10.
120151         * doc/posix-functions/gmtime_r.texi: Likewise.
120152         Reported by Peter O'Gorman <bug-gnulib@mlists.thewrittenword.com>.
120154 2008-02-24  Bruno Haible  <bruno@clisp.org>
120156         * modules/environ-tests: New file.
120157         * tests/test-environ.c: New file.
120159         New module 'environ'.
120160         * modules/environ: New file.
120161         * lib/unistd.in.h (environ): New declaration.
120162         * m4/environ.m4: New file.
120163         (gt_CHECK_VAR_DECL): Moved here from m4/setenv.m4. Undefine gt_cv_var
120164         after use.
120165         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_ENVIRON and
120166         HAVE_DECL_ENVIRON.
120167         * modules/unistd (Makefile.am): Substitute also GNULIB_ENVIRON and
120168         HAVE_DECL_ENVIRON.
120169         * doc/posix-functions/environ.texi: Mention module 'environ'. Remove
120170         wrong claim that 'environ' is missing on some systems.
120171         * modules/execute (Depends-on): Add environ.
120172         * lib/execute.c (environ): Remove fallback declaration.
120173         * modules/pipe (Depends-on): Add environ.
120174         * lib/pipe.c (environ): Remove fallback declaration.
120175         * modules/setenv (Depends-on): Add environ.
120176         * lib/setenv.c (environ): Remove fallback declaration.
120177         * modules/unsetenv (Depends-on): Add environ.
120178         * lib/unsetenv.c (environ): Remove fallback declaration.
120179         * m4/setenv.m4 (gt_CHECK_VAR_DECL): Remove macro. Moved to
120180         m4/environ.m4.
120181         (gl_PREREQ_SETENV): Require gl_ENVIRON instead of testing for environ.
120182         (gl_PREREQ_UNSETENV): Likewise.
120184 2008-02-24  Bruno Haible  <bruno@clisp.org>
120186         * doc/posix-functions/environ.texi: Document the MacOS X problem.
120188 2008-02-20  Bob Proulx  <bob@proulx.com>
120190         Enable use of older two part flavor 'git describe'.
120191         * build-aux/git-version-gen: If using the older two part flavor of
120192         git version then recreate the third part now present in the
120193         newer three part flavor of git describe.
120195 2008-02-20  Martin Buchholz  <martin@xemacs.org>  (tiny change)
120197         * lib/fts.c (fts_build): Typo correction to comment.
120199 2008-02-17  Bruno Haible  <bruno@clisp.org>
120201         * lib/git-merge-changelog.c (main) [split_merged_entry]: Avoid
120202         generating no-op conflicts.
120204 2008-02-17  Bruno Haible  <bruno@clisp.org>
120206         Speed up by 10%.
120207         * lib/git-merge-changelog.c (main): Use the iterator to iterate through
120208         result_entries, rather than an index-based loop.
120210 2008-02-17  Bruno Haible  <bruno@clisp.org>
120212         Speed up by 25%.
120213         * lib/git-merge-changelog.c (struct entry): New fields 'hashcode',
120214         'hashcode_cached'.
120215         (entry_create): New function.
120216         (entry_hashcode): Use the cached hashcode if possible.
120217         (read_changelog_file, try_split_merged_entry): Use entry_create.
120219 2008-02-17  Bruno Haible  <bruno@clisp.org>
120221         Speed up from O(n^2) to O(n) for long ChangeLog files.
120222         * lib/git-merge-changelog.c: Include gl_rbtreehash_list.h.
120223         (read_changelog_file): Change implementation of entries_reversed list
120224         to rbtreehash.
120225         * modules/git-merge-changelog (Depends-on): Add rbtreehash-list.
120227 2008-02-17  Bruno Haible  <bruno@clisp.org>
120229         New option --split-merged-entry.
120230         * lib/git-merge-changelog.c (FSTRCMP_STRICTER_THRESHOLD): New macro.
120231         (find_paragraph_end, try_split_merged_entry): New functions.
120232         (long_options): Add option --split-merged-entry.
120233         (usage): Document option --split-merged-entry.
120234         (main): Implement option --split-merged-entry.
120235         Reported by Eric Blake.
120237 2008-02-17  Bruno Haible  <bruno@clisp.org>
120239         * lib/git-merge-changelog.c: Include c-strstr.h.
120240         (main): Support the "git pull --rebase" situation.
120241         * modules/git-merge-changelog (Depends-on): Add c-strstr.
120242         Reported by Eric Blake.
120244 2008-02-16  Eric Blake  <ebb9@byu.net>
120246         Avoid doubling \ in common case of "c-maybe" quoting style.
120247         * lib/quotearg.c (quotearg_buffer_restyled): Don't escape \ when
120248         eliding outer quotes.
120249         * lib/quotearg.h: Document this.
120250         * tests/test-quotearg.c (result_strings, inputs, results_g)
120251         (flag_results, locale_results): Test it by adding a new string to
120252         each test group.
120253         (compare_strings): Test new string.
120255 2008-02-13  Eric Blake  <ebb9@byu.net>
120257         Avoid trigraph quoting in default output.
120258         * lib/quotearg.h (enum quoting_flags): Add QA_SPLIT_TRIGRAPHS.
120259         * lib/quotearg.c (quotearg_buffer_restyled): Don't quote trigraphs
120260         unless explicitly requested.
120261         * tests/test-quotearg.c (flag_results, main): Add additional tests.
120263 2008-02-13  Lasse Collin  <lasse.collin@tukaani.org>
120265         Don't rely on signed integer overflowing to negative value.
120266         * lib/getugroups.c (getugroups): Include <limits.h>.
120267         Instead, compare against INT_MAX, and increment only if the test passes.
120269 2008-02-13  Jim Meyering  <meyering@redhat.com>
120270         and Eric Blake  <ebb9@byu.net>
120272         Avoid shadowing warning and compile errors on Linux.
120273         * tests/test-quotearg.c [ENABLE_NLS]: Disable <libintl.h>
120274         forwarding macros on Linux.
120275         (dcgettext): Define a stub, for Linux.
120276         (results_g, main): Avoid warnings.
120278 2008-02-12  Eric Blake  <ebb9@byu.net>
120280         Silence warning in last patch.
120281         * lib/quotearg.c (quotearg_buffer_restyled): Add missing const.
120283         Quotearg part 4: add tests, fix c-maybe colon quoting.
120284         * lib/quotearg.h: Improve documentation.
120285         * lib/quotearg.c (quotearg_buffer_restyled): Don't add extra
120286         escapes when adding outer quotes.  When quoting trigraphs, use
120287         valid C notation.  When quoting NUL, omit extra characters if next
120288         character is not digit.  Alter prototype.
120289         (quotearg_buffer, quotearg_alloc_mem, quotearg_n_options): Adjust
120290         callers.
120291         * modules/quotearg-tests: New module.
120292         * tests/test-quotearg.c: New test.
120294 2008-02-07  Eric Blake  <ebb9@byu.net>
120296         Quotearg part 3: add flag to control outer quote elision.
120297         * lib/quotearg.h (c_maybe_quoting_style): New style.
120298         (enum quoting_flags): Better documentation of flags.
120299         * lib/quotearg.c (quoting_style_args, quoting_style_vals): Add
120300         c-maybe style.
120301         (quotearg_buffer_restyled): Handle new flag to elide outer
120302         quotes.
120304         Quotearg part 2: add flag that can control NUL elision.
120305         * lib/quotearg.h (set_quoting_flags): New prototype.
120306         * lib/quotearg.c (struct quoting_options): Add flag field.
120307         (set_quoting_flags): New function.
120308         (quotearg_buffer_restyled): Add flags parameter.
120309         (quotearg_alloc_mem): Set the flag if length cannot be returned.
120310         (quotearg_n_options): Set the flag, since length cannot be
120311         returned.
120312         (quoting_options_from_style): Default flags correctly.
120314         Quotearg part 1: more wrappers, restore quotearg_char state.
120315         * lib/quotearg.h (quotearg_alloc_mem, quotearg_n_mem)
120316         (quotearg_mem, quotearg_style_mem, quotearg_char_mem)
120317         (quotearg_colon_mem): New wrappers.
120318         * lib/quotearg.c (quotearg_alloc, quotearg_char): Rewrite...
120319         (quotearg_alloc_mem, quotearg_char_mem): ...in terms of these new
120320         functions.
120321         (quotearg_n_mem, quotearg_mem, quotearg_style_mem)
120322         (quotearg_colon_mem): New functions.
120324 2008-02-11  Bruno Haible  <bruno@clisp.org>
120326         * modules/git-merge-changelog (Makefile.am): Don't use -L and -l for a
120327         library in the current directory: it does not work with parallel make.
120328         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
120330 2008-02-11  Bruno Haible  <bruno@clisp.org>
120332         * .gitattributes: New file.
120334 2008-02-11  Jim Meyering  <meyering@redhat.com>
120336         useless-if-before-free: Fix reversed exit values.
120337         * build-aux/useless-if-before-free: Use correct values
120338         for EXIT_MATCH and EXIT_NO_MATCH.
120340         * build-aux/useless-if-before-free: Close stdout carefully.
120342 2008-02-10  Bruno Haible  <bruno@clisp.org>
120344         New module 'git-merge-changelog'.
120345         * modules/git-merge-changelog: New file.
120346         * lib/git-merge-changelog.c: New file.
120348 2008-02-10  Jim Meyering  <meyering@redhat.com>
120350         useless-if-before-free: New option: --list (-l).
120352         useless-if-before-free: Don't exit immediately upon open failure.
120353         * build-aux/useless-if-before-free: Exit 2 for errors.
120354         Upon failure to open a file, don't exit immediately.
120355         Rather, just warn and continue with any remaining files.
120357 2008-02-10  Bruno Haible  <bruno@clisp.org>
120359         New abstract list operation 'node_set_value'.
120360         * lib/gl_list.h (gl_list_node_set_value): New function.
120361         (struct gl_list_implementation): New field node_set_value.
120362         * lib/gl_list.c (gl_list_node_set_value): New function.
120363         * lib/gl_array_list.c (gl_array_node_set_value): New function.
120364         (gl_array_list_implementation): Update.
120365         * lib/gl_carray_list.c (gl_carray_node_set_value): New function.
120366         (gl_carray_list_implementation): Update.
120367         * lib/gl_anylinked_list2.h (gl_linked_node_set_value): New function.
120368         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
120369         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
120370         * lib/gl_anytree_list2.h (gl_tree_node_set_value): New function.
120371         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
120372         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
120373         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
120374         Update.
120375         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
120376         * lib/gl_sublist.c (gl_sublist_node_set_value): New function.
120377         (gl_sublist_list_implementation): Update.
120379 2008-02-10  Bruno Haible  <bruno@clisp.org>
120381         * lib/diffseq.h: Write "ELEMENT const" instead of "const ELEMENT".
120382         Needed when ELEMENT is #defined to 'some_type *'.
120384 2008-02-10  Jim Meyering  <meyering@redhat.com>
120386         New script and module: useless-if-before-free
120387         * MODULES.html.sh (maint+release support): Add useless-if-before-free.
120388         * build-aux/useless-if-before-free: New file.
120389         * modules/useless-if-before-free: New file.
120391         * build-aux/gitlog-to-changelog: Use committer date, not author date.
120393         xstrtol_error: Fix typo.
120394         * lib/xstrtol-error.c (xstrtol_error): The parameter was unused:
120395         s/exit_failure/exit_status/.
120397 2008-02-09  Jim Meyering  <meyering@redhat.com>
120399         New script and module: gitlog-to-changelog
120400         * MODULES.html.sh (maint+release support): Add gitlog-to-changelog.
120401         * modules/gitlog-to-changelog: New file.
120402         * build-aux/gitlog-to-changelog: New file.
120404 2008-02-08  Jim Meyering  <meyering@redhat.com>
120406         Avoid two "parameter unused" warnings.
120407         * lib/stat-time.h (get_stat_birthtime_ns, get_stat_birthtime):
120408         Mark "st" as used.
120410         Use "git COMMAND", not "git-COMMAND".
120411         * build-aux/bootstrap (version_controlled_file): s/git-rm/git-rm/.
120412         * build-aux/announce-gen (get_tool_versions): Correct a diagnostic.
120413         * build-aux/git-version-gen: Use "git status", not "git-status".
120415 2008-02-07  Bruno Haible  <bruno@clisp.org>
120417         * lib/vasnprintf.c (VASNPRINTF): Don't use %n on native Woe32 systems.
120418         Avoids a crash on Windows Vista.
120419         Reported by Adam Strzelecki <ono@java.pl> via
120420         Simon Josefsson <simon@josefsson.org>.
120422 2008-02-06  Bruno Haible  <bruno@clisp.org>
120424         Fix *printf behaviour regarding the left-adjust flag on HP-UX 10.20.
120425         * m4/printf.m4 (gl_PRINTF_FLAG_LEFTADJUST): New macro.
120426         * lib/vasnprintf.c (VASNPRINTF): Handle NEED_PRINTF_FLAG_LEFTADJUST.
120427         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST): New macro.
120428         (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): Invoke it.
120429         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
120430         gl_PRINTF_FLAG_LEFTADJUST and test its result. Invoke
120431         gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST.
120432         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
120433         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
120434         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
120435         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
120436         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
120437         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
120438         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
120439         * tests/test-vasnprintf-posix.c (test_function): Add testcases for the
120440         left-adjust flag.
120441         * tests/test-snprintf-posix.h (test_function): Likewise.
120442         * tests/test-sprintf-posix.h (test_function): Likewise.
120443         * tests/test-vasprintf-posix.c (test_function): Likewise.
120444         * doc/posix-functions/fprintf.texi: Update.
120445         * doc/posix-functions/printf.texi: Update.
120446         * doc/posix-functions/snprintf.texi: Update.
120447         * doc/posix-functions/sprintf.texi: Update.
120448         * doc/posix-functions/vfprintf.texi: Update.
120449         * doc/posix-functions/vprintf.texi: Update.
120450         * doc/posix-functions/vsnprintf.texi: Update.
120451         * doc/posix-functions/vsprintf.texi: Update.
120452         Reported by Peter Fales <psfales@alcatel-lucent.com>.
120454 2008-02-06  Bruno Haible  <bruno@clisp.org>
120456         Fix bug introduced on 2008-01-26.
120457         * lib/isnan.c (FUNC): Set to rpl_isnand, not rpl_isnan.
120459 2008-02-06  Bruno Haible  <bruno@clisp.org>
120461         Fix bug introduced on 2007-06-10.
120462         * lib/vasnprintf.c (VASNPRINTF): Perform zero-padding also if
120463         !NEED_PRINTF_FLAG_ZERO.
120465 2008-02-05  Peter O'Gorman  <pogma@thewrittenword.com>
120467         getloadavg: use libperfstat on AIX5
120468         * lib/getloadavg.c, m4/getloadavg.m4 [aix]: Use libperfstat
120470 2008-02-03  Bruno Haible  <bruno@clisp.org>
120472         * lib/diffseq.h: Add comments about required #includes.
120473         Reported by Michael Biggs <gnulib@doubleplum.net>.
120475 2008-02-01  Bruno Haible  <bruno@clisp.org>
120477         * users.txt: Add gnuit.
120479 2008-01-31  Bruno Haible  <bruno@clisp.org>
120481         * lib/md4.c (set_uint32): Mark as inline.
120482         * lib/md5.c (set_uint32): Likewise.
120483         * lib/sha1.c (set_uint32): Likewise.
120484         * m4/md4.m4 (gl_MD4): Require AC_C_INLINE.
120485         * m4/md5.m4 (gl_MD5): Likewise.
120486         * m4/sha1.m4 (gl_SHA1): Likewise.
120488 2008-01-31  Jim Meyering  <meyering@redhat.com>
120490         Use "sizeof VAR", rather than a literal "4".
120491         * lib/md5.c (md5_read_ctx): Use sizeof ctx->A, not 4.
120492         * lib/md4.c (md4_read_ctx): Likewise.
120493         * lib/sha1.c (sha1_read_ctx): Likewise.
120495 2008-01-31  Simon Josefsson  <simon@josefsson.org>
120497         * tests/test-sha1.c: New file, based on test-md5.c.
120499         * modules/crypto/sha1-tests: New file.
120501 2008-01-31  Simon Josefsson  <simon@josefsson.org>
120503         * lib/sha1.h (SHA1_DIGEST_SIZE): Define.
120505 2008-01-31  Jim Meyering  <meyering@redhat.com>
120507         Prefer "sizeof v" over the equivalent "4".
120508         * lib/md4.c (set_uint32): Use "sizeof v" as memcpy length, not 4.
120509         * lib/md5.c (set_uint32): Likewise.
120510         * lib/sha1.c (set_uint32): Likewise.
120512 2008-01-31  Simon Josefsson  <simon@josefsson.org>
120514         * lib/sha1.c (set_uint32): Mark function as static.
120516 2008-01-31  Simon Josefsson  <simon@josefsson.org>
120518         md2: clarify comments to say that alignment is not required.
120519         * lib/md2.h: Remove warning about alignment in comment.
120520         * lib/md2.c (md2_read_ctx, md2_finish_ctx): Doc fix, alignment has
120521         never been required.
120523 2008-01-31  Simon Josefsson  <simon@josefsson.org>
120525         md4: adapt alignment constraint fix from sha1.
120526         * lib/md4.c (set_uint32): New function, from sha1.c
120527         (md4_read_ctx): Use it.
120528         (md4_finish_ctx): Doc fix.
120529         * lib/md4.h: Doc fix.
120531 2008-01-31  Simon Josefsson  <simon@josefsson.org>
120533         md5: adapt alignment constraint fix from sha1.
120534         * lib/md5.c (set_uint32): New function, from sha1.c
120535         (md5_read_ctx): Use it.
120536         (md5_finish_ctx): Doc fix.
120537         * lib/md5.h: Doc fix.
120539 2008-01-30  Peter Palfrader  <weasel@debian.org>
120541         sha1: remove the result buffer alignment constraint
120542         * lib/sha1.c (set_uint32): New function.
120543         (sha1_read_ctx): Rewrite to remove the result buffer alignment
120544         constraint.
120545         (sha1_finish_ctx): Remove comment warning about alignment constraint.
120546         * lib/sha1.h: Likewise.
120548 2008-01-30  Andreas Schwab  <schwab@suse.de>
120549             Bruno Haible  <bruno@clisp.org>
120551         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Include <float.h> and ensure a
120552         correct definition of LDBL_MIN_EXP.
120554 2008-01-30  Karl Berry  <karl@gnu.org>
120556         * config/srclist-update: try to preserve x bit on updates.
120557         * config/srclistvars.sh: update for karl.
120559 2008-01-29  Jim Meyering  <meyering@redhat.com>
120561         vasnprintf.c: Avoid warning about unused label
120562         * lib/vasnprintf.c (VASNPRINTF) [!USE_SNPRINTF]: Guard the
120563         "overflow" label definition and associated code with the
120564         same cpp condition that guards the sole use of that label.
120566 2008-01-26  Bruno Haible  <bruno@clisp.org>
120568         * m4/isnanl.m4 (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM,
120569         gl_FUNC_ISNANL_WORKS): Test the GCC >= 4.0 built-in.
120570         * lib/isnanl.h (isnanl): Use the GCC >= 4.0 built-in.
120571         * lib/isnanl-nolibm.h (isnanl): Likewise.
120572         Reported by Paul Eggert <eggert@cs.ucla.edu>.
120574 2008-01-26  Bruno Haible  <bruno@clisp.org>
120576         * m4/isnand.m4 (gl_FUNC_ISNAND_NO_LIBM): Test the GCC >= 4.0 built-in.
120577         * lib/isnand.h (isnand): Use the GCC >= 4.0 built-in.
120579 2008-01-26  Bruno Haible  <bruno@clisp.org>
120581         * m4/isnanf.m4 (gl_HAVE_ISNANF_NO_LIBM, gl_ISNANF_WORKS): Test the
120582         GCC >= 4.0 built-in.
120583         * lib/isnanf.h (isnanf): Use the GCC >= 4.0 built-in.
120585 2008-01-26  Bruno Haible  <bruno@clisp.org>
120587         Rename isnan, applicable to 'double' only, to isnand.
120588         * modules/isnand-nolibm: Renamed from modules/isnan-nolibm.
120589         (Files): Add lib/isnand.h, lib/isnand.c. Remove lib/isnan.h.
120590         (configure.ac): Update.
120591         (Include): Replace "isnan.h" with "isnand.h".
120592         * m4/isnand.m4: Renamed from m4/isnan.m4.
120593         (gl_FUNC_ISNAND_NO_LIBM): Renamed from gl_FUNC_ISNAN_NO_LIBM. Set
120594         HAVE_ISNAND_IN_LIBC instead of HAVE_ISNAN_IN_LIBC. Build isnand.c
120595         instead of isnan.c.
120596         * lib/isnand.h: Renamed from lib/isnan.h. Test HAVE_ISNAND_IN_LIBC
120597         instead of HAVE_ISNAN_IN_LIBC.
120598         (isnand): Renamed from isnan.
120599         * lib/isnand.c: New file.
120600         * modules/isnand-nolibm-tests: Renamed from modules/isnan-nolibm-tests.
120601         (Files): Add tests/test-isnand.c. Remove tests/test-isnan.c.
120602         (Makefile.am): Update.
120603         * tests/test-isnand.c: Renamed from tests/test-isnan.c.
120604         Include isnand.h instead of isnan.h.
120605         (main): Test isnand instead of isnan.
120606         * modules/fprintf-posix (Depends-on): Add isnand-nolibm, remove
120607         isnan-nolibm.
120608         * modules/frexp (Depends-on): Likewise.
120609         * modules/frexp-tests (Depends-on): Likewise.
120610         * modules/frexp-nolibm (Depends-on): Likewise.
120611         * modules/frexp-nolibm-tests (Depends-on): Likewise.
120612         * modules/isfinite (Depends-on): Likewise.
120613         * modules/round-tests (Depends-on): Likewise.
120614         * modules/signbit (Depends-on): Likewise.
120615         * modules/signbit-tests (Depends-on): Likewise.
120616         * modules/snprintf-posix (Depends-on): Likewise.
120617         * modules/sprintf-posix (Depends-on): Likewise.
120618         * modules/trunc-tests (Depends-on): Likewise.
120619         * modules/unistdio/u8-vasnprintf (Depends-on): Likewise.
120620         * modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
120621         * modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
120622         * modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
120623         * modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
120624         * modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
120625         * modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
120626         * modules/vasnprintf-posix (Depends-on): Likewise.
120627         * modules/vasprintf-posix (Depends-on): Likewise.
120628         * modules/vfprintf-posix (Depends-on): Likewise.
120629         * modules/vsnprintf-posix (Depends-on): Likewise.
120630         * modules/vsprintf-posix (Depends-on): Likewise.
120631         * lib/frexp.c: Include isnand.h instead of isnan.h.
120632         (ISNAN): Set to isnand instead of isnan.
120633         * lib/isfinite.c: Include isnand.h instead of isnan.h.
120634         (gl_isfinited): Use isnand instead of isnan.
120635         * lib/signbitd.c: Include isnand.h instead of isnan.h.
120636         (gl_signbitd): Use isnand instead of isnan.
120637         * lib/vasnprintf.c: Include isnand.h instead of isnan.h.
120638         (is_infinite_or_zero, VASNPRINTF): Use isnand instead of isnan.
120639         * tests/test-frexp.c: Include isnand.h instead of isnan.h.
120640         (main): Use isnand instead of isnan.
120641         * tests/test-round1.c: Include isnand.h.
120642         (main): Use isnand instead of isnan.
120643         * tests/test-round2.c: Include isnand.h instead of isnan.h.
120644         (ISNAN): Set to isnand instead of isnan.
120645         * tests/test-trunc1.c: Include isnand.h.
120646         (main): Use isnand instead of isnan.
120647         * tests/test-trunc2.c: Include isnand.h instead of isnan.h.
120648         (equal): Use isnand instead of isnan.
120649         * MODULES.html.sh (Mathematics <math.h>): Replace isnan-nolibm with
120650         isnand-nolibm.
120651         * NEWS: Mention the change.
120653 2008-01-25  Paul Eggert  <eggert@cs.ucla.edu>
120654             Bruno Haible  <bruno@clisp.org>
120656         * m4/signbit.m4 (gl_SIGNBIT): Require a macro definition. Test whether
120657         the GCC builtins for signbits are present and set
120658         REPLACE_SIGNBIT_USING_GCC if so.
120659         * lib/math.in.h (signbit): Define using GCC builtins if
120660         REPLACE_SIGNBIT_USING_GCC is set.
120661         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize
120662         REPLACE_SIGNBIT_USING_GCC.
120663         * modules/math (Makefile.am): Substitute REPLACE_SIGNBIT_USING_GCC.
120665 2008-01-25  Jim Meyering  <meyering@redhat.com>
120667         Prefer <config.h> over "config.h".  See autoconf doc for explanation.
120668         * lib/poll.c: Include <config.h>, not "config.h".
120669         * tests/test-getaddrinfo.c: Likewise.
120671 2008-01-25  Simon Josefsson  <simon@josefsson.org>
120673         * modules/sockets-tests: New file.
120675 2008-01-24  Simon Josefsson  <simon@josefsson.org>
120677         * modules/sockets: New module, can be used to call WSA_Startup and
120678         WSA_Cleanup when needed.
120680         * lib/sockets.h, lib/sockets.c: New files.
120682         * m4/sockets.m4: New file.
120684         * tests/test-sockets.c: New file.
120686 2008-01-19  Bruno Haible  <bruno@clisp.org>
120688         * doc/posix-headers: Renamed from doc/headers.
120689         * doc/posix-functions: Renamed from doc/functions.
120690         * doc/gnulib.texi: Update.
120692 2008-01-19  Bruno Haible  <bruno@clisp.org>
120694         * doc/glibc-functions/strcasestr.texi: Include contents of
120695         doc/functions/strcasestr.texi, fixing the list of platforms.
120696         * doc/functions/strcasestr.texi: Remove file.
120698 2008-01-19  Bruno Haible  <bruno@clisp.org>
120700         * doc/glibc-functions/memmem.texi: Include contents of
120701         doc/functions/memmem.texi.
120702         * doc/functions/memmem.texi: Remove file.
120704 2008-01-18  Bruno Haible  <bruno@clisp.org>
120706         * doc/glibc-functions/*.texi: New files.
120707         * doc/gnulib.texi (Glibc Function Substitutes): Completely rewritten
120708         to use the new files.
120710 2008-01-17  Bruno Haible  <bruno@clisp.org>
120712         * tests/test-gethostname.c (main): Fix printf statement.
120714 2008-01-17  Simon Josefsson  <simon@josefsson.org>
120716         * modules/gethostname-tests: New file.
120718         * tests/test-gethostname.c: New file.
120720 2008-01-17  Simon Josefsson  <simon@josefsson.org>
120722         * lib/gethostname.c: Include string.h unconditionally, strncpy is
120723         used by the UNAME case.  Reported by Bruno Haible
120724         <bruno@clisp.org>.
120726 2008-01-17  Eric Blake  <ebb9@byu.net>
120728         Convert c-strcasestr to be more efficient.
120729         * modules/c-strcasestr (Files): Use Two-Way, not KMP.
120730         (Depends-on): Add c-strcase, remove malloca, strnlen.
120731         * tests/test-c-strcasestr.c (main): Enhance test.
120732         * lib/c-strcasestr.c (c_strcasestr): Rewrite to new algorithm.
120734 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
120736         * build-aux/bootstrap (MSGID_BUGS_ADDRESS): New overridable variable.
120737         Use it in creating po/Makevars.
120739 2008-01-15  Simon Josefsson  <simon@josefsson.org>
120741         * lib/gc-libgcrypt.c (gc_init): Disable secure memory by default.
120742         Applications that requires it should initialize libgcrypt
120743         manually.
120745 2008-01-16  Simon Josefsson  <simon@josefsson.org>
120747         * lib/gethostname.c [!HAVE_UNAME]: Need string.h for strcpy.
120749 2008-01-15  Paul Eggert  <eggert@cs.ucla.edu>
120751         Fix problem with getdate on mingw32 reported by Simon Josefsson
120752         in <http://lists.gnu.org/r/bug-gnulib/2008-01/msg00192.html>.
120753         * lib/getdate.y (get_date): Check "HAVE_DECL_TZNAME", not "defined
120754         tzname", when deciding whether to declare tzname.
120755         * lib/strftime.c (tzname): Likewise.
120757 2008-01-15  Bruno Haible  <bruno@clisp.org>
120759         Work around a MacOS X 10.5 bug in frexpl().
120760         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Also check denormalized numbers.
120761         * doc/functions/frexpl.texi: Document the bug.
120762         Reported by Elias Pipping <pipping@gentoo.org>.
120764 2008-01-14  Eric Blake  <ebb9@byu.net>
120766         Touch up previous patch.
120767         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Fix typo.
120768         * doc/functions/strcasestr.texi (strcasestr): Document OpenBSD bug.
120770         Convert strcasestr module to use Two-Way algorithm.
120771         * modules/strcasestr-simple: New module, based on the old
120772         strcasestr, but with Two-Way rather than KMP.
120773         * modules/strcasestr (Depends-on): Change to strcasestr-simple.
120774         * lib/string.in.h (rpl_strcasestr): Declare.
120775         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Check for linear
120776         performance.
120777         * lib/strcasestr.c (strcasestr): Simplify, and avoid malloc.
120778         * modules/string (Makefile.am): Support strcasestr.
120779         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Likewise.
120780         * modules/strcasestr-tests (Depends-on): Check for alarm.
120781         * tests/test-strcasestr.c: Augment test.
120782         * lib/str-two-way.h: Clean up stray macro.
120783         * NEWS: Document new module.
120784         * MODULES.html.sh (string handling): Likewise.
120785         * doc/functions/strcasestr.texi: New file.
120786         * doc/gnulib.texi (Function Substitutes): New node.  Move memmem
120787         here, since it is not a POSIX function.
120789 2008-01-14  Colin Watson  <cjwatson@debian.org>
120790             Bruno Haible  <bruno@clisp.org>
120792         * m4/strsignal.m4 (gl_FUNC_STRSIGNAL): Also check whether strsignal
120793         works fine; if not, set REPLACE_STRSIGNAL.
120794         (gl_PREREQ_STRSIGNAL): Require AC_DECL_SYS_SIGLIST.
120795         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
120796         REPLACE_STRSIGNAL.
120797         * lib/string.in.h (strsignal): Consider REPLACE_STRSIGNAL.
120798         * modules/string (Makefile.am): Substitute REPLACE_STRSIGNAL.
120799         * tests/test-strsignal.c (main): Check out-of-range signal numbers.
120801 2008-01-14  Bruno Haible  <bruno@clisp.org>
120803         * modules/strsignal (Include): Change to <string.h>.
120805 2008-01-14  Colin Watson  <cjwatson@debian.org>
120807         * modules/argp (Notice): Add a notice recommending to change
120808         XGETTEXT_OPTIONS.
120809         (configure.ac): Invoke AM_XGETTEXT_OPTION if it exists.
120811 2008-01-13  Colin Watson  <cjwatson@debian.org>
120813         * modules/strsignal-tests: New file.
120814         * tests/test-strsignal.c: New file.
120816         * lib/strsignal.c: New file, from glibc with modifications.
120817         * lib/siglist.h: New file, from glibc with modifications.
120818         * lib/string.in.h (strsignal): New declaration.
120819         * m4/strsignal.m4: New file.
120820         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
120821         GNULIB_STRSIGNAL and HAVE_DECL_STRSIGNAL.
120822         * modules/strsignal: New file.
120823         * modules/string (Makefile.am): Substitute GNULIB_STRSIGNAL and
120824         HAVE_DECL_STRSIGNAL.
120826 2008-01-13  Bruno Haible  <bruno@clisp.org>
120828         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check that the
120829         locale encoding is not ASCII. Needed for OpenBSD 4.0.
120830         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.
120831         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
120833 2008-01-13  Bruno Haible  <bruno@clisp.org>
120835         * lib/argp-fmtstream.h (__attribute__): Don't redefine if
120836         __STRICT_ANSI__ is set: it's not needed by any version of gcc.
120837         * lib/argp.h (__attribute__): Likewise.
120838         * lib/c-stack.c (__attribute__): Likewise.
120839         * lib/error.h (__attribute__): Likewise.
120840         * lib/fts.c (__attribute__): Likewise.
120841         * lib/openat.h (__attribute__): Likewise.
120842         * lib/stdio.in.h (__attribute__): Likewise.
120843         * lib/string.in.h (__attribute__): Likewise.
120844         * lib/utimens.c (__attribute__): Likewise.
120845         * lib/vasnprintf.h (__attribute__): Likewise.
120846         * lib/xalloc.h (__attribute__): Likewise.
120847         * lib/xprintf.h (__attribute__): Likewise.
120848         * lib/xstrtol.h (__attribute__): Likewise.
120849         * lib/xvasprintf.h (__attribute__): Likewise.
120851 2008-01-12  Bruno Haible  <bruno@clisp.org>
120853         * doc/gnulib.texi (Glibc Header File Substitutes): New chapter.
120854         * doc/glibc-headers/a.out.texi: New file.
120855         * doc/glibc-headers/aliases.texi: New file.
120856         * doc/glibc-headers/alloca.texi: New file.
120857         * doc/glibc-headers/ar.texi: New file.
120858         * doc/glibc-headers/argp.texi: New file.
120859         * doc/glibc-headers/argz.texi: New file.
120860         * doc/glibc-headers/byteswap.texi: New file.
120861         * doc/glibc-headers/crypt.texi: New file.
120862         * doc/glibc-headers/endian.texi: New file.
120863         * doc/glibc-headers/envz.texi: New file.
120864         * doc/glibc-headers/err.texi: New file.
120865         * doc/glibc-headers/error.texi: New file.
120866         * doc/glibc-headers/execinfo.texi: New file.
120867         * doc/glibc-headers/fpu_control.texi: New file.
120868         * doc/glibc-headers/fstab.texi: New file.
120869         * doc/glibc-headers/fts.texi: New file.
120870         * doc/glibc-headers/getopt.texi: New file.
120871         * doc/glibc-headers/ieee754.texi: New file.
120872         * doc/glibc-headers/ifaddrs.texi: New file.
120873         * doc/glibc-headers/libintl.texi: New file.
120874         * doc/glibc-headers/mcheck.texi: New file.
120875         * doc/glibc-headers/mntent.texi: New file.
120876         * doc/glibc-headers/obstack.texi: New file.
120877         * doc/glibc-headers/paths.texi: New file.
120878         * doc/glibc-headers/printf.texi: New file.
120879         * doc/glibc-headers/pty.texi: New file.
120880         * doc/glibc-headers/resolv.texi: New file.
120881         * doc/glibc-headers/shadow.texi: New file.
120882         * doc/glibc-headers/sysexits.texi: New file.
120883         * doc/glibc-headers/ttyent.texi: New file.
120885 2008-01-12  Jim Meyering  <meyering@redhat.com>
120887         announce-gen: emit Gnulib's git-based version string.
120888         * build-aux/announce-gen: Remove option: --gnulib-snapshot-time-stamp=S.
120889         New option --gnulib-version=V, where V is expected to be
120890         the output of running git describe in the gnulib directory.
120891         (get_tool_versions): Request feedback on xdelta.  I suspect it's
120892         not useful, and plan to stop publishing an xdelta file with each
120893         coreutils release.
120895         * build-aux/announce-gen: Also check for lzma-compressed files.
120897 2008-01-11  Bruno Haible  <bruno@clisp.org>
120899         * tests/test-memmem.c (main): Increase maximum allowed time.
120900         * tests/test-strstr.c (main): Likewise.
120902 2008-01-11  Bruno Haible  <bruno@clisp.org>
120904         * doc/functions/memmem.texi: Add more precisions about platforms.
120905         * doc/functions/strstr.texi: Likewise.
120907 2008-01-10  Eric Blake  <ebb9@byu.net>
120909         * m4/strstr.m4: Delete cruft from copy-n-paste.
120910         Reported by Bruno Haible.
120912 2008-01-10  Bruno Haible  <bruno@clisp.org>
120914         Make c-strstr rely on strstr.
120915         * lib/c-strstr.c: Don't include str-kmp.h.
120916         (c_strstr): Define in terms of strstr.
120917         * modules/c-strstr (Files): Remove lib/str-kmp.h.
120918         (Depends-on): Remove stdbool, malloca, strnlen. Add strstr.
120920 2008-01-10  Bruno Haible  <bruno@clisp.org>
120922         * doc/gnulib.texi (String Functions in C Locale): New section.
120923         * doc/c-ctype.texi: New file.
120924         * doc/c-strcase.texi: New file.
120925         * doc/c-strcaseeq.texi: New file.
120926         * doc/c-strcasestr.texi: New file.
120927         * doc/c-strstr.texi: New file.
120928         * doc/c-strtod.texi: New file.
120929         * doc/c-strtold.texi: New file.
120931 2008-01-10  Eric Blake  <ebb9@byu.net>
120933         * lib/relocatable.h: Fix a comment.
120935 2008-01-10  Eric Blake  <ebb9@byu.net>
120937         Share two-way algorithm.
120938         * lib/str-two-way.h: New file, merged from...
120939         * lib/memmem.c: ...here...
120940         * lib/strstr.c: ...and here.
120941         * modules/memmem (Files): Use it.
120942         * modules/strstr (Files): Likewise.
120944         Avoid quadratic strstr implementations.
120945         * lib/strstr.c: New file.
120946         * m4/strstr.m4: Likewise.
120947         * modules/strstr: Likewise.
120948         * modules/strstr-tests: Likewise.
120949         * tests/test-strstr.c: Likewise.
120950         * lib/string.in.h (rpl_strstr): Declare.
120951         (memmem) [GNULIB_POSIXCHECK]: Document speed issue.
120952         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Support strstr.
120953         * modules/string (Makefile.am): Likewise.
120954         * MODULES.html.sh (string handling): Mention new module.
120955         * doc/functions/strstr.texi (strstr): Document the bug.
120957 2008-01-10  Bruno Haible  <bruno@clisp.org>
120959         * lib/relocatable.h (relocate): State whether result is freshly
120960         allocated or not.
120961         * lib/relocatable.c (relocate): Return a freshly allocated string
120962         instead of a pointer to a privately held string.
120963         Reported by Sylvain Beucler <beuc@gnu.org>.
120965 2008-01-10  Colin Watson  <cjwatson@debian.org>
120967         * lib/canonicalize-lgpl.c [!_LIBC]: Fix typo in #if directive:
120968         s/S_ISNLK/S_ISLNK/.
120970 2008-01-09  Bruno Haible  <bruno@clisp.org>
120972         * doc/functions/memmem.texi: Use the same structure as snprintf.texi
120973         and other files.
120974         * m4/memmem.m4 (gl_FUNC_MEMMEM): Say "guessing no" instead of "no"
120975         if it's only a guess.
120976         * modules/memmem: Simplify by depending on memmem-simple.
120978 2008-01-09  Bruno Haible  <bruno@clisp.org>
120980         Work around OpenBSD 4.0 tdelete() bug.
120981         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Also check tdelete's return value.
120982         * lib/search.in.h: If REPLACE_TSEARCH is 1, define tsearch etc. as
120983         macros and don't redefine the enum values.
120984         * m4/search_h.m4 (gl_SEARCH_H_DEFAULTS): Initialize REPLACE_TSEARCH.
120985         * modules/search (Makefile.am): Also substitute REPLACE_TSEARCH.
120986         * doc/functions/tdelete.texi: Document the OpenBSD 4.0 bug.
120988 2008-01-09  Bruno Haible  <bruno@clisp.org>
120990         * tests/test-wcwidth.c: Include <string.h> and localcharset.h.
120991         (main): Don't perform the tests if setlocale did not install a UTF-8
120992         locale. Needed on OpenBSD 4.0.
120993         * modules/wcwidth-tests (Depends-on): Add localcharset.
120995 2008-01-09  Paul Eggert  <eggert@cs.ucla.edu>
120997         gl_FUNC_ALLOCA no longer defines HAVE_ALLOCA_H unconditionally.
120998         See <http://lists.gnu.org/r/bug-gnulib/2007-12/msg00149.html>.
120999         * NEWS: announce this.
121000         * m4/alloca.m4 (gl_FUNC_ALLOCA): Don't define HAVE_ALLOCA_H.
121002 2008-01-09  Simon Josefsson  <simon@josefsson.org>
121003         and Eric Blake  <ebb9@byu.net>
121005         Add memmem-simple module.
121006         * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): New macro.
121007         (gl_FUNC_MEMMEM): Separate performance from presence checks.
121008         * modules/memmem-simple: New file.
121009         * modules/memmem (Description): Tweak.
121010         * MODULES.html.sh (string handling): Mention new module.
121011         * doc/functions/memmem.texi (memmem): Distinguish which flaws are
121012         addressed by memmem-simple.
121013         * NEWS: Document the difference.
121015 2008-01-09  Eric Blake  <ebb9@byu.net>
121017         Give gcc some memmem optimization hints.
121018         * lib/string.in.h (memmem, memrchr, strchrnul, strnlen, strpbrk)
121019         (strcasestr): Declare as pure.
121020         * modules/memmem (Maintainer): Claim my implementation.
121022 2008-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
121024         Support AIX 6.1 and higher.
121025         * build-aux/config.libpath: Likewise.
121026         * build-aux/config.rpath: Likewise.
121028 2008-01-08  Jim Meyering  <meyering@redhat.com>
121029             Bruno Haible  <bruno@clisp.org>
121031         * lib/printf-parse.c (PRINTF_PARSE): Handle a size specifier "q"
121032         on MacOS X and a size specifier "I64" on mingw. Needed for PRIdMAX.
121033         Reported by Peter Fales in
121034         <http://lists.gnu.org/r/bug-coreutils/2007-12/msg00148.html>.
121036 2008-01-08  Bruno Haible  <bruno@clisp.org>
121038         * modules/unictype/category-of (Depends-on): Add
121039         unictype/category-none.
121040         * modules/unictype/category-and-tests (Depends-on): Add
121041         unictype/category-{L,N,Lu,Nd}.
121042         * modules/unictype/category-and-not-tests (Depends-on): Likewise.
121043         * modules/unictype/category-or-tests (Depends-on): Add
121044         unictype/category-{L,N}.
121045         * modules/unictype/category-name-tests (Depends-on): Add
121046         unictype/category-{Z,Nl}.
121047         Reported by Simon Josefsson.
121049 2008-01-08  Bruno Haible  <bruno@clisp.org>
121051         * lib/str-kmp.h (knuth_morris_pratt_unibyte): Document the calling
121052         convention better.
121053         * lib/mbsstr.c (knuth_morris_pratt_multibyte): Likewise.
121054         * lib/mbscasestr.c (knuth_morris_pratt_multibyte): Likewise.
121055         Reported by Peter Miller <millerp@canb.auug.org.au>.
121057 2008-01-08  Eric Blake  <ebb9@byu.net>
121059         Rewrite memmem to guarantee linear complexity without malloc.
121060         * lib/memmem.c (memmem): Use Two-Way rather than
121061         Knuth-Morris-Pratt, to allow O(1) space usage.
121062         (critical_factorization, two_way_short_needle)
121063         (two_way_long_needle): New functions.
121064         (knuth_morris_pratt): Delete.
121065         * modules/memmem (Depends-on): No longer need malloca or stdbool.
121066         Add stdint.
121067         * tests/test-memmem.c (main): Add tests for periodic needle and
121068         sublinear performance.
121069         * doc/functions/memmem.texi (memmem): Document other deficiencies
121070         in cygwin and older glibc.
121072 2008-01-08  Bruno Haible  <bruno@clisp.org>
121074         * modules/memmem-tests (Makefile.am): Remove TESTS_ENVIRONMENT
121075         augmentation.
121077 2008-01-08  Mike Frysinger  <vapier@gentoo.org>
121079         Add a configure time option: --disable-acl.
121080         * m4/acl.m4 (gl_FUNC_ACL): Wrap all ACL logic in a call to
121081         AC_ARG_ENABLE(acl).
121083 2008-01-06  Simon Josefsson  <simon@josefsson.org>
121085         * tests/test-localename.c: Don't include obsolete "setenv.h".
121087         * modules/localename-tests (Depends-on): Need unsetenv.
121089 2008-01-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
121091         * DEPENDENCIES: Require Texinfo version 4.6 or newer.
121093 2008-01-06  Colin Watson  <cjwatson@debian.org>
121095         * users.txt: Add man-db.
121097 2008-01-07  Bruno Haible  <bruno@clisp.org>
121099         * doc/gnulib-intro.texi (Library vs Reusable Code): Restore the
121100         previous section name.
121102 2008-01-07  Bruno Haible  <bruno@clisp.org>
121104         * lib/progname.c (set_program_name): Don't strip off a leading
121105         "lt-" prefix outside a .libs directory.
121106         Suggested by Paul Eggert.
121108 2008-01-01  Sylvain Beucler  <beuc@gnu.org>
121109             Bruno Haible  <bruno@clisp.org>
121111         Improve memory cleanup in 'relocatable' module.
121112         * lib/relocatable.h (compute_curr_prefix): Change return type to
121113         'char *'.
121114         * lib/relocatable.c (compute_curr_prefix): Change return type to
121115         'char *'. Free curr_installdir after use.
121116         (relocate): Free curr_prefix_better after use.
121117         * lib/progreloc.c (prepare_relocate): Free curr_prefix after use.
121119 2008-01-01  Bruno Haible  <bruno@clisp.org>
121121         * tests/test-wcwidth.c (main): Relax test of U+2060. Avoids a test
121122         failure on older glibc systems.
121123         Reported by Peter Fales <psfales@alcatel-lucent.com>.
121125 2008-01-05  Eric Blake  <ebb9@byu.net>
121127         Avoid quadratic system memmem.
121128         * m4/memmem.m4 (gl_FUNC_MEMMEM): Check for quadratic memmem.
121129         Reported by Ralf Wildenhues.
121131         Fix memmem test for mingw.
121132         * modules/memmem-tests (configure.ac): Check for alarm.
121133         * tests/test-memmem.c (main): Avoid alarm on platforms that lack
121134         it.
121135         * doc/functions/memmem.texi: New file.
121136         * doc/gnulib.texi (Function Substitutes): Add memmem.
121137         Reported by Bruno Haible.
121139 2008-01-04  Bruno Haible  <bruno@clisp.org>
121141         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP):
121142         Require gl_HEADER_STRINGS_H_DEFAULTS, not
121143         gl_HEADER_STRING_H_DEFAULTS.
121145 2008-01-04  Eric Blake  <ebb9@byu.net>
121147         Shorten duration of memmem test.
121148         * tests/test-memmem.c (main): Use alarm to declare failure if test
121149         is taking too long.
121150         Reported by Ralf Wildenhues.
121152 2007-12-21  Simon Josefsson  <simon@josefsson.org>
121154         * modules/relocatable-prog-wrapper (Depends-on): Add intprops and
121155         string, needed by strerror.
121157 2008-01-03  Colin Watson  <cjwatson@debian.org>
121158             Bruno Haible  <bruno@clisp.org>
121160         * doc/gnulib-tool.texi (Localization): New section.
121162 2008-01-02  Bruno Haible  <bruno@clisp.org>
121164         * lib/memmem.c (knuth_morris_pratt, memmem): Change all 'char *'
121165         variables to 'unsigned char *' type.
121166         Reported by Paul Eggert.
121168 2008-01-02  Jim Meyering  <jim@meyering.net>
121170         * lib/version-etc.c (COPYRIGHT_YEAR): Increase for new year.
121172 2007-12-31  Jim Meyering  <jim@meyering.net>
121174         Avoid use of private FTS type name.
121175         * lib/fts.c (fts_sort): Use FTSENT rather than "struct _ftsent".
121177 2007-12-30  Karl Berry  <karl@gnu.org>
121179         * doc/gnulib.texi (Library vs. Reusable Code): remove period, to
121180         work around defect in Texinfo and/or the standalone Info browser.
121182 2007-12-30  Bruno Haible  <bruno@clisp.org>
121184         Unify 5 copies of the KMP code.
121185         * lib/str-kmp.h: New file.
121186         * lib/c-strcasestr.c: Include str-kmp.h.
121187         (knuth_morris_pratt): Remove function.
121188         (c_strcasestr): Update.
121189         * lib/c-strstr.c: Include str-kmp.h.
121190         (knuth_morris_pratt): Remove function.
121191         (c_strcasestr): Update.
121192         * lib/mbscasestr.c: Include str-kmp.h.
121193         (knuth_morris_pratt_unibyte): Remove function.
121194         * lib/mbsstr.c: Include str-kmp.h.
121195         (knuth_morris_pratt_unibyte): Remove function.
121196         * lib/strcasestr.c: Include str-kmp.h.
121197         (knuth_morris_pratt): Remove function.
121198         (strcasestr): Update.
121199         * modules/c-strcasestr (Files): Add lib/str-kmp.h.
121200         * modules/c-strstr (Files): Likewise.
121201         * modules/mbscasestr (Files): Likewise.
121202         * modules/mbsstr (Files): Likewise.
121203         * modules/strcasestr (Files): Likewise.
121204         Suggested by Paul Eggert.
121206 2007-12-30  Bruno Haible  <bruno@clisp.org>
121208         * lib/xmalloca.c (xmmalloca): Don't define if HAVE_ALLOCA is not
121209         defined.
121211 2007-12-30  Bruno Haible  <bruno@clisp.org>
121213         * lib/xmalloca.h: Include xalloc.h.
121214         (xnmalloca): New macro.
121216 2007-12-30  Bruno Haible  <bruno@clisp.org>
121218         * lib/malloca.h (nmalloca): New macro.
121219         * lib/c-strcasestr.c (knuth_morris_pratt): Use it.
121220         * lib/c-strstr.c (knuth_morris_pratt): Likewise.
121221         * lib/mbscasestr.c (knuth_morris_pratt_unibyte,
121222         knuth_morris_pratt_multibyte): Likewise.
121223         * lib/mbsstr.c (knuth_morris_pratt_unibyte,
121224         knuth_morris_pratt_multibyte): Likewise.
121225         * lib/memmem.c (knuth_morris_pratt): Likewise.
121226         * lib/strcasestr.c (knuth_morris_pratt): Likewise.
121228 2007-12-25  Bruno Haible  <bruno@clisp.org>
121230         Fixup after 2007-10-17 commit. Ensure that 'glob' stays under LGPLv2+.
121231         * lib/glob.c: Don't include openat.h.
121232         (link_exists2_p): Add back the code that deals with the
121233         !GLOB_ALTDIRFUNC case.
121234         (link_exists_p) [!_LIBC && !HAVE_FSTATAT]: Just call link_exists2_p and
121235         let it do the filename concatenation.
121236         * m4/glob.m4 (gl_PREREQ_GLOB): Add check for fstatat.
121237         * modules/glob (Depends-on): Remove openat.
121239 2007-12-31  Bruno Haible  <bruno@clisp.org>
121241         * modules/dirfd (License): Change to LGPLv2+.
121242         Approved by Jim Meyering.
121244 2007-12-29  Paul Eggert  <eggert@cs.ucla.edu>
121246         * lib/memmem.c (knuth_morris_pratt): Check for size_t overflow
121247         when multiplying M by sizeof (size_t).
121249 2007-12-10  Martin Lambers  <marlam@marlam.de>
121251         Override getpagesize on mingw.
121252         * lib/getpagesize.c: New file.
121253         * m4/getpagesize.m4 (gl_FUNC_GETPAGESIZE): Enable replacement on mingw.
121254         * modules/getpagesize (Files): Add lib/getpagesize.c.
121255         * lib/unistd.in.h (getpagesize): Declare if we are using a replacement.
121256         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize
121257         REPLACE_GETPAGESIZE.
121258         * modules/unistd (Makefile.am): Substitute REPLACE_GETPAGESIZE.
121260 2007-12-25  Bruno Haible  <bruno@clisp.org>
121262         * modules/localcharset (Notice): New field.
121263         (configure.ac): Define LOCALCHARSET_TESTS_ENVIRONMENT.
121264         Suggested by Ben Pfaff <blp@cs.stanford.edu>.
121266 2007-12-25  Paul Eggert  <eggert@cs.ucla.edu>
121267             Bruno Haible  <bruno@clisp.org>
121269         Avoid using the syntax symbol() in formatted documentation.
121270         * MODULES.html.sh (func_module): When replacing symbol() with a
121271         hyperlink, remove the parentheses. Show an error if some remain.
121272         Recognize and render the '...' syntax.
121273         * doc/alloca-opt.texi: Remove parentheses from symbol reference.
121274         Rework. Add paragraph about GCC's inlining.
121275         * doc/alloca.texi: Likewise.
121276         * doc/error.texi: Remove parentheses from symbol reference.
121277         * doc/gnulib-intro.texi: Likewise.
121278         * doc/gnulib.texi (alloca, alloca-opt): New nodes.
121279         * modules/fnmatch (Description): Reword to say "the ... function".
121280         * modules/full-read (Description): Likewise.
121281         * modules/full-write (Description): Likewise.
121282         * modules/safe-read (Description): Likewise.
121283         * modules/safe-write (Description): Likewise.
121284         * modules/strchrnul (Description): Likewise.
121285         * modules/trim (Description): Likewise.
121286         * modules/error (Description): Remove parentheses from symbol
121287         references.
121288         * modules/verror (Description): Likewise.
121289         Reported by Karl Berry.
121291 2007-12-25  Bruno Haible  <bruno@clisp.org>
121293         Fixup after 2007-10-16 commit.
121294         * lib/glob.c (glob_in_dir): Don't use ISO C99 syntax.
121296 2007-12-24  Bruno Haible  <bruno@clisp.org>
121298         Make --enable-relocatable work with DESTDIR.
121299         * build-aux/install-reloc: Accept another argument 'destdir'. Use it
121300         to compute installdir from destprog.
121301         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): In INSTALL_PROGRAM_ENV,
121302         also set the RELOC_DESTDIR variable.
121303         Reported by Левашев Иван <octagram@bluebottle.com>.
121305 2007-12-24  Bruno Haible  <bruno@clisp.org>
121307         Fix link error due to xalloc_die().
121308         * lib/progreloc.c: When NO_XMALLOC is defined, use areadlink instead
121309         of xreadlink.
121310         * lib/relocwrapper.c: Update comments.
121311         * build-aux/install-reloc: Remove xreadlink.c from file list.
121312         * modules/relocatable-prog-wrapper (Files): Remove xreadlink.h and
121313         xreadlink.c.
121314         Reported by Левашев Иван <octagram@bluebottle.com>.
121316 2007-12-24  Bruno Haible  <bruno@clisp.org>
121318         Split setenv module into setenv and unsetenv. Get rid of setenv.h.
121319         * lib/setenv.h: Remove file.
121320         * lib/stdlib.in.h (setenv, unsetenv): New declarations, moved here from
121321         lib/setenv.h.
121322         * modules/setenv (Files): Remove lib/setenv.h, lib/unsetenv.c.
121323         (Depends-on): Add stdlib.
121324         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR. Don't invoke
121325         gl_FUNC_UNSETENV.
121326         (Include): Replace setenv.h with <stdlib.h>.
121327         * modules/unsetenv: New file.
121328         * lib/setenv.c: Include <stdlib.h> first, after alloca.h.
121329         * lib/unsetenv.c: Include <stdlib.h> first.
121330         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_SETENV_SEPARATE): Require
121331         gl_STDLIB_H_DEFAULTS. Conditionally set HAVE_SETENV to 0.
121332         (gl_FUNC_UNSETENV): Require gl_STDLIB_H_DEFAULTS. Conditionally set
121333         HAVE_UNSETENV to 0. Set VOID_UNSETENV as an AC_SUBSTed variable.
121334         * modules/stdlib (Makefile.am): Substitute also GNULIB_SETENV,
121335         HAVE_SETENV, GNULIB_UNSETENV, HAVE_UNSETENV, VOID_UNSETENV.
121336         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_SETENV,
121337         HAVE_SETENV, GNULIB_UNSETENV, HAVE_UNSETENV, VOID_UNSETENV.
121338         * doc/functions/unsetenv.texi: Update.
121339         * modules/xsetenv (Depends-on): Add unsetenv.
121340         * modules/getdate (Depends-on): Likewise.
121341         * lib/xsetenv.h: Include <stdlib.h> instead of setenv.h.
121342         * lib/xsetenv.c: Don't include setenv.h.
121343         * lib/getdate.y: Likewise.
121344         * lib/relocwrapper.c: Likewise.
121345         * modules/relocatable-prog-wrapper (Files): Remove lib/setenv.h.
121346         (Depends-on): Add stdlib.
121347         * NEWS: Mention the changes.
121348         Reported by Левашев Иван <octagram@bluebottle.com>.
121350 2007-12-23  Bruno Haible  <bruno@clisp.org>
121352         * lib/memmem.c (memmem): Use lowercase variable names. Tab
121353         indentation.
121355 2007-12-23  Bruno Haible  <bruno@clisp.org>
121357         * lib/c-strcasestr.c: Add more comments.
121358         * lib/c-strstr.c: Likewise.
121359         * lib/mbscasestr.c: Likewise.
121360         * lib/mbsstr.c: Likewise.
121361         * lib/strcasestr.c: Likewise.
121362         * lib/memmem.c: Likewise.
121364 2007-12-23  Bruno Haible  <bruno@clisp.org>
121366         * tests/test-memmem.c: Include <string.h> first.
121368 2007-12-22  Bruno Haible  <bruno@clisp.org>
121370         * gnulib-tool (func_create_testdir): Change $auxdir while generating
121371         the contents of $testsbase.
121372         Reported by Ralf Wildenhues.
121374 2007-12-22  Bruno Haible  <bruno@clisp.org>
121376         * gnulib-tool (func_emit_tests_Makefile_am): Replace local_ldadd with
121377         two variables local_ldadd_before, local_ldadd_last.
121379 2007-12-20  Eric Blake  <ebb9@byu.net>
121381         Work around circular library issue when cross-compiling.
121382         * lib/progname.c (set_program_name): Use strncmp, not memcmp, so
121383         that progname.o does not need to pull in rpl_memcmp.
121385 2007-12-19  Eric Blake  <ebb9@byu.net>
121387         Fix memmem to avoid O(n^2) worst-case complexity.
121388         * lib/memmem.c (knuth_morris_pratt): New function.
121389         (memmem): Use it if first few naive iterations fail.
121390         * m4/memmem.m4 (gl_FUNC_MEMMEM): Detect cygwin bug.
121391         * modules/memcmp (License): Set to LGPLv2+, not LGPL.
121392         * modules/memchr (License): Likewise.
121393         * modules/memmem (Depends-on): Add memcmp, memchr, stdbool, and
121394         malloca.
121395         * tests/test-memmem.c: Rewrite, borrowing ideas from
121396         test-mbsstr1.c; the old version wouldn't even compile!
121397         * modules/memmem-tests: New file.
121398         * lib/string.in.h (rpl_memmem): Add declaration.
121399         * modules/string (Makefile.am): Substitute REPLACE_MEMMEM.
121400         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Default for
121401         REPLACE_MEMMEM.
121403 2007-12-18  Paul Eggert  <eggert@cs.ucla.edu>
121405         Fix problem with _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H on VMS.
121406         * lib/stdint.in.h (_GL_JUST_INCLUDE_SYSTEM_INTTYPES_H): Define
121407         before any system include files, and undef after them all.  This
121408         should fix a problem on VMS reported by John E. Malmberg in
121409         <http://lists.gnu.org/r/bug-gnulib/2007-12/msg00118.html>.
121411 2007-12-17  Eric Blake  <ebb9@byu.net>
121413         Revert addition of verify, for BSD/OS.
121414         * lib/fseeko.c [!HAVE_FSEEKO]: Allow off_t > long, even though it
121415         can't handle large files, for the sake of obsolete platforms.
121416         * modules/fseeko (Depends-on): Remove verify.
121417         * doc/functions/fseeko.texi (fseeko): Document BSD/OS limitation.
121418         * doc/functions/ftello.texi (ftello): Likewise.
121419         * doc/functions/fgetpos.texi (fgetpos): Likewise.
121420         Reported by Larry Jones.
121422 2007-12-17  Petr Salinger  <Petr.Salinger@seznam.cz>
121424         getcwd.c: Use a more readable witness: HAVE_OPENAT_SUPPORT
121425         * lib/getcwd.c: Define and use HAVE_OPENAT_SUPPORT, in place of AT_FDCWD.
121427 2007-12-17  Jim Meyering  <meyering@redhat.com>
121429         Port to GNU/kFreeBSD - FreeBSD kernel + GNU libc,
121430         which has no openat syscall, yet <fcntl.h> does define AT_FDCWD.
121431         * lib/getcwd.c: Undef AT_FDCWD if there is no openat function.
121432         * modules/getcwd (Depends-on): Add openat.
121433         Reported by Petr Salinger.
121435 2007-12-17  Bruno Haible  <bruno@clisp.org>
121437         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Use GL_NOCRASH to
121438         avoid a segmentation fault of the configure test on x86_64 systems.
121440 2007-12-15  Jim Meyering  <meyering@redhat.com>
121442         * build-aux/gnupload (GPG): Don't hard-code absolute name of gpg binary.
121444 2007-12-13  Eric Blake  <ebb9@byu.net>
121446         Another fseek test.
121447         * tests/test-fseek.c (main): Also test ungetc handling.
121448         * tests/test-fseeko.c (main): Likewise.
121449         * modules/fseeko (Depends-on): Add verify.
121450         * lib/fseeko.c [!HAVE_FSEEKO]: Verify that off_t is not too
121451         large.
121452         Reported by Larry Jones.
121454         Fix fseeko on mingw.
121455         * lib/fseeko.c (rpl_fseeko) [_IOERR]: Reset EOF flag on successful
121456         seek.
121458         Beef up fseek tests.
121459         * tests/test-fseek.c (main): Also test eof handling.
121460         * tests/test-fseeko.c (main): Likewise.
121461         Reported by Larry Jones.
121463 2007-12-13  Larry Jones  <lawrence.jones@siemens.com>  (tiny change)
121465         Fix fseeko on BSD-based platforms.
121466         * lib/fseeko.c (rpl_fseeko) [__sferror]: Reset EOF flag on
121467         successful seek.
121469 2007-12-12  Eric Blake  <ebb9@byu.net>
121471         Allow circular dependency of separate libtests.a
121472         * gnulib-tool (func_emit_tests_Makefile_am): Add AM_LIBTOOLFLAGS
121473         when use_libtests.
121475 2007-12-11  Eric Blake  <ebb9@byu.net>
121477         Fix bug with -0.0L in previous patch.
121478         * lib/isnan.c (rpl_isnanl): Make robust to -0.0L and pad bits.
121479         * tests/test-isnan.c (main): Also test on zeroes.
121480         * tests/test-isnanf.c (main): Likewise.
121481         * tests/test-isnanl.h (main): Likewise.
121483         Detect pseudo-denormals on x86 even when cross-compiling.
121484         * lib/isnan.c (rpl_isnanl) [!KNOWN_EXPBIT0_LOCATION
121485         && USE_LONG_DOUBLE && x86]: Add one more check to filter out
121486         invalid bit patterns that happen to satisfy ==.
121488         Avoid link failures with separate libtests.a.
121489         * gnulib-tool (func_emit_tests_Makefile_am): Also list local_ldadd
121490         last, to satisfy circular dependencies.
121492 2007-12-11  Eric Blake  <ebb9@byu.net>
121493         and Bruno Haible  <bruno@clisp.org>
121495         Fix OpenBSD 4.0 <float.h> handling of long double.
121496         * m4/float_h.m4 (gl_FLOAT_H): Also claim OpenBSD is broken.
121497         * lib/float.in.h [__OpenBSD__]: Add fixes for OpenBSD.
121498         * doc/headers/float.texi (float.h): Document OpenBSD bug.
121500 2007-12-11  Jim Meyering  <meyering@redhat.com>
121502         * users.txt: Add libvirt.
121504         Support versions of autoconf prior to 2.59c.
121505         * gnulib-tool (func_emit_initmacro_done): Define m4_foreach_w
121506         if it is not already defined.
121508 2007-12-09  Bruno Haible  <bruno@clisp.org>
121510         Let 'gnulib-tool --import' collect sources needed for the tests in
121511         tests/ rather than in lib/.
121512         * gnulib-tool (func_emit_tests_Makefile_am): Accept use_libtests
121513         argument. If true, add rules to generate libtests.a, and put libtests.a
121514         into $(LDADD). Consider source files in subdirectories and set
121515         uses_subdirs.
121516         (func_emit_initmacro_start, func_emit_initmacro_end,
121517         func_emit_initmacro_done): Pass all arguments explicitly.
121518         (func_import): Determine two module lists main_modules,
121519         testsrelated_modules. Determine use_libtests. Determine two variables
121520         sed_transform_main_lib_file, sed_transform_testsrelated_lib_file
121521         instead of just sed_transform_lib_file. Determine two variables
121522         main_files and testsrelated_files. Compute 'files' as the union of
121523         both. Adjust sed_rewrite_old_files, sed_rewrite_new_files,
121524         func_add_or_update. In the generated gnulib-comp.m4, collect the
121525         object files for tests/ in different variables than those for lib/.
121526         Substitute LIBTESTS_LIBDEPS.
121527         (func_create_testdir): Combine the uses_subdirs results from
121528         func_emit_lib_Makefile_am and from func_emit_tests_Makefile_am.
121530 2007-12-09  Bruno Haible  <bruno@clisp.org>
121532         * gnulib-tool (func_emit_tests_Makefile_am): Expand references to
121533         the build-aux directory.
121535 2007-12-09  Bruno Haible  <bruno@clisp.org>
121537         * gnulib-tool (func_emit_tests_Makefile_am): Remove redundant code
121538         introduced on 2006-09-09.
121540 2007-12-07  Jim Meyering  <meyering@redhat.com>
121542         Let these macros work also with autoconf-2.59.
121543         * m4/getline.m4 (gl_FUNC_GETLINE): Require only autoconf-2.59.  2.60
121544         is not needed, since gnulib now permits use of AC_CHECK_DECLS_ONCE.
121545         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
121547 2007-12-06  Jim Meyering  <meyering@redhat.com>
121549         Avoid a configure-time syntax error in gl_FUNC_ACL.
121550         * m4/acl.m4 (gl_FUNC_ACL): Be careful to check for the acl_trivial
121551         function in each branch, before testing the cache variable.
121553 2007-12-04  Eric Blake  <ebb9@byu.net>
121555         Make scripts executable.
121556         * build-aux/config.guess: Add execute permissions.
121557         * build-aux/config.sub: Likewise.
121558         * build-aux/gendocs.sh: Likewise.
121560         Fix frexp on mingw.
121561         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Detect mingw bug when
121562         cross-compiling.
121563         * doc/functions/frexp.texi (frexp): Document the bug.
121565         Make cygwin fseeko check more reliable.
121566         * m4/stdio_h.m4 (gl_STDIN_LARGE_OFFSET) [__CYGWIN__]: Use cygwin
121567         version numbers, rather than unrelated feature check.
121568         * doc/functions/fseeko.texi (fseeko): Tweak failure report.
121569         * doc/functions/ftello.texi (ftello): Likewise.
121570         Reported by Bruno Haible.
121572         * m4/strerror.m4: Bump version number.
121574 2007-12-03  Bruno Haible  <bruno@clisp.org>
121576         * doc/functions/mprotect.texi: Mention the mingw problem.
121578 2007-12-03  Eric Blake  <ebb9@byu.net>
121580         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): Ensure
121581         REPLACE_STRERROR is initialized before this macro.
121583 2007-12-03  Paul Eggert  <eggert@cs.ucla.edu>
121585         Add support for Solaris 10 ACLs.  Also, ACLs are Gnulib, not Autoconf.
121586         * modules/acl (configure.ac): Rename AC_FUNC_ACL to gl_FUNC_ACL.
121587         * m4/acl.m4 (gl_FUNC_ACL): Renamed from AC_FUNC_ACL.  On Solaris,
121588         put -lsec in even for programs other than 'ls'.  This fixes a problem
121589         for gettext reported by Bruno Haible in
121590         <http://lists.gnu.org/r/bug-gnulib/2007-12/msg00007.html>.
121591         * lib/acl.c (copy_acl, qset_acl) [USE_ACL && defined ACL_NO_TRIVIAL]:
121592         Add support for Solaris 10.  This isn't efficient, but should get the
121593         job done for now.
121595 2007-12-03  James Youngman  <jay@gnu.org>
121597         * doc/regexprops-generic.texi: change "an close-group" to "a
121598         close-group" and "illegal" to "not allowed".
121600 2007-11-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
121602         * lib/unictype/pr_byname.c: Include unictype/pr_byname.h instead of
121603         pr_byname.h. Needed for the rare case when the maintainer has done
121604         "make maintainer-clean" in the source directory and then attempts a
121605         build outside the source directory.
121606         * lib/unictype/scripts.c: Include unictype/scripts_byname.h instead of
121607         scripts_byname.h.
121609 2007-12-02  Martin Lambers  <marlam@marlam.de>
121610             Bruno Haible  <bruno@clisp.org>
121612         * lib/getpagesize.h: Remove file.
121613         * lib/unistd.in.h: Include declaration of getpagesize here.
121614         * m4/getpagesize.m4 (gl_FUNC_GETPAGESIZE): Renamed from gl_GETPAGESIZE.
121615         Invoke gl_UNISTD_H_DEFAULTS. Set HAVE_GETPAGESIZE, HAVE_OS_H,
121616         HAVE_SYS_PARAM_H.
121617         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GETPAGESIZE,
121618         HAVE_GETPAGESIZE, HAVE_OS_H, HAVE_SYS_PARAM_H.
121619         * modules/getpagesize (Files): Remove lib/getpagesize.h.
121620         (Depends-on): Add unistd.
121621         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
121622         (Include): Use <unistd.h> instead of getpagesize.h.
121623         * modules/unistd (Makefile.am): Substitute also GNULIB_GETPAGESIZE,
121624         HAVE_GETPAGESIZE, HAVE_OS_H, HAVE_SYS_PARAM_H.
121625         * m4/pagealign_alloc.m4 (gl_PREREQ_PAGEALIGN_ALLOC): Remove
121626         gl_GETPAGESIZE invocation, already handled by module dependency.
121627         * lib/pagealign_alloc.c: Don't include getpagesize.h.
121629 2007-12-02  Bruno Haible  <bruno@clisp.org>
121631         * modules/strings-tests: New file.
121632         * tests/test-strings.c: New file.
121634         Move declarations of str{,n}casecmp from <string.h> to <strings.h>.
121635         * lib/strings.in.h: New file.
121636         * lib/string.in.h (strcasecmp, strncasecmp): Remove declarations.
121637         * m4/strings_h.m4: New file.
121638         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Remove initialization
121639         of HAVE_STRCASECMP, HAVE_DECL_STRNCASECMP.
121640         * modules/strings: New file.
121641         * modules/string (Makefile.am): Update.
121642         * modules/strcase (Include): Mention <strings.h>, not <string.h>.
121643         Reported by Karl Berry.
121645 2007-12-01  Eric Blake  <ebb9@byu.net>
121647         * m4/stdio_h.m4 (gl_STDIN_LARGE_OFFSET) [__CYGWIN__]: Rewrite to
121648         accommodate fix in cygwin 1.5.25.
121650 2007-12-01  Jim Meyering  <meyering@redhat.com>
121652         Fix a bug that inhibited much of the utf8-optimization in regcomp.c.
121653         * lib/regcomp.c (optimize_utf8): Fix a typo, s/idx/ctx_type/,
121654         that would inhibit utf8-optimization of a regexp containing line-
121655         or buffer-anchors, e.g., `^', `$'.
121657 2007-11-30  Bruno Haible  <bruno@clisp.org>
121659         * lib/lock.h (gl_recursive_lock_init) [PTHREAD &&
121660         PTHREAD_RECURSIVE_MUTEX_INITIALIZER]: Call
121661         glthread_recursive_lock_init.
121662         * lib/lock.c (glthread_recursive_lock_init)
121663         [PTHREAD_RECURSIVE_MUTEX_INITIALIZER]: New function.
121664         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
121666 2007-11-28  Paul Eggert  <eggert@cs.ucla.edu>
121668         New function qset_acl, like set_acl but with syscall semantics.
121669         * lib/acl.h (qset_acl): New decl.
121670         * lib/acl.c (qset_acl): New function.
121671         (set_acl): Use new function.  Use more-consistent diagnostics.
121673 2007-11-28  Jim Meyering  <meyering@redhat.com>
121675         * modules/physmem (License): Change from GPL to LGPLv2+.
121677 2007-11-26  Bruno Haible  <bruno@clisp.org>
121679         * lib/vasnprintf.c (decode_long_double): Don't abort if the
121680         'long double' type has excess precision.
121681         Reported by Jim Meyering in
121682         <http://lists.gnu.org/r/bug-gnulib/2007-11/msg00120.html>.
121684 2007-11-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
121686         * doc/fdl.texi, doc/gpl-3.0.texi, doc/lgpl-3.0.texi:
121687         Sync from <http://gnu.org/licenses>.
121688         * modules/agpl-3.0, doc/agpl-3.0.texi: New module,
121689         with license text from same location.
121690         * doc/maintain.texi, doc/standards.texi:  Sync from
121691         <http://savannah.gnu.org/projects/gnustandards>.
121693 2007-11-22  Ondřej Vašík  <ovasik@redhat.com>
121694         and Jim Meyering  <meyering@redhat.com>
121696         Adjust getdate' grammar to accept a slightly more regular language.
121697         E.g., accept "YYYYMMDD +N days" as well as "YYYYMMDD N days".
121698         Before, the former was rejected.
121699         * lib/getdate.y (digits_to_date_time): New function, factored
121700         out of ...
121701         (number): ...here.  Just call digits_to_date_time.
121702         (hybrid): New non-terminal to handle an <unsigned number,
121703         signed relative offset> sequence consistently.
121705 2007-11-18  Jim Meyering  <meyering@redhat.com>
121707         Pull my changes from coreutils:
121708         bootstrap: fix typo to enable use of $gnulib_tool_option_extras.
121709         * build-aux/bootstrap (gnulib_tool_options): Add a space before the
121710         use of $gnulib_tool_option_extras, so that it's separated from the
121711         preceding argument.
121713         Fix bootstrap failure to handle files like lib/uniwidth/cjk.h.
121714         * build-aux/bootstrap (cp_mark_as_generated): Create any required
121715         parent destination directories before copying a file into place.
121717 2007-11-18  Sergey Poznyakoff  <gray@gnu.org.ua>
121719         bootstrap: work also with 4-argument variant of AC_INIT
121720         * build-aux/bootstrap (gnulib_extra_files): Adjust sed command.
121722 2007-11-16  Paul Eggert  <eggert@cs.ucla.edu>
121724         Port test-getaddrinfo to Solaris.
121725         Problem reported by Bruno Haible in
121726         <http://lists.gnu.org/r/bug-gnulib/2007-03/msg00171.html>.
121727         * tests/test-getaddrinfo.c (simple): Add a comment asking for an
121728         explanation of setting 'hints'.
121729         Don't reject an implementation merely because it returns EAI_SERVICE.
121730         (EAI_SERVICE): Define to 0 if not defined.
121732 2007-11-15  Paul Eggert  <eggert@cs.ucla.edu>
121734         The license of gnu-make and posix-shell is now "GPLed build tool".
121735         * modules/gnu-make (License): Likewise.
121736         * modules/posix-shell (License): Likewise.
121738         New module posix-shell, for determining a POSIX shell
121739         or perhaps something that is close enough to a POSIX shell.
121740         * m4/posix-shell.m4: New file.
121741         * modules/posix-shell: New file.
121743         * MODULES.html.sh: Mention new module.
121745         New module gnu-make, for determining whether we're using GNU Make.
121746         * m4/gnu-make.m4: New file.
121747         * modules/gnu-make: New file.
121748         * MODULES.html.sh: Mention new module.
121750 2007-11-14  Jim Meyering  <meyering@redhat.com>
121752         Define a sometimes-link-required function using ARGMATCH_DIE_DECL.
121753         * tests/test-argmatch.c (ARGMATCH_DIE_DECL): When defined,
121754         use this macro to create a function _definition_.
121755         Remove useless "#undef ARGMATCH_DIE".
121757 2007-11-14  Bruno Haible  <bruno@clisp.org>
121759         * lib/config.charset: Update for OpenBSD 4.1.
121760         Reported and helped by Ben Pfaff <blp@cs.stanford.edu>.
121762 2007-11-12  Paul Eggert  <eggert@cs.ucla.edu>
121764         Document 64-bit #if problems in stdint.texi.
121765         * doc/headers/stdint.texi (stdint.h): Mention problems with
121766         64-bit-#if, and how to work around them.
121768         Don't insist on 'long long int' support in the preprocessor.  It
121769         breaks too many things.  For example, PRIdMAX still uses a 'long
121770         long int' format with the latest Sun compiler, even though
121771         HAVE_LONG_LONG_INT isn't defined due to that compiler's
121772         preprocessor problem.  This causes the latest coreutils to dump
121773         core on Solaris 10 sparc with the Sun C compiler.
121774         Instead, fix the 2007-10-16 problem in a different way, by evaluating
121775         the troublesome expressions at configure-time, not at #if-time.
121776         * m4/longlong.m4 (_AC_TYPE_LONG_LONG_SNIPPET): Don't test the
121777         preprocessor.
121778         * m4/inttypes.m4 (gl_INTTYPES_H): Move the #if checks into
121779         compile-time C checks, done at 'configure'-time.
121780         (gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION): New macro.
121781         * modules/inttypes (Makefile): Substitute the new symbols that
121782         gl_INTTYPES_H now generates.
121783         * lib/inttypes.in.h: Don't use constants wider than 'long' in #if.
121785 2007-11-12  Bruno Haible  <bruno@clisp.org>
121787         Tests for Unicode character classification functions.
121789         * modules/unictype/bidicategory-byname-tests: New file.
121790         * modules/unictype/bidicategory-name-tests: New file.
121791         * modules/unictype/bidicategory-of-tests: New file.
121792         * modules/unictype/bidicategory-test-tests: New file.
121793         * modules/unictype/block-list-tests: New file.
121794         * modules/unictype/block-of-tests: New file.
121795         * modules/unictype/block-test-tests: New file.
121796         * modules/unictype/category-C-tests: New file.
121797         * modules/unictype/category-Cc-tests: New file.
121798         * modules/unictype/category-Cf-tests: New file.
121799         * modules/unictype/category-Cn-tests: New file.
121800         * modules/unictype/category-Co-tests: New file.
121801         * modules/unictype/category-Cs-tests: New file.
121802         * modules/unictype/category-L-tests: New file.
121803         * modules/unictype/category-Ll-tests: New file.
121804         * modules/unictype/category-Lm-tests: New file.
121805         * modules/unictype/category-Lo-tests: New file.
121806         * modules/unictype/category-Lt-tests: New file.
121807         * modules/unictype/category-Lu-tests: New file.
121808         * modules/unictype/category-M-tests: New file.
121809         * modules/unictype/category-Mc-tests: New file.
121810         * modules/unictype/category-Me-tests: New file.
121811         * modules/unictype/category-Mn-tests: New file.
121812         * modules/unictype/category-N-tests: New file.
121813         * modules/unictype/category-Nd-tests: New file.
121814         * modules/unictype/category-Nl-tests: New file.
121815         * modules/unictype/category-No-tests: New file.
121816         * modules/unictype/category-P-tests: New file.
121817         * modules/unictype/category-Pc-tests: New file.
121818         * modules/unictype/category-Pd-tests: New file.
121819         * modules/unictype/category-Pe-tests: New file.
121820         * modules/unictype/category-Pf-tests: New file.
121821         * modules/unictype/category-Pi-tests: New file.
121822         * modules/unictype/category-Po-tests: New file.
121823         * modules/unictype/category-Ps-tests: New file.
121824         * modules/unictype/category-S-tests: New file.
121825         * modules/unictype/category-Sc-tests: New file.
121826         * modules/unictype/category-Sk-tests: New file.
121827         * modules/unictype/category-Sm-tests: New file.
121828         * modules/unictype/category-So-tests: New file.
121829         * modules/unictype/category-Z-tests: New file.
121830         * modules/unictype/category-Zl-tests: New file.
121831         * modules/unictype/category-Zp-tests: New file.
121832         * modules/unictype/category-Zs-tests: New file.
121833         * modules/unictype/category-and-not-tests: New file.
121834         * modules/unictype/category-and-tests: New file.
121835         * modules/unictype/category-byname-tests: New file.
121836         * modules/unictype/category-name-tests: New file.
121837         * modules/unictype/category-none-tests: New file.
121838         * modules/unictype/category-of-tests: New file.
121839         * modules/unictype/category-or-tests: New file.
121840         * modules/unictype/category-test-withtable-tests: New file.
121841         * modules/unictype/combining-class-tests: New file.
121842         * modules/unictype/ctype-alnum-tests: New file.
121843         * modules/unictype/ctype-alpha-tests: New file.
121844         * modules/unictype/ctype-blank-tests: New file.
121845         * modules/unictype/ctype-cntrl-tests: New file.
121846         * modules/unictype/ctype-digit-tests: New file.
121847         * modules/unictype/ctype-graph-tests: New file.
121848         * modules/unictype/ctype-lower-tests: New file.
121849         * modules/unictype/ctype-print-tests: New file.
121850         * modules/unictype/ctype-punct-tests: New file.
121851         * modules/unictype/ctype-space-tests: New file.
121852         * modules/unictype/ctype-upper-tests: New file.
121853         * modules/unictype/ctype-xdigit-tests: New file.
121854         * modules/unictype/decimal-digit-tests: New file.
121855         * modules/unictype/digit-tests: New file.
121856         * modules/unictype/mirror-tests: New file.
121857         * modules/unictype/numeric-tests: New file.
121858         * modules/unictype/property-alphabetic-tests: New file.
121859         * modules/unictype/property-ascii-hex-digit-tests: New file.
121860         * modules/unictype/property-bidi-arabic-digit-tests: New file.
121861         * modules/unictype/property-bidi-arabic-right-to-left-tests: New file.
121862         * modules/unictype/property-bidi-block-separator-tests: New file.
121863         * modules/unictype/property-bidi-boundary-neutral-tests: New file.
121864         * modules/unictype/property-bidi-common-separator-tests: New file.
121865         * modules/unictype/property-bidi-control-tests: New file.
121866         * modules/unictype/property-bidi-embedding-or-override-tests: New file.
121867         * modules/unictype/property-bidi-eur-num-separator-tests: New file.
121868         * modules/unictype/property-bidi-eur-num-terminator-tests: New file.
121869         * modules/unictype/property-bidi-european-digit-tests: New file.
121870         * modules/unictype/property-bidi-hebrew-right-to-left-tests: New file.
121871         * modules/unictype/property-bidi-left-to-right-tests: New file.
121872         * modules/unictype/property-bidi-non-spacing-mark-tests: New file.
121873         * modules/unictype/property-bidi-other-neutral-tests: New file.
121874         * modules/unictype/property-bidi-pdf-tests: New file.
121875         * modules/unictype/property-bidi-segment-separator-tests: New file.
121876         * modules/unictype/property-bidi-whitespace-tests: New file.
121877         * modules/unictype/property-byname-tests: New file.
121878         * modules/unictype/property-combining-tests: New file.
121879         * modules/unictype/property-composite-tests: New file.
121880         * modules/unictype/property-currency-symbol-tests: New file.
121881         * modules/unictype/property-dash-tests: New file.
121882         * modules/unictype/property-decimal-digit-tests: New file.
121883         * modules/unictype/property-default-ignorable-code-point-tests: New file.
121884         * modules/unictype/property-deprecated-tests: New file.
121885         * modules/unictype/property-diacritic-tests: New file.
121886         * modules/unictype/property-extender-tests: New file.
121887         * modules/unictype/property-format-control-tests: New file.
121888         * modules/unictype/property-grapheme-base-tests: New file.
121889         * modules/unictype/property-grapheme-extend-tests: New file.
121890         * modules/unictype/property-grapheme-link-tests: New file.
121891         * modules/unictype/property-hex-digit-tests: New file.
121892         * modules/unictype/property-hyphen-tests: New file.
121893         * modules/unictype/property-id-continue-tests: New file.
121894         * modules/unictype/property-id-start-tests: New file.
121895         * modules/unictype/property-ideographic-tests: New file.
121896         * modules/unictype/property-ids-binary-operator-tests: New file.
121897         * modules/unictype/property-ids-trinary-operator-tests: New file.
121898         * modules/unictype/property-ignorable-control-tests: New file.
121899         * modules/unictype/property-iso-control-tests: New file.
121900         * modules/unictype/property-join-control-tests: New file.
121901         * modules/unictype/property-left-of-pair-tests: New file.
121902         * modules/unictype/property-line-separator-tests: New file.
121903         * modules/unictype/property-logical-order-exception-tests: New file.
121904         * modules/unictype/property-lowercase-tests: New file.
121905         * modules/unictype/property-math-tests: New file.
121906         * modules/unictype/property-non-break-tests: New file.
121907         * modules/unictype/property-not-a-character-tests: New file.
121908         * modules/unictype/property-numeric-tests: New file.
121909         * modules/unictype/property-other-alphabetic-tests: New file.
121910         * modules/unictype/property-other-default-ignorable-code-point-tests: New file.
121911         * modules/unictype/property-other-grapheme-extend-tests: New file.
121912         * modules/unictype/property-other-id-continue-tests: New file.
121913         * modules/unictype/property-other-id-start-tests: New file.
121914         * modules/unictype/property-other-lowercase-tests: New file.
121915         * modules/unictype/property-other-math-tests: New file.
121916         * modules/unictype/property-other-uppercase-tests: New file.
121917         * modules/unictype/property-paired-punctuation-tests: New file.
121918         * modules/unictype/property-paragraph-separator-tests: New file.
121919         * modules/unictype/property-pattern-syntax-tests: New file.
121920         * modules/unictype/property-pattern-white-space-tests: New file.
121921         * modules/unictype/property-private-use-tests: New file.
121922         * modules/unictype/property-punctuation-tests: New file.
121923         * modules/unictype/property-quotation-mark-tests: New file.
121924         * modules/unictype/property-radical-tests: New file.
121925         * modules/unictype/property-sentence-terminal-tests: New file.
121926         * modules/unictype/property-soft-dotted-tests: New file.
121927         * modules/unictype/property-space-tests: New file.
121928         * modules/unictype/property-terminal-punctuation-tests: New file.
121929         * modules/unictype/property-test-tests: New file.
121930         * modules/unictype/property-titlecase-tests: New file.
121931         * modules/unictype/property-unassigned-code-value-tests: New file.
121932         * modules/unictype/property-unified-ideograph-tests: New file.
121933         * modules/unictype/property-uppercase-tests: New file.
121934         * modules/unictype/property-variation-selector-tests: New file.
121935         * modules/unictype/property-white-space-tests: New file.
121936         * modules/unictype/property-xid-continue-tests: New file.
121937         * modules/unictype/property-xid-start-tests: New file.
121938         * modules/unictype/property-zero-width-tests: New file.
121939         * modules/unictype/scripts-tests: New file.
121940         * modules/unictype/syntax-c-ident-tests: New file.
121941         * modules/unictype/syntax-c-whitespace-tests: New file.
121942         * modules/unictype/syntax-java-ident-tests: New file.
121943         * modules/unictype/syntax-java-whitespace-tests: New file.
121944         * tests/unictype/test-bidi_byname.c: New file.
121945         * tests/unictype/test-bidi_name.c: New file.
121946         * tests/unictype/test-bidi_of.c: New file.
121947         * tests/unictype/test-bidi_test.c: New file.
121948         * tests/unictype/test-block_list.c: New file.
121949         * tests/unictype/test-block_of.c: New file.
121950         * tests/unictype/test-block_test.c: New file.
121951         * tests/unictype/test-categ_and.c: New file.
121952         * tests/unictype/test-categ_and_not.c: New file.
121953         * tests/unictype/test-categ_byname.c: New file.
121954         * tests/unictype/test-categ_name.c: New file.
121955         * tests/unictype/test-categ_none.c: New file.
121956         * tests/unictype/test-categ_of.c: New file.
121957         * tests/unictype/test-categ_or.c: New file.
121958         * tests/unictype/test-categ_test_withtable.c: New file.
121959         * tests/unictype/test-combining.c: New file.
121960         * tests/unictype/test-decdigit.c: New file.
121961         * tests/unictype/test-digit.c: New file.
121962         * tests/unictype/test-mirror.c: New file.
121963         * tests/unictype/test-numeric.c: New file.
121964         * tests/unictype/test-pr_byname.c: New file.
121965         * tests/unictype/test-pr_test.c: New file.
121966         * tests/unictype/test-predicate-part1.h: New file.
121967         * tests/unictype/test-predicate-part2.h: New file.
121968         * tests/unictype/test-scripts.c: New file.
121969         * tests/unictype/test-sy_c_ident.c: New file.
121970         * tests/unictype/test-sy_java_ident.c: New file.
121972         * tests/unictype/test-categ_C.c: New file, generated by gen-ctype.c
121973         for Unicode 5.0.0.
121974         * tests/unictype/test-categ_Cc.c: Likewise.
121975         * tests/unictype/test-categ_Cf.c: Likewise.
121976         * tests/unictype/test-categ_Cn.c: Likewise.
121977         * tests/unictype/test-categ_Co.c: Likewise.
121978         * tests/unictype/test-categ_Cs.c: Likewise.
121979         * tests/unictype/test-categ_L.c: Likewise.
121980         * tests/unictype/test-categ_Ll.c: Likewise.
121981         * tests/unictype/test-categ_Lm.c: Likewise.
121982         * tests/unictype/test-categ_Lo.c: Likewise.
121983         * tests/unictype/test-categ_Lt.c: Likewise.
121984         * tests/unictype/test-categ_Lu.c: Likewise.
121985         * tests/unictype/test-categ_M.c: Likewise.
121986         * tests/unictype/test-categ_Mc.c: Likewise.
121987         * tests/unictype/test-categ_Me.c: Likewise.
121988         * tests/unictype/test-categ_Mn.c: Likewise.
121989         * tests/unictype/test-categ_N.c: Likewise.
121990         * tests/unictype/test-categ_Nd.c: Likewise.
121991         * tests/unictype/test-categ_Nl.c: Likewise.
121992         * tests/unictype/test-categ_No.c: Likewise.
121993         * tests/unictype/test-categ_P.c: Likewise.
121994         * tests/unictype/test-categ_Pc.c: Likewise.
121995         * tests/unictype/test-categ_Pd.c: Likewise.
121996         * tests/unictype/test-categ_Pe.c: Likewise.
121997         * tests/unictype/test-categ_Pf.c: Likewise.
121998         * tests/unictype/test-categ_Pi.c: Likewise.
121999         * tests/unictype/test-categ_Po.c: Likewise.
122000         * tests/unictype/test-categ_Ps.c: Likewise.
122001         * tests/unictype/test-categ_S.c: Likewise.
122002         * tests/unictype/test-categ_Sc.c: Likewise.
122003         * tests/unictype/test-categ_Sk.c: Likewise.
122004         * tests/unictype/test-categ_Sm.c: Likewise.
122005         * tests/unictype/test-categ_So.c: Likewise.
122006         * tests/unictype/test-categ_Z.c: Likewise.
122007         * tests/unictype/test-categ_Zl.c: Likewise.
122008         * tests/unictype/test-categ_Zp.c: Likewise.
122009         * tests/unictype/test-categ_Zs.c: Likewise.
122010         * tests/unictype/test-ctype_alnum.c: Likewise.
122011         * tests/unictype/test-ctype_alpha.c: Likewise.
122012         * tests/unictype/test-ctype_blank.c: Likewise.
122013         * tests/unictype/test-ctype_cntrl.c: Likewise.
122014         * tests/unictype/test-ctype_digit.c: Likewise.
122015         * tests/unictype/test-ctype_graph.c: Likewise.
122016         * tests/unictype/test-ctype_lower.c: Likewise.
122017         * tests/unictype/test-ctype_print.c: Likewise.
122018         * tests/unictype/test-ctype_punct.c: Likewise.
122019         * tests/unictype/test-ctype_space.c: Likewise.
122020         * tests/unictype/test-ctype_upper.c: Likewise.
122021         * tests/unictype/test-ctype_xdigit.c: Likewise.
122022         * tests/unictype/test-decdigit.h: Likewise.
122023         * tests/unictype/test-digit.h: Likewise.
122024         * tests/unictype/test-numeric.h: Likewise.
122025         * tests/unictype/test-pr_alphabetic.c: Likewise.
122026         * tests/unictype/test-pr_ascii_hex_digit.c: Likewise.
122027         * tests/unictype/test-pr_bidi_arabic_digit.c: Likewise.
122028         * tests/unictype/test-pr_bidi_arabic_right_to_left.c: Likewise.
122029         * tests/unictype/test-pr_bidi_block_separator.c: Likewise.
122030         * tests/unictype/test-pr_bidi_boundary_neutral.c: Likewise.
122031         * tests/unictype/test-pr_bidi_common_separator.c: Likewise.
122032         * tests/unictype/test-pr_bidi_control.c: Likewise.
122033         * tests/unictype/test-pr_bidi_embedding_or_override.c: Likewise.
122034         * tests/unictype/test-pr_bidi_eur_num_separator.c: Likewise.
122035         * tests/unictype/test-pr_bidi_eur_num_terminator.c: Likewise.
122036         * tests/unictype/test-pr_bidi_european_digit.c: Likewise.
122037         * tests/unictype/test-pr_bidi_hebrew_right_to_left.c: Likewise.
122038         * tests/unictype/test-pr_bidi_left_to_right.c: Likewise.
122039         * tests/unictype/test-pr_bidi_non_spacing_mark.c: Likewise.
122040         * tests/unictype/test-pr_bidi_other_neutral.c: Likewise.
122041         * tests/unictype/test-pr_bidi_pdf.c: Likewise.
122042         * tests/unictype/test-pr_bidi_segment_separator.c: Likewise.
122043         * tests/unictype/test-pr_bidi_whitespace.c: Likewise.
122044         * tests/unictype/test-pr_combining.c: Likewise.
122045         * tests/unictype/test-pr_composite.c: Likewise.
122046         * tests/unictype/test-pr_currency_symbol.c: Likewise.
122047         * tests/unictype/test-pr_dash.c: Likewise.
122048         * tests/unictype/test-pr_decimal_digit.c: Likewise.
122049         * tests/unictype/test-pr_default_ignorable_code_point.c: Likewise.
122050         * tests/unictype/test-pr_deprecated.c: Likewise.
122051         * tests/unictype/test-pr_diacritic.c: Likewise.
122052         * tests/unictype/test-pr_extender.c: Likewise.
122053         * tests/unictype/test-pr_format_control.c: Likewise.
122054         * tests/unictype/test-pr_grapheme_base.c: Likewise.
122055         * tests/unictype/test-pr_grapheme_extend.c: Likewise.
122056         * tests/unictype/test-pr_grapheme_link.c: Likewise.
122057         * tests/unictype/test-pr_hex_digit.c: Likewise.
122058         * tests/unictype/test-pr_hyphen.c: Likewise.
122059         * tests/unictype/test-pr_id_continue.c: Likewise.
122060         * tests/unictype/test-pr_id_start.c: Likewise.
122061         * tests/unictype/test-pr_ideographic.c: Likewise.
122062         * tests/unictype/test-pr_ids_binary_operator.c: Likewise.
122063         * tests/unictype/test-pr_ids_trinary_operator.c: Likewise.
122064         * tests/unictype/test-pr_ignorable_control.c: Likewise.
122065         * tests/unictype/test-pr_iso_control.c: Likewise.
122066         * tests/unictype/test-pr_join_control.c: Likewise.
122067         * tests/unictype/test-pr_left_of_pair.c: Likewise.
122068         * tests/unictype/test-pr_line_separator.c: Likewise.
122069         * tests/unictype/test-pr_logical_order_exception.c: Likewise.
122070         * tests/unictype/test-pr_lowercase.c: Likewise.
122071         * tests/unictype/test-pr_math.c: Likewise.
122072         * tests/unictype/test-pr_non_break.c: Likewise.
122073         * tests/unictype/test-pr_not_a_character.c: Likewise.
122074         * tests/unictype/test-pr_numeric.c: Likewise.
122075         * tests/unictype/test-pr_other_alphabetic.c: Likewise.
122076         * tests/unictype/test-pr_other_default_ignorable_code_point.c: Likewise.
122077         * tests/unictype/test-pr_other_grapheme_extend.c: Likewise.
122078         * tests/unictype/test-pr_other_id_continue.c: Likewise.
122079         * tests/unictype/test-pr_other_id_start.c: Likewise.
122080         * tests/unictype/test-pr_other_lowercase.c: Likewise.
122081         * tests/unictype/test-pr_other_math.c: Likewise.
122082         * tests/unictype/test-pr_other_uppercase.c: Likewise.
122083         * tests/unictype/test-pr_paired_punctuation.c: Likewise.
122084         * tests/unictype/test-pr_paragraph_separator.c: Likewise.
122085         * tests/unictype/test-pr_pattern_syntax.c: Likewise.
122086         * tests/unictype/test-pr_pattern_white_space.c: Likewise.
122087         * tests/unictype/test-pr_private_use.c: Likewise.
122088         * tests/unictype/test-pr_punctuation.c: Likewise.
122089         * tests/unictype/test-pr_quotation_mark.c: Likewise.
122090         * tests/unictype/test-pr_radical.c: Likewise.
122091         * tests/unictype/test-pr_sentence_terminal.c: Likewise.
122092         * tests/unictype/test-pr_soft_dotted.c: Likewise.
122093         * tests/unictype/test-pr_space.c: Likewise.
122094         * tests/unictype/test-pr_terminal_punctuation.c: Likewise.
122095         * tests/unictype/test-pr_titlecase.c: Likewise.
122096         * tests/unictype/test-pr_unassigned_code_value.c: Likewise.
122097         * tests/unictype/test-pr_unified_ideograph.c: Likewise.
122098         * tests/unictype/test-pr_uppercase.c: Likewise.
122099         * tests/unictype/test-pr_variation_selector.c: Likewise.
122100         * tests/unictype/test-pr_white_space.c: Likewise.
122101         * tests/unictype/test-pr_xid_continue.c: Likewise.
122102         * tests/unictype/test-pr_xid_start.c: Likewise.
122103         * tests/unictype/test-pr_zero_width.c: Likewise.
122104         * tests/unictype/test-sy_c_whitespace.c: Likewise.
122105         * tests/unictype/test-sy_java_whitespace.c: Likewise.
122107 2007-11-12  Bruno Haible  <bruno@clisp.org>
122109         Unicode character classification functions.
122110         * lib/unictype.h: New file.
122111         * modules/unictype/base: New file.
122112         * modules/unictype/category-L: New file.
122113         * modules/unictype/category-Lu: New file.
122114         * modules/unictype/category-Ll: New file.
122115         * modules/unictype/category-Lt: New file.
122116         * modules/unictype/category-Lm: New file.
122117         * modules/unictype/category-Lo: New file.
122118         * modules/unictype/category-M: New file.
122119         * modules/unictype/category-Mn: New file.
122120         * modules/unictype/category-Mc: New file.
122121         * modules/unictype/category-Me: New file.
122122         * modules/unictype/category-N: New file.
122123         * modules/unictype/category-Nd: New file.
122124         * modules/unictype/category-Nl: New file.
122125         * modules/unictype/category-No: New file.
122126         * modules/unictype/category-P: New file.
122127         * modules/unictype/category-Pc: New file.
122128         * modules/unictype/category-Pd: New file.
122129         * modules/unictype/category-Ps: New file.
122130         * modules/unictype/category-Pe: New file.
122131         * modules/unictype/category-Pi: New file.
122132         * modules/unictype/category-Pf: New file.
122133         * modules/unictype/category-Po: New file.
122134         * modules/unictype/category-S: New file.
122135         * modules/unictype/category-Sm: New file.
122136         * modules/unictype/category-Sc: New file.
122137         * modules/unictype/category-Sk: New file.
122138         * modules/unictype/category-So: New file.
122139         * modules/unictype/category-Z: New file.
122140         * modules/unictype/category-Zs: New file.
122141         * modules/unictype/category-Zl: New file.
122142         * modules/unictype/category-Zp: New file.
122143         * modules/unictype/category-C: New file.
122144         * modules/unictype/category-Cc: New file.
122145         * modules/unictype/category-Cf: New file.
122146         * modules/unictype/category-Cs: New file.
122147         * modules/unictype/category-Co: New file.
122148         * modules/unictype/category-Cn: New file.
122149         * modules/unictype/category-or: New file.
122150         * modules/unictype/category-of: New file.
122151         * modules/unictype/category-test: New file.
122152         * modules/unictype/category-test-withtable: New file.
122153         * modules/unictype/category-byname: New file.
122154         * modules/unictype/category-none: New file.
122155         * modules/unictype/category-and: New file.
122156         * modules/unictype/category-and-not: New file.
122157         * modules/unictype/category-name: New file.
122158         * modules/unictype/combining-class: New file.
122159         * modules/unictype/category-all: New file.
122160         * modules/unictype/bidicategory-all: New file.
122161         * modules/unictype/bidicategory-byname: New file.
122162         * modules/unictype/bidicategory-name: New file.
122163         * modules/unictype/bidicategory-of: New file.
122164         * modules/unictype/bidicategory-test: New file.
122165         * modules/unictype/decimal-digit: New file.
122166         * modules/unictype/digit: New file.
122167         * modules/unictype/numeric: New file.
122168         * modules/unictype/mirror: New file.
122169         * modules/unictype/property-white-space: New file.
122170         * modules/unictype/property-alphabetic: New file.
122171         * modules/unictype/property-other-alphabetic: New file.
122172         * modules/unictype/property-not-a-character: New file.
122173         * modules/unictype/property-default-ignorable-code-point: New file.
122174         * modules/unictype/property-other-default-ignorable-code-point: New
122175         file.
122176         * modules/unictype/property-deprecated: New file.
122177         * modules/unictype/property-logical-order-exception: New file.
122178         * modules/unictype/property-variation-selector: New file.
122179         * modules/unictype/property-private-use: New file.
122180         * modules/unictype/property-unassigned-code-value: New file.
122181         * modules/unictype/property-uppercase: New file.
122182         * modules/unictype/property-other-uppercase: New file.
122183         * modules/unictype/property-lowercase: New file.
122184         * modules/unictype/property-other-lowercase: New file.
122185         * modules/unictype/property-titlecase: New file.
122186         * modules/unictype/property-soft-dotted: New file.
122187         * modules/unictype/property-id-start: New file.
122188         * modules/unictype/property-other-id-start: New file.
122189         * modules/unictype/property-id-continue: New file.
122190         * modules/unictype/property-other-id-continue: New file.
122191         * modules/unictype/property-xid-start: New file.
122192         * modules/unictype/property-xid-continue: New file.
122193         * modules/unictype/property-pattern-white-space: New file.
122194         * modules/unictype/property-pattern-syntax: New file.
122195         * modules/unictype/property-join-control: New file.
122196         * modules/unictype/property-grapheme-base: New file.
122197         * modules/unictype/property-grapheme-extend: New file.
122198         * modules/unictype/property-other-grapheme-extend: New file.
122199         * modules/unictype/property-grapheme-link: New file.
122200         * modules/unictype/property-bidi-control: New file.
122201         * modules/unictype/property-bidi-left-to-right: New file.
122202         * modules/unictype/property-bidi-hebrew-right-to-left: New file.
122203         * modules/unictype/property-bidi-arabic-right-to-left: New file.
122204         * modules/unictype/property-bidi-european-digit: New file.
122205         * modules/unictype/property-bidi-eur-num-separator: New file.
122206         * modules/unictype/property-bidi-eur-num-terminator: New file.
122207         * modules/unictype/property-bidi-arabic-digit: New file.
122208         * modules/unictype/property-bidi-common-separator: New file.
122209         * modules/unictype/property-bidi-block-separator: New file.
122210         * modules/unictype/property-bidi-segment-separator: New file.
122211         * modules/unictype/property-bidi-whitespace: New file.
122212         * modules/unictype/property-bidi-non-spacing-mark: New file.
122213         * modules/unictype/property-bidi-boundary-neutral: New file.
122214         * modules/unictype/property-bidi-pdf: New file.
122215         * modules/unictype/property-bidi-embedding-or-override: New file.
122216         * modules/unictype/property-bidi-other-neutral: New file.
122217         * modules/unictype/property-hex-digit: New file.
122218         * modules/unictype/property-ascii-hex-digit: New file.
122219         * modules/unictype/property-ideographic: New file.
122220         * modules/unictype/property-unified-ideograph: New file.
122221         * modules/unictype/property-radical: New file.
122222         * modules/unictype/property-ids-binary-operator: New file.
122223         * modules/unictype/property-ids-trinary-operator: New file.
122224         * modules/unictype/property-zero-width: New file.
122225         * modules/unictype/property-space: New file.
122226         * modules/unictype/property-non-break: New file.
122227         * modules/unictype/property-iso-control: New file.
122228         * modules/unictype/property-format-control: New file.
122229         * modules/unictype/property-dash: New file.
122230         * modules/unictype/property-hyphen: New file.
122231         * modules/unictype/property-punctuation: New file.
122232         * modules/unictype/property-line-separator: New file.
122233         * modules/unictype/property-paragraph-separator: New file.
122234         * modules/unictype/property-quotation-mark: New file.
122235         * modules/unictype/property-sentence-terminal: New file.
122236         * modules/unictype/property-terminal-punctuation: New file.
122237         * modules/unictype/property-currency-symbol: New file.
122238         * modules/unictype/property-math: New file.
122239         * modules/unictype/property-other-math: New file.
122240         * modules/unictype/property-paired-punctuation: New file.
122241         * modules/unictype/property-left-of-pair: New file.
122242         * modules/unictype/property-combining: New file.
122243         * modules/unictype/property-composite: New file.
122244         * modules/unictype/property-decimal-digit: New file.
122245         * modules/unictype/property-numeric: New file.
122246         * modules/unictype/property-diacritic: New file.
122247         * modules/unictype/property-extender: New file.
122248         * modules/unictype/property-ignorable-control: New file.
122249         * modules/unictype/property-test: New file.
122250         * modules/unictype/property-byname: New file.
122251         * modules/unictype/property-all: New file.
122252         * modules/unictype/scripts: New file.
122253         * modules/unictype/scripts-all: New file.
122254         * modules/unictype/block-of: New file.
122255         * modules/unictype/block-test: New file.
122256         * modules/unictype/block-list: New file.
122257         * modules/unictype/block-all: New file.
122258         * modules/unictype/syntax-c-whitespace: New file.
122259         * modules/unictype/syntax-java-whitespace: New file.
122260         * modules/unictype/syntax-c-ident: New file.
122261         * modules/unictype/syntax-java-ident: New file.
122262         * modules/unictype/ctype-alnum: New file.
122263         * modules/unictype/ctype-alpha: New file.
122264         * modules/unictype/ctype-cntrl: New file.
122265         * modules/unictype/ctype-digit: New file.
122266         * modules/unictype/ctype-graph: New file.
122267         * modules/unictype/ctype-lower: New file.
122268         * modules/unictype/ctype-print: New file.
122269         * modules/unictype/ctype-punct: New file.
122270         * modules/unictype/ctype-space: New file.
122271         * modules/unictype/ctype-upper: New file.
122272         * modules/unictype/ctype-xdigit: New file.
122273         * modules/unictype/ctype-blank: New file.
122274         * lib/unictype/bidi_byname.c: New file.
122275         * lib/unictype/bidi_name.c: New file.
122276         * lib/unictype/bidi_of.c: New file.
122277         * lib/unictype/bidi_test.c: New file.
122278         * lib/unictype/bitmap.h: New file.
122279         * lib/unictype/block_test.c: New file.
122280         * lib/unictype/blocks.c: New file.
122281         * lib/unictype/categ_C.c: New file.
122282         * lib/unictype/categ_Cc.c: New file.
122283         * lib/unictype/categ_Cf.c: New file.
122284         * lib/unictype/categ_Cn.c: New file.
122285         * lib/unictype/categ_Co.c: New file.
122286         * lib/unictype/categ_Cs.c: New file.
122287         * lib/unictype/categ_L.c: New file.
122288         * lib/unictype/categ_Ll.c: New file.
122289         * lib/unictype/categ_Lm.c: New file.
122290         * lib/unictype/categ_Lo.c: New file.
122291         * lib/unictype/categ_Lt.c: New file.
122292         * lib/unictype/categ_Lu.c: New file.
122293         * lib/unictype/categ_M.c: New file.
122294         * lib/unictype/categ_Mc.c: New file.
122295         * lib/unictype/categ_Me.c: New file.
122296         * lib/unictype/categ_Mn.c: New file.
122297         * lib/unictype/categ_N.c: New file.
122298         * lib/unictype/categ_Nd.c: New file.
122299         * lib/unictype/categ_Nl.c: New file.
122300         * lib/unictype/categ_No.c: New file.
122301         * lib/unictype/categ_P.c: New file.
122302         * lib/unictype/categ_Pc.c: New file.
122303         * lib/unictype/categ_Pd.c: New file.
122304         * lib/unictype/categ_Pe.c: New file.
122305         * lib/unictype/categ_Pf.c: New file.
122306         * lib/unictype/categ_Pi.c: New file.
122307         * lib/unictype/categ_Po.c: New file.
122308         * lib/unictype/categ_Ps.c: New file.
122309         * lib/unictype/categ_S.c: New file.
122310         * lib/unictype/categ_Sc.c: New file.
122311         * lib/unictype/categ_Sk.c: New file.
122312         * lib/unictype/categ_Sm.c: New file.
122313         * lib/unictype/categ_So.c: New file.
122314         * lib/unictype/categ_Z.c: New file.
122315         * lib/unictype/categ_Zl.c: New file.
122316         * lib/unictype/categ_Zp.c: New file.
122317         * lib/unictype/categ_Zs.c: New file.
122318         * lib/unictype/categ_and.c: New file.
122319         * lib/unictype/categ_and_not.c: New file.
122320         * lib/unictype/categ_byname.c: New file.
122321         * lib/unictype/categ_name.c: New file.
122322         * lib/unictype/categ_none.c: New file.
122323         * lib/unictype/categ_of.c: New file.
122324         * lib/unictype/categ_or.c: New file.
122325         * lib/unictype/categ_test.c: New file.
122326         * lib/unictype/combining.c: New file.
122327         * lib/unictype/ctype_alnum.c: New file.
122328         * lib/unictype/ctype_alpha.c: New file.
122329         * lib/unictype/ctype_blank.c: New file.
122330         * lib/unictype/ctype_cntrl.c: New file.
122331         * lib/unictype/ctype_digit.c: New file.
122332         * lib/unictype/ctype_graph.c: New file.
122333         * lib/unictype/ctype_lower.c: New file.
122334         * lib/unictype/ctype_print.c: New file.
122335         * lib/unictype/ctype_punct.c: New file.
122336         * lib/unictype/ctype_space.c: New file.
122337         * lib/unictype/ctype_upper.c: New file.
122338         * lib/unictype/ctype_xdigit.c: New file.
122339         * lib/unictype/decdigit.c: New file.
122340         * lib/unictype/digit.c: New file.
122341         * lib/unictype/identsyntaxmap.h: New file.
122342         * lib/unictype/mirror.c: New file.
122343         * lib/unictype/numeric.c: New file.
122344         * lib/unictype/pr_alphabetic.c: New file.
122345         * lib/unictype/pr_ascii_hex_digit.c: New file.
122346         * lib/unictype/pr_bidi_arabic_digit.c: New file.
122347         * lib/unictype/pr_bidi_arabic_right_to_left.c: New file.
122348         * lib/unictype/pr_bidi_block_separator.c: New file.
122349         * lib/unictype/pr_bidi_boundary_neutral.c: New file.
122350         * lib/unictype/pr_bidi_common_separator.c: New file.
122351         * lib/unictype/pr_bidi_control.c: New file.
122352         * lib/unictype/pr_bidi_embedding_or_override.c: New file.
122353         * lib/unictype/pr_bidi_eur_num_separator.c: New file.
122354         * lib/unictype/pr_bidi_eur_num_terminator.c: New file.
122355         * lib/unictype/pr_bidi_european_digit.c: New file.
122356         * lib/unictype/pr_bidi_hebrew_right_to_left.c: New file.
122357         * lib/unictype/pr_bidi_left_to_right.c: New file.
122358         * lib/unictype/pr_bidi_non_spacing_mark.c: New file.
122359         * lib/unictype/pr_bidi_other_neutral.c: New file.
122360         * lib/unictype/pr_bidi_pdf.c: New file.
122361         * lib/unictype/pr_bidi_segment_separator.c: New file.
122362         * lib/unictype/pr_bidi_whitespace.c: New file.
122363         * lib/unictype/pr_byname.c: New file.
122364         * lib/unictype/pr_byname.gperf: New file.
122365         * lib/unictype/pr_combining.c: New file.
122366         * lib/unictype/pr_composite.c: New file.
122367         * lib/unictype/pr_currency_symbol.c: New file.
122368         * lib/unictype/pr_dash.c: New file.
122369         * lib/unictype/pr_decimal_digit.c: New file.
122370         * lib/unictype/pr_default_ignorable_code_point.c: New file.
122371         * lib/unictype/pr_deprecated.c: New file.
122372         * lib/unictype/pr_diacritic.c: New file.
122373         * lib/unictype/pr_extender.c: New file.
122374         * lib/unictype/pr_format_control.c: New file.
122375         * lib/unictype/pr_grapheme_base.c: New file.
122376         * lib/unictype/pr_grapheme_extend.c: New file.
122377         * lib/unictype/pr_grapheme_link.c: New file.
122378         * lib/unictype/pr_hex_digit.c: New file.
122379         * lib/unictype/pr_hyphen.c: New file.
122380         * lib/unictype/pr_id_continue.c: New file.
122381         * lib/unictype/pr_id_start.c: New file.
122382         * lib/unictype/pr_ideographic.c: New file.
122383         * lib/unictype/pr_ids_binary_operator.c: New file.
122384         * lib/unictype/pr_ids_trinary_operator.c: New file.
122385         * lib/unictype/pr_ignorable_control.c: New file.
122386         * lib/unictype/pr_iso_control.c: New file.
122387         * lib/unictype/pr_join_control.c: New file.
122388         * lib/unictype/pr_left_of_pair.c: New file.
122389         * lib/unictype/pr_line_separator.c: New file.
122390         * lib/unictype/pr_logical_order_exception.c: New file.
122391         * lib/unictype/pr_lowercase.c: New file.
122392         * lib/unictype/pr_math.c: New file.
122393         * lib/unictype/pr_non_break.c: New file.
122394         * lib/unictype/pr_not_a_character.c: New file.
122395         * lib/unictype/pr_numeric.c: New file.
122396         * lib/unictype/pr_other_alphabetic.c: New file.
122397         * lib/unictype/pr_other_default_ignorable_code_point.c: New file.
122398         * lib/unictype/pr_other_grapheme_extend.c: New file.
122399         * lib/unictype/pr_other_id_continue.c: New file.
122400         * lib/unictype/pr_other_id_start.c: New file.
122401         * lib/unictype/pr_other_lowercase.c: New file.
122402         * lib/unictype/pr_other_math.c: New file.
122403         * lib/unictype/pr_other_uppercase.c: New file.
122404         * lib/unictype/pr_paired_punctuation.c: New file.
122405         * lib/unictype/pr_paragraph_separator.c: New file.
122406         * lib/unictype/pr_pattern_syntax.c: New file.
122407         * lib/unictype/pr_pattern_white_space.c: New file.
122408         * lib/unictype/pr_private_use.c: New file.
122409         * lib/unictype/pr_punctuation.c: New file.
122410         * lib/unictype/pr_quotation_mark.c: New file.
122411         * lib/unictype/pr_radical.c: New file.
122412         * lib/unictype/pr_sentence_terminal.c: New file.
122413         * lib/unictype/pr_soft_dotted.c: New file.
122414         * lib/unictype/pr_space.c: New file.
122415         * lib/unictype/pr_terminal_punctuation.c: New file.
122416         * lib/unictype/pr_test.c: New file.
122417         * lib/unictype/pr_titlecase.c: New file.
122418         * lib/unictype/pr_unassigned_code_value.c: New file.
122419         * lib/unictype/pr_unified_ideograph.c: New file.
122420         * lib/unictype/pr_uppercase.c: New file.
122421         * lib/unictype/pr_variation_selector.c: New file.
122422         * lib/unictype/pr_white_space.c: New file.
122423         * lib/unictype/pr_xid_continue.c: New file.
122424         * lib/unictype/pr_xid_start.c: New file.
122425         * lib/unictype/pr_zero_width.c: New file.
122426         * lib/unictype/scripts.c: New file.
122427         * lib/unictype/sy_c_ident.c: New file.
122428         * lib/unictype/sy_c_whitespace.c: New file.
122429         * lib/unictype/sy_java_ident.c: New file.
122430         * lib/unictype/sy_java_whitespace.c: New file.
122432         * lib/unictype/bidi_of.h: New file, generated by gen-ctype.c for
122433         Unicode 5.0.0.
122434         * lib/unictype/blocks.h: Likewise.
122435         * lib/unictype/categ_C.h: Likewise.
122436         * lib/unictype/categ_Cc.h: Likewise.
122437         * lib/unictype/categ_Cf.h: Likewise.
122438         * lib/unictype/categ_Cn.h: Likewise.
122439         * lib/unictype/categ_Co.h: Likewise.
122440         * lib/unictype/categ_Cs.h: Likewise.
122441         * lib/unictype/categ_L.h: Likewise.
122442         * lib/unictype/categ_Ll.h: Likewise.
122443         * lib/unictype/categ_Lm.h: Likewise.
122444         * lib/unictype/categ_Lo.h: Likewise.
122445         * lib/unictype/categ_Lt.h: Likewise.
122446         * lib/unictype/categ_Lu.h: Likewise.
122447         * lib/unictype/categ_M.h: Likewise.
122448         * lib/unictype/categ_Mc.h: Likewise.
122449         * lib/unictype/categ_Me.h: Likewise.
122450         * lib/unictype/categ_Mn.h: Likewise.
122451         * lib/unictype/categ_N.h: Likewise.
122452         * lib/unictype/categ_Nd.h: Likewise.
122453         * lib/unictype/categ_Nl.h: Likewise.
122454         * lib/unictype/categ_No.h: Likewise.
122455         * lib/unictype/categ_P.h: Likewise.
122456         * lib/unictype/categ_Pc.h: Likewise.
122457         * lib/unictype/categ_Pd.h: Likewise.
122458         * lib/unictype/categ_Pe.h: Likewise.
122459         * lib/unictype/categ_Pf.h: Likewise.
122460         * lib/unictype/categ_Pi.h: Likewise.
122461         * lib/unictype/categ_Po.h: Likewise.
122462         * lib/unictype/categ_Ps.h: Likewise.
122463         * lib/unictype/categ_S.h: Likewise.
122464         * lib/unictype/categ_Sc.h: Likewise.
122465         * lib/unictype/categ_Sk.h: Likewise.
122466         * lib/unictype/categ_Sm.h: Likewise.
122467         * lib/unictype/categ_So.h: Likewise.
122468         * lib/unictype/categ_Z.h: Likewise.
122469         * lib/unictype/categ_Zl.h: Likewise.
122470         * lib/unictype/categ_Zp.h: Likewise.
122471         * lib/unictype/categ_Zs.h: Likewise.
122472         * lib/unictype/categ_of.h: Likewise.
122473         * lib/unictype/combining.h: Likewise.
122474         * lib/unictype/ctype_alnum.h: Likewise.
122475         * lib/unictype/ctype_alpha.h: Likewise.
122476         * lib/unictype/ctype_blank.h: Likewise.
122477         * lib/unictype/ctype_cntrl.h: Likewise.
122478         * lib/unictype/ctype_digit.h: Likewise.
122479         * lib/unictype/ctype_graph.h: Likewise.
122480         * lib/unictype/ctype_lower.h: Likewise.
122481         * lib/unictype/ctype_print.h: Likewise.
122482         * lib/unictype/ctype_punct.h: Likewise.
122483         * lib/unictype/ctype_space.h: Likewise.
122484         * lib/unictype/ctype_upper.h: Likewise.
122485         * lib/unictype/ctype_xdigit.h: Likewise.
122486         * lib/unictype/decdigit.h: Likewise.
122487         * lib/unictype/digit.h: Likewise.
122488         * lib/unictype/mirror.h: Likewise.
122489         * lib/unictype/numeric.h: Likewise.
122490         * lib/unictype/pr_alphabetic.h: Likewise.
122491         * lib/unictype/pr_ascii_hex_digit.h: Likewise.
122492         * lib/unictype/pr_bidi_arabic_digit.h: Likewise.
122493         * lib/unictype/pr_bidi_arabic_right_to_left.h: Likewise.
122494         * lib/unictype/pr_bidi_block_separator.h: Likewise.
122495         * lib/unictype/pr_bidi_boundary_neutral.h: Likewise.
122496         * lib/unictype/pr_bidi_common_separator.h: Likewise.
122497         * lib/unictype/pr_bidi_control.h: Likewise.
122498         * lib/unictype/pr_bidi_embedding_or_override.h: Likewise.
122499         * lib/unictype/pr_bidi_eur_num_separator.h: Likewise.
122500         * lib/unictype/pr_bidi_eur_num_terminator.h: Likewise.
122501         * lib/unictype/pr_bidi_european_digit.h: Likewise.
122502         * lib/unictype/pr_bidi_hebrew_right_to_left.h: Likewise.
122503         * lib/unictype/pr_bidi_left_to_right.h: Likewise.
122504         * lib/unictype/pr_bidi_non_spacing_mark.h: Likewise.
122505         * lib/unictype/pr_bidi_other_neutral.h: Likewise.
122506         * lib/unictype/pr_bidi_pdf.h: Likewise.
122507         * lib/unictype/pr_bidi_segment_separator.h: Likewise.
122508         * lib/unictype/pr_bidi_whitespace.h: Likewise.
122509         * lib/unictype/pr_combining.h: Likewise.
122510         * lib/unictype/pr_composite.h: Likewise.
122511         * lib/unictype/pr_currency_symbol.h: Likewise.
122512         * lib/unictype/pr_dash.h: Likewise.
122513         * lib/unictype/pr_decimal_digit.h: Likewise.
122514         * lib/unictype/pr_default_ignorable_code_point.h: Likewise.
122515         * lib/unictype/pr_deprecated.h: Likewise.
122516         * lib/unictype/pr_diacritic.h: Likewise.
122517         * lib/unictype/pr_extender.h: Likewise.
122518         * lib/unictype/pr_format_control.h: Likewise.
122519         * lib/unictype/pr_grapheme_base.h: Likewise.
122520         * lib/unictype/pr_grapheme_extend.h: Likewise.
122521         * lib/unictype/pr_grapheme_link.h: Likewise.
122522         * lib/unictype/pr_hex_digit.h: Likewise.
122523         * lib/unictype/pr_hyphen.h: Likewise.
122524         * lib/unictype/pr_id_continue.h: Likewise.
122525         * lib/unictype/pr_id_start.h: Likewise.
122526         * lib/unictype/pr_ideographic.h: Likewise.
122527         * lib/unictype/pr_ids_binary_operator.h: Likewise.
122528         * lib/unictype/pr_ids_trinary_operator.h: Likewise.
122529         * lib/unictype/pr_ignorable_control.h: Likewise.
122530         * lib/unictype/pr_iso_control.h: Likewise.
122531         * lib/unictype/pr_join_control.h: Likewise.
122532         * lib/unictype/pr_left_of_pair.h: Likewise.
122533         * lib/unictype/pr_line_separator.h: Likewise.
122534         * lib/unictype/pr_logical_order_exception.h: Likewise.
122535         * lib/unictype/pr_lowercase.h: Likewise.
122536         * lib/unictype/pr_math.h: Likewise.
122537         * lib/unictype/pr_non_break.h: Likewise.
122538         * lib/unictype/pr_not_a_character.h: Likewise.
122539         * lib/unictype/pr_numeric.h: Likewise.
122540         * lib/unictype/pr_other_alphabetic.h: Likewise.
122541         * lib/unictype/pr_other_default_ignorable_code_point.h: Likewise.
122542         * lib/unictype/pr_other_grapheme_extend.h: Likewise.
122543         * lib/unictype/pr_other_id_continue.h: Likewise.
122544         * lib/unictype/pr_other_id_start.h: Likewise.
122545         * lib/unictype/pr_other_lowercase.h: Likewise.
122546         * lib/unictype/pr_other_math.h: Likewise.
122547         * lib/unictype/pr_other_uppercase.h: Likewise.
122548         * lib/unictype/pr_paired_punctuation.h: Likewise.
122549         * lib/unictype/pr_paragraph_separator.h: Likewise.
122550         * lib/unictype/pr_pattern_syntax.h: Likewise.
122551         * lib/unictype/pr_pattern_white_space.h: Likewise.
122552         * lib/unictype/pr_private_use.h: Likewise.
122553         * lib/unictype/pr_punctuation.h: Likewise.
122554         * lib/unictype/pr_quotation_mark.h: Likewise.
122555         * lib/unictype/pr_radical.h: Likewise.
122556         * lib/unictype/pr_sentence_terminal.h: Likewise.
122557         * lib/unictype/pr_soft_dotted.h: Likewise.
122558         * lib/unictype/pr_space.h: Likewise.
122559         * lib/unictype/pr_terminal_punctuation.h: Likewise.
122560         * lib/unictype/pr_titlecase.h: Likewise.
122561         * lib/unictype/pr_unassigned_code_value.h: Likewise.
122562         * lib/unictype/pr_unified_ideograph.h: Likewise.
122563         * lib/unictype/pr_uppercase.h: Likewise.
122564         * lib/unictype/pr_variation_selector.h: Likewise.
122565         * lib/unictype/pr_white_space.h: Likewise.
122566         * lib/unictype/pr_xid_continue.h: Likewise.
122567         * lib/unictype/pr_xid_start.h: Likewise.
122568         * lib/unictype/pr_zero_width.h: Likewise.
122569         * lib/unictype/scripts.h: Likewise.
122570         * lib/unictype/scripts_byname.gperf: Likewise.
122571         * lib/unictype/sy_c_ident.h: Likewise.
122572         * lib/unictype/sy_c_whitespace.h: Likewise.
122573         * lib/unictype/sy_java_ident.h: Likewise.
122574         * lib/unictype/sy_java_whitespace.h: Likewise.
122576         * lib/unictype/Makefile: New file.
122577         * lib/unictype/gen-ctype.c: New file, based on gen-unicode-ctype.c in
122578         glibc.
122579         * lib/unictype/3level.h: New file, copied from glibc.
122580         * lib/unictype/3levelbit.h: New file.
122582 2007-11-11  Bruno Haible  <bruno@clisp.org>
122584         * modules/gperf: New file.
122585         * modules/iconv_open (Depends-on): Add it.
122586         (Makefile.am): Remove the GPERF definition.
122588 2007-11-11  Bruno Haible  <bruno@clisp.org>
122590         * m4/round.m4 (gl_FUNC_ROUND): Test against NetBSD 3.0 bug.
122591         * doc/functions/round.texi: Mention the NetBSD 3.0 bug.
122593 2007-11-11  Bruno Haible  <bruno@clisp.org>
122595         * tests/test-argmatch.c (ARGMATCH_DIE): Undefine.
122596         (usage): Remove function.
122598 2007-11-11  Bruno Haible  <bruno@clisp.org>
122600         * m4/roundf.m4 (gl_FUNC_ROUNDF): Use gl_FUNC_FLOORF_LIBS and
122601         gl_FUNC_CEILF_LIBS.
122602         * m4/round.m4 (gl_FUNC_ROUND): Use gl_FUNC_FLOOR_LIBS and
122603         gl_FUNC_CEIL_LIBS.
122604         * m4/roundl.m4 (gl_FUNC_ROUNDL): Use gl_FUNC_FLOORL_LIBS and
122605         gl_FUNC_CEILL_LIBS.
122606         * modules/roundf (Files): Add m4/floorf.m4, m4/ceilf.m4.
122607         * modules/round (Files): Add m4/floor.m4, m4/ceil.m4.
122608         * modules/roundl (Files): Add m4/floorl.m4, m4/ceill.m4.
122610 2007-11-11  Bruno Haible  <bruno@clisp.org>
122612         * m4/roundf.m4 (gl_FUNC_ROUNDF): Handle the case that floorf and
122613         roundf were declared but do not exist on functions.
122614         * m4/roundl.m4 (gl_FUNC_ROUNDL): Handle the case that floorl and
122615         roundl were declared but do not exist on functions.
122616         * lib/round.c (HAVE_FLOOR_AND_CEIL): Use HAVE_FLOORF_AND_CEILF and
122617         HAVE_FLOORL_AND_CEILL, respectively.
122618         Needed for Sun C on Solaris 10.
122620 2007-11-11  Bruno Haible  <bruno@clisp.org>
122622         * m4/roundf.m4 (gl_FUNC_ROUNDF): Set REPLACE_ROUNDF instead of
122623         HAVE_DECL_ROUNDF. Remove redundant AC_SUBST.
122624         * m4/round.m4 (gl_FUNC_ROUND): Set REPLACE_ROUND instead of
122625         HAVE_DECL_ROUND. Remove redundant AC_SUBST.
122626         * m4/roundl.m4 (gl_FUNC_ROUNDL): Set REPLACE_ROUNDL instead of
122627         HAVE_DECL_ROUNDL. Remove redundant AC_SUBST.
122628         * lib/math.in.h (roundf): Use REPLACE_ROUNDF instead of
122629         HAVE_DECL_ROUNDF.
122630         (round): Use REPLACE_ROUND instead of HAVE_DECL_ROUND.
122631         (roundl): Use REPLACE_ROUNDL instead of HAVE_DECL_ROUNDL.
122632         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_ROUND* instead
122633         of HAVE_DECL_ROUND*.
122634         * modules/math (Makefile.am): Update.
122636 2007-11-10  Bruno Haible  <bruno@clisp.org>
122638         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Use same check for
122639         ptrdiff_t as m4/intl.m4.
122641 2007-11-10  Jim Meyering  <meyering@redhat.com>
122643         Avoid link failure for the argmatch test.
122644         * tests/test-argmatch.c (usage): Define function to avoid a link
122645         failure: argmatch_die requires a usage function.
122647 2007-11-09  Bruno Haible  <bruno@clisp.org>
122649         * doc/functions/snprintf.texi: Mention BeOS deficiency.
122650         * doc/functions/vsnprintf.texi: Likewise.
122651         * lib/vasnprintf.c (VASNPRINTF): Ensure that we never call snprintf
122652         with a size argument < 2.
122654 2007-11-09  Bruno Haible  <bruno@clisp.org>
122656         * lib/vasnprintf.c (VASNPRINTF): Increase reallocation of snprintf
122657         buffer. Fixes an inefficiency introduced on 2007-11-03.
122659 2007-11-09  Bruno Haible  <bruno@clisp.org>
122661         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8) [BeOS]: Make this test return
122662         none instead of tr_TR. Fixes a failure of test-c-strcasecmp.c.
122664 2007-11-08  Jim Meyering  <meyering@redhat.com>
122666         Change cache variable name prefix "jm_" to "gl_" everywhere.
122667         * m4/d-type.m4, m4/jm-winsz1.m4, m4/jm-winsz2.m4, m4/link-follow.m4:
122668         * m4/putenv.m4, m4/strtoimax.m4, m4/strtoumax.m4, m4/unlink-busy.m4:
122669         * m4/uptime.m4: s/gl_/jm_/
122671 2007-11-07  Bruno Haible  <bruno@clisp.org>
122673         Update to GNU gettext 0.17.
122674         * m4/intl.m4: Update to GNU gettext 0.17.
122675         * m4/po.m4: Likewise.
122676         * modules/gettext (Files): Remove m4/ulonglong.m4.
122677         (configure.ac): Require gettext infrastructure from version 0.17.
122679 2007-11-06  Bruno Haible  <bruno@clisp.org>
122681         * lib/fbufmode.c (fbufmode) [QNX]: Use numerical values for flags; the
122682         symbolic values are not defined in a public header.
122683         * lib/freadable.c (freadable) [QNX]: Likewise.
122684         * lib/freadahead.c (freadahead) [QNX]: Likewise.
122685         * lib/freading.c (freading) [QNX]: Likewise.
122686         * lib/fseterr.c (fseterr) [QNX]: Likewise.
122687         * lib/fwritable.c (fwritable) [QNX]: Likewise.
122688         * lib/fwriting.c (fwriting) [QNX]: Likewise.
122689         * lib/fpurge.c (fpurge) [QNX]: Likewise. Add a return statement.
122690         Reported by Alain Magloire.
122692         * m4/fpending.m4 (gl_FUNC_FPENDING): Add a variant for QNX.
122694 2007-11-05  Bruno Haible  <bruno@clisp.org>
122696         * lib/vasnprintf.c (VASNPRINTF): Expand the NEED_PRINTF_DIRECTIVE_A
122697         code when NEED_PRINTF_LONG_DOUBLE or NEED_PRINTF_DOUBLE is set.
122698         Needed on Cygwin, where !NEED_PRINTF_DIRECTIVE_A && NEED_PRINTF_DOUBLE.
122699         Reported by Eric Blake.
122701 2007-10-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
122702             Bruno Haible  <bruno@clisp.org>
122704         * modules/malloc (configure.ac): Define GNULIB_MALLOC_GNU always.
122705         * modules/realloc (configure.ac): Define GNULIB_REALLOC_GNU always.
122706         * lib/realloc.c (SYSTEM_MALLOC_GLIBC_COMPATIBLE): New macro.
122707         (malloc): Undefine also before including <stdlib.h>.
122708         (rpl_realloc): Turn malloc(0) into malloc(1) if necessary.
122709         Needed on OSF/1 4.0.
122711 2007-11-05  Jim Meyering  <meyering@redhat.com>
122713         git-version-gen: sync from coreutils.
122714         * build-aux/git-version-gen: Add comments.
122715         Change the first '-' to '.' in the snapshot version string,
122716         e.g., 6.9-377-08144 -> 6.9.377-08144
122717         Remove first parameter.
122718         Don't declare a version "-dirty" merely because a time
122719         stamp has changed.
122721 2007-11-04  Bruno Haible  <bruno@clisp.org>
122723         * lib/lock.h: Protect all macro definitions containing an 'if'
122724         statement through a "do { ... } while (0)".
122725         * lib/tls.h: Likewise.
122727 2007-11-04  Bruno Haible  <bruno@clisp.org>
122729         * lib/vasnprintf.c (DCHAR_IS_TCHAR, DCHAR_CPY): Undefine at the end.
122731 2007-11-04  Bruno Haible  <bruno@clisp.org>
122733         * m4/printf.m4 (gl_PRINTF_ENOMEM): Use GL_NOCRASH.
122734         * modules/fprintf-posix (Depends-on): Add nocrash.
122735         * modules/snprintf-posix (Depends-on): Likewise.
122736         * modules/sprintf-posix (Depends-on): Likewise.
122737         * modules/vasnprintf-posix (Depends-on): Likewise.
122738         * modules/vasprintf-posix (Depends-on): Likewise.
122739         * modules/vfprintf-posix (Depends-on): Likewise.
122740         * modules/vsnprintf-posix (Depends-on): Likewise.
122741         * modules/vsprintf-posix (Depends-on): Likewise.
122742         * modules/unistdio/u8-vasnprintf (Depends-on): Likewise.
122743         * modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
122744         * modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
122745         * modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
122746         * modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
122747         * modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
122748         * modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
122750 2007-11-04  Bruno Haible  <bruno@clisp.org>
122752         * modules/nocrash: New file.
122753         * m4/nocrash.m4: New file, taken from GNU clisp. Code taken from
122754         GNU libsigsegv, with permission of GNU libsigsegv's copyright holders.
122756 2007-11-04  Bruno Haible  <bruno@clisp.org>
122758         * tests/test-vasnprintf-posix.c (test_function): Add some tests of
122759         precision handling.
122760         * tests/test-vasprintf-posix.c (test_function): Likewise.
122761         * tests/test-snprintf-posix.h (test_function): Likewise.
122762         * tests/test-sprintf-posix.h (test_function): Likewise.
122764         Fix *printf behaviour for large precisions on mingw and BeOS.
122765         * m4/printf.m4 (gl_PRINTF_PRECISION): New macro.
122766         * lib/vasnprintf.c (VASNPRINTF): Handle NEED_PRINTF_UNBOUNDED_PRECISION.
122767         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_PRECISION): New macro.
122768         (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): Invoke it.
122769         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
122770         gl_PRINTF_PRECISION and test its result. Invoke
122771         gl_PREREQ_VASNPRINTF_PRECISION.
122772         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
122773         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
122774         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
122775         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
122776         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
122777         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
122778         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
122779         * doc/functions/fprintf.texi: Update.
122780         * doc/functions/printf.texi: Update.
122781         * doc/functions/snprintf.texi: Update.
122782         * doc/functions/sprintf.texi: Update.
122783         * doc/functions/vfprintf.texi: Update.
122784         * doc/functions/vprintf.texi: Update.
122785         * doc/functions/vsnprintf.texi: Update.
122786         * doc/functions/vsprintf.texi: Update.
122788 2007-11-04  Bruno Haible  <bruno@clisp.org>
122790         * lib/vasnprintf.c (scale10_round_decimal_decoded): Fix shift loop.
122792 2007-11-04  Bruno Haible  <bruno@clisp.org>
122794         * modules/relocatable-prog (Files): Add m4/lib-ld.m4.
122795         Reported by Sylvain Beucler <beuc@gnu.org>.
122797 2007-11-03  Bruno Haible  <bruno@clisp.org>
122799         * tests/test-fprintf-posix2.sh: New file.
122800         * tests/test-fprintf-posix2.c: New file.
122801         * modules/fprintf-posix-tests (Files): Add them.
122802         (TESTS): Add test-fprintf-posix2.sh.
122803         (configure.ac): Check for getrlimit and setrlimit.
122804         (check_PROGRAMS): Add test-fprintf-posix2.
122806         * tests/test-printf-posix2.sh: New file.
122807         * tests/test-printf-posix2.c: New file.
122808         * modules/printf-posix-tests (Files): Add them.
122809         (TESTS): Add test-printf-posix2.sh.
122810         (configure.ac): Check for getrlimit and setrlimit.
122811         (check_PROGRAMS): Add test-printf-posix2.
122813         Fix *printf behaviour in out-of-memory situations on MacOS X and *BSD.
122814         * m4/printf.m4 (gl_PRINTF_ENOMEM): New macro.
122815         * lib/vasnprintf.c: Implement NEED_PRINTF_DOUBLE.
122816         (decode_double): New function, copied from decode_long_double.
122817         (scale10_round_decimal_decoded): New function, extracted from
122818         scale10_round_decimal_long_double.
122819         (scale10_round_decimal_long_double): Use it.
122820         (scale10_round_decimal_double): New function.
122821         (floorlog10): New function.
122822         (VASNPRINTF): Handle NEED_PRINTF_DOUBLE case.
122823         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_ENOMEM): New macro.
122824         (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): Invoke it.
122825         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
122826         gl_PRINTF_ENOMEM and test its result. Invoke
122827         gl_PREREQ_VASNPRINTF_ENOMEM.
122828         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
122829         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
122830         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
122831         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
122832         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
122833         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
122834         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
122835         * modules/fprintf-posix (Depends-on): Add frexp-nolibm.
122836         * modules/snprintf-posix (Depends-on): Likewise.
122837         * modules/sprintf-posix (Depends-on): Likewise.
122838         * modules/vasnprintf-posix (Depends-on): Likewise.
122839         * modules/vasprintf-posix (Depends-on): Likewise.
122840         * modules/vfprintf-posix (Depends-on): Likewise.
122841         * modules/vsnprintf-posix (Depends-on): Likewise.
122842         * modules/vsprintf-posix (Depends-on): Likewise.
122843         * doc/functions/fprintf.texi: Update.
122844         * doc/functions/printf.texi: Update.
122845         * doc/functions/snprintf.texi: Update.
122846         * doc/functions/sprintf.texi: Update.
122847         * doc/functions/vfprintf.texi: Update.
122848         * doc/functions/vprintf.texi: Update.
122849         * doc/functions/vsnprintf.texi: Update.
122850         * doc/functions/vsprintf.texi: Update.
122852 2007-11-03  Bruno Haible  <bruno@clisp.org>
122854         * modules/frexp-nolibm-tests: New file.
122856         * modules/frexp-nolibm: New file.
122857         * m4/frexp.m4 (gl_FUNC_FREXP_NO_LIBM): New macro.
122859 2007-11-03  Bruno Haible  <bruno@clisp.org>
122861         * lib/vasnprintf.c (VASNPRINTF): Don't assume that snprintf's return
122862         value is C99 compliant.
122863         Needed for OSF/1 5.1.
122865 2007-11-03  Bruno Haible  <bruno@clisp.org>
122867         Fix out-of-memory handling of vasnprintf.
122868         * lib/printf-parse.c: Include <errno.h>.
122869         (PRINTF_PARSE): When failing, set errno to EINVAL or ENOMEM.
122870         * lib/vasnprintf.c (VASNPRINTF): When PRINTF_PARSE fails, assume errno
122871         is already set.
122873 2007-11-02  Eric Blake  <ebb9@byu.net>
122875         Fix tests on cygwin.
122876         * modules/xprintf-posix-tests (Makefile.am): Link against -lintl.
122878 2007-11-01  Bruno Haible  <bruno@clisp.org>
122880         * lib/stdlib.in.h (putenv): Remove the "not POSIX compliant everywhere"
122881         warning.
122882         * doc/functions/putenv.texi: Clarify that the 'putenv' module is not
122883         needed for POSIX compatibility.
122885 2007-11-01  Paul Eggert  <eggert@cs.ucla.edu>
122887         * m4/putenv.m4 (gl_FUNC_PUTENV): Also mention that we're checking
122888         for compatibility with GNU.
122890 2007-11-01  Bruno Haible  <bruno@clisp.org>
122892         * lib/putenv.c: Include <stdlib.h>. Remove rpl_putenv declaration.
122893         (putenv): Renamed from rpl_putenv. Change argument type from
122894         'const char *' to 'char *'.
122895         * m4/putenv.m4 (gl_FUNC_PUTENV): Require gl_STDLIB_H_DEFAULTS. Instead
122896         of defining putenv in config.h, just set REPLACE_PUTENV.
122897         * modules/putenv (Depends-on): Add stdlib.
122898         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
122899         (Include): Use <stdlib.h>.
122900         * lib/stdlib.in.h (putenv): New declaration.
122901         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_PUTENV and
122902         REPLACE_PUTENV.
122903         * modules/stdlib (Makefile.am): Substitute GNULIB_PUTENV and
122904         REPLACE_PUTENV.
122905         Needed for MacOS X 10.5.0.
122906         Reported by Peter O'Gorman <peter@pogma.com>.
122908 2007-11-01  Jim Meyering  <meyering@redhat.com>
122910         Treat an empty date string exactly like "0".
122911         * lib/getdate.y (get_date): Once any isspace or TZ= prefix is consumed,
122912         if the remaining date string (to be parsed) is empty, use "0".
122913         Reported by Mischa Molhoek and discussed in this thread:
122914         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/11726>.
122916 2007-10-31  Bruno Haible  <bruno@clisp.org>
122918         * m4/intmax_t.m4 (gl_AC_TYPE_INTMAX_T, gt_AC_TYPE_INTMAX_T): Use
122919         AC_TYPE_LONG_LONG_INT instead of gl_AC_TYPE_LONG_LONG.
122920         * m4/uintmax_t.m4 (gl_AC_TYPE_UINTMAX_T): Use
122921         AC_TYPE_UNSIGNED_LONG_LONG_INT instead of gl_AC_TYPE_UNSIGNED_LONG_LONG.
122922         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Remove macro.
122923         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG): Remove macro.
122925 2007-10-31  Bruno Haible  <bruno@clisp.org>
122927         * m4/longlong.m4 (_AC_TYPE_LONG_LONG_SNIPPET): New macro, extracted
122928         from AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT.
122929         (AC_TYPE_LONG_LONG_INT): Use it.
122930         (AC_TYPE_UNSIGNED_LONG_LONG_INT): Moved here from m4/ulonglong.m4. Use
122931         it as well.
122932         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Remove macro; moved
122933         to m4/longlong.m4.
122934         * modules/stdint (Files): Remove m4/ulonglong.m4.
122935         * modules/strtoull (Files): Use m4/longlong.m4 instead of
122936         m4/ulonglong.m4.
122937         * modules/strtoumax (Files): Likewise.
122939 2007-10-30  Bruno Haible  <bruno@clisp.org>
122941         * modules/xvasprintf-posix: New file.
122942         Suggested by Eric Blake.
122944 2007-10-30  Bruno Haible  <bruno@clisp.org>
122946         * modules/xprintf-posix-tests: New file.
122947         * tests/test-xprintf-posix.sh: New file.
122948         * tests/test-xprintf-posix.c: New file.
122949         * tests/test-xfprintf-posix.c: New file.
122951         * modules/xprintf-posix: New file.
122953 2007-10-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
122955         * modules/fbufmode-tests (MOSTLYCLEANFILES): Remove temp files.
122956         * modules/freadable-tests (MOSTLYCLEANFILES): Likewise.
122957         * modules/fwritable-tests (MOSTLYCLEANFILES): Likewise.
122959 2007-10-29  Bruno Haible  <bruno@clisp.org>
122961         * m4/floorf.m4 (gl_FUNC_FLOORF_LIBS): Rename the cache variable to
122962         contain the special marker '_cv_'.
122963         * m4/floor.m4 (gl_FUNC_FLOOR_LIBS): Likewise.
122964         * m4/floorl.m4 (gl_FUNC_FLOORL_LIBS): Likewise.
122965         * m4/ceilf.m4 (gl_FUNC_CEILF_LIBS): Likewise.
122966         * m4/ceil.m4 (gl_FUNC_CEIL_LIBS): Likewise.
122967         * m4/ceill.m4 (gl_FUNC_CEILL_LIBS): Likewise.
122968         Reported by Ralf Wildenhues.
122970 2007-10-29  Bruno Haible  <bruno@clisp.org>
122972         * gnulib-tool (func_import): When --lgpl is not specified, set
122973         sed_transform_lib_file to convert LGPL and GPLv2+ copyright headers to
122974         GPLv3.
122975         Reported by Simon Josefsson.
122977 2007-10-28  Bruno Haible  <bruno@clisp.org>
122979         * lib/math.in.h: Test REPLACE_ISFINITE instead of HAVE_DECL_ISFINITE.
122980         * m4/isfinite.m4 (gl_ISFINITE): Initialize REPLACE_ISFINITE instead of
122981         HAVE_DECL_ISFINITE.
122982         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Update.
122983         * modules/math (Makefile.am): Substitute REPLACE_ISFINITE instead of
122984         HAVE_DECL_ISFINITE.
122986 2007-10-28  Bruno Haible  <bruno@clisp.org>
122988         * lib/stdint.in.h (_STDINT_MAX): Subtract 1 from an unused signed
122989         integer shift in the signed case. Fixes warnings with OSF/1 5.1 cc.
122991 2007-10-28  Bruno Haible  <bruno@clisp.org>
122993         Fix link errors with Sun C 5.0 on Solaris 10.
122994         * m4/floorf.m4 (gl_FUNC_FLOORF): Consider also the case that the
122995         function is declared but not present in the compiler's libm.
122996         * m4/floorl.m4 (gl_FUNC_FLOORL): Likewise.
122997         * m4/ceilf.m4 (gl_FUNC_CEILF): Likewise.
122998         * m4/ceill.m4 (gl_FUNC_CEILL: Likewise.
122999         * lib/math.in.h: Test REPLACE_CEILF instead of HAVE_DECL_CEILF.
123000         Test REPLACE_CEILL instead of HAVE_DECL_CEILL.
123001         Test REPLACE_FLOORF instead of HAVE_DECL_FLOORF.
123002         Test REPLACE_FLOORL instead of HAVE_DECL_FLOORL.
123003         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Update.
123004         * modules/math (Makefile.am): Substitute REPLACE_CEILF instead of
123005         HAVE_DECL_CEILF, REPLACE_CEILL instead of HAVE_DECL_CEILL,
123006         REPLACE_FLOORF instead of HAVE_DECL_FLOORF, REPLACE_FLOORL instead of
123007         HAVE_DECL_FLOORL.
123009 2007-10-28  Bruno Haible  <bruno@clisp.org>
123011         * m4/floorl.m4 (gl_FUNC_FLOORL_LIBS): New macro, extracted from
123012         gl_FUNC_FLOORL. Cache the result.
123013         (gl_FUNC_FLOORL): Use it.
123014         * m4/ceill.m4 (gl_FUNC_CEILL_LIBS): New macro, extracted from
123015         gl_FUNC_CEILL. Cache the result.
123016         (gl_FUNC_CEILL): Use it.
123018         * m4/floor.m4 (gl_FUNC_FLOOR_LIBS): New macro, extracted from
123019         gl_FUNC_FLOOR. Cache the result.
123020         (gl_FUNC_FLOOR): Use it.
123021         * m4/ceil.m4 (gl_FUNC_CEIL_LIBS): New macro, extracted from
123022         gl_FUNC_CEIL. Cache the result.
123023         (gl_FUNC_CEIL): Use it.
123025         * m4/floorf.m4 (gl_FUNC_FLOORF_LIBS): New macro, extracted from
123026         gl_FUNC_FLOORF. Cache the result.
123027         (gl_FUNC_FLOORF): Use it.
123028         * m4/ceilf.m4 (gl_FUNC_CEILF_LIBS): New macro, extracted from
123029         gl_FUNC_CEILF. Cache the result.
123030         (gl_FUNC_CEILF): Use it.
123032 2007-10-28  Bruno Haible  <bruno@clisp.org>
123034         * gnulib-tool: Allow specifying the LGPL version number through
123035         --lgpl=2 or --lgpl=3.
123036         (func_usage): Document --lgpl with argument.
123037         Handle --lgpl=... arguments.
123038         (func_import): Recognize also gl_LGPL calls with an argument. When
123039         --lgpl=2 is used and the module's license is just LGPL, report an
123040         error. Set sed_transform_lib_file according to the lgpl variable. In
123041         the generated files, use --lgpl or gl_LGPL invocations with argument,
123042         if necessary.
123043         * doc/gnulib-intro.texi (Copyright): Explain how to get modules under
123044         an LGPv2+ license.
123045         * doc/gnulib-tool.texi (Modified imports): Update explanation of
123046         gl_LGPL macro.
123048 2007-10-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
123049             Bruno Haible  <bruno@clisp.org>
123051         * lib/unistr.h (u8_uctomb_aux): Declare also if !HAVE_INLINE.
123052         (u16_uctomb_aux): Likewise.
123053         * lib/unistr/u8-uctomb-aux.c (u8_uctomb_aux): Define also if
123054         !HAVE_INLINE.
123055         * lib/unistr/u16-uctomb-aux.c (u16_uctomb_aux): Likewise
123057 2007-10-28  Bruno Haible  <bruno@clisp.org>
123059         * modules/error: Add a notice recommending to change XGETTEXT_OPTIONS.
123060         Invoke AM_GETTEXT_OPTION if it exists.
123061         * modules/vasprintf: Likewise.
123062         * modules/verror: Likewise.
123063         * modules/xprintf: Likewise.
123064         * modules/xvasprintf: Likewise.
123066 2007-10-27  Ben Pfaff  <blp@gnu.org>
123068         * lib/math.in.h: Define isfinite macro and prototypes for
123069         gl_isfinitef, gl_isfinited, gl_isfinitel if we are providing
123070         implementations.
123071         * m4/math_h.m4: New substitutions for isfinite module.
123072         * lib/isfinite.c: New file.
123073         * m4/isfinite.m4: New file.
123074         * modules/math: Replace isfinite-related @VARS@ in math.in.h.
123075         * modules/isfinite: New file.
123076         * modules/isfinite-tests: New file.
123077         * tests/tests-isfinite.c: New file.
123078         * doc/functions/isfinite.texi: Mention isfinite module.
123079         * MODULES.html.sh: Mention new module.
123081 2007-10-27  Ben Pfaff  <blp@gnu.org>
123083         Ralf Wildenhues reported that Tru64 4.0D declares the round
123084         functions but does not have definitions.
123085         * m4/check-math-lib.m4 (gl_CHECK_MATH_LIB): If the target function
123086         cannot be found in any library, set the output variable to
123087         "missing" instead of "".
123088         * m4/round.m4: Also use our substitute if we cannot find round in
123089         any library, even if it is declared.
123090         * m4/roundf.m4: Likewise for roundf.
123091         * m4/roundl.m4: Likewise for roundl.
123092         * lib/math.in.h: Undefine roundf, round, roundl before defining
123093         their replacements, to allow for hypothetical systems where these
123094         may be defined as macros but not available in libraries.
123096 2007-10-27  Bruno Haible  <bruno@clisp.org>
123098         * doc/gnulib.texi: Invoke @firstparagraphindent.
123099         * doc/gnulib-tool.texi (Simple update): Mention possible incompatible
123100         changes in gnulib.
123101         (Source changes): New section.
123103 2007-10-26  Bruno Haible  <bruno@clisp.org>
123105         * m4/gnulib-common.m4 (AC_C_RESTRICT): New overriding definition,
123106         borrowed from autoconf.
123108 2007-10-26  Bruno Haible  <bruno@clisp.org>
123110         * lib/strerror.c (rpl_strerror): Return "Unknown error ..." also if
123111         strerror returned the empty string. Needed on HP-UX 11.00.
123113 2007-10-24  Micah Cowan  <micah@cowan.name>
123115         Remove vestiges of cvs-gnulib-checkout process.  Now we use git.
123116         * build-aux/bootstrap: Remove support for now-unnecessary option,
123117         --cvs-user, and envvars CVS_USER, CVS_RSH.
123119 2007-10-24  Jim Meyering  <meyering@redhat.com>
123121         Avoid diagnostics from sha1sum when there is no cached checksum.
123122         * build-aux/bootstrap (update_po_files): Skip the sha1sum check
123123         if the po.s1 file hasn't been created yet.
123125         * build-aux/bootstrap: Sync from coreutils:
123126         2007-10-24  Jim Meyering  <meyering@redhat.com>
123127         Get gnulib from the git repository, not from an obsolete cvs one.
123128         * build-aux/bootstrap: Suggestion from Micah Cowan.
123129         2007-10-04  Jim Meyering  <jim@meyering.net>
123130         * build-aux/bootstrap (slurp): Adapt to _.h -> .in.h name change.
123131         (update_po_files): Work also when there are no .po files in po/.
123133 2007-10-24  Paul Eggert  <eggert@cs.ucla.edu>
123135         * README: Append ".git" to git and cg examples.
123136         Problem reported by Benoit Sigoure.
123138 2007-10-23  Micah Cowan  <micah@cowan.name>
123140         * users.txt: Add wget.
123142 2007-10-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
123144         Fix linking of some unistdio tests on FreeBSD.
123145         * modules/unistdio/u16-vsnprintf-tests
123146         (test_u16_vsprintf1_LDADD): Add @LIBINTL@.
123147         * modules/unistdio/u16-vsprintf-tests
123148         (test_u16_vsnprintf1_LDADD): Likewise.
123149         * modules/unistdio/u32-vsnprintf-tests
123150         (test_u32_vsnprintf1_LDADD): Likewise.
123151         * modules/unistdio/u32-vsprintf-tests
123152         (test_u32_vsprintf1_LDADD): Likewise.
123153         * modules/unistdio/u8-vsnprintf-tests
123154         (test_u8_vsnprintf1_LDADD): Likewise.
123155         * modules/unistdio/u8-vsprintf-tests
123156         (test_u8_vsprintf1_LDADD): Likewise.
123157         * modules/unistdio/ulc-vsnprintf-tests
123158         (test_ulc_vsnprintf1_LDADD): Likewise.
123159         * modules/unistdio/ulc-vsprintf-tests
123160         (test_ulc_vsprintf1_LDADD): Likewise.
123162         Fix linking of some uniconv tests on FreeBSD.
123163         * modules/uniconv/u16-conv-from-enc-tests
123164         (test_u16_conv_from_enc_LDADD): Link $(LDADD) before @LIBICONV@.
123165         * modules/uniconv/u16-conv-to-enc-tests
123166         (test_u16_conv_to_enc_LDADD): Likewise.
123167         * modules/uniconv/u16-strconv-from-enc-tests
123168         (test_u16_strconv_from_enc_LDADD): Likewise.
123169         * modules/uniconv/u16-strconv-to-enc-tests
123170         (test_u16_strconv_to_enc_LDADD): Likewise.
123171         * modules/uniconv/u32-conv-from-enc-tests
123172         (test_u32_conv_from_enc_LDADD): Likewise.
123173         * modules/uniconv/u32-conv-to-enc-tests
123174         (test_u32_conv_to_enc_LDADD): Likewise.
123175         * modules/uniconv/u32-strconv-from-enc-tests
123176         (test_u32_strconv_from_enc_LDADD): Likewise.
123177         * modules/uniconv/u32-strconv-to-enc-tests
123178         (test_u32_strconv_to_enc_LDADD): Likewise.
123179         * modules/uniconv/u8-conv-from-enc-tests
123180         (test_u8_conv_from_enc_LDADD): Likewise.
123181         * modules/uniconv/u8-conv-to-enc-tests
123182         (test_u8_conv_to_enc_LDADD): Likewise.
123183         * modules/uniconv/u8-strconv-from-enc-tests
123184         (test_u8_strconv_from_enc_LDADD): Likewise.
123185         * modules/uniconv/u8-strconv-to-enc-tests
123186         (test_u8_strconv_to_enc_LDADD): Likewise.
123188 2007-10-22  Bruno Haible  <bruno@clisp.org>
123190         * lib/stdint.in.h: Add check that intmax_t and uintmax_t have the same
123191         size.
123193 2007-10-22  Eric Blake  <ebb9@byu.net>
123195         Tweak x*printf documentation.
123196         * lib/xprintf.c (xprintf, xvprintf, xfprintf, xvfprintf): Adjust
123197         variable name and comments.
123198         Suggested by Bruno Haible.
123200 2007-10-22  Bruno Haible  <bruno@clisp.org>
123202         * lib/acl.c (copy_acl): Fix file name in comment.
123204 2007-10-22  Paul Eggert  <eggert@cs.ucla.edu>
123206         Fix Tru64 problem with stdbool.h.
123207         * lib/stdbool.in.h (false, true):
123208         [! (defined __cplusplus || defined __BEOS__) && !defined __GNUC__]:
123209         Don't declare as an enum in this situation; it runs afoul of Tru64.
123210         Problem reported by Steven M. Schweda in
123211         <http://lists.gnu.org/r/bug-autoconf/2007-10/msg00019.html>.
123213 2007-10-22  Eric Blake  <ebb9@byu.net>
123215         Also wrap vf?printf.
123216         * lib/xprintf.h (xvprintf, xvfprintf): New declarations.
123217         * lib/xprintf.c (xprintf, xfprintf): Work for C89.
123218         (xvprintf, xvfprintf): New functions.
123220 2007-10-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
123222         * modules/fstrcmp-tests (test_fstrcmp_LDADD): New, add
123223         @LIBINTL@ for FreeBSD 6.2, $(LIBTHREAD) for AIX 4.3.3.
123225         * lib/uniconv/u16-conv-to-enc.c (U_MBLEN): Define.
123226         * lib/uniconv/u32-conv-to-enc.c (U_MBLEN): Likewise.
123228 2007-10-22  Paul Eggert  <eggert@cs.ucla.edu>
123230         * lib/acl.c (copy_acl): Adjust to IRIX 6.5.  Problem reported
123231         by Bruno Haible.
123233 2007-10-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
123235         * lib/getloadavg.c
123236         [defined (__osf__) && (defined (__alpha) || defined (__alpha__)]:
123237         Undef `sys' after including sys/table.h, for Tru64 4.0D.
123239         * tests/test-i-ring.c: Work for C89.
123241 2007-10-22  Bruno Haible  <bruno@clisp.org>
123243         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Use -1ull, not
123244         -1u, in preprocessor expression, so that we don't test for the bug
123245         in HP-UX 11.00 cpp.  Testing for this bug caused problems; see
123246         <http://lists.gnu.org/r/bug-gnulib/2007-10/msg00329.html>.
123248 2007-10-22  Eric Blake  <ebb9@byu.net>
123250         * tests/test-yesno.sh: Silence stderr during test.
123252 2007-10-22  Simon Josefsson  <simon@josefsson.org>
123254         * modules/crypto/gc-camellia: New file.
123256         * m4/gc-camellia.m4: New file.
123258         * lib/gc-libgcrypt.c (gc_cipher_open): Support Camellia.
123260         * lib/gc.h (enum Gc_cipher): Add GC_CAMELLIA128, GC_CAMELLIA256.
123262 2007-10-22  Simon Josefsson  <simon@josefsson.org>
123264         * build-aux/maint.mk (gzip_rsyncable): Don't fail if gzip sends
123265         --help to stdout.  Reported by sms@antinode.org (Steven
123266         M. Schweda).
123268 2007-10-22  Simon Josefsson  <simon@josefsson.org>
123270         * users.txt: Fix link to libksba.
123272 2007-10-21  Ben Pfaff  <blp@gnu.org>
123274         * modules/roundf-tests: Add dependency on floorf, ceilf to allow
123275         round.c roundf implementation that depends on floorf and ceilf to
123276         be tested unconditionally.
123278 2007-10-21  Ben Pfaff  <blp@gnu.org>
123280         * m4/check-libm-func.m4: Removed.
123281         * m4/check-math-lib.m4: New file.
123282         * m4/round.m4: Rewrite to use gl_CHECK_MATH_LIB.
123283         * m4/roundf.m4: Ditto, and fix lack of HAVE_DECL_ROUNDF
123284         definition and lack of AC_LIBOBJ([roundf]).
123285         * m4/roundl.m4: Ditto, and similarly for roundl.
123286         * modules/round: Reference new m4 file.
123287         * modules/roundf: Ditto.
123288         * modules/roundl: Ditto.
123289         * tests/test-round2.c (main): Use ROUND instead of round.
123290         Bug report from Bruno Haible.
123292 2007-10-21  Bruno Haible  <bruno@clisp.org>
123294         * lib/printf-parse.c: Don't assume <stdint.h> exists in IN_LIBASPRINTF
123295         context.
123297 2007-10-21  Bruno Haible  <bruno@clisp.org>
123299         * tests/test-wcwidth.c (main): Allow negative result for some control
123300         characters.
123302         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Check also the width of U+200B.
123303         Needed on OSF/1 5.1.
123305 2007-10-21  Bruno Haible  <bruno@clisp.org>
123307         * tests/test-floorf1.c: Include isnanf.h.
123308         (main): Use isnanf() instead of isnan().
123309         * tests/test-ceilf1.c: Include isnanf.h.
123310         (main): Use isnanf() instead of isnan().
123311         * tests/test-truncf1.c: Include isnanf.h.
123312         (main): Use isnanf() instead of isnan().
123313         * tests/test-roundf1.c: Include isnanf.h.
123314         (main): Use isnanf() instead of isnan().
123316 2007-10-21  Eric Blake  <ebb9@byu.net>
123318         * users.txt: Update URL for m4.
123320 2007-10-21  Bruno Haible  <bruno@clisp.org>
123322         * users.txt: Add clisp. Update URLs to Simon Josefsson's projects.
123324 2007-10-21  Bruno Haible  <bruno@clisp.org>
123326         * gnulib-tool (func_create_megatestdir): Determine the cvsdate from
123327         Git's management files if the CVS files are not present.
123329 2007-10-20  Bruno Haible  <bruno@clisp.org>
123331         * lib/count-one-bits.h (COUNT_ONE_BITS): Use the builtin also for
123332         gcc-3.4.x.
123334 2007-10-20  Ben Pfaff  <blp@gnu.org>
123336         * lib/math.in.h: Declare round, roundf, roundl if we are providing
123337         implementations.
123338         * m4/math_h.m4: New substitutions for round, roundf, roundl modules.
123339         * lib/round.c: New file.
123340         * lib/roundf.c: New file.
123341         * lib/roundl.c: New file.
123342         * m4/round.m4: New file.
123343         * m4/roundf.m4: New file.
123344         * m4/roundl.m4: New file.
123345         * m4/check-libm-func-m4: New file.
123346         * modules/math: Replace round, roundf, roundl related @VARS@ in
123347         math.in.h.
123348         * modules/round: New file.
123349         * modules/round-tests: New file.
123350         * modules/roundf: New file.
123351         * modules/roundf-tests: New file.
123352         * modules/roundl: New file.
123353         * modules/roundl-tests: New file.
123354         * tests/test-round1.c: New file.
123355         * tests/test-round2.c: New file.
123356         * tests/test-roundf1.c: New file.
123357         * tests/test-roundf2.c: New file.
123358         * tests/test-roundl.c: New file.
123359         * doc/functions/round.texi: Mention round module.
123360         * doc/functions/roundf.texi: Mention roundf module.
123361         * doc/functions/roundl.texi: Mention roundl module.
123362         * MODULES.html.sh: Mention new modules.
123363         Thanks to Bruno Haible for suggestions.
123365 2007-10-20  Jim Meyering  <meyering@redhat.com>
123367         * lib/xprintf.c: Include <config.h> unconditionally.
123369         Change xprintf's license to GPL.
123370         * modules/xprintf (License): s/LGPL/GPL/, since this module
123371         depends on modules (exit and exitfail) which are GPL.
123372         Suggestion from Bruno Haible.
123374         xprintf fixes.
123375         * lib/xprintf.c (xprintf, xfprintf): Use va_end.
123376         Use a clearer diagnostic.
123377         Patch from Bruno Haible.
123379 2007-10-20  Bruno Haible  <bruno@clisp.org>
123381         * lib/vasnprintf.c (VASNPRINTF): Don't report overflow if the available
123382         length is INT_MAX and sizeof (DCHAR_T) > sizeof (TCHAR_T).
123383         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
123385 2007-10-20  Bruno Haible  <bruno@clisp.org>
123387         * tests/test-floorf2.c (correct_result_p): Don't rely on excess
123388         precision in the comparison result > x - 1 or similar.
123389         * tests/test-ceilf2.c (correct_result_p): Likewise.
123390         * tests/test-truncf2.c (correct_result_p): Likewise.
123391         * tests/test-trunc2.c (correct_result_p): Likewise.
123392         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
123394 2007-10-20  Bruno Haible  <bruno@clisp.org>
123396         * modules/ceil: New file.
123397         * m4/ceil.m4: New file.
123398         * doc/functions/ceil.texi: Mention the 'ceil' module.
123400 2007-10-20  Bruno Haible  <bruno@clisp.org>
123402         * modules/floor: New file.
123403         * m4/floor.m4: New file.
123404         * doc/functions/floor.texi: Mention the 'floor' module.
123406 2007-10-20  Bruno Haible  <bruno@clisp.org>
123408         * modules/ceilf-tests (Depends-on): Add fprintf-posix. Needed for use
123409         of %a.
123410         * modules/floorf-tests (Depends-on): Likewise.
123411         * modules/truncf-tests (Depends-on): Likewise.
123412         * modules/trunc-tests (Depends-on): Likewise.
123413         Reported by Ben Pfaff.
123415 2007-10-19  Jim Meyering  <meyering@redhat.com>
123417         * lib/xprintf.c (xprintf, xfprintf): Test err < 0, not just "err".
123418         Don't bother testing specific errno values.  Just test ferror.
123420         New module: xprintf
123421         * modules/xprintf, lib/xprintf.c, lib/xprintf.h: New files.
123423 2007-10-19  Bruno Haible  <bruno@clisp.org>
123425         * modules/csharpexec (Makefile.am): Use @FOO@ syntax instead of $(FOO)
123426         syntax.
123427         * modules/javaexec (Makefile.am): Likewise.
123428         * modules/relocatable-prog (Makefile.am): Likewise.
123429         Suggested by Jim Meyering.
123431 2007-10-18  Bruno Haible  <bruno@clisp.org>
123433         * lib/vasnprintf.c (VASNPRINTF): Don't use %n on glibc >= 2.3 systems.
123434         Reported by Jim Meyering.
123436 2007-10-18  Eric Blake  <ebb9@byu.net>
123438         * modules/filenamecat-tests (Makefile.am): Link against -lintl.
123440 2007-10-18  Bruno Haible  <bruno@clisp.org>
123442         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_N, gl_SNPRINTF_DIRECTIVE_N): Put
123443         the format string into writable memory. Needed in Fortify conditions.
123445 2007-10-18  Colin Watson  <cjwatson@debian.org>  (tiny change)
123446             Bruno Haible  <bruno@clisp.org>
123448         * lib/trim.c: Include config.h unconditionally. Include trim.h always.
123449         Include ctype.h always. Include stdlib.h, not mbuiter.h, for MB_CUR_MAX.
123450         * modules/trim (Depends-on): Add mbchar.
123451         (configure.ac): Add gl_FUNC_MBRTOWC.
123452         (Makefile.am): Augment lib_SOURCES.
123454 2007-10-17  Paul Eggert  <eggert@cs.ucla.edu>
123456         Modify glob.c to use fstatat and dirfd, to simplify it.
123457         Suggested by Eric Blake.
123458         * lib/glob.c (__fxstatat64) [!_LIBC]: New macro.
123459         Don't include <stdbool.h>; not used.
123460         (link_exists2_p, glob_in_dir) [!_LIBC]: No longer a special case.
123461         (link_exists_p): Simplify implementation, since we can now assume
123462         dirfd and fstatat.
123463         * modules/glob (Depends-on): Add dirfd, openat.  Remove stdbool.
123465 2007-10-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
123467         * gnulib-tool (func_get_dependencies): Fix sed script to
123468         match only tests.
123470 2007-10-17  Bruno Haible  <bruno@clisp.org>
123472         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): On Cygwin, don't
123473         allow locale names without encoding suffix.
123474         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise.
123475         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
123477 2007-10-16  Bruno Haible  <bruno@clisp.org>
123479         * lib/getcwd.c (__getcwd): Define with explicit rpl_ prefix.
123480         * lib/getgroups.c (getgroups): Likewise.
123481         * lib/gettimeofday.c (localtime, gmtime, tzset): Likewise.
123483 2007-10-16  Bruno Haible  <bruno@clisp.org>
123485         * modules/absolute-header (License): Change from LGPL to LGPLv2+.
123486         * modules/malloc-posix (License): Likewise.
123487         * modules/realloc-posix (License): Likewise.
123488         * modules/calloc-posix (License): Likewise.
123489         * modules/intprops (License): Change from GPL to LGPL, with
123490         Paul Eggert's approval.
123492 2007-10-16  Paul Eggert  <eggert@cs.ucla.edu>
123494         Merge glibc changes into lib/glob.c.
123496         * lib/glob.c (glob_in_dir): Sync with glibc/posix/glob.c, dated
123497         2007-10-15 04:59:03 UTC.  Here are the changes:
123499         2007-10-14  Ulrich Drepper  <drepper@redhat.com>
123501         * lib/glob.c: Reimplement link_exists_p to use fstatat64.
123503         * lib/glob.c: Add some branch prediction throughout.
123505         2007-10-07  Ulrich Drepper  <drepper@redhat.com>
123507         [BZ #5103]
123508         * lib/glob.c (glob): Recognize patterns starting \/.
123510         2007-02-14  Jakub Jelinek  <jakub@redhat.com>
123512         [BZ #3996]
123513         * lib/glob.c (attribute_hidden): Define if not defined.
123514         (glob): Unescape dirname, filename or username when needed and not
123515         GLOB_NOESCAPE.  Handle \/ correctly.  Handle GLOB_MARK if filename
123516         is NULL.  Handle unescaped [ in pattern without closing ].
123517         Don't pass GLOB_CHECK down to recursive glob for directories.
123518         (__glob_pattern_type): New function.
123519         (__glob_pattern_p): Implement using __glob_pattern_type.
123520         (glob_in_dir): Handle GLOB_NOCHECK patterns containing no meta
123521         characters and backslashes if not GLOB_NOESCAPE or unterminated [.
123522         Remove unreachable code.
123524         2006-09-30  Ulrich Drepper  <drepper@redhat.com>
123526         * lib/glob.c (glob_in_dir): Add some comments and asserts to
123527         explain why there are no leaks.
123529         2006-09-25  Jakub Jelinek  <jakub@redhat.com>
123531         [BZ #3253]
123532         * lib/glob.c (glob_in_dir): Don't alloca one struct globlink at a
123533         time, rather allocate increasingly bigger arrays of pointers, if
123534         possible with alloca, if too large with malloc.
123536 2007-10-16  Paul Eggert  <eggert@cs.ucla.edu>
123538         Check for 64-bit int errors in HP-UX 10.20 preprocessor.
123539         Problem reported by H.Merijn Brand in
123540         <http://lists.gnu.org/r/bug-tar/2007-10/msg00018.html>.
123541         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Check preprocessor too.
123542         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
123544 2007-10-15  Bruno Haible  <bruno@clisp.org>
123546         * lib/fchdir.c (close, open, closedir, opendir, dup, dup2): Define
123547         with explicit rpl_ prefix.
123548         * lib/fopen.c (fopen): Likewise.
123549         * lib/freopen.c (freopen): Likewise.
123550         * lib/iconv.c (iconv): Likewise.
123551         * lib/iconv_close.c (iconv_close): Likewise.
123553 2007-10-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
123555         * m4/iconv_open (gl_FUNC_ICONV_OPEN_UTF): Fix cache variable name.
123557 2007-10-15  Bruno Haible  <bruno@clisp.org>
123559         * m4/getaddrinfo.m4 (gl_GETADDRINFO, gl_PREREQ_GETADDRINFO): Use
123560         <stddef.h> instead of <stdlib.h> since we only need NULL.
123561         Reported by Ben Pfaff <blp@cs.stanford.edu>.
123563 2007-10-15  Bruno Haible  <bruno@clisp.org>
123565         * doc/gnulib-tool.texi (Initial import): Swap order of -I directives.
123566         Replace paragraph talking about LIBOBJS.
123567         Reported by Colin Watson <cjwatson@debian.org>.
123569 2007-10-15  Bruno Haible  <bruno@clisp.org>
123571         * m4/getaddrinfo.m4 (gl_GETADDRINFO, gl_PREREQ_GETADDRINFO): Include
123572         <stdlib.h> before using NULL.
123574 2007-10-15  Simon Josefsson  <simon@josefsson.org>
123576         * m4/getaddrinfo.m4: Use NULL rather than 0 for pointers.
123577         Reported by Albert Chin <china@thewrittenword.com>.
123579 2007-10-14  Bruno Haible  <bruno@clisp.org>
123581         * modules/iconv_open-utf-tests: New file.
123582         * tests/test-iconv-utf.c: New file.
123584         Enhance iconv_open to support UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE.
123585         * modules/iconv_open-utf: New file.
123586         * lib/iconv.in.h (_ICONV_UTF8_UTF*, _ICONV_UTF*_UTF8): New macros.
123587         (iconv, iconv_close): New declarations.
123588         * lib/iconv_open.c: Include c-strcase.h. Don't require ICONV_FLAVOR to
123589         be defined.
123590         (iconv_open): Add special handling of conversion between UTF-8 and
123591         UTF-{16,32}{BE,LE}.
123592         * lib/iconv.c: New file, incorporating code from GNU libiconv 1.11.
123593         * lib/iconv_close.c: New file.
123594         * m4/iconv_open.m4 (gl_REPLACE_ICONV_OPEN): New macro, extracted from
123595         gl_FUNC_ICONV_OPEN.
123596         (gl_FUNC_ICONV_OPEN): Use it.
123597         (gl_FUNC_ICONV_OPEN_UTF): New macro.
123598         * m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS): Initialize also REPLACE_ICONV
123599         and REPLACE_ICONV_UTF.
123600         * modules/iconv_open (Depends-on): Add c-strcase.
123601         (Makefile.am): Substitute also REPLACE_ICONV, REPLACE_ICONV_UTF,
123602         ICONV_CONST.
123603         * doc/functions/iconv_open.texi: Mention the iconv_open-utf module.
123605 2007-10-13  Albert Chin  <china@thewrittenword.com>
123606             Bruno Haible  <bruno@clisp.org>
123608         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Perform the test for getaddrinfo
123609         through a link check that includes <netdb.h>. Needed for OSF/1 5.1.
123611 2007-10-13  Bruno Haible  <bruno@clisp.org>
123613         * lib/argp-fmtstream.h (ARGP_FS_EI): If __GNUC_STDC_INLINE__ is
123614         defined, use the ISO C99 inline semantics.
123615         * lib/argp.h (ARGP_EI): Likewise.
123617 2007-10-13  Bruno Haible  <bruno@clisp.org>
123619         Handle 'inline' change in gcc 4.3.0.
123620         * lib/argp-fmtstream.h (argp_fmtstream_putc, argp_fmtstream_puts,
123621         argp_fmtstream_write, argp_fmtstream_set_lmargin,
123622         argp_fmtstream_set_rmargin, argp_fmtstream_set_wmargin,
123623         argp_fmtstream_point): Disable 'extern' declaration if the function
123624         definition is going to be provided inline.
123625         (ARGP_FS_EI): If __GNUC_STDC_INLINE__ is defined, use the GNU C inline
123626         semantics, not the ISO C99 inline semantics.
123627         * lib/argp.h (argp_usage, _option_is_short, _option_is_end): Disable
123628         'extern' declaration if the function definition is going to be provided
123629         inline.
123630         (ARGP_EI): Don't assume GNU C. If __GNUC_STDC_INLINE__ is defined, use
123631         the GNU C inline semantics, not the ISO C99 inline semantics. With
123632         GCC 4.2, avoid a warning.
123634 2007-10-13  Bruno Haible  <bruno@clisp.org>
123636         * lib/freading.h (freading): Enable the use of __freading for
123637         glibc >= 2.7.
123638         * lib/freading.c (freading): Likewise.
123640 2007-10-12  Paul Eggert  <eggert@cs.ucla.edu>
123642         * lib/argp-fmtstream.h (ARGP_FS_EI): Work around GCC 4.2.1 diagnostic
123643         "warning: C99 inline functions are not supported; using GNU89".
123645 2007-10-12  Bruno Haible  <bruno@clisp.org>
123647         * lib/ceil.c (FUNC): Avoid rounding errors for values near a power
123648         of 2.
123649         * tests/test-ceilf2.c: New file.
123650         * modules/ceilf-tests: (Files, Depends-on, Makefile.am): Add new test.
123652         * tests/test-ceilf1.c: Renamed from tests/test-ceilf.c.
123653         * modules/ceilf-tests: Update.
123655 2007-10-12  Bruno Haible  <bruno@clisp.org>
123657         * lib/floor.c (FUNC): Avoid rounding errors for values near a power
123658         of 2.
123659         * tests/test-floorf2.c: New file.
123660         * modules/floorf-tests: (Files, Depends-on, Makefile.am): Add new test.
123662         * tests/test-floorf1.c: Renamed from tests/test-floorf.c.
123663         * modules/floorf-tests: Update.
123665 2007-10-12  Bruno Haible  <bruno@clisp.org>
123667         * tests/test-trunc2.c: New file.
123668         * modules/trunc-tests: (Files, Depends-on, Makefile.am): Add new test.
123670         * tests/test-trunc1.c: Renamed from tests/test-trunc.c.
123671         * modules/trunc-tests: Update.
123673 2007-10-12  Bruno Haible  <bruno@clisp.org>
123675         * lib/trunc.c (FUNC): Avoid rounding errors for values near a power
123676         of 2.
123677         * tests/test-truncf2.c: New file.
123678         * modules/truncf-tests: (Files, Depends-on, Makefile.am): Add new test.
123680         * tests/test-truncf1.c: Renamed from tests/test-truncf.c.
123681         * modules/truncf-tests: Update.
123683 2007-10-11  Eric Blake  <ebb9@byu.net>
123685         Don't claim strerror is broken on Interix.
123686         * doc/functions/strerror.texi (strerror): Known broken systems are
123687         now Solaris 8, and not Interix.
123688         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): No longer filter out
123689         Interix on cross-compile.
123690         Reported by Martin Koeppe in
123691         http://lists.gnu.org/r/bug-gnulib/2007-10/msg00005.html.
123693 2007-10-11  Bruno Haible  <bruno@clisp.org>
123695         * modules/i-ring-tests: New file.
123696         * tests/test-i-ring.c: Renamed from lib/i-ring-test.c. Use ASSERT
123697         instead of assert.
123699 2007-10-11  Bruno Haible  <bruno@clisp.org>
123701         * modules/filenamecat-tests: New file.
123702         * tests/test-filenamecat.c: New file, extracted from lib/filenamecat.c.
123703         * lib/filenamecat.c: Remove test code.
123705 2007-10-11  Paul Eggert  <eggert@cs.ucla.edu>
123707         Simplify and modernize strerror substitute, partly to fix Solaris 8 bug.
123709         * lib/strerror.c: Include <string.h> always, to test interface,
123710         and to remove the need for the dummy.
123711         Include intprops.h to compute width instead of doing it ourselves
123712         and missing a CHAR_BIT declaration, which broke tar 1.19 on Solaris 8.
123713         (strerror): Define it to return NULL if there's no system strerror.
123714         (rpl_strerror): Use INT_STRLEN_BOUND to compute bound.
123715         Omit !HAVE_STRERROR code.  We don't need to worry about supporting
123716         ancient pre-strerror Unix systems well any more.  Saying "unknown
123717         system error" is enough.
123718         * lib/string.in.h (strerror): Simplify the ifdef to reflect the
123719         simpler strerror.c implementation.
123720         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE, gl_PREREQ_STDERROR):
123721         Simplify the tests to reflect the simpler strerror implementation.
123722         * modules/strerror (Depends-on): Add intprops.
123724 2007-10-09  Eric Blake  <ebb9@byu.net>
123726         Silence test-fpending.
123727         * modules/fpending-tests (Files): Add wrapper script.
123728         * tests/test-fpending.sh: New file.
123730 2007-10-09  Bruno Haible  <bruno@clisp.org>
123732         * MODULES.html.sh (func_module): Don't create a hyperlink for
123733         function names like 'printf_frexp'.
123734         (Misc): Add crc, memxor.
123735         (Characteristics of floating types): New section.
123736         (Mathematics): Add ceilf, ceill, floorf, floorl, frexpl-nolibm,
123737         isnanf-nolibm, signbit, trunc, truncf, truncl.
123738         (Enhancements for ISO C 99 functions): New subsection Input/output.
123739         (Support for systems lacking POSIX:2001): Add arpa_inet, calloc-posix,
123740         fcntl, fopen, freopen, fseek, fseeko, ftell, ftello, iconv_open,
123741         locale, malloc-posix, netinet_in, open, realloc-posix, signal, sleep.
123742         (Compatibility checks for POSIX:2001 functions): Add clock-time.
123743         (Enhancements for POSIX:2001 functions): Add chdir-long.
123744         (File system functions): Add areadlink, chdir-safer, read-file.
123745         Remove cycle-check.
123746         (File system as inode set): New section.
123747         (Date and time): Add gethrxtime.
123748         (Multithreading): Add openmp.
123749         (Internationalization functions): Add localename.
123750         (Unicode string functions): Add unistr/u*-mbsnlen.
123751         (Support for maintaining and releasing projects): Add git-version-gen.
123752         (Lone files): Remove directories.
123754 2007-10-08  Ben Pfaff  <blp@gnu.org>
123756         * lib/xmalloca.h: Fix typo in comment.
123758 2007-10-08  Paul Eggert  <eggert@cs.ucla.edu>
123760         * lib/xnanosleep.c (xnanosleep): Don't assume GCC 4.3.0 behavior
123761         when avoiding problems with integer overflow.  Use a portable test
123762         instead.
123764 2007-10-08  Simon Josefsson  <simon@josefsson.org>
123766         * modules/dummy (License): Change to LGPLv2+.
123767         * modules/float (License): Likewise
123768         * modules/realloc (License): Likewise
123769         * modules/stdlib (License): Likewise
123771 2007-10-07  Bruno Haible  <bruno@clisp.org>
123773         * trunc.c (TWO_MANT_DIG): Change type to DOUBLE.
123774         * floor.c (TWO_MANT_DIG): Likewise.
123775         * ceil.c (TWO_MANT_DIG): Likewise.
123776         Reported by Ben Pfaff.
123778 2007-10-07  Bruno Haible  <bruno@clisp.org>
123780         Avoid gcc warnings "declaration of 'exp' shadows a global declaration".
123781         * lib/math.in.h (frexp, frexpl): Change parameter name to 'expptr'.
123782         * lib/frexp.c (FUNC): Likewise.
123783         * lib/printf-frexp.h (printf_frexp): Likewise.
123784         * lib/printf-frexpl.h (printf_frexpl): Likewise.
123785         * lib/printf-frexp.c (FUNC): Likewise.
123786         Suggested by Jim Meyering.
123788 2007-10-07  Jim Meyering  <meyering@redhat.com>
123790         Make xnanosleep's integer overflow test more robust.
123791         * lib/xnanosleep.c (xnanosleep): Declare a temporary to be "volatile",
123792         so that gcc-4.3.0 doesn't optimize away this test for overflow.
123794 2007-10-07  Bruno Haible  <bruno@clisp.org>
123796         * NEWS: Mention the license change.
123798         * doc/gnulib-intro.texi (Copyright): Update the meaning of the license
123799         abbreviations in the modules files.
123801         Change copyright notice from GPLv2+ to GPLv3+.
123802         * README: Change copyright notice.
123803         * MODULES.html.sh: Likewise.
123804         * build-aux/bootstrap.conf: Likewise.
123805         * build-aux/config.libpath: Likewise.
123806         * build-aux/csharpcomp.sh.in: Likewise.
123807         * build-aux/csharpexec.sh.in: Likewise.
123808         * build-aux/install-reloc: Likewise.
123809         * build-aux/javacomp.sh.in: Likewise.
123810         * build-aux/javaexec.sh.in: Likewise.
123811         * build-aux/ldd.sh.in: Likewise.
123812         * build-aux/reloc-ldflags: Likewise.
123813         * build-aux/relocatable.sh.in: Likewise.
123814         * build-aux/x-to-1.in: Likewise.
123815         * check-module: Likewise.
123816         * config/srclistvars.sh: Likewise.
123817         * gnulib-tool: Likewise.
123818         * lib/acl-internal.h: Likewise.
123819         * lib/acl.c: Likewise.
123820         * lib/acl.h: Likewise.
123821         * lib/acl_entries.c: Likewise.
123822         * lib/areadlink-with-size.c: Likewise.
123823         * lib/areadlink.c: Likewise.
123824         * lib/areadlink.h: Likewise.
123825         * lib/argmatch.c: Likewise.
123826         * lib/argmatch.h: Likewise.
123827         * lib/argp-ba.c: Likewise.
123828         * lib/argp-eexst.c: Likewise.
123829         * lib/argp-fmtstream.c: Likewise.
123830         * lib/argp-fmtstream.h: Likewise.
123831         * lib/argp-fs-xinl.c: Likewise.
123832         * lib/argp-help.c: Likewise.
123833         * lib/argp-namefrob.h: Likewise.
123834         * lib/argp-parse.c: Likewise.
123835         * lib/argp-pin.c: Likewise.
123836         * lib/argp-pv.c: Likewise.
123837         * lib/argp-pvh.c: Likewise.
123838         * lib/argp-xinl.c: Likewise.
123839         * lib/argp.h: Likewise.
123840         * lib/at-func.c: Likewise.
123841         * lib/atanl.c: Likewise.
123842         * lib/backupfile.c: Likewise.
123843         * lib/backupfile.h: Likewise.
123844         * lib/basename.c: Likewise.
123845         * lib/binary-io.h: Likewise.
123846         * lib/byteswap.in.h: Likewise.
123847         * lib/c-stack.c: Likewise.
123848         * lib/c-stack.h: Likewise.
123849         * lib/c-strcasestr.c: Likewise.
123850         * lib/c-strcasestr.h: Likewise.
123851         * lib/c-strstr.c: Likewise.
123852         * lib/c-strstr.h: Likewise.
123853         * lib/c-strtod.c: Likewise.
123854         * lib/calloc.c: Likewise.
123855         * lib/canon-host.c: Likewise.
123856         * lib/canon-host.h: Likewise.
123857         * lib/canonicalize-lgpl.c: Likewise.
123858         * lib/canonicalize.c: Likewise.
123859         * lib/canonicalize.h: Likewise.
123860         * lib/ceil.c: Likewise.
123861         * lib/ceilf.c: Likewise.
123862         * lib/ceill.c: Likewise.
123863         * lib/chdir-long.c: Likewise.
123864         * lib/chdir-long.h: Likewise.
123865         * lib/chdir-safer.c: Likewise.
123866         * lib/chdir-safer.h: Likewise.
123867         * lib/chown.c: Likewise.
123868         * lib/classpath.c: Likewise.
123869         * lib/classpath.h: Likewise.
123870         * lib/clean-temp.c: Likewise.
123871         * lib/clean-temp.h: Likewise.
123872         * lib/cloexec.c: Likewise.
123873         * lib/close-stream.c: Likewise.
123874         * lib/closein.c: Likewise.
123875         * lib/closein.h: Likewise.
123876         * lib/closeout.c: Likewise.
123877         * lib/closeout.h: Likewise.
123878         * lib/concat-filename.c: Likewise.
123879         * lib/copy-file.c: Likewise.
123880         * lib/copy-file.h: Likewise.
123881         * lib/count-one-bits.h: Likewise.
123882         * lib/crc.c: Likewise.
123883         * lib/crc.h: Likewise.
123884         * lib/creat-safer.c: Likewise.
123885         * lib/csharpcomp.c: Likewise.
123886         * lib/csharpcomp.h: Likewise.
123887         * lib/csharpexec.c: Likewise.
123888         * lib/csharpexec.h: Likewise.
123889         * lib/cycle-check.c: Likewise.
123890         * lib/cycle-check.h: Likewise.
123891         * lib/diacrit.c: Likewise.
123892         * lib/diacrit.h: Likewise.
123893         * lib/diffseq.h: Likewise.
123894         * lib/dirchownmod.c: Likewise.
123895         * lib/dirent.in.h: Likewise.
123896         * lib/dirfd.c: Likewise.
123897         * lib/dirfd.h: Likewise.
123898         * lib/dirname.c: Likewise.
123899         * lib/dirname.h: Likewise.
123900         * lib/dummy.c: Likewise.
123901         * lib/dup-safer.c: Likewise.
123902         * lib/dup2.c: Likewise.
123903         * lib/eealloc.h: Likewise.
123904         * lib/error.c: Likewise.
123905         * lib/error.h: Likewise.
123906         * lib/euidaccess.c: Likewise.
123907         * lib/exclude.c: Likewise.
123908         * lib/exclude.h: Likewise.
123909         * lib/execute.c: Likewise.
123910         * lib/execute.h: Likewise.
123911         * lib/exitfail.c: Likewise.
123912         * lib/exitfail.h: Likewise.
123913         * lib/expl.c: Likewise.
123914         * lib/fatal-signal.c: Likewise.
123915         * lib/fatal-signal.h: Likewise.
123916         * lib/fbufmode.c: Likewise.
123917         * lib/fbufmode.h: Likewise.
123918         * lib/fchdir.c: Likewise.
123919         * lib/fchmodat.c: Likewise.
123920         * lib/fchownat.c: Likewise.
123921         * lib/fcntl--.h: Likewise.
123922         * lib/fcntl-safer.h: Likewise.
123923         * lib/fcntl.in.h: Likewise.
123924         * lib/fd-safer.c: Likewise.
123925         * lib/fflush.c: Likewise.
123926         * lib/file-has-acl.c: Likewise.
123927         * lib/file-set.c: Likewise.
123928         * lib/file-type.c: Likewise.
123929         * lib/file-type.h: Likewise.
123930         * lib/fileblocks.c: Likewise.
123931         * lib/filemode.c: Likewise.
123932         * lib/filemode.h: Likewise.
123933         * lib/filename.h: Likewise.
123934         * lib/filenamecat.c: Likewise.
123935         * lib/filenamecat.h: Likewise.
123936         * lib/findprog.c: Likewise.
123937         * lib/findprog.h: Likewise.
123938         * lib/float.in.h: Likewise.
123939         * lib/floor.c: Likewise.
123940         * lib/floorf.c: Likewise.
123941         * lib/floorl.c: Likewise.
123942         * lib/fopen-safer.c: Likewise.
123943         * lib/fopen.c: Likewise.
123944         * lib/fpending.c: Likewise.
123945         * lib/fpending.h: Likewise.
123946         * lib/fprintf.c: Likewise.
123947         * lib/fprintftime.h: Likewise.
123948         * lib/fpucw.h: Likewise.
123949         * lib/fpurge.c: Likewise.
123950         * lib/fpurge.h: Likewise.
123951         * lib/freadable.c: Likewise.
123952         * lib/freadable.h: Likewise.
123953         * lib/freadahead.c: Likewise.
123954         * lib/freadahead.h: Likewise.
123955         * lib/freading.c: Likewise.
123956         * lib/freading.h: Likewise.
123957         * lib/free.c: Likewise.
123958         * lib/freopen.c: Likewise.
123959         * lib/frexp.c: Likewise.
123960         * lib/frexpl.c: Likewise.
123961         * lib/fseek.c: Likewise.
123962         * lib/fseterr.c: Likewise.
123963         * lib/fseterr.h: Likewise.
123964         * lib/fstatat.c: Likewise.
123965         * lib/fstrcmp.c: Likewise.
123966         * lib/fstrcmp.h: Likewise.
123967         * lib/fsusage.c: Likewise.
123968         * lib/fsusage.h: Likewise.
123969         * lib/ftell.c: Likewise.
123970         * lib/ftello.c: Likewise.
123971         * lib/fts-cycle.c: Likewise.
123972         * lib/fts.c: Likewise.
123973         * lib/fts_.h: Likewise.
123974         * lib/full-read.c: Likewise.
123975         * lib/full-read.h: Likewise.
123976         * lib/full-write.c: Likewise.
123977         * lib/full-write.h: Likewise.
123978         * lib/fwritable.c: Likewise.
123979         * lib/fwritable.h: Likewise.
123980         * lib/fwriteerror.c: Likewise.
123981         * lib/fwriteerror.h: Likewise.
123982         * lib/fwriting.c: Likewise.
123983         * lib/fwriting.h: Likewise.
123984         * lib/gcd.c: Likewise.
123985         * lib/gcd.h: Likewise.
123986         * lib/getcwd.c: Likewise.
123987         * lib/getdate.h: Likewise.
123988         * lib/getdate.y: Likewise.
123989         * lib/getdomainname.c: Likewise.
123990         * lib/getdomainname.h: Likewise.
123991         * lib/getgroups.c: Likewise.
123992         * lib/gethostname.c: Likewise.
123993         * lib/gethrxtime.c: Likewise.
123994         * lib/gethrxtime.h: Likewise.
123995         * lib/getloadavg.c: Likewise.
123996         * lib/getndelim2.c: Likewise.
123997         * lib/getndelim2.h: Likewise.
123998         * lib/getnline.c: Likewise.
123999         * lib/getnline.h: Likewise.
124000         * lib/getopt.c: Likewise.
124001         * lib/getopt.in.h: Likewise.
124002         * lib/getopt1.c: Likewise.
124003         * lib/getopt_int.h: Likewise.
124004         * lib/getpagesize.h: Likewise.
124005         * lib/getsubopt.c: Likewise.
124006         * lib/gettime.c: Likewise.
124007         * lib/getugroups.c: Likewise.
124008         * lib/getugroups.h: Likewise.
124009         * lib/getusershell.c: Likewise.
124010         * lib/gl_anyavltree_list1.h: Likewise.
124011         * lib/gl_anyavltree_list2.h: Likewise.
124012         * lib/gl_anyhash_list1.h: Likewise.
124013         * lib/gl_anyhash_list2.h: Likewise.
124014         * lib/gl_anylinked_list1.h: Likewise.
124015         * lib/gl_anylinked_list2.h: Likewise.
124016         * lib/gl_anyrbtree_list1.h: Likewise.
124017         * lib/gl_anyrbtree_list2.h: Likewise.
124018         * lib/gl_anytree_list1.h: Likewise.
124019         * lib/gl_anytree_list2.h: Likewise.
124020         * lib/gl_anytree_oset.h: Likewise.
124021         * lib/gl_anytreehash_list1.h: Likewise.
124022         * lib/gl_anytreehash_list2.h: Likewise.
124023         * lib/gl_array_list.c: Likewise.
124024         * lib/gl_array_list.h: Likewise.
124025         * lib/gl_array_oset.c: Likewise.
124026         * lib/gl_array_oset.h: Likewise.
124027         * lib/gl_avltree_list.c: Likewise.
124028         * lib/gl_avltree_list.h: Likewise.
124029         * lib/gl_avltree_oset.c: Likewise.
124030         * lib/gl_avltree_oset.h: Likewise.
124031         * lib/gl_avltreehash_list.c: Likewise.
124032         * lib/gl_avltreehash_list.h: Likewise.
124033         * lib/gl_carray_list.c: Likewise.
124034         * lib/gl_carray_list.h: Likewise.
124035         * lib/gl_linked_list.c: Likewise.
124036         * lib/gl_linked_list.h: Likewise.
124037         * lib/gl_linkedhash_list.c: Likewise.
124038         * lib/gl_linkedhash_list.h: Likewise.
124039         * lib/gl_list.c: Likewise.
124040         * lib/gl_list.h: Likewise.
124041         * lib/gl_oset.c: Likewise.
124042         * lib/gl_oset.h: Likewise.
124043         * lib/gl_rbtree_list.c: Likewise.
124044         * lib/gl_rbtree_list.h: Likewise.
124045         * lib/gl_rbtree_oset.c: Likewise.
124046         * lib/gl_rbtree_oset.h: Likewise.
124047         * lib/gl_rbtreehash_list.c: Likewise.
124048         * lib/gl_rbtreehash_list.h: Likewise.
124049         * lib/gl_sublist.c: Likewise.
124050         * lib/gl_sublist.h: Likewise.
124051         * lib/group-member.c: Likewise.
124052         * lib/group-member.h: Likewise.
124053         * lib/hard-locale.c: Likewise.
124054         * lib/hard-locale.h: Likewise.
124055         * lib/hash-pjw.c: Likewise.
124056         * lib/hash-pjw.h: Likewise.
124057         * lib/hash-triple.c: Likewise.
124058         * lib/hash.c: Likewise.
124059         * lib/hash.h: Likewise.
124060         * lib/human.c: Likewise.
124061         * lib/human.h: Likewise.
124062         * lib/i-ring.c: Likewise.
124063         * lib/i-ring.h: Likewise.
124064         * lib/idcache.c: Likewise.
124065         * lib/imaxabs.c: Likewise.
124066         * lib/imaxdiv.c: Likewise.
124067         * lib/inet_pton.c: Likewise.
124068         * lib/inet_pton.h: Likewise.
124069         * lib/intprops.h: Likewise.
124070         * lib/inttostr.c: Likewise.
124071         * lib/inttostr.h: Likewise.
124072         * lib/inttypes.in.h: Likewise.
124073         * lib/isapipe.c: Likewise.
124074         * lib/isdir.c: Likewise.
124075         * lib/isnan.c: Likewise.
124076         * lib/isnan.h: Likewise.
124077         * lib/isnanf.c: Likewise.
124078         * lib/isnanf.h: Likewise.
124079         * lib/isnanl-nolibm.h: Likewise.
124080         * lib/isnanl.c: Likewise.
124081         * lib/isnanl.h: Likewise.
124082         * lib/javacomp.c: Likewise.
124083         * lib/javacomp.h: Likewise.
124084         * lib/javaexec.c: Likewise.
124085         * lib/javaexec.h: Likewise.
124086         * lib/javaversion.c: Likewise.
124087         * lib/javaversion.h: Likewise.
124088         * lib/javaversion.java: Likewise.
124089         * lib/lbrkprop.h: Likewise.
124090         * lib/lchmod.h: Likewise.
124091         * lib/lchown.c: Likewise.
124092         * lib/ldexpl.c: Likewise.
124093         * lib/linebreak.c: Likewise.
124094         * lib/linebreak.h: Likewise.
124095         * lib/linebuffer.c: Likewise.
124096         * lib/linebuffer.h: Likewise.
124097         * lib/locale.in.h: Likewise.
124098         * lib/logl.c: Likewise.
124099         * lib/long-options.c: Likewise.
124100         * lib/long-options.h: Likewise.
124101         * lib/lstat.c: Likewise.
124102         * lib/lstat.h: Likewise.
124103         * lib/math.in.h: Likewise.
124104         * lib/mbchar.c: Likewise.
124105         * lib/mbchar.h: Likewise.
124106         * lib/mbfile.h: Likewise.
124107         * lib/mbiter.h: Likewise.
124108         * lib/mbscasecmp.c: Likewise.
124109         * lib/mbscasestr.c: Likewise.
124110         * lib/mbschr.c: Likewise.
124111         * lib/mbscspn.c: Likewise.
124112         * lib/mbslen.c: Likewise.
124113         * lib/mbsncasecmp.c: Likewise.
124114         * lib/mbsnlen.c: Likewise.
124115         * lib/mbspbrk.c: Likewise.
124116         * lib/mbspcasecmp.c: Likewise.
124117         * lib/mbsrchr.c: Likewise.
124118         * lib/mbssep.c: Likewise.
124119         * lib/mbsspn.c: Likewise.
124120         * lib/mbsstr.c: Likewise.
124121         * lib/mbstok_r.c: Likewise.
124122         * lib/mbswidth.c: Likewise.
124123         * lib/mbswidth.h: Likewise.
124124         * lib/mbuiter.h: Likewise.
124125         * lib/memcasecmp.c: Likewise.
124126         * lib/memcasecmp.h: Likewise.
124127         * lib/memchr.c: Likewise.
124128         * lib/memcmp.c: Likewise.
124129         * lib/memcoll.c: Likewise.
124130         * lib/memcoll.h: Likewise.
124131         * lib/memcpy.c: Likewise.
124132         * lib/memrchr.c: Likewise.
124133         * lib/mkancesdirs.c: Likewise.
124134         * lib/mkdir-p.c: Likewise.
124135         * lib/mkdir-p.h: Likewise.
124136         * lib/mkdir.c: Likewise.
124137         * lib/mkdirat.c: Likewise.
124138         * lib/mkdtemp.c: Likewise.
124139         * lib/mkstemp-safer.c: Likewise.
124140         * lib/mkstemp.c: Likewise.
124141         * lib/modechange.c: Likewise.
124142         * lib/modechange.h: Likewise.
124143         * lib/mountlist.c: Likewise.
124144         * lib/mountlist.h: Likewise.
124145         * lib/mpsort.c: Likewise.
124146         * lib/nanosleep.c: Likewise.
124147         * lib/obstack.c: Likewise.
124148         * lib/obstack.h: Likewise.
124149         * lib/open-safer.c: Likewise.
124150         * lib/open.c: Likewise.
124151         * lib/openat-die.c: Likewise.
124152         * lib/openat-priv.h: Likewise.
124153         * lib/openat-proc.c: Likewise.
124154         * lib/openat.c: Likewise.
124155         * lib/openat.h: Likewise.
124156         * lib/pagealign_alloc.c: Likewise.
124157         * lib/pagealign_alloc.h: Likewise.
124158         * lib/physmem.c: Likewise.
124159         * lib/physmem.h: Likewise.
124160         * lib/pipe-safer.c: Likewise.
124161         * lib/pipe.c: Likewise.
124162         * lib/pipe.h: Likewise.
124163         * lib/posixtm.c: Likewise.
124164         * lib/posixtm.h: Likewise.
124165         * lib/posixver.c: Likewise.
124166         * lib/printf-frexp.c: Likewise.
124167         * lib/printf-frexp.h: Likewise.
124168         * lib/printf-frexpl.c: Likewise.
124169         * lib/printf-frexpl.h: Likewise.
124170         * lib/printf.c: Likewise.
124171         * lib/progname.c: Likewise.
124172         * lib/progname.h: Likewise.
124173         * lib/progreloc.c: Likewise.
124174         * lib/putenv.c: Likewise.
124175         * lib/quote.c: Likewise.
124176         * lib/quote.h: Likewise.
124177         * lib/quotearg.c: Likewise.
124178         * lib/quotearg.h: Likewise.
124179         * lib/raise.c: Likewise.
124180         * lib/readline.c: Likewise.
124181         * lib/readline.h: Likewise.
124182         * lib/readlink.c: Likewise.
124183         * lib/readtokens.c: Likewise.
124184         * lib/readtokens.h: Likewise.
124185         * lib/readtokens0.c: Likewise.
124186         * lib/readtokens0.h: Likewise.
124187         * lib/readutmp.c: Likewise.
124188         * lib/readutmp.h: Likewise.
124189         * lib/realloc.c: Likewise.
124190         * lib/relocwrapper.c: Likewise.
124191         * lib/rename-dest-slash.c: Likewise.
124192         * lib/rename.c: Likewise.
124193         * lib/rmdir.c: Likewise.
124194         * lib/rpmatch.c: Likewise.
124195         * lib/safe-read.c: Likewise.
124196         * lib/safe-read.h: Likewise.
124197         * lib/safe-write.c: Likewise.
124198         * lib/safe-write.h: Likewise.
124199         * lib/same-inode.h: Likewise.
124200         * lib/same.c: Likewise.
124201         * lib/same.h: Likewise.
124202         * lib/save-cwd.c: Likewise.
124203         * lib/save-cwd.h: Likewise.
124204         * lib/savedir.c: Likewise.
124205         * lib/savedir.h: Likewise.
124206         * lib/savewd.c: Likewise.
124207         * lib/savewd.h: Likewise.
124208         * lib/search.in.h: Likewise.
124209         * lib/setenv.c: Likewise.
124210         * lib/setenv.h: Likewise.
124211         * lib/settime.c: Likewise.
124212         * lib/sh-quote.c: Likewise.
124213         * lib/sh-quote.h: Likewise.
124214         * lib/sig2str.c: Likewise.
124215         * lib/sig2str.h: Likewise.
124216         * lib/signal.in.h: Likewise.
124217         * lib/signbitd.c: Likewise.
124218         * lib/signbitf.c: Likewise.
124219         * lib/signbitl.c: Likewise.
124220         * lib/sigprocmask.c: Likewise.
124221         * lib/sincosl.c: Likewise.
124222         * lib/sleep.c: Likewise.
124223         * lib/sprintf.c: Likewise.
124224         * lib/sqrtl.c: Likewise.
124225         * lib/stat-time.h: Likewise.
124226         * lib/stdio--.h: Likewise.
124227         * lib/stdio-safer.h: Likewise.
124228         * lib/stdlib--.h: Likewise.
124229         * lib/stdlib-safer.h: Likewise.
124230         * lib/stdlib.in.h: Likewise.
124231         * lib/stpcpy.c: Likewise.
124232         * lib/stpncpy.c: Likewise.
124233         * lib/strchrnul.c: Likewise.
124234         * lib/strcspn.c: Likewise.
124235         * lib/strerror.c: Likewise.
124236         * lib/strftime.c: Likewise.
124237         * lib/strftime.h: Likewise.
124238         * lib/striconveh.c: Likewise.
124239         * lib/striconveh.h: Likewise.
124240         * lib/striconveha.c: Likewise.
124241         * lib/striconveha.h: Likewise.
124242         * lib/stripslash.c: Likewise.
124243         * lib/strnlen1.c: Likewise.
124244         * lib/strnlen1.h: Likewise.
124245         * lib/strtod.c: Likewise.
124246         * lib/strtoimax.c: Likewise.
124247         * lib/strtok_r.c: Likewise.
124248         * lib/strtol.c: Likewise.
124249         * lib/strtoll.c: Likewise.
124250         * lib/strtoul.c: Likewise.
124251         * lib/strtoull.c: Likewise.
124252         * lib/sysexits.in.h: Likewise.
124253         * lib/tempname.c: Likewise.
124254         * lib/tempname.h: Likewise.
124255         * lib/timespec.h: Likewise.
124256         * lib/tls.c: Likewise.
124257         * lib/tls.h: Likewise.
124258         * lib/tmpdir.c: Likewise.
124259         * lib/tmpdir.h: Likewise.
124260         * lib/tmpfile-safer.c: Likewise.
124261         * lib/tmpfile.c: Likewise.
124262         * lib/trigl.c: Likewise.
124263         * lib/trigl.h: Likewise.
124264         * lib/trim.c: Likewise.
124265         * lib/trim.h: Likewise.
124266         * lib/trunc.c: Likewise.
124267         * lib/truncf.c: Likewise.
124268         * lib/truncl.c: Likewise.
124269         * lib/tsearch.c: Likewise.
124270         * lib/unicodeio.c: Likewise.
124271         * lib/unicodeio.h: Likewise.
124272         * lib/unistd--.h: Likewise.
124273         * lib/unistd-safer.h: Likewise.
124274         * lib/unistdio/ulc-fprintf.c: Likewise.
124275         * lib/unistdio/ulc-vfprintf.c: Likewise.
124276         * lib/unlinkdir.c: Likewise.
124277         * lib/unlinkdir.h: Likewise.
124278         * lib/unlocked-io.h: Likewise.
124279         * lib/unsetenv.c: Likewise.
124280         * lib/userspec.c: Likewise.
124281         * lib/utime.c: Likewise.
124282         * lib/utimecmp.c: Likewise.
124283         * lib/utimecmp.h: Likewise.
124284         * lib/utimens.c: Likewise.
124285         * lib/verify.h: Likewise.
124286         * lib/verror.c: Likewise.
124287         * lib/verror.h: Likewise.
124288         * lib/version-etc-fsf.c: Likewise.
124289         * lib/version-etc.c: Likewise.
124290         * lib/version-etc.h: Likewise.
124291         * lib/vfprintf.c: Likewise.
124292         * lib/vprintf.c: Likewise.
124293         * lib/vsprintf.c: Likewise.
124294         * lib/w32spawn.h: Likewise.
124295         * lib/wait-process.c: Likewise.
124296         * lib/wait-process.h: Likewise.
124297         * lib/wcwidth.c: Likewise.
124298         * lib/write-any-file.c: Likewise.
124299         * lib/xalloc-die.c: Likewise.
124300         * lib/xalloc.h: Likewise.
124301         * lib/xasprintf.c: Likewise.
124302         * lib/xgetcwd.c: Likewise.
124303         * lib/xgetcwd.h: Likewise.
124304         * lib/xgetdomainname.c: Likewise.
124305         * lib/xgetdomainname.h: Likewise.
124306         * lib/xgethostname.c: Likewise.
124307         * lib/xmalloc.c: Likewise.
124308         * lib/xmalloca.c: Likewise.
124309         * lib/xmalloca.h: Likewise.
124310         * lib/xmemcoll.c: Likewise.
124311         * lib/xnanosleep.c: Likewise.
124312         * lib/xreadlink.c: Likewise.
124313         * lib/xreadlink.h: Likewise.
124314         * lib/xsetenv.c: Likewise.
124315         * lib/xsetenv.h: Likewise.
124316         * lib/xstriconv.c: Likewise.
124317         * lib/xstriconv.h: Likewise.
124318         * lib/xstrndup.c: Likewise.
124319         * lib/xstrndup.h: Likewise.
124320         * lib/xstrtod.c: Likewise.
124321         * lib/xstrtod.h: Likewise.
124322         * lib/xstrtol-error.c: Likewise.
124323         * lib/xstrtol.c: Likewise.
124324         * lib/xstrtol.h: Likewise.
124325         * lib/xtime.h: Likewise.
124326         * lib/xvasprintf.c: Likewise.
124327         * lib/xvasprintf.h: Likewise.
124328         * lib/yesno.c: Likewise.
124329         * lib/yesno.h: Likewise.
124330         * posix-modules: Likewise.
124331         * tests/test-alloca-opt.c: Likewise.
124332         * tests/test-arcfour.c: Likewise.
124333         * tests/test-arctwo.c: Likewise.
124334         * tests/test-argmatch.c: Likewise.
124335         * tests/test-argp-2.sh: Likewise.
124336         * tests/test-argp.c: Likewise.
124337         * tests/test-arpa_inet.c: Likewise.
124338         * tests/test-array_list.c: Likewise.
124339         * tests/test-array_oset.c: Likewise.
124340         * tests/test-atexit.c: Likewise.
124341         * tests/test-avltree_list.c: Likewise.
124342         * tests/test-avltree_oset.c: Likewise.
124343         * tests/test-avltreehash_list.c: Likewise.
124344         * tests/test-base64.c: Likewise.
124345         * tests/test-binary-io.c: Likewise.
124346         * tests/test-byteswap.c: Likewise.
124347         * tests/test-c-ctype.c: Likewise.
124348         * tests/test-c-strcasecmp.c: Likewise.
124349         * tests/test-c-strcasestr.c: Likewise.
124350         * tests/test-c-strncasecmp.c: Likewise.
124351         * tests/test-c-strstr.c: Likewise.
124352         * tests/test-canonicalize-lgpl.c: Likewise.
124353         * tests/test-canonicalize.c: Likewise.
124354         * tests/test-carray_list.c: Likewise.
124355         * tests/test-ceilf.c: Likewise.
124356         * tests/test-ceill.c: Likewise.
124357         * tests/test-count-one-bits.c: Likewise.
124358         * tests/test-crc.c: Likewise.
124359         * tests/test-dirname.c: Likewise.
124360         * tests/test-fbufmode.c: Likewise.
124361         * tests/test-fcntl.c: Likewise.
124362         * tests/test-fflush.c: Likewise.
124363         * tests/test-floorf.c: Likewise.
124364         * tests/test-floorl.c: Likewise.
124365         * tests/test-fopen.c: Likewise.
124366         * tests/test-fprintf-posix.c: Likewise.
124367         * tests/test-fprintf-posix.h: Likewise.
124368         * tests/test-fpurge.c: Likewise.
124369         * tests/test-freadable.c: Likewise.
124370         * tests/test-freadahead.c: Likewise.
124371         * tests/test-freading.c: Likewise.
124372         * tests/test-freopen.c: Likewise.
124373         * tests/test-frexp.c: Likewise.
124374         * tests/test-frexpl.c: Likewise.
124375         * tests/test-fseek.c: Likewise.
124376         * tests/test-fseeko.c: Likewise.
124377         * tests/test-fseterr.c: Likewise.
124378         * tests/test-fstrcmp.c: Likewise.
124379         * tests/test-ftell.c: Likewise.
124380         * tests/test-ftello.c: Likewise.
124381         * tests/test-fwritable.c: Likewise.
124382         * tests/test-fwriting.c: Likewise.
124383         * tests/test-getaddrinfo.c: Likewise.
124384         * tests/test-getpass.c: Likewise.
124385         * tests/test-gettimeofday.c: Likewise.
124386         * tests/test-hmac-md5.c: Likewise.
124387         * tests/test-hmac-sha1.c: Likewise.
124388         * tests/test-iconv.c: Likewise.
124389         * tests/test-iconvme.c: Likewise.
124390         * tests/test-inttypes.c: Likewise.
124391         * tests/test-isnan.c: Likewise.
124392         * tests/test-isnanf.c: Likewise.
124393         * tests/test-isnanl-nolibm.c: Likewise.
124394         * tests/test-isnanl.c: Likewise.
124395         * tests/test-isnanl.h: Likewise.
124396         * tests/test-ldexpl.c: Likewise.
124397         * tests/test-linked_list.c: Likewise.
124398         * tests/test-linkedhash_list.c: Likewise.
124399         * tests/test-locale.c: Likewise.
124400         * tests/test-localename.c: Likewise.
124401         * tests/test-lock.c: Likewise.
124402         * tests/test-lseek.c: Likewise.
124403         * tests/test-malloca.c: Likewise.
124404         * tests/test-math.c: Likewise.
124405         * tests/test-mbscasecmp.c: Likewise.
124406         * tests/test-mbscasestr1.c: Likewise.
124407         * tests/test-mbscasestr2.c: Likewise.
124408         * tests/test-mbscasestr3.c: Likewise.
124409         * tests/test-mbscasestr4.c: Likewise.
124410         * tests/test-mbschr.c: Likewise.
124411         * tests/test-mbscspn.c: Likewise.
124412         * tests/test-mbsncasecmp.c: Likewise.
124413         * tests/test-mbspbrk.c: Likewise.
124414         * tests/test-mbspcasecmp.c: Likewise.
124415         * tests/test-mbsrchr.c: Likewise.
124416         * tests/test-mbsspn.c: Likewise.
124417         * tests/test-mbsstr1.c: Likewise.
124418         * tests/test-mbsstr2.c: Likewise.
124419         * tests/test-mbsstr3.c: Likewise.
124420         * tests/test-md5.c: Likewise.
124421         * tests/test-memmem.c: Likewise.
124422         * tests/test-netinet_in.c: Likewise.
124423         * tests/test-open.c: Likewise.
124424         * tests/test-printf-frexp.c: Likewise.
124425         * tests/test-printf-frexpl.c: Likewise.
124426         * tests/test-printf-posix.c: Likewise.
124427         * tests/test-printf-posix.h: Likewise.
124428         * tests/test-rbtree_list.c: Likewise.
124429         * tests/test-rbtree_oset.c: Likewise.
124430         * tests/test-rbtreehash_list.c: Likewise.
124431         * tests/test-read-file.c: Likewise.
124432         * tests/test-rijndael.c: Likewise.
124433         * tests/test-search.c: Likewise.
124434         * tests/test-signbit.c: Likewise.
124435         * tests/test-sleep.c: Likewise.
124436         * tests/test-snprintf-posix.c: Likewise.
124437         * tests/test-snprintf-posix.h: Likewise.
124438         * tests/test-snprintf.c: Likewise.
124439         * tests/test-sprintf-posix.c: Likewise.
124440         * tests/test-sprintf-posix.h: Likewise.
124441         * tests/test-stat-time.c: Likewise.
124442         * tests/test-stdbool.c: Likewise.
124443         * tests/test-stdint.c: Likewise.
124444         * tests/test-stdio.c: Likewise.
124445         * tests/test-stdlib.c: Likewise.
124446         * tests/test-stpncpy.c: Likewise.
124447         * tests/test-strcasestr.c: Likewise.
124448         * tests/test-striconv.c: Likewise.
124449         * tests/test-striconveh.c: Likewise.
124450         * tests/test-striconveha.c: Likewise.
124451         * tests/test-string.c: Likewise.
124452         * tests/test-sys_select.c: Likewise.
124453         * tests/test-sys_socket.c: Likewise.
124454         * tests/test-sys_stat.c: Likewise.
124455         * tests/test-sys_time.c: Likewise.
124456         * tests/test-sysexits.c: Likewise.
124457         * tests/test-time.c: Likewise.
124458         * tests/test-tls.c: Likewise.
124459         * tests/test-trunc.c: Likewise.
124460         * tests/test-truncf.c: Likewise.
124461         * tests/test-truncl.c: Likewise.
124462         * tests/test-unistd.c: Likewise.
124463         * tests/test-vasnprintf-posix.c: Likewise.
124464         * tests/test-vasnprintf-posix2.c: Likewise.
124465         * tests/test-vasnprintf.c: Likewise.
124466         * tests/test-vasprintf-posix.c: Likewise.
124467         * tests/test-vasprintf.c: Likewise.
124468         * tests/test-verify.c: Likewise.
124469         * tests/test-vfprintf-posix.c: Likewise.
124470         * tests/test-vprintf-posix.c: Likewise.
124471         * tests/test-vsnprintf-posix.c: Likewise.
124472         * tests/test-vsnprintf.c: Likewise.
124473         * tests/test-vsprintf-posix.c: Likewise.
124474         * tests/test-wchar.c: Likewise.
124475         * tests/test-wctype.c: Likewise.
124476         * tests/test-wcwidth.c: Likewise.
124477         * tests/test-xstrtol.c: Likewise.
124478         * tests/test-xvasprintf.c: Likewise.
124479         * tests/uniconv/test-u16-conv-from-enc.c: Likewise.
124480         * tests/uniconv/test-u16-conv-to-enc.c: Likewise.
124481         * tests/uniconv/test-u16-strconv-from-enc.c: Likewise.
124482         * tests/uniconv/test-u16-strconv-to-enc.c: Likewise.
124483         * tests/uniconv/test-u32-conv-from-enc.c: Likewise.
124484         * tests/uniconv/test-u32-conv-to-enc.c: Likewise.
124485         * tests/uniconv/test-u32-strconv-from-enc.c: Likewise.
124486         * tests/uniconv/test-u32-strconv-to-enc.c: Likewise.
124487         * tests/uniconv/test-u8-conv-from-enc.c: Likewise.
124488         * tests/uniconv/test-u8-conv-to-enc.c: Likewise.
124489         * tests/uniconv/test-u8-strconv-from-enc.c: Likewise.
124490         * tests/uniconv/test-u8-strconv-to-enc.c: Likewise.
124491         * tests/uniname/test-uninames.c: Likewise.
124492         * tests/unistdio/test-u16-asnprintf1.c: Likewise.
124493         * tests/unistdio/test-u16-asnprintf1.h: Likewise.
124494         * tests/unistdio/test-u16-printf1.h: Likewise.
124495         * tests/unistdio/test-u16-vasnprintf1.c: Likewise.
124496         * tests/unistdio/test-u16-vasnprintf2.c: Likewise.
124497         * tests/unistdio/test-u16-vasnprintf3.c: Likewise.
124498         * tests/unistdio/test-u16-vasprintf1.c: Likewise.
124499         * tests/unistdio/test-u16-vsnprintf1.c: Likewise.
124500         * tests/unistdio/test-u16-vsprintf1.c: Likewise.
124501         * tests/unistdio/test-u32-asnprintf1.c: Likewise.
124502         * tests/unistdio/test-u32-asnprintf1.h: Likewise.
124503         * tests/unistdio/test-u32-printf1.h: Likewise.
124504         * tests/unistdio/test-u32-vasnprintf1.c: Likewise.
124505         * tests/unistdio/test-u32-vasnprintf2.c: Likewise.
124506         * tests/unistdio/test-u32-vasnprintf3.c: Likewise.
124507         * tests/unistdio/test-u32-vasprintf1.c: Likewise.
124508         * tests/unistdio/test-u32-vsnprintf1.c: Likewise.
124509         * tests/unistdio/test-u32-vsprintf1.c: Likewise.
124510         * tests/unistdio/test-u8-asnprintf1.c: Likewise.
124511         * tests/unistdio/test-u8-asnprintf1.h: Likewise.
124512         * tests/unistdio/test-u8-printf1.h: Likewise.
124513         * tests/unistdio/test-u8-vasnprintf1.c: Likewise.
124514         * tests/unistdio/test-u8-vasnprintf2.c: Likewise.
124515         * tests/unistdio/test-u8-vasnprintf3.c: Likewise.
124516         * tests/unistdio/test-u8-vasprintf1.c: Likewise.
124517         * tests/unistdio/test-u8-vsnprintf1.c: Likewise.
124518         * tests/unistdio/test-u8-vsprintf1.c: Likewise.
124519         * tests/unistdio/test-ulc-asnprintf1.c: Likewise.
124520         * tests/unistdio/test-ulc-asnprintf1.h: Likewise.
124521         * tests/unistdio/test-ulc-printf1.h: Likewise.
124522         * tests/unistdio/test-ulc-vasnprintf1.c: Likewise.
124523         * tests/unistdio/test-ulc-vasnprintf2.c: Likewise.
124524         * tests/unistdio/test-ulc-vasnprintf3.c: Likewise.
124525         * tests/unistdio/test-ulc-vasprintf1.c: Likewise.
124526         * tests/unistdio/test-ulc-vsnprintf1.c: Likewise.
124527         * tests/unistdio/test-ulc-vsprintf1.c: Likewise.
124528         * tests/uniwidth/test-u16-strwidth.c: Likewise.
124529         * tests/uniwidth/test-u16-width.c: Likewise.
124530         * tests/uniwidth/test-u32-strwidth.c: Likewise.
124531         * tests/uniwidth/test-u32-width.c: Likewise.
124532         * tests/uniwidth/test-u8-strwidth.c: Likewise.
124533         * tests/uniwidth/test-u8-width.c: Likewise.
124534         * tests/uniwidth/test-uc_width.c: Likewise.
124535         * config/srclist-update: Likewise.
124536         (fixlicense): Update to GPLv3+.
124538         Change copyright notice from LGPLv2.1+ to LGPLv3+.
124539         * tests/test-tsearch.c: Change copyright notice.
124541         Change copyright notice from LGPLv2.0+ to LGPLv3+.
124542         * lib/c-strcaseeq.h: Change copyright notice.
124543         * lib/streq.h: Likewise.
124544         * lib/uniconv.h: Likewise.
124545         * lib/uniconv/u-conv-from-enc.h: Likewise.
124546         * lib/uniconv/u-conv-to-enc.h: Likewise.
124547         * lib/uniconv/u-strconv-from-enc.h: Likewise.
124548         * lib/uniconv/u-strconv-to-enc.h: Likewise.
124549         * lib/uniconv/u16-conv-from-enc.c: Likewise.
124550         * lib/uniconv/u16-conv-to-enc.c: Likewise.
124551         * lib/uniconv/u16-strconv-from-enc.c: Likewise.
124552         * lib/uniconv/u16-strconv-from-locale.c: Likewise.
124553         * lib/uniconv/u16-strconv-to-enc.c: Likewise.
124554         * lib/uniconv/u16-strconv-to-locale.c: Likewise.
124555         * lib/uniconv/u32-conv-from-enc.c: Likewise.
124556         * lib/uniconv/u32-conv-to-enc.c: Likewise.
124557         * lib/uniconv/u32-strconv-from-enc.c: Likewise.
124558         * lib/uniconv/u32-strconv-from-locale.c: Likewise.
124559         * lib/uniconv/u32-strconv-to-enc.c: Likewise.
124560         * lib/uniconv/u32-strconv-to-locale.c: Likewise.
124561         * lib/uniconv/u8-conv-from-enc.c: Likewise.
124562         * lib/uniconv/u8-conv-to-enc.c: Likewise.
124563         * lib/uniconv/u8-strconv-from-enc.c: Likewise.
124564         * lib/uniconv/u8-strconv-from-locale.c: Likewise.
124565         * lib/uniconv/u8-strconv-to-enc.c: Likewise.
124566         * lib/uniconv/u8-strconv-to-locale.c: Likewise.
124567         * lib/uniname.h: Likewise.
124568         * lib/uniname/uniname.c: Likewise.
124569         * lib/unistdio.h: Likewise.
124570         * lib/unistdio/u-asnprintf.h: Likewise.
124571         * lib/unistdio/u-asprintf.h: Likewise.
124572         * lib/unistdio/u-printf-args.c: Likewise.
124573         * lib/unistdio/u-printf-args.h: Likewise.
124574         * lib/unistdio/u-printf-parse.h: Likewise.
124575         * lib/unistdio/u-snprintf.h: Likewise.
124576         * lib/unistdio/u-sprintf.h: Likewise.
124577         * lib/unistdio/u-vasprintf.h: Likewise.
124578         * lib/unistdio/u-vsnprintf.h: Likewise.
124579         * lib/unistdio/u-vsprintf.h: Likewise.
124580         * lib/unistdio/u16-asnprintf.c: Likewise.
124581         * lib/unistdio/u16-asprintf.c: Likewise.
124582         * lib/unistdio/u16-printf-parse.c: Likewise.
124583         * lib/unistdio/u16-snprintf.c: Likewise.
124584         * lib/unistdio/u16-sprintf.c: Likewise.
124585         * lib/unistdio/u16-u16-asnprintf.c: Likewise.
124586         * lib/unistdio/u16-u16-asprintf.c: Likewise.
124587         * lib/unistdio/u16-u16-snprintf.c: Likewise.
124588         * lib/unistdio/u16-u16-sprintf.c: Likewise.
124589         * lib/unistdio/u16-u16-vasnprintf.c: Likewise.
124590         * lib/unistdio/u16-u16-vasprintf.c: Likewise.
124591         * lib/unistdio/u16-u16-vsnprintf.c: Likewise.
124592         * lib/unistdio/u16-u16-vsprintf.c: Likewise.
124593         * lib/unistdio/u16-vasnprintf.c: Likewise.
124594         * lib/unistdio/u16-vasprintf.c: Likewise.
124595         * lib/unistdio/u16-vsnprintf.c: Likewise.
124596         * lib/unistdio/u16-vsprintf.c: Likewise.
124597         * lib/unistdio/u32-asnprintf.c: Likewise.
124598         * lib/unistdio/u32-asprintf.c: Likewise.
124599         * lib/unistdio/u32-printf-parse.c: Likewise.
124600         * lib/unistdio/u32-snprintf.c: Likewise.
124601         * lib/unistdio/u32-sprintf.c: Likewise.
124602         * lib/unistdio/u32-u32-asnprintf.c: Likewise.
124603         * lib/unistdio/u32-u32-asprintf.c: Likewise.
124604         * lib/unistdio/u32-u32-snprintf.c: Likewise.
124605         * lib/unistdio/u32-u32-sprintf.c: Likewise.
124606         * lib/unistdio/u32-u32-vasnprintf.c: Likewise.
124607         * lib/unistdio/u32-u32-vasprintf.c: Likewise.
124608         * lib/unistdio/u32-u32-vsnprintf.c: Likewise.
124609         * lib/unistdio/u32-u32-vsprintf.c: Likewise.
124610         * lib/unistdio/u32-vasnprintf.c: Likewise.
124611         * lib/unistdio/u32-vasprintf.c: Likewise.
124612         * lib/unistdio/u32-vsnprintf.c: Likewise.
124613         * lib/unistdio/u32-vsprintf.c: Likewise.
124614         * lib/unistdio/u8-asnprintf.c: Likewise.
124615         * lib/unistdio/u8-asprintf.c: Likewise.
124616         * lib/unistdio/u8-printf-parse.c: Likewise.
124617         * lib/unistdio/u8-snprintf.c: Likewise.
124618         * lib/unistdio/u8-sprintf.c: Likewise.
124619         * lib/unistdio/u8-u8-asnprintf.c: Likewise.
124620         * lib/unistdio/u8-u8-asprintf.c: Likewise.
124621         * lib/unistdio/u8-u8-snprintf.c: Likewise.
124622         * lib/unistdio/u8-u8-sprintf.c: Likewise.
124623         * lib/unistdio/u8-u8-vasnprintf.c: Likewise.
124624         * lib/unistdio/u8-u8-vasprintf.c: Likewise.
124625         * lib/unistdio/u8-u8-vsnprintf.c: Likewise.
124626         * lib/unistdio/u8-u8-vsprintf.c: Likewise.
124627         * lib/unistdio/u8-vasnprintf.c: Likewise.
124628         * lib/unistdio/u8-vasprintf.c: Likewise.
124629         * lib/unistdio/u8-vsnprintf.c: Likewise.
124630         * lib/unistdio/u8-vsprintf.c: Likewise.
124631         * lib/unistdio/ulc-asnprintf.c: Likewise.
124632         * lib/unistdio/ulc-asprintf.c: Likewise.
124633         * lib/unistdio/ulc-printf-parse.c: Likewise.
124634         * lib/unistdio/ulc-snprintf.c: Likewise.
124635         * lib/unistdio/ulc-sprintf.c: Likewise.
124636         * lib/unistdio/ulc-vasnprintf.c: Likewise.
124637         * lib/unistdio/ulc-vasprintf.c: Likewise.
124638         * lib/unistdio/ulc-vsnprintf.c: Likewise.
124639         * lib/unistdio/ulc-vsprintf.c: Likewise.
124640         * lib/unistr.h: Likewise.
124641         * lib/unistr/u-cpy-alloc.h: Likewise.
124642         * lib/unistr/u-cpy.h: Likewise.
124643         * lib/unistr/u-endswith.h: Likewise.
124644         * lib/unistr/u-move.h: Likewise.
124645         * lib/unistr/u-set.h: Likewise.
124646         * lib/unistr/u-startswith.h: Likewise.
124647         * lib/unistr/u-stpcpy.h: Likewise.
124648         * lib/unistr/u-stpncpy.h: Likewise.
124649         * lib/unistr/u-strcat.h: Likewise.
124650         * lib/unistr/u-strcpy.h: Likewise.
124651         * lib/unistr/u-strcspn.h: Likewise.
124652         * lib/unistr/u-strdup.h: Likewise.
124653         * lib/unistr/u-strlen.h: Likewise.
124654         * lib/unistr/u-strncat.h: Likewise.
124655         * lib/unistr/u-strncpy.h: Likewise.
124656         * lib/unistr/u-strnlen.h: Likewise.
124657         * lib/unistr/u-strpbrk.h: Likewise.
124658         * lib/unistr/u-strspn.h: Likewise.
124659         * lib/unistr/u-strstr.h: Likewise.
124660         * lib/unistr/u-strtok.h: Likewise.
124661         * lib/unistr/u16-check.c: Likewise.
124662         * lib/unistr/u16-chr.c: Likewise.
124663         * lib/unistr/u16-cmp.c: Likewise.
124664         * lib/unistr/u16-cpy-alloc.c: Likewise.
124665         * lib/unistr/u16-cpy.c: Likewise.
124666         * lib/unistr/u16-endswith.c: Likewise.
124667         * lib/unistr/u16-mblen.c: Likewise.
124668         * lib/unistr/u16-mbsnlen.c: Likewise.
124669         * lib/unistr/u16-mbtouc-aux.c: Likewise.
124670         * lib/unistr/u16-mbtouc-unsafe-aux.c: Likewise.
124671         * lib/unistr/u16-mbtouc-unsafe.c: Likewise.
124672         * lib/unistr/u16-mbtouc.c: Likewise.
124673         * lib/unistr/u16-mbtoucr.c: Likewise.
124674         * lib/unistr/u16-move.c: Likewise.
124675         * lib/unistr/u16-next.c: Likewise.
124676         * lib/unistr/u16-prev.c: Likewise.
124677         * lib/unistr/u16-set.c: Likewise.
124678         * lib/unistr/u16-startswith.c: Likewise.
124679         * lib/unistr/u16-stpcpy.c: Likewise.
124680         * lib/unistr/u16-stpncpy.c: Likewise.
124681         * lib/unistr/u16-strcat.c: Likewise.
124682         * lib/unistr/u16-strchr.c: Likewise.
124683         * lib/unistr/u16-strcmp.c: Likewise.
124684         * lib/unistr/u16-strcpy.c: Likewise.
124685         * lib/unistr/u16-strcspn.c: Likewise.
124686         * lib/unistr/u16-strdup.c: Likewise.
124687         * lib/unistr/u16-strlen.c: Likewise.
124688         * lib/unistr/u16-strmblen.c: Likewise.
124689         * lib/unistr/u16-strmbtouc.c: Likewise.
124690         * lib/unistr/u16-strncat.c: Likewise.
124691         * lib/unistr/u16-strncmp.c: Likewise.
124692         * lib/unistr/u16-strncpy.c: Likewise.
124693         * lib/unistr/u16-strnlen.c: Likewise.
124694         * lib/unistr/u16-strpbrk.c: Likewise.
124695         * lib/unistr/u16-strrchr.c: Likewise.
124696         * lib/unistr/u16-strspn.c: Likewise.
124697         * lib/unistr/u16-strstr.c: Likewise.
124698         * lib/unistr/u16-strtok.c: Likewise.
124699         * lib/unistr/u16-to-u32.c: Likewise.
124700         * lib/unistr/u16-to-u8.c: Likewise.
124701         * lib/unistr/u16-uctomb-aux.c: Likewise.
124702         * lib/unistr/u16-uctomb.c: Likewise.
124703         * lib/unistr/u32-check.c: Likewise.
124704         * lib/unistr/u32-chr.c: Likewise.
124705         * lib/unistr/u32-cmp.c: Likewise.
124706         * lib/unistr/u32-cpy-alloc.c: Likewise.
124707         * lib/unistr/u32-cpy.c: Likewise.
124708         * lib/unistr/u32-endswith.c: Likewise.
124709         * lib/unistr/u32-mblen.c: Likewise.
124710         * lib/unistr/u32-mbsnlen.c: Likewise.
124711         * lib/unistr/u32-mbtouc-unsafe.c: Likewise.
124712         * lib/unistr/u32-mbtouc.c: Likewise.
124713         * lib/unistr/u32-mbtoucr.c: Likewise.
124714         * lib/unistr/u32-move.c: Likewise.
124715         * lib/unistr/u32-next.c: Likewise.
124716         * lib/unistr/u32-prev.c: Likewise.
124717         * lib/unistr/u32-set.c: Likewise.
124718         * lib/unistr/u32-startswith.c: Likewise.
124719         * lib/unistr/u32-stpcpy.c: Likewise.
124720         * lib/unistr/u32-stpncpy.c: Likewise.
124721         * lib/unistr/u32-strcat.c: Likewise.
124722         * lib/unistr/u32-strchr.c: Likewise.
124723         * lib/unistr/u32-strcmp.c: Likewise.
124724         * lib/unistr/u32-strcpy.c: Likewise.
124725         * lib/unistr/u32-strcspn.c: Likewise.
124726         * lib/unistr/u32-strdup.c: Likewise.
124727         * lib/unistr/u32-strlen.c: Likewise.
124728         * lib/unistr/u32-strmblen.c: Likewise.
124729         * lib/unistr/u32-strmbtouc.c: Likewise.
124730         * lib/unistr/u32-strncat.c: Likewise.
124731         * lib/unistr/u32-strncmp.c: Likewise.
124732         * lib/unistr/u32-strncpy.c: Likewise.
124733         * lib/unistr/u32-strnlen.c: Likewise.
124734         * lib/unistr/u32-strpbrk.c: Likewise.
124735         * lib/unistr/u32-strrchr.c: Likewise.
124736         * lib/unistr/u32-strspn.c: Likewise.
124737         * lib/unistr/u32-strstr.c: Likewise.
124738         * lib/unistr/u32-strtok.c: Likewise.
124739         * lib/unistr/u32-to-u16.c: Likewise.
124740         * lib/unistr/u32-to-u8.c: Likewise.
124741         * lib/unistr/u32-uctomb.c: Likewise.
124742         * lib/unistr/u8-check.c: Likewise.
124743         * lib/unistr/u8-chr.c: Likewise.
124744         * lib/unistr/u8-cmp.c: Likewise.
124745         * lib/unistr/u8-cpy-alloc.c: Likewise.
124746         * lib/unistr/u8-cpy.c: Likewise.
124747         * lib/unistr/u8-endswith.c: Likewise.
124748         * lib/unistr/u8-mblen.c: Likewise.
124749         * lib/unistr/u8-mbsnlen.c: Likewise.
124750         * lib/unistr/u8-mbtouc-aux.c: Likewise.
124751         * lib/unistr/u8-mbtouc-unsafe-aux.c: Likewise.
124752         * lib/unistr/u8-mbtouc-unsafe.c: Likewise.
124753         * lib/unistr/u8-mbtouc.c: Likewise.
124754         * lib/unistr/u8-mbtoucr.c: Likewise.
124755         * lib/unistr/u8-move.c: Likewise.
124756         * lib/unistr/u8-next.c: Likewise.
124757         * lib/unistr/u8-prev.c: Likewise.
124758         * lib/unistr/u8-set.c: Likewise.
124759         * lib/unistr/u8-startswith.c: Likewise.
124760         * lib/unistr/u8-stpcpy.c: Likewise.
124761         * lib/unistr/u8-stpncpy.c: Likewise.
124762         * lib/unistr/u8-strcat.c: Likewise.
124763         * lib/unistr/u8-strchr.c: Likewise.
124764         * lib/unistr/u8-strcmp.c: Likewise.
124765         * lib/unistr/u8-strcpy.c: Likewise.
124766         * lib/unistr/u8-strcspn.c: Likewise.
124767         * lib/unistr/u8-strdup.c: Likewise.
124768         * lib/unistr/u8-strlen.c: Likewise.
124769         * lib/unistr/u8-strmblen.c: Likewise.
124770         * lib/unistr/u8-strmbtouc.c: Likewise.
124771         * lib/unistr/u8-strncat.c: Likewise.
124772         * lib/unistr/u8-strncmp.c: Likewise.
124773         * lib/unistr/u8-strncpy.c: Likewise.
124774         * lib/unistr/u8-strnlen.c: Likewise.
124775         * lib/unistr/u8-strpbrk.c: Likewise.
124776         * lib/unistr/u8-strrchr.c: Likewise.
124777         * lib/unistr/u8-strspn.c: Likewise.
124778         * lib/unistr/u8-strstr.c: Likewise.
124779         * lib/unistr/u8-strtok.c: Likewise.
124780         * lib/unistr/u8-to-u16.c: Likewise.
124781         * lib/unistr/u8-to-u32.c: Likewise.
124782         * lib/unistr/u8-uctomb-aux.c: Likewise.
124783         * lib/unistr/u8-uctomb.c: Likewise.
124784         * lib/unitypes.h: Likewise.
124785         * lib/uniwidth.h: Likewise.
124786         * lib/uniwidth/cjk.h: Likewise.
124787         * lib/uniwidth/u16-strwidth.c: Likewise.
124788         * lib/uniwidth/u16-width.c: Likewise.
124789         * lib/uniwidth/u32-strwidth.c: Likewise.
124790         * lib/uniwidth/u32-width.c: Likewise.
124791         * lib/uniwidth/u8-strwidth.c: Likewise.
124792         * lib/uniwidth/u8-width.c: Likewise.
124793         * lib/uniwidth/width.c: Likewise.
124795 2007-10-07  Bruno Haible  <bruno@clisp.org>
124797         * lib/inttypes.in.h: Change copyright notice from LGPL to GPL.
124798         The file is still under LGPL (see modules/inttypes).
124800 2007-10-06  Bruno Haible  <bruno@clisp.org>
124802         * modules/trunc (Dependencies): Add 'extensions'.
124803         * m4/trunc.m4 (gl_FUNC_TRUNC): Require gl_USE_SYSTEM_EXTENSIONS.
124804         Reported by Ben Pfaff <blp@gnu.org>.
124806 2007-10-06  Bruno Haible  <bruno@clisp.org>
124808         * modules/freopen-tests: New file.
124809         * tests/test-freopen.c: New file.
124811         * modules/fopen-tests: New file.
124812         * tests/test-fopen.c: New file.
124814         * modules/fopen: New file.
124815         * lib/fopen.c: New file.
124816         * m4/fopen.m4: New file.
124817         * modules/freopen: New file.
124818         * lib/freopen.c: New file.
124819         * m4/freopen.m4: New file.
124820         * lib/stdio.in.h (fopen, freopen): New declarations.
124821         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize also GNULIB_FOPEN,
124822         GNULIB_FREOPEN, REPLACE_FOPEN, REPLACE_FREOPEN.
124823         * modules/stdio (Makefile.am): Substitute also GNULIB_FOPEN,
124824         GNULIB_FREOPEN, REPLACE_FOPEN, REPLACE_FREOPEN.
124825         * doc/functions/fopen.texi: Mention the 'fopen' module.
124826         * doc/functions/freopen.texi: Mention the 'freopen' module.
124828 2007-10-06  Bruno Haible  <bruno@clisp.org>
124830         * modules/open-tests: New file.
124831         * tests/test-open.c: New file.
124833         * modules/open: New file.
124834         * lib/open.c: New file.
124835         * m4/open.m4: New file.
124836         * lib/fchdir.c (open): If the gnulib module 'open' is used, do what
124837         lib/open.c does.
124838         * lib/fcntl.in.h (open): Declare also if replaced by the 'open' module.
124839         * m4/fcntl_h.m4 (gl_FCNTL_MODULE_INDICATOR, gl_FCNTL_H_DEFAULTS): New
124840         macros.
124841         (gl_FCNTL_H): Require gl_FCNTL_H_DEFAULTS.
124842         * modules/fcntl (Makefile.am): Also substitute GNULIB_OPEN and
124843         REPLACE_OPEN.
124844         * doc/functions/open.texi: Mention the 'open' module.
124846 2007-10-04  Bruno Haible  <bruno@clisp.org>
124848         * modules/ceill-tests: New file.
124849         * tests/test-ceill.c: New file.
124851         * modules/ceill: New file.
124852         * lib/ceill.c: Replace entire file.
124853         * m4/ceill.m4: New file.
124854         * lib/math.in.h (ceill): Replace declaration.
124855         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_CEILL.
124856         * modules/math (Makefile.am): Substitute also GNULIB_CEILL.
124857         * doc/functions/ceill.texi: Mention the 'ceill' module.
124858         * modules/mathl (Files): Remove lib/ceill.c.
124859         (Depends-on): Add ceill.
124861 2007-10-04  Bruno Haible  <bruno@clisp.org>
124863         * modules/ceilf-tests: New file.
124864         * tests/test-ceilf.c: New file.
124866         * modules/ceilf: New file.
124867         * lib/ceil.c: New file.
124868         * lib/ceilf.c: New file.
124869         * m4/ceilf.m4: New file.
124870         * lib/math.in.h (ceilf): New declaration.
124871         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_CEILF and
124872         HAVE_DECL_CEILF.
124873         * modules/math (Makefile.am): Substitute also GNULIB_CEILF and
124874         HAVE_DECL_CEILF.
124875         * doc/functions/ceilf.texi: Mention the 'ceilf' module.
124877 2007-10-04  Bruno Haible  <bruno@clisp.org>
124879         * modules/floorl-tests: New file.
124880         * tests/test-floorl.c: New file.
124882         * modules/floorl: New file.
124883         * lib/floorl.c: Replace entire file.
124884         * m4/floorl.m4: New file.
124885         * lib/math.in.h (floorl): Replace declaration.
124886         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FLOORL.
124887         * modules/math (Makefile.am): Substitute also GNULIB_FLOORL.
124888         * doc/functions/floorl.texi: Mention the 'floorl' module.
124889         * modules/mathl (Files): Remove lib/floorl.c.
124890         (Depends-on): Add floorl.
124892 2007-10-04  Bruno Haible  <bruno@clisp.org>
124894         * modules/floorf-tests: New file.
124895         * tests/test-floorf.c: New file.
124897         * modules/floorf: New file.
124898         * lib/floor.c: New file.
124899         * lib/floorf.c: New file.
124900         * m4/floorf.m4: New file.
124901         * lib/math.in.h (floorf): New declaration.
124902         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FLOORF and
124903         HAVE_DECL_FLOORF.
124904         * modules/math (Makefile.am): Substitute also GNULIB_FLOORF and
124905         HAVE_DECL_FLOORF.
124906         * doc/functions/floorf.texi: Mention the 'floorf' module.
124908 2007-10-04  Benoit Sigoure  <tsuna@lrde.epita.fr>
124909             Bruno Haible  <bruno@clisp.org>
124911         Advertise for the Git server instead of the CVS server.
124912         * doc/gnulib-intro.texi (Steady Development): Mention the Git
124913         repository instead of the CVS one.
124914         * doc/gnulib-tool.texi (VCS Issues): Renamed from "CVS Issues". Talk
124915         about all VCS systems generically.
124916         * doc/gnulib.texi (Introduction): Capitalize `Git'.
124918 2007-10-04  Bruno Haible  <bruno@clisp.org>
124920         * doc/gnulib.texi (Function Substitutes): Explain what an absent module
124921         means.
124922         Reported by Benoît Sigoure <tsuna@lrde.epita.fr>.
124924 2007-10-04  Bruno Haible  <bruno@clisp.org>
124926         * modules/truncl-tests: New file.
124927         * tests/test-truncl.c: New file.
124929         * modules/truncl: New file.
124930         * lib/truncl.c: New file.
124931         * m4/truncl.m4: New file.
124932         * lib/math.in.h (truncl): New declaration.
124933         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_TRUNCL and
124934         HAVE_DECL_TRUNCL.
124935         * modules/math (Makefile.am): Substitute also GNULIB_TRUNCL and
124936         HAVE_DECL_TRUNCL.
124937         * doc/functions/truncl.texi: Mention the 'truncl' module.
124939 2007-10-04  Bruno Haible  <bruno@clisp.org>
124941         * modules/truncf-tests: New file.
124942         * tests/test-truncf.c: New file.
124944         * modules/truncf: New file.
124945         * lib/trunc.c: Make paramerizable through USE_* macros.
124946         * lib/truncf.c: New file.
124947         * m4/truncf.m4: New file.
124948         * lib/math.in.h (truncf): New declaration.
124949         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_TRUNCF and
124950         HAVE_DECL_TRUNCF.
124951         * modules/math (Makefile.am): Substitute also GNULIB_TRUNCF and
124952         HAVE_DECL_TRUNCF.
124953         * doc/functions/truncf.texi: Mention the 'truncf' module.
124955 2007-10-03  Bruno Haible  <bruno@clisp.org>
124957         * gnulib-tool (func_get_automake_snippet): Synthesize an EXTRA_DIST
124958         augmentation also for tests modules.
124959         * modules/argp-tests (Makefile.am): Remove EXTRA_DIST augmentation.
124960         * modules/atexit-tests (Makefile.am): Likewise.
124961         * modules/binary-io-tests (Makefile.am): Likewise.
124962         * modules/c-strcase-tests (Makefile.am): Likewise.
124963         * modules/canonicalize-lgpl-tests (Makefile.am): Likewise.
124964         * modules/canonicalize-tests (Makefile.am): Likewise.
124965         * modules/closein-tests (Makefile.am): Likewise.
124966         * modules/fprintf-posix-tests (Makefile.am): Likewise.
124967         * modules/freadahead-tests (Makefile.am): Likewise.
124968         * modules/fseek-tests (Makefile.am): Likewise.
124969         * modules/fseeko-tests (Makefile.am): Likewise.
124970         * modules/ftell-tests (Makefile.am): Likewise.
124971         * modules/ftello-tests (Makefile.am): Likewise.
124972         * modules/isnanl-nolibm-tests (Makefile.am): Likewise.
124973         * modules/isnanl-tests (Makefile.am): Likewise.
124974         * modules/lseek-tests (Makefile.am): Likewise.
124975         * modules/mbscasecmp-tests (Makefile.am): Likewise.
124976         * modules/mbscasestr-tests (Makefile.am): Likewise.
124977         * modules/mbschr-tests (Makefile.am): Likewise.
124978         * modules/mbscspn-tests (Makefile.am): Likewise.
124979         * modules/mbsncasecmp-tests (Makefile.am): Likewise.
124980         * modules/mbspbrk-tests (Makefile.am): Likewise.
124981         * modules/mbspcasecmp-tests (Makefile.am): Likewise.
124982         * modules/mbsrchr-tests (Makefile.am): Likewise.
124983         * modules/mbsspn-tests (Makefile.am): Likewise.
124984         * modules/mbsstr-tests (Makefile.am): Likewise.
124985         * modules/printf-posix-tests (Makefile.am): Likewise.
124986         * modules/snprintf-posix-tests (Makefile.am): Likewise.
124987         * modules/sprintf-posix-tests (Makefile.am): Likewise.
124988         * modules/tsearch-tests (Makefile.am): Likewise.
124989         * modules/uniname/uniname-tests (Makefile.am): Likewise.
124990         * modules/unistdio/u16-vasnprintf-tests (Makefile.am): Likewise.
124991         * modules/unistdio/u32-vasnprintf-tests (Makefile.am): Likewise.
124992         * modules/unistdio/u8-vasnprintf-tests (Makefile.am): Likewise.
124993         * modules/unistdio/ulc-vasnprintf-tests (Makefile.am): Likewise.
124994         * modules/vasnprintf-posix-tests (Makefile.am): Likewise.
124995         * modules/vfprintf-posix-tests (Makefile.am): Likewise.
124996         * modules/vprintf-posix-tests (Makefile.am): Likewise.
124997         * modules/vsnprintf-posix-tests (Makefile.am): Likewise.
124998         * modules/vsprintf-posix-tests (Makefile.am): Likewise.
124999         * modules/xstrtoimax-tests (Makefile.am): Likewise.
125000         * modules/xstrtol-tests (Makefile.am): Likewise.
125001         * modules/xstrtoumax-tests (Makefile.am): Likewise.
125002         * modules/yesno-tests (Makefile.am): Likewise.
125004 2007-10-03  Bruno Haible  <bruno@clisp.org>
125006         * modules/trunc-tests: New file.
125007         * tests/test-trunc.c: New file.
125009         * modules/trunc: New file.
125010         * lib/trunc.c: New file.
125011         * m4/trunc.m4: New file.
125012         * lib/math.in.h (trunc): New declaration.
125013         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_TRUNC and
125014         HAVE_DECL_TRUNC.
125015         * modules/math (Makefile.am): Substitute also GNULIB_TRUNC and
125016         HAVE_DECL_TRUNC.
125017         * doc/functions/trunc.texi: Mention the 'trunc' module.
125019 2007-10-03  Bruno Haible  <bruno@clisp.org>
125021         * tests/test-fpending.c: New file, mostly copied
125022         from coreutils/lib/t-fpending.c.
125023         * modules/fpending-tests: New file.
125025 2007-10-03  Bruno Haible  <bruno@clisp.org>
125027         Port the stdio extensions to QNX (untested).
125028         * lib/fseterr.c (fseterr): Add support for QNX.
125029         * lib/fbufmode.c (fbufmode): Likewise.
125030         * lib/freadable.c (freadable): Likewise.
125031         * lib/fwritable.c (fwritable): Likewise.
125032         * lib/freading.c (freading): Likewise.
125033         * lib/fwriting.c (fwriting): Likewise.
125034         * lib/freadahead.c (freadahed): Likewise.
125035         * lib/fpurge.c (fpurge): Likewise.
125036         * lib/fseeko.c (rpl_fseeko): Likewise.
125038 2007-10-03  Bruno Haible  <bruno@clisp.org>
125039             Jim Meyering  <jim@meyering.net>
125040             Eric Blake  <ebb9@byu.net>
125042         * doc/relocatable.texi: Use @command instead of @program.
125044 2007-10-02  Jim Meyering  <jim@meyering.net>
125046         Perform one more "_.h" -> ".in.h" substitution.
125047         * modules/unistd (Makefile.am) [unistd.h]: Use unistd.h.in
125048         instead of unistd_.h here, too.
125050 2007-10-01  Bruno Haible  <bruno@clisp.org>
125052         * gnulib-tool (func_emit_initmacro_done): Special case for alloca.c.
125053         Needed for the alloca-opt module.
125055 2007-09-30  Bruno Haible  <bruno@clisp.org>
125057         * lib/alloca.in.h: Renamed from lib/alloca_.h.
125058         * modules/alloca-opt (Files, Makefile.am): Use alloca.in.h instead of
125059         alloca_.h.
125060         * lib/argz.in.h: Renamed from lib/argz_.h.
125061         * modules/argz (Files, Makefile.am): Use argz.in.h instead of argz_.h.
125062         * lib/byteswap.in.h: Renamed from lib/byteswap_.h.
125063         * modules/byteswap (Files, Makefile.am): Use byteswap.in.h instead of
125064         byteswap_.h.
125065         * lib/dirent.in.h: Renamed from lib/dirent_.h.
125066         * modules/fchdir (Files, Makefile.am): Use dirent.in.h instead of
125067         dirent_.h.
125068         * lib/fcntl.in.h: Renamed from lib/fcntl_.h.
125069         * modules/fcntl (Files, Makefile.am): Use fcntl.in.h instead of
125070         fcntl_.h.
125071         * lib/float.in.h: Renamed from lib/float_.h.
125072         * modules/float (Files, Makefile.am): Use float.in.h instead of
125073         float_.h.
125074         * lib/fnmatch.in.h: Renamed from lib/fnmatch_.h.
125075         * modules/fnmatch (Files, Makefile.am): Use fnmatch.in.h instead of
125076         fnmatch_.h.
125077         * lib/getopt.in.h: Renamed from lib/getopt_.h.
125078         * modules/getopt (Files, Makefile.am): Use getopt.in.h instead of
125079         getopt_.h.
125080         * lib/glob.in.h: Renamed from lib/glob_.h.
125081         * modules/glob (Files, Makefile.am): Use glob.in.h instead of glob_.h.
125082         * lib/iconv.in.h: Renamed from lib/iconv_.h.
125083         * modules/iconv_open (Files, Makefile.am): Use iconv.in.h instead of
125084         iconv_.h.
125085         * lib/inttypes.in.h: Renamed from lib/inttypes_.h.
125086         * modules/inttypes (Files, Makefile.am): Use inttypes.in.h instead of
125087         inttypes_.h.
125088         * lib/locale.in.h: Renamed from lib/locale_.h.
125089         * modules/locale (Files, Makefile.am): Use locale.in.h instead of
125090         locale_.h.
125091         * lib/math.in.h: Renamed from lib/math_.h.
125092         * modules/math (Files, Makefile.am): Use math.in.h instead of math_.h.
125093         * lib/netinet_in.in.h: Renamed from lib/netinet_in_.h.
125094         * modules/netinet_in (Files, Makefile.am): Use netinet_in.in.h instead
125095         of netinet_in_.h. Add dependency.
125096         * lib/poll.in.h: Renamed from lib/poll_.h.
125097         * modules/poll (Files, Makefile.am): Use poll.in.h instead of poll_.h.
125098         * lib/search.in.h: Renamed from lib/search_.h.
125099         * modules/search (Files, Makefile.am): Use search.in.h instead of
125100         search_.h.
125101         * lib/signal.in.h: Renamed from lib/signal_.h.
125102         * modules/signal (Files, Makefile.am): Use signal.in.h instead of
125103         _signal.h.
125104         * lib/stdbool.in.h: Renamed from lib/stdbool_.h.
125105         * modules/stdbool (Files, Makefile.am): Use stdbool.in.h instead of
125106         stdbool_.h.
125107         * lib/stdint.in.h: Renamed from lib/stdint_.h.
125108         * modules/stdint (Files, Makefile.am): Use stdint.in.h instead of
125109         stdint_.h.
125110         * lib/stdio.in.h: Renamed from lib/stdio_.h.
125111         * modules/stdio (Files, Makefile.am): Use stdio.in.h instead of
125112         stdio_.h.
125113         * lib/stdlib.in.h: Renamed from lib/stdlib_.h.
125114         * modules/stdlib (Files, Makefile.am): Use stdlib.in.h instead of
125115         stdlib_.h.
125116         * lib/string.in.h: Renamed from lib/string_.h.
125117         * modules/string (Files, Makefile.am): Use string.in.h instead of
125118         string_.h.
125119         * doc/gnulib-tool.texi (Initial import): Update.
125120         * lib/sys_select.in.h: Renamed from lib/sys_select_.h.
125121         * modules/sys_select (Files, Makefile.am): Use sys_select.in.h instead
125122         of sys_select_.h. Add dependency.
125123         * lib/sys_socket.in.h: Renamed from lib/sys_socket_.h.
125124         * modules/sys_socket (Files, Makefile.am): Use sys_socket.in.h instead
125125         of sys_socket_.h.
125126         * lib/sys_stat.in.h: Renamed from lib/sys_stat_.h.
125127         * modules/sys_stat (Files, Makefile.am): Use sys_stat.in.h instead of
125128         sys_stat_.h.
125129         * lib/sys_time.in.h: Renamed from lib/sys_time_.h.
125130         * modules/sys_time (Files, Makefile.am): Use sys_time.in.h instead of
125131         sys_time_.h.
125132         * lib/sysexits.in.h: Renamed from lib/sysexits_.h.
125133         * modules/sysexits (Files, Makefile.am): Use sysexits.in.h instead of
125134         sysexits_.h.
125135         * lib/time.in.h: Renamed from lib/time_.h.
125136         * modules/time (Files, Makefile.am): Use time.in.h instead of time_.h.
125137         * lib/unistd.in.h: Renamed from lib/unistd_.h.
125138         * modules/unistd (Files, Makefile.am): Use unistd.in.h instead of
125139         unistd_.h.
125140         * lib/wchar.in.h: Renamed from lib/wchar_.h.
125141         * modules/wchar (Files, Makefile.am): Use wchar.in.h instead of
125142         wchar_.h.
125143         * lib/wctype.in.h: Renamed from lib/wctype_.h.
125144         * modules/wctype (Files, Makefile.am): Use wctype.in.h instead of
125145         wctype_.h.
125146         * build-aux/bootstrap (slurp): Update.
125147         * lib/.cppi-disable: Update.
125149 2007-09-30  Bruno Haible  <bruno@clisp.org>
125151         * tests/test-getaddrinfo.c (AF_UNSPEC): Provide a fallback definition.
125152         Needed on BeOS.
125154 2007-09-30  Bruno Haible  <bruno@clisp.org>
125156         * modules/dirname-tests (check_PROGRAMS): Renamed from noinst_PROGRAMS.
125158 2007-09-29  Bruno Haible  <bruno@clisp.org>
125160         * lib/stdio_.h (getdelim, getline): Add identifiers. Doc tweak.
125162 2007-09-29  Bruno Haible  <bruno@clisp.org>
125164         * lib/xreadlink.c (xreadlink): Simplify to a wrapper around areadlink.
125165         * modules/xreadlink (Depends-on): Add areadlink, remove readlink etc.
125166         * build-aux/install-reloc: Compile also areadlink.c.
125167         * modules/relocatable-prog-wrapper (Files): Add lib/areadlink.[hc].
125169 2007-09-29  Bruno Haible  <bruno@clisp.org>
125171         * gnulib-tool (func_emit_initmacro_done): Indentation.
125173 2007-09-29  Bruno Haible  <bruno@clisp.org>
125175         * README: Add CVS checkout update instructions.
125176         Info from Bob Proulx <bob@proulx.com>.
125178 2007-09-28  Eric Blake  <ebb9@byu.net>
125180         Provide move-if-change.
125181         * build-aux/move-if-change: New file, based on best practice
125182         rather than any canonical upstream location.
125184 2007-09-28  Jim Meyering  <jim@meyering.net>
125186         Fix canonicalize loop-detection corner case.
125187         Do not attempt to stat the symlink values stored via seen_triple.
125188         Without this, coreutils' tests/misc/readlink-fp-loop test would fail
125189         on linux-2.6.18, (but not 2.6.22).
125190         * lib/canonicalize.c (seen_triple): Use triple_compare_ino_str, not
125191         triple_compare.  The former compares dev,ino,filename, while the latter
125192         would actually stat dirname(filename) when dev and ino were equal.
125193         * lib/hash-triple.c: Install <string.h>.
125194         (STREQ): Define.
125195         (triple_compare_ino_str): New function.
125196         * lib/hash-triple.h (triple_compare_ino_str): Declare it.
125198 2007-09-28  Eric Blake  <ebb9@byu.net>
125200         Enforce that AC_REPLACE_FUNCS files exist.
125201         * gnulib-tool (func_emit_initmacro_done): Make AC_LIBSOURCES
125202         override check for typos.
125204         Fix test-closein on Solaris 10.
125205         * tests/test-closein.c (main): Don't assume stdin can be inherited
125206         closed on all systems.
125207         * tests/test-closein.sh: Likewise.
125208         Reported by Piotr Tarnowski.
125210 2007-09-28  Jim Meyering  <jim@meyering.net>
125212         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Fix typo in comment.
125214 2007-09-27  Jim Meyering  <jim@meyering.net>
125216         canonicalize: Avoid a false-positive cycle failure.
125217         * modules/canonicalize (Depends-on): Add file-set and hash-triple.
125218         Sort.  Remove cycle-check.
125219         * lib/canonicalize.c: Include file-set.h and hash-triple.h,
125220         not cycle-check.h.
125221         (seen_triple): New function.
125222         (canonicalize_filename_mode): Use it instead of cycle-check.
125223         * tests/test-canonicalize.c: Add a test for this bug.
125224         * tests/test-canonicalize.sh: Set up and run the test.
125226         New module, file-set, from coreutils.
125227         * modules/file-set: Define it.
125228         * lib/file-set.c, lib/file-set.h: Implement.
125230         New module, hash-triple, from coreutils.
125231         * modules/hash-triple: Define it.
125232         * lib/hash-triple.c, lib/hash-triple.h: Implement.
125234 2007-09-25  Eric Blake  <ebb9@byu.net>
125236         Fix strerror on Interix.
125237         * lib/string_.h (strerror): Declare replacement.
125238         * doc/functions/strerror.texi (strerror): Document the Interix
125239         shortcoming.
125240         * modules/string (Makefile.am): Support new hooks.
125241         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Add new hooks.
125242         * m4/strerror.m4 (gl_FUNC_STRERROR): Defer to
125243         gl_FUNC_STRERROR_SEPARATE.
125244         (gl_FUNC_STRERROR_SEPARATE): Check for Interix bug.
125245         * lib/strerror.c (rpl_strerror): Provide replacement.
125246         * modules/strerror (Depends-on): Add string.
125247         (configure.ac): Detect use of module.
125248         * tests/test-strerror.c: New file.
125249         * modules/strerror-tests: New test module.
125250         * modules/argp (Depends-on): Add strerror.
125251         * modules/error (Depends-on): Likewise.
125252         Reported by Martin Koeppe.
125254 2007-09-24  Bruno Haible  <bruno@clisp.org>
125256         * README: Update git instructions.
125258 2007-09-24  Eric Blake  <ebb9@byu.net>
125260         Revert fpending breakage from 2007-09-08.
125261         * m4/fpending.m4 (gl_FUNC_FPENDING): Don't require existence of
125262         __fpending.c.
125264 2007-09-24  Jim Meyering  <jim@meyering.net>
125266         filenamecat.c: Add a test.
125267         * lib/filenamecat.c (main) [TEST_FILE_NAME_CONCAT]: Add a test
125268         showing how the function works when DIR is the empty string.
125270 2007-09-21  Simon Josefsson  <simon@josefsson.org>
125272         * tests/test-canonicalize.sh: Turn on executable bit.
125274 2007-09-19  Eric Blake  <ebb9@byu.net>
125276         * README: Update CVS instructions.
125278 2007-09-18  Bruno Haible  <bruno@clisp.org>
125280         * modules/areadlink: New file.
125281         * lib/areadlink.h (areadlink): New declaration.
125282         * lib/areadlink.c: New file, based on lib/xreadlink.c.
125284 2007-09-17  Jim Meyering  <jim@meyering.net>
125286         * lib/savewd.c (ESTALE) [!defined]: Define.
125287         Reported to be required on Interix by Martin Koeppe.
125289 2007-09-17  Bruno Haible  <bruno@clisp.org>
125291         * gnulib-tool (func_version): Use $version.
125293 2007-09-16  Bruno Haible  <bruno@clisp.org>
125295         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE, gl_PRINTF_INFINITE,
125296         gl_PRINTF_INFINITE_LONG_DOUBLE): Increase buf's size from 100 to 10000.
125297         Needed on glibc-2.6.1 with -fstack-protector -D_FORTIFY_SOURCE=2.
125298         Reported by Greg Schafer <gschafer@zip.com.au>.
125300 2007-09-15  Bruno Haible  <bruno@clisp.org>
125302         * gnulib-tool (sed): Try a little harder to make bash understand the
125303         alias.
125304         Reported by Bruce Korb <bruce.korb@gmail.com>.
125306 2007-09-13  Eric Blake  <ebb9@byu.net>
125308         * ChangeLog: Remove conflict markers.
125310 2007-09-13  Simon Josefsson  <simon@josefsson.org>
125312         * lib/gc-gnulib.c (gc_hash_open): Catch NULL calloc return value.
125313         Reported by Bruno Haible <bruno@clisp.org>.
125315 2007-09-12  Bruno Haible  <bruno@clisp.org>
125317         * m4/lock.m4: Don't provide an AC_USE_SYSTEM_EXTENSIONS definition.
125318         (gl_LOCK_EARLY_BODY): Use AC_GNU_SOURCE when AC_USE_SYSTEM_EXTENSIONS
125319         is not defined.
125321 2007-09-12  Eric Blake  <ebb9@byu.net>
125323         Track CVS Autoconf on AC_USE_SYSTEM_EXTENSIONS.
125324         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Update to CVS
125325         Autoconf definition.
125326         * modules/euidaccess (Depends-on): Add extensions, for
125327         AC_USE_SYSTEM_EXTENSIONS with autoconf <= 2.59.
125328         * modules/fnmatch (Depends-on): Likewise.
125329         * modules/getaddrinfo (Depends-on): Likewise.
125330         * modules/getdelim (Depends-on): Likewise.
125331         * modules/getline (Depends-on): Likewise.
125332         * modules/getsubopt (Depends-on): Likewise.
125333         * modules/gettext (Depends-on): Likewise.
125334         * modules/group-member (Depends-on): Likewise.
125335         * modules/mbchar (Depends-on): Likewise.
125336         * modules/memmem (Depends-on): Likewise.
125337         * modules/mempcpy (Depends-on): Likewise.
125338         * modules/memrchr (Depends-on): Likewise.
125339         * modules/pagealign_alloc (Depends-on): Likewise.
125340         * modules/readutmp (Depends-on): Likewise.
125341         * modules/stpcpy (Depends-on): Likewise.
125342         * modules/stpncpy (Depends-on): Likewise.
125343         * modules/strchrnul (Depends-on): Likewise.
125344         * modules/strndup (Depends-on): Likewise.
125345         * modules/strsep (Depends-on): Likewise.
125346         * modules/strverscmp (Depends-on): Likewise.
125347         * modules/vasprintf (Depends-on): Likewise.
125348         * modules/wcwidth (Depends-on): Likewise.
125349         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): AC_GNU_SOURCE will be
125350         obsolete in Autoconf 2.62; use AC_USE_SYSTEM_EXTENSIONS instead.
125351         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_GNU): Likewise.
125352         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDR_INFO): Likewise.
125353         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
125354         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
125355         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Likewise.
125356         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
125357         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER): Likewise.
125358         * m4/mbchar.m4 (gl_MBCHAR): Likewise.
125359         * m4/memmem.m4 (gl_FUNC_MEMMEM): Likewise.
125360         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
125361         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
125362         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Likewise.
125363         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC): Likewise.
125364         * m4/readutmp.m4 (gl_READUTMP): Likewise.
125365         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
125366         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
125367         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
125368         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
125369         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
125370         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
125371         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
125372         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP): Likewise.
125373         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): Likewise.
125374         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
125375         * m4/lock.m4 (gl_LOCK_EARLY_BODY): Likewise, but provide fallback,
125376         so that lock.m4 can be used in gettext without extensions module.
125378 2007-09-11  Bruno Haible  <bruno@clisp.org>
125380         * m4/isc-posix.m4: Remove file.
125381         Suggested by Eric Blake.
125383 2007-09-11  Eric Blake  <ebb9@byu.net>
125385         * ChangeLog: Restore lines accidentally truncated 2007-04-06.
125387 2007-09-10  Bruno Haible  <bruno@clisp.org>
125389         * posix-modules: Fix typo in error message.
125390         Reported by Matt <mkraai@beckman.com>.
125392 2007-09-09  Bruno Haible  <bruno@clisp.org>
125394         * doc/functions/getdelim.texi: Update list of platforms lacking the
125395         function.
125396         * doc/functions/getline.texi: Likewise.
125398 2007-09-09  Jim Meyering  <jim@meyering.net>
125400         * lib/hash.c (hash_initialize): Detect calloc failure.
125401         Reported by Bruno Haible.
125403 2007-09-09  Bruno Haible  <bruno@clisp.org>
125405         * lib/canonicalize-lgpl.c (__realpath): Set errno to ENOMEM when
125406         malloc or realloc fails.
125408 2007-09-09  Bruno Haible  <bruno@clisp.org>
125410         * modules/getcwd (Depends-on): Add malloc-posix.
125411         * modules/glob (Depends-on): Likewise.
125412         * modules/putenv (Depends-on): Likewise.
125413         * modules/strdup (Depends-on): Likewise.
125414         * modules/getdelim (Depends-on): Add realloc-posix.
125415         * modules/read-file (Depends-on): Likewise.
125417 2007-09-09  Bruno Haible  <bruno@clisp.org>
125419         * m4/malloc.m4 (gl_CHECK_MALLOC_POSIX): New macro.
125420         (gl_FUNC_MALLOC_POSIX): Require it.
125421         * m4/realloc.m4 (gl_FUNC_REALLOC_POSIX): Likewise.
125422         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): Likewise.
125423         * modules/realloc (Files): Add m4/malloc.m4.
125424         * modules/calloc (Files): Likewise.
125426 2007-09-09  Bruno Haible  <bruno@clisp.org>
125428         * modules/malloc-posix: New file.
125429         * modules/malloc (Depends-on): Add malloc-posix.
125430         * lib/malloc.c: Include errno.h.
125431         (rpl_malloc): Merge the requirements of a glibc-compatible malloc
125432         and a POSIX-compatible malloc into a single function. Set ENOMEM
125433         when returning NULL.
125434         * m4/malloc.m4: New file.
125435         * doc/functions/malloc.texi: Mention the malloc-posix module.
125436         * lib/stdlib_.h (malloc): New declaration.
125437         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
125438         GNULIB_MALLOC_POSIX and HAVE_MALLOC_POSIX.
125439         * modules/stdlib (stdlib.h): Substitute also GNULIB_MALLOC_POSIX
125440         and HAVE_MALLOC_POSIX.
125442 2007-09-09  Bruno Haible  <bruno@clisp.org>
125444         * modules/realloc-posix: New file.
125445         * modules/realloc (Depends-on): Add realloc-posix.
125446         * lib/realloc.c: Include errno.h.
125447         (rpl_realloc): Merge the requirements of a glibc-compatible realloc
125448         and a POSIX-compatible realloc into a single function. Set ENOMEM
125449         when returning NULL.
125450         * m4/realloc.m4: New file.
125451         * doc/functions/realloc.texi: Mention the realloc-posix module.
125452         * lib/stdlib_.h (realloc): New declaration.
125453         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
125454         GNULIB_REALLOC_POSIX and HAVE_REALLOC_POSIX.
125455         * modules/stdlib (stdlib.h): Substitute also GNULIB_REALLOC_POSIX
125456         and HAVE_REALLOC_POSIX.
125458 2007-09-09  Bruno Haible  <bruno@clisp.org>
125460         * modules/calloc-posix: New file.
125461         * modules/calloc (Depends-on): Add calloc-posix.
125462         * lib/calloc.c: Include errno.h.
125463         (rpl_calloc): Merge the requirements of a glibc-compatible calloc
125464         and a POSIX-compatible calloc into a single function. Set ENOMEM
125465         when returning NULL.
125466         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): New macro.
125467         * doc/functions/calloc.texi: Mention the calloc-posix module.
125468         * lib/stdlib_.h (calloc): New declaration.
125469         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
125470         GNULIB_CALLOC_POSIX and HAVE_CALLOC_POSIX.
125471         * modules/stdlib (stdlib.h): Substitute also GNULIB_CALLOC_POSIX
125472         and HAVE_CALLOC_POSIX.
125474 2007-09-09  Bruno Haible  <bruno@clisp.org>
125476         Allow for modules to show an arbitrary notice.
125477         * modules/TEMPLATE-EXTENDED: Add 'Notice' field.
125478         * gnulib-tool: New option --extract-notice.
125479         (func_usage): Document it.
125480         (sed_extract_prog): Update.
125481         (func_get_notice): New function.
125482         (func_modules_notice): New function.
125483         (func_import, func_create_testdir): Invoke it.
125484         Suggested by Jim Meyering.
125486 2007-09-09  Bruno Haible  <bruno@clisp.org>
125488         * gnulib-tool: New options --verbose, --quiet.
125489         (func_usage): Document them.
125490         (verbose): New variable.
125491         (func_execute_command): New function.
125492         (func_import): Don't show the module list and the file list if
125493         $verbose < 0.
125494         (func_create_testdir): Likewise. Use func_execute_command.
125495         (func_create_megatestdir): Use func_execute_command.
125497 2007-09-08  Bruno Haible  <bruno@clisp.org>
125499         * gnulib-tool (func_import): Prefer rsync over wget when available,
125500         for fetching the PO files.
125502 2007-09-08  Bruno Haible  <bruno@clisp.org>
125504         * posix-modules: New file. Portions copied from gnulib-tool.
125505         * doc/gnulib.texi (POSIX Substitutes Library): New chapter.
125507 2007-09-08  Jim Meyering  <jim@meyering.net>
125509         Rename __fpending.c -> fpending.c and __fpending.h -> fpending.h
125510         * lib/fpending.h: Rename from __fpending.h.
125511         * lib/fpending.c: Rename from __fpending.c.
125512         Include "fpending.h", not "__fpending.h".
125513         * lib/__fpending.h, lib/__fpending.c: Remove files.
125514         * modules/fpending (Files): Reflect new file names.
125515         * lib/close-stream.c: Include "fpending.h", not "__fpending.h".
125517 2007-09-08  Bruno Haible  <bruno@clisp.org>
125519         * m4/inttypes-h.m4: Remove stub file.
125521 2007-09-07  Simon Josefsson  <simon@josefsson.org>
125523         * doc/headers/stdint.texi: Discuss #include_next issue.
125525 2007-09-06  Paul Eggert  <eggert@cs.ucla.edu>
125527         * build-aux/bootstrap: Remove obsolete comment about wget --help.
125529 2007-09-06  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
125531         * m4/time_h.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Fix misspelling
125532         in variable name.
125534 2007-09-03  Jim Meyering  <jim@meyering.net>
125536         New module: git-version-gen.
125537         * modules/git-version-gen: New file.
125539         Import changes from coreutils for bootstrap script.
125541         * build-aux/bootstrap (WGET_COMMAND): Remove code to set this variable.
125543         bootstrap: uses rsync to download the .po files
125544         * build-aux/bootstrap (po_download_command_format): New global.
125545         (download_po_files): Use rsync.
125546         (update_po_files): Don't remove .po files after download,
125547         so future rsync runs can take advantage of the copies.
125549         * build-aux/bootstrap (gnulib_tool): Make sha1sum check quietly.
125551         Solve the unnecessary-.po-file-regeneration problem once and for all.
125552         * build-aux/bootstrap (download_po_files): New function, renamed from
125553         get_translations.  Now, downloads, but doesn't update LINGUAS.
125554         (update_po_files): New function.
125556         bootstrap: Ignore more.
125557         * build-aux/bootstrap (symlink_to_dir): Add a directory name like
125558         uniwidth to e.g., lib/.gitignore.
125559         (slurp): Handle the sys_stat_.h -> sys mapping, too.
125561         * build-aux/bootstrap: New setting: vc_ignore.
125562         (insert_sorted_if_absent): Create $file if absent.
125563         Adapt to new, possibly empty, list: $vc_ignore.
125565         bootstrap: generate more ignorable names
125566         * build-aux/bootstrap (slurp): When generating ignorable names,
125567         also map .sin to .sed, .gperf to .c, and .y to .c.
125569 2007-09-03  Jim Meyering  <jim@meyering.net>
125571         * build-aux/git-version-gen: New file, from coreutils.  For details, see
125572         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=bfe49f506
125574 2007-09-02  Bruno Haible  <bruno@clisp.org>
125576         Fix mis-recognition of 'mcs' on QNX 6.
125577         * m4/csharpcomp.m4 (gt_CSHARPCOMP): Test whether the "mcs --version"
125578         output contains the string "Mono".
125579         * lib/csharpcomp.c (compile_csharp_using_mono): Likewise.
125580         Reported by <kraai@ftbfs.org> at <https://savannah.gnu.org/bugs/?18337>.
125582 2007-09-01  Bruno Haible  <bruno@clisp.org>
125584         Fix collision between uniwidth/* and linebreak modules.
125585         * lib/linebreak.h (locale_charset, uc_width, u8_width, u16_width,
125586         u32_width): Remove declarations.
125587         * lib/linebreak.c: Include uniwidth.h, uniwidth/cjk.h, streq.h.
125588         (u32_mbtouc_unsafe, streq9, streq8, streq7, streq6, streq5, streq4,
125589         streq3, streq2, streq1, streq0): Remove functions.
125590         (STREQ): Remove macro.
125591         (is_cjk_encoding): Remove function.
125592         (nonspacing_table_data, nonspacing_table_ind): Remove constants.
125593         (uc_width, u8_width, u16_width, u32_width): Remove functions.
125594         * modules/linebreak (Depends-on): Add streq, uniwidth/width.
125595         * NEWS: Document the change.
125597 2007-09-01  Bruno Haible  <bruno@clisp.org>
125599         * lib/streq.h: Add double-inclusion guard.
125601 2007-09-01  Karl Berry  <karl@gnu.org>
125603         * MODULES.html.sh: Rename mreadlink_with_size to areadlink_with_size.
125605 2007-08-28  Jim Meyering  <jim@meyering.net>
125607         Rename mreadlink_with_size to areadlink_with_size.
125608         * NEWS: Document the change.
125609         * lib/mreadlink-with-size.c (mreadlink_with_size): Rename this to...
125610         * lib/areadlink-with-size.c (areadlink_with_size): ...this.
125611         * lib/mreadlink.h: Rename this to...
125612         * lib/areadlink.h: ...this.
125613         * modules/mreadlink-with-size: Rename this to...
125614         * modules/areadlink-with-size: ...this.
125615         * lib/canonicalize.c: Reflect the renaming.
125616         * modules/canonicalize: Likewise.
125618 2007-08-26  Bruno Haible  <bruno@clisp.org>
125620         * gnulib-tool (func_import): When deciding which files to remove,
125621         consider also dangling symbolic links.
125622         Reported by Eric Blake.
125624 2007-08-26  Bruno Haible  <bruno@clisp.org>
125626         * gnulib-tool (func_ln_if_changed): Use "test -h", not "test -L".
125628 2007-08-23  Simon Josefsson  <simon@josefsson.org>
125630         * lib/readline.c: Don't include getline.h, the prototype is now
125631         found in stdio.h.
125633 2007-08-23  Jim Meyering  <jim@meyering.net>
125635         Getdelim touchup.
125636         * lib/getdelim.c (getdelim): Don't bother to save/restore errno
125637         around the funlockfile call, since funlockfile never sets errno.
125638         Don't set errno upon failed realloc.
125640 2007-08-22  Eric Blake  <ebb9@byu.net>
125642         Getline touchups.
125643         * lib/getdelim.c (getdelim): Revert regression that required *n to
125644         be 0 when *lineptr is NULL.  Preserve errno across funlockfile.
125645         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Check for declaration of
125646         getdelim, rather than whether implementation is missing.
125647         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise for getline.
125648         * lib/stdio_.h (getline): Also declare if replacement is
125649         required.
125650         * doc/functions/getdelim.texi: New file.
125651         * doc/functions/getline.texi: Likewise.
125652         * doc/gnulib.texi (Function Substitutes): Add new files.
125653         Reported by Bruno Haible.
125655 2007-08-22  Ludovic Courtès  <ludo@gnu.org>
125657         * users.txt: Add Guile.
125659 2007-08-22  Eric Blake  <ebb9@byu.net>
125661         * tests/test-getdelim.c (main): Use remove, not unlink.
125662         * tests/test-getline.c (main): Likewise.
125664         Move getline and getdelim into stdio.h, per POSIX 200x.
125665         * modules/getline (Files): Remove getline.h.
125666         (Depends-on): Add stdio.
125667         (configure.ac): Add module indicator.
125668         * modules/getdelim (Files): Remove getdelim.h.
125669         (Depends-on): Add stdio.
125670         (configure.ac): Add module indicator.
125671         * modules/stdio (Makefile.am): Work with new indicators.
125672         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add new defaults.
125673         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Work with stdio needs.
125674         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
125675         * lib/getdelim.h: Delete.
125676         * lib/getline.h: Delete.
125677         * lib/stdio_.h (getdelim, getline): Declare.
125678         * modules/getdelim-tests: New module.
125679         * modules/getline-tests: Likewise.
125680         * tests/test-getdelim.c: New file.
125681         * tests/test-getline.c: Likewise.
125682         * NEWS: Document the change.
125683         * lib/getline.c: Update choice of header.
125684         * lib/csharpcomp.c: Likewise.
125685         * lib/getpass.c: Likewise.
125686         * lib/javacomp.c: Likewise.
125687         * lib/javaversion.c: Likewise.
125688         * lib/yesno.c: Likewise.
125689         * lib/getdelim.c: Likewise.
125690         (getdelim): Set errno on failure, and avoid memory leak.
125692 2007-08-19  Bruno Haible  <bruno@clisp.org>
125694         * modules/closein (Depends-on): Add freadahead.
125695         * lib/closein.c: Include freadahead.h.
125696         (close_stdin): Skip the fseeko and fflush calls if freadahead(stdin)
125697         is zero.
125699 2007-08-19  Bruno Haible  <bruno@clisp.org>
125701         * modules/freadahead-tests: New file.
125702         * tests/test-freadahead.sh: New file.
125703         * tests/test-freadahead.c: New file.
125705         * modules/freadahead: New file.
125706         * lib/freadahead.h: New file.
125707         * lib/freadahead.c: New file.
125708         * MODULES.html.sh (File stream based Input/Output): Add freadahead,
125709         fbufmode, fpurge, freadable, fwritable.
125711 2007-08-19  Eric Blake  <ebb9@byu.net>
125713         Test yesno in combination with closein.
125714         * lib/yesno.c (yesno): Document use of stdin.
125715         * modules/yesno-tests (Files): New module.
125716         * tests/test-yesno.c (main): New file.
125717         * tests/test-yesno.sh: Likewise.
125719 2007-08-19  Bruno Haible  <bruno@clisp.org>
125721         * lib/fbufmode.c (fbufmode): Add tentative support for Solaris/AMD64.
125722         * lib/fseeko.c (rpl_fseeko): Likewise.
125723         * lib/fseterr.c (fseterr): Likewise.
125725 2007-08-19  Bruno Haible  <bruno@clisp.org>
125727         * tests/test-lseek.c (main): Disable a test for BeOS.
125728         * doc/functions/lseek.texi: Document the BeOS bug.
125730 2007-08-19  Bruno Haible  <bruno@clisp.org>
125731             Eric Blake  <ebb9@byu.net>
125733         * lib/lseek.c: Include <sys/stat.h>.
125734         (rpl_lseek): Add workaround code also for Unix platforms.
125735         Needed for BeOS.
125736         * m4/lseek.m4 (gl_FUNC_LSEEK): When cross-compiling, fail on BeOS.
125737         * doc/functions/lseek.texi: Document BeOS definiency.
125739 2007-08-18  Bruno Haible  <bruno@clisp.org>
125741         * modules/fstrcmp-tests: New file.
125742         * tests/test-fstrcmp.c: New file.
125744 2007-08-18  Bruno Haible  <bruno@clisp.org>
125746         * modules/fstrcmp: New file, from GNU gettext with modifications.
125747         * lib/fstrcmp.h: New file, from GNU gettext.
125748         * lib/fstrcmp.c: New file, from GNU gettext.
125749         * MODULES.html.sh (String handling): Add fstrcmp.
125751 2007-08-18  Bruno Haible  <bruno@clisp.org>
125753         * lib/diffseq.h (struct context): Change type of 'heuristic' field to
125754         'bool'.
125755         (diag, compareseq): Remove const from the ctxt argument.
125756         (USE_HEURISTIC): Undefine at the end.
125758 2007-08-18  Jim Meyering  <jim@meyering.net>
125760         New file: lib/idcache.h
125761         * NEWS: Mention the addition.
125762         * modules/idcache (Files): Add lib/idcache.h
125763         * lib/idcache.c: Include "idcache.h".
125764         Don't include <sys/types.h>.
125765         Add a FIXME comment.
125766         Move file-scoped "static" declarations to the top.
125767         * lib/idcache.h: New file.  Include <sys/types.h> here, instead.
125769 2007-08-17  Bruno Haible  <bruno@clisp.org>
125770         and Paul Eggert  <eggert@cs.ucla.edu>
125772         * MODULES.html.sh: Add diffseq.
125773         * modules/diffseq: New file.
125774         * lib/diffseq.h: New file, from GNU gettext with a few minor changes,
125775         extracted from GNU gettext's fstrcmp.c and GNU diff's analyze.c.
125777 2007-08-15  Paul Eggert  <eggert@cs.ucla.edu>
125779         Import changes from coreutils for bootstrap script.
125781         2007-07-21  Paul Eggert  <eggert@cs.ucla.edu>
125783         * build-aux/bootstrap (slurp): Work even in environments where
125784         "ls" defaults to "ls -A".  Put in a FIXME, though, since the
125785         current code does not slurp files whose names start with ".", and
125786         this looks like it might be a troublesome area.
125788         2007-07-11  Jim Meyering  <jim@meyering.net>
125790         If there's a GPL vN copyright comment, require that N == 3.
125792         2007-07-08  Jim Meyering  <jim@meyering.net>
125794         Run the coreutils-specific code only if tests/Makefile.am.in exists.
125795         * build-aux/bootstrap (mam_template): Move definition out of loop.
125797         Create symlinks for gl/{lib,m4}/*, just as for gnulib/{lib,m4}/*.
125799         * build-aux/bootstrap (symlink_to_dir): Rename function from
125800         symlink_to_gnulib.  Add a directory parameter.  Update all
125801         callers.
125802         (cp_mark_as_generated): Also check for -- and link to -- files in
125803         gl/.
125805         2007-07-08  Jim Meyering  <jim@meyering.net>
125807         Adapt to deeper hierarchy in gnulib.
125808         * build-aux/bootstrap (symlink_to_dir): If the destination
125809         directory doesn't exist, create it. This is required at least for
125810         "lib/uniwidth/cjk.h".
125812         2007-05-15  Jim Meyering  <jim@meyering.net>
125814         * build-aux/bootstrap: Now that generated Makefile.am files
125815         are no longer under version control, they must be created at
125816         bootstrap time.
125818 2007-08-14  Ben Pfaff  <blp@gnu.org>
125820         * lib/count-one-bits.h: Add comments.  From Bruno Haible.
125822 2007-08-14  Paul Eggert  <eggert@cs.ucla.edu>
125824         * lib/count-one-bits.h: Don't include <limits.h>; no longer needed
125825         given the changes below.
125826         (COUNT_ONE_BITS): Use 'verify' rather than 'verify_true'.  Work
125827         even on hosts that have padding bits beyond the supported 64.
125829 2007-08-10  Paul Eggert  <eggert@cs.ucla.edu>
125831         * NEWS: In xstrtol, remove STRTOL_FATAL_ERROR and add xstrtol_fatal.
125832         * lib/xstrtol.h: Don't include exitfail.h; that's now internal to
125833         xstrtol.c.  Include getopt.h, since xstrtol_fatal's signature
125834         depends on it.
125835         (xstrtol_error): Remove.
125836         (xstrtol_fatal): New decl, replacing the functionality of xstrtol_error
125837         but with a different signature.
125838         (ATTRIBUTE_NORETURN, __attribute__): New macros.
125839         * lib/xstrtol-error.c: Include exitfail.h.
125840         (xstrtol_fatal): New function, with a different signature from the
125841         old xstrtol_error, so that the caller need not worry about passing
125842         in an exit status, or about storage management of the option argument.
125843         (xstrtol_error): Now a static function.  Redo signature to
125844         implement xstrtol_fatal.  Output the correct number of hyphens in
125845         front of the option so that the caller need not worry about
125846         storage management.
125847         (N_): New macro.
125848         (_): Remove; not used now.
125849         * modules/xstrtol: Depend on getopt.
125850         * tests/test-xstrtol.c (main): Use new xstrtol_error function instead
125851         of old STRTOL_FATAL_ERROR macro.
125852         * tests/test-xstrtol.sh (t-xstrtol.xo): Adjust to match new behavior
125853         of test program.
125854         * tests/test-xstrtoimax.sh (t-xstrtoimax.xo): Likewise.
125855         * tests/test-xstrtoumax.sh (t-xstrtoumax.xo): Likewise.
125857 2007-08-08  Eric Blake  <ebb9@byu.net>
125859         * lib/xstrtol-error.c: Add missing include.
125861         Move xstrtol messages into gnulib domain, when --pobase is used.
125862         * lib/xstrtol.h (_STRTOL_ERROR): Move messages out of macro...
125863         * lib/xstrtol-error.c (xstrtol_error): ...into new file.
125864         * modules/xstrtol (Files): Distribute new file.
125865         * m4/xstrtol.m4 (gl_XSTRTOL): Build new file.
125866         * lib/xstrtol.c (TESTING_XSTRTO): Move tests...
125867         * tests/test-xstrtol.c: ...into new file.
125868         * tests/test-xstrtoul.c: Also test xstrtoul.
125869         * tests/test-xstrtoimax.c: Also test xstrtoimax.
125870         * tests/test-xstrtoumax.c: Also test xstrtoumax.
125871         * tests/test-xstrtol.sh: Drive the tests.
125872         * tests/test-xstrtoimax.sh: Likewise.
125873         * tests/test-xstrtoumax.sh: Likewise.
125874         * modules/xstrtol-tests: New module.
125875         * modules/xstrtoimax-tests: Likewise.
125876         * modules/xstrtoumax-tests: Likewise.
125878 2007-08-08  Jim Meyering  <jim@meyering.net>
125880         New function: mfile_name_concat.
125881         * lib/filenamecat.c (mfile_name_concat): New function, just like
125882         file_name_concat, but return NULL upon failure rather than exiting
125883         with a diagnostic.
125884         * lib/filenamecat.h: Declare it.
125886 2007-08-07  Bruno Haible  <bruno@clisp.org>
125888         * m4/inttypes.m4 (gl_INTTYPES_H): Use GL_TRIGGER_STDC_LIMIT_MACROS
125889         instead of __STDC_LIMIT_MACROS_TRIGGER. This avoids a redefinition
125890         warning from gcc.
125891         Reported by Eric Blake.
125893 2007-08-07  Simon Josefsson  <simon@josefsson.org>
125895         * modules/crypto/arctwo (License): Use the synonymous term "LGPLv2+".
125896         * modules/crypto/arcfour (License): Likewise.
125897         * modules/crypto/des-tests (License): Likewise.
125898         * modules/crypto/gc-arctwo-tests (License): Likewise.
125899         * modules/crypto/gc-des-tests (License): Likewise.
125900         * modules/crypto/gc-hmac-md5-tests (License): Likewise.
125901         * modules/crypto/gc-hmac-sha1-tests (License): Likewise.
125902         * modules/crypto/gc-md2-tests (License): Likewise.
125903         * modules/crypto/gc-md4-tests (License): Likewise.
125904         * modules/crypto/gc-md5-tests (License): Likewise.
125905         * modules/crypto/gc-pbkdf2-sha1-tests (License): Likewise.
125906         * modules/crypto/gc-rijndael-tests (License): Likewise.
125907         * modules/crypto/gc-sha1-tests (License): Likewise.
125908         * modules/crypto/gc-tests (License): Likewise.
125909         * modules/crypto/hmac-md5 (License): Likewise.
125910         * modules/crypto/hmac-sha1 (License): Likewise.
125911         * modules/crypto/md2-tests (License): Likewise.
125912         * modules/crypto/md4-tests (License): Likewise.
125913         * modules/crypto/md5 (License): Likewise.
125914         * modules/crypto/rijndael (License): Likewise.
125915         * modules/crypto/sha1 (License): Likewise.
125916         * modules/memxor (License): Likewise.
125918 2007-08-06  Paul Eggert  <eggert@cs.ucla.edu>
125919         and Bruno Haible  <bruno@clisp.org>
125921         * NEWS: Describe interface changes to human, xstrtol.
125922         * lib/human.h: Include <xstrtol.h>.
125923         (human_options): Return enum strtol_error, not int.  Remove
125924         bool arg; take int * instead.
125925         * lib/human.c: Don't include "gettext.h".
125926         (_): Remove; no longer used.
125927         Don't include <xstrtol.h>, since human.h does it.
125928         (human_options): Adjust to abovementioned interface changes.
125929         Do not report error to stderr; that's now the caller's
125930         responsibility.
125931         * lib/xstrtol.c (main) [defined TESTING_XSTRTO]: Adjust to
125932         interface change.
125933         * lib/xstrtol.h (_STRTOL_ERROR): Take Option, Arg rather than
125934         Str, Argument_type_string.  All uses changed.  Put " argument"
125935         in diagnostics to make them clearer.  Change wording of suffix
125936         message for clarity.
125937         (STRTOL_FATAL_ERROR): Take Option, Arg rather than Str,
125938         Argument_type_string.
125939         (STRTOL_FATAL_WARN): Remove; no longer used.
125940         * modules/human (Depends-on): Remove gettext-h.
125942 2007-08-06  Simon Josefsson  <simon@josefsson.org>
125944         * build-aux/maint.mk, build-aux/GNUmakefile: Relicense to GPLv3+.
125946 2007-07-31  Bruno Haible  <bruno@clisp.org>
125948         * m4/stdint.m4 (gl_STDINT_H): Test whether WCHAR_MIN and WCHAR_MAX
125949         are defined by <stdint.h> (as opposed to <wchar.h>, as on Dragonfly).
125950         Reported by Joerg Sonnenberger <joerg@britannica.bec.de>.
125952 2007-07-31  Bruno Haible  <bruno@clisp.org>
125954         * lib/fflush.c (rpl_fflush): On BSD systems, use the __SNPT flag.
125955         Suggested by Joerg Sonnenberger <joerg@britannica.bec.de>.
125957 2007-07-30  Bruno Haible  <bruno@clisp.org>
125959         * modules/base64 (License): Use the synonymous term "LGPLv2+".
125960         * modules/c-ctype (License): Likewise.
125961         * modules/c-strcase (License): Likewise.
125962         * modules/check-version (License): Likewise.
125963         * modules/iconv (License): Likewise.
125964         * modules/iconv_open (License): Likewise.
125965         * modules/read-file (License): Likewise.
125966         * modules/striconv (License): Likewise.
125967         * modules/strverscmp (License): Likewise.
125968         * modules/vasprintf (License): Likewise.
125969         * modules/crypto/des (License): Likewise.
125970         * modules/crypto/gc (License): Likewise.
125971         * modules/crypto/gc-arcfour (License): Likewise.
125972         * modules/crypto/gc-arctwo (License): Likewise.
125973         * modules/crypto/gc-des (License): Likewise.
125974         * modules/crypto/gc-hmac-md5 (License): Likewise.
125975         * modules/crypto/gc-hmac-sha1 (License): Likewise.
125976         * modules/crypto/gc-md2 (License): Likewise.
125977         * modules/crypto/gc-md4 (License): Likewise.
125978         * modules/crypto/gc-md5 (License): Likewise.
125979         * modules/crypto/gc-pbkdf2-sha1 (License): Likewise.
125980         * modules/crypto/gc-random (License): Likewise.
125981         * modules/crypto/gc-rijndael (License): Likewise.
125982         * modules/crypto/gc-sha1 (License): Likewise.
125983         * modules/crypto/md2 (License): Likewise.
125984         * modules/crypto/md4 (License): Likewise.
125986 2007-07-30  Jim Meyering  <jim@meyering.net>
125988         * lib/fts.c (fts_read): Upon failure to chdir into a subdirectory,
125989         set fts_info to FTS_DNR, not to FTS_ERR, so that the caller knows
125990         it has valid stat data.  This bug would cause du not to count the
125991         sizes of inaccessible directories.
125992         Patch by Bryan Mason <bmason@redhat.com>, via Jose Maria Plans
125993         in <http://bugzilla.redhat.com/250077>.
125995 2007-07-25  Peter O'Gorman  <peter@pogma.com>
125996             Bruno Haible  <bruno@clisp.org>
125998         * m4/include_next.m4 (gl_INCLUDE_NEXT): Test whether #include_next
125999         really works. Needed because AIX 4.3 "xlc -E" doesn't understand
126000         #include_next, gives a diagnostic about it, but reports no error in
126001         the exit code.
126002         Reported by Gary V. Vaughan <gary@thewrittenword.com>.
126004 2007-07-24  Ben Pfaff  <blp@gnu.org>
126006         Improve name: "count-one-bits" is better than "popcount".
126007         * MODULES.html.sh: Update name.
126008         * lib/popcount.h: Renamed lib/count-one-bits.h.
126009         (popcount): Renamed count_one_bits.
126010         (popcountl): Renamed count_one_bits_l.
126011         (popcountll): Renamed count_one_bits_ll.
126012         * m4/popcount.m4: Renamed m4/count-one-bits.m4.
126013         * modules/popcount: Renamed module/count-one-bits.
126014         * modules/popcount-tests: Renamed module/count-one-bits-tests.
126015         * tests/test-popcount.c: Renamed tests/test-count-one-bits.c.
126017 2007-07-23  Ben Pfaff  <blp@gnu.org>
126019         * lib/popcount.h (popcount32): Reduce size of constants, to allow
126020         better code generation, and add U to large constants to avoid
126021         warnings, in non-GCC case.
126022         Suggested by Bruno Haible.
126024 2007-07-23  Ben Pfaff  <blp@gnu.org>
126026         * lib/popcount.h: Use verify_true instead of if...abort.
126027         * modules/popcount: Depend on verify module.
126028         Suggested by Jim Meyering.
126030 2007-07-23  Bruno Haible  <bruno@clisp.org>
126032         * gnulib-tool (func_import): Create a .cvsignore file also when the
126033         directory is not yet in CVS but the toplevel directory is. When
126034         creating a .cvsignore file, add ".deps" and ".dirstamp" to it.
126035         Reported by Karl Berry.
126037 2007-07-22  Ben Pfaff  <blp@gnu.org>
126039         * lib/popcount.h: Use faster, branchless algorithm for non-GCC
126040         case.
126041         Suggested by Eric Blake.
126043 2007-07-22  Ben Pfaff  <blp@gnu.org>
126045         New module: popcount.
126046         * MODULES.html.sh: Add popcount.
126047         * modules/popcount: New file.
126048         * modules/popcount-tests: New file.
126049         * tests/test-popcount.c: New file.
126050         * lib/popcount.h: New file.
126051         * m4/popcount.m4: New file.
126053 2007-07-22  Paul Eggert  <eggert@cs.ucla.edu>
126055         * build-aux/announce-gen: Update to GPLv3.
126057         * build-aux/config.guess: Update from config.
126059 2007-07-21  Bruno Haible  <bruno@clisp.org>
126061         * lib/error.c (_) [ENABLE_NLS]: Define to gettext.
126062         * lib/verror.c (_) [ENABLE_NLS]: Likewise.
126064 2007-07-20  Jim Meyering  <jim@meyering.net>
126066         * check-module: Diagnose a self-dependency.
126068 2007-07-19  Bruno Haible  <bruno@clisp.org>
126070         * gnulib-tool (func_import): Don't abort if pobase or po_domain is
126071         empty.
126072         Reported by Eric Blake.
126074 2007-07-18  Bruno Haible  <bruno@clisp.org>
126076         * gnulib-tool: New options --po-base, --po-domain.
126077         (func_usage): Document them.
126078         (pobase, po_domain): New variables.
126079         (func_emit_lib_Makefile_am): Augment AM_CPPFLAGS, defining
126080         DEFAULT_TEXT_DOMAIN.
126081         (func_emit_po_Makevars, func_emit_po_POTFILES_in): New functions.
126082         (func_import): Consider pobase and po_domain. Create a po/ directory.
126083         (func_create_testdir): Set pobase and po_domain to empty.
126084         * build-aux/po/Makefile.in.in: New file, from GNU gettext 0.16.1.
126085         * build-aux/po/remove-potcdate.sin: New file, from GNU gettext 0.16.1.
126087 2007-07-18  Bruno Haible  <bruno@clisp.org>
126089         * gnulib-tool (func_get_automake_snippet): Synthesize also an
126090         EXTRA_DIST augmentation for files in build-aux/.
126092 2007-07-16  Bruno Haible  <bruno@clisp.org>
126094         * modules/lseek (License): Use the synonymous term "LGPLv2+".
126095         * modules/getdelim (License): Likewise.
126097 2007-07-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
126099         * modules/arpa_inet (License): Use the synonymous term LGPLv2+.
126100         * modules/d-type (License): Likewise.
126101         * modules/extensions (License): Likewise.
126102         * modules/fnmatch (License): Likewise.
126103         * modules/fseeko (License): Likewise.
126104         * modules/getaddrinfo (License): Likewise.
126105         * modules/getline (License): Likewise.
126106         * modules/getlogin_r (License): Likewise.
126107         * modules/getpass (License): Likewise.
126108         * modules/gettimeofday (License): Likewise.
126109         * modules/glob (License): Likewise.
126110         * modules/inet_ntop (License): Likewise.
126111         * modules/malloc (License): Likewise.
126112         * modules/malloca (License): Likewise.
126113         * modules/memmem (License): Likewise.
126114         * modules/mempcpy (License): Likewise.
126115         * modules/memset (License): Likewise.
126116         * modules/minmax (License): Likewise.
126117         * modules/mktime (License): Likewise.
126118         * modules/netinet_in (License): Likewise.
126119         * modules/pathmax (License): Likewise.
126120         * modules/poll (License): Likewise.
126121         * modules/regex (License): Likewise.
126122         * modules/snprintf (License): Likewise.
126123         * modules/stdbool (License): Likewise.
126124         * modules/stdint (License): Likewise.
126125         * modules/stdio (License): Likewise.
126126         * modules/strcase (License): Likewise.
126127         * modules/strcasestr (License): Likewise.
126128         * modules/strdup (License): Likewise.
126129         * modules/string (License): Likewise.
126130         * modules/strndup (License): Likewise.
126131         * modules/strnlen (License): Likewise.
126132         * modules/strpbrk (License): Likewise.
126133         * modules/strptime (License): Likewise.
126134         * modules/strsep (License): Likewise.
126135         * modules/sys_select (License): Likewise.
126136         * modules/sys_socket (License): Likewise.
126137         * modules/sys_stat (License): Likewise.
126138         * modules/sys_time (License): Likewise.
126139         * modules/time (License): Likewise.
126140         * modules/time_r (License): Likewise.
126141         * modules/timegm (License): Likewise.
126142         * modules/unistd (License): Likewise.
126143         * modules/vsnprintf (License): Likewise.
126144         * modules/wctype (License): Likewise.
126146 2007-07-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
126148         * modules/argz (License): LGPLv2+.
126150 2007-07-15  Karl Berry  <karl@gnu.org>
126152         * doc/gnulib.texi: revise node structure per new fdl.texi.
126154 2007-07-14  Bruno Haible  <bruno@clisp.org>
126156         * lib/uniname/gen-uninames.lisp (main): Emit a "do not edit" line to
126157         the output file.
126158         * lib/uniname/uninames.h: Regenerated.
126160 2007-07-14  Karl Berry  <karl@gnu.org>
126162         * doc/*gpl*.texi, doc/fdl.texi: new versions, consistently
126163         omitting sectioning and index commands.
126165 2007-07-13  Bruno Haible  <bruno@clisp.org>
126167         New gnulib-tool option --more-symlinks.
126168         * gnulib-tool (func_usage): Document --more-symlinks.
126169         (do_copyrights): New variable.
126170         Recognize option --more-symlinks.
126171         (func_import): Don't add a copyright notice transform to
126172         sed_transform_lib_file if do_copyrights is empty.
126174 2007-07-13  Bruno Haible  <bruno@clisp.org>
126176         * lib/vasnprintf.c (decimal_point_char): Define also if
126177         (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE)
126178         && !NEED_PRINTF_DIRECTIVE_A.
126179         Reported by Clemens Koller <clemens.koller@anagramm.de> via
126180         Gary V. Vaughan <gary@gnu.org>.
126182 2007-07-13  Paul Eggert  <eggert@cs.ucla.edu>
126184         * lib/inttypes_.h: Undo previous change, since it was fixed
126185         in a different way in the 2007-07-02 fix to m4/inttypes.m4.
126187 2007-07-13  Bruno Haible  <bruno@clisp.org>
126189         * lib/stdint_.h: Fix typo: _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H was
126190         misspelled as _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H.
126192 2007-07-13  Jim Meyering  <jim@meyering.net>
126194         df: Don't fail for Tru64's "file-on-file mount".
126195         * m4/fsusage.m4 (gl_FSUSAGE): Reject Tru64's buggy statvfs,
126196         so we fall through and use statfs instead.  Details here:
126197         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10878>
126198         Reported by Albert Chin.
126200 2007-07-13  Bruno Haible  <bruno@clisp.org>
126202         * modules/alloca-opt (License): Use the synonymous term "LGPLv2+".
126203         * modules/configmake (License): Likewise.
126204         * modules/gettext (License): Likewise.
126205         * modules/gettext-h (License): Likewise.
126206         * modules/include_next (License): Likewise.
126207         * modules/link-warning (License): Likewise.
126208         * modules/localcharset (License): Likewise.
126209         * modules/localename (License): Likewise.
126210         * modules/lock (License): Likewise.
126211         * modules/relocatable-lib-lgpl (License): Likewise.
126212         * modules/size_max (License): Likewise.
126213         * modules/vasnprintf (License): Likewise.
126214         * modules/wchar (License): Likewise.
126215         * modules/xsize (License): Likewise.
126217 2007-07-13  Bruno Haible  <bruno@clisp.org>
126219         * gnulib-tool (func_import): Treat LGPLv2 as synonymous to LGPL.
126220         (func_create_testdir): Handle copying terms "GPLv2+" and "LGPLv2+".
126222 2007-07-12  Bruno Haible  <bruno@clisp.org>
126224         * doc/gnulib-intro.texi (Copyright): Clarify the license abbreviations
126225         in the modules files.
126227 2007-07-11  Karl Berry  <karl@gnu.org>
126229         * MODULES.html.sh (func_module): use
126230          sed -e '\|^'"${includefile}"'$|d'
126231          instead of /.../d, to avoid errors on $includefile's containing /.
126233 2007-07-10  Sergey Poznyakoff  <gray@gnu.org.ua>
126235         * gnulib-tool (func_import): Avoid duplication of --avoid
126236         statements
126237         (func_dest_tmpfilename,func_create_testdir): Translate `-' in file
126238         names to `_' in variable names.
126240 2007-07-10  Eric Blake  <ebb9@byu.net>
126242         * lib/version-etc.c (version_etc_va): Default to GPLv3+.
126243         * NEWS: Document this change.
126245 2007-07-08  Bruno Haible  <bruno@clisp.org>
126247         Update to Unicode 5.0.
126248         * lib/uniwidth/width.c (nonspacing_table_data): Add U+00AD,
126249         U+0350..U+035F, U+05A2, U+05BA, U+05C5, U+05C7, U+0600..U+0603,
126250         U+0610..U+0615, U+0656..U+065E, U+07EB..U+07F3, U+0A01, U+0AE2..U+0AE3,
126251         U+0CBC. Remove U+0CBF, U+0CC6. Add U+0CE2..U+0CE3, U+135F,
126252         U+17B4..U+17B5, U+17DD. Remove U+180E. Add U+1920..U+1922,
126253         U+1927..U+192B, U+1932, U+1939..U+193B, U+1A17..U+1A18, U+1B00..U+1B03,
126254         U+1B34, U+1B36..U+1B3A, U+1B3C, U+1B42, U+1B6B..U+1B73, U+1DC0..U+1DCA,
126255         U+1DFE..U+1DFF, U+20EB..U+20EF, U+A802, U+A806, U+A80B, U+A825..U+A826,
126256         U+10A01..U+10A03, U+10A05..U+10A06, U+10A0C..U+10A0F, U+10A38..U+10A3A,
126257         U+10A3F, U+1D242..U+1D244.
126258         (nonspacing_table_ind): Update.
126259         (uc_width): Assign width 0 to U+E0100..U+E01EF. Assign width 1 to
126260         U+4DC0..U+4DFF. Assign width 2 to U+2329..U+232A, U+FE10..U+FE1F.
126262 2007-07-08  Bruno Haible  <bruno@clisp.org>
126264         Update to Unicode 5.0.
126265         * lib/uniname/gen-uninames.lisp (main): Add the range 0x12xxx to the
126266         code transform. Extend the name index field of unicode_name_to_code and
126267         unicode_code_to_name from 16 to 24 bits.
126268         * lib/uniname/uniname.c (unicode_character_name,
126269         unicode_name_character): Add the range 0x12xxx to the code transform.
126270         * lib/uniname/uninames.h: Regenerated.
126271         * tests/uniname/UnicodeDataNames.txt: Update to Unicode 5.0.
126273 2007-07-07  Bruno Haible  <bruno@clisp.org>
126275         * modules/wcwidth-tests: New file.
126276         * tests/test-wcwidth.c: New file.
126278         Work around MacOS X wcwidth() bug.
126279         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Test against MacOS X 10.3 bug.
126280         * lib/wcwidth.c: Include localcharset.h, streq.h, uniwidth.h.
126281         (rpl_wcwidth): Special-case the UTF-8 locales. Fall back to the
126282         original wcwidth in non-UTF-8 locales.
126283         * modules/wcwidth (Depends-on): Add localcharset, streq,
126284         uniwidth/width.
126285         * doc/functions/wcwidth.texi: Update.
126287 2007-07-07  Bruno Haible  <bruno@clisp.org>
126289         * lib/wchar_.h: Include the GL_LINK_WARNING macro.
126290         (wcwidth): New declaration.
126291         * m4/wchar.m4 (gl_WCHAR_MODULE_INDICATOR, gl_WCHAR_H_DEFAULTS): New
126292         macros.
126293         (gl_WCHAR_H): Require gl_WCHAR_H_DEFAULTS. Don't set WCHAR_H to empty
126294         here. Prepare for creating <wchar.h> unconditionally.
126295         * modules/wchar (Depends-on): Add link-warning.
126296         (Makefile.am): Substitute also GNULIB_WCWIDTH, HAVE_DECL_WCWIDTH,
126297         REPLACE_WCWIDTH, and GL_LINK_WARNING.
126298         * lib/wcwidth.h: Remove file.
126299         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gl_WCHAR_H_DEFAULTS. Set
126300         HAVE_DECL_WCWIDTH, REPLACE_WCWIDTH, WCHAR_H.
126301         * modules/wcwidth (Files): Remove lib/wcwidth.h.
126302         (configure.ac): Invoke gl_WCHAR_MODULE_INDICATOR.
126303         (Include): Replace wcwidth.h with <wchar.h>.
126304         * lib/wcwidth.c: Include <wchar.h> instead of wcwidth.h.
126305         * lib/mbchar.h: Don't include wcwidth.h.
126306         * lib/mbswidth.c: Likewise.
126307         * NEWS: Mention the change.
126309 2007-07-07  Bruno Haible  <bruno@clisp.org>
126311         * lib/wcwidth.c: New file, extracted from lib/wcwidth.h.
126312         * lib/wcwidth.h: Don't include wctype.h. Replace inline function
126313         definition with an external declaration.
126314         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Use wcwidth.c when wcwidth is not
126315         defined as a function. Remove AC_C_INLINE requirement.
126316         * modules/wcwidth (Files): Add lib/wcwidth.c.
126317         (Makefile.am): Remove redundant statement.
126319 2007-07-07  Bruno Haible  <bruno@clisp.org>
126321         * MODULES.html.sh (Unicode string functions): Add the new modules.
126323         * tests/uniwidth/test-u32-strwidth.c: New file.
126324         * modules/uniwidth/u32-strwidth-tests: New file.
126326         * lib/uniwidth/u32-strwidth.c: New file.
126327         * modules/uniwidth/u32-strwidth: New file.
126329         * tests/uniwidth/test-u16-strwidth.c: New file.
126330         * modules/uniwidth/u16-strwidth-tests: New file.
126332         * lib/uniwidth/u16-strwidth.c: New file.
126333         * modules/uniwidth/u16-strwidth: New file.
126335         * tests/uniwidth/test-u8-strwidth.c: New file.
126336         * modules/uniwidth/u8-strwidth-tests: New file.
126338         * lib/uniwidth/u8-strwidth.c: New file.
126339         * modules/uniwidth/u8-strwidth: New file.
126341         * tests/uniwidth/test-u32-width.c: New file.
126342         * modules/uniwidth/u32-width-tests: New file.
126344         * lib/uniwidth/u32-width.c: New file.
126345         * modules/uniwidth/u32-width: New file.
126347         * tests/uniwidth/test-u16-width.c: New file.
126348         * modules/uniwidth/u16-width-tests: New file.
126350         * lib/uniwidth/u16-width.c: New file.
126351         * modules/uniwidth/u16-width: New file.
126353         * tests/uniwidth/test-u8-width.c: New file.
126354         * modules/uniwidth/u8-width-tests: New file.
126356         * lib/uniwidth/u8-width.c: New file.
126357         * modules/uniwidth/u8-width: New file.
126359         * tests/uniwidth/test-uc_width.c: New file.
126360         * modules/uniwidth/width-tests: New file.
126362         * lib/uniwidth/width.c: New file, from GNU libiconv.
126363         * lib/uniwidth/cjk.h: New file, from GNU libiconv.
126364         * modules/uniwidth/width: New file.
126366         * lib/uniwidth.h: New file, from GNU libiconv.
126367         * modules/uniwidth/base: New file.
126369 2007-07-07  Bruno Haible  <bruno@clisp.org>
126371         * lib/uniname.h: New file, from GNU gettext.
126372         * lib/uniname/gen-uninames.lisp: New file, from GNU gettext.
126373         * lib/uniname/uninames.h: New file, from GNU gettext.
126374         * lib/uniname/uniname.c: New file, from GNU gettext.
126375         * tests/uniname/test-uninames.sh: New file.
126376         * tests/uniname/test-uninames.c: New file, from GNU gettext.
126377         * tests/uniname/UnicodeDataNames.txt: New file, from GNU gettext.
126378         * modules/uniname/base: New file.
126379         * modules/uniname/uniname: New file.
126380         * modules/uniname/uniname-tests: New file.
126381         * MODULES.html.sh (Unicode string functions): Add the new modules.
126383 2007-07-06  Bruno Haible  <bruno@clisp.org>
126385         * doc/Makefile (TEXI2HTML): Specify a --reference-limit.
126387 2007-07-06  Bruno Haible  <bruno@clisp.org>
126389         * lib/sys_time_.h: Use a recursion-safe inclusion guard rather than
126390         a split double-inclusion guard. Needed for cygwin, where <sys/time.h>
126391         includes <cygwin/sys_time.h> which includes <sys/select.h> which
126392         include <sys/time.h>.
126393         Reported by Eric Blake.
126395 2007-07-06  Eric Blake  <ebb9@byu.net>
126397         Fix testing canonicalize on cygwin.
126398         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
126399         Revert patch from 2007-06-19.
126400         * tests/test-canonicalize-lgpl.c (main): Instead, skip test when
126401         canonicalize module is also in use.
126402         * tests/test-canonicalize.c: New file.
126403         * tests/test-canonicalize.sh: Likewise.
126404         * modules/canonicalize-tests: Likewise.
126406 2007-07-06  Jim Meyering  <jim@meyering.net>
126408         * lib/getugroups.c (getugroups): Detect getgrent failure.
126409         Adjust comment to reflect reality: this function may return -1.
126411 2007-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>
126413         * build-aux/bootstrap (TP_URL,get_translations): Update to use
126414         the new TP address.
126415         (usage): Fix typo
126416         (gnulib_mk): New variable.
126418 2007-07-05  Jim Meyering  <jim@meyering.net>
126420         Don't let endgrent clobber errno, no matter how improbable.
126421         * lib/getugroups.c (getugroups): Save and restore errno around
126422         endgrent call.
126424         Close the group DB even when failing with 2^31 or more members.
126425         * lib/getugroups.c (getugroups): Don't return without calling endgrent.
126427 2007-07-04  Jim Meyering  <jim@meyering.net>
126429         * lib/getugroups.h: New file.
126430         * lib/getugroups.c: Include "getugroups.h".
126431         Remove uses of "register" keyword.
126432         Move local variable, "cp", down into scope where used.
126433         Give "username" parameter the "const" attribute.
126434         * modules/getugroups (Files): Add lib/getugroups.h
126436 2007-07-04  Karl Berry  <karl@gnu.org>
126438         * MODULES.html.sh (func_all_modules): Complete rename of
126439         gpl/lgpl to gpl-2.0 and lgpl-2.1, and add gpl-3.0.
126441 2007-07-02  Bruno Haible  <bruno@clisp.org>
126443         * m4/inttypes.m4 (gl_INTTYPES_H): Define __STDC_LIMIT_MACROS in C++
126444         mode, when inttypes.h comes from gnulib.
126445         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
126447 2007-07-02  Simon Josefsson  <simon@josefsson.org>
126449         * NEWS: Mention lgpl module name change.
126451         * modules/lgpl-2.1: Renamed from lgpl.
126453         * NEWS: Mention gpl module name change.
126455         * modules/gpl-3.0: New file, based on gpl-2.0.
126457         * modules/gpl-2.0: Renamed from gpl.
126459         * modules/gpl: Fix filename, doc/gpl.texi is now found at
126460         doc/gpl-2.0.texi.
126462 2007-07-02  Paul Eggert  <eggert@cs.ucla.edu>
126464         * lib/inttypes_.h [defined __cplusplus&&!defined __STDC_LIMIT_MACROS]:
126465         #define __STDC_LIMIT_MACROS temporarily while including
126466         <stdint.h>, so that __STDC_LIMIT_MACROS is defined.
126467         Problem reported by Joel E. Denny in
126468         <http://lists.gnu.org/r/bug-gnulib/2007-07/msg00008.html>.
126470 2007-07-01  Bruno Haible  <bruno@clisp.org>
126472         * lib/unistdio.h: New file.
126473         * lib/unistdio/u-asnprintf.h: New file.
126474         * lib/unistdio/u-asprintf.h: New file.
126475         * lib/unistdio/u-printf-args.c: New file.
126476         * lib/unistdio/u-printf-args.h: New file.
126477         * lib/unistdio/u-printf-parse.h: New file.
126478         * lib/unistdio/u-snprintf.h: New file.
126479         * lib/unistdio/u-sprintf.h: New file.
126480         * lib/unistdio/u-vasprintf.h: New file.
126481         * lib/unistdio/u-vsnprintf.h: New file.
126482         * lib/unistdio/u-vsprintf.h: New file.
126483         * lib/unistdio/ulc-asnprintf.c: New file.
126484         * lib/unistdio/ulc-asprintf.c: New file.
126485         * lib/unistdio/ulc-fprintf.c: New file, based on lib/fprintf.c.
126486         * lib/unistdio/ulc-printf-parse.c: New file.
126487         * lib/unistdio/ulc-snprintf.c: New file.
126488         * lib/unistdio/ulc-sprintf.c: New file.
126489         * lib/unistdio/ulc-vasnprintf.c: New file.
126490         * lib/unistdio/ulc-vasprintf.c: New file.
126491         * lib/unistdio/ulc-vfprintf.c: New file, based on lib/vfprintf.c.
126492         * lib/unistdio/ulc-vsnprintf.c: New file.
126493         * lib/unistdio/ulc-vsprintf.c: New file.
126494         * lib/unistdio/u8-asnprintf.c: New file.
126495         * lib/unistdio/u8-asprintf.c: New file.
126496         * lib/unistdio/u8-printf-parse.c: New file.
126497         * lib/unistdio/u8-snprintf.c: New file.
126498         * lib/unistdio/u8-sprintf.c: New file.
126499         * lib/unistdio/u8-vasnprintf.c: New file.
126500         * lib/unistdio/u8-vasprintf.c: New file.
126501         * lib/unistdio/u8-vsnprintf.c: New file.
126502         * lib/unistdio/u8-vsprintf.c: New file.
126503         * lib/unistdio/u8-u8-asnprintf.c: New file.
126504         * lib/unistdio/u8-u8-asprintf.c: New file.
126505         * lib/unistdio/u8-u8-snprintf.c: New file.
126506         * lib/unistdio/u8-u8-sprintf.c: New file.
126507         * lib/unistdio/u8-u8-vasnprintf.c: New file.
126508         * lib/unistdio/u8-u8-vasprintf.c: New file.
126509         * lib/unistdio/u8-u8-vsnprintf.c: New file.
126510         * lib/unistdio/u8-u8-vsprintf.c: New file.
126511         * lib/unistdio/u16-asnprintf.c: New file.
126512         * lib/unistdio/u16-asprintf.c: New file.
126513         * lib/unistdio/u16-printf-parse.c: New file.
126514         * lib/unistdio/u16-snprintf.c: New file.
126515         * lib/unistdio/u16-sprintf.c: New file.
126516         * lib/unistdio/u16-vasnprintf.c: New file.
126517         * lib/unistdio/u16-vasprintf.c: New file.
126518         * lib/unistdio/u16-vsnprintf.c: New file.
126519         * lib/unistdio/u16-vsprintf.c: New file.
126520         * lib/unistdio/u16-u16-asnprintf.c: New file.
126521         * lib/unistdio/u16-u16-asprintf.c: New file.
126522         * lib/unistdio/u16-u16-snprintf.c: New file.
126523         * lib/unistdio/u16-u16-sprintf.c: New file.
126524         * lib/unistdio/u16-u16-vasnprintf.c: New file.
126525         * lib/unistdio/u16-u16-vasprintf.c: New file.
126526         * lib/unistdio/u16-u16-vsnprintf.c: New file.
126527         * lib/unistdio/u16-u16-vsprintf.c: New file.
126528         * lib/unistdio/u32-asnprintf.c: New file.
126529         * lib/unistdio/u32-asprintf.c: New file.
126530         * lib/unistdio/u32-printf-parse.c: New file.
126531         * lib/unistdio/u32-snprintf.c: New file.
126532         * lib/unistdio/u32-sprintf.c: New file.
126533         * lib/unistdio/u32-vasnprintf.c: New file.
126534         * lib/unistdio/u32-vasprintf.c: New file.
126535         * lib/unistdio/u32-vsnprintf.c: New file.
126536         * lib/unistdio/u32-vsprintf.c: New file.
126537         * lib/unistdio/u32-u32-asnprintf.c: New file.
126538         * lib/unistdio/u32-u32-asprintf.c: New file.
126539         * lib/unistdio/u32-u32-snprintf.c: New file.
126540         * lib/unistdio/u32-u32-sprintf.c: New file.
126541         * lib/unistdio/u32-u32-vasnprintf.c: New file.
126542         * lib/unistdio/u32-u32-vasprintf.c: New file.
126543         * lib/unistdio/u32-u32-vsnprintf.c: New file.
126544         * lib/unistdio/u32-u32-vsprintf.c: New file.
126545         * tests/unistdio/test-ulc-asnprintf1.c: New file.
126546         * tests/unistdio/test-ulc-asnprintf1.h: New file.
126547         * tests/unistdio/test-ulc-printf1.h: New file.
126548         * tests/unistdio/test-ulc-vasnprintf1.c: New file.
126549         * tests/unistdio/test-ulc-vasnprintf2.c: New file.
126550         * tests/unistdio/test-ulc-vasnprintf2.sh: New file.
126551         * tests/unistdio/test-ulc-vasnprintf3.c: New file.
126552         * tests/unistdio/test-ulc-vasnprintf3.sh: New file.
126553         * tests/unistdio/test-ulc-vasprintf1.c: New file.
126554         * tests/unistdio/test-ulc-vsnprintf1.c: New file.
126555         * tests/unistdio/test-ulc-vsprintf1.c: New file.
126556         * tests/unistdio/test-u8-asnprintf1.c: New file.
126557         * tests/unistdio/test-u8-asnprintf1.h: New file.
126558         * tests/unistdio/test-u8-printf1.h: New file.
126559         * tests/unistdio/test-u8-vasnprintf1.c: New file.
126560         * tests/unistdio/test-u8-vasnprintf2.c: New file.
126561         * tests/unistdio/test-u8-vasnprintf2.sh: New file.
126562         * tests/unistdio/test-u8-vasnprintf3.c: New file.
126563         * tests/unistdio/test-u8-vasnprintf3.sh: New file.
126564         * tests/unistdio/test-u8-vasprintf1.c: New file.
126565         * tests/unistdio/test-u8-vsnprintf1.c: New file.
126566         * tests/unistdio/test-u8-vsprintf1.c: New file.
126567         * tests/unistdio/test-u16-asnprintf1.c: New file.
126568         * tests/unistdio/test-u16-asnprintf1.h: New file.
126569         * tests/unistdio/test-u16-printf1.h: New file.
126570         * tests/unistdio/test-u16-vasnprintf1.c: New file.
126571         * tests/unistdio/test-u16-vasnprintf2.c: New file.
126572         * tests/unistdio/test-u16-vasnprintf2.sh: New file.
126573         * tests/unistdio/test-u16-vasnprintf3.c: New file.
126574         * tests/unistdio/test-u16-vasnprintf3.sh: New file.
126575         * tests/unistdio/test-u16-vasprintf1.c: New file.
126576         * tests/unistdio/test-u16-vsnprintf1.c: New file.
126577         * tests/unistdio/test-u16-vsprintf1.c: New file.
126578         * tests/unistdio/test-u32-asnprintf1.c: New file.
126579         * tests/unistdio/test-u32-asnprintf1.h: New file.
126580         * tests/unistdio/test-u32-printf1.h: New file.
126581         * tests/unistdio/test-u32-vasnprintf1.c: New file.
126582         * tests/unistdio/test-u32-vasnprintf2.c: New file.
126583         * tests/unistdio/test-u32-vasnprintf2.sh: New file.
126584         * tests/unistdio/test-u32-vasnprintf3.c: New file.
126585         * tests/unistdio/test-u32-vasnprintf3.sh: New file.
126586         * tests/unistdio/test-u32-vasprintf1.c: New file.
126587         * tests/unistdio/test-u32-vsnprintf1.c: New file.
126588         * tests/unistdio/test-u32-vsprintf1.c: New file.
126589         * modules/unistdio/base: New file.
126590         * modules/unistdio/u-printf-args: New file.
126591         * modules/unistdio/ulc-asnprintf: New file.
126592         * modules/unistdio/ulc-asprintf: New file.
126593         * modules/unistdio/ulc-fprintf: New file.
126594         * modules/unistdio/ulc-printf-parse: New file.
126595         * modules/unistdio/ulc-snprintf: New file.
126596         * modules/unistdio/ulc-sprintf: New file.
126597         * modules/unistdio/ulc-vasnprintf: New file.
126598         * modules/unistdio/ulc-vasprintf: New file.
126599         * modules/unistdio/ulc-vfprintf: New file.
126600         * modules/unistdio/ulc-vsnprintf: New file.
126601         * modules/unistdio/ulc-vsprintf: New file.
126602         * modules/unistdio/u8-asnprintf: New file.
126603         * modules/unistdio/u8-asprintf: New file.
126604         * modules/unistdio/u8-printf-parse: New file.
126605         * modules/unistdio/u8-snprintf: New file.
126606         * modules/unistdio/u8-sprintf: New file.
126607         * modules/unistdio/u8-vasnprintf: New file.
126608         * modules/unistdio/u8-vasprintf: New file.
126609         * modules/unistdio/u8-vsnprintf: New file.
126610         * modules/unistdio/u8-vsprintf: New file.
126611         * modules/unistdio/u8-u8-asnprintf: New file.
126612         * modules/unistdio/u8-u8-asprintf: New file.
126613         * modules/unistdio/u8-u8-snprintf: New file.
126614         * modules/unistdio/u8-u8-sprintf: New file.
126615         * modules/unistdio/u8-u8-vasnprintf: New file.
126616         * modules/unistdio/u8-u8-vasprintf: New file.
126617         * modules/unistdio/u8-u8-vsnprintf: New file.
126618         * modules/unistdio/u8-u8-vsprintf: New file.
126619         * modules/unistdio/u16-asnprintf: New file.
126620         * modules/unistdio/u16-asprintf: New file.
126621         * modules/unistdio/u16-printf-parse: New file.
126622         * modules/unistdio/u16-snprintf: New file.
126623         * modules/unistdio/u16-sprintf: New file.
126624         * modules/unistdio/u16-vasnprintf: New file.
126625         * modules/unistdio/u16-vasprintf: New file.
126626         * modules/unistdio/u16-vsnprintf: New file.
126627         * modules/unistdio/u16-vsprintf: New file.
126628         * modules/unistdio/u16-u16-asnprintf: New file.
126629         * modules/unistdio/u16-u16-asprintf: New file.
126630         * modules/unistdio/u16-u16-snprintf: New file.
126631         * modules/unistdio/u16-u16-sprintf: New file.
126632         * modules/unistdio/u16-u16-vasnprintf: New file.
126633         * modules/unistdio/u16-u16-vasprintf: New file.
126634         * modules/unistdio/u16-u16-vsnprintf: New file.
126635         * modules/unistdio/u16-u16-vsprintf: New file.
126636         * modules/unistdio/u32-asnprintf: New file.
126637         * modules/unistdio/u32-asprintf: New file.
126638         * modules/unistdio/u32-printf-parse: New file.
126639         * modules/unistdio/u32-snprintf: New file.
126640         * modules/unistdio/u32-sprintf: New file.
126641         * modules/unistdio/u32-vasnprintf: New file.
126642         * modules/unistdio/u32-vasprintf: New file.
126643         * modules/unistdio/u32-vsnprintf: New file.
126644         * modules/unistdio/u32-vsprintf: New file.
126645         * modules/unistdio/u32-u32-asnprintf: New file.
126646         * modules/unistdio/u32-u32-asprintf: New file.
126647         * modules/unistdio/u32-u32-snprintf: New file.
126648         * modules/unistdio/u32-u32-sprintf: New file.
126649         * modules/unistdio/u32-u32-vasnprintf: New file.
126650         * modules/unistdio/u32-u32-vasprintf: New file.
126651         * modules/unistdio/u32-u32-vsnprintf: New file.
126652         * modules/unistdio/u32-u32-vsprintf: New file.
126653         * modules/unistdio/ulc-asnprintf-tests: New file.
126654         * modules/unistdio/ulc-vasnprintf-tests: New file.
126655         * modules/unistdio/ulc-vasprintf-tests: New file.
126656         * modules/unistdio/ulc-vsnprintf-tests: New file.
126657         * modules/unistdio/ulc-vsprintf-tests: New file.
126658         * modules/unistdio/u8-asnprintf-tests: New file.
126659         * modules/unistdio/u8-vasnprintf-tests: New file.
126660         * modules/unistdio/u8-vasprintf-tests: New file.
126661         * modules/unistdio/u8-vsnprintf-tests: New file.
126662         * modules/unistdio/u8-vsprintf-tests: New file.
126663         * modules/unistdio/u16-asnprintf-tests: New file.
126664         * modules/unistdio/u16-vasnprintf-tests: New file.
126665         * modules/unistdio/u16-vasprintf-tests: New file.
126666         * modules/unistdio/u16-vsnprintf-tests: New file.
126667         * modules/unistdio/u16-vsprintf-tests: New file.
126668         * modules/unistdio/u32-asnprintf-tests: New file.
126669         * modules/unistdio/u32-vasnprintf-tests: New file.
126670         * modules/unistdio/u32-vasprintf-tests: New file.
126671         * modules/unistdio/u32-vsnprintf-tests: New file.
126672         * modules/unistdio/u32-vsprintf-tests: New file.
126673         * MODULES.html.sh (Unicode string functions): Add the new modules.
126675 2007-07-01  Bruno Haible  <bruno@clisp.org>
126677         * lib/sprintf.c (sprintf): Limit the available length estimation,
126678         to avoid address wraparound.
126679         * lib/vsprintf.c (vsprintf): Likewise.
126680         * modules/sprintf-posix (Dependencies): Add stdint.
126681         * modules/vsprintf-posix (Dependencies): Likewise.
126683 2007-07-01  Bruno Haible  <bruno@clisp.org>
126685         * gnulib-tool (self_abspathname): Determine PATH_SEPARATOR and handle
126686         Windows PATH as well. Conservative double-quoting. Comments.
126688 2007-07-01  Bruno Haible  <bruno@clisp.org>
126689             Eric Blake  <ebb9@byu.net>
126690             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
126692         * gnulib-tool (self_abspathname): Fix algorithm to cope with
126693         empty components in $PATH, denoting '.'.
126695 2007-07-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
126697         * gnulib-tool: Fix indentation.
126698         (func_create_megatestdir): Likewise.
126699         Report by Bruno Haible.
126701 2007-06-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
126703         Sync from Automake.
126704         * build-aux/gnupload: Fix shell portability issues with for loops.
126705         Report by Karl Berry.
126707 2007-06-29  Simon Josefsson  <simon@josefsson.org>
126709         * build-aux/maint.mk (POURL): Use translationproject.org.
126711 2007-06-27  Simon Josefsson  <simon@josefsson.org>
126712             Bruno Haible  <bruno@clisp.org>
126714         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Require gl_HEADER_SYS_SOCKET
126715         before using HAVE_WS2TCPIP_H. Check for gai_strerror through an
126716         explicit link test, rather than AC_REPLACE_FUNCS - for mingw.
126717         (gl_PREREQ_GETADDRINFO): Require gl_HEADER_SYS_SOCKET before using
126718         HAVE_SYS_SOCKET_H and HAVE_WS2TCPIP_H.
126720 2007-06-27  Bruno Haible  <bruno@clisp.org>
126722         * build-aux/config.rpath: Upgrade to libtool-1.5.24.
126723         * build-aux/config.libpath: Upgrade to libtool-1.5.24.
126725 2007-06-26  Karl Berry  <karl@gnu.org>
126727         * MODULES.html.sh: remove xreadlink-with-size.
126729 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
126731         * lib/time_.h: Port to Solaris 8 with Sun Studio 11, using a
126732         method that I hope also handles the double-include problem noted
126733         by Bruno Haible in
126734         <http://lists.gnu.org/r/bug-gnulib/2007-05/msg00186.html>.
126736 2007-06-23  Bruno Haible  <bruno@clisp.org>
126738         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
126739         Don't let the 'mostlyclean' target fail if the last subdirectory could
126740         not be removed.
126741         Reported by Karl Berry.
126743 2007-06-23  Bruno Haible  <bruno@clisp.org>
126745         * gnulib-tool (echo): Add a speedier workaround for ksh.
126746         * tests/test-echo.sh: Likewise.
126748 2007-06-23  Bruno Haible  <bruno@clisp.org>
126750         * gnulib-tool (echo): Add workarounds also for bash versions < 2.04.
126751         * tests/test-echo.sh: Likewise.
126753 2007-06-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
126755         * gnulib-tool (IFS): Initialize early, so we don't set it to
126756         empty later.
126757         (self_abspathname): Rewrite algorithm to set it, reindent.
126758         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am)
126759         (func_create_megatestdir): Merge some sed scripts.
126761 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
126763         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Check some typos
126764         exposed by Sun Studio 11 cc on Solaris 8.
126766 2007-06-22  Bruno Haible  <bruno@clisp.org>
126768         * gnulib-tool (echo): Ensure the echo primitive does not interpret
126769         backslashes.
126770         * tests/test-echo.sh: New file.
126772 2007-06-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
126774         * gnulib-tool (func_add_or_update, func_create_testdir): Do not
126775         simplify `sed_replace_build_aux' scripts, they are portable but
126776         echoing them with `echo' is not.
126777         Report and analysis by Fernando Ferreira <fernando.prog@netcabo.pt>.
126779 2007-06-21  Karl Berry  <karl@gnu.org>
126781         * config/srclist.txt: guess we can't handle the licenses via
126782         srclist at the moment.
126784 2007-06-21  Paul Eggert  <eggert@cs.ucla.edu>
126786         * MODULES.html.sh: Add include_next.
126787         * modules/include_next: New file.
126789 2007-06-20  Paul Eggert  <eggert@cs.ucla.edu>
126791         * m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
126792         INCLUDE_NEXT.
126793         (gl_CHECK_NEXT_HEADERS): New macro.
126794         * m4/fcntl_h.m4 (gl_FCNTL_H): use gl_CHECK_NEXT_HEADERS instead of
126795         the obsolescent gl_ABSOLUTE_HEADER.
126796         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
126797         * m4/float_h.m4 (gl_FLOAT_H): Likewise.
126798         * m4/iconv_h.m4 (gl_ICONV_H): Likewise.
126799         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
126800         * m4/locale_h.m4 (gl_LOCALE_H): Likewise.
126801         * m4/math_h.m4 (gl_MATH_H): Likewise.
126802         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Likewise.
126803         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
126804         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
126805         * m4/stdint.m4 (gl_STDINT_H): Likewise.
126806         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
126807         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
126808         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Likewise.
126809         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
126810         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
126811         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
126812         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Likewise.
126813         * m4/sysexits.m4 (gl_SYSEXITS): Likewise.
126814         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Likewise.
126815         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
126816         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
126817         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
126818         * m4/inttypes.m4 (gl_INTTYPES_H): Define
126819         _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H to avoid the problem of unclean
126820         builds, since ABSOLUTE_INTTYPES_H is no longer being defined.
126821         * m4/stdint.m4 (gl_STDINT_H): Likewise, for
126822         _GL_JUST_INCLUDE_SYSTEM_STDINT_H.
126823         * lib/fcntl_.h: Use @INCLUDE_NEXT@ @NEXT_foo_H@
126824         rather than @HAVE_INCLUDE_NEXT@ and @ABSOLUTE_foo_H@.
126825         * lib/float_.h: Likewise.
126826         * lib/inttypes_.h: Likewise.
126827         * lib/math_.h: Likewise.
126828         * lib/search_.h: Likewise.
126829         * lib/signal_.h: Likewise.
126830         * lib/stdint_.h: Likewise.
126831         * lib/stdio_.h: Likewise.
126832         * lib/stdlib_.h: Likewise.
126833         * lib/string_.h: Likewise.
126834         * lib/sys_stat_.h: Likewise.
126835         * lib/sys_time_.h: Likewise.
126836         * lib/time_.h: Likewise.
126837         * lib/unistd_.h: Likewise.
126838         * lib/wchar_.h: Likewise.
126839         * lib/wctype_.h: Likewise.
126840         * lib/dirent_.h: Likewise.
126841         * lib/iconv_.h: Likewise.
126842         * lib/locale_.h: Likewise.
126843         * lib/netinet_in_.h: Likewise.
126844         * lib/sys_select_.h: Likewise.
126845         * lib/sys_socket_.h: Likewise.
126846         * lib/sysexits_.h: Likewise.
126847         * modules/fcntl (Depends-on): Depend on include_next, not
126848         absolute_header.
126849         (Makefile): Substitute INCLUDE_NEXT and NEXT_foo_H, not
126850         HAVE_INCLUDE_NEXT and ABSOLUTE_foo_H.
126851         * modules/fchdir: Likewise.
126852         * modules/float: Likewise.
126853         * modules/iconv_open: Likewise.
126854         * modules/inttypes: Likewise.
126855         * modules/locale: Likewise.
126856         * modules/math: Likewise.
126857         * modules/netinet_in: Likewise.
126858         * modules/search: Likewise.
126859         * modules/signal: Likewise.
126860         * modules/stdint: Likewise.
126861         * modules/stdio: Likewise.
126862         * modules/stdlib: Likewise.
126863         * modules/string: Likewise.
126864         * modules/sys_select: Likewise.
126865         * modules/sys_socket: Likewise.
126866         * modules/sys_stat: Likewise.
126867         * modules/sys_time: Likewise.
126868         * modules/sysexits: Likewise.
126869         * modules/time: Likewise.
126870         * modules/unistd: Likewise.
126871         * modules/wchar: Likewise.
126872         * modules/wctype: Likewise.
126873         * modules/sys_stat: Change maintainer to "all".
126874         * modules/unistd: Likewise.
126876 2007-06-20  Karl Berry  <karl@gnu.org>
126878         * config/srclist.txt: track www changes in license files.
126880 2007-06-20  Sergey Poznyakoff  <gray@gnu.org.ua>
126882         * build-aux/bootstrap: Remove stray dot.
126883         Make sure build_aux settings are honored when linking
126884         gnulib_extra_files.
126886 2007-06-19  Eric Blake  <ebb9@byu.net>
126888         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
126889         Allow compilation on cygwin.
126891 2007-06-19  Jim Meyering  <jim@meyering.net>
126893         xreadlink-with-size: Remove module.  No longer used.
126894         Ex-callers now use xreadlink or mreadlink-with-size.
126895         * modules/xreadlink-with-size: Remove module.
126896         * lib/xreadlink-with-size.c: Remove file.
126897         * lib/xreadlink.h (xreadlink_with_size): Remove prototype.
126898         (xreadlink): Remove inaccurate comment.  The one in xreadlink.c,
126899         just before the function definition *is* accurate.
126901         Eliminate one way canonicalize_filename_mode could exit.
126902         * lib/canonicalize.c (canonicalize_filename_mode):
126903         Use mreadlink_with_size, not xreadlink_with_size.
126905 2007-06-18  Paul Eggert  <eggert@cs.ucla.edu>
126907         Detect porting problems to FreeBSD/arm, which has time_t wider than
126908         long int.  Original problem reported for GNU diff by Xin Li in
126909         <http://lists.gnu.org/r/bug-gnu-utils/2007-06/msg00091.html>.
126910         * modules/getdate (Depends-on): Add intprops, verify.
126911         * lib/getdate.y: Include intprops.h, verify.h.  Verify that time_t
126912         is an integer type no wider than long int.
126914 2007-06-18  Jim Meyering  <jim@meyering.net>
126916         New module: mreadlink-with-size.
126917         * MODULES.html.sh: Add mreadlink-with-size.
126918         * modules/mreadlink-with-size: New module
126919         * modules/canonicalize (Depends-on): Depend on mreadlink-with-size,
126920         not xreadlink-with-size.
126921         * lib/mreadlink-with-size.c, lib/mreadlink.h: New files.
126923 2007-06-16  Bruno Haible  <bruno@clisp.org>
126925         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Catch the MacOS X 10.4 bug.
126926         * doc/functions/frexpl.texi: Document the MacOS X 10.4 bug.
126927         Reported by Gary V. Vaughan <gary@gnu.org>.
126929 2007-06-15  Paul Eggert  <eggert@cs.ucla.edu>
126931         Revamp lchown so that it lives in unistd.h where it belongs.
126932         * lib/lchown.h: Remove.
126933         * lib/dirchownmod.c: Don't include lib/lchown.h.
126934         * lib/fchownat.c: Likewise.
126935         * lib/openat.c: Likewise.
126936         * lib/lchown.c (REPLACE_CHOWN): Define to 0 if the system chown
126937         does not follow symlinks.
126938         (EOPNOTSUPP): Define if not defined.
126939         * lib/unistd_.h (chown): Do not replace if REPLADE_CHOWN
126940         is defined to 0.
126941         (lchown): New decl.
126942         * m4/lchown.m4 (gl_FUNC_LCHOWN): Require gl_UNISTD_H_DEFAULTS.
126943         Do not check for lchown decl.
126944         Set REPLACE_LCHOWN.
126945         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set GNULIB_LCHOWN,
126946         REPLACE_LCHOWN.
126947         * modules/chown: Make it clear it follows symlinks.
126948         * modules/lchown: Make it clear it doesn't follow symlinks.
126949         (Files): Remove lib/lchown.h
126950         (Depends-on): Add unistd.
126951         (configure.ac): Add gl_UNISTD_MODULE_INDICATOR([lchown]).
126952         (Include): Include <unistd.h>, not "lchown.h".
126953         * modules/unistd (unistd.h): Substitude GNULIB_LCHOWN and
126954         REPLACE_LCHOWN.
126956 2007-06-15  Jim Meyering  <jim@meyering.net>
126958         Change license (GPL to LGPL) of fsusage and dependents.
126959         * modules/fsusage (License): Change to LGPL.
126960         * modules/full-read (License): Likewise.
126961         * modules/full-write (License): Likewise.
126962         * modules/safe-read (License): Likewise.
126963         * modules/safe-write (License): Likewise.
126965 2007-06-14  Ben Pfaff  <blp@gnu.org>
126967         Missing part of allocsa -> malloca transition.
126968         * modules/relocatable-prog-wrapper: gl_ALLOCSA should be
126969         gl_MALLOCA.
126971 2007-06-12  Bruno Haible  <bruno@clisp.org>
126973         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Guess no when cross-compiling
126974         to ia64, x86_64, i386.
126975         Reported by Eric Blake.
126977 2007-06-12  Bruno Haible  <bruno@clisp.org>
126979         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Guess no also when
126980         cross-compiling to x86_64.
126982 2007-06-12  Paul Eggert  <eggert@cs.ucla.edu>
126984         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Fix POSIX sed portability
126985         glitch reported by Ralf Wildenhues in
126986         <http://lists.gnu.org/r/bug-gnulib/2007-06/msg00114.html>.
126988         * m4/regex.m4 (gl_REGEX): Catch a bug with [[:alnum:]_-] reported by
126989         Vin Shelton.
126991 2007-06-11  Bruno Haible  <bruno@clisp.org>
126993         * lib/printf-args.c (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Fix NULL
126994         replacement string.
126995         Reported by Eric Blake.
126997 2007-06-10  Bruno Haible  <bruno@clisp.org>
126999         Prepare vasnprintf code for use with Unicode strings.
127000         * lib/printf-args.h (PRINTF_FETCHARGS): New macro.
127001         (arg_type) [ENABLE_UNISTDIO]: Define TYPE_U8_STRING, TYPE_U16_STRING,
127002         TYPE_U32_STRING.
127003         (argument) [ENABLE_UNISTDIO]: Add a_u8_string, a_u16_string,
127004         a_u32_string variants.
127005         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
127006         * lib/printf-args.c: Don't include config.h and the specification
127007         header if PRINTF_FETCHARGS is already defined.
127008         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
127009         (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Add code for TYPE_U8_STRING,
127010         TYPE_U16_STRING, TYPE_U32_STRING.
127011         * lib/printf-parse.h [ENABLE_UNISTDIO] (u8_directive, u8_directives,
127012         u16_directive, u16_directives, u32_directive, u32_directives): New
127013         types.
127014         (ulc_printf_parse, u8_printf_parse, u16_printf_parse, u32_printf_parse):
127015         New declarations.
127016         * lib/printf-parse.c: Don't include config.h and the specification
127017         header if PRINTF_PARSE is already defined. Eliminate the set of
127018         parameters for WIDE_CHAR_VERSION; the user of this file must provide
127019         them now. Include c-ctype.h.
127020         (PRINTF_PARSE) [ENABLE_UNISTDIO]: Add code implementing the 'U'
127021         directive and CHAR_T_ONLY_ASCII.
127022         * lib/vasnprintf.c: Don't include config.h and the specification header
127023         if VASNPRINTF is already defined.
127024         (DCHAR_IS_TCHAR, DCHAR_CPY): New macros.
127025         (VASNPRINTF): Use PRINTF_FETCHARGS instead of printf_fetchargs. Use
127026         DCHAR_CPY. Handle the case that DCHAR_T and FCHAR_T are not the same
127027         type. Handle the case that TCHAR_T and FCHAR_T are not of the same
127028         size. Handle the case that DCHAR_T and TCHAR_T are not the same type,
127029         add a conversion from TCHAR_T[] to DCHAR_T[], and rework the padding
127030         code accordingly.
127031         (VASNPRINTF) [ENABLE_UNISTDIO]: Implement the 'U' directive. Enable
127032         pad_ourselves also in this case, with the 'c' and 's' directives, and
127033         with a different notion of "width".
127034         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): New macros.
127036 2007-06-10  Bruno Haible  <bruno@clisp.org>
127038         * modules/unistr/u32-mbsnlen: New file.
127039         * lib/unistr/u32-mbsnlen.c: New file.
127041         * modules/unistr/u16-mbsnlen: New file.
127042         * lib/unistr/u16-mbsnlen.c: New file.
127044         * modules/unistr/u8-mbsnlen: New file.
127045         * lib/unistr/u8-mbsnlen.c: New file.
127047         * lib/unistr.h (u8_mbsnlen, u16_mbsnlen, u32_mbsnlen): New
127048         declarations.
127050 2007-06-10  Bruno Haible  <bruno@clisp.org>
127052         * lib/string_.h (mbsnlen): New declaration.
127053         * lib/mbsnlen.c: New file.
127054         * m4/mbsnlen.m4: New file.
127055         * modules/mbsnlen: New file.
127056         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Set GNULIB_MBSNLEN.
127057         * modules/string (string.h): Substitute GNULIB_MBSNLEN.
127058         * MODULES.html.sh (Internationalization functions): Add mbsnlen.
127060 2007-06-10  Bruno Haible  <bruno@clisp.org>
127062         * lib/mbslen.c: Include <stdlib.h>, needed for MB_CUR_MAX.
127064 2007-06-10  Bruno Haible  <bruno@clisp.org>
127066         * lib/mbiter.h: Include <stddef.h>, needed for ptrdiff_t.
127067         * lib/mbuiter.h: Likewise.
127069 2007-06-10  Bruno Haible  <bruno@clisp.org>
127071         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Check for _snprintf
127072         declaration.
127074 2007-06-10  Karl Berry  <karl@gnu.org>
127076         * config/srclist.txt: remove gettext entries, Bruno prefers
127077         to update individually.
127079 2007-06-10  Bruno Haible  <bruno@clisp.org>
127081         * lib/vasnprintf.c (VASNPRINTF) [!USE_SNPRINTF]: Remove variable
127082         'maxlen'. Ensure only length + width bytes are allocated, not
127083         length + 1 + width.
127085 2007-06-09  Bruno Haible  <bruno@clisp.org>
127087         * lib/vasnprintf.c (FCHAR_T, DCHAR_T, TCHAR_T): New macros.
127088         (CHAR_T): Remove macro.
127089         (VASNPRINTF): Update.
127091 2007-06-09  Bruno Haible  <bruno@clisp.org>
127093         * MODULES.html.sh (Unicode string functions): Add the new modules.
127095         * modules/uniconv/u32-conv-to-enc: New file.
127096         * lib/uniconv/u32-conv-to-enc.c: New file.
127097         * modules/uniconv/u32-conv-to-enc-tests: New file.
127098         * tests/uniconv/test-u32-conv-to-enc.c: New file.
127100         * modules/uniconv/u16-conv-to-enc: New file.
127101         * lib/uniconv/u16-conv-to-enc.c: New file.
127102         * lib/uniconv/u-conv-to-enc.h: New file.
127103         * modules/uniconv/u16-conv-to-enc-tests: New file.
127104         * tests/uniconv/test-u16-conv-to-enc.c: New file.
127106         * modules/uniconv/u8-conv-to-enc: New file.
127107         * lib/uniconv/u8-conv-to-enc.c: New file.
127108         * modules/uniconv/u8-conv-to-enc-tests: New file.
127109         * tests/uniconv/test-u8-conv-to-enc.c: New file.
127111         * lib/uniconv.h (u8_conv_to_encoding, u16_conv_to_encoding,
127112         u32_conv_to_encoding): New declarations.
127114 2007-06-09  Bruno Haible  <bruno@clisp.org>
127116         * tests/uniconv/test-u32-strconv-to-enc.c (main): Remove unused code.
127118 2007-06-09  Bruno Haible  <bruno@clisp.org>
127120         Rename 'allocsa' -> 'malloca', 'freesa' -> 'freea'.
127121         * modules/malloca: Renamed from modules/allocsa, updated.
127122         * lib/malloca.h: Renamed from lib/allocsa.h, updated.
127123         * lib/malloca.c: Renamed from lib/allocsa.c, updated.
127124         * lib/malloca.valgrind: Renamed from lib/allocsa.valgrind, updated.
127125         * m4/malloca.m4: Renamed from m4/allocsa.m4, updated.
127126         * modules/malloca-tests: Renamed from modules/allocsa-tests, updated.
127127         * tests/test-malloca.c: Renamed from tests/test-allocsa.c, updated.
127128         * modules/xmalloca: Renamed from modules/xallocsa, updated.
127129         * lib/xmalloca.h: Renamed from lib/xallocsa.h, updated.
127130         * lib/xmalloca.c: Renamed from lib/xallocsa.c, updated.
127131         * modules/c-strcasestr (Depends-on): Update.
127132         * lib/c-strcasestr.c: Update.
127133         * modules/c-strstr (Depends-on): Update.
127134         * lib/c-strstr.c: Update.
127135         * modules/canonicalize-lgpl (Depends-on): Update.
127136         * lib/canonicalize-lgpl.c: Update.
127137         * modules/clean-temp (Depends-on): Update.
127138         * lib/clean-temp.c: Update.
127139         * modules/csharpcomp (Depends-on): Update.
127140         * lib/csharpcomp.c: Update.
127141         * modules/csharpexec (Depends-on): Update.
127142         * lib/csharpexec.c: Update.
127143         * modules/javacomp (Depends-on): Update.
127144         * lib/javacomp.c: Update.
127145         * modules/javaexec (Depends-on): Update.
127146         * lib/javaexec.c: Update.
127147         * modules/mbscasestr (Depends-on): Update.
127148         * lib/mbscasestr.c: Update.
127149         * modules/mbsstr (Depends-on): Update.
127150         * lib/mbsstr.c: Update.
127151         * modules/setenv (Depends-on): Update.
127152         * lib/setenv.c: Update.
127153         * modules/strcasestr (Depends-on): Update.
127154         * lib/strcasestr.c: Update.
127155         * modules/striconveha (Depends-on): Update.
127156         * lib/striconveha.c: Update.
127157         * modules/relocatable-prog-wrapper (Files): Update.
127158         * lib/relocwrapper.c: Update.
127159         * build-aux/install-reloc: Update.
127160         * MODULES.html.sh (Memory management functions <stdlib.h>): Update.
127162 2007-06-08  Bruno Haible  <bruno@clisp.org>
127164         Port to uClibc.
127165         * lib/fbufmode.c (fbufmode): Add special code for uClibc.
127166         * lib/fpurge.c (fpurge): Likewise.
127167         * lib/freading.c (freading): Likewise.
127168         * lib/fseeko.c (rpl_fseeko): Likewise.
127169         * lib/fseterr.c (fseterr): Likewise.
127170         * lib/fwriting.c (fwriting): Likewise.
127171         * tests/test-fflush.c (main): Avoid a failure on uClibc.
127173 2007-06-08  Bruno Haible  <bruno@clisp.org>
127175         * m4/intlmacosx.m4: New file, extracted from gettext.m4.
127176         * m4/gettext.m4 (gt_INTL_MACOSX): Remove macro, moved to intlmacosx.m4.
127177         * modules/gettext (Files): Add m4/intlmacosx.m4.
127179 2007-06-07  Bruno Haible  <bruno@clisp.org>
127181         * modules/localename-tests: New file.
127182         * tests/test-localename.c: New file.
127184         New module 'localename'.
127185         * lib/localename.h: New file.
127186         * lib/localename.c: New file, from GNU gettext.
127187         * m4/localename.m4: New file.
127188         * modules/localename: New file.
127190 2007-06-07  Bruno Haible  <bruno@clisp.org>
127192         Work around the lack of <wchar.h> on some builds of uClibc.
127193         * doc/headers/wchar.texi: Update.
127194         * lib/wchar_.h: Include <wchar.h> only if it exists.
127195         * m4/wchar.m4 (gl_WCHAR_H): Check for <wchar.h>. Set HAVE_WCHAR_H.
127196         * m4/stdint.m4 (gl_STDINT_H): Check for <wchar.h>.
127197         (gl_STDINT_TYPE_PROPERTIES): Don't try to include <wchar.h> if it
127198         doesn't exist.
127199         * modules/wchar (wchar.h): Substitute HAVE_WCHAR_H.
127200         * modules/mbfile (Depends-on): Add wchar.
127201         * modules/mbiter (Depends-on): Likewise.
127202         * modules/mbuiter (Depends-on): Likewise.
127203         Reported by Simon Josefsson.
127205 2007-06-06  Paul Eggert  <eggert@cs.ucla.edu>
127207         Work around problem reported by Steven M. Schweda in
127208         <http://lists.gnu.org/r/bug-tar/2007-06/msg00002.html>:
127209         Tru64 5.1B with the Compaq compiler environment installed declares
127210         an 'isblank' function but does not define it in the C library.
127211         * lib/fnmatch.c (isblank): Check for HAVE_ISBLANK, too.
127212         * lib/regex_internal.h (isblank): Likewise.
127213         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for isblank existence.
127214         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
127216 2007-06-05  Bruno Haible  <bruno@clisp.org>
127218         Fix *printf so that it recognizes non-IEEE numbers on i386, x86_64,
127219         ia64.
127220         * modules/printf-safe: New file.
127221         * modules/fprintf-posix (Depends-on): Add printf-safe.
127222         * modules/printf-posix (Depends-on): Likewise.
127223         * modules/snprintf-posix (Depends-on): Likewise.
127224         * modules/sprintf-posix (Depends-on): Likewise.
127225         * modules/vasnprintf-posix (Depends-on): Likewise.
127226         * modules/vasprintf-posix (Depends-on): Likewise.
127227         * modules/vfprintf-posix (Depends-on): Likewise.
127228         * modules/vprintf-posix (Depends-on): Likewise.
127229         * modules/vsnprintf-posix (Depends-on): Likewise.
127230         * modules/vsprintf-posix (Depends-on): Likewise.
127231         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Require
127232         AC_C_BIGENDIAN. Define CHECK_PRINTF_SAFE if printf-safe is used. Test
127233         non-IEEE numbers on i386, x86_64, ia64. When cross-compiling, guess
127234         "no" on i386, x86_64, ia64.
127235         * tests/test-snprintf-posix.h (LDBL80_WORDS): New macro.
127236         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
127237         on i386, x86_64, ia64.
127238         * tests/test-sprintf-posix.h (LDBL80_WORDS): New macro.
127239         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
127240         on i386, x86_64, ia64.
127241         * tests/test-vasnprintf-posix.c: Include float.h.
127242         (LDBL80_WORDS): New macro.
127243         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
127244         on i386, x86_64, ia64.
127245         * tests/test-vasprintf-posix.c: Include float.h.
127246         (LDBL80_WORDS): New macro.
127247         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
127248         on i386, x86_64, ia64.
127249         * tests/test-snprintf-posix.c: Include float.h.
127250         * tests/test-sprintf-posix.c: Likewise.
127251         * tests/test-vsnprintf-posix.c: Likewise.
127252         * tests/test-vsprintf-posix.c: Likewise.
127254 2007-06-05  Bruno Haible  <bruno@clisp.org>
127256         Fix isnanl so that it recognizes non-IEEE numbers on i386, x86_64, ia64.
127257         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Require AC_C_BIGENDIAN. Test
127258         non-IEEE numbers on i386, x86_64, ia64.
127259         (gl_LONG_DOUBLE_EXPONENT_LOCATION): Require AC_C_BIGENDIAN.
127260         * lib/isnan.c (FUNC): Add special code for i386, x86_64, ia64.
127261         * tests/test-isnanl.h: Include float.h.
127262         (main): Check also non-IEEE numbers on i386, x86_64, ia64.
127264 2007-06-05  Bruno Haible  <bruno@clisp.org>
127266         * lib/vasnprintf.c (VASNPRINTF): Do the extra handling of NaN and Inf
127267         also the %a / %A. Handle the %a / %A code before this extra handling.
127269 2007-06-05  Bruno Haible  <bruno@clisp.org>
127271         * lib/vasnprintf.c [NEED_PRINTF_LONG_DOUBLE ||
127272         NEED_PRINTF_INFINITE_LONG_DOUBLE]: Include fpucw.h.
127274 2007-06-05  Bruno Haible  <bruno@clisp.org>
127276         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): Fix
127277         typo in variable name.
127279 2007-06-05  Eric Blake  <ebb9@byu.net>
127281         * m4/lseek.m4 (gl_FUNC_LSEEK): Work when cross-compiling.
127282         Reported by Simon Josefsson.
127284 2007-06-04  Bruno Haible  <bruno@clisp.org>
127286         Avoid test failures on some PowerPC platforms.
127287         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP):
127288         Define differently for PowerPC.
127289         * tests/test-frexpl.c (MIN_NORMAL_EXP): Likewise.
127290         Reported by Gary V. Vaughan <gary@gnu.org>.
127292 2007-06-02  Bruno Haible  <bruno@clisp.org>
127294         Fix test-stdint failure on FreeBSD/ia64.
127295         * m4/stdint.m4 (gl_STDINT_H): Check the values of PTRDIFF_MIN,
127296         PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN,
127297         WCHAR_MAX, WINT_MIN, WINT_MAX entirely, not only for plausibility.
127298         * doc/headers/stdint.texi: Update.
127300 2007-06-01  Bruno Haible  <bruno@clisp.org>
127302         * tests/test-binary-io.c (main): Pass a third argument to open().
127303         Reported by Gary V. Vaughan <gary@gnu.org>.
127305 2007-06-01  Bruno Haible  <bruno@clisp.org>
127307         * doc/functions/frexpl.texi: Update for mingw.
127309 2007-06-01  Bruno Haible  <bruno@clisp.org>
127311         * tests/test-lseek.c (main): Disable test of errno for invalid third
127312         argument.
127313         * doc/functions/lseek.texi: Update.
127314         Reported by Gary V. Vaughan <gary@gnu.org>.
127316 2007-05-28  Bruno Haible  <bruno@clisp.org>
127318         * m4/intl.m4 (AM_INTL_SUBDIR): Substitute variables WOE32, WINDRES.
127320 2007-05-31  Eric Blake  <ebb9@byu.net>
127322         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Guess no on mingw when
127323         cross compiling.
127325 2007-05-30  Eric Blake  <ebb9@byu.net>
127326         and Bruno Haible  <bruno@clisp.org>
127328         Work around mingw test failures exposed by m4-1.4.9b.
127329         * m4/stdint.m4 (gl_STDINT_H): Detect mingw bug.
127330         * tests/test-unistd.c: Disable uid_t and git_t tests for the
127331         moment.
127333 2007-05-30  Bruno Haible  <bruno@clisp.org>
127335         * tests/test-lseek.c: Explicitly close file descriptors 0 and 1 before
127336         assuming that they are closed. Needed on HP-UX 11.
127338 2007-05-29  Bruno Haible  <bruno@clisp.org>
127340         Fix a problem with #include_next.
127341         * lib/dirent_.h: Split the double-inclusion guard.
127342         * lib/fcntl_.h: Likewise.
127343         * lib/float_.h: Likewise.
127344         * lib/iconv_.h: Likewise.
127345         * lib/inttypes_.h: Likewise.
127346         * lib/locale_.h: Likewise.
127347         * lib/math_.h: Likewise.
127348         * lib/netinet_in_.h: Likewise.
127349         * lib/search_.h: Likewise.
127350         * lib/signal_.h: Likewise.
127351         * lib/stdint_.h: Likewise.
127352         * lib/stdio_.h: Likewise.
127353         * lib/stdlib_.h: Likewise.
127354         * lib/string_.h: Likewise.
127355         * lib/sys_select_.h: Likewise.
127356         * lib/sys_socket_.h: Likewise.
127357         * lib/sys_stat_.h: Likewise.
127358         * lib/sys_time_.h: Likewise.
127359         * lib/sysexits_.h: Likewise.
127360         * lib/time_.h: Likewise.
127361         * lib/unistd_.h: Likewise.
127362         * lib/wchar_.h: Likewise.
127363         * lib/wctype_.h: Likewise.
127365 2007-05-29  Bruno Haible  <bruno@clisp.org>
127367         * tests/test-unistd.c: Disable the tests for useconds_t and intptr_t
127368         for the moment.
127370 2007-05-29  Bruno Haible  <bruno@clisp.org>
127372         * m4/isnan.m4 (gl_DOUBLE_EXPONENT_LOCATION): Silence the AC_C_BIGENDIAN
127373         invocation.
127374         Reported by Eric Blake.
127376 2007-05-29  Bruno Haible  <bruno@clisp.org>
127378         * m4/isnanf.m4 (gl_FLOAT_EXPONENT_LOCATION): Fix typo in cross-
127379         compiling case.
127381 2007-05-29  Eric Blake  <ebb9@byu.net>
127382             Bruno Haible  <bruno@clisp.org>
127384         * m4/isnanf.m4 (gl_FUNC_ISNANF_NO_LIBM): Avoid syntax error on
127385         cross compiles.
127387 2007-05-28  Eric Blake  <ebb9@byu.net>
127389         * modules/closein-tests (test_closein_LDADD): Support test on
127390         cygwin with libtool.
127392 2007-05-28  Bruno Haible  <bruno@clisp.org>
127394         * tests/uniconv/test-u16-conv-from-enc.c: Remove #ifdef HAVE_CONFIG_H.
127395         * tests/uniconv/test-u16-strconv-from-enc.c: Likewise.
127396         * tests/uniconv/test-u16-strconv-to-enc.c: Likewise.
127397         * tests/uniconv/test-u32-conv-from-enc.c: Likewise.
127398         * tests/uniconv/test-u32-strconv-from-enc.c: Likewise.
127399         * tests/uniconv/test-u32-strconv-to-enc.c: Likewise.
127400         * tests/uniconv/test-u8-conv-from-enc.c: Likewise.
127401         * tests/uniconv/test-u8-strconv-from-enc.c: Likewise.
127402         * tests/uniconv/test-u8-strconv-to-enc.c: Likewise.
127404 2007-05-28  Eric Blake  <ebb9@byu.net>
127406         Unconditionally include <config.h> in unit tests.
127407         * tests/test-alloca-opt.c: Remove #ifdef HAVE_CONFIG_H.
127408         * tests/test-allocsa.c, tests/test-arcfour.c,
127409         tests/test-arctwo.c, tests/test-argmatch.c, tests/test-argp.c,
127410         tests/test-array_list.c, tests/test-array_oset.c,
127411         tests/test-atexit.c, test-avltree_list.c, test-avltree_oset.c,
127412         test-avltreehash_list.c, test-base64.c, test-binary-io.c,
127413         test-c-ctype.c, test-c-strcasecmp.c, test-c-strcasestr.c,
127414         test-c-strncasecmp.c, test-c-strstr.c, test-canonicalize-lgpl.c,
127415         test-carray_list.c, test-crc.c, test-des.c, test-dirname.c,
127416         test-fflush.c, test-fprintf-posix.c, test-gc-arcfour.c,
127417         test-gc-arctwo.c, test-gc-des.c, test-gc-hmac-md5.c,
127418         test-gc-hmac-sha1.c, test-gc-md2.c, test-gc-md4.c, test-gc-md5.c,
127419         test-gc-pbkdf2-sha1.c, test-gc-rijndael.c, test-gc-sha1.c,
127420         test-gc.c, test-getpass.c, test-hmac-md5.c, test-hmac-sha1.c,
127421         test-iconv.c, test-linked_list.c, test-linkedhash_list.c,
127422         test-lock.c, test-mbscasecmp.c, test-mbscasestr1.c,
127423         test-mbscasestr2.c, test-mbscasestr3.c, test-mbscasestr4.c,
127424         test-mbschr.c, test-mbscspn.c, test-mbsncasecmp.c, test-mbspbrk.c,
127425         test-mbspcasecmp.c, test-mbsrchr.c, test-mbsspn.c, test-mbsstr1.c,
127426         test-mbsstr2.c, test-mbsstr3.c, test-md2.c, test-md4.c,
127427         test-md5.c, test-memmem.c, test-printf-posix.c,
127428         test-rbtree_list.c, test-rbtree_oset.c, test-rbtreehash_list.c,
127429         test-read-file.c, test-rijndael.c, test-snprintf-posix.c,
127430         test-snprintf.c, test-sprintf-posix.c, test-stdint.c,
127431         test-strcasestr.c, test-striconv.c, test-striconveh.c,
127432         test-striconveha.c, test-tls.c, test-vasnprintf-posix.c,
127433         test-vasnprintf-posix2.c, test-vasnprintf.c,
127434         test-vasprintf-posix.c, test-vasprintf.c, test-verify.c,
127435         test-vfprintf-posix.c, test-vprintf-posix.c,
127436         test-vsnprintf-posix.c, test-vsnprintf.c, test-vsprintf-posix.c,
127437         test-xvasprintf.c: Likewise.
127439 2007-05-28  Bruno Haible  <bruno@clisp.org>
127441         * gnulib-tool (func_import): Remember the --with-tests command-line
127442         option through the macro gl_WITH_TESTS in the gnulib-cache.m4.
127443         Reported by Eric Blake.
127445 2007-05-28  Bruno Haible  <bruno@clisp.org>
127447         * modules/ftell-tests: New file.
127448         * tests/test-ftell.c: New file, based on tests/test-ftello.c.
127449         * tests/test-ftell.sh: New file, based on tests/test-ftello.sh.
127451         * lib/ftell.c: New file.
127452         * modules/ftell: New file.
127453         * m4/ftell.m4: New file.
127454         * doc/functions/ftell.texi: Update.
127455         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELL,
127456         REPLACE_FTELL.
127457         * lib/stdio_.h (rpl_ftell): New declaration.
127458         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELL,
127459         REPLACE_FTELL.
127461 2007-05-28  Eric Blake  <ebb9@byu.net>
127463         * lib/allocsa.h (safe_alloca): Avoid compiler warning.
127465 2007-05-28  Bruno Haible  <bruno@clisp.org>
127467         * modules/fseek-tests: New file.
127468         * tests/test-fseek.c: New file, based on tests/test-fseeko.c.
127469         * tests/test-fseek.sh: New file, based on tests/test-fseeko.sh.
127471         * lib/fseek.c: New file.
127472         * modules/fseek: New file.
127473         * m4/fseek.m4: New file.
127474         * doc/functions/fseek.texi: Update.
127475         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEK,
127476         REPLACE_FSEEK.
127477         * lib/stdio_.h (rpl_fseek): New declaration.
127478         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEK,
127479         REPLACE_FSEEK.
127481 2007-05-28  Bruno Haible  <bruno@clisp.org>
127483         * lib/stdio_.h (fflush): More comments.
127485 2007-05-28  Bruno Haible  <bruno@clisp.org>
127487         * m4/lseek.m4 (gl_FUNC_LSEEK): When not cross-compiling, perform a real
127488         runtime test.
127490 2007-05-28  Eric Blake  <ebb9@byu.net>
127492         Improve lseek module.
127493         * lib/lseek.c (rpl_lseek): Detect EBADF on mingw.
127494         * lib/unistd_.h (lseek): Scale back link warning message.
127495         * tests/test-lseek.c: Beef up test.
127496         * tests/test-lseek.sh: Exercise more facets of lseek.
127497         Reported by Bruno Haible.
127499 2007-05-28  Bruno Haible  <bruno@clisp.org>
127501         * tests/test-unistd.c: Test all the types that <unistd.h> is expected
127502         to define.
127504 2007-05-27  Bruno Haible  <bruno@clisp.org>
127506         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-31 patch.
127508 2007-05-27  Bruno Haible  <bruno@clisp.org>
127510         * modules/openmp: New file.
127511         * m4/openmp.m4: New file, taken from autoconf's CVS with changes by
127512         Noah Misch.
127514 2007-05-26  Bruno Haible  <bruno@clisp.org>
127516         * modules/chdir-long (Depends-on): Add fchdir.
127517         * modules/chdir-safer (Depends-on): Likewise.
127518         * modules/fts (Depends-on): Likewise.
127519         * modules/fts-lgpl (Depends-on): Likewise.
127520         * modules/openat (Depends-on): Likewise.
127521         * modules/savewd (Depends-on): Likewise.
127523 2007-05-24  Eric Blake  <ebb9@byu.net>
127525         Fix lseek on mingw.
127526         * modules/lseek: New module.
127527         * m4/lseek.m4: New file.
127528         * lib/lseek.c: New file.
127529         * modules/lseek-tests: New file.
127530         * tests/test-lseek.c: New file.
127531         * tests/test-lseek.sh: New file.
127532         * MODULES.html.sh: Document lseek module.
127533         * modules/fflush (Depends-on): Add lseek, fseeko.
127534         * modules/fseeko (Depends-on): Likewise.
127535         * modules/ftello (Depends-on): Likewise.
127536         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Replace fseek[o] if lseek is
127537         broken.
127538         * m4/ftello.m4 (gl_FUNC_FTELLO): Replace ftell[o] if lseek is
127539         broken.
127540         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Trigger fseeko module.
127541         * lib/fseeko.c (rpl_fseeko): Quit early on non-seekable files.
127542         * lib/ftello.c (rpl_ftello): Likewise.
127543         * tests/test-fseeko.c (main): Test this.
127544         * tests/test-fseeko.sh: Likewise.
127545         * tests/test-ftello.c (main): Likewise.
127546         * tests/test-ftello.sh: Likewise.
127547         * lib/stdio_.h (fseek, ftell): Simplify, since missing fseeko now
127548         implies replacing fseek.
127549         * modules/stdio (Makefile.am): No longer need HAVE_FSEEKO,
127550         HAVE_FTELLO.
127551         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add lseek info.
127552         * modules/unistd (Makefile.am): Likewise.
127553         * lib/unistd_.h (lseek): Declare a replacement.
127554         * doc/functions/lseek.texi (lseek): Document this fix.
127555         * doc/functions/fseek.texi (fseek): Likewise.
127556         * doc/functions/ftell.texi (ftell): Likewise.
127558 2007-05-24  Bruno Haible  <bruno@clisp.org>
127560         * tests/test-vasnprintf-posix.c (test_function): Allow up to 50 bytes
127561         in the printed representation of a NaN.
127562         * tests/test-vasprintf-posix.c (test_function): Likewise.
127563         * tests/test-snprintf-posix.h (test_function): Likewise.
127564         * tests/test-sprintf-posix.h (test_function): Likewise.
127565         Reported by Eric Blake.
127567 2007-05-23  Eric Blake  <ebb9@byu.net>
127569         Fix fseeko/ftello on cygwin 1.5.24.
127570         * doc/functions/fseeko.texi (fseeko): Document the fix.
127571         * doc/functions/ftello.texi (ftello): Document the fix.
127572         * doc/functions/stdin.texi (stdin): Document the cygwin bug.
127573         * doc/functions/stdout.text (stdout): New file.
127574         * doc/functions/stderr.text (stderr): New file.
127575         * doc/gnulib.texi (Function Substitutes): Use new files.
127576         * tests/test-fseeko.c (main): Check for broken fseeko on cygwin
127577         prior to 1.7.0.
127578         * tests/test-ftello.c (main): Likewise for ftello.
127579         * tests/test-fseeko.sh: New file.
127580         * tests/test-ftello.sh: New file.
127581         * modules/fseeko-tests (Makefile.am): Ensure test-fseeko is run
127582         with seekable stdin.
127583         * modules/ftello-tests (Makefile.am): Likewise for test-ftello.
127584         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Detect the cygwin bug.
127585         (gl_REPLACE_FSEEKO): New macro.
127586         * m4/ftello.m4 (gl_FUNC_FTELLO, gl_REPLACE_FTELLO): Likewise.
127587         * modules/fseeko (Files): Distribute fseeko.c.
127588         * modules/ftello (Files): Distribute ftello.c.
127589         * lib/fseeko.c (rpl_fseeko) [__CYGWIN__]: Convert stdin to 64-bit
127590         mode.
127591         * lib/ftello.c (rpl_ftello): New file.
127592         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Allow replacement of
127593         fseeko, ftello.
127594         (gl_STDIN_LARGE_OFFSET): New macro.
127595         * modules/stdio (Makefile.am): Perform the replacement.
127596         * lib/stdio_.h (rpl_fseeko, rpl_ftello): Define when needed.
127598 2007-05-23  Bruno Haible  <bruno@clisp.org>
127600         * lib/stdio_.h (fseeko, ftello): Provide a link warning only if
127601         GNULIB_POSIXCHECK is defined.
127603 2007-05-21  Bruno Haible  <bruno@clisp.org>
127605         * m4/printf.m4 (gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE):
127606         Check also the output for NaN arguments. When cross-compiling, guess
127607         no on IRIX.
127608         * lib/vasnprintf.c: Update comments.
127609         * tests/test-vasnprintf-posix.c (strisnan): New function.
127610         (test_function): Use it.
127611         * tests/test-vasprintf-posix.c (strisnan): New function.
127612         (test_function): Use it.
127613         * tests/test-snprintf-posix.h (strisnan): New function.
127614         (test_function): Use it.
127615         * tests/test-sprintf-posix.h (strisnan): New function.
127616         (test_function): Use it.
127617         Reported by Eric Blake.
127619 2007-05-20  Bruno Haible  <bruno@clisp.org>
127621         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Add test for large finite
127622         numbers that fails on BeOS.
127623         * doc/functions/frexpl.texi: Update.
127625 2007-05-20  Jim Meyering  <jim@meyering.net>
127627         * NEWS: Mention the incompatible change (s/futimens/gl_futimens/)
127628         forced upon us by glibc-2.6.
127630 2007-05-20  Bruno Haible  <bruno@clisp.org>
127632         Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
127633         * m4/printf.m4 (gl_PRINTF_INFINITE): Update cross-compiling guesses.
127634         (gl_PRINTF_INFINITE_LONG_DOUBLE): New macro.
127635         * lib/vasnprintf.c: Use NEED_PRINTF_INFINITE_DOUBLE instead of
127636         NEED_PRINTF_INFINITE.
127637         (is_infinitel): New function.
127638         (VASNPRINTF): Handle NEED_PRINTF_INFINITE_LONG_DOUBLE case.
127639         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE): Renamed from
127640         gl_PREREQ_VASNPRINTF_INFINITE.
127641         (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): New macro.
127642         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
127643         gl_PRINTF_INFINITE_LONG_DOUBLE and test its result. Invoke
127644         gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE and
127645         gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE instead of
127646         gl_PREREQ_VASNPRINTF_INFINITE.
127647         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
127648         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
127649         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
127650         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
127651         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
127652         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
127653         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
127654         * doc/functions/fprintf.texi: Update.
127655         * doc/functions/printf.texi: Update.
127656         * doc/functions/snprintf.texi: Update.
127657         * doc/functions/sprintf.texi: Update.
127658         * doc/functions/vfprintf.texi: Update.
127659         * doc/functions/vprintf.texi: Update.
127660         * doc/functions/vsnprintf.texi: Update.
127661         * doc/functions/vsprintf.texi: Update.
127663 2007-05-20  Bruno Haible  <bruno@clisp.org>
127665         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): Set REPLACE_FREXPL if frexpl
127666         was not found in libc.
127667         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
127669 2007-05-20  Bruno Haible  <bruno@clisp.org>
127671         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
127672         printed as "-nan" instead of "nan".
127673         * tests/test-vasprintf-posix.c (test_function): Likewise.
127674         * tests/test-snprintf-posix.h (test_function): Likewise.
127675         * tests/test-sprintf-posix.h (test_function): Likewise.
127676         Needed for HP-UX 11.
127678 2007-05-20  Jim Meyering  <jim@meyering.net>
127680         Fix buggy test for the fchownat-deref bug.
127681         * m4/openat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Create the dangling
127682         symlink required for the run-test.  Without it, this test would
127683         always declare that fchownat doesn't work, and client code would
127684         unnecessarily use the replacement function with fixed libc.
127685         (gl_FUNC_FCHOWNAT): Eliminate a variable that wasn't initialized.
127686         Reported by Greg Schafer.
127688 2007-05-19  Bruno Haible  <bruno@clisp.org>
127690         * m4/isnanf.m4 (gl_ISNANF_WORKS): New macro.
127691         (gl_FUNC_ISNANF_NO_LIBM): Invoke it.
127692         * lib/isnan.c (FUNC): Use run-time expressions for SGI compiler.
127693         Needed for IRIX 6.5 and Solaris 2.5.1.
127695 2007-05-19  Bruno Haible  <bruno@clisp.org>
127697         * tests/test-vasnprintf-posix.c (have_minus_zero): New function.
127698         (test_function): Skip tests involving -0.0 on platforms where
127699         -0.0 = 0.0.
127700         * tests/test-vasprintf-posix.c (have_minus_zero): New function.
127701         (test_function): Skip tests involving -0.0 on platforms where
127702         -0.0 = 0.0.
127703         * tests/test-snprintf-posix.h (have_minus_zero): New function.
127704         (test_function): Skip tests involving -0.0 on platforms where
127705         -0.0 = 0.0.
127706         * tests/test-sprintf-posix.h (have_minus_zero): New function.
127707         (test_function): Skip tests involving -0.0 on platforms where
127708         -0.0 = 0.0.
127709         * tests/test-fprintf-posix.h (test_function): Remove all -0.0 related
127710         tests.
127711         * tests/test-printf-posix.h (test_function): Likewise.
127712         * tests/test-printf-posix.output: Remove all -0.0 related results.
127713         Needed for IRIX 6.5.
127715 2007-05-19  Bruno Haible  <bruno@clisp.org>
127717         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
127718         printed as "nan0x7fffffff" instead of "nan".
127719         * tests/test-vasprintf-posix.c (test_function): Likewise.
127720         * tests/test-snprintf-posix.h (test_function): Likewise.
127721         * tests/test-sprintf-posix.h (test_function): Likewise.
127722         * tests/test-fprintf-posix.h (NaN): Remove macro.
127723         (test_function): Remove all NaN related tests.
127724         * tests/test-printf-posix.h (NaN): Remove macro.
127725         (test_function): Remove all NaN related tests.
127726         * tests/test-printf-posix.output: Remove all NaN related results.
127727         Needed for IRIX 6.5.
127729 2007-05-19  Bruno Haible  <bruno@clisp.org>
127731         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Fix C89 syntax error in test code.
127732         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
127734 2007-05-19  Bruno Haible  <bruno@clisp.org>
127736         * lib/float_.h: New file.
127737         * m4/float_h.m4: New file.
127738         * modules/float: New file.
127739         * modules/isnanl (Dependencies): Add float.
127740         * modules/isnanl-nolibm (Dependencies): Likewise.
127741         * modules/mathl (Dependencies): Likewise.
127742         * modules/printf-frexpl (Dependencies): Likewise.
127743         * modules/signbit (Dependencies): Likewise.
127744         * modules/vasnprintf (Dependencies): Likewise.
127745         * doc/headers/float.texi: Update.
127747 2007-05-19  Jim Meyering  <jim@meyering.net>
127749         * lib/utimens.c (gl_futimens): Rename from futimens,
127750         now that glibc-2.6 declares futimens.
127751         * lib/utimens.h: Likewise.
127753 2007-05-19  Bruno Haible  <bruno@clisp.org>
127755         Avoid test failures on mingw.
127756         * tests/test-fprintf-posix.sh: Convert CR/LF to LF in output.
127757         * tests/test-printf-posix.sh: Likewise.
127758         * tests/test-vfprintf-posix.sh: Likewise.
127759         * tests/test-vprintf-posix.sh: Likewise.
127761 2007-05-19  Bruno Haible  <bruno@clisp.org>
127763         Fix *printf result for NaN, Inf, -0.0 on mingw.
127764         * m4/printf.m4 (gl_PRINTF_INFINITE): New macro.
127765         * lib/vasnprintf.c: Include math.h and isnan.h.
127766         (is_infinite_or_zero): New function.
127767         (VASNPRINTF): Fix also the handling of infinite or zero 'double'
127768         values in the %f, %F, %e, %E, %g, %G directives.
127769         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE): New macro.
127770         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
127771         gl_PRINTF_INFINITE and test its result. Invoke
127772         gl_PREREQ_VASNPRINTF_INFINITE.
127773         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
127774         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
127775         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
127776         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
127777         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
127778         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
127779         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
127780         * doc/functions/fprintf.texi: Update.
127781         * doc/functions/printf.texi: Update.
127782         * doc/functions/snprintf.texi: Update.
127783         * doc/functions/sprintf.texi: Update.
127784         * doc/functions/vfprintf.texi: Update.
127785         * doc/functions/vprintf.texi: Update.
127786         * doc/functions/vsnprintf.texi: Update.
127787         * doc/functions/vsprintf.texi: Update.
127789 2007-05-19  Bruno Haible  <bruno@clisp.org>
127791         * lib/vasnprintf.c (convert_to_decimal): Add an extra_zeroes argument.
127792         (scale10_round_decimal_long_double): Inline scale10_round_long_double.
127793         Instead of multiplying with 10^k, set extra_zeroes to k.
127794         (scale10_round_long_double): Remove function.
127796 2007-05-18  Bruno Haible  <bruno@clisp.org>
127798         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Fix logic bug
127799         introduced on 2007-05-06.
127801 2007-05-18  Bruno Haible  <bruno@clisp.org>
127803         * tests/test-vasnprintf-posix.c (test_function): Also test the %e and
127804         %g directives.
127805         * tests/test-vasprintf-posix.c (test_function): Likewise.
127806         * tests/test-snprintf-posix.h (test_function): Likewise.
127807         * tests/test-sprintf-posix.h (test_function): Likewise.
127809 2007-05-18  Bruno Haible  <bruno@clisp.org>
127811         * tests/test-vasnprintf-posix.c (SIZEOF): New macro.
127812         (strmatch): New function.
127813         (test_function): Test the %f directive on numbers of various exponents.
127814         * tests/test-vasprintf-posix.c (SIZEOF): New macro.
127815         (strmatch): New function.
127816         (test_function): Test the %f directive on numbers of various exponents.
127817         * tests/test-snprintf-posix.h (strmatch): New function.
127818         (test_function): Test the %f directive on numbers of various exponents.
127819         * tests/test-sprintf-posix.h (strmatch): New function.
127820         (test_function): Test the %f directive on numbers of various exponents.
127821         * tests/test-snprintf-posix.c (SIZEOF): New macro.
127822         * tests/test-sprintf-posix.c (SIZEOF): New macro.
127823         * tests/test-vsnprintf-posix.c (SIZEOF): New macro.
127824         * tests/test-vsprintf-posix.c (SIZEOF): New macro.
127826 2007-05-18  Bruno Haible  <bruno@clisp.org>
127828         Add support for 'long double' number output.
127829         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE): New macro.
127830         * lib/vasnprintf.c: Include math.h and float+.h.
127831         (mp_limb_t): New type.
127832         (GMP_LIMB_BITS): New macro.
127833         (mp_twolimb_t): New type.
127834         (GMP_TWOLIMB_BITS): New macro.
127835         (mpn_t): New type.
127836         (multiply, divide, convert_to_decimal, decode_long_double,
127837         scale10_round_long_double, scale10_round_decimal_long_double,
127838         floorlog10l): New functions.
127839         (VASNPRINTF) [NEED_PRINTF_LONG_DOUBLE]: Implement 'long double' support
127840         for the %f, %F, %e, %E, %g, %G directives.
127841         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_LONG_DOUBLE): New macro.
127842         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
127843         gl_PRINTF_LONG_DOUBLE and test its result. Invoke
127844         gl_PREREQ_VASNPRINTF_LONG_DOUBLE.
127845         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
127846         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
127847         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
127848         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
127849         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
127850         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
127851         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
127852         * modules/fprintf-posix (Depends-on): Add frexpl-nolibm.
127853         * modules/snprintf-posix (Depends-on): Likewise.
127854         * modules/sprintf-posix (Depends-on): Likewise.
127855         * modules/vasnprintf-posix (Depends-on): Likewise.
127856         * modules/vasprintf-posix (Depends-on): Likewise.
127857         * modules/vfprintf-posix (Depends-on): Likewise.
127858         * modules/vsnprintf-posix (Depends-on): Likewise.
127859         * modules/vsprintf-posix (Depends-on): Likewise.
127860         * modules/vasnprintf (Files): Add lib/float+.h.
127861         * doc/functions/fprintf.texi: Update.
127862         * doc/functions/printf.texi: Update.
127863         * doc/functions/snprintf.texi: Update.
127864         * doc/functions/sprintf.texi: Update.
127865         * doc/functions/vfprintf.texi: Update.
127866         * doc/functions/vprintf.texi: Update.
127867         * doc/functions/vsnprintf.texi: Update.
127868         * doc/functions/vsprintf.texi: Update.
127870 2007-05-18  Bruno Haible  <bruno@clisp.org>
127872         * lib/vasnprintf.c (USE_SNPRINTF): Define to 0 on BeOS.
127874 2007-05-18  Bruno Haible  <bruno@clisp.org>
127876         * lib/vasnprintf.c (VASNPRINTF) [WIN32]: Use %I64d instead of %lld
127877         for printing 64-bit integers. Needed for mingw.
127879 2007-05-18  Bruno Haible  <bruno@clisp.org>
127881         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
127882         gl_FUNC_FREXPL_WORKS.
127883         * modules/printf-frexpl (Files): Add m4/frexpl.m4.
127885 2007-05-18  Bruno Haible  <bruno@clisp.org>
127887         * modules/frexpl-nolibm-tests: New file.
127889         * modules/frexpl-nolibm: New file.
127890         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): New macro.
127892 2007-05-17  Paul Eggert  <eggert@cs.ucla.edu>
127894         * lib/dirent_.h: Prefer #include_next <foo.h> to #include
127895         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
127896         GCC 4.2, which otherwise issues a lot of warnings.
127897         * lib/iconv_.h, lib/locale_.h, lib/netinet_in_.h, lib/sys_select_.h:
127898         * lib/sys_socket_.h, lib/sys_stat_.h, lib/sysexits_.h, lib/unistd_.h:
127899         Likewise.
127900         * modules/fchdir (dirent.h): Substitute @HAVE_INCLUDE_NEXT@.
127901         * modules/iconv_open (iconv.h): Likewise.
127902         * modules/locale (locale.h): Likewise.
127903         * modules/netinet_in (netinet/in.h): Likewise.
127904         * modules/sys_select (sys_select.h): Likewise.
127905         * modules/sys_socket (sys/socket.h): Likewise.
127906         * modules/sys_stat (sys/stat.h): Likewise.
127907         * modules/sysexits (sysexits.h): Likewise.
127908         * modules/unistd (unistd.h): Likewise.
127910 2007-05-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
127912         * modules/closein-tests (Makefile.am): Distribute
127913         `test-closein.sh'.
127915 2007-05-17  Bruno Haible  <bruno@clisp.org>
127917         * tests/test-printf-posix.output: Renamed from
127918         tests/test-fprintf-posix.out.
127919         * modules/fprintf-posix-tests: Update.
127920         * modules/printf-posix-tests: Update.
127921         * modules/vfprintf-posix-tests: Update.
127922         * modules/vprintf-posix-tests: Update.
127923         * tests/test-fprintf-posix.sh: Update.
127924         * tests/test-printf-posix.sh: Update.
127925         * tests/test-vfprintf-posix.sh: Update.
127926         * tests/test-vprintf-posix.sh: Update.
127927         Reported by Ralf Wildenhues.
127929 2007-05-16  Paul Eggert  <eggert@cs.ucla.edu>
127931         * lib/fcntl_.h: Prefer #include_next <foo.h> to #include
127932         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
127933         GCC 4.2, which otherwise issues a lot of warnings.
127934         * lib/inttypes_.h, lib/math_.h, lib/search_.h, lib/signal_.h:
127935         * lib/stdint_.h, lib/stdio_.h, lib/stdlib_.h, lib/string_.h:
127936         * lib/sys_time_.h, lib/time_.h, lib/wchar_.h, lib/wctype_.h: Likewise.
127937         * lib/stdlib_.h: Don't bother with #pragma GCC system_header, as
127938         it should no longer be needed.
127939         * lib/string_.h: Likewise.
127940         * modules/absolute-header (HAVE_INCLUDE_NEXT): New 'make' define.
127941         * modules/fcntl (fcntl.h): Substitute @HAVE_INCLUDE_NEXT@.
127942         * modules/inttypes (inttypes.h): Likewise.
127943         * modules/math (math.h): Likewise.
127944         * modules/search (search.h): Likewise.
127945         * modules/signal (signal.h): Likewise.
127946         * modules/stdint (stdint.h): Likewise.
127947         * modules/stdio (stdio.h): Likewise.
127948         * modules/stdlib (stdlib.h): Likewise.
127949         * modules/string (string.h): Likewise.
127950         * modules/sys_time (sys/time.h): Likewise.
127951         * modules/time (time.h): Likewise.
127952         * modules/wchar (wchar.h): Likewise.
127953         * modules/wctype (wtype.h): Likewise.
127955 2007-05-16  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
127957         * doc/gnulib-tool.texi (CVS Issues): Fix typo.
127959 2007-05-13  Bruno Haible  <bruno@clisp.org>
127961         * stpcpy.m4 (gl_FUNC_STPCPY): Require AC_C_RESTRICT.
127962         * stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
127963         * strsep.m4 (gl_FUNC_STRSEP): Likewise.
127964         * strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
127965         (gl_PREREQ_STRTOK_R): Don't require it here.
127967 2007-05-13  Bruno Haible  <bruno@clisp.org>
127969         * lib/stdlib_.h (mkdtemp, mkstemp): Comment out argument name. Needed
127970         when used in C++ mode.
127972 2007-05-12  Bruno Haible  <bruno@clisp.org>
127974         * lib/linebuffer.h: Tweak doc.
127975         * lib/linebuffer.c: Likewise.
127977 2007-05-12  James Youngman  <jay@gnu.org>
127979         * lib/linebuffer.c (readlinebuffer_delim): New function,
127980         like readlinebuffer, but use a caller-specified delimiter.
127981         (readlinebuffer): Just call readlinebuffer_delim with '\n'
127982         as the delimiter.
127983         * lib/linebuffer.h (readlinebuffer_delim): Declare it.
127985 2007-05-12  Sergey Poznyakoff  <gray@gnu.org.ua>
127987         * m4/openat.m4 (gl_FUNC_OPENAT): Do not require openat-die.
127988         * modules/openat (Files): Remove openat-die.c.
127989         (Depends-on): Add openat-die.
127990         * modules/openat-die: New module.
127992 2007-05-06  Bruno Haible  <bruno@clisp.org>
127994         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING, gl_VSNPRINTF_ZEROSIZE_C99):
127995         Update with info about Cygwin.
127996         * doc/functions/fprintf.texi: Update.
127997         * doc/functions/printf.texi: Update.
127998         * doc/functions/snprintf.texi: Update.
127999         * doc/functions/sprintf.texi: Update.
128000         * doc/functions/vfprintf.texi: Update.
128001         * doc/functions/vprintf.texi: Update.
128002         * doc/functions/vsnprintf.texi: Update.
128003         * doc/functions/vsprintf.texi: Update.
128004         Reported by Eric Blake.
128006 2007-05-06  Bruno Haible  <bruno@clisp.org>
128008         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Perform the
128009         padding ourselves for the floating-point directives.
128010         * m4/printf.m4 (gl_PRINTF_FLAG_ZERO): New macro.
128011         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_ZERO): New macro.
128012         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
128013         gl_PRINTF_FLAG_ZERO and test its result. Invoke
128014         gl_PREREQ_VASNPRINTF_FLAG_ZERO.
128015         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
128016         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
128017         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
128018         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
128019         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
128020         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
128021         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
128022         * tests/test-snprintf-posix.h (test_function): Also check the width
128023         and some flags in the %f directive.
128024         * tests/test-sprintf-posix.h (test_function): Likewise.
128025         * tests/test-vasnprintf-posix.c (test_function): Likewise.
128026         * tests/test-vasprintf-posix.c (test_function): Likewise.
128027         * doc/functions/fprintf.texi: Update.
128028         * doc/functions/printf.texi: Update.
128029         * doc/functions/snprintf.texi: Update.
128030         * doc/functions/sprintf.texi: Update.
128031         * doc/functions/vfprintf.texi: Update.
128032         * doc/functions/vprintf.texi: Update.
128033         * doc/functions/vsnprintf.texi: Update.
128034         * doc/functions/vsprintf.texi: Update.
128036 2007-05-06  Bruno Haible  <bruno@clisp.org>
128038         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_GROUPING]: Don't
128039         pass the ' flag character to sprintf or snprintf.
128040         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING): New macro.
128041         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_GROUPING): New macro.
128042         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
128043         gl_PRINTF_FLAG_GROUPING and test its result. Invoke
128044         gl_PREREQ_VASNPRINTF_FLAG_GROUPING.
128045         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
128046         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
128047         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
128048         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
128049         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
128050         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
128051         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
128052         * tests/test-snprintf-posix.h (test_function): Also check the grouping
128053         flag.
128054         * tests/test-sprintf-posix.h (test_function): Likewise.
128055         * tests/test-vasnprintf-posix.c (test_function): Likewise.
128056         * tests/test-vasprintf-posix.c (test_function): Likewise.
128057         * doc/functions/fprintf.texi: Update.
128058         * doc/functions/printf.texi: Update.
128059         * doc/functions/snprintf.texi: Update.
128060         * doc/functions/sprintf.texi: Update.
128061         * doc/functions/vfprintf.texi: Update.
128062         * doc/functions/vprintf.texi: Update.
128063         * doc/functions/vsnprintf.texi: Update.
128064         * doc/functions/vsprintf.texi: Update.
128066 2007-05-01  Bruno Haible  <bruno@clisp.org>
128068         * tests/test-argp-2.sh (func_compare): Drop .exe suffix.
128070 2007-05-03  Paul Eggert  <eggert@cs.ucla.edu>
128072         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use better
128073         comment for D_INO_IN_DIRENT.  Problem reported by James Youngman.
128075 2007-05-02  Paul Eggert  <eggert@cs.ucla.edu>
128077         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Test whether
128078         readdir returns garbage in d_ino.  Problem reported by Kaz Sasayama in
128079         <http://lists.gnu.org/r/bug-gnulib/2007-05/msg00021.html>.
128081 2007-05-02  Sergey Poznyakoff  <gray@gnu.org.ua>
128083         * lib/argp-help.c (struct hol_entry): New member `ord'.
128084         (HOL_ENTRY_PTRCMP): Use ord for comparison
128085         (hol_sort): Initialize ord.
128087 2007-05-01  Bruno Haible  <bruno@clisp.org>
128089         * doc/functions/_Exit_C99.texi: Renamed from doc/functions/_Exit.texi.
128090         Reported by Eric Blake.
128091         * doc/gnulib.texi (Function Substitutes): Update.
128093 2007-05-01  Bruno Haible  <bruno@clisp.org>
128095         * doc/functions.texi: Remove file, now redundant through
128096         doc/functions/*.texi.
128098 2007-05-01  Bruno Haible  <bruno@clisp.org>
128100         * modules/argp (Depends-on): Add sleep.
128102 2007-05-01  Bruno Haible  <bruno@clisp.org>
128104         * modules/sleep-tests: New file.
128105         * tests/test-sleep.c: New file.
128107         * modules/sleep: New file.
128108         * lib/sleep.c: New file.
128109         * m4/sleep.m4: New file.
128110         * lib/unistd_.h (sleep): New declaration.
128111         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_SLEEP,
128112         HAVE_SLEEP.
128113         * modules/unistd (Makefile.am): Substitute GNULIB_SLEEP, HAVE_SLEEP.
128114         * doc/functions/sleep.texi: Document the sleep module.
128116 2007-05-01  Bruno Haible  <bruno@clisp.org>
128118         * lib/sigprocmask.h: Remove file.
128119         * lib/signal_.h: Incorporate the previous contents of sigprocmask.h.
128120         * lib/sigprocmask.c: Include <signal.h> instead of sigprocmask.h.
128121         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Substitute GNULIB_SIGPROCMASK,
128122         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T.
128123         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Require
128124         gl_SIGNAL_H_DEFAULTS. Set HAVE_POSIX_SIGNALBLOCKING as a shell variable.
128125         (gl_PREREQ_SIGPROCMASK): Require gl_SIGNAL_H_DEFAULTS. Set
128126         HAVE_SIGSET_T as a shell variable.
128127         * modules/signal (Makefile.am): Substitute GNULIB_SIGPROCMASK,
128128         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T into signal.h.
128129         * modules/sigprocmask (Files): Remove lib/sigprocmask.h.
128130         (Depends-on): Add signal. Remove verify.
128131         (configure.ac): Invoke gl_SIGNAL_MODULE_INDICATOR.
128132         (Include): Mention <signal.h> instead of sigprocmask.h.
128133         * NEWS: Mention the change.
128134         * lib/fatal-signal.c: Don't include sigprocmask.h.
128136 2007-05-01  Bruno Haible  <bruno@clisp.org>
128138         * modules/signal: New file.
128139         * lib/signal_.h: New file.
128140         * m4/signal_h.m4: New file.
128142 2007-05-01  Bruno Haible  <bruno@clisp.org>
128144         * lib/wctype_.h: Test HAVE_ISWCNTRL at configure time.
128145         * m4/wctype.m4 (gl_WCTYPE_H): Substitute HAVE_ISWCNTRL.
128146         * modules/wctype (Makefile.am): Substitute HAVE_ISWCNTRL instead of
128147         HAVE_WCTYPE_CTMP_BUG into wctype.h.
128149 2007-05-01  Bruno Haible  <bruno@clisp.org>
128151         * lib/sys_stat_.h: Test HAVE_LSTAT, HAVE_DECL_MKDIR, HAVE_IO_H at
128152         configure time.
128153         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Substitute HAVE_LSTAT,
128154         HAVE_DECL_MKDIR, HAVE_IO_H via AC_SUBST.
128155         * modules/sys_stat (Makefile.am): Substitute their values into
128156         sys/stat.h.
128158 2007-05-01  Bruno Haible  <bruno@clisp.org>
128160         * lib/glob_.h: Test HAVE_SYS_CDEFS_H at configure time.
128161         * m4/glob.m4 (gl_PREREQ_GLOB): Substitute HAVE_SYS_CDEFS_H via AC_SUBST.
128162         * modules/glob (Makefile.am): Put HAVE_SYS_CDEFS_H value into glob.h.
128164 2007-05-01  Bruno Haible  <bruno@clisp.org>
128166         * doc/header/assert.texi: Undo last change: don't mention the gnulib
128167         'assert' module here.
128169 2007-05-01  Bruno Haible  <bruno@clisp.org>
128171         * doc/functions/*.texi: New files.
128172         * doc/functions/google-ranking.txt: New file.
128173         * doc/gnulib.texi (Function Substitutes): New chapter.
128174         (ctime, inet_ntoa): Remove sections.
128175         * doc/ctime.texi: Remove file.
128176         * doc/inet_ntoa.texi: Remove file.
128177         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Update
128178         dependencies.
128179         (%.info): New rule, specifying a --reference-limit.
128181 2007-05-01  Bruno Haible  <bruno@clisp.org>
128183         * MODULES.html.sh (posix_functions): Remove 'exec', 'toc'.
128185 2007-05-01  Bruno Haible  <bruno@clisp.org>
128187         * modules/mkdir (Depends-on): Add sys_stat, because sys_stat provides
128188         the portability of 'mkdir' to mingw systems.
128190 2007-05-01  Bruno Haible  <bruno@clisp.org>
128192         * doc/headers/google-ranking.txt: New file.
128194 2007-04-30  Eric Blake  <ebb9@byu.net>
128196         Prefer fseeko to fseek.
128197         * modules/getpass (Depends-on): Add fseeko.
128198         * lib/getpass.c (getpass): Use fseeko, not fseek.
128200 2007-04-30  Sergey Poznyakoff  <gray@gnu.org.ua>
128202         * lib/argp-help.c (hol_entry_cmp): Option sorting algorithm
128203         assumes the sorting is stable, while most qsort implementations
128204         are not.  Use argument addresses to ensure they never compare as
128205         equal.
128207         * tests/test-argp-2.sh (usage-indent test): Fix output
128208         (func_compare): Restore diff options
128209         * tests/test-argp.c: Restore #include "progname.h"
128211 2007-04-29  Bruno Haible  <bruno@clisp.org>
128213         * m4/printf.m4 (gl_VSNPRINTF_ZEROSIZE_C99): New macro.
128214         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
128215         gl_VSNPRINTF_ZEROSIZE_C99. Test gl_cv_func_vsnprintf_zerosize_c99.
128216         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
128217         * modules/snprintf-posix-tests (Files): Add tests/test-snprintf.c.
128218         (configure.ac): Define CHECK_SNPRINTF_POSIX.
128219         (TESTS, check_PROGRAMS): Add test-snprintf.
128220         * modules/vsnprintf-posix-tests (Files): Add tests/test-vsnprintf.c.
128221         (configure.ac): Define CHECK_VSNPRINTF_POSIX.
128222         (TESTS, check_PROGRAMS): Add test-vsnprintf.
128223         * tests/test-snprintf.c (main) [!CHECK_SNPRINTF_POSIX]: Disable
128224         assertions that fail on HP-UX, OSF/1, or IRIX.
128225         * tests/test-vsnprintf.c (main) [!CHECK_VSNPRINTF_POSIX]: Likewise.
128227 2007-04-29  Bruno Haible  <bruno@clisp.org>
128229         * MODULES.html.sh (posix_functions): Remove 'contents'.
128231 2007-04-29  Karl Berry  <karl@gnu.org>
128233         * config/srclist.txt (gendocs_template_min): new entry.
128235 2007-04-29  Bruno Haible  <bruno@clisp.org>
128237         Work around fpurge bug on BSD systems.
128238         * modules/fpurge (Makefile.am): Compile fpurge.c unconditionally.
128239         * m4/fpurge.m4 (gl_FUNC_FPURGE): Don't invoke AC_LIBOBJ.
128240         * lib/fpurge.h (fpurge): Don't handle __fpurge wrapper here. Define
128241         fpurge to rpl_fpurge if the system already has this function.
128242         * lib/fpurge.c (fpurge): Handle also the __fpurge wrapper case and
128243         the case where the system already has this function. Correct invariants
128244         on BSD systems.
128245         * lib/fseeko.c (rpl_fseeko): Update recognition of preceding fflush on
128246         BSD systems.
128248 2007-04-29  Sergey Poznyakoff  <gray@gnu.org.ua>
128250         * lib/argp-help.c (hol_cluster_cmp): Reverse comparison.  Change
128251         proposed by Sven Verdoolaege.
128253         * tests/test-argp.c: Fix option ordering.  Test deeply clustered
128254         options.
128255         * tests/test-argp-2.sh (func_compare): Use diff instead of cmp.
128256         (usage and help tests): Update
128258 2007-04-29  Bruno Haible  <bruno@clisp.org>
128260         * tests/test-fflush.c (main): Use a file of size 17, not 10.
128261         Print more information in case of failure. Disable a test on BeOS.
128263 2007-04-29  Bruno Haible  <bruno@clisp.org>
128265         * tests/**/test-*.[hc] (ASSERT): Use fprintf to show the line number.
128266         This helps debugging on systems on which no gdb is available.
128268 2007-04-29  Bruno Haible  <bruno@clisp.org>
128270         * lib/freading.h: Improve comments.
128271         * lib/fwriting.h: Likewise.
128272         * tests/test-freading.c (main): Don't check freading immediately after
128273         repositioning. Needed for glibc.
128275 2007-04-29  Bruno Haible  <bruno@clisp.org>
128277         * lib/freading.c (freading): Trivial simplification.
128279 2007-04-28  Bruno Haible  <bruno@clisp.org>
128281         * tests/test-fwriting.c (main): Also test the interaction between
128282         fflush and fwriting.
128283         * modules/fwriting-tests (Depends-on): Add fflush.
128285         * tests/test-freading.c (main): Also test the interaction between
128286         fflush and freading.
128287         * modules/freading-tests (Depends-on): Add fflush.
128289 2007-04-28  Bruno Haible  <bruno@clisp.org>
128291         * lib/stdio_.h (fseek, ftell): Provide link warnings suggesting to use
128292         fseeko and ftello.
128293         Suggested by Eric Blake.
128295 2007-04-28  Jim Meyering  <jim@meyering.net>
128297         Avoid false-negative in gl_STDINT_H's C99 conformance test.
128298         * m4/stdint.m4 (gl_STDINT_H): When checking whether stdint.h conforms
128299         to C99, include all of gl_STDINT_INCLUDES, not just <stddef.h>.
128301 2007-04-27  Eric Blake  <ebb9@byu.net>
128303         * doc/headers/assert.texi (assert.h): Document assert module use.
128305 2007-04-27  Bruno Haible  <bruno@clisp.org>
128307         * doc/headers/*.texi: New files.
128308         * doc/gnulib.texi (Header File Substitutes): New chapter.
128309         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Specify
128310         dependencies.
128311         (standards.info ,standards.html, standards.dvi): Update dependencies.
128312         (mostlyclean, clean): New targets.
128314 2007-04-27  Bruno Haible  <bruno@clisp.org>
128316         * lib/sysexits_.h: Renamed from lib/sysexit_.h.
128317         * modules/sysexits (Files, Makefile.am): Update.
128319         * lib/sys_socket_.h: Renamed from lib/socket_.h.
128320         * modules/sys_socket (Files, Makefile.am): Update.
128322         * lib/sys_stat_.h: Renamed from lib/stat_.h.
128323         * modules/sys_stat (Files, Makefile.am): Update.
128325 2007-04-27  Eric Blake  <ebb9@byu.net>
128327         * lib/freading.h: Improve comments.
128328         * lib/fwriting.h: Likewise.
128329         * lib/fflush.c: Likewise.
128331         Fix closein for mingw.
128332         * modules/closein-tests: Add tests for closein.
128333         * tests/test-closein.c: New file.
128334         * tests/test-closein.sh: Likewise.
128335         * lib/unistd_.h [!SEEK_CUR]: Mingw also needs stdlib.h for _exit.
128336         * lib/closein.c (close_stdin): Don't fflush non-seekable streams.
128338 2007-04-27  Bruno Haible  <bruno@clisp.org>
128340         * lib/inttypes_.h [_DECC]: Don't use #include_next if the compiler
128341         version is < 6.
128342         * lib/math_.h [__DECC]: Likewise.
128343         * lib/stdio_.h [__DECC]: Likewise.
128344         * lib/stdlib_.h [__DECC]: Likewise.
128345         * lib/string_.h [__DECC]: Likewise.
128346         * lib/time_.h [__DECC]: Likewise.
128347         * lib/wchar_.h [__DECC]: Likewise.
128348         * lib/wctype_.h [__DECC]: Likewise.
128350 2007-04-27  Bruno Haible  <bruno@clisp.org>
128352         * tests/test-fbufmode.c (main): Relax test, to avoid failure on mingw.
128354 2007-04-27  Bruno Haible  <bruno@clisp.org>
128356         * lib/fflush.c: Add comments.
128357         * modules/fpurge-tests (Depends-on): Add fflush.
128358         * modules/freadable-tests (Depends-on): Likewise.
128359         * modules/fwritable-tests (Depends-on): Likewise.
128361 2007-04-27  Charles Wilson  <libtool@cwilson.fastmail.fm>
128363         * m4/argz.m4 (gl_FUNC_ARGZ): Use !HAVE_WORKING_ARGZ instead of
128364         SYSTEM_ARGZ_IS_BROKEN.  Also, minor stylistic improvements.
128365         Report by Bruno Haible <bruno@clisp.org>.
128367 2007-04-26  Eric Blake  <ebb9@byu.net>
128369         Fix fflush on mingw.
128370         * modules/fflush (Depends-on): Add freading.
128371         * lib/fflush.c (rpl_fflush): Use freading to avoid losing buffered
128372         but unread data.
128374 2007-04-26  Eric Blake  <ebb9@byu.net>
128375         and Bruno Haible  <bruno@clisp.org>
128377         Implement freading and fwriting.
128378         * lib/freading.c: New file.
128379         * lib/freading.h: Likewise.
128380         * m4/freading.m4: Likewise.
128381         * modules/freading: Likewise.
128382         * modules/freading-tests: Likewise.
128383         * tests/test-freading.c: Likewise.
128384         * lib/fwriting.c: New file.
128385         * lib/fwriting.h: Likewise.
128386         * m4/fwriting.m4: Likewise.
128387         * modules/fwriting: Likewise.
128388         * modules/fwriting-tests: Likewise.
128389         * tests/test-fwriting.c: Likewise.
128390         * MODULES.html.sh (File stream based Input/Output): Mention them.
128392 2007-04-26  Bruno Haible  <bruno@clisp.org>
128394         * lib/stdio_.h (fseeko, ftello): Check that off_t has the same size as
128395         'long' when we assume it.
128396         Suggested by Eric Blake.
128398 2007-04-26  Bruno Haible  <bruno@clisp.org>
128400         Ensure fseeko, ftello are declared on glibc systems.
128401         * modules/fflush (configure.ac-early): Require AC_FUNC_FSEEKO.
128402         * modules/fseeko (configure.ac-early): Likewise.
128403         * modules/ftello (configure.ac-early): Likewise.
128404         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Don't define HAVE_FSEEKO, rely on
128405         AC_FUNC_FSEEKO for this.
128406         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Inline gl_CHECK_FSEEKO.
128407         (gl_CHECK_FSEEKO): Remove macro.
128409 2007-04-26  Bruno Haible  <bruno@clisp.org>
128411         * tests/test-fflush.c (main): Also check the ftell result after
128412         fflush and fseek/fseeko.
128413         * lib/fflush.c (rpl_fflush): For BSD implementations, update the
128414         file descriptor position cache in the stream.
128415         * lib/fseeko.c (rpl_fseeko): Likewise.
128417 2007-04-26  Bruno Haible  <bruno@clisp.org>
128419         * modules/fflush-tests (Depends-on): Add fseeko.
128421 2007-04-25  Charles Wilson  <libtool@cwilson.fastmail.fm>
128422             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
128424         * lib/argz_.h: ensure error_t definition is obtained in same
128425         mechanism system argz.h would have.
128426         * m4/argz.m4 (gl_FUNC_ARGZ): add new test to check if $host's
128427         argz facilities are known bad.  Err on the side of caution if
128428         cross-compiling.
128430 2007-04-25  Eric Blake  <ebb9@byu.net>
128432         * lib/fpurge.c (includes): Use stdlib.h for free.
128433         * tests/test-fflush.c (main): Also test fflush-fseeko.
128435 2007-04-25  Bruno Haible  <bruno@clisp.org>
128437         Make fflush+fseek POSIX-compliant on FreeBSD and MacOS X.
128438         * lib/fseeko.c: New file.
128439         * lib/stdio_.h: Include <sys/types.h> when off_t is needed.
128440         (fseeko, fseek): Define to replacements if REPLACE_FFLUSH.
128441         * m4/fseeko.m4 (gl_CHECK_FSEEKO): New macro, extracted from
128442         gl_FUNC_FSEEKO.
128443         (gl_FUNC_FSEEKO): Invoke it.
128444         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Arrange to compile fseeko.c. Invoke
128445         gl_CHECK_FSEEKO. Define HAVE_FSEEKO.
128446         * modules/fflush (Files): Add lib/fseeko.c, m4/fseeko.m4.
128448 2007-04-25  Bruno Haible  <bruno@clisp.org>
128450         * modules/fflush (Depends-on): Add ftello.
128452 2007-04-25  Bruno Haible  <bruno@clisp.org>
128454         * modules/ftello-tests: New file.
128455         * tests/test-ftello.c: New file.
128457         * modules/ftello: New file.
128458         * m4/ftello.m4: New file.
128459         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELLO,
128460         HAVE_FTELLO.
128461         * lib/stdio_.h (ftello): New declaration.
128462         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELLO,
128463         HAVE_FTELLO.
128465 2007-04-25  Bruno Haible  <bruno@clisp.org>
128467         * modules/fseeko-tests: New file.
128468         * tests/test-fseeko.c: New file.
128470         * modules/fseeko: New file.
128471         * m4/fseeko.m4: New file.
128472         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEKO,
128473         HAVE_FSEEKO.
128474         * lib/stdio_.h (fseeko): New declaration.
128475         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEKO,
128476         HAVE_FSEEKO.
128478 2007-04-25  Bruno Haible  <bruno@clisp.org>
128480         * lib/stdio_.h (fflush): Add support for GNULIB_POSIXCHECK.
128482 2007-04-25  Bruno Haible  <bruno@clisp.org>
128484         * lib/unistd_.h: Include <stdio.h> if needed to get the SEEK_* macros.
128485         * tests/test-stdio.c: Check that the various SEEK_* macros are defined.
128486         * tests/test-unistd.c: Likewise.
128487         * tests/test-fcntl.c: Likewise.
128489 2007-04-23  Eric Blake  <ebb9@byu.net>
128491         * lib/fflush.c: Fix missing include.
128492         Reported by Bruno Haible.
128494 2007-04-23  Bruno Haible  <bruno@clisp.org>
128496         * lib/fpurge.c (fpurge) [glibc, BSD]: Free a malloc()ed ungetc buffer.
128497         Reported by Eric Blake.
128499 2007-04-23  Bruno Haible  <bruno@clisp.org>
128501         * lib/fbufmode.c (fbufmode): Port to Solaris/SPARC64.
128503 2007-04-23  Bruno Haible  <bruno@clisp.org>
128505         * lib/fseterr.c (fseterr): Don't hardcode the value of _IOERR.
128507 2007-04-23  Bruno Haible  <bruno@clisp.org>
128509         * tests/test-fbufmode.c (main): Be prepared to a failure of setvbuf.
128510         Needed on HP-UX 11.
128512 2007-04-16  Eric Blake  <ebb9@byu.net>
128514         Make fflush rely on fpurge.
128515         * lib/fflush.c (rpl_fflush): Rely on fpurge module, rather than
128516         open coding all variants.
128517         * modules/fflush (Depends-on): Add fpurge and unistd.
128518         * modules/fflush-tests (Depends-on): Unistd is no longer extra.
128519         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Simplify.
128521         Fix --with-tests compilation on cygwin.
128522         * modules/argmatch-tests (Makefile.am): List gnulib library first
128523         in LDADD.
128524         * modules/argp-tests (Makefile.am): Likewise.
128525         * modules/array-list-tests (Makefile.am): Likewise.
128526         * modules/array-oset-tests (Makefile.am): Likewise.
128527         * modules/avltree-list-tests (Makefile.am): Likewise.
128528         * modules/avltree-oset-tests (Makefile.am): Likewise.
128529         * modules/avltreehash-list-tests (Makefile.am): Likewise.
128530         * modules/carray-list-tests (Makefile.am): Likewise.
128531         * modules/dirname-tests (Makefile.am): Likewise.
128532         * modules/frexp-tests (Makefile.am): Likewise.
128533         * modules/isnanl-tests (Makefile.am): Likewise.
128534         * modules/linked-list-tests (Makefile.am): Likewise.
128535         * modules/linkedhash-list-tests (Makefile.am): Likewise.
128536         * modules/lock-tests (Makefile.am): Likewise.
128537         * modules/rbtree-list-tests (Makefile.am): Likewise.
128538         * modules/rbtree-oset-tests (Makefile.am): Likewise.
128539         * modules/rbtreehash-list-tests (Makefile.am): Likewise.
128540         * modules/tls-tests (Makefile.am): Likewise.
128541         * modules/tsearch-tests (Makefile.am): Likewise.
128542         * modules/xvasprintf-tests (Makefile.am): Likewise.
128544         Fix fpurge for cygwin.
128545         * lib/fpurge.c (fpurge): Fix order of operation flub, and return a
128546         value.
128547         * modules/fpurge-tests (Depends-on): Clean up trash.
128549 2007-04-16  Simon Josefsson  <simon@josefsson.org>
128551         * lib/gc-libgcrypt.c (gc_hash_open): Shut up compiler warnings.
128553         * m4/autobuild.m4: Re-indent.
128555 2007-04-13  Bruno Haible  <bruno@clisp.org>
128557         * modules/fpurge-tests: New file.
128558         * tests/test-fpurge.c: New file.
128560         * modules/fpurge: New file.
128561         * lib/fpurge.h: New file.
128562         * lib/fpurge.c: New file.
128563         * m4/fpurge.m4: New file.
128565 2007-04-13  Bruno Haible  <bruno@clisp.org>
128567         * modules/fbufmode-tests: New file.
128568         * tests/test-fbufmode.c: New file.
128570         * modules/fbufmode: New file.
128571         * lib/fbufmode.h: New file.
128572         * lib/fbufmode.c: New file.
128573         * m4/fbufmode.m4: New file.
128575 2007-04-13  Bruno Haible  <bruno@clisp.org>
128577         * modules/fwritable-tests: New file.
128578         * tests/test-fwritable.c: New file.
128580         * modules/fwritable: New file.
128581         * lib/fwritable.h: New file.
128582         * lib/fwritable.c: New file.
128583         * m4/fwritable.m4: New file.
128585 2007-04-13  Bruno Haible  <bruno@clisp.org>
128587         * modules/freadable-tests: New file.
128588         * tests/test-freadable.c: New file.
128590         * modules/freadable: New file.
128591         * lib/freadable.h: New file.
128592         * lib/freadable.c: New file.
128593         * m4/freadable.m4: New file.
128595 2007-04-13  Bruno Haible  <bruno@clisp.org>
128597         * modules/fflush-tests (Makefile.am): Remove EXTRA_DIST. Augment
128598         MOSTLYCLEANFILES.
128600 2007-04-13  Paul Eggert  <eggert@cs.ucla.edu>
128602         * build-aux/bootstrap (gnulib_tool_option_extras): New var, used by
128603         gzip bootstrap.conf to avoid dragging in i18n machinery.
128604         (gnulib_tool_option): Use it.
128606 2007-04-13  Bruno Haible  <bruno@clisp.org>
128608         * tests/test-vasnprintf-posix.c (test_function): Add tests for %f and
128609         %F directives.
128610         * tests/test-vasprintf-posix.c (test_function): Likewise.
128611         * tests/test-snprintf-posix.h (test_function): Likewise.
128612         * tests/test-sprintf-posix.h (test_function): Likewise.
128613         * tests/test-fprintf-posix.h (test_function): Likewise.
128614         * tests/test-printf-posix.h (test_function): Likewise.
128615         * tests/test-fprintf-posix.out: Likewise.
128617 2007-04-13  Bruno Haible  <bruno@clisp.org>
128619         * modules/lock-tests (configure.ac): For LIBSCHED, try also -lposix4.
128620         * modules/tls-tests (configure.ac): Likewise.
128621         Reported by Arto C. Nirkko <anirkko@insel.ch>.
128623 2007-04-13  Bruno Haible  <bruno@clisp.org>
128625         * lib/tls.c (glthread_tls_get): Fix return type.
128626         Patch by Arto C. Nirkko <anirkko@insel.ch>.
128628 2007-04-12  Eric Blake  <ebb9@byu.net>
128630         * modules/gettime (Depends-on): Remove gettime.
128631         Reported by Dmitry V. Levin.
128633 2007-04-12  Bruno Haible  <bruno@clisp.org>
128635         * modules/fflush (Include): Mention <stdio.h>.
128636         * modules/strtoimax (Include): Mention <inttypes.h>.
128637         * modules/strtoumax (Include): Likewise.
128639 2007-04-12  Eric Blake  <ebb9@byu.net>
128641         * .cvsignore: New file.
128642         * .gitignore: Likewise.
128644 2007-04-12  Bruno Haible  <bruno@clisp.org>
128646         * modules/iconv-tests (test_iconv_LDADD): Mention -liconv after LDADD,
128647         not before, since $(LDADD) often contains libgnu.a.
128648         * modules/striconv-tests (test_striconv_LDADD): Likewise.
128649         * modules/striconveh-tests (test_striconveh_LDADD): Likewise.
128650         * modules/striconveha-tests (test_striconveha_LDADD): Likewise.
128651         Needed on Cygwin.
128653 2007-04-12  Eric Blake  <ebb9@byu.net>
128655         Work around glibc's failure to flush stdin on fclose.
128656         * lib/closein.c (close_stdin): Flush stdin before closing.
128658         Work around glibc's failure to reset seekable stdin on exit.
128659         * modules/closein: New module.
128660         * lib/closein.c: New file.
128661         * lib/closein.h: Likewise.
128662         * m4/closein.m4: Likewise.
128663         * MODULES.html.sh (File stream based Input/Output): Document it.
128665 2007-04-12  Simon Josefsson  <simon@josefsson.org>
128667         * gnulib-tool: Rename generated 'autobuild' script to
128668         'do-autobuild' in --create-megatestdir output.
128670         * doc/gnulib.texi (Build robot for gnulib): Fix.
128672 2007-04-12  Simon Josefsson  <simon@josefsson.org>
128674         * modules/sysexits (Depends-on): Add absolute-header.
128676 2007-04-12  Eric Blake  <ebb9@byu.net>
128678         No need to preserve errno on success.
128679         * lib/fflush.c (rpl_fflush): Simplify errno tracking.
128680         Reported by Bruno Haible.
128682 2007-04-12  Simon Josefsson  <simon@josefsson.org>
128684         * MODULES.html.sh (Support for maintaining and releasing
128685         projects): Add autobuild.  Suggested by Eric Blake <ebb9@byu.net>.
128687 2007-04-12  Simon Josefsson  <simon@josefsson.org>
128689         * gnulib-tool (func_modules_add_dummy): Respect --avoid=dummy.
128691 2007-04-12  Simon Josefsson  <simon@josefsson.org>
128693         * modules/autobuild: New module.
128695         * m4/autobuild.m4: New file.
128697 2007-04-11  Bruno Haible  <bruno@clisp.org>
128699         * lib/vasnprintf.c (VASNPRINTF): Implement the %F directive using the
128700         %f directive, if NEED_PRINTF_DIRECTIVE_F is defined.
128701         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): New macro.
128702         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_F): New macro.
128703         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
128704         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
128705         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
128706         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
128707         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
128708         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
128709         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Invoke
128710         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
128711         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
128712         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Invoke
128713         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
128714         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
128715         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Invoke
128716         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
128717         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
128718         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Invoke
128719         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
128720         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
128721         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Invoke
128722         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
128723         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
128724         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Invoke
128725         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
128726         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
128727         Reported by Eric Blake.
128729 2007-04-11  Bruno Haible  <bruno@clisp.org>
128731         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Fix test. It always failed.
128733 2007-04-10  Bruno Haible  <bruno@clisp.org>
128735         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct result
128736         for NaN and Infinity. Needed on FreeBSD 6.1.
128737         * tests/test-vasnprintf-posix.c (test_function): Undo last change
128738         regarding results for "%010a" of Infinity and NaN.
128739         * tests/test-vasprintf-posix.c (test_function): Likewise.
128740         * tests/test-snprintf-posix.h (test_function): Likewise.
128741         * tests/test-sprintf-posix.h (test_function): Likewise.
128742         * tests/test-fprintf-posix.h (test_function): Likewise.
128743         * tests/test-printf-posix.h (test_function): Likewise.
128744         * tests/test-fprintf-posix.out: Likewise.
128746 2007-04-10  Bruno Haible  <bruno@clisp.org>
128748         * modules/locale-tests: New file.
128749         * tests/test-locale.c: New file.
128751         * modules/locale: New file.
128752         * lib/locale_.h: New file.
128753         * m4/locale_h.m4: New file.
128755 2007-04-10  Paul Eggert  <eggert@cs.ucla.edu>
128756             Bruno Haible  <bruno@clisp.org>
128758         * m4/signbit.m4 (gl_SIGNBIT): When the sign bit position could not
128759         be determined, test for availability of the copysignf, copysign,
128760         copysignl functions.
128761         * lib/signbitf.c (gl_signbitf): Use copysignf if available in libc.
128762         * lib/signbitd.c (gl_signbitd): Use copysign if available in libc.
128763         * lib/signbitl.c (gl_signbitl): Use copysignl if available in libc.
128765 2007-04-09  Eric Blake  <ebb9@byu.net>
128767         * lib/stdio_.h [REPLACE_FFLUSH]: Declare rpl_fflush.
128768         * modules/stdio (Makefile.am): Support fflush.
128769         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
128770         * modules/fflush: New file.
128771         * lib/fflush.c: Likewise.
128772         * m4/fflush.m4: Likewise.
128773         * modules/fflush-tests: New test.
128774         * tests/test-fflush.c: Likewise.
128775         * MODULES.html.sh (Input/output <stdio.h>): Document new module.
128777 2007-04-06  Bruno Haible  <bruno@clisp.org>
128779         * lib/vasnprintf.c: Include <math.h>. Don't include float+.h.
128780         (VASNPRINTF): Use signbit for faster determination whether to print a
128781         minus sign.
128782         * modules/vasnprintf (Files): Remove lib/float+.h.
128783         * modules/fprintf-posix (Depends-on): Add signbit.
128784         * modules/snprintf-posix (Depends-on): Likewise.
128785         * modules/sprintf-posix (Depends-on): Likewise.
128786         * modules/vasnprintf-posix (Depends-on): Likewise.
128787         * modules/vasprintf-posix (Depends-on): Likewise.
128788         * modules/vfprintf-posix (Depends-on): Likewise.
128789         * modules/vsnprintf-posix (Depends-on): Likewise.
128790         * modules/vsprintf-posix (Depends-on): Likewise.
128792 2007-04-06  Bruno Haible  <bruno@clisp.org>
128794         * tests/test-frexp.c (main): Test also the sign bit of zero results.
128795         * tests/test-frexpl.c (main): Likewise.
128796         * tests/test-ldexpl.c (main): Likewise.
128797         * modules/frexp-tests (Depends-on): Add signbit.
128798         * modules/frexpl-tests (Depdends-on): Likewise.
128799         * modules/ldexpl-tests (Depdends-on): Likewise.
128801 2007-04-06  Bruno Haible  <bruno@clisp.org>
128803         * modules/signbit-tests: New file.
128804         * tests/test-signbit.c: New file.
128806         * modules/signbit: New file.
128807         * lib/signbitf.c: New file.
128808         * lib/signbitd.c: New file.
128809         * lib/signbitl.c: New file.
128810         * m4/signbit.m4: New file.
128811         * lib/math_.h (gl_signbitf, gl_signbitd, gl_signbitl): New declarations.
128812         (signbit): New macro.
128813         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_SIGNBIT and
128814         REPLACE_SIGNBIT.
128815         * modules/math (Makefile.am): Substitute also GNULIB_SIGNBIT and
128816         REPLACE_FREXPL into math.h.
128818 2007-04-06  Bruno Haible  <bruno@clisp.org>
128820         * modules/isnanf-nolibm-tests: New file.
128821         * tests/test-isnanf.c: New file.
128823         * modules/isnanf-nolibm: New file.
128824         * lib/isnanf.h: New file.
128825         * lib/isnanf.c: New file.
128826         * lib/isnan.c: Consider the USE_FLOAT macro.
128827         * m4/isnanf.m4: New file.
128829 2007-04-06  Bruno Haible  <bruno@clisp.org>
128831         * modules/gettext-h (configure.ac): AC_SUBST LIBINTL and LTLIBINTL.
128832         (Link): New section.
128834         * modules/canonicalize-lgpl-tests (Makefile.am): Undo last change.
128836 2007-04-06  Bruno Haible  <bruno@clisp.org>
128838         Assume the 'long double' type.
128839         * m4/longdouble.m4: Remove file.
128840         * config/srclist.txt: Don't mention longdouble.m4.
128841         * lib/allocsa.h: Assume HAVE_LONG_DOUBLE to be true.
128842         * lib/float+.h: Likewise.
128843         * lib/frexp.c: Likewise.
128844         * lib/printf-args.h: Likewise.
128845         * lib/printf-args.c: Likewise.
128846         * lib/printf-frexp.c: Likewise.
128847         * lib/printf-parse.c: Likewise.
128848         * lib/vasnprintf.c: Likewise.
128849         * m4/allocsa.m4: Remove gt_TYPE_LONGDOUBLE invocation.
128850         * m4/intl.m4: Likewise.
128851         * m4/isnanl.m4: Likewise.
128852         * m4/printf.m4: Likewise.
128853         * m4/printf-frexpl.m4: Likewise.
128854         * m4/vasnprintf.m4: Likewise.
128855         * modules/allocsa (Files): Remove m4/longdouble.m4.
128856         * modules/gettext (Files): Likewise.
128857         * modules/relocatable-prog-wrapper (Files): Likewise.
128858         * modules/vasnprintf (Files): Likewise.
128859         * modules/isnanl (Files): Likewise.
128860         (Include): Simplify.
128861         * modules/isnanl-nolibm (Files): Remove m4/longdouble.m4.
128862         (Include): Simplify.
128863         * modules/printf-frexpl (Files): Remove m4/longdouble.m4.
128864         (Include): Simplify.
128865         * modules/snprintf-posix-tests (Files): Remove m4/longdouble.m4.
128866         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
128867         * modules/sprintf-posix-tests (Files): Remove m4/longdouble.m4.
128868         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
128869         * modules/vasnprintf-posix-tests (Files): Remove m4/longdouble.m4.
128870         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
128871         * modules/vasprintf-posix-tests (Files): Remove m4/longdouble.m4.
128872         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
128873         * modules/vsnprintf-posix-tests (Files): Remove m4/longdouble.m4.
128874         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
128875         * modules/vsprintf-posix-tests (Files): Remove m4/longdouble.m4.
128876         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
128877         * tests/test-isnanl-nolibm.c: Assume HAVE_LONG_DOUBLE to be true.
128878         * tests/test-isnanl.c: Likewise.
128879         * tests/test-snprintf-posix.h: Likewise.
128880         * tests/test-sprintf-posix.h: Likewise.
128881         * tests/test-vasnprintf-posix.c: Likewise.
128882         * tests/test-vasnprintf-posix2.c: Likewise.
128883         * tests/test-vasprintf-posix.c: Likewise.
128885 2007-04-06  Bruno Haible  <bruno@clisp.org>
128887         Fix problem with Compaq (ex-DEC) Desktop C compiler on Tru64.
128888         * lib/math_.h [__DECC]: Include the overridden include file through
128889         #include_next, outside the double-inclusion guard.
128890         * lib/stdio_.h [__DECC]: Likewise.
128891         * lib/stdlib_.h [__DECC]: Likewise.
128892         * lib/string_.h [__DECC]: Likewise.
128893         * lib/time_.h [__DECC]: Likewise.
128894         * lib/wchar_.h [__DECC]: Likewise.
128895         * lib/wctype_.h [__DECC]: Likewise.
128896         * lib/inttypes_.h [__DECC]: Likewise.
128897         Reported by Albert Chin <china@thewrittenword.com> in
128898         <http://lists.gnu.org/r/bug-gnulib/2007-04/msg00088.html>.
128900 2007-04-04  Eric Blake  <ebb9@byu.net>
128902         * m4/stdint.m4 (gl_STDINT_H): Detect WINT_MAX bug in cygwin
128903         1.5.x.
128905 2007-04-04  Bruno Haible  <bruno@clisp.org>
128907         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct
128908         rounding. Don't assume that FreeBSD 6 and NetBSD 4 pass this test.
128910 2007-04-04  Bruno Haible  <bruno@clisp.org>
128912         * tests/test-vasnprintf-posix.c (test_function): Allow two possible
128913         results for "%010a" of Infinity and NaN.
128914         * tests/test-vasprintf-posix.c (test_function): Likewise.
128915         * tests/test-snprintf-posix.h (test_function): Likewise.
128916         * tests/test-sprintf-posix.h (test_function): Likewise.
128917         * tests/test-fprintf-posix.h (test_function): Remove these tests.
128918         * tests/test-printf-posix.h (test_function): Likewise.
128919         * tests/test-fprintf-posix.out: Update.
128920         Needed for FreeBSD 6.1.
128922 2007-04-04  Bruno Haible  <bruno@clisp.org>
128924         * DEPENDENCIES: Remove mentions of tar and gzip, since they are not
128925         directly used by the gnulib modules nor by gnulib-tool.
128927 2007-04-04  Paul Eggert  <eggert@cs.ucla.edu>
128929         * DEPENDENCIES: Give overall description of version dependency
128930         desirability.  Use more-typical names for apps.
128931         Add shell, coreutils, diffutils, grep, tar, gzip.
128933 2007-04-04  Simon Josefsson  <simon@josefsson.org>
128935         * MODULES.html.sh: Rename crypto modules.  Remove iconvme.
128937 2007-04-04  Karl Berry  <karl@gnu.org>
128939         * MODULES.html.sh (func_module): missing '.
128941 2007-04-03  Bruno Haible  <bruno@clisp.org>
128943         * modules/argmatch-tests (Makefile.am): New variable
128944         test_argmatch_LDADD.
128945         * modules/argp-tests (Makefile.am): New variable test_argp_LDADD.
128946         * modules/array-list-tests (Makefile.am): New variable
128947         test_array_list_LDADD.
128948         * modules/array-oset-tests (Makefile.am): New variable
128949         test_array_oset_LDADD.
128950         * modules/avltree-list-tests (Makefile.am): New variable
128951         test_avltree_list_LDADD.
128952         * modules/avltree-oset-tests (Makefile.am): New variable
128953         test_avltree_oset_LDADD.
128954         * modules/avltreehash-list-tests (Makefile.am): New variable
128955         test_avltreehash_list_LDADD.
128956         * modules/canonicalize-lgpl-tests (Makefile.am): New variable
128957         test_canonicalize_lgpl_LDADD.
128958         * modules/carray-list-tests (Makefile.am): New variable
128959         test_carray_list_LDADD.
128960         * modules/dirname-tests (Makefile.am): New variable
128961         test_dirname_LDADD.
128962         * modules/linked-list-tests (Makefile.am): New variable
128963         test_linked_list_LDADD.
128964         * modules/linkedhash-list-tests (Makefile.am): New variable
128965         test_linkedhash_list_LDADD.
128966         * modules/rbtree-list-tests (Makefile.am): New variable
128967         test_rbtree_list_LDADD.
128968         * modules/rbtree-oset-tests (Makefile.am): New variable
128969         test_rbtree_oset_LDADD.
128970         * modules/rbtreehash-list-tests (Makefile.am): New variable
128971         test_rbtreehash_list_LDADD.
128972         * modules/xvasprintf-tests (Makefile.am): New variable
128973         test_xvasprintf_LDADD.
128974         Reported by Eric Blake.
128976 2007-04-03  Eric Blake  <ebb9@byu.net>
128978         * DEPENDENCIES: Weaken m4 requirements.
128980 2007-04-03  Bruno Haible  <bruno@clisp.org>
128982         * modules/frexp-tests (configure.ac): Remove AC_SUBST.
128983         * modules/isnanl-tests (configure.ac): Likewise.
128985 2007-04-03  Ben Pfaff  <blp@gnu.org>
128987         * modules/iconv_open: Add $(srcdir)/ to source directory
128988         references in Makefile fragments that call gperf, to fix VPATH
128989         builds.
128991 2007-04-03  Bruno Haible  <bruno@clisp.org>
128993         * modules/ldexpl (Depends-on): Add isnanl, remove isnanl-nolibm.
128994         * lib/ldexpl.c: Undo last change.
128996 2007-04-03  Bruno Haible  <bruno@clisp.org>
128998         * modules/printf-frexpl (Depends-on): Undo last change.
128999         (Files): Add m4/ldexpl.m4.
129001 2007-04-03  Bruno Haible  <bruno@clisp.org>
129003         * m4/isnanl.m4 (gl_FUNC_ISNANL): Substitute ISNANL_LIBM.
129004         * modules/isnanl (Link): New section.
129006         * m4/frexp.m4 (gl_FUNC_FREXP): Substitute FREXP_LIBM.
129007         * modules/frexp (Link): New section.
129009         * m4/frexpl.m4 (gl_FUNC_FREXPL): Substitute FREXPL_LIBM.
129010         * modules/frexpl (Link): New section.
129012         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Substitute LDEXPL_LIBM.
129013         * modules/ldexpl (Link): New section.
129015 2007-04-03  Bruno Haible  <bruno@clisp.org>
129017         * modules/TEMPLATE-EXTENDED: New file.
129018         * gnulib-tool (func_all_modules, func_verify_module): Exclude it.
129020 2007-04-03  Bruno Haible  <bruno@clisp.org>
129022         * DEPENDENCIES: New file.
129023         Suggested by Simon Josefsson.
129025 2007-04-03  Bruno Haible  <bruno@clisp.org>
129027         * doc/gnulib.texi: Escape @.
129029 2007-04-03  James Youngman  <jay@gnu.org>
129030         and Paul Eggert  <eggert@cs.ucla.edu>
129032         * lib/stat-time.h (get_stat_birthtime): Check for zero-valued
129033         birthtime on all systems that have birthtime, not just those which
129034         use st_birthtimensec rather than st_birthtim.  Putting zero in
129035         st_birthtim.tv_sec is how (for example) FreeBSD/x86 6.1 indicates
129036         that the birth time is not available for files on an NFS mount.
129038 2007-04-03  Simon Josefsson  <simon@josefsson.org>
129040         * modules/memxor: Move back from crypto/, suggested by Bruno.
129041         * modules/crypto/hmac-sha1: Fix memxor dependency.
129043         * modules/crypto/gc: Moved from ../.
129045 2007-04-02  Eric Blake  <ebb9@byu.net>
129047         * lib/ldexpl.c (includes): Avoid libm.
129049         * modules/printf-frexpl (Depends-on): Depend on ldexpl.
129051 2007-04-02  Bruno Haible  <bruno@clisp.org>
129053         * lib/sysexit_.h (EX_OK): Disable the EX_OK definition from <unistd.h>
129054         on IRIX.
129056 2007-04-02  Bruno Haible  <bruno@clisp.org>
129058         * m4/intdiv0.m4 (gt_INTDIV0): Avoid performing the test for real on
129059         x86 or x86_64 platforms running MacOS X.
129060         Reported by Ryan Schmidt <@ryandesign.com>.
129062 2007-04-02  Bruno Haible  <bruno@clisp.org>
129064         * m4/intdiv0.m4 (gt_INTDIV0): When cross-compiling, treat x86_64 like
129065         i386.
129067 2007-04-01  Simon Josefsson  <simon@josefsson.org>
129069         * modules/crypto/arcfour: Moved from ../.
129070         * modules/crypto/arcfour-tests: Moved from ../.
129071         * modules/crypto/arctwo: Moved from ../.
129072         * modules/crypto/arctwo-tests: Moved from ../.
129073         * modules/crypto/des: Moved from ../.
129074         * modules/crypto/des-tests: Moved from ../.
129075         * modules/crypto/gc-arcfour: Moved from ../.
129076         * modules/crypto/gc-arcfour-tests: Moved from ../.
129077         * modules/crypto/gc-arctwo: Moved from ../.
129078         * modules/crypto/gc-arctwo-tests: Moved from ../.
129079         * modules/crypto/gc-des: Moved from ../.
129080         * modules/crypto/gc-des-tests: Moved from ../.
129081         * modules/crypto/gc-hmac-md5: Moved from ../.
129082         * modules/crypto/gc-hmac-md5-tests: Moved from ../.
129083         * modules/crypto/gc-hmac-sha1: Moved from ../.
129084         * modules/crypto/gc-hmac-sha1-tests: Moved from ../.
129085         * modules/crypto/gc-md2: Moved from ../.
129086         * modules/crypto/gc-md2-tests: Moved from ../.
129087         * modules/crypto/gc-md4: Moved from ../.
129088         * modules/crypto/gc-md4-tests: Moved from ../.
129089         * modules/crypto/gc-md5: Moved from ../.
129090         * modules/crypto/gc-md5-tests: Moved from ../.
129091         * modules/crypto/gc-pbkdf2-sha1: Moved from ../.
129092         * modules/crypto/gc-pbkdf2-sha1-tests: Moved from ../.
129093         * modules/crypto/gc-random: Moved from ../.
129094         * modules/crypto/gc-rijndael: Moved from ../.
129095         * modules/crypto/gc-rijndael-tests: Moved from ../.
129096         * modules/crypto/gc-sha1: Moved from ../.
129097         * modules/crypto/gc-sha1-tests: Moved from ../.
129098         * modules/crypto/gc-tests: Moved from ../.
129099         * modules/crypto/hmac-md5: Moved from ../.
129100         * modules/crypto/hmac-md5-tests: Moved from ../.
129101         * modules/crypto/hmac-sha1: Moved from ../.
129102         * modules/crypto/hmac-sha1-tests: Moved from ../.
129103         * modules/crypto/md2: Moved from ../.
129104         * modules/crypto/md2-tests: Moved from ../.
129105         * modules/crypto/md4: Moved from ../.
129106         * modules/crypto/md4-tests: Moved from ../.
129107         * modules/crypto/md5: Moved from ../.
129108         * modules/crypto/md5-tests: Moved from ../.
129109         * modules/crypto/memxor: Moved from ../.
129110         * modules/crypto/rijndael: Moved from ../.
129111         * modules/crypto/rijndael-tests: Moved from ../.
129112         * modules/crypto/sha1: Moved from ../.
129114 2007-03-30  James Youngman  <jay@gnu.org>
129116         * tests/test-stat-time.c (prepare_test): use chmod() rather than
129117         rename() to change the ctime of a file (because ctime is unaffected
129118         by rename on jfs2 on AIX 5.1).
129119         (main): Start by doing cleanup, in case a previous run failed leaving
129120         test files behind.
129122 2007-03-31  Bruno Haible  <bruno@clisp.org>
129124         Support old proprietary implementations of iconv.
129125         * modules/iconv_open: New file.
129126         * lib/iconv_.h: New file.
129127         * m4/iconv_h.m4: New file.
129128         * lib/iconv_open.c: New file.
129129         * lib/iconv_open-aix.gperf: New file.
129130         * lib/iconv_open-hpux.gperf: New file.
129131         * lib/iconv_open-irix.gperf: New file.
129132         * lib/iconv_open-osf.gperf: New file.
129133         * m4/iconv_open.m4: New file.
129134         * modules/linebreak (Depends-on): Add iconv_open.
129135         * modules/striconv (Depends-on): Likewise.
129136         * modules/striconveh (Depends-on): Likewise.
129137         * modules/unicodeio (Depends-on): Likewise.
129138         * lib/striconveh.h (mem_cd_iconveh, str_cd_iconveh): Allow cd to be
129139         (iconv_t)(-1).
129140         * lib/striconveh.c (mem_cd_iconveh_internal): Use an indirect
129141         conversion if cd is (iconv_t)(-1).
129142         (mem_iconveh, str_iconveh): Don't fail just because a direct conversion
129143         is not possible.
129145 2007-03-31  Bruno Haible  <bruno@clisp.org>
129147         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
129148         work on Solaris either. Protect also second use of "autodetect_jp".
129150 2007-03-31  Bruno Haible  <bruno@clisp.org>
129152         * m4/frexpl.m4 (gl_FUNC_FREXPL): Set HAVE_DECL_FREXPL to 0 when
129153         the function is not present.
129155 2007-03-31  Bruno Haible  <bruno@clisp.org>
129157         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Set HAVE_DECL_LDEXPL to 0 when
129158         the function is not present.
129160 2007-03-31  Bruno Haible  <bruno@clisp.org>
129162         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-29 patch. Test also against
129163         a bug in HP-UX iconv_open().
129165 2007-03-31  Bruno Haible  <bruno@clisp.org>
129167         * MODULES.html.sh (func_module): Don't show gnulib-common.m4.
129168         (Mathematics <math.h>): New section, add fpieee.
129169         (Input/output <stdio.h>): Add fseterr.
129170         (Mathematics <math.h>): New section, add printf-frexp.
129171         (Container data structures): Add sublist.
129172         (Core language properties): Add fpucw, inline.
129173         (Functions for greatest-width integer types <inttypes.h>): Add
129174         imaxabs, imaxdiv, inttypes.
129175         (Mathematics <math.h>): Add frexp, frexpl, isnan-nolibm, isnanl,
129176         isnanl-nolibm, ldexp.
129177         (Mathematics <math.h>): New section, add printf-frexpl.
129178         (Support for systems lacking POSIX:2001): Add fprintf-posix,
129179         printf-posix, snprintf-posix, sprintf-posix, string, search, socklen,
129180         sys_select, sys_socket, vasnprintf-posix, vasprintf-posix,
129181         vfprintf-posix, vprintf-posix, vsnprintf-posix, vsprintf-posix.
129182         (Unicode string functions): Add unistr/u*-mbtoucr.
129183         (Java): Add javacomp-script, javaexec-script.
129184         (C#): Add csharpcomp-script, csharpexec-script.
129185         (Support for building libraries and executables): Add havelib,
129186         relocatable-*.
129187         (Support for maintaining and releasing projects): Renamed from
129188         'Support for maintaining and release projects'. Add announce-gen.
129190 2007-03-31  Bruno Haible  <bruno@clisp.org>
129192         * README: Talk primarily about git.
129193         (git and CVS): Renamed from CVS.
129194         * doc/gnulib.texi (Introduction, Build robot for gnulib): Mention that
129195         gnulib is available through git.
129196         * doc/gnulib-tool.texi (CVS Issues): Mention git and svn as well.
129198 2007-03-30  Bruno Haible  <bruno@clisp.org>
129200         * lib/alloca_.h: Change prefix of double-inclusion guard macro to _GL_.
129201         * lib/poll_.h: Likewise.
129202         * lib/stat_.h: Likewise.
129203         * lib/sys_time_.h: Likewise.
129204         * lib/sysexit_.h: Likewise.
129205         * lib/glob_.h: Prefix double-inclusion guard macro with _GL_.
129206         * lib/stdbool_.h: Likewise.
129207         * lib/byteswap_.h: Add double-inclusion guard.
129209 2007-03-30  Sergey Poznyakoff  <gray@mirddin.farlep.net>
129211         * lib/sysexit_.h: Prefix double-inclusion guard macro with _GNULIB.
129213 2007-03-30  Karl Berry  <karl@gnu.org>
129215         * config/srclist-update: double space after USA in the license
129216         substitution, since that's how it's usually (?) written.
129218 2007-03-30  Paul Eggert  <eggert@cs.ucla.edu>
129220         * lib/write-any-file.c (can_write_any_file): Fix else-else bug
129221         reported by Bruno Haible.
129223 2007-03-29  Bruno Haible  <bruno@clisp.org>
129225         * m4/iconv.m4 (AM_ICONV_LINK): Require AC_CANONICAL_HOST. Test against
129226         a bug in AIX iconv().
129228 2007-03-29  Bruno Haible  <bruno@clisp.org>
129230         * modules/ldexpl-tests: New file.
129231         * tests/test-ldexpl.c: New file.
129233 2007-03-29  Bruno Haible  <bruno@clisp.org>
129235         * lib/ldexpl.c: Include fpucw.h.
129236         (ldexpl): Use BEGIN/END_LONG_DOUBLE_ROUNDING. Skip the last unneeded
129237         multiplication.
129238         * modules/ldexpl (Depends-on): Add fpucw.
129240 2007-03-29  Bruno Haible  <bruno@clisp.org>
129242         * modules/ldexpl: New file.
129243         * m4/ldexpl.m4: New file.
129244         * lib/math_.h (ldexpl): Define to a replacement if REPLACE_LDEXPL is
129245         set.
129246         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize also GNULIB_LDEXPL,
129247         REPLACE_LDEXPL.
129248         * modules/math (Makefile.am): Substitute also GNULIB_LDEXPL,
129249         REPLACE_LDEXPL.
129250         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
129251         gl_FUNC_LDEXPL_WORKS.
129252         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Remove test for ldexpl.
129253         * modules/mathl (Files): Remove lib/ldexpl.c.
129254         (Depends-on): Add ldexpl.
129256 2007-03-29  Bruno Haible  <bruno@clisp.org>
129258         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Declare frexpl.
129260 2007-03-29  Bruno Haible  <bruno@clisp.org>
129262         * tests/test-striconveh.c (main): Don't assume that a direct conversion
129263         between ISO-8859-1 and ISO-8859-2 is possible. Needed for OSF/1, IRIX
129264         and possibly also HP-UX.
129265         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
129266         work on AIX, IRIX, HP-UX, OSF/1.
129267         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
129268         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
129269         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
129270         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
129271         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
129272         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
129274 2007-03-29  Bruno Haible  <bruno@clisp.org>
129276         * tests/test-stat-time.c: Include <fcntl.h>, not <sys/fcntl.h>.
129278 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
129280         * lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
129281         to work around a problem on OSF/1 5.1 reported by Bruno Haible.
129283 2007-03-29  Eric Blake  <ebb9@byu.net>
129285         * lib/acl-internal.h: Remove redundant include.
129286         (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
129287         Cygwin when a file is locked.
129289 2007-03-29  Bruno Haible  <bruno@clisp.org>
129291         * lib/vasprintf.c [IN_LIBASPRINTF]: Include different specification
129292         file.
129293         * lib/asprintf.c [IN_LIBASPRINTF]: Likewise.
129295 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
129297         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
129298         try to remove a parent directory if the child couldn't be removed
129299         (except for the first rmdir, which could fail because the child
129300         doesn't exist).  Problem reported by Jeff Blaine in
129301         <http://lists.gnu.org/r/bug-tar/2007-03/msg00014.html>.
129303 2007-03-28  Bruno Haible  <bruno@clisp.org>
129305         * lib/striconveh.c (utf8conv_carefully): New function.
129306         (mem_cd_iconveh_internal): Invoke it.
129308 2007-03-28  Bruno Haible  <bruno@clisp.org>
129310         * lib/striconveh.c (mem_cd_iconveh_internal): Use u8_mbtoucr instead
129311         of u8_mbtouc in order to distinguish invalid and incomplete UTF-8
129312         input.
129313         * modules/striconveh (Depends-on): Add unistr/u8-mbtoucr. Replace
129314         utf8-ucs4 with unistr/u8-mbtouc. Replace ucs4-utf8 with
129315         unistr/u8-uctomb.
129317 2007-03-28  Bruno Haible  <bruno@clisp.org>
129319         * modules/unistr/u8-mbtoucr: New file.
129320         * lib/unistr/u8-mbtoucr.c: New file.
129321         * modules/unistr/u16-mbtoucr: New file.
129322         * lib/unistr/u16-mbtoucr.c: New file.
129323         * modules/unistr/u16-mbtoucr: New file.
129324         * lib/unistr/u16-mbtoucr.c: New file.
129325         * lib/unistr.h (u8_mbtoucr, u16_mbtoucr, u32_mbtoucr): New declarations.
129327 2007-03-27  Simon Josefsson  <simon@josefsson.org>
129328             Bruno Haible  <bruno@clisp.org>
129330         * m4/vasprintf.m4: Convert AC_SUBST into shell variable for
129331         REPLACE_VASPRINTF.  Set HAVE_VASPRINTF.  Add
129332         AC_REQUIRE([gl_STDIO_H_DEFAULTS]).
129334         * m4/stdio_h.m4: Add stubs for vasprintf too.
129336         * modules/stdio: Support vasprintf in sed command.
129338         * modules/vasprintf: Depend on stdio for prototypes.  Remove
129339         vasprintf.h.  Add stdio module indicator.
129341         * lib/stdio_.h: Declare asprintf and vasprintf, based on
129342         vasprintf.h.
129344         * lib/vasprintf.h: File removed.
129346         * lib/asprintf.c: Use stdio.h instead of vasprintf.h.
129347         * lib/vasprintf.c: Ditto.
129348         * lib/xvasprintf.c: Ditto.
129349         * tests/test-vasprintf-posix.c: Ditto.
129350         * tests/test-vasprintf.c: Ditto.
129352 2007-03-27  Bruno Haible  <bruno@clisp.org>
129354         Make vasnprintf multithread-safe.
129355         * lib/vasnprintf.c (decimal_point_char): New function.
129356         (VASNPRINTF): Use it.
129357         Suggested by Simon Josefsson.
129359 2007-03-27  Eric Blake  <ebb9@byu.net>
129361         Support sub-second birthtime on cygwin.
129362         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim.
129363         * lib/stat-time.h (STAT_TIMESPEC): Adjust comments.
129364         (get_stat_birthtime): Also work with st_birthtim.
129366 2007-03-27  Paul Eggert  <eggert@cs.ucla.edu>
129368         * lib/stat-time.h (USE_BIRTHTIME): Remove.
129369         (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns):
129370         (get_stat_birthtime_ns): Do not try to use "spare" fields.
129371         (get_stat_birthtime_ns): Simplify compile-time tests.
129372         (get_stat_birthtime): Change the API to look like
129373         get_stat_mtime etc., except return a negative tv_nsec on error.
129374         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
129375         Don't check for "spare" fields.
129376         (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec
129377         or for struct stat.st_birthtime, as these tests aren't used.
129378         * tests/test-stat-time.c (test_birthtime): Adjust to new API.
129380 2007-03-27  Bruno Haible  <bruno@clisp.org>
129382         * lib/stat-time.h: Include <sys/stat.h>.
129384 2007-03-27  James Youngman  <jay@gnu.org>
129386         * lib/stat-time.h (get_stat_birthtime): New function for
129387           retrieving st_birthtime as provided by UFS2 (hence *BSD).
129388         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
129389           and its variants.
129390         * modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
129391         * modules/stat-time-test: New file.
129392         * tests/test-stat-time.c: New test, devised by Bruno Haible.
129394 2007-03-26  Bruno Haible  <bruno@clisp.org>
129396         Better support of signalling NaNs.
129397         * lib/atanl.c: Include isnanl.h.
129398         (atanl): Perform test for NaN at the beginning of the function and
129399         through a call to isnanl.
129400         * lib/cosl.c: Include isnanl.h.
129401         (cosl): Perform test for NaN at the beginning of the function and
129402         through a call to isnanl.
129403         * lib/ldexpl.c: Include isnanl.h.
129404         (ldexpl): Perform test for NaN through a call to isnanl.
129405         * lib/logl.c: Include isnanl.h.
129406         (logl): Perform test for NaN at the beginning of the function and
129407         through a call to isnanl.
129408         * lib/sinl.c: Include isnanl.h.
129409         (sinl): Perform test for NaN at the beginning of the function and
129410         through a call to isnanl.
129411         * lib/sqrtl.c: Include isnanl.h.
129412         (sqrtl): Perform test for NaN at the beginning of the function and
129413         through a call to isnanl.
129414         * lib/tanl.c: Include isnanl.h.
129415         (tanl): Perform test for NaN at the beginning of the function and
129416         through a call to isnanl.
129417         * lib/trigl.c (ieee754_rem_pio2l): Remove test for NaN.
129418         * modules/mathl (Depends-on): Add isnanl.
129420 2007-03-26  Eric Blake  <ebb9@byu.net>
129422         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Fix
129423         regression in logic sense of previous patch.
129425 2007-03-26  Bruno Haible  <bruno@clisp.org>
129427         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
129428         unportable shell command "if ! ...".
129429         Reported by Ralf Wildenhues.
129431 2007-03-25  Bruno Haible  <bruno@clisp.org>
129433         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
129434         <sysexits.h> file, and only add EX_CONFIG.
129435         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
129436         absolute file name and whether it is sufficient. Substitute also
129437         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
129438         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
129439         ABSOLUTE_SYSEXITS_H into sysexits.h.
129441 2007-03-25  Bruno Haible  <bruno@clisp.org>
129443         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
129444         hints is NULL.
129446 2007-03-25  Bruno Haible  <bruno@clisp.org>
129448         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
129449         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
129451 2007-03-25  Bruno Haible  <bruno@clisp.org>
129453         * lib/vasnprintf.c: Include langinfo.h.
129454         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
129455         multithread-safe.
129456         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
129457         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
129458         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
129459         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
129460         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
129461         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
129462         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
129463         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
129464         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
129465         Reported by Simon Josefsson.
129467 2007-03-25  Bruno Haible  <bruno@clisp.org>
129469         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
129470         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
129471         * modules/vasnprintf (Depends-on): Add stdint.
129473 2007-03-25  Bruno Haible  <bruno@clisp.org>
129475         * modules/fpieee: New file.
129476         * m4/fpieee.m4: New file.
129477         * modules/isnan-nolibm (Depends-on): Add fpieee.
129478         * modules/isnanl-nolibm (Depends-on): Add fpieee.
129479         * modules/isnanl (Depends-on): Add fpieee.
129481 2007-03-25  Bruno Haible  <bruno@clisp.org>
129483         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
129485 2007-03-25  Bruno Haible  <bruno@clisp.org>
129487         Avoid test failures on IRIX 6.5.
129488         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
129489         (main): Use it.
129490         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
129491         macros.
129492         (main): Use them.
129494 2007-03-25  Bruno Haible  <bruno@clisp.org>
129496         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
129497         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
129498         exists but doesn't work.
129499         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
129500         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
129501         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
129502         * modules/math (Makefile.am): Substitute also REPLACE_FREXPL into
129503         math.h.
129505 2007-03-25  Bruno Haible  <bruno@clisp.org>
129507         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
129508         returns inf. Needed on IRIX 6.5.
129510 2007-03-25  Bruno Haible  <bruno@clisp.org>
129512         * tests/test-frexpl.c: Include isnanl-nolibm.h.
129513         (main): Use isnanl instead of x != x idiom.
129514         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
129516         * tests/test-frexp.c: Include isnan.h.
129517         (main): Use isnan instead of x != x idiom.
129518         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
129520 2007-03-25  Bruno Haible  <bruno@clisp.org>
129522         * tests/test-frexp.c (NaN): New function/macro.
129523         (main): Use it instead of 0.0 / 0.0.
129524         * tests/test-isnan.c (NaN): New function/macro.
129525         (main): Use it instead of 0.0 / 0.0.
129526         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
129527         (test_function): Use it instead of 0.0 / 0.0.
129528         * tests/test-vasprintf-posix.c (NaN): New function/macro.
129529         (test_function): Use it instead of 0.0 / 0.0.
129530         * tests/test-snprintf-posix.h (NaN): New function/macro.
129531         (test_function): Use it instead of 0.0 / 0.0.
129532         * tests/test-sprintf-posix.h (NaN): New function/macro.
129533         (test_function): Use it instead of 0.0 / 0.0.
129534         * tests/test-fprintf-posix.h (NaN): New function/macro.
129535         (test_function): Use it instead of 0.0 / 0.0.
129536         * tests/test-printf-posix.h (NaN): New function/macro.
129537         (test_function): Use it instead of 0.0 / 0.0.
129539         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
129541 2007-03-25  Bruno Haible  <bruno@clisp.org>
129543         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
129545 2007-03-25  Bruno Haible  <bruno@clisp.org>
129547         * lib/regexec.c (merge_state_with_log): Make static.
129549 2007-03-25  Bruno Haible  <bruno@clisp.org>
129551         * lib/trigl.c (kernel_rem_pio2): Make static.
129553 2007-03-25  Bruno Haible  <bruno@clisp.org>
129555         * lib/sincosl.c (sincosl_table): Make static.
129557 2007-03-25  Bruno Haible  <bruno@clisp.org>
129559         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
129560         if the compiler does not support C99.
129562 2007-03-25  Bruno Haible  <bruno@clisp.org>
129564         * modules/time (Makefile.am): Ensure all rule action lines start with a
129565         tab.
129567 2007-03-24  Bruno Haible  <bruno@clisp.org>
129569         * modules/tsearch-tests: New file.
129570         * tests/test-tsearch.sh: New file.
129571         * tests/test-tsearch.c: New file, mostly copied from glibc.
129573         * modules/search-tests: New file.
129574         * tests/test-search.c: New file.
129576         * modules/search: New file.
129577         * lib/search_.h: New file, incorporating lib/tsearch.h.
129578         * m4/search_h.m4: New file.
129579         * lib/tsearch.h: Remove file.
129580         * lib/tsearch.c: Include search.h instead of tsearch.h.
129581         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
129582         HAVE_TSEARCH.
129583         * modules/tsearch (Files): Remove lib/tsearch.h.
129584         (Depends-on): Add search.
129585         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
129586         (Include): Change tsearch.h into search.h.
129588 2007-03-24  Bruno Haible  <bruno@clisp.org>
129590         * modules/fpucw: New file.
129591         * lib/fpucw.h: New file.
129592         * lib/frexp.c: Include fpucw.h.
129593         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
129594         (FUNC): Use them.
129595         * lib/printf-frexp.c: Include fpucw.h.
129596         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
129597         (FUNC): Use them.
129598         * lib/vasnprintf.c: Include fpucw.h.
129599         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
129600         'long double' calculations.
129601         * tests/test-frexpl.c: Include fpucw.h.
129602         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
129603         * tests/test-printf-frexpl.c: Include fpucw.h.
129604         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
129605         * modules/frexpl (Depends-on): Add fpucw.
129606         * modules/printf-frexpl (Depends-on): Likewise.
129607         * modules/fprintf-posix (Depends-on): Likewise.
129608         * modules/snprintf-posix (Depends-on): Likewise.
129609         * modules/sprintf-posix (Depends-on): Likewise.
129610         * modules/vasnprintf-posix (Depends-on): Likewise.
129611         * modules/vasprintf-posix (Depends-on): Likewise.
129612         * modules/vfprintf-posix (Depends-on): Likewise.
129613         * modules/vsnprintf-posix (Depends-on): Likewise.
129614         * modules/vsprintf-posix (Depends-on): Likewise.
129615         * modules/frexpl-tests (Depends-on): Likewise.
129616         * modules/printf-frexpl-tests (Depends-on): Likewise.
129618 2007-03-24  Bruno Haible  <bruno@clisp.org>
129620         * lib/float+.h: New file.
129621         * lib/isnan.c: Include float+.h.
129622         (SIZE): New macro.
129623         (FUNC): Compare only SIZE bytes of the value.
129624         * lib/vasnprintf.c: Include float+.h.
129625         (VASNPRINTF): When comparing against +0.0L or +0.0, compare only
129626         SIZEOF_LDBL or SIZEOF_DBL bytes.
129627         * modules/isnan-nolibm (Files): Add lib/float+.h.
129628         * modules/isnanl-nolibm (Files): Add lib/float+.h.
129629         * modules/isnanl (Files): Add lib/float+.h.
129630         * modules/vasnprintf (Files): Add lib/float+.h.
129632 2007-03-24  Bruno Haible  <bruno@clisp.org>
129634         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
129635         include isnanl-nolibm.h.
129637 2007-03-24  Bruno Haible  <bruno@clisp.org>
129639         * tests/test-read-file.c (main): Don't produce spurious output for
129640         expected situations. Make the test fail if it encountered unexpected
129641         results.
129643 2007-03-24  Bruno Haible  <bruno@clisp.org>
129645         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
129646         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
129648 2007-03-24  Bruno Haible  <bruno@clisp.org>
129650         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
129652 2007-03-24  Bruno Haible  <bruno@clisp.org>
129654         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
129655         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
129657         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
129658         * modules/utf8-ucs4: Turn into a symbolic link to module
129659         unistr/u8-mbtouc.
129661         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
129662         utf8-ucs4-unsafe.
129663         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
129664         unistr/u8-mbtouc-unsafe.
129666         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
129667         * modules/utf16-ucs4: Turn into a symbolic link to module
129668         unistr/u16-mbtouc.
129670         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
129671         utf16-ucs4-unsafe.
129672         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
129673         unistr/u16-mbtouc-unsafe.
129675         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
129676         * modules/ucs4-utf8: Turn into a symbolic link to module
129677         unistr/u8-ubtomb.
129679         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
129680         * modules/ucs4-utf16: Turn into a symbolic link to module
129681         unistr/u16-ubtomb.
129683 2007-03-24  Bruno Haible  <bruno@clisp.org>
129685         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
129686         Enable the function only if HAVE_INLINE.
129687         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
129688         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
129689         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
129690         Enable the function only if HAVE_INLINE.
129691         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
129692         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
129693         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
129694         Enable the function only if HAVE_INLINE.
129695         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
129696         Enable the function only if HAVE_INLINE.
129697         * modules/utf8-ucs4: Update.
129698         * modules/utf8-ucs4-unsafe: Update.
129699         * modules/utf16-ucs4: Update.
129700         * modules/utf16-ucs4-unsafe: Update.
129701         * modules/ucs4-utf8: Update.
129702         * modules/ucs4-utf16: Update.
129704 2007-03-24  Bruno Haible  <bruno@clisp.org>
129706         * lib/utf8-ucs4.h: Remove file.
129707         * lib/utf8-ucs4-unsafe.h: Remove file.
129708         * lib/utf16-ucs4.h: Remove file.
129709         * lib/utf16-ucs4-unsafe.h: Remove file.
129710         * lib/ucs4-utf8.h: Remove file.
129711         * lib/ucs4-utf16.h: Remove file.
129712         * lib/unistr.h: Include their previous contents.
129713         * m4/utf-ucs4.m4: Remove file.
129714         * m4/ucs4-utf.m4: Remove file.
129715         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
129716         (Depends-on): Add unistr/base.
129717         (configure.ac): Remove gl_UTF_UCS4.
129718         (Makefile.am): Update.
129719         (Include): Change to unistr.h.
129720         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
129721         (Depends-on): Add unistr/base.
129722         (configure.ac): Remove gl_UTF_UCS4.
129723         (Makefile.am): Update.
129724         (Include): Change to unistr.h.
129725         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
129726         (Depends-on): Add unistr/base.
129727         (configure.ac): Remove gl_UTF_UCS4.
129728         (Makefile.am): Update.
129729         (Include): Change to unistr.h.
129730         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
129731         (Depends-on): Add unistr/base.
129732         (configure.ac): Remove gl_UTF_UCS4.
129733         (Makefile.am): Update.
129734         (Include): Change to unistr.h.
129735         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
129736         (Depends-on): Add unistr/base.
129737         (configure.ac): Remove gl_UCS4_UTF.
129738         (Makefile.am): Update.
129739         (Include): Change to unistr.h.
129740         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
129741         (Depends-on): Add unistr/base.
129742         (configure.ac): Remove gl_UCS4_UTF.
129743         (Makefile.am): Update.
129744         (Include): Change to unistr.h.
129745         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
129746         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
129747         utf8-ucs4-unsafe.h.
129748         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
129749         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
129750         utf16-ucs4-unsafe.h.
129751         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
129752         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
129753         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
129754         * lib/unistr/u8-strchr.c: Likewise.
129755         * lib/unistr/u8-strrchr.c: Likewise.
129756         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
129757         * lib/unistr/u16-strchr.c: Likewise.
129758         * lib/unistr/u16-strrchr.c: Likewise.
129759         * lib/striconveh.c: Update.
129760         * lib/linebreak.c: Update.
129762 2007-03-24  Bruno Haible  <bruno@clisp.org>
129764         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
129765         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
129767 2007-03-22  Bruno Haible  <bruno@clisp.org>
129769         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
129771 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
129773         * MODULES.html.sh (File system functions): New module write-any-file.
129774         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
129775         * m4/write-any-file.m4: New files.
129777 2007-03-23  Eric Blake  <ebb9@byu.net>
129779         * gnulib-tool: Rearrange space-tab sequences, since some editors
129780         like to eat them.
129782 2007-03-23  Eric Blake  <ebb9@byu.net>
129784         * lib/version-etc.c (version_etc_va): Update license wording to
129785         be more concise.  Recommended by Richard Stallman.
129787 2007-03-22  Bruno Haible  <bruno@clisp.org>
129789         * lib/poll.c (MSG_PEEK): New fallback definition.
129791 2007-03-22  Bruno Haible  <bruno@clisp.org>
129793         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
129794         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
129795         (main): Update.
129796         Fixes a compilation error on BeOS.
129798 2007-03-22  Bruno Haible  <bruno@clisp.org>
129800         * modules/frexpl-tests: New file.
129801         * tests/test-frexpl.c: New file.
129803         * modules/frexpl: New file.
129804         * m4/frexpl.m4: New file.
129805         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
129806         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
129807         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
129808         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
129809         (Depends-on): Add frexpl. Remove isnanl-nolibm.
129810         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
129812 2007-03-22  Bruno Haible  <bruno@clisp.org>
129814         * lib/frexpl.c: Share code with lib/frexp.c.
129815         * modules/mathl (Files): Add lib/frexp.c.
129816         (Depends-on): Add isnanl-nolibm.
129818 2007-03-22  Bruno Haible  <bruno@clisp.org>
129820         * modules/printf-frexp (Files): Add m4/frexp.m4.
129821         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
129822         only if the found frexp function actually works.
129824 2007-03-22  Bruno Haible  <bruno@clisp.org>
129826         * lib/frexp.c: Remove older implementation that uses divisions.
129828 2007-03-21  Bruno Haible  <bruno@clisp.org>
129830         * modules/frexp-tests: New file.
129831         * tests/test-frexp.c: New file.
129833         * modules/frexp: New file.
129834         * lib/frexp.c: New file.
129835         * m4/frexp.m4: New file.
129836         * lib/math_.h (frexp): New declaration.
129837         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
129838         REPLACE_FREXP.
129839         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
129841 2007-03-21  Bruno Haible  <bruno@clisp.org>
129843         * modules/isnanl-tests: New file.
129844         * tests/test-isnanl.c: New file.
129846         * modules/isnanl: New file.
129847         * lib/isnanl.h: New file.
129848         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
129849         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
129850         gl_FUNC_ISNANL_WORKS.
129851         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
129852         New macros.
129854 2007-03-21  Bruno Haible  <bruno@clisp.org>
129856         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
129857         lib/isnanl.h.
129858         (Include): Update.
129859         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
129860         * lib/vasnprintf.c: Update.
129861         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
129862         tests/test-isnanl.h, remove tests/test-isnanl.c.
129863         (Makefile.am): Update.
129864         * tests/test-isnanl-nolibm.c: New file.
129865         * tests/test-isnanl.h: New file.
129866         * tests/test-isnanl.c: Remove file.
129868 2007-03-21  Jim Meyering  <jim@meyering.net>
129870         When trying to open ".", treat ESTALE like EACCES.
129871         * lib/savewd.c (savewd_save): Resort to forking not just upon
129872         failure with EACCES, but also when errno is ESTALE.
129874 2007-03-20  Bruno Haible  <bruno@clisp.org>
129876         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
129877         Needed on AIX 5.1. Reported by Matthew Woehlke.
129879 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
129881         Suggestions by Bruno Haible:
129882         * lib/acl-internal.h: Include "gettext.h" rather than rolling
129883         our own.
129884         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
129885         * modules/acl (Depends-on): Add gettext.
129887 2007-03-19  Bruno Haible  <bruno@clisp.org>
129889         * modules/iconvme: Remove file.
129890         * lib/iconvme.h: Remove file.
129891         * lib/iconvme.c: Remove file.
129892         * m4/iconvme.m4: Remove file.
129894 2007-03-19  Bruno Haible  <bruno@clisp.org>
129896         * doc/relocatable-maint.texi: Break long shell script line.
129897         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
129899 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
129901         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
129902         handle file_has_acl.
129903         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
129904         * lib/acl.c: Move header inclusions and related macro defns into
129905         lib/acl-internal.h.
129906         (S_ISLNK): Remove defn, since that's now done for us.
129907         (file_has_acl): Move to lib/file-has-acl.c.
129908         Call acl_trivial if available.  This is the crucial part of the fix.
129909         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
129910         shared within the library.  Rewrite a bit, partly to make it compatible
129911         with the GNU coding style.
129912         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
129913         Remove unnecessary double-quotes.
129914         Don't test for acl_to_text; the build will catch that.
129915         Replace acl_entries if it doesn't exist and it is needed.
129916         Check for -lsec and acl_trivial (as used on Solaris 10).
129917         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
129918         lib/file-has-acl.c.
129919         (Depends-on): Add sys_stat, for S_ISLNK.
129921 2007-03-19  Ben Pfaff  <blp@gnu.org>
129923         * doc/gnulib.texi: Fix typos.
129924         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
129926 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
129928         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
129929         If size is zero here, buf must be zero.
129931 2007-03-19  Simon Josefsson  <simon@josefsson.org>
129933         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
129934         <bruno@clisp.org>.
129936 2007-03-18  Bruno Haible  <bruno@clisp.org>
129938         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
129939         Suggested by Eric Blake.
129941 2007-03-18  Ben Pfaff  <blp@gnu.org>
129943         * doc/relocatable.texi: Recommend using as prefix a directory
129944         that does not exist and will never be created.  Based on
129945         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
129946         and others.
129948 2007-03-17  Bruno Haible  <bruno@clisp.org>
129950         * lib/fchownat.c: Include lchown.h.
129952 2007-03-17  Bruno Haible  <bruno@clisp.org>
129954         Fix endless loop when the given allocated size was > INT_MAX.
129955         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
129956         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
129957         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
129958         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
129959         * lib/sprintf.c (sprintf): Likewise.
129961 2007-03-17  Bruno Haible  <bruno@clisp.org>
129963         * tests/test-argp-2.sh (func_compare): Output a context diff.
129965 2007-03-17  Bruno Haible  <bruno@clisp.org>
129967         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
129968         locale's decimal-point character.
129970 2007-03-17  Bruno Haible  <bruno@clisp.org>
129972         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
129973         before comparing it. Needed because on some platforms (e.g. x86) a
129974         'long double' occupies less bytes than sizeof (long double).
129976 2007-03-17  Bruno Haible  <bruno@clisp.org>
129978         * tests/test-crc.c (main): Make printf statements 64-bit clean.
129979         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
129980         * tests/test-getaddrinfo.c (simple): Likewise.
129981         * tests/test-read-file.c (main): Likewise.
129983 2007-03-17  Bruno Haible  <bruno@clisp.org>
129985         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
129987 2007-03-17  Bruno Haible  <bruno@clisp.org>
129989         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
129990         unused variable.
129992 2007-03-17  Bruno Haible  <bruno@clisp.org>
129994         * tests/test-c-strcasecmp.c: Include c-strcase.h.
129995         * tests/test-c-strncasecmp.c: Likewise.
129997 2007-03-17  Bruno Haible  <bruno@clisp.org>
129999         * modules/stdlib (Depends-on): Add unistd.
130000         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
130001         Needed for MacOS X 10.3.
130003 2007-03-17  Bruno Haible  <bruno@clisp.org>
130005         * lib/unistr/u-strdup.h: Include <stdlib.h>.
130007 2007-03-17  Bruno Haible  <bruno@clisp.org>
130009         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
130011 2007-03-17  Bruno Haible  <bruno@clisp.org>
130013         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
130014         to reflect files copied from gnulib (with or without modifications).
130015         Suggested by Jim Meyering.
130017 2007-03-17  Eric Blake  <ebb9@byu.net>
130019         * NEWS: Document stdlib change from 2007-02-18.
130021 2007-03-17  Jim Meyering  <jim@meyering.net>
130023         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
130024         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
130025         someone uses a name containing shell meta-characters.
130026         Reported by Alfred M. Szmidt.
130028         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
130030 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
130032         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
130033         and copy gettext configuration files only if configure.ac contains
130034         a use of AM_GNU_GETTEXT_VERSION.
130036 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
130038         * build-aux/bootstrap (gnulib_name): New variable.
130039         (gnulib_tool_options): Use it.
130041 2007-03-13  Simon Josefsson  <simon@josefsson.org>
130043         * tests/test-des.c: Use new namespace.
130045 2007-03-15  Bruno Haible  <bruno@clisp.org>
130047         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
130048         Reported by James Youngman <jay@gnu.org>.
130050 2007-03-15  Bruno Haible  <bruno@clisp.org>
130052         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
130053         declared prototype. Needed with cc on OSF/1 5.1.
130055 2007-03-15  Bruno Haible  <bruno@clisp.org>
130057         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
130058         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
130059         (struct gl_list_implementation): Add dispose_fn argument to the
130060         'create_empty', 'create' methods.
130061         (struct gl_list_impl_base): Add field 'dispose_fn'.
130062         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
130063         argument.
130064         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
130065         dispose_fn argument.
130066         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
130067         dispose_fn on the dropped values.
130068         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
130069         dispose_fn argument.
130070         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
130071         dropped values.
130072         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
130073         (gl_tree_remove_node): Call dispose_fn on the dropped value.
130074         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
130075         (gl_tree_remove_node): Call dispose_fn on the dropped value.
130076         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
130077         argument.
130078         (gl_tree_list_free): Call dispose_fn on the dropped values.
130079         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
130080         the dropped values.
130081         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
130082         Add dispose_fn argument.
130083         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
130084         Call dispose_fn on the dropped values.
130085         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
130086         Add dispose_fn argument.
130087         (gl_sublist_create): Initialize the 'dispose_fn' field.
130088         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
130089         * tests/test-array_list.c (main): Update.
130090         * tests/test-carray_list.c (main): Update.
130091         * tests/test-avltree_list.c (main): Update.
130092         * tests/test-rbtree_list.c (main): Update.
130093         * tests/test-avltreehash_list.c (main): Update.
130094         * tests/test-rbtreehash_list.c (main): Update.
130095         * tests/test-linked_list.c (main): Update.
130096         * tests/test-linkedhash_list.c (main): Update.
130097         * tests/test-array_oset.c (main): Update.
130099 2007-03-15  Bruno Haible  <bruno@clisp.org>
130101         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
130102         (gl_oset_create_empty): Add dispose_fn argument.
130103         (struct gl_oset_implementation): Add dispose_fn argument to
130104         'create_empty' method.
130105         (struct gl_oset_impl_base): Add dispose_fn field.
130106         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
130107         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
130108         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
130109         values.
130110         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
130111         (gl_tree_oset_free): Call dispose_fn on the dropped values.
130112         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
130113         dropped value.
130114         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
130115         dropped value.
130116         * tests/test-array_oset.c (main): Update.
130117         * tests/test-avltree_oset.c (main): Update.
130118         * tests/test-rbtree_oset.c (main): Update.
130119         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
130121 2007-03-13  Bruno Haible  <bruno@clisp.org>
130123         * tests/test-stdbool.c (i): Update after last patch.
130125 2007-03-12  Bruno Haible  <bruno@clisp.org>
130127         * lib/quotearg.c: Include <wctype.h> early, before the definition of
130128         the iswprint macro. Needed on Solaris 2.5.1.
130130 2007-03-12  Bruno Haible  <bruno@clisp.org>
130132         * tests/test-printf-frexp.c (main): Declare x as volatile.
130134 2007-03-12  Simon Josefsson  <simon@josefsson.org>
130136         * doc/gnulib.texi (Build robot for gnulib): New section.
130138 2007-03-12  Jim Meyering  <jim@meyering.net>
130140         * build-aux/bootstrap: New file.
130141         * build-aux/bootstrap.conf: New file, from coreutils.
130143 2007-03-11  Bruno Haible  <bruno@clisp.org>
130145         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
130147 2007-03-12  Simon Josefsson  <simon@josefsson.org>
130149         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
130150         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
130151         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
130153 2007-03-11  Bruno Haible  <bruno@clisp.org>
130155         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
130156         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
130158 2007-03-11  Bruno Haible  <bruno@clisp.org>
130160         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
130161         formula. Needed for SunPRO C 5.0.
130163 2007-03-11  Bruno Haible  <bruno@clisp.org>
130165         * modules/long-options (Depends-on): Add getopt.
130167 2007-03-11  Bruno Haible  <bruno@clisp.org>
130169         * modules/modechange (Depends-on): Add stdbool.
130171 2007-03-11  Bruno Haible  <bruno@clisp.org>
130173         * modules/i-ring (Depends-on): Add stdbool.
130175 2007-03-11  Bruno Haible  <bruno@clisp.org>
130177         * modules/gc-des (Depends-on): Add stdbool.
130179 2007-03-11  Bruno Haible  <bruno@clisp.org>
130181         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
130183 2007-03-11  Bruno Haible  <bruno@clisp.org>
130185         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
130187 2007-03-11  Bruno Haible  <bruno@clisp.org>
130189         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
130191 2007-03-11  Bruno Haible  <bruno@clisp.org>
130193         * lib/vasnprintf.c (sprintf): Undefine.
130195 2007-03-11  Bruno Haible  <bruno@clisp.org>
130197         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
130198         initializers in SunPRO C and Compaq C compilers.
130200 2007-03-11  Bruno Haible  <bruno@clisp.org>
130202         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
130203         decrementing code ANSI C compliant.
130205 2007-03-11  Bruno Haible  <bruno@clisp.org>
130207         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
130208         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
130210 2007-03-11  Bruno Haible  <bruno@clisp.org>
130212         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
130213         <stdbool.h> substitute doesn't pass.
130215 2007-03-11  Bruno Haible  <bruno@clisp.org>
130217         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
130219 2007-03-11  Bruno Haible  <bruno@clisp.org>
130221         * gnulib-tool (func_create_megatestdir): Create also an autobuild
130222         script, for submission to autobuild.josefsson.org.
130224 2007-03-10  Bruno Haible  <bruno@clisp.org>
130226         * modules/canonicalize-lgpl-tests: New file.
130227         * tests/test-canonicalize-lgpl.sh: New file.
130228         * tests/test-canonicalize-lgpl.c: New file.
130230         * modules/c-strcase-tests: New file.
130231         * tests/test-c-strcase.sh: New file.
130232         * tests/test-c-strcasecmp.c: New file.
130233         * tests/test-c-strncasecmp.c: New file.
130235         * modules/atexit-tests: New file.
130236         * tests/test-atexit.sh: New file.
130237         * tests/test-atexit.c: New file.
130239 2007-03-10  Bruno Haible  <bruno@clisp.org>
130241         * tests/test-binary-io.sh: Use temporary filenames that are not so
130242         likely to clash with those of other tests (in a parallel make).
130243         * tests/test-binary-io.c: Likewise.
130245 2007-03-10  Bruno Haible  <bruno@clisp.org>
130247         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
130248         fallback; use #error instead.
130249         Suggested by Simon Josefsson.
130251 2007-03-10  Bruno Haible  <bruno@clisp.org>
130253         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
130254         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
130255         first and the last.
130257 2007-03-10  Bruno Haible  <bruno@clisp.org>
130259         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
130261 2007-03-10  Bruno Haible  <bruno@clisp.org>
130263         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
130264         "make distcheck".
130265         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
130266         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
130267         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
130269 2007-03-10  Bruno Haible  <bruno@clisp.org>
130271         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
130272         variable.
130273         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
130274         variable.
130276 2007-03-09  Eric Blake  <ebb9@byu.net>
130277         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
130279         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
130280         types are not being provided by gnulib.
130281         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
130282         types are supported.
130284 2007-03-10  Bruno Haible  <bruno@clisp.org>
130286         * lib/stdio_.h (__attribute__): New macro.
130287         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
130288         vsprintf): Specify __attribute__ __format__ for GCC.
130289         Suggested by Eric Blake.
130291 2007-03-09  Bruno Haible  <bruno@clisp.org>
130293         * modules/printf-posix-tests: New file.
130294         * tests/test-printf-posix.sh: New file.
130295         * tests/test-printf-posix.c: New file.
130297         * modules/printf-posix: New file.
130298         * lib/printf.c: New file.
130299         * m4/printf-posix-rpl.m4: New file.
130300         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
130301         REPLACE_PRINTF.
130302         * lib/stdio_.h (printf): New declaration.
130303         (format, __format__, ____printf____, ____scanf____, ____strftime____,
130304         ____strfmon____): New macros.
130305         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
130306         REPLACE_PRINTF.
130308 2007-03-09  Bruno Haible  <bruno@clisp.org>
130310         * tests/test-vasnprintf-posix2.sh: New file.
130311         * tests/test-vasnprintf-posix2.c: New file.
130312         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
130313         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
130314         (Makefile.am): Activate test-vasnprintf-posix2.sh.
130316         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
130317         a locale dependent decimal point, rather than always '.'.
130319 2007-03-09  Eric Blake  <ebb9@byu.net>
130321         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
130322         spite of platforms like Tandem/NSK that define it to -1.
130324 2007-03-08  Bruno Haible  <bruno@clisp.org>
130326         * modules/vprintf-posix-tests: New file.
130327         * tests/test-vprintf-posix.sh: New file.
130328         * tests/test-vprintf-posix.c: New file.
130329         * tests/test-printf-posix.h: New file.
130331         * modules/vprintf-posix: New file.
130332         * lib/vprintf.c: New file.
130333         * m4/vprintf-posix.m4: New file.
130334         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
130335         REPLACE_VPRINTF.
130336         * lib/stdio_.h (vprintf): New declaration.
130337         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
130338         REPLACE_VPRINTF.
130340 2007-03-08  Bruno Haible  <bruno@clisp.org>
130342         * modules/fprintf-posix-tests: New file.
130343         * tests/test-fprintf-posix.sh: New file.
130344         * tests/test-fprintf-posix.c: New file.
130346         * modules/fprintf-posix: New file.
130347         * lib/fprintf.c: New file.
130348         * m4/fprintf-posix.m4: New file.
130349         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
130350         REPLACE_FPRINTF.
130351         * lib/stdio_.h (fprintf): New declaration.
130352         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
130353         REPLACE_FPRINTF.
130355 2007-03-08  Bruno Haible  <bruno@clisp.org>
130357         * modules/vfprintf-posix-tests: New file.
130358         * tests/test-vfprintf-posix.sh: New file.
130359         * tests/test-vfprintf-posix.c: New file.
130360         * tests/test-fprintf-posix.h: New file.
130361         * tests/test-fprintf-posix.out: New file.
130363         * modules/vfprintf-posix: New file.
130364         * lib/vfprintf.c: New file.
130365         * m4/vfprintf-posix.m4: New file.
130366         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
130367         REPLACE_VFPRINTF.
130368         * lib/stdio_.h (vfprintf): New declaration.
130369         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
130370         REPLACE_VFPRINTF.
130372 2007-03-08  Bruno Haible  <bruno@clisp.org>
130374         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
130376 2007-03-08  Bruno Haible  <bruno@clisp.org>
130378         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
130379         instead of 'expr' invocations.
130380         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
130381         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
130382         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
130383         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
130384         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
130385         Suggested by Paul Eggert.
130387 2007-03-08  Bruno Haible  <bruno@clisp.org>
130389         * modules/fseterr-tests: New file.
130390         * tests/test-fseterr.c: New file.
130392         * modules/fseterr: New file.
130393         * lib/fseterr.h: New file.
130394         * lib/fseterr.c: New file.
130396 2007-03-08  Bruno Haible  <bruno@clisp.org>
130398         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
130399         * lib/getopt_.h: Likewise.
130400         * lib/mbswidth.h: Likewise.
130401         * lib/setenv.h: Likewise.
130402         * lib/vasnprintf.h: Likewise.
130403         * lib/vasprintf.h: Likewise.
130404         * lib/verror.h: Likewise.
130405         * lib/xsetenv.h: Likewise.
130406         * lib/xvasprintf.h: Likewise.
130408 2007-03-08  Jim Meyering  <jim@meyering.net>
130410         * users.txt: Add parted.
130412         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
130414 2007-03-07  Bruno Haible  <bruno@clisp.org>
130416         * m4/printf.m4: Make the shell script snippets copy&pastable.
130418 2007-03-02  Bruno Haible  <bruno@clisp.org>
130420         * lib/netinet_in_.h: New file.
130421         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
130422         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
130423         * modules/netinet_in (Files): Add lib/netinet_in_.h.
130424         (Depends-on): Add absolute-header.
130425         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
130426         into netinet/in.h.
130428 2007-03-03  Bruno Haible  <bruno@clisp.org>
130430         * lib/sys_select_.h: New file.
130431         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
130432         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
130433         * modules/sys_select (Files): Add lib/sys_select_.h.
130434         (Depends-on): Add absolute-header.
130435         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
130436         into sys/select.h.
130438 2007-03-02  Bruno Haible  <bruno@clisp.org>
130440         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
130441         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
130442         values.
130443         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
130444         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
130445         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
130446         * modules/sys_socket (Depends-on): Add absolute-header.
130447         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
130448         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
130449         (Include): Remove requirement of inclusion of <sys/types.h>.
130451 2007-03-02  Bruno Haible  <bruno@clisp.org>
130453         * lib/byteswap_.h (bswap_32): Fix formula.
130455 2007-03-06  Bruno Haible  <bruno@clisp.org>
130457         * modules/sprintf-posix-tests: New file.
130458         * tests/test-sprintf-posix.c: New file.
130460         * modules/sprintf-posix: New file.
130461         * lib/sprintf.c: New file.
130462         * m4/sprintf-posix.m4: New file.
130463         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
130464         REPLACE_SPRINTF.
130465         * lib/stdio_.h (sprintf): New declaration.
130466         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
130467         REPLACE_SPRINTF.
130469 2007-03-06  Bruno Haible  <bruno@clisp.org>
130471         * modules/vsprintf-posix-tests: New file.
130472         * tests/test-vsprintf-posix.c: New file.
130473         * tests/test-sprintf-posix.h: New file.
130475         * modules/vsprintf-posix: New file.
130476         * lib/vsprintf.c: New file.
130477         * m4/vsprintf-posix.m4: New file.
130478         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
130479         REPLACE_VSPRINTF.
130480         * lib/stdio_.h (vsprintf): New declaration.
130481         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
130482         REPLACE_VSPRINTF.
130484 2007-03-06  Bruno Haible  <bruno@clisp.org>
130486         * modules/vsnprintf (Depend-on): Remove minmax.
130488 2007-03-06  Bruno Haible  <bruno@clisp.org>
130490         * modules/snprintf-posix-tests: New file.
130491         * tests/test-snprintf-posix.c: New file.
130493         * modules/snprintf-posix: New file.
130494         * m4/snprintf-posix.m4: New file.
130495         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
130496         gl_FUNC_SNPRINTF.
130497         (gl_FUNC_SNPRINTF): Invoke it.
130498         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
130499         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
130500         is set.
130501         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
130503 2007-03-06  Bruno Haible  <bruno@clisp.org>
130505         * modules/vsnprintf-posix-tests: New file.
130506         * tests/test-vsnprintf-posix.c: New file.
130507         * tests/test-snprintf-posix.h: New file.
130509         * modules/vsnprintf-posix: New file.
130510         * m4/vsnprintf-posix.m4: New file.
130511         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
130512         gl_FUNC_VSNPRINTF.
130513         (gl_FUNC_VSNPRINTF): Invoke it.
130514         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
130515         * lib/stdio_.h (vsnprintf): Define as a replacement if
130516         REPLACE_VSNPRINTF is set.
130517         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
130519 2007-03-06  Bruno Haible  <bruno@clisp.org>
130521         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
130522         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
130524 2007-03-06  Bruno Haible  <bruno@clisp.org>
130526         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
130527         (asinl): Declare also if HAVE_DECL_ASINL is set.
130528         (atanl): Declare also if HAVE_DECL_ATANL is set.
130529         (ceill): Declare also if HAVE_DECL_CEILL is set.
130530         (cosl): Declare also if HAVE_DECL_COSL is set.
130531         (expl): Declare also if HAVE_DECL_EXPL is set.
130532         (floorl): Declare also if HAVE_DECL_FLOORL is set.
130533         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
130534         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
130535         (logl): Declare also if HAVE_DECL_LOGL is set.
130536         (sinl): Declare also if HAVE_DECL_SINL is set.
130537         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
130538         (tanl): Declare also if HAVE_DECL_TANL is set.
130539         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
130540         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
130541         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
130542         declaration of frexpl, ldexpl.
130543         * modules/printf-frexpl (Depends-on): Add math.
130544         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
130546 2007-03-05  Bruno Haible  <bruno@clisp.org>
130548         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
130549         frexpl and ldexpl are declared.
130550         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
130552 2007-03-05  Bruno Haible  <bruno@clisp.org>
130554         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
130555         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
130557 2007-03-05  Bruno Haible  <bruno@clisp.org>
130559         * lib/stdio_.h: Include <stddef.h>.
130561 2007-03-05  Bruno Haible  <bruno@clisp.org>
130563         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
130565 2007-03-05  Bruno Haible  <bruno@clisp.org>
130567         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
130568         NetBSD 4, from Ralf Wildenhues.
130570 2007-03-04  Bruno Haible  <bruno@clisp.org>
130572         * lib/vasprintf.h: Update #if logic for the case when the functions
130573         exist but are overridden.
130575 2007-03-04  Bruno Haible  <bruno@clisp.org>
130577         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
130578         implementations: glibc-2.4 and MacOS X 10.3.
130579         * tests/test-vasnprintf-posix.c (test_function): Test also the case
130580         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
130581         * tests/test-vasprintf-posix.c (test_function): Likewise.
130583 2007-03-04  Bruno Haible  <bruno@clisp.org>
130585         * modules/vasprintf-posix-tests: New file.
130586         * tests/test-vasprintf-posix.c: New file.
130588         * modules/vasprintf-posix: New file.
130589         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
130590         defined.
130591         * m4/vasprintf-posix.m4: New file.
130592         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
130593         gl_FUNC_VASPRINTF.
130594         (gl_FUNC_VASPRINTF): Invoke it.
130595         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
130596         here.
130597         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
130599 2007-03-04  Bruno Haible  <bruno@clisp.org>
130601         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
130602         REPLACE_GETTIMEOFDAY.
130603         * modules/sys_time (Makefile.am): Likewise.
130604         * m4/sys_time_h.m4: Likewise.
130605         * m4/gettimeofday.m4: Likewise.
130607 2007-03-04  Bruno Haible  <bruno@clisp.org>
130609         * modules/vasnprintf-posix-tests: New file.
130610         * tests/test-vasnprintf-posix.c: New file.
130612         * modules/vasnprintf-posix: New file.
130613         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
130614         printf-frexpl.h.
130615         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
130616         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
130617         REPLACE_VASNPRINTF is defined.
130618         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
130619         gl_FUNC_VASNPRINTF.
130620         (gl_FUNC_VASNPRINTF): Invoke it.
130621         * m4/vasnprintf-posix.m4: New file.
130622         * m4/printf.m4: New file.
130624 2007-03-04  Bruno Haible  <bruno@clisp.org>
130626         Compile progreloc.c only if --enable-relocatable is specified.
130627         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
130628         if --enable-relocatable was specified.
130629         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
130630         lib_SOURCES.
130632 2007-03-04  Jim Meyering  <jim@meyering.net>
130634         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
130635         Use it consistently, rather than enumerating errno constants.
130637 2007-03-04  Bruno Haible  <bruno@clisp.org>
130639         * modules/xvasprintf-tests: New file.
130640         * tests/test-xvasprintf.c: New file.
130642         * modules/vasprintf-tests: New file.
130643         * tests/test-vasprintf.c: New file.
130645         * modules/vasnprintf-tests: New file.
130646         * tests/test-vasnprintf.c: New file.
130648         * modules/vsnprintf-tests: New file.
130649         * tests/test-vsnprintf.c: New file.
130651         * modules/snprintf-tests: New file.
130652         * tests/test-snprintf.c: New file.
130654 2007-03-04  Bruno Haible  <bruno@clisp.org>
130656         Compile relocatable.c only if --enable-relocatable is specified.
130657         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
130658         gl_RELOCATABLE_LIBRARY.
130659         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
130660         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
130661         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
130662         gl_RELOCATABLE_LIBRARY.
130663         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
130664         (Makefile.am): Remove lib_SOURCES.
130665         * modules/relocatable-lib-lgpl (configure.ac): Invoke
130666         gl_RELOCATABLE_LIBRARY.
130667         (Makefile.am): Remove lib_SOURCES.
130668         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
130669         always.
130670         * modules/relocatable-prog-wrapper (configure.ac): Invoke
130671         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
130673 2007-03-04  Bruno Haible  <bruno@clisp.org>
130675         * modules/argmatch-tests: New file.
130676         * tests/test-argmatch.c: New file.
130678         * tests/test-allocsa.c (main): Halve the number of loop runs.
130680         * modules/alloca-opt-tests: New file.
130681         * tests/test-alloca-opt.c: New file.
130683 2007-03-04  Jim Meyering  <jim@meyering.net>
130685         Work around difference between Linux ACLs and Solaris 10 ZFS.
130686         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
130687         for EINVAL.
130689 2007-03-03  Bruno Haible  <bruno@clisp.org>
130691         * modules/relocatable-prog (Depends-on): Add back progreloc's
130692         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
130694 2007-03-03  Bruno Haible  <bruno@clisp.org>
130696         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
130697         * modules/relocatable-lib: New file.
130699 2007-03-03  Bruno Haible  <bruno@clisp.org>
130701         * modules/relocatable-prog: Renamed from modules/relocatable.
130702         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
130704 2007-03-03  Bruno Haible  <bruno@clisp.org>
130706         * modules/relocatable-script (Files): Add doc/relocatable.texi,
130707         m4/relocatable-lib.m4.
130708         (Depends-on): Remove 'relocatable'.
130709         (configure.ac): Add gl_RELOCATABLE_NOP.
130711 2007-03-03  Bruno Haible  <bruno@clisp.org>
130713         * modules/relocatable-prog-wrapper: New file.
130714         * modules/relocatable (Depends-on): Add it. Remove all other
130715         dependencies except progname.
130716         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
130718         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
130719         (gl_FUNC_STRERROR): Nop.
130720         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
130722         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
130723         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
130725         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
130726         (gl_FUNC_READLINK): Update.
130728         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
130730 2007-03-03  Bruno Haible  <bruno@clisp.org>
130732         * lib/xreadlink.c: Include <unistd.h> unconditionally.
130733         * modules/xreadlink (Depends-on): Add unistd.
130734         * modules/xreadlink-with-size (Depends-on): Likewise.
130736 2007-03-03  Bruno Haible  <bruno@clisp.org>
130738         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
130739         extracted from gt_FUNC_SETENV.
130740         (gt_FUNC_SETENV): Remove macro.
130741         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
130742         remove gt_FUNC_SETENV.
130744 2007-03-03  Bruno Haible  <bruno@clisp.org>
130746         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
130747         ENABLE_RELOCATABLE here.
130748         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
130750 2007-03-03  Bruno Haible  <bruno@clisp.org>
130752         * modules/rbtreehash-list-tests (Depends-on): Add progname.
130753         * tests/test-rbtreehash_list.c: Include progname.h.
130754         (main): Call set_program_name.
130756         * modules/rbtree-oset-tests (Depends-on): Add progname.
130757         * tests/test-rbtree_oset.c: Include progname.h.
130758         (main): Call set_program_name.
130760         * modules/rbtree-list-tests (Depends-on): Add progname.
130761         * tests/test-rbtree_list.c: Include progname.h.
130762         (main): Call set_program_name.
130764         * modules/linked-list-tests (Depends-on): Add progname.
130765         * tests/test-linked_list.c: Include progname.h.
130766         (main): Call set_program_name.
130768 2007-03-03  Bruno Haible  <bruno@clisp.org>
130770         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
130771         All uses of __restrict changed to _Restrict_.
130772         * lib/glob_.h (__restrict): Remove macro.
130774 2007-03-02  Bruno Haible  <bruno@clisp.org>
130776         * modules/gettext (configure.ac): Require gettext infrastructure
130777         from version 0.16.1.
130779 2007-03-02  Bruno Haible  <bruno@clisp.org>
130781         * modules/linkedhash-list-tests (Depends-on): Add progname.
130782         * tests/test-linkedhash_list.c: Include progname.h.
130783         (main): Call set_program_name.
130785         * modules/carray-list-tests (Depends-on): Add progname.
130786         * tests/test-carray_list.c: Include progname.h.
130787         (main): Call set_program_name.
130789         * modules/avltreehash-list-tests (Depends-on): Add progname.
130790         * tests/test-avltreehash_list.c: Include progname.h.
130791         (main): Call set_program_name.
130793         * modules/avltree-oset-tests (Depends-on): Add progname.
130794         * tests/test-avltree_oset.c: Include progname.h.
130795         (main): Call set_program_name.
130797         * modules/avltree-list-tests (Depends-on): Add progname.
130798         * tests/test-avltree_list.c: Include progname.h.
130799         (main): Call set_program_name.
130801         * modules/array-oset-tests (Depends-on): Add progname.
130802         * tests/test-array_oset.c: Include progname.h.
130803         (main): Call set_program_name.
130805         * modules/array-list-tests (Depends-on): Add progname.
130806         * tests/test-array_list.c: Include progname.h.
130807         (main): Call set_program_name.
130809         * modules/argp-tests (Depends-on): Add progname.
130810         * tests/test-argp.c: Include argp.h first. Include progname.h.
130811         (main): Call set_program_name.
130813 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
130815         * doc/gnulib-tool.texi (Initial import): Reword description of
130816         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
130817         limited effect even if defined after the first system include.
130819 2007-03-01  Bruno Haible  <bruno@clisp.org>
130821         * build-aux/config.libpath: Update to libtool-1.5.22.
130822         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
130824 2007-03-01  Bruno Haible  <bruno@clisp.org>
130826         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
130827         foo_CFLAGS.
130828         Reported by Ralf Wildenhues.
130830 2007-03-01  Bruno Haible  <bruno@clisp.org>
130832         * build-aux/install-reloc: Remove object files left over by some
130833         compilers.
130834         Reported by Ralf Wildenhues.
130836 2007-03-01  Bruno Haible  <bruno@clisp.org>
130838         * build-aux/install-reloc: Break long lines.
130840 2007-03-01  Bruno Haible  <bruno@clisp.org>
130842         * doc/relocatable.texi: Document that it may not work on OpenBSD.
130843         Reported by Ralf Wildenhues.
130845 2007-03-01  Bruno Haible  <bruno@clisp.org>
130847         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
130848         include ordering constraints.
130850 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
130852         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
130853         <http://lists.gnu.org/r/bug-gnulib/2007-02/msg00136.html>.
130854         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
130855         as another example.
130856         * lib/time_.h: Fix misspelling.
130857         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
130858         Require gl_HEADER_TIME_H_DEFAULTS.
130859         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
130860         * m4/time_r.m4 (gl_TIME_R): Likewise.
130861         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
130863 2007-03-01  Bruno Haible  <bruno@clisp.org>
130865         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
130866         * m4/utimens.m4 (gl_UTIMENS): Likewise.
130868 2007-03-01  Jim Meyering  <jim@meyering.net>
130870         * modules/xreadlink (Maintainer): Add my name.
130871         * modules/xreadlink-with-size (Depends-on): Alphabetize.
130873 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
130874             Bruno Haible  <bruno@clisp.org>
130876         * build-aux/install-reloc: Compile also c-ctype.c.
130877         * build-aux/relocatable.sh.in: New file.
130878         * doc/relocatable.texi: New file.
130879         * doc/relocatable-maint.texi: New file.
130880         * doc/gnulib.texi: Include relocatable-maint.texi.
130881         * lib/progreloc.c: Include unistd.h unconditionally.
130882         * lib/relocwrapper.c: Include unistd.h unconditionally.
130883         Include c-ctype.h.
130884         (add_dotbin): Use c_tolower.
130885         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
130886         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
130887         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
130888         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
130889         to m4/relocatable-lib.m4.
130890         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
130891         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
130892         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
130893         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
130894         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
130895         * modules/relocatable: New file.
130896         * modules/relocatable-lib: New file.
130897         * modules/relocatable-script: New file.
130899 2007-02-28  Bruno Haible  <bruno@clisp.org>
130901         Import --enable-relocatable infrastructure.
130902         * build-aux/config.libpath: New file, from GNU gettext.
130903         * build-aux/install-reloc: New file, from GNU gettext.
130904         * build-aux/reloc-ldflags: New file, from GNU gettext.
130905         * lib/relocatable.h: New file, from GNU gettext.
130906         * lib/relocatable.c: New file, from GNU gettext.
130907         * lib/relocwrapper.c: New file, from GNU gettext.
130908         * m4/relocatable.m4: New file, from GNU gettext.
130910 2007-02-28  Bruno Haible  <bruno@clisp.org>
130912         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
130914         * modules/xreadlink: New file, from GNU gettext with modifications.
130915         * lib/xreadlink.c: New file, from GNU gettext.
130916         * lib/xreadlink.h: Add comments.
130917         (xreadlink): New declaration.
130919         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
130920         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
130921         lib/xreadlink-with-size.c.
130922         (configure.ac): Remove gl_XREADLINK invocation.
130923         (Makefile.am): Augment lib_SOURCES.
130924         * m4/xreadlink.m4: Remove file.
130925         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
130926         (xreadlink_with_size): Renamed from xreadink.
130927         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
130928         * modules/canonicalize (Depends-on): Replace xreadlink with
130929         xreadlink-with-size.
130930         * lib/canonicalize.c (canonicalize_filename_mode): Update.
130932 2007-02-25  Jim Meyering  <jim@meyering.net>
130934         * build-aux/announce-gen: When complaining about excess arguments,
130935         list them.
130937 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
130939         * README: Document signed integer overflow situation more
130940         accurately.
130942 2007-02-25  Bruno Haible  <bruno@clisp.org>
130944         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
130945         'a' or 'A' conversion.
130947 2007-02-25  Bruno Haible  <bruno@clisp.org>
130949         * modules/filename: Renamed from modules/pathname.
130950         (Files): Replace lib/pathname.h with lib/filename.h. Replace
130951         lib/concatpath.c with lib/concat-filename.c.
130952         (Makefile.am): Update.
130953         (Include): Replace pathname.h with filename.h.
130954         * lib/filename.h: Renamed from lib/pathname.h.
130955         (concatenated_filename): Renamed from concatenated_pathname.
130956         * lib/concat-filename.c: Renamed from lib/concatpath.c.
130957         (concatenated_filename): Renamed from concatenated_pathname.
130958         * lib/findprog.c: Include filename.h instead of pathname.h.
130959         (find_in_path): Update.
130960         * lib/javacomp.c: Include filename.h instead of pathname.h.
130961         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
130962         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
130963         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
130964         is_oldgcj_14_13_usable, is_javac_usable): Update.
130965         * lib/javaexec.c: Include filename.h instead of pathname.h.
130966         (execute_java_class): Update.
130967         * modules/findprog: Update.
130968         * modules/javacomp: Update.
130969         * modules/javaexec: Update.
130970         * MODULES.html.sh (File system functions): Add 'filename', remove
130971         'pathname'.
130973 2007-02-25  Bruno Haible  <bruno@clisp.org>
130975         * modules/printf-frexpl-tests: New file.
130976         * tests/test-printf-frexpl.c: New file.
130978         * modules/printf-frexpl: New file.
130979         * lib/printf-frexpl.h: New file.
130980         * lib/printf-frexpl.c: New file.
130981         * m4/printf-frexpl.m4: New file.
130983 2007-02-25  Bruno Haible  <bruno@clisp.org>
130985         * modules/printf-frexp-tests: New file.
130986         * tests/test-printf-frexp.c: New file.
130988         * modules/printf-frexp: New file.
130989         * lib/printf-frexp.h: New file.
130990         * lib/printf-frexp.c: New file.
130991         * m4/printf-frexp.m4: New file.
130993 2007-02-25  Bruno Haible  <bruno@clisp.org>
130995         Assume automake >= 1.10 for the tests.
130996         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
130997         * modules/arctwo-tests: Likewise.
130998         * modules/argp-tests: Likewise.
130999         * modules/avltree-list-tests: Likewise.
131000         * modules/avltree-oset-tests: Likewise.
131001         * modules/avltreehash-list-tests: Likewise.
131002         * modules/carray-list-tests: Likewise.
131003         * modules/crc-tests: Likewise.
131004         * modules/des-tests: Likewise.
131005         * modules/gc-arcfour-tests: Likewise.
131006         * modules/gc-arctwo-tests: Likewise.
131007         * modules/gc-des-tests: Likewise.
131008         * modules/gc-hmac-md5-tests: Likewise.
131009         * modules/gc-hmac-sha1-tests: Likewise.
131010         * modules/gc-md2-tests: Likewise.
131011         * modules/gc-md4-tests: Likewise.
131012         * modules/gc-md5-tests: Likewise.
131013         * modules/gc-pbkdf2-sha1-tests: Likewise.
131014         * modules/gc-rijndael-tests: Likewise.
131015         * modules/gc-sha1-tests: Likewise.
131016         * modules/gc-tests: Likewise.
131017         * modules/getaddrinfo-tests: Likewise.
131018         * modules/hmac-md5-tests: Likewise.
131019         * modules/hmac-sha1-tests: Likewise.
131020         * modules/linked-list-tests: Likewise.
131021         * modules/linkedhash-list-tests: Likewise.
131022         * modules/lock-tests: Likewise.
131023         * modules/md2-tests: Likewise.
131024         * modules/md4-tests: Likewise.
131025         * modules/md5-tests: Likewise.
131026         * modules/rbtree-list-tests: Likewise.
131027         * modules/rbtree-oset-tests: Likewise.
131028         * modules/rbtreehash-list-tests: Likewise.
131029         * modules/read-file-tests: Likewise.
131030         * modules/rijndael-tests: Likewise.
131031         * modules/stdint-tests: Likewise.
131032         * modules/tls-tests: Likewise.
131034 2007-02-24  Bruno Haible  <bruno@clisp.org>
131036         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
131037         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
131038         function; instead check whether isnan with a double argument links.
131039         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
131040         function; instead check whether isnan with a 'long double' argument
131041         links.
131042         Reported by Eric Blake <ebb9@byu.net>.
131044 2007-02-24  Bruno Haible  <bruno@clisp.org>
131046         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
131047         defined.
131048         * lib/isnanl.c: Remove all code. Just include isnan.c.
131049         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
131051 2007-02-25  Jim Meyering  <jim@meyering.net>
131053         Avoid conflicting types for 'unsetenv' on FreeBSD.
131054         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
131055         conflicting with FreeBSD's (5.0 and 6.1) function declaration
131056         in stdlib.h.
131058 2007-02-24  Bruno Haible  <bruno@clisp.org>
131060         * modules/isnanl-nolibm-tests: New file.
131061         * tests/test-isnanl.c: New file.
131063         * modules/isnanl-nolibm: New file.
131064         * lib/isnanl.h: New file.
131065         * lib/isnanl.c: New file.
131066         * m4/isnanl.m4: New file.
131068 2007-02-24  Bruno Haible  <bruno@clisp.org>
131070         * modules/isnan-nolibm-tests: New file.
131071         * tests/test-isnan.c: New file.
131073         * modules/isnan-nolibm: New file.
131074         * lib/isnan.h: New file.
131075         * lib/isnan.c: New file.
131076         * m4/isnan.m4: New file.
131078 2007-02-24  Bruno Haible  <bruno@clisp.org>
131080         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
131081         assume that an exponent fits in 20 bits.
131083 2007-02-24  Jim Meyering  <jim@meyering.net>
131085         * m4/regex.m4: Update the description of the configure-time option,
131086         --without-included-regex, to state accurately what the defaults are,
131087         and perhaps to give people an idea why using this option is risky.
131089 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
131091         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
131092         loops on small arguments.  This attempts to avoid the problem
131093         Bruno Haible reported for AIX 4.3.2 in
131094         <http://lists.gnu.org/r/bug-gnulib/2007-02/msg00309.html>.
131096 2007-02-23  Bruno Haible  <bruno@clisp.org>
131098         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
131099         Needed for help2man.
131101 2007-02-23  Karl Berry  <karl@gnu.org>
131103         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
131104         exists, foo.h should be cvs-ignored, not committed.
131106 2007-02-23  Eric Blake  <ebb9@byu.net>
131108         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
131109         * lib/stat-time.h (includes): Likewise.
131110         * lib/utimecmp.c (includes): Likewise.
131111         * lib/utimens.h (includes): Likewise.
131112         * lib/getdate.y (includes): Also include "timespec.h" for use
131113         internal to the module.
131114         * modules/utimens (Depends-on): Revert yesterday's patch.
131115         * modules/nanosleep (Depends-on): Add missing dependency.
131117 2007-02-22  Bruno Haible  <bruno@clisp.org>
131119         * lib/glob.c: Don't include getlogin_r.h.
131121 2007-02-22  Jim Meyering  <jim@meyering.net>
131123         * modules/utimens (Depends-on): Add timespec, required for
131124         utimens.h's inclusion of timespec.h.
131126 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
131128         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
131129         long unreadable paths in GNU/Linux.  Problem reported by Andreas
131130         Schwab in
131131         <http://lists.gnu.org/r/bug-gnulib/2007-02/msg00261.html>.
131132         I'll try to think of a better way to fix the Solaris problem.
131134         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
131135         like glibc; on Solaris 10, it fails with errno == EINVAL.
131136         POSIX says the behavior is unspecified if the first argument is NULL,
131137         so play it safe and never pass NULL to the system getcwd.
131139 2007-02-21  Jim Meyering  <jim@meyering.net>
131141         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
131142         of gettimeofday.  It would conflict with the one now always
131143         provided via sys_time_.h.  Reported by Matthew Woehlke, as
131144         an IRIX 6.5 build failure.
131146 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
131148         Minor fixups to port to Solaris 10 with Sun C 5.8.
131149         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
131150         * modules/getcwd (Depends-on): Add dirfd.
131151         * lib/putenv.c (putenv): #undef it.
131152         (rpl_putenv): New decl.
131153         (malloc, free): Include <stdlib.h> rather than prototyping separately.
131155 2007-02-20  Bruno Haible  <bruno@clisp.org>
131157         * modules/stdio-tests: New file.
131158         * tests/test-stdio.c: New file.
131160         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
131161         (Depends-on): Add stdio.
131162         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
131163         (Include): Use <stdio.h> instead of vsnprintf.h.
131164         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
131165         HAVE_DECL_VSNPRINTF.
131166         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
131168         * modules/snprintf (Files): Remove lib/snprintf.h.
131169         (Depends-on): Add stdio.
131170         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
131171         (Include): Use <stdio.h> instead of snprintf.h.
131172         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
131173         HAVE_DECL_SNPRINTF.
131174         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
131175         * lib/getaddrinfo.c: Likewise.
131177         * modules/stdio: New file.
131178         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
131179         * lib/snprintf.h: Remove file.
131180         * lib/vsnprintf.h: Remove file.
131181         * lib/.cppi-disable: Remove snprintf.h.
131182         * m4/stdio_h.m4: New file.
131183         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
131185 2007-02-20  Jim Meyering  <jim@meyering.net>
131187         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
131188         used by e.g., mingw.  From Bruno Haible.
131190 2007-02-19  Bruno Haible  <bruno@clisp.org>
131192         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
131193         warnings.
131194         Reported by Ben Pfaff <blp@cs.stanford.edu>.
131196 2007-02-19  Bruno Haible  <bruno@clisp.org>
131198         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
131199         from mingw users.
131201 2007-02-19  Bruno Haible  <bruno@clisp.org>
131203         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
131204         warnings.
131205         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
131207 2007-02-19  Jim Meyering  <jim@meyering.net>
131209         Don't use FD after a successful "fdopendir (fd)".
131210         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
131211         Reset it by calling dirfd on the just-obtained DIR*.
131213         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
131214         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
131216 2007-02-18  Bruno Haible  <bruno@clisp.org>
131218         * lib/readlink.c: Include <unistd.h>.
131219         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
131220         HAVE_READLINK.
131221         * modules/readlink (Depends-on): Add unistd.
131222         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
131223         (Include): Add <unistd.h>.
131225         * lib/getlogin_r.h: Remove file.
131226         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
131227         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
131228         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
131229         HAVE_DECL_GETLOGIN_R.
131230         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
131231         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
131232         (Include): Use <unistd.h> instead of getlogin_r.h.
131234         * lib/getcwd.h: Remove file.
131235         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
131236         * lib/xgetcwd.c: Likewise.
131237         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
131238         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
131239         * modules/getcwd (Files): Remove lib/getcwd.h.
131240         (Depends-on): Add unistd.
131241         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
131242         (Include): Use <unistd.h> instad of getcwd.h.
131244         * lib/ftruncate.c: Include <unistd.h> first.
131245         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
131246         Set HAVE_FTRUNCATE.
131247         * modules/ftruncate (Depends-on): Add unistd.
131248         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
131250         * lib/fchdir.c: Include <unistd.h> first.
131251         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
131252         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
131253         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
131254         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
131255         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
131257         * lib/dup2.c: Include <unistd.h> first.
131258         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
131259         HAVE_DUP2.
131260         * modules/dup2 (Depends-on): Add unistd.
131261         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
131263         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
131264         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
131265         REPLACE_CHOWN. Don't define chown as a macro here.
131266         * modules/chown (Depends-on): Add unistd.
131267         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
131269         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
131270         Add definition for GL_LINK_WARNING.
131271         (chown, dup2): New declarations.
131272         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
131273         link warning.
131274         (ftruncate): New declaration.
131275         (getcwd): New declaration, taken from old getcwd.h.
131276         (getlogin_r): New declaration, taken from old getlogin_r.h.
131277         (readlink): New declaration.
131278         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
131279         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
131280         (gl_PREREQ_UNISTD): Remove macro.
131281         (gl_UNISTD_MODULE_INDICATOR): New macro.
131282         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
131283         many new variables. Don't set UNISTD_H.
131284         * modules/unistd (Description): Change.
131285         (Depends-on): Add link-warning.
131286         (configure.ac): Update.
131287         (Makefile.am): Create unistd.h always. Substitute many new variables
131288         into it.
131290 2007-02-18  Bruno Haible  <bruno@clisp.org>
131292         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
131293         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
131294         HAVE_GETSUBOPT.
131295         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
131296         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
131297         * lib/getsubopt.h: Remove file.
131298         * modules/getsubopt (Files): Remove lib/getsubopt.h.
131299         (Depends-on): Add stdlib.
131300         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
131301         (Includes): Use <stdlib.h> instead of getsubopt.h.
131302         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
131303         Set HAVE_GETSUBOPT.
131304         * lib/getsubopt.c: Don't include getsubopt.h.
131306 2007-02-18  Bruno Haible  <bruno@clisp.org>
131308         * modules/fchdir (Depends-on): Add dup2.
131310 2007-02-18  Bruno Haible  <bruno@clisp.org>
131312         * lib/stdlib_.h: Handle glibc's special invocation convention
131313         specially.
131315 2007-02-18  Bruno Haible  <bruno@clisp.org>
131317         * modules/stdlib-tests: New file.
131318         * tests/test-stdlib.c: New file.
131320         * modules/mkstemp (Files): Remove lib/mkstemp.h.
131321         (Depends-on): Add stdlib.
131322         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
131323         (Includes): Use <stdlib.h> instead of mkstemp.h.
131324         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
131325         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
131326         * lib/mkstemp.c: Don't include mkstemp.h.
131327         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
131328         * lib/stdlib--.h: Don't include mkstemp.h.
131330         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
131331         (Depends-on): Add stdlib.
131332         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
131333         (Includes): Use <stdlib.h> instead of mkdtemp.h.
131334         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
131335         HAVE_MKDTEMP.
131336         * lib/mkdtemp.c: Don't include mkdtemp.h.
131337         * lib/clean-temp.c: Don't include mkdtemp.h.
131339         * modules/exit (Files): Remove lib/exit.h.
131340         (Depends-on): Add stdlib.
131341         (Makefile.am): Remove lib_SOURCES.
131342         (Include): Use <stdlib.h> instead of exit.h.
131343         * lib/argmatch.c: Don't include exit.h.
131344         * lib/execute.c: Likewise.
131345         * lib/pagealign_alloc.c: Likewise.
131346         * lib/pipe.c: Likewise.
131347         * lib/wait-process.c: Likewise.
131348         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
131349         * lib/exitfail.c: Likewise.
131350         * lib/savewd.c: Likewise.
131351         * lib/xsetenv.c: Likewise.
131353         * modules/stdlib: New file.
131354         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
131355         and extra comments about mkstemp().
131356         * lib/exit.h: Remove file.
131357         * lib/mkdtemp.h: Remove file.
131358         * lib/mkstemp.h: Remove file.
131359         * m4/stdlib_h.m4: New file.
131360         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
131362 2007-02-18  Bruno Haible  <bruno@clisp.org>
131364         * modules/math-tests: New file.
131365         * tests/test-math.c: New file.
131367         * modules/math: New file.
131368         * modules/mathl (Files): Remove lib/mathl.h.
131369         (Depends-on): Add math.
131370         (Makefile.am): Don't mention mathl.h.
131371         (Include): Use <math.h> instead of mathl.h.
131372         * lib/math_.h: New file.
131373         * lib/mathl.h: Remove file.
131374         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
131375         mathl.h.
131376         * lib/asinl.c: Likewise.
131377         * lib/atanl.c: Likewise.
131378         * lib/ceill.c: Likewise.
131379         * lib/cosl.c: Likewise.
131380         * lib/expl.c: Likewise.
131381         * lib/floorl.c: Likewise.
131382         * lib/frexpl.c: Likewise.
131383         * lib/ldexpl.c: Likewise.
131384         * lib/logl.c: Likewise.
131385         * lib/sincosl.c: Likewise.
131386         * lib/sinl.c: Likewise.
131387         * lib/sqrtl.c: Likewise.
131388         * lib/tanl.c: Likewise.
131389         * lib/trigl.c: Likewise.
131390         * m4/math_h.m4: New file.
131391         * MODULES.html.sh (Mathematics): Add math.
131393 2007-02-17  Bruno Haible  <bruno@clisp.org>
131395         * modules/wctype-tests: New file.
131396         * tests/test-wctype.c: New file.
131398         * modules/wchar-tests: New file.
131399         * tests/test-wchar.c: New file.
131401         * modules/unistd-tests: New file.
131402         * tests/test-unistd.c: New file.
131404         * modules/time-tests: New file.
131405         * tests/test-time.c: New file.
131407         * modules/sysexits-tests: New file.
131408         * tests/test-sysexits.c: New file.
131410         * modules/sys_time-tests: New file.
131411         * tests/test-sys_time.c: New file.
131413         * modules/sys_stat-tests: New file.
131414         * tests/test-sys_stat.c: New file.
131416         * modules/sys_socket-tests: New file.
131417         * tests/test-sys_socket.c: New file.
131419         * modules/sys_select-tests: New file.
131420         * tests/test-sys_select.c: New file.
131422         * modules/string-tests: New file.
131423         * tests/test-string.c: New file.
131425         * modules/stdbool-tests: New file.
131426         * tests/test-stdbool.c: New file.
131428         * modules/netinet_in-tests: New file.
131429         * tests/test-netinet_in.c: New file.
131431         * modules/inttypes-tests: New file.
131432         * tests/test-inttypes.c: New file.
131434         * modules/fcntl-tests: New file.
131435         * tests/test-fcntl.c: New file.
131437         * modules/byteswap-tests: New file.
131438         * tests/test-byteswap.c: New file.
131440         * modules/arpa_inet-tests: New file.
131441         * tests/test-arpa_inet.c: New file.
131443 2007-02-17  Bruno Haible  <bruno@clisp.org>
131445         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
131446         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
131447         if the corresponding module is not enabled. Emit link warnings if
131448         the function is used nevertheless.
131449         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
131450         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
131451         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
131452         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
131453         * modules/inttypes (Depends-on): Add link-warning.
131454         (Makefile.am): Copy the contents of build-aux/link-warning.h into
131455         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
131456         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
131457         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
131458         * modules/imaxdiv (configure.ac): Likewise.
131459         * modules/strtoimax (configure.ac): Likewise.
131460         * modules/strtoumax (configure.ac): Likewise.
131462 2007-02-17  Bruno Haible  <bruno@clisp.org>
131464         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
131465         gl_STRING_MODULE_INDICATOR_DEFAULTS.
131466         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
131467         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
131469 2007-02-17  Bruno Haible  <bruno@clisp.org>
131471         * modules/link-warning: New file.
131472         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
131473         * lib/string_.h (GL_LINK_WARNING): Remove definition.
131474         * modules/string (Depends-on): Add link-warning.
131475         (Makefile.am): Copy the contents of build-aux/link-warning.h into
131476         string.h.
131477         * MODULES.html.sh (Support for building libraries and executables): Add
131478         link-warning.
131480 2007-02-17  Bruno Haible  <bruno@clisp.org>
131482         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
131483         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
131484         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
131485         long lines.
131487 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
131488             Bruno Haible  <bruno@clisp.org>
131490         * modules/tmpfile: New file.
131491         * lib/tmpfile.c: New file.
131492         * m4/tmpfile.m4: New file.
131493         * MODULES.html.sh (func_all_modules): New section "Input/output".
131495 2007-02-15  Bruno Haible  <bruno@clisp.org>
131497         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
131498         (supports_delete_on_close): New function.
131499         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
131501 2007-02-14  Bruno Haible  <bruno@clisp.org>
131503         * modules/mbspcasecmp-tests: New file.
131504         * tests/test-mbspcasecmp.sh: New file.
131505         * tests/test-mbspcasecmp.c: New file.
131507         New module mbspcasecmp.
131508         * modules/mbspcasecmp: New file.
131509         * lib/mbspcasecmp.c: New file.
131510         * lib/string_.h (strncasecmp): Change warning message.
131511         (mbspcasecmp): New declaration.
131512         * m4/mbspcasecmp.m4: New file.
131513         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
131514         GNULIB_MBSPCASECMP.
131515         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
131516         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
131518 2007-02-14  Bruno Haible  <bruno@clisp.org>
131520         * modules/mbsncasecmp-tests: New file.
131521         * tests/test-mbsncasecmp.sh: New file.
131522         * tests/test-mbsncasecmp.c: New file.
131524         New module mbsncasecmp.
131525         * modules/mbsncasecmp: New file.
131526         * lib/mbsncasecmp.c: New file.
131527         * lib/string_.h (mbsncasecmp): New declaration.
131528         * m4/mbsncasecmp.m4: New file.
131529         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
131530         GNULIB_MBSNCASECMP.
131531         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
131532         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
131534 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
131536         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
131537         Verify that it doesn't overlap with our flags.
131538         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
131539         do not have the desired effect in multibyte locales; instead, use
131540         mbscasecmp.
131541         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
131542         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
131543         we don't require GNU fnmatch ourselves (if our users require it, they
131544         should do so explicitly).
131546         Fix regex code so it doesn't rely on strcasecmp.
131547         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
131548         Otherwise, include gnulib's langinfo.h.
131549         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
131550         undesirable behavior in non-C locales.  Instead, rely on localecharset.
131551         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
131552         * modules/regex (FILES): Remove m4/codeset.m4.
131553         (Depends-on): Add localcharset.  Remove strcase.
131555 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
131557         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
131558         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
131560 2007-02-13  Bruno Haible  <bruno@clisp.org>
131562         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
131563         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
131565 2007-02-12  Bruno Haible  <bruno@clisp.org>
131567         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
131568         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
131569         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
131570         time warning rather than a link error.
131572 2007-02-12  Bruno Haible  <bruno@clisp.org>
131574         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
131575         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
131576         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
131578 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
131580         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
131581         args, not 2.
131583 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
131585         New module 'time', so that apps can include <time.h> as per
131586         POSIX and GNU instead of separate include files like time_r.h
131587         and timegm.h.  This implementation tries out a simpler approach
131588         for replacing decls in standard include files (as compared to
131589         the string module), somewhat as an experiment.
131591         * config/srclist.txt: Comment out mktime.c for now.
131592         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
131593         since it doesn't apply any more.  Use generic wording instead.
131594         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
131595         'time'.
131596         * lib/time_.h, m4/time_h.m4, modules/time: New files.
131597         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
131598         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
131599         Don't include <sys/types.h>; no longer needed since we assume C89.
131600         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
131601         * lib/strftime.c: Likewise.
131602         * lib/time_r.c: Likewise.
131603         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
131604         * lib/nanosleep.c: Include <time.h> first, to check interface.
131605         * lib/strptime.c: Likewise.
131606         * lib/time_r.c: Likewise.
131607         * lib/timegm.c: Likewise.
131608         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
131609         needed.
131610         * lib/timegm.c: Don't include timegm.h; no longer needed.
131611         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
131612         time.h now handles any problems in that area.
131613         (struct timespec, nanosleep): Remove; time.h now arranges for these.
131614         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
131615         that time.h defines struct timespec.
131616         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
131617         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
131618         handles that.
131619         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
131620         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
131621         needed.  Set REPLACE_LOCALTIME.
131622         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
131623         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
131624         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
131625         nanosleep; time_h.m4 now does that.  Don't require
131626         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
131627         module handles this now.
131628         * modules/getdate (Depends-on): Remove timespec.  Add time.
131629         * modules/nanosleep (Depends-on): Likewise.
131630         * modules/stat-time (Depends-on): Likewise.
131631         * modules/nanosleep (Include): Include time.h, not timespec.h.
131632         * modules/strptime (Files): Remove lib/strptime.h.
131633         (Depends-on): Add extensions, time.
131634         (Include): Include time.h, not strptime.h.
131635         * modules/time_r (Files): Remove lib/time_r.h.
131636         (Depends-on): Add time.
131637         (Include): Include time.h, not time_r.h.
131638         * modules/timegm: Likewise.
131639         * modules/timespec (Description): Now does timespec-related decls
131640         of our own, instead of struct timespec itself.
131641         (Depends-on): Add time; remove extensions.
131642         (Maintainer): Add self.
131643         * modules/utimecmp (Depends-on): Add time; remove timespec.
131644         * modules/utimens (Depends-on): Likewise.
131645         * modules/xnanosleep (Depends-on): Likewise.
131647 2007-02-11  Bruno Haible  <bruno@clisp.org>
131649         * lib/c-strstr.c: Include allocsa.h.
131650         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
131651         * lib/c-strcasestr.c: Include allocsa.h.
131652         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
131653         * lib/strcasestr.c: Include allocsa.h.
131654         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
131655         * lib/mbsstr.c: Include allocsa.h.
131656         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
131657         allocsa/freesa instead of malloc/free.
131658         * lib/mbscasestr.c: Include allocsa.h.
131659         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
131660         allocsa/freesa instead of malloc/free.
131661         * modules/c-strstr (Depends-on): Add allocsa.
131662         * modules/c-strcasestr (Depends-on): Likewise.
131663         * modules/strcasestr (Depends-on): Likewise.
131664         * modules/mbsstr (Depends-on): Likewise.
131665         * modules/mbscasestr (Depends-on): Likewise.
131667 2007-02-11  Bruno Haible  <bruno@clisp.org>
131669         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
131671         * modules/mbsspn-tests: New file.
131672         * tests/test-mbsspn.sh: New file.
131673         * tests/test-mbsspn.c: New file.
131675 2007-02-11  Bruno Haible  <bruno@clisp.org>
131677         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
131679         * modules/mbspbrk-tests: New file.
131680         * tests/test-mbspbrk.sh: New file.
131681         * tests/test-mbspbrk.c: New file.
131683 2007-02-11  Bruno Haible  <bruno@clisp.org>
131685         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
131686         unneeded cast.
131688         * modules/mbscspn-tests: New file.
131689         * tests/test-mbscspn.sh: New file.
131690         * tests/test-mbscspn.c: New file.
131692 2007-02-11  Bruno Haible  <bruno@clisp.org>
131694         * modules/mbscasecmp-tests: New file.
131695         * tests/test-mbscasecmp.sh: New file.
131696         * tests/test-mbscasecmp.c: New file.
131698 2007-02-11  Bruno Haible  <bruno@clisp.org>
131700         Ensure O(n) worst-case complexity of mbscasestr.
131701         * lib/mbscasestr.c: Include stdbool.h.
131702         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
131703         functions.
131704         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
131705         the bookkeeping indicates that it's worth it.
131706         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
131708         * modules/mbscasestr-tests: New file.
131709         * tests/test-mbscasestr1.c: New file.
131710         * tests/test-mbscasestr2.sh: New file.
131711         * tests/test-mbscasestr2.c: New file.
131712         * tests/test-mbscasestr3.sh: New file.
131713         * tests/test-mbscasestr3.c: New file.
131714         * tests/test-mbscasestr4.sh: New file.
131715         * tests/test-mbscasestr4.c: New file.
131716         * m4/locale-tr.m4: New file.
131718 2007-02-11  Bruno Haible  <bruno@clisp.org>
131720         Ensure O(n) worst-case complexity of mbsstr.
131721         * lib/mbsstr.c: Include stdbool.h.
131722         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
131723         functions.
131724         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
131725         bookkeeping indicates that it's worth it.
131726         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
131728         * modules/mbsstr-tests: New file.
131729         * tests/test-mbsstr1.c: New file.
131730         * tests/test-mbsstr2.sh: New file.
131731         * tests/test-mbsstr2.c: New file.
131732         * tests/test-mbsstr3.sh: New file.
131733         * tests/test-mbsstr3.c: New file.
131734         * m4/locale-fr.m4: New file.
131736 2007-02-11  Bruno Haible  <bruno@clisp.org>
131738         * lib/mbsrchr.c (mbsrchr): Fix bug.
131740         * modules/mbsrchr-tests: New file.
131741         * tests/test-mbsrchr.sh: New file.
131742         * tests/test-mbsrchr.c: New file.
131744 2007-02-11  Bruno Haible  <bruno@clisp.org>
131746         * lib/mbschr.c (mbschr): Fix bug.
131748         * modules/mbschr-tests: New file.
131749         * tests/test-mbschr.sh: New file.
131750         * tests/test-mbschr.c: New file.
131751         * m4/locale-zh.m4: New file.
131753 2007-02-11  Bruno Haible  <bruno@clisp.org>
131755         Support for copying multibyte string iterators.
131756         * lib/mbiter.h: Include <string.h>.
131757         (mbiter_multi_copy): New function.
131758         (mbi_copy): New macro.
131759         * lib/mbuiter.h: Include <string.h>.
131760         (mbuiter_multi_copy): New function.
131761         (mbui_copy): New macro.
131763 2007-02-11  Bruno Haible  <bruno@clisp.org>
131765         New module mbslen.
131766         * modules/mbslen: New file.
131767         * lib/mbslen.c: New file.
131768         * lib/string_.h (mbslen): New declaration.
131769         * m4/mbslen.m4: New file.
131770         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
131771         GNULIB_MBSLEN.
131772         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
131773         * MODULES.html.sh (Internationalization functions): Add mbslen.
131775 2007-02-11  Bruno Haible  <bruno@clisp.org>
131777         Ensure O(n) worst-case complexity of strcasestr substitute.
131778         * lib/strcasestr.c: Include stdbool.h.
131779         (knuth_morris_pratt): New function.
131780         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
131781         bookkeeping indicates that it's worth it.
131782         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
131784         * modules/strcasestr-tests: New file.
131785         * tests/test-strcasestr.c: New file.
131787 2007-02-11  Bruno Haible  <bruno@clisp.org>
131789         Ensure O(n) worst-case complexity of c_strcasestr.
131790         * lib/c-strcasestr.c: Include stdbool.h, string.h.
131791         (knuth_morris_pratt): New function.
131792         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
131793         the bookkeeping indicates that it's worth it.
131794         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
131796         * modules/c-strcasestr-tests: New file.
131797         * tests/test-c-strcasestr.c: New file.
131799 2007-02-11  Bruno Haible  <bruno@clisp.org>
131801         Ensure O(n) worst-case complexity of c_strstr.
131802         * lib/c-strstr.c: Include stdbool.h, string.h.
131803         (knuth_morris_pratt): New function.
131804         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
131805         bookkeeping indicates that it's worth it.
131806         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
131808         * lib/c-strstr.c: Complete rewrite for maintainability.
131810         * modules/c-strstr-tests: New file.
131811         * tests/test-c-strstr.c: New file.
131813 2007-02-11  Bruno Haible  <bruno@clisp.org>
131815         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
131816         5.2.1 and earlier, whereby \055 was treated just like the range
131817         delimiter '-'.
131818         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
131820 2007-02-08  Bruno Haible  <bruno@clisp.org>
131822         * modules/regex (Depends-on): Add stdbool.
131823         Reported by Dalibor Topic <robilad@kaffe.org>.
131825 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
131827         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
131828         Prefer returning from main to exiting from it.
131829         Remove unnecessary parens after sizeof.
131831 2007-02-05  Bruno Haible  <bruno@clisp.org>
131833         New module mbssep.
131834         * modules/mbssep: New file.
131835         * lib/mbssep.c: New file.
131836         * lib/string_.h (strsep): Add a conditional link warning.
131837         (mbssep): New declaration.
131838         * m4/mbssep.m4: New file.
131839         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
131840         GNULIB_MBSSEP.
131841         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
131842         * MODULES.html.sh (Internationalization functions): Add mbssep.
131844 2007-02-05  Bruno Haible  <bruno@clisp.org>
131846         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
131847         Optimize search in case of 1 delimiter.
131849 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
131851         * lib/acl.h: Include sys/types.h before sys/acl.h.
131853 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
131855         Merge upstream fix for glibc bugzilla #3957:
131857         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
131859         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
131860         bit for RE_HAT_LISTS_NOT_NEWLINE.
131861         (build_charclass_op): Remove bogus comment.
131863 2007-02-05  Simon Josefsson  <simon@josefsson.org>
131865         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
131867 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
131869         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
131870         * lib/memmem.c [!defined _LIBC]: Include config.h.
131872 2007-02-04  Bruno Haible  <bruno@clisp.org>
131874         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
131875         warning message.
131877 2007-02-04  Bruno Haible  <bruno@clisp.org>
131879         New module mbstok_r.
131880         * modules/mbstok_r: New file.
131881         * lib/mbstok_r.c: New file.
131882         * lib/string_.h (strtok_r): Change argument names to match the
131883         comments. Add a conditional link warning.
131884         (mbstok_r): New declaration.
131885         * m4/mbstok_r.m4: New file.
131886         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
131887         GNULIB_MBSTOK_R.
131888         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
131889         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
131891 2007-02-04  Bruno Haible  <bruno@clisp.org>
131893         New module mbsspn.
131894         * modules/mbsspn: New file.
131895         * lib/mbsspn.c: New file.
131896         * lib/string_.h (strspn): Add a conditional link warning.
131897         (mbsspn): New declaration.
131898         * m4/mbsspn.m4: New file.
131899         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
131900         GNULIB_MBSSPN.
131901         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
131902         * MODULES.html.sh (Internationalization functions): Add mbsspn.
131904 2007-02-04  Bruno Haible  <bruno@clisp.org>
131906         New module mbspbrk.
131907         * modules/mbspbrk: New file.
131908         * lib/mbspbrk.c: New file.
131909         * lib/string_.h (strpbrk): Add a conditional link warning.
131910         (mbspbrk): New declaration.
131911         * m4/mbspbrk.m4: New file.
131912         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
131913         GNULIB_MBSPBRK.
131914         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
131915         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
131917 2007-02-04  Bruno Haible  <bruno@clisp.org>
131919         New module mbscspn.
131920         * modules/mbscspn: New file.
131921         * lib/mbscspn.c: New file.
131922         * lib/string_.h (strcspn): Add a conditional link warning.
131923         (mbscspn): New declaration.
131924         * m4/mbscspn.m4: New file.
131925         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
131926         GNULIB_MBSCSPN.
131927         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
131928         * MODULES.html.sh (Internationalization functions): Add mbscspn.
131930 2007-02-04  Bruno Haible  <bruno@clisp.org>
131932         New module mbscasestr, reduced goal of strcasestr.
131933         * modules/mbscasestr: New file.
131934         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
131935         (mbscasestr): Renamed from strcasestr.
131936         * lib/strcasestr.c: Don't include mbuiter.h.
131937         (strcasestr): Remove support for multibyte locales.
131938         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
131939         Change the conditional link warning.
131940         (mbscasestr): New declaration.
131941         * m4/mbscasestr.m4: New file.
131942         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
131943         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
131944         REPLACE_STRCASESTR.
131945         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
131946         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
131947         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
131948         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
131949         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
131950         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
131951         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
131952         (Depends-on): Remove mbuiter.
131953         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
131955 2007-02-04  Bruno Haible  <bruno@clisp.org>
131957         Simplify handling of strncasecmp.
131958         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
131959         the conditional link warning.
131960         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
131961         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
131962         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
131963         * modules/strcase (configure.ac): Don't invoke
131964         gl_STRING_MODULE_INDICATOR.
131965         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
131967 2007-02-04  Bruno Haible  <bruno@clisp.org>
131969         New module mbscasecmp, reduced goal of strcasecmp.
131970         * modules/mbscasecmp: New file.
131971         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
131972         (mbscasecmp): Renamed from strcasecmp.
131973         * lib/strcasecmp.c: Don't include mbuiter.h.
131974         (strcasecmp): Remove support for multibyte locales.
131975         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
131976         Change the conditional link warning.
131977         (mbscasecmp): New declaration.
131978         * m4/mbscasecmp.m4: New file.
131979         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
131980         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
131981         REPLACE_STRCASECMP.
131982         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
131983         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
131984         GNULIB_MBSCASECMP.
131985         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
131986         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
131987         * modules/strcase (Files): Remove m4/mbrtowc.m4.
131988         (Depends-on): Remove mbuiter.
131989         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
131991 2007-02-04  Bruno Haible  <bruno@clisp.org>
131993         New module mbsstr. Remove module strstr.
131994         * modules/mbsstr: New file.
131995         * modules/strstr: Remove file.
131996         * lib/mbsstr.c: Renamed from lib/strstr.c.
131997         (mbsstr): Renamed from strstr.
131998         * lib/string_.h (strstr): Remove declaration. Change the conditional
131999         link warning.
132000         (mbsstr): New declaration.
132001         * m4/mbsstr.m4: New file.
132002         * m4/strstr.m4: Remove file.
132003         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
132004         REPLACE_STRSTR.
132005         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
132006         Don't initialize GNULIB_STRSTR.
132007         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
132008         substitute GNULIB_STRSTR and REPLACE_STRSTR.
132009         * MODULES.html.sh (Internationalization functions): Add mbsstr.
132010         (Support for systems lacking ANSI C 89): Remove strstr.
132012 2007-02-04  Bruno Haible  <bruno@clisp.org>
132014         New module mbsrchr.
132015         * modules/mbsrchr: New file.
132016         * lib/mbsrchr.c: New file.
132017         * lib/string_.h (strrchr): Add a conditional link warning.
132018         (mbsrchr): New declaration.
132019         * m4/mbsrchr.m4: New file.
132020         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
132021         GNULIB_MBSRCHR.
132022         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
132023         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
132025 2007-02-04  Bruno Haible  <bruno@clisp.org>
132027         New module mbschr.
132028         * modules/mbschr: New file.
132029         * lib/mbschr.c: New file.
132030         * lib/string_.h (strchr): Add a conditional link warning.
132031         (mbschr): New declaration.
132032         * m4/mbschr.m4: New file.
132033         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
132034         GNULIB_MBSCHR.
132035         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
132036         * MODULES.html.sh (Internationalization functions): Add mbschr.
132038 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
132040         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
132042         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
132044 2007-02-04  Bruno Haible  <bruno@clisp.org>
132046         New module description section 'configure.ac-early'.
132047         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
132048         (func_get_autoconf_early_snippet): New function.
132049         (func_import, func_create_testdir): Use it. Remove special cases for
132050         modules 'extensions' and 'lock'.
132051         * modules/extensions (configure.ac-early): Require
132052         gl_USE_SYSTEM_EXTENSIONS.
132053         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
132055 2007-02-04  Bruno Haible  <bruno@clisp.org>
132057         Make use of gcj-4.3's -fsource and -ftarget option.
132058         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
132059         and if so try the options -fsource and -ftarget.
132060         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
132061         source_version, ftarget_option, target_version arguments.
132062         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
132063         (is_envjavac_oldgcj_14_14_usable): Renamed from
132064         is_envjavac_gcj_14_14_usable.
132065         (is_envjavac_oldgcj_14_13_usable): Renamed from
132066         is_envjavac_gcj_14_13_usable.
132067         (is_gcj_present): Update.
132068         (is_gcj_43, is_gcj43_usable): New functions.
132069         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
132070         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
132071         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
132072         try the options -fsource and -ftarget.
132074 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
132076         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
132077         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
132078         larger value.
132080 2007-02-03  Jim Meyering  <jim@meyering.net>
132082         Give tools a better chance to allocate space for very large buffers.
132083         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
132085         Make pwd and readlink work also when run with an unreadable parent dir
132086         on systems with openat support.
132087         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
132088         provided getcwd function, even when we have openat support.
132089         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
132091 2007-02-02  Bruno Haible  <bruno@clisp.org>
132093         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
132094         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
132095         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
132096         portability problems if one of these functions is only used on specific
132097         platforms.
132098         Reported by Paul Eggert.
132100 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
132102         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
132103         is causing more trouble than it's curing.
132104         * lib/regex_internal.h (__mempcpy): Remove.
132105         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
132106         (and make the code a tad smaller to boot).
132107         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
132109 2007-02-02  Jim Meyering  <jim@meyering.net>
132111         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
132112         section, not in the Makefile.am: one.
132114 2007-02-02  Eric Blake  <ebb9@byu.net>
132116         * lib/strchrnul.c: Always include config.h first.
132118         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
132119         gnulib strstr is not necessary here.
132121 2007-02-02  Simon Josefsson  <simon@josefsson.org>
132123         * m4/socklen.m4: Fix typo.
132125 2007-02-02  Eric Blake  <ebb9@byu.net>
132127         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
132128         * modules/netinet_in (Makefile.am): Likewise.
132130 2007-02-01  Bruno Haible  <bruno@clisp.org>
132132         * lib/string_.h (GL_LINK_WARNING): New macro.
132133         (strcasecmp, strstr, strcasestr): If provided by the system,
132134         conditionally define as a macro that leads to a warning instead of to
132135         an error.
132136         (strncasecmp): Conditionally define as a macro that leads to a warning.
132138 2007-02-01  Karl Berry  <karl@gnu.org>
132140         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
132142 2007-02-01  Bruno Haible  <bruno@clisp.org>
132144         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
132145         renamings.
132147 2007-02-01  Eric Blake  <ebb9@byu.net>
132149         * modules/regex (Depends-on): Revert dependence on mempcpy.
132150         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
132151         module's definition of mempcpy.
132152         Reported by Paul Eggert.
132154 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
132156         * lib/string_.h: If the gnulib module XYZ is not present, undefine
132157         the symbol XYZ before redefining it.  This fixes a problem with
132158         programs that don't use XYZ, when compiled on systems that define
132159         XYZ to something else.
132161 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
132163         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
132164         occurs when "mkdir -m foo" creates a setgid directory that is (1)
132165         writeable to group or other and (2) is intended to have a special
132166         mode bit that is set or cleared.  In such a case, the directory
132167         should be neither group- nor other-writeable until the special
132168         mode bits are right.
132170 2007-01-31  Eric Blake  <ebb9@byu.net>
132172         * modules/mountlist (Depends-on): Add strstr.
132174         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
132175         bug.
132176         * modules/string (Makefile.am): Remove redundant replacement.
132177         * modules/regex (Depends-on): Add mempcpy.
132179 2007-01-31  Bruno Haible  <bruno@clisp.org>
132181         New module description field 'Link'.
132182         * gnulib-tool (func_usage): Document --extract-link-directive.
132183         (sed_extract_prog): Recognize 'Link' directive.
132184         (func_get_link_directive): New function.
132185         (func_import): Show summary of link directives.
132186         Handle --extract-link-directive option.
132187         * modules/acl (Link): New section.
132188         * modules/clock-time (Link): New section.
132189         * modules/euidaccess (Link): New section.
132190         * modules/gettext (Link): New section.
132191         * modules/iconv (Link): New section.
132192         * modules/lock (Link): New section.
132193         * modules/nanosleep (Link): New section.
132194         * modules/readline (Link): New section.
132196 2007-01-27  Bruno Haible  <bruno@clisp.org>
132198         Enforce the use of gnulib modules for unportable <string.h> functions.
132199         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
132200         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
132201         (gl_HEADER_STRING_H_BODY): Require it.
132202         * lib/string_.h: If the gnulib module XYZ is not present, redefine
132203         the symbol XYZ to one that gives a link error.
132204         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
132205         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
132206         * modules/mempcpy (configure.ac): Likewise.
132207         * modules/memrchr (configure.ac): Likewise.
132208         * modules/stpcpy (configure.ac): Likewise.
132209         * modules/stpncpy (configure.ac): Likewise.
132210         * modules/strcase (configure.ac): Likewise.
132211         * modules/strcasestr (configure.ac): Likewise.
132212         * modules/strchrnul (configure.ac): Likewise.
132213         * modules/strdup (configure.ac): Likewise.
132214         * modules/strndup (configure.ac): Likewise.
132215         * modules/strnlen (configure.ac): Likewise.
132216         * modules/strpbrk (configure.ac): Likewise.
132217         * modules/strsep (configure.ac): Likewise.
132218         * modules/strstr (configure.ac): Likewise.
132219         * modules/strtok_r (configure.ac): Likewise.
132221 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
132223         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
132225 2007-01-30  Jim Meyering  <jim@meyering.net>
132227         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
132229 2007-01-29  Bruno Haible  <bruno@clisp.org>
132231         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
132232         * lib/execute.c: Likewise.
132233         * lib/pipe.c: Likewise.
132234         * lib/printf-args.h: Likewise.
132235         * lib/printf-args.c: Likewise.
132236         * lib/printf-parse.c: Likewise.
132237         * lib/vasnprintf.c: Likewise.
132239 2007-01-29  Eric Blake  <ebb9@byu.net>
132241         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
132242         declaration.
132244 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
132246         * lib/strptime.h (strptime): Use 'restrict' for args where
132247         POSIX requires this.
132248         * lib/strptime.c (strptime): Likewise.
132249         Change license notice from LGPL to GPL, since gnulib-tool will
132250         change this as needed.
132251         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
132252         defined.
132253         Include "strptime.h" first, to check interface.
132254         Do not #undef _LIBC and _NL_CURRENT.
132255         Do not include <stdlib.h>; no longer needed.
132256         Include "time_r.h" and declare ptime_locale_status
132257         only if _LIBC is not defined.
132258         (__P): Remove unused macro.
132259         (match_string): Bring back glibc version, but use it only if _LIBC
132260         is defined.
132261         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
132262         Remove unnecessary assertion and abort() call.
132263         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
132264         * m4/strptime.m4: Fix serial number comment.
132265         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
132266         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
132267         (Depends-on): Add time_r.
132269 2007-01-29  Bruno Haible  <bruno@clisp.org>
132271         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
132272         strptime.
132273         * modules/strptime (Depends-on): Add stdbool.
132274         * lib/strptime.h: Include <time.h> always. Add comments.
132276 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
132278         * modules/strptime: New file.
132279         * lib/strptime.h: New file.
132280         * lib/strptime.c: New file.
132281         * m4/strptime.m4: New file.
132283 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
132285         * MODULES.html.sh: New module mpsort.
132286         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
132288         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
132289         a circularity problem with HP-UX ia64 reported by Bob Proulx in
132290         <http://lists.gnu.org/r/bug-gnulib/2007-01/msg00394.html>.
132291         All uses changed.
132292         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
132293         All uses changed.
132294         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
132295         to _Restrict_.
132296         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
132297         the parameter matches the prototype.
132299 2007-01-28  Jim Meyering  <jim@meyering.net>
132301         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
132302         sys/time.h here, reverting that part of the previous patch:
132303         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
132305 2007-01-28  Bruno Haible  <bruno@clisp.org>
132307         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
132308         value of $(SYS_TIME_H).
132309         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
132310         remove it conditionally, too. [added by Jim Meyering]
132311         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
132312         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
132313         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
132314         GETTIMEOFDAY_REPLACEMENT to 1.
132316 2007-01-28  Bruno Haible  <bruno@clisp.org>
132318         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
132319         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
132320         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
132321         Set UNISTD_H instead of UNISTD_H2.
132322         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
132324 2007-01-28  Bruno Haible  <bruno@clisp.org>
132326         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
132327         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
132329 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
132331         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
132332         (func_create_testdir): Ensure C locale for `grep' and `tr'
132333         character ranges.
132334         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
132335         ACLOCAL_AMFLAGS parsing state machine.
132337 2007-01-27  Bruno Haible  <bruno@clisp.org>
132339         * modules/unistr/base: Update.
132341 2007-01-27  Bruno Haible  <bruno@clisp.org>
132343         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
132344         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
132345         * modules/unistr/u32-mbtouc-unsafe: Renamed from
132346         modules/unistr/u32-mbtouc.
132347         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
132348         * lib/unistr.h: Update.
132349         * lib/linebreak.c: Update.
132350         * modules/unistr/u32-mbtouc: Renamed from
132351         modules/unistr/u32-mbtouc-safe.
132352         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
132353         * lib/unistr.h: Update.
132354         * lib/unistr/u32-to-u8.c: Update.
132355         * lib/unistr/u32-to-u16.c: Update.
132357 2007-01-27  Bruno Haible  <bruno@clisp.org>
132359         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
132360         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
132361         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
132362         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
132363         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
132364         * modules/unistr/u16-mbtouc-unsafe: Renamed from
132365         modules/unistr/u16-mbtouc.
132366         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
132367         * lib/unistr.h: Update.
132368         * lib/linebreak.c: Update.
132369         * modules/linebreak: Update.
132370         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
132371         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
132372         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
132373         * modules/unistr/u16-mbtouc: Renamed from
132374         modules/unistr/u16-mbtouc-safe.
132375         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
132376         * lib/unistr.h: Update.
132377         * lib/unistr/u16-to-u8.c: Update.
132378         * modules/unistr/u16-to-u8: Update.
132379         * lib/unistr/u16-to-u32.c: Update.
132380         * modules/unistr/u16-to-u32: Update.
132382 2007-01-27  Bruno Haible  <bruno@clisp.org>
132384         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
132385         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
132386         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
132387         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
132388         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
132389         * modules/unistr/u8-mbtouc-unsafe: Renamed from
132390         modules/unistr/u8-mbtouc.
132391         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
132392         * lib/unistr.h: Update.
132393         * lib/striconveh.c: Update.
132394         * modules/striconveh: Update.
132395         * lib/linebreak.c: Update.
132396         * modules/linebreak: Update.
132397         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
132398         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
132399         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
132400         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
132401         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
132402         * lib/unistr.h: Update.
132403         * lib/striconveh.c: Update.
132404         * modules/striconveh: Update.
132405         * lib/unistr/u8-to-u16.c: Update.
132406         * modules/unistr/u8-to-u16: Update.
132407         * lib/unistr/u8-to-u32.c: Update.
132408         * modules/unistr/u8-to-u32: Update.
132410 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
132412         Sync from Libtool.
132413         * lib/argz.c: Do not include strings.h nor memory.h, include
132414         string.h unconditionally.  Patch by Simon Josefsson.
132416 2007-01-27  Bruno Haible  <bruno@clisp.org>
132418         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
132419         from gl_HEADER_STRING_H_BODY.
132420         (gl_HEADER_STRING_H_BODY): Require it.
132421         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
132422         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
132423         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
132424         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
132425         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
132426         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
132427         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
132428         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
132429         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
132430         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
132431         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
132432         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
132433         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
132434         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
132435         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
132437 2007-01-27  Bruno Haible  <bruno@clisp.org>
132439         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
132440         check_PROGRAMS into noinst_PROGRAMS.
132441         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
132442         check_PROGRAMS in this case.
132443         (func_import): Set for_test to false.
132444         (func_create_testdir): Set for_test to true.
132446 2007-01-27  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
132447             Bruno Haible  <bruno@clisp.org>
132449         * modules/strcasestr (Files): Remove lib/strcasestr.h.
132450         (Depends-on): Add string.
132451         (Includes): Use <string.h> instead of strcasestr.h.
132452         * modules/string (Makefile.am): Also substitute the value of
132453         REPLACE_STRCASESTR.
132454         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
132455         assume strcasestr is declared in <string.h> not <strings.h>. Also
132456         set REPLACE_STRCASESTR.
132457         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
132458         REPLACE_STRCASESTR.
132459         * lib/strcasestr.h: Remove file.
132460         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
132461         * lib/string_.h (strcasestr): New declaration.
132463 2007-01-27  Bruno Haible  <bruno@clisp.org>
132465         * lib/string_.h: Use 'extern'.
132467 2007-01-27  Jim Meyering  <jim@meyering.net>
132469         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
132470         of set-but-not-used local, "q".
132472         * lib/mempcpy.c: Include <config.h> before <string.h>.
132473         This fixes a compilation error on HP-UX, due to the system's
132474         "restrict"-using mempcpy prototype.
132476 2007-01-26  Bruno Haible  <bruno@clisp.org>
132478         Small optimization.
132479         * lib/javacomp.c: Include c-strstr.h.
132480          (is_envjavac_gcj): Use c_strstr instead of strstr.
132481         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
132483 2007-01-26  Bruno Haible  <bruno@clisp.org>
132485         * MODULES.html.sh (Unicode string functions): Add the new modules.
132487         * modules/uniconv/u32-strconv-to-locale: New file.
132488         * lib/uniconv/u32-strconv-to-locale.c: New file.
132490         * modules/uniconv/u16-strconv-to-locale: New file.
132491         * lib/uniconv/u16-strconv-to-locale.c: New file.
132493         * modules/uniconv/u8-strconv-to-locale: New file.
132494         * lib/uniconv/u8-strconv-to-locale.c: New file.
132496         * modules/uniconv/u32-strconv-from-locale: New file.
132497         * lib/uniconv/u32-strconv-from-locale.c: New file.
132499         * modules/uniconv/u16-strconv-from-locale: New file.
132500         * lib/uniconv/u16-strconv-from-locale.c: New file.
132502         * modules/uniconv/u8-strconv-from-locale: New file.
132503         * lib/uniconv/u8-strconv-from-locale.c: New file.
132505         * modules/uniconv/u32-strconv-to-enc: New file.
132506         * lib/uniconv/u32-strconv-to-enc.c: New file.
132507         * modules/uniconv/u32-strconv-to-enc-tests: New file.
132508         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
132510         * modules/uniconv/u16-strconv-to-enc: New file.
132511         * lib/uniconv/u16-strconv-to-enc.c: New file.
132512         * lib/uniconv/u-strconv-to-enc.h: New file.
132513         * modules/uniconv/u16-strconv-to-enc-tests: New file.
132514         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
132516         * modules/uniconv/u8-strconv-to-enc: New file.
132517         * lib/uniconv/u8-strconv-to-enc.c: New file.
132518         * modules/uniconv/u8-strconv-to-enc-tests: New file.
132519         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
132521         * modules/uniconv/u32-strconv-from-enc: New file.
132522         * lib/uniconv/u32-strconv-from-enc.c: New file.
132523         * modules/uniconv/u32-strconv-from-enc-tests: New file.
132524         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
132526         * modules/uniconv/u16-strconv-from-enc: New file.
132527         * lib/uniconv/u16-strconv-from-enc.c: New file.
132528         * modules/uniconv/u16-strconv-from-enc-tests: New file.
132529         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
132531         * modules/uniconv/u8-strconv-from-enc: New file.
132532         * lib/uniconv/u8-strconv-from-enc.c: New file.
132533         * lib/uniconv/u-strconv-from-enc.h: New file.
132534         * modules/uniconv/u8-strconv-from-enc-tests: New file.
132535         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
132537         * modules/uniconv/u32-conv-from-enc: New file.
132538         * lib/uniconv/u32-conv-from-enc.c: New file.
132539         * modules/uniconv/u32-conv-from-enc-tests: New file.
132540         * tests/uniconv/test-u32-conv-from-enc.c: New file.
132542         * modules/uniconv/u16-conv-from-enc: New file.
132543         * lib/uniconv/u16-conv-from-enc.c: New file.
132544         * lib/uniconv/u-conv-from-enc.h: New file.
132545         * modules/uniconv/u16-conv-from-enc-tests: New file.
132546         * tests/uniconv/test-u16-conv-from-enc.c: New file.
132548         * modules/uniconv/u8-conv-from-enc: New file.
132549         * lib/uniconv/u8-conv-from-enc.c: New file.
132550         * modules/uniconv/u8-conv-from-enc-tests: New file.
132551         * tests/uniconv/test-u8-conv-from-enc.c: New file.
132553         * modules/uniconv/base: New file.
132554         * lib/uniconv.h: New file.
132556 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
132558         * doc/gnulib-tool.texi (Initial import): Update to match current
132559         behavior with strdup module.
132560         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
132561         * lib/memmem.h: Remove; all uses removed.  This is now done
132562         by <string.h>.
132563         * lib/mempcpy.h: Likewise.
132564         * lib/memrchr.h: Likewise.
132565         * lib/stpcpy.h: Likewise.
132566         * lib/stpncpy.h: Likewise.
132567         * lib/strcase.h: Likewise.
132568         * lib/strchrnul.h: Likewise.
132569         * lib/strdup.h: Likewise.
132570         * lib/strndup.h: Likewise.
132571         * lib/strnlen.h: Likewise.
132572         * lib/strpbrk.h: Likewise.
132573         * lib/strsep.h: Likewise.
132574         * lib/strstr.h: Likewise.
132575         * lib/strtok_r.h: Likewise.
132576         * lib/string_.h: New file.
132577         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
132578         Rely on <string.h> instead.
132579         * lib/canon-host.c: Likewise.
132580         * lib/chdir-long.c: Likewise.
132581         * lib/concatpath.c: Likewise.
132582         * lib/exclude.c: Likewise.
132583         * lib/fchdir.c: Likewise.
132584         * lib/getaddrinfo.c: Likewise.
132585         * lib/getcwd.c: Likewise.
132586         * lib/getsubopt.c: Likewise.
132587         * lib/glob.c: Likewise.
132588         * lib/hard-locale.c: Likewise.
132589         * lib/iconvme.c: Likewise.
132590         * lib/javacomp.c: Likewise.
132591         * lib/mempcpy.c: Likewise.
132592         * lib/memrchr.c: Likewise.
132593         * lib/regex_internal.h: Likewise.
132594         * lib/stpncpy.c: Likewise.
132595         * lib/strcasecmp.c: Likewise.
132596         * lib/strchrnul.c: Likewise.
132597         * lib/strdup.c: Likewise.
132598         * lib/striconv.c: Likewise.
132599         * lib/striconveh.c: Likewise.
132600         * lib/striconveha.c: Likewise.
132601         * lib/strncasecmp.c: Likewise.
132602         * lib/strndup.c: Likewise.
132603         * lib/strnlen.c: Likewise.
132604         * lib/strsep.c: Likewise.
132605         * lib/strstr.c: Likewise.
132606         * lib/strtok_r.c: Likewise.
132607         * lib/userspec.c: Likewise.
132608         * lib/w32spawn.h: Likewise.
132609         * lib/xstrndup.c: Likewise.
132610         * lib/mountlist.c (strstr): Remove decl.
132611         * m4/string_h.m4: New file.
132612         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
132613         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
132614         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
132615         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
132616         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
132617         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
132618         Set REPLACE_STRCASECMP if necessary.
132619         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
132620         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
132621         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
132622         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
132623         HAVE_DECL_STRDUP if necessary.
132624         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
132625         since gl_FUNC_STRNDUP does that now.
132626         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
132627         Check for decl here...
132628         (gl_PREREQ_STRNLEN): ... not here.
132629         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
132630         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
132631         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
132632         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
132633         necessary.
132634         * modules/string: New file.
132635         * modules/memmem (Files): Remove special-purpose include file.
132636         (Depends-on): Add string.
132637         (Include): Include <string.h>, not the removed file.
132638         * modules/mempcpy: Likewise.
132639         * modules/memrchr: Likewise.
132640         * modules/stpcpy: Likewise.
132641         * modules/stpncpy: Likewise.
132642         * modules/strcase: Likewise.
132643         * modules/strchrnul: Likewise.
132644         * modules/strdup: Likewise.
132645         * modules/strndup: Likewise.
132646         * modules/strnlen: Likewise.
132647         * modules/strpbrk: Likewise.
132648         * modules/strsep: Likewise.
132649         * modules/strstr: Likewise.
132650         * modules/strtok_r: Likewise.
132651         * tests/test-dirname.c: Don't include "strdup.h", since
132652         <string.h> now suffices.
132653         * tests/test-memmem.c: Don't include "memmem.h", since
132654         <string.h> now suffices.
132656 2007-01-25  Bruno Haible  <bruno@clisp.org>
132658         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
132659         *resultp is 0.
132661         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
132662         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
132663         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
132664         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
132666         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
132667         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
132668         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
132669         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
132670         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
132671         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
132673 2007-01-24  Bruno Haible  <bruno@clisp.org>
132675         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
132676         <http://lists.gnu.org/r/bug-gnulib/2006-10/msg00279.html>.
132677         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
132678         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
132679         gl_FUNC_FTS_CORE.
132680         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
132681         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
132682         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
132683         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
132684         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
132685         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
132686         gl_FUNC_FCHOWNAT.
132687         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
132688         gl_FUNC_STRFTIME.
132689         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
132690         Reported by Ralf Wildenhues.
132692 2007-01-24  Bruno Haible  <bruno@clisp.org>
132694         Drop AC_REQUIRE calls that are redundant with the module dependencies.
132695         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
132696         gl_GETADDRINFO.
132697         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
132698         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
132699         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
132701 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
132703         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
132704         Don't use 'exit'; just return from 'main'.
132705         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
132707         * lib/fnmatch_.h: Readjust white space and comments to match
132708         glibc, to avoid spurious diffs.
132710 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
132712         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
132713         2004-12-01 change by Jakub Jelinek, since this code won't compile
132714         if !LIBC.  Problem reported by Bob Proulx.
132716 2007-01-23  Bruno Haible  <bruno@clisp.org>
132718         * lib/striconveh.c: Include c-strcaseeq.h.
132719         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
132720         * modules/striconveh (Depends-on): Add c-strcaseeq.
132722 2007-01-23  Bruno Haible  <bruno@clisp.org>
132724         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
132726         * modules/c-strcaseeq: New file.
132727         * lib/c-strcaseeq.h: New file.
132729         * modules/streq: New file.
132730         * lib/streq.h: New file.
132732 2007-01-23  Bruno Haible  <bruno@clisp.org>
132734         * modules/striconveha-tests: New file.
132735         * tests/test-striconveha.c: New file.
132737         * lib/striconveha.h: Include <stdbool.h>.
132738         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
132739         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
132740         (mem_iconveha_notranslit): Renamed from mem_iconveha.
132741         (mem_iconveha): New function.
132742         (str_iconveha_notranslit): Renamed from str_iconveha.
132743         (str_iconveha): New function.
132744         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
132745         c-strcase.
132747 2007-01-23  Bruno Haible  <bruno@clisp.org>
132749         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
132750         encodings without forgiving before trying any encoding with handler.
132751         (str_iconveha): Try all encodings without forgiving before trying any
132752         encoding with handler.
132754 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
132756         Import the following changes from libc.
132758         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
132760         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
132762         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
132764         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
132765         normal_bracket label.
132767         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
132769         [BZ #361]
132770         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
132771         to normal_bracket after fetching the next character.
132773 2007-01-22  Bruno Haible  <bruno@clisp.org>
132775         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
132776         argument.
132777         * lib/striconveh.c (iconv_carefully_1): New function.
132778         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
132779         argument.
132780         (str_cd_iconveh): Update.
132781         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
132782         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
132783         * tests/test-striconveh.c (MAGIC): New macro.
132784         (new_offsets): New function.
132785         (main): Test call with and without offsets.
132787 2007-01-22  Bruno Haible  <bruno@clisp.org>
132789         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
132790         * modules/sys_select (Makefile.am): Likewise.
132791         * modules/sys_socket (Makefile.am): Likewise.
132792         * modules/sys_time (Makefile.am): Likewise.
132794 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
132796         * modules/gettimeofday (License): Change from GPL to LGPL, since
132797         gettimeofday is a library function.
132799 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
132801         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
132803 2007-01-21  Bruno Haible  <bruno@clisp.org>
132805         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
132807 2007-01-21  Bruno Haible  <bruno@clisp.org>
132809         * modules/striconveha: New file.
132810         * lib/striconveha.h: New file.
132811         * lib/striconveha.c: New file.
132812         * MODULES.html.sh (Internationalization functions): Add striconveha.
132813         * lib/striconv.c (str_iconv): Optimize the case of an empty input
132814         string.
132815         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
132817 2007-01-21  Bruno Haible  <bruno@clisp.org>
132819         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
132820         * lib/striconveh.c (str_iconveh): Likewise.
132822 2007-01-21  Bruno Haible  <bruno@clisp.org>
132824         * lib/striconveh.h (mem_iconveh): New declaration.
132825         * lib/striconveh.c (mem_iconveh): New function.
132826         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
132828 2007-01-21  Bruno Haible  <bruno@clisp.org>
132830         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
132832         * lib/striconveh.h (mem_cd_iconveh): Change specification.
132833         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
132834         original result buffer.
132835         (str_cd_iconveh): Update.
132836         * tests/test-striconveh.c (main): Update.
132838         * lib/striconv.h (mem_cd_iconv): Change specification.
132839         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
132840         result buffer.
132841         (str_cd_iconv): Update.
132842         * tests/test-striconv.c (main): Update.
132844 2007-01-21  Bruno Haible  <bruno@clisp.org>
132846         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
132848 2007-01-20  Jim Meyering  <jim@meyering.net>
132850         * lib/userspec.c (parse_with_separator): If a user or group string
132851         starts with "+", skip the corresponding name-to-ID look-up, since
132852         such a look-up must fail: user and group names may not include "+".
132854 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
132856         * lib/poll.c: Include sys/time.h and time.h unconditionally,
132857         since we now assume the sys_time module.
132858         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
132859         check for sys/time.h; no longer needed.
132860         * modules/poll (Depends-on): Depend on sys_time.
132862 2007-01-18  Bruno Haible  <bruno@clisp.org>
132864         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
132865         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
132867         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
132868         gettimeofday.
132870         * tests/test-gettimeofday.c: Include <time.h>.
132871         (dummy): Remove variable.
132873         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
132874         gl_HEADER_SYS_TIME_H.
132875         (gl_HEADER_SYS_TIME_H): New macro.
132877         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
132878         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
132879         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
132880         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
132881         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
132882         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
132883         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
132884         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
132885         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
132886         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
132887         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
132889         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
132890         last change; it caused a compilation error when cross-compiling to
132891         Cygwin.
132893 2007-01-18  Jim Meyering  <jim@meyering.net>
132895         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
132896         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
132897         than the race-prone "test -d sys || mkdir sys".
132898         (configure.ac): Use AC_PROG_MKDIR_P.
132899         * modules/sys_select: Likewise.
132900         * modules/sys_socket: Likewise.
132901         * modules/sys_time: Likewise.
132903 2007-01-18  Eric Blake  <ebb9@byu.net>
132905         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
132906         replace gettimeofday.
132907         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
132908         name, to avoid infinite recursion.
132910 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
132912         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
132913         module sys_time.
132914         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
132915         assume timespec.h defines struct timeval.
132916         * lib/settime.c: Likewise.
132917         * lib/utimens.c: Likewise.
132918         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
132919         since we now assume the gettimeofday module.
132920         * lib/tempname.c (__gen_tempname): Likewise.
132921         * lib/gettimeofday.h: Remove.
132922         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
132923         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
132924         Include <time.h>, for 'time()'.
132925         (localtime_buffer_addr): Also use this workaround if
132926         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
132927         to simplify the uses.  All uses changed.
132928         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
132929         that #undef is inside {}, and 'const' follows type name consistently.
132930         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
132931         (gettimeofday): Do not use the maximum possible value for
132932         tv->tv_usec, since that might break usages other than ls.c.
132933         Instead, we'll leave ls.c alone.  This undoes today's patch
132934         by Bruno.  Add a compile-time warning for 1s-clock resolution;
132935         we've never observed the problem but might as well keep the
132936         canary.
132937         * lib/nanosleep.c: Include timespec.h first, for interface check.
132938         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
132939         now assume the sys_time module.
132940         * lib/tempname.c: Likewise.
132941         * lib/timespec.h: Likewise.
132942         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
132943         needed.
132944         * lib/strftime.c: Likewise.
132945         * lib/timespec.h: Likewise.
132946         * lib/posixtm.c: Include posixtm.h first, for interface check.
132947         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
132948         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
132949         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
132950         * lib/sys_time_.h: New file.
132951         * lib/timespec.h (struct timespec): Use long int, not long.
132952         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
132953         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
132954         Remove obsolescent call to AC_HEADER_TIME.
132955         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
132956         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
132957         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
132958         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
132959         Likewise.
132960         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
132961         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
132962         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
132963         into the sys_time module.  Check for gettimeofday just once.
132964         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
132965         for gettimeofday signature to just check the signature.  Merely
132966         compile it, since linking doesn't test signature.  Improve test for
132967         whether gettimeofday.o is actually needed.
132968         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
132969         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
132970         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
132971         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
132972         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
132973         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
132974         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
132975         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
132976         than worrying about sys/time.h.
132977         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
132978         Don't bother worrying about TIME_WITH_SYS_TIME.
132979         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
132980         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
132981         * m4/sys_time_h.m4: New file.
132982         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
132983         Don't include sys/time.h.  Return from main rather than exiting.
132984         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
132985         all uses changed.
132986         * modules/gethrxtime (Depends-on): Add sys_time.
132987         * modules/gettime (Depends-on): Likewise.
132988         * modules/gettimeofday (Depends-on): Likewise.
132989         * modules/nanosleep (Depends-on): Likewise.
132990         * modules/settime (Depends-on): Likewise.
132991         * modules/tempname (Depends-on): Likewise.
132992         * modules/utimens (Depends-on): Likewise.
132993         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
132994         (Include): Change back to <sys/time.h>.
132995         (Maintainer): Add self.
132996         * modules/sys_time: New file.
132997         * modules/tempname (Depends-on): Add gettimeofday.
132998         * tests/test-gettimeofday.c: Include <sys/time.h>
132999         rather than gettimeofday.h.
133001 2007-01-17  Bruno Haible  <bruno@clisp.org>
133003         * gnulib-tool (func_get_license): Revert last patch. Instead, let
133004         the license default to GPL.
133005         (func_create_testdir): Don't complain if a module is LGPL and its
133006         tests module depends on GPLed modules.
133008 2007-01-17  Bruno Haible  <bruno@clisp.org>
133010         * lib/gettimeofday.c (gettimeofday): Add code for the case
133011         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
133012         maximum possible value for tv->tv_usec, rather than the minimum one.
133014 2005-10-08  Martin Lambers  <marlam@marlam.de>
133015 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
133016 2007-01-16  Bruno Haible  <bruno@clisp.org>
133018         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
133019         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
133020         gl_FUNC_GETTIMEOFDAY.
133021         (Include): Add gettimeofday.h.
133022         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
133023         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
133024         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
133025         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
133026         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
133027         * lib/gettimeofday.h: New file.
133028         * lib/gettimeofday.c: Include <sys/timeb.h>.
133029         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
133030         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
133031         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
133032         fall back on time().
133034         * tests/test-gettimeofday.c: New file.
133035         * modules/gettimeofday-tests: New file.
133037 2007-01-16  Eric Blake  <ebb9@byu.net>
133039         * modules/fnmatch (Depends-on): Depend on wchar.
133040         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
133041         * m4/fnmatch.m4: Likewise.
133042         * modules/mbchar (Makefile.am): Assume <wchar.h>.
133043         * m4/mbchar.m4: Likewise.
133044         * modules/mbswidth (Depends-on): Depend on wchar.
133045         * lib/mbswidth.c: Assume <wchar.h>.
133046         * m4/mbswidth.m4: Likewise.
133047         * modules/quotearg (Depends-on): Depend on wchar.
133048         * lib/quotearg.c: Assume <wchar.h>.
133049         * m4/quotearg.m4: Likewise.
133050         * modules/regex (Depends-on): Depend on wchar.
133051         * lib/regex_internal.h: Assume <wchar.h>.
133052         * m4/regex.m4: Likewise.
133053         * modules/stdint (Depends-on): Depend on wchar.
133054         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
133055         * m4/stdint.m4: Likewise.
133056         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
133057         * modules/strftime (Depends-on): Depend on wchar.
133058         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
133059         * modules/strtol (Depends-on): Depend on wchar.
133060         * lib/strtol.c: Assume <wchar.h>.
133061         * modules/wcwidth (Depends-on): Depend on wchar.
133062         * lib/wcwidth.h: Assume <wchar.h>.
133063         * m4/wcwidth.m4: Likewise.
133065 2007-01-16  Bruno Haible  <bruno@clisp.org>
133067         * modules/csharpexec-script: New, created from...
133068         * modules/csharpexec: ... this.
133070 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
133072         * modules/javaexec-script: New, created from...
133073         * modules/javaexec: ... this.
133075 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
133077         * modules/poll (Dependencies): Add sys_select.
133079 2007-01-15  Jim Meyering  <jim@meyering.net>
133081         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
133082         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
133083         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
133084         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
133086 2007-01-15  Bruno Haible  <bruno@clisp.org>
133088         * modules/striconveh: New file.
133089         * lib/striconveh.h: New file.
133090         * lib/striconveh.c: New file.
133091         * MODULES.html.sh (Internationalization functions): Add striconveh.
133093         * modules/striconveh-tests: New file.
133094         * tests/test-striconveh.c: New file.
133096 2007-01-15  Bruno Haible  <bruno@clisp.org>
133098         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
133099         not from GNU libiconv or GNU libc.
133101 2007-01-15  Bruno Haible  <bruno@clisp.org>
133103         * doc/gnulib-intro.texi (Copyright): Explain the different license
133104         terms for module descriptions, autoconf macros, tests, documentation.
133106 2007-01-14  Bruno Haible  <bruno@clisp.org>
133108         * modules/striconv-tests: New file.
133109         * tests/test-striconv.c: New file.
133111 2007-01-14  Bruno Haible  <bruno@clisp.org>
133113         * modules/iconv-tests: New file.
133114         * tests/test-iconv.c: New file.
133116 2007-01-14  Bruno Haible  <bruno@clisp.org>
133118         * gnulib-tool (func_get_license): For test modules, use the license of
133119         the main module.
133121 2007-01-14  Bruno Haible  <bruno@clisp.org>
133123         * modules/iconv (Include): Clarify that <iconv.h> can only be included
133124         if iconv is found to exist.
133126 2007-01-14  Bruno Haible  <bruno@clisp.org>
133128         * modules/c-ctype-tests: New file.
133129         * tests/test-c-ctype.c: New file.
133131 2007-01-14  Bruno Haible  <bruno@clisp.org>
133133         * modules/binary-io-tests: New file.
133134         * tests/test-binary-io.sh: New file.
133135         * tests/test-binary-io.c: New file.
133137 2007-01-14  Bruno Haible  <bruno@clisp.org>
133139         * modules/array-oset-tests: New file.
133140         * tests/test-array_oset.c: New file.
133142 2007-01-14  Bruno Haible  <bruno@clisp.org>
133144         * modules/array-list-tests: New file.
133145         * tests/test-array_list.c: New file.
133147 2007-01-14  Bruno Haible  <bruno@clisp.org>
133149         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
133150         and make.
133151         Reported by Simon Josefsson in
133152         <http://lists.gnu.org/r/bug-gnulib/2007-01/msg00139.html>
133154 2007-01-14  Bruno Haible  <bruno@clisp.org>
133156         * modules/allocsa-tests: New file.
133157         * tests/test-allocsa.c: New file.
133159 2007-01-14  Bruno Haible  <bruno@clisp.org>
133161         * modules/fchdir (Depends-on): Add absolute-header.
133162         * modules/unistd (Depends-on): Likewise.
133164 2006-12-30  Bruno Haible  <bruno@clisp.org>
133166         * modules/fchdir: New file.
133167         * modules/unistd (Files): Add lib/unistd_.h.
133168         (Makefile.am): Generate unistd.h from unistd_.h.
133169         * lib/fchdir.c: New file.
133170         * lib/dirent_.h: New file.
133171         * lib/unistd_.h: New file.
133172         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
133173         * m4/fchdir.m4: New file.
133174         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
133175         (gl_HEADER_UNISTD): Invoke it.
133176         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
133177         function.
133178         * lib/backupfile.c (opendir, closedir): Undefine.
133179         * lib/chown.c (open, close): Undefine.
133180         * lib/clean-temp.c (open, close): Undefine.
133181         * lib/copy-file.c (open, close): Undefine.
133182         * lib/execute.c (open, close): Undefine.
133183         * lib/fsusage.c (open, close): Undefine.
133184         * lib/gc-gnulib.c (open, close): Undefine.
133185         * lib/getcwd.c (opendir, closedir): Undefine.
133186         * lib/glob.c (opendir, closedir): Undefine.
133187         * lib/javacomp.c (open, close): Undefine.
133188         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
133189         * lib/openat-proc.c (open, close): Undefine.
133190         * lib/pagealign_alloc.c (open, close): Undefine.
133191         * lib/pipe.c (open, close): Undefine.
133192         * lib/progreloc.c (open, close): Undefine.
133193         * lib/savedir.c (opendir, closedir): Undefine.
133194         * lib/utime.c (open, close): Undefine.
133195         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
133197 2007-01-10  Bruno Haible  <bruno@clisp.org>
133199         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
133201 2007-01-12  Eric Blake  <ebb9@byu.net>
133203         Provide a robust <wchar.h>.  Further simplifications are now
133204         possible in other modules, but not included here.
133205         * modules/wchar: New module.
133206         * m4/wchar.m4: New file.
133207         * lib/wchar_.h: Likewise.
133208         * modules/mbchar (Depends-on): Depend on wchar, as the first use
133209         of the new module.
133210         * MODULES.html.sh (Extended multibyte and wide character utilities):
133211         New section.
133213 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
133215         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
133216         to a reasonable default for memory allocation.
133217         (xreadlink): Don't allocate a huge buffer, to work around a buggy
133218         file system that reports garbage st_size values for symlinks.
133219         Problem reported by Liyang Hu.
133221 2007-01-11  Simon Josefsson  <simon@josefsson.org>
133223         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
133224         Emacs .#* auto-save files).
133226 2007-01-11  Bruno Haible  <bruno@clisp.org>
133228         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
133229         directory.
133231 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
133233         Use @...@ consistently in lib/wctype_.h.
133234         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
133235         on it being set to 1 or 0.
133236         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
133237         go back to AC_SUBSTing it.
133238         * modules/wctype (Makefile.am): Undo previous change.
133240 2007-01-10  Eric Blake  <ebb9@byu.net>
133242         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
133243         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
133244         * modules/wctype (Makefile.am): Likewise.
133245         Reported by Chris McGuire.
133247 2007-01-10  Jim Meyering  <jim@meyering.net>
133249         fts.c: a small readability/maintainability improvement
133250         * lib/fts.c (fts_read): Make this code slightly more readable and
133251         maintainable by hoisting the "sp->fts_cur = p" assignments to
133252         immediately follow the statements that set P.  Derived from
133253         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
133255 2007-01-10  Eric Blake  <ebb9@byu.net>
133257         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
133258         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
133259         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
133260         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
133261         Reported by Chris McGuire.
133263 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
133265         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
133266         in sed script.
133268 2007-01-09  Bruno Haible  <bruno@clisp.org>
133270         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
133271         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
133272         variables.
133273         (func_module): Use them.
133275 2007-01-09  Bruno Haible  <bruno@clisp.org>
133277         * modules/unistr/base: New file.
133278         * lib/unistr.h: New file.
133280         * modules/unistr/u8-to-u16: New file.
133281         * lib/unistr/u8-to-u16.c: New file.
133283         * modules/unistr/u8-to-u32: New file.
133284         * lib/unistr/u8-to-u32.c: New file.
133286         * modules/unistr/u16-to-u8: New file.
133287         * lib/unistr/u16-to-u8.c: New file.
133289         * modules/unistr/u16-to-u32: New file.
133290         * lib/unistr/u16-to-u32.c: New file.
133292         * modules/unistr/u32-to-u8: New file.
133293         * lib/unistr/u32-to-u8.c: New file.
133295         * modules/unistr/u32-to-u16: New file.
133296         * lib/unistr/u32-to-u16.c: New file.
133298         * modules/unistr/u8-check: New file.
133299         * modules/unistr/u16-check: New file.
133300         * modules/unistr/u32-check: New file.
133301         * lib/unistr/u8-check.c: New file.
133302         * lib/unistr/u16-check.c: New file.
133303         * lib/unistr/u32-check.c: New file.
133305         * modules/unistr/u8-chr: New file.
133306         * modules/unistr/u16-chr: New file.
133307         * modules/unistr/u32-chr: New file.
133308         * lib/unistr/u8-chr.c: New file.
133309         * lib/unistr/u16-chr.c: New file.
133310         * lib/unistr/u32-chr.c: New file.
133312         * modules/unistr/u8-cmp: New file.
133313         * modules/unistr/u16-cmp: New file.
133314         * modules/unistr/u32-cmp: New file.
133315         * lib/unistr/u8-cmp.c: New file.
133316         * lib/unistr/u16-cmp.c: New file.
133317         * lib/unistr/u32-cmp.c: New file.
133319         * modules/unistr/u8-cpy: New file.
133320         * modules/unistr/u16-cpy: New file.
133321         * modules/unistr/u32-cpy: New file.
133322         * lib/unistr/u8-cpy.c: New file.
133323         * lib/unistr/u16-cpy.c: New file.
133324         * lib/unistr/u32-cpy.c: New file.
133325         * lib/unistr/u-cpy.h: New file.
133327         * modules/unistr/u8-cpy-alloc: New file.
133328         * modules/unistr/u16-cpy-alloc: New file.
133329         * modules/unistr/u32-cpy-alloc: New file.
133330         * lib/unistr/u8-cpy-alloc.c: New file.
133331         * lib/unistr/u16-cpy-alloc.c: New file.
133332         * lib/unistr/u32-cpy-alloc.c: New file.
133333         * lib/unistr/u-cpy-alloc.h: New file.
133335         * modules/unistr/u8-endswith: New file.
133336         * modules/unistr/u16-endswith: New file.
133337         * modules/unistr/u32-endswith: New file.
133338         * lib/unistr/u8-endswith.c: New file.
133339         * lib/unistr/u16-endswith.c: New file.
133340         * lib/unistr/u32-endswith.c: New file.
133341         * lib/unistr/u-endswith.h: New file.
133343         * modules/unistr/u8-mblen: New file.
133344         * modules/unistr/u16-mblen: New file.
133345         * modules/unistr/u32-mblen: New file.
133346         * lib/unistr/u8-mblen.c: New file.
133347         * lib/unistr/u16-mblen.c: New file.
133348         * lib/unistr/u32-mblen.c: New file.
133350         * modules/unistr/u8-mbtouc: New file.
133351         * modules/unistr/u16-mbtouc: New file.
133352         * modules/unistr/u32-mbtouc: New file.
133353         * lib/unistr/u8-mbtouc.c: New file.
133354         * lib/unistr/u16-mbtouc.c: New file.
133355         * lib/unistr/u32-mbtouc.c: New file.
133357         * modules/unistr/u8-mbtouc-safe: New file.
133358         * modules/unistr/u16-mbtouc-safe: New file.
133359         * modules/unistr/u32-mbtouc-safe: New file.
133360         * lib/unistr/u8-mbtouc-safe.c: New file.
133361         * lib/unistr/u16-mbtouc-safe.c: New file.
133362         * lib/unistr/u32-mbtouc-safe.c: New file.
133364         * modules/unistr/u8-move: New file.
133365         * modules/unistr/u16-move: New file.
133366         * modules/unistr/u32-move: New file.
133367         * lib/unistr/u8-move.c: New file.
133368         * lib/unistr/u16-move.c: New file.
133369         * lib/unistr/u32-move.c: New file.
133370         * lib/unistr/u-move.h: New file.
133372         * modules/unistr/u8-next: New file.
133373         * modules/unistr/u16-next: New file.
133374         * modules/unistr/u32-next: New file.
133375         * lib/unistr/u8-next.c: New file.
133376         * lib/unistr/u16-next.c: New file.
133377         * lib/unistr/u32-next.c: New file.
133379         * modules/unistr/u8-prev: New file.
133380         * modules/unistr/u16-prev: New file.
133381         * modules/unistr/u32-prev: New file.
133382         * lib/unistr/u8-prev.c: New file.
133383         * lib/unistr/u16-prev.c: New file.
133384         * lib/unistr/u32-prev.c: New file.
133386         * modules/unistr/u8-set: New file.
133387         * modules/unistr/u16-set: New file.
133388         * modules/unistr/u32-set: New file.
133389         * lib/unistr/u8-set.c: New file.
133390         * lib/unistr/u16-set.c: New file.
133391         * lib/unistr/u32-set.c: New file.
133392         * lib/unistr/u-set.h: New file.
133394         * modules/unistr/u8-startswith: New file.
133395         * modules/unistr/u16-startswith: New file.
133396         * modules/unistr/u32-startswith: New file.
133397         * lib/unistr/u8-startswith.c: New file.
133398         * lib/unistr/u16-startswith.c: New file.
133399         * lib/unistr/u32-startswith.c: New file.
133400         * lib/unistr/u-startswith.h: New file.
133402         * modules/unistr/u8-stpcpy: New file.
133403         * modules/unistr/u16-stpcpy: New file.
133404         * modules/unistr/u32-stpcpy: New file.
133405         * lib/unistr/u8-stpcpy.c: New file.
133406         * lib/unistr/u16-stpcpy.c: New file.
133407         * lib/unistr/u32-stpcpy.c: New file.
133408         * lib/unistr/u-stpcpy.h: New file.
133410         * modules/unistr/u8-stpncpy: New file.
133411         * modules/unistr/u16-stpncpy: New file.
133412         * modules/unistr/u32-stpncpy: New file.
133413         * lib/unistr/u8-stpncpy.c: New file.
133414         * lib/unistr/u16-stpncpy.c: New file.
133415         * lib/unistr/u32-stpncpy.c: New file.
133416         * lib/unistr/u-stpncpy.h: New file.
133418         * modules/unistr/u8-strcat: New file.
133419         * modules/unistr/u16-strcat: New file.
133420         * modules/unistr/u32-strcat: New file.
133421         * lib/unistr/u8-strcat.c: New file.
133422         * lib/unistr/u16-strcat.c: New file.
133423         * lib/unistr/u32-strcat.c: New file.
133424         * lib/unistr/u-strcat.h: New file.
133426         * modules/unistr/u8-strchr: New file.
133427         * modules/unistr/u16-strchr: New file.
133428         * modules/unistr/u32-strchr: New file.
133429         * lib/unistr/u8-strchr.c: New file.
133430         * lib/unistr/u16-strchr.c: New file.
133431         * lib/unistr/u32-strchr.c: New file.
133433         * modules/unistr/u8-strcmp: New file.
133434         * modules/unistr/u16-strcmp: New file.
133435         * modules/unistr/u32-strcmp: New file.
133436         * lib/unistr/u8-strcmp.c: New file.
133437         * lib/unistr/u16-strcmp.c: New file.
133438         * lib/unistr/u32-strcmp.c: New file.
133440         * modules/unistr/u8-strcpy: New file.
133441         * modules/unistr/u16-strcpy: New file.
133442         * modules/unistr/u32-strcpy: New file.
133443         * lib/unistr/u8-strcpy.c: New file.
133444         * lib/unistr/u16-strcpy.c: New file.
133445         * lib/unistr/u32-strcpy.c: New file.
133446         * lib/unistr/u-strcpy.h: New file.
133448         * modules/unistr/u8-strcspn: New file.
133449         * modules/unistr/u16-strcspn: New file.
133450         * modules/unistr/u32-strcspn: New file.
133451         * lib/unistr/u8-strcspn.c: New file.
133452         * lib/unistr/u16-strcspn.c: New file.
133453         * lib/unistr/u32-strcspn.c: New file.
133454         * lib/unistr/u-strcspn.h: New file.
133456         * modules/unistr/u8-strdup: New file.
133457         * modules/unistr/u16-strdup: New file.
133458         * modules/unistr/u32-strdup: New file.
133459         * lib/unistr/u8-strdup.c: New file.
133460         * lib/unistr/u16-strdup.c: New file.
133461         * lib/unistr/u32-strdup.c: New file.
133462         * lib/unistr/u-strdup.h: New file.
133464         * modules/unistr/u8-strlen: New file.
133465         * modules/unistr/u16-strlen: New file.
133466         * modules/unistr/u32-strlen: New file.
133467         * lib/unistr/u8-strlen.c: New file.
133468         * lib/unistr/u16-strlen.c: New file.
133469         * lib/unistr/u32-strlen.c: New file.
133470         * lib/unistr/u-strlen.h: New file.
133472         * modules/unistr/u8-strmblen: New file.
133473         * modules/unistr/u16-strmblen: New file.
133474         * modules/unistr/u32-strmblen: New file.
133475         * lib/unistr/u8-strmblen.c: New file.
133476         * lib/unistr/u16-strmblen.c: New file.
133477         * lib/unistr/u32-strmblen.c: New file.
133479         * modules/unistr/u8-strmbtouc: New file.
133480         * modules/unistr/u16-strmbtouc: New file.
133481         * modules/unistr/u32-strmbtouc: New file.
133482         * lib/unistr/u8-strmbtouc.c: New file.
133483         * lib/unistr/u16-strmbtouc.c: New file.
133484         * lib/unistr/u32-strmbtouc.c: New file.
133486         * modules/unistr/u8-strncat: New file.
133487         * modules/unistr/u16-strncat: New file.
133488         * modules/unistr/u32-strncat: New file.
133489         * lib/unistr/u8-strncat.c: New file.
133490         * lib/unistr/u16-strncat.c: New file.
133491         * lib/unistr/u32-strncat.c: New file.
133492         * lib/unistr/u-strncat.h: New file.
133494         * modules/unistr/u8-strncmp: New file.
133495         * modules/unistr/u16-strncmp: New file.
133496         * modules/unistr/u32-strncmp: New file.
133497         * lib/unistr/u8-strncmp.c: New file.
133498         * lib/unistr/u16-strncmp.c: New file.
133499         * lib/unistr/u32-strncmp.c: New file.
133501         * modules/unistr/u8-strncpy: New file.
133502         * modules/unistr/u16-strncpy: New file.
133503         * modules/unistr/u32-strncpy: New file.
133504         * lib/unistr/u8-strncpy.c: New file.
133505         * lib/unistr/u16-strncpy.c: New file.
133506         * lib/unistr/u32-strncpy.c: New file.
133507         * lib/unistr/u-strncpy.h: New file.
133509         * modules/unistr/u8-strnlen: New file.
133510         * modules/unistr/u16-strnlen: New file.
133511         * modules/unistr/u32-strnlen: New file.
133512         * lib/unistr/u8-strnlen.c: New file.
133513         * lib/unistr/u16-strnlen.c: New file.
133514         * lib/unistr/u32-strnlen.c: New file.
133515         * lib/unistr/u-strnlen.h: New file.
133517         * modules/unistr/u8-strpbrk: New file.
133518         * modules/unistr/u16-strpbrk: New file.
133519         * modules/unistr/u32-strpbrk: New file.
133520         * lib/unistr/u8-strpbrk.c: New file.
133521         * lib/unistr/u16-strpbrk.c: New file.
133522         * lib/unistr/u32-strpbrk.c: New file.
133523         * lib/unistr/u-strpbrk.h: New file.
133525         * modules/unistr/u8-strrchr: New file.
133526         * modules/unistr/u16-strrchr: New file.
133527         * modules/unistr/u32-strrchr: New file.
133528         * lib/unistr/u8-strrchr.c: New file.
133529         * lib/unistr/u16-strrchr.c: New file.
133530         * lib/unistr/u32-strrchr.c: New file.
133532         * modules/unistr/u8-strspn: New file.
133533         * modules/unistr/u16-strspn: New file.
133534         * modules/unistr/u32-strspn: New file.
133535         * lib/unistr/u8-strspn.c: New file.
133536         * lib/unistr/u16-strspn.c: New file.
133537         * lib/unistr/u32-strspn.c: New file.
133538         * lib/unistr/u-strspn.h: New file.
133540         * modules/unistr/u8-strstr: New file.
133541         * modules/unistr/u16-strstr: New file.
133542         * modules/unistr/u32-strstr: New file.
133543         * lib/unistr/u8-strstr.c: New file.
133544         * lib/unistr/u16-strstr.c: New file.
133545         * lib/unistr/u32-strstr.c: New file.
133546         * lib/unistr/u-strstr.h: New file.
133548         * modules/unistr/u8-strtok: New file.
133549         * modules/unistr/u16-strtok: New file.
133550         * modules/unistr/u32-strtok: New file.
133551         * lib/unistr/u8-strtok.c: New file.
133552         * lib/unistr/u16-strtok.c: New file.
133553         * lib/unistr/u32-strtok.c: New file.
133554         * lib/unistr/u-strtok.h: New file.
133556         * modules/unistr/u8-uctomb: New file.
133557         * modules/unistr/u16-uctomb: New file.
133558         * modules/unistr/u32-uctomb: New file.
133559         * lib/unistr/u8-uctomb.c: New file.
133560         * lib/unistr/u16-uctomb.c: New file.
133561         * lib/unistr/u32-uctomb.c: New file.
133563         * MODULES.html.sh (Unicode string functions): Add the new modules.
133565 2007-01-08  Bruno Haible  <bruno@clisp.org>
133567         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
133568         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
133569         subdirectories.
133571 2007-01-08  Karl Berry  <karl@gnu.org>
133573         * doc/error.texi: mention that main() fns must set program_name
133574         when progname is used.
133576 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
133578         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
133579         WCTYPE_H is empty, for the benefit of builds from non-distclean
133580         directories.  Problem reported by Eric Blake in
133581         <http://lists.gnu.org/r/bug-gnulib/2007-01/msg00157.html>.
133583 2007-01-08  Bruno Haible  <bruno@clisp.org>
133585         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
133586         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
133587         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
133588         PROVIDE_CANONICALIZE_FILENAME_MODE.
133589         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
133591 2007-01-08  Bruno Haible  <bruno@clisp.org>
133593         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
133594         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
133595         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
133596         * lib/fts.c: Likewise.
133597         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
133599 2006-12-25  Bruno Haible  <bruno@clisp.org>
133601         * modules/utf8-ucs4-safe: New file.
133602         * lib/utf8-ucs4-safe.h: New file.
133603         * lib/unistr/utf8-ucs4-safe.c: New file.
133605         * modules/utf16-ucs4-safe: New file.
133606         * lib/utf16-ucs4-safe.h: New file.
133607         * lib/unistr/utf16-ucs4-safe.c: New file.
133609         * MODULES.html.sh (Unicode string functions): Add the new modules.
133611 2007-01-08  Bruno Haible  <bruno@clisp.org>
133613         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
133614         (Depends-on): Add unitypes.
133615         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
133616         (u8_mbtouc_aux): Move out to separate file.
133617         (u8_mbtouc): Use ucs4_t, uint8_t types.
133618         * lib/unistr/utf8-ucs4.c: New file.
133620         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
133621         (Depends-on): Add unitypes.
133622         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
133623         (u16_mbtouc_aux): Move out to separate file.
133624         (u16_mbtouc): Use ucs4_t, uint16_t types.
133625         * lib/unistr/utf16-ucs4.c: New file.
133627         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
133628         (Depends-on): Add unitypes.
133629         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
133630         (u8_uctomb_aux): Move out to separate file.
133631         (u8_uctomb): Use ucs4_t, uint8_t types.
133632         * lib/unistr/ucs4-utf8.c: New file.
133634         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
133635         (Depends-on): Add unitypes.
133636         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
133637         (u16_uctomb_aux): Move out to separate file.
133638         (u16_uctomb): Use ucs4_t, uint16_t types.
133639         * lib/unistr/ucs4-utf16.c: New file.
133641 2006-12-25  Bruno Haible  <bruno@clisp.org>
133643         * modules/unitypes: New file.
133644         * lib/unitypes.h: New file.
133645         * MODULES.html.sh (func_all_modules): New section "Unicode string
133646         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
133647         this section. Add unitypes.
133649 2007-01-08  Bruno Haible  <bruno@clisp.org>
133651         Avoid variable names that conflict with those from libtool.
133652         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
133653         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
133654         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
133655         library_names_spec to acl_library_names_spec, hardcode_* to
133656         acl_hardcode_*.
133657         Reported by Ralf Wildenhues.
133659 2007-01-08  Bruno Haible  <bruno@clisp.org>
133661         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
133662         definition.
133663         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
133664         definition.
133665         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
133666         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
133667         definition.
133668         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
133669         definition.
133670         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
133671         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
133672         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
133673         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
133674         definition.
133675         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
133676         definition.
133677         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
133678         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
133679         GC_USE_<algorithm>.
133680         * lib/gc-libgcrypt.c: Likewise.
133681         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
133682         * modules/gc-arctwo (configure.ac): Likewise.
133683         * modules/gc-des (configure.ac): Likewise.
133684         * modules/gc-hmac-md5 (configure.ac): Likewise.
133685         * modules/gc-hmac-sha1 (configure.ac): Likewise.
133686         * modules/gc-md2 (configure.ac): Likewise.
133687         * modules/gc-md4 (configure.ac): Likewise.
133688         * modules/gc-md5 (configure.ac): Likewise.
133689         * modules/gc-random (configure.ac): Likewise.
133690         * modules/gc-rijndael (configure.ac): Likewise.
133691         * modules/gc-sha1 (configure.ac): Likewise.
133693 2007-01-08  Bruno Haible  <bruno@clisp.org>
133695         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
133696         macro definition.
133697         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
133698         definition.
133699         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
133700         definition.
133701         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
133702         * modules/fcntl-safer (configure.ac): Likewise.
133703         * modules/fopen-safer (configure.ac): Likewise.
133704         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
133705         GNULIB_FWRITEERROR macro definition.
133707 2007-01-08  Bruno Haible  <bruno@clisp.org>
133709         * m4/gnulib-common.m4: New file.
133710         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
133711         (func_get_filelist): Add m4/gnulib-common.m4.
133713 2007-01-08  Bruno Haible  <bruno@clisp.org>
133715         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
133716         command.
133718 2007-01-08  Jim Meyering  <jim@meyering.net>
133720         Use a more robust test for a "can't happen" condition.
133721         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
133722         narrowed the st_size value.  Presuming the "can't happen" condition
133723         is true, that narrowing could conceivably convert an invalid st_size
133724         value into a valid one.  Instead, use a change based on Matthew
133725         Woehlke's original patch.
133727         Slight readability improvement: use an assert-like macro
133728         in place of literal "abort ()" uses.
133729         * lib/fts.c (fts_assert): Define.
133730         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
133731         Use this macro instead of a bare 'abort'.
133733 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
133735         Don't worry about using IRIX 5.3's wctype.h broken definitions;
133736         simply work around them.
133737         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
133738         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
133739         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
133740         declaring.
133741         Don't bother to define as macros, since the standard doesn't require it.
133742         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
133743         longer worry about IRIX 5.3.
133744         (HAVE_WCTYPE_CTMP_BUG): Remove.
133746 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
133748         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
133749         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
133750         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
133751         Problems reported by Georg Schwarz for IRIX 5.3.
133753         * gnulib-tool (autoconf_minversion): Take the maximum version number
133754         found, not the minimum.  Problem reported by James Youngman.
133756 2007-01-03  Karl Berry  <karl@gnu.org>
133758         * doc/error.texi: new file, explaining interaction with progname.
133759         * doc/gnulib.texi: include it.  Update copyright.
133761 2007-01-03  Simon Josefsson  <simon@josefsson.org>
133763         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
133764         AC_CANONICAL_HOST, to improve autobuild outputs.
133766 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
133767             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
133769         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
133770         sockets, server sockets, and other file descriptors.  Count errors
133771         to compute the return value.  Reorder the code a bit to be easier
133772         to follow.  Don't set event bits that were not requested (except
133773         POLLERR and POLLHUP).
133775 2007-01-01  Bruno Haible  <bruno@clisp.org>
133777         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
133779 2007-01-03  Jim Meyering  <jim@meyering.net>
133781         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
133783 2007-01-02  Bruno Haible  <bruno@clisp.org>
133785         * modules/settime (Include): Require timespec.h.
133786         * modules/nanosleep (Include): Likewise.
133788 2007-01-01  Bruno Haible  <bruno@clisp.org>
133790         * gnulib-tool (func_emit_copyright_notice): Bump year.
133791         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
133793 2007-01-01  Bruno Haible  <bruno@clisp.org>
133795         Improve support for OpenBSD.
133796         * build-aux/config.rpath (libname_spec): Export.
133797         (library_names_spec): New variable. Export.
133798         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
133799         library_names_spec from the config.rpath output. Locate shared library
133800         through the name pattern in library_names_spec.
133802 2007-01-01  Eric Blake  <ebb9@byu.net>
133804         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
133806 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
133808         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
133809         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
133810         assume the C locale, and avoid an "eval" that could cause trouble.
133811         Problem with SORT reported by Bob Proulx.
133813         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
133814         Define.  Trivial patch from Henning Nielsen Lund, originally
133815         sent to bug-grep@gnu.org today.
133817 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
133819         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
133820         struct stat.  Problem reported by Henning Nielsen Lund.
133821         * lib/acl.c: Include acl.h first, to check interface.  Don't
133822         bother to include sys/types.h and sys/stat.h again.
133824 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
133826         Import the following change from libc; problem reported by
133827         Sven Verdoolaege.
133829         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
133831         [BZ #1373]
133832         * lib/argp.h: Remove __NTH for __argp_usage inline function.
133834 2006-12-28  Jim Meyering  <jim@meyering.net>
133836         * build-aux/announce-gen: Do not assume that the package
133837         builds any of tar.gz, tar.bz2, and .xdelta files.
133838         Suggestion from Simon Josefsson.
133840 2006-12-28  Simon Josefsson  <simon@josefsson.org>
133842         * modules/announce-gen: New file.
133844 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
133846         * lib/mbchar.h: Just include <wctype.h>; the wctype module
133847         handles its gotchas now.
133848         * lib/mbswidth.c: Likewise.
133849         * lib/wcwidth.h: Likewise.
133850         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
133851         and iswcntrl; the wctype module does this stuff now.
133852         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
133853         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
133854         * modules/mbchar (Depends-on): Add wctype.
133855         * modules/mbswidth (Depends-on): Likewise.
133856         * modules/wcwidth (Depends-on): Likewise.
133858 2006-12-27  Eric Blake  <ebb9@byu.net>
133860         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
133861         module uses more than what <wctype.h> is required to provide.
133863 2006-12-26  Eric Blake  <ebb9@byu.net>
133865         * gnulib-tool (sed_extract_prog): Avoid space-tab.
133867 2006-12-26  Eric Blake  <ebb9@byu.net>
133869         * modules/absolute-header: New module.
133870         * modules/fcntl (Depends-on): Depend on it.
133871         * modules/inttypes (Depends-on): Likewise.
133872         * modules/stdint (Depends-on): Likewise.
133873         * modules/sys_stat (Depends-on): Likewise.
133874         * modules/wctype (Depends-on): Likewise.
133875         * MODULES.html.sh (Support for building libraries and
133876         executables): Document it.
133878 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
133880         * gnulib-tool (SED): Remove, undoing previous change.
133881         The problem was that it broke coreutils on Solaris, because
133882         "sed --posix" leaked into a makefile.
133883         (sed): New alias, if 'alias' and GNU sed.
133885 2006-12-24  Jim Meyering  <jim@meyering.net>
133887         Work around an fchownat bug in glibc-2.4:
133888         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
133889         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
133890         in spite of the -P option.
133891         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
133892         New macros.
133893         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
133894         * modules/openat (Files): Add lib/fchownat.c.
133895         * lib/openat.c (fchownat): Don't define here.  Move to...
133896         * lib/fchownat.c: ...this new file.
133898 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
133900         Fix bug reported by Bruno Haible in
133901         <http://lists.gnu.org/r/bug-gnulib/2006-12/msg00228.html>
133902         where quotearg.c didn't compile on Mac OS X 10.2 because it
133903         lacks <wchar.h> and wint_t.
133904         * lib/wctype_.h (__wctype_wint_t): New type.
133905         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
133906         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
133907         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
133908         Arg is now of type __wctype_wint_t, not wint_t.
133909         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
133910         substitute HAVE_WINT_T.
133911         * modules/wctype (Files): Add m4/wint_t.m4.
133912         (wctype.h): Substitute HAVE_WINT_T.
133914 2006-12-23  Bruno Haible  <bruno@clisp.org>
133916         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
133918 2006-12-23  Bruno Haible  <bruno@clisp.org>
133920         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
133921         S_ISLNK.
133922         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
133923         mingw.
133925 2006-12-22  Bruno Haible  <bruno@clisp.org>
133927         * lib/copy-file.c: Include acl.h.
133928         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
133929         Close the file descriptors only after being done with copy_acl.
133930         * modules/copy-file (Depends-on): Add acl.
133932 2006-12-22  Bruno Haible  <bruno@clisp.org>
133934         * gnulib-tool (SED): New variable.
133935         Use $SED instead of sed everywhere.
133937 2006-12-22  Bruno Haible  <bruno@clisp.org>
133939         * modules/no-c++: New file.
133940         * m4/no-c++.m4: New file.
133941         * MODULES.html.sh (Support for building libraries and executables):
133942         Add no-c++.
133944 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
133946         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
133947         Include <limits.h>, and use its INT_MAX to rewrite the
133948         j loop so that it does not overflow 'int'.  Problem reported by
133949         Ralf Wildenhues in
133950         <http://lists.gnu.org/r/bug-gnulib/2006-12/msg00084.html>.
133951         Play it safe by shifting left by 1 rather than multiplying by 2,
133952         as GCC is less likely to optimize this away when the value
133953         is signed (when it assumes overflow leads to undefined behavior).
133954         Also, don't assume time_t uses two's complement.
133956 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
133958         * MODULES.html.sh: New module wctype.
133959         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
133960         * lib/fnmatch.c: Don't bother to include <wchar.h> before
133961         <wctype.h>, since the new wctype module should fix this.
133962         * lib/quotearg.c: Include <wctype.h> unconditionally, since
133963         the wctype module should arrange for it.
133964         * lib/regex_internal.h: Likewise.
133965         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
133966         since the wctype module should handle this now.
133967         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
133968         * modules/fnmatch (Depends-on): Add wctype.
133969         * modules/quotearg (Depends-on): Likewise.
133970         * modules/regex (Depends-on): Likewise.
133972 2006-12-19  Bruno Haible  <bruno@clisp.org>
133974         * lib/strdup.h [C++]: Wrap definitions in extern "C".
133975         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
133977 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
133979         * modules/savewd (Depends-on): Fix dependency on fcntl.
133981 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
133983         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
133984         conforms to C99, rather than relying on the user's environment
133985         setting of STDINT_H.
133987 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
133988         and Eric Blake  <ebb9@byu.net>
133990         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
133991         This is more consistent with the other defines here.
133992         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
133993         Port to z/OS.  Problem reported by Paul Gilmartin.
133994         Change local vars to use gl_ prefix rather than ac_.
133995         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
133996         with other defines.
133997         * modules/double-slash-root: New module.
133998         * modules/dirname (Files): Remove m4/double-slash-root.m4.
133999         (Depends-on): Add double-slash-root.
134000         * MODULES.html.sh (File system functions): Mention new module.
134002 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
134004         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
134005         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
134006         This is for the benefit of gzip, which doesn't do i18n.
134008 2006-12-12  Jim Meyering  <jim@meyering.net>
134010         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
134011         Reported by Andreas Schwab <schwab@suse.de>.
134013 2006-12-12  Bruno Haible  <bruno@clisp.org>
134015         Merge these changes.
134016         2006-09-05  Bruno Haible  <bruno@clisp.org>
134017         * lib/iconvme.c (iconv_string): No need to save and restore errno when
134018         iconv_alloc succeeded.
134019         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
134020         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
134021         test for " && dest " at the end - dest is always != NULL there. Call
134022         iconv with 4xNULL arguments initially, to reset the state. Call iconv
134023         with 2xNULL arguments, also to flush the state storage. Handle the
134024         IRIX iconv behaviour. Realloc the final result, to throw away unused
134025         memory.
134027 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
134029         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
134030         and fchmodat unconditionally, since glibc 2.4 has them.
134031         Problem reported by Arkadiusz Miskiewicz.
134033 2006-12-10  Bruno Haible  <bruno@clisp.org>
134035         * gnulib-tool (func_import): Show the include files only for those
134036         modules that are copied and specified.
134037         Reported by Karl Berry.
134039 2006-12-08  Jim Meyering  <jim@meyering.net>
134041         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
134042         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
134044         * build-aux/announce-gen: Add two new options, both optional:
134045         --bootstrap-tools=TOOL_LIST
134046               a comma-separated list of tools, e.g.,
134047               autoconf,automake,bison,gnulib
134048         --gnulib-snapshot-date=DATE
134049               if gnulib is in the bootstrap tool list,
134050               then report this as the snapshot date.
134051               If not specified, use the current date/time.
134052               If you specify a date here, be sure it's UTC.
134054 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
134056         * tests/test-argp-2.sh: Fix test to match actual output.
134057         (func_compare): Fix sed script to be portable.
134059 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
134061         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
134062         workaround for this case.  It is not autoconfigured now; offhand
134063         it's hard to see how to autoconfigure it.
134065 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
134067         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
134068         a directory that is about to be chowned.  Such a directory's
134069         initial file permissions should permit the owner only and this
134070         should not be changed until after the chown, since the group and
134071         other bits would be incorrect if they granted permission before
134072         the chown.
134074         Fix porting problem for iswctype reported by Georg Schwarz in:
134075         http://lists.gnu.org/r/bug-coreutils/2006-12/msg00017.html
134076         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
134077         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
134078         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
134079         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
134081 2006-12-03  Jim Meyering  <jim@meyering.net>
134083         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
134084         p->fts_statp may not yet be defined.
134085         (fts_read): Instead, set it in the caller, once p->fts_statp is
134086         sure to be defined, and corresponds to a top-level directory.
134087         This bug made du -x fail.  Here's the coreutils test case:
134088         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
134089         Reported by Mike Frysinger.
134091 2006-12-01  Jim Meyering  <jim@meyering.net>
134093         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
134094         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
134095         Reported by Simon Josefsson.
134097 2006-11-30  Jim Meyering  <jim@meyering.net>
134099         * m4/warning.m4: Use the all-permissive copyright notice
134100         recommended by RMS (rather than LGPL).
134101         * m4/vararrays.m4: Likewise.
134102         * m4/flexmember.m4: Likewise.
134104 2006-11-29  Bruno Haible  <bruno@clisp.org>
134106         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
134107         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
134108         using +=.
134109         Reported by Simon Josefsson <simon@josefsson.org>.
134111 2006-11-28  James Youngman  <jay@gnu.org>
134113         * README: Advise users that they might find the bug-gnulib@gnu.org
134114         and autotools-announce@gnu.org mailing lists useful.
134116 2006-11-28  Bruno Haible  <bruno@clisp.org>
134118         * m4/ptrdiff_max.m4: Remove file.
134120 2006-11-21  Bruno Haible  <bruno@clisp.org>
134122         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
134123         _AC_COMPUTE_INT.
134124         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
134125         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
134126         _AC_COMPUTE_INT.
134127         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
134128         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
134129         _AC_COMPUTE_INT.
134130         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
134132 2006-11-28  Jim Meyering  <jim@meyering.net>
134134         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
134135         warning from "gcc -Wshadow" about shadowing the builtin.
134137 2006-11-27  Bruno Haible  <bruno@clisp.org>
134139         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
134140         _AC_COMPUTE_INT.
134141         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
134143 2006-11-27  Bruno Haible  <bruno@clisp.org>
134144             Paul Eggert  <eggert@cs.ucla.edu>
134146         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
134148 2006-11-26  Bruno Haible  <bruno@clisp.org>
134150         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
134151         noinst_LTLIBRARIES.
134153 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
134154             Bruno Haible  <bruno@clisp.org>
134156         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
134157         if compiling with "gcc -ansi".
134159 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
134161         Fix some incompatibilities with gcc -ansi -pedantic.
134162         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
134163         if compiling pedantically with GCC, unless it's C99 or later.
134164         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
134165         it mishandles gcc -ansi -pedantic as well.
134166         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
134167         if gcc -pedantic.
134168         * lib/regexec.c (check_node_accept_bytes): Don't use auto
134169         initializers for struct if -pedantic, unless it's C99 or later.
134171 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
134173         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
134174         Don't close an fd more than once. Identical atimes indicate
134175         success, not failure.
134177 2006-11-22  Robinson Mittmann  <bob@hoplon.com>  (tiny change)
134179         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
134181 2006-11-23  Jim Meyering  <jim@meyering.net>
134183         * build-aux/announce-gen: New file.  From coreutils.
134185 2006-11-22  Jim Meyering  <jim@meyering.net>
134187         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
134188         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
134189         (fts_read): Use a temporary to narrow the overused st_size member
134190         before using it in a switch statement.  Reported by Matthew Woehlke.
134192         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
134193         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
134195 2006-11-20  Bruno Haible  <bruno@clisp.org>
134197         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
134198         changequote instead of pairs of brackets.
134199         Reported by Andreas Schwab <schwab@suse.de>.
134201 2006-11-21  Jim Meyering  <jim@meyering.net>
134203         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
134204         so as to remain compatible with older compilers.
134205         Patch from Michael Deutschmann.
134207 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
134209         * MODULES.html.sh (File system functions): Add openat.
134211         * lib/openat.h (rpl_fstatat): New macro, if
134212         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
134213         (fstatat): Define to rpl_fstatat under the same conditions,
134214         unless COMPILING_FSTATAT.
134215         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
134216         seems to have the bug.
134217         * lib/fstatat.c: New file.
134218         * modules/openat (Files): Add it.
134220 2006-11-20  Bruno Haible  <bruno@clisp.org>
134222         * Makefile: New file.
134224 2006-11-20  Jim Meyering  <jim@meyering.net>
134226         The beginnings of syntax-related checks for gnulib.
134227         * lib/Makefile: New file.
134228         * lib/t-idcache: New script.  Ensure that the two halves of
134229         idcache.c stay in sync.
134231         * lib/idcache.c: Adjust comments in user- and group- portions to
134232         be more accurate, and to be consistent with one another.
134234 2006-11-20  Jim Meyering  <jim@meyering.net>
134236         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
134237         continue using the flexible array member (thus, this module performs
134238         half as many malloc calls), with the addition that...
134239         (getgroup, getuser): Consistently record a non-match via an empty
134240         "name" string, and map an empty string match to a NULL return value.
134241         * modules/idcache (Depends-on): Re-add flexmember.
134243         * lib/idcache.c (getuser): Remove all uses of the register keyword.
134244         (getuidbyname, getgroup, getgidbyname): Likewise.
134246         Use cleaner syntax: NULL rather than 0.
134247         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
134249 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
134251         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
134252         It mishandled the case where the group was missing.
134253         Problem reported by Greg Schafer.
134254         * modules/idcache: Likewise.
134256 2006-11-18  Jim Meyering  <jim@meyering.net>
134258         * check-module (%exempt_header): Add exception for some
134259         conditionally-included headers.
134261         * modules/i-ring (Depends-on): Add verify.
134262         (License): Change to LGPL.
134264 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
134266         * modules/getaddrinfo (Depends-on): Remove inttostr; add snprintf.
134267         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
134268         and inttostr.h.  Use snprintf rather than uinttostr, so that
134269         LGPLed code doesn't depend on GPLed.
134271 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
134273         * modules/inline (License): Change from GPL to LGPL.
134275 2006-11-17  Jim Meyering  <jim@meyering.net>
134277         * modules/d-type (License): Switch to LGPL.
134279 2006-11-15  Bruno Haible  <bruno@clisp.org>
134281         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
134283 2006-11-15  Eric Blake  <ebb9@byu.net>
134285         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
134286         the module dependency.
134288 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
134289             Bruno Haible  <bruno@clisp.org>
134291         * gnulib-tool (func_create_testdir): Add license consistency check.
134293 2006-11-15  Eric Blake  <ebb9@byu.net>
134295         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
134296         random "(cached)" in configure output.
134298 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
134300         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
134301         test for conforming inttypes.h is both announced and cached.
134303         * MODULES.html.sh (seen_modules, seen_files): New variables.
134304         (func_module): Rewrite to use a few less gnulib-tool and sed
134305         invocations.  Avoid a couple of quadratic algorithms for ...
134306         (missed_modules, missed_files): ... these, with ...
134307         (func_append, func_tmpdir): ... these new functions, from
134308         gnulib-tool.  Analogously, install traps for cleanup.
134310         * tests/test-gc.c (main): Remove unused variables.
134311         * tests/test-read-file.c: Include stdlib.h, for 'free'.
134313 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
134315         * modules/inttostr (License): Change to LGPL.
134317 2006-11-14  Eric Blake  <ebb9@byu.net>
134319         * modules/tempname (License): Change to LGPL.
134321 2006-11-14  Eric Blake  <ebb9@byu.net>
134323         * doc/functions.texi (Function Portability): *printf functions on
134324         Cygwin now understand all POSIX size specifiers.
134326 2006-11-14  Bruno Haible  <bruno@clisp.org>
134328         * modules/c-ctype (License): Change to LGPL.
134330 2006-11-12  Bruno Haible  <bruno@clisp.org>
134332         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
134333         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
134334         for GNOME libraries, for which the include files are installed in
134335         subdirectories of $prefix/include.
134337 2006-11-12  Bruno Haible  <bruno@clisp.org>
134339         * m4/lib-link.m4: Require at least autoconf-2.54.
134340         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
134341         name to underscores for the --with option.
134343 2006-11-13  Bruno Haible  <bruno@clisp.org>
134345         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
134346         the tests directory.
134347         Reported by Ralf Wildenhues.
134349 2006-11-13  Bruno Haible  <bruno@clisp.org>
134351         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
134352         (func_emit_initmacro_end): Undo the override here.
134353         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
134354         Works around the famous automake error in coreutils.
134356 2006-11-13  Eric Blake  <ebb9@byu.net>
134358         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
134359         element, not its node.
134361 2006-11-12  Bruno Haible  <bruno@clisp.org>
134363         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
134364         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
134366 2006-11-12  Bruno Haible  <bruno@clisp.org>
134368         * gnulib-tool: New option --local-symlink.
134369         (func_usage): Document it.
134370         (lsymbolic): New variable.
134371         (func_import, func_create_testdir): If --symlink was not specified,
134372         test whether --local-symlink was specified and the file comes from
134373         the local_gnulib_dir.
134375 2006-11-12  Bruno Haible  <bruno@clisp.org>
134377         * gnulib-tool (func_ln): New function.
134378         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
134380 2006-11-12  Bruno Haible  <bruno@clisp.org>
134382         Finish support for source files in subdirectories.
134383         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
134384         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
134385         AUTOMAKE_OPTIONS.
134386         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
134388 2006-11-12  Bruno Haible  <bruno@clisp.org>
134390         * gnulib-tool (func_get_automake_snippet): Synthesize also an
134391         EXTRA_lib_SOURCES augmentation.
134392         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
134394 2006-11-12  Jim Meyering  <jim@meyering.net>
134396         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
134397         file descriptors.  This also averts a failure on systems with
134398         native openat support when a traversed directory lacks "x" access.
134399         * lib/fts_.h: Include "i-ring.h"
134400         (struct FTS) [fts_fd_ring]: New member.
134401         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
134402         (FCHDIR): Add parentheses.
134403         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
134404         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
134405         When descending, rather than simply closing the previous
134406         fts_cwd_fd value, push that file descriptor onto the ring.
134407         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
134408         (fts_open): Initialize the new fd_ring member.
134409         (fts_close): Clear the ring.
134410         (fts_safe_changedir): When possible, use our new fd_ring to skip
134411         the diropen and fstat and dev/ino comparison that would normally
134412         accompany a virtual `chdir ("..")'.
134414         * modules/fts (Depends-on): Add i-ring.
134415         * modules/i-ring: New module.
134416         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
134417         * m4/i-ring.m4: New file.
134419 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
134421         * gnulib-tool (func_create_testdir): Fix replacement of
134422         `build-aux' in configure.ac.  Run autotools in gltests
134423         subdirectory.
134424         (func_create_testdir, func_create_megatestdir, test): There is
134425         no need for '--force' in most autotool invocations in a new
134426         tree.  Actually fail the whole test if any of the tools, or the
134427         configure or make stages fail.
134429         Sync from Automake.
134430         * build-aux/gnupload: Revert last change.  Add pointer to upload
134431         instructions of the GNU Maintenance Instructions.
134432         Suggestion by Karl Berry.
134434 2006-11-10  Jim Meyering  <jim@meyering.net>
134436         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
134438 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
134440         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
134441         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
134442         (bind_textdomain_codeset) [! ENABLE_NLS]:
134443         Evaluate all the arguments.  That way, callers get compatible behavior
134444         if the arguments have side effects.  Also, it avoids some GCC
134445         diagnostics in some cases; Joel E. Denny reported problems when Bison
134446         was configured with --enable-gcc-warnigs.
134448 2006-11-10  Jim Meyering  <jim@meyering.net>
134450         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
134451         relevant options in CFLAGS (like -O, -fno-inline) are taken into
134452         account.
134454 2006-11-10  Jim Meyering  <jim@meyering.net>
134456         * modules/inline: New file/module.
134457         * modules/xalloc (Files): Remove m4/inline.m4.
134458         (Depends-on): Add inline, instead.
134459         * modules/oset: Likewise.
134460         * modules/list: Likewise.
134462 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
134464         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
134465         Problem reported by Matthew Woehlke.
134467 2006-11-09  Bruno Haible  <bruno@clisp.org>
134469         * lib/tempname.c (gen_tempname): Remove variant that invokes
134470         __gen_tempname.
134471         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
134472         __gen_tempname.
134474 2006-11-08  Bruno Haible  <bruno@clisp.org>
134476         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
134477         to 'yes' instead of 'cross-compiling'.
134479 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
134481         * lib/quotearg.h (quotearg_free): New decl.
134482         * lib/quotearg.c (quotearg_free): New function.
134483         (slot0, nslots, slotvec0, slotvec):
134484         Now file-scope so that quotearg_free can get at them.
134486 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
134488         Sync from Automake.
134489         * build-aux/gnupload: Add missing 'gnu' to example URL.
134490         Report by Karl Berry.
134492 2006-11-08  Bruno Haible  <bruno@clisp.org>
134494         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
134495         Suggested by Paul Eggert.
134497 2006-11-08  Jim Meyering  <jim@meyering.net>
134499         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
134500         It's already included if !_LIBC.
134501         (fts_safe_changedir): Add a comment.
134503 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
134505         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
134506         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
134507         Matthew Woehlke.
134509         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
134510         definitions up, to avoid colliding with change below.
134511         (static_inline) [HAVE_INLINE]: New macro.
134512         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
134513         Provide extern decls when !HAVE_INLINE.  Do not define unless
134514         static_inline is defined, either by us or by xmalloc.c.  Use
134515         static_inline rather than static inline.
134516         (XCALLOC): Optimize sizeof(T) = 1 case.
134517         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
134519 2006-11-07  Bruno Haible  <bruno@clisp.org>
134521         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
134522         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
134523         AC_C_INLINE.
134524         * modules/xalloc (Files): Add m4/inline.m4.
134526 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
134528         * README: Fix typo.
134529         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
134530         (Miscellanous Notes): ...from this.
134532 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
134534         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
134535         Mention that offsetof should be used instead of sizeof.
134536         From Bruno Haible.
134538 2006-11-07  Bruno Haible  <bruno@clisp.org>
134540         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
134542 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
134544         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
134545         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
134546         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
134547         (gl_tree_add_before, gl_tree_add_after):
134548         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
134549         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
134550         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
134551         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
134552         (gl_linked_add_after, gl_linked_add_at): Likewise.
134553         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
134554         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
134555         (gl_tree_add_before, gl_tree_add_after): Likewise.
134556         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
134557         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
134558         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
134560 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
134562         * lib/gl_oset.h: Use C comment style, not C++ comment style.
134564 2006-11-06  Bruno Haible  <bruno@clisp.org>
134566         * m4/inline.m4: New file.
134567         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
134568         * modules/list (Files): Add m4/inline.m4.
134569         * modules/oset (Files): Likewise.
134571 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
134573         * lib/idcache.c: Include <stddef.h>, for offsetof.
134574         (struct userid.name): Change from char * to a flexible array member.
134575         All uses changed.
134576         * modules/idcache (Depends-on): Add flexmember.
134578         * MODULES.html.sh (Core language properties): New module flexmember.
134579         * modules/flexmember, m4/flexmember.m4: New files.
134581         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
134582         inline functions that are identical with the old xnmalloc_inline,
134583         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
134584         that we can avoid some unnecessary integer multiplications and
134585         divisions in the common case where the element size is known at
134586         compile time.
134587         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
134588         needed.
134589         (xnboundedmalloc): Remove.
134590         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
134591         arguments, for consistency with rest of this header.
134592         (xcharalloc): Rewrite using XNMALLOC.
134593         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
134594         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
134595         versions have been moved to lib/xalloc.h and renamed to be the
134596         non-*_inline versions.
134597         (xmalloc, xrealloc): Implement without reference to the xnmalloc
134598         and xnrealloc functions, since those functions are now inline and
134599         now call us.
134600         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
134601         renaming described above.
134602         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
134603         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
134604         captures the dependency in AC_C_INLINE.
134606         New module canonicalize-lgpl, proposed by Charles Wilson in
134607         <http://lists.gnu.org/r/bug-gnulib/2006-11/msg00020.html>
134608         with a few small changes afterwards.
134609         * MODULES.html.sh (File system functions): New module
134610         canonicalize-lgpl.
134611         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
134612         and canonicalize_file_name.
134613         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
134614         * modules/canonicalize-lgpl: New files.
134616 2006-11-05  Bruno Haible  <bruno@clisp.org>
134618         * gnulib-tool (func_import, func_create_testdir): Create directories
134619         also for files in subdirectories of lib/.
134621 2006-11-05  Bruno Haible  <bruno@clisp.org>
134623         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
134624         ANSI C compliant.
134626 2006-11-03  Bruno Haible  <bruno@clisp.org>
134628         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
134629         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
134630         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
134631         (xnboundedmalloc): New inline function.
134632         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
134633         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
134634         xmalloc.
134635         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
134636         xmalloc.
134637         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
134638         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
134639         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
134640         xmalloc.
134641         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
134642         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
134643         xmalloc.
134644         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
134645         gl_tree_add_after): Use XMALLOC instead of xmalloc.
134646         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
134647         xmalloc.
134648         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
134649         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
134650         gl_tree_add_after): Use XMALLOC instead of xmalloc.
134651         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
134652         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
134653         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
134654         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
134656 2006-11-03  Bruno Haible  <bruno@clisp.org>
134658         * lib/c-ctype.h [C++]: Define functions without name mangling.
134659         * lib/fwriteerror.h [C++]: Likewise.
134660         * lib/gcd.h [C++]: Likewise.
134661         * lib/linebreak.h [C++]: Likewise.
134663 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
134665         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
134666         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
134667         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
134668         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
134669         Check for functions and headers just once.
134670         Check for declaration of canonicalize_file_name.
134671         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
134673 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
134675         * gnulib-tool (func_import): Fix typo in actioncmd.
134677 2006-11-02  Bruno Haible  <bruno@clisp.org>
134679         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
134680         newline sequence in the Makefile.am snippet as a space, like "make"
134681         does.
134682         Reported by Roger Persson <perrog@gmail.com>.
134684 2006-11-01  Bruno Haible  <bruno@clisp.org>
134686         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
134687         already declared in <string.h>.
134688         * lib/strcase.h (strncasecmp): Don't declare it if yes.
134690 2006-11-01  Bruno Haible  <bruno@clisp.org>
134692         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
134693         * lib/strcase.h: Include <string.h>.
134694         (strcasecmp): Define to rpl_strcasecmp here.
134696 2006-11-01  Bruno Haible  <bruno@clisp.org>
134698         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
134700 2006-11-01  Eric Blake  <ebb9@byu.net>
134702         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
134704         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
134706 2006-10-29  Bruno Haible  <bruno@clisp.org>
134708         Make it compile in C++ mode.
134709         * lib/full-write.c (full_rw): Add a cast.
134711 2006-11-01  Bruno Haible  <bruno@clisp.org>
134713         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
134714         be POSIX compliant.
134715         Reported by Roger Persson <perrog@gmail.com>.
134717 2006-11-01  Eric Blake  <ebb9@byu.net>
134719         * lib/getopt_.h: Fix comments.
134721 2006-10-31  Eric Blake  <ebb9@byu.net>
134723         * modules/tmpdir (Depends-on): Add sys_stat.
134724         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
134725         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
134726         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
134727         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
134728         tempname.
134730 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
134732         Avoid some C++ diagnostics reported by Bruno Haible.
134733         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
134734         xmalloc.
134735         (quotearg_alloc): Use xcharalloc rather than xmalloc.
134736         (struct slotvec): Move to top level.
134737         (quotearg_n_options): Rewrite to avoid xmalloc.
134738         * lib/xalloc.h (xcharalloc): New function.
134739         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
134740         [defined __cplusplus]: Add function template that provides result
134741         type propagation.  This part of the change is from Bruno Haible.
134743 2006-10-29  Bruno Haible  <bruno@clisp.org>
134745         Make it compile in C++ mode.
134746         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
134747         * lib/strnlen1.c (strnlen1): Cast memchr result.
134748         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
134749         * lib/clean-temp.c (string_equals, string_hash): Add casts.
134750         (create_temp_dir): Rename local variable 'template'.
134751         (compile_csharp_using_sscli): Add cast.
134752         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
134753         * lib/findprog.c (find_in_path): Likewise.
134754         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
134755         * lib/wait-process.c (register_slave_subprocess): Likewise.
134757 2006-10-22  Bruno Haible  <bruno@clisp.org>
134759         * modules/tsearch: New file.
134760         * lib/tsearch.h: New file.
134761         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
134762         * m4/tsearch.m4: New file.
134763         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
134765 2006-10-29  Eric Blake  <ebb9@byu.net>
134767         * lib/arcfour.c: Assume config.h.
134768         * lib/arctwo.c: Likewise.
134769         * lib/base64.c: Likewise.
134770         * lib/check-version.c: Likewise.
134771         * lib/crc.c: Likewise.
134772         * lib/des.c: Likewise.
134773         * lib/gc-gnulib.c: Likewise.
134774         * lib/gc-libgcrypt.c: Likewise.
134775         * lib/gc-pbkdf2-sha1.c: Likewise.
134776         * lib/getaddrinfo.c: Likewise.
134777         * lib/getdelim.c: Likewise.
134778         * lib/getline.c: Likewise.
134779         * lib/hmac-md5.c: Likewise.
134780         * lib/hmac-sha1.c: Likewise.
134781         * lib/iconvme.c: Likewise.
134782         * lib/md2.c: Likewise.
134783         * lib/md4.c: Likewise.
134784         * lib/memxor.c: Likewise.
134785         * lib/read-file.c: Likewise.
134786         * lib/readline.c: Likewise.
134787         * lib/rijndael-alg-fst.c: Likewise.
134788         * lib/rijndael-api-fst.c: Likewise.
134789         * lib/xgetdomainname.c: Likewise.
134791 2006-10-28  Eric Blake  <ebb9@byu.net>
134793         * lib/xstrndup.c: Assume config.h.
134795 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
134797         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
134798         stat-macros.h is now for our own macros, whereas stat_h is for
134799         macros in the <sys/stat.h> name space.
134800         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
134801         (STAT_MACROS_H): Remove.
134802         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
134803         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
134804         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
134805         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
134806         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
134807         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
134808         Move these macros to ...
134809         * lib/stat_.h: here.  Don't include stat-macros.h.
134810         * lib/canonicalize.c: Don't include stat-macros.h.
134811         * lib/chown.c: Likewise.
134812         * lib/euidaccess.c: Likewise.
134813         * lib/file-type.c: Likewise.
134814         * lib/filemode.c: Likewise.
134815         * lib/glob.c: Likewise.
134816         * lib/isapipe.c: Likewise.
134817         * lib/lchown.c: Likewise.
134818         * lib/lstat.c: Likewise.
134819         * lib/mkdir-p.c: Likewise.
134820         * lib/rmdir.c: Likewise.
134821         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
134822         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
134823         unless mkdir isn't declared, to speed up 'configure'.
134824         Always create sys/stat.h, since it's unlikely any real sys/stat.h
134825         would define all the S_* symbols.
134826         * modules/canonicalize (Depends-on):
134827         Depend on sys_stat, not stat-macros.
134828         * modules/chown: Likewise.
134829         * modules/euidaccess: Likewise.
134830         * modules/filemode: Likewise.
134831         * modules/file-type: Likewise.
134832         * modules/glob: Likewise.
134833         * modules/isapipe: Likewise.
134834         * modules/lchown: Likewise.
134835         * modules/lstat: Likewise.
134836         * modules/mkancesdirs: Likewise.
134837         * modules/rmdir: Likewise.
134838         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
134839         * modules/modechange: Likewise.
134840         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
134841         (configure.ac): Remove gl_STAT_MACROS.
134842         * modules/sys_stat (Depends-on): Remove stat-macros.
134844 2006-10-27  Bruno Haible  <bruno@clisp.org>
134846         * m4/signed.m4: Remove file.
134847         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
134848         invocation.
134849         * modules/vasnprintf (Files): Remove m4/signed.m4.
134851 2006-10-27  Bruno Haible  <bruno@clisp.org>
134853         Update to GNU gettext 0.16.
134854         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
134855         m4/inttypes-h.m4, m4/signed.m4.
134856         * m4/gettext.m4: Update to GNU gettext 0.16.
134857         * m4/intl.m4: New file, from GNU gettext.
134858         * m4/intldir.m4: New file, from GNU gettext.
134859         * config/srclist.txt: Update
134861 2006-10-27  Eric Blake  <ebb9@byu.net>
134863         * MODULES.html.sh: Document tempname.
134864         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
134865         dependencies.
134866         (Files): Move lib/tempname.c...
134867         * modules/tempname: ...to this new module.
134868         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
134869         (gl_PREREQ_TEMPNAME): Move...
134870         * m4/tempname.m4: ...to this new file.
134871         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
134872         * modules/sys_stat (Depends-on): Add stat-macros.
134873         * lib/stat_.h (includes): Pick up stat macros.
134874         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
134875         if stat macros are broken.
134876         * lib/tempname.c (includes): No need to include "stat-macros.h".
134877         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
134878         (direxists, __path_search) [!_LIBC]: Don't compile these in
134879         gnulib; the tmpdir module covers that.
134880         * lib/tempname.h: New file.
134882 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
134884         * COPYING: Explain how gnulib-tool converts licence headers.
134885         Almost all wording by Eric Blake.
134887 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
134889         * lib/mbchar.h (is_basic_table): Make read-only.
134890         * lib/mbchar.c (is_basic_table): Likewise.
134891         Reported by John Darrington.
134893 2006-10-25  Bruno Haible  <bruno@clisp.org>
134895         * lib/progname.h (set_program_name): Undefine before defining.
134897 2006-10-25  Bruno Haible  <bruno@clisp.org>
134899         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
134900         false for non-gcc C++ compilers.
134901         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
134903 2006-10-24  Bruno Haible  <bruno@clisp.org>
134905         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
134906         iconv implementations like Irix iconv.
134908 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
134910         * modules/vararrays: New file.
134911         * m4/vararrays.m4: New file, taken from diffutils.
134912         * MODULES.html.sh: New module vararrays.
134914 2006-10-24  Karl Berry  <karl@gnu.org>
134916         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
134917         Don't call GNU Unix.
134919 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
134921         * users.txt: Add Libtool.
134923         Sync from Libtool:
134925         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
134927         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
134928         to gnulib's policy of including config.h unconditionally.
134930 2006-10-24  Bruno Haible  <bruno@clisp.org>
134932         * modules/wcwidth (Files): Add m4/wint_t.m4.
134933         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
134934         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
134936 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
134938         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
134939         to pacify GCC with some -W flags enabled.  Problem reported by
134940         Bruno Haible.
134942 2006-10-24  Jim Meyering  <jim@meyering.net>
134944         * MODULES.html.sh: Remove uinttostr.  It's not a module.
134945         Reported by Karl Berry.
134947 2006-10-23  Bruno Haible  <bruno@clisp.org>
134949         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
134951 2006-10-24  Bruno Haible  <bruno@clisp.org>
134953         * lib/gl_list.h: Use C comment style, not C++ comment style.
134955 2006-10-23  Eric Blake  <ebb9@byu.net>
134957         * lib/getaddrinfo.c (includes): Add missing include.
134959 2006-10-23  Bruno Haible  <bruno@clisp.org>
134960             Paul Eggert  <eggert@cs.ucla.edu>
134962         Ability to rename obstack_free.
134963         * lib/obstack.h (__obstack_free): New macro. Declare instead of
134964         obstack_free.
134965         (obstack_free): Invoke the __obstack_free macro.
134966         * lib/obstack.c (obstack_free): Use __obstack_free macro.
134968 2006-10-23  Bruno Haible  <bruno@clisp.org>
134969             Paul Eggert  <eggert@cs.ucla.edu>
134971         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
134972         __argc, __argv from the declaration. (They are defined as macros on
134973         mingw.)
134975 2006-10-22  Bruno Haible  <bruno@clisp.org>
134977         * doc/gnulib-intro.texi: New file.
134978         * doc/gnulib.texi: Include it.
134980 2006-10-21  Bruno Haible  <bruno@clisp.org>
134982         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
134983         "Introduction", "Miscellanous Notes", "Particular Modules".
134985 2006-10-21  Bruno Haible  <bruno@clisp.org>
134987         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
134988         Change mostlyclean-local rule to avoid sh syntax error from bash
134989         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
134991 2006-10-23  Jim Meyering  <jim@meyering.net>
134993         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
134994         in place of snprintf.
134996         * modules/inttostr (Files): Add lib/uinttostr.c.
134997         * lib/uinttostr.c (inttostr): New file/function.
134998         * lib/inttostr.h (uinttostr): Declare.
134999         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
135000         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
135001         Add uinttostr.
135002         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
135004 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
135006         * lib/canonicalize.c (ELOOP): Define if not already defined.
135007         Problem reported by Bruno Haible in
135008         <http://lists.gnu.org/r/bug-gnulib/2006-10/msg00282.html>.
135010 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
135012         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
135013         Problem reported by Perry Smith and Ville Laurikari.
135015         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
135016         uses.
135018 2006-10-19  Bruno Haible  <bruno@clisp.org>
135020         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
135021         for mingw.
135023 2006-10-19  Bruno Haible  <bruno@clisp.org>
135025         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
135026         Needed for mingw.
135028 2006-10-19  Bruno Haible  <bruno@clisp.org>
135030         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
135032 2006-10-19  Bruno Haible  <bruno@clisp.org>
135034         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
135035         it.
135037 2006-10-19  Bruno Haible  <bruno@clisp.org>
135039         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
135040         invocation.
135042 2006-10-19  Bruno Haible  <bruno@clisp.org>
135044         * gnulib-tool (func_create_testdir): Don't include ftruncate and
135045         mountlist by default.
135047 2006-10-16  Bruno Haible  <bruno@clisp.org>
135049         * lib/c-strstr.c: Include c-strstr.h.
135051 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
135053         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
135054         in a slash.
135056 2006-10-18  Bruno Haible  <bruno@clisp.org>
135058         * lib/lock.h [C++]: Wrap definitions in extern "C".
135060 2006-10-18  Bruno Haible  <bruno@clisp.org>
135062         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
135063         gl_LIBOBJS list.
135065 2006-10-18  Bruno Haible  <bruno@clisp.org>
135067         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
135069 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
135071         * lib/xstrtol.h: Include gettext.h.
135072         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
135073         Problem reported by Eric Blake.
135074         * modules/xstrtol (Depends-on): Add gettext-h.
135076 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
135078         * lib/strftime.c (advance): New macro.
135079         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
135080         incomplete type, so you can't add 0 to it.  Problem and patch
135081         reported by Eelco Dolstra for dietlibc.
135083 2006-10-18  Jim Meyering  <jim@meyering.net>
135085         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
135086         type for a local, and rename it: s/up/user_proc/.
135088 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
135090         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
135091         READ_UTMP_USER_PROCESS.
135092         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
135094 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
135096         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
135097         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
135099 2006-10-17  Eric Blake  <ebb9@byu.net>
135101         * lib/sigprocmask.c (sigprocmask): Fix typo.
135103         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
135105         * modules/clean-temp (Makefile.am): Don't add to make output...
135106         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
135107         config.h.
135109 2006-10-17  Bruno Haible  <bruno@clisp.org>
135111         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
135112         differently if DEFAULT_TEXT_DOMAIN is set.
135114 2006-10-16  Bruno Haible  <bruno@clisp.org>
135116         * lib/clean-temp.c: Include fwriteerror.h.
135118 2006-10-16  Bruno Haible  <bruno@clisp.org>
135120         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
135122 2006-10-16  Bruno Haible  <bruno@clisp.org>
135124         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
135125         * lib/sigprocmask.h: Include <sys/types.h>.
135126         (sigset_t): Use the system's definition if present.
135128 2006-10-17  Eric Blake  <ebb9@byu.net>
135130         * lib/xvasprintf.c (includes): Assume config.h.
135131         * lib/xasprintf.c (includes): Likewise.
135133 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
135135         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
135136         at least as wide as intmax_t.
135138 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
135140         (Imported from Automake.)
135141         * build-aux/gnupload: Update to version 1.1 of directive file.
135143 2006-10-16  Eric Blake  <ebb9@byu.net>
135145         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
135146         match Automake 1.10a.
135148 2006-10-14  Bruno Haible  <bruno@clisp.org>
135150         * modules/sigprocmask: New file.
135151         * lib/sigprocmask.h: New file.
135152         * lib/sigprocmask.c: New file.
135153         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
135154         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
135155         request sigprocmask.o.
135156         (gl_PREREQ_SIGPROCMASK): New macro.
135157         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
135158         (Depends-on): Add sigprocmask.
135159         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
135160         gt_SIGNALBLOCKING. Test for 'raise' only once.
135161         * lib/fatal-signal.c: Include sigprocmask.h.
135162         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
135163         unblock_fatal_signals): Define always.
135164         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
135165         sigprocmask.
135167 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
135169         Sync from Automake.
135170         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
135171         which incorrectly sets the mode of an existing destination
135172         directory.  In some cases the unpatched install-sh could do the
135173         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
135174         system.  We hope this is rare in practice, but it's clearly worth
135175         fixing.  Problem reported by Alex Unleashed in
135176         <http://lists.gnu.org/r/bug-autoconf/2006-10/msg00012.html>.
135177         Also, don't bother to check for -m bugs unless we're using -m;
135178         suggested by Stepan Kasal.
135180 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
135182         Sync from Automake.
135183         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
135184         `-c' flag, so they appear at the same position as in %FASTDEP%
135185         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
135186         which ignores unknown options only after the first non-option.
135187         Bug report against M4 by Nelson H. F. Beebe.
135189 2006-10-13  Jim Meyering  <jim@meyering.net>
135191         Fix a bug in yesterday's change.
135192         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
135193         p->fts_statp->st_dev would be used uninitialized.
135194         Ensures that we always call fts_stat on the very first entry.
135195         Miklos Szeredi reported that find -xdev stopped working.
135197 2006-10-12  Bruno Haible  <bruno@clisp.org>
135199         * gnulib-tool (func_get_automake_snippet): Append an automatically
135200         computed EXTRA_DIST augmentation.
135201         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
135202         * modules/alloca-opt (Makefile.am): Likewise.
135203         * modules/allocsa (Makefile.am): Likewise.
135204         * modules/arcfour (Makefile.am): Likewise.
135205         * modules/arctwo (Makefile.am): Likewise.
135206         * modules/argmatch (Makefile.am): Likewise.
135207         * modules/argz (Makefile.am): Likewise.
135208         * modules/atexit (Makefile.am): Likewise.
135209         * modules/backupfile (Makefile.am): Likewise.
135210         * modules/byteswap (Makefile.am): Likewise.
135211         * modules/c-strtod (Makefile.am): Likewise.
135212         * modules/c-strtold (Makefile.am): Likewise.
135213         * modules/calloc (Makefile.am): Likewise.
135214         * modules/canon-host (Makefile.am): Likewise.
135215         * modules/canonicalize (Makefile.am): Likewise.
135216         * modules/chdir-long (Makefile.am): Likewise.
135217         * modules/chdir-safer (Makefile.am): Likewise.
135218         * modules/check-version (Makefile.am): Likewise.
135219         * modules/chown (Makefile.am): Likewise.
135220         * modules/cloexec (Makefile.am): Likewise.
135221         * modules/close-stream (Makefile.am): Likewise.
135222         * modules/closeout (Makefile.am): Likewise.
135223         * modules/crc (Makefile.am): Likewise.
135224         * modules/csharpexec (Makefile.am): Likewise.
135225         * modules/cycle-check (Makefile.am): Likewise.
135226         * modules/des (Makefile.am): Likewise.
135227         * modules/dev-ino (Makefile.am): Likewise.
135228         * modules/dirfd (Makefile.am): Likewise.
135229         * modules/dirname (Makefile.am): Likewise.
135230         * modules/dup2 (Makefile.am): Likewise.
135231         * modules/eealloc (Makefile.am): Likewise.
135232         * modules/error (Makefile.am): Likewise.
135233         * modules/euidaccess (Makefile.am): Likewise.
135234         * modules/exclude (Makefile.am): Likewise.
135235         * modules/exitfail (Makefile.am): Likewise.
135236         * modules/fcntl-safer (Makefile.am): Likewise.
135237         * modules/fcntl (Makefile.am): Likewise.
135238         * modules/file-type (Makefile.am): Likewise.
135239         * modules/fileblocks (Makefile.am): Likewise.
135240         * modules/filemode (Makefile.am): Likewise.
135241         * modules/filenamecat (Makefile.am): Likewise.
135242         * modules/fnmatch (Makefile.am): Likewise.
135243         * modules/fopen-safer (Makefile.am): Likewise.
135244         * modules/fpending (Makefile.am): Likewise.
135245         * modules/fprintftime (Makefile.am): Likewise.
135246         * modules/free (Makefile.am): Likewise.
135247         * modules/fsusage (Makefile.am): Likewise.
135248         * modules/ftruncate (Makefile.am): Likewise.
135249         * modules/fts (Makefile.am): Likewise.
135250         * modules/gc-arcfour (Makefile.am): Likewise.
135251         * modules/gc-des (Makefile.am): Likewise.
135252         * modules/gc-hmac-md5 (Makefile.am): Likewise.
135253         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
135254         * modules/gc-md4 (Makefile.am): Likewise.
135255         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
135256         * modules/gc-sha1 (Makefile.am): Likewise.
135257         * modules/gc (Makefile.am): Likewise.
135258         * modules/getaddrinfo (Makefile.am): Likewise.
135259         * modules/getcwd (Makefile.am): Likewise.
135260         * modules/getdelim (Makefile.am): Likewise.
135261         * modules/getdomainname (Makefile.am): Likewise.
135262         * modules/getgroups (Makefile.am): Likewise.
135263         * modules/gethostname (Makefile.am): Likewise.
135264         * modules/gethrxtime (Makefile.am): Likewise.
135265         * modules/getline (Makefile.am): Likewise.
135266         * modules/getloadavg (Makefile.am): Likewise.
135267         * modules/getlogin_r (Makefile.am): Likewise.
135268         * modules/getndelim2 (Makefile.am): Likewise.
135269         * modules/getopt (Makefile.am): Likewise.
135270         * modules/getpagesize (Makefile.am): Likewise.
135271         * modules/getpass-gnu (Makefile.am): Likewise.
135272         * modules/getpass (Makefile.am): Likewise.
135273         * modules/getsubopt (Makefile.am): Likewise.
135274         * modules/gettime (Makefile.am): Likewise.
135275         * modules/gettimeofday (Makefile.am): Likewise.
135276         * modules/getugroups (Makefile.am): Likewise.
135277         * modules/getusershell (Makefile.am): Likewise.
135278         * modules/glob (Makefile.am): Likewise.
135279         * modules/group-member (Makefile.am): Likewise.
135280         * modules/hard-locale (Makefile.am): Likewise.
135281         * modules/hash (Makefile.am): Likewise.
135282         * modules/hmac-md5 (Makefile.am): Likewise.
135283         * modules/hmac-sha1 (Makefile.am): Likewise.
135284         * modules/human (Makefile.am): Likewise.
135285         * modules/idcache (Makefile.am): Likewise.
135286         * modules/imaxabs (Makefile.am): Likewise.
135287         * modules/imaxdiv (Makefile.am): Likewise.
135288         * modules/inet_ntop (Makefile.am): Likewise.
135289         * modules/inet_pton (Makefile.am): Likewise.
135290         * modules/intprops (Makefile.am): Likewise.
135291         * modules/inttostr (Makefile.am): Likewise.
135292         * modules/inttypes (Makefile.am): Likewise.
135293         * modules/isapipe (Makefile.am): Likewise.
135294         * modules/javaversion (Makefile.am): Likewise.
135295         * modules/lchmod (Makefile.am): Likewise.
135296         * modules/lchown (Makefile.am): Likewise.
135297         * modules/localcharset (Makefile.am): Likewise.
135298         * modules/long-options (Makefile.am): Likewise.
135299         * modules/lstat (Makefile.am): Likewise.
135300         * modules/malloc (Makefile.am): Likewise.
135301         * modules/mathl (Makefile.am): Likewise.
135302         * modules/mbchar (Makefile.am): Likewise.
135303         * modules/md2 (Makefile.am): Likewise.
135304         * modules/md4 (Makefile.am): Likewise.
135305         * modules/md5 (Makefile.am): Likewise.
135306         * modules/memcasecmp (Makefile.am): Likewise.
135307         * modules/memchr (Makefile.am): Likewise.
135308         * modules/memcmp (Makefile.am): Likewise.
135309         * modules/memcoll (Makefile.am): Likewise.
135310         * modules/memcpy (Makefile.am): Likewise.
135311         * modules/memmem (Makefile.am): Likewise.
135312         * modules/memmove (Makefile.am): Likewise.
135313         * modules/mempcpy (Makefile.am): Likewise.
135314         * modules/memrchr (Makefile.am): Likewise.
135315         * modules/memset (Makefile.am): Likewise.
135316         * modules/memxor (Makefile.am): Likewise.
135317         * modules/mkancesdirs (Makefile.am): Likewise.
135318         * modules/mkdir-p (Makefile.am): Likewise.
135319         * modules/mkdir (Makefile.am): Likewise.
135320         * modules/mkdtemp (Makefile.am): Likewise.
135321         * modules/mkstemp (Makefile.am): Likewise.
135322         * modules/mktime (Makefile.am): Likewise.
135323         * modules/modechange (Makefile.am): Likewise.
135324         * modules/mountlist (Makefile.am): Likewise.
135325         * modules/nanosleep (Makefile.am): Likewise.
135326         * modules/obstack (Makefile.am): Likewise.
135327         * modules/openat (Makefile.am): Likewise.
135328         * modules/pagealign_alloc (Makefile.am): Likewise.
135329         * modules/pathmax (Makefile.am): Likewise.
135330         * modules/physmem (Makefile.am): Likewise.
135331         * modules/poll (Makefile.am): Likewise.
135332         * modules/posixtm (Makefile.am): Likewise.
135333         * modules/posixver (Makefile.am): Likewise.
135334         * modules/putenv (Makefile.am): Likewise.
135335         * modules/quote (Makefile.am): Likewise.
135336         * modules/quotearg (Makefile.am): Likewise.
135337         * modules/raise (Makefile.am): Likewise.
135338         * modules/read-file (Makefile.am): Likewise.
135339         * modules/readline (Makefile.am): Likewise.
135340         * modules/readlink (Makefile.am): Likewise.
135341         * modules/readtokens (Makefile.am): Likewise.
135342         * modules/readutmp (Makefile.am): Likewise.
135343         * modules/realloc (Makefile.am): Likewise.
135344         * modules/regex (Makefile.am): Likewise.
135345         * modules/rename-dest-slash (Makefile.am): Likewise.
135346         * modules/rename (Makefile.am): Likewise.
135347         * modules/rijndael (Makefile.am): Likewise.
135348         * modules/rmdir (Makefile.am): Likewise.
135349         * modules/rpmatch (Makefile.am): Likewise.
135350         * modules/safe-read (Makefile.am): Likewise.
135351         * modules/safe-write (Makefile.am): Likewise.
135352         * modules/same-inode (Makefile.am): Likewise.
135353         * modules/same (Makefile.am): Likewise.
135354         * modules/save-cwd (Makefile.am): Likewise.
135355         * modules/savedir (Makefile.am): Likewise.
135356         * modules/setenv (Makefile.am): Likewise.
135357         * modules/settime (Makefile.am): Likewise.
135358         * modules/sha1 (Makefile.am): Likewise.
135359         * modules/sig2str (Makefile.am): Likewise.
135360         * modules/snprintf (Makefile.am): Likewise.
135361         * modules/stat-macros (Makefile.am): Likewise.
135362         * modules/stat-time (Makefile.am): Likewise.
135363         * modules/stdbool (Makefile.am): Likewise.
135364         * modules/stdint (Makefile.am): Likewise.
135365         * modules/stdlib-safer (Makefile.am): Likewise.
135366         * modules/stpcpy (Makefile.am): Likewise.
135367         * modules/stpncpy (Makefile.am): Likewise.
135368         * modules/strcase (Makefile.am): Likewise.
135369         * modules/strcasestr (Makefile.am): Likewise.
135370         * modules/strchrnul (Makefile.am): Likewise.
135371         * modules/strcspn (Makefile.am): Likewise.
135372         * modules/strdup (Makefile.am): Likewise.
135373         * modules/strerror (Makefile.am): Likewise.
135374         * modules/strftime (Makefile.am): Likewise.
135375         * modules/strndup (Makefile.am): Likewise.
135376         * modules/strnlen (Makefile.am): Likewise.
135377         * modules/strpbrk (Makefile.am): Likewise.
135378         * modules/strsep (Makefile.am): Likewise.
135379         * modules/strstr (Makefile.am): Likewise.
135380         * modules/strtod (Makefile.am): Likewise.
135381         * modules/strtoimax (Makefile.am): Likewise.
135382         * modules/strtok_r (Makefile.am): Likewise.
135383         * modules/strtol (Makefile.am): Likewise.
135384         * modules/strtoll (Makefile.am): Likewise.
135385         * modules/strtoul (Makefile.am): Likewise.
135386         * modules/strtoull (Makefile.am): Likewise.
135387         * modules/strtoumax (Makefile.am): Likewise.
135388         * modules/strverscmp (Makefile.am): Likewise.
135389         * modules/sys_socket (Makefile.am): Likewise.
135390         * modules/sys_stat (Makefile.am): Likewise.
135391         * modules/sysexits (Makefile.am): Likewise.
135392         * modules/time_r (Makefile.am): Likewise.
135393         * modules/timegm (Makefile.am): Likewise.
135394         * modules/timespec (Makefile.am): Likewise.
135395         * modules/tmpfile-safer (Makefile.am): Likewise.
135396         * modules/trim (Makefile.am): Likewise.
135397         * modules/unistd-safer (Makefile.am): Likewise.
135398         * modules/unlinkdir (Makefile.am): Likewise.
135399         * modules/unlocked-io (Makefile.am): Likewise.
135400         * modules/userspec (Makefile.am): Likewise.
135401         * modules/utime (Makefile.am): Likewise.
135402         * modules/utimecmp (Makefile.am): Likewise.
135403         * modules/utimens (Makefile.am): Likewise.
135404         * modules/vasnprintf (Makefile.am): Likewise.
135405         * modules/vasprintf (Makefile.am): Likewise.
135406         * modules/vsnprintf (Makefile.am): Likewise.
135407         * modules/xalloc (Makefile.am): Likewise.
135408         * modules/xgetcwd (Makefile.am): Likewise.
135409         * modules/xnanosleep (Makefile.am): Likewise.
135410         * modules/xreadlink (Makefile.am): Likewise.
135411         * modules/xstrtod (Makefile.am): Likewise.
135412         * modules/xstrtol (Makefile.am): Likewise.
135413         * modules/xstrtold (Makefile.am): Likewise.
135414         * modules/yesno (Makefile.am): Likewise.
135415         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
135417 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
135419         * modules/error (Makefile.am): Distribute files through
135420         EXTRA_DIST, not lib_SOURCES.
135422 2006-10-12  Eric Blake  <ebb9@byu.net>
135424         * modules/error (Makefile.am): Distribute files in /lib.
135425         * modules/obstack (Makefile.am): Likewise.
135427 2006-10-12  Bruno Haible  <bruno@clisp.org>
135429         * modules/acl (Makefile.am): Distribute all files in lib/ through
135430         EXTRA_DIST.
135431         * modules/arcfour (Makefile.am): Likewise.
135432         * modules/arctwo (Makefile.am): Likewise.
135433         * modules/argmatch (Makefile.am): Likewise.
135434         * modules/argz (Makefile.am): Likewise.
135435         * modules/atexit (Makefile.am): Likewise.
135436         * modules/backupfile (Makefile.am): Likewise.
135437         * modules/c-strtod (Makefile.am): Likewise.
135438         * modules/c-strtold (Makefile.am): Likewise.
135439         * modules/calloc (Makefile.am): Likewise.
135440         * modules/canon-host (Makefile.am): Likewise.
135441         * modules/canonicalize (Makefile.am): Likewise.
135442         * modules/chdir-long (Makefile.am): Likewise.
135443         * modules/chdir-safer (Makefile.am): Likewise.
135444         * modules/check-version (Makefile.am): Likewise.
135445         * modules/chown (Makefile.am): Likewise.
135446         * modules/cloexec (Makefile.am): Likewise.
135447         * modules/close-stream (Makefile.am): Likewise.
135448         * modules/closeout (Makefile.am): Likewise.
135449         * modules/crc (Makefile.am): Likewise.
135450         * modules/cycle-check (Makefile.am): Likewise.
135451         * modules/des (Makefile.am): Likewise.
135452         * modules/dirfd (Makefile.am): Likewise.
135453         * modules/dirname (Makefile.am): Likewise.
135454         * modules/dup2 (Makefile.am): Likewise.
135455         * modules/euidaccess (Makefile.am): Likewise.
135456         * modules/exclude (Makefile.am): Likewise.
135457         * modules/exitfail (Makefile.am): Likewise.
135458         * modules/fcntl-safer (Makefile.am): Likewise.
135459         * modules/file-type (Makefile.am): Likewise.
135460         * modules/fileblocks (Makefile.am): Likewise.
135461         * modules/filemode (Makefile.am): Likewise.
135462         * modules/filenamecat (Makefile.am): Likewise.
135463         * modules/fnmatch (Makefile.am): Likewise.
135464         * modules/fopen-safer (Makefile.am): Likewise.
135465         * modules/fpending (Makefile.am): Likewise.
135466         * modules/fprintftime (Makefile.am): Likewise.
135467         * modules/free (Makefile.am): Likewise.
135468         * modules/fsusage (Makefile.am): Likewise.
135469         * modules/ftruncate (Makefile.am): Likewise.
135470         * modules/fts (Makefile.am): Likewise.
135471         * modules/gc (Makefile.am): Likewise.
135472         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
135473         * modules/getaddrinfo (Makefile.am): Likewise.
135474         * modules/getcwd (Makefile.am): Likewise.
135475         * modules/getdelim (Makefile.am): Likewise.
135476         * modules/getdomainname (Makefile.am): Likewise.
135477         * modules/getgroups (Makefile.am): Likewise.
135478         * modules/gethostname (Makefile.am): Likewise.
135479         * modules/gethrxtime (Makefile.am): Likewise.
135480         * modules/getline (Makefile.am): Likewise.
135481         * modules/getloadavg (Makefile.am): Likewise.
135482         * modules/getlogin_r (Makefile.am): Likewise.
135483         * modules/getopt (Makefile.am): Likewise.
135484         * modules/getpass (Makefile.am): Likewise.
135485         * modules/getpass-gnu (Makefile.am): Likewise.
135486         * modules/getsubopt (Makefile.am): Likewise.
135487         * modules/gettime (Makefile.am): Likewise.
135488         * modules/gettimeofday (Makefile.am): Likewise.
135489         * modules/getugroups (Makefile.am): Likewise.
135490         * modules/getusershell (Makefile.am): Likewise.
135491         * modules/glob (Makefile.am): Likewise.
135492         * modules/group-member (Makefile.am): Likewise.
135493         * modules/hard-locale (Makefile.am): Likewise.
135494         * modules/hash (Makefile.am): Likewise.
135495         * modules/hmac-md5 (Makefile.am): Likewise.
135496         * modules/hmac-sha1 (Makefile.am): Likewise.
135497         * modules/human (Makefile.am): Likewise.
135498         * modules/idcache (Makefile.am): Likewise.
135499         * modules/imaxabs (Makefile.am): Likewise.
135500         * modules/imaxdiv (Makefile.am): Likewise.
135501         * modules/inet_ntop (Makefile.am): Likewise.
135502         * modules/inet_pton (Makefile.am): Likewise.
135503         * modules/inttostr (Makefile.am): Likewise.
135504         * modules/isapipe (Makefile.am): Likewise.
135505         * modules/lchown (Makefile.am): Likewise.
135506         * modules/long-options (Makefile.am): Likewise.
135507         * modules/lstat (Makefile.am): Likewise.
135508         * modules/malloc (Makefile.am): Likewise.
135509         * modules/mathl (Makefile.am): Likewise.
135510         * modules/mbchar (Makefile.am): Likewise.
135511         * modules/md2 (Makefile.am): Likewise.
135512         * modules/md4 (Makefile.am): Likewise.
135513         * modules/md5 (Makefile.am): Likewise.
135514         * modules/memcasecmp (Makefile.am): Likewise.
135515         * modules/memchr (Makefile.am): Likewise.
135516         * modules/memcmp (Makefile.am): Likewise.
135517         * modules/memcoll (Makefile.am): Likewise.
135518         * modules/memcpy (Makefile.am): Likewise.
135519         * modules/memmem (Makefile.am): Likewise.
135520         * modules/memmove (Makefile.am): Likewise.
135521         * modules/mempcpy (Makefile.am): Likewise.
135522         * modules/memrchr (Makefile.am): Likewise.
135523         * modules/memset (Makefile.am): Likewise.
135524         * modules/memxor (Makefile.am): Likewise.
135525         * modules/mkancesdirs (Makefile.am): Likewise.
135526         * modules/mkdir (Makefile.am): Likewise.
135527         * modules/mkdir-p (Makefile.am): Likewise.
135528         * modules/mkdtemp (Makefile.am): Likewise.
135529         * modules/mkstemp (Makefile.am): Likewise.
135530         * modules/mktime (Makefile.am): Likewise.
135531         * modules/modechange (Makefile.am): Likewise.
135532         * modules/mountlist (Makefile.am): Likewise.
135533         * modules/nanosleep (Makefile.am): Likewise.
135534         * modules/openat (Makefile.am): Likewise.
135535         * modules/pagealign_alloc (Makefile.am): Likewise.
135536         * modules/physmem (Makefile.am): Likewise.
135537         * modules/poll (Makefile.am): Likewise.
135538         * modules/posixtm (Makefile.am): Likewise.
135539         * modules/posixver (Makefile.am): Likewise.
135540         * modules/putenv (Makefile.am): Likewise.
135541         * modules/quote (Makefile.am): Likewise.
135542         * modules/quotearg (Makefile.am): Likewise.
135543         * modules/raise (Makefile.am): Likewise.
135544         * modules/read-file (Makefile.am): Likewise.
135545         * modules/readline (Makefile.am): Likewise.
135546         * modules/readlink (Makefile.am): Likewise.
135547         * modules/readtokens (Makefile.am): Likewise.
135548         * modules/readutmp (Makefile.am): Likewise.
135549         * modules/realloc (Makefile.am): Likewise.
135550         * modules/regex (Makefile.am): Likewise.
135551         * modules/rename (Makefile.am): Likewise.
135552         * modules/rename-dest-slash (Makefile.am): Likewise.
135553         * modules/rijndael (Makefile.am): Likewise.
135554         * modules/rmdir (Makefile.am): Likewise.
135555         * modules/rpmatch (Makefile.am): Likewise.
135556         * modules/safe-read (Makefile.am): Likewise.
135557         * modules/safe-write (Makefile.am): Likewise.
135558         * modules/same (Makefile.am): Likewise.
135559         * modules/save-cwd (Makefile.am): Likewise.
135560         * modules/savedir (Makefile.am): Likewise.
135561         * modules/setenv (Makefile.am): Likewise.
135562         * modules/settime (Makefile.am): Likewise.
135563         * modules/sha1 (Makefile.am): Likewise.
135564         * modules/sig2str (Makefile.am): Likewise.
135565         * modules/snprintf (Makefile.am): Likewise.
135566         * modules/stdlib-safer (Makefile.am): Likewise.
135567         * modules/stpcpy (Makefile.am): Likewise.
135568         * modules/stpncpy (Makefile.am): Likewise.
135569         * modules/strcase (Makefile.am): Likewise.
135570         * modules/strcasestr (Makefile.am): Likewise.
135571         * modules/strchrnul (Makefile.am): Likewise.
135572         * modules/strcspn (Makefile.am): Likewise.
135573         * modules/strdup (Makefile.am): Likewise.
135574         * modules/strerror (Makefile.am): Likewise.
135575         * modules/strftime (Makefile.am): Likewise.
135576         * modules/strndup (Makefile.am): Likewise.
135577         * modules/strnlen (Makefile.am): Likewise.
135578         * modules/strpbrk (Makefile.am): Likewise.
135579         * modules/strsep (Makefile.am): Likewise.
135580         * modules/strstr (Makefile.am): Likewise.
135581         * modules/strtod (Makefile.am): Likewise.
135582         * modules/strtoimax (Makefile.am): Likewise.
135583         * modules/strtok_r (Makefile.am): Likewise.
135584         * modules/strtol (Makefile.am): Likewise.
135585         * modules/strtoll (Makefile.am): Likewise.
135586         * modules/strtoul (Makefile.am): Likewise.
135587         * modules/strtoull (Makefile.am): Likewise.
135588         * modules/strtoumax (Makefile.am): Likewise.
135589         * modules/strverscmp (Makefile.am): Likewise.
135590         * modules/time_r (Makefile.am): Likewise.
135591         * modules/timegm (Makefile.am): Likewise.
135592         * modules/tmpfile-safer (Makefile.am): Likewise.
135593         * modules/unistd-safer (Makefile.am): Likewise.
135594         * modules/unlinkdir (Makefile.am): Likewise.
135595         * modules/userspec (Makefile.am): Likewise.
135596         * modules/utime (Makefile.am): Likewise.
135597         * modules/utimecmp (Makefile.am): Likewise.
135598         * modules/utimens (Makefile.am): Likewise.
135599         * modules/vasnprintf (Makefile.am): Likewise.
135600         * modules/vasprintf (Makefile.am): Likewise.
135601         * modules/vsnprintf (Makefile.am): Likewise.
135602         * modules/xalloc (Makefile.am): Likewise.
135603         * modules/xgetcwd (Makefile.am): Likewise.
135604         * modules/xnanosleep (Makefile.am): Likewise.
135605         * modules/xreadlink (Makefile.am): Likewise.
135606         * modules/xstrtod (Makefile.am): Likewise.
135607         * modules/xstrtol (Makefile.am): Likewise.
135608         * modules/xstrtold (Makefile.am): Likewise.
135609         * modules/yesno (Makefile.am): Likewise.
135611 2006-10-12  Jim Meyering  <jim@meyering.net>
135613         * m4/getloadavg.m4: Revert the change below.
135615         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
135616         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
135617         fail with a symlink, which is what coreutils' ./bootstrap now
135618         creates by default.
135620 2006-10-12  Bruno Haible  <bruno@clisp.org>
135622         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
135623         mingw.
135624         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
135625         MSVC and mingw explicitly.
135627 2006-10-11  Simon Josefsson  <jas@extundo.com>
135628             Bruno Haible  <bruno@clisp.org>
135630         Add support for multiple gnulib-tool invocations in the scope of a
135631         single configure.ac file.
135632         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
135633         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
135634         with the same contents as the _LIBADD variable.
135635         (func_emit_initmacro_start, func_emit_initmacro_end,
135636         func_emit_initmacro_done): New functions.
135637         (func_import, func_create_testdir): Invoke them. Allow the identifiers
135638         gl_LIBOBJS and gl_LTLIBOBJS.
135640 2006-10-11  Bruno Haible  <bruno@clisp.org>
135642         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
135643         (func_create_testdir): Don't create po/Makefile.am, don't invoke
135644         autoreconf. Instead, invoke autopoint explicitly but move back the
135645         *.m4 files from gnulib.
135647 2006-10-11  Bruno Haible  <bruno@clisp.org>
135649         * gnulib-tool (func_usage): Make module names after --create-testdir
135650         optional.
135651         (func_create_testdir): If no module was specified, use nearly all
135652         modules.
135654 2006-10-12  Jim Meyering  <jim@meyering.net>
135656         Big performance improvement for fts-based tools that use FTS_NOSTAT.
135657         Avoid spurious inode-mismatch problems on non-POSIX file systems.
135658         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
135659         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
135660         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
135661         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
135662         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
135663         (fts_set_stat_required): New function.
135664         (fts_open): Defer the calls to fts_stat, if possible or requested.
135665         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
135666         into fts_stat itself.
135667         (fts_read): Perform any required (deferred) fts_stat call.
135668         (fts_build): Likewise, for the directory we're about to open and read.
135669         In the readdir loop, carefully decide whether each entry will require
135670         an eventual call to fts_stat, using dirent.d_type info if available.
135671         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
135672         a command line argument into this function.  Update all callers.
135673         Map a return value of FTS_DOT to FTS_D for a command line argument.
135674         * modules/fts (Depends-on): Add d-type.  Alphabetize.
135675         Thanks to Miklos Szeredi for his tenacity and for the initial
135676         bug report about "find" failing on a FUSE-based file system.
135678         * lib/fts.c (fts_open): Use consistent indentation.
135680 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
135682         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
135683         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
135684         reported by Jim Meyering.  All uses of cache variables renamed
135685         to match Autoconf's.
135686         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
135687         the other one.
135689         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
135690         Fix misspelling in diagnostic.
135692 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
135694         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
135695         defined.  Problem reported by Matthew Woehlke.
135697         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
135698         Add support for Tandem NonStop R series.
135699         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
135700         Use new macro.
135702         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
135703         (has_trailing_slash): Omit size arg; all callers changed.
135704         Omit 'inline', since it doesn't help performance and we'd
135705         need to configure it.
135706         Don't count //, ///, etc. as having a trailing slash.
135707         As a side effect, this removes a C99ism reported by Matthew Woehlke.
135708         (rpl_rename_dest_slash): On failure, use rename's errno rather
135709         than (in some cases) an incorrect or junk errno.
135710         Simplify code by removing need to compute length; this does
135711         cause it to make two passes instead of one over the file name,
135712         but it's worth it.
135714         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
135715         change, since Autoconf's version may no longer be appropriate now
135716         that we are using CVS Autoconf's version.  Add support for Tandem.
135718 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
135719             Bruno Haible  <bruno@clisp.org>
135721         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
135722         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
135723         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
135724         gl_AC_TYPE_LONG_LONG.
135726         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
135727         instead of HAVE_LONG_LONG.
135728         * lib/printf-args.c (printf_fetchargs): Likewise.
135729         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
135730         * lib/vasnprintf.c (VASNPRINTF): Likewise.
135731         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
135732         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
135733         gl_AC_TYPE_LONG_LONG.
135735 2006-10-11  Bruno Haible  <bruno@clisp.org>
135737         * m4/longlong.m4: Add comments.
135738         * m4/ulonglong.m4: Likewise.
135740 2006-10-10  Bruno Haible  <bruno@clisp.org>
135742         Make it possible to #define stpcpy, strdup to aliases.
135743         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
135744         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
135746 2006-10-10  Bruno Haible  <bruno@clisp.org>
135748         Make it possible to #define gcd to an alias.
135749         * lib/gcd.c: Include config.h.
135751 2006-10-10  Bruno Haible  <bruno@clisp.org>
135753         Make it possible to #define c_isascii to an alias.
135754         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
135755         defined. Undefine the macros before defining them, to avoid gcc
135756         warnings.
135757         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
135758         define NO_C_CTYPE_MACROS early.
135760 2006-10-10  Bruno Haible  <bruno@clisp.org>
135762         Make it possible to #define set_program_name to an alias.
135763         * lib/progname.c: Don't undefine set_program_name; instead, undefine
135764         ENABLE_RELOCATABLE early.
135766 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
135768         Port to Tandem NSK OSS, which has 64-bit signed int but at most
135769         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
135770         http://lists.gnu.org/r/bug-coreutils/2006-10/msg00062.html
135771         More generally, don't assume that 64-bit signed int is available
135772         if unsigned int is, and vice versa.
135773         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
135774         unsigned symbols, not on their signed counterparts.
135775         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
135776         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
135777         (UINT64_C, UINTMAX_C):
135778         Likewise.
135779         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
135780         unsigned counterparts.
135781         (Have_long_long, Unsigned): New macros.
135782         (Int): Renamed from INT.
135783         (strtoimax): Use the new macros.
135784         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
135785         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
135786         * modules/inttypes (inttypes.h): Substitute
135787         HAVE_UNSIGNED_LONG_LONG_INT.
135788         * modules/stdint (stdint.h): Likewise.
135789         (Files): Add m4/ulonglong.m4.
135791 2006-10-10  Bruno Haible  <bruno@clisp.org>
135793         Fix a gcc -Wshadow warning.
135794         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
135795         to 'bucket'.
135796         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
135797         gl_linked_indexof_from_to): Likewise.
135798         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
135799         Likewise.
135800         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
135801         Likewise.
135802         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
135803         Reported by Eric Blake.
135805 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
135807         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
135808         for NetBSD.  Problem reported by Bruno Haible.
135810 2006-10-09  Jim Meyering  <jim@meyering.net>
135812         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
135813         Patch from Bruno Haible.
135815 2006-10-09  Jim Meyering  <jim@meyering.net>
135817         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
135818         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
135819         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
135821 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
135823         Don't include <config.h> twice; this doesn't work in some cases,
135824         e.g., when config.h has "#define intmax_t long long int" and
135825         we include <config.h>, <inttypes.h>, <config.h> in that order.
135826         Problem reported by Matthew Woehlke in:
135827         http://lists.gnu.org/r/bug-coreutils/2006-10/msg00073.html
135828         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
135829         * lib/fts-cycle.c: Don't include config.h.
135830         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
135831         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
135832         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
135833         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
135834         inttypes.h.
135835         * lib/xstrtoumax.c: Likewise.
135836         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
135837         __strtol and the like, so that this module is more like its siblings.
135838         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
135839         Remove; no longer needed now that we assume gnulib inttypes.h.
135841 2006-10-08  Bruno Haible  <bruno@clisp.org>
135843         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
135844         option.
135846 2006-10-07  Jim Meyering  <jim@meyering.net>
135848         * modules/inttypes (inttypes.h): Revert what seems to have been
135849         an inadvertent part of today's change: use "|", not "/" in the
135850         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
135852 2006-10-07  Bruno Haible  <bruno@clisp.org>
135854         * modules/sublist: New file.
135856 2006-10-07  Bruno Haible  <bruno@clisp.org>
135858         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
135859         * modules/argz (argz.h): Likewise.
135860         * modules/arpa_inet (arpa/inet.h): Likewise.
135861         * modules/byteswap (byteswap.h): Likewise.
135862         * modules/configmake (configmake.h): Likewise.
135863         * modules/fcntl (fcntl.h): Likewise.
135864         * modules/fnmatch (fnmatch.h): Likewise.
135865         * modules/getopt (getopt.h): Likewise.
135866         * modules/glob (glob.h): Likewise.
135867         * modules/inttypes (inttypes.h): Likewise.
135868         * modules/netinet_in (netinet/in.h): Likewise.
135869         * modules/poll (poll.h): Likewise.
135870         * modules/stdbool (stdbool.h): Likewise.
135871         * modules/stdint (stdint.h): Likewise.
135872         * modules/sys_select (sys/select.h): Likewise.
135873         * modules/sys_socket (sys/socket.h): Likewise.
135874         * modules/sys_stat (sys/stat.h): Likewise.
135875         * modules/sysexits (sysexits.h): Likewise.
135876         * modules/unistd (unistd.h): Likewise.
135877         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
135878         Add a "DO NOT EDIT" comment to the generated file.
135879         (func_import): Likewise for gnulib-comp.m4.
135881 2006-10-07  Bruno Haible  <bruno@clisp.org>
135883         * lib/gl_sublist.h: New file.
135884         * lib/gl_sublist.c: New file.
135886 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
135888         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
135889         name (relative to the original working directory) and the file
135890         name component (relative to the temporary working directory).  All
135891         callers changed.
135892         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
135893         * lib/mkdir-p.c (make_dir_parents): Likewise.
135894         * lib/mkdir-p.h (make_dir_parents): Likewise.
135896 2006-10-06  Eric Blake  <ebb9@byu.net>
135898         Define several macros for use by the clean-temp module.
135899         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
135900         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
135901         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
135903         * lib/clean-temp.h (close_stream_temp): New declaration.
135904         * lib/clean-temp.c (includes): Pull in headers according to what
135905         other modules are in use.
135906         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
135908 2006-10-06  Bruno Haible  <bruno@clisp.org>
135910         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
135911         instead of fopen, fwriteerror.
135913 2006-10-06  Bruno Haible  <bruno@clisp.org>
135915         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
135916         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
135917         int.
135918         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
135919         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
135920         Return an error indicator.
135921         Suggested by Eric Blake.
135923 2006-10-06  Bruno Haible  <bruno@clisp.org>
135925         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
135926         Reported by Eric Blake.
135928 2006-10-06  Bruno Haible  <bruno@clisp.org>
135930         * modules/closeout (Description): Mention stderr too.
135932 2006-10-06  Bruno Haible  <bruno@clisp.org>
135933         and Paul Eggert  <eggert@cs.ucla.edu>
135935         * lib/closeout.c (close_stdout): Also close stderr.
135936         * lib/closeout.h: Update comment.
135938 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
135940         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
135941         <http://lists.gnu.org/r/bug-coreutils/2006-10/msg00063.html>.
135942         * lib/dirchownmod.c: Include lchown.h.
135943         * lib/lchown.c: Don't include files that lchown.h now includes.
135944         Don't declare chown, since lchown.h now does that.
135945         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
135946         (lchown): Define to rpl_chown if lchown is declared but
135947         does not exist.  Declare using a prototype if lchown is not
135948         declared.  Add a copyright notice.
135949         * lib/mkstemp.h: Include <unistd.h>.
135950         * lib/openat.c: Include lchown.h.
135952         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
135953         we now test for that separately.
135954         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
135955         rather than O_NOFOLLOW, when testing whether it's possible to
135956         avoid a race condition reliably.
135957         * lib/savewd.c (savewd_chdir): Likewise.
135959         Remove macros that are no longer needed now that stdint.h is
135960         reliable.
135961         * lib/fsusage.c (UINTMAX_MAX): Remove.
135962         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
135963         * lib/utimecmp.c (SIZE_MAX): Remove.
135965         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
135967         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
135968         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
135969         O_NOATIME works.
135971 2006-10-05  Bruno Haible  <bruno@clisp.org>
135973         * lib/gl_list.h (gl_sortedlist_search_from_to,
135974         gl_sortedlist_indexof_from_to): New declarations.
135975         (gl_list_implementation): New fields sortedlist_search_from_to,
135976         sortedlist_indexof_from_to.
135977         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
135978         inline functions.
135979         * lib/gl_list.c (gl_sortedlist_search_from_to,
135980         gl_sortedlist_indexof_from_to): New functions.
135981         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
135982         function.
135983         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
135984         (gl_array_sortedlist_search_from_to): New function.
135985         (gl_array_list_implementation): Update.
135986         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
135987         function.
135988         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
135989         (gl_carray_sortedlist_search_from_to): New function.
135990         (gl_carray_list_implementation): Update.
135991         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
135992         gl_linked_sortedlist_indexof_from_to): New functions.
135993         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
135994         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
135995         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
135996         gl_tree_sortedlist_indexof_from_to): New functions.
135997         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
135998         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
135999         Update.
136000         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
136001         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
136002         Update.
136004 2006-10-05  Bruno Haible  <bruno@clisp.org>
136006         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
136007         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
136008         (struct gl_list_implementation): Add fields search_from_to,
136009         indexof_from_to. Remove fields search, indexof.
136010         (gl_list_search): Use the search_from_to method.
136011         (gl_list_search_from, gl_list_search_from_to): New functions.
136012         (gl_list_indexof): Use the indexof_from_to method.
136013         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
136014         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
136015         (gl_list_search_from, gl_list_search_from_to): New functions.
136016         (gl_list_indexof): Use the indexof_from_to method.
136017         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
136018         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
136019         gl_array_indexof. Add start_index, end_index arguments.
136020         (gl_array_search_from_to): Renamed from gl_array_search. Add
136021         start_index, end_index arguments.
136022         (gl_array_remove, gl_array_list_implementation): Update.
136023         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
136024         gl_carray_indexof. Add start_index, end_index arguments.
136025         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
136026         start_index, end_index arguments.
136027         (gl_carray_remove, gl_carray_list_implementation): Update.
136028         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
136029         gl_linked_search. Add start_index, end_index arguments.
136030         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
136031         start_index, end_index arguments.
136032         (gl_linked_remove): Update.
136033         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
136034         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
136035         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
136036         field to 'size_t'.
136037         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
136038         gl_tree_search. Add start_index, end_index arguments.
136039         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
136040         start_index, end_index arguments.
136041         (gl_tree_remove): Update.
136042         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
136043         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
136044         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
136045         function.
136046         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
136047         gl_tree_search. Add start_index, end_index arguments.
136048         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
136049         start_index, end_index arguments.
136050         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
136051         Update.
136052         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
136054 2006-10-05  Bruno Haible  <bruno@clisp.org>
136056         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
136058         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
136059         fwriteerror_temp): New declarations.
136060         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
136061         (descriptors): New variable.
136062         (cleanup): First, close the descriptors.
136063         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
136064         fclose_temp, fwriteerror_temp): New functions.
136066 2006-10-04  Jim Meyering  <jim@meyering.net>
136068         * lib/fts.c (fts_open): Tiny comment change.
136070 2006-10-04  Bruno Haible  <bruno@clisp.org>
136072         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
136073         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
136074         gl_LOCK_BODY.
136075         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
136076         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
136077         gl_LOCK_EARLY_BODY.
136078         (gl_LOCK): Require gl_LOCK_BODY.
136080 2006-10-04  Bruno Haible  <bruno@clisp.org>
136082         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
136083         (gl_oset_search_atleast): New declaration.
136084         (struct gl_oset_implementation): Add field 'search_atleast'.
136085         (gl_oset_search_atleast): New inline function.
136086         * lib/gl_oset.c (gl_oset_search_atleast): New function.
136087         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
136088         (gl_array_oset_implementation): Update.
136089         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
136090         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
136091         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
136093 2006-10-04  Bruno Haible  <bruno@clisp.org>
136095         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
136097 2006-10-03  Bruno Haible  <bruno@clisp.org>
136099         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
136100         from gl_avltreehash_list_implementation.
136102 2006-10-03  Bruno Haible  <bruno@clisp.org>
136104         * lib/gl_oset.c (gl_oset_add): Fix return type.
136106 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
136108         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
136110 2006-10-02  Eric Blake  <ebb9@byu.net>
136112         * modules/strnlen (Depends-on): Add extensions.
136114 2006-10-02  Eric Blake  <ebb9@byu.net>
136116         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
136117         definition in 2.60+.
136119 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
136121         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
136122         checks.
136124 2006-10-02  Bruno Haible  <bruno@clisp.org>
136126         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
136127         to the AUTOMAKE_OPTIONS.
136128         Reported by Jim Meyering.
136130 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
136132         Work around bug in Solaris 10 /proc file system:
136133         /proc/self/fd/NNN/.. isn't the parent directory of
136134         the directory whose file descriptor is NNN.  This needs to
136135         be worked around at run time, not compile time, since a
136136         program might be built on Solaris 8, where things work, and
136137         run on Solaris 10.
136138         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
136139         to use the following interface instead:
136140         (OPENAT_BUFFER_SIZE): New macro.
136141         (openat_proc_name): New function.
136142         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
136143         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
136144         Likewise.
136145         * lib/openat-proc.c: New file.
136146         * modules/openat (Files): Add lib/openat-proc.c.
136147         (Depends-on): Add same-inode, stdbool.
136148         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
136150 2006-09-29  Bruno Haible  <bruno@clisp.org>
136152         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
136153         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
136154         argument. Set stdout_closed before testing for ferror, not after.
136155         (fwriteerror, fwriteerror_no_ebadf): New functions.
136157 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
136159         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
136161 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
136163         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
136164         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
136166 2006-09-28  Jim Meyering  <jim@meyering.net>
136168         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
136169         Include <unistd.h>.
136171 2006-09-28  Bruno Haible  <bruno@clisp.org>
136173         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
136174         * modules/linkedhash-list (Depends-on): Likewise.
136175         * modules/rbtreehash-list (Depends-on): Likewise.
136177 2006-09-28  Bruno Haible  <bruno@clisp.org>
136179         * lib/strndup.h: Simplify the redefinition of strndup.
136180         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
136181         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
136183 2006-09-28  Bruno Haible  <bruno@clisp.org>
136185         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
136186         * lib/gl_linkedhash_list.c: Likewise.
136187         * lib/gl_rbtreehash_list.c: Likewise.
136189 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
136191         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
136192         getaddrinfo.
136194         * lib/__fpending.h: Don't include <stdio_ext.h> unless
136195         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
136196         it causes <stdio_ext.h> to cause a compile-time error.
136197         Problem reported by Nelson H. F. Beebe.
136198         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
136199         of HAVE_DECL___PENDING.
136201         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
136202         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
136203         declaration.
136205 2006-09-27  Jim Meyering  <jim@meyering.net>
136207         This file could end up with a definition for a function
136208         named __strndup, rather than rpl_strndup on a system with
136209         incomplete weak_alias support.
136210         * lib/strndup.c (strndup): Rename from __strndup.
136211         Remove #defines that used to map __strndup to strndup.
136212         Don't use K&R prototypes.
136213         Remove LIBC-related code, since this file is not sync'd with glibc.
136214         * lib/strndup.h: Revamp, accordingly.
136215         * m4/strndup.m4: Modernize.
136217 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
136219         * modules/savewd (Depends-on): Add 'raise'.
136220         * lib/savewd.c: Include <signal.h>, for 'raise'.
136222 2006-09-26  Jim Meyering  <jim@meyering.net>
136224         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
136225         when we detect Darwin 8.7.0's acl_get_file bug.
136226         Rearrange to perform the new (below) run-test while $LIBS
136227         contains any acl-related library.  Set USE_ACL at the end.
136228         (gl_ACL_GET_FILE): New function.
136230 2006-09-26  Eric Blake  <ebb9@byu.net>
136232         * lib/verror.c: Include <config.h> unconditionally.
136234 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
136236         * modules/clock-time (Maintainer): Add self.
136237         * modules/getlogin_r (Depends-on): Add extensions.
136239 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
136241         * modules/clock-time: New module.
136242         * modules/nanosleep (Depends-on): Add clock-time.
136243         * modules/gethrxtime (Depends-on): Likewise.
136244         * modules/gettime (Depends-on): Likewise.
136245         * modules/settime (Depends-on): Likewise.
136247         * modules/fts-lgpl: Depend on openat.
136248         * modules/mkancesdirs: Depend on savewd.
136249         * modules/mkdir-p: Likewise.
136251 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
136253         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
136255         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
136256         `gl_have_arbitrary_file_name_length_limit' to
136257         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
136258         actually works between configure runs.
136260 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
136261             Bruno Haible  <bruno@clisp.org>
136263         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
136265 2006-09-25  Jim Meyering  <jim@meyering.net>
136267         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
136268         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
136270 2006-09-25  Eric Blake  <ebb9@byu.net>
136272         * gnulib-tool (func_import, func_create_testdir): Fix typos in
136273         exec's in 2006-09-18 patch when shuffling fds.
136275 2006-09-25  Bruno Haible  <bruno@clisp.org>
136277         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
136278         Reported by Jim Meyering.
136280 2006-09-24  Jim Meyering  <jim@meyering.net>
136282         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
136283         compare a pointer against a literal "0".  That caused failures with
136284         at least HP-UX's hpcc.
136286 2006-09-22  Simon Josefsson  <jas@extundo.com>
136288         * modules/gc-sha1:
136289         * modules/gc-md4:
136290         * modules/gc-hmac-sha1:
136291         * modules/gc-hmac-md5:
136292         * modules/gc-des:
136293         * modules/gc-arcfour: Distribute more files.
136295 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
136297         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
136298         (gl_linked_iterator_from_to): Initialize struct completely.
136299         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
136300         (gl_tree_iterator_from_to): Likewise
136301         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
136302         * lib/gl_array_list.c [lint] (gl_array_iterator)
136303         (gl_array_iterator_from_to): Likewise.
136304         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
136305         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
136306         (gl_carray_iterator_from_to): Likewise.
136308         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
136309         * lib/md4.c (md4_process_block): Remove unused variable.
136310         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
136311         parentheses for clarity.
136313 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
136315         * modules/bison-i18n (Depends-on): Add gettext.
136317 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
136319         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
136320         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
136321         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
136322         also add missing comma that caused broken test.
136323         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
136324         stdlib.h, for `abort'.
136325         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
136326         variables.
136327         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
136328         include unistd.h if present, for `rmdir'.
136329         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
136330         variables.
136331         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
136332         in the process include standard headers for prototypes.
136333         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
136334         gets declared on GNU/Linux.
136335         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
136336         unistd.h, for `rmdir'.
136337         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
136339         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
136340         always true.
136341         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
136343         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
136345 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
136347         * gnulib-tool (func_version): Create output all at once.  This
136348         may help avoid triggering unnecessary SIGPIPEs, and at any
136349         rate it doesn't hurt.
136351 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
136352             Bruno Haible  <bruno@clisp.org>
136354         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
136355         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
136356         * m4/signed.m4 (bh_C_SIGNED): Likewise.
136358         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
136359         (gl_FUNC_VASPRINTF): Invoke it.
136361 2006-09-22  Bruno Haible  <bruno@clisp.org>
136363         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
136364         getloadavg.c as first argument.
136366 2006-09-22  Bruno Haible  <bruno@clisp.org>
136368         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
136369         at the beginning of the gl_INIT macro.
136370         * modules/getloadavg (configure.ac): Pass $gl_source_base to
136371         gl_GETLOADAVG.
136373 2006-09-22  Bruno Haible  <bruno@clisp.org>
136375         * gnulib-tool (func_create_megatestdir): Don't include the config-h
136376         module.
136377         Suggested by Ralf Wildenhues.
136379 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
136381         Import this patch from libc:
136383         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
136385         * lib/regex_internal.c (re_string_reconstruct): Handle
136386         offset < pstr->valid_raw_len && pstr->offsets_needed case.
136387         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
136388         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
136389         re_string_context_at.
136391         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
136392         now requires it.
136393         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
136394         gl_REGEX now does it for us.
136395         (gl_REGEX): Add test taken from
136396         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
136398         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
136399         Check that large offsets work.  Modernize Autoconf usages.
136400         Prefer "yes" to mean a good thing rather than a bad.
136401         Don't put "#define mkstemp" in config.h, as this might interfere
136402         with standard system headers that "#define mkstemp mkstemp64".
136404         * modules/mkstemp (Depends-on): Add extensions, so that
136405         mkstemp is visible on some platforms.
136406         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
136407         (Include): Change to "mkstemp.h" from <stdlib.h>.
136408         (Files): Add mkstemp.h.
136410         * lib/mkstemp.h: New file, since some standard headers
136411         #define mkstemp.
136412         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
136413         Include "mkstemp.h".
136414         Make the _LIBC code resemble glibc original more,
136415         e.g., use K&R style.
136416         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
136417         (mkstemp): Remove, since mkstemp.h does this for us.
136418         * lib/stdlib--.h: Include mkstemp.h.
136420         Import this patch from libc:
136422         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
136424         * lib/tempname.c (__gen_tempname): Change attempts_min
136425         into a macro.  Use preprocessor to decide how to initialize
136426         attempts [Coverity CID 67].
136428 2006-09-20  Bruno Haible  <bruno@clisp.org>
136430         * lib/mkdtemp.c: Import from libc.
136431         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
136432                 * sysdeps/posix/tempname.c (__gen_tempname): Change
136433                 attempts_min into a macro.  Use preprocessor to decide how to
136434                 initialize attempts [Coverity CID 67].
136435         2001-11-27  Paul Eggert  <eggert@twinsun.com>
136436                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
136437                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
136439 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
136441         * gnulib-tool (func_exit): New function, to allow to pass the
136442         exit status portably through the trap.  Use everywhere.
136443         (--help, --version): Signal a write error.
136444         (trap): catch SIGPIPE, for write errors.
136445         Exit at the end of the trap, with the correct exit status.
136447 2006-09-19  Karl Berry  <karl@gnu.org>
136449         * doc/gnulib.texi: note about the license texinfo files.
136451 2006-09-19  Eric Blake  <ebb9@byu.net>
136453         * gnulib-tool: Avoid space-tab.
136455 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
136457         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
136458         that prevented coreutils 6.1 from building.  Problem reported
136459         by Petter Reinholdtsen.
136461 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
136463         * gnulib-tool (avoidlist): Fix typo that broke options like
136464         --avoid=lock that are used by coreutils bootstrap.
136466 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
136468         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
136469         more systematically.
136471 2006-09-18  Jim Meyering  <jim@meyering.net>
136473         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
136475 2006-09-18  Bruno Haible  <bruno@clisp.org>
136477         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
136479 2006-09-18  Bruno Haible  <bruno@clisp.org>
136481         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
136482         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
136483         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
136484         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
136485         * m4/gettext.m4: Require autoconf >= 2.52.
136486         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
136487         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
136488         of gl_cv_header_inttypes_h.
136490 2006-09-18  Bruno Haible  <bruno@clisp.org>
136492         * lib/javaversion.c: Include configmake.h.
136494 2006-09-18  Bruno Haible  <bruno@clisp.org>
136496         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
136497         avoid that the while loops be executed in a subshell.
136499 2006-09-18  Bruno Haible  <bruno@clisp.org>
136501         * MODULES.html.sh (func_module): Break long lines.
136502         Suggested by Bruce Korb <bkorb@gnu.org>.
136504 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
136506         Speed up by a factor of 1.12.
136507         * gnulib-tool (nl): New variable.
136508         (func_import): Rewrite include directive extraction to only read each
136509         directive once.
136511 2006-09-17  Bruno Haible  <bruno@clisp.org>
136513         * modules/javaversion (Makefile.am): Remove DEFS setting.
136514         (Depends-on): Add configmake, for PKGDATADIR definition.
136516 2006-09-17  Bruno Haible  <bruno@clisp.org>
136518         * gnulib-tool (func_create_testdir): Rewrite all files at once.
136520 2006-09-17  Bruno Haible  <bruno@clisp.org>
136522         * gnulib-tool (func_append): New function, stolen from libtool.m4.
136523         (func_modules_transitive_closure, func_modules_add_dummy,
136524         func_modules_to_filelist, func_import, func_create_testdir,
136525         func_create_megatestdir, ...): Use it wherever possible.
136526         Suggested by Ralf Wildenhues.
136528 2006-09-16  Karl Berry  <karl@gnu.org>
136530         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
136531         to avoid sectioning errors.
136532         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
136533         [ifinfo]: blank line after @center-ed titles.
136534         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
136535         Spell FSF address consistently with others.
136536         (These changes approved by rms.)
136538 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
136540         Speed up by a factor of 1.61.
136541         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
136542         already checked module names again.
136544 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
136546         Speed up by a factor of 1.13.
136547         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
136548         for new_files, and the input to func_add_or_update.
136550 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
136552         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
136553         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
136555 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
136557         * modules/mkancesdirs (Depends-on): Add fcntl.
136558         * modules/savewd: New file.
136559         * MODULES.html.sh (File system functions): Add savewd.
136561         * modules/configmake (Makefile.am): Add support for the
136562         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
136564 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
136566         * m4/savewd.m4: New file.
136568 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
136570         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
136571         (dirchownmod): New arg FD.  All callers changed.
136572         Use FD rather than opening the directory ourself, as opening is
136573         now the caller's responsibility.
136574         * lib/dirchownmod.h: Likewise.
136575         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
136576         hosts that require <sys/types.h> before <sys/stat.h>.  Include
136577         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
136578         (test_dir): Remove.
136579         (mkancesdirs): Return length of prefix of FILE that has already
136580         been made, or -2 if there is a child doing the work.  Redo
136581         algorithm so that it is O(N) rather than O(N**2).  Optimize away
136582         ".", and treat ".." specially since it might stray back into
136583         already-created areas.  Use a subprocess if necessary.  New arg
136584         WD; all users changed.  MAKE_DIR function should now return 1
136585         if it creates a directory that is not readable.  Return -2 if
136586         a child process is spun off.
136587         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
136588         Adjust signature to match code.
136589         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
136590         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
136591         all users changed.
136592         * lib/savewd.c, lib/savewd.h: New files.
136594 2006-09-15  Jim Meyering  <jim@meyering.net>
136596         * modules/rename-dest-slash: New module.
136597         * MODULES.html.sh (posix_compat): Add it here.
136599         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
136601 2006-09-15  Jim Meyering  <jim@meyering.net>
136603         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
136604         file.
136606         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
136608 2006-09-15  Jim Meyering  <jim@meyering.net>
136610         * lib/rename-dest-slash.c (has_trailing_slash): Use
136611         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
136612         (rpl_rename_dest_slash): Perform the cheaper trailing slash
136613         test before testing whether SRC is a directory.
136614         Suggestions from Bruno Haible.
136616         Avoid a warning about an unused variable.
136617         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
136618         into the #ifdef block where it's used.
136620         * lib/rename-dest-slash.c: New file.
136622 2006-09-14  Bruno Haible  <bruno@clisp.org>
136624         * lib/allocsa.c: Include <config.h> unconditionally.
136625         * lib/asnprintf.c: Likewise.
136626         * lib/asprintf.c: Likewise.
136627         * lib/c-strcasecmp.c: Likewise.
136628         * lib/c-strcasestr.c: Likewise.
136629         * lib/c-strncasecmp.c: Likewise.
136630         * lib/c-strstr.c: Likewise.
136631         * lib/classpath.c: Likewise.
136632         * lib/clean-temp.c: Likewise.
136633         * lib/concatpath.c: Likewise.
136634         * lib/copy-file.c: Likewise.
136635         * lib/csharpcomp.c: Likewise.
136636         * lib/csharpexec.c: Likewise.
136637         * lib/execute.c: Likewise.
136638         * lib/fatal-signal.c: Likewise.
136639         * lib/findprog.c: Likewise.
136640         * lib/fwriteerror.c: Likewise.
136641         * lib/gl_array_list.c: Likewise.
136642         * lib/gl_array_oset.c: Likewise.
136643         * lib/gl_avltree_list.c: Likewise.
136644         * lib/gl_avltree_oset.c: Likewise.
136645         * lib/gl_avltreehash_list.c: Likewise.
136646         * lib/gl_carray_list.c: Likewise.
136647         * lib/gl_linked_list.c: Likewise.
136648         * lib/gl_linkedhash_list.c: Likewise.
136649         * lib/gl_list.c: Likewise.
136650         * lib/gl_oset.c: Likewise.
136651         * lib/gl_rbtree_list.c: Likewise.
136652         * lib/gl_rbtree_oset.c: Likewise.
136653         * lib/gl_rbtreehash_list.c: Likewise.
136654         * lib/imaxabs.c: Likewise.
136655         * lib/imaxdiv.c: Likewise.
136656         * lib/javacomp.c: Likewise.
136657         * lib/javaexec.c: Likewise.
136658         * lib/javaversion.c: Likewise.
136659         * lib/linebreak.c: Likewise.
136660         * lib/localcharset.c: Likewise.
136661         * lib/lock.c: Likewise.
136662         * lib/mbchar.c: Likewise.
136663         * lib/mbswidth.c: Likewise.
136664         * lib/mkdtemp.c: Likewise.
136665         * lib/pipe.c: Likewise.
136666         * lib/printf-args.c: Likewise.
136667         * lib/printf-parse.c: Likewise.
136668         * lib/progname.c: Likewise.
136669         * lib/progreloc.c: Likewise.
136670         * lib/readlink.c: Likewise.
136671         * lib/sh-quote.c: Likewise.
136672         * lib/stpcpy.c: Likewise.
136673         * lib/stpncpy.c: Likewise.
136674         * lib/strcasecmp.c: Likewise.
136675         * lib/strcasestr.c: Likewise.
136676         * lib/strcspn.c: Likewise.
136677         * lib/striconv.c: Likewise.
136678         * lib/strncasecmp.c: Likewise.
136679         * lib/strnlen1.c: Likewise.
136680         * lib/strstr.c: Likewise.
136681         * lib/strtok_r.c: Likewise.
136682         * lib/tls.c: Likewise.
136683         * lib/tmpdir.c: Likewise.
136684         * lib/unicodeio.c: Likewise.
136685         * lib/unsetenv.c: Likewise.
136686         * lib/vasnprintf.c: Likewise.
136687         * lib/vasprintf.c: Likewise.
136688         * lib/wait-process.c: Likewise.
136689         * lib/xallocsa.c: Likewise.
136690         * lib/xsetenv.c: Likewise.
136691         * lib/xstriconv.c: Likewise.
136693 2006-09-13  Simon Josefsson  <jas@extundo.com>
136695         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
136696         that internally, suggested by Ralf Wildenhues
136697         <Ralf.Wildenhues@gmx.de>.
136699 2006-09-13  Simon Josefsson  <jas@extundo.com>
136701         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
136702         @LIBOBJS@.
136703         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
136705 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
136707         * lib/_fpending.c: Include <config.h> unconditionally, since we no
136708         longer worry about uses that don't define HAVE_CONFIG_H.
136709         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
136710         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
136711         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
136712         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
136713         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
136714         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
136715         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
136716         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
136717         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
136718         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
136719         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
136720         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
136721         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
136722         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
136723         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
136724         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
136725         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
136726         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
136727         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
136728         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
136729         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
136730         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
136731         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
136732         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
136733         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
136734         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
136735         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
136736         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
136737         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
136738         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
136739         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
136740         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
136741         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
136742         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
136743         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
136744         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
136745         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
136746         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
136747         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
136748         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
136749         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
136750         Likewise.
136752 2006-09-13  Eric Blake  <ebb9@byu.net>
136754         * lib/getopt.c: Fix typo in last commit.
136756 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
136758         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
136759         dgettext.
136761 2006-09-12  Jim Meyering  <jim@meyering.net>
136763         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
136764         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
136765         Reported by Nelson H. F. Beebe.
136767 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
136769         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
136770         program_invocation_name and program_invocation_short_name are
136771         initialized.
136772         * lib/argp-namefrob.h: Move declarations of program_invocation_name
136773         and program_invocation_short_name to argp.h, so they are visible
136774         to user programs.
136775         * lib/argp.h: Likewise
136777 2006-09-10  Bruno Haible  <bruno@clisp.org>
136779         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
136780         m4/inttypes_h.m4, m4/uintmax_t.m4.
136782 2006-09-10  Bruno Haible  <bruno@clisp.org>
136784         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
136785         gl_AC_TYPE_UINTMAX_T.
136787 2006-09-10  Bruno Haible  <bruno@clisp.org>
136789         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
136791 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
136793         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
136794         convention.  Text proposed by Bruno Haible.
136795         (struct argp_option): Document the use of N_() wrappers.
136797         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
136798         '\v', and translate the two parts separately, instead of feeding
136799         the whole string to gettext.  This allows to exclude
136800         '\v' from the strings visible to the translator by writing doc
136801         strings as N_("..") "\v" N_("..").
136803 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
136805         * config/srclist.txt: Undo latest change; the bug was fixed.
136807 2006-09-09  Bruno Haible  <bruno@clisp.org>
136809         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
136810         assignments if building a library without libtool.
136811         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
136812         in func_emit_lib_Makefile_am.
136813         (func_import): When building a static library libfoo.a, arrange to
136814         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
136815         (func_create_testdir): Likewise.
136816         * modules/gc (configure.ac, Makefile.am): If building statically,
136817         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
136818         * modules/iconvme (configure.ac, Makefile.am): Likewise.
136819         * modules/striconv (configure.ac, Makefile.am): Likewise.
136820         Based on a suggestion by Ralf Wildenhues.
136822 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
136824         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
136825         Check for unistd.h too, since Autoconf doesn't assume POSIX.
136826         Also:
136828         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
136829         Add year_2050_test to catch glibc bug 2821
136830         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
136832         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
136833         Prefer #ifdef to #if.
136835         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
136836         Return from 'main' instead of calling 'exit'.
136838 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
136840         * lib/mktime.c (guess_time_tm): Fix bug where mktime
136841         returned the maximum time_t value rather than (time_t) -1.
136842         Problem originally reported by William Bardwell
136843         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
136845         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
136846         Moved to here ...
136847         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
136848         ... from here.
136850 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
136852         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
136853         2821 is fixed.
136855 2006-09-08  Jim Meyering  <jim@meyering.net>
136857         Don't make generated files read-only.  That would bother too many
136858         people.  However, do retain the ability to work when targets are
136859         read-only: remove the destination and temporary files before writing
136860         them (when generated via sed or echo), or by using the -f option for
136861         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
136862         * modules/alloca-opt, modules/argz, modules/arpa_inet:
136863         * modules/byteswap, modules/configmake, modules/fcntl:
136864         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
136865         * modules/localcharset, modules/netinet_in, modules/poll:
136866         * modules/stdbool, modules/stdint, modules/sys_select:
136867         * modules/sys_socket, modules/sys_stat, modules/sysexits:
136869 2006-09-08  Jim Meyering  <jim@meyering.net>
136871         Avoid new build failure on FreeBSD 6.0.
136872         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
136873         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
136874         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
136876 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
136878         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
136880 2006-09-07  Jim Meyering  <jim@meyering.net>
136882         Fix global typo in last change: use chmod u-w, not chmod u-x.
136883         Spotted by Paul Eggert and Bruce Korb.
136884         * modules/alloca-opt, modules/argz, modules/arpa_inet:
136885         * modules/byteswap, modules/configmake, modules/fcntl:
136886         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
136887         * modules/localcharset, modules/netinet_in, modules/poll:
136888         * modules/stdbool, modules/stdint, modules/sys_select:
136889         * modules/sys_socket, modules/sys_stat, modules/sysexits:
136891 2006-09-06  Jim Meyering  <jim@meyering.net>
136893         Make generated files be read-only.
136894         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
136895         Ensure that each generated file is now read-only.
136896         * modules/argz: Likewise.
136897         * modules/arpa_inet: Likewise.
136898         * modules/byteswap: Likewise.
136899         * modules/configmake: Likewise.
136900         * modules/fcntl: Likewise.
136901         * modules/fnmatch: Likewise.
136902         * modules/getopt: Likewise.
136903         * modules/glob: Likewise.
136904         * modules/inttypes: Likewise.
136905         * modules/netinet_in: Likewise.
136906         * modules/poll: Likewise.
136907         * modules/stdbool: Likewise.
136908         * modules/stdint: Likewise.
136909         * modules/sys_select: Likewise.
136910         * modules/sys_socket: Likewise.
136911         * modules/sys_stat: Likewise.
136912         * modules/sysexits: Likewise.
136913         * modules/localcharset: Same as above, but continue using temporary
136914         file named "t-$@" (why different?) rather than the "$@-t" used
136915         everywhere else.
136917         * modules/sysexits (Makefile.am): Replace literal occurrences
136918         of "sysexit.h" more readable, and more consistent, "$@".
136920 2006-09-06  Bruno Haible  <bruno@clisp.org>
136922         * modules/striconv: New file.
136923         * modules/xstriconv: New file.
136924         * MODULES.html.sh (Internationalization functions): Add striconv,
136925         xstriconv.
136927 2006-09-06  Bruno Haible  <bruno@clisp.org>
136929         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
136930         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
136931         not using libtool correctly.
136933 2006-09-06  Bruno Haible  <bruno@clisp.org>
136935         * lib/striconv.h: New file.
136936         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
136937         iconvstring.c.
136938         * lib/xstriconv.h: New file.
136939         * lib/xstriconv.c: New file.
136941 2006-09-06  Bruno Haible  <bruno@clisp.org>
136943         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
136944         lib_..._LDFLAGS.
136946 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
136948         * lib/argz_.h: Sync from Libtool.
136950         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
136951                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
136953         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
136955 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
136957         * modules/trim: New file.
136959 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
136961         * lib/trim.h: New file.
136962         * lib/trim.c: New file.
136964 2006-09-05  Bruno Haible  <bruno@clisp.org>
136966         * MODULES.html.sh (String handling): Add trim.
136968 2006-09-04  Karl Berry  <karl@gnu.org>
136970         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
136971         until next release.
136973 2006-09-03  Bruno Haible  <bruno@clisp.org>
136975         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
136976         correctly.
136978 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
136980         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
136981         not gl_GETLOADAVG.  Omit unneeded semicolons.
136982         Problems reported by Ralf Wildenhues in
136983         <http://lists.gnu.org/r/bug-gnulib/2006-09/msg00000.html>.
136984         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
136985         at the end, which is the usual gnulib style.
136987         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
136988         of doing all the work ourselves.
136989         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
136990         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
136992 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
136994         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
136995         Problem reported by Ralf Wildenhues in
136996         <http://lists.gnu.org/r/bug-gnulib/2006-09/msg00000.html>.
136998         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
136999         HAVE_STRUCT_STATFS_F_FSTYPENAME.
137001 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
137003         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
137004         yesterday's patch by changing test -n to test -z.
137006 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
137008         * modules/getloadavg (Files): Add m4/getloadavg.m4.
137009         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
137010         the former is now obsolescent.
137012         * modules/chdir-long (Depends-on): Add fcntl.
137014 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
137016         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
137017         obsolescent, and programs should use gnulib instead.
137018         * m4/getloadavg.m4: New file, with contents taken from Autoconf
137019         but with prefixes changed.
137021 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
137023         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
137024         or stdbool.h, because they might not exist while configuring.
137026         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
137027         Don't include unistd.h or limits.h; not needed, since chdir-long.h
137028         does that for us.
137029         (O_DIRECTORY): Remove.
137031 2006-08-31  Eric Blake  <ebb9@byu.net>
137033         * gnulib-tool: Don't let emacs change spaces to TAB.
137035 2006-08-31  Bruno Haible  <bruno@clisp.org>
137037         * gnulib-tool: When calling func_import more than once, do it in a
137038         subshell.
137039         Reported by Eric Blake <ebb9@byu.net>.
137041 2006-08-31  Bruno Haible  <bruno@clisp.org>
137043         * gnulib-tool (nl): Remove variable.
137044         (sed_transform_lib_file): Use more robust test for config-h module.
137045         (func_import): Fix typo in 2006-08-25 patch.
137047 2006-08-31  Bruno Haible  <bruno@clisp.org>
137049         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
137050         specified, augment Makefile.am variables instead of assigning them.
137052 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
137054         Work around a bug in both the Linux and SunOS 64-bit kernels:
137055         nanosleep mishandles sleeps for longer than 2**31 seconds.
137056         Problem reported by Frank v Waveren in
137057         <http://lists.gnu.org/r/bug-coreutils/2006-08/msg00298.html>.
137058         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
137059         Check for nanosleep bug.
137060         (LIB_NANOSLEEP): Append clock_gettime library if needed.
137062 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
137064         Work around a bug in both the Linux and SunOS 64-bit kernels:
137065         nanosleep mishandles sleeps for longer than 2**31 seconds.
137066         Problem reported by Frank v Waveren in
137067         <http://lists.gnu.org/r/bug-coreutils/2006-08/msg00298.html>.
137068         * lib/nanosleep.c (BILLION): New constant.
137069         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
137070         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
137071         implementation.
137073 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
137075         * modules/nanosleep (Depends-on): Add gettime.
137077 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
137078         and Simon Josefsson  <jas@extundo.com>
137079         and Oskar Liljeblad  <oskar@osk.mine.nu>
137081         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
137082         * gnulib-tool (func_import): New license type 'unmodifiable license
137083         text'.
137084         * modules/fdl: Use it.  Longer description.
137085         * module/gpl, module/lgpl: New files.
137087 2006-08-30  Jim Meyering  <jim@meyering.net>
137089         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
137090         shadowing the parameter.
137092 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
137094         Sync from Libtool:
137096         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
137098         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
137099         sharing with gnulib.  Report by Eric Blake.
137101 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
137103         * modules/isapipe: New file.
137104         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
137106 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
137108         * modules/configmake (Makefile.am): Add a comment, and omit
137109         the CONFIGMAKE_ prefix from generated macro names.  Suggested
137110         by Bruno Haible.
137112 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
137114         * m4/isapipe.m4: New file.
137116 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
137118         * lib/isapipe.c, lib/isapipe.h: New files.
137120 2006-08-29  Jim Meyering  <jim@meyering.net>
137122         * modules/configmake (Makefile.am): Make configmake.h depend on
137123         Makefile.  Otherwise, a stale configmake.h could hang around.
137125 2006-08-29  Eric Blake  <ebb9@byu.net>
137127         * lib/error.c (error_at_line, print_errno_message): Match libc, after
137128         resolution of upstream bug 3044.
137130 2006-08-29  Bruno Haible  <bruno@clisp.org>
137132         * modules/localcharset (Depends-on): Add configmake.
137133         (Makefile.am): Remove setting of LIBDIR through DEFS.
137135 2006-08-29  Bruno Haible  <bruno@clisp.org>
137137         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
137138         defined.
137140 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
137142         * modules/fcntl: New file.
137143         * modules/chdir-safer (Depends-on): Add fcntl.
137144         * modules/fts: Likewise.
137145         * modules/mkdir-p: Likewise.
137147         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
137148         This undoes the most recent change, since we're now addressing the
137149         problem in a different way.
137151         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
137152         into output, since the output might be called Makefile.am even
137153         if $makefile_name is something different.
137154         (func_import): Use $makefile_am rather than
137155         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
137156         empty.
137158         * modules/inttypes (Files): Add m4/inttypes-h.m4.
137160 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
137162         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
137163         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
137164         recent change to stdint.m4, since we're now addressing the problem in a
137165         different way.
137167 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
137169         * m4/fcntl_h.m4: New file.
137171 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
137173         * lib/fcntl_.h: New file.
137174         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
137175         the fcntl module.
137176         * lib/dirchownmod.c: Likewise.
137177         * lib/fts.c: Likewise.
137179         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
137180         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
137181         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
137182         just before including <inttypes.h>, to avoid circular inclusion.
137184 2006-08-28  Jim Meyering  <jim@meyering.net>
137186         * doc/visibility.texi: Actually read and correct the grammar of the
137187         sentence affected by yesterday's change.
137189 2006-08-28  Eric Blake  <ebb9@byu.net>
137191         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
137192         needs wrapper.
137194 2006-08-28  Eric Blake  <ebb9@byu.net>
137196         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
137198 2006-08-28  Eric Blake  <ebb9@byu.net>
137200         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
137202 2006-08-28  Bruno Haible  <bruno@clisp.org>
137204         * modules/c-strstr: New file, from GNU gettext.
137205         * MODULES.html.sh (String handling): Add c-strstr.
137207 2006-08-28  Bruno Haible  <bruno@clisp.org>
137209         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
137210         macros.
137211         Reported by Eric Blake.
137213 2006-08-28  Bruno Haible  <bruno@clisp.org>
137215         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
137216         (VASNPRINTF): Return a string of length > INT_MAX without failing.
137217         * lib/vasprintf.c: Include errno.h, limits.h.
137218         (EOVERFLOW): New fallback definition.
137219         (vasprintf): Test here whether the string length is > INT_MAX.
137220         * lib/vsnprintf.c: Include errno.h, limits.h.
137221         (EOVERFLOW): New fallback definition.
137222         (vsnprintf): Fix bug when generated string was too long for the buffer.
137223         Test here whether the string length is > INT_MAX.
137225 2006-08-28  Bruno Haible  <bruno@clisp.org>
137227         * lib/inttypes_.h (SCNX*): Remove definitions.
137228         Reported by Eric Blake.
137230 2006-08-28  Bruno Haible  <bruno@clisp.org>
137232         * lib/c-strstr.h: New file, from GNU gettext.
137233         * lib/c-strstr.c: New file, from GNU gettext.
137235 2006-08-28  Bruno Haible  <bruno@clisp.org>
137237         * gnulib-tool: Reorder some statements.
137239 2006-08-28  Bruno Haible  <bruno@clisp.org>
137241         * gnulib-tool: New option --makefile-name.
137242         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
137243         $makefile_name.
137244         (func_import): Write $makefile_name to the cache file, and read it from
137245         there unless explicitly specified. Use $makefile_name as file name
137246         instead of Makefile.am. Adjust the recommendations accordingly.
137248 2006-08-28  Bruno Haible  <bruno@clisp.org>
137250         * gnulib-tool (func_verify_module): Check against misapplying patch.
137252 2006-08-28  Bruno Haible  <bruno@clisp.org>
137254         * gnulib-tool (func_relativize, func_relconcat): New functions.
137255         Give an error if --local-dir is given with --update.
137256         Remove trailing slashes from $local_gnulib_dir.
137257         (func_import): Store the relativized $local_gnulib_dir in
137258         gnulib-cache.m4, and read it from there if not specified explicitly.
137260 2006-08-28  Bruno Haible  <bruno@clisp.org>
137262         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
137263         is the current directory. Respect also $local_gnulib_dir.
137265 2006-08-28  Bruno Haible  <bruno@clisp.org>
137266             Simon Josefsson  <jas@extundo.com>
137268         BeOS portability.
137269         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
137271 2006-08-27  Jim Meyering  <jim@meyering.net>
137273         * doc/visibility.texi: Remove duplicate word: "pointer".
137275 2006-08-26  Bruno Haible  <bruno@clisp.org>
137277         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
137278         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
137279         (Makefile.am): Create inttypes.h from inttypes_.h.
137280         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
137282         * modules/imaxabs: New file.
137284         * modules/imaxdiv: New file.
137286 2006-08-26  Bruno Haible  <bruno@clisp.org>
137288         * m4/inttypes.m4: New file.
137289         * m4/_inttypes_h.m4: Remove file.
137290         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
137291         PRI_MACROS_BROKEN.
137292         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
137294         * m4/imaxabs.m4: New file.
137296         * m4/imaxdiv.m4: New file.
137298 2006-08-26  Bruno Haible  <bruno@clisp.org>
137300         * lib/inttypes_.h: New file.
137301         * lib/inttypes.h: Remove file.
137302         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
137304         * lib/imaxabs.c: New file.
137306         * lib/imaxdiv.c: New file.
137308 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
137310         New config-h module, so that "make" output needn't be cluttered
137311         by -DHAVE_CONFIG_H.
137312         * MODULES.html.sh (Support for building libraries and executables):
137313         Add config-h.
137314         * modules/config-h: New file.
137315         * gnulib-tool (nl, sed_transform_lib_file): New vars.
137316         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
137317         the config-h module is used.
137319         New configmake module, so that "make" output needn't be cluttered
137320         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
137321         * MODULES.html.sh (Support for building libraries and executables):
137322         Add configmake.
137323         * modules/configmake: New file.
137325 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
137327         * m4/config-h.m4: New file.
137329 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
137331         * config/srclist.txt: Add elisp-comp.
137333 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
137335         * MODULES.html.sh (Support for building libraries and executables):
137336         Add elisp-comp.
137337         * build-aux/elisp-comp: New file.
137338         * modules/elisp-comp: New file.
137340 2006-08-24  Bruno Haible  <bruno@clisp.org>
137342         * gnulib-tool (func_create_testdir): Use non-default values of
137343         sourcebase and m4base.
137345 2006-08-24  Bruno Haible  <bruno@clisp.org>
137347         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
137348         HTML structure.
137350 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
137352         * modules/openat (Depends-on): Add lchown.
137354 2006-08-23  Bruno Haible  <bruno@clisp.org>
137356         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
137357         of gl_LOCK_EARLY instead of gl_LOCK.
137359 2006-08-23  Bruno Haible  <bruno@clisp.org>
137361         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
137362         on OSF/1 to no.
137363         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
137365 2006-08-23  Bruno Haible  <bruno@clisp.org>
137367         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
137368         as unusable.
137370         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
137371         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
137372         (gl_LOCK): New macro.
137374 2006-08-22  Simon Josefsson  <jas@extundo.com>
137376         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
137377         to md5 module.
137379 2006-08-22  Simon Josefsson  <jas@extundo.com>
137381         * MODULES.html.sh: Add "Support for maintaining and release
137382         projects".
137384         * build-aux/gnupload: New file, from coreutils.
137386 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
137388         Avoid the need for AC_LIBSOURCES in m4 macros.
137389         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
137390         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
137391         * modules/check-version (EXTRA_DIST): Add check-version.h.
137392         * modules/crc (EXTRA_DIST): Add crc.h.
137393         * modules/des (EXTRA_DIST): Add des.h.
137394         * modules/gc (EXTRA_DIST): Add gc.h.
137395         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
137396         * modules/getline (EXTRA_DIST): Add getline.h.
137397         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
137398         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
137399         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
137400         * modules/md2 (EXTRA_DIST): Add md2.h.
137401         * modules/md4 (EXTRA_DIST): Add md4.h.
137402         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
137403         * modules/read-file (EXTRA_DIST): Add read-file.h.
137404         * modules/readline (EXTRA_DIST): Add readline.h.
137405         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
137406         rijndael-api-fst.h.
137408 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
137410         * m4/rijndael.m4 (gl_ARCFOUR):
137411         * m4/arctwo.m4 (gl_ARCTWO):
137412         * m4/check-version.m4 (gl_CHECK_VERSION):
137413         * m4/crc.m4 (gl_CRC):
137414         * m4/des.m4 (gl_DES):
137415         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
137416         * m4/gc.m4 (gl_GC):
137417         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
137418         * m4/getline.m4 (gl_FUNC_GETLINE):
137419         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
137420         * m4/hmac-md5.m4 (gl_HMAC_MD5):
137421         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
137422         * m4/md2.m4 (gl_MD2):
137423         * m4/md4.m4 (gl_MD4):
137424         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
137425         * m4/read-file.m4 (gl_FUNC_READ_FILE):
137426         * m4/readline.m4 (gl_FUNC_READLINE):
137427         * m4/rijndael.m4 (gl_RIJNDAEL):
137428         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
137429         to get the necessary .h files and whatnot.
137431 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
137433         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
137434         gnulib rather than the other way around.
137435         * config/srclistvars.sh (COREUTILS): Remove.
137437 2006-08-22  Jim Meyering  <jim@meyering.net>
137439         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
137441         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
137443 2006-08-22  Eric Blake  <ebb9@byu.net>
137445         * modules/regexprops-generic: New file.
137446         * MODULES.html.sh (Support for building documentation): List it.
137448 2006-08-22  Eric Blake  <ebb9@byu.net>
137450         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
137451         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
137452         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
137453         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
137455 2006-08-22  Bruno Haible  <bruno@clisp.org>
137457         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
137458         and lib_LTLIBRARIES like the other lib_* variables.
137460 2006-08-22  Bruno Haible  <bruno@clisp.org>
137462         * build-aux/x-to-1.in: New file, from GNU gettext.
137464 2006-08-22  Bruno Haible  <bruno@clisp.org>
137466         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
137467         <utmpx.h> exists.
137469 2006-08-22  Bruno Haible  <bruno@clisp.org>
137471         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
137472         <utmpx.h> exists.
137474 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
137476         BeOS portability.
137477         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
137478         exist.
137479         Problem reported by Bruno Haible.
137481 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
137483         Avoid the need for AC_LIBSOURCES in m4 macros.
137484         * modules/acl (EXTRA_DIST): Add acl.h.
137485         * modules/argmatch (Files): Add m4/argmatch.m4.
137486         (configure.ac): Add gl_ARGMATCH.
137487         (EXTRA_DIST): Renamed from lib_SOURCES, for
137488         consistency with the other modules.  Remove argmatch.c.
137489         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
137490         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
137491         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
137492         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
137493         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
137494         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
137495         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
137496         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
137497         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
137498         * modules/closeout (EXTRA_DIST): Add closeout.h.
137499         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
137500         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
137501         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
137502         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
137503         dirname.h; remove basename.c and stripslash.c.
137504         * modules/exclude (EXTRA_DIST): Add exclude.h.
137505         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
137506         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
137507         * modules/file-type (EXTRA_DIST): Add file-type.h.
137508         * modules/filemode (EXTRA_DIST): Add filemode.h.
137509         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
137510         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
137511         * modules/fpending (EXTRA_DIST): Add __fpending.h.
137512         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
137513         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
137514         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
137515         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
137516         * modules/getdate (EXTRA_DIST): Add getdate.c.
137517         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
137518         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
137519         * modules/getpass (EXTRA_DIST): Add getpass.h.
137520         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
137521         * modules/group-member (EXTRA_DIST): Add group-member.h.
137522         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
137523         * modules/hash (EXTRA_DIST): Add hash.h.
137524         * modules/human (EXTRA_DIST): Add human.h.
137525         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
137526         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
137527         * modules/lchown (EXTRA_DIST): Add lchown.h.
137528         * modules/long-options (EXTRA_DIST): Add long-options.h.
137529         * modules/lstat (EXTRA_DIST): Add lstat.h.
137530         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
137531         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
137532         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
137533         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
137534         * modules/memxor (EXTRA_DIST): Add memxor.h.
137535         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
137536         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
137537         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
137538         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
137539         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
137540         * modules/physmem (EXTRA_DIST): Add physmem.h.
137541         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
137542         * modules/posixver (EXTRA_DIST): Add posixver.h.
137543         * modules/quote (EXTRA_DIST): Add quote.h.
137544         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
137545         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
137546         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
137547         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
137548         regex_internal.h regexec.c.
137549         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
137550         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
137551         * modules/same (EXTRA_DIST): Add same.h.
137552         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
137553         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
137554         * modules/savedir (EXTRA_DIST): Add savedir.h.
137555         * modules/sha1 (EXTRA_DIST): Add sha1.h.
137556         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
137557         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
137558         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
137559         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
137560         * modules/strdup (EXTRA_DIST): Add strdup.h.
137561         * modules/strftime (EXTRA_DIST): Add strftime.h.
137562         * modules/strndup (EXTRA_DIST): Add strndup.h.
137563         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
137564         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
137565         * modules/time_r (EXTRA_DIST): Add time_r.h.
137566         * modules/timespec (EXTRA_DIST): Add timespec.h.
137567         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
137568         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
137569         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
137570         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
137571         * modules/userspec (EXTRA_DIST): Add userspec.h.
137572         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
137573         * modules/utimens (EXTRA_DIST): Add utimens.h.
137574         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
137575         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
137576         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
137577         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
137578         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
137579         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
137580         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
137581         * modules/yesno (EXTRA_DIST): Add yesno.h.
137583 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
137585         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
137587         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
137588         * m4/dev-ino.m4, same-inode.m4: Remove.
137590         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
137591         * m4/acl.m4 (AC_FUNC_ACL):
137592         * m4/backupfile.m4 (gl_BACKUPFILE):
137593         * m4/c-strtod.m4 (gl_C99_STRTOLD):
137594         * m4/canon-host.m4 (gl_CANON_HOST):
137595         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
137596         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
137597         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
137598         * m4/cloexec.m4 (gl_CLOEXEC):
137599         * m4/close-stream.m4 (gl_CLOSE_STREAM):
137600         * m4/closeout.m4 (gl_CLOSEOUT):
137601         * m4/dirfd.m4 (gl_FUNC_DIRFD):
137602         * m4/dirname.m4 (gl_DIRNAME):
137603         * m4/exclude.m4 (gl_EXCLUDE):
137604         * m4/exitfail.m4 (gl_EXITFAIL):
137605         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
137606         * m4/file-type.m4 (gl_FILE_TYPE):
137607         * m4/filemode.m4 (gl_FILEMODE):
137608         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
137609         * m4/fpending.m4 (gl_FUNC_FPENDING):
137610         * m4/fprintftime.m4 (gl_FPRINTFTIME):
137611         * m4/fts.m4 (gl_FUNC_FTS):
137612         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
137613         * m4/getdate.m4 (gl_GETDATE):
137614         * m4/gethrxtime.m4 (gl_GETHRXTIME):
137615         * m4/getpagesize.m4 (gl_GETPAGESIZE):
137616         * m4/getpass.m4 (gl_FUNC_GETPASS):
137617         * m4/gettime.m4 (gl_GETTIME):
137618         * m4/getugroups.m4 (gl_GETUGROUPS):
137619         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
137620         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
137621         * m4/hard-locale.m4 (gl_HARD_LOCALE):
137622         * m4/hash.m4 (gl_HASH):
137623         * m4/idcache.m4 (gl_IDCACHE):
137624         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
137625         * m4/lchown.m4 (gl_FUNC_LCHOWN):
137626         * m4/long-options.m4 (gl_LONG_OPTIONS):
137627         * m4/lstat.m4 (gl_FUNC_LSTAT):
137628         * m4/md5.m4 (gl_MD5):
137629         * m4/memcasecmp.m4 (gl_MEMCASECMP):
137630         * m4/memcoll.m4 (gl_MEMCOLL):
137631         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
137632         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
137633         * m4/memxor.m4 (gl_MEMXOR):
137634         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
137635         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
137636         * m4/modechange.m4 (gl_MODECHANGE):
137637         * m4/mountlist.m4 (gl_MOUNTLIST):
137638         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
137639         * m4/openat.m4 (gl_FUNC_OPENAT):
137640         * m4/pathmax.m4 (gl_PATHMAX):
137641         * m4/physmem.m4 (gl_PHYSMEM):
137642         * m4/posixtm.m4 (gl_POSIXTM):
137643         * m4/posixver.m4 (gl_POSIXVER):
137644         * m4/quote.m4 (gl_QUOTE):
137645         * m4/quotearg.m4 (gl_QUOTEARG):
137646         * m4/readtokens.m4 (gl_READTOKENS):
137647         * m4/readutmp.m4 (gl_READUTMP):
137648         * m4/regex.m4 (gl_REGEX):
137649         * m4/safe-read.m4 (gl_SAFE_READ):
137650         * m4/safe-write.m4 (gl_SAFE_WRITE):
137651         * m4/same.m4 (gl_SAME):
137652         * m4/save-cwd.m4 (gl_SAVE_CWD):
137653         * m4/savedir.m4 (gl_SAVEDIR):
137654         * m4/settime.m4 (gl_SETTIME):
137655         * m4/sha1.m4 (gl_SHA1):
137656         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
137657         * m4/stat-macros.m4 (gl_STAT_MACROS):
137658         * m4/stat-time.m4 (gl_STAT_TIME):
137659         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
137660         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
137661         * m4/strdup.m4 (gl_FUNC_STRDUP):
137662         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
137663         * m4/strndup.m4 (gl_FUNC_STRNDUP):
137664         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
137665         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
137666         * m4/time_r.m4 (gl_TIME_R):
137667         * m4/timespec.m4 (gl_TIMESPEC):
137668         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
137669         * m4/unlinkdir.m4 (gl_UNLINKDIR):
137670         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
137671         * m4/userspec.m4 (gl_USERSPEC):
137672         * m4/utimecmp.m4 (gl_UTIMECMP):
137673         * m4/utimens.m4 (gl_UTIMENS):
137674         * m4/xalloc.m4 (gl_XALLOC):
137675         * m4/xgetcwd.m4 (gl_XGETCWD):
137676         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
137677         * m4/xreadlink.m4 (gl_XREADLINK):
137678         * m4/xstrtod.m4 (gl_XSTRTOD):
137679         * m4/yesno.m4 (gl_YESNO):
137680         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
137681         to get the necessary .h files and whatnot.
137683 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
137684             Bruno Haible  <bruno@clisp.org>
137686         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
137687         /bin/sh understanding of '!' conditional negation.
137689 2006-08-21  Jim Meyering  <jim@meyering.net>
137691         * modules/openat (Depends-on): Really alphabetize.
137693         * modules/acl (Depends-on): Add error and quote.
137695         * check-module (find_included_lib_files): Add at-func.c to the
137696         ok-to-include-more-than-once white list.
137698         * modules/openat (Depends-on): Add lstat.  Alphabetize.
137700 2006-08-21  Bruno Haible  <bruno@clisp.org>
137702         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
137703         Emit a pkgdata_DATA variable only if some snippets add contents to it.
137704         Reported by Martin Lambers <marlam@marlam.de>.
137706 2006-08-21  Bruno Haible  <bruno@clisp.org>
137708         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
137709         specify an installation location, don't emit a noinst_LIBRARIES or
137710         noinst_LTLIBRARIES assignment.
137712 2006-08-21  Bruno Haible  <bruno@clisp.org>
137714         BeOS portability.
137715         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
137716         BeOS has mbrtowc() but no <wctype.h>.
137718 2006-08-21  Bruno Haible  <bruno@clisp.org>
137720         BeOS portability.
137721         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
137722         exist.
137724 2006-08-21  Bruno Haible  <bruno@clisp.org>
137726         BeOS portability.
137727         * lib/mbchar.h: Include <wctype.h> only if it exists.
137729 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
137731         Remove files that are no longer needed by their respective modules.
137732         * m4/obstack.m4: Remove.
137733         * m4/strerror_r.m4: Remove.
137734         * m4/uint32_t.m4: Remove.
137735         * m4/uintptr_t.m4: Remove.
137736         * m4/ullong_max.m4: Remove.
137737         * m4/xstrtoimax.m4: Remove.
137738         * m4/xstrtoumax.m4: Remove.
137740         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
137741         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
137742         dependencies now capture this.
137744         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
137745         Do not use AC_LIBSOURCES, since gnulib modules now do this.
137746         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
137747         * m4/human.m4 (gl_HUMAN): Likewise.
137748         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
137749         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
137751         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
137753         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
137754         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
137755         stdint.
137756         * m4/human.m4 (gl_HUMAN): Likewise.
137757         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
137758         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
137759         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
137760         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
137761         * m4/xstrtol (gl_XSTRTOL): Likewise.
137763         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
137764         AC_TYPE_LONG_LONG_INT.
137765         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
137766         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
137767         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
137768         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
137770         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
137771         on stdbool.
137773         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
137774         (gl_PREREQ_XSTRTOUL): Remove.
137776         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
137778         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
137779         mode.
137781 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
137783         Add and change modules to make it easier for coreutils to use
137784         gnulib-tool.
137785         * modules/backupfile (Files): Remove m4/d-ino.m4.
137786         (Depends-on): Add d-ino.
137787         * modules/cycle-check (Depends-on): Add stdint.
137788         (lib_SOURCES): Add cycle-check.h.
137789         * modules/d-ino: New module.
137790         * modules/d-type: New module.
137791         * modules/error (Files): Remove m4/strerror_r.m4.
137792         * modules/filemode (Files): Add m4/st_dm_mode.m4.
137793         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
137794         m4/inttypes_h.m4, m4/uintmax_t.m4.
137795         (Depends-on): Add stdint.
137796         (lib_SOURCES): Add fsusage.h.
137797         * modules/getcwd (Files): Remove d-ino.m4.
137798         (Depends-on): Add d-ino.
137799         * modules/getndelim2 (Depends-on): Add stdint.
137800         * modules/glob (Files): Remove m4/d-type.m4.
137801         (Depends-on): Add d-type.
137802         * modules/host-os: New module.
137803         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
137804         m4/inttypes_h.m4, m4/uintmax_t.m4.
137805         * Depends-on: Add stdint.
137806         (lib_SOURCES): Add human.h.
137807         * modules/inttostr (Files): Remove m4/intmax_t.m4,
137808         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
137809         m4/uintmax_t.m4, m4/ulonglong.m4.
137810         (Depends-on): Add stdint.
137811         (EXTRA_DIST): Add inttostr.h.
137812         * modules/lchmod: New module.
137813         * modules/link-follow: New module.
137814         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
137815         (Depends-on): Add lchmod.
137816         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
137817         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
137818         (Depends-on): Add stdint.
137819         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
137820         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
137821         (Depends-on): Add stdint.
137822         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
137823         * modules/perl: New module.
137824         * modules/regex (Depends-on): Add stdint.
137825         * modules/rmdir-errno: New module.
137826         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
137827         m4/intmax_t.m4.
137828         (Depends-on): Add stdint.
137829         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
137830         m4/uintmax_t.m4.
137831         (Depends-on): Add stdint.
137832         * modules/unlink-busy: New module.
137833         * modules/utimecmp (Depends-on): Add stdint.
137834         * modules/uptime: New module.
137835         * modules/winsz-ioctl: New module.
137836         * modules/winsz-termios: New module.
137837         * modules/xnanosleep (Depends-on): Add nanosleep.
137838         * modules/ullong_max: Remove.
137839         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
137840         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
137841         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
137842         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
137843         (Depends-on): Add inttypes.
137844         (lib_SOURCES): Add xstrtol.h.
137845         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
137846         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
137847         * MODULES.html.sh: Move 'assert' into the assert section.
137848         Move 'dummy' into the linking section.
137849         Remove ullong_max.
137850         Add section for compatibility checks for POSIX:2001 functions,
137851         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
137852         winsz-ioctl, and winsz-termios into it.
137853         Add lchmod.
137854         Add top-level Misc section and put host-os, perl, and uptime
137855         into it.
137857 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
137859         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
137860         now assume the stdint module.  Do not include inttypes.h.
137861         * lib/fsusage.h: Likewise.
137862         * lib/getndelim2.c: Likewise.
137863         * lib/human.h: Likewise.
137864         * lib/inttostr.h: Likewise.
137865         * lib/obstack.c: Likewise.
137866         * lib/regex_internal.h: Likewise.
137867         * lib/tempname.c: Likewise.
137868         * lib/utimecmp.c: Likewise.
137869         * lib/xstrtol.h: Likewise.
137871         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
137873         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
137874         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
137875         * lib/xtime.h: Likewise.
137877 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
137879         * modules/openat (Files): Add lib/fchmodat.c.
137880         Fixes problem reported by Jay Youngman.
137882 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
137884         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
137885         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
137887 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
137888             Bruno Haible  <bruno@clisp.org>
137890         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
137891         and is a script that invokes bison. Tighten the code. Add comments.
137893 2006-08-18  Jim Meyering  <jim@meyering.net>
137895         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
137896         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
137897         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
137898         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
137900 2006-08-18  Bruno Haible  <bruno@clisp.org>
137902         * modules/bison-i18n: New file.
137903         * MODULES.html.sh (Internationalization functions): Add it.
137905 2006-08-18  Bruno Haible  <bruno@clisp.org>
137907         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
137908         sys/statvfs.h. When getmntinfo was found, check its declaration and
137909         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
137911 2006-08-18  Bruno Haible  <bruno@clisp.org>
137913         * m4/bison-i18n.m4: New file, from bison.
137915 2006-08-18  Bruno Haible  <bruno@clisp.org>
137917         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
137918         (ME_DUMMY): Treat "kernfs" as a dummy.
137919         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
137921 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
137923         Update from coreutils.
137925         2006-08-15  Jim Meyering  <jim@meyering.net>
137927         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
137929         2006-01-17  Jim Meyering  <jim@meyering.net>
137931         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
137933         2006-01-11  Jim Meyering  <jim@meyering.net>
137935         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
137936         Check for the lchmod function.
137938 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
137940         Update from coreutils.
137942         * lib/__fpending.h: Add copyright notice.
137943         * lib/fprintftime.h: Likewise.
137944         * lib/savedir.c: Use (C) in copyright notice.
137945         * lib/savedir.h: Likewise.
137947         2006-08-15  Jim Meyering  <jim@meyering.net>
137949         * lib/at-func.c: New file, with the logic of all emulated at-functions.
137950         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
137951         in support of the EXPECTED_ERRNO macro.
137952         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
137953         definitions.  Instead, define the appropriate symbols and include
137954         "at-func.c".
137955         * lib/mkdirat.c (mkdirat): Likewise.
137956         * lib/fchmodat.c (fchmodat): Likewise.
137957         (ENOSYS): Remove definition.
137958         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
137959         it.  Don't include "unistd--.h" -- it wasn't ever used.
137961         2006-01-17  Jim Meyering  <jim@meyering.net>
137963         Rewrite fts.c not to change the current working directory,
137964         by using openat, fstatat, fdopendir, etc..
137966         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
137967         (HAVE_OPENAT_SUPPORT): Define.
137968         [_LIBC] (fchdir): Don't undef or define; no longer used.
137969         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
137970         Now, this `function' always succeeds, and consumes its file descriptor
137971         parameter -- so callers must not close such FDs.  Update callers.
137972         (diropen_fd, opendirat, cwd_advance_fd): New functions.
137973         (diropen): Add parameter, SP.  Adjust all callers.
137974         Implement using diropen_fd, rather than open.
137975         (fts_open): Initialize new member, fts_cwd_fd.
137976         Remove fts_rft-setting code.
137977         (fts_close): Close fts_cwd_fd, if necessary.
137978         (__opendir2): Define in terms of opendir or opendirat,
137979         depending on whether the FST_NOCHDIR flag is set.
137980         (fts_build): Since fts_safe_changedir consumes its FD, and since
137981         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
137982         and close the dup'd file descriptor upon failure.
137983         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
137984         (fts_safe_changedir): Tweak semantics to reflect that this function
137985         now calls cwd_advance_fd and hence consumes its FD argument.
137986         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
137987         [struct FTS] (fts_rft): Remove now-unused member.
137988         [struct FTS] (fts_cycle.state): Improve comment.
137990         * lib/openat.c (openat_needs_fchdir): New function.
137991         * lib/openat.h (openat_needs_fchdir): Declare it.
137993 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
137995         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
137996         Problem and fix reported by Pádraig Brady in
137997         <http://lists.gnu.org/r/bug-coreutils/2006-08/msg00099.html>.
137999 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
138001         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
138003 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
138005         * lib/memcoll.c (memcoll): Optimize for the common case where the
138006         arguments are bytewise equal.
138008 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
138010         * doc/regexprops-generic.texi: Add a copyright notice.
138012 2006-08-15  Bruno Haible  <bruno@clisp.org>
138014         * modules/tmpdir (License): Change to LGPL.
138016 2006-08-15  Bruno Haible  <bruno@clisp.org>
138018         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
138019         module.
138021 2006-08-14  Simon Josefsson  <jas@extundo.com>
138023         * config/srclist.txt: Add gnupload.
138025 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
138027         Change copyright notice from LGPL 2 to GPL 2, since that's the
138028         standard form used in the gnulib repository.
138029         * tests/test-lock.c: Likewise.
138030         * tests/test-stdint.c: Likewise.
138031         * tests/test-tls.c: Likewise.
138033         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
138034         prelude-manager.  User shorter URLs for GNU projects, without '?'.
138035         Add copyright notice.
138037         * check-module: Add copyright notice.  Output a copyright
138038         notice if "--version" is specified.
138039         * modules/COPYING: New file.
138040         * tests/test-getaddrinfo.c: Add copyright notice.
138041         * tests/test-verify.c: Likewise.
138043 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
138045         Change copyright notice from LGPL 2 to GPL 2, since that's the
138046         standard form used in the gnulib repository.
138047         * lib/lock.c: LGPL -> GPL.
138048         * lib/lock.h: Likewise.
138049         * lib/strnlen1.c: Likewise.
138050         * lib/strnlen1.h: Likewise.
138051         * lib/tls.c: Likewise.
138052         * lib/tls.h: Likewise.
138053         * lib/tmpdir.c: Likewise.
138055         * lib/TODO: Remove; this belongs only in coreutils.
138057 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
138059         Add copyright notices to long-enough files that lack them, since
138060         otherwise the files aren't clearly free.  Use the same notice that
138061         getdate.texi already uses.
138062         * doc/alloca-opt.texi: Add copyright notice.
138063         * doc/alloca.texi: Likewise.
138064         * doc/ctime.texi: Likewise.
138065         * doc/functions.texi: Likewise.
138066         * doc/gcd.texi: Likewise.
138067         * doc/gnulib-tool.texi: Likewise.
138068         * doc/inet_ntoa.texi: Likewise.
138069         * doc/visibility.texi: Likewise.
138071         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
138072         * doc/quote.texi: Add copyright notice.
138074         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
138075         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
138076         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
138077         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
138078         is now obsolete, and give a pointer to the Sun list.
138079         Add copyright notice.
138081 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
138083         * config/srclistvars.sh: Add copyright notice.
138085 2006-08-14  Eric Blake  <ebb9@byu.net>
138087         Import the following change from libc:
138089         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
138091         Upstream bug 2997.
138092         * lib/misc/error.c: Add space between program name and message if file
138093         name is missing.
138095 2006-08-12  Karl Berry  <karl@gnu.org>
138097         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
138098         remove, these originate in gnulib now.
138100 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
138102         * doc/Makefile (standards.info standards.html standards.dvi):
138103         Also depend on make-stds.texi.
138105 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
138107         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
138108         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
138110         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
138111         in wchar_t.  Problem reported by Eric Blake.
138113         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
138114         LEN is smaller than SIZE.  Suggested by Bruno Haible.
138115         Also, help the compiler to keep LEN in a register.
138117 2006-08-11  Eric Blake  <ebb9@byu.net>
138119         * users.txt: Sort.  Add tar.
138121 2006-08-11  Bruno Haible  <bruno@clisp.org>
138123         * users.txt: New file.
138125 2006-08-11  Bruno Haible  <bruno@clisp.org>
138127         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
138128         before <wchar.h>. Needed for OSF/1 and BSD/OS.
138130 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
138132         * modules/snprintf (Depends-on): Remove minmax.
138133         (Maintainer): Add self and Bruno.
138135 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
138137         * lib/.cppi-disable: Add snprintf.h, socket_.h.
138138         * lib/snprintf.c: Include <errno.h> and <limits.h>.
138139         (EOVERFLOW): Define if the system does not.
138140         Do not include "minmax.h"; it wasn't used.
138141         (snprintf): Don't assume size_t promotes to an unsigned type.
138142         Fix bug when generated string was too long for the buffer: the
138143         buffer's contents are supposed to be the initial prefix of the
138144         output.  Don't assume vasnprintf returns EOVERFLOW if the size
138145         exceeds INT_MAX; do the check ourselves.
138147         Import the following changes from libc:
138149         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
138151         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
138152         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
138153         set wc to the byte which couldn't be converted.
138154         (re_string_reconstruct): Don't clear valid_raw_len before calling
138155         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
138156         tip_context using re_string_context_at.
138158         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
138160         * lib/posix/regex.h: g++ still cannot handled [restrict].
138162         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
138164         * lib/posix/regex.h: Remove special handling for VMS.
138166 2006-08-10  Jim Meyering  <jim@meyering.net>
138168         * modules/same-inode: New module.
138169         * modules/dev-ino: New module.
138170         * modules/cycle-check: Depend on these modules, rather than simply
138171         including their .h files.
138172         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
138173         required via m4/cycle-check.m4.
138174         * modules/same: Depend on new same-inode module, rather than
138175         including same-inode.h.
138176         * modules/chdir-safer: New file.
138178         * modules/chown (Depends-on): Add stat-macros.
138180 2006-08-10  Jim Meyering  <jim@meyering.net>
138182         * m4/cycle-check.m4: New file.
138183         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
138184         * m4/dev-ino.m4, m4/same-inode.m4: New files.
138186 2006-08-10  Eric Blake  <ebb9@byu.net>
138188         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
138189         in from original proposal.
138191 2006-08-10  Eric Blake  <ebb9@byu.net>
138192         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
138194         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
138195         namespace.
138197 2006-08-10  Bruno Haible  <bruno@clisp.org>
138199         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
138200         as well.
138202 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
138204         Sync from coreutils.
138206         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
138208         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
138209         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
138211 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
138213         * modules/restrict: Remove; no longer needed now that we assume
138214         Autoconf 2.59 or later.
138215         * MODULES.html.sh: Remove 'restrict'.
138216         * modules/argp (Depends-on): Remove 'restrict'.
138217         * modules/base64 (Depends-on): Likewise.
138218         * modules/gc (Depends-on): Likewise.
138219         * modules/getaddrinfo (Depends-on): Likewise.
138220         * modules/glob (Depends-on): Likewise.
138221         * modules/inet_ntop (Depends-on): Likewise.
138222         * modules/inet_pton (Depends-on): Likewise.
138223         * modules/memxor (Depends-on): Likewise.
138224         * modules/regex (Depends-on): Likewise.
138225         * modules/strtok_r (Depends-on): Likewise.
138226         * modules/time_r (Depends-on): Likewise.
138228 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
138230         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
138231         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
138232         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
138233         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
138234         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
138235         * m4/memxor.m4 (gl_MEMXOR): Likewise.
138236         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
138237         gl_C_RESTRICT replaced by AC_C_RESTRICT.
138239         Merge from coreutils.
138240         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
138241         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
138242         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
138243         * m4/time_r.m4 (gl_TIME_R): Likewise.
138245 2006-08-09  Karl Berry  <karl@gnu.org>
138247         * config/srclist.txt: no more gettext-tools, per Bruno.
138249 2006-08-08  Eric Blake  <ebb9@byu.net>
138251         * modules/verror: New module.
138252         * MODULES.html.sh: Document it.
138254 2006-08-08  Eric Blake  <ebb9@byu.net>
138256         * lib/verror.h, lib/verror.c: New files.
138258 2006-08-08  Eric Blake  <ebb9@byu.net>
138260         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
138261         verror_at_line output complies with GNU Coding Standards even when
138262         file is NULL.
138264 2006-08-07  Bruno Haible  <bruno@clisp.org>
138266         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
138267         versions of AIX.
138268         Reported by Ralf Wildenhues.
138270 2006-08-07  Bruno Haible  <bruno@clisp.org>
138272         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
138273         in an AC_DEFUN. Needed so that the autoconf snippets can use
138274         AC_REQUIRE.
138276 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
138278         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
138279         Initialize pkgdata_DATA.
138280         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
138281         overriding it.
138283 2006-08-06  Eric Blake  <ebb9@byu.net>
138285         * lib/error.h: Fold in some upstream changes from glibc.
138286         * lib/error.c: Likewise.
138288 2006-08-04  Bruno Haible  <bruno@clisp.org>
138290         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
138291         Make the mostlyclean-local rule depend on mostlyclean-generic.
138292         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
138294 2006-07-31  Bruno Haible  <bruno@clisp.org>
138296         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
138297         <stdlib.h>, <string.h>.
138299 2006-07-30  Bruno Haible  <bruno@clisp.org>
138301         * modules/readlink (License): Change to LGPL.
138303 2006-07-30  Bruno Haible  <bruno@clisp.org>
138305         * modules/javaversion (Makefile.am): Distribute javaversion.java and
138306         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
138307         set PKGDATADIR to point to it.
138309 2006-07-30  Bruno Haible  <bruno@clisp.org>
138311         * modules/csharpexec (configure.ac): Comment out macro invocation.
138312         * modules/javaexec (configure.ac): Likewise.
138313         * modules/javacomp-script (configure.ac): Likewise.
138315         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
138317 2006-07-30  Bruno Haible  <bruno@clisp.org>
138319         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
138320         linked-list.
138322 2006-07-30  Bruno Haible  <bruno@clisp.org>
138324         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
138326 2006-07-30  Bruno Haible  <bruno@clisp.org>
138328         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
138329         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
138330         get removed.
138332 2006-07-29  Bruno Haible  <bruno@clisp.org>
138334         Make it possible for gnulib-tool to work with locally modified or
138335         augmented gnulib repositories.
138336         * gnulib-tool (func_usage): Document --local-dir option.
138337         (local_gnulib_dir): New variable.
138338         Handle --local-dir option.
138339         (func_lookup_file): New function.
138340         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
138341         (func_get_description, func_get_filelist, func_get_description,
138342         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
138343         func_get_automake_snippet, func_get_include_directive,
138344         func_get_license, func_get_maintainer): Use func_lookup_file.
138345         (func_import, func_create_testdir): Use func_lookup_file.
138347 2006-07-29  Bruno Haible  <bruno@clisp.org>
138349         * modules/setenv (Depends-on): Add unistd.
138351 2006-07-29  Bruno Haible  <bruno@clisp.org>
138353         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
138355 2006-07-29  Bruno Haible  <bruno@clisp.org>
138357         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
138359 2006-07-29  Bruno Haible  <bruno@clisp.org>
138361         * gnulib-tool (import, update): If there is no Makefile.am, look at
138362         aclocal.m4, instead of bailing out.
138364 2006-07-29  Bruno Haible  <bruno@clisp.org>
138366         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
138367         Categorize the options by when they are useful.
138369 2006-07-29  Bruno Haible  <bruno@clisp.org>
138371         * gnulib-tool (func_usage): Document option --no-libtool.
138372         Handle option --no-libtool.
138373         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
138374         for changed semantics of $libtool variable.
138375         (func_import): Likewise. If libtool is not used, show this through
138376         an option --no-libtool.
138377         (func_create_testdir): Update.
138379 2006-07-29  Bruno Haible  <bruno@clisp.org>
138381         * gnulib-tool (func_import): Extend error message about missing
138382         --doc-base.
138384 2006-07-29  Bruno Haible  <bruno@clisp.org>
138386         * gnulib-tool (func_import): Don't create the $docbase directory if
138387         there is no file to store there.
138389 2006-07-29  Bruno Haible  <bruno@clisp.org>
138391         * gnulib-tool (autoconf_minversion): If a --dir option is given and
138392         relevant, look for configure.ac there, not in the current directory.
138393         Also use a simple search for AC_PREREQ, not "autoconf --trace".
138395 2006-07-29  Bruno Haible  <bruno@clisp.org>
138397         * gnulib-tool (SORT): New variable.
138398         (func_usage): Undocument --assume-autoconf option.
138399         Remove --assume-autoconf option handling.
138400         (autoconf_minversion): Determine from the contents of configure.ac.
138401         (func_import): Remove autoconf_minversion handling.
138402         Suggested by Eric Blake.
138404 2006-07-29  Bruno Haible  <bruno@clisp.org>
138406         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
138408 2006-07-29  Bruno Haible  <bruno@clisp.org>
138410         * config/srclist.txt (*setenv.[ch]): Remove rules.
138412 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
138414         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
138416 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
138418         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
138419         arpa/inet.h.
138421 2006-07-28  Simon Josefsson  <jas@extundo.com>
138423         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
138424         * modules/inet_pton (Depends-on): Likewise.
138426 2006-07-28  Simon Josefsson  <jas@extundo.com>
138428         * m4/netinet_in_h.m4: New file.
138430 2006-07-28  Simon Josefsson  <jas@extundo.com>
138432         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
138433         #include's.
138435 2006-07-28  Simon Josefsson  <jas@extundo.com>
138437         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
138438         #include's.
138440 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
138442         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
138443         setgid on directories only if they set these bits.
138444         * lib/modechange.h: Remove obsolete comment about masks.
138446 2006-07-28  Eric Blake  <ebb9@byu.net>
138448         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
138449         macro expansion.
138451 2006-07-28  Bruno Haible  <bruno@clisp.org>
138453         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
138455 2006-07-28  Bruno Haible  <bruno@clisp.org>
138457         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
138459 2006-07-28  Bruno Haible  <bruno@clisp.org>
138461         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
138462         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
138463         Define fallbacks.
138464         Avoids link error on FreeBSD 4.x.
138465         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
138467         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
138468         encoding.
138469         * lib/mbswidth.c (iswcntrl): Likewise.
138471 2006-07-27  Bruno Haible  <bruno@clisp.org>
138473         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
138474         test.
138476 2006-07-27  Bruno Haible  <bruno@clisp.org>
138478         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
138479         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
138480         defined.
138482 2006-07-26  Eric Blake  <ebb9@byu.net>
138484         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
138486 2006-07-26  Eric Blake  <ebb9@byu.net>
138488         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
138489         like mingw that lack mkstemp.
138490         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
138491         avoid compilation warning on mingw.
138493 2006-07-26  Bruno Haible  <bruno@clisp.org>
138495         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
138496         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
138497         INT_FAST*_MIN, INTPTR_MIN.
138499 2006-07-25  Bruno Haible  <bruno@clisp.org>
138501         * modules/version-etc (Depends-on): Add stdarg.
138503 2006-07-25  Bruno Haible  <bruno@clisp.org>
138505         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
138506         complex commands.
138508 2006-07-25  Bruno Haible  <bruno@clisp.org>
138510         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
138511         defined in <stdarg.h> or config.h.
138513 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
138515         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
138516         (gl_STDIO_SAFER): Remove.
138518 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
138520         * MODULES.html.sh (File stream based Input/Output):
138521         Add fopen-safer, tmpfile-safer; remove stdio-safer.
138522         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
138523         * modules/fopen-safer, modules/tmpfile-safer: New files.
138524         * modules/stdio-safer: Remove.
138526 2006-07-24  Bruno Haible  <bruno@clisp.org>
138528         * modules/tmpdir: New file.
138529         * MODULES.html.sh (File system functions): Add it.
138531 2006-07-24  Bruno Haible  <bruno@clisp.org>
138533         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
138534         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
138536 2006-07-24  Bruno Haible  <bruno@clisp.org>
138538         * modules/clean-temp: New file.
138540 2006-07-24  Bruno Haible  <bruno@clisp.org>
138542         * m4/tmpdir.m4: New file, from GNU gettext.
138544 2006-07-24  Bruno Haible  <bruno@clisp.org>
138546         * lib/tmpdir.h: New file, from GNU gettext.
138547         * lib/tmpdir.c: New file, from GNU gettext.
138549 2006-07-24  Bruno Haible  <bruno@clisp.org>
138551         * lib/clean-temp.h: New file, from GNU gettext.
138552         * lib/clean-temp.c: New file, from GNU gettext.
138554 2006-07-23  Eric Blake  <ebb9@byu.net>
138556         * modules/stdio-safer (Files): Add tmpfile-safer.c.
138557         (Depends-on): Add binary-io.
138559 2006-07-23  Eric Blake  <ebb9@byu.net>
138561         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
138563 2006-07-23  Eric Blake  <ebb9@byu.net>
138565         * lib/tmpfile-safer.c: New file.
138566         * lib/stdio-safer.h (fopen_safer): Add prototype.
138567         * lib/stdio--.h (tmpfile): Make safer.
138569 2006-07-23  Bruno Haible  <bruno@clisp.org>
138571         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
138572         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
138573         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
138574         gl_linked_remove_at): Use it.
138576 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
138577         and Simon Josefsson <jas@extundo.com>
138579         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
138581         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
138583 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
138585         * modules/close-stream: New file.
138586         * modules/closeout (Description): Make it clear that it exits
138587         with a diagnostic on error.
138588         (Depends-on): Add close-stream.  Remove fpending, stdbool.
138589         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
138591 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
138593         * m4/close-stream.m4: New file.
138595 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
138597         * lib/close-stream.c, lib/close-stream.h: New files.
138599 2006-07-22  Bruno Haible  <bruno@clisp.org>
138601         Merge from GNU gettext 0.15.
138603         2006-05-01  Bruno Haible  <bruno@clisp.org>
138605                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
138607         2006-07-22  Bruno Haible  <bruno@clisp.org>
138609                 * modules/javaversion: New file.
138610                 * MODULES.html.sh (Java): Add javaversion.
138612         2006-03-12  Bruno Haible  <bruno@clisp.org>
138614                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
138616         2005-12-04  Bruno Haible  <bruno@clisp.org>
138618                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
138619                 (untested).
138621         2006-06-21  Bruno Haible  <bruno@clisp.org>
138623                 Avoid warnings from recent versions of mcs.
138624                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
138625                 -o, -L, -r any more. Use options documented since mcs-1.0
138626                 instead. Similarly for -g.
138628         2005-12-04  Bruno Haible  <bruno@clisp.org>
138630                 * build-aux/csharpcomp.sh.in: Suffix for resources is
138631                 .resources, not .resource.
138633         2005-07-09  Bruno Haible  <bruno@clisp.org>
138635                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
138636                 add a .dll suffix.
138637                 Reported by Mark Junker <mjscod@gmx.de>.
138639         2006-07-22  Bruno Haible  <bruno@clisp.org>
138641                 * modules/gettext: Upgrade to gettext-0.15.
138642                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
138643                 m4/visibility.m4.
138644                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
138646 2006-07-22  Bruno Haible  <bruno@clisp.org>
138648         Merge from GNU gettext 0.15.
138650         2006-03-25  Bruno Haible  <bruno@clisp.org>
138652                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
138654         2006-07-21  Bruno Haible  <bruno@clisp.org>
138656                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
138657                 "1.1".
138659         2006-05-09  Bruno Haible  <bruno@clisp.org>
138661                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
138662                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
138663                 for the conftestver execution.
138665         2006-05-01  Bruno Haible  <bruno@clisp.org>
138667                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
138668                 optional target-version argument. Verify that the compiler
138669                 groks source of the specified source-version, or add -source
138670                 option as necessary. Verify that the compiler produces
138671                 bytecode in the specified target-version, or add -target and
138672                 -source options as necessary. Make the result of the test
138673                 available as variable CONF_JAVAC. Also log error output in
138674                 config.log.
138676         2006-03-11  Bruno Haible  <bruno@clisp.org>
138678                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
138680         2006-05-09  Bruno Haible  <bruno@clisp.org>
138682                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
138683                 CLASSPATH_SEPARATOR to a semicolon.
138685         2006-03-12  Bruno Haible  <bruno@clisp.org>
138687                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
138688                 available as variable CONF_JAVA, for subsequent autoconf
138689                 tests. Also log error output in config.log.
138691         2006-07-19  Bruno Haible  <bruno@clisp.org>
138693                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
138694                 that getline works on glibc2 systems. Needed to avoid trouble
138695                 in relocatable.c.
138696                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
138698         2005-12-04  Bruno Haible  <bruno@clisp.org>
138700                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
138701                 launcher (untested).
138703         2005-12-04  Bruno Haible  <bruno@clisp.org>
138705                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
138707         2006-07-22  Bruno Haible  <bruno@clisp.org>
138709                 * gettext.m4: Update from GNU gettext-0.15.
138710                 * nls.m4: Likewise.
138711                 * po.m4: Likewise.
138712                 * inttypes-pri.m4: Likewise.
138713                 * inttypes-h.m4: Renamed from inttypes.m4.
138714                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
138716 2006-07-22  Bruno Haible  <bruno@clisp.org>
138718         Merge from GNU gettext 0.15.
138720         2005-07-05  Bruno Haible  <bruno@clisp.org>
138722                 * printf-args.c (printf_fetchargs): Work around broken
138723                 definition of wint_t on mingw.
138725         2005-02-12  Bruno Haible  <bruno@clisp.org>
138727                 * xallocsa.h: Add extern "C" for C++.
138729         2006-05-17  Bruno Haible  <bruno@clisp.org>
138731                 Cygwin portability.
138732                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
138734         2006-04-30  Bruno Haible  <bruno@clisp.org>
138736                 * progreloc.c: Include <mach-o/dyld.h> if available.
138737                 (find_executable): Use _NSGetExecutablePath when possible.
138739         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
138741                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
138742                 function.
138744         2005-12-29  Bruno Haible  <bruno@clisp.org>
138746                 * progreloc.c (set_program_name_and_installdir): Fix
138747                 compilation error.
138749         2005-12-04  Bruno Haible  <bruno@clisp.org>
138751                 Cygwin portability.
138752                 * progreloc.c: Include <windows.h> also on Cygwin.
138753                 (find_executable): Add support for Cygwin.
138754                 (set_program_name_and_installdir): Handle also platforms with
138755                 nonempty EXEEXT.
138757         2006-07-11  Bruno Haible  <bruno@clisp.org>
138759                 * javacomp.c: Fix a comment.
138760                 Reported by Jim Meyering.
138762         2006-04-30  Bruno Haible  <bruno@clisp.org>
138764                 * javacomp.h (compile_java_class): Add source_version,
138765                 target_version arguments.
138766                 * javacomp.c: Rewritten to choose only a compiler that
138767                 respects the specified source_version and target_version.
138769         2006-06-27  Bruno Haible  <bruno@clisp.org>
138771                 Assume correct S_ISDIR macro.
138772                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
138774         2006-07-22  Bruno Haible  <bruno@clisp.org>
138776                 * javaversion.h: New file, from GNU gettext.
138777                 * javaversion.c: New file, from GNU gettext.
138778                 * javaversion.java: New file, from GNU gettext.
138779                 * javaversion.class: New file, from GNU gettext.
138781         2006-05-17  Bruno Haible  <bruno@clisp.org>
138783                 Cygwin portability.
138784                 * javaexec.c (execute_java_class): Test for jview program
138785                 also on Cygwin.
138787         2006-04-09  Bruno Haible  <bruno@clisp.org>
138789                 * fatal-signal.c: Don't include string.h.
138790                 (at_fatal_signal): Use a copying loop instead of memcpy.
138792         2005-12-04  Bruno Haible  <bruno@clisp.org>
138794                 * csharpexec.c: Add support for 'clix' launcher (untested).
138795                 (execute_csharp_using_sscli): New function.
138796                 (execute_csharp_program): Call it.
138798         2006-06-21  Bruno Haible  <bruno@clisp.org>
138800                 Avoid warnings from recent versions of mcs.
138801                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
138802                 -o, -L, -r any more. Use options documented since mcs-1.0
138803                 instead. Similarly for -g.
138805         2005-07-09  Bruno Haible  <bruno@clisp.org>
138807                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
138808                 add a .dll suffix.
138809                 Reported by Mark Junker <mjscod@gmx.de>.
138811         2006-06-17  Bruno Haible  <bruno@clisp.org>
138813                 * config.charset: Update for NetBSD 3.0.
138815         2006-05-17  Bruno Haible  <bruno@clisp.org>
138817                 Cygwin portability.
138818                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
138820         2006-05-16  Bruno Haible  <bruno@clisp.org>
138822                 * localcharset.c [CYGWIN]: Include <windows.h>.
138823                 (get_charset_aliases): For Cygwin, return the same CPxxx
138824                 aliases list as under WIN32.
138825                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
138826                 the environment variables. Fall back to GetACP().
138828         2006-04-05  Bruno Haible  <bruno@clisp.org>
138830                 * config.charset: Update Juan Manuel Guerrero's address.
138832         2005-02-12  Bruno Haible  <bruno@clisp.org>
138834                 * allocsa.h: Add extern "C" for C++.
138836         2005-02-10  Bruno Haible  <bruno@clisp.org>
138838                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
138839                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
138841         2006-07-22  Bruno Haible  <bruno@clisp.org>
138843                 * gettext.h: Update to GNU gettext-0.15.
138845 2006-07-22  Bruno Haible  <bruno@clisp.org>
138847         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
138848         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
138849         lib-prefix.m4, longdouble.m4, ssize_t.m4.
138851 2006-07-21  Eric Blake  <ebb9@byu.net>
138853         * modules/stdlib-safer: New file.
138854         * MODULES.html.sh (File stream based Input/Output): Add
138855         stdlib-safer.
138857 2006-07-21  Eric Blake  <ebb9@byu.net>
138859         * lib/stdlib-safer.h: New file from coreutils, required by
138860         stdlib--.h.
138862 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
138864         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
138866 2006-07-20  Bruno Haible  <bruno@clisp.org>
138868         * gnulib-tool: Recognize new option --assume-autoconf.
138869         (autoconf_minversion): New variable.
138870         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
138872 2006-07-20  Bruno Haible  <bruno@clisp.org>
138874         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
138876 2006-07-19  Derek R. Price  <derek@ximbiot.com>
138878         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
138879         Reindent and repaginate.
138881 2006-07-19  Derek Price  <derek@ximbiot.com>
138883         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
138884         Correct grammar.
138886 2006-07-17  Bruno Haible  <bruno@clisp.org>
138888         * modules/list: New file.
138889         * modules/array-list: New file.
138890         * modules/carray-list, modules/carray-list-tests: New files.
138891         * modules/linked-list, modules/linked-list-tests: New files.
138892         * modules/avltree-list, modules/avltree-list-tests: New files.
138893         * modules/rbtree-list, modules/rbtree-list-tests: New files.
138894         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
138895         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
138896         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
138897         * modules/oset: New file.
138898         * modules/array-oset: New file.
138899         * modules/avltree-oset, modules/avltree-oset-tests: New files.
138900         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
138901         * tests/test-carray_list.c: New file.
138902         * tests/test-linked_list.c: New file.
138903         * tests/test-avltree_list.c: New file.
138904         * tests/test-rbtree_list.c: New file.
138905         * tests/test-linkedhash_list.c: New file.
138906         * tests/test-avltreehash_list.c: New file.
138907         * tests/test-rbtreehash_list.c: New file.
138908         * tests/test-avltree_oset.c: New file.
138909         * tests/test-rbtree_oset.c: New file.
138910         * MODULES.html.sh (Container data structures): New section.
138912 2006-07-17  Bruno Haible  <bruno@clisp.org>
138914         * m4/gl_list.m4: New file.
138916 2006-07-17  Bruno Haible  <bruno@clisp.org>
138918         * lib/gl_list.h: New file.
138919         * lib/gl_list.c: New file.
138920         * lib/gl_array_list.h: New file.
138921         * lib/gl_array_list.c: New file.
138922         * lib/gl_carray_list.h: New file.
138923         * lib/gl_carray_list.c: New file.
138924         * lib/gl_linked_list.h: New file.
138925         * lib/gl_linked_list.c: New file.
138926         * lib/gl_anylinked_list1.h: New file.
138927         * lib/gl_anylinked_list2.h: New file.
138928         * lib/gl_avltree_list.h: New file.
138929         * lib/gl_avltree_list.c: New file.
138930         * lib/gl_anyavltree_list1.h: New file.
138931         * lib/gl_anyavltree_list2.h: New file.
138932         * lib/gl_rbtree_list.h: New file.
138933         * lib/gl_rbtree_list.c: New file.
138934         * lib/gl_anyrbtree_list1.h: New file.
138935         * lib/gl_anyrbtree_list2.h: New file.
138936         * lib/gl_anytree_list1.h: New file.
138937         * lib/gl_anytree_list2.h: New file.
138938         * lib/gl_linkedhash_list.h: New file.
138939         * lib/gl_linkedhash_list.c: New file.
138940         * lib/gl_anyhash_list1.h: New file.
138941         * lib/gl_anyhash_list2.h: New file.
138942         * lib/gl_avltreehash_list.h: New file.
138943         * lib/gl_avltreehash_list.c: New file.
138944         * lib/gl_rbtreehash_list.h: New file.
138945         * lib/gl_rbtreehash_list.c: New file.
138946         * lib/gl_anytreehash_list1.h: New file.
138947         * lib/gl_anytreehash_list2.h: New file.
138949         * lib/gl_oset.h: New file.
138950         * lib/gl_oset.c: New file.
138951         * lib/gl_array_oset.h: New file.
138952         * lib/gl_array_oset.c: New file.
138953         * lib/gl_avltree_oset.h: New file.
138954         * lib/gl_avltree_oset.c: New file.
138955         * lib/gl_rbtree_oset.h: New file.
138956         * lib/gl_rbtree_oset.c: New file.
138957         * lib/gl_anytree_oset.h: New file.
138959 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
138961         * m4/mkancesdirs.m4: New file.
138962         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
138963         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
138964         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
138965         it.
138967 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
138969         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
138970         * lib/mkancesdirs.h: New files.
138971         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
138972         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
138973         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
138974         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
138975         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
138976         callers changed.  Revamp internals significantly, by not
138977         attempting to create directories that are temporarily more
138978         permissive than the final results.  Do not attempt to use
138979         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
138980         This removes some race conditions, fixes some bugs, and simplifies
138981         things.  Use new dirchownmod function to do owner and mode changes.
138982         * lib/mkdir-p.h: Likewise.
138983         * lib/modechange.c (octal_to_mode): New function.
138984         (struct mode_change): New member mentioned.
138985         (make_node_op_equals): New arg mentioned.  All callers changed.
138986         (mode_compile): Keep track of which mode bits the user has explicitly
138987         mentioned.
138988         (mode_adjust): New arg DIR, so that we implement the X op correctly.
138989         New arg PMODE_BITS, to keep track of which mode bits the user
138990         mentioned; it treats S_ISUID and S_ISGID speciall.
138991         All callers changed.
138992         * lib/modechange.h: Likewise.
138994 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
138996         * MODULES.html.sh: Add mkancestors.
138997         * modules/mkancesdirs: New module.
138998         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
138999         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
139000         The chdir-safer and afs files are now orphans; I'll remove them
139001         unless someone speaks up.
139002         Add lib/dirchownmod.c, lib/dirchownmod.h.
139003         (Depends-on): Remove alloca, chown, save-cwd, dirname.
139004         Add lchown, mkancesdirs.
139005         (Maintainer): Add self.
139007 2006-07-15  Karl Berry  <karl@gnu.org>
139009         * gnulib-tool: help message wording/arrangement.
139011 2006-07-14  Simon Josefsson  <jas@extundo.com>
139013         * doc/gnulib.texi (Libtool and Windows): New section.
139015 2006-07-12  Simon Josefsson  <jas@extundo.com>
139017         * modules/gendocs (License): Fix license, approved by Karl.
139019 2006-07-12  Eric Blake  <ebb9@byu.net>
139021         * MODULES.html.sh: Add gendocs.
139023 2006-07-11  Eric Blake  <ebb9@byu.net>
139025         * modules/fdl: New module, to install doc/fdl.texi.
139026         * MODULES.html.sh: Add new section for documentation modules.
139027         * gnulib-tool: Avoid space-tab.
139028         (--doc-base): New option, to manage files from doc.
139030 2006-07-11  Eric Blake  <ebb9@byu.net>
139032         * m4/absolute-header.m4: Fix comments to match recent change.
139034 2006-07-11  Eric Blake  <ebb9@byu.net>
139036         * gnulib-tool: List --doc-base before --tests-base.
139038 2006-07-11  Derek R. Price  <derek@ximbiot.com>
139040         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
139042 2006-07-11  Bruno Haible  <bruno@clisp.org>
139044         * README: Mention where to put documentation.
139046 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
139048         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
139050 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
139052         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
139053         to stdint.m4.
139055 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
139057         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
139058         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
139059         "no/such/file/stdint.h" when there is no such file, so that
139060         the resulting C code can be parsed by dodgy compilers.
139061         Problems reported by Bob Proulx.
139063 2006-07-10  Derek R. Price  <derek@ximbiot.com>
139065         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
139066         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
139067         macros into the GNU _D_EXACT_NAMLEN.
139068         * lib/savedir.c:  Likewise.
139069         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
139071 2006-07-10  Derek R. Price  <derek@ximbiot.com>
139072         and Paul Eggert  <eggert@cs.ucla.edu>
139074         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
139075         * m4/savedir.m4:
139076         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
139077         macros into the GNU _D_EXACT_NAMLEN.
139079 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
139081         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
139082         around the absolute name, to work around a problem with the HP-UX
139083         11.23 native C compiler, reported by Bob Proulx.
139085 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
139087         * doc/maintain.texi, make-stds.texi: Sync from
139088         <http://savannah.gnu.org/projects/gnustandards>.
139090 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
139092         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
139094 2006-07-09  Jim Meyering  <jim@meyering.net>
139096         * m4/glob.m4: Remove a doubled word in a comment.
139098 2006-07-09  Jim Meyering  <jim@meyering.net>
139100         * lib/argp-pv.c: Remove a doubled word in a comment.
139101         * lib/check-version.c (check_version): Likewise.
139102         * lib/javacomp.c (compile_java_class): Likewise.
139104 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
139106         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
139107         for the benefit of people using Autoconf 2.60.  If you want to
139108         support older Autoconf versions you can copy m4/onceonly_2_57.m4
139109         (or m4/onceonly.m4, if pre-2.57) manually.
139111 2006-07-08  Jim Meyering  <jim@meyering.net>
139113         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
139114         comment.
139115         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
139116         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
139117         comment.
139119 2006-07-08  Jim Meyering  <jim@meyering.net>
139121         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
139123 2006-07-07  Simon Josefsson  <jas@extundo.com>
139125         * tests/test-crc.c: Change expected crc value, the test vector
139126         were probably computed using the old broken crc.c?
139128 2006-07-06  Simon Josefsson  <jas@extundo.com>
139130         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
139131         now the canonical place for the M4 file).
139133         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
139134         from the sys_socket dependency now.
139136         * modules/inet_pton (Files): Ditto.
139138         * modules/inet_ntop (Files): Ditto.
139140 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
139142         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
139143         not gl_PREREQ_GETUSERSHELL.
139145 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
139147         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
139148         with only one argument, for Autoconf 2.60.
139149         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
139150         expand to nothing, so add a shell command to avoid syntax error.
139151         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
139153 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
139155         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
139157 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
139159         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
139160         no longer needed.  Check for isblank decl.
139161         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
139162         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
139163         of existence.
139165 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
139167         * lib/getloadavg.c: Use __VMS, not VMS.
139168         * lib/getopt.c: Likewise.
139169         * lib/getpagesize.h: Likewise.
139170         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
139171         and probably does not work.
139173 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
139175         * lib/.cppi-disable: Add wcwidth.
139176         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
139177         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
139178         (ISGRAPH): Remove.  All uses changed to isgraph.
139179         (FOLD) [!defined _LIBC]: Remove special case.
139180         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
139181         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
139182         HAVE_ISBLANK.
139183         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
139184         case.
139186 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
139188         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
139189         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
139190         brackets.  Other minor changes to suppress some compiler
139191         warnings.
139193 2006-07-06  Derek R. Price  <derek@ximbiot.com>
139194         and Paul Eggert  <eggert@cs.ucla.edu>
139196         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
139197         of invoking obsolescent AC_HEADER_DIRENT macro.
139198         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
139199         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
139200         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
139201         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
139202         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
139203         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
139204         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
139205         * m4/readdir.m4: Remove; no longer needed.
139207 2006-07-06  Derek R. Price  <derek@ximbiot.com>
139208         and Paul Eggert  <eggert@cs.ucla.edu>
139210         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
139211         Don't worry about this obsolete case any more.
139212         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
139213         directories.
139214         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
139215         worry about this obsolete case any more.
139216         * lib/fts.c: Likewise.
139217         * lib/getcwd.c: Likewise.
139218         * lib/glob.h: Likewise.
139219         * lib/savedir.c: Likewise.
139221 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
139223         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
139224         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
139225         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
139226         needed.
139227         All uses removed.
139228         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
139229         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
139230         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
139231         needed.
139232         * m4/getdate.m4 (gl_GETDATE): Likewise.
139233         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
139234         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
139235         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
139236         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
139237         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
139238         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
139239         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
139240         needed.
139242 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
139244         * lib/memcasecmp.c: Include <limits.h>.
139245         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
139246         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
139247         Don't assume isdigit succeeds only on '0' through '9'.
139249 2006-07-05  Eric Blake  <ebb9@byu.net>
139251         * modules/getaddrinfo (Depends-on): Add snprintf.
139253 2006-07-05  Eric Blake  <ebb9@byu.net>
139255         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
139256         to avoid 'header present but could not be compiled' on cygwin.
139258 2006-07-05  Eric Blake  <ebb9@byu.net>
139260         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
139261         missing from netdb.h.
139262         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
139264 2006-07-05  Derek R. Price  <derek@ximbiot.com>
139266         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
139267         no longer needed.
139268         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
139269         * m4/getdate.m4 (gl_GETDATE): Likewise.
139270         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
139271         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
139272         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
139273         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
139274         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
139276 2006-07-05  Derek R. Price  <derek@ximbiot.com>
139278         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
139279         All uses of is_space replaced by isspace.
139280         * lib/exit.h: Don't talk about STDC_HEADERS.
139281         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
139282         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
139283         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
139284         replaced by isprint etc.
139285         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
139286         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
139287         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
139288         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
139289         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
139290         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
139292 2006-07-05  Bruno Haible  <bruno@clisp.org>
139294         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
139295         the function exists, before testing against AIX.
139296         Reported by Martin Lambers <marlam@marlam.de>.
139298 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
139300         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
139301         From Mark D. Baushke.
139303 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
139305         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
139306         to the absolute name, not just one, to bypass Sun C 5.8's
139307         "warning: #include of /usr/include/... may be non-portable".
139309 2006-07-04  Eric Blake  <ebb9@byu.net>
139311         * modules/dirname-tests: New test module.
139312         * tests/test-dirname.c: New file, replacing dirname.c
139313         TEST_DIRNAME section that was recently deleted.
139315 2006-07-04  Bruno Haible  <bruno@clisp.org>
139317         Assume ANSI C header files and <ctype.h> functions.
139318         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
139319         (mbsnwidth): Use isprint, iscntrl instead.
139321 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
139323         Merge from coreutils.
139324         * MODULES.html.sh: Add xstrtold.
139325         * modules/xstrtold: New file.
139326         * modules/cycle-check (Files): Add lib/same-inode.h.
139327         * modules/dirname (Files): Add m4/double-slash-root.m4.
139328         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
139329         * modules/mkdir-p (Files): Add lib/same-inode.h.
139330         * modules/same (Files): Add lib/same-inode.h.
139332 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
139334         * m4/absolute-header.m4: Renamed from full-header-path.m4.
139335         This is to keep the terminology clean; POSIX talks about
139336         "absolute pathnames", not "full pathnames", but the GNU
139337         Coding Standards say to use "path" for something else;
139338         so use "absolute" to keep both sides happy.
139339         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
139340         Set gl_absolute_header, not gl_full_header_path.
139341         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
139342         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
139343         All uses changed.
139345         Merge from coreutils.
139347         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
139349         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
139350         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
139351         want to require the building of c-strtod.o.
139352         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
139353         needs -lm directly.
139354         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
139356         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
139358         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
139359         --as-needed option if available.  Problem reported by Albert Chin in
139360         <http://lists.gnu.org/r/bug-gnulib/2006-06/msg00114.html>.
139361         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
139362         cc merely issues a bunch of annoying warnings for --as-needed
139363         (this problem was reported by Bob Proulx).  Also, try linking with
139364         -lm to detect a bug in binutils 2.16 (this problem was reported
139365         by Ralf Wildenhues).
139367         2006-06-18  Jim Meyering  <jim@meyering.net>
139369         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
139370         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
139371         macro.
139372         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
139373         also check for glibc-2.4's abort-inducing bug.
139375         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
139376         Low-probability clean-up should be to use rmdir to get rid of
139377         the just-created directory, not unlink.
139379         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
139380         configure fail, and request a bug report to inform us about it.
139381         Add a comment that, barring reports to the contrary, in 2007 we'll
139382         assume ftruncate is universally available.
139384         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
139386         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
139388         2006-03-12  Jim Meyering  <jim@meyering.net>
139390         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
139391         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
139392         * m4/same.m4 (gl_SAME): Likewise.
139393         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
139395         2006-03-11  Eric Blake  <ebb9@byu.net>
139397         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
139398         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
139399         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
139400         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
139402 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
139404         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
139405         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
139406         reported by Mark D. Baushke, one in
139407         <http://lists.gnu.org/r/bug-gnulib/2006-07/msg00015.html>.
139409         Merge from coreutils.
139411         * lib/.cppi-disable: Add stdint_.h.
139412         * lib/.cvsignore: Add stdint.h.
139414         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
139416         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
139417         both double and long double versions.
139418         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
139419         * lib/xstrtold.c: New file.
139420         * lib/xstrtod.h (xstrtold): New decl.
139422         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
139424         * lib/filemode.c (setst): Remove.
139425         (strmode): Rewrite to avoid setst.  This makes the code shorter,
139426         (arguably) clearer, and the generated code is a bit smaller on my
139427         Debian GNU/Linux stable x86 host.
139429         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
139431         * lib/filemode.c: Include "filemode.h" first, to test the interface.
139432         Assume that filemode.h includes sys/types.h and sys/stat.h.
139433         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
139434         (ftypelet): Reorder to put common cases first, for efficiency.
139435         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
139436         to do 'M'.
139437         (strmode): Renamed from mode_string, and now stores 12 bytes instead
139438         of 10, for compatibility with FreeBSD.  All callers changed.
139439         (filemodestring): Now stores 12 bytes instead of 10, and sets file
139440         types that can't be deduced solely from st_mode.  First arg is now a
139441         const pointer.
139442         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
139443         (strmode): Renamed from mode_string.
139444         (filemodestring): New decl.
139445         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
139446         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
139447         needed.
139448         (S_ISPORT, S_ISWHT): New macros, if not already defined.
139450         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
139452         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
139453         fsusage.h now does that.  Include fsusage.h first, to test interface.
139454         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
139455         at most one method (the old code could have generated decls that
139456         didn't conform to C89, not that this was ever exercised).
139457         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
139459         2006-03-19  Jim Meyering  <jim@meyering.net>
139461         Work even in a chroot where d_ino values for entries in "/"
139462         don't match the stat.st_ino values for the same names.
139463         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
139464         number, iterate through all entries again, using lstat instead.
139465         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
139466         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
139468         * lib/getcwd.c (__getcwd): Clarify a comment.
139469         Use memcpy in place of a call to strcpy.
139471         2006-03-12  Jim Meyering  <jim@meyering.net>
139473         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
139474         matches that of the current directory (which we're about to chdir ".."
139475         out of), then save the dev-ino of the parent, instead.
139477         * lib/same-inode.h (SAME_INODE): New file/macro.
139478         * lib/chdir-safer.c (SAME_INODE): Remove definition.
139479         Include "same-inode.h", instead.
139480         * lib/same.c: Likewise.
139481         * lib/cycle-check.h: Include "same-inode.h".
139482         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
139483         * lib/cycle-check.c (SAME_INODE): Remove definition.
139484         * lib/root-dev-ino.h: Include "same-inode.h".
139486         2006-03-11  Eric Blake  <ebb9@byu.net>
139488         * lib/same.c (same_name): s/base_name/last_component/
139489         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
139490         * lib/filenamecat.c (file_name_concat): Likewise.
139492         2006-03-11  Eric Blake  <ebb9@byu.net>,
139493                     Paul Eggert  <eggert@cs.ucla.edu>
139495         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
139496         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
139497         drive prefix.
139498         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
139499         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
139500         (last_component): New method.
139501         * lib/dirname.c (dir_len): Determine when drive letters need a
139502         subsequent slash.  Preserve // when it is special.
139503         (dir_name): Don't append dot when drive letter is absolute.
139504         [TEST_DIRNAME]: Move into a full-blown gnulib test.
139505         * lib/basename.c (base_name): New semantics - malloc the result.
139506         Preserve // when it is special.  Preserve relative files that look
139507         like drive letters.
139508         (base_len): Preserve // when it is special.
139509         (last_component): New method, similar to old base_name semantics.
139510         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
139511         base_name.  Strip redundant slashes from ///.
139513 2006-07-03  Jim Meyering  <jim@meyering.net>
139515         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
139516         macro is used before the first cycle_check call.
139518 2006-07-03  Eric Blake  <ebb9@byu.net>
139520         * modules/dirname (Depends-on): Add xstrndup.
139522 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
139524         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
139525         test cases, so that config.log is a bit easier to follow.
139527 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
139529         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
139530         both are 64 bits, since this seems to be the tradition, and this
139531         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
139532         we ever run into a host that prefers long long to long in this
139533         case, we'll need another configure-time test.  Problem reported by
139534         Jim Meyering.
139536 2006-07-02  Eric Blake  <ebb9@byu.net>
139538         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
139540 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
139542         * modules/inttypes (Depends-on): No longer depends on stdint.
139543         * modules/stdint (Description): Say more about assumptions.
139544         Say that the fast types might differ.  Say macros are used.
139545         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
139546         (Makefile.am): Revise list of substituted symbols to match
139547         new stdint.m4.
139548         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
139549         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
139550         * tests/test-stdint.c (verify_same_types)
139551         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
139552         the code conforms to C99/C89.
139553         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
139554         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
139556 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
139558         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
139559         but fix a bug, by requiring at least 64 bits.
139560         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
139561         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
139562         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
139563         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
139565         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
139566         changes.  Make 2.59 a prerequisite.  Check and substitute for
139567         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
139568         inttypes.h.  Do not use special include files; just use the
139569         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
139570         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
139571         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
139572         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
139573         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
139574         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
139575         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
139576         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
139577         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
139578         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
139579         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
139580         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
139581         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
139582         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
139583         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
139584         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
139585         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
139586         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
139587         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
139588         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
139589         WINT_MAX.  Check for C99 conformance more strictly, by detecting
139590         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
139591         not check for things that C99 does not require, e.g., int8_t.  If
139592         a test isn't needed unless <stdint.h> isn't working, and is
139593         unlikely to be needed for any other reason, then don't do it
139594         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
139595         size_t, since we assume C89 freestanding at least.  Do not check
139596         for sig_atomic_t, wchar_t, or wint_t, since the code now does
139597         the right thing even if the types are not defined.  Instead use:
139598         (gl_STDINT_TYPE_PROPERTIES): New macro.
139599         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
139600         testing whether <sys/types.h> clashes, as Autoconf does this for
139601         us now.  All uses removed.
139602         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
139603         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
139604         (gl_CHECK_TYPE_SAME):
139605         Remove; no longer needed.
139606         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
139607         exists, since we'll return 0 anyway in that case.
139608         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
139610 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
139612         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
139613         possible collision with system files.
139614         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
139615         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
139616         WCHAR_MIN and WCHAR_MAX in this case.
139617         (<stddef.h>): Do not include; no longer needed.
139618         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
139619         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
139620         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
139621         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
139622         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
139623         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
139624         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
139625         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
139626         !defined(__c99))]: Include in this case too, since it's harmless
139627         now.
139628         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
139629         dangerous to do so.
139630         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
139631         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
139632         (_STDINT_MIN, _STDINT_MAX): New macros.
139633         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
139634         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
139635         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
139636         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
139637         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
139638         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
139639         macros, not typedefs; this simplifies things quite a bit.
139640         Use long int for all types narrower than int64_t.
139641         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
139642         Define in terms of long long int or int64_t or long int,
139643         not int64_t or int32_t.  This saves some compile-time testing.
139644         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
139645         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
139646         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
139647         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
139648         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
139649         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
139650         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
139651         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
139652         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
139653         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
139654         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
139655         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
139656         undef any previous version and define our own version, for
139657         simplicity and consistency with the new macros for types.
139658         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
139659         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
139660         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
139661         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
139662         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
139663         @WINT_T_SUFFIX@ to keep things simple here.
139664         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
139665         Simplify by assuming typical 8/16/32/64 host, since we're
139666         already doing that elsewhere anyway.
139667         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
139668         and assume long long int is 64 bits if available.  This
139669         speeds up 'configure'.
139671 2006-07-01  Eric Blake  <ebb9@byu.net>
139673         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
139674         Reported by Andreas Buening.
139676 2006-07-01  Eric Blake  <ebb9@byu.net>
139678         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
139680 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
139682         * lib/getaddrinfo.c: fixed typo
139684 2006-06-29  Jim Meyering  <jim@meyering.net>
139686         * modules/strftime (Maintainer): Add my name, since with the
139687         FPRINTFTIME changes strftime.c has forked from glibc.
139689 2006-06-29  Eric Blake  <ebb9@byu.net>
139691         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
139693 2006-06-29  Eric Blake  <ebb9@byu.net>
139695         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
139697 2006-06-29  Eric Blake  <ebb9@byu.net>
139699         * lib/stat_.h: New file.
139701 2006-06-29  Eric Blake  <ebb9@byu.net>
139703         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
139704         unused static function.
139706 2006-06-29  Eric Blake  <ebb9@byu.net>
139708         * doc/functions.texi (Function Portability): Document missing lstat
139709         on mingw.
139711 2006-06-29  Eric Blake  <ebb9@byu.net>
139713         * MODULES.html.sh: Add sys_stat.
139714         * modules/sys_stat: New module.
139715         * modules/mkstemp (Depends-on): Add sys_stat.
139717 2006-06-29  Derek R. Price  <derek@ximbiot.com>
139719         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
139721 2006-06-29  Derek R. Price  <derek@ximbiot.com>
139723         * m4/c-bs-a.m4: Removed.
139725 2006-06-29  Derek R. Price  <derek@ximbiot.com>
139727         * lib/strftime.c: Assume strftime() exists.
139729 2006-06-29  Derek Price  <derek@ximbiot.com>
139731         * modules/c-bs-a: Removed - \a is C89.
139732         * MODULES.html.sh: Remove c-bs-a.
139734 2006-06-29  Bruno Haible  <bruno@clisp.org>
139736         * modules/wcwidth (License): Change to LGPL.
139738 2006-06-28  Simon Josefsson  <jas@extundo.com>
139740         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
139741         on _WIN32.
139743         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
139744         getnameinfo.
139746 2006-06-28  Simon Josefsson  <jas@extundo.com>
139748         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
139750 2006-06-28  Simon Josefsson  <jas@extundo.com>
139752         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
139753         functions there.  It will succeed on Windows XP, but on Windows
139754         2000 and (presumably) earlier, it will fail, and use the internal
139755         re-implementation.
139756         (use_win32_p): New function.
139757         (getaddrinfo): Use strtoul on servname, to support numeric ports.
139758         Support AI_NUMERICSERV to disable getservbyname.
139759         (getnameinfo): New function, only supports
139760         NI_NUMERICHOST|NI_NUMERICSERV for now.
139762         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
139763         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
139764         getnameinfo.
139766 2006-06-28  Eric Blake  <ebb9@byu.net>
139768         * modules/wcwidth: New file.
139769         * modules/mbchar (Depends-on): Add wcwidth.
139770         * modules/mbswidth (Depends-on): Add wcwidth.
139771         * MODULES.html.sh: Add wcwidth.
139773 2006-06-28  Eric Blake  <ebb9@byu.net>
139775         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
139776         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
139778 2006-06-28  Eric Blake  <ebb9@byu.net>
139780         * lib/xvasprintf.h: Fix comments.
139782 2006-06-28  Eric Blake  <ebb9@byu.net>
139784         * lib/mbchar.h (wcwidth): Include wcwidth.h.
139785         * lib/mbswidth.c (wcwidth): Move from here...
139786         * lib/wcwidth.h: ...to this new file.
139788 2006-06-28  Derek R. Price  <derek@ximbiot.com>
139790         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
139792         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
139793         it's obsolete.
139794         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
139796 2006-06-28  Derek R. Price  <derek@ximbiot.com>
139798         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
139799         Autoconf 2.60 says this stuff was obsolete.
139801 2006-06-28  Bruno Haible  <bruno@clisp.org>
139803         * modules/wcwidth (Files): Add m4/wchar_t.m4.
139805 2006-06-28  Bruno Haible  <bruno@clisp.org>
139807         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
139808         gt_TYPE_WCHAR_T.
139810 2006-06-28  Bruno Haible  <bruno@clisp.org>
139812         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
139813         declaration for wcwidth.
139814         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctype.h>.
139816 2006-06-28  Bruno Haible  <bruno@clisp.org>
139818         * lib/mkdtemp.c [MINGW]: Include <io.h>.
139819         (mkdir): Define using _mkdir.
139821 2006-06-28  Bruno Haible  <bruno@clisp.org>
139823         * lib/getaddrinfo.h: Fix POSIX URL.
139824         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
139825         _WIN32.
139826         (use_win32_p): Make static.
139827         (getaddrinfo): Reject service name if it is empty or does not consist
139828         solely of decimal digits, or if its value is > 65535.
139829         (getnameinfo): Remove useless casts.
139831 2006-06-27  Simon Josefsson  <jas@extundo.com>
139833         * modules/sys_select: New file, suggested by Bruno Haible, Paul
139834         Eggert and Martin Lambers.
139836 2006-06-27  Simon Josefsson  <jas@extundo.com>
139838         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
139839         Eggert and Martin Lambers.
139841 2006-06-27  Bruno Haible  <bruno@clisp.org>
139843         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
139844         result to 0, not to empty.
139845         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
139847 2006-06-27  Bruno Haible  <bruno@clisp.org>
139849         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
139851 2006-06-26  Simon Josefsson  <jas@extundo.com>
139853         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
139854         present.
139856 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
139858         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
139859         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
139860         <http://lists.gnu.org/r/bug-gnulib/2006-06/msg00181.html>.
139862 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
139864         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
139866 2006-06-26  Bruno Haible  <bruno@clisp.org>
139868         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
139870 2006-06-26  Bruno Haible  <bruno@clisp.org>
139872         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
139874 2006-06-26  Bruno Haible  <bruno@clisp.org>
139876         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
139877         SGI C compiler in pre-C99 mode.
139878         Suggested by Mark D. Baushke and Larry Jones.
139880 2006-06-26  Bruno Haible  <bruno@clisp.org>
139882         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
139883         WCHAR_MAX.
139884         Reported by Mark D. Baushke and Larry Jones.
139886 2006-06-26  Bruno Haible  <bruno@clisp.org>
139888         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
139889         in pre-C99 mode.
139890         Suggested by Mark D. Baushke and Larry Jones.
139892 2006-06-23  Simon Josefsson  <jas@extundo.com>
139893             Bruno Haible  <bruno@clisp.org>
139895         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
139896         Emit mostlyclean-local rule.
139897         (func_emit_tests_Makefile_am): Likewise.
139898         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
139900 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
139902         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
139904 2006-06-23  Bruno Haible  <bruno@clisp.org>
139906         * tests/test-stdint.c: Update to match ISO C 99 Technical
139907         Corrigendum 1.
139909 2006-06-23  Bruno Haible  <bruno@clisp.org>
139911         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
139913 2006-06-23  Bruno Haible  <bruno@clisp.org>
139915         * lib/stdint_.h: Treat IRIX like OpenBSD.
139917 2006-06-23  Bruno Haible  <bruno@clisp.org>
139919         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
139920         ISO C 99 Technical Corrigendum 1.
139922 2006-06-22  Simon Josefsson  <jas@extundo.com>
139924         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
139925         MinGW.
139927 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
139929         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
139930         needed.  Some compiler complained about some of them.  Problem reported
139931         by Larry Jones in
139932         <http://lists.gnu.org/r/bug-gnulib/2006-06/msg00172.html>.
139934 2006-06-21  Simon Josefsson  <jas@extundo.com>
139936         * tests/test-getaddrinfo.c: New file.
139938         * modules/getaddrinfo-tests: New file.
139940         * MODULES.html.sh: Add inet_pton.
139942         * modules/inet_pton: New file.
139944 2006-06-21  Simon Josefsson  <jas@extundo.com>
139946         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
139947         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
139948         of using the (limited) gnulib implementation on Windows XP.
139950         * m4/inet_pton.m4: New file.
139952 2006-06-21  Simon Josefsson  <jas@extundo.com>
139954         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
139955         variable.
139957         * lib/socket_.h: Don't define WINVER.
139959         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
139960         slightly modified to work in gnulib.
139962 2006-06-21  Simon Josefsson  <jas@extundo.com>
139964         * doc/gnulib.texi (Windows sockets): Add.
139966 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
139968         * lib/read-file.c (fread_file): Start with buffer allocation of
139969         0 bytes rather than 1 byte; this simplifies the code.
139970         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
139971         code to free buffer and save/restore errno.
139972         (internal_read_file): Remove unused local.
139974 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
139976         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
139977         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
139978         Problem reported by Denis Excoffier in
139979         <http://lists.gnu.org/r/bug-tar/2006-06/msg00023.html>.
139981 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
139983         * modules/sys_socket, modules/socklen: Include sys/types since
139984         FreeBSD 4.x's sys/socket.h needs it.
139986 2006-06-19  Simon Josefsson  <jas@extundo.com>
139988         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
139990 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
139992         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
139994 2006-06-19  Bruno Haible  <bruno@clisp.org>
139996         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
139997         and FULL_PATH_INTTYPES_H in angle brackets.
139998         Reported by Mark D. Baushke <mdb@gnu.org>.
140000 2006-06-17  Eric Blake  <ebb9@byu.net>
140002         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
140003         errno.
140005 2006-06-17  Bruno Haible  <bruno@clisp.org>
140007         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
140008         <sys/inttypes.h>.
140010 2006-06-17  Bruno Haible  <bruno@clisp.org>
140012         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
140013         whether errno is declared. Assume <errno.h> declares errno.
140015 2006-06-17  Bruno Haible  <bruno@clisp.org>
140017         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
140019 2006-06-17  Bruno Haible  <bruno@clisp.org>
140021         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
140022         problem on Solaris 2.5.1.
140024 2006-06-16  Eric Blake  <ebb9@byu.net>
140026         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
140027         * lib/unicodeio.c [!defined errno]: Likewise.
140028         * lib/strtol.c [!defined errno]: Likewise.
140029         * lib/strtod.c [!defined errno]: Likewise.
140031 2006-06-15  Eric Blake  <ebb9@byu.net>
140033         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
140035 2006-06-15  Eric Blake  <ebb9@byu.net>
140037         * config/srclist.txt (ssize_t.m4): Lose sync.
140039 2006-06-15  Bruno Haible  <bruno@clisp.org>
140041         * modules/stdint (Files): Include m4/full-header-path.m4,
140042         m4/size_max.m4, m4/wchar_t.m4.
140043         (Makefile.am): Many more substitutions.
140044         * modules/stdint-tests: New file.
140045         * tests/test-stdint.c: New file.
140047 2006-06-15  Bruno Haible  <bruno@clisp.org>
140049         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
140050         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
140051         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
140052         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
140053         gl_CHECK_TYPE_SAME): New macros.
140055 2006-06-15  Bruno Haible  <bruno@clisp.org>
140057         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
140059 2006-06-15  Bruno Haible  <bruno@clisp.org>
140061         * lib/stdint_.h: Rewritten to be fully auto-configured.
140062         Fixes bug on HP-UX/IA64.
140064 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
140066         * lib/getdate.y (__attribute__): Don't define if already defined.
140067         Problem reported by Larry Jones.
140068         * lib/utimens.c (__attribute__): Likewise.
140070 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
140072         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
140073         reported by Andreas Schwab.
140075 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
140076             Bruno Haible  <bruno@clisp.org>
140078         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
140079         check for the declaration of strnlen and a run test that exposes the
140080         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
140081         rpl_strndup.
140083 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
140084             Bruno Haible  <bruno@clisp.org>
140086         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
140088 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
140090         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
140091         compile test, for Tru64 4.0D.
140093 2006-05-28  Karl Berry  <karl@gnu.org>
140095         * config/srclist.txt (printf-args.c): lose sync.
140097 2006-05-26  Martin Lambers  <marlam@marlam.de>
140099         * lib/getpass.c: Updates the test for the native W32 API, and adds
140100         missing includes, thus fixing compilation warnings.
140102 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
140104         * lib/exclude.c (exclude_fnmatch): New function.
140105         (excluded_file_name): Call exclude_fnmatch.
140106         * lib/exclude.h (excluded_file_name): New prototype
140108 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
140110         * lib/tempname.c (small_open, large_open): New macros.
140111         (__open, __open64) [!_LIBC]: Remove.
140112         (__gen_tempname): Use small_open and large_open instead of __open
140113         and __open64.  This fixes a portability bug on HP-UX 11.11i
140114         reported by Simon Wing-Tang in
140115         <http://lists.gnu.org/r/bug-coreutils/2006-05/msg00114.html>.
140117 2006-05-24  Bruno Haible  <bruno@clisp.org>
140119         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
140120         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
140121         Reported by Thorsten Maerz <torte@netztorte.de> via
140122         Aaron Stone <aaron@serendipity.cx>.
140124 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
140126         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
140127         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
140128         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
140129         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
140130         not really conditional on the cache.
140131         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
140133 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
140135         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
140136         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
140137         (my_usleep): Don't mishandle maximum value.
140139 2006-05-19  Jim Meyering  <jim@meyering.net>
140141         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
140143 2006-05-17  Bruno Haible  <bruno@clisp.org>
140145         Cygwin portability.
140146         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
140148 2006-05-17  Bruno Haible  <bruno@clisp.org>
140150         * lib/stdint_.h: Fix recognition of Cygwin.
140152 2006-05-15  Bruno Haible  <bruno@clisp.org>
140154         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
140155         on libtool patch by Ralf Wildenhues.
140157 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
140159         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
140160         test for C99 conformance; (bool) 0.5 is an integer constant
140161         expression, but (bool) -0.5 is not.  Problem reported by Fedor
140162         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
140164 2006-05-11  Simon Josefsson  <jas@extundo.com>
140166         * m4/xvasprintf.m4: Fix obvious typo.
140168 2006-05-11  Jim Meyering  <jim@meyering.net>
140170         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
140171         James Lemley.
140173 2006-05-10  Simon Josefsson  <jas@extundo.com>
140175         * lib/md4.c: Typo fix, update copyright years.
140176         (K1, K2): Don't use L because it turn computations into 64-bit on
140177         64-bit platforms.
140179 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
140181         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
140182         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
140183         unwanted sign propagation, e.g., on hosts with 64-bit int.
140184         There still are some problems with reeelly weird theoretical hosts
140185         (e.g., 33-bit int) but it's not worth worrying about now.
140186         * lib/sha1.c (rol): Likewise.
140187         (K1, K2, K3, K4): Remove unnecessary L suffix.
140189 2006-05-10  Bruno Haible  <bruno@clisp.org>
140191         * lib/des.c: Cast to avoid warnings.
140193 2006-05-09  Bruno Haible  <bruno@clisp.org>
140195         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
140196         (Depends-on): Depend also on xsize, stdarg.
140197         (configure.ac): Add gl_XVASPRINTF.
140199 2006-05-09  Bruno Haible  <bruno@clisp.org>
140201         * m4/xvasprintf.m4: New file.
140203 2006-05-09  Bruno Haible  <bruno@clisp.org>
140205         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
140206         (EOVERFLOW): Define fallback value.
140207         (xstrcat): New function.
140208         (xvasprintf): Recognize the special case of a string concatenation.
140210 2006-05-08  Eric Blake  <ebb9@byu.net>
140212         * gnulib-tool (func_version): Base copyright year on CVS date.
140213         (func_emit_copyright_notice): New function.
140214         (func_emit_lib_Makefile_am): Use it.
140215         (func_emit_tests_Makefile_am): Likewise.
140216         (func_import): Likewise.
140218 2006-05-08  Bruno Haible  <bruno@clisp.org>
140220         * modules/stdarg: New file.
140221         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
140223 2006-05-08  Bruno Haible  <bruno@clisp.org>
140225         * m4/stdarg.m4: New file, from GNU gettext.
140227 2006-05-08  Bruno Haible  <bruno@clisp.org>
140229         * config/srclist.txt (build-aux/config.rpath): different from latest
140230         release.
140232 2006-05-08  Bruno Haible  <bruno@clisp.org>
140234         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
140236 2006-05-05  Jim Meyering  <jim@meyering.net>
140238         * m4/warning.m4: New file, derived from bison's file by the same name.
140240 2006-05-03  Bruno Haible  <bruno@clisp.org>
140242         * lib/stdint_.h: Shorter URL.
140243         * lib/inttypes.h: Likewise.
140245 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
140247         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
140249 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
140251         * lib/verify.h: Document the internals better.  Most of this change
140252         was written by Bruno Haible.
140254 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
140256         * doc/verify.texi: New file, partly based on a proposal by
140257         Bruno Haible.
140259 2006-05-02  Bruno Haible  <bruno@clisp.org>
140261         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
140262         test from here...
140263         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
140265 2006-04-29  Bruno Haible  <bruno@clisp.org>
140267         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
140268         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
140270 2006-04-29  Bruno Haible  <bruno@clisp.org>
140272         * gnulib-tool: Make --update option actually work.
140274 2006-04-29  Bruno Haible  <bruno@clisp.org>
140276         * doc/gcd.texi: New file.
140277         * doc/gnulib.texi: Include it.
140279 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
140281         * lib/getdate.y (get_date): When adding relative date, start with the
140282         initial time, not with the result of the first mktime call.
140284 2006-04-25  Bruno Haible  <bruno@clisp.org>
140286         * gnulib-tool (func_import): Output the include directives in three
140287         blocks, sorted separately.
140288         Reported by Ben Pfaff <blp@cs.stanford.edu>.
140290 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
140292         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
140293         to define main with arguments, for C++.  Reported by Eric Blake.
140294         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
140295         Prefer 'int main ()' to 'int main (void)', for C++.
140296         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
140297         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
140298         for 'main', for C99 and C++.
140300 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
140302         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
140303         Don't assume that exit status -1 is valid.
140304         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
140305         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
140306         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
140307         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
140308         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
140309         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
140310         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
140311         functions can be used without declaring them, or that you can
140312         exit with status -1.
140313         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
140315 2006-04-24  Karl Berry  <karl@gnu.org>
140317         * config/srclist.txt (longdouble.m4): sync lost.
140319 2006-04-24  Eric Blake  <ebb9@byu.net>
140321         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
140323 2006-04-24  Bruno Haible  <bruno@clisp.org>
140325         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
140326         poll() implementation in AIX.
140327         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
140329 2006-04-24  Bruno Haible  <bruno@clisp.org>
140331         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
140332         assigned exactly once.
140334 2006-04-23  Claudio Fontana  <claudio@gnu.org>
140335             Bruno Haible  <bruno@clisp.org>
140337         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
140338         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
140339         for AM_CPPFLAGS.
140341 2006-04-23  Bruno Haible  <bruno@clisp.org>
140343         * modules/copy-file: Depend on unistd.
140344         * modules/execute: Likewise.
140345         * modules/fatal-signal: Likewise.
140346         * modules/findprog: Likewise.
140347         * modules/mkdtemp : Likewise.
140348         * modules/pipe: Likewise.
140349         * modules/wait-process: Likewise.
140351 2006-04-23  Bruno Haible  <bruno@clisp.org>
140353         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
140354         condition was already detected.
140355         Reported by Ben Pfaff <blp@cs.stanford.edu>.
140357 2006-04-23  Bruno Haible  <bruno@clisp.org>
140359         * lib/copy-file.c: Include <unistd.h> unconditionally.
140360         * lib/execute.c: Likewise.
140361         * lib/fatal-signal.c: Likewise.
140362         * lib/findprog.c: Likewise.
140363         * lib/mkdtemp.c: Likewise.
140364         * lib/pipe.h: Likewise.
140365         * lib/pipe.c: Likewise.
140366         * lib/wait-process.h: Likewise.
140368 2006-04-23  Bruno Haible  <bruno@clisp.org>
140370         * gnulib-tool (func_usage): Fix --import description. Document
140371         --update.
140372         (func_import): Create temporary file in a temporary directory, if
140373         --dry-run is specified. Silence errors from 'grep' when there are no
140374         m4 files in $m4dir.
140375         (func_create_testdir): Silence errors from 'grep' when there are no
140376         m4 files in $m4dir.
140377         Reported by Karl Berry <karl@freefriends.org>.
140379 2006-04-20  Bruno Haible  <bruno@clisp.org>
140381         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
140382         one argument, so that the code will be portable to Autoconf 2.60.
140383         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
140384         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
140385         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
140387 2006-04-19  Derek Price  <derek@ximbiot.com>
140388             Eric Blake  <ebb9@byu.net>
140390         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
140391         rather than "/full/path.h".  Update comment to match.  Shorten &
140392         generalize m4_translit call via AS_TR_CPP.
140394 2006-04-19  Derek Price  <derek@ximbiot.com>
140395             Eric Blake  <ebb9@byu.net>
140397         * lib/inttypes.h: Correct grammar in comment.
140399 2006-04-18  Derek Price  <derek@ximbiot.com>
140400             Paul Eggert  <eggert@cs.ucla.edu>
140402         * modules/inttypes: New file.
140403         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
140405 2006-04-18  Derek Price  <derek@ximbiot.com>
140406             Paul Eggert  <eggert@cs.ucla.edu>
140408         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
140409         New files.
140411 2006-04-18  Derek Price  <derek@ximbiot.com>
140412             Paul Eggert  <eggert@cs.ucla.edu>
140414         * lib/inttypes.h: New file.
140415         * lib/strtoimax.c: Assume <inttypes.h>.
140417 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
140419         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
140420         isn't mounted.  Problem reported by Kir Kolyshkin.
140422 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
140424         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
140425         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
140426         Derek R. Price.
140427         * lib/regex.h (RE_DUP_MAX): Update comment to match current
140428         implementation.
140430 2006-04-12  Eric Blake  <ebb9@byu.net>
140432         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
140433         is now done automatically by the corresponding Autoconf macro.
140435 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
140437         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
140438         time_r.h.
140440 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
140442         Merge regex changes from libc, removing some of our
140443         POSIX-conformance changes that were rejected and redoing them in a
140444         less-intrusive way.
140446         * lib/regcomp.c (re_compile_internal, init_dfa):
140447         Length arg is now size_t, not Idx.  All uses changed.
140448         (peek_token): Forward decl now says internal_function.
140449         (__re_error_msgid, __re_error_msgid_idx):
140450         Now static rather than extern with attribute_hidden.
140451         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
140452         For some reason libc prefers K&R style defns for external functions.
140453         (regerror) [!defined _LIBC]: Likewise.
140454         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
140455         (seek_collating_symbol_entry, lookup_collation_sequence_value):
140456         (build_range_exp, build_collating_symbol):
140457         Use K&R-style defn.
140458         (re_compile_fastmap): Use '\0' to memset, not 0.
140459         (utf8_sb_map): Make the calculations more obvious.
140460         (init_dfa, parse_bracket_exp, build_charclass_op):
140461         Call calloc and cast result, as glibc does.
140462         (init_word_char, fetch_token, peek_token, peek_token_bracket):
140463         (build_range_exp, build_collating_symbol):
140464         Now internal functions.
140466         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
140468         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
140469         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
140470         Don't depend on VMS; depend on __VMS instead, for POSIX
140471         namespace cleanness.
140472         (regoff_t): Define to ssize_t, not long int.
140474         Remove the REG_ macros named below.  Instead, make the old names
140475         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
140476         __USE_GNU_REGEX.
140477         (REG_BACKSLASH_ESCAPE_IN_LISTS):
140478         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
140479         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
140480         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
140481         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
140482         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
140483         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
140484         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
140485         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
140486         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
140487         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
140488         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
140489         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
140490         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
140491         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
140492         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
140493         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
140494         (REG_NREGS):
140495         Remove.  All uses replaced by the old RE_* names.
140496         (RE_BACKSLASH_ESCAPE_IN_LISTS):
140497         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
140498         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
140499         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
140500         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
140501         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
140502         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
140503         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
140504         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
140505         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
140506         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
140507         Don't bother having these macros be independent of each others'
140508         values, since they no longer exist in the POSIX name space.
140510         Rename the following member names back to their old names,
140511         unless !__USE_GNU_REGEX.  All uses changed back.
140512         (buffer): Renamed from re_buffer.
140513         (allocated): Renamed from re_allocated.
140514         (used): Renamed from re_used.
140515         (syntax): Renamed from re_syntax.
140516         (fastmap): Renamed from re_fastmap.
140517         (translate): Renamed from re_translate.
140518         (can_be_null): Renamed from re_can_be_null.
140519         (regs_allocated): Renamed from re_regs_allocated.
140520         (fastmap_accurate): Renamed from re_fastmap_accurate.
140521         (no_sub): Renamed from re_no_sub.
140522         (not_bol): Renamed from re_not_bol.
140523         (not_eol): Renamed from re_not_eol.
140524         (newline_anchor): Renamed from re_newline_anchor.
140525         (num_regs): Renamed from rm_num_regs.
140526         (start): Renamed from rm_start.
140527         (end): Renamed from rm_end.
140529         (free_state): Move up a bit.
140531         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
140532         #define to be empty.
140533         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
140534         when that is what is intended.
140535         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
140536         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
140537         (MAX): New macro.
140538         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
140539         All uses changed back to re_malloc, etc.  It's now the caller's
140540         responsibility to check for overflow; all callers changed.
140541         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
140542         (re_x2nrealloc): Remove.
140543         (free_state): Remove decl.
140545         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
140546         (re_set_registers, re_exec):
140547         Use K&R-style defn.
140549         2006-01-31  Roland McGrath  <roland@redhat.com>
140551         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
140552         Reported by Mike Frysinger <vapier@gentoo.org>.
140554         2006-01-15  Andreas Jaeger  <aj@suse.de>
140556         [BZ #1950]
140557         * lib/regex_internal.c (re_string_reconstruct): Adjust for
140558         build_wcs_upper_buffer change.
140559         (build_wcs_upper_buffer): Change return type.
140561         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
140563         * lib/regex_internal.h: Include <stdint.h> if available.
140565         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
140567         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
140569         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
140571         * lib/regcomp.c: Adjust for changed secondary hash function.
140573         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
140575         * lib/regex.h: Pretty printing.
140576         Clean up namespace a bit.
140578         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
140580         * lib/regexec.c (update_cur_sifted_state, check_arrival,
140581         check_arrival_add_next_nodes): Avoid using uninitialized variable.
140583         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
140584                     Ulrich Drepper  <drepper@redhat.com>
140586         [BZ #1302]
140587         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
140588         changed.
140589         (bitset_word_t): Renamed from bitset_word.  All uses changed.
140591         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
140593         [BZ #281]
140594         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
140595         * lib/regcomp.c: Remove unnecessary uses of
140596         unsigned RE_TRANSLATE_TYPE.
140597         * lib/regex_internal.h: Likewise.
140598         * lib/regex_internal.c: Likewise.
140599         * lib/regexec.c: Likewise.
140600         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
140602         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
140604         * lib/regexec.c (find_recover_state): Remove unnecessary
140605         initialization.
140606         (transit_state_bkref): Make DFA a const pointer.
140607         (get_subexp): Likewise.
140608         (check_arrival): Likewise.
140609         (update_cur_sifted_state): Likewise.
140610         (re_search_internal): Likewise.
140611         (prune_impossible_nodes): Likewise.
140612         (acquire_init_state_context): Likewise.
140613         (proceed_next_node): Likewise.
140614         (set_regs): Likewise.
140615         (free_fail_stack_return): Likewise.
140616         (check_arrival_expand_ecl): Mark DFA parameter as const.
140617         (check_arrival_expand_ecl_sub): Likewise.
140618         (check_subexp_limits): Likewise.
140619         (sub_epsilon_src_nodes):  Likewise.
140620         (add_epsilon_src_nodes):  Likewise.
140621         (merge_state_array): Likewise.
140622         (update_regs): Likewise.
140623         (build_trtable): Likewise.
140624         (sift_states_backward): Mark MCTX parameter as const.
140625         (build_sifted_states): Likewise.
140626         (update_cur_sifted_state): Likewise.
140627         (sift_states_mkref): Likewise.
140628         (check_arrival_expand_ecl): Mark eclosure as const.
140629         (check_dst_limits_calc_pos_1): Likewise.
140630         * lib/regex_internal.h (re_match_context_t): Make dfa a const
140631         pointer.
140633         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
140635         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
140636         (transit_state_sb): Likewise.
140637         (transit_state_mb): Likewise.
140638         (sift_states_iter_mb): Likewise.
140639         (check_arrival_add_next_nodes): Likewise.
140640         (check_node_accept_bytes): Change first parameter to pointer-to-const.
140641         [_LIBC] (re_search_2_stub): Use mempcpy.
140643         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
140644         mbrtowc for very simple UTF-8 case.
140646         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
140647         a pointer-to-const.
140648         (re_acquire_state_context): Likewise.
140649         * lib/regex_internal.h: Adjust prototypes.
140651         * lib/regex.c: Prevent using C++ compilers.
140653         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
140654         (re_acquire_state_context): Likewise.
140656 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
140658         * modules/regex (Depends-on): Add ssize_t.
140660 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
140662         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
140663         translation table.
140665 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
140667         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
140669 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
140670             Bruno Haible  <bruno@clisp.org>
140672         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
140673         <sys/types.h> and <inttypes.h>.
140675 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
140677         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
140678         `__error_t_defined', so argp.h will not typedef the former.
140680 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
140682         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
140683         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
140684         glibc names.  Even if glibc is changed to conform to POSIX, the
140685         traditional names will be available anyway, since regex depends on
140686         the extensions module.  Also, fix a longstanding typo in the
140687         implementation of Spencer ERE test #75 from grep 2.3.  Problems
140688         reported by Emanuele Giaquinta.  Also, change sense of cached
140689         variable, so that the message makes sense.
140691 2006-03-24  Simon Josefsson  <jas@extundo.com>
140693         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
140694         including some doc fixes.
140695         (base64_encode_alloc): Fix +1 bug on allocation failures.
140697 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
140699         * lib/base64.c (base64_encode): Do not read past end of array with
140700         unsanitized input on systems with CHAR_BIT > 8.
140702 2006-03-24  Eric Blake  <ebb9@byu.net>
140704         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
140706 2006-03-22  Karl Berry  <karl@gnu.org>
140708         * config/srclist.txt (*setenv.[ch]): get from coreutils.
140709         * config/srclistvars.sh (COREUTILS): new var.
140711 2006-03-17  Jim Meyering  <jim@meyering.net>
140713         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
140714         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
140716 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
140718         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
140719         no longer needs it.  Instead, check that regoff_t is as least
140720         as wide as ptrdiff_t.
140722         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
140723         so that our regex.h stays compatible with the installed regex.
140724         This is helpful for installers who configure --without-included-regex.
140725         Problem reported by Emanuele Giaquinta.
140727 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
140729         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
140730         Typedef to long int, not to off_, as POSIX will likely change
140731         in that direction.
140733 2006-03-15  Eric Blake  <ebb9@byu.net>
140735         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
140737 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
140739         * lib/argp-help.c (validate_uparams): Fix typo
140740         * lib/argp-parse.c (argp_default_options): Consistently begin help
140741         messages with a lowercase letter.
140743 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
140745         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
140746         overrun buffers and shouldn't be used (much as gets shouldn't be
140747         used).
140748         * lib/time_r.c (asctime_r, ctime_r): Likewise.
140750 2006-03-08  Simon Josefsson  <jas@extundo.com>
140752         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
140753         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
140755 2006-03-08  Simon Josefsson  <jas@extundo.com>
140757         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
140758         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
140760 2006-03-08  Simon Josefsson  <jas@extundo.com>
140762         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
140763         signal that configure disabled the device.
140765 2006-03-08  Simon Josefsson  <jas@extundo.com>
140767         * build-aux/maint.mk: Fix refresh-po, to handle no translated
140768         languages.
140770 2006-03-07  Simon Josefsson  <jas@extundo.com>
140772         * modules/getopt (Depends-on): Add unistd.
140774         * modules/unistd: New file.
140776 2006-03-07  Simon Josefsson  <jas@extundo.com>
140778         * modules/gc-random: New file.
140780 2006-03-07  Simon Josefsson  <jas@extundo.com>
140782         * m4/unistd_h.m4: New file.
140784 2006-03-07  Simon Josefsson  <jas@extundo.com>
140786         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
140787         test to be side-effect free by storing the result in the cache
140788         variable gl_cv_lib_readline, and moving the assignment of
140789         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
140790         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
140792 2006-03-07  Simon Josefsson  <jas@extundo.com>
140794         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
140795         error on missing devices (the functions will return an error).
140797         * m4/gc.m4: Move random stuff to gc-random.m4
140799 2006-03-07  Simon Josefsson  <jas@extundo.com>
140801         * lib/unistd_.h: New file.
140803 2006-03-07  Simon Josefsson  <jas@extundo.com>
140805         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
140807 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
140809         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
140810         Problem reported by Juan Manuel Guerrero.
140812 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
140814         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
140815         the unistd module.
140816         * lib/getlogin_r.c: Likewise.
140817         * lib/getlogin_r.h: Likewise.
140818         * lib/glob.c: Likewise.
140819         * lib/pagealign_alloc.c: Likewise.
140820         * lib/unistd_.h: Remove; no longer needed.
140822 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
140824         * MODULES.html.sh (Support for systems lacking POSIX:2001):
140825         Add unistd.
140826         * modules/c-stack (Depends-on): Add unistd.
140827         * modules/getlogin_r: Likewise.
140828         * modules/glob: Likewise.
140829         * modules/pagealign_alloc: Likewise.
140830         * modules/unistd (Files): Remove lib/unistd_.h.
140831         (EXTRA_DIST): Remove.
140832         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
140833         need unistd_.h.
140834         (MOSTLYCLEANFILES): Remove unistd.h-t.
140836 2006-03-03  Simon Josefsson  <jas@extundo.com>
140838         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
140840 2006-03-03  Simon Josefsson  <jas@extundo.com>
140842         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
140843         libidn and bison.
140845 2006-03-03  Simon Josefsson  <jas@extundo.com>
140847         * build-aux/maint.mk: Add indent target.
140849 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
140851         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
140852         our replacement poll.h in any case, to avoid a differing
140853         declaration from a system header.  Seen on AIX.
140855 2006-03-01  Simon Josefsson  <jas@extundo.com>
140857         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
140858         <kasal@ucw.cz>.
140860 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
140862         * modules/gettime (Depends-on): Add extensions module.
140863         * modules/nanosleep (Depends-on): Likewise.
140864         * modules/settime (Depends-on): Likewise.
140866 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
140868         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
140869         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
140870         pedantically.
140871         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
140872         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
140874         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
140875         not "==".  Reported by Ralf Wildenhues.
140877 2006-03-01  Karl Berry  <karl@gnu.org>
140879         * doc/Copyright/request-*: new files, synced from gnuorg.
140881 2006-03-01  Karl Berry  <karl@gnu.org>
140883         * config/srclist.txt (Copyright/*): new entries.
140885 2006-02-28  Simon Josefsson  <jas@extundo.com>
140887         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
140889 2006-02-27  Simon Josefsson  <jas@extundo.com>
140891         * lib/base64.h: Indent #define's.  From Jim Meyering
140892         <jim@meyering.net>.
140894 2006-02-27  Jim Meyering  <jim@meyering.net>
140896         Revert the change of 2006-02-24, so these files can continue
140897         to be sync'd from gettext.
140898         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
140899         of `config.h'.
140901 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
140903         * modules/intprops: New file.
140904         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
140905         Add intprops.
140906         * modules/getloadavg (Files): Remove lib/intprops.h.
140907         (Depends-on): Add intprops.
140908         * modules/human: Likewise.
140909         * modules/inttostr: Likewise.
140910         * modules/openat: Likewise.
140911         * modules/sig2str: Likewise.
140912         * modules/userspec: Likewise.
140913         * modules/utimecmp: Likewise.
140914         * modules/xnanosleep: Likewise.
140915         * modules/xstrtol: Likewise.
140917 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
140919         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
140920         * modules/lock-tests (TESTS): Use $(EXEEXT).
140921         * modules/tls-tests: Likewise.
140922         * modules/argp-tests: Likewise.
140923         (check_PROGRAMS): New var, replacing...
140924         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
140926 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
140928         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
140929         `config.h'.
140931 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
140933         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
140935 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
140937         Sync from coreutils.
140938         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
140939         gl_CHDIR_SAFER.
140941 2006-02-22  Jim Meyering  <jim@meyering.net>
140943         Sync from coreutils.
140944         * m4/chdir-safer.m4: New file.
140946 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
140948         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
140949         AT_FDCWD exceeds INT_MAX.
140950         * lib/openat.h (AT_FDCWD): Likewise.
140952 2006-02-17  Eric Blake  <address@hidden>
140954         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
140956 2006-02-16  Simon Josefsson  <jas@extundo.com>
140958         * modules/getaddrinfo (Depends-on): Add sys_socket.
140960 2006-02-15  Simon Josefsson  <jas@extundo.com>
140962         * build-aux/maint.mk: Add dsyntax-check rule.
140964 2006-02-15  Eric Blake  <ebb9@byu.net>
140966         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
140967         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
140968         'present but cannot compile' warnings on cygwin.
140969         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
140970         use ws2tcpip.h if sys/socket.h works.
140971         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
140972         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
140974 2006-02-14  Simon Josefsson  <jas@extundo.com>
140976         * modules/maintainer-makefile (Files): Rename.
140978         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
140979         and (the local) Makefile.cfg to maint-cfg.mk.
140981         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
140982         to the latter.
140984         * modules/maintainer-makefile: New module.
140986         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
140987         severaly stripped to make it possible to build it up from scratch
140988         with reliable tests.
140990         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
140991         fixes to permit overriding the default actions when configure and
140992         makefile are not available.
140994 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
140996         Sync from coreutils.
140997         * modules/lstat (Depends-on): Don't depend on xalloc.
140998         (License): Change from GPL to LGPL, since this is now simply a
140999         replacement for a libc function.
141001 2006-02-14  Jim Meyering  <jim@meyering.net>
141003         Sync from coreutils.
141005         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
141006         failure on deficient systems, and simplify gnulib lgpl dependencies.
141007         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
141008         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
141010         * lib/xalloc-die.c: Remove unused definition of N_.
141012 2006-02-14  Jim Meyering  <jim@meyering.net>
141014         Sync from coreutils.
141015         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
141016         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
141017         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
141018         double-quote uses of that variable, to accommodate the rare case in
141019         which getmntent is available in none of the libraries checked.  This
141020         happens at least on FreeBSD 5.0.
141022 2006-02-13  Simon Josefsson  <jas@extundo.com>
141024         * gnulib-tool (Usage): Fix --import, from
141025         karl@freefriends.org (Karl Berry).
141027 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
141029         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
141031 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
141033         * lib/argp-namefrob.h: Restore changes accidentally lost during the
141034         "autoupdate" on 2005-12-12.
141036 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
141038         * modules/closeout (Depends-on): Remove atexit.
141040 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
141042         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
141043         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
141045 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
141047         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
141048         __EXTENSIONS__ if this causes compilation to fail.  Problem
141049         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
141050         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
141052 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
141054         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
141055         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
141056         <http://lists.gnu.org/r/bug-gnulib/2006-01/msg00074.html>.
141057         All uses changed.
141059 2006-01-26  Simon Josefsson  <jas@extundo.com>
141061         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
141062         prototype is visible on mingw32.
141064         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
141065         for mingw32.
141067         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
141068         mingw32).
141070 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
141072         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
141073         attempt to open for write; this always fails, at least on POSIX
141074         hosts.  This reinstates the 2006-01-09 change, which was
141075         inadvertently removed.
141077 2006-01-26  Bruno Haible  <bruno@clisp.org>
141079         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
141080         Reported by Paul Eggert.
141082 2006-01-26  Bruno Haible  <bruno@clisp.org>
141083             Paul Eggert  <eggert@cs.ucla.edu>
141085         * lib/stdbool_.h (_Bool)
141086         [(! (defined __cplusplus || defined __BEOS__)
141087           && !defined __GNUC__
141088           && !(defined __HP_cc || defined __xlc__
141089                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
141090                || defined __sgi))]:
141091         #define to signed char in these cases too; this simplifies
141092         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
141093         etc., separately) and makes it more conservative.
141095 2006-01-25  Simon Josefsson  <jas@extundo.com>
141097         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
141098         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
141099         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
141101 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
141103         * lib/argp-namefrob.h: Bugfix. Remove stray #
141105 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
141107         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
141108         so that we test the test.
141109         Check for yet another HP-UX cc bug involving *bool |= bool.
141111 2006-01-25  Karl Berry  <karl@gnu.org>
141113         * config/srclist.txt (vasnprintf.c): sync lost.
141115 2006-01-25  Jim Meyering  <jim@meyering.net>
141117         Sync from the stable (b5) branch of coreutils:
141119         * lib/fts.c (fts_children): Don't let close() clobber errno from
141120         failed fchdir().
141122         * lib/fts.c (fts_stat): When following a symlink-to-directory,
141123         don't necessarily interpret stat-fails+lstat-succeeds as indicating
141124         a dangling symlink.  That can also happen at least for ELOOP.
141125         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
141126         FYI, this bug predates the inclusion of fts.c in coreutils.
141128         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
141129         in their own block, so pre-c99 compilers don't object.
141131         Avoid the double-free (first in fts_read, second in fts_close) that
141132         would occur when an `active' directory is made inaccessible (e.g.,
141133         via chmod a-x) during a traversal.
141134         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
141135         before returning.  Reproduce this failure by
141136         mkdir -p a/b; cd a; chmod a-x . b
141137         Reported by Stavros Passas.
141139 2006-01-25  Jim Meyering  <jim@meyering.net>
141141         * lib/fileblocks.c: Remove more useless parentheses.
141142         * lib/readutmp.h: Likewise.
141144 2006-01-25  Bruno Haible  <bruno@clisp.org>
141146         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
141147         warnings.
141148         Reported by Paul Eggert.
141150 2006-01-25  Bruno Haible  <bruno@clisp.org>
141152         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
141153         rid of a trap command. For Solaris sh.
141154         Reported by Mark D. Baushke <mdb@gnu.org>.
141156 2006-01-24  Simon Josefsson  <jas@extundo.com>
141158         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
141159         Bruno.
141161 2006-01-24  Karl Berry  <karl@gnu.org>
141163         * config/srclist.txt (argp-namefrob.h): sync lost.
141165 2006-01-24  Jim Meyering  <jim@meyering.net>
141167         * modules/openat (Files): Add lib/intprops.h.
141168         From Mark D. Baushke.
141170 2006-01-24  Jim Meyering  <jim@meyering.net>
141172         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
141173         Reported by Mark D. Baushke.
141175 2006-01-24  Jim Meyering  <jim@meyering.net>
141177         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
141179 2006-01-24  Bruno Haible  <bruno@clisp.org>
141181         * modules/strnlen (Maintainer): Change from glibc to all.
141183 2006-01-24  Bruno Haible  <bruno@clisp.org>
141185         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
141186         Patch by Paul Eggert.
141188 2006-01-24  Bruno Haible  <bruno@clisp.org>
141190         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
141191         already has it.
141192         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
141193         2005-11-26.
141195         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
141196         'signed char' to avoid problems with the built-in _Bool type.
141197         Reported by Paul Eggert on 2005-11-26.
141199 2006-01-24  Bruno Haible  <bruno@clisp.org>
141201         * gnulib-tool (func_import): Avoid constructing complicated sed
141202         expressions inside backquote.
141203         Report and solution by Mark D. Baushke <mdb@gnu.org>.
141205 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
141207         These changes imported from libc.
141208         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
141209         test and two separate function calls.
141210         * lib/strndup.c (__strndup): Add libc_hidden_def.
141212 2006-01-23  Simon Josefsson  <jas@extundo.com>
141214         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
141215         Remove the test_*_SOURCES variable: automake infers it by default.
141216         * modules/tls-tests: Likewise.
141218 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
141220         Work around porting bugs reported by Dieter in
141221         <http://lists.gnu.org/r/bug-bison/2006-01/msg00049.html>.
141222         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
141223         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
141224         Include "getopt.h" first, to check interface.
141225         (getenv): Declare only if defined HAVE_DECL_GETENV &&
141226         !HAVE_DECL_GETENV.
141227         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
141228         (__strndup): Revert to K&R-style function dfns, the glibc style.
141229         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
141230         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
141231         Include strnlen.h first, to get prototype properly.
141232         (strnlen): Renamed from __strnlen.
141233         Remove weak alias.
141235 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
141237         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
141239 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
141241         * config/srclist.txt: Adjust to reflect glibc reorganization.
141242         This affects only comments.
141244 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
141246          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
141247          Reported by Bruce Korb <bkorb@gnu.org>.
141249 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
141251         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
141252         to pacify gcc -Wswitch-default.
141254 2006-01-22  Bruno Haible  <bruno@clisp.org>
141256         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
141257         temporary buffer for sprintf, take into account the precision also
141258         for 'd', 'i', 'u', 'o', 'x', 'X'.
141260 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
141262         * modules/argp-tests: New module
141263         * tests/test-argp.c: New file
141264         * tests/test-argp-2.sh: New file
141266 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
141268         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
141269         (__argp_base_name): Removed
141270         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
141271         typo.
141272         (__argp_base_name): Provide macro definition or extern declaration
141273         depending on the configuration
141275 2006-01-20  Simon Josefsson  <jas@extundo.com>
141277         * modules/inet_ntop (Depends-on): Depend on sys_socket.
141279 2006-01-20  Simon Josefsson  <jas@extundo.com>
141281         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
141283 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
141285         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
141286         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
141287         Suggested by Bruno Haible.
141289 2006-01-20  Karl Berry  <karl@gnu.org>
141291         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
141292         until changes propagate, I guess.
141294 2006-01-19  Simon Josefsson  <jas@extundo.com>
141296         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
141298 2006-01-19  Simon Josefsson  <jas@extundo.com>
141300         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
141302 2006-01-19  Simon Josefsson  <jas@extundo.com>
141304         * gnulib-tool: Set check_PROGRAMS.
141306         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
141307         modules/des-tests, modules/gc-arcfour-tests,
141308         modules/gc-arctwo-tests, modules/gc-des-tests,
141309         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
141310         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
141311         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
141312         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
141313         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
141314         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
141315         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
141316         test_*_SOURCES.
141318 2006-01-18  Simon Josefsson  <jas@extundo.com>
141320         * modules/socklen (Depends-on): Depend on sys_socket.
141322 2006-01-18  Simon Josefsson  <jas@extundo.com>
141324         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
141325         modules/des-tests, modules/gc-arcfour-tests,
141326         modules/gc-arctwo-tests, modules/gc-des-tests,
141327         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
141328         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
141329         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
141330         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
141331         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
141332         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
141333         $(EXEEXT) to automake TESTS variable, for mingw32.
141335 2006-01-17  Simon Josefsson  <jas@extundo.com>
141337         * modules/socklen (Include): Need sys/socket.h.
141339 2006-01-17  Bruno Haible  <bruno@clisp.org>
141341         * modules/ssize_t (Include): Add <sys/types.h>.
141343 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
141345         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
141346         it's not portable and it doesn't work with cross-compiles.
141347         Problem reported by Bruno Haible.  Fix missing-$ typo in
141348         'test "gl_cv_ignore_unused_libraries" ...' that prevented
141349         -zignore from being used with Sun's C compiler.
141351 2006-01-12  Simon Josefsson  <jas@extundo.com>
141353         * lib/base64.c: Fix warning, reported by Bruno Haible
141354         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
141356 2006-01-12  Bruno Haible  <bruno@clisp.org>
141358         * modules/ldd: New file.
141359         * build-aux/ldd.sh.in: New file.
141360         * MODULES.html.sh (Support for building libraries and executables): Add
141361         ldd.
141363 2006-01-12  Bruno Haible  <bruno@clisp.org>
141365         * m4/ldd.m4: New file.
141367 2006-01-12  Bruno Haible  <bruno@clisp.org>
141369         * gnulib-tool (func_import, func_create_testdir): Don't go into an
141370         endless loop while replacing $auxdir with build-aux.
141372 2006-01-11  Simon Josefsson  <jas@extundo.com>
141374         * lib/stdint_.h (SIZE_MAX): Add missing (.
141376 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
141378         Sync from coreutils.
141379         * lib/md5.c: Fix commentary typos.
141380         (alignof, UNALIGNED_P): No need for a GCC-specific version.
141381         * lib/md5.h (__attribute__): Remove; unused.
141382         * lib/sha1.c: Fix commentary to match md5 better.
141383         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
141384         so that we don't need to worry about alignment.  All uses changed.
141385         This merges the 2005-10-28 md5 change into sha1.
141387 2006-01-11  Jim Meyering  <jim@meyering.net>
141389         Sync from coreutils.
141390         * lib/md5.c (OP): Fix spacing.
141392 2006-01-11  Bruno Haible  <bruno@clisp.org>
141394         Ensure automatic ordering between gl_LOCK and gl_ARGP.
141395         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
141396         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
141398 2006-01-11  Bruno Haible  <bruno@clisp.org>
141400         Ensure automatic ordering between gl_LOCK and gl_ARGP.
141401         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
141402         the "early" section as well.
141404 2006-01-11  Bruno Haible  <bruno@clisp.org>
141406         Avoid "ar: no archive members specified" error on MacOS X.
141407         * gnulib-tool (func_modules_add_dummy): New function.
141408         (func_import, func_create_testdir): Invoke it.
141410 2006-01-11  Bruno Haible  <bruno@clisp.org>
141412         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
141413         with $auxdir in AC_CONFIG_FILES statements.
141415 2006-01-11  Bruno Haible  <bruno@clisp.org>
141417         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
141418         Initialize also noinst_HEADERS to empty.
141420 2006-01-11  Bruno Haible  <bruno@clisp.org>
141422         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
141423         variables.
141424         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
141425         autoreconf.
141427 2006-01-11  Bruno Haible  <bruno@clisp.org>
141429         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
141430         overridable by the user.
141431         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
141433 2006-01-10  Simon Josefsson  <jas@extundo.com>
141435         * modules/sys_socket: New file.
141437 2006-01-10  Simon Josefsson  <jas@extundo.com>
141439         * m4/sys_socket_h.m4: New file.
141441 2006-01-10  Simon Josefsson  <jas@extundo.com>
141443         * lib/socket_.h: New file.
141445 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
141447         * modules/readutmp (Maintainer): Add myself.
141449 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
141451         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
141452         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
141453         People who are still concerned with buggy memcmp implementations
141454         can invoke gl_FUNC_MEMCMP themselves.
141456 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
141458         * lib/regex_internal.h (BITSET_WORD_BITS):
141459         Work around a bug in 64-bit PGC (before version 6.1-2), where the
141460         preprocessor mishandles large unsigned values as if they were signed.
141461         Problem reported by Claudio Fontana in
141462         <http://lists.gnu.org/r/bug-gnulib/2005-12/msg00061.html>.
141464 2006-01-10  Jim Meyering  <jim@meyering.net>
141466         Avoid the double-free (first in fts_read, second in fts_close) that
141467         would occur when an `active' directory is made inaccessible (e.g.,
141468         via chmod a-x) during a traversal.
141469         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
141470         before returning.  Reproduce this failure by
141471         mkdir -p a/b; cd a; chmod a-x . b
141472         Reported by Stavros Passas.
141474         Sync from coreutils.
141475         * lib/sha1.c: Tweak grammar in a comment.
141477 2006-01-10  Jim Meyering  <jim@meyering.net>
141479         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
141480         Patch by Joerg Sonnenberger.
141482 2006-01-10  Bruno Haible  <bruno@clisp.org>
141484         * modules/readutmp: Depend on module free.
141485         * modules/strtok_r: Depend on module restrict.
141487 2006-01-10  Bruno Haible  <bruno@clisp.org>
141489         * modules/gettext (configure.ac): Add an invocation of
141490         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
141492 2006-01-10  Bruno Haible  <bruno@clisp.org>
141494         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
141495         Reported by Werner Lemberg <wl@gnu.org>.
141497 2006-01-10  Bruno Haible  <bruno@clisp.org>
141499         * lib/localcharset.c: Update from GNU gettext.
141501 2006-01-10  Bruno Haible  <bruno@clisp.org>
141503         * lib/argp.h (__const): Remove macro. Use const instead.
141504         * lib/argp-fmtstream.h (__const): Likewise.
141505         * lib/glob_.h (__const): Remove macro.
141506         * lib/glob-libc.h: Use const instead of __const.
141508 2006-01-10  Bruno Haible  <bruno@clisp.org>
141510         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
141511         variable.
141512         Needed to avoid an automake error regarding the 'gettext' module.
141514 2006-01-09  Simon Josefsson  <jas@extundo.com>
141516         * modules/inet_ntop (Depends-on): Add restrict.
141518 2006-01-09  Simon Josefsson  <jas@extundo.com>
141520         * modules/gc-rijndael-tests (License): Put under LGPL.
141522         * modules/gc-des-tests (License): Likewise.
141524         * modules/gc-arcfour-tests (License): Likewise.
141526         * modules/gc-arctwo-tests (License): Likewise.
141528         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
141530         * modules/gc-hmac-sha1-tests (Files): Likewise.
141532         * modules/gc-hmac-md5-tests (License): Likewise.
141534         * modules/gc-sha1-tests (License): Likewise.
141536         * modules/gc-md5-tests (License): Likewise.
141538         * modules/gc-md4-tests (License): Likewise.
141540         * modules/gc-md2-tests (License): Likewise.
141542         * modules/gc-tests (License): Likewise.
141544         * modules/des-tests (License): Likewise.
141546         * modules/md4-tests (License): Likewise.
141548         * modules/md2-tests (License): Likewise.
141550 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
141552         Sync from coreutils:
141554         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
141555         * modules/lib-ignore: New file.
141556         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
141557         chdir-safer.m4, lchmod.m4.
141558         * modules/openat: Add mkdirat.c, openat-priv.h.
141560 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
141562         Sync from coreutils.
141563         * m4/lib-ignore.m4: New file.
141564         * m4/lchmod.m4: New file.
141566 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
141568         Sync from coreutils.
141569         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
141570         for write access: POSIX says that must fail.
141571         * lib/fts.c (diropen): Likewise.
141572         * lib/save-cwd.c (save_cwd): Likewise.
141573         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
141574         well, for minor improvements on hosts that lack O_DIRECTORY.
141575         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
141576         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
141577         Fall back on chown if open failed with EACCES.
141579         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
141580         Report an error at compile-time if only a 1-second nominal clock
141581         resolution is found.
141583         * lib/lchmod.h: New file.
141584         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
141585         (make_dir_parents): Use lchown rather than chown, and
141586         lchmod rather than chmod.
141588         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
141589         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
141590         "proc" reported by n0dalus.
141592         * lib/mountlist.c: Include <limits.h>.
141593         (dev_from_mount_options)
141594         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
141595         New function.  It no longer assumes "dev=" has the System V meaning
141596         on Linux (since it doesn't).  It also parses "dev=" more carefully.
141597         (read_file_system_list)
141598         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
141599         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
141600         dev= in that case.
141602         * lib/posixtm.h (PDS_PRE_2000): New macro.
141603         * lib/posixtm.c (year): Arg is now syntax_bits rather than
141604         allow_century.  All usages changed.  Reject dates outside the range
141605         1969-1999 if PDS_PRE_2000 is used.
141607 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
141609         Sync from coreutils.
141610         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
141611         (Time of day items): Mention the possibility of leap seconds.
141612         Problem reported by Dr. David Alan Gilbert.
141614 2006-01-09  Jim Meyering  <jim@meyering.net>
141616         Sync from coreutils.
141618         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
141620         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
141622         * lib/modechange.c (mode_compile): Reject an invalid mode string
141623         that starts with an octal digit.  From Andreas Gruenbacher.
141625         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
141626         and dup to open_safer and dup_safer, respectively.
141627         (openat_permissive): Fix typo in comment.
141629         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
141630         "gettext.h"; either no longer needed or are guaranteed by openat.h.
141631         (_): Remove; no longer needed.
141632         (openat): Renamed from rpl_openat; no need for rpl_openat
141633         since openat.h renames openat for us.
141634         Replace most of the body with a call to openat_permissive,
141635         to avoid duplicate code.
141636         Port to (probably hypothetical) environments were mode_t is
141637         wider than int.
141638         (openat_permissive): Require mode arg, so that we can check
141639         types better.  Put it just after flags.  Change cwd failure
141640         indicator from pointer-to-bool to pointer-to-errno-value.
141641         All callers changed.
141642         Invoke openat_save_fail and/or openat_restore_fail if
141643         cwd_errno is null, so that openat can call us.
141644         (openat_permissive, fdopendir, fstatat, unlinkat):
141645         Simplify errno handling to avoid some duplicate code,
141646         as it's OK to set errno on success.
141647         * lib/openat.h: Revamp code so that function macros depend on
141648         __OPENAT_PREFIX only, not also on AT_FDCWD.
141649         (openat_ro): Remove.  Caller changed to use openat_permissive.
141650         (openat_permissive): Now a macro, if not a function.
141651         (openat_restore_fail, openat_save_fail): Now always functions,
141652         since mkdirat needs them even if __OPENAT_PREFIX is defined.
141654         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
141655         and openat.c.
141656         * lib/mkdirat.c: Include openat-priv.h.
141657         Remove definitions of macros defined therein.
141658         * lib/openat.c: Likewise.
141660         * lib/mkdirat.c (mkdirat): New file and function.
141661         * lib/openat.h (mkdirat): Declare.
141663         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
141665         * lib/openat.h (openat_permissive): Declare.
141666         (openat_ro): Define.
141668         * lib/openat.c (EXPECTED_ERRNO): New macro.
141669         (openat_permissive): New function -- used in remove.c rewrite.
141670         (all functions): Set errno just before returning, only if there
141671         was an actual failure.
141672         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
141674         Emulate openat-family functions using Linux's procfs, if possible.
141675         Idea and some code based on Ulrich Drepper's glibc changes.
141677         * lib/openat.c: (BUILD_PROC_NAME): New macro.
141678         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
141679         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
141680         before falling back on save_cwd and restore_cwd.
141681         (fdopendir, fstatat, unlinkat): Likewise.
141683         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
141684         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
141686         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
141687         as second argument to va_arg.  Otherwise, some versions of gcc
141688         warn that `if this code is reached, the program will abort'.
141690 2006-01-09  Jim Meyering  <jim@meyering.net>
141692         Sync from coreutils.
141693         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
141694         Require openat-priv.h.
141696 2006-01-09  Bruno Haible  <bruno@clisp.org>
141698         * modules/strnlen (Include): Use strnlen.h.
141700 2006-01-09  Bruno Haible  <bruno@clisp.org>
141702         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
141704 2006-01-09  Bruno Haible  <bruno@clisp.org>
141706         * lib/sysexit_.h (EX_OK): New macro.
141707         Suggested by Martin Lambers <marlam@marlam.de>.
141709 2006-01-09  Bruno Haible  <bruno@clisp.org>
141711         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
141712         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
141714 2006-01-09  Bruno Haible  <bruno@clisp.org>
141716         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
141717         numbers.
141719 2006-01-09  Bruno Haible  <bruno@clisp.org>
141721         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
141722         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
141723         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
141724         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
141726 2006-01-09  Bruno Haible  <bruno@clisp.org>
141728         * build-aux/javacomp.sh.in: New file, moved from lib/.
141729         * modules/javacomp-script (Files): Update.
141730         (configure.ac): Add AC_CONFIG_FILES invocation.
141731         (EXTRA_DIST): Remove variable.
141733         * build-aux/javaexec.sh.in: New file, moved from lib/.
141734         * modules/javaexec (Files): Update.
141735         (configure.ac): Add AC_CONFIG_FILES invocation.
141736         (EXTRA_DIST): Remove javaexec.sh.in.
141738         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
141739         * modules/csharpcomp-script (Files): Update.
141740         (configure.ac): Add AC_CONFIG_FILES invocation.
141741         (EXTRA_DIST): Remove variable.
141743         * build-aux/csharpexec.sh.in: New file, moved from lib/.
141744         * modules/csharpexec (Files): Update.
141745         (configure.ac): Add AC_CONFIG_FILES invocation.
141746         (EXTRA_DIST): Remove csharpexec.sh.in.
141748 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
141750         Sync from coreutils.
141752         Add POSIX ACL support
141753         * lib/acl.h (copy_acl, set_acl): Add declarations.
141754         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
141755         systems other than Linux.
141756         (chmod_or_fchmod): New function: use fchmod when possible,
141757         and chmod otherwise.
141758         (file_has_acl): Add a POSIX ACL implementation, with a
141759         Linux-specific subcase.
141760         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
141761         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
141762         acls are unsupported.
141763         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
141764         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
141765         are unsupported.
141767 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
141769         Sync from coreutils.
141770         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
141772 2006-01-07  Bruno Haible  <bruno@clisp.org>
141774         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
141775         gl_EARLY.
141777 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
141779         * lib/strftime.c (tzname): Don't declare if it is already #defined.
141780         Problem reported for Mingw by Mark Junker.
141782 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
141784         * README: Gnulib normally doesn't generate a tarball.
141786 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
141788         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
141789         long int, not int, for nanosecond counts, so that people who are
141790         used to POSIX struct timespec won't be surprised.  Reported by Jim
141791         Meyering.
141793 2005-12-28  Bruno Haible  <bruno@clisp.org>
141795         * build-aux/config.rpath: Update from GNU gettext.
141797 2005-12-16  Jim Meyering  <jim@meyering.net>
141799         * modules/fprintftime: New module.
141800         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
141802 2005-12-16  Jim Meyering  <jim@meyering.net>
141804         * m4/fprintftime.m4: New file.
141806 2005-12-16  Jim Meyering  <jim@meyering.net>
141808         * lib/fprintftime.c, lib/fprintftime.h: New files.
141810 2005-12-15  Simon Josefsson  <jas@extundo.com>
141812         * modules/socklen (configure.ac): Fix M4 macro name, to align with
141813         new m4/socklen.m4.
141815 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
141817         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
141818         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
141820 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
141822         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
141823         * lib/argp-help.c (fill_in_uparams): Check if the constructed
141824         struct uparams is valid. Fall back to the default values if it is
141825         not.
141827 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
141829         * modules/argp (Files): Add argp-pin.c
141830         (Depends-on): dirname
141831         (lib_SOURCES): Add argp-pin.c
141833 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
141835         * m4/argp.m4:  Check if program_invocation_name and
141836         program_invocation_short_name are declared and define appropriate
141837         macros if they are not.
141839 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
141841         * lib/argp-help.c (__argp_base_name): New function
141842         (__argp_short_program_name): Rewrite using __argp_base_name
141843         * lib/argp-namefrob.h: Define program_invocation_name and
141844         program_invocation_short_name if requested
141845         (__argp_base_name): Add prototype
141846         * lib/argp-parse.c (argp_def): Use gettext wrappers
141847         (argp_default_parser): Use __argp_base_name
141848         * lib/argp-pin.c: New file. Defines program_invocation_name and
141849         program_invocation_short_name on systems that lack them.
141851 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
141853         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
141854         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
141855         porting problem reported by Georg Schwarz in
141856         <http://lists.gnu.org/r/bug-coreutils/2005-12/msg00083.html>.
141858 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
141860         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
141861         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
141862         porting problem reported by Georg Schwarz in
141863         <http://lists.gnu.org/r/bug-coreutils/2005-12/msg00083.html>.
141865 2005-12-05  Bruno Haible  <bruno@clisp.org>
141867         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
141868         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
141869         Reported by Mark Junker <mjscod@gmx.de>.
141871 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
141873         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
141874         Use implementation from Albert Chin, with some
141875         comments/corrections by Stepan Kasal and myself.
141877 2005-12-02  Bruno Haible  <bruno@clisp.org>
141879         * gnulib-tool (func_import): Accept GPLed build tool modules when
141880         --lgpl is given.
141881         * modules/csharpcomp-script: New file.
141882         * modules/csharpcomp: Depend on it.
141883         * modules/javacomp-script: New file.
141884         * modules/javacomp: Depend on it.
141885         Suggested by Simon Josefsson.
141887 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
141889         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
141890         statement, to work around an HP-UX 10.20 compiler bug reported by
141891         Peter O'Gorman.
141893 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
141895         * modules/savedir (Depends-on): Add openat.
141897 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
141899         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
141900         (uintmax_t) [defined uintmax_t]: Do not declare.
141901         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
141902         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
141903         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
141904         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
141905         sake of portability to weird hosts that C allows (though we don't
141906         know of any practical examples).
141908         * lib/savedir.h (fdsavedir): New decl.
141909         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
141910         contains most of the former guts of savedir.
141911         (savedir): Use savedirstream.
141912         Include "openat.h".
141914 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
141916         * modules/obstack (Files): Add m4/ulonglong.m4.
141917         Problem reported by Davide Angelocola.
141919 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
141921         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
141922         coreutils no longer futzes with rounding modes.
141924 2005-11-14  Jim Meyering  <jim@meyering.net>
141926         * lib/mkstemp-safer.c: Include <config.h>, required for possible
141927         replacement of mkstemp.
141929 2005-11-10  Simon Josefsson  <jas@extundo.com>
141931         * lib/readline.c: Remove EOL.
141933 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
141935         * modules/gethrxtime (Depends-on): Add gettime.
141937 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
141939         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
141940         or gettimeofday; no longer needed.
141942 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
141944         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
141945         time business.
141946         (gethrxtime) [! (HAVE_NANOUPTIME
141947         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
141948         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
141949         our own approximation.
141951 2005-11-08  Eric Blake  <ebb9@byu.net>
141953         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
141955 2005-11-08  Eric Blake  <ebb9@byu.net>
141957         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
141959 2005-11-04  Bruno Haible  <bruno@clisp.org>
141961         * gnulib-tool: Implement --update mode.
141963 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
141965         Fix porting problem reported by Theodoros V. Kalamatianos.
141966         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
141967         Don't assume that futimes failing means we must fail.
141969 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
141971         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
141972         variables to suggest the intended function of the PATH_MAX check.
141974 2005-10-30  Kean Johnston  <jkj@sco.com>
141976         Trivial changes to support SCO systems.
141977         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
141978         as PATH_MAX.
141979         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
141980         where __ptr is null when no I/O is pending.
141982 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
141984         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
141985         leave errno alone.  Problem reported by Dmitry V. Levin.
141987 2005-10-28  Simon Josefsson  <jas@extundo.com>
141989         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
141990         Test more.
141992         * tests/test-gc-md2.c, tests/test-md2.c: New files.
141994         * modules/md2, modules/md2-tests: New files.
141996 2005-10-28  Simon Josefsson  <jas@extundo.com>
141998         * m4/inet_ntop.m4: More tests.
142000         * m4/gc-md2.m4, md2.m4: New file.
142002 2005-10-28  Simon Josefsson  <jas@extundo.com>
142004         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
142005         "restrict" keywords, as per POSIX.  Protect the function
142006         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
142007         Don't use K&R prototypes.  Check the sprintf return values.
142008         Re-define EAFNOSUPPORT if not present.  Indent.
142010         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
142011         suggested by Bruno Haible <bruno@clisp.org>.
142013         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
142015         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
142017         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
142018         libgcrypt).
142020         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
142022         * lib/md2.h, lib/md2.c: New files.
142024 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
142026         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
142027         errno alone.  Problem reported by Frederic Jolliton.
142029 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
142031         * modules/verify (License): Change from GPL to LGPL.  This is a
142032         tiny module and there are apparently near-equivalents that are
142033         under the BSD license.
142035 2005-10-24  Simon Josefsson  <jas@extundo.com>
142037         * modules/sha1: Relicense to LGPL.
142039 2005-10-24  Simon Josefsson  <jas@extundo.com>
142041         * lib/md4.h: Shrink buffer size, now that we changed the type.
142043 2005-10-23  Simon Josefsson  <jas@extundo.com>
142045         * gnulib-tool (func_import): Fix --tests-base.
142047 2005-10-22  Simon Josefsson  <jas@extundo.com>
142049         * modules/arcfour (Depends-on): Need stdint.
142051 2005-10-22  Simon Josefsson  <jas@extundo.com>
142053         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
142054         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
142056 2005-10-22  Simon Josefsson  <jas@extundo.com>
142058         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
142059         suggested by Bruno Haible <bruno@clisp.org>.
142061 2005-10-22  Simon Josefsson  <jas@extundo.com>
142063         * lib/crc.h: Include stddef.h, for size_t.
142065 2005-10-22  Simon Josefsson  <jas@extundo.com>
142067         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
142068         arcfour_context struct (simplify test vector testing in GNU
142069         Shishi).
142071 2005-10-21  Simon Josefsson  <jas@extundo.com>
142073         * modules/des, modules/des-tests: New files.
142075         * modules/gc-des, modules/gc-des-tests: New files.
142077         * tests/test-des.c, tests/test-gc-des.c: New file.
142079 2005-10-21  Simon Josefsson  <jas@extundo.com>
142081         * modules/arctwo, modules/arctwo-tests: New files.
142083         * tests/test-arctwo.c: New file.
142085         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
142087         * tests/test-gc-arctwo.c: New file.
142089 2005-10-21  Simon Josefsson  <jas@extundo.com>
142091         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
142092         Bruno Haible <bruno@clisp.org>.
142094         * m4/gc-des.m4: New file.
142096 2005-10-21  Simon Josefsson  <jas@extundo.com>
142098         * m4/arctwo.m4: New file.
142100         * m4/gc-arctwo.m4: New file.
142102 2005-10-21  Simon Josefsson  <jas@extundo.com>
142104         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
142105         block.
142107 2005-10-21  Simon Josefsson  <jas@extundo.com>
142109         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
142110         <bruno@clisp.org>.
142112         * lib/hmac-sha1.c (hmac_sha1): Likewise.
142114         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
142115         Bruno Haible <bruno@clisp.org>.
142117         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
142118         <bruno@clisp.org>.
142120 2005-10-21  Simon Josefsson  <jas@extundo.com>
142122         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
142124 2005-10-21  Simon Josefsson  <jas@extundo.com>
142126         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
142128 2005-10-21  Simon Josefsson  <jas@extundo.com>
142130         * lib/des.h, lib/des.c: New files.
142132         * lib/gc-gnulib.c: Support DES.c
142134 2005-10-21  Simon Josefsson  <jas@extundo.com>
142136         * lib/arctwo.h, lib/arctwo.c: New files.
142138         * lib/gc-gnulib.c: Support ARCTWO.
142140 2005-10-21  Simon Josefsson  <jas@extundo.com>
142142         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
142143         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
142145 2005-10-21  Simon Josefsson  <jas@extundo.com>
142147         * gnulib-tool (func_import, func_create_testdir): Define automake
142148         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
142149         Makefile.am snippet),
142150         suggested by Bruno Haible <bruno@clisp.org>.
142152         * modules/gc (Makefile.am): Use it.
142154 2005-10-21  Bruno Haible  <bruno@clisp.org>
142156         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
142157         patch.
142159 2005-10-19  Simon Josefsson  <jas@extundo.com>
142161         * tests/test-gc-rijndael.c: New file.
142163         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
142165 2005-10-19  Simon Josefsson  <jas@extundo.com>
142167         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
142168         interface too.
142170 2005-10-19  Simon Josefsson  <jas@extundo.com>
142172         * tests/test-gc-arcfour.c: New file.
142174         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
142176 2005-10-19  Simon Josefsson  <jas@extundo.com>
142178         * modules/gc-md4, modules/gc-md4-tests: New file.
142180         * tests/test-gc-md4.c: New file.
142182 2005-10-19  Simon Josefsson  <jas@extundo.com>
142184         * m4/gc-md4.m4: New file.
142186 2005-10-19  Simon Josefsson  <jas@extundo.com>
142188         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
142189         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
142190         <kasal@ucw.cz>.
142192 2005-10-19  Simon Josefsson  <jas@extundo.com>
142194         * m4/gc-arcfour.m4: New file.
142196         * m4/gc-rijndael.m4: New file.
142198 2005-10-19  Simon Josefsson  <jas@extundo.com>
142200         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
142202 2005-10-19  Simon Josefsson  <jas@extundo.com>
142204         * lib/gc-gnulib.c: Support ARCFOUR.
142206 2005-10-19  Simon Josefsson  <jas@extundo.com>
142208         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
142209         support.
142211         * lib/gc.h: Add ECB enum type.
142213         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
142215 2005-10-18  Simon Josefsson  <jas@extundo.com>
142217         * tests/test-md5.c: New file.
142219         * modules/md5-tests: New file.
142221 2005-10-18  Simon Josefsson  <jas@extundo.com>
142223         * tests/test-md4.c: New file.
142225         * modules/md4, modules/md4-tests: New files.
142227 2005-10-18  Simon Josefsson  <jas@extundo.com>
142229         * m4/md4.m4: New file.
142231 2005-10-18  Simon Josefsson  <jas@extundo.com>
142233         * lib/md4.h, lib/md4.c: New files, based on md5.?.
142235 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
142237         * gnulib-tool (func_create_testdir): Omit the second check whether
142238         BUILT_SOURCES in nonempty.
142240 2005-10-17  Simon Josefsson  <jas@extundo.com>
142242         * tests/test-rijndael.c: New file.
142244 2005-10-17  Simon Josefsson  <jas@extundo.com>
142246         * modules/sha1: Depend on stdint instead of md5.
142248         * modules/md5: Depend on stdint, remove uint32_t.
142250 2005-10-17  Simon Josefsson  <jas@extundo.com>
142252         * modules/gc-sha1-tests: New file.
142254         * tests/test-gc-sha1.c: New file.
142256 2005-10-17  Simon Josefsson  <jas@extundo.com>
142258         * m4/md5.m4: Remove call to uint32_t.m4.
142260 2005-10-17  Simon Josefsson  <jas@extundo.com>
142262         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
142264         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
142265         md5.h.
142267         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
142269         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
142271 2005-10-17  Simon Josefsson  <jas@extundo.com>
142273         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
142275 2005-10-17  Simon Josefsson  <jas@extundo.com>
142277         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
142279 2005-10-17  Simon Josefsson  <jas@extundo.com>
142281         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
142283         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
142285 2005-10-17  Bruno Haible  <bruno@clisp.org>
142287         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
142288         that it can also be used in a test.
142290 2005-10-16  Bruno Haible  <bruno@clisp.org>
142292         * gnulib-tool (func_emit_tests_Makefile_am): Also define
142293         TESTS_ENVIRONMENT, so that individual tests can augment it.
142295         * gnulib-tool (func_create_testdir): Use an intermediate target for
142296         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
142297         macros, like $(ALLOCA_H), which cannot be passed through the command
142298         line.
142300 2005-10-15  Simon Josefsson  <jas@extundo.com>
142302         * modules/rijndael-tests: New file.
142304         * modules/rijndael: New file.
142306 2005-10-15  Simon Josefsson  <jas@extundo.com>
142308         * m4/rijndael.m4: New file.
142310 2005-10-15  Simon Josefsson  <jas@extundo.com>
142312         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
142314         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
142316 2005-10-14  Simon Josefsson  <jas@extundo.com>
142318         * tests/test-arcfour.c: New file.
142320         * modules/arcfour, modules/arcfour-tests: New files.
142322 2005-10-14  Simon Josefsson  <jas@extundo.com>
142324         * m4/arcfour.m4: New file.
142326 2005-10-14  Simon Josefsson  <jas@extundo.com>
142328         * lib/arcfour.h, lib/arcfour.c: New files.
142330 2005-10-14  Roland McGrath  <roland@redhat.com>
142332         Import from libc.  [BZ #1331]
142333         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
142334         macro argument.
142335         Reported by Matej Vela <vela@debian.org>.
142337 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
142339         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
142340         include <wchar.h>; no longer needed.
142342 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
142344         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
142346 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
142347         and  Ulrich Drepper  <drepper@redhat.com>
142349         Import from libc.
142350         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
142351         instead of inline stream orientation test and two separate
142352         function calls.  Pay no attention to USE_IN_LIBIO.
142354 2005-10-13  Simon Josefsson  <jas@extundo.com>
142356         * modules/gc-hmac-md5-tests: New file.
142358         * tests/test-gc-hmac-sha1.c: New file.
142360         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
142362         * modules/gc-hmac-md5-tests: New file.
142364         * tests/test-gc-md5.c: New file.
142366         * modules/gc-md5-tests: New file.
142368 2005-10-13  Simon Josefsson  <jas@extundo.com>
142370         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
142371         Move memory allocation outside of loop.
142373 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
142375         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
142376         intermediate directory is in a read-only file system.  Problem
142377         reported by Eric Blake.
142379 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
142381         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
142383 2005-10-12  Simon Josefsson  <jas@extundo.com>
142385         * tests/test-hmac-sha1.c: New file.
142387         * modules/hmac-sha1-tests: New file.
142389         * modules/hmac-sha1: New file.
142391 2005-10-12  Simon Josefsson  <jas@extundo.com>
142393         * modules/gc-sha1: New file.
142395 2005-10-12  Simon Josefsson  <jas@extundo.com>
142397         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
142399         * tests/test-gc-pbkdf2-sha1.c: New file.
142401 2005-10-12  Simon Josefsson  <jas@extundo.com>
142403         * modules/gc-md5, modules/gc-hmac-md5: New files.
142405         * modules/gc (Files): Remove md5, memxor and hmac files.
142407 2005-10-12  Simon Josefsson  <jas@extundo.com>
142409         * m4/gc-pbkdf2-sha1.m4: New file.
142411         * m4/gc-hmac-sha1.m4: New file.
142413         * m4/gc-sha1: New file.
142415         * m4/hmac-sha1.m4: New file.
142417 2005-10-12  Simon Josefsson  <jas@extundo.com>
142419         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
142421         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
142423 2005-10-12  Simon Josefsson  <jas@extundo.com>
142425         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
142426         suggested by Bruno Haible <bruno@clisp.org>.
142428 2005-10-12  Simon Josefsson  <jas@extundo.com>
142430         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
142432 2005-10-12  Simon Josefsson  <jas@extundo.com>
142434         * lib/gc-pbkdf2-sha1.c: New file.
142436         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
142438 2005-10-12  Simon Josefsson  <jas@extundo.com>
142440         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
142442         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
142444 2005-10-12  Simon Josefsson  <jas@extundo.com>
142446         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
142447         GC_USE_HMAC_MD5, respectively.
142449         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
142450         (gc_md5): Fix typo.
142452         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
142454         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
142456         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
142458 2005-10-12  Bruno Haible  <bruno@clisp.org>
142460         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
142461         Reported by Stepan Kasal <kasal@ucw.cz>.
142463 2005-10-11  Simon Josefsson  <jas@extundo.com>
142465         * tests/test-crc.c: New file.
142467         * modules/crc, modules/crc-tests: New files.
142469 2005-10-11  Simon Josefsson  <jas@extundo.com>
142471         * m4/crc.m4: New file.
142473 2005-10-11  Simon Josefsson  <jas@extundo.com>
142475         * lib/gc.h: Add gc_hash and gc_hash_buffer.
142477         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
142479         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
142481 2005-10-11  Simon Josefsson  <jas@extundo.com>
142483         * lib/crc.h, lib/crc.c: New files.
142485         * lib/gc.h (gc_hash_buffer): Add doc.
142487 2005-10-11  Bruno Haible  <bruno@clisp.org>
142489         * modules/c-strcasestr: New file.
142490         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
142492 2005-10-11  Bruno Haible  <bruno@clisp.org>
142494         * modules/c-strcase: New file.
142495         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
142497 2005-10-11  Bruno Haible  <bruno@clisp.org>
142499         * lib/strcasecmp.c: Include limits.h.
142500         (strcasecmp): Avoid integer overflow on exotic platforms.
142501         * lib/strncasecmp.c: Include limits.h.
142502         (strncasecmp): Avoid integer overflow on exotic platforms.
142503         Reported by Paul Eggert.
142505 2005-10-11  Bruno Haible  <bruno@clisp.org>
142507         * lib/c-strcasestr.h: New file, from GNU gettext.
142508         * lib/c-strcasestr.c: New file, from GNU gettext.
142510 2005-10-11  Bruno Haible  <bruno@clisp.org>
142512         * lib/c-strcase.h: New file, from GNU gettext.
142513         * lib/c-strcasecmp.c: New file, from GNU gettext.
142514         * lib/c-strncasecmp.c: New file, from GNU gettext.
142516 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
142518         * modules/mempcpy (License): GPL -> LGPL.
142519         * modules/strchrnul (License): Likewise.
142520         * modules/sysexits (License): Likewise.
142522 2005-10-08  Simon Josefsson  <jas@extundo.com>
142524         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
142526 2005-10-07  Simon Josefsson  <jas@extundo.com>
142528         * m4/memxor.m4: Remove gl_C_RESTRICT call.
142530 2005-10-06  Simon Josefsson  <jas@extundo.com>
142532         * tests/test-hmac-md5.c: New file.
142534         * modules/hmac-md5-tests: New file.
142536         * modules/hmac-md5: New file.
142538 2005-10-06  Simon Josefsson  <jas@extundo.com>
142540         * m4/hmac-md5.m4: New file.
142542         * m4/memxor.m4: Require gl_C_RESTRICT.
142544 2005-10-06  Simon Josefsson  <jas@extundo.com>
142546         * lib/memxor.c (memxor): Avoid casts and warnings.
142548 2005-10-06  Simon Josefsson  <jas@extundo.com>
142550         * lib/hmac-md5.c: New file.
142552         * lib/hmac.h: New file.
142554 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
142556         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
142557         promotes to int, not unsigned int, to catch the AIX 5.3
142558         compiler bug.
142560 2005-10-05  Simon Josefsson  <jas@extundo.com>
142562         * modules/memxor: New file.
142564         * modules/iconv (Files): Move config.rpath to havelib, it is used
142565         there.
142567         * modules/havelib (Files): Add config.rpath.
142569 2005-10-05  Simon Josefsson  <jas@extundo.com>
142571         * m4/memxor.m4: New file.
142573 2005-10-05  Simon Josefsson  <jas@extundo.com>
142575         * lib/memxor.c (memxor): Fix compiler error.
142577         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
142578         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
142580         * lib/memxor.h, lib/memxor.c: New files.
142582         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
142583         we assume all systems have it, suggested by Jim Meyering
142584         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
142585         any systems lack sys/socket.h; mingw32 is known to lack it, but we
142586         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
142587         same reasons.
142589 2005-10-05  Simon Josefsson  <jas@extundo.com>
142591         * config/srclist.txt: Add glibc bug 1423 for md5.h.
142593 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
142595         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
142596         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
142597         needed, since the source code now assumes these .h files.
142599 2005-10-05  Derek Price  <derek@ximbiot.com>
142601         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
142603 2005-10-05  Bruno Haible  <bruno@clisp.org>
142605         * modules/stdint (License): Change to LGPL.
142607 2005-10-04  Simon Josefsson  <jas@extundo.com>
142609         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
142610         D. Baushke" <mdb@gnu.org>.
142612 2005-10-04  Bruno Haible  <bruno@clisp.org>
142614         * lib/verify.h (verify_true): Provide alternative definition for C++.
142616 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
142618         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
142619         (SSIZE_MAX): New macro, if not already defined.
142620         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
142621         than 2 GiB.
142623 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
142625         Sync from coreutils.
142626         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
142627         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
142628         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
142629         ULLONG_MAX doesn't work with 2.7.2.1.
142631 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
142633         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
142634         From Ben Pfaff.
142636         * modules/exclude (Depends-on): Depend on verify.
142637         * modules/strtoimax (Depends-on): Likewise.
142638         * modules/utimecmp (Depends-on): Likewise.
142640 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
142642         * lib/exclude.c: Include verify.h.
142643         (verify): Remove.  All callers changed to use verify.h's version.
142644         * lib/strtoimax.c: Likewise.
142645         * lib/utimecmp.c: Likewis.e
142647         Sync from coreutils.
142648         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
142649         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
142650         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
142651         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
142652         bother returning ENOSYS if settimeofday or stime fails; just let
142653         them return whatever errno they want to return.
142654         * lib/utimens.c: Include unistd.h, for dup2.
142655         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
142656         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
142658 2005-10-02  Jim Meyering  <jim@meyering.net>
142660         Sync from coreutils.
142661         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
142662         from glibc-2.2.5 that fails for read-only files.
142664 2005-10-02  Jim Meyering  <jim@meyering.net>
142666         Sync from coreutils.
142667         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
142668         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
142669         `#if HAVE_CONFIG_H'.
142670         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
142671         Remove AT_FDCWD test.
142672         Do not consume the fd unless successful.
142673         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
142674         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
142675         block, so that we don't even try to compile it if settimeofday is
142676         available.  This works around a compilation failure on OSF1 V5.1,
142677         due to stime requiring a `long int*' while tv_sec is `int'.
142679 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
142681         Sync from coreutils.
142682         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
142683         against `yes', rather than just testing for nonempty.
142685 2005-10-01  Simon Josefsson  <jas@extundo.com>
142687         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
142688         and Darwin.
142690         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
142691         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
142692         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
142693         freeaddrinfo and gai_strerror are declared by the POSIX headers.
142694         Check if struct addrinfo is declared.
142696 2005-10-01  Simon Josefsson  <jas@extundo.com>
142698         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
142699         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
142700         AI_* and EAI_* definitions.  Protect function declarations.
142702 2005-10-01  Jim Meyering  <jim@meyering.net>
142704         Sync from coreutils.
142706         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
142707         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
142708         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
142709         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
142710         in the inet and nsl libraries.  Required on Solaris 5.7.
142712 2005-10-01  Jim Meyering  <jim@meyering.net>
142714         Sync from coreutils.
142715         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
142716         in the inet and nsl libraries.  Required on Solaris 5.7.
142718 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
142720         * lib/getdelim.c (getdelim): Remove unused variables.
142722 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
142724         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
142725         so that the code works even with ancient cpp.  Portability problem
142726         with GCC 2.7.2.1 reported by Thomas M.Ott.
142728 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
142730         * modules/regex (Depends-on): Add strcase.
142732         * modules/gethostname (Licence): Change from GPL to LGPL, since
142733         gethostname.c is a trivial implementation of a standard library
142734         function.
142735         * modules/poll (License): Change from GPL to LGPL, since it's
142736         derived from LGPL code.
142738 2005-09-27  Jim Meyering  <jim@meyering.net>
142740         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
142741         HAVE_CONFIG_H.
142743         * lib/intprops.h (signed_type_or_expr__): Define.
142744         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
142745         for unsigned types.
142747 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
142749         * lib/verify.h (verify_expr): Remove, replacing with:
142750         (verify_true): New macro that returns true instead of void.
142751         (verify_type__): Remove.
142752         (verify): Use verify_true rather than verify_type__.
142754 2005-09-26  Bruno Haible  <bruno@clisp.org>
142756         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
142757         is necessary.
142758         (lib_SOURCES): Remove mbchar.c.
142759         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
142760         (Files): Add m4/mbrtowc.m4.
142761         * modules/mbiter: Likewise.
142762         * modules/mbuiter: Likewise.
142764 2005-09-26  Bruno Haible  <bruno@clisp.org>
142766         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
142767         compile mbchar.c if they are not both present.
142768         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
142769         * m4/mbiter.m4 (gl_MBITER): Likewise.
142770         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
142771         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
142772         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
142774 2005-09-25  Jim Meyering  <jim@meyering.net>
142776         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
142777         also uses socklen_t.
142779 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
142781         * lib/utimens.c (ENOSYS): Define if not already defined.
142782         (futimens): Support having a null PATH if the file descriptor
142783         is nonnegative.
142785         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
142786         Remove.
142787         (__attribute): Define to empty unless GCC 3.1 or later.
142788         This works around a core dump on OpenBSD 3.4, which has GCC
142789         2.95.3, which dumps core when given __attribute__(()).  It also
142790         simplifies other tests, since we really don't want to bother with
142791         worrying about which ancient version of GCC supported what.
142792         Original problem reported by Yoann Vandoorselaere, with part of
142793         the fix suggested by Derek Price.
142795 2005-09-24  Jim Meyering  <jim@meyering.net>
142797         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
142798         so we can once again use a positive bitfield width of 1 -- now we
142799         don't have to explain why we were using a bitfield width of 2.
142801 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
142803         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
142804         and similarly for the other external symbols.  Problem reported
142805         by James Gallager.
142807         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
142808         bug reported by Jim Meyering.
142810         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
142811         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
142812         not needed, since socklen is a prerequisite module.
142814 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
142816         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
142817         Problem reported by Eric Blake.
142818         (getaddrinfo): Initialize se so that it's not garbage.
142819         Redo internal storage allocation so that it doesn't make unportable
142820         assumptions about alignment.
142821         Fix a memory leak.
142823         * lib/utimens.c (futimens): Use futimesat if available.
142824         Prefer it to futimes since it doesn't have the futimes bug.
142826         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
142827         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
142828         Instead, declare a function that returns a pointer to an array,
142829         and use verify_type__ to declare the size of the array.
142830         Problem and germ of a solution reported by Bruno Haible.
142831         (verify_type__): Use 2, not 1, for bitfield size, to avoid
142832         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
142834 2005-09-23  Jim Meyering  <jim@meyering.net>
142836         Sync from coreutils.
142837         Correct build failure (socklen_t not defined) on at least
142838         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
142839         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
142841 2005-09-23  Jim Meyering  <jim@meyering.net>
142843         * modules/getaddrinfo (Depends-on): Add socklen.
142845 2005-09-23  Bruno Haible  <bruno@clisp.org>
142847         * tests/test-verify.c: New file.
142849 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
142851         Sync from coreutils.
142853         * modules/argmatch (Depends-on): Add verify.
142854         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
142855         unistd-safer.
142856         * modules/save-cwd (Depends-on): Likewise.
142858         * modules/openat (Files): Add lib/openat-die.c.
142859         (Depends-on): Remove error, exitfail.
142860         Add dirname.
142862         * modules/verify: New file.
142863         * MODULES.html.sh (Diagnostics <assert.h>): New section,
142864         with "verify" module.
142866 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
142868         Sync from coreutils.
142870         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
142871         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
142872         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
142873         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
142874         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
142875         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
142876         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
142877         Don't bother checking for string.h, stdlib.h, unistd.h.
142878         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
142879         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
142880         module's job.
142881         * m4/jm-macros.m4 (gl_MACROS): Likewise.
142882         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
142884         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
142885         (gl_GETDATE): Use it.
142887         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
142889 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
142891         Sync from coreutils.
142893         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
142894         stat-time.h.
142895         * lib/argmatch.h: Include verify.h
142896         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
142897         (ARGMATCH_ASSERT): Remove; unused.
142898         * lib/canonicalize.c: Assume STDC_HEADERS.
142899         * lib/exclude.c: Include "strcase.h".
142900         * lib/regex_internal.h [!defined _LIBC]: Likewise.
142901         * lib/getusershell.c: Include stdio--.h rather than stdio.h
142902         and stdio-safer.h.
142903         (getusershell): Call fopen, not fopen_safer.
142904         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
142905         Do not include unistd-safer.h.
142906         (save_cwd): Don't call fd_safer; no longer needed
142907         now that we include fcntl--.h.
142909         * lib/getdate.y (relative_time): New type.
142910         (RELATIVE_TIME_0): New constant.
142911         (parser_control): Use relative_time instead of doing it ourselves.
142912         (%union): Add new relative_time rel member.
142913         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
142914         Now typeless.
142915         (relunit, relunit_snumber): Now of type rel.
142916         (zone, rel, relunit, get_date): Adjust to above changes.
142918         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
142919         Do not include unistd-safer.h.
142920         (getloadavg): Don't call fd_safer; no longer needed
142921         now that we include fcntl--.h.
142923         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
142924         (make_dir_parents): Treat ENOSYS like EEXIST.
142926         Improve quality of diagnostics on restore_cwd failure.
142927         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
142928         (make_dir_parents): Last arg is now int * (for errno), not bool *.
142929         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
142930         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
142931         each time through the loop.  Do not diagnose restore_cwd failure;
142932         that is the caller's job (and perhaps the caller does not care).
142934         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
142935         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
142936         If the file already exists but is not a directory, don't bother
142937         to try to make its parents.
142938         Close potential file descriptor leak if we can't chdir("/") (!).
142939         Don't always return true if chdir($PWD) fails; return true only
142940         if the requested action was done successfully (except for the
142941         chdir($PWD)).
142942         Don't log final directory unless we actually made it.
142943         Refactor to avoid duplicate code to fix up permissions.
142944         Don't attempt to fix up parent permissions if chdir($PWD) fails.
142946         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
142947         to make it a bit faster and (I hope) clearer.
142948         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
142949         Fix bug in formats like %2N.
142951         * lib/verify.h: New file.
142953 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
142955         Sync from coreutils.
142956         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
142958 2005-09-22  Jim Meyering  <jim@meyering.net>
142960         Sync from coreutils.
142962         * m4/lstat.m4 (gl_FUNC_LSTAT):
142963         Use AC_LIBSOURCES to require lstat.c and lstat.h.
142964         Remove obsolete comment.
142965         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
142966         * m4/xstrtod.m4: Likewise.
142968         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
142970 2005-09-22  Jim Meyering  <jim@meyering.net>
142972         Sync from coreutils.
142974         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
142976         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
142977         the .tm_year member, since otherwise gcc-4.0 would now warn about
142978         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
142980         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
142981         order to avoid an unsuppressible warning from gcc on 64-bit systems.
142983         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
142984         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
142985         when run in a time zone for which daylight savings time is in effect
142986         for the starting date.
142988         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
142989         stop us from restricting permissions of just-created absolute-named
142990         directories.
142991         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
142992         to restore initial working directory.
142993         * lib/mkdir-p.c (make_dir_parents): New parameter:
142994         different_working_dir, to tell caller if/when we change the working
142995         directory and are unable to return to the initial one.
142996         * lib/mkdir-p.h (make_dir_parents): Update prototype.
142997         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
142998         `return false'.  This fixes a bug introduced on 2004-07-30.
143000         * lib/openat.c (fdopendir): Be sure to close the supplied
143001         file descriptor before returning.  This makes our replacement
143002         implementation a little closer to Solaris's, where fdopendir
143003         ties the file descriptor to the returned DIR* pointer.
143004         * lib/openat.c (unlinkat): New function.
143005         * lib/openat.h (unlinkat): Add prototype.
143006         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
143007         (openat_restore_fail): Rename from openat_restore_die.
143008         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
143010         Provide an alternative to exiting immediately upon save_cwd or
143011         restore_cwd failure.  Now, an application can arrange e.g.,
143012         to perform a longjump in that case.
143013         * lib/openat.c: Include dirname.h.
143014         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
143015         (rpl_openat, fdopendir, fstatat): Call openat_save_die
143016         and openat_restore_die rather than calling error directly.
143017         Don't include "error.h" or "exitfail.h"; they're no longer needed.
143019         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
143020         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
143021         define.
143023         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
143024         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
143025                             int utc, int nanoseconds);
143026         Background:
143027         date should not have to allocate a megabyte of virtual memory to
143028         handle a format argument like +%1048575T.  When implemented with
143029         strftime, it must allocate such a buffer, use strftime to fill it
143030         in, print it, then free it.
143031         With fprintftime, it simply prints everything and exits.
143032         With no need for memory allocation, that's one fewer way to fail.
143033         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
143034         optional field width, not before, so we accept %9:z, not %:9z.
143035         (my_strftime): Be sure to use L_('x') for literals.
143037         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
143038         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
143039         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
143040         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
143041         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
143042         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
143043         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
143044         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
143045         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
143046         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
143047         * lib/xgethostname.c, lib/xreadlink.c:
143048         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
143050         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
143051         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
143052         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
143053         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
143054         and don't include <sys/file.h>).
143056 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
143058         Sync from coreutils.
143060         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
143061         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
143062         [!LDAV_DONE]: Avoid unused variable warning.
143064 2005-09-21  Bruno Haible  <bruno@clisp.org>
143066         * lib/unicodeio.h (unicode_to_mb): New declaration.
143068 2005-09-20  Derek Price  <derek@ximbiot.com>
143070         * lib/getaddrinfo.c: Don't include <netdb.h> included from
143071         getaddrinfo.h.
143073 2005-09-20  Bruno Haible  <bruno@clisp.org>
143075         * gnulib-tool: Remove trailing slashes from the values specified for
143076         --source-base, --m4-base, --tests-base, --aux-dir.
143077         Suggested by Simon Josefsson <jas@extundo.com>.
143079 2005-09-20  Bruno Haible  <bruno@clisp.org>
143081         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
143082         func_modules_to_filelist, func_import, func_create_testdir): Make all
143083         sorting results locale-independent, so that gnulib-cache.m4 doesn't
143084         change when gnulib-tool is invoked in a different locale.
143086 2005-09-19  Simon Josefsson  <jas@extundo.com>
143088         * m4/socklen.m4: Fix typo.
143090 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
143092         Use a consistent style for including <config.h>.
143093         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
143094         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
143095         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
143096         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
143097         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
143098         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
143099         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
143100         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
143101         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
143102         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
143103         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
143104         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
143105         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
143106         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
143107         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
143108         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
143109         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
143110         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
143111         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
143112         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
143113         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
143114         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
143115         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
143116         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
143117         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
143118         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
143119         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
143120         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
143121         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
143122         lib/xstrtoumax.c, lib/yesno.c:
143123         Standardize inclusion of config.h.
143124         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
143125         lib/inttostr.h:  Removed inclusion of config.h from header files.
143126         * lib/inttostr.c:  Adjusted in-tree users.
143127         * lib/timespec.h: Remove superfluous warning to include config.h.
143128         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
143129         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
143130         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
143131         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
143132         config.h with HAVE_CONFIG_H.
143134 2005-09-19  Jim Meyering  <jim@meyering.net>
143136         * modules/pathmax (License): Change to LGPL.
143138 2005-09-19  Derek Price  <derek@ximbiot.com>
143140         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
143142 2005-09-19  Bruno Haible  <bruno@clisp.org>
143144         * gnulib-tool (import): Provide default for --tests-base.
143146 2005-09-19  Bruno Haible  <bruno@clisp.org>
143148         * doc/quote.texi: New file, extracted from gnulib.texi.
143149         * doc/ctime.texi: New file, extracted from gnulib.texi.
143150         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
143151         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
143152         * doc/gnulib.texi: Include them.
143154 2005-09-18  Bruno Haible  <bruno@clisp.org>
143156         Portability fix.
143157         * gnulib-tool (func_readlink): New function.
143158         (func_ln_if_changed): Use it.
143160 2005-09-18  Bruno Haible  <bruno@clisp.org>
143162         * gnulib-tool: Support --with-tests also with --import.
143163         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
143164         (func_import): Use variables $testsbase and $inctests. Emit a
143165         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
143166         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
143167         SUBDIRS += $testsdir.
143168         (func_create_testdir): Update.
143170 2005-09-18  Bruno Haible  <bruno@clisp.org>
143172         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
143173         instead of $dry_run.
143174         (func_cp_if_changed, func_mv_if_changed): Remove functions.
143175         (func_ln_if_changed): Don't handle dry-run here.
143176         (func_import): In dry-run mode, detect more precisely which actions
143177         would be performed, and don't use "...ing" verbs.
143179 2005-09-18  Bruno Haible  <bruno@clisp.org>
143181         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
143182         (func_import): Use join on two temporary files instead of three nested
143183         loops, in order to determine which files are new or old.
143185 2005-09-18  Bruno Haible  <bruno@clisp.org>
143187         * gnulib-tool (func_import): Comment out code that spits out the
143188         new files with --dry-run.
143190 2005-09-18  Bruno Haible  <bruno@clisp.org>
143192         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
143194 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
143196         * lib/stat-time.h: New file.
143197         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
143198         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
143199         in a different way.
143200         (timespec_cmp): New function.
143201         * lib/utimecmp.c: Include stat-time.h.
143202         (SYSCALL_RESOLUTION): Depend on whether various struct stat
143203         members exist, not on the obsolescent ST_MTIM_NSEC.
143204         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
143206 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
143208         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
143210 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
143212         * MODULES.html.sh (File system functions): Add stat-time.
143213         * modules/stat-time: New file.
143214         * modules/timespec (Files): Remove m4/st_mtim.m4; this
143215         is now done in a different way, by the stat-time module.
143216         * modules/utimecmp (Depends-on): Add stat-time.
143218 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
143220         * m4/st_mtim.m4: Remove.  Superseded by...
143221         * m4/stat-time.m4: New file.
143222         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
143223         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
143225 2005-09-15  Derek Price  <derek@ximbiot.com>
143227         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
143229 2005-09-15  Derek Price  <derek@ximbiot.com>
143231         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
143232         * lib/regex_internal.c: Ditto, using this...
143233         (__GNUC_PREREQ): ...new macro.
143234         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
143235         using...
143236         (__GNUC_PREREQ): ...this new macro.
143238         * lib/strstr.h: Include string.h. Define strstr as a macro here.
143240 2005-09-15  Derek Price  <derek@ximbiot.com>
143241             Paul Eggert  <eggert@cs.ucla.edu>
143243         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
143244         changes, consolidating in...
143245         * lib/regex_internal.h: ...this file.
143247 2005-09-13  Jim Meyering  <jim@meyering.net>
143249         * lib/canon-host.c: Filter through gnu indent and reword comments
143250         slightly.
143251         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
143253 2005-09-13  Derek Price  <derek@ximbiot.com>
143255         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
143256         failure.
143257         Reported by Jim Meyering  <jim@meyering.net>.
143259 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
143261         * lib/base64.c: Typo.
143262         (base64_encode): Put b64str in initialized data section.
143264 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
143266         Merge glibc and coreutils changes into gnulib, plus a few
143267         extra fixes.
143268         * lib/md5.c: Use #error rather than a string.
143269         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
143270         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
143271         (__attribute__): Define to empty for non recent-GCC.
143272         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
143273         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
143274         Renamed from their non-__ counterparts, with new macros replacing
143275         them if not _LIBC.  Add __THROW attribute.
143276         (rol): Remove.
143277         (struct md5_ctx): Align buffer if using GCC.
143278         * lib/sha1.h (struct sha1_ctx): Likewise.
143279         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
143280         The old name was backwards.
143281         (NOTSWAP): Remove; not used.
143282         (rol): New macro, moved here from md5.h.
143283         (sha1_process_block): Remove a FIXME that doesn't make sense.
143285 2005-09-12  Derek Price  <derek@ximbiot.com>
143287         Return usable errors from canon-host.
143288         * lib/canon-host.h: New file.
143289         * lib/canon-host.c (canon_host): Wrap...
143290         (canon_host_r): ...this new function, which now relies exclusively on
143291         getaddrinfo.
143292         (ch_strerror): New function.
143293         (last_cherror): New global.
143294         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
143295         interface.
143296         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
143297         void *.
143298         (freeaddrinfo): Free ai->ai_canonname when set.
143300 2005-09-12  Derek Price  <derek@ximbiot.com>
143302         Make canon-host require getaddrinfo.
143303         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
143304         AC_LIBSOURCE canon-host.h.  Call...
143305         (gl_PREREQ_CANON_HOST): ...this new function, which requires
143306         gl_GETADDRINFO.
143307         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
143309 2005-09-12  Derek Price  <derek@ximbiot.com>
143311         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
143312         LGPL.
143313         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
143315 2005-09-12  Derek Price  <derek@ximbiot.com>
143317         * lib/gai_strerror.c: Include config.h when available.  Include
143318         getaddrinfo.h before other headers to test interface.
143319         Reported by Larry Jones <lawrence.jones@ugs.com>.
143321 2005-09-12  Derek Price  <derek@ximbiot.com>
143322             Paul Eggert  <eggert@cs.ucla.edu>
143324         * modules/glob (Files): Add glob-libc.h.
143326 2005-09-12  Derek Price  <derek@ximbiot.com>
143327             Paul Eggert  <eggert@cs.ucla.edu>
143329         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
143330         glob_.h, glob-libc.h.
143331         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
143333 2005-09-12  Derek Price  <derek@ximbiot.com>
143334             Paul Eggert  <eggert@cs.ucla.edu>
143336         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
143337         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
143338         protecting things that should be done only in gnulib contexts.
143339         * lib/glob_.h: New file, containing only the glob things needed for
143340         gnulib.
143341         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
143342         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
143343         (glob, globfree, glob_pattern_p): Now defined simply in terms of
143344         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
143345         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
143346         and to respect the namespace rules better.
143348 2005-09-08  Simon Josefsson  <jas@extundo.com>
143350         * modules/socklen: New file.
143352 2005-09-08  Simon Josefsson  <jas@extundo.com>
143354         * m4/socklen.m4: New file.
143356 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
143358         * modules/utimens (Files): Add m4/utimbuf.m4, since
143359         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
143360         Reported by Sergey Poznyakoff.
143362 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
143364         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
143365         definitions, since that's the preferred style in glibc.
143366         Fix a minor spacing issue, and update copyright notice to match
143367         glibc's.
143369 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
143371         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
143373 2005-09-06  Simon Josefsson  <jas@extundo.com>
143375         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
143376         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
143378 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
143380         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
143381         warning.
143383 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
143385         * config/srclist.txt: Add glibc bug 1302.
143387 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
143389         Change bitset word type from unsigned int to unsigned long int,
143390         as this has better performance on typical 64-bit hosts.
143391         Port bitset code to hosts with unusual word sizes.
143392         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
143393         (build_collating_symbol):
143394         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
143395         argument is a bitset.  This is merely a style issue, but it makes
143396         it clearer that an entire array is expected.
143397         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
143398         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
143399         Port to the case where bitset_word is not the same as unsigned int.
143400         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
143401         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
143402         Likewise.
143403         * lib/regexec.c (check_dst_limits_calc_pos_1,
143404         check_subexp_matching_top):
143405         (build_trtable, group_nodes_into_DFAstates):
143406         Likewise.
143407         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
143408         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
143409         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
143410         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
143411         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
143412         * lib/regcomp.c (optimize_subexps, lower_subexp):
143413         Work even if bitset_word has holes in its bitwise representation.
143414         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
143415         * lib/regexec.c (check_dst_limits_calc_pos_1,
143416         check_subexp_matching_top):
143417         Likewise.
143418         * lib/regex_internal.c (re_string_reconstruct):
143419         Don't assume UCHAR_MAX == 255.
143420         * lib/regex_internal.h (bitset_set_all): Likewise.
143421         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
143422         All uses changed.
143423         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
143424         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
143425         All uses changed.
143426         (BITSET_WORD_MAX): New macro.
143427         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
143428         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
143429         (bitset_empty, bitset_copy):
143430         Prefer sizeof (bitset) to multiplying it out ourselves.
143431         (bitset_not_merge): Remove; unused.
143432         (bitset_contain): Return bool, not unsigned int with one bit on.
143433         All callers changed.
143434         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
143435         alignment than re_node_set; do this by defining a new internal
143436         type struct dests_alloc and using it to allocate memory.
143438 2005-09-05  Bruno Haible  <bruno@clisp.org>
143440         * gnulib-tool (func_import): Fix comparison in handling of symbolic
143441         links.
143443 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
143445         * modules/size_max (Makefile.am): Add size_max.h
143447 2005-09-04  Derek Price  <derek@ximbiot.com>
143449         * gnulib-tool (func_import): Fix reversed $symbolic logic.
143451 2005-09-03  Simon Josefsson  <jas@extundo.com>
143453         * gnulib-tool: Fix typo.
143455 2005-09-03  Simon Josefsson  <jas@extundo.com>
143457         * config/srclist.txt: Add glibc bug 1293.
143459 2005-09-03  Derek Price  <derek@ximbiot.com>
143461         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
143462         From Larry Jones <lawrence.jones@ugs.com>.
143464 2005-09-02  Simon Josefsson  <jas@extundo.com>
143466         * modules/socklen: New file.
143468 2005-09-02  Simon Josefsson  <jas@extundo.com>
143470         * modules/havelib: New module.
143472         * modules/gettext, modules/iconv, modules/lock, modules/readline:
143473         Use havelib.
143475 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
143477         Check for arithmetic overflow when calculating sizes, to prevent
143478         some buffer-overflow issues.  These patches are conservative, in the
143479         sense that when I couldn't determine whether an overflow was possible,
143480         I inserted a run-time check.
143481         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
143482         macros.
143483         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
143484         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
143485         (re_xnrealloc, re_x2nrealloc): New inline functions.
143486         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
143487         parse_bracket_exp):
143488         (build_equiv_class, build_charclass): Check for arithmetic overflow
143489         in size expression calculations.
143490         * lib/regex_internal.c (re_string_realloc_buffers):
143491         (build_wcs_upper_buffer, re_node_set_add_intersect):
143492         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
143493         (re_dfa_add_node, register_state): Likewise.
143494         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
143495         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
143496         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
143497         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
143499 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
143501         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
143502         m4/ulonglong.m4.  Problem reported by Martin Lambers.
143504 2005-09-02  Bruno Haible  <bruno@clisp.org>
143506         Support for lib vs. lib64 distinction on biarch platforms.
143507         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
143508         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
143509         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
143511 2005-09-02  Bruno Haible  <bruno@clisp.org>
143513         * gnulib-tool (import): In the other first-use case, provide defaults
143514         as well.
143516 2005-09-02  Bruno Haible  <bruno@clisp.org>
143518         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
143519         patches not yet found in the latest gettext release.
143521 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
143523         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
143524         to avoid a collision with bits/local_lim.h in glibc.
143525         All uses changed.  Problem reported by Dmitry V. Levin in
143526         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
143528         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
143529         bugs in int versus size_t comparisons.
143530         (re_string_context_at): Fix bug where the code assumed that
143531         Idx is signed.
143533         Use bool where appropriate.
143534         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
143535         All callers changed.
143536         (calc_eclosure_iter): Likewise, for ROOT arg.
143537         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
143538         (build_charclass_op): Likewise, for NON_MATCH arg.
143539         * lib/regex_internal.c (re_string_allocate, re_string_construct):
143540         (re_string_construct_common): Likewise, for ICASE arg.
143541         * lib/regexec.c (re_search_2_stub, re_search_stub):
143542         Likewise, for RET_LEN arg.
143543         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
143544         (set_regs): Likewise, for FL_BACKTRACK arg.
143545         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
143546         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
143547         (calc_eclosure_iter, parse_bracket_exp):
143548         Use bool for internal variables that are booleans.
143549         * lib/regexec.c (re_search_internal, check_matching,
143550         proceed_next_node):
143551         (set_regs, build_sifted_states, sift_states_bkref):
143552         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
143553         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
143554         (find_collation_sequence_value):
143555         Likewise.
143556         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
143557         (re_node_set_compare):
143558         Return bool, not int. All callers changed.
143559         * lib/regexec.c (check_halt_node_context, check_dst_limits):
143560         (build_trtable, check_node_accept): Likewise.
143561         * lib/regex_internal.h: Include stdbool.h.
143563         Fix bugs uncovered when converting to bool.
143564         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
143565         failure instead of charging ahead blindly.
143566         * lib/regex_internal.c (register_state): Likewise.
143567         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
143568         for freeing internal storage.
143569         (group_nodes_into_DFA_states): Use unsigned int, not int, for
143570         bitset pieces used as boolean, to avoid undefined behavior
143571         on hosts that do int overflow checking.
143573 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
143575         * config/srclist.txt: Add glibc bugs 1285-1287.
143577 2005-09-01  Jim Meyering  <jim@meyering.net>
143579         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
143580         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
143581         Require gl_STAT_MACROS, too.
143583 2005-09-01  Bruno Haible  <bruno@clisp.org>
143585         * gnulib-tool (import): In the first-use case, provide defaults.
143587 2005-09-01  Bruno Haible  <bruno@clisp.org>
143589         * gnulib-tool (func_import): Remove the .tmp files.
143591 2005-09-01  Bruno Haible  <bruno@clisp.org>
143593         * gnulib-tool (func_import): Fix handling of symbolic links.
143595 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
143597         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
143598         old glibc regex code mishandles strings longer than 2**31 bytes.
143599         This patch fixes this when the regex code is used in gnulib
143600         (i.e., outside glibc).
143602         This patch should not affect the use of the regex code inside
143603         glibc.  No doubt this problem also needs to be handled for glibc
143604         as well, but the result will be an incompatible change to the
143605         glibc ABI, and the old ABI will have to be supported too.  That
143606         can be the subject for another patch.
143608         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
143609         governing whether the rest of this patch is active.  By default,
143610         the macro is disabled and the patch has no effect.
143611         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
143612         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
143613         (struct re_pattern_buffer, re_search, re_search_2, re_match):
143614         (re_match_2, re_set_registers): Use the new types.
143615         * lib/regex_internal.h (Idx, re_hashval_t): New types.
143616         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
143617         New macros.
143618         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
143619         (re_string_context_at, bin_tree_t, re_dfastate_t):
143620         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
143621         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
143622         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
143623         (re_string_char_size_at, re_string_wchar_at):
143624         (re_string_elem_size_at):
143625         Use the new types and macros to port to 64-bit hosts.
143626         Use unsigned types for internal values, so that the code
143627         mostly works even for arrays larger than SSIZE_MAX.
143628         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
143629         (search_duplicated_node, calc_eclosure_iter, fetch_number):
143630         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
143631         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
143632         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
143633         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
143634         (calc_inveclosure, parse_dup_op, build_range_exp):
143635         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
143636         (fetch_number, create_token_tree, mark_opt_subexp):
143637         Likewise.
143638         * lib/regex_internal.c (re_string_construct_common,
143639         create_ci_newstate):
143640         (create_cd_newstate, re_string_allocate, re_string_construct):
143641         (re_string_realloc_buffers, build_wcs_upper_buffer):
143642         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
143643         (re_string_reconstruct, re_string_peek_byte_case):
143644         (re_string_fetch_byte_case, re_string_context_at):
143645         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
143646         (re_node_set_init_copy, re_node_set_add_intersect):
143647         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
143648         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
143649         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
143650         (re_acquire_state, re_acquire_state_context, register_state):
143651         Likewise.
143652         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
143653         search_cur_bkref_entry):
143654         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
143655         (re_search_internal, re_search_2_stub, re_search_stub)
143656         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
143657         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
143658         (update_cur_sifted_state, check_dst_limits):
143659         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
143660         (check_subexp_limits, sift_states_bkref, merge_state_array):
143661         (check_subexp_matching_top, get_subexp, get_subexp_sub):
143662         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
143663         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
143664         (expand_bkref_cache, check_node_accept_bytes):
143665         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
143666         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
143667         (acquire_init_state_context, check_halt_node_context):
143668         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
143669         (sift_states_backward, clean_state_log_if_needed):
143670         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
143671         (find_recover_state, transit_state_sb, transit_state_mb):
143672         (transit_state_bkref, build_trtable, match_ctx_clean):
143673         Likewise.
143674         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
143675         to work around an assumption that REG_MISSING is negative.
143677         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
143678         (seek_collating_symbol_entry) [defined _LIBC]:
143679         (lookup_collation_sequence_value) [defined _LIBC]:
143680         (build_range_exp, build_collating_symbol) [defined _LIBC]:
143681         Use prototypes rather than old-style function definitions.
143682         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
143683         (transit_state_sb) [0]:
143684         (find_collation_sequence_value) [defined _LIBC]: Likewise.
143686         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
143687         rm_eo.
143689         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
143690         (optimize_subexps, lower_subexp):
143691         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
143692         since the signed shift might overflow.  Use 1u<<31 instead.
143693         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
143694         Likewise.
143695         * lib/regexec.c (check_dst_limits_calc_pos_1,
143696         check_subexp_matching_top): Likewise.
143698         * lib/regcomp.c (optimize_subexps, lower_subexp):
143699         Use CHAR_BIT rather than 8, for clarity.
143700         * lib/regexec.c (check_dst_limits_calc_pos_1):
143701         (check_subexp_matching_top): Likewise.
143702         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
143703         have to worry about portability issues when shifting it left.
143704         Remove no-longer-needed test for table_size > 0.
143705         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
143706         in a word, as the resulting behavior is undefined.
143707         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
143708         in one case, a <= should have been an <, and in another case the
143709         whole test was missing.
143710         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
143711         the standard name CHAR_BIT.
143712         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
143713         this is not true on one's complement and signed-magnitude hosts.
143715         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
143716         next_last_offset.
143717         (struct re_dfa_t): Remove unused member states_alloc.
143718         * lib/regcomp.c (init_dfa): Don't initialize unused members.
143720 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
143722         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
143723         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
143724         and large-file glibc and in 32-bit large-file Solaris.
143726 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
143728         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
143729         lengths fit in regoff_t; this isn't true if regoff_t is the same
143730         width as size_t.
143731         * lib/regex.c (re_search_internal): 5th arg is LAST_START
143732         (= START + RANGE) instead of RANGE.  This avoids overflow
143733         problems when regoff_t is the same width as size_t.
143734         All callers changed.
143735         (re_search_2_stub): Check for overflow when adding the
143736         sizes of the two strings.
143737         (re_search_stub): Check for overflow when adding START
143738         to RANGE; if it occurs, substitute the extreme value.
143740 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
143742         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
143744 2005-08-31  Jim Meyering  <jim@meyering.net>
143746         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
143747         a pointer-to-const.
143748         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
143749         (register_state): Likewise.
143750         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
143751         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
143752         (group_nodes_into_DFAstates): Likewise.
143754 2005-08-31  Jim Meyering  <jim@meyering.net>
143756         * check-module: Add a FIXME comment.
143758 2005-08-31  Eric Blake  <ebb9@byu.net>
143760         * modules/unistd-safer (Files): Add unistd--.h.
143761         * modules/stdio-safer (Files): Add stdio--.h.
143763 2005-08-31  Derek Price  <derek@ximbiot.com>
143765         * lib/getdelim.c (getdelim): Return EOF on EOF.
143766         Reported by Larry Jones <lawrence.jones@ugs.com>.
143768 2005-08-31  Bruno Haible  <bruno@clisp.org>
143770         Avoid unnecessary diffs in the generated lib/Makefile.am.
143771         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
143772         the generated files.
143773         (func_import): Don't set cmd.
143775 2005-08-31  Bruno Haible  <bruno@clisp.org>
143777         * lib/strstr.c: Include <stddef.h>, for NULL.
143778         * lib/strcasestr.c: Likewise.
143779         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
143781 2005-08-31  Bruno Haible  <bruno@clisp.org>
143783         * gnulib-tool: New option --macro-prefix.
143784         (func_import): Use macro_prefix.
143785         (import): Handle option --macro-prefix.
143787 2005-08-31  Bruno Haible  <bruno@clisp.org>
143789         * gnulib-tool (import): Rename most ac_* variables to cached_*.
143790         Also use new variables cached_lgpl, cached_libtool.
143792 2005-08-31  Bruno Haible  <bruno@clisp.org>
143794         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
143795         always instantiating them.
143797 2005-08-31  Bruno Haible  <bruno@clisp.org>
143799         * gnulib-tool (func_import): Read the previous cached settings
143800         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
143801         earlier added by gnulib but are now dropped. Warn when a gnulib file
143802         overwrites a non-gnulib file.
143804 2005-08-31  Bruno Haible  <bruno@clisp.org>
143806         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
143807         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
143808         projects that don't keep autogenerated files in CVS. Put into
143809         actioncmd only the specified modules, not the transitive closure.
143811 2005-08-31  Bruno Haible  <bruno@clisp.org>
143813         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
143814         Create directories that shall be filled.
143815         (import): Don't look for gl_* macros in configure.ac. Recurse across
143816         all directories containing a gnulib-cache.m4 files, if meaningful.
143818 2005-08-31  Bruno Haible  <bruno@clisp.org>
143820         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
143821         (import): Set seen_libtool when we see gl_LIBTOOL.
143823 2005-08-31  Bruno Haible  <bruno@clisp.org>
143825         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
143826         declaration macro definitions from generated gnulib.m4.
143828 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
143830         * lib/iconvme.h: Add prototype for iconv_alloc.
143832 2005-08-29  Simon Josefsson  <jas@extundo.com>
143834         * lib/iconvme.c: Fix errno.
143836 2005-08-29  Bruno Haible  <bruno@clisp.org>
143838         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
143839         that it works when the directory contains spaces.
143841 2005-08-29  Bruno Haible  <bruno@clisp.org>
143843         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
143845 2005-08-29  Bruno Haible  <bruno@clisp.org>
143847         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
143848         Emit more advice.
143850 2005-08-29  Bruno Haible  <bruno@clisp.org>
143851         and Stepan Kasal  <kasal@ucw.cz>
143853         * check-module: If more parameters are given, check each of them
143854         separately; add more exceptions, as noted by Jim Meyering.
143855         (check_module): New procedure.
143856         (%exempt_header): Now contains all exceptions.
143858 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
143860         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
143862 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
143864         * lib/iconvme.c: Split iconv_string into iconv_alloc.
143866 2005-08-28  Bruno Haible  <bruno@clisp.org>
143868         * m4/gnulib-tool.m4: New file.
143870 2005-08-27  Jim Meyering  <jim@meyering.net>
143872         * modules/unistd-safer (Files): Add pipe-safer.c.
143873         * modules/fcntl-safer (Files): Add creat-safer.c.
143875 2005-08-27  Jim Meyering  <jim@meyering.net>
143877         * m4/stdlib-safer.m4: New file.  From coreutils.
143878         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
143879         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
143880         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
143881         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
143882         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
143884 2005-08-27  Jim Meyering  <jim@meyering.net>
143886         * lib/fopen-safer.c: Merge minor changes from coreutils.
143887         * lib/dup-safer.c: Likewise.
143888         * lib/fd-safer.c: Likewise.
143890         Merge from coreutils.
143891         * lib/stdio--.h: New file.
143892         * lib/stdlib--.h: New file.
143893         * lib/mkstemp-safer.c: New file.
143895         GNU tar needs these.
143896         * lib/pipe-safer.c: New file.
143897         * lib/creat-safer.c: New file.
143898         * lib/fcntl--.h (creat): Define to creat_safer.
143899         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
143900         * lib/unistd--.h (pipe): Define to pipe_safer.
143901         * lib/unistd-safer.h: Declare pipe_safer.
143903 2005-08-26  Simon Josefsson  <jas@extundo.com>
143905         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
143906         Haible <bruno@clisp.org>.
143908 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
143910         * lib/regex_internal.h: Remove all references to
143911         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
143912         or better.
143913         (bitset_not, bitset_merge, bitset_not_merge):
143914         (bitset_mask, re_string_allocate, re_string_construct):
143915         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
143916         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
143917         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
143918         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
143919         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
143920         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
143921         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
143922         (re_acquire_state_context):
143923         Remove unnecessary forward decls.
143924         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
143925         Put __attribute at function definition,
143926         now that the function decl has been removed.
143927         * lib/regex_internal.c (re_string_peek_byte_case):
143928         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
143929         Likewise.
143931 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
143933         * m4/regex.m4: Add AC_PREREQ(2.50).
143934         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
143936 2005-08-25  Simon Josefsson  <jas@extundo.com>
143938         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
143939         __fsetlocking.
143941 2005-08-25  Simon Josefsson  <jas@extundo.com>
143943         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
143944         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
143945         GLIBC specific code.
143947 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
143949         Make regex safe for g++.  This fixes one real bug (an "err"
143950         that should have been "*err").  g++ problem reported by
143951         Sam Steingold.
143952         * lib/regex_internal.h (re_calloc): New macro, consistent with
143953         re_malloc etc.  All callers of calloc changed to use re_calloc.
143954         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
143955         not int.  All callers changed.
143956         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
143957         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
143958         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
143959         (find_recover_state): Change "err" to "*err"; this fixes what
143960         appears to be a real bug.
143961         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
143962         versus int.
143964 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
143966         * modules/regex (Depends-on): Add malloc, since the code
143967         assumes that !malloc(0) means failure.
143969 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
143971         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
143973         alloca modernization/simplification for regex.
143974         * lib/regex.c: Remove portability cruft for alloca.  This no longer
143975         needs to be at the start of the file, and can be moved into
143976         regex_internal.h and simplified.
143977         * lib/regex_internal.h: Include <alloca.h>.
143978         (__libc_use_alloca) [!defined _LIBC]: New macro.
143979         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
143980         now works outside glibc.
143982 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
143984         * config/srclist.txt: Add glibc bugs 1241, 1245.
143986 2005-08-25  Jim Meyering  <jim@meyering.net>
143988         * lib/open-safer.c: Include <config.h>.
143989         Otherwise, we'd lose LARGEFILE support in any file using
143990         e.g. "fcntl--.h"
143992 2005-08-25  Bruno Haible  <bruno@clisp.org>
143994         * m4/minmax.m4: Require autoconf 2.52.
143995         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
143996         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
143997         alternatives of translit over the alphabet.
143998         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
144000 2005-08-24  Simon Josefsson  <jas@extundo.com>
144002         * tests/test-getpass.c: New file.
144004 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
144006         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
144007         for GNU regex features.
144009 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
144011         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
144012         * lib/regex.h (regerror): Likewise.
144014         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
144015         requires this.  (The code never needed it.)
144017         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
144018         All uses of recently-renamed identifiers changed to use the new,
144019         POSIX-compliant names.  The code will build and run just fine
144020         without these changes, but it's better to eat our own dog food
144021         and use the standard-conforming names.
144023         * lib/regex.h: Fix a multitude of POSIX name space violations.
144024         These changes have an effect only for programs that define
144025         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
144026         do not change anything for programs compiled in the normal way.
144027         Also, there is no effect on the ABI.
144029         (_REGEX_SOURCE): New macro.
144030         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
144031         defined and _GNU_SOURCE is not; this fixes a name space violation.
144033         Rename the following macros to obey POSIX requirements.
144034         The old names are still visible as macros if _REGEX_SOURCE is defined.
144035         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
144036         RE_BACKSLASH_ESCAPE_IN_LISTS.
144037         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
144038         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
144039         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
144040         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
144041         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
144042         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
144043         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
144044         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
144045         (REG_INTERVALS): renamed from RE_INTERVALS.
144046         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
144047         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
144048         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
144049         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
144050         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
144051         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
144052         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
144053         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
144054         RE_UNMATCHED_RIGHT_PAREN_ORD.
144055         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
144056         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
144057         (REG_DEBUG): renamed from RE_DEBUG.
144058         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
144059         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
144060         unusual, since we can't clash with the POSIX REG_ICASE.
144061         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
144062         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
144063         (REG_NO_SUB): renamed from RE_NO_SUB.
144064         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
144065         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
144066         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
144067         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
144068         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
144069         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
144070         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
144071         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
144072         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
144073         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
144074         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
144075         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
144076         RE_SYNTAX_POSIX_MINIMAL_BASIC.
144077         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
144078         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
144079         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
144080         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
144081         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
144082         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
144083         (REG_FIXED): Renamed from REGS_FIXED.
144084         (REG_NREGS): Renamed from RE_NREGS.
144086         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
144087         of other REG_* macros, since POSIX says the user is allowed to
144088         #undef these macros selectively.
144090         (reg_errcode_t): Update comment stating what other tables need
144091         to be consistent.
144093         Rename the following enum values to obey POSIX requirements.
144094         The old names are still visible as macros.
144095         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
144096         is not defined, since GNU is supposed to be a superset of POSIX as
144097         much as possible, and since we want reg_errcode_t to be a signed
144098         type for implementation consistency.
144099         (_REG_NOERROR): Renamed from REG_NOERROR.
144100         (_REG_NOMATCH): Renamed from REG_NOMATCH.
144101         (_REG_BADPAT): Renamed from REG_BADPAT.
144102         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
144103         (_REG_ECTYPE): Renamed from REG_ECTYPE.
144104         (_REG_EESCAPE): Renamed from REG_EESCAPE.
144105         (_REG_ESUBREG): Renamed from REG_ESUBREG.
144106         (_REG_EBRACK): Renamed from REG_EBRACK.
144107         (_REG_EPAREN): Renamed from REG_EPAREN.
144108         (_REG_EBRACE): Renamed from REG_EBRACE.
144109         (_REG_BADBR): Renamed from REG_BADBR.
144110         (_REG_ERANGE): Renamed from REG_ERANGE.
144111         (_REG_ESPACE): Renamed from REG_ESPACE.
144112         (_REG_BADRPT): Renamed from REG_BADRPT.
144113         (_REG_EEND): Renamed from REG_EEND.
144114         (_REG_ESIZE): Renamed from REG_ESIZE.
144115         (_REG_ERPAREN): Renamed from REG_ERPAREN.
144116         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
144117         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
144118         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
144119         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
144121         (_REG_RE_NAME, _REG_RM_NAME): New macros.
144122         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
144123         changed.  But support the old name if the new one is not defined
144124         and if _REGEX_SOURCE.
144126         Change the following member names in struct re_pattern_buffer.
144127         The old names are still supported if !_REGEX_SOURCE.
144128         The new names are always supported, regardless of _REGEX_SOURCE.
144129         (re_buffer): Renamed from buffer.
144130         (re_allocated): Renamed from allocated.
144131         (re_used): Renamed from used.
144132         (re_syntax): Renamed from syntax.
144133         (re_fastmap): Renamed from fastmap.
144134         (re_translate): Renamed from translate.
144135         (re_can_be_null): Renamed from can_be_null.
144136         (re_regs_allocated): Renamed from regs_allocated.
144137         (re_fastmap_accurate): Renamed from fastmap_accurate.
144138         (re_no_sub): Renamed from no_sub.
144139         (re_not_bol): Renamed from not_bol.
144140         (re_not_eol): Renamed from not_eol.
144141         (re_newline_anchor): Renamed from newline_anchor.
144143         Change the following member names in struct re_registers.
144144         The old names are still supported if !_REGEX_SOURCE.
144145         The new names are always supported, regardless of _REGEX_SOURCE.
144146         (rm_num_regs): Renamed from num_regs.
144147         (rm_start): Renamed from start.
144148         (rm_end): Renamed from end.
144150         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
144151         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
144152         Prepend __ to parameter names.
144154         Undo yesterday's changes.
144156 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
144158         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
144159         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
144160         lib/regex.c.
144162 2005-08-24  Jim Meyering  <jim@meyering.net>
144164         Sync from coreutils.
144165         * m4/fcntl-safer.m4: New file.
144167         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
144168         and object files for this module.
144170 2005-08-24  Jim Meyering  <jim@meyering.net>
144172         Sync from coreutils.
144173         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
144175 2005-08-24  Jim Meyering  <jim@meyering.net>
144177         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
144178         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
144180 2005-08-24  Jim Meyering  <jim@meyering.net>
144182         * modules/fcntl-safer: New module.
144183         * modules/fts (Depends-on): Add fcntl-safer.
144184         * MODULES.html.sh (File descriptor based Input/Output):
144185         Add fcntl-safer.
144187 2005-08-24  Bruno Haible  <bruno@clisp.org>
144189         Support for unit test modules.
144190         * modules/README: Mention tests modules.
144191         * modules/TEMPLATE-TESTS: New file.
144192         * gnulib-tool: New options --extract-tests-module, --with-tests and
144193         --tests-base (unused for the moment).
144194         (testsbase, inctests): New variables.
144195         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
144196         (func_verify_module): Exclude TEMPLATE-TESTS.
144197         (func_verify_nontests_module, func_verify_tests_module): New functions.
144198         (func_get_dependencies): Add implicit dependency for tests modules.
144199         (func_get_tests_module): New function.
144200         (func_modules_transitive_closure): When --with-tests was specified,
144201         include the unit tests as well, unless explicitly avoided.
144202         (func_emit_lib_Makefile_am): Ignore the tests modules here.
144203         (func_emit_tests_Makefile_am): New function.
144204         (func_create_testdir): When --with-tests was specified, emit a
144205         tests/ directory.
144206         * MODULES.html.sh (Future developments): Update.
144208 2005-08-24  Bruno Haible  <bruno@clisp.org>
144210         * modules/tls-tests: New file.
144211         * tests/test-tls.c: New file, from GNU gettext.
144213 2005-08-24  Bruno Haible  <bruno@clisp.org>
144215         * modules/lock-tests: New file.
144216         * tests/test-lock.c: New file, from GNU gettext.
144218 2005-08-24  Bruno Haible  <bruno@clisp.org>
144220         * lib/lock.h: Add multiple inclusion guard.
144221         * lib/tls.h: Add multiple inclusion guard.
144223 2005-08-24  Bruno Haible  <bruno@clisp.org>
144225         * gnulib-tool: Add support for the --aux-dir option to
144226         --create-testdir, --create-megatestdir, --test, --megatest.
144227         (func_create_testdir, func_create_megatestdir): Optionally emit a
144228         AC_CONFIG_AUX_DIR directive.
144229         (create-testdir, create-megatestdir, test, megatest): Provide a
144230         default value for $auxdir.
144232 2005-08-24  Bruno Haible  <bruno@clisp.org>
144234         * gnulib-tool (import): Use compound statement instead of subshell
144235         where possible.
144237 2005-08-24  Bruno Haible  <bruno@clisp.org>
144239         * gnulib-tool (import): Change --aux-dir default to "build-aux".
144241 2005-08-24  Bruno Haible  <bruno@clisp.org>
144243         * gnulib-tool (func_version): Update.
144245 2005-08-24  Bruno Haible  <bruno@clisp.org>
144247         * gnulib-tool (func_import, func_create_testdir,
144248         func_create_megatestdir): Quote all autoconf macro arguments.
144250 2005-08-24  Bruno Haible  <bruno@clisp.org>
144252         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
144253         option --force, because --force causes the aclocal.m4 of each
144254         subdirectory to be newer than the corresponding config.h.in.
144256 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
144258         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
144259         All contents moved to gl_REGEX.
144260         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
144261         assume that it does.
144263 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
144265         * lib/regex.h (REG_NOSYS)
144266         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
144267         Define, since POSIX requires it as of 2001.
144268         (_REG_ENOSYS)
144269         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
144270         New private symbol, used to keep the enum signed in all cases.
144271         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
144272         Youngman in
144273         <http://lists.gnu.org/r/bug-gnulib/2005-07/msg00132.html>.
144275         * lib/regex_internal.c (re_string_skip_chars, register_state):
144276         (calc_state_hash):
144277         Remove forward decls; no longer needed now that we use prototypes.
144278         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
144279         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
144280         (clean_state_log_if_needed): Likewise.
144282 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
144284         * config/srclist.txt: Add glibc bugs 1231-1233.
144286 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
144288         Fix problems reported by Sam Steingold in
144289         <http://lists.gnu.org/r/bug-gnulib/2005-08/msg00007.html>.
144290         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
144291         assumed that reg_errcode_t is a signed type, which is not
144292         necessarily true if _XOPEN_SOURCE is not defined.
144293         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
144294         since some compilers warn about it otherwise.
144296 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
144298         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
144299         (init_word_char, create_initial_state, duplicate_node_closure):
144300         (fetch_token, peek_token_bracket, build_range_exp):
144301         (build_collating_symbol): Remove forward decls; no longer needed
144302         now that we use prototypes.
144304         * lib/regcomp.c:
144305         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
144306         (re_compile_fastmap_iter, regcomp, regerror, regfree):
144307         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
144308         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
144309         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
144310         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
144311         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
144312         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
144313         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
144314         (build_range_exp, build_collating_symbol, parse_bracket_exp):
144315         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
144316         (build_charclass, build_charclass_op, fetch_number, create_tree):
144317         (create_token_tree, mark_opt_subexp, duplicate_tree):
144318         Use prototypes rather than old-style definitions.
144320         * lib/regex_internal.c:
144321         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
144322         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
144323         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
144324         (re_string_reconstruct, re_string_peek_byte_case):
144325         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
144326         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
144327         (re_node_set_init_copy, re_node_set_add_intersect):
144328         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
144329         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
144330         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
144331         (re_acquire_state, re_acquire_state_context, register_state):
144332         (create_ci_newstate, create_cd_newstate, free_state):
144333         Likewise.
144334         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
144335         re_search_2):
144336         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
144337         (re_search_internal, prune_impossible_nodes):
144338         (acquire_init_state_context, check_matching, static):
144339         (check_halt_node_context, check_halt_state_context, proceed_next_node):
144340         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
144341         (update_regs, sift_states_backward, build_sifted_states):
144342         (clean_state_log_if_needed, merge_state_array):
144343         (update_cur_sifted_state, add_epsilon_src_nodes):
144344         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
144345         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
144346         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
144347         (find_recover_state, check_subexp_matching_top, transit_state_mb):
144348         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
144349         (check_arrival, check_arrival_add_next_nodes):
144350         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
144351         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
144352         (check_node_accept_bytes, check_node_accept, extend_buffers):
144353         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
144354         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
144355         (sift_ctx_init):
144356         Likewise.
144358         * lib/regex_internal.h:
144359         (re_string_allocate, re_string_construct, re_string_reconstruct):
144360         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
144361         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
144362         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
144363         (re_string_context_at, re_string_peek_byte_case):
144364         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
144365         is defined, since we now use prototypes always.
144367         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
144368         C89 or better.  All uses removed.
144370 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
144372         * config/srclist.txt: Add glibc bugs 1220-1227.
144374 2005-08-20  Jim Meyering  <jim@meyering.net>
144376         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
144377         of unused local, dfa.
144379 2005-08-20  Bruno Haible  <bruno@clisp.org>
144381         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
144383 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
144385         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
144386         (re_node_set_insert_last, re_dfa_add_node):
144387         Rename local variables to avoid GCC shadowing warnings.
144389 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
144391         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
144392         [defined lint]: Suppress bogus uninitialized-variable warnings.
144394         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
144395         and let the caller return REG_ESPACE if out of space.  This
144396         removes an uninitialied-variable warning with GCC 4.0.1, and also
144397         avoids taking the address of a local variable.  All callers
144398         changed.
144400 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
144402         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
144403         $LIBCSRC/posix/regexec.c.
144404         Add glibc bug 1217 for regcomp.c.
144406 2005-08-19  Jim Meyering  <jim@meyering.net>
144408         * lib/regexec.c (proceed_next_node): Redo local variables to
144409         avoid GCC shadowing warnings.
144411 2005-08-18  Bruno Haible  <bruno@clisp.org>
144413         * lib/strstr.c (strstr): Fix return value in multibyte case.
144414         * lib/strcasestr.c (strcasestr): Likewise.
144416 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
144418         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
144420 2005-08-17  Jim Meyering  <jim@meyering.net>
144422         Make the %s format (seconds since the epoch) work for a negative
144423         number and when used with a zero-padded field width, e.g. %015s.
144425         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
144426         label so that it precedes the code to set `digits'.  Otherwise,
144427         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
144428         print `00-22'.  Now, it prints `-0022', as it should.
144430 2005-08-17  Bruno Haible  <bruno@clisp.org>
144432         * modules/strstr (Files): Add m4/mbrtowc.m4.
144433         (Depends-on): Add mbuiter.
144435 2005-08-17  Bruno Haible  <bruno@clisp.org>
144437         * modules/strcasestr: New file.
144438         * MODULES.html.sh (String handling, based on ANSI C 89): Add
144439         strcasestr.
144441 2005-08-17  Bruno Haible  <bruno@clisp.org>
144443         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
144445 2005-08-17  Bruno Haible  <bruno@clisp.org>
144447         * modules/mbuiter: New file.
144448         * MODULES.html.sh (Extended multibyte and wide character utilities):
144449         Add mbuiter.
144451 2005-08-17  Bruno Haible  <bruno@clisp.org>
144453         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
144454         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
144456 2005-08-17  Bruno Haible  <bruno@clisp.org>
144458         * m4/strcasestr.m4: New file.
144460 2005-08-17  Bruno Haible  <bruno@clisp.org>
144462         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
144463         * lib/strstr.c: Completely rewritten, with multibyte locale support.
144465 2005-08-17  Bruno Haible  <bruno@clisp.org>
144467         * lib/strcasestr.h: New file.
144468         * lib/strcasestr.c: New file.
144470 2005-08-17  Bruno Haible  <bruno@clisp.org>
144472         * lib/strcasecmp.c: Use mbuiter.h.
144474 2005-08-17  Bruno Haible  <bruno@clisp.org>
144476         * lib/mbuiter.h: New file.
144478 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
144480         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
144481         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
144482         and gl_GETOPT are both invoked via different paths (as happens
144483         with GNU tar CVS because it uses both argp and getopt), the former
144484         wins.
144486 2005-08-16  Bruno Haible  <bruno@clisp.org>
144488         * modules/tls: New file.
144489         * MODULES.html.sh (Multithreading): Add tls.
144491 2005-08-16  Bruno Haible  <bruno@clisp.org>
144493         * modules/strnlen1: New file.
144494         * MODULES.html.sh (String handling): Add strnlen1.
144496 2005-08-16  Bruno Haible  <bruno@clisp.org>
144498         * modules/strcase (Files): Add m4/mbrtowc.m4.
144499         (Depends-on): Add strnlen1, mbchar.
144501 2005-08-16  Bruno Haible  <bruno@clisp.org>
144503         * modules/mbiter: New file.
144504         * MODULES.html.sh (Extended multibyte and wide character utilities):
144505         Add mbiter.
144507 2005-08-16  Bruno Haible  <bruno@clisp.org>
144509         * modules/mbfile: New file.
144510         * MODULES.html.sh (Extended multibyte and wide character utilities):
144511         Add mbfile.
144513 2005-08-16  Bruno Haible  <bruno@clisp.org>
144515         * modules/mbchar: New file.
144516         * MODULES.html.sh (Extended multibyte and wide character utilities):
144517         New section.
144519 2005-08-16  Bruno Haible  <bruno@clisp.org>
144521         * m4/tls.m4: New file, from GNU gettext.
144523 2005-08-16  Bruno Haible  <bruno@clisp.org>
144525         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
144526         always.
144527         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
144529 2005-08-16  Bruno Haible  <bruno@clisp.org>
144531         * m4/mbiter.m4: New file.
144533 2005-08-16  Bruno Haible  <bruno@clisp.org>
144535         * m4/mbfile.m4: New file.
144537 2005-08-16  Bruno Haible  <bruno@clisp.org>
144539         * m4/mbchar.m4: New file.
144541 2005-08-16  Bruno Haible  <bruno@clisp.org>
144543         * lib/tls.h: New file, from GNU gettext.
144544         * lib/tls.c: New file, from GNU gettext.
144546 2005-08-16  Bruno Haible  <bruno@clisp.org>
144548         * lib/strnlen1.h: New file.
144549         * lib/strnlen1.c: New file.
144551 2005-08-16  Bruno Haible  <bruno@clisp.org>
144553         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
144554         (mbi_init): Update.
144555         (mbi_avail, mbi_advance): Let the iteration end before the terminating
144556         NUL byte, not after it.
144558 2005-08-16  Bruno Haible  <bruno@clisp.org>
144560         * lib/strcase.h (strcasecmp): Add note in comments.
144561         * lib/strncasecmp.c: Use code from strcasecmp.c.
144562         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
144563         (strcasecmp): Work correctly in multibyte locales.
144565 2005-08-16  Bruno Haible  <bruno@clisp.org>
144567         * lib/mbiter.h: New file.
144569 2005-08-16  Bruno Haible  <bruno@clisp.org>
144571         * lib/mbfile.h: New file.
144573 2005-08-16  Bruno Haible  <bruno@clisp.org>
144575         * lib/mbchar.h: New file.
144576         * lib/mbchar.c: New file.
144578 2005-08-16  Bruno Haible  <bruno@clisp.org>
144580         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
144581         the valid ones. Makes the comparison operations transitive:
144582         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
144583         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
144585 2005-08-15  Simon Josefsson  <jas@extundo.com>
144587         * modules/ssize_t (License): Change to 'unlimited'.
144589         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
144591 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
144593         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
144594         Add comments for each pending glibc patch.
144596 2005-08-15  Bruno Haible  <bruno@clisp.org>
144598         * lib/regex.h (__restrict_arr): Don't define to __restrict if
144599         __cplusplus is defined.
144601 2005-08-14  Jim Meyering  <jim@meyering.net>
144603         Sync from coreutils.
144605         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
144606         Use the hash-table-based cycle-detection code not just when
144607         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
144608         Reported by James Youngman in
144609         <http://lists.gnu.org/r/bug-gnulib/2005-08/msg00011.html>.
144610         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
144611         FTS_TIGHT_CYCLE_CHECK.
144612         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
144613         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
144614         once again.
144615         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
144616         * lib/fts.c (fd_safer): Remove decl.
144617         Include fcntl--.h rather than unistd-safer.h
144618         (fts_safe_changedir): Don't call fd_safer; no longer needed
144619         now that we include fcntl--.h.
144621 2005-08-12  Simon Josefsson  <jas@extundo.com>
144623         * modules/getndelim2: Use ssize_t module.
144624         * modules/getnline: Likewise.
144625         * modules/safe-read: Likewise.
144626         * modules/xreadlink: Likewise.
144628         * modules/ssize_t: New file.
144630 2005-08-12  Simon Josefsson  <jas@extundo.com>
144632         * m4/readline.m4: Look for termcap, curses or ncurses if required.
144634 2005-08-12  Simon Josefsson  <jas@extundo.com>
144636         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
144637         ssize_t.
144639 2005-08-12  Simon Josefsson  <jas@extundo.com>
144641         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
144642         readline, getdelim and check_version.
144643         (Support for systems lacking ISO C 99: Sizes of integer types):
144644         Add size_max.
144646 2005-08-12  Bruno Haible  <bruno@clisp.org>
144648         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
144650 2005-08-11  Simon Josefsson  <jas@extundo.com>
144652         * modules/readline: New file.
144654         * modules/strnlen (Files): Add strnlen.h.
144656 2005-08-11  Simon Josefsson  <jas@extundo.com>
144658         * m4/readline.m4: New file.
144660 2005-08-11  Simon Josefsson  <jas@extundo.com>
144662         * lib/readline.h, readline.c: New file.
144664 2005-08-11  Simon Josefsson  <jas@extundo.com>
144666         * doc/gnulib.texi (Initial import, Finishing touches): Mention
144667         gl_AVOID.
144669 2005-08-11  Bruno Haible  <bruno@clisp.org>
144671         * lib/strnlen.h (strnlen): Change parameter name to match comment.
144673 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
144675         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
144677 2005-08-10  Simon Josefsson  <jas@extundo.com>
144679         * tests/test-iconvme.c: New file.
144681 2005-08-10  Simon Josefsson  <jas@extundo.com>
144683         * m4/strnlen.m4: New file.
144685         * m4/strndup.m4: Don't check for strnlen declaration, done in
144686         strnlen.m4.
144688 2005-08-10  Simon Josefsson  <jas@extundo.com>
144690         * lib/strndup.c: Use strnlen.h.
144692         * lib/strnlen.h: New file.
144694 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
144696         * README: Typos.
144698 2005-08-02  Simon Josefsson  <jas@extundo.com>
144700         * modules/readline: New file.
144702 2005-08-02  Simon Josefsson  <jas@extundo.com>
144704         * modules/getdelim: New file.
144706         * modules/getline: Rewrite, don't use getndelim2.
144708 2005-08-02  Simon Josefsson  <jas@extundo.com>
144710         * m4/getline.m4: Separate out getdelim stuff into separate module.
144712         * m4/getdelim.m4: New file.
144714 2005-08-02  Simon Josefsson  <jas@extundo.com>
144716         * lib/getline.h, getline.c: Rewrite.
144718         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
144720 2005-07-31  Bruno Haible  <bruno@clisp.org>
144722         * lib/lock.h (gl_lock_initializer): New macro.
144723         (gl_lock_define_initialized): Use it.
144724         (gl_rwlock_initializer): New macro.
144725         (gl_rwlock_define_initialized): Use it.
144726         (gl_recursive_lock_initializer): New macro.
144727         (gl_recursive_lock_define_initialized): Use it.
144729 2005-07-30  Karl Berry  <karl@gnu.org>
144731         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
144732         Report from Ben Pfaff, regarding getopt.
144734 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
144736         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
144737         normal way.
144738         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
144739         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
144740         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
144741         (gl_GETOPT): Use the new macros.  Most of the implementation
144742         is moved to the new macros.  This is for programs like Emacs
144743         that don't want all the functionality of gl_GETOPT.
144745 2005-07-26  Bruno Haible  <bruno@clisp.org>
144747         * m4/lock.m4: Update from GNU gettext.
144749 2005-07-26  Bruno Haible  <bruno@clisp.org>
144751         * lib/lock.h: Update from GNU gettext.
144752         * lib/lock.c: Update from GNU gettext.
144754 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
144756         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
144757         obsolescent AC_TRY_RUN.  Include the default includes files, for
144758         'exit'.
144760 2005-07-24  Bruno Haible  <bruno@clisp.org>
144762         * modules/visibility: New file.
144763         * MODULES.html.sh (Misc): Add visibility.
144765 2005-07-24  Bruno Haible  <bruno@clisp.org>
144767         * m4/visibility.m4: New file.
144769 2005-07-24  Bruno Haible  <bruno@clisp.org>
144771         * doc/visibility.texi: New file.
144773 2005-07-22  Bruno Haible  <bruno@clisp.org>
144775         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
144776         $(ALLOCA_H), redundant through BUILT_SOURCES.
144777         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
144778         redundant through BUILT_SOURCES.
144779         * modules/byteswap (Makefile.am): Remove explicit dependency on
144780         $(BYTESWAP_H), redundant through BUILT_SOURCES.
144781         * modules/fnmatch (Makefile.am): Remove explicit dependency on
144782         $(FNMATCH_H), redundant through BUILT_SOURCES.
144783         * modules/getopt (Makefile.am): Remove explicit dependency on
144784         $(GETOPT_H), redundant through BUILT_SOURCES.
144785         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
144786         redundant through BUILT_SOURCES.
144787         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
144788         redundant through BUILT_SOURCES.
144789         * modules/stdbool (Makefile.am): Remove explicit dependency on
144790         $(STDBOOL_H), redundant through BUILT_SOURCES.
144791         * modules/stdint (Makefile.am): Remove explicit dependency on
144792         $(STDINT_H), redundant through BUILT_SOURCES.
144793         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
144794         Remove explicit dependency on $(SYSEXITS_H).
144795         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
144797 2005-07-18  Simon Josefsson  <jas@extundo.com>
144799         * lib/check-version.c (check_version): Accept identical versions too.
144801 2005-07-18  Bruno Haible  <bruno@clisp.org>
144803         * modules/lock: New file.
144804         * MODULES.html.sh (Multithreading): New section.
144806 2005-07-18  Bruno Haible  <bruno@clisp.org>
144808         * m4/lock.m4: New file, from GNU gettext.
144810 2005-07-18  Bruno Haible  <bruno@clisp.org>
144812         * lib/lock.h: New file, from GNU gettext.
144813         * lib/lock.c: New file, from GNU gettext.
144815 2005-07-18  Bruno Haible  <bruno@clisp.org>
144817         * lib/lock.h (gl_once_t): New type.
144818         (gl_once_define, gl_once): New macros.
144819         * lib/lock.c (fresh_once): New variable.
144820         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
144821         functions.
144823 2005-07-16  Simon Josefsson  <jas@extundo.com>
144825         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
144826         workaround, suggested by Bruno.
144828 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
144830         * modules/xalloc (Depends-on): Add xalloc-die.
144831         * modules/xvasprintf (Depends-on): Add xalloc-die.
144833 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
144835         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
144836         with a minor change.
144838 2005-07-15  Bruno Haible  <bruno@clisp.org>
144840         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
144841         When using lib/poll.c, define poll as rpl_poll.
144843 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
144845         * modules/argp (Depends-on): Remove unlocked-io.
144847 2005-07-14  Derek Price  <derek@ximbiot.com>
144849         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
144850         for glob symlink bug.
144852 2005-07-14  Bruno Haible  <bruno@clisp.org>
144854         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
144855         Instead, test for *_unlocked function declarations directly.
144857 2005-07-11  Simon Josefsson  <jas@extundo.com>
144859         * modules/size_max: New file.
144861         * modules/xsize: Depend on size_max module for size_max.m4.
144863 2005-07-11  Simon Josefsson  <jas@extundo.com>
144865         * lib/size_max.h: New file.
144867 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
144869         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
144870         copyright symbol and the year.
144871         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
144872         (version_etc_va): Use parameterized copyright notice.
144873         Reword to conform to the current GNU coding standards.
144875 2005-07-11  Karl Berry  <karl@gnu.org>
144877         * doc/gnulib.texi (Quoting): new node.
144878         (Initial import): more info, from Patrice.
144880 2005-07-11  Bruno Haible  <bruno@clisp.org>
144882         * gnulib-tool (func_usage): Document option --avoid.
144883         (Command line options): Handle --avoid.
144884         (func_acceptable): New function.
144885         (func_modules_transitive_closure): Use it.
144887 2005-07-11  Bruno Haible  <bruno@clisp.org>
144889         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
144890         Reported by Jim Meyering.
144892 2005-07-10  Bruno Haible  <bruno@clisp.org>
144894         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
144895         Needed when size_t is smaller than 'unsigned int'.
144896         Reported by Paul Eggert.
144898 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
144900         * modules/argp (Depends-on): Add unlocked-io
144902 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
144904         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
144905         block of defines.
144907 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
144909         * config/srclist.txt: Comment out regcomp.c, since we have a porting
144910         fix now.
144912 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
144913         and Paul Eggert  <eggert@cs.ucla.edu>
144915         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
144916         in wint_t, not wchar_t.  Remove now-unnecessary cast.
144918 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
144920         * modules/regex (Files): Add lib/regex_internal.c,
144921         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
144922         (Depends-on): Add extensions.
144923         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
144925 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
144927         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
144928         pathconf.
144929         * m4/same.m4 (gl_SAME): Likewise.
144930         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
144932         * m4/regex.m4: Adjust to new libc regex implementation.
144933         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
144934         all the .c and .h parts of (the new) regex.
144935         Quote the m4 stuff better.
144936         Check for RE_ICASE bug of old gnulib.
144937         Check for REG_STARTEND of recent libc.
144938         Rename local variables from jm_* to gl_*.
144939         Quote operand of "test -f".
144940         Say "recent enough" version of libc, not "version 2".
144941         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
144942         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
144943         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
144944         Remove check for btowc, isascii.
144945         Require AM_LANGINFO_CODESET.
144947 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
144949         * lib/regex.c, regex.h: Sync from libc.
144950         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
144951         * lib/regexec.c:
144952         New files, synced from libc, except that regex_internal.h
144953         currently has a small porting fix.
144955 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
144957         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
144958         regex_internal.c, regexec.c.
144959         Add regex_internal.h too, but as a comment, since the libc version
144960         is currently broken in gnulib mode.
144962 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
144964         Support programs like Emacs that use gnulib but not gettext.
144965         * MODULES.html.sh (Internationalization functions): Add gettext-h.
144966         * modules/gettext-h: New file.
144967         * modules/gettext (Files): Remove lib/gettext.h.
144968         (Depends-on): Add gettext-h.
144969         (Makefile.am): Remove lib_SOURCES.
144970         * modules/argmatch, modules/c-stack, modules/closeout:
144971         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
144972         * modules/execute, modules/file-type, modules/getaddrinfo:
144973         * modules/getopt, modules/human, modules/javacomp:
144974         * modules/javaexec, modules/mkdir-p, modules/obstack:
144975         * modules/openat, modules/pagealign_alloc, modules/pipe:
144976         * modules/quotearg, modules/regex, modules/rpmatch:
144977         * modules/unicodeio, modules/userspec, modules/version-etc:
144978         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
144979         * modules/xsetenv:
144980         Depend on gettext-h, not gettext.
144982 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
144984         * gnulib-tool (func_import): Add support for 'public domain' license.
144985         * modules/alloca, modules/atexit, modules/memmove:
144986         Now public domain, not GPL.
144987         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
144988         * modules/realloc, modules/strerror, modules/strtod:
144989         Now LGPL, not GPL.
144991 2005-07-05  Bruno Haible  <bruno@clisp.org>
144993         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
144994         autoconf CVS. Needed for mingw.
144996 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
144998         Remove the dependency of the strftime module on the tzset module.
144999         * modules/strftime (Depends-on): Remove dependency on tzset.
145001 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
145003         Remove the dependency of the strftime module on the tzset module.
145004         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
145005         gl_FUNC_TZSET_CLOBBER.
145007 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
145009         Remove the dependency of the strftime module on the tzset module.
145010         * lib/strftime.c (my_strftime)
145011         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
145012         Copy the input structure, to work around some of the bug with
145013         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
145014         Solaris releases, you should also use the tzset module, but we won't
145015         require it as a dependency any more since we don't want LGPLed code
145016         to depend on GPLed code.
145018 2005-07-02  Jim Meyering  <jim@meyering.net>
145020         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
145021         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
145022         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
145023         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
145025 2005-07-02  Jim Meyering  <jim@meyering.net>
145027         * lib/backupfile.c (backup_args): Change a `0' to NULL.
145029 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
145031         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
145032         declares only 'struct timespec;' (!).
145034 2005-07-01  Jim Meyering  <jim@meyering.net>
145036         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
145037         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
145038         * lib/save-cwd.c, tempname.c:
145039         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
145040         and don't include <sys/file.h>).
145042 2005-06-29  Jim Meyering  <jim@meyering.net>
145044         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
145045         type name.  Use the variable name instead.
145046         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
145047         Likewise.
145049 2005-06-28  Simon Josefsson  <jas@extundo.com>
145051         * modules/check-version (Files): Add check-version.m4.
145053 2005-06-28  Simon Josefsson  <jas@extundo.com>
145055         * m4/check-version.m4: New file, suggested by Jim Meyering
145056         <jim@meyering.net>.
145058 2005-06-28  Simon Josefsson  <jas@extundo.com>
145060         * lib/check-version.h, lib/check-version.c: New files.
145062 2005-06-28  Simon Josefsson  <jas@extundo.com>
145064         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
145065         collision with global variable.  Better indentation.  Don't
145066         increment buffer pointer beyond buffer end.  Based on comments
145067         from Paul Eggert <eggert@cs.ucla.edu>.
145069         * lib/base64.h: Indent.
145071 2005-06-28  Simon Josefsson  <jas@extundo.com>
145073         * doc/gnulib.texi (Library version handling): New section.
145075 2005-06-28  Jim Meyering  <jim@meyering.net>
145077         * check-module (find_included_lib_files): Hard-code another
145078         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
145079         but modules/fts-lgpl (correctly) does not list those files.
145081         * modules/canonicalize (Files): Add lib/pathmax.h.
145083 2005-06-25  Simon Josefsson  <jas@extundo.com>
145085         * modules/check-version: New file.
145087 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
145089         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
145090         initializer of struct addrinfo, as an indication that we don't
145091         care how many members the structure has.
145093 2005-06-24  Derek Price  <derek@ximbiot.com>
145094         and Bruno Haible  <bruno@clisp.org>
145096         Remove stat module & update lstat.
145097         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
145098         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
145099         * m4/stat.m4: Remove this file.
145101 2005-06-24  Derek Price  <derek@ximbiot.com>
145102         and Bruno Haible  <bruno@clisp.org>
145104         Remove stat module & update lstat.
145105         * lib/stat.c: Remove this file...
145106         (slash_aware_lstat): ...moving this content and its support...
145107         * lib/lstat.c (rpl_lstat): ...into here.
145108         * lib/lstat.h: New file.
145110 2005-06-24  Derek Price  <derek@ximbiot.com>
145111         and Bruno Haible  <bruno@clisp.org>
145113         Remove stat module & update lstat.
145114         * config/srclist.txt (libc sources): Remove stat.
145116 2005-06-24  Derek Price  <derek@ximbiot.com>
145117         and Bruno Haible  <bruno@clisp.org>
145119         Remove stat module & update lstat.
145120         * MODULES.html.sh (stat): Remove.
145121         * MODULES.html: Regenerated.
145122         * modules/lstat (Description): Correct function name.
145123         (Files): Add "lstat.h".
145124         (Depends-on): Remove stat, add xalloc, stat-macros.
145125         * modules/stat: Remove this file.
145126         (Include): Add "lstat.h", remove <sys/stat.h>.
145128 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
145130         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
145131         (ranged_convert): Don't save conversion in a temporary struct.
145132         This causes a warning with GCC 4.0.0, and anyway in the typical
145133         case it's not worth the extra 100 bytes or so of code.
145134         (ranged_convert, __mktime_internal): When calling a function via a
145135         pointer P, use P () rather than (*P) (), as we now assume C89 or
145136         better.
145138 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
145140         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
145141         "who -r" failed to give output.  Problem reported by Tim Waugh.
145143         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
145144         (xcalloc): Use it to avoid needless tests.
145145         Problem reported by Jim Meyering.
145147 2005-06-20  Derek Price  <derek@ximbiot.com>
145149         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
145150         unnecessary for Autoconfs > 2.59c.
145152 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
145154         * lib/argp.h (__option_is_short): Check upper limit of
145155         __key. Isprint() requires its argument to have the value
145156         of an unsigned char or EOF.
145158 2005-06-16  Jim Meyering  <jim@meyering.net>
145160         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
145161         when either N or S is zero.
145163 2005-06-16  Derek Price  <derek@ximbiot.com>
145165         * m4/bison.m4: Declare YACC & YFLAGS precious.
145167 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
145169         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
145170         multibyte string or pattern, fall back on unibyte matching.
145171         Problem reported by James Youngman.
145173 2005-06-08  Bruno Haible  <bruno@clisp.org>
145175         * modules/csharpcomp: New file.
145176         * MODULES.html.sh (C#): Add csharpcomp.
145178 2005-06-08  Bruno Haible  <bruno@clisp.org>
145180         * m4/csharpcomp.m4: New file, from GNU gettext.
145182 2005-06-08  Bruno Haible  <bruno@clisp.org>
145184         * lib/csharpcomp.h: New file, from GNU gettext.
145185         * lib/csharpcomp.c: New file, from GNU gettext.
145186         * lib/csharpcomp.sh.in: New file, from GNU gettext.
145188 2005-06-08  Bruno Haible  <bruno@clisp.org>
145190         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
145191         warning on mingw.
145193 2005-06-07  Derek Price  <derek@ximbiot.com>
145195         Sync from CVS.
145196         * lib/glob_.h: Indent nested #ifdef.
145198 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
145200         Sync from coreutils.
145201         Use "file name" when talking about file names, instead of "filename"
145202         or "path", as per the GNU coding standards.
145203         * lib/mkdir-p.c: Renamed from makepath.c.
145204         (make_dir_parents): Renamed from make_path.  All callers changed.
145205         * lib/mkdir-p.h: Likewise.  All includers changed.
145206         * lib/filenamecat.c: Renamed from path-concat.c.
145207         (file_name_concat): Renamed from path_concat.  All callers changed.
145208         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
145209         * lib/filenamecat.h: Likewise.  All includers changed.
145210         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
145211         in comments or local variable names.
145212         * lib/basename.c: Likewise.
145213         * lib/canonicalize.c, canonicalize.h: Likewise.
145214         * lib/dirname.c, dirname.h: Likewise.
145215         * lib/euidaccess.c: Likewise.
145216         * lib/exclude.c: Likewise
145217         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
145218         * lib/fsusage.c, fsuage.h: Likewise.
145219         * lib/fts.c, fts_.h: Likewise.
145220         * lib/getcwd.c: Likewise.
145221         * lib/getloadavg.c: Likewise.
145222         * lib/mkstemp.c: Likewise.
145223         * lib/mountlist.c, mountlist.h: Likewise.
145224         * lib/openat.c, openat.h: Likewise.
145225         * lib/readlink-stub.c: Likewise.
145226         * lib/readutmp.c, readutmp.h: Likewise.
145227         * lib/rename.c: Likewise.
145228         * lib/rmdir.c: Likewise.
145229         * lib/same.c: Likewise.
145230         * lib/savedir.c: Likewise.
145231         * lib/stripslash.c: Likewise.
145232         * lib/tempname.c: Likewise.
145233         * lib/xreadlink.c: Likewise.
145234         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
145235         All uses changed.
145236         * lib/exclude.h: Likewise.
145238         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
145239         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
145240         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
145241         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
145242         * lib/pathmax.h: Include <limits.h> unconditionally, since other
145243         files have been getting away with it for years (MORE/BSD 4.3
145244         is extinct now).
145245         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
145246         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
145248         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
145249         Define to 256, not 255, as per modern POSIX.
145251 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
145253         Sync from coreutils.
145254         Use "file name" when talking about file names, instead of "filename"
145255         or "path", as per the GNU coding standards.
145256         * MODULES.html.sh: mkdir-p renamed from makepath.
145257         filenamecat renamed from path-concat.
145258         * modules/filenamecat: Renamed from modules/path-concat.
145259         (Files): filenamecat.h and filenamecat.c renamed from
145260         path-concat.h and path-concat.c.
145261         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
145262         (Include): filenamecat.h, not path-concat.h.
145263         * modules/mkdir-p: Renamed from modules/makepath.
145264         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
145265         makepath.c.
145266         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
145267         (Include): mkdir-p.h, not makepath.h.
145269 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
145271         Sync from coreutils.
145272         * m4/mkdir-p.m4: Renamed from makepath.m4.
145273         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
145274         Rename files from makepath.c to mkdir-p.c, and from
145275         makepath.h to mkdir-p.h.
145276         * m4/filenamecat.m4: Renamed from path-concat.m4.
145277         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
145278         Rename files from path-concat.c to filenamecat.c,
145279         and from path-concat.h to filenamecat.h.
145280         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
145281         "file name" in local variables or comments.
145282         * m4/rename.m4: Likewise.
145284 2005-06-01  Bruno Haible  <bruno@clisp.org>
145286         * modules/csharpexec: New file.
145287         * MODULES.html.sh (C#): New section.
145289 2005-06-01  Bruno Haible  <bruno@clisp.org>
145291         * m4/csharp.m4: New file, from GNU gettext.
145292         * m4/csharpexec.m4: New file, from GNU gettext.
145294 2005-06-01  Bruno Haible  <bruno@clisp.org>
145296         * lib/csharpexec.h: New file, from GNU gettext.
145297         * lib/csharpexec.c: New file, from GNU gettext.
145298         * lib/csharpexec.sh.in: New file, from GNU gettext.
145300 2005-05-31  Derek Price  <derek@ximbiot.com>
145301             Paul Eggert  <eggert@cs.ucla.edu>
145303         Sync from cvs.
145304         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
145306 2005-05-31  Derek Price  <derek@ximbiot.com>
145307             Paul Eggert  <eggert@cs.ucla.edu>
145309         Sync from cvs.
145310         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
145312 2005-05-29  Derek Price  <derek@ximbiot.com>
145314         * config/srclist.txt (glob_.h, glob.c): Add these files.
145316 2005-05-29  Derek Price  <derek@ximbiot.com>
145318         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
145319         * modules/glob: New file.
145320         * modules/getlogin_r: Add link to POSIX spec in description.
145322 2005-05-29  Derek Price  <derek@ximbiot.com>
145323             Paul Eggert  <eggert@cs.ucla.edu>
145325         * m4/glob.m4: New file.
145327 2005-05-29  Derek Price  <derek@ximbiot.com>
145328             Paul Eggert  <eggert@cs.ucla.edu>
145330         * lib/glob_.h, lib/glob.c: New files.
145332 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
145334         * modules/fts (Files): Remove m4/inttypes-pri.m4.
145335         * modules/fts-lgpl (Depends-on): Remove gettext.
145337 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
145339         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
145340         and don't require gt_INTTYPES_PRI.
145342 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
145344         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
145346         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
145347         the configuration hassle isn't worth it.
145348         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
145349         (LONGEST_MODIFIER, PRIuMAX): Remove.
145351 2005-05-27  Bruno Haible  <bruno@clisp.org>
145353         * lib/getlogin_r.h: Remove second include of <stddef.h>.
145355 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
145357         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
145358         _POSIX_PTHREAD_SEMANTICS for Solaris.
145360 2005-05-25  Derek Price  <derek@ximbiot.com>
145362         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
145364 2005-05-25  Derek Price  <derek@ximbiot.com>
145365             Paul Eggert  <eggert@cs.ucla.edu>
145367         * modules/getlogin_r, m4/getlogin_r.m4: New files.
145368         * lib/getlogin_r.c, getlogin_r.h: New files.
145370 2005-05-25  Bruno Haible  <bruno@clisp.org>
145371             Derek Price  <derek@ximbiot.com>
145373         * lib/getlogin_r.h: Simplify API documentation.
145375 2005-05-23  Derek Price  <derek@ximbiot.com>
145377         * modules/minmax (Files): Add m4/minmax.m4.
145378         (configure.ac): Add gl_MINMAX.
145380 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
145382         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
145383         so that unistd-safer.h (GPL'ed code) need not be included.
145385 2005-05-22  Bruno Haible  <bruno@clisp.org>
145387         * m4/minmax.m4: New file.
145388         Based on a patch by Derek Price <derek@ximbiot.com>.
145390 2005-05-22  Bruno Haible  <bruno@clisp.org>
145392         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
145393         (INT64_MIN): Fix definition.
145394         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
145396         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
145397         NEED_SIGNED_INT_TYPES.
145399         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
145400         HAVE_SYSTEM_INTTYPES.
145402 2005-05-22  Bruno Haible  <bruno@clisp.org>
145404         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
145405         Also include <sys/param.h> if it defines MIN, MAX.
145406         Based on a patch by Derek Price <derek@ximbiot.com>.
145408 2005-05-21  Jim Meyering  <jim@meyering.net>
145410         * modules/fts (Files): Add m4/inttypes-pri.m4.
145411         (Depends-on): Add lstat and remove gettext.  Alphabetize.
145413 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
145415         New fts module.
145416         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
145417         (setup_dir, free_dir): New functions.
145418         (enter_dir, leave_dir): Define trivial
145419         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
145420         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
145421         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
145422         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
145423         Move to fts-cycle.c.
145424         (fts_open): Use setup_dir.
145425         (fts_close): Use free_dir.
145426         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
145427         This adds a label and some gotos, but the alternatives were messier.
145428         Check for memory allocation failure when entering a dir.
145429         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
145430         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
145431         (FTS): New member fts_cycle, that is a union that contains the
145432         old active_dir_ht and cycle_state.  All uses changed to mention
145433         fts_cycle.ht and fts_cycle.state.
145434         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
145435         fts.c, with the following changes:
145436         (setup_dir, free_dir): New functions.
145437         (enter_dir): Now returns bool.  Return true if successful, false
145438         if memory exhausted.  All callers changed.
145439         Do not bother partly cleaning up on
145440         memory allocation failure; that is free_dir's job.
145441         However, free ad if hash_insert fails, to avoid memory leak.
145442         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
145443         fts->fts_options to see which union member to use.
145445 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
145447         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
145448         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
145450 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
145452         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
145454 2005-05-20  Jim Meyering  <jim@meyering.net>
145456         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
145457         Now a macro, to pacify GCC.
145459 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
145461         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
145462         of -1.
145464 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
145466         * lib/chown.c (rpl_chown): Return -1 on failure.
145468 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
145470         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
145471         Don't check for stddef.h.
145472         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
145473         don't use its results.
145474         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
145475         since we include them unconditionally.  Don't require
145476         AM_STDBOOL_H, since stdbool is a prerequisite.
145477         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
145478         since we assume C89 or better.
145479         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
145480         as we don't use their results.
145481         Don't check for fchdir, memmove, memset, strrchr, as we use
145482         them unconditionally.
145483         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
145484         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
145486 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
145488         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
145489         Include <stddef.h> unconditionally, since we assume C89 now.
145490         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
145491         * lib/fts.c: Include fts_.h first, to check interface.
145492         Do not include intprops.h; no longer needed.
145493         Include cycle-check.h and hash.h, since fts_.h no longer does.
145494         Remove unnecessary casts of closedir to void.
145495         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
145496         decide whether to decrement nlinks.
145497         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
145498         (FTS): Use struct hash_table * instead of Hash_table, so that
145499         we no longer need to include hash.h here.
145501 2005-05-18  Jim Meyering  <jim@meyering.net>
145503         * modules/dirfd (License): Change to LGPL.  Most of the code
145504         is already in the public domain.
145506 2005-05-18  Jim Meyering  <jim@meyering.net>
145508         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
145509         Reported by Yoann Vandoorselaere.
145511 2005-05-17  Jim Meyering  <jim@meyering.net>
145513         * m4/fts.m4: New file, from coreutils.
145515 2005-05-17  Jim Meyering  <jim@meyering.net>
145517         * lib/fts.c, lib/fts_.h: New files, from coreutils.
145519 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
145521         Sync from coreutils.
145522         * m4/unlinkdir.m4: New file.
145524 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
145526         Sync from coreutils.
145527         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
145528         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
145529         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
145530         White space changes only.
145531         * lib/makepath.c (make_path): Port to hosts where leading "//" is
145532         special.
145533         * lib/yesno.c: Include getline.h, not ctype.h.
145534         (yesno): Don't remove leading white space; POSIX doesn't allow it.
145535         Use getline to remove arbitrary restriction on response length.
145537 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
145539         * config/srclist-update: Spell out "Street" in FSF postal
145540         mail address; this is the style the FSF seems to prefer.
145542         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
145543         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
145544         this updates FSF postal mail address.
145546         Sync from coreutils.
145547         * modules/unlinkdir: New file.
145548         * modules/yesno (Depends-on): Add getline.
145549         * MODULES.html.sh (File system functions): Add unlinkdir.
145551 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
145553         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
145554         lib/strsep.h:
145555         Change the initial comment to refer to GPL, not LGPL.
145556         gnulib-tool will change it to LGPL as needed.
145558         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
145559         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
145560         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
145561         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
145562         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
145563         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
145564         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
145565         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
145566         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
145567         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
145568         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
145569         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
145570         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
145571         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
145572         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
145573         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
145574         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
145575         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
145576         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
145577         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
145578         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
145579         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
145580         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
145581         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
145582         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
145583         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
145584         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
145585         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
145586         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
145587         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
145588         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
145589         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
145590         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
145591         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
145592         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
145593         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
145594         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
145595         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
145596         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
145597         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
145598         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
145599         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
145600         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
145601         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
145602         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
145603         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
145604         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
145605         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
145606         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
145607         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
145608         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
145609         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
145610         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
145611         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
145612         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
145613         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
145614         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
145615         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
145616         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
145617         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
145618         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
145619         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
145620         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
145621         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
145622         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
145623         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
145624         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
145625         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
145626         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
145627         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
145628         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
145629         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
145630         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
145631         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
145632         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
145633         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
145634         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
145635         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
145636         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
145637         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
145638         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
145639         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
145640         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
145641         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
145642         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
145643         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
145644         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
145645         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
145646         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
145647         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
145648         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
145649         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
145650         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
145651         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
145652         lib/yesno.c, lib/yesno.h:
145653         Update FSF postal mail address.
145655 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
145657         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
145658         tests/test-memmem.c, tests/test-stpncpy.c:
145659         Update FSF postal mail address.
145661 2005-05-13  Bruno Haible  <bruno@clisp.org>
145663         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
145664         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
145665         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
145666         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
145667         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
145668         Add support for 64-bit integers in the MSVC compiler.
145670 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
145672         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
145674 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
145676         * gnulib-tool (func_import): Sort and uniquify recommended includes.
145678 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
145680         * doc/getdate.texi (General date syntax): Don't say that date
145681         date --iso-8601=ns generates acceptable dates; it doesn't yet.
145682         Problem reported by Nic Ferrier.
145684 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
145686         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
145687         specified in ai_socktype. Fix invalid ai_protocol
145688         check. ai_protocol is usually set to 0 or depending on
145689         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
145690         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
145691         ai_socktype / ai_protocol in the returned addrinfo structure.
145693 2005-05-10  Simon Josefsson  <jas@extundo.com>
145695         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
145696         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
145698 2005-05-10  Karl Berry  <karl@gnu.org>
145700         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
145701         (from http://www.gnu.org/licenses).
145702         * doc/COPYING.LIB: also rename to COPYING.LESSER.
145703         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
145704         fdl.texi suffices.
145706 2005-05-10  Karl Berry  <karl@gnu.org>
145708         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
145709         (COPYING.DOC): remove.
145711         * config/srclist-update: new FSF address.
145713 2005-05-10  Derek Price  <derek@ximbiot.com>
145715         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
145716         possible.
145718 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
145719             Bruno Haible  <bruno@clisp.org>
145721         * modules/inet_ntop: New file.
145722         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
145723         inet_ntop.
145725 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
145726             Bruno Haible  <bruno@clisp.org>
145728         * m4/inet_ntop.m4: New file.
145730 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
145731             Bruno Haible  <bruno@clisp.org>
145733         * lib/inet_ntop.h: New file.
145734         * lib/inet_ntop.c: New file, from glibc with modifications.
145736 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
145738         * modules/time_r (License): Change to LGPL.
145739         * modules/extensions (License): Change to LGPL.  Actually,
145740         the license is more permissive than that, but currently gnulib-tool
145741         doesn't know how to handle more-permissive licenses.
145743         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
145744         Problem reported by Dave Love.
145746 2005-05-08  Jim Meyering  <jim@meyering.net>
145748         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
145749         blank.
145751 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
145753         * modules/argmatch (Depends-on): Add stdbool.
145754         * modules/backupfile (Depends-on): Likewise.
145755         * modules/chdir-long (Depends-on): Likewise.
145756         * modules/closeout (Depends-on): Likewise.
145757         * modules/cycle-check (Depends-on): Likewise.
145758         * modules/dirname (Depends-on): Likewise.
145759         * modules/fnmatch (Depends-on): Likewise.
145760         * modules/fsusage (Depends-on): Likewise.
145761         * modules/fwriteerror (Depends-on): Likewise.
145762         * modules/getcwd (Depends-on): Likewise.
145763         * modules/getloadavg (Depends-on): Likewise.
145764         * modules/hard-locale (Depends-on): Likewise.
145765         * modules/makepath (Depends-on): Likewise.
145766         * modules/mountlist (Depends-on): Likewise.
145767         * modules/nanosleep (Depends-on): Likewise.
145768         * modules/posixtm (Depends-on): Likewise.
145769         * modules/quotearg (Depends-on): Likewise.
145770         * modules/readtokens (Depends-on): Likewise.
145771         * modules/readtokens0 (Depends-on): Likewise.
145772         * modules/readutmp (Depends-on): Likewise.
145773         * modules/save-cwd (Depends-on): Likewise.
145774         * modules/strftime (Depends-on): Likewise.
145775         * modules/userspec (Depends-on): Likewise.
145776         * modules/utimecmp (Depends-on): Likewise.
145777         * modules/xgetcwd (Depends-on): Likewise.
145778         * modules/xnanosleep (Depends-on): Likewise.
145779         * modules/xstrtod (Depends-on): Likewise.
145780         * modules/yesno (Depends-on): Likewise.
145782 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
145784         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
145785         needless checks.
145787 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
145789         Merge from coreutils.  Among other things,
145790         add bulletproofing for cases where stdin, stdout, or stderr are closed.
145791         * lib/fd-safer.c: New file.
145792         * lib/fcntl-safer.h, open-safer.c: Remove.
145793         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
145794         * lib/dup-safer.c: Include unistd-safer.h first.
145795         Don't include errno.h.
145796         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
145797         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
145798         * lib/file-type.c: Rely on file-type.h change.
145799         * lib/getloadavg.c: Include unistd-safer.h.
145800         (getloadavg): Use safer open.
145801         * lib/getusershell.c: Include "stdio-safer.h".
145802         (getusershell): Use safer fopen.
145803         * lib/long-options.c (long_options): Use NULL rather than 0.
145804         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
145805         'free'.
145806         * lib/modechange.c: Likewise.
145807         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
145808         (MODE_DONE): New constant.
145809         (struct mode_change): Remove 'next' member.
145810         (make_node_op_equals): New function; like the old one of the
145811         same name, except it allocates an array.
145812         (mode_compile, mode_create_from_ref): Use it.
145813         (mode_compile): Allocate result as an array, not a linked list.
145814         Parse octal string ourself, so that we catch mistakes like "+0".
145815         (mode_adjust): Arg is an array, not a linked list.
145816         * lib/modechange.c: Include stat-macros.h, xalloc.h.
145817         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
145818         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
145819         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
145820         Remove.  This is now stat-macros.h's job.
145821         (talloc): Remove.  All callers replaced by xalloc, so that
145822         our invokers don't have to worry about reporting memory failures.
145823         (make_node_op_equals): Remove.
145824         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
145825         New constants.
145826         (struct mode_change): Moved here from modechange.h.
145827         (mode_append_entry): Remove.
145828         (mode_compile): Remove MASKED_OPS arg, since it encouraged
145829         apps to have incorrect behavior.  Use simpler algorithm for head
145830         and tail.  Don't futz with umask; that's now the job of mode_adjust.
145831         Detect more invalid usages rather than having somewhat-random behavior.
145832         Don't insert an "a=" action, as that leads to incorrect behavior.
145833         (mode_compile, mode_create_from_ref): Return NULL on error instead
145834         of an enum, since now there's only one way to have an error.  All
145835         callers changed.
145836         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
145837         at the correct time.  Simplify calculation of "+u" and its ilk.
145838         Don't mishandle "+X".
145839         (mode_free): Remove "register" and localize decls.
145840         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
145841         (struct mode_change): Move to modechange.c; callers don't
145842         need to see this stuff.
145843         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
145844         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
145845         (mode_change, mode_adjust): Reflect the new signatures noted above.
145846         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
145847         that might redefine system include files.
145848         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
145849         (my_usleep): Use NULL rather than (void *) 0.
145850         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
145851         Use siginterrupt to specify that system calls should be interrupted.
145852         (rpl_nanosleep): Move initialization of suspended closer to call of
145853         my_usleep.
145854         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
145855         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
145856         (desirable_utmp_entry): New function.
145857         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
145858         using x2nrealloc, to simplify logic.
145859         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
145860         size calculation.  Do not assume utmp file is a regular file.
145861         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
145862         (READ_UTMP_CHECK_PIDS): New constant.
145863         * lib/save-cwd.c: Include unistd-safer.h.
145864         (save_cwd): Use fd_safer.
145865         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
145866         [!_LIBC] Include "stat-macros.h" instead.
145867         * lib/unistd-safer.h (fd_safer): New decl.
145869 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
145871         * modules/getloadavg (Depends-on): Add unistd-safer.
145872         * modules/getusershell (Depends-on): Add stdio-safer.
145873         * modules/lstat (Depends-on): Remove xalloc.
145874         * modules/mkstemp (Depends-on): Add stat-macros.
145875         * modules/modechange (Depends-on): Remove xstrtol.
145876         Add stat-macros, xalloc.
145877         * modules/save-cwd (Depends-on): Add unistd-safer.
145878         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
145879         * modules/unistd-safer (Files): Add lib/fd-safer.c
145880         (Makefile.am): Remove lib_SOURCES.
145882         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
145883         Remove fcntl-safer; unistd-safer supersedes it.
145885 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
145887         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
145888         AC_HEADER_STAT.
145889         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
145890         (gl_PREREQ_CHOWN): Remove.
145891         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
145892         it.  Don't require AC_HEADER_STAT.
145893         (gl_PREREQ_LSTAT): Remove.
145894         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
145895         Don't require AC_HEADER_STAT.
145896         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
145897         (gl_PREREQ_RMDIR): Remove.
145898         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
145899         mention stat-macros.h or AC_HEADER_STAT, since we'll make
145900         the stat-macros module a prerequisite.
145901         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
145902         * m4/filemode.m4 (gl_FILEMODE): Likewise.
145903         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
145904         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
145905         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
145906         variable names.
145907         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
145908         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
145909         variable prefixes.
145910         * m4/fcntl-safer.m4: Remove.
145911         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
145912         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
145913         Invoke gl_PREREQ_FD_SAFER.
145914         (gl_PREREQ_FD_SAFER): New macro.
145915         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
145916         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
145917         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
145918         Remove duplicate call to AC_LIBOBJ(readutmp).
145919         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
145921         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
145922         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
145924 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
145926         * MODULES.html.sh (Misc): Add byteswap.
145928 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
145930         * modules/getcwd (Depends-on): Add extensions.
145931         * modules/openat (Depends-on): Likewise.
145933 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
145935         * modules/byteswap: New file.
145937 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
145939         * m4/byteswap.m4: New file.
145941 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
145943         * lib/byteswap_.h: New file.
145945 2005-04-25  Karl Berry  <karl@gnu.org>
145947         * m4/gettext.m4: Update from GNU gettext 0.14.4.
145949 2005-04-25  Albert Chin  <china@thewrittenword.com>
145951         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
145952         Toolkit C bug.
145954 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
145956         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
145957         (func_ln_if_changed): Remove forcibly for no error message
145958         in case file does not exist.
145960 2005-04-19  Simon Josefsson  <jas@extundo.com>
145962         * gnulib-tool (Options): Make --symlink mean --symbolic.
145964 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
145966         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
145968 2005-04-16  Simon Josefsson  <jas@extundo.com>
145970         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
145972 2005-04-15  Simon Josefsson  <jas@extundo.com>
145974         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
145976 2005-04-15  Simon Josefsson  <jas@extundo.com>
145978         * gnulib-tool: Rename --symlink to --symbolic.
145980 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
145982         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
145983         symbolic links to files instead of copying/moving.  Add --aux-dir,
145984         specifying directory relative --dir where auxiliary build tools
145985         are placed.
145987 2005-04-14  Bruno Haible  <bruno@clisp.org>
145989         * modules/allocsa (License): Change to LGPL.
145990         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
145992 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
145994         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
145995         that "UTC +1 second" continues to work.  Problem reported
145996         by Dmitry V. Levin.
145997         (relunit_snumber): New rule.
145998         (relunit): Use it.
146000 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
146002         * lib/getdate.y (universal_time_zone_table): New constant.
146003         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
146004         universal_time_zone_table.
146005         (lookup_zone): Prefer universal_time_zone_table to
146006         local_time_zone_table, so that "GMT" time stamps are allowed in
146007         London during the summer.  Problem reported by Ian Abbott.
146009 2005-04-12  Jim Meyering  <jim@meyering.net>
146011         * lib/human.c (humblock): Set *options even when returning due to
146012         xstrtoumax conversion failure.  Thanks to a used-uninitialized
146013         warning from gcc-4.
146015 2005-04-09  Jim Meyering  <jim@meyering.net>
146017         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
146018         -Wuninitialized: initialize tm0.tm_year.
146020 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
146022         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
146023         count, since there's no maximum.  All uses changed.
146024         Add member dsts_seen.
146025         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
146026         not being INT_MAX.
146027         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
146028         Use pc_rels_seen to decide whether a date is absolute.
146030         * lib/getdate.y (number): Don't overwrite year.
146031         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
146032         check.
146034 2005-04-02  Simon Josefsson  <jas@extundo.com>
146036         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
146037         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
146039 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
146041         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
146042         where no absolute path name can be longer than PATH_MAX.
146044 2005-03-27  Jim Meyering  <jim@meyering.net>
146046         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
146048 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
146050         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
146051         "one's complement" -> "ones' complement" in comment, as per Knuth.
146052         "value of type" -> "type or expression" in comment.
146053         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
146055 2005-03-26  Jim Meyering  <jim@meyering.net>
146057         Comment nits.
146058         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
146059         Correct typos: s/or/of/.
146061 2005-03-26  Jim Meyering  <jim@meyering.net>
146063         * modules/check-include-files: Move to ../ and rename to...
146064         * check-module: ...this.
146066 2005-03-25  Jim Meyering  <jim@meyering.net>
146068         * modules/xvasprintf (Files): Add xalloc.h.
146070 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
146072         * modules/gettext (Files): config/config.rpath ->
146073         build-aux/config.rpath
146074         * modules/iconv (Files): Likewise.
146075         Problem reported by Oskar Liljeblad.
146077 2005-03-23  Jim Meyering  <jim@meyering.net>
146079         * modules/check-include-files: New script to check for
146080         missing dependencies, multiple includes, etc.
146082         * modules/c-strtold (Depends-on): Add xalloc.
146083         * modules/c-strtod (Depends-on): Add xalloc.
146084         * modules/hash (Depends-on): Add xalloc.
146085         (Files): Remove lib/xalloc.h.
146087         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
146088         * modules/userspec (Files): Add lib/inttostr.h.
146090 2005-03-23  Jim Meyering  <jim@meyering.net>
146092         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
146094 2005-03-22  Jim Meyering  <jim@meyering.net>
146096         * modules/stat-macros: New module.
146097         * modules/canonicalize, modules/euidaccess, modules/file-type,
146098         * modules/filemode, modules/lchown, modules/makepath,
146099         * modules/rmdir, modules/stat: Depend on new stat-macros module
146100         rather than listing lib/stat-macros.h manually.
146101         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
146103 2005-03-22  Jim Meyering  <jim@meyering.net>
146105         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
146107 2005-03-22  Bruno Haible  <bruno@clisp.org>
146109         * config/srclist.txt: Replace target directory 'config' with
146110         'build-aux'.
146111         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
146112         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
146113         ../build-aux/.
146115 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
146117         * modules/chdir-long (Depends-on): Add mempcpy.
146119         * modules/acl, modules/backupfile, modules/c-strtod,
146120         modules/c-strtold, modules/canon-host, modules/canonicalize,
146121         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
146122         modules/exclude, modules/exitfail, modules/file-type,
146123         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
146124         modules/getdate, modules/getline, modules/getpagesize,
146125         modules/getpass, modules/getugroups, modules/group-member,
146126         modules/hard-locale, modules/hash, modules/human, modules/idcache,
146127         modules/inttostr, modules/long-options, modules/makepath,
146128         modules/md5, modules/memcasecmp, modules/memcoll,
146129         modules/modechange, modules/mountlist, modules/path-concat,
146130         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
146131         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
146132         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
146133         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
146134         modules/strftime, modules/strndup, modules/strverscmp,
146135         modules/timespec, modules/unlocked-io, modules/userspec,
146136         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
146137         modules/yesno:
146138         Remove lib_SOURCES line from Makefile.am section, as this is now
146139         done automatically by the corresponding Autoconf macro.
146141 2005-03-21  Jim Meyering  <jim@meyering.net>
146143         Changes imported from coreutils.
146145         * lib/cycle-check.c: Don't include xalloc.h.
146147         * lib/path-concat.c: Don't include assert.h.
146148         (path_concat): Remove assertion that would have triggered
146149         for ABASE starting with more than one slash.
146150         Reported by Andreas Schwab.
146152         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
146153         properly when ABASE is an absolute file name.
146154         Correct the description of this function.
146155         Include <assert.h>.
146156         Add an assertion and a test driver.
146157         This fixes a bug introduced on 2004-07-02.
146158         Andreas Schwab reported the resulting failure of cp --parents:
146159         http://lists.gnu.org/r/bug-coreutils/2005-01/msg00130.html
146161 2005-03-21  Jim Meyering  <jim@meyering.net>
146163         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
146164         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
146166 2005-03-21  Jim Meyering  <jim@meyering.net>
146167         and  Paul Eggert  <eggert@cs.ucla.edu>
146169         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
146170         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
146171         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
146172         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
146173         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
146174         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
146175         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
146176         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
146177         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
146178         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
146179         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
146180         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
146181         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
146182         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
146183         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
146184         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
146185         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
146186         for these modules.
146188 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
146190         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
146191         (which shouldn't happen), generate nothing instead of returning 0
146192         immediately, so that nstrftime (NULL, ...) doesn't return 0.
146194 2005-03-16  Bruno Haible  <bruno@clisp.org>
146196         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
146197         HAVE_LONGLONG_64BIT.
146199 2005-03-16  Bruno Haible  <bruno@clisp.org>
146201         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
146202         HAVE_LONGLONG_64BIT.
146204 2005-03-16  Bruno Haible  <bruno@clisp.org>
146206         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
146207         HAVE_LONGLONG_64BIT.
146209 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
146211         * lib/strftime.c (my_strftime): Prepend space to format so that we can
146212         reliably distinguish strftime failure from empty output on POSIX
146213         hosts.
146215 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
146217         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
146218         (iconv_string): Don't guess a size-zero buffer, as that might cause
146219         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
146220         result would be 'too large', where 'too large' is (heuristically)
146221         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
146222         overflow concerns.  This will prevent some unwanted malloc failures
146223         when the inputs are very large.
146225 2005-03-15  Karl Berry  <karl@gnu.org>
146227         * config/srclist.txt (config.rpath): from gettext.
146228         * config/config.rpath: update.
146230 2005-03-15  Bruno Haible  <bruno@clisp.org>
146232         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
146233         to 'negate'.
146235         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
146236         variable.
146238         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
146239         results.
146241 2005-03-14  Simon Josefsson  <jas@extundo.com>
146243         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
146244         <fx@gnu.org>.
146246 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
146248         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
146249         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
146250         intprops.h.
146251         * lib/strtol.c: Likewise.
146253 2005-03-14  Jim Meyering  <jim@meyering.net>
146255         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
146256         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
146257         to be nonzero so that we (and caller) can detect the difference
146258         between a valid zero-length expansion and an error return, even
146259         when the underlying strftime fails before writing anything into
146260         that location.
146262 2005-03-14  Bruno Haible  <bruno@clisp.org>
146264         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
146265         Update from GNU gettext 0.14.3.
146267 2005-03-10  Jim Meyering  <jim@meyering.net>
146269         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
146271 2005-03-10  Jim Meyering  <jim@meyering.net>
146273         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
146274         so that this module works on systems without fchdir.
146276 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
146278         Factor int-properties macros into a single file, except for
146279         glibc-related files.
146280         * lib/intprops.h: New file.
146281         * lib/getloadavg.c: Include it instead of limits.h.
146282         (INT_STRLEN_BOUND): Remove.
146283         * lib/human.c: Include intprops.h.
146284         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
146285         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
146286         302/1000.
146287         * lib/inttostr.h: Include intprops.h instead of limits.h.
146288         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
146289         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
146290         for consistency with intprops.h.
146291         (time_t_is_integer, twos_complement_arithmetic): Use them.
146292         * lib/sig2str.h: Include <signal.h>, intprops.h.
146293         (INT_STRLEN_BOUND): Remove.
146294         * lib/strftime.c (TYPE_SIGNED): Remove.
146295         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
146296         * lib/strtol.c: Adjust comments to match intprops.h.
146297         * lib/userspec.c: Include intprops.h.
146298         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
146299         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
146300         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
146301         instead of rolling our own expressions.
146302         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
146304         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
146305         instead of int.
146306         (my_strftime): Do not mishandle years close to INT_MAX, by doing
146307         the right thing even if adding 1900 would overflow.  Similarly
146308         for tm_mon + 1 and tm_yday + 1.
146309         Make %Y always equivalent to %C%y, and similarly for %G and %g.
146310         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
146311         (DO_SIGNED_NUMBER): New macro.
146312         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
146314 2005-03-07  Bruno Haible  <bruno@clisp.org>
146316         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
146318 2005-03-07  Bruno Haible  <bruno@clisp.org>
146320         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
146322 2005-03-04  Derek R. Price  <derek@ximbiot.com>
146324         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
146325         (func_import): Only replace files via --import when they have actually
146326         changed.
146328 2005-03-03  Derek R. Price  <derek@ximbiot.com>
146330         * m4/mmap-anon.m4: New file.
146331         * m4/pagealign_alloc.m4: New file.
146333 2005-03-03  Derek R. Price  <derek@ximbiot.com>
146334             Bruno Haible  <bruno@clisp.org>
146336         * modules/pagealign_alloc: New file.
146337         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
146339 2005-03-03  Derek R. Price  <derek@ximbiot.com>
146340             Bruno Haible  <bruno@clisp.org>
146342         * lib/pagealign_alloc.h: New file.
146343         * lib/pagealign_alloc.c: New file.
146345 2005-03-03  Bruno Haible  <bruno@clisp.org>
146347         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
146348         Use an all-permissive copyright notice, recommended by RMS.
146350 2005-03-02  Bruno Haible  <bruno@clisp.org>
146352         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
146353         of AIX, the replacement has to be done only after <string.h> is
146354         included, therefore not in config.h. stpncpy.h does the replacement,
146355         and stpncpy.c uses it.
146357 2005-03-02  Bruno Haible  <bruno@clisp.org>
146359         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
146360         stpncpy.c uses it.
146362 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
146364         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
146365         The workaround isn't strictly needed for POSIX conformance, and
146366         it's too much of a pain to configure and maintain.  We'll ask
146367         people to fix their kernels instead.
146368         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
146369         (NANOSLEEP_BUG_WORKAROUND): Remove.
146370         (xnanosleep): Remove the workaround.
146372 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
146374         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
146375         Reported by Derek Price.
146376         (Include): Add "timespec.h".
146378         * modules/xnanosleep (Depends-on): Remove gethrxtime.
146380 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
146382         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
146383         to detect nanosleep bug.
146385 2005-03-01  Bruno Haible  <bruno@clisp.org>
146387         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
146389 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
146391         * modules/gethrxtime: New file.
146392         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
146393         (Depends-on): Add gethrxtime.
146394         (configure.ac): Add gl_XNANOSLEEP.
146395         (Makefile.am): Remove lib_SOURCES line.
146397 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
146399         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
146400         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
146402 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
146404         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
146405         * lib/timespec.h (gettime): Return void, since it always
146406         succeeds now.  All uses changed.
146407         * lib/gettime.c (gettime): Likewise.
146408         [HAVE_NANOTIME]: Prefer nanotime.
146409         Assume gettimeofday succeeds, as POSIX requires.
146410         Assime time () succeeds, since other code already does.
146411         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
146412         (timespec_subtract): Remove.
146413         (NANOSLEEP_BUG_WORKAROUND): New constant.
146414         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
146415         things considerably.  Use it only on GNU/Linux hosts, since the
146416         workaround shouldn't be needed elsewhere.
146418 2005-02-24  Bruno Haible  <bruno@clisp.org>
146420         * modules/gettext (Files): Add m4/glibc2.m4.
146422 2005-02-24  Bruno Haible  <bruno@clisp.org>
146424         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
146425         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
146426         * m4/progtest.m4:
146427         Update from GNU gettext 0.14.2.
146428         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
146430 2005-02-24  Bruno Haible  <bruno@clisp.org>
146432         * lib/localcharset.c: Update from GNU gettext 0.14.2.
146433         * lib/config.charset: Update from GNU gettext 0.14.2.
146435 2005-02-24  Bruno Haible  <bruno@clisp.org>
146437         * lib/gettext.h: Update from GNU gettext 0.14.2.
146439 2005-02-23  Simon Josefsson  <jas@extundo.com>
146441         * m4/iconvme.m4: New file.
146443 2005-02-23  Jim Meyering  <jim@meyering.net>
146445         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
146446         change.
146447         Thanks to Bruno Haible for catching it.
146449 2005-02-22  Simon Josefsson  <jas@extundo.com>
146451         * modules/iconvme: New file.
146453         * MODULES.html.sh: Add iconvme.
146455 2005-02-22  Simon Josefsson  <jas@extundo.com>
146457         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
146459 2005-02-22  Simon Josefsson  <jas@extundo.com>
146461         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
146463 2005-02-22  Jim Meyering  <jim@meyering.net>
146465         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
146466         s/ifndef/ifdef/.
146468 2005-02-20  Neil Conway  <neilc@samurai.com>
146470         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
146471         returned by OSX/Darwin if the specified buffer is not large
146472         enough for the hostname.
146474 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
146476         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
146477         pass it to _help, otherwise the latter coredumps trying to
146478         dereference state.root_argp.
146480 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
146482         * modules/chdir-long (Depends-on): Add memrchr.
146483         * modules/memrchr (Files): Add lib/memrchr.h.
146484         (Include): "memrchr.h".
146486 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
146488         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
146490 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
146492         * lib/memrchr.h: New file.
146493         * lib/chdir-long.c: Include it.
146494         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
146495         Don't bother including stddef.h.
146497 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
146499         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
146500         inclusion.
146501         Include <sys/types.h>, for dev_t.
146502         (ME_DUMMY, ME_REMOTE): Move from here....
146503         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
146504         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
146505         Dmitry V. Levin.
146506         Include mountlist.h first, to test the interface.
146508 2005-01-29  Bruno Haible  <bruno@clisp.org>
146510         * lib/progname.c (program_name): Initialize.
146511         Needed when linking statically on MacOS X.
146513 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
146515         Sync from coreutils.
146516         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
146517         (Depends-on): Add c-strtod.
146518         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
146520 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
146522         Sync from coreutils.
146523         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
146525         Remove files that are specific to coreutils.
146526         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
146528 2005-01-28  Bruno Haible  <bruno@clisp.org>
146530         * modules/javacomp: New file.
146531         * MODULES.html.sh (Java): Add javacomp.
146533 2005-01-28  Bruno Haible  <bruno@clisp.org>
146535         * m4/javacomp.m4: New file, from GNU gettext.
146537 2005-01-28  Bruno Haible  <bruno@clisp.org>
146539         * lib/javacomp.sh.in: New file, from GNU gettext.
146540         * lib/javacomp.h: New file, from GNU gettext.
146541         * lib/javacomp.c: New file, from GNU gettext.
146543 2005-01-26  Simon Josefsson  <jas@extundo.com>
146545         * lib/gai_strerror.c: Use GPL in header.
146547 2005-01-26  Bruno Haible  <bruno@clisp.org>
146549         * modules/javaexec: New file.
146550         * MODULES.html.sh (Java): Add javaexec.
146552 2005-01-26  Bruno Haible  <bruno@clisp.org>
146554         * m4/javaexec.m4: New file, from GNU gettext.
146556 2005-01-26  Bruno Haible  <bruno@clisp.org>
146558         * lib/javaexec.sh.in: New file, from GNU gettext.
146559         * lib/javaexec.h: New file, from GNU gettext.
146560         * lib/javaexec.c: New file, from GNU gettext.
146562 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
146564         * modules/lchown (Depends-on): Remove lchown.h
146566 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
146568         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
146569         must be defined if the header file was not found, in order
146570         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
146572 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
146574         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
146575         initializers for struct pentry_state.
146576         (__argp_error): Check return value of __asprintf
146577         (__argp_failure): Translate error message
146579         * lib/argp-parse.c: Removed braces around the expansion of N_()
146581 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
146583         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
146584         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
146585         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
146586         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
146587         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
146588         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
146589         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
146590         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
146591         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
146592         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
146593         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
146594         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
146595         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
146596         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
146597         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
146598         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
146599         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
146600         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
146601         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
146602         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
146603         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
146604         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
146605         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
146606         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
146607         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
146608         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
146609         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
146610         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
146611         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
146612         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
146613         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
146614         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
146615         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
146616         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
146617         xstrtol.m4, xstrtoumax.m4, yesno.m4:
146618         Use an all-permissive copyright notice, recommended by RMS.
146620 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
146622         * modules/chdir-long (Depends-on): Remove mempcpy.
146624 2005-01-21  Jim Meyering  <jim@meyering.net>
146626         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
146627         same value as for Solaris 9.
146629         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
146630         component length.  This included changing the parameter to be
146631         of type `char *' rather than `char const *'.
146632         * lib/chdir-long.h (chdir_long): Update prototype.
146634         * lib/openat.c (fdopendir, fstatat): New functions.
146635         * lib/openat.h: Include headers required for use of DIR and struct
146636         stat.
146637         [AT_SYMLINK_NOFOLLOW]: Define.
146638         (fdopendir, fstatat): Add prototypes.
146640 2005-01-21  Bruno Haible  <bruno@clisp.org>
146642         * modules/classpath: New file.
146643         * MODULES.html.sh (Java): Add classpath.
146645 2005-01-21  Bruno Haible  <bruno@clisp.org>
146647         * lib/classpath.h: New file, from GNU gettext.
146648         * lib/classpath.c: New file, from GNU gettext.
146650 2005-01-20  Simon Josefsson  <jas@extundo.com>
146652         * modules/version-etc-fsf: New file.
146654 2005-01-20  Simon Josefsson  <jas@extundo.com>
146656         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
146657         * lib/version-etc.c: Remove version_etc_copyright.
146658         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
146659         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
146661 2005-01-20  Simon Josefsson  <jas@extundo.com>
146663         * lib/base64.h (isbase64): Add.
146665         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
146666         using a unsigned prototype, don't inline.
146667         (base64_decode): Use it.
146669 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
146671         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
146672         it.
146674 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
146676         * lib/save-cwd.c (save_cwd): Remove code to support the case
146677         where fchdir is missing or flaky.
146679 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
146681         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
146683 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
146685         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
146686         AC_LIBSOURCES now does this.
146687         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
146688         with new ullong_max module.
146690 2005-01-19  Bruno Haible  <bruno@clisp.org>
146692         * modules/sh-quote: New file.
146693         * MODULES.html.sh (Executing programs): Add sh-quote.
146695 2005-01-19  Bruno Haible  <bruno@clisp.org>
146697         * lib/sh-quote.h: New file, from GNU gettext.
146698         * lib/sh-quote.c: New file, from GNU gettext.
146700 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
146702         Merge from coreutils.
146703         * m4/ullong_max.m4: New file.
146704         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
146705         (gl_MACROS): Assume localeconv exists.
146707 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
146709         Merge changes from coreutils, as described below in several
146710         changelogs dated today.
146712         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
146713         (O_DIRECTORY): Remove; not needed here, since "." must be
146714         a directory.  All uses removed.
146715         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
146716         universal on Suns, and we also need to test for IRIX.
146717         Revamp code to use 'if' rather than '#if'.
146718         Avoid unnecessary comparison of cwd->desc to 0.
146720         * lib/utimens.c (futimens): Robustify the previous patch, by checking
146721         for known valid error numbers rather than observed invalid ones.
146723 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
146725         * modules/ullong_max: New file.
146727         * modules/chdir-long, modules/openat: New files.
146728         * modules/save-cwd (Depends-on): Depend on chdir-long.
146729         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
146731 2005-01-18  Jim Meyering  <jim@meyering.net>
146733         Merge from coreutils.
146734         * m4/chdir-long.m4, m4/openat.m4: New files.
146735         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
146736         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
146737         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
146738         is sane and DOES follow symlinks.  Besides, testing 20 different
146739         systems found no broken chown implementations.
146740         Prompted by a change in rsync's copy of this macro.
146741         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
146743         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
146745         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
146746         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
146747         NULL-means-set-to-current-time semantics.
146748         Remove temporary file immediately, rather than waiting
146749         for configure's at-exit trap code to do it.
146751 2005-01-18  Jim Meyering  <jim@meyering.net>
146753         * lib/version-etc.c (version_etc_copyright): Update copyright date.
146755         * lib/utimens.c (futimens): Account for the fact that futimes
146756         can also fail with errno == ENOSYS or errno == ENOENT.
146757         Patch from Dmitry V. Levin.
146759         Change the name of the robust chdir function from chdir to chdir_long.
146760         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
146761         (restore_cwd): Use chdir_long, not chdir.
146762         * lib/chdir-long.c: Renamed from chdir.c.
146763         * lib/chdir-long.h: Renamed from chdir.h.
146764         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
146765         Hurd.
146767 2005-01-18  Bruno Haible  <bruno@clisp.org>
146769         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
146770         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
146771         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
146772         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
146773         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
146774         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
146775         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
146776         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
146777         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
146778         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
146779         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
146780         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
146781         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
146782         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
146783         Use an all-permissive copyright notice, recommended by RMS.
146785 2005-01-18  Bob Proulx  <bob@proulx.com>
146787         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
146788         simplify offsetof() macro construct to avoid compile failure with
146789         native HP-UX 11.0 ANSI C compiler.
146791 2005-01-17  Bruno Haible  <bruno@clisp.org>
146793         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
146794         redundant because stpncpy.m4 takes care of it.
146796 2005-01-17  Bruno Haible  <bruno@clisp.org>
146798         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
146800 2005-01-17  Bruno Haible  <bruno@clisp.org>
146802         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
146803         used.
146805 2005-01-17  Bruno Haible  <bruno@clisp.org>
146807         * lib/fwriteerror.h (fwriteerror): Change specification to include
146808         fclose.
146809         * lib/fwriteerror.c: Include <stdbool.h>.
146810         (fwriteerror): At the end, close the file stream. Record whether
146811         stdout was already closed.
146813 2005-01-17  Bruno Haible  <bruno@clisp.org>
146815         * lib/execute.c (environ): Declare if needed.
146816         * lib/pipe.c (environ): Likewise.
146817         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
146819 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
146821         * modules/argp: Depend on vsnprintf
146823 2005-01-10  Jim Meyering  <jim@meyering.net>
146825         * modules/closeout (Depends-on): Add atexit.
146827 2005-01-06  Bruno Haible  <bruno@clisp.org>
146829         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
146831 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
146833         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
146834         definitions to be after all include files, to avoid collisions.
146835         Problem reported by Bob Proulx.
146837 2005-01-04  Jim Meyering  <jim@meyering.net>
146839         Changes imported from coreutils.
146840         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
146841         as the mkstemp template, use a temporary directory and an
146842         8.3-friendly template to avoid trouble on systems like DJGPP.
146843         Reported by Juan M. Guerrero via Stepan Kasal.
146844         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
146845         close. Remove the temporary directory right away, rather than waiting
146846         for configure's at-exit trap code to do it.
146847         Suggestion from Stepan Kasal.
146849 2005-01-01  Simon Josefsson  <jas@extundo.com>
146851         * gnulib-tool: Print #include directives when --import'ing.
146853 2004-12-28  Simon Josefsson  <jas@extundo.com>
146855         * tests/test-base64.c: Include required header files.  Remove
146856         unused variables.
146858 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
146860         * modules/error (Depends-on): Remove gettext.
146862 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
146864         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
146865         not needed.  This removes a dependency on the gettext module.
146866         [defined _LIBC]: Do not include <libintl.h>; not needed.
146868 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
146870         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
146871         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
146873 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
146875         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
146876         HAVE_DECL_STRTOLD.
146878 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
146880         * modules/getdate (Depends-on): Remove alloca-opt.
146882 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
146884         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
146886 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
146888         * lib/argp-parse.c: Include <stddef.h>.
146889         (alignof, alignto): New macros.
146890         (parser_init): Don't assume that void * is aligned sufficiently
146891         for struct option.
146893         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
146894         need to extend the stack.
146895         (YYINITDEPTH): New macro, so that the initial stack isn't overly
146896         large.
146898 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
146900         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
146902 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
146904         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
146905         (2004-10-24) change.  Apparently this was a false alarm.
146907         * modules/getdate: Depend on alloca-opt, not alloca.
146909 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
146911         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
146912         Remove now-obsolete comment about AIX.
146913         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
146914         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
146915         (YYMAXDEPTH): New macro.
146917 2004-12-18  Simon Josefsson  <jas@extundo.com>
146919         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
146921 2004-12-18  Bruno Haible  <bruno@clisp.org>
146923         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
146925 2004-12-18  Bruno Haible  <bruno@clisp.org>
146927         * lib/fatal-signal.c (fatal_signals): Make non-const.
146928         (init_fatal_signals): New function.
146929         (uninstall_handlers, install_handlers): Ignore signals that were set to
146930         SIG_IGN.
146931         (at_fatal_signal): Call init_fatal_signals.
146932         (init_fatal_signal_set): Likewise. Ignore signals that were set to
146933         SIG_IGN.
146934         Reported by Paul Eggert.
146936 2004-12-18  Bruno Haible  <bruno@clisp.org>
146938         * doc/alloca.texi: New file.
146939         * doc/alloca-opt.texi: New file.
146941 2004-12-17  Jim Meyering  <jim@meyering.net>
146943         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
146944         Otherwise, install-sh could exit with improper exit status when
146945         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
146947 2004-12-16  Simon Josefsson  <jas@extundo.com>
146949         * tests/test-base64.c: Add license.
146951 2004-12-15  Stepan Kasal  <address@hidden>
146953         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
146955 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
146957         * modules/getcwd (Files): Add m4/d-ino.m4.
146958         Suggested by Mark D. Baushke.
146960 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
146962         * lib/getdate.y (textint): New member "negative".
146963         (time_zone_hhmm): New function.
146964         Expect 14 shift-reduce conflicts, not 13.
146965         (o_colon_minutes): New rule.
146966         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
146967         (yylex): Set the "negative" member of signed numbers.
146969 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
146971         * doc/getdate.texi (Time of day items, Time zone items):
146972         Describe new formats +00:00, UTC+00:00.
146974 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
146976         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
146977         spurious "-l"s.  Problem reported by Stepan Kasal.
146979 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
146981         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
146982         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
146984 2004-12-04  Simon Josefsson  <jas@extundo.com>
146986         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
146987         Vandoorselaere <yoann@prelude-ids.org>.
146989 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
146991         Changes imported from coreutils.
146992         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
146993         exist.
146994         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
146996 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
146998         Changes imported from coreutils.
146999         * lib/hard-locale.c: Assume <locale.h> exists.
147000         Include "strdup.h".
147001         (GLIBC_VERSION): New macro.
147002         (hard_locale): Assume setlocale exists.
147003         Rewrite to avoid #ifdef.
147004         Use strdup rather than malloc + strcpy.
147005         * lib/human.c: Assume <locale.h> exists.
147006         (human_readable): Assume localeconv exists.
147008 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
147010         * modules/hard-locale (Depends-on): Add strdup.
147012 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
147014         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
147015         convert T2, not T.  (Imported from libc.)
147017 2004-11-30  Simon Josefsson  <jas@extundo.com>
147019         * modules/restrict (License): Change to LGPL.
147021 2004-11-30  Simon Josefsson  <jas@extundo.com>
147023         * m4/restrict.m4: Add copyright and copying conditions.
147025 2004-11-30  Simon Josefsson  <jas@extundo.com>
147027         * m4/base64.m4: New file.
147029 2004-11-30  Simon Josefsson  <jas@extundo.com>
147031         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
147032         base64.
147034         * tests/test-base64.c: New file.
147036         * modules/base64: New file.
147038 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
147040         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
147041         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
147043         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
147045 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
147047         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
147048         (__getcwd.c): Don't restore errno; glibc doesn't.
147049         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
147050         first, falling back to our code only if its results look suspicious.
147051         Ensure that the resulting buffer is only as large as necessary.
147053         * lib/readutmp.c: Include readutmp.h first.
147054         Include <errno.h>, since readutmp.h no longer does that.
147055         * lib/readutmp.h: Don't include <errno.h>,
147056         <sys/param.h>, <time.h>; not needed to establish interface.
147057         (errno): Remove decl.
147058         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
147059         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
147060         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
147062 2004-11-28  Simon Josefsson  <jas@extundo.com>
147064         * lib/base64.h, base64.c: New file.
147066 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
147068         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
147070 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
147072         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
147073         (Depends-on): Remove pathmax, same.  Add mempcpy.
147074         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
147075         (Makefile.am): Append getcwd.h to lib_SOURCES.
147076         (Include): Add getcwd.h.
147077         (Maintainer): Change from Jim Meyering to "all, glibc",
147078         since getdate now uses intended-for-glibc code.
147079         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
147080         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
147082 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
147084         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
147085         HP's ANSI C compiler.
147086         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
147087         Declaring int functions causes warnings on some modern systems and
147088         shouldn't be needed to compile on ancient ones.
147089         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
147090         defined.
147092         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
147093         with the following changes.
147094         (__set_errno): Parenthesize properly.
147095         Include <stdbool.h>.
147096         (MIN, MAX, MATCHING_INO): New macros.
147097         (__getcwd): Define with prototype, not K&R form.
147098         Use heuristics to allocate default buffer on stack if possible.
147099         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
147100         behavior, and to avoid the PATH_MAX limit when computing
147101         ../../../../...
147102         Use MATCHING_INO to compare inode number to file.
147103         Check for arithmetic overflow in size calculations.
147104         Fix bug in reallocation of dot array that caused getcwd to fail
147105         on directories nested deeper than 75.
147106         Be more careful about saving errno on error.
147107         Do not use realloc; use only free+malloc, as this is a bit
147108         more flexible and avoids a needless copy operation.
147109         Do not inspect st_dev and st_ino for symbolic links; POSIX
147110         doesn't specify the latter.
147111         Check for closedir errors.
147112         Avoid needless casts.
147113         Use "#ifdef weak_alias" around weak_alias, to be like other
147114         glibc code.
147115         The following changes to getcwd.c have effect only when used in
147116         gnulib; they have no effect inside glibc proper.
147117         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
147118         as alloca isn't used.
147119         (alloca, __alloca): Likewise.
147120         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
147121         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
147122         unconditionally, as gnulib assumes C89 or better.
147123         Do not include <sys/param.h>.
147124         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
147125         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
147126         better.
147127         (NULL) [!defined NULL]: Remove; we assume C89 or better.
147128         Include <dirent.h> in a way that is compatible with modern Autoconf.
147129         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
147130         New macros, if not already defined.
147131         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
147132         Use "_LIBC", not "defined _LIBC", for consistency.
147133         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
147134         a mempcpy module.
147135         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
147136         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
147137         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
147138         credit only to Jim Meyering and adjust the copyright dates.
147139         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
147140         <stdlib.h>, <unistd.h>, "pathmax.h".
147141         Instead, include "xgetcwd.h" (first) and "getcwd.h".
147142         (INITIAL_BUFFER_SIZE): Remove.
147143         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
147145 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
147147         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
147148         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
147149         Use the _ONCE methods, for efficiency.
147150         Check for fcntl.h.  In test program, include <errno.h>
147151         and <fcntl.h> if available.  Remove old K&R cruft from
147152         test program.  Check for common errors in GNU/Linux,
147153         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
147154         don't do AC_LIBOBJ, as that's getcwd.m4's job.
147155         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
147156         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
147157         name accordingly.
147158         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
147159         accommodate new getcwd.c.
147160         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
147161         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
147162         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
147163         that's all we need now.
147165 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
147167         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
147168         argp-parse.c depends on getopt internals, that means we should
147169         always use our getopt, to be on the safe side.
147170         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
147171         order not to spoil the result of an eventual previous invocation
147172         of gl_GETOPT_SUBSTITUTE.
147174 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
147176         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
147177         redefinition warnings. To avoid them, include the defines
147178         in `#if !defined __need_getopt ... #endif'. The only place
147179         where __getopt_argv_const is used is in definitions
147180         of getopt_long and getopt_long_only below, which are as well
147181         protected by `#ifndef __need_getopt'.
147182         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
147183         __need_getopt after including <stdio.h> and <unistd.h> These
147184         headers might have defined it.
147186 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
147188         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
147190 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
147192         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
147193         (futimens): New function, which uses futimes if available.
147194         (futimens, utimens): Support timespec==NULL, with same semantics
147195         as utime and utimens.
147196         * lib/utimens.h (futimens): New decl.
147198 2004-11-23  Jim Meyering  <jim@meyering.net>
147200         * lib/getopt_.h: Remove trailing blanks.
147202 2004-11-23  Jim Meyering  <jim@meyering.net>
147204         * lib/__fpending.c: Add comment.
147206 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
147208         * modules/canonicalize (Depends-on): Add xreadlink.
147209         Problem reported by James Youngman.
147211 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
147213         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
147214         New macros.
147215         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
147216         optopt): Use them instead of invoking ## directly; otherwise, the
147217         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
147219 2004-11-19  Bruno Haible  <bruno@clisp.org>
147221         * lib/strtok_r.c: Move comments from here...
147222         * lib/strtok_r.h: ... to here.
147224 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
147226         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
147227         implementations that mishandle size_t overflow.
147229 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
147231         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
147232         might fail.  Problem reported by Yoann Vandoorselaere.
147233         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
147234         implementations that mishandle size_t overflow.
147236 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
147238         * modules/canon-host (Depends-on): Add strdup.
147240 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
147242         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
147244 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
147246         * lib/canon-host.c: Include "strdup.h".
147247         (canon_host): Use getaddrinfo if available, so that IPv6 works.
147248         Use strdup instead of malloc/strcpy to duplicate strings.
147250         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
147251         (human_space_before_unit): New constant.
147252         * lib/human.c (human_readable): Support it.
147254         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
147255         (xgetcwd): Set errno correctly when failing.
147256         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
147257         the failure is actually due to a PATH_MAX problem.
147259         Further getopt changes to make it more likely that glibc will
147260         buy the changes back.
147261         * lib/getopt.c (POSIXLY_CORRECT): New constant.
147262         (getopt): Use it, so to preserve glibc semantic
147263         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
147264         when compiling for libc.
147265         * lib/getopt_.h (__getopt_argv_const): Bring it back.
147266         (getopt_long, getopt_long_only): Use it.
147268         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
147269         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
147270         (getopt): Argv is now char * const *, as per standard.
147271         (_getopt_internal_r, _getopt_internal): Argv is now char **,
147272         not char *__getopt_argv_const *.
147273         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
147274         _getopt_long_only_r): Likewise.
147275         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
147276         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
147277         _getopt_long_r, _getopt_long_only_r): Likewise.
147278         * lib/getopt_.h (__getopt_argv_const): Remove.
147279         (getopt): Argv is now char * const *, as per standard.
147281         * lib/getdate.y (tORDINAL): New token.
147282         (day, relunit): Allow it for relative times.
147283         (relative_time_table): Use tORDINAL for ordinals.
147285 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
147287         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
147288         Document that "second" isn't allowed as an ordinal number.
147290 2004-11-16  Jim Meyering  <jim@meyering.net>
147292         * modules/closeout (Depends-on): Add fpending.
147294 2004-11-15  Jim Meyering  <jim@meyering.net>
147296         * lib/closeout.c: Include "__fpending.h" once again.
147297         Include <stdbool.h>.
147298         (close_stdout): Don't fail just because stdout was closed initially,
147299         since some programs don't write to stdout in the normal course of
147300         operation (other than --version and --help), and we don't want this
147301         function to make e.g. `touch file >&-' fail.
147302         But do fail if it was closed and someone has tried to write to it.
147303         E.g., `printf foo >&-' must fail.
147305 2004-11-13  Jim Meyering  <jim@meyering.net>
147307         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
147309 2004-11-12  Simon Josefsson  <jas@extundo.com>
147311         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
147312         small doc fix is still pending.
147314 2004-11-11  Simon Josefsson  <jas@extundo.com>
147316         * modules/strtok_r: New file.
147318         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
147319         strtok_r.
147321 2004-11-11  Simon Josefsson  <jas@extundo.com>
147323         * m4/strtok_r.m4: New file.
147325         * m4/getopt.m4: Replace opterr.
147327 2004-11-11  Simon Josefsson  <jas@extundo.com>
147329         * lib/strtok_r.h, strtok_r.c: New file.
147331 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
147333         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
147334         of replacing opterr, getopt, etc.  This should handle the
147335         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
147337 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
147339         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
147340         we can stop lying to compilers about the constness of argv when we
147341         are compiled outside glibc.
147342         (getopt, getopt_long, getopt_long_only): Use it.
147343         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
147344         _getopt_internal, getopt): Likewise.
147345         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
147346         _getopt_long_only_r): Likewise.
147347         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
147348         _getopt_long_r, _getopt_long_only_r): Likewise.
147350         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
147351         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
147352         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
147353         the other external symbols.
147354         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
147355         declaration, since the above renaming now works around collisions.
147357 2004-11-11  Jim Meyering  <jim@meyering.net>
147359         * lib/linebreak.c: Remove trailing blanks.
147360         * lib/alloca_.h: Likewise.
147361         * lib/acosl.c: Likewise.
147362         * lib/euidaccess.c: Likewise.
147363         * lib/allocsa.h: Likewise.
147365 2004-11-10  Simon Josefsson  <jas@extundo.com>
147367         * m4/getaddrinfo.m4: New file.
147369 2004-11-10  Simon Josefsson  <jas@extundo.com>
147371         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
147373 2004-11-10  Simon Josefsson  <jas@extundo.com>
147375         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
147376         getaddrinfo.
147378         * modules/getaddrinfo: New file.
147380 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
147382         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
147384 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
147386         * lib/mktime.c (SHR): New macro, which is a portable
147387         substitute for >> that should work even on Crays.
147388         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
147389         Problem reported by Mark D. Baushke in
147390         <http://lists.gnu.org/r/bug-gnulib/2004-11/msg00071.html>.
147391         * lib/getdate.y (SHR): Likewise.
147392         (tm_diff): Use it.
147393         * lib/strftime.c (SHR): Likewise.
147394         (tm_diff): Use it.
147395         * lib/quotearg.c (struct quoting_options): Use unsigned int for
147396         quote_these_too, so that right shifts are well defined.  All uses
147397         changed.
147399 2004-11-10  Jim Meyering  <jim@meyering.net>
147401         Ensure that no close failure goes unreported.
147402         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
147403         return early when it seems there's nothing to flush.
147404         Don't include __fpending.h.
147406 2004-11-10  Jim Meyering  <jim@meyering.net>
147408         * modules/closeout (Depends-on): Remove fpending.
147410 2004-11-10  Jim Meyering  <jim@meyering.net>
147412         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
147414 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
147416         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
147417         gl_FUNC_STRFTIME.
147418         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
147419         and AC_REQUIRE when possible, to avoid duplicate checks.
147420         Check for <wchar.h>.
147422 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
147424         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
147426 2004-11-09  Bruno Haible  <bruno@clisp.org>
147428         * m4/sockpfaf.m4: New file.
147430 2004-11-05  Bruno Haible  <bruno@clisp.org>
147432         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
147433         Reported by Mark D. Baushke <mdb@cvshome.org>.
147435 2004-11-04  Bruno Haible  <bruno@clisp.org>
147437         2004-09-11  Bruno Haible  <bruno@clisp.org>
147438                 * allocsa.valgrind: New file.
147439         2004-02-06  Bruno Haible  <bruno@clisp.org>
147440                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
147441                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
147442                 Reported by Christopher Seip <chris.seip@hp.com>.
147444 2004-11-04  Bruno Haible  <bruno@clisp.org>
147446         * modules/allocsa (Files): Add lib/allocsa.valgrind.
147447         (Makefile.am): Distribute it.
147449 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
147451         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
147452         with errno == ERANGE if the buffer is too small.
147453         Problem reported by Mark D. Baushke.
147455 2004-11-03  Albert Chin  <china@thewrittenword.com>
147456             Paul Eggert  <eggert@cs.ucla.edu>
147458         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
147459         equivalent, substitute $ac_type for equivalent type rather than
147460         blindly using uint32_t *always* which won't work if uint32_t is not
147461         available.  Define _UINT32_T to work around typedef of uint32_t if
147462         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
147463         2.5.1.
147465 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
147467         * m4/jm-macros.m4: Sync from coreutils.
147468         (gl_MACROS): Check for mbrlen, for pathchk.
147469         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
147471 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
147473         * lib/xreadlink.c (MAXSIZE): New macro.
147474         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
147475         size does not exceed MAXSIZE.  Avoid cast.
147476         As suggested by Mark D. Baushke in
147477         <http://lists.gnu.org/r/bug-gnulib/2004-11/msg00009.html>,
147478         if readlink fails with buffer size just under MAXSIZE, try again
147479         with MAXSIZE.
147481 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
147483         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
147485 2004-11-02  Derek R. Price  <derek@ximbiot.com>
147486         and  Paul Eggert  <eggert@cs.ucla.edu>
147488         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
147489         (get_date): Overparenthesize to avoid GCC warning.
147491 2004-11-02  Bruno Haible  <bruno@clisp.org>
147493         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
147494         returns void.
147496 2004-11-02  Bruno Haible  <bruno@clisp.org>
147498         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
147499         function returns void.
147501 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
147503         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
147504         fflush_unlocked, flockfile, funlockfile, funlockfile,
147505         fputs_unlocked, putc_unlocked.
147507 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
147509         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
147510         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
147511         already declared.
147513 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
147515         * modules/getdate (Files): Add doc/getdate.texi.
147516         (Depends-on): Add setenv, xalloc.
147518 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
147520         * lib/getdate.y: Add support for TZ="foo" within a date string.
147521         Fix some bugs near time_t boundaries.  Reject dates with
147522         out-of-range components, e.g., "Sept 31".
147523         Include <stdlib.h>, "setenv.h", "xalloc.h".
147524         (ISDIGIT_LOCALE): Remove; unused.
147525         Note that the TZ and time functions used here are not reentrant.
147526         (mktime_ok, get_tz): New functions.
147527         (TZBUFSIZE): New constant.
147528         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
147529         This requires that we sometimes generate our own TZ="XXX..." setting.
147531 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
147533         * doc/getdate.texi: New file, from coreutils with modifications for
147534         the new TZ parsing.
147536 2004-10-27  Derek R. Price  <derek@ximbiot.com>
147538         * lib/mktime.c (not_equal_tm): Remove redundant check.
147540 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
147542         * modules/regex (lib_SOURCES): Add regex.c.
147543         Reported by James Youngman in
147544         <http://lists.gnu.org/r/bug-gnulib/2004-10/msg00199.html>.
147546 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
147548         * lib/getdate.y: Use Bison 1.875 features, and some minor
147549         code cleanups.  This change does not affect semantics.
147550         Don't include <stdlib.h>; no longer needed.
147551         Don't include unlocked-io.h; only the "#if TEST" code uses
147552         stdio, and performance isn't crucial there.
147553         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
147554         Bison 1.875 features as described below.
147555         All uses of "PC." replaced by "pc->".
147556         (YYSTYPE): Add a forward declaration.
147557         (yylex, yyerror): Use full prototypes in forward decls.
147558         Use "%pure-parser" rather than obsolescent "%pure_parser".
147559         Use %parse-param and %lex-param instead of obsolescent
147560         YYPARSE_PARAM and YYLEX_PARAM.
147561         (meridian_table, month_and_day_table, time_units_table,
147562         relative_time_table, time_zone_table, military_table,
147563         lookup_zone, lookup_word, get_date):
147564         Use NULL instead of 0 where appropriate.
147565         (to_hour): Avoid abort (), to avoid a dependency on
147566         stdlib.h.
147567         (yyerror, yylex): Now accepts parser_control * arg.
147568         (main) [TEST]: Use '\0' rather than 0 for char.
147570 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
147572         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
147574 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
147576         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
147577         It's now the caller's responsibility to handle the case where
147578         !HAVE_GETPAGESIZE && !defined getpagesize.
147580         * lib/mktime.c (leapyear): Arg is long int, not int.
147582 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
147584         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
147586 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
147588         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
147589         missing.  Problem reported by James Youngman.
147591 2004-10-16  Simon Josefsson  <jas@extundo.com>
147593         * gnulib-tool: Fix comments.  Fix parse problem.
147594         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
147596 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
147598         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
147599         implementation of getopt_long.  Problem reported by Alexander Taler in:
147600         http://lists.gnu.org/r/bug-gnulib/2004-10/msg00103.html
147602 2004-10-15  Bruno Haible  <bruno@clisp.org>
147604         * gnulib-tool: Untabify. Initialize supplied_libname.
147605         (func_usage): More homogenous output.
147606         (func_modules_transitive_closure, func_modules_to_filelist,
147607         func_emit_lib_Makefile_am): New functions.
147608         (func_import): New function, extracted from big case statement. Use
147609         func_get_license, func_modules_transitive_closure,
147610         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
147611         opt_lgpl. Don't use test -a, as it's not portable.
147612         (func_create_testdir): Use func_modules_transitive_closure,
147613         func_modules_to_filelist, func_emit_lib_Makefile_am.
147615 2004-10-15  Bruno Haible  <bruno@clisp.org>
147617         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
147619 2004-10-15  Bruno Haible  <bruno@clisp.org>
147621         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
147622         the portions belonging to each module.
147623         Suggested by Derek Robert Price <derek@ximbiot.com>.
147625 2004-10-12  Simon Josefsson  <jas@extundo.com>
147627         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
147628         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
147629         to real functions.
147631 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
147633         * modules/vsnprintf: New file.
147635 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
147637         * m4/vsnprintf.m4: New file.
147639 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
147641         * lib/vsnprintf.h: New file.
147642         * lib/vsnprintf.c: New file.
147644 2004-10-11  Bruno Haible  <bruno@clisp.org>
147646         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
147647         vsnprintf.
147649 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
147651         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
147653 2004-10-07  Bruno Haible  <bruno@clisp.org>
147655         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
147656         fits into the provided buffer.
147658 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
147660         * lib/diacrit.c, diacrit.h: Add GPL notice.
147662         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
147663         notice.
147664         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
147665         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
147666         This avoids a potential constant-folding bug.
147668 2004-10-05  Bruno Haible  <bruno@clisp.org>
147670         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
147671         for the declaration of strsep.
147673 2004-10-05  Bruno Haible  <bruno@clisp.org>
147675         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
147677 2004-10-04  Simon Josefsson  <jas@extundo.com>
147679         * modules/memmem: New file.
147680         * tests/test-memmem.c: New file.
147681         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
147683 2004-10-04  Simon Josefsson  <jas@extundo.com>
147685         * m4/memmem.m4: New file.
147687 2004-10-04  Simon Josefsson  <jas@extundo.com>
147689         * lib/memmem.h: New file.
147690         * lib/memmem.c: New file, taken from glibc.
147692 2004-10-04  Simon Josefsson  <jas@extundo.com>
147694         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
147695         '#ifdef USE_UNLOCKED_IO'.
147697 2004-10-04  Simon Josefsson  <jas@extundo.com>
147699         * config/srclist.txt: Add memmem from glibc.
147701 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
147703         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
147705         * modules/argmatch, modules/argp, modules/closeout, modules/error,
147706         modules/exclude, modules/getdate, modules/getline,
147707         modules/getndelim2, modules/getpass, modules/getpass-gnu,
147708         modules/getusershell, modules/linebuffer, modules/md5,
147709         modules/mountlist, modules/posixtm, modules/readtokens,
147710         modules/readutmp, modules/regex, modules/sha1,
147711         modules/version-etc, modules/yesno:
147712         Remove dependency on unlocked-io.
147714 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
147716         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
147718         * m4/unlocked-io.m4: Add copyright notice.
147719         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
147721 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
147723         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
147724         * lib/xmalloc.c (xmemdup): Likewise.
147725         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
147726         XFREE): Remove these long-obsolescent macros.
147727         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
147728         * lib/xstrdup.c: Remove.
147730         * lib/regex.c (re_comp): Cast gettext return value to char *,
147731         Problem reported by Martin Neitzel via Mark D. Baushke.
147733 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
147735         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
147736         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
147737         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
147738         regex.c, sha1.c, version-etc.c, yesno.c:
147739         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
147740         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
147741         the includer's responsibility.
147743         Sync from coreutils.
147745         * lib/modechange.c (mode_compile): Don't decrement a pointer that
147746         points to the start of a string, as the C Standard says the
147747         resulting behavior is undefined.
147749         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
147750         simple -> simple_backups, numbered_existing ->
147751         numbered_existing_backups, numbered -> numbered_backups
147752         to avoid shadowing problems.  All uses changed.
147753         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
147754         * lib/backupfile.c (check_extension, numbered_backup):
147755         Rename locals to avoid shadowing 'basename'.
147756         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
147757         once.
147759         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
147760         * lib/.cvsignore: Add getopt.h.
147762 2004-10-04  Bruno Haible  <bruno@clisp.org>
147764         * modules/README: New file.
147765         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
147766         not a module.
147768 2004-10-02  Jim Meyering  <jim@meyering.net>
147770         * lib/dirfd.h, getpagesize.h: Add copyright notice.
147772 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
147774         * modules/strsep: New file.
147776 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
147778         * m4/strsep.m4: New file.
147780 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
147782         * lib/strsep.h: New file.
147783         * lib/strsep.c: New file.
147785 2004-10-01  Simon Josefsson  <jas@extundo.com>
147787         * lib/snprintf.c (snprintf): Handle size==0.
147789 2004-10-01  Simon Josefsson  <jas@extundo.com>
147790             Bruno Haible  <bruno@clisp.org>
147792         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
147793         (snprintf): Declare 'args'.
147795 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
147797         * lib/snprintf.c: Remove comments as to why each header is needed.
147799 2004-10-01  Bruno Haible  <bruno@clisp.org>
147801         * MODULES.html.sh: Add strsep.
147803 2004-09-30  Simon Josefsson  <jas@extundo.com>
147805         * modules/snprintf: New file.
147807 2004-09-30  Simon Josefsson  <jas@extundo.com>
147809         * m4/snprintf.m4: New file.
147811 2004-09-30  Simon Josefsson  <jas@extundo.com>
147813         * lib/snprintf.h, lib/snprintf.c: New files.
147815 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
147817         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
147818         (hol_entry_help): Never translate an empty string.
147819         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
147820         * lib/argp.h (OPTION_NO_TRANS): New option.
147822 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
147824         * modules/argp (Maintainer): Replace Simon Josefsson
147825         by Sergey Poznyakoff.
147827 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
147829         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
147830         changes merged back into glibc.
147832 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
147834         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
147836 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
147838         * lib/xvasprintf.c: Include xalloc.h.
147839         (xvasprintf): Use xalloc_die, not xmalloc_die.
147841 2004-09-29  Bruno Haible  <bruno@clisp.org>
147843         * modules/alloca-opt: New file, derived from modules/alloca.
147844         * modules/allocsa: Depend on alloca-opt instead of alloca.
147845         * modules/setenv: Likewise.
147846         * modules/vasnprintf: Likewise.
147847         * MODULES.html.sh: Add alloca-opt.
147849 2004-09-28  Simon Josefsson  <jas@extundo.com>
147851         * gnulib-tool: New parameter --lgpl, to asseert that modules are
147852         LGPL, and to replace license template from GPL to LGPL.
147854 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
147856         * modules/dummy: Change license to LGPL.
147858 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
147860         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
147862 2004-09-24  Simon Josefsson  <jas@extundo.com>
147864         * modules/minmax (License): Change from GPL to LGPL.
147866 2004-09-23  Simon Josefsson  <jas@extundo.com>
147868         * gnulib-tool (--import): Typo.
147870 2004-09-23  Simon Josefsson  <jas@extundo.com>
147872         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
147874 2004-09-22  Bruno Haible  <bruno@clisp.org>
147876         * modules/*: Add 'License' field.
147877         * gnulib-tool: Accept --extract-license option.
147878         (func_get_license): New function.
147880 2004-09-21  Bruno Haible  <bruno@clisp.org>
147882         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
147883         Reported by Simon Josefsson.
147885 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
147887         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
147888         gl_AC_TYPE_LONG_LONG.
147890 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
147892         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
147894 2004-09-18  Simon Josefsson  <jas@extundo.com>
147895         and  Paul Eggert  <eggert@cs.ucla.edu>
147897         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
147898         calls with autoreconf.  Define GL_LIB.
147900 2004-09-14  Karl Berry  <karl@gnu.org>
147902         * config/srclist.txt: unsync setenv.c, sigh.
147904 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
147906         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
147907         Problem reported by Bruno Haible in:
147908         http://lists.gnu.org/r/bug-tar/2004-09/msg00023.html
147910 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
147912         * config/srclist.txt: Comment out argp-pvh.c.
147914 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
147916         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
147917         in case some system header has #define'd it.  Problem reported by
147918         Soeren D. Schulze in
147919         <http://lists.gnu.org/r/bug-gnulib/2004-09/msg00017.html>.
147921 2004-09-09  Karl Berry  <karl@gnu.org>
147923         * regex.[ch]: delete from the root.  These were supposed to be
147924                 synced with emacs cvs, but this has not happened for about
147925                 a year, and anyway nothing else uses emacs regex.[ch].
147926                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
147927                 lib/regex[.ch] is untouched.
147929 2004-09-09  Bruno Haible  <bruno@clisp.org>
147931         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
147933 2004-09-09  Bruno Haible  <bruno@clisp.org>
147935         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
147936         modifications.
147937         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
147939 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
147941         * modules/xvasprintf: New file.
147942         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
147944 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
147946         * lib/xvasprintf.h: New file.
147947         * lib/xvasprintf.c: New file.
147948         * lib/xasprintf.c: New file.
147950 2004-09-08  Bruno Haible  <bruno@clisp.org>
147952         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
147954 2004-09-08  Bruno Haible  <bruno@clisp.org>
147956         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
147957         length is > INT_MAX.
147958         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
147959         more.
147961 2004-09-08  Bruno Haible  <bruno@clisp.org>
147963         * lib/stdint_.h: New file, taken from GNU clisp.
147965 2004-09-08  Bruno Haible  <bruno@clisp.org>
147966             Oskar Liljeblad  <oskar@osk.mine.nu>
147968         * modules/stdint: New file.
147969         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
147971 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
147973         Import from coreutils.
147974         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
147975         strings on unbounded length.  alloca's performance benefits aren't
147976         that important here.
147977         (V_STRDUP): Remove.
147978         (parse_with_separator): New function, with most of the internals
147979         of the old parse_user_spec.  Allow user to omit both user and group,
147980         for compatibility with FreeBSD.
147981         Clone only the user name, not the entire spec.
147982         Do not set *uid, *gid unless entirely successful.
147983         Avoid memory leak in some failing cases.
147984         Fix regression for USER.GROUP reported by Dmitry V. Levin in
147985         <http://lists.gnu.org/r/bug-coreutils/2004-08/msg00102.html>
147986         (parse_user_spec): Rewrite to use parse_with_separator.
147988 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
147990         * modules/userspec: Don't depend on alloca.
147992 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
147994         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
147996 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
147998         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
147999         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
148000         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
148002 2004-08-16  Simon Josefsson  <jas@extundo.com>
148004         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
148005         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
148006         Add --dry-run for --import.
148007         Let user provided command line parameters override configure.ac
148008         settings.
148010 2004-08-12  Simon Josefsson  <jas@extundo.com>
148012         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
148013         as discussed with Paul Eggert in threads rooted at
148014         <http://lists.gnu.org/r/bug-gnulib/2004-06/msg00039.html>
148015         and
148016         <http://lists.gnu.org/r/bug-gnulib/2004-07/msg00001.html>.
148017         Before, the test was empty, and relied on ELIDE_CODE in source
148018         code.)
148019         (gl_PREREQ_GETOPT): New macro.
148020         (gl_GETOPT): Use them.
148022 2004-08-12  Simon Josefsson  <jas@extundo.com>
148024         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
148025         * lib/getopt_.h: Renamed from getopt.h.
148027 2004-08-12  Simon Josefsson  <jas@extundo.com>
148029         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
148030         Change default library name from libfoo to libgnu.
148031         Now, if you have a configure.ac that says:
148032                 gl_SOURCE_BASE(gl)
148033                 gl_M4_BASE(gl/m4)
148034                 gl_MODULES(error getopt etcetera)
148035                 gl_INIT
148036         you can import all you need by running:
148037                 ../gnulib/gnulib-tool --import
148039         * modules/getopt (Files): Rename getopt.h to getopt_.h.
148040         (Makefile.am): Rewrite, use logic from argz.
148041         (Include): Use <getopt.h> instead of "getopt.h".
148043 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
148045         * modules/argp (Files): Add m4/unlocked-io.m4.
148046         (Depends-on): Add extensions.
148048 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
148050         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
148051         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
148052         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
148053         Check for program_invocation_name, program_invocation_short_name,
148054         flockfile, funlockfile, features.h, _getopt_long_only_r.
148056 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
148058         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
148059         its complicated substitute.
148060         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
148061         and program_invocation_name.
148062         (__argp_basename) [!_LIBC]: Remove; the only use was
148063         replaced by its body.
148064         (__argp_short_program_name): Change condition from
148065         !defined __argp_short_program_name to
148066         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
148067         to match argp-namefrob.h.
148068         (__argp_failure): Don't assume strerror_r returns char *.
148069         * lib/argp-parse.c (N_): Define unconditionally.
148070         (argp_default_options): Fill out initializers with 0 to avoid
148071         gcc warnings.
148073 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
148075         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
148076         getopt1.c.
148078 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
148080         Merge from coreutils.
148082         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
148084         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
148085         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
148087 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
148089         Merge from coreutils.
148091         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
148092         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
148093         for Reliant Unix 5.43.
148095         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
148096         (union fooround): Use uintmax_t, not long int.
148097         The rest is a merge from libc:
148098         [defined _LIBC]: Include <shlib-compat.h>.
148099         (_obstack) [defined _LIBC]: Remove after 2.3.4.
148101         * lib/settime.c (settime): Recode to avoid warning with
148102         Sun Forte C 6U2.
148104         * lib/strverscmp.c: Convert to UTF-8.
148106 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
148108         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
148109         m4/uintmax_t.m4.
148111 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
148113         * modules/xalloc-die: New file.
148114         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
148116         * modules/md5 (Files): Add m4/uint32_t.m4.
148117         * modules/sha1: Renamed from modules/sha.
148118         (Files):
148119         Rename lib/sha.h to lib/sha1.h.
148120         Rename lib/sha.c to lib/sha1.c.
148121         Rename m4/sha.m4 to m4/sha1.m4.
148122         (lib_SOURCES): Likewise.
148123         (configure.ac): Rename gl_SHA to gl_SHA1.
148124         (Include): sha.h -> sha1.h.
148126 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
148128         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
148129         * m4/sha1.m4: Renamed from sha.m4.
148130         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
148132 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
148134         * lib/obstack.h (obstack_empty_p):
148135         Don't assume that chunk->contents is suitably aligned.
148136         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
148137         Likewise. Problem reported by Benno in
148138         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
148140         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
148141         readable.  This could be improved further but it'd take some work.
148143 2004-08-08  Simon Josefsson  <jas@extundo.com>
148145         * modules/xgethostname (Depends-on): Remove exit and error (not
148146         used).
148148         * modules/getpass-gnu: Add getpass.h.
148149         (Depends-on): Add stdbool.
148150         * modules/getpass: Add getpass.h.
148152 2004-08-08  Simon Josefsson  <jas@extundo.com>
148154         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
148155         Check getpass declaration.
148157 2004-08-08  Simon Josefsson  <jas@extundo.com>
148159         * lib/xgethostname.c: Don't include error.h (not used).
148161         * lib/getpass.h: Add.
148162         * lib/getpass.c: Include getpass.h first.
148164 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
148166         * lib/xalloc-die.c: New file.
148167         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
148168         All uses removed.
148169         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
148170         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
148171         xalloc-die.c.
148172         (_, N_, xalloc_die): Move to xalloc-die.c.
148173         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
148174         so that we needn't mess with xalloc_msg_memory_exhausted.
148176         * lib/sha1.h: Renamed from sha.h.
148177         (SHA1_H): Renamed from _SHA_H.
148178         (sha1_ctx): Renamed from sha_ctx.
148179         (sha1_init_ctx): Renamed from sha_init_ctx.
148180         (sha1_process_block): Renamed from sha_process_block.
148181         (sha1_process_bytes): Renamed from sha_process_bytes.
148182         (sha1_finish_ctx): Renamed from sha_finish_ctx.
148183         (sha1_read_ctx): Renamed from sha_read_ctx.
148184         (sha1_stream): Renamed from sha_stream.
148185         (sha1_buffer): Renamed from sha_buffer.
148186         * lib/sha1.c: Likewise; renamed from sha.c.
148187         Do not include <sys/types.h>.
148188         Include <stddef.h> rather than <stdlib.h>.
148190 2004-08-08  Bruno Haible  <bruno@clisp.org>
148192         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
148193         FILESYSTEM_PREFIX_LEN.
148194         * lib/progreloc.c: Likewise.
148195         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
148197 2004-08-06  Simon Josefsson  <jas@extundo.com>
148199         * modules/progname (Depends-on): Don't depend on stdbool.
148201 2004-08-06  Simon Josefsson  <jas@extundo.com>
148203         * modules/getsubopt: New file.
148204         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
148205         getsubopt.
148207 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
148209         More merge from coreutils.
148211         * m4/utimens.m4, m4/utimecmp.m4: New files.
148212         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
148213         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
148214         prereq.m4, sha.m4: Import changes from coreutils.
148216 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
148218         More merge from coreutils.
148219         * modules/raise, modules/readtokens0, modules/utimens:
148220         * modules/utimecmp, module/xnanosleep: New files.
148221         * modules/strftime: Add lib/strftime.h.
148222         Change include from <time.h> to "strftime.h".
148223         * modules/yesno: Add lib/yesno.h.
148224         * modules/backupfile: Remove lib/addext.c.
148225         * modules/euidaccess: Add stat-macros.h.
148226         * modules/canonicalize, modules/euidaccess,
148227         modules/filemode, modules/lchown, modules/makepath,
148228         modules/rmdir, modules/stat: Likewise.
148230 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
148232         Merge from tar.
148233         * lib/argp-help.c (make_hol, hol_append): Don't assume that
148234         SIZE_MAX is a valid preprocessor constant.
148235         (__argp_basename): Change from "#ifndef _LIBC"
148236         to "#ifndef __argp_short_program_name", so that
148237         we don't compile these functions for tar.
148239         More merges from coreutils.
148240         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
148241         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
148242         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
148243         * lib/addext.c: Remove; no longer needed.
148244         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
148245         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
148246         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
148247         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
148248         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
148249         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
148250         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
148251         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
148252         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
148253         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
148254         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
148255         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
148256         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
148257         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
148258         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
148259         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
148260         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
148261         Import changes from coreutils.
148263 2004-08-05  Simon Josefsson  <jas@extundo.com>
148265         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
148267 2004-08-05  Simon Josefsson  <jas@extundo.com>
148269         * m4/getsubopt.m4: New file.
148271 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
148273         Merge from coreutils.
148275         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
148276         * m4/getcwd-path-max.m4: New files.
148278         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
148279         FILESYSTEM_PREFIX_LEN ->
148280         FILE_SYSTEM_PREFIX_LEN.
148281         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
148282         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
148283         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
148284         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
148286         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
148287         prerequisite modules now handle the DOS stuff.
148288         Don't check for unistd.h.
148290 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
148292         Merge from coreutils.
148294         * lib/.gdb-history: Remove; this doesn't belong here.
148296         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
148297         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
148298         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
148299         * lib/getcwd.c: New files.
148301         * lib/dirname.h: Include <stdbool.h>.
148302         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
148303         for consistency with POSIX terminology.  All uses changed.
148304         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
148305         (strip_trailing_slashes): Use bool for booleans.
148306         * lib/stripslash.c (strip_trailing_slashes): Likewise.
148308         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
148309         sometimes returns a positive errno value even when it succeeds.
148310         (print_errno_message) [!LIBC]: Fall back on strerror if
148311         __strerror_r fails.
148313         * lib/path-concat.c (mempcpy): Don't define if a system header defines
148314         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
148315         (longest_relative_suffix): New function.
148316         (path_concat): Use it.  Assume first argument is not NULL.
148317         Port to DOS.  Omit redundant separators.
148318         Report an error instead of returning NULL.
148319         Use mempcpy instead of memcpy.
148320         (xpath_concat): Remove: not declared or used.
148322         * lib/same.h: Include <stdbool.h>
148323         (same_name): Return bool, not int.
148324         * lib/same.c (same_name): Likewise.
148325         (errno): Don't declare; we assume C89 or better now.
148327         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
148328         if not already defined.
148330         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
148331         * lib/dup-safer.c (errno): Likewise.
148333 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
148335         Merge from coreutils.
148336         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
148337         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
148338         * modules/path-concat: Don't depend on strdup.
148340 2004-08-03  Simon Josefsson  <jas@extundo.com>
148342         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
148343         * lib/progname.h: Don't include stdbool.h.
148345 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
148347         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
148348         * MODULES.html.sh (func_all_modules): Remove fatal.
148350 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
148352         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
148354 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
148356         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
148357         working.
148359 2004-08-02  Simon Josefsson  <jas@extundo.com>
148361         * lib/getsubopt.h: New file, with comments from Bruno Haible.
148362         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
148363         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
148365 2004-08-01  Simon Josefsson  <jas@extundo.com>
148367         * lib/xgetdomainname.c: Include stdlib.h, for free().
148369 2004-07-19  Bruno Haible  <bruno@clisp.org>
148371         * MODULES.html.sh (func_all_modules): Add dummy.
148373 2004-07-16  Simon Josefsson  <jas@extundo.com>
148375         * modules/dummy: New file.
148377 2004-07-16  Simon Josefsson  <jas@extundo.com>
148379         * lib/dummy.c: New file.
148381 2004-07-16  Bruno Haible  <bruno@clisp.org>
148383         * lib/backupfile.h: Add extern "C" for C++.
148384         * lib/closeout.h: Likewise.
148385         * lib/copy-file.h: Likewise.
148386         * lib/findprog.h: Likewise.
148387         * lib/full-write.h: Likewise.
148388         * lib/pathname.h: Likewise.
148389         * lib/progname.h: Likewise.
148390         * lib/stpcpy.h: Likewise.
148391         * lib/stpncpy.h: Likewise.
148392         * lib/strcase.h: Likewise.
148393         * lib/strstr.h: Likewise.
148394         * lib/xalloc.h: Likewise.
148396         * lib/mbswidth.h: Add extern "C" for C++.
148397         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
148399 2004-07-13  Robert Millan  <robertmh@gnu.org>
148401         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
148403 2004-07-09  Simon Josefsson  <jas@extundo.com>
148405         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
148406         failed without this.)
148408 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
148410         * modules/chown (Files): Add lib/fchown-stub.c, since
148411         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
148413 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
148415         * lib/fchown-stub.c: New file.
148417 2004-06-24  Jim Meyering  <jim@meyering.net>
148419         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
148421 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
148423         * modules/argz: Omit "#include".
148425         * MODULES.html.sh (func_all_modules): Add calloc, to match
148426         2004-06-01 addition of calloc module.
148428 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
148430         * m4/argz.m4: New file, which is autoupdated from libtool.
148432 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
148434         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
148435         libtool.
148437 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
148439         * config/srclist-update: Don't insist on "USA." before the
148440         close-comment, as libtool omits the period and puts the */ on a
148441         separate line.
148442         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
148443         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
148445 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
148447         * modules/argz: New file.
148448         * MODULES.html.sh (func_all_modules): Add argz.
148450 2004-06-12  Jim Meyering  <jim@meyering.net>
148451         and  Paul Eggert  <eggert@cs.ucla.edu>
148453         * modules/hash (Files): Add lib/xalloc.h.
148454         * modules/pipe (Depends-on): Add wait-process.
148455         * modules/stat (Depends-on): Add xalloc.
148456         * modules/userspec (Files): Add lib/userspec.h.
148457         * modules/xstrtol (Depends-on): Add error.
148459 2004-06-10  Jim Meyering  <jim@meyering.net>
148461         * lib/calloc.c: New file.
148463 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
148465         * lib/getdate.y (yylex): Allow space between sign and number.
148466         Problem reported by Dan Jacobson.
148468 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
148470         Merge from coreutils CVS.
148472         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
148473         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
148474         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
148475         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
148476         xstrtol.m4: Fix copyright date and/or serial number.
148478         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
148479         See if we need an fchown replacement.
148480         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
148481         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
148482         and use the replacement function if we detect either defect.
148484         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
148485         gl_UTIMECMP.
148487 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
148488         and  Jim Meyering  <jim@meyering.net>
148490         Merge from coreutils CVS.
148492         * lib/stat-macros.h: New file, with contents from file-type.h
148493         and coreutils' system.h.
148494         * lib/file-type.c: Include "stat-macros.h".
148495         * lib/file-type.h (file_type): Move all macro definitions to new file,
148496         stat-macros.h.
148497         * modules/file-type: Add lib/stat-macros.h.
148499         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
148500         Wrap old code with this conditional.
148501         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
148502         function that does not dereference symlinks.
148503         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
148505         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
148506         dependency problems.
148507         (xreadlink): Accept new arg SIZE, for efficiency.
148508         All decls and uses changed.
148509         * lib/xreadlink.h: Include <stddef.h>, for size_t.
148511         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
148512         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
148514         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
148515         sysexits.h.
148517 2004-06-01  Jim Meyering  <jim@meyering.net>
148519         * m4/calloc.m4: New file.
148520         * modules/calloc: New file.
148522 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
148524         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
148525         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
148526         Also, fix a typo in a diagnostic.
148528 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
148530         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
148531         or AC_FUNC_REALLOC.
148533 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
148535         * modules/hash (Depends-on): Remove malloc, realloc.
148536         * modules/xalloc (Depends-on): Likewise.
148538         * README: Mention that the 'free' module works around the
148539         problem with 'free (0)'.
148540         Mention LIA-1 and C99.
148541         Add a copyright notice.
148543         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
148544         macros to be defined.
148545         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
148546         the allocator returns NULL because the requested size is zero.
148548 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
148550         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
148551         var.  Add comment explaining why libc still defines it.  This
148552         merges the following patch from glibc:
148553         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
148555 2004-05-20  Andreas Schwab  <schwab@suse.de>
148557         * m4/free.m4: Replace free if it not known to work, not the other
148558         way round.
148560 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
148562         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
148563         present in glibc since revision 1.1 of this file.
148564         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
148565         obstack_alignment_mask, obstack_alloc, obstack_base,
148566         obstack_blank, obstack_blank_fast, obstack_chunk_size,
148567         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
148568         obstack_grow0, obstack_init, obstack_int_grow,
148569         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
148570         obstack_next_free, obstack_object_size, obstack_ptr_grow,
148571         obstack_ptr_grow_fast, obstack_room): Remove declarations of
148572         nonexistent functions.
148574 2004-05-18  Karl Berry  <karl@gnu.org>
148576         * config/srclist.txt: break link for vasnprintf.c.
148578 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
148580         Port obstack to the AS/400, where pointers are 16 bytes wide and
148581         you cannot cast an integer to a valid pointer.  This patch is
148582         currently waiting to be integrated into glibc; see
148583         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
148585         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
148586         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
148587         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
148588         (struct obstack): temp member is now a union of a pointer and
148589         an integer, instead of an integer.  All integer uses changed.
148590         This does not affect the physical layout of struct obstack,
148591         except on hosts (like the AS/400) where the size or alignment of
148592         void * is greater than that of ptrdiff_t.
148593         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
148594         __STDC__)]: Store temporary in pointer member of union, not
148595         integer member.
148596         * lib/obstack.c: Include <stddef.h>, for offsetof.
148597         (struct fooalign): Remove; it doesn't need a name.
148598         (union fooround): Change double to long double, and add void *.
148599         (DEFAULT_ALIGNMENT): Use offsetof to compute.
148600         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
148601         not a macro.  Hence the values are always int; so remove all
148602         casts-to-int in uses.
148604 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
148606         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
148607         we can get this patch merged into glibc.
148609 2004-05-17  Derek R. Price  <derek@ximbiot.com>
148610             Paul Eggert  <eggert@cs.ucla.edu>
148612         * m4/argp: Depend on alloca.
148614 2004-05-17  Derek R. Price  <derek@ximbiot.com>
148615             Paul Eggert  <eggert@cs.ucla.edu>
148617         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
148618         freecoding.
148620 2004-05-17  Bruno Haible  <bruno@clisp.org>
148622         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
148623         precision that consists of a '.' followed by an empty digit string.
148624         Patch by Tor Lillqvist <tml@iki.fi>.
148626 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
148628         * modules/getdate: Depend on alloca.
148629         * modules/setenv: Likewise.
148631 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
148633         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
148634         for backward compatibility with older code.  We need our own
148635         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
148636         it under some other name, and our alloca.h will define it.
148638 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
148639             Derek Price  <derek@ximbiot.com>
148641         * lib/alloca.c: Include <alloca.h>, to get our interface.
148642         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
148643         include <alloca.h> first.  Use C89 prototype for alloca; this
148644         requires including <stddef.h> for size_t.  Use extern "C" if C++.
148645         Use #elif for simplicity, since we can assume C89 now.
148646         Don't try to source the system alloca.h since it will not be found
148647         and to prevent recursively including its replacement.
148648         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
148649         * lib/regex.c: Likewise.
148651 2004-05-16  Derek Price  <derek@ximbiot.com>
148652             Paul Eggert  <eggert@cs.ucla.edu>
148654         getline cleanup.  This changes the getndelim2 API: both order of
148655         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
148656         no delimiter).
148658         * lib/getline.c: Don't include stddef.h or stdio.h, since our
148659         interface does that.
148660         (getline): Always use getdelim, so that we don't have two
148661         copies of this code.
148662         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
148663         if available.
148664         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
148665         (GETNDELIM2_MAXIMUM): New macro.
148666         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
148667         instead of the old practice of delim2==0.  All callers changed.
148668         Return -1 on overflow, instead of returning junk.
148669         Do not set *linesize unless allocation succeeds.
148670         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
148671         that we include sys/types.h.
148672         * lib/getnline.h: Likewise.
148673         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
148674         (getndelim2): Reorder arguments.
148675         * lib/getnline.c (getnline, getndelim):
148676         Don't discard the NMAX argument.
148677         (getnline): Invoke getndelim, to avoid code duplication.
148678         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
148679         of (size_t) -1 by callers of the getnline family.
148681 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
148683         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
148684         Check for gettimeofday.
148685         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
148686         Check for settimeofday, stime.
148688 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
148690         * lib/nanosleep.c (suspended): Change its type from int to
148691         sig_atomic_t volatile.
148692         (first_call): Make it private to rpl_nanosleep, and have it
148693         be zero initially as that's a bit faster.
148694         (my_usleep): Round up fractional times instead of truncating them,
148695         as this is the usual meaning for 'sleep'.
148697         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
148698         doesn't work.
148699         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
148700         (ENOSYS): Define if not defined.
148701         (settime): Fall back on stime if it exists and settimeofday fails.
148702         But don't bother with fallbacks if a method fails with errno == EPERM.
148704 2004-05-11  Jim Meyering  <jim@meyering.net>
148706         Prior to this change, the save_cwd caller required read access to the
148707         current directory on most systems (ones with the fchdir function).
148709         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
148710         fails, try write-only, and finally, resort to using xgetcwd.
148712 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
148714         * lib/obstack.c, obstack.h: Import changes from libc.
148716 2004-05-04  Derek Price  <derek@ximbiot.com>
148718         * modules/argp: Remove dependency on alloca.
148720 2004-04-28  Bruno Haible  <bruno@clisp.org>
148722         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
148723         also implicitly appends .exe to executables.
148724         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
148725         accepts Windows pathnames.
148726         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
148727         Treat Cygwin like Windows, since it now accepts Windows pathnames.
148728         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
148729         Treat Cygwin like Windows, since it now accepts Windows pathnames.
148730         Reported by Derek Robert Price <derek@ximbiot.com>.
148732 2004-04-27  Derek Price  <derek@ximbiot.com>
148734         * m4/dos.m4 (gl_AC_DOS): Add Cygwin to list of Windows/DOS
148735         environments that accept backslashes and drive letters in paths.
148737 2004-04-21  Karl Berry  <karl@gnu.org>
148739         * config/srclist.txt (localcharset.c): break sync.
148741 2004-04-20  Paul Eggert  <eggert@twinsun.com>
148743         * m4/host-os.m4: Add a copyright notice.
148745 2004-04-20  Jim Meyering  <jim@meyering.net>
148747         * modules/dirfd: Change UTILS_ macro name prefix to gl_.
148748         * modules/mkstemp: Likewise.
148749         * modules/mkdir: Likewise.
148751         Change UTILS_ to gl_ in AC_DEFINE'd names.
148752         Change utils_- and jm_-prefixed variables, too.
148753         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
148754         UTILS_FUNC_MKDIR_TRAILING_SLASH.
148755         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
148757         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
148758         Don't emit trailing blanks.
148759         Also rename jm_-prefixed variables to have gl_ prefix.
148761         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
148762         Also rename jm_-prefixed variables to have gl_ prefix.
148764         * m4/jm-macros.m4: Reflect the renamings.
148765         * m4/prereq.m4: Likewise.
148767 2004-04-20  Jim Meyering  <jim@meyering.net>
148769         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
148770         memory.
148772 2004-04-20  Jim Meyering  <jim@meyering.net>
148773             Bruno Haible  <bruno@clisp.org>
148775         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
148776         memory when realloc fails.
148778 2004-04-19  Jim Meyering  <jim@meyering.net>
148780         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
148781         now that readutmp.c may call `free (0)'.
148783 2004-04-19  Bruno Haible  <bruno@clisp.org>
148785         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
148786         * m4/inttypes_h.m4: Likewise.
148787         * m4/stdint_h.m4: Likewise.
148788         * m4/intmax_t.m4: Likewise.
148789         * m4/uintmax_t.m4: Likewise.
148791 2004-04-18  Jim Meyering  <jim@meyering.net>
148793         * m4/prereq.m4: Don't forbid jm_ prefix.
148795         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
148796         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
148797         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
148798         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
148799         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
148800         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
148801         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
148802         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
148803         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
148804         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
148805         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
148806         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
148807         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
148808         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
148809         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
148810         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
148811         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
148812         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
148813         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
148815 2004-04-18  Jim Meyering  <jim@meyering.net>
148817         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
148818         failure, don't leak memory and do call END_UTMP_ENT.
148820 2004-04-18  Jim Meyering  <jim@meyering.net>
148822         Change jm_ to gl_ in AC_DEFINE'd names.
148823         * modules/assert, modules/chown, modules/fpending:
148824         * modules/ftruncate, modules/getgroups, modules/group-member:
148825         * modules/lchown, modules/lstat, modules/memcmp:
148826         * modules/nanosleep, modules/putenv, modules/stat:
148827         * modules/strftime, modules/unlocked-io, modules/utime:
148828         * modules/xstrtoimax, modules/xstrtoumax:
148830 2004-04-16  Jim Meyering  <jim@meyering.net>
148832         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
148833         coreutils' stat program.
148834         (gl_PREREQ): Don't require jm_PREREQ_STAT.
148836 2004-04-12  Paul Eggert  <eggert@twinsun.com>
148838         * config/srclist.txt: Restore setenv.c, unsetenv.c from gettext.
148839         Add intmax.m4, printf-posix.m4, sig_atomic_t.m4,
148840         signalblocking.m4, ssize_t.m4.
148841         * lib/unsetenv.c: Regenerate: this subtracts 1 from the
148842         copyright year (!).
148843         * m4/printf-posix.m4: Regenerate.
148845         * modules/inttostr (EXTRA_DIST): Move inttostr.c here....
148846         (lib_SOURCES): from here.
148847         * modules/getopt (lib_SOURCES): Add getopt_int.h.
148849 2004-04-12  Jim Meyering  <jim@meyering.net>
148851         * MODULES.html.sh (func_all_modules): Add cloexec, inttostr, free,
148852         tzset.
148854 2004-04-11  Paul Eggert  <eggert@twinsun.com>
148856         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
148857         C89.
148858         (CHAR_BIT): Remove, since we assume C89.
148859         Include <stdint.h> if available, as per current Autoconf CVS advice.
148861 2004-03-31  Jim Meyering  <jim@meyering.net>
148863         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
148864         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
148865         * m4/xalloc.m4: Likewise.
148867 2004-03-30  Paul Eggert  <eggert@twinsun.com>
148869         Merge from coreutils.
148871         * m4/inttostr.m4: New file.
148872         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
148873         Require AM_STDBOOL_H and gl_TIMESPEC instead.
148874         Require gl_CLOCK_TIME.
148875         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
148877 2004-03-30  Paul Eggert  <eggert@twinsun.com>
148879         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
148880         not bool, to be more consistent with Unix conventions.
148881         Suggested by Bruno Haible.
148883         Merge from coreutils.
148885         * modules/inttostr: New file.
148886         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
148887         * lib/umaxtostr.c: New files.
148889         * modules/getdate: Depend on timespec, stdbool, gettime.
148890         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
148891         the usual <time.h> dance.
148892         (get_date): Change signature to support fractional time stamps.
148893         All callers changed.
148894         * lib/getdate.y: Include "getdate.h" first, as we can now
148895         assume C89 and don't need to worry about 'const'.
148896         Similarly, include "unlocked-io.h" near start, not in middle.
148897         Include <limits.h>.
148898         (textint.value): Use long int rather than int.
148899         (textint.digits): Use size_t rather than int.
148900         (BILLION, LOG10_BILLION): New constants.
148901         (parser_control): New member rel_ns.  Members day_ordinal,
148902         time_zone, month, day, hour, minutes, rel_year, rel_month,
148903         rel_day, rel_hour, rel_minutes, rel_seconds
148904         are now long int, not int.  Member seconds is now struct timespec,
148905         not int.  New member timespec_seen.  Members dates_seen, days_seen,
148906         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
148907         not int.
148908         (%union.intval): Now long int, not int.
148909         New member timespec.
148910         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
148911         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
148912         (spec): Now is a timespec or an item list.
148913         (timespec, items): New nonterminals.
148914         (time, rel, relunit, number, get_date):
148915         Add support for fractional seconds.
148916         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
148917         (gmtime, localtime, mktime): Remove decls; not needed with C89.
148918         (to_hour): First arg is now long int, not int.
148919         (to_year): Returns long int, not int.
148920         Don't treat year -70 like 70.
148921         (tm_diff): Returns long int, not int.
148922         (lookup_word): Use bool instead of int when appropriate.
148923         (yylex): Use size_t for count, not int.
148924         Detect overflow when parsing large integer constants.
148925         Add support for fractions.
148926         (get_date): Make pointers 'const' if possible.
148927         Use more-portable code to detect integer overflow.
148928         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
148929         Don't use ctime; it's not reliable if the year has >4 digits.
148931         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
148932         This is for compatibility with BSD.
148934         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
148935         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
148936         From coreutils' system.h.
148938         * lib/userspec.c: Don't include "posixver.h".
148939         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
148940         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
148941         compatible extension.  Simplify code by removing a boolean int
148942         that was always nonzero if a string was nonnull.
148944 2004-03-30  Jim Meyering  <jim@meyering.net>
148946         Merge from coreutils.
148948         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
148949         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
148950         on some systems one must include <grp.h> before it.
148951         Reported by Christian Krackowizer.
148953 2004-03-30  Jim Meyering  <jim@meyering.net>
148955         Merge from coreutils.
148957         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
148959         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
148960         an empty input stream.
148962         * lib/readtokens.c: Include <stdbool.h>.
148963         (readtoken): Use `size_t' rather than int/long.
148964         All callers adjusted.
148965         Use `bool' rather than `int' where appropriate.
148966         Use memset rather than an explicit loop.
148967         Use x2nrealloc rather than xrealloc.
148968         Allow the use of `\0' as a delimiter.
148969         (readtokens): Likewise.
148970         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
148972 2004-03-30  Jim Meyering  <jim@meyering.net>
148974         * modules/realloc (Files): Remove m4/realloc.m4.
148975         (configure.ac): Depend on AC_FUNC_REALLOC, rather than jm_FUNC_REALLOC.
148976         * modules/malloc (Files): Remove m4/malloc.m4.
148977         (configure.ac): Depend on AC_FUNC_MALLOC, rather than jm_FUNC_MALLOC.
148978         * m4/realloc.m4: Remove file, since now it does no more than
148979         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
148980         the `configure.ac' section of module/realloc.
148981         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
148983 2004-03-30  Bruno Haible  <bruno@clisp.org>
148985         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
148986         nonnull.
148988 2004-03-29  Paul Eggert  <eggert@twinsun.com>
148990         Merge changes to getloadavg.c from coreutils and Emacs.
148992         * modules/getloadvg: Depend on cloexec and xalloc.
148993         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
148994         Define to an expression, not to the empty string.
148995         Include cloexec.h and xalloc.h.
148996         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
148997         Use set_cloexec_flag rather than rolling our own.
148998         * lib/cloexec.c, lib/cloexec.h: New files.
149000 2004-03-29  Paul Eggert  <eggert@twinsun.com>
149002         * m4/cloexec.m4: New file.
149004 2004-03-18  Paul Eggert  <eggert@twinsun.com>
149006         * lib/getopt.h: Sync with libc CVS.
149008 2004-03-18  Paul Eggert  <eggert@twinsun.com>
149009             Bruno Haible  <bruno@clisp.org>
149011         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
149012         mbswidth.
149014 2004-03-18  Paul Eggert  <eggert@twinsun.com>
149015             Bruno Haible  <bruno@clisp.org>
149017         * lib/mbswidth.h: Include <wchar.h> only if
149018         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
149019         <wchar.h>.
149020         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
149022 2004-03-09  Paul Eggert  <eggert@twinsun.com>
149024         * modules/getopt: Add lib/getopt_int.h.
149025         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
149026         Sync with libc CVS.
149027         * lib/getopt_int.h: New file, also synced from libc.
149029 2004-03-09  Paul Eggert  <eggert@twinsun.com>
149031         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
149032         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
149033         Bring back getopt.c, getopt.h, getopt1.c.
149035 2004-03-07  Paul Eggert  <eggert@twinsun.com>
149037         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
149038         All uses changed.  Check for sa_sigaction member; this fixes
149039         a bug first reported by Jason Andrade in
149040         <http://mail.gnu.org/r/bug-textutils/2003-03/msg00027.html>.
149042 2004-03-07  Paul Eggert  <eggert@twinsun.com>
149044         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
149045         '#if' expressions.  Unlike the code it replaces, it does not
149046         depend on (defined _SC_PAGESIZE).  However, it does depend on
149047         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
149048         first reported by Jason Andrade in
149049         <http://mail.gnu.org/r/bug-textutils/2003-03/msg00027.html>.
149051 2004-02-25  Simon Josefsson  <jas@extundo.com>
149053         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
149055 2004-02-25  Simon Josefsson  <jas@extundo.com>
149057         * lib/strdup.h: New file.
149058         * lib/strdup.c: Include it.
149059         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
149060         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
149062 2004-02-23  Karl Berry  <karl@gnu.org>
149064         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
149065         (from fencepost.gnu.org:/gd/gnuorg).
149067 2004-02-23  Karl Berry  <karl@gnu.org>
149069         * config/srclistvars.sh (GNUORG) [karl]: redefine.
149070         * config/srclist.txt: add maintain/standards documents.
149072 2004-02-22  Bruno Haible  <bruno@clisp.org>
149074         * modules/xalloc: Remove dependency on stdbool.
149075         Reported by Derek Robert Price <derek@ximbiot.com>.
149077 2004-02-18  Bruno Haible  <bruno@clisp.org>
149079         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
149080         Reported by Derek Robert Price <derek@ximbiot.com>.
149082 2004-02-16  Karl Berry  <karl@gnu.org>
149084         * config/mkinstalldirs, install-sh: update from automake.
149086 2004-02-06  Karl Berry  <karl@gnu.org>
149088         * m4/po.m4: update from gettext 0.14.1.
149090 2004-02-06  Karl Berry  <karl@gnu.org>
149092         * lib/config.charset: update from gettext 0.14.1.
149094 2004-02-05  Paul Eggert  <eggert@twinsun.com>
149096         Add comments and code, prompted by suggestions from Bruno Haible
149097         for sh-quote.
149098         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
149099         describing the enum quoting_style values.
149100         * lib/quotearg.c (quotearg_alloc): New function.
149101         (quotearg_buffer_restyled): Treat lone { and } as special.
149102         Treat = as special.  Work around bug with older shells
149103         that "see" a '\' that is really the 2nd byte of a multibyte char.
149104         Quote empty string with shell_quoting_style.
149106 2004-02-03  Bruno Haible  <bruno@clisp.org>
149108         * modules/pipe: New file.
149109         * MODULES.html.sh (func_all_modules): Add pipe.
149110         * m4/pipe.m4: New file, from GNU gettext.
149112 2004-02-03  Bruno Haible  <bruno@clisp.org>
149114         * lib/pipe.h: New file, from GNU gettext.
149115         * lib/pipe.c: New file, from GNU gettext.
149117 2004-01-27  Bruno Haible  <bruno@clisp.org>
149119         * modules/execute: New file.
149120         * MODULES.html.sh (func_all_modules): Add execute.
149121         * m4/execute.m4: New file, from GNU gettext.
149123 2004-01-27  Bruno Haible  <bruno@clisp.org>
149125         * lib/execute.h: New file, from GNU gettext.
149126         * lib/execute.c: New file, from GNU gettext.
149127         * lib/w32spawn.h: New file, from GNU gettext.
149129 2004-01-24  Paul Eggert  <eggert@twinsun.com>
149131         Merge from diffutils.
149133         * lib/file-type.c (file_type): Add typed memory objects.
149134         * lib/file-type.h (S_TYPEISTMO): New macro.
149136         * lib/c-stack.h (c_stack_action): Remove argv argument.
149137         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
149138         (die): Don't calculate message unless segv_action returns.
149139         (get_stack_location, min_address_from_argv, max_address_from_argv,
149140         volatile stack_base, volatile_stack_size): Remove.
149141         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
149142         that every segmentation violation is a stack overflow.  (Ouch!)
149143         See Debian bug 136249 (still outstanding) for more info about why
149144         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
149146 2004-01-24  Paul Eggert  <eggert@twinsun.com>
149148         Exit-status fix from coreutils.
149150         Use exit_failure consistently in place of EXIT_FAILURE,
149151         so that program exit statuses are consistent on failure.
149153         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
149154         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
149155         * lib/argmatch.h: Comment fix to match the above.
149156         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
149157         Now a macro referring to exit_failure, instead of a separate
149158         variable.  Include "exitfail.h" to get it.
149159         * lib/xstrtol.h: Include "exitfail.h".
149160         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
149162         * lib/long-options.c (parse_long_options): Use prototype
149163         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
149164         for clarity.
149166 2004-01-23  Paul Eggert  <eggert@twinsun.com>
149168         * modules/argmatch, modules/obstack, modules/xstrtol:
149169         Depend on exitfail.
149171 2004-01-21  Jim Meyering  <jim@meyering.net>
149173         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
149174         so as not to conflict with a different-sized __mktime_internal
149175         function in GNU libc.
149176         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
149177         Problem building statically-linked `ls' reported by Michael Brunnbauer.
149179 2004-01-20  Karl Berry  <karl@gnu.org>
149181         * config/config.guess: update from config.
149183         * config/srclistvars.sh: GNUWWWLICENSES for karl.
149185 2004-01-20  Bruno Haible  <bruno@clisp.org>
149187         Safer stack allocation.
149188         * modules/setenv: Depend on allocsa instead of alloca.
149189         * lib/setenv.c: Include allocsa.h.
149190         (alloca): Remove fallback definition.
149191         (freea): Remove macro.
149192         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
149193         instead of freea.
149195 2004-01-20  Bruno Haible  <bruno@clisp.org>
149197         * m4/eealloc.m4: New file, from GNU gettext.
149199 2004-01-20  Bruno Haible  <bruno@clisp.org>
149201         * m4/allocsa.m4: New file, from GNU gettext.
149203 2004-01-20  Bruno Haible  <bruno@clisp.org>
149205         * modules/xallocsa: New file.
149206         * MODULES.html.sh (func_all_modules): Add xallocsa.
149207         * lib/xallocsa.h: New file, from GNU gettext.
149208         * lib/xallocsa.c: New file, from GNU gettext.
149210 2004-01-20  Bruno Haible  <bruno@clisp.org>
149212         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
149214 2004-01-20  Bruno Haible  <bruno@clisp.org>
149216         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
149217         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
149218         specially.
149220 2004-01-20  Bruno Haible  <bruno@clisp.org>
149222         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
149223         patch.
149225 2004-01-20  Bruno Haible  <bruno@clisp.org>
149227         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
149229 2004-01-20  Bruno Haible  <bruno@clisp.org>
149231         * modules/eealloc: New file.
149232         * MODULES.html.sh (func_all_modules): Add eealloc.
149233         * lib/eealloc.h: New file.
149235 2004-01-20  Bruno Haible  <bruno@clisp.org>
149237         * lib/binary-io.h: Avoid warnings on Cygwin.
149239 2004-01-20  Bruno Haible  <bruno@clisp.org>
149241         * modules/allocsa: New file.
149242         * MODULES.html.sh (func_all_modules): Add allocsa.
149243         * lib/allocsa.h: New file, from GNU gettext.
149244         * lib/allocsa.c: New file, from GNU gettext.
149246 2004-01-18  Karl Berry  <karl@gnu.org>
149248         * doc/gpl.texi, doc/lgpl.texi: new files.
149250 2004-01-18  Karl Berry  <karl@gnu.org>
149252         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
149253         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
149255 2004-01-18  Simon Josefsson  <jas@extundo.com>
149257         * modules/strdup (Files, Makefile.am): Add strdup.h.
149259 2004-01-15  Paul Eggert  <eggert@twinsun.com>
149261         * modules/poll: Add BUILT_SOURCES.
149262         Prefer "$@" to "poll.h" in rule for building poll.h.
149263         All this is for consistency with alloca and fnmatch.
149265         * modules/same: Depend on stdbool.
149267 2004-01-15  Paul Eggert  <eggert@twinsun.com>
149269         Merge from coreutils.
149271         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
149272         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
149273         (gl_DEFAULT_POSIX2_VERSION): Move
149274         the documentation from 'configure' into 'config.hin',
149275         so that 'configure --help' isn't burdened by it and
149276         we don't have to worry about its formatting there.
149277         Reword the documentation so that it's more succinct
149278         and can be run together into a single paragraph.
149279         * m4/same.m4 (gl_SAME): Check for pathconf.
149281 2004-01-15  Paul Eggert  <eggert@twinsun.com>
149283         Merge from coreutils.
149285         * lib/posixver.c: Include posixver.h.
149287         * lib/same.c: Include <stdbool.h>, <limits.h>.
149288         (_POSIX_NAME_MAX): Define if not defined.
149289         (MIN): New macro.
149290         (same_name): If file names are silently truncated, report
149291         that the file names are the same if they are the same after
149292         the silent truncation.
149294         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
149295         conversion function.
149296         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
149297         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
149298         longer needed.
149300 2004-01-15  Jim Meyering  <jim@meyering.net>
149302         Merge from coreutils.
149304         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
149305         if no library is required.
149306         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
149307         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
149308         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
149309         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
149310         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
149311         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
149312         value, $ac_cv_search_crypt, if it's "none required".
149313         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
149314         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
149315         not gl_FUNC_GETLOADAVG.
149316         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
149317         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
149319 2004-01-15  Jim Meyering  <jim@meyering.net>
149321         Merge from coreutils.
149323         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
149324         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
149325         http://mail.gnu.org/r/bug-coreutils/2003-11/msg00144.html
149327         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
149328         optional configure-time default.
149330         * lib/version-etc.c (version_etc_copyright): Update copyright date.
149332         * lib/xreadlink.c (xreadlink): Correct outdated comment.
149334 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
149336         Merge from coreutils.
149338         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
149339         value, $ac_cv_search_nanosleep, if it's "none required".
149341 2004-01-14  Paul Eggert  <eggert@twinsun.com>
149343         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
149344         with like-named macro in fnmatch.c.
149345         (EXT): Use an internal constant instead.
149347         Merge fnmatch patches from glibc.
149348         * lib/fnmatch.c (mbsinit): Remove define.
149349         Add libc_hidden_ver (__fnmatch, fnmatch).
149350         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
149351         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
149353 2004-01-14  Karl Berry  <karl@gnu.org>
149355         * config/install-sh: update from automake.
149357 2004-01-13  Karl Berry  <karl@gnu.org>
149359         * config/install-sh: update from automake.
149361 2004-01-09  Karl Berry  <karl@gnu.org>
149363         * config/install-sh: update from automake.
149365 2004-01-05  Karl Berry  <karl@gnu.org>
149367         * config/config.{sub,guess}: update from config.
149369 2003-12-31  Karl Berry  <karl@gnu.org>
149371         * config/depcomp: update from automake.
149373 2003-12-14  Karl Berry  <karl@gnu.org>
149375         * lib/config.charset: update from gettext-runtime.
149377 2003-12-03  Paul Eggert  <eggert@twinsun.com>
149379         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
149380         Bug reported by Alfred M. Szmidt.
149382 2003-12-03  Bruno Haible  <bruno@clisp.org>
149384         Upgrade from gettext-0.13.
149385         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
149386         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
149387         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
149388         * m4/gettext.m4: Upgrade from gettext-0.13.
149389         * m4/po.m4: Upgrade from gettext-0.13.
149390         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
149391         * m4/intmax.m4: New file, from gettext-0.13.
149392         * m4/printf-posix.m4: New file, from gettext-0.13.
149394 2003-11-29  Karl Berry  <karl@gnu.org>
149396         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
149398 2003-11-25  Paul Eggert  <eggert@twinsun.com>
149399             Bruno Haible  <bruno@clisp.org>
149401         * lib/printf-parse.h: Don't include sys/types.h.
149402         (ARG_NONE): New macro.
149403         (char_directive): Change type of *arg_index fields to size_t.
149404         * lib/printf-parse.c: Don't include sys/types.h.
149405         (SSIZE_MAX): Remove macro.
149406         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
149407         Remove unnecessary overflow check.
149408         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
149409         fields.
149411 2003-11-25  Bruno Haible  <bruno@clisp.org>
149413         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
149415 2003-11-25  Bruno Haible  <bruno@clisp.org>
149417         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
149418         gt_TYPE_SSIZE_T.
149420 2003-11-24  Paul Eggert  <eggert@twinsun.com>
149422         * modules/alloca: Remove dependency on xalloc.
149424 2003-11-24  Paul Eggert  <eggert@twinsun.com>
149426         * lib/alloca.c: Remove dependency on xalloc module.
149427         (xalloc_die): Remove.
149428         (memory_full) [!defined emacs]: New macro.
149429         [!defined emacs]: Don't include xalloc.h.
149430         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
149431         address arithmetic overflows.  Change datatypes a bit to avoid
149432         unnecessary casts.
149434 2003-11-22  Jim Meyering  <jim@meyering.net>
149436         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
149437         s/size/size_t/.
149439 2003-11-21  Karl Berry  <karl@gnu.org>
149441         * config/config.{sub,guess}: update from config.
149443 2003-11-18  Karl Berry  <karl@gnu.org>
149445         * config/config.{sub,guess}: update from config.
149447         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
149449 2003-11-17  Paul Eggert  <eggert@twinsun.com>
149451         * README: Mention that S+T cannot overflow if S is the size of
149452         an existing object and T is sufficiently small.
149454 2003-11-17  Jim Meyering  <jim@meyering.net>
149456         On systems without utime and without a utimes function capable of
149457         dealing with a NULL struct utimbuf* argument, this utime replacement
149458         could -- in unusual circumstances -- leak a file descriptor.
149459         * lib/utime.c: Include <unistd.h> and <errno.h>.
149460         (utime_null): Be sure to close `fd' and to preserve errno.
149461         Reported by Geoff Collyer via Arnold Robbins.
149463 2003-11-17  Bruno Haible  <bruno@clisp.org>
149465         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
149466         (Depends-on): Add xsize.
149468 2003-11-17  Bruno Haible  <bruno@clisp.org>
149470         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
149472 2003-11-17  Bruno Haible  <bruno@clisp.org>
149474         * lib/vasnprintf.c (alloca): Remove fallback definition.
149475         (freea): Remove definition.
149476         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
149477         Reported by Paul Eggert.
149479 2003-11-16  Paul Eggert  <eggert@twinsun.com>
149480             Bruno Haible  <bruno@clisp.org>
149482         Protect against address arithmetic overflow.
149483         * lib/printf-args.h: Include stddef.h.
149484         (arguments): Change type of field 'count' to size_t.
149485         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
149486         'unsigned int' where appropriate.
149487         * lib/printf-parse.h: Include sys/types.h.
149488         (char_directive): Change type of *arg_index fields to ssize_t.
149489         (char_directives): Change type of fields 'count', max_*_length to
149490         size_t.
149491         * lib/printf-parse.c: Include sys/types.h and xsize.h.
149492         (SSIZE_MAX): Define fallback value.
149493         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
149494         instead of 'int' where appropriate. Check a_allocated, d_allocated
149495         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
149496         * lib/vasnprintf.c: Include xsize.h.
149497         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
149498         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
149499         overflow. Avoid wraparound when converting a width or precision from
149500         decimal to binary.
149502 2003-11-16  Bruno Haible  <bruno@clisp.org>
149504         Update from GNU gettext.
149505         * lib/printf-parse.c: Generalize to it can be compiled for wide
149506         strings.
149507         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
149508         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
149509         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
149510         SNPRINTF): New macros.
149511         Don't include <alloca.h> if the file is used inside libintl.
149512         (local_wcslen): New function, for Solaris 2.5.1.
149513         (VASNPRINTF): Use it instead of wcslen.
149515 2003-11-16  Bruno Haible  <bruno@clisp.org>
149517         * lib/xsize.h (xmax): New function.
149518         (xsum, xsum3, xsum4): Declare as "pure" functions.
149520 2003-11-12  Paul Eggert  <eggert@twinsun.com>
149522         * modules/xalloc (Files): Undo latest change, since xalloc.h
149523         no longer needs SIZE_MAX or PTRDIFF_MAX.
149525 2003-11-12  Paul Eggert  <eggert@twinsun.com>
149527         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
149528         gl_PTRDIFF_MAX.
149530 2003-11-12  Paul Eggert  <eggert@twinsun.com>
149532         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
149533         "return", to pacify some unknown compiler.  Problem reported
149534         by Joerg Schilling.
149536 2003-11-12  Paul Eggert  <eggert@twinsun.com>
149538         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
149539         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
149540         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
149541         heuristic is just as accurate as far as we know, and it removes a
149542         dependency on size_max.m4 and ptrdiff_max.m4.
149544 2003-11-11  Bruno Haible  <bruno@clisp.org>
149546         * modules/xsize (Files): Add m4/size_max.m4.
149547         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
149549 2003-11-11  Bruno Haible  <bruno@clisp.org>
149551         * m4/size_max.m4: New file.
149552         * m4/ptrdiff_max.m4: New file.
149553         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
149554         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
149555         (gl_XALLOC): Invoke it.
149557 2003-11-11  Bruno Haible  <bruno@clisp.org>
149559         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
149560         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
149561         defined.
149563 2003-11-10  Paul Eggert  <eggert@twinsun.com>
149565         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
149566         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
149567         rejected some allocations of exactly SIZE_MAX - 2 bytes.
149568         From Bruno Haible.
149569         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
149570         not (size_t) -1, since it's defined here.
149572 2003-11-09  Karl Berry  <karl@gnu.org>
149574         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
149576 2003-11-06  Paul Eggert  <eggert@twinsun.com>
149578         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
149579         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
149580         Reject sizes of exactly SIZE_MAX bytes.
149581         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
149582         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
149584 2003-11-05  Bruno Haible  <bruno@clisp.org>
149586         * lib/xsize.h: Include limits.h, to avoid a possible collision with
149587         SIZE_MAX defined in <limits.h> on Solaris.
149589 2003-11-04  Jim Meyering  <jim@meyering.net>
149591         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
149592         variable names, rather than @VAR@.
149593         * modules/poll: Likewise.
149595 2003-11-04  Bruno Haible  <bruno@clisp.org>
149597         * modules/xsize: New file.
149598         * modules/linebreak: Depend on xsize.
149599         * MODULES.html.sh (func_all_modules): Add xsize.
149601 2003-11-04  Bruno Haible  <bruno@clisp.org>
149603         * m4/xsize.m4: New file.
149605 2003-11-04  Bruno Haible  <bruno@clisp.org>
149607         * lib/xsize.h: New file.
149608         * lib/linebreak.c: Include xsize.h.
149609         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
149610         argument for overflow.
149611         Suggested by Paul Eggert.
149613 2003-11-03  Karl Berry  <karl@gnu.org>
149615         * config/config.{guess,sub}: update from config.
149617 2003-11-03  Jim Meyering  <jim@meyering.net>
149619         * modules/userspec (lib_SOURCES): Add userspec.h.
149620         (Include): Add "userspec.h".
149621         Improve description.
149623 2003-11-03  Jim Meyering  <jim@meyering.net>
149625         * lib/userspec.c: Include "userspec.h".
149626         * lib/userspec.h: New file.
149628 2003-11-03  Bruno Haible  <bruno@clisp.org>
149630         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
149632 2003-11-03  Bruno Haible  <bruno@clisp.org>
149634         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
149635         available, to avoid (extremely rare) race condition.
149636         Suggested by Paul Eggert.
149638 2003-11-02  Karl Berry  <karl@gnu.org>
149640         * config/srclist.txt (vasprintf.c): sync broken, sigh.
149642 2003-10-31  Paul Eggert  <eggert@twinsun.com>
149644         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
149645         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
149646         (read_filesystem_list): Set and use me_type_malloced.
149647         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
149648         whatever the type happens to be), for brevity and consistency.
149649         Check for size calculation overflow on Alphas running OSF/1.
149651 2003-10-31  Jim Meyering  <jim@meyering.net>
149653         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
149655         * lib/linebuffer.c: Include <string.h> for declaration of memset.
149657 2003-10-30  Paul Eggert  <eggert@twinsun.com>
149658             Bruno Haible  <bruno@clisp.org>
149660         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
149661         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
149663 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
149665         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
149666         netbsd*-gnu*.  Suggested by Robert Millan.
149668 2003-10-29  Paul Eggert  <eggert@twinsun.com>
149670         * modules/group-member: Depend on stdbool.
149672 2003-10-29  Paul Eggert  <eggert@twinsun.com>
149674         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
149676 2003-10-29  Paul Eggert  <eggert@twinsun.com>
149678         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
149679         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
149680         after the 'gnu' in these cases.  This fixes some bugs in the
149681         previous change, and is based on suggestions by Robert Millan.
149683 2003-10-29  Paul Eggert  <eggert@twinsun.com>
149685         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
149686         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
149687         no longer needed.
149688         * lib/quotearg.c (quotearg_n_options): Use it.
149689         * lib/group-member.c: Include <stdbool.h>.
149690         (free_group_info): Arg is now const *; don't free arg.
149691         (get_group_info): Now returns bool and accepts struct group_info *,
149692         rather than returning a malloc'ed struct group_info *.
149693         All uses changed.  Check for overflow in internal size calculation.
149695         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
149696         rather than xmalloc/xrealloc.
149697         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
149698         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
149699         conformance bug: the old code used a pointer after freeing the
149700         storage that it addressed.
149701         * lib/hash.c (hash_initialize): Simplify the code by using
149702         xalloc_oversized rather than doing it by hand.
149703         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
149704         the buffer preserved.  Use free and xmalloc instead.
149705         * lib/quotearg.c (quotearg_n_options): Likewise.
149706         Use a simpler test for size overflow.  Don't use xalloc_oversized
149707         because unsigned int might be wider than size_t (!); this suggests
149708         that we should switch from unsigned int to size_t for slot numbers.
149710 2003-10-28  Paul Eggert  <eggert@twinsun.com>
149712         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
149713         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
149714         NetBSD kernels.  Requested by Richard Stallman.
149716 2003-10-27  Paul Eggert  <eggert@twinsun.com>
149718         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
149719         to allocate the returned structure.  Do not allocate a subarray,
149720         as x2nrealloc will do that.
149721         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
149722         instead of xnrealloc.
149723         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
149725 2003-10-27  Bruno Haible  <bruno@clisp.org>
149727         * lib/stdbool_.h: Better support for BeOS.
149729 2003-10-26  Paul Eggert  <eggert@twinsun.com>
149731         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
149732         now uses inline.
149734 2003-10-26  Paul Eggert  <eggert@twinsun.com>
149736         * lib/xalloc.h (xalloc_oversized): New static inline function, for
149737         callers that want to do their own size-overflow checking.  Include
149738         <stdbool.h>, since xalloc_oversized returns bool.
149739         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
149740         to use xalloc_oversized.
149742         Add two functions x2realloc, x2nrealloc, for programs that grow
149743         arrays dynamically by doubling their sizes.
149744         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
149745         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
149746         New functions.
149748         Port to C99 semantics for 'inline' of external functions.
149749         Bug reported by Bruno Haible.
149750         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
149751         with the old contents of xnmalloc.
149752         (xnmalloc, xmalloc): Use it.
149753         (xnrealloc_inline): New static inline function,
149754         with the old contents of xnrealloc.
149755         (xnrealloc, xrealloc): Use it.
149757         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
149758         that.
149760 2003-10-26  Karl Berry  <karl@gnu.org>
149762         * config/srclist.txt (COPYING.DOC): no longer available from
149763         /gd/gnuorg; don't know where the ultimate source is.
149765 2003-10-25  Paul Eggert  <eggert@twinsun.com>
149767         Fix several address-calculation bugs in the hash modules,
149768         plus some minor code cleanup.
149770         * lib/hash.h: Include <stdbool.h>, for bool.
149771         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
149772         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
149773         hash_get_n_entries, hash_get_max_bucket_length,
149774         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
149775         hash_rehash): Use size_t rather than unsigned.
149776         * lib/hash.c (struct hash_table, hash_get_n_buckets,
149777         hash_get_n_buckets_used, hash_get_n_entries,
149778         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
149779         hash_get_entries, hash_do_for_each, hash_string, is_prime,
149780         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
149781         Likewise.
149782         (SIZE_MAX): Define if not defined.
149783         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
149784         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
149785         hash_print):
149786         Use const * when possible.
149787         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
149788         (check_tuning): Fix bug: if tuning parameters were very close to
149789         0 or 1, rounding errors could have caused subscript violations.
149790         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
149791         (hash_initialize): Add 'fail:' label
149792         to free table and return NULL, and use it to simplify code.
149793         Use calloc rather than clearing the storage ourself.
149794         (hash_initialize, hash_rehash): Check for arithmetic overflow in
149795         buffer size calculations.
149796         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
149797         Include <stddef.h>, for size_t.
149798         * lib/hash-pjw.c (hash_pjw): Likewise.
149799         Switch to method described by Bruno Haible.
149800         Include <limits.h>, for CHAR_BIT.
149801         (SIZE_BITS): New macro.
149803 2003-10-23  Paul Eggert  <eggert@twinsun.com>
149805         * m4/getline.m4 (AM_FUNC_GETLINE):
149806         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
149807         hosts.  Problem reported by Derek Robert Price in
149808         <http://mail.gnu.org/r/bug-gnulib/2003-10/msg00092.html>.
149809         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
149810         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
149812 2003-10-21  Paul Eggert  <eggert@twinsun.com>
149814         * lib/getndelim2.c (getndelim2): When size calculation overflows,
149815         ceiling the allocation at NMAX bytes rather than silently
149816         discarding input bytes before NMAX is reached.  This makes
149817         a difference only if NMAX exceeds SIZE_MAX / 2.
149819         * lib/obstack.c: Merge from glibc.
149820         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
149821         Add libc_hidden_def (_obstack_newchunk).
149822         (_obstack_free) [! defined _LIBC]: Remove.
149823         [defined _LIBC]: Make a strong alias from obstack_free, rather than
149824         a clone of the function body.
149825         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
149826         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
149828         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
149829         glibc.
149830         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
149831         arg to memcpy.
149833         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
149834         (obstack_ptr_grow_fast, obstack_int_grow_fast):
149835         Don't use lvalue casts, as GCC plans to remove support for them
149836         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
149837         was also present in the non-GCC version, indicating that this
149838         code had always been buggy and had never been widely used.
149839         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
149840         Use the fast variant of each macro, rather than copying the
149841         definiens of the fast variant; that way, we'll be more likely to
149842         catch future bugs in the fast variants.
149844 2003-10-20  Bruno Haible  <bruno@clisp.org>
149846         * modules/wait-process: New file.
149847         * MODULES.html.sh (func_all_modules): Add wait-process.
149849 2003-10-20  Bruno Haible  <bruno@clisp.org>
149851         * m4/wait-process.m4: New file.
149853 2003-10-20  Bruno Haible  <bruno@clisp.org>
149855         * lib/wait-process.h: New file, from GNU gettext.
149856         * lib/wait-process.c: New file, from GNU gettext.
149858 2003-10-19  Jim Meyering  <jim@meyering.net>
149860         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
149861         HPUX 10.20.
149863 2003-10-18  Karl Berry  <karl@gnu.org>
149865         * config/config.guess: update from config.
149867 2003-10-16  Paul Eggert  <eggert@twinsun.com>
149869         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
149870         (getgroups): First arg is int, not size_t.
149871         Don't let 'free' mangle errno.
149873 2003-10-16  Paul Eggert  <eggert@twinsun.com>
149875         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
149877 2003-10-16  Karl Berry  <karl@gnu.org>
149879         * config/config.{guess,sub}: update from config.
149881 2003-10-16  Jim Meyering  <jim@meyering.net>
149883         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
149884         memcpy.
149886 2003-10-15  Paul Eggert  <eggert@twinsun.com>
149888         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
149889         (SIZE_MAX): Remove.
149890         (new_exclude, add_exclude_file): Initial size no longer needs to
149891         be a power of 2.
149892         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
149893         our own address arithmetic overflow checking.
149895         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
149896         (fnmatch): Do not alloca more than 2000 wide characters;
149897         instead, use malloc for large buffers.
149898         Check for address arithmetic overflow, and return -1
149899         with errno set to ENOMEM in that case.
149900         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
149901         (NEW_PATTERN): Do not alloca more than 8000 bytes;
149902         instead, return -1.  Check for address arithmetic overflow.
149904 2003-10-14  Paul Eggert  <eggert@twinsun.com>
149906         Handle invalid suffixes and overflow independently, so that
149907         callers can treat them independently as needed.  Fix some bugs in
149908         suffix handling, e.g., "100k@" was not diagnosed as an invalid
149909         suffix for a human-readable blocksize.  The major caller-visible
149910         change is the addition of a new
149911         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
149912         that both overflow and suffix chars were found.
149914         * lib/human.c (humblock): Don't check separately for invalid suffix
149915         char; that is xstrtoumax's job (now that its bug is fixed).
149916         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
149917         INTMAX_MAX]: New macros.
149918         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
149919         TYPE_MAXIMUM): New macros.
149920         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
149921         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
149922         if overflow occurs, as it's what __strtol does and it's more useful
149923         in practice.
149924         (__xstrtol): If __strtol reports some error other than ERANGE,
149925         reflect it to the caller as LONGINT_INVALID.  If it reports
149926         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
149927         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
149928         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
149929         value.
149930         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
149931         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
149932         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
149933         [defined UINTMAX_MAX]: New macros.
149935 2003-10-14  Bruno Haible  <bruno@clisp.org>
149937         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
149939 2003-10-14  Bruno Haible  <bruno@clisp.org>
149941         * m4/sig_atomic_t: New file, from GNU gettext.
149942         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
149944 2003-10-14  Bruno Haible  <bruno@clisp.org>
149946         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
149947         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
149948         Also use volatile where needed.
149950 2003-10-12  Paul Eggert  <eggert@twinsun.com>
149952         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
149953         Change maintainer from Bruno Haible to 'all'.
149955 2003-10-12  Paul Eggert  <eggert@twinsun.com>
149957         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
149959 2003-10-12  Paul Eggert  <eggert@twinsun.com>
149961         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
149962         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
149963         and define in terms of the other primitives.
149964         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
149965         (SIZE_MAX): Define if not already defined.
149966         (array_size_overflow): New function.
149967         (xalloc_die): Abort instead of exiting if 'error' returns.
149968         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
149969         (xmalloc, xrealloc): Use them.
149970         (xcalloc): Check for address arithmetic overflow.
149971         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
149972         a bit faster than strcpy.
149974 2003-10-10  Simon Josefsson  <jas@extundo.com>
149976         * modules/argp (Depends-on): Add restrict and strcase.
149978 2003-10-10  Simon Josefsson  <jas@extundo.com>
149980         * m4/argp.m4: Add AC_C_INLINE.
149982 2003-10-08  Paul Eggert  <eggert@twinsun.com>
149984         Merge getpass from libc, plus a few fixes.
149986         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
149987         Include <stdbool.h>.
149988         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
149989         __fsetlocking to empty.
149990         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
149991         do include <bits/libc-lock.h>.
149992         Do not include <fcntl.h>; not needed.
149993         [_LIBC]: Include <wchar.h>.
149994         (NOTCANCEL_MODE): New macro.
149995         (flockfile, funlockfile) [_LIBC]: New macros.
149996         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
149997         [!_LIBC]: New macros.
149998         (call_fclose): New function.
149999         (getpass): Use it.  Save tty stream separately; this simplifies the
150000         code and makes it more reliable if stdin happens to equal stdout.
150001         Invoke __fsetlocking on tty.
150002         Handle thread cancellation if needed.
150003         Namespace cleanup (use __tcgetattr, __getline).
150004         Use bool for Booleans.
150005         [USE_IN_LIBIO]: Handle wide streams.
150006         [!_LIBC]: Unconditionally do the fseek, since we don't know what
150007         stream might go where.
150009         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
150010         doesn't have to include <stdio.h> before us.
150011         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
150012         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
150013         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
150014         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
150015         if not declared, so that we can use getpass.c code from libc without
150016         rewriting it.
150017         (flockfile, ftrylockfile, funlockfile): New macros.
150019 2003-10-08  Paul Eggert  <eggert@twinsun.com>
150021         * modules/getpass: Depend on stdbool.
150023 2003-10-08  Paul Eggert  <eggert@twinsun.com>
150025         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
150027 2003-10-07  Karl Berry  <karl@gnu.org>
150029         * config/config.{guess,sub}: update from config.
150031 2003-10-06  Jim Meyering  <jim@meyering.net>
150032             Bruno Haible  <bruno@clisp.org>
150034         This lets translators provide better translations for the
150035         "Written by ..." part of --version output.
150036         * lib/version-etc.h: Include stdarg.h.
150037         (version_etc_copyright): Declare as readonly.
150038         (version_etc): Make this function variadic with a NULL-terminated list
150039         of author name strings.
150040         (version_etc_va): New declaration.
150041         * lib/version-etc.c: Include stdarg.h, stdlib.h.
150042         (version_etc_copyright): Declare as readonly.
150043         (version_etc_va): New function. Provide a different translatable string
150044         for each possible number of authors < 10. Abbreviate when there are 10
150045         authors or more.
150046         (version_etc): Make this function variadic. Call version_etc_va.
150047         Suggestion from Gary V. Vaughan.
150049         * lib/long-options.h (parse_long_options): Change prototype: the
150050         authors string is moved to the end and becomes variadic.
150051         * lib/long-options.c: Include stdarg.h.
150052         (parse_long_options): Make this function variadic, too.
150053         Call version_etc_va, not version_etc.
150055 2003-10-06  Bruno Haible  <bruno@clisp.org>
150057         * modules/version-etc-2: Remove file.
150058         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
150060 2003-10-06  Bruno Haible  <bruno@clisp.org>
150062         * modules/fatal-signal: New file.
150063         * MODULES.html.sh (func_all_modules): Add fatal-signal.
150065 2003-10-06  Bruno Haible  <bruno@clisp.org>
150067         * m4/fatal-signal.m4: New file.
150068         * m4/signalblocking.m4: New file, from GNU gettext.
150070 2003-10-06  Bruno Haible  <bruno@clisp.org>
150072         * lib/version-etc-2.h: Remove file.
150073         * lib/version-etc-2.c: Remove file.
150075 2003-10-06  Bruno Haible  <bruno@clisp.org>
150077         * lib/fatal-signal.h: New file, from GNU gettext.
150078         * lib/fatal-signal.c: New file, from GNU gettext.
150080 2003-10-05  Paul Eggert  <eggert@twinsun.com>
150082         * README: Rework advice for preventing empty .o files.
150083         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
150084         not <sys/types.h>.
150086 2003-10-04  Karl Berry  <karl@gnu.org>
150088         * lib/argp*: update from libc.
150090 2003-10-04  Karl Berry  <karl@gnu.org>
150092         * config/config.{guess,sub}: update from config.
150094 2003-10-02  Bruno Haible  <bruno@clisp.org>
150096         * modules/lchown (Include): Add lchown.h.
150097         * modules/time_r (Include): Use "..." syntax.
150098         * modules/xgetdomainname (Include): Add xgetdomainname.h.
150100 2003-10-01  Simon Josefsson  <jas@extundo.com>
150102         * MODULES.html.sh (func_all_modules): Move gethostname from section
150103         'based on' to section 'lacking' POSIX:2001.
150105 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
150107         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
150108         to output mode on the same stream.
150110 2003-09-29  Paul Eggert  <eggert@twinsun.com>
150112         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
150113         Fix arg typo in previous patch.
150115 2003-09-28  Jim Meyering  <jim@meyering.net>
150117         * lib/error.c: Correct cpp indentation.
150119 2003-09-27  Paul Eggert  <eggert@twinsun.com>
150121         * modules/free: New file.
150123 2003-09-27  Paul Eggert  <eggert@twinsun.com>
150125         * m4/free.m4: New file.
150127 2003-09-27  Paul Eggert  <eggert@twinsun.com>
150129         * lib/minmax.h (MIN, MAX)
150130         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
150131         Omit the special code that used __typeof__, since we worry that
150132         it could be more trouble than it's worth.  See:
150133         http://mail.gnu.org/r/bug-gnulib/2003-01/msg00090.html
150134         http://mail.gnu.org/r/bug-gnulib/2003-01/msg00095.html
150136         * lib/free.c: New file.
150138 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
150140         Trivial fixes to Makefile.am parts of module listings.
150141         * modules/strstr: Append strstr.h to lib_SOURCES.
150142         * modules/strcase: Likewise, for strcase.h.
150144 2003-09-27  Karl Berry  <karl@gnu.org>
150146         * config/mkinstalldirs: update from automake.
150148 2003-09-26  Paul Eggert  <eggert@twinsun.com>
150150         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
150151         (error_tail): Do not loop, reallocating temporary buffer, since
150152         the output cannot contain more wide characters than the input
150153         contains bytes, the size must be big enough already.  This avoids
150154         one potential size overflow calculation.  Check for size overflow
150155         when calculating temporary buffer size.  Free temporary buffer
150156         when done, if it was allocated with malloc; this plugs a memory
150157         leak.  Remove casts from void * to pointers, that are no longer
150158         needed now that we're assuming C89 or better.
150160         Merge error changes from glibc.
150162         * lib/error.c, error.h: Update copyright notice header to match glibc.
150163         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
150164         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
150165         Disable cancellation while printing error.
150166         * lib/error.h: Prepend __ to parameter names.
150168 2003-09-26  Jim Meyering  <jim@meyering.net>
150170         * lib/error.c (error_tail): Move some declarations
150171         into inner scope where the local variables are used.
150173 2003-09-26  Bruno Haible  <bruno@clisp.org>
150175         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
150176         stpncpy().
150177         Don't define stpncpy through config.h; it's now done through stpncpy.h.
150179 2003-09-26  Bruno Haible  <bruno@clisp.org>
150181         * lib/stpncpy.h (gnu_stpncpy): New declaration.
150182         (stpncpy): Define as alias for gnu_stpncpy.
150183         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
150185 2003-09-25  Simon Josefsson  <jas@extundo.com>
150187         * lib/xgetdomainname.h: New file.
150188         * lib/xgetdomainname.c: New file.
150190 2003-09-25  Simon Josefsson  <jas@extundo.com>
150191             Bruno Haible  <bruno@clisp.org>
150193         * modules/getdomainname: New file.
150194         * modules/xgetdomainname: New file.
150195         * MODULES.html.sh (func_all_modules): Add getdomainname,
150196         xgetdomainname.
150198 2003-09-25  Simon Josefsson  <jas@extundo.com>
150199             Bruno Haible  <bruno@clisp.org>
150201         * m4/getdomainname.m4: New file.
150203 2003-09-25  Simon Josefsson  <jas@extundo.com>
150204             Bruno Haible  <bruno@clisp.org>
150206         * lib/getdomainname.h: New file.
150207         * lib/getdomainname.c: New file.
150209 2003-09-25  Karl Berry  <karl@gnu.org>
150211         * lib/argp-fmtstream.c, argp-help.c: update from libc.
150213 2003-09-25  Karl Berry  <karl@gnu.org>
150215         * config/install-sh: update from automake.
150217 2003-09-25  Bruno Haible  <bruno@clisp.org>
150219         * modules/version-etc-2: New file, from modules/version-etc with
150220         modifications.
150221         * MODULES.html.sh (func_all_modules): Add version-etc-2.
150223 2003-09-25  Bruno Haible  <bruno@clisp.org>
150225         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
150226         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
150228 2003-09-24  Simon Josefsson  <jas@extundo.com>
150230         * modules/xgethostname: Add xgethostname.h.
150232 2003-09-24  Paul Eggert  <eggert@twinsun.com>
150234         * lib/linebuffer.c (freebuffer): Don't free the argument, just
150235         the buffer associated with the argument.  Bug reported by
150236         Simon Josefsson.
150238 2003-09-24  Paul Eggert  <eggert@twinsun.com>
150240         * README: Document assumptions that 'int' is at least 32 bits
150241         wide, that integer arithmetic is 2's complement without overflow,
150242         that there are no holes in integer values, that adding sizes of
150243         two nonoverlapping objects can't overflow, and that all-bits-zero
150244         yields scalar zero.  Fix spelling and capitalization typos.
150246 2003-09-19  Karl Berry  <karl@gnu.org>
150248         * lib/argp.h: update from libc.
150250 2003-09-17  Paul Eggert  <eggert@twinsun.com>
150252         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
150253         to avoid spurious warnings like "AC_RUN_IFELSE was called before
150254         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
150256 2003-09-17  Paul Eggert  <eggert@twinsun.com>
150258         * gnulib-tool: Use "test -h", not "test -L", for portability
150259         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
150260         (tags_regexp): Remove, since \| doesn't conform to POSIX.
150261         (sed_extract_prog): Issue s commands one-by-one, rather than
150262         using \| in one s command.
150264 2003-09-16  Paul Eggert  <eggert@twinsun.com>
150266         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
150267         input error, instead of returning NULL the next time we are called
150268         (and therefore losing track of errno).
150270 2003-09-16  Bruno Haible  <bruno@clisp.org>
150272         * gnulib-tool (func_create_testdir): Warn about duplicated
150273         dependencies.
150275 2003-09-15  Paul Eggert  <eggert@twinsun.com>
150277         * modules/argmatch, modules/fatal, modules/obstack,
150278         modules/xalloc, modules/xgethostname: Sort dependencies by
150279         importance, not alphabetically.
150281 2003-09-15  Paul Eggert  <eggert@twinsun.com>
150283         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
150284         fails, so that the caller gets the proper errno.
150286         * lib/readutmp.c (read_utmp): Likewise.
150287         Check for fstat error.  Close stream and free storage
150288         when failing.
150290 2003-09-14  Karl Berry  <karl@gnu.org>
150292         * config/srclist.txt (strdup.c): disable for c89 changes.
150294 2003-09-14  Jim Meyering  <jim@meyering.net>
150296         * lib/getloadavg.c: Correct cpp indentation.
150297         * lib/strdup.c: Likewise.
150298         * lib/vasnprintf.c: Likewise.
150300 2003-09-14  Bruno Haible  <bruno@clisp.org>
150302         * modules/fwriteerror: New file.
150303         * MODULES.html.sh (func_all_modules): Add fwriteerror.
150305 2003-09-14  Bruno Haible  <bruno@clisp.org>
150307         * lib/fwriteerror.h: New file.
150308         * lib/fwriteerror.c: New file.
150310 2003-09-12  Paul Eggert  <eggert@twinsun.com>
150312         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
150313         modules/xgethostname, modules/xalloc: Depend on exit.
150315 2003-09-12  Paul Eggert  <eggert@twinsun.com>
150317         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
150319         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
150320         and AC_MINIX, too, so that their extensions are available.
150322         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
150323         This macro has been superseded by gl_BACKUPFILE.
150325         More patches to assume C89 or better.
150327         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
150329         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
150330         unconditionally.
150331         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
150332         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
150333         Include <string.h>, <stdlib.h> unconditionally.
150334         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
150335         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
150336         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
150337         headers or for string.h.
150338         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
150339         or strtoul.
150341         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
150342         headers.
150343         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
150344         * m4/userspec.m4 (gl_USERSPEC): Likewise.
150345         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
150346         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
150347         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
150348         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
150349         memcpy, memset.
150350         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
150351         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
150352         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
150353         strtol.
150354         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
150355         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
150356         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
150357         strtoul.
150359 2003-09-12  Paul Eggert  <eggert@twinsun.com>
150361         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
150362         * lib/obstack.c [!defined _LIBC]: Likewise.
150363         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
150364         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
150365         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
150367         More changes to assume C89 or better.
150369         * lib/error.c (error_tail): Assume vprintf.
150371         * lib/argmatch.c (getenv): Remove decl.
150372         * lib/progreloc.c (get_full_program_name): Define via prototype.
150373         * lib/setenv.c (clearenv): Likewise.
150374         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
150375         needed.
150376         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
150377         (malloc, memcpy): Remove decls.
150378         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
150379         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
150380         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
150381         (memcpy): Remove macro.
150382         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
150383         (__P): Remove.  All uses removed.
150384         (PTR): Remove.  All uses changed to void *.
150385         (CHAR_BIT, NULL): Remove.
150386         (spaces, zeros, memset_space, memset_zero)
150387         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
150388         Remove.
150389         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
150390         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
150391         Define with prototype.
150392         Remove now-unnecessary prototype decl.
150393         (extra_args_spec): Assume ANSI C.  All uses changed.
150394         (extra_args_spec_iso): Remove.
150395         (my_strftime, emacs_strftimeu): Define via prototype.
150396         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
150397         unconditionally.
150398         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
150399         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
150400         (strtoul, strtol): Remove decls.
150401         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
150402         LONG_MAX): Remove.
150403         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
150404         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
150405         (LOCALE_PARAM_PROTO): New macro.
150406         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
150407         (INTERNAL (strtol), strtol): Define with a prototype.
150408         (PARAMS): Remove.  All uses removed.
150409         * lib/tempname.c: Include <string.h> unconditionally.
150410         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
150411         * lib/xgethostname.c (main): Define with a prototype.
150412         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
150413         Include <stdlib.h> unconditionally.
150414         (calloc, malloc, realloc, free): Remove decls.
150415         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
150416         Include <stdlib.h> unconditionally.  Sort include file names.
150417         (strtod): Remove.
150418         (xstrtod): Define with a prototype.
150419         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
150420         (strtol, strtoul): Remove decls.
150422 2003-09-11  Paul Eggert  <eggert@twinsun.com>
150424         More patches to assume C89 or better.
150425         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
150426         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
150427         string.h, memchr, STDC_HEADERS.
150429 2003-09-11  Paul Eggert  <eggert@twinsun.com>
150431         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
150432         Include <stdlib.h>, <string.h> unconditionally.
150433         Remove now-unnecessary cast to char *.
150434         * lib/strnlen.c: Include <string.h> unconditionally.
150435         * lib/yesno.c (yesno): Define with a prototype.
150437 2003-09-11  Bruno Haible  <bruno@clisp.org>
150439         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
150441 2003-09-10  Jim Meyering  <jim@meyering.net>
150443         * lib/error.c: Correct indentation of cpp directives.
150445 2003-09-10  Bruno Haible  <bruno@clisp.org>
150447         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
150448         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
150449         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
150450         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
150451         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
150452         <stdlib.h> and <string.h> checks.
150453         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
150454         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
150456 2003-09-10  Bruno Haible  <bruno@clisp.org>
150458         * lib/strcspn.c: Include <string.h> unconditionally.
150459         * lib/strpbrk.c: Include <string.h> unconditionally.
150460         * lib/strstr.c: Include <string.h> unconditionally.
150461         * lib/unicodeio.c: Include <string.h> unconditionally.
150462         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
150463         * lib/unsetenv.c: Likewise.
150464         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
150465         * lib/yesno.c: Include <stdlib.h> unconditionally.
150466         (rpmatch): Add prototype.
150468 2003-09-09  Paul Eggert  <eggert@twinsun.com>
150470         More patches to assume C89 or better.
150471         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
150472         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
150473         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
150474         or for string.h.
150475         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
150476         stdlib.h.
150477         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
150478         C headers.
150479         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
150480         string.h.
150481         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
150482         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
150483         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
150484         or for string.h.
150485         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
150486         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
150487         C headers.
150488         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
150489         memcpy.
150490         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
150491         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
150492         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
150493         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
150494         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
150495         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
150496         string.h, free.
150497         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
150498         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
150499         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
150500         C headers, or for string.h.
150501         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
150502         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
150503         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
150504         headers, memory.h, stdlib.h, string.h, strings.h.
150505         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
150506         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
150507         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
150508         strchr.
150509         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
150510         headers, memory.h, string.h.
150511         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
150512         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
150513         free.
150514         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
150515         headers.
150516         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
150517         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
150518         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
150519         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
150520         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
150522 2003-09-09  Paul Eggert  <eggert@twinsun.com>
150524         More K&R removal.
150526         * lib/acosl.c (main): Use a prototype.
150527         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
150528         tanl.c: Likewise.
150530         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
150532         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
150533         (getopt, etopt_long, getopt_long_only, _getopt_internal)
150534         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
150535         with a prototype.
150536         * lib/getopt.c (const): Remove macro.
150537         Include <string.h> unconditionally.
150538         (my_index): Remove; all uses changed to strchr.
150539         (strlen): Remove decl.
150540         (exchange): Remove forward decl; no longer needed.
150541         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
150542         Define with prototype.
150543         * lib/getopt1.c (const): Remove macro.
150544         (getopt_long, getopt_long_only, main): Define with prototype.
150546         * lib/getugroups.c: Include <string.h> unconditionally.
150548         * lib/getusershell.c: Include <stdlib.h> unconditionally.
150549         (getusershell, setusershell, endusershell, readname, main):
150550         Define with prototypes.
150552         * lib/group-member.c: Include group-member.h first.
150553         Include <stdlib.h> unconditionally.
150555         * lib/hard-locale.c: Include hard-locale.h first.
150556         Include <stdlib.h>, <string.h> unconditionally.
150558         * lib/hash.c (free, malloc): Remove decls.
150559         Include <stdlib.h> unconditionally.
150561         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
150562         (getenv): Do not declare.
150564         * lib/idcache.c: Include <string.h> unconditionally.
150566         * lib/long-options.c: Include long-options.h first, to test interface.
150567         Include <stdlib.h> unconditionally.
150569         * lib/makepath.c: Include makepath.h first, to test interface.
150570         Include <stdlib.h> and <string.h> unconditionally.
150572         * lib/linebuffer.c: Include <stdlib.h>.
150573         (free): Remove decl.
150575         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
150576         stddef.h. rpl_malloc returns void *, not char *.
150577         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
150578         prototype.
150580         * lib/md5.h: Include <limits.h> unconditionally.
150581         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
150582         (__P): Remove; all uses removed.
150583         * lib/md5.c: Include "md5.h" first.
150584         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
150585         md5_buffer, md5_process_bytes, md5_process_block):
150586         Define with prototypes.
150587         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
150588         * lib/sha.c: Include "sha.h" first.
150589         Include <stdlib.h>, <string.h> unconditionally.
150591         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
150592         * lib/memcmp.c (__ptr_t): Likewise.
150593         * lib/memrchr.c (__ptr_t): Likewise.
150594         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
150595         Include <string.h> unconditionally.
150596         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
150597         * lib/memchr.c: Include <stdlib.h> unconditionally.
150598         * lib/memchr.c (LONG_MAX): Remove.
150599         * lib/memrchr.c (LONG_MAX): Likewise.
150600         * lib/memchr.c (__memchr): Define via a prototype.
150601         * lib/memrchr.c (__memrchr): Likewise.
150602         * lib/memcmp.c (__P): Remove, and remove all uses.
150603         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
150604         Remove forward decls; no longer needed.
150605         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
150606         Use types required by C89 in prototype.
150608         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
150609         * lib/savedir.c: Likewise.
150610         * lib/mkdir.c (free): Remove decl.
150611         * lib/rmdir.c (rmdir): Define with a prototype.
150612         * lib/savedir.c: Include savedir.h first, to test interface.
150614         * lib/mktime.c (STDC_HEADERS): Remove.
150615         Include <stdlib.h>, <string.h> unconditionally.
150617         * lib/modechange.c: Include <stdlib.h> unconditionally.
150618         (malloc): Remove decl.
150620         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
150621         (free): Remove decl.
150623         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
150624         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
150625         (This type really should be intptr_t, but that's a C99ism.)
150626         (_obstack_memcpy): Remove: all uses changed to memcpy.
150627         Include <string.h> unconditionally.
150628         (struct obstack): Assume __STDC__ for types of members
150629         chunkfun, freefun, extra_arg.
150630         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
150631         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
150632         obstack_begin, obstack_specify_allocation,
150633         obstack_specify_allocation_with_arg, obstack_chunkfun,
150634         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
150635         Remove unprototyped decls and the macros that use them.
150636         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
150637         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
150638         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
150639         (defined __STDC__ && __STDC__)]:
150640         Remove nonprototyped code.
150641         Include <stdlib.h> unconditionally.
150642         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
150643         _obstack_allocated_p, _obstack_free, obstack_free,
150644         _obstack_memory_used, print_and_abort):
150645         Define using prototypes.
150646         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
150647         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
150648         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
150649         obstack_next_free, obstack_object_size, obstack_room) [0]:
150650         Remove unused, unprototyped code.
150652         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
150654         * lib/physmem.c (physmem_total, physmem_available, main): Define
150655         with prototypes.
150657         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
150658         (main): Define with a prototype.
150660         * lib/posixver.c (getenv): Remove decl.
150662         * lib/putenv.c (malloc): Returns void *, not char *.
150663         Include <string.h> unconditionally.
150664         (strchr, memcpy, NULL): Do not define.
150666         * lib/readtokens.c: Include readtokens.h first, to test interface.
150667         Include <stdlib.h>, <string.h> unconditionally.
150668         (init_tokenbuffer): Define with a prototype.
150670         * lib/regex.c (PARAMS): Remove.  All uses removed.
150671         All uses of _RE_ARGS removed, too.
150672         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
150673         unconditionally.
150674         (bzero): Assume memset exists.
150675         (memcmp, memcpy, NULL): Remove.
150676         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
150677         char, or assignments to local vars of type signed char.
150678         (init_syntax_once, PREFIX(extract_number_and_incr),
150679         PREFIX(print_partial_compiled_pattern),
150680         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
150681         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
150682         PREFIX(regex_grow_registers), PREFIX(regex_compile),
150683         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
150684         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
150685         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
150686         wcs_compile_range, byte_compile_range, truncate_wchar,
150687         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
150688         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
150689         count_mbs_length, wcs_re_match_2_internal,
150690         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
150691         PREFIX(alt_match_null_string_p),
150692         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
150693         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
150694         regfree, PREFIX(extract_number)): Define with prototype.  Remove
150695         now-unnecessary declaration, if any.
150696         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
150697         regcomp, regexec):
150698         Remove now-unnecessary casts among pointer types.
150699         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
150701         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
150702         (free): Remove decl.
150704         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
150706         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
150707         (free): Remove decl.
150709         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
150710         * lib/xgetcwd.c: Likewise.
150712         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
150713         (free): Remove decl.
150715         * lib/strchrnul.c (strchrnul): Define with a prototype.
150716         Fix bug: c_in was not converted to char before searching.
150718         The following changes are not K&R related:
150720         * lib/group-member.h: Include <sys/types.h>, so that this file is
150721         self-contained.
150722         * lib/makepath.h: Likewise.
150724         * lib/getusershell.c (readname, default_index, line_size, readname):
150725         Use size_t, not int, for sizes.
150726         (readname): If the size overflows, report an error instead of
150727         looping forever.
150729 2003-09-09  Paul Eggert  <eggert@twinsun.com>
150731         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
150732         libc.
150734 2003-09-09  Paul Eggert  <eggert@twinsun.com>
150736         * README: New section: portability guidelines.
150738 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
150740         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
150741         C89 spec.
150743 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
150745         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
150747 2003-09-08  Paul Eggert  <eggert@twinsun.com>
150749         Assume C89 or better; remove K&R cruft.
150750         A few of these changes were first proposed by Derek Robert Price
150751         in <http://mail.gnu.org/r/bug-gnulib/2003-07/msg00105.html>.
150753         * lib/addext.c: Include <string.h> unconditionally.
150754         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
150755         Don't declare getenv or malloc.
150757         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
150758         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
150759         (NULL): Remove.
150760         (find_stack_direction, alloca): Use prototypes.
150762         * lib/atexit.c (atexit): Define using a prototype.
150764         * lib/basename.c, dirname.c, stripslash.c:
150765         Include <string.h> unconditionally.
150767         * lib/bcopy.c: Include <stddef.h>.
150768         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
150770         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
150772         * lib/error.h (error, error_at_line, error_print_progname)
150773         [! (defined (__STDC__) && __STDC__)]: Remove decls.
150774         * lib/error.c: Include error.h first, to check interface.
150775         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
150776         (VA_START): Remove; all uses changeed to va_start.
150777         (exit, strerror): Remove decls.
150778         (error_print_progname): Prototype uncondionally.
150779         Don't include <errno.h>; no longer needed.
150780         (private_strerror): Remove.
150781         (error_tail): Always define.
150782         (error, error_at_line): Assume C89 or better; always use prototypes.
150783         * lib/fatal.c: Include "fatal.h" first, to test interface.
150784         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
150785         (VA_START): Remove; all uses changed to va_start.
150786         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
150787         this case.
150788         (exit): Remove decl.
150789         (fatal): Prototype unconditionally.  Assume va_start works.
150790         Abort at end, to pacify gcc.
150792         * lib/euidaccess.c (main): Define with a prototype.
150794         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
150796         * lib/exitfail.c: Include <stdlib.h> unconditionally.
150798         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
150799         prototypes.
150800         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
150801         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
150802         (getenv): Remove decl.
150803         (fnmatch): Define using a prototype.
150804         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
150805         (FCT): Define using a prototype.
150807         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
150809         * lib/gethostname.c: Include <stddef.h>.
150810         (gethostname): Define with prototype.  Length is size_t, not int.
150812 2003-09-08  Paul Eggert  <eggert@twinsun.com>
150814         Assume C89 or better; remove K&R cruft.
150815         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
150816         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
150817         string.h, getenv, malloc.
150818         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
150819         headers.
150820         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
150821         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
150822         do not check for strerror.
150823         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
150824         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
150825         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
150826         do not check for doprnt or vprintf.
150827         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
150828         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
150830 2003-09-08  Paul Eggert  <eggert@twinsun.com>
150832         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
150833         getversion.c should have been removed then, but was accidentally
150834         preserved.
150836         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
150837         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
150839 2003-09-08  Karl Berry  <karl@gnu.org>
150841         * config/config.sub, config.guess, srclistvars.sh: update from savannah
150842                 config, forget about prep.
150844         * config/depcomp, missing: update from automake.
150846 2003-09-07  Paul Eggert  <eggert@twinsun.com>
150848         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
150849         <http://mail.gnu.org/r/bug-gnulib/2003-09/msg00028.html>.
150851 2003-09-07  Paul Eggert  <eggert@twinsun.com>
150853         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
150854         copy_tm_result.  Bug reported by Simon Josefsson in
150855         <http://mail.gnu.org/r/bug-gnulib/2003-09/msg00028.html>.
150857 2003-09-06  Paul Eggert  <eggert@twinsun.com>
150859         * m4/time_r.m4: New file.
150860         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
150861         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
150862         is. Check for timegm declaration.
150863         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
150864         Do not check for gmtime_r.
150865         Replace mktime if __mktime_internal does not exist and if mktime
150866         hasn't been replaced already.
150868 2003-09-06  Paul Eggert  <eggert@twinsun.com>
150870         * lib/time_r.c, lib/time_r.h: New files.
150872         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
150873         __localtime_r.
150874         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
150875         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
150877         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
150878         __gmtime_r.
150879         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
150880         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
150881         Include <time_r.h>.
150883         * lib/timegm.c: Switch to glibc implementation, with the following
150884         changes:
150885         [defined HAVE_CONFIG_H]: Include <config.h>.
150886         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
150887         (__mktime_internal) [!defined _LIBC]: New decl.
150888         (__gmtime_r) [!defined _LIBC]: New macro and function.
150889         (timegm): Use a prototype, since gnulib assumes C89.
150890         Do not bother declaring tmp to be const, as it's not really usefu.
150891         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
150892         (timegm): Declare only if HAVE_DECL_TIMEGM.
150894 2003-09-06  Paul Eggert  <eggert@twinsun.com>
150896         * MODULES.html.sh (func_all_modules): Add time_r.
150897         * modules/time_r: New file.
150898         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
150899         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
150901 2003-09-03  Paul Eggert  <eggert@twinsun.com>
150903         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
150904         Bug reported by Lute Kamstra in
150905         <http://mail.gnu.org/r/bug-gnulib/2003-09/msg00003.html>.
150907         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
150908         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
150909         course with correspondingly smaller numbers for tomorrow and
150910         yesterday.  From Tadayoshi Funaba.  Originally installed into
150911         sh-utils on 1999-08-07, but the patch got lost (I guess during the
150912         coreutils merge?).
150914 2003-08-31  Simon Josefsson  <jas@extundo.com>
150916         * modules/timegm: New file.
150917         * MODULES.html.sh (func_all_modules): Add timegm.
150919 2003-08-31  Simon Josefsson  <jas@extundo.com>
150921         * m4/timegm.m4: New file.
150923 2003-08-31  Simon Josefsson  <jas@extundo.com>
150925         * lib/timegm.h: New file.
150926         * lib/timegm.c: New file.  Based on
150927         wget-1.8.2/src/http.c:mktime_from_utc.
150929 2003-08-31  Karl Berry  <karl@gnu.org>
150931         * lib/argp.h: update from libc.
150933 2003-08-28  Bruno Haible  <bruno@clisp.org>
150935         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
150936         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
150937         followed by '#define fnmatch fnmatch_posix' gives an error.
150939 2003-08-28  Bruno Haible  <bruno@clisp.org>
150941         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
150942         warning on QNX, which defines O_BINARY to 000000.
150944 2003-08-27  Jim Meyering  <jim@meyering.net>
150946         * m4/mkstemp.m4: Require that the system mkstemp be able to create
150947         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
150948         would fail after 32.  Reported by Danny Levinson.  Details here:
150949         http://mail.gnu.org/r/bug-coreutils/2003-08/msg00124.html
150951 2003-08-24  Bruno Haible  <bruno@clisp.org>
150953         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
150954         MSVC7 <stdio.h> is included later.
150956 2003-08-22  Simon Josefsson  <jas@extundo.com>
150958         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
150960 2003-08-20  Karl Berry  <karl@gnu.org>
150962         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
150964 2003-08-20  Bruno Haible  <bruno@clisp.org>
150966         * modules/progname: New file.
150967         * MODULES.html.sh (func_all_modules): Add progname.
150969 2003-08-20  Bruno Haible  <bruno@clisp.org>
150971         * lib/progname.h: New file, from GNU gettext.
150972         * lib/progname.c: New file, from GNU gettext.
150973         * lib/progreloc.c: New file, from GNU gettext.
150975 2003-08-19  Jim Meyering  <jim@meyering.net>
150977         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
150978         http://mail.gnu.org/r/bug-gnulib/2003-08/msg00155.html
150980 2003-08-19  Bruno Haible  <bruno@clisp.org>
150982         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
150983         more.
150985 2003-08-19  Bruno Haible  <bruno@clisp.org>
150987         * lib/xstrdup.c: Assume <string.h> exists.
150989 2003-08-18  Paul Eggert  <eggert@twinsun.com>
150991         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
150992         in makefile rules.
150994 2003-08-18  Jim Meyering  <jim@meyering.net>
150996         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
150997         * m4/lib-ld.m4: Likewise.
150999 2003-08-18  Jim Meyering  <jim@meyering.net>
151001         * lib/setenv.h: Indent nested cpp directive.
151002         * lib/vasnprintf.c: Remove trailing blanks.
151004 2003-08-17  Simon Josefsson  <jas@extundo.com>
151006         * modules/xstrndup: New file.
151007         * MODULES.html.sh (func_all_modules): Add xstrndup.
151009 2003-08-17  Simon Josefsson  <jas@extundo.com>
151011         * modules/argp: Fix autoconf macro name. Add more dependencies.
151013 2003-08-17  Simon Josefsson  <jas@extundo.com>
151015         * m4/xstrndup.m4: New file.
151017 2003-08-17  Simon Josefsson  <jas@extundo.com>
151019         * m4/argp.m4: New file.
151021 2003-08-17  Simon Josefsson  <jas@extundo.com>
151022             Bruno Haible  <bruno@clisp.org>
151024         * lib/xstrndup.h: New file.
151025         * lib/xstrndup.c: New file.
151027 2003-08-17  Bruno Haible  <bruno@clisp.org>
151029         * modules/strndup (Files, Include): Add lib/strndup.h.
151031 2003-08-17  Bruno Haible  <bruno@clisp.org>
151033         * modules/euidaccess (Files): Add lib/euidaccess.h.
151035 2003-08-17  Bruno Haible  <bruno@clisp.org>
151037         * lib/strndup.h: New file.
151039 2003-08-17  Bruno Haible  <bruno@clisp.org>
151041         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
151042         like AC_GNU_SOURCE.
151043         * modules/extensions (configure.ac): Comment out the invocation of
151044         gl_USE_SYSTEM_EXTENSIONS.
151046 2003-08-16  Paul Eggert  <eggert@twinsun.com>
151048         Merges from coreutils, etc.
151049         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
151050         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
151051         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
151052         fixing a typo.
151053         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
151054         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
151056 2003-08-16  Paul Eggert  <eggert@twinsun.com>
151058         Document merge from coreutils.
151059         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
151060         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
151061         * modules/utime: Add m4/utimes-null.m4.
151063 2003-08-16  Paul Eggert  <eggert@twinsun.com>
151065         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
151066         space, undoing this 2003-08-12 change:
151067         <http://mail.gnu.org/r/bug-gnulib/2003-08/msg00080.html>
151069 2003-08-16  Paul Eggert  <eggert@twinsun.com>
151071         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
151072         strtoul.c from libc, undoing this 2003-08-12 change:
151073         <http://mail.gnu.org/r/bug-gnulib/2003-08/msg00080.html>
151075 2003-08-16  Jim Meyering  <jim@meyering.net>
151077         Merges from coreutils.
151078         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
151079         prefix.  Adjust cache variables similarly.  Create 500 rather than
151080         just 300 files, to exercise bug on Darwin6.5, too.
151081         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
151082         $missing_dir.
151083         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
151084         AM_SYS_POSIX_TERMIOS.
151085         Reported by mkc@mathdogs.com.
151086         Also change use of $am_cv_sys_posix_termios
151087         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
151088         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
151089         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
151090         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
151091         in /proc/mounts until it finds one with matching device number.  This
151092         is unnecessary when the FILE argument *is* a mount point.  No stat call
151093         is necessary in that case.  So, disable the statvfs-testing code on
151094         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
151095         as RedHat bug# 84846.
151096         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
151097         to 1MB, so as not to render systems with no stack size limit (e.g.,
151098         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
151099         Include <unistd.h>.  On some systems,
151100         it is required for the definition of _SC_PAGESIZE.
151102 2003-08-16  Jim Meyering  <jim@meyering.net>
151104         Merge from coreutils.
151105         * lib/xstrtoimax.c: #else #if -> #elif.
151106         * lib/xstrtoumax.c: Likewise.
151108 2003-08-16  Jim Meyering  <jim@meyering.net>
151110         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
151111         * m4/utimes.m4: Removed.
151112         * m4/utimes-null.m4: Renamed from utimes.m4.
151114         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
151115         to 1MB, so as not to render systems with no stack size limit (e.g.,
151116         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
151117         Include <unistd.h>.  On some systems,
151118         it is required for the definition of _SC_PAGESIZE.
151120 2003-08-16  Jim Meyering  <jim@meyering.net>
151121         and Paul Eggert  <eggert@cs.ucla.edu>
151123         Merges from coreutils, etc.
151125         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
151126         using the latest version from cvs.  This avoids problems with #line
151127         directives using a vendor (Sun) compiler.
151128         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
151129         Don't set GETGROUPS_LIB here; now it's
151130         done via getgroups.m4's wrapper function.
151131         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
151132         rather than just in sh-util/configure.in, so that the
151133         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
151134         same.
151135         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
151136         AC_FUNC_GETLOADAVG where to find getloadavg.c.
151137         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
151138         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
151139         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
151140         Remove code that is now done by the newly-required macros.
151141         Append $(EXEEXT) to DF_PROG.
151142         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
151143         Do not invoke or require the following here,
151144         since prereq.m4 or some gnulib .m4 now does this for us:
151145         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
151146         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
151147         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
151148         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
151149         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
151150         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
151151         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
151152         AC_FUNC_OBSTACK.
151153         Do not replace the following functions, as this is now the job
151154         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
151155         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
151156         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
151157         atexit getpass, strdup, getpagesize.
151158         Replace 'raise'.
151159         Do not check for the following functions, as this is now the job
151160         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
151161         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
151162         setregid.
151163         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
151164         Check for sys/sysctl.h.
151165         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
151166         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
151167         of checking for ssize_t ourselves.
151169         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
151170         Require every macro that gnulib/modules/* suggests for us.
151171         (jm_PREREQ_ADDEXT): New macro.
151172         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
151173         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
151175         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
151176         (gl_PHYSMEM): Use it.
151177         Also check for `table' function.
151178         Check for new headers and functions.
151179         Add check for sys/sysmp.h.
151180         With suggestions from Kaveh Ghazi.
151181         Ignore headers that are present but cannot be compiled.  This
151182         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
151183         C 5.4.
151185 2003-08-15  Paul Eggert  <eggert@twinsun.com>
151187         Document merge from coreutils.
151188         * modules/userspec: Depend on posixver.
151189         * modules/strftime: Depend on tzset.
151191 2003-08-15  Paul Eggert  <eggert@twinsun.com>
151193         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
151194         rather than tab, after '#' in shell-script copyright notices.
151195         Suggested by Bruno Haible.
151197 2003-08-15  Paul Eggert  <eggert@twinsun.com>
151199         * config/srclist-update: Use three spaces, rather than tab, after '#'
151200         in shell-script copyright notices.  Suggested by Bruno Haible.
151201         Remove unnecessary parenthesization in regular expression.
151203 2003-08-15  Jim Meyering  <jim@meyering.net>
151205         Merge from coreutils.
151206         * lib/xgethostname.c: Include <stdlib.h>.
151207         (xghostname): Don't exit for anything other than memory-related
151208         failure; just return NULL.
151209         * lib/userspec.c: Include "posixver.h".
151210         (parse_user_spec): Accept `.' as a separator only
151211         in pre-POSIX-200112 mode.
151212         * lib/strtoimax.c: Use #elif rather than #else #if.
151213         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
151214         Remove function, now that we can rely on a working tzset function.
151215         [!_LIBC]: Ensure that the required autoconf test has been run.
151216         [!defined _NL_CURRENT && HAVE_STRFTIME]:
151217         Use underlying_strftime for %r.
151218         * lib/sha.c: Merge in some clean-up and optimization changes from
151219         glibc.
151220         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
151221         Ensure that it is a multiple of 64.
151222         Rearrange loop exit tests so as to avoid performing an
151223         additional fread after encountering an error or EOF.
151224         * lib/realloc.c: Update copyright date.
151226 2003-08-15  Jim Meyering  <jim@meyering.net>
151227         and Paul Eggert  <eggert@twinsun.com>
151229         Merge from coreutils.
151230         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
151231         member but strut utmpx does not.  Needed for AIX 4.3.3.
151232         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
151234 2003-08-15  Jim Meyering  <jim@meyering.net>
151235         and Paul Eggert  <eggert@cs.ucla.edu>
151237         Merges from coreutils, etc.
151238         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
151239         Require gl_FUNC_TZSET_CLOBBER.
151240         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
151241         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
151242         members.
151244 2003-08-14  Paul Eggert  <eggert@twinsun.com>
151246         Help the merge from coreutils.
151247         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
151248         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
151249         * m4/tzset.m4: Use it too.
151251 2003-08-14  Paul Eggert  <eggert@twinsun.com>
151253         * modules/tzset: New file.
151255 2003-08-14  Jim Meyering  <jim@meyering.net>
151257         Merges from coreutils.
151258         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
151259         variable names, rather than @FNMATCH_H@.
151260         * modules/alloca: Likewise for $(ALLOCA_H).
151262         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
151263         the three copies of the literal target, `fnmatch.h'.
151264         * modules/alloca (alloca.h): Likewise.
151266 2003-08-14  Jim Meyering  <jim@meyering.net>
151268         Merge from coreutils.
151269         * m4/tzset.m4: New file.
151270         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
151271         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
151272         otherwise, AIX 5.1 systems would end up using the latter.
151273         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
151274         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
151275         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
151276         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
151278 2003-08-14  Jim Meyering  <jim@meyering.net>
151280         Merge from coreutils.
151281         * lib/obstack.h: Whitespace changes.
151282         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
151283         and xcalloc return values.
151284         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
151285         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
151286         hang on OSF/1 5.1 for DIR on both local and remote file systems.
151287         Reported by (and fix confirmed by) Nelson H. F. Beebe.
151288         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
151289         error from mntctl.
151290         Use mntctl's return value to drive the entry-processing loop, since
151291         we can't rely on the value of the vmt_length member in the last
151292         entry.  On some systems doing so could result in exhausting
151293         virtual memory.  Based in part on a patch from Mike Jetzer.
151295 2003-08-14  Jim Meyering  <jim@meyering.net>
151296         and Paul Eggert  <eggert@twinsun.com>
151298         Merges from coreutils, plus other fixes.
151299         * lib/physmem.c: Merge in portability changes from gcc/libiberty
151300         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
151301         for credits and details.  Thanks to Kaveh Ghazi for helping
151302         to keep these files in sync.
151303         (ARRAY_SIZE): Define it.
151304         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
151305         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
151306         (memcasecmp): Don't assume size_t fits in unsigned int.
151307         Remove casts and duplicate code.
151308         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
151309         (memcpy): Remove definition.
151310         Merge in some clean-up and optimization changes from glibc.
151311         [BLOCKSIZE]: Move definition to top of file.
151312         Ensure that it is a multiple of 64.
151313         Rearrange loop exit tests so as to avoid performing an
151314         additional fread after encountering an error or EOF.
151315         * lib/md5.h (md5_uintptr): Define.
151316         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
151317         return to the initial working directory.  Preserve errno
151318         for caller.
151319         * lib/idcache.c: Include "xalloc.h".
151320         (xmalloc, xrealloc): Remove decls.
151321         (getuser): Remove casts no longer required in C89.
151322         * lib/human.c: Include stdio.h, for sprintf.
151323         * lib/group-member.c: Include "xalloc.h".
151324         (xmalloc, xrealloc): Remove decls.
151325         (get_group_info): Remove casts no longer required in C89.
151326         * lib/getusershell.c (readname): Remove casts no longer required in
151327         C89.
151328         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
151329         * lib/getline.c: Whitespace fix, from coreutils.
151331 2003-08-13  Paul Eggert  <eggert@twinsun.com>
151333         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
151334         Check for isascii.
151336         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
151337         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
151338         Undo previous (whitespace-only) change.
151340 2003-08-13  Paul Eggert  <eggert@twinsun.com>
151342         * lib/exclude.c: Include <ctype.h>
151343         (IN_CTYPE_DOMAIN): New macro.
151344         (is_space): New fn.
151345         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
151346         and empty lines.
151348         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
151349         Undo previous (whitespace-only) change.
151351 2003-08-13  Paul Eggert  <eggert@twinsun.com>
151353         * config/srclist-update: Change update back to the old behavior,
151354         leaving whitespace alone.  Use one 'sed' command rather than a
151355         pipeline.
151356         (fixlicense): Now a variable, not a function.
151357         (remove_trailing_blanks): Remove.
151358         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
151359         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
151360         Undo previous (whitespace-only) change.
151362 2003-08-12  Paul Eggert  <eggert@twinsun.com>
151364         Merge from coreutils.
151365         * modules/euidaccess: Add lib_SOURCES, include for new
151366         file euidaccess.h
151368 2003-08-12  Paul Eggert  <eggert@twinsun.com>
151370         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
151371         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
151372         Normalize leading white space and remove trailing white space.
151374         Merge from coreutils
151375         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
151377         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
151378         0.12.1.  These files are now being upgraded automatically by
151379         ../config/srclist-update.
151381 2003-08-12  Paul Eggert  <eggert@twinsun.com>
151383         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
151384         Normalize leading white space and remove trailing white space.
151385         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
151386         notice, as per ../config/srclist-update.
151388         Merge from coreutils.
151389         * lib/euidaccess.h: New file.
151390         * lib/euidaccess.c: Include it.
151391         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
151392         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
151393         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
151395 2003-08-12  Paul Eggert  <eggert@twinsun.com>
151397         * config/srclist-update: Add copyright notice.
151398         (remove_id_lines, remove_trailing_blanks): New constants.
151399         (fixfile): Use them to normalize spacing a bit in copied files.
151400         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
151401         Normalize leading white space and remove trailing white space.
151403         * config/texinfo.tex: Sync with texinfo.
151405         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
151406         strtoul.c from libc, to merge coreutils whitespace changes.
151408         * config/srclist.txt: Get the following m4 files from gettext:
151409         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
151410         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
151411         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
151412         wint_t.m4.
151414 2003-08-12  Karl Berry  <karl@gnu.org>
151416         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
151417         been made.
151419 2003-08-11  Paul Eggert  <eggert@twinsun.com>
151421         * modules/gnu-source, m4/gnu-source.m4:
151422         Remove; we're assuming Autoconf 2.54 or later now.
151423         Suggested by Bruno Haible.
151424         * MODULES.html.sh (func_all_modules): Remove gnu-source.
151426 2003-08-11  Bruno Haible  <bruno@clisp.org>
151428         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
151430 2003-08-11  Bruno Haible  <bruno@clisp.org>
151432         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
151433         (vasnprintf): Use it instead of wcslen.
151435 2003-08-11  Bruno Haible  <bruno@clisp.org>
151437         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
151438         value to ensure that _Bool promotes to int. Use #define for _Bool when
151439         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
151441 2003-08-10  Karl Berry  <karl@gnu.org>
151443         * lib/regex.h: update from libc (whitespace fix).
151445 2003-08-09  Paul Eggert  <eggert@twinsun.com>
151447         Merge some files from coreutils.  These changes were
151448         originally made by Jim Meyering.
151449         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
151450         many older Unixes require this.
151451         * lib/alloca.c (alloca): Remove cast to argument of free;
151452         no longer needed in C89.
151453         * lib/alloca_.h, regex.h: Fix white space to match
151454         what GNU indent does.
151456 2003-08-09  Paul Eggert  <eggert@twinsun.com>
151458         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
151459         apparently Emacs's Unicode mode got confused before my 2003-08-05
151460         checkin.
151462 2003-08-08  Paul Eggert  <eggert@twinsun.com>
151464         * m4/extensions.m4: New file.
151465         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
151466         Require gl_USE_SYSTEM_EXTENSIONS.
151467         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
151468         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
151470 2003-08-08  Paul Eggert  <eggert@twinsun.com>
151472         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
151473         * modules/extensions, modules/gnu-source: New files.
151474         * modules/timespec, modules/unlocked-io: Depend on extensions.
151476 2003-08-07  Paul Eggert  <eggert@twinsun.com>
151478         * modules/restrict: New file.
151479         * MODULES.html.sh (func_all_modules): Add restrict.
151480         * modules/regex: Depend on restrict.
151482 2003-08-07  Paul Eggert  <eggert@twinsun.com>
151484         * m4/restrict.m4: New file.
151485         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
151487 2003-08-07  Bruno Haible  <bruno@clisp.org>
151489         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
151490         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
151492 2003-08-07  Bruno Haible  <bruno@clisp.org>
151494         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
151495         makes the module 'getndelim2' compatible with the module 'getline'.
151497 2003-08-05  Paul Eggert  <eggert@twinsun.com>
151499         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
151500         byte with "\201" to avoid glitches when editing that source file
151501         with multi-gnome-terminal.
151503 2003-08-05  Paul Eggert  <eggert@twinsun.com>
151505         * lib/bumpalloc.h: Remove.
151507 2003-08-05  Paul Eggert  <eggert@twinsun.com>
151509         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
151510         * modules/bumpalloc: Remove.
151512 2003-08-04  Paul Eggert  <eggert@twinsun.com>
151514         * lib/getloadavg.c: Change copyright notice and spacing to conform to
151515         GNU coding style.
151517         Merge from coreutils.
151518         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
151519         1. From glibc.
151520         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
151521         from Karl Berry, implemented by Jim Meyering.
151522         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
151523         from Dmitry V. Levin.
151524         Remove anachronistic cast of xrealloc.
151525         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
151526         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
151527         type. Otherwise, it wouldn't compile with at least /bin/cc on
151528         ymp-cray-unicos9.0.2.X.
151529         Combine two mostly-identical uses of alloca into one.
151530         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
151532 2003-08-04  Dave Love  <d.love@dl.ac.uk>
151534         [From Emacs.]
151536         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
151537         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
151538         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
151539         obsolete NLIST_NAME_UNION.
151540         [__GNU__]: Undef BSD and FSCALE.
151541         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
151543 2003-08-03  Paul Eggert  <eggert@twinsun.com>
151545         * lib/stdbool_.h (_Bool): Make it signed char, instead of
151546         an enum type, so that it's guaranteed to promote to int.  See:
151547         <http://mail.gnu.org/r/bug-gnulib/2003-07/msg00124.html>
151549 2003-08-03  Karl Berry  <karl@gnu.org>
151551         * config/depcomp: update from automake.
151553 2003-07-31  Paul Eggert  <eggert@twinsun.com>
151555         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
151556         (strerror): Don't assume that a printable int fits in 14 bytes.
151558 2003-07-31  Bruno Haible  <bruno@clisp.org>
151560         * modules/getpass-gnu: New file.
151561         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
151563 2003-07-31  Bruno Haible  <bruno@clisp.org>
151565         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
151567 2003-07-24  Karl Berry  <karl@gnu.org>
151569         * config/missing: update from automake.
151571 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
151572             Bruno Haible  <bruno@clisp.org>
151574         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
151575         * lib/getline.c (getline, getdelim): Likewise.
151576         Remove _GNU_SOURCE define; now it's defined in config.h through
151577         m4/getline.m4.
151579 2003-07-23  Karl Berry  <karl@gnu.org>
151581         * config/config.sub: update from prep.
151583 2003-07-22  Paul Eggert  <eggert@twinsun.com>
151585         * modules/xalloc (Depends-on): Add exitfail.
151586         * modules/xmemcoll: Likewise.
151588 2003-07-22  Paul Eggert  <eggert@twinsun.com>
151590         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
151591         over-parenthesization in macros.
151593         Sync with coreutils.
151595         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
151596         required by C99.
151598         Use `exit_failure' for xalloc and xmemcoll instead of their own
151599         private exit-failure variables.
151600         * lib/xalloc.h (xalloc_exit_failure): Remove.
151601         * lib/xmalloc.c: Likewise.  Include exitfail.h.
151602         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
151603         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
151604         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
151605         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
151607 2003-07-20  Jim Meyering  <jim@meyering.net>
151609         * modules/closeout (Depends-on): Add exitfail.
151610         Suggestion from Bruno Haible.
151612 2003-07-19  Karl Berry  <karl@gnu.org>
151614         * config/config.sub: update from prep.
151616 2003-07-18  Paul Eggert  <eggert@twinsun.com>
151618         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
151619         Remove.
151620         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
151621         to test that it can stand by itself.  Include "exitfail.h".
151622         Clients should set exit_failure instead.
151623         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
151625 2003-07-18  Bruno Haible  <bruno@clisp.org>
151627         * modules/getndelim2: New file.
151628         * modules/getline: Share files with module getndelim2.
151629         * modules/getnline: Depend on getndelim2 instead of sharing files with
151630         it. Add getnline.c to lib_SOURCES.
151631         * MODULES.html.sh (func_all_modules): Add getndelim2.
151633 2003-07-18  Bruno Haible  <bruno@clisp.org>
151635         * m4/getndelim2.m4: New file.
151636         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
151637         invoke gl_PREREQ_GETNDELIM2.
151638         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
151639         gl_PREREQ_GETNDELIM2.
151640         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
151641         gl_GETNDELIM2.
151643 2003-07-18  Bruno Haible  <bruno@clisp.org>
151645         * lib/getndelim2.h: New file.
151646         * lib/getndelim2.c: Make into a module of its own. Include config.h,
151647         getndelim2.h.
151648         (getndelim2): Make non-static. Change return type to ssize_t.
151649         * lib/getline.h: Change argument names.
151650         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
151651         * lib/getnline.c: Include getndelim2.h.
151653 2003-07-18  Andreas Schwab  <schwab@suse.de>
151655         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
151657 2003-07-17  Karl Berry  <karl@gnu.org>
151659         * config/config.sub: update from prep.
151661 2003-07-17  Bruno Haible  <bruno@clisp.org>
151663         * modules/getnline: New file.
151664         * modules/getline: Add lib/getndelim2.c to source file list.
151665         * MODULES.html.sh (func_all_modules): Add getnline.
151667 2003-07-17  Bruno Haible  <bruno@clisp.org>
151669         * m4/getnline.m4: New file.
151671 2003-07-17  Bruno Haible  <bruno@clisp.org>
151673         * m4/Makefile.am.in: Remove file.
151674         * m4/Makefile.am: Remove file.
151675         * m4/Makefile.in: Remove file.
151677 2003-07-17  Bruno Haible  <bruno@clisp.org>
151679         * lib/getnline.h: New file.
151680         * lib/getnline.c: New file.
151681         * lib/getndelim2.c: New file, extracted from getline.c.
151682         (getndelim2): Renamed from getdelim2, with added nmax argument.
151683         * lib/getline.c: Include getndelim2.c.
151684         (getdelim2): Moved out to getndelim2.c.
151685         (getline, getdelim): Update.
151687 2003-07-17  Bruno Haible  <bruno@clisp.org>
151689         * lib/Makefile.am: Remove file.
151690         * lib/Makefile.in: Remove file.
151692 2003-07-17  Bruno Haible  <bruno@clisp.org>
151694         * configure.in: Remove file.
151695         * Makefile.in: Remove file.
151697 2003-07-17  Bruno Haible  <bruno@clisp.org>
151699         * MODULES.html.sh: Put the </BODY> right before </HTML>.
151701 2003-07-16  Karl Berry  <karl@gnu.org>
151703         * config/srclist-update: was running fixlicense twice, which caused
151704                 texinfo.tex to be nullified for some reason.  Simplify,
151705                 $gplsrc is no longer needed as far as I can see?
151707 2003-07-16  Jim Meyering  <jim@meyering.net>
151709         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
151711 2003-07-15  Paul Eggert  <eggert@twinsun.com>
151713         * config/srclist.txt: Get the following files from gettext-runtime/intl
151714         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
151715         ref-del.sin.  From Bruno Haible.
151716         * config/srclist-update (fixfile): Change grep pattern again, since the
151717         previous fix didn't work (there was another trailing $).  Use
151718         '[$]' to escape the $s.
151720 2003-07-15  Karl Berry  <karl@gnu.org>
151722         * lib/vasnprintf.c: update from gettext.
151724 2003-07-15  Karl Berry  <karl@gnu.org>
151726         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
151727         gets expanded when surrounded by '$'.
151729 2003-07-15  Jim Meyering  <jim@meyering.net>
151731         * modules/save-cwd: Don't depend on error.  From Derek Price.
151733 2003-07-15  Jim Meyering  <jim@meyering.net>
151735         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
151737 2003-07-14  Simon Josefsson  <jas@extundo.com>
151739         * modules/mempcpy: New file.
151740         * MODULES.html.sh (func_all_modules): Add mempcpy.
151742 2003-07-14  Simon Josefsson  <jas@extundo.com>
151744         * m4/mempcpy.m4: New file.
151746 2003-07-14  Simon Josefsson  <jas@extundo.com>
151748         * lib/mempcpy.h: New file.
151749         * lib/mempcpy.c: New file.
151751 2003-07-14  Paul Eggert  <eggert@twinsun.com>
151753         * modules/getdate, modules/posixtm: Depend on mktime.
151755 2003-07-14  Paul Eggert  <eggert@twinsun.com>
151757         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
151758         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
151759         unicodeio.c, unicodeio.h, unlocked-io.h:
151760         Switch from LGPL to GPL.
151762 2003-07-14  Paul Eggert  <eggert@twinsun.com>
151764         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
151765         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
151766         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
151767         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
151768         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
151769         updated automatically by ../config/srclist-update.  This changes
151770         their license from LPGL to GPL.
151772 2003-07-14  Paul Eggert  <eggert@twinsun.com>
151774         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
151775         assumed to refer to the root of the most recent stable gettext version.
151776         * config/srclistvars.sh: Add defaults for eggert.
151777         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
151778         Match "This program" as well as "The program".  This is needed
151779         for gettext.
151781 2003-07-14  Jim Meyering  <jim@meyering.net>
151783         Don't emit diagnostics.  Let callers do that.
151784         * lib/save-cwd.c: Don't include "error.h".
151785         (save_cwd): Don't call error.  Ensure that errno is valid
151786         when returning nonzero.
151788         * lib/save-cwd.h (restore_cwd): Update prototype.
151789         * lib/save-cwd.c (restore_cwd): Remove two parameters.
151790         Simplify.  Don't call error upon failure.  Let callers do that.
151791         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
151792         when auditing is enabled.  But don't bother updating the #if.
151794 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
151796         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
151797         it breaks C++ compilation.
151798         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
151800 2003-07-10  Simon Josefsson  <jas@extundo.com>
151802         * modules/strchrnul (Makefile.am): Add strchrnul.h.
151804 2003-07-10  Jim Meyering  <jim@meyering.net>
151806         * m4/clock_time.m4: Remove trailing blank.
151807         * m4/intmax_t.m4: Likewise.
151809 2003-07-10  Jim Meyering  <jim@meyering.net>
151811         * lib/vasnprintf.c: Remove trailing blanks.
151812         Make cpp indentation consistent.
151814 2003-07-09  Paul Eggert  <eggert@twinsun.com>
151816         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
151817         posixver.c, strftime.c, strnlen.c, strverscmp.c:
151818         Switch from LGPL to GPL.
151820 2003-07-09  Paul Eggert  <eggert@twinsun.com>
151822         * config/srclist.txt: Sort sublists.  Add
151823         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
151824         that differ from gnulib for one reason or another; we'd like this list
151825         to be smaller but for now let's document what we have.
151827 2003-07-08  Paul Eggert  <eggert@twinsun.com>
151829         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
151830         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
151831         and sweeter "eval x=$x".
151832         * config/srclist.txt: Get lib/argp* from glibc.
151834 2003-07-07  Paul Eggert  <eggert@twinsun.com>
151836         * lib/mktime.c: Fix some boundary cases and remove need for floating
151837         point.
151839         Issue a compile-time diagnostic if time_t is floating point, or if
151840         two's complement arithmetic is not in effect, or if arithmetic
151841         right shift does not propagate the sign.  These assumptions were
151842         all in the original code but they weren't checked.
151844         (TIME_T_MIDPOINT, verify): New macros.
151845         (__isleap): Remove; it has integer overflow problems.
151846         (leapyear): New function, without those problems.
151847         (ydhms_tm_diff): Remove; splitting into two parts.
151848         (ydhms_diff): New function, containing the arithmetic part of
151849         the old ydhms_tm_diff function.  Issue a compile-time
151850         diagnostic if we are not using C99 integer division.
151851         Avoid casts when possible.
151852         (guess_time_tm): New function, containing the checking part of
151853         the old ydhms_tm_diff function.  Return the new value, rather than
151854         the difference between it and the old.  Accept a new argument T
151855         so that *T specifies the old value.  Check for overflow in the result.
151857         (__mktime_internal): Use a time_t offset, not a long int offset.
151858         This undoes the 2003-06-04 change, which is no longer needed now
151859         that we have better overflow checking.
151860         (localtime_offset): Likewise.
151862         (__mktime_internal): Avoid harmful overflow on hosts where time_t
151863         and long are 64-bit but int is only 32-bit.
151864         (ydhms_diff): Use long int to store year1 and yday1.
151865         Issue a compile-time diagnostic if long int is not wide enough.
151867         (__mktime_internal): Use long int to store adjusted year and yday.
151868         Use plain C rather than preprocessor commands, if that doesn't
151869         affect efficiency.
151870         Check for overflow (and try to repair) after each probe
151871         rather than checking only at the very end.  This avoids some bugs
151872         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
151873         does not equal GMT offset at maximum time).
151874         Use integer to check for overflow rather than floating point; this
151875         is more portable to non-IEEE hosts, and is a tad faster.
151876         When we detect that we are oscillating between two values,
151877         don't check whether tm_isdst has the requested value, since
151878         we already know the answer.  When tm_isdst has the wrong value,
151879         use a different heuristic to find the right one, based on the
151880         extreme values actually observed in practice in tz2003a,
151881         rather than the (overly optimistic) "previous 3 calendar quarters".
151883         (not_equal_tm, print_tm, check_result): Use "const T" rather than
151884         "T const" to accommodate glibc style.
151885         (check_result): Use less-confusing report format.  "long" -> "long int.
151886         (main): Likewise.
151887         Don't loop if the iteration overflows time_t.
151888         Allow a negative step in the iteration.
151890 2003-07-06  Karl Berry  <karl@gnu.org>
151892         * config/depcomp: update from automake.
151893         * config/config.sub: update from prep.
151895 2003-07-03  Karl Berry  <karl@gnu.org>
151897         * config/config.guess: update from prep.
151899 2003-07-01  Paul Eggert  <eggert@twinsun.com>
151901         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
151902         xreadlink.c now includes it unconditionally.
151904 2003-07-01  Paul Eggert  <eggert@twinsun.com>
151906         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
151907         having it depend on HAVE_SYS_TYPES_H.
151909 2003-07-01  Bruno Haible  <bruno@clisp.org>
151911         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
151912         <sys/types.h> should be sufficient.
151913         Reported by Paul Eggert.
151915 2003-06-26  Karl Berry  <karl@gnu.org>
151917         * config/depcomp: update from automake.
151919 2003-06-26  Bruno Haible  <bruno@clisp.org>
151921         * modules/human: Depend on module stdbool.
151923 2003-06-25  Bruno Haible  <bruno@clisp.org>
151925         * modules/readlink: New file.
151926         * modules/xreadlink: Depend on it.
151927         * MODULES.html.sh (func_all_modules): Add readlink.
151929 2003-06-25  Bruno Haible  <bruno@clisp.org>
151931         * m4/readlink.m4: New file.
151933 2003-06-25  Bruno Haible  <bruno@clisp.org>
151935         * lib/readlink.c: New file.
151937 2003-06-22  Karl Berry  <karl@gnu.org>
151939         * config/srclist.txt: update mkinstalldirs from automake.
151940         * config/mkinstalldirs: update.
151942 2003-06-22  Bruno Haible  <bruno@clisp.org>
151944         Portability to mingw32.
151945         * m4/ssize_t.m4: New file, from GNU gettext.
151946         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
151947         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
151949 2003-06-22  Bruno Haible  <bruno@clisp.org>
151951         * modules/safe-read: Add m4/ssize_t.m4.
151952         * modules/xreadlink: Add m4/ssize_t.m4.
151954 2003-06-20  Bruno Haible  <bruno@clisp.org>
151956         Assume C89, so PARAMS isn't needed.
151957         * lib/unicodeio.h (PARAMS): Remove.
151958         * lib/unicodeio.c: Don't use PARAMS.
151960 2003-06-18  Karl Berry  <karl@gnu.org>
151962         * config/config.{guess,sub}: update from prep.
151964 2003-06-18  Jim Meyering  <jim@meyering.net>
151966         Merge changes from coreutils.
151967         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
151968         Remove explicit declarations of xmalloc and realloc.
151969         Include xalloc.h.
151970         (read_utmp): Remove anachronistic cast of xmalloc.
151972 2003-06-17  Paul Eggert  <eggert@twinsun.com>
151974         Assume C89, so PARAMS isn't needed.
151975         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
151976         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
151977         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
151978         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
151979         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
151980         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
151981         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
151982         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
151983         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
151984         lib/xstrtod.h, lib/xstrtol.h: Likewise.
151985         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
151986         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
151987         no longer needed. Anyway, config.h should always be included before any
151988         other file.
151990 2003-06-11  Simon Josefsson  <jas@extundo.com>
151992         * modules/sysexits: New file.
151993         * MODULES.html.sh (func_all_modules): Add sysexits.
151995 2003-06-11  Simon Josefsson  <jas@extundo.com>
151997         * lib/sysexit_.h: New file.
151999 2003-06-11  Derek Price  <derek@ximbiot.com>
152001         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
152002         necessary.
152004 2003-06-11  Bruno Haible  <bruno@clisp.org>
152006         * m4/sysexits.m4: New file.
152008 2003-06-10  Simon Josefsson  <jas@extundo.com>
152010         * lib/argp.h: New file, from glibc.
152011         * lib/argp-ba.c: New file, from glibc.
152012         * lib/argp-eexst.c: New file, from glibc.
152013         * lib/argp-fmtstream.c: New file, from glibc.
152014         * lib/argp-fmtstream.h: New file, from glibc.
152015         * lib/argp-fs-xinl.c: New file, from glibc.
152016         * lib/argp-help.c: New file, from glibc.
152017         * lib/argp-namefrob.h: New file, from glibc.
152018         * lib/argp-parse.c: New file, from glibc.
152019         * lib/argp-pv.c: New file, from glibc.
152020         * lib/argp-pvh.c: New file, from glibc.
152021         * lib/argp-xinl.c: New file, from glibc.
152023 2003-06-10  Simon Josefsson  <jas@extundo.com>
152025         * modules/strchrnul: New file.
152027 2003-06-10  Simon Josefsson  <jas@extundo.com>
152029         * modules/argp: New file.
152031 2003-06-10  Simon Josefsson  <jas@extundo.com>
152033         * m4/strchrnul.m4: New file.
152035 2003-06-10  Simon Josefsson  <jas@extundo.com>
152037         * lib/strchrnul.h: New file.
152038         * lib/strchrnul.c: New file.
152040 2003-06-10  Bruno Haible  <bruno@clisp.org>
152042         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
152044 2003-06-07  Karl Berry  <karl@gnu.org>
152046         * config/config.{guess,sub}: update from prep.
152048 2003-06-07  Jim Meyering  <jim@meyering.net>
152050         * modules/strtod: Use $(...) notation, not @...@ for
152051         AC_REPLACE'd variables.
152052         * modules/localcharset: Likewise.
152054 2003-06-07  Jim Meyering  <jim@meyering.net>
152056         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
152057         in place of my name in the copyright comment.
152058         Remove definition and uses of __P.
152060         From coreutils.
152061         * lib/stat.c: Don't declare xmalloc explicitly.
152062         Instead, include "xalloc.h".
152063         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
152064         xrealloc, and xcalloc return values.
152065         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
152066         Improve comment.
152067         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
152069 2003-06-07  Bruno Haible  <bruno@clisp.org>
152071         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
152072         avoid AC_CONFIG_LINKS.
152073         * modules/fnmatch (Makefile.am): Use explicit creation rule for
152074         fnmatch.h, to avoid AC_CONFIG_LINKS.
152075         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
152077 2003-06-07  Bruno Haible  <bruno@clisp.org>
152079         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
152080         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
152081         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
152082         directory.
152083         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
152084         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
152085         directory.
152087 2003-06-06  Jim Meyering  <jim@meyering.net>
152089         Merge from coreutils.
152090         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
152091         Consolidate declarations and initializations of *_base* locals.
152093         Merge from coreutils.
152094         This avoids a core dump on systems without GNU putenv,
152095         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
152096         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
152097         (unsetenv): New static function, from GNU libc.
152098         (rpl_putenv): Use it.
152100         * lib/modechange.c: Remove trailing blanks.
152102         Merge from coreutils.
152103         * lib/fsusage.c: Remove declaration of statfs.
152104         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
152106         * lib/posixtm.c: Include <stdbool.h> unconditionally.
152108 2003-06-06  Jim Meyering  <jim@meyering.net>
152110         * lib/stdbool_.h: Renamed from stdbool.h.in.
152112 2003-06-06  Jim Meyering  <jim@meyering.net>
152113             Bruno Haible  <bruno@clisp.org>
152115         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
152116         Adjust Makefile.am snippet not to redirect directly to target.
152117         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
152119 2003-06-05  Paul Eggert  <eggert@twinsun.com>
152121         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
152122         mismatch, look in future quarters as well as past.  This fixes a
152123         bug when processing fall-backwards gaps immediately after a long
152124         period of daylight-saving time.
152126         * lib/mktime.c: Assume freestanding C89 or better.
152127         (HAVE_LIMITS_H): Remove.  Assume it's 1.
152128         (__P): Remove; not used.
152129         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
152130         (mktime, not_equal_tm, print_tm, check_result,
152131         main): Use prototypes.  Use const * where appropriate.
152132         (main): Fix typo in testing code that uncovered by above changes.
152133         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
152135 2003-06-04  Paul Eggert  <eggert@twinsun.com>
152137         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
152138         locale.h, localeconv.  This merges changes from coreutils.
152140         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
152141         It can be removed after the next Autoconf is released.
152142         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
152143         needed.
152145 2003-06-04  Paul Eggert  <eggert@twinsun.com>
152147         * lib/mktime.c: Fix Debian bug 177940
152148         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
152149         (localtime_offset): Now long int, not time_t, because we want it
152150         to be guaranteed to be signed.  All uses changed.
152151         (__mktime_internal): If overflow would occur when adding offset,
152152         don't add it.
152154         Merge 'human' changes from coreutils.  Rewrite to support
152155         locale-specific notations like thousands separators.
152156         * lib/human.c: Simplify authorship notice.
152157         Include human.h immediately after config.h.
152158         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
152159         <limits.h>: Do not include, since human.h does.
152160         (SIZE_MAX, UINTMAX_MAX): New macros.
152161         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
152162         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
152163         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
152164         (power_letter): Renamed from suffixes.
152165         (generate_suffix_backwards): Remove.
152166         (adjust_value): Now takes int style (because of human.h changes)
152167         and long double value (for greater precision on some platforms).
152168         (group_number): New function.
152169         (human_readable): Use it.  Use integer options, not enum.
152170         Put the options before the sizes in the arg list.
152171         Support all the new options.
152172         The old human_readable function has been removed;
152173         use inttostr.h instead.
152174         (human_readable, default_block_size, humblock):
152175         Use uintmax_t, not int, for block sizes.
152176         (human_readable_inexact, block_size_types): Remove.
152177         (block_size_opts): New constant.
152178         (human_options): Renamed from human_block_size, with new signature
152179         that allows block sizes up to UINTMAX_MAX.  All callers changed.
152180         * lib/human.h: Add copyright and authorship notice.
152181         Include <limits.h> and <stdbool.h> unconditionally.
152182         (PARAMS): Remove.  All uses removed.
152183         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
152184         (enum human_inexact_style): Remove tag; now a nameless enum.
152185         (human_floor, human_ceiling, human_round_to_even): Now have
152186         values 2, 0, 1 rather than -1, 1, 0.
152187         (human_group_digits, human_suppress_point_zero, human_autoscale,
152188         human_base_1024, human_SI, human_B): New constants.
152189         (human_readable_inexact, human_block_size): Remove.
152190         (human_readable): Size args are now uintmax_t, not int.
152191         (human_options): New decl.
152193         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
152194         unnecessary now that we assume C89 or better.  This change
152195         imported from coreutils.
152197         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
152198         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
152199         in the 2003-05-30 sync from glibc.
152201         .h files should stand alone, but we shouldn't include <sys/types.h>
152202         if we can get away with just <stddef.h>.
152204         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
152205         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
152206         rather than <sys/types.h>, as we merely need size_t.
152207         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
152208         to get size_t.
152209         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
152210         Include <stdio.h>, to get FILE.
152211         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
152212         memcasecmp.h has included <stddef.h> and all we need is size_t.
152213         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
152214         our interface, instead of including <sys/types.h>
152216 2003-06-04  Paul Eggert  <eggert@twinsun.com>
152218         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
152219         now, as glibc mktime is buggy on non-glibc systems.
152221 2003-06-03  Karl Berry  <karl@gnu.org>
152223         * config/config.sub: update from prep.
152225 2003-06-02  Paul Eggert  <eggert@twinsun.com>
152227         [from coreutils]
152228         Fix some minor time-related bugs with POSIX time arguments.
152229         Some valid time stamps were being rejected (notably -1, and
152230         time stamps before 1900 on 64-bit hosts).  And some invalid
152231         time stamps were being accepted, e.g. September 31.
152233         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
152234         that we can return (time_t) -1 successfully.
152235         * lib/posixtm.c: Likewise.
152236         [HAVE_STDBOOL_H]: Include <stdbool.h>.
152237         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
152238         (t): Remove static var.
152239         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
152240         of static var.  All uses changed.
152241         (year): Do not reject years before 1900; they can occur with
152242         64-bit time_t.
152243         (posix_time_parse): Do not check for out-of-range components;
152244         that is now the caller's responsibility, since our checks were
152245         only approximations.
152246         (posixtime): Use mktime to check for out-of-range components,
152247         since it knows them exactly.
152248         If mktime returns (time_t) -1, check whether an error actually occurred
152249         by invoking localtime on -1.
152250         (main) [TEST_POSIXTIME]: Check for input data errors, and report
152251         posixtime failures better.
152252         Improve the test data (in comments only).
152254 2003-06-02  Karl Berry  <karl@gnu.org>
152256         * config/mkinstalldirs (version): new variable.
152257         (--version): new option.
152258         (usage): improve message.
152260 2003-05-30  Karl Berry  <karl@gnu.org>
152262         * lib/mktime.c: update from libc.
152264 2003-05-30  Bruno Haible  <bruno@clisp.org>
152266         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
152267         * config/config.rpath: Upgrade to gettext-0.12.1.
152269 2003-05-30  Bruno Haible  <bruno@clisp.org>
152271         * m4/gettext.m4: Upgrade to gettext-0.12.1.
152272         * m4/nls.m4: New file, from gettext-0.12.1.
152273         * m4/po.m4: New file, from gettext-0.12.1.
152274         * m4/progtest.m4: Upgrade to gettext-0.12.1.
152276 2003-05-30  Bruno Haible  <bruno@clisp.org>
152278         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
152279         * lib/localcharset.h: Likewise.
152280         * lib/localcharset.c: Likewise.
152282 2003-05-29  Karl Berry  <karl@gnu.org>
152284         * config/config.rpath: update from gettext.
152286 2003-05-28  Paul Eggert  <eggert@twinsun.com>
152288         Assume the headers required for C89 freestanding compilers.
152289         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
152290         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
152291         * m4/human.m4 (gl_HUMAN): Likewise.
152292         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
152293         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
152294         * m4/userspec.m4 (gl_USERSPEC): Likewise.
152295         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
152296         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
152297         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
152299 2003-05-28  Paul Eggert  <eggert@twinsun.com>
152301         Assume the headers required for C89 freestanding compilers.
152302         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
152303         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
152304         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
152305         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
152306         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
152307         define, since <limits.h> is guaranteed to do that.
152308         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
152309         * lib/exclude.c: Include <stdbool.h> unconditionally.
152310         * lib/tempname.c: Include <stddef.h> unconditionally.
152311         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
152312         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
152313         <stddef.h> does that.
152314         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
152315         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
152316         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
152317         needed.
152318         * lib/xstrtol.c: Likewise.
152319         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
152320         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
152322         * lib/addext.c (addext): Use assignment rather than cast, to avoid
152323         warnings on some platforms.
152325         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
152326         arbitrarily.
152328 2003-05-26  Jim Meyering  <jim@meyering.net>
152330         Merge in a change from coreutils:
152331         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
152332         that is guaranteed to be `no'.  Use `no_such_member' to indicate
152333         that condition, rather than `-1' which is slightly misleading.
152334         Change the name of the cache variable to have the gl_ prefix.
152335         Prompted by a patch from Richard Dawe for DJGPP.
152337 2003-05-24  Karl Berry  <karl@gnu.org>
152339         * config/config.guess: update from prep.
152341 2003-05-22  Karl Berry  <karl@gnu.org>
152343         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
152345 2003-05-20  Karl Berry  <karl@gnu.org>
152347         * config/config.guess: update from prep.
152349 2003-05-18  Karl Berry  <karl@gnu.org>
152351         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
152352         might actually be set by the user.
152354         * config/depcomp, install-sh, mdate-sh: update from automake.
152356 2003-05-17  Bruno Haible  <bruno@clisp.org>
152358         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
152359         invalid expansion for AC_EGREP_CPP.
152360         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
152361         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
152362         Suggested by Akim Demaille <akim@epita.fr> in
152363         http://mail.gnu.org/r/bug-autoconf/2003-05/threads.html
152365 2003-05-12  Jim Meyering  <jim@meyering.net>
152367         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
152368         the space-padded-by-default conversion specifiers, %e, %k, %l.
152370 2003-05-12  Bruno Haible  <bruno@clisp.org>
152372         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
152373         the string is longer than 4 KB.
152375 2003-05-11  Karl Berry  <karl@gnu.org>
152377         * config/config.{guess,sub}: update from prep.
152379 2003-05-09  Bruno Haible  <bruno@clisp.org>
152381         * modules/error: Add m4/strerror_r.m4 to file list.
152383 2003-05-03  Bruno Haible  <bruno@clisp.org>
152385         Upgrade to Unicode-4.0.
152386         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
152387         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
152388         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
152389         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
152390         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
152391         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
152392         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
152393         Change width of U+E0100..U+E01EF from 1 to 0.
152395 2003-04-25  Jim Meyering  <jim@meyering.net>
152397         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
152398         of type size_t, not int.
152400 2003-04-25  Bruno Haible  <bruno@clisp.org>
152402         * lib/copy-file.c: Include <stddef.h>, for size_t.
152404 2003-04-21  Paul Eggert  <eggert@twinsun.com>
152406         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
152407         code which expansion is under static control.  Patch imported from
152408         Akim Demaille's patch to Bison; see
152409         <http://mail.gnu.org/r/bison-patches/2003-03/msg00057.html>.
152411 2003-04-14  Bruno Haible  <bruno@clisp.org>
152413         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
152415 2003-04-11  Jim Meyering  <jim@meyering.net>
152417         Merge changes from Coreutils.
152419         2003-03-22  Jim Meyering  <jim@meyering.net>
152421         * lib/strftime.c (widen): Cast alloca return value to proper type.
152423         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
152425         From GNU libc.
152426         * lib/strftime.c (my_strftime): Handle very large width
152427         specifications for numeric values correctly.  Improve checks for
152428         overflow.
152430         2003-01-19  Jim Meyering  <jim@meyering.net>
152432         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
152433         definitions.
152434         (nl_get_alt_digit) [! defined my_strftime]: Define.
152435         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
152436         _nl_get_alt_digit and _nl_get_walt_digit.
152438         * lib/strftime.c (my_strftime): Merge in locale-related changes from
152439         libc. These changes have no effect outside of _LIBC.
152441 2003-04-10  Bruno Haible  <bruno@clisp.org>
152443         * modules/findprog: New file.
152444         * MODULES.html.sh (func_all_modules): Add it.
152446 2003-04-10  Bruno Haible  <bruno@clisp.org>
152448         * m4/findprog.m4: New file.
152449         * m4/eaccess.m4: New file.
152451 2003-04-10  Bruno Haible  <bruno@clisp.org>
152453         * lib/findprog.h: New file, from GNU gettext.
152454         * lib/findprog.c: New file, from GNU gettext.
152456 2003-04-05  Jim Meyering  <jim@meyering.net>
152458         Merge changes from Coreutils.
152460         * lib/exclude.h (PARAMS): Remove definition and uses.
152461         * lib/exclude.c: Remove uses of `PARAMS'.
152463         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
152464         Add test-cases for DOS filenames. Declare program_name.
152465         (main): Set up program_name.  Patch by Rich Dawe.
152467         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
152468         error from mntctl.
152469         Use mntctl's return value to drive the entry-processing loop, since
152470         we can't rely on the value of the vmt_length member in the last
152471         entry.  On some systems doing so could result in exhausting
152472         virtual memory.  Based in part on a patch from Mike Jetzer.
152474 2003-04-04  Bruno Haible  <bruno@clisp.org>
152476         * modules/linebreak: New file.
152477         * MODULES.html.sh (func_all_modules): Add it.
152479 2003-04-04  Bruno Haible  <bruno@clisp.org>
152481         * m4/linebreak.m4: New file.
152483 2003-04-04  Bruno Haible  <bruno@clisp.org>
152485         * lib/linebreak.h: New file, from GNU gettext.
152486         * lib/linebreak.c: New file, from GNU gettext with slight
152487         modifications.
152488         * lib/lbrkprop.h: New file, from GNU gettext.
152490 2003-04-03  Bruno Haible  <bruno@clisp.org>
152492         * modules/utf8-ucs4: New file.
152493         * modules/utf16-ucs4: New file.
152494         * modules/ucs4-utf8: New file.
152495         * modules/ucs4-utf16: New file.
152496         * MODULES.html.sh (func_all_modules): Add them.
152498 2003-04-03  Bruno Haible  <bruno@clisp.org>
152500         * m4/utf-ucs4.m4: New file.
152501         * m4/ucs4-utf.m4: New file.
152503 2003-04-03  Bruno Haible  <bruno@clisp.org>
152505         * lib/utf8-ucs4.h: New file, from GNU gettext.
152506         * lib/utf16-ucs4.h: New file, from GNU gettext.
152507         * lib/ucs4-utf8.h: New file, from GNU gettext.
152508         * lib/ucs4-utf16.h: New file, from GNU gettext.
152510 2003-04-02  Bruno Haible  <bruno@clisp.org>
152512         * modules/binary-io: New file.
152513         * MODULES.html.sh (func_all_modules): Add it.
152515 2003-04-02  Bruno Haible  <bruno@clisp.org>
152517         * lib/binary-io.h: New file, from GNU gettext.
152519 2003-04-01  Bruno Haible  <bruno@clisp.org>
152521         * modules/pathname: New file.
152522         * MODULES.html.sh (func_all_modules): Add it.
152524 2003-04-01  Bruno Haible  <bruno@clisp.org>
152526         * lib/pathname.h: New file, from GNU gettext.
152527         * lib/concatpath.c: New file, from GNU gettext.
152529 2003-03-30  Bruno Haible  <bruno@clisp.org>
152531         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
152533 2003-03-30  Bruno Haible  <bruno@clisp.org>
152535         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
152536         function chown() doesn't exist.
152538 2003-03-28  Bruno Haible  <bruno@clisp.org>
152540         * modules/copy-file: New file.
152541         * MODULES.html.sh (func_all_modules): Add it.
152543 2003-03-28  Bruno Haible  <bruno@clisp.org>
152545         * m4/copy-file.m4: New file.
152547 2003-03-28  Bruno Haible  <bruno@clisp.org>
152549         * lib/copy-file.h: New file, from GNU gettext.
152550         * lib/copy-file.c: New file, from GNU gettext.
152552 2003-03-18  Jim Meyering  <jim@meyering.net>
152554         * lib/quote.c (quote_n): Fix typo in comment.
152556 2003-03-18  Bruno Haible  <bruno@clisp.org>
152558         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
152559         checking.
152560         * m4/onceonly_2_57.m4: Likewise.
152562 2003-03-17  Bruno Haible  <bruno@clisp.org>
152564         * m4/onceonly.m4: Require autoconf 2.54 or newer.
152565         (m4_quote): Remove macro.
152566         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
152568 2003-03-14  Jim Meyering  <jim@meyering.net>
152570         Merge changes from Coreutils.
152571         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
152572         to be const, in order to avoid warnings.
152573         (obstack_room): Likewise.
152574         (obstack_empty_p): Likewise.
152576 2003-03-14  Bruno Haible  <bruno@clisp.org>
152578         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
152579         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
152581 2003-03-13  Paul Eggert  <eggert@twinsun.com>
152583         Merge changes from Bison.
152584         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
152585         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
152586         when compiling Bison 1.875's `bitset bset = obstack_alloc
152587         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
152588         * lib/hash.c: Include <stdbool.h> unconditionally.
152590 2003-03-13  Paul Eggert  <eggert@twinsun.com>
152592         * m4/onceonly.m4 (m4_quote): New macro.
152593         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
152594         Quote AC_FOREACH variable-expansions properly.
152596 2003-03-13  Paul Eggert  <eggert@twinsun.com>
152598         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
152600 2003-03-09  Paul Eggert  <eggert@twinsun.com>
152602         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
152603         Reported by Bruce Becker; see:
152604         http://mail.gnu.org/r/bug-bison/2003-03/msg00017.html
152606 2003-03-03  Paul Eggert  <eggert@twinsun.com>
152607             Bruno Haible  <bruno@clisp.org>
152609         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
152610         Reported by John Hughes, see
152611         http://mail.gnu.org/r/bug-bison/2003-02/msg00030.html
152613 2003-02-20  Bruno Haible  <bruno@clisp.org>
152615         * MODULES.html.sh (func_all_modules): Add poll.
152617 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
152619         * modules/poll: New file.
152621 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
152623         * lib/poll_.h: New file.
152624         * lib/poll.c: New file.
152626 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
152628         * m4/poll.m4: New file.
152630 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
152632         * modules/mathl: New file.
152634 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
152636         * lib/mathl.h: New file.
152637         * lib/acosl.c: New file.
152638         * lib/asinl.c: New file.
152639         * lib/atanl.c: New file.
152640         * lib/ceill.c: New file.
152641         * lib/cosl.c: New file.
152642         * lib/expl.c: New file.
152643         * lib/floorl.c: New file.
152644         * lib/frexpl.c: New file.
152645         * lib/ldexpl.c: New file.
152646         * lib/logl.c: New file.
152647         * lib/sincosl.c: New file.
152648         * lib/sinl.c: New file.
152649         * lib/sqrtl.c: New file.
152650         * lib/tanl.c: New file.
152651         * lib/trigl.c: New file.
152652         * lib/trigl.h: New file.
152654 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
152656         * m4/mathl.m4: New file.
152658 2003-02-18  Bruno Haible  <bruno@clisp.org>
152660         * MODULES.html.sh (func_all_modules): Add mathl.
152662 2003-02-17  Bruno Haible  <bruno@clisp.org>
152664         * modules/mkdtemp: New module.
152665         * MODULES.html.sh (func_all_modules): Add it.
152667 2003-02-17  Bruno Haible  <bruno@clisp.org>
152669         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
152671 2003-02-17  Bruno Haible  <bruno@clisp.org>
152673         * lib/mkdtemp.h: New file, from GNU gettext.
152674         * lib/mkdtemp.c: New file, from GNU gettext.
152676 2003-02-02  Jim Meyering  <jim@meyering.net>
152678         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
152679         e.g. glibc-2.2.93.
152681 2003-01-31  Bruno Haible  <bruno@clisp.org>
152683         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
152684         'rpl_rename'.
152685         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
152686         'rpl_strnlen'.
152687         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
152688         'rpl_strtod'.
152689         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
152690         'rpl_utime'.
152692 2003-01-31  Bruno Haible  <bruno@clisp.org>
152694         * lib/rename.c: #undef rename before defining rpl_rename.
152695         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
152697 2003-01-30  Bruno Haible  <bruno@clisp.org>
152699         * modules/vasnprintf, modules/vasprintf: New modules.
152700         * MODULES.html.sh (func_all_modules): Add them.
152702 2003-01-30  Bruno Haible  <bruno@clisp.org>
152704         * m4/signed.m4: New file, from GNU gettext.
152705         * m4/longdouble.m4: New file, from GNU gettext.
152706         * m4/wchar_t.m4: New file, from GNU gettext.
152707         * m4/wint_t.m4: New file, from GNU gettext.
152708         * m4/vasnprintf.m4: New file.
152709         * m4/vasprintf.m4: New file.
152711 2003-01-30  Bruno Haible  <bruno@clisp.org>
152713         * lib/printf-args.h: New file, from GNU gettext.
152714         * lib/printf-args.c: New file, from GNU gettext.
152715         * lib/printf-parse.h: New file, from GNU gettext.
152716         * lib/printf-parse.c: New file, from GNU gettext.
152717         * lib/vasnprintf.h: New file, from GNU gettext.
152718         * lib/vasnprintf.c: New file, from GNU gettext.
152719         * lib/asnprintf.c: New file, from GNU gettext.
152720         * lib/vasprintf.h: New file, from GNU gettext with modifications.
152721         * lib/vasprintf.c: New file, from GNU gettext.
152722         * lib/asprintf.c: New file, from GNU gettext.
152724 2003-01-29  Bruno Haible  <bruno@clisp.org>
152726         * modules/stpncpy: New module.
152727         * MODULES.html.sh (func_all_modules): Add it.
152729 2003-01-29  Bruno Haible  <bruno@clisp.org>
152731         * m4/stpncpy.m4: New file.
152733 2003-01-29  Bruno Haible  <bruno@clisp.org>
152735         * lib/stpncpy.h: New file, from GNU gettext with modifications.
152736         * lib/stpncpy.c: New file, from GNU gettext with modifications.
152738 2003-01-28  Bruno Haible  <bruno@clisp.org>
152740         * modules/c-ctype: New module.
152741         * MODULES.html.sh (func_all_modules): Add it.
152743 2003-01-28  Bruno Haible  <bruno@clisp.org>
152745         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
152746         Paul Eggert.
152747         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
152748         Paul Eggert.
152750 2003-01-27  Bruno Haible  <bruno@clisp.org>
152752         * modules/xsetenv: New module.
152753         * MODULES.html.sh (func_all_modules): Add it.
152755 2003-01-27  Bruno Haible  <bruno@clisp.org>
152757         * lib/xsetenv.h: New file, from GNU gettext.
152758         * lib/xsetenv.c: New file, from GNU gettext.
152760 2003-01-23  Jim Meyering  <jim@meyering.net>
152762         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
152763         from working on systems without dirfd (at least Irix and OSF1/Tru64).
152765 2003-01-23  Bruno Haible  <bruno@clisp.org>
152767         * modules/minmax: New module.
152768         * MODULES.html.sh (func_all_modules): Add it.
152770 2003-01-23  Bruno Haible  <bruno@clisp.org>
152772         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
152773         Eggert.
152775 2003-01-22  Bruno Haible  <bruno@clisp.org>
152777         * modules/exit: New module.
152778         * MODULES.html.sh (func_all_modules): Add it.
152780 2003-01-22  Bruno Haible  <bruno@clisp.org>
152782         * lib/exit.h: New file, from GNU gettext.
152784 2003-01-19  Bruno Haible  <bruno@clisp.org>
152786         * gnulib-tool: Recognize option --extract-maintainer.
152787         (func_get_maintainer): New function.
152788         * modules/*: Add Maintainer entry.
152790 2003-01-16  Jim Meyering  <jim@meyering.net>
152792         * m4/regex.m4: The `regex' struct is both input and output.
152793         Initialize it before each use.  Patch by Tim Waugh.
152795 2003-01-16  Bruno Haible  <bruno@clisp.org>
152797         * MODULES.html.sh: Add a table of contents. Add the module name as
152798         leftmost column. Add hyperlinks.
152800 2003-01-15  Bruno Haible  <bruno@clisp.org>
152802         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
152804 2003-01-15  Bruno Haible  <bruno@clisp.org>
152806         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
152807         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
152808         suffix.
152810 2003-01-15  Bruno Haible  <bruno@clisp.org>
152812         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
152814 2003-01-15  Bruno Haible  <bruno@clisp.org>
152816         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
152817         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
152819 2003-01-14  Jim Meyering  <jim@meyering.net>
152821         * lib/same.c (same_name): Tweak a comment.
152823 2003-01-14  Bruno Haible  <bruno@clisp.org>
152825         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
152826         when a string comparison is sufficient.
152828 2003-01-14  Bruno Haible  <bruno@clisp.org>
152830         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
152831         'unsigned int'.
152833 2003-01-14  Bruno Haible  <bruno@clisp.org>
152835         * lib/hash-pjw.c: Add comment about low quality of this function.
152837 2003-01-13  Bruno Haible  <bruno@clisp.org>
152839         * modules/stpcpy: Distribute lib/stpcpy.h.
152840         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
152842 2003-01-13  Bruno Haible  <bruno@clisp.org>
152844         * modules/*: Add a description.
152845         * modules/strpbrk: Fix Makefile.am snippet.
152846         * modules/strtoimax: Fix dependencies.
152847         * modules/strtoumax: Likewise.
152849 2003-01-13  Bruno Haible  <bruno@clisp.org>
152851         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
152852         * modules/alloca (Makefile.am): All object files depend on alloca.h.
152853         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
152855 2003-01-13  Bruno Haible  <bruno@clisp.org>
152857         * gnulib-tool (func_create_testdir): Store config/* files in the main
152858         directory.
152859         * config.rpath: Move to ...
152860         * config/config.rpath: ... here.
152861         * modules/gettext: Contains config/config.rpath, not config.rpath.
152862         * modules/iconv: Likewise.
152864 2003-01-12  Paul Eggert  <eggert@twinsun.com>
152866         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
152867         to avoid collisions with libcurses and libreadline.
152869         * m4/getstr.m4: Remove.
152870         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
152872 2003-01-12  Paul Eggert  <eggert@twinsun.com>
152874         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
152875         to avoid collisions with libcurses and libreadline.
152877         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
152878         * lib/getstr.h, getstr.c: Remove.
152879         * lib/getline.c: Include "getline.h", to check interface.
152880         Move body of old getstr.c here: this defines MIN_CHUNK and
152881         declares getdelim2, which is renamed from getstr.
152882         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
152884         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
152885         All uses changed.
152886         * lib/linebuffer.h: Likewise.
152887         (readline): Remove backward-compatibility macro.
152889 2003-01-12  Paul Eggert  <eggert@twinsun.com>
152891         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
152892         to avoid collisions with libcurses and libreadline.
152893         * getstr: Remove.
152894         * MODULES.html.sh: Remove getstr.
152895         * modules/getline: Depend on unlocked-io, not getstr.
152897 2003-01-12  Jim Meyering  <jim@meyering.net>
152899         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
152901 2003-01-10  Bruno Haible  <bruno@clisp.org>
152903         * modules/alloca: Change Makefile.am requirements. Simplify Include
152904         requirements. Add lib/alloca_.h to file list.
152906 2003-01-10  Bruno Haible  <bruno@clisp.org>
152908         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
152910 2003-01-10  Bruno Haible  <bruno@clisp.org>
152912         * lib/alloca_.h: New file.
152913         * lib/getdate.y: Unconditionally include alloca.h.
152914         * lib/makepath.c: Likewise.
152915         * lib/setenv.c: Likewise.
152916         * lib/userspec.c: Likewise.
152918 2003-01-09  Karl Berry  <karl@gnu.org>
152920         * MODULES.html.sh: include `dirname $0` in PATH, to find
152921         gnulib-tool.
152923 2003-01-09  Bruno Haible  <bruno@clisp.org>
152925         * modules/stdbool: Change configure.ac, Makefile.am requirements.
152926         Simplify Include requirements. Add lib/stdbool.h.in to file list.
152928 2003-01-09  Bruno Haible  <bruno@clisp.org>
152930         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
152932 2003-01-09  Bruno Haible  <bruno@clisp.org>
152934         * lib/stdbool.h.in: New file.
152936 2003-01-09  Bruno Haible  <bruno@clisp.org>
152938         * gnulib-tool (func_all_modules): Ignore files ending in ~.
152939         * MODULES.html.sh: Likewise.
152941 2003-01-08  Jim Meyering  <jim@meyering.net>
152943         * lib/full-write.c: Undefine and define-away `const' after inclusion
152944         of errno.h, not before.  Suggestion from Bruno Haible.
152946 2003-01-08  Bruno Haible  <bruno@clisp.org>
152948         * modules/full-read: Depend on full-write.
152950 2003-01-08  Bruno Haible  <bruno@clisp.org>
152952         * lib/safe-read.c: Include specification header first, to ensure its
152953         selfcontainedness.
152954         * lib/full-write.c: Likewise.
152956 2003-01-07  Jim Meyering  <jim@meyering.net>
152958         * lib/full-write.c: Rework so that it may serve to define full_read,
152959         too.
152960         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
152962 2003-01-07  Bruno Haible  <bruno@clisp.org>
152964         * lib/strtoimax.c: Include <stdint.h> as an alternative to
152965         <inttypes.h>.
152966         * lib/xstrtol.h: Likewise.
152967         * lib/xstrtoimax.c: Likewise.
152968         * lib/xstrtoumax.c: Likewise.
152969         * lib/human.h: Likewise.
152971         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
152972         on systems that have <inttypes.h> but not <stdint.h>.
152974 2003-01-07  Bruno Haible  <bruno@clisp.org>
152976         * MODULES.html.sh: Add copyright notice.
152977         (missed_files): Omit CVS directory entries.
152978         (func_module): Make it work with sed-3.02.
152979         * MODULES.txt: Remove file.
152981 2003-01-06  Jim Meyering  <jim@meyering.net>
152983         * lib/version-etc.c: Update year in translatable copyright string.
152985 2003-01-03  Karl Berry  <karl@gnu.org>
152987         * config/config.{guess,sub}: update from prep.
152989 2003-01-02  Karl Berry  <karl@gnu.org>
152991         * doc/COPYING.DOC: belatedly updated to 1.2.
152993 2003-01-01  Karl Berry  <karl@gnu.org>
152995         * gnulib-tool (func_verify_module): report module name $module in
152996         error message, not $1.
152997         * gnulib-tool (create-testdir): don't complain if destdir couldn't
152998         be created, only if it doesn't exist.
152999         * gnulib-tool (last_checkin_date): don't expand the $Date here.
153001 2002-12-31  Paul Eggert  <eggert@twinsun.com>
153003         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
153005 2002-12-31  Paul Eggert  <eggert@twinsun.com>
153007         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
153008         memcmp if strcoll doesn't work.
153010 2002-12-31  Bruno Haible  <bruno@clisp.org>
153012         * lib/utime.c (utime_null): No need to call ftruncate if the file was
153013         nonempty.
153015 2002-12-31  Bruno Haible  <bruno@clisp.org>
153017         * lib/memcoll.c (STRCOLL): New macro.
153018         (memcoll): Use it.
153020 2002-12-31  Bruno Haible  <bruno@clisp.org>
153022         * lib/localcharset.h: New file.
153023         * lib/localcharset.c: Include it.
153024         * lib/unicodeio.c: Likewise.
153026 2002-12-31  Bruno Haible  <bruno@clisp.org>
153028         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
153029         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
153031 2002-12-31  Bruno Haible  <bruno@clisp.org>
153033         * lib/getline.h: Include <stddef.h>, for size_t.
153035         * lib/unicodeio.h: Include <stddef.h>, for size_t.
153036         * lib/unicodeio.c: Don't include <stddef.h>.
153038 2002-12-31  Bruno Haible  <bruno@clisp.org>
153040         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
153041         HAVE_TM_ZONE.
153043 2002-12-24  Karl Berry  <karl@gnu.org>
153045         * config/config.guess: update from prep.
153047 2002-12-24  Bruno Haible  <bruno@clisp.org>
153049         General infrasructure.
153050         * m4/README: Rewritten.
153051         * m4/onceonly.m4: New file.
153052         * m4/onceonly_2_57.m4: New file.
153054         Module atexit.
153055         * m4/atexit.m4: New file.
153057         Module strtod.
153058         * m4/strtod.m4: New file.
153060         Module strtol.
153061         * m4/strtol.m4: New file.
153063         Module strtoul.
153064         * m4/strtoul.m4: New file.
153066         Module memchr.
153067         * m4/memchr.m4: New file.
153069         Module memcmp.
153070         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
153071         (jm_FUNC_MEMCMP): Invoke it.
153073         Module memcpy.
153074         * m4/memcpy.m4: New file.
153076         Module memmove.
153077         * m4/memmove.m4: New file.
153079         Module memset.
153080         * m4/memset.m4: New file.
153082         Module strcspn.
153083         * m4/strcspn.m4: New file.
153085         Module strpbrk.
153086         * m4/strpbrk.m4: New file.
153088         Module strstr.
153089         * m4/strstr.m4: New file.
153091         Module strerror.
153092         * m4/strerror.m4: New file.
153094         Module mktime.
153095         * m4/mktime.m4: Renamed from jm-mktime.m4.
153096         (gl_PREREQ_MKTIME): New macro.
153097         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
153099         Module malloc.
153100         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
153101         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
153102         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
153104         Module realloc.
153105         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
153106         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
153107         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
153109         Module strftime.
153110         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
153111         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
153112         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
153113         gl_TM_GMTOFF.
153114         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
153116         Module xalloc.
153117         * m4/xalloc.m4: New file.
153119         Module alloca.
153120         * m4/alloca.m4: New file.
153122         Module putenv.
153123         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
153124         (jm_FUNC_PUTENV): Invoke it.
153126         Module setenv.
153127         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
153128         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
153129         when invoked twice.
153130         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
153131         gt_FUNC_SETENV.
153133         Module memrchr.
153134         * m4/memrchr.m4: New file.
153136         Module stpcpy.
153137         * m4/stpcpy.m4: New file.
153139         Module strcase.
153140         * m4/strcase.m4: New file.
153142         Module strdup.
153143         * m4/strdup.m4: New file.
153145         Module strnlen.
153146         * m4/strnlen.m4: New file.
153148         Module strndup.
153149         * m4/strndup.m4: New file.
153151         Module xstrtod.
153152         * m4/xstrtod.m4: New file.
153154         Module xstrtol.
153155         * m4/xstrtol.m4: New file.
153157         Module getdate.
153158         * m4/getdate.m4: New file.
153160         Module unlocked-io.
153161         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
153162         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
153163         * m4/jm-glibc-io.m4n: Remove file.
153165         Module long-options.
153166         * m4/long-options.m4: New file.
153168         Module md5.
153169         * m4/md5.m4: New file.
153171         Module sha.
153172         * m4/sha.m4: New file.
153174         Module getstr.
153175         * m4/getstr.m4: New file.
153177         Module getline.
153178         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
153179         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
153180         <sys/types.h>, for size_t. Use the function name gnu_getline, not
153181         simply getline. Infoke gl_PREREQ_GETLINE.
153183         Module obstack.
153184         * m4/obstack.m4: New file.
153186         Module hash.
153187         * m4/hash.m4: New file.
153189         Module readtokens.
153190         * m4/readtokens.m4: New file.
153192         Module strverscmp.
153193         * m4/strverscmp.m4: New file.
153195         Module stdbool.
153196         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
153197         OSF/1.
153199         Module strtoll.
153200         * m4/strtoll.m4: New file.
153202         Module strtoull.
153203         * m4/strtoull.m4: New file.
153205         Module strtoimax.
153206         * m4/strtoimax.m4: New file.
153208         Module strtoumax.
153209         * m4/strtoumax.m4: New file.
153211         Module xstrtoimax.
153212         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
153213         jm_AC_PREREQ_XSTRTOIMAX.
153214         Moved the strtol prerequisites to strtol.m4.
153215         Moved the strtoll prerequisites to strtoll.m4.
153216         Moved the strtoimax prerequisites to strtoimax.m4.
153218         Module xstrtoumax.
153219         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
153220         jm_AC_PREREQ_XSTRTOUMAX.
153221         Moved the strtoul prerequisites to strtoul.m4.
153222         Moved the strtoull prerequisites to strtoull.m4.
153223         Moved the strtoumax prerequisites to strtoumax.m4.
153225         Module chown.
153226         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
153227         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
153229         Module dup2.
153230         * m4/dup2.m4: New file.
153232         Module ftruncate.
153233         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
153234         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
153236         Module getgroups.
153237         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
153238         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
153240         Module gettimeofday.
153241         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
153242         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
153243         gl_PREREQ_GETTIMEOFDAY.
153245         Module mkdir.
153246         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
153247         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
153249         Module mkstemp.
153250         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
153251         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
153252         jm_AC_TYPE_UINTMAX_T.
153253         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
153255         Module stat.
153256         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
153257         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
153259         Module lstat.
153260         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
153261         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
153263         Module timespec.
153264         * m4/timespec.m4 (gl_TIMESPEC): New macro.
153265         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
153266         * m4/st_mtim.m4: Indentation.
153268         Module nanosleep.
153269         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
153270         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
153271         gl_PREREQ_NANOSLEEP.
153273         Module regex.
153274         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
153275         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
153276         (gl_REGEX): New macro.
153278         Module rename.
153279         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
153280         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
153282         Module rmdir.
153283         * m4/rmdir.m4: New file.
153285         Module utime.
153286         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
153287         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
153288         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
153290         Module dirname.
153291         * m4/dirname.m4: New file.
153293         Module getopt.
153294         * m4/getopt.m4: New file.
153296         Module unistd-safer.
153297         * m4/unistd-safer.m4: New file.
153299         Module fnmatch.
153300         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
153301         declaration.
153302         (gl_PREREQ_FNMATCH_EXTRA): New macro.
153303         (gl_FUNC_FNMATCH_POSIX): New macro.
153304         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
153305         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
153306         simply fnmatch.
153308         Module exclude.
153309         * m4/exclude.m4: New file.
153311         Module human.
153312         * m4/human.m4: New file.
153314         Module acl.
153315         * m4/acl.m4: Nop.
153317         Module backupfile.
153318         * m4/backupfile.m4: New file.
153319         * m4/d-ino.m4: Indentation.
153321         Module fsusage.
153322         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
153323         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
153324         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
153326         Module dirfd.
153327         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
153328         requirements.
153330         Module euidaccess.
153331         * m4/euidaccess.m4: New file.
153333         Module file-type.
153334         * m4/file-type.m4: New file.
153336         Module fileblocks.
153337         * m4/fileblocks.m4: New file.
153339         Module filemode.
153340         * m4/filemode.m4: New file.
153342         Module isdir.
153343         * m4/isdir.m4: New file.
153345         Module lchown.
153346         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
153347         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
153349         Module makepath.
153350         * m4/makepath.m4: New file.
153352         Module modechange.
153353         * m4/modechange.m4: New file.
153355         Module mountlist.
153356         * m4/mountlist.m4: New file.
153357         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
153358         Indentation.
153360         Module path-concat.
153361         * m4/path-concat.m4: New file.
153363         Module pathmax.
153364         * m4/pathmax.m4: New file.
153366         Module same.
153367         * m4/same.m4: New file.
153369         Module save-cwd.
153370         * m4/save-cwd.m4: New file.
153372         Module savedir.
153373         * m4/savedir.m4: New file.
153375         Module xgetcwd.
153376         * m4/xgetcwd.m4: New file.
153377         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
153379         Module xreadlink.
153380         * m4/xreadlink.m4: New file.
153382         Module safe-read.
153383         * m4/safe-read.m4: New file.
153385         Module safe-write.
153386         * m4/safe-write.m4: New file.
153388         Module closeout.
153389         * m4/closeout.m4: New file.
153391         Module stdio-safer.
153392         * m4/stdio-safer.m4: New file.
153394         Module getpass.
153395         * m4/getpass.m4: New file.
153397         Module getugroups.
153398         * m4/getugroups.m4: New file.
153400         Module group-member.
153401         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
153402         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
153404         Module idcache.
153405         * m4/idcache.m4: New file.
153407         Module userspec.
153408         * m4/userspec.m4: New file.
153410         Module gettime.
153411         * m4/clock_time.m4: New file.
153412         * m4/gettime.m4: New file.
153414         Module settime.
153415         * m4/settime.m4: New file.
153417         Module posixtm.
153418         * m4/posixtm.m4: New file.
153420         Module gethostname.
153421         * m4/gethostname.m4: New file.
153423         Module canon-host.
153424         * m4/canon-host.m4: New file.
153426         Module gettext.
153427         * m4/codeset.m4: New file, from gettext-0.11.5.
153428         * m4/gettext.m4: New file, from gettext-0.11.5.
153429         * m4/glibc21.m4: New file, from gettext-0.11.5.
153430         * m4/iconv.m4: New file, from gettext-0.11.5.
153431         * m4/intdiv0.m4: New file, from gettext-0.11.5.
153432         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
153433         * m4/inttypes.m4: New file, from gettext-0.11.5.
153434         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
153435         * m4/isc-posix.m4: New file, from gettext-0.11.5.
153436         * m4/lcmessage.m4: New file, from gettext-0.11.5.
153437         * m4/lib-ld.m4: New file, from gettext-0.11.5.
153438         * m4/lib-link.m4: New file, from gettext-0.11.5.
153439         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
153440         * m4/progtest.m4: New file, from gettext-0.11.5.
153441         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
153442         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
153443         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
153445         Module localcharset.
153446         * m4/localcharset.m4: New file.
153448         Module hard-locale.
153449         * m4/hard-locale.m4: New file.
153451         Module mbswidth.
153452         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
153453         onceonly macros.
153454         * m4/mbrtowc.m4: Add comment.
153456         Module memcasecmp.
153457         * m4/memcasecmp.m4: New file.
153459         Module memcoll.
153460         * m4/memcoll.m4: New file.
153462         Module unicodeio.
153463         * m4/unicodeio.m4: New file.
153465         Module rpmatch.
153466         * m4/rpmatch.m4: New file.
153468         Module yesno.
153469         * m4/yesno.m4: New file.
153471         Module exitfail.
153472         * m4/exitfail.m4: New file.
153474         Module c-stack.
153475         * m4/c-stack.m4 (gl_C_STACK): New macro.
153476         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
153478         Module error.
153479         * m4/error.m4 (gl_ERROR): New macro.
153480         (jm_PREREQ_ERROR): Use onceonly macros.
153482         Module fatal.
153483         * m4/fatal.m4: New file.
153485         Module getloadavg.
153486         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
153487         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
153489         Module getpagesize.
153490         * m4/getpagesize.m4: New file.
153492         Module getusershell.
153493         * m4/getusershell.m4: New file.
153495         Module physmem.
153496         * m4/physmem.m4: New file.
153498         Module posixver.
153499         * m4/posixver.m4: New file.
153501         Module quotearg.
153502         * m4/quotearg.m4: New file.
153504         Module quote.
153505         * m4/quote.m4: New file.
153507         Module readutmp.
153508         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
153510         Module sig2str.
153511         * m4/sig2str.m4: New file.
153513         Other.
153514         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
153515         ulonglong.m4.
153516         * m4/intmax_t.m4: New file.
153517         * m4/d-type.m4: Indentation.
153518         * m4/jm-macros.m4: Update.
153519         * m4/prereq.m4 (jm_PREREQ): Update.
153520         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
153521         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
153522         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
153523         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
153524         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
153525         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
153526         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
153527         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
153528         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
153529         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
153530         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
153531         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
153532         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
153533         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
153534         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
153535         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
153536         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
153537         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
153538         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
153540 2002-12-24  Bruno Haible  <bruno@clisp.org>
153542         * MODULES.txt: Update according to m4/ changes.
153544         Module gettext.
153545         * config.rpath: New file, from gettext-0.11.5.
153547         * modules/*: New module descriptions.
153548         * gnulib-tool: New file.
153549         * MODULES.html.sh: New file.
153551 2002-12-21  Karl Berry  <karl@gnu.org>
153553         * doc/fdl.texi: update to version 1.2.
153555 2002-12-19  Karl Berry  <karl@gnu.org>
153557         * config/config.guess: update from prep.
153559 2002-12-18  Bruno Haible  <bruno@clisp.org>
153561         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
153562         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
153564 2002-12-17  Bruno Haible  <bruno@clisp.org>
153566         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
153567         stdlib.h, string.h.
153569 2002-12-17  Bruno Haible  <bruno@clisp.org>
153571         * lib/canon-host.c (strdup): Remove unused declaration.
153573         * lib/fsusage.c: Include full_read.h.
153574         (get_fs_usage): Use full_read instead of safe_read.
153576         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
153578 2002-12-12  Karl Berry  <karl@gnu.org>
153580         * config/config.guess: update from prep.
153582 2002-12-11  Bruno Haible  <bruno@clisp.org>
153584         * m4/setenv.m4: New file, from gettext-0.11.5.
153586 2002-12-11  Bruno Haible  <bruno@clisp.org>
153588         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
153589         not unsetenv().
153590         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
153591         modifications:
153593         2002-12-11  Bruno Haible  <bruno@clisp.org>
153595                 * setenv.c (alloca): Fall back to malloc.
153596                 (freea): New macro.
153597                 (setenv): Use freea() to free memory allocated with alloca().
153599         2002-11-13  Bruno Haible  <bruno@clisp.org>
153601                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
153602                 function declarations.
153603                 * unsetenv.c (unsetenv): Likewise.
153605         2002-03-04  Bruno Haible  <bruno@clisp.org>
153607                 Portability to AIX 4.3.3.
153608                 * unsetenv.c: New file, extracted from setenv.c.
153609                 * setenv.c: Move the unsetenv() function to unsetenv.c.
153611         2001-12-20  Bruno Haible  <bruno@clisp.org>
153613                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
153614                 use malloc instead. For SunOS 4.
153616         2001-12-11  Bruno Haible  <bruno@clisp.org>
153618                 * setenv.c: Declare alloca.
153619                 (compar_fn_t): New typedef.
153620                 (KNOWN_VALUE, STORE_VALUE): Use it.
153622         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
153623         setenv.h.
153625 2002-12-10  Paul Eggert  <eggert@twinsun.com>
153627         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
153628         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
153629         Choose values that are less likely to collide with system fnmatch
153630         options.
153631         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
153632         defined (e.g., a pure POSIX system).
153633         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
153634         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
153636 2002-12-06  Paul Eggert  <eggert@twinsun.com>
153638         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
153639         a pain in practice to deal with generated m4 files.  This change
153640         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
153642         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
153643         and jm-glibc-io.m4, as they are no longer a special case.
153644         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
153645         kludge and the auto-generation stuff.  Check only whether the
153646         functions are declared, not whether they exist, since older hosts
153647         that don't declare the functions can't use the optimization anyway.
153649 2002-12-06  Jim Meyering  <jim@meyering.net>
153651         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
153653         Merge in changes from libc's misc/error.c, in preparation
153654         for the merge of gnulib's changes back into libc.
153656         * lib/error.c (_): Define only if not already defined.
153657         Move definition to follow all #include directives.
153658         Include unlocked-io.h only if !_LIBC.
153659         [_LIBC]: Include <libio/libioP.h>.
153660         [USE_IN_LIBIO]: Include <libio/iolibio.h>
153661         (fflush): Tweak definition to use INTUSE.
153662         (putc): Define.
153664 2002-12-05  Paul Eggert  <eggert@twinsun.com>
153666         * lib/alloca.c [defined emacs]: Include "lisp.h".
153667         (xalloc_die) [defined emacs]: New macro.
153668         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
153669         [! defined emacs]: Include <xalloc.h>.
153670         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
153671         (pointer): Typedef to POINTER_TYPE *.
153672         (malloc): Remove decl; we now always use xmalloc.
153673         (alloca): Use old-style definition, since Emacs needs this.
153674         Check for arithmetic overflow when computing combined size.
153676 2002-12-04  Paul Eggert  <eggert@twinsun.com>
153678         Do not generate unlocked-io.h automatically, since it's easier to
153679         maintain it by hand.
153681         * lib/unlocked-io.h: New file, from GNU diffutils,
153682         but with proper copyright notice and attribution.
153683         * lib/gen-uio: Remove.
153684         * lib/Makefile.am: Add copyright notice.
153685         (libfetish_a_SOURCES): Add unlocked-io.h.
153686         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
153687         (DISTCLEANFILES, io_functions): Remove macros.
153688         (EXTRA_DIST): Remove gen_uio.
153689         (unlocked-io.h): Remove rule.
153691 2002-12-04  Jim Meyering  <jim@meyering.net>
153693         Reflect the fact that stat.c and lstat.c are no longer generated.
153694         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
153695         (DISTCLEANFILES): Likewise.
153696         (EXTRA_DIST): Likewise.
153697         (all_local): Don't depend on stat.c or lstat.c.
153698         (stat.c, lstat.c): Remove rules.
153699         (EXTRA_DIST): Remove xstat.in.
153701         * lib/xstat.in: Remove file.  Contents moved into stat.c.
153702         * lib/stat.c: New file.  Contents mostly from xstat.in.
153703         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
153704         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
153706         * lib/safe-read.c: Rework so that it may serve to define safe_write,
153707         too.
153708         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
153710 2002-12-03  Jim Meyering  <jim@meyering.net>
153712         * lib/safe-read.c, safe-write.c: Change variable names and comments,
153713         but not semantics, to minimize the differences between these two files.
153714         (safe_read): Change comment to mention SAFE_READ_ERROR.
153716         * lib/safe-read.c (IS_EINTR): Define.
153717         (safe_read): Use IS_EINTR in place of in-function cpp directives.
153719 2002-12-02  Jim Meyering  <jim@meyering.net>
153721         * lib/safe-read.c (EINTR): Define.
153722         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
153723         (INT_MAX): Provide fallback.
153724         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
153726         * lib/safe-read.h (SAFE_READ_ERROR): Define.
153728 2002-12-02  Bruno Haible  <bruno@clisp.org>
153730         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
153731         Define, taken from safe-read.c.
153732         (INT_MAX): Provide fallback.
153733         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
153734         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
153736         * lib/safe-read.c (EINTR): Remove definition.
153737         (safe_read): Don't use EINTR if it is absent.
153739 2002-12-01  Jim Meyering  <jim@meyering.net>
153741         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
153742         zero.
153743         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
153745 2002-11-27  Paul Eggert  <eggert@twinsun.com>
153747         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
153748         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
153749         with `if (! (value < limit)) abort ();', for readability.
153751 2002-11-26  Karl Berry  <karl@gnu.org>
153753         * lib/strdup.c: copy from libc again, with jim's ok.
153754         * lib/.cppi-disable: re-add strdup.c
153756 2002-11-25  Karl Berry  <karl@gnu.org>
153758         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
153759         instead of "strtol.c".
153761 2002-11-25  Karl Berry  <karl@gnu.org>
153763         * config/install-sh: update from automake for variable quoting, $0 in
153764         error msgs, etc.
153766         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
153767         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
153768         entry.
153770 2002-11-25  Jim Meyering  <jim@meyering.net>
153772         * lib/mktime.c: Sync from libc, now that it has the latest fix.
153774 2002-11-24  Karl Berry  <karl@gnu.org>
153776         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
153777         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
153779 2002-11-24  Jim Meyering  <jim@meyering.net>
153781         Update from coreutils:
153783         * lib/mktime.c: Merge in changes from libc.
153785         Avoid a link-time failure on some Linux systems.
153786         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
153787         (otherwise).
153788         (__mon_yday): Declare with the STATIC attribute.
153789         (__mktime_internal): Likewise.
153790         Based on a report from Greg Schafer.
153792 2002-11-23  Jim Meyering  <jim@meyering.net>
153794         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
153795         Use `unsigned', not `int', as type of index.
153797         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
153799         * lib/fsusage.c: Remove unneeded parentheses around operands of
153800         `defined'.
153802 2002-11-22  Paul Eggert  <eggert@twinsun.com>
153804         * lib/quotearg.h: Allow multiple inclusion by surrounding with
153805         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
153806         so that we can be included first.
153807         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
153808         * lib/quotearg.c: Include quotearg.h immediately after config.h.
153809         No need to include stddef.h or sys/types.h any more.
153810         Surround local include files with "", not "<>".
153811         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
153812         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
153813         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
153814         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
153815         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
153816         (ISPRINT): Remove; no longer needed now that we assume C89.
153818         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
153819         Preserve errno.
153821         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
153822         quotearg_char): Use SIZE_MAX rather than
153823         (size_t) -1 when we are talking about "infinity".
153825         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
153827 2002-11-22  Paul Eggert  <eggert@twinsun.com>
153829         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
153830         hint that one should use `if (! x) abort ();' rather than `assert
153831         (x);', and anyway it's one less thing to worry about configuring.
153832         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
153833         hash_rehash, hash_insert): Use abort rather than assert.
153835 2002-11-22  Bruno Haible  <bruno@clisp.org>
153837         * lib/safe-read.h: Assume C89. Add comments.
153838         (safe_read): Change return type to size_t.
153839         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
153840         byte counts > SSIZE_MAX correctly.
153841         * lib/safe-write.h: New file.
153842         * lib/safe-write.c: New file.
153843         * lib/full-read.h: New file.
153844         * lib/full-read.c: New file.
153845         * lib/full-write.h: Assume C89. Add comments.
153846         * lib/full-write.c: Include safe-write.h.
153847         (full_write): Rewritten to use safe_write.
153848         Suggested by Jim Meyering and Paul Eggert.
153850 2002-11-21  Jim Meyering  <jim@meyering.net>
153852         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
153854         Merge in changes from the coreutils.
153856         2002-09-25  Paul Eggert  <eggert@twinsun.com>
153857         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
153858         <stdint.h>.
153859         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
153860         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
153861         int.  Work more efficiently if X is the same width as uintmax_t.
153862         Do not compare X to -1, to avoid bogus compiler warning.
153863         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
153864         Don't assume that f_frsize and f_bsize are the same type.
153866         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
153867         warning on FreeBSD.
153869         * lib/makepath.c (make_path): Restore umask *before* creating the final
153870         component.
153871         (make_path): Minor reformatting.
153873         * lib/xmalloc.c: Adjust to work with new autoconf macros,
153874         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
153875         HAVE_MALLOC/HAVE_REALLOC.
153877         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
153878         dummy ones.  At least on GNU/Linux systems, `auto' means something
153879         else.
153880         From Michael Stone.
153882 2002-11-21  Bruno Haible  <bruno@clisp.org>
153884         Remove case insensitive option matching.
153885         * lib/argmatch.h (argcasematch): Remove declaration.
153886         (ARGCASEMATCH): Remove macro.
153887         (__xargmatch_internal): Remove case_sensitive argument.
153888         (XARGMATCH): Update.
153889         (XARGCASEMATCH): Remove macro.
153890         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
153891         case_sensitive argument.
153892         (argcasematch): Remove function.
153893         (__xargmatch_internal): Remove case_sensitive argument.
153894         (main): Use XARGMATCH instead of XARGCASEMATCH.
153896         * lib/xmalloc.c: Change compile-time error message. Add comment about
153897         required autoconf version.
153899 2002-11-20  Paul Eggert  <eggert@twinsun.com>
153901         Merge argmatch cleanups from Bison.  Assume C89.
153903         * lib/argmatch.c: Include config.h here, not in argmatch.h.
153904         Include stdlib.h, for EXIT_FAILURE.
153905         Always include <string.h>, since we assume C89.
153906         (EXIT_FAILURE): Remove pre-C89 bug workaround.
153907         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
153908         Include <stddef.h> instead, since it's all we need for size_t.
153909         (PARAMS): Remove.  All uses removed.
153910         (ARRAY_CARDINALITY): Do not bother to #undef.
153911         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
153912         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
153913         Remove unnecessary parentheses.
153914         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
153915         Insert necessary parentheses.
153916         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
153917         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
153919 2002-11-19  Bruno Haible  <bruno@clisp.org>
153921         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
153922         * lib/mbswidth.h: Include <stddef.h>, for size_t.
153924         * lib/mbswidth.h (PARAMS): Remove macro.
153925         (mbswidth, mbsnwidth): Use ANSI C function declarations.
153926         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
153928         * lib/gcd.h (PARAMS): Remove macro.
153929         (gcd): Use ANSI C function declarations.
153930         * lib/gcd.c (gcd): Likewise.
153932 2002-11-15  Bruno Haible  <bruno@clisp.org>
153934         * lib/strcspn.c: Include <stddef.h>.
153935         (strcspn): Use ANSI C function declaration. Change return type to
153936         size_t. Use NULL.
153937         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
153938         (strpbrk): Use NULL.
153939         * lib/strpbrk.h (PARAMS): Remove macro.
153940         (strpbrk): Use ANSI C function declaration.
153941         * lib/strstr.c: Don't include <sys/types.h>.
153942         * lib/strstr.h (PARAMS): Remove macro.
153943         (strstr): Use ANSI C function declarations.
153945 2002-11-14  Karl Berry  <karl@gnu.org>
153947         * config/mkinstalldirs: `do' on separate line, instead of
153948         `for var; do'.
153950 2002-11-06  Bruno Haible  <bruno@clisp.org>
153952         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
153953         * lib/gcd.c (gcd): Likewise.
153955 2002-11-05  Bruno Haible  <bruno@clisp.org>
153957         * lib/gcd.h: New file, from gettext-0.11.5.
153958         * lib/gcd.c: New file, from gettext-0.11.5.
153960 2002-11-05  Bruno Haible  <bruno@clisp.org>
153962         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
153963         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
153964         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
153965         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
153967         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
153968         <libintl.h>.
153969         * lib/makepath.c: Include gettext.h instead of <locale.h> and
153970         <libintl.h>.
153972         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
153973         * lib/human.c: Include gettext.h instead of <libintl.h>.
153974         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
153975         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
153976         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
153977         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
153978         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
153979         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
153980         (textdomain): Remove definition.
153981         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
153983         * lib/long-options.c: Remove include of <libintl.h> and definition of
153984         _.
153985         * lib/same.c: Remove include of <libintl.h> and definition of _.
153987 2002-11-04  Owen Taylor  <otaylor@redhat.com>
153989         * lib/config.charset: A few additions for Solaris.
153991 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
153993         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
153994         * lib/localcharset.c (locale_charset): Declare as extern "C".
153996 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
153998         * lib/config.charset: msdos in uk_UA uses CP1125.
154000 2002-11-04  Bruno Haible  <bruno@clisp.org>
154002         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
154003         * lib/strcase.h: New file, from GNU gettext-0.11.5.
154004         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
154005         * lib/strstr.h: New file, from GNU gettext-0.11.5.
154006         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
154008 2002-11-04  Bruno Haible  <bruno@clisp.org>
154010         * lib/localcharset.c (locale_charset): Don't return an empty string.
154012 2002-11-04  Bruno Haible  <bruno@clisp.org>
154014         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
154015         aliases.
154017 2002-11-04  Bruno Haible  <bruno@clisp.org>
154019         * lib/config.charset: Update for newest glibc. Add canonical names
154020         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
154022 2002-11-04  Bruno Haible  <bruno@clisp.org>
154024         * lib/config.charset: Add support for NetBSD.
154026 2002-11-04  Bruno Haible  <bruno@clisp.org>
154028         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
154030 2002-11-01  Bruno Haible  <bruno@clisp.org>
154032         * configure.in: Add AC_CONFIG_AUX_DIR call.
154033         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
154034         test/Makefile.
154035         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
154037 2002-09-28  Karl Berry  <karl@gnu.org>
154039         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
154040         installed automake until the next release, since changes have been
154041         made.
154043 2002-09-25  Karl Berry  <karl@gnu.org>
154045         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
154046         * lib/getopt*: copy from libc/posix.
154047         * lib/gettext.h: copy from gettext.
154048         * lib/.cppi-disable: add strdup.c, gettext.h.
154050 2002-09-25  Karl Berry  <karl@gnu.org>
154052         * config/srclist.txt: enable gettext.h check.
154053         * config/config.{guess,sub}: update from prep.
154054         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
154055                 from automake 1.6.3.
154056         See srclist*.
154058 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
154060         * regex.c (PATFETCH): Remove the translating fetch.
154061         (PATFETCH_RAW): Rename to PATFETCH.
154062         (set_image_of_range): New fun.
154063         (SET_RANGE_TABLE_WORK_AREA): Use it.
154064         (regex_compile): Don't translate the pattern chars so eagerly.
154065         Only do it when inserting an `exactn' bytecode or when handling
154066         a char-range.
154067         (mutually_exclusive_p): Avoid empty statement.
154069 2002-07-06  Jim Meyering  <meyering@lucent.com>
154071         * m4/README: Don't mention Makefile.am.in.
154072         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
154074 2002-07-01  Jim Meyering  <meyering@lucent.com>
154076         * lib/c-stack.c: Include sys/time.h.
154077         From Volker Borchert.
154079 2002-06-26  Paul Eggert  <eggert@twinsun.com>
154081         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
154083 2002-06-26  Paul Eggert  <eggert@twinsun.com>
154085         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
154086         New macro.  Use it uniformly instead of
154087         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
154088         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
154089         reported by Vin Shelton.
154091 2002-06-22  Paul Eggert  <eggert@twinsun.com>
154093         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
154094         Do not assume SA_SIGINFO behavior.
154095         Bug reported by Jim Meyering on NetBSD 1.5.2.
154097 2002-06-22  Jim Meyering  <meyering@lucent.com>
154099         * m4/c-stack.m4: New file, from diffutils-2.8.2.
154100         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
154102         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
154103         now that configure.ac uses AC_GNU_SOURCE.
154104         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
154105         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
154107         Update to latest tools.  Suggestions from Paul Eggert.
154108         * m4/stdbool.m4: New file, from diffutils-2.8.2.
154109         * m4/gnu-source.m4: Update from diffutils-2.8.2.
154110         * m4/fnmatch.m4: Likewise.
154111         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
154112         to AC_HEADER_STDBOOL
154114 2002-06-22  Jim Meyering  <meyering@lucent.com>
154116         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
154117         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
154119 2002-06-22  Jim Meyering  <meyering@lucent.com>
154121         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
154123         * lib/exitfail.c, exitfail.h: Likewise.
154124         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
154126         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
154127         of fnmatch.h.
154128         (EXTRA_DIST): Add fnmatch_loop.c.
154129         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
154131         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
154132         * lib/fnmatch.c: Update from diffutils-2.8.2.
154133         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
154134         * lib/fnmatch.h: Remove file.
154136 2002-06-21  Jim Meyering  <meyering@lucent.com>
154138         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
154139         * m4/mbrtowc.m4: Likewise.
154141         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
154142         * m4/mbswidth.m4: Reflect name change:
154143         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
154144         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
154146         * m4/lib-link.m4: Update from gettext-0.11.2.
154147         * m4/gettext.m4: Likewise.
154149         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
154150         From Alfred M. Szmidt.
154152 2002-06-18  Paul Eggert  <eggert@twinsun.com>
154154         * lib/file-type.h: Report an error if neither S_ISREG nor
154155         S_IFREG is defined, instead of using a test specific to glibc
154156         2.2.  This should be safe, since POSIX requires S_ISREG and
154157         Unix Version 7 had S_IFREG.  We don't need to check for
154158         <sys/types.h> since we don't use any symbols that it defines.
154160 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
154162         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
154163         $@-t, so that each temporary file name is unique and valid in the first
154164         8 characters, for operation under DOS.
154166 2002-06-15  Paul Eggert  <eggert@twinsun.com>
154168         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
154170 2002-06-15  Jim Meyering  <meyering@lucent.com>
154172         Work even with DJGPP 2.03, which lacks support for symlinks.
154173         From Richard Dawe.
154174         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
154175         is defined.
154176         * lib/lchown.c (S_ISLNK): Likewise.
154178 2002-06-15  Jim Meyering  <meyering@lucent.com>
154180         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
154181         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
154182         have been included before this file.
154184 2002-06-14  Jim Meyering  <meyering@lucent.com>
154186         * lib/file-type.h: Use the version from diffutils-2.8.2.
154187         * lib/file-type.c: Likewise.
154189 2002-06-07  Jim Meyering  <meyering@lucent.com>
154191         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
154192         They're needed at least for NetBSD 1.5.2.
154193         ($statxfs_includes): Include those same headers.
154194         ($statxfs_includes): Include sys/vfs.h if available.
154195         ($statxfs_includes): Likewise for sys/statvfs.h.
154196         Check for the following members in both structs statfs and statvfs:
154197         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
154199 2002-06-01  Jim Meyering  <meyering@lucent.com>
154201         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
154202         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
154204 2002-05-28  Jim Meyering  <meyering@lucent.com>
154206         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
154207         Reported by Volker Borchert.
154209 2002-05-27  Jim Meyering  <meyering@lucent.com>
154211         Fix a problem seen only on nonconforming systems whereby ls.c's
154212         use of localtime, and then of gettimeofday would cause trouble:
154213         the localtime call used to initialize rpl_gettimeofday's save
154214         mechanism would clobber ls's current local time information so
154215         that in any long listing the first file would always be listed
154216         with date 1970-01-01.  Analysis by Volker Borchert.
154218         * lib/gettimeofday.c (localtime): Undefine.
154219         (rpl_localtime): New function.
154221 2002-05-27  Jim Meyering  <meyering@lucent.com>
154223         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
154224         localtime.
154226         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
154227         use the replacement function; it wouldn't resolve at link time.
154228         Reported by Volker Borchert.
154230 2002-05-22  Jim Meyering  <meyering@lucent.com>
154232         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
154233         file-type.h.
154234         * lib/file-type.h: New file.
154235         * lib/file-type.c (file_type): New file/function.  Extracted from
154236         diffutils.
154238 2002-04-30  Jim Meyering  <meyering@lucent.com>
154240         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
154242 2002-04-29  Paul Eggert  <eggert@twinsun.com>
154244         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
154246 2002-04-29  Paul Eggert  <eggert@twinsun.com>
154248         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
154249         Do not check for alloca.h (no longer used) or stdbool.h (was never
154250         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
154252 2002-04-29  Paul Eggert  <eggert@twinsun.com>
154254         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
154256 2002-04-29  Jim Meyering  <meyering@lucent.com>
154258         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
154259         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
154260         Use AC_FUNC_STRNLEN here instead.
154262         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
154263         With autoconf-2.53a, it's part of AC_PROG_CC.
154265 2002-04-28  Paul Eggert  <eggert@twinsun.com>
154267         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
154268         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
154270 2002-04-28  Paul Eggert  <eggert@twinsun.com>
154272         * lib/sig2str.h, lib/sig2str.c: New files.
154273         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
154275 2002-04-28  Paul Eggert  <eggert@twinsun.com>
154277         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
154278         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
154279         of 127, since 64 is the largest conceivable number for ancient
154280         nonstandard hosts.
154281         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
154283 2002-04-28  Jim Meyering  <meyering@lucent.com>
154285         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
154287 2002-04-24  Jim Meyering  <meyering@lucent.com>
154289         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
154290         (jm_PREREQ): Use it.
154292         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
154293         mach/mach.h fcntl.h.
154294         Check for this function: setlocale.
154296 2002-04-24  Jim Meyering  <meyering@lucent.com>
154298         * lib/gettext.h: New file, from Gettext.
154299         * lib/Makefile.am (INCLUDES): Remove -I../intl.
154300         (libfetish_a_SOURCES): Add gettext.h.
154302 2002-04-16  Jim Meyering  <meyering@lucent.com>
154304         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
154305         ut_pid, ut_id, ut_exit.
154307 2002-04-16  Jim Meyering  <meyering@lucent.com>
154309         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
154310         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
154311         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
154313 2002-04-12  Jim Meyering  <meyering@lucent.com>
154315         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
154316         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
154317         existence of the getmntinfo function.  Needed for Darwin 5.3.
154319         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
154320         This is necessary at least on Darwin 5.3.
154322         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
154323         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
154324         strnlen.o in the library, and that makes some versions of ranlib
154325         object.
154327 2002-04-12  Jim Meyering  <meyering@lucent.com>
154329         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
154331 2002-04-09  Jim Meyering  <meyering@lucent.com>
154333         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
154334         to be more precise.  Rather than saying we're checking whether the
154335         function `works', say what we're testing.
154336         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
154337         Reported by Bruno Haible.
154339 2002-03-10  Jim Meyering  <meyering@lucent.com>
154341         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
154342         Suggestion from Santiago Vila.
154344 2002-03-08  Jim Meyering  <meyering@lucent.com>
154346         * lib/rename.c: Mention that this wrapper is needed also on
154347         mips-dec-ultrix4.4 systems.
154349 2002-03-02  Jim Meyering  <meyering@lucent.com>
154351         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
154352         not HAVE_CLOCK_SETTIME.
154354 2002-02-27  Paul Eggert  <eggert@twinsun.com>
154356         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
154357         Check for clock_settime.
154359 2002-02-27  Paul Eggert  <eggert@twinsun.com>
154361         * lib/nanosleep.h: Rename to....
154362         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
154364         * lib/gettime.c: New file.
154365         * lib/settime.c: New file.
154366         * lib/stime.c: Remove.
154368         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
154369         timespec.h.  Remove nanosleep.h.
154371 2002-02-25  Paul Eggert  <eggert@twinsun.com>
154373         * m4/acl.m4: New file.
154374         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
154375         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
154377 2002-02-25  Paul Eggert  <eggert@twinsun.com>
154379         * lib/acl.c, lib/acl.h: New files.
154380         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
154382 2002-02-24  Jim Meyering  <meyering@lucent.com>
154384         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
154385         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
154386         cause trouble.  Reported by Nelson Beebe.
154388 2002-02-23  Paul Eggert  <eggert@twinsun.com>
154390         * lib/path-concat.c (xpath_concat): Reorder code to pacify
154391         compilers that don't know that xalloc_die never returns.
154393 2002-02-20  Jim Meyering  <meyering@lucent.com>
154395         * lib/getdate.c: Regenerate using bison-1.33.
154397 2002-02-17  Jim Meyering  <meyering@lucent.com>
154399         * config/config.guess (main): Don't use `head -1'; it's no longer
154400         portable. Use `sed 1q' instead.
154402 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
154404         * m4/codeset.m4: Upgrade to gettext-0.11.
154405         * m4/gettext.m4: Upgrade to gettext-0.11.
154406         * m4/glibc21.m4: Upgrade to gettext-0.11.
154407         * m4/iconv.m4: Upgrade to gettext-0.11.
154408         * m4/isc-posix.m4: Upgrade to gettext-0.11.
154409         * m4/lcmessage.m4: Upgrade to gettext-0.11.
154410         * m4/lib-ld.m4: New file, from gettext-0.11.
154411         * m4/lib-link.m4: New file, from gettext-0.11.
154412         * m4/lib-prefix.m4: New file, from gettext-0.11.
154413         * m4/progtest.m4: Upgrade to gettext-0.11.
154415 2002-02-15  Paul Eggert  <eggert@twinsun.com>
154417         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
154418         (jm_PREREQ): Use it.
154420 2002-02-15  Paul Eggert  <eggert@twinsun.com>
154422         * lib/posixver.c, lib/posixver.h: New files.
154423         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
154425 2002-02-02  Paul Eggert  <eggert@twinsun.com>
154426             Bruno Haible  <bruno@clisp.org>
154428         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
154429         (fwrite_success_callback): New declaration.
154430         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
154431         print_unicode_char. Call failure callback instead of error.
154432         (fwrite_success_callback): New function.
154433         (exit_failure_callback): New function.
154434         (fallback_failure_callback): New function.
154435         (print_unicode_char): Call unicode_to_mb.
154437 2002-01-26  Jim Meyering  <meyering@lucent.com>
154439         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
154440         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
154442 2002-01-26  Jim Meyering  <meyering@lucent.com>
154444         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
154446 2002-01-22  Paul Eggert  <eggert@twinsun.com>
154448         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
154450 2002-01-22  Jim Meyering  <meyering@lucent.com>
154452         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
154453         Otherwise, some versions of automake would omit the rule that makes
154454         Makefile from Makefile.in.
154456 2002-01-21  Paul Eggert  <eggert@twinsun.com>
154458         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
154459         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
154460         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
154461         (memcoll): Set errno to zero if there is no error.
154463         * lib/quotearg.c (quotearg_buffer_restyled):
154464         Fix bug with quoting buffers containing NUL when backslashing escapes.
154465         This bug was exposed by the other changes in this patch.
154466         (quotearg_n_options): New arg ARGSIZE.
154467         All callers changed.
154468         (quoting_options_from_style): New function.
154469         (quotearg_n_style): Use it.
154470         (quotearg_n_style_mem): New function.
154472         * lib/quotearg.h (quotearg_n_style_mem): New function.
154474 2002-01-19  Jim Meyering  <meyering@lucent.com>
154476         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
154477         Remove useless quotes: DF_PROG="df".
154478         * m4/strnlen.m4: New file.
154480 2002-01-16  Paul Eggert  <eggert@twinsun.com>
154482         * lib/backupfile.c (ISDIGIT): Comment fix.
154483         * lib/getdate.y (ISDIGIT): Likewise.
154484         * lib/posixtm.c (ISDIGIT, year): Likewise.
154485         * lib/strverscmp.c (ISDIGIT): Likewise.
154486         * lib/userspec.c (ISDIGIT): Likewise.
154488 2002-01-16  Jim Meyering  <meyering@lucent.com>
154490         * lib/getdate.y: Add three semicolons, each just before a closing
154491         brace. Bison (as of version 1.31) no longer papers over that mistake.
154493 2002-01-05  Jim Meyering  <meyering@lucent.com>
154495         * lib/version-etc.c (version_etc_copyright): Update copyright year.
154497 2001-12-19  Paul Eggert  <eggert@twinsun.com>
154499         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
154500         not silently exit merely because the output buffer happens to
154501         have nothing pending.
154503 2001-12-18  Paul Eggert  <eggert@twinsun.com>
154505         See the big note in ../ChangeLog.
154506         * lib/human.c (suffixes): Prefer K to k for 1024.
154507         (generate_suffix_backwards): New function.
154508         (human_readable_inexact): Use it.
154509         * lib/xstrtol.c (__xstrtol): If there is no number but there
154510         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
154511         Accept 'K' as well as 'k'.
154513 2001-12-15  Jim Meyering  <meyering@lucent.com>
154515         * lib/regex.h (__restrict_arr): Update from libc.
154517         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
154518         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
154519         (STREQ): Define.
154521 2001-12-14  Jim Meyering  <meyering@lucent.com>
154523         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
154524         Suggestion from Bruno Haible.
154526 2001-12-10  Jim Meyering  <meyering@lucent.com>
154528         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
154529         xrealloc, Instead, include "xalloc.h".
154530         (initbuffer): Don't cast xmalloc return value to char*.
154531         (readline): Reword comment.
154532         Don't cast xrealloc return value to char*
154533         Return NULL, not 0.
154535 2001-12-09  Jim Meyering  <meyering@lucent.com>
154537         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
154538         about `signed and unsigned type in conditional expression'.
154539         * lib/posixtm.c (posix_time_parse): Likewise.
154541         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
154543         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
154544         to avoid a pedantic warning.
154546         * lib/getstr.c: Don't include assert.h.
154547         (getstr): Remove warning-evoking assertions.
154548         Return -1 if offset parameter is out of bounds.
154549         Change the type of a local from int to size_t.
154551         * lib/strftime.c (my_strftime_localtime_r): Include this function
154552         definition in the `#if ! HAVE_TM_GMTOFF' block.
154554         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
154555         Include xalloc.h instead.
154557 2001-12-02  Jim Meyering  <meyering@lucent.com>
154559         * lib/tempname.c: Don't declare getenv, thus reverting the change of
154560         2001-11-18.  It's no longer necessary, now that stdlib.h is always
154561         included.
154563         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
154564         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
154566 2001-11-30  Akim Demaille  <akim@epita.fr>
154568         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
154569         before being defined.
154571 2001-11-27  Paul Eggert  <eggert@twinsun.com>
154573         * lib/quotearg.h (quotearg_n, quotearg_n_style):
154574         First arg is int, not unsigned.
154575         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
154576         (SIZE_MAX, UINT_MAX): New macros.
154577         (quotearg_n_options): Abort if N is negative.
154578         Avoid overflow check on hosts where size_t is 64 bits and int
154579         is 32 bits, as overflow is impossible there.
154580         Fix off-by-one typo that caused unnecessary reallocation.
154582 2001-11-27  Jim Meyering  <meyering@lucent.com>
154584         * lib/tempname.c: Merge with version from libc.
154585         * lib/regex.c: Likewise.
154587         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
154588         systems for which STDC_HEADERS is 0, it was not included, resulting in
154589         a warning about an integer-to-pointer conversion problem with getenv.
154590         Reported by Volker Borchert.
154592 2001-11-26  Jim Meyering  <meyering@lucent.com>
154594         * lib/gtod.h: Remove file.
154595         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
154596         * lib/gettimeofday.c: Don't include gtod.h.
154597         (GTOD_init): Remove function.
154598         (rpl_gettimeofday): Do its job here instead, rather than aborting.
154599         Suggestion from Volker Borchert.
154601 2001-11-23  Jim Meyering  <meyering@lucent.com>
154603         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
154604         it.
154605         * lib/hash.c (struct hash_table): Define it here instead.
154607 2001-11-22  Jim Meyering  <meyering@lucent.com>
154609         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
154611 2001-11-20  Jim Meyering  <meyering@lucent.com>
154613         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
154614         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
154616 2001-11-19  Jim Meyering  <meyering@lucent.com>
154618         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
154619         directory.  Use "conftestXXXXXX" as the template.
154620         Suggestion from Paul Eggert.
154622         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
154623         immediately, so the test doesn't mistakenly hit the max-open-files
154624         limit.
154626 2001-11-18  Paul Eggert  <eggert@twinsun.com>
154628         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
154629         (TEMPORARIES): New macro.
154630         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
154631         removes an artificial limitation (e.g. HP-UX 10.20, where
154632         TMP_MAX is 17576).
154634 2001-11-18  Jim Meyering  <meyering@lucent.com>
154636         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
154638 2001-11-18  Jim Meyering  <meyering@lucent.com>
154640         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
154641         on SunOS 4.
154643         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
154644         files will be created before anything else.
154646 2001-11-17  Paul Eggert  <eggert@twinsun.com>
154648         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
154649         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
154651 2001-11-17  Jim Meyering  <meyering@lucent.com>
154653         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
154654         Prompted by a report from Bob Proulx.
154656         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
154657         Instead, require UTILS_FUNC_MKSTEMP.
154659 2001-11-17  Jim Meyering  <meyering@lucent.com>
154661         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
154662         Now, that's done as part of AC_FUNC_STRTOD.
154664 2001-11-17  Jim Meyering  <meyering@lucent.com>
154666         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
154667         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
154668         rather than group writable.  Patch by Juan F. Codagnone.
154670         * lib/readtokens.c: Remove explicit declarations of xmalloc and
154671         xrealloc, Instead, include "xalloc.h".
154673         * lib/mountlist.c: Include unlocked-io.h after all system headers.
154674         Remove explicit declarations of xmalloc, xrealloc,
154675         and xstrdup.  Instead, include "xalloc.h".
154677         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
154678         unlocked-io.h.
154679         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
154680         Likewise.
154681         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
154683         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
154684         Reported by Padraig Brady.
154686         * lib/mkstemp.c: #undef mkstemp.
154687         Include config.h.
154688         (rpl_mkstemp): Rename from mkstemp.
154689         Protoize.
154691 2001-11-16  Jim Meyering  <meyering@lucent.com>
154693         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
154694         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
154695         determine the amount of total physical memory, use pstat_getstatic.
154696         HPUX-11 doesn't define _SC_PHYS_PAGES.
154697         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
154698         If sysconf couldn't be used to determine the amount of available
154699         physical memory, use both pstat_getstatic and pstat_getdynamic.
154700         Based on a patch from Bob Proulx.
154702 2001-11-10  Jim Meyering  <meyering@lucent.com>
154704         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
154705         (jm_PREREQ): Use it.
154707 2001-11-09  Jim Meyering  <meyering@lucent.com>
154709         * m4/jm-macros.m4: Require autoconf-2.52f.
154710         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
154711         Use these AC_-prefixed names, not the AM_-prefixed ones.
154713         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
154715 2001-11-05  Jim Meyering  <meyering@lucent.com>
154717         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
154719 2001-11-04  Jim Meyering  <meyering@lucent.com>
154721         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
154722         $DEFS.
154724 2001-11-03  Jim Meyering  <meyering@lucent.com>
154726         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
154727         of AC_DEFUN.
154729         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
154730         know the name of the variable in the macro definition.
154732 2001-11-03  Jim Meyering  <meyering@lucent.com>
154734         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
154735         in argmatch_to_argument call.
154737         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
154738         argument.
154740         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
154741         e.g., a fault due to an attempt to free a NULL pointer.
154743 2001-11-01  Jim Meyering  <meyering@lucent.com>
154745         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
154746         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
154748 2001-11-01  Jim Meyering  <meyering@lucent.com>
154750         * lib/dirfd.c, lib/dirfd.h: New files.
154751         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
154753         * lib/hash.c (hash_print) [TESTING]: Clean up.
154755 2001-10-22  Paul Eggert  <eggert@twinsun.com>
154757         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
154758         to avoid a warning if -Wall.
154760 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
154762         * README: New file
154763         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
154764         (per RMS's instructions, this is now the canonical source)
154765         * lgpl/, gpl/: New directories.
154767 2001-10-21  Paul Eggert  <eggert@twinsun.com>
154769         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
154771 2001-10-21  Jim Meyering  <meyering@lucent.com>
154773         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
154774         this code would end up calling gettext even in packages built
154775         with --disable-nls.
154776         * lib/getopt.c (_): Likewise.
154777         * lib/regex.c (_): Likewise.
154779 2001-10-20  Paul Eggert  <eggert@twinsun.com>
154781         * m4/error.m4 (jm_PREREQ_ERROR):
154782         Do not invoke AC_CHECK_FUNCS with strerror_r, as
154783         AC_FUNC_STRERROR_R does that.
154784         Check for strerror declaration.
154786         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
154787         are supposed to have them these days.
154788         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
154789         Merge changes from latest Autoconf CVS.
154790         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
154791         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
154792         POSIX decided to standardize on the int flavor of strerror_r.
154794 2001-10-20  Paul Eggert  <eggert@twinsun.com>
154796         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
154797         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
154798         Use strerror_r that is only a macro, even if it is not a function.
154799         (strerror): Check for HAVE_DECL_STRERROR before declaring.
154800         (private_strerror): Use prototypes, not old-style function definition.
154801         (print_errno_message): New function.
154802         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
154803         char*-flavored one.
154804         (error_tail, error, error_at_line): Use it.
154806 2001-10-11  Jim Meyering  <meyering@lucent.com>
154808         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
154809         and quote_n (1, ... to avoid clobbering a buffer.
154811 2001-10-05  Jim Meyering  <meyering@lucent.com>
154813         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
154814         hash-pjw.h.
154815         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
154816         * lib/hash-pjw.h: New file.
154818 2001-09-30  Jim Meyering  <meyering@lucent.com>
154820         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
154821         `struct fsstat' has the `f_fstypename' member.
154822         Use that to define FS_TYPE, which is now used to make
154823         the getfsstat link test tighter.
154825 2001-09-30  Jim Meyering  <meyering@lucent.com>
154827         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
154828         Include <sys/ucred.h>, for Apple Darwin.
154829         Include sys/mount.h and sys/fs_types.h only if available.
154830         (FS_TYPE): Define.
154831         (read_filesystem_list): Use FS_TYPE.
154833 2001-09-29  Paul Eggert  <eggert@twinsun.com>
154835         * lib/exclude.c (excluded_filename): 0 -> false, since it's
154836         a boolean context.
154838 2001-09-29  Jim Meyering  <meyering@lucent.com>
154840         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
154841         [one-argument getmntent function]): Include stdio.h before mntent.h.
154842         SunOS 4.1.x needs it for the declaration of `FILE'.
154843         Patch by Volker Borchert.
154845         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
154846         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
154847         sys/fs_types.h, and make the link-test for getfsstat guard #include
154848         directives with appropriate #if HAVE_*_H tests so that we can
154849         detect getfsstat on Apple Darwin1.3.7 systems.
154850         Reported by Nelson Beebe.
154851         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
154853 2001-09-28  Paul Eggert  <eggert@twinsun.com>
154855         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
154856         #defines strtoimax.  Also treat the other strto* functions
154857         like strtoimax.
154859         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
154860         Check for strtoul and strtoumax,
154861         as those declarations are made even in the signed case.
154862         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
154863         Likewise, for strtol and strtoimax.
154865 2001-09-28  Paul Eggert  <eggert@twinsun.com>
154867         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
154868         #defines strtoimax.  Also treat the other strto* functions
154869         like strtoimax.
154871         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
154872         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
154873         (strtoimax, strtoumax): Do not declare if already defined as a macro.
154875 2001-09-26  Jim Meyering  <meyering@lucent.com>
154877         Most macros in unlocked-io.h had the wrong number of arguments.
154878         * lib/gen-uio: New script.
154879         (USE_UNLOCKED_IO): Define to 1 if not already defined.
154880         * lib/unlocked-io.hin: Remove file.
154881         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
154882         rather than trying to embed it here.
154883         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
154884         Reported by Padraig Brady.
154886 2001-09-25  Volker Borchert  <bt@teknon.de>
154888         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
154889         `result'.
154891 2001-09-24  Jim Meyering  <meyering@lucent.com>
154893         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
154895 2001-09-23  Jim Meyering  <meyering@lucent.com>
154897         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
154898         instead of the mere test for existence of mntent.h.  The latter
154899         would get a false-positive on AIX 3.4 systems.
154900         In the outer getmntent if-block, don't die if neither of the getmntent
154901         tests succeeds.  Instead, just fall through and continue with the
154902         remaining tests.
154904 2001-09-23  Jim Meyering  <meyering@lucent.com>
154906         * lib/mountlist.c: Remove useless parentheses in #if directives.
154907         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
154908         the deprecated MOUNTED symbol is no longer defined in mntent.h.
154910 2001-09-22  Jim Meyering  <meyering@lucent.com>
154912         * m4/gettext.m4: New file.  From gettext.
154913         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
154914         * m4/progtest.m4: Likewise
154915         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
154916         * m4/glibc21.m4: Likewise.
154918         * m4/libintl.m4: Remove.  No longer used.
154920 2001-09-22  Jim Meyering  <meyering@lucent.com>
154922         * lib/localcharset.c: Update from latest gettext.
154923         * lib/config.charset: Likewise.
154925 2001-09-20  Jim Meyering  <meyering@lucent.com>
154927         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
154928         strtoimax.
154929         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
154930         strtoumax.
154932 2001-09-20  Jim Meyering  <meyering@lucent.com>
154934         * lib/xstrtol.c (strtoimax): Guard declaration with
154935         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
154936         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
154937         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
154938         (strtoumax): Likewise, for completeness (it wasn't necessary).
154940 2001-09-17  Paul Eggert  <eggert@twinsun.com>
154942         * lib/strtoimax.c (HAVE_LONG_LONG):
154943         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
154944         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
154945         to work around bug in IBM C compiler.
154947 2001-09-17  Jim Meyering  <meyering@lucent.com>
154949         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
154950         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
154951         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
154952         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
154953         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
154954         whenever the right hand side need not be expanded by the shell.
154956 2001-09-16  Paul Eggert  <eggert@twinsun.com>
154958         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
154959         library.  It's not correct, as some older glibcs are buggy.
154960         fnmatch wasn't fixed until glibc 2.2.
154962         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
154963         special shell magic here.
154965 2001-09-16  Jim Meyering  <meyering@lucent.com>
154967         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
154968         * m4/jm-macros.m4: Require it.
154970 2001-09-16  Jim Meyering  <meyering@lucent.com>
154972         * lib/mkdir.c: New file.
154974 2001-09-15  Jim Meyering  <meyering@lucent.com>
154976         * m4/jm-macros.m4: Check for help2man.
154978 2001-09-11  Jim Meyering  <meyering@lucent.com>
154980         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
154981         The body, by Paul Eggert, was moved here from configure.in.
154982         * m4/jm-macros.m4: Require UTILS_HOST_OS.
154984 2001-09-04  Paul Eggert  <eggert@twinsun.com>
154986         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
154987         (jm_PREREQ): Use it.
154989 2001-09-04  Paul Eggert  <eggert@twinsun.com>
154991         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
154992         Use ssize_t, not int, to store result of readlink.
154993         Check for ssize_t overflow as well as size_t overflow,
154994         as POSIX says the result of readlink is implementation-defined
154995         when ssize_t overflows.
154996         Remove unnecessary cast to char*.
154997         Use free+malloc instead of realloc, as the storage doesn't need
154998         to be preserved and it's clearer and can be more efficient that way.
154999         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
155000         * lib/xreadlink.h (xreadlink): Update prototype.
155002 2001-09-04  Paul Eggert  <eggert@twinsun.com>
155004         * lib/xgetcwd.c: Revert some of the previous change; intead,
155005         fix the HAVE_GETCWD_NULL code to behave more like the
155006         !HAVE_GETCWD_NULL code used to.
155008         Include "xalloc.h".
155009         (xgetcwd): Do not return NULL when memory is exhausted; instead,
155010         invoke xalloc_die.
155012 2001-09-03  Paul Eggert  <eggert@twinsun.com>
155014         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
155015         sys/param.h, as pathmax.h includes them.
155017 2001-09-03  Paul Eggert  <eggert@twinsun.com>
155019         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
155020         (jm_PREREQ_XGETCWD): New macro.
155022         * m4/getcwd.m4: New file.
155024 2001-09-03  Paul Eggert  <eggert@twinsun.com>
155026         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
155027         like the HAVE_GETCWD_NULL code.
155028         Include pathmax.h if not HAVE_GETCWD.
155029         Do not include xalloc.h.
155030         (INITIAL_BUFFER_SIZE): New symbol.
155031         Do not use xmalloc / xrealloc, since the caller is responsible for
155032         handling errors.  Preserve errno around `free' during failure.
155033         Do not overrun buffer when using getwd.
155035 2001-09-03  Paul Eggert  <eggert@twinsun.com>
155037         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
155038         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
155039         getcwd (NULL, 0).
155041 2001-09-03  Paul Eggert  <eggert@twinsun.com>
155043         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
155044         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
155045         spotted by Jim Meyering.
155047 2001-09-03  Jim Meyering  <meyering@lucent.com>
155049         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
155050         failure.
155052 2001-09-02  Jim Meyering  <meyering@lucent.com>
155054         * lib/error.c: Update from GNU libc.
155056 2001-09-01  Jim Meyering  <meyering@lucent.com>
155058         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
155059         Used by df.
155061 2001-09-01  Jim Meyering  <meyering@lucent.com>
155063         * lib/xreadlink.c: New file.
155064         * lib/xreadlink.h: New file.
155065         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
155066         xreadlink.h.
155068         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
155069         doesn't conflict with sparc Solaris 7's definition in
155070         /usr/include/sys/int_types.h.
155072         * lib/exclude.c: Use `""', not `<>' to #include non-system header
155073         files.
155074         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
155075         and strncasecmp as r-values.  Unixware didn't have declarations.
155077 2001-08-31  Paul Eggert  <eggert@twinsun.com>
155079         * lib/xstrtol.h: Add copyright notice.
155080         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
155081         LONGINT_INVALID_SUFFIX_CHAR.
155083 2001-08-31  Paul Eggert  <eggert@twinsun.com>
155085         * lib/xstrtol.c (strtoimax): New decl.
155087 2001-08-31  Paul Eggert  <eggert@twinsun.com>
155089         * lib/xgetcwd.c: Don't include pathmax.h.
155090         Include stdlib.h and unistd.h if available.
155091         Include xalloc.h.
155092         (xmalloc, xstrdup, free): Remove decls.
155093         (xgetcwd): Don't assume sizes fit in unsigned.
155094         Check for overflow when computing sizes.
155095         Simplify reallocation code.
155097 2001-08-31  Paul Eggert  <eggert@twinsun.com>
155099         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
155100         a directory's st_size can have an arbitrary value, so the old
155101         usage could waste an arbitrary amount of memory.  All uses
155102         changed.
155103         * lib/savedir.h: Update prototype.
155105 2001-08-31  Paul Eggert  <eggert@twinsun.com>
155107         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
155109         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
155110         old strtoimax.c.
155112         Also, make the following further changes to make this file's
155113         configuration more similar to that of strtol.c:
155114         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
155115         (strtoumax, uintmax_t, strtoull, strtol): Remove.
155116         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
155117         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
155118         changed to signed values.
155120         And make the following changes as well:
155121         Fix copyright notice, as 1999 was missing.
155122         (verify): New macro.
155123         (strtoimax): Check sizes at compile-time, not run-time.
155124         Prefer strtol to strtoll if both work.
155125         (main): Remove; it was not that useful and was a pain to maintain.
155127         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
155129 2001-08-31  Jim Meyering  <meyering@lucent.com>
155131         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
155132         Use an initial, malloc'd, buffer of length 128 rather than
155133         a statically allocated one of length 1024.
155135 2001-08-30  Paul Eggert  <eggert@twinsun.com>
155137         Simplify code, partly by assuming autoconf 2.52 semantics.
155139         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
155141         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
155142         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
155143         All uses removed.
155144         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
155145         Move AC_REQUIRE to next-to-top level, to avoid confusion.
155146         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
155147         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
155148         jm_AC_HEADER_INTTYPES_H.
155149         * m4/jm-macros.m4 (jm_MACROS): Likewise.
155151         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
155153         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
155154         Quote first arg of AC_DEFUN.
155155         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
155156         since they are needed to parse the include file even if we need
155157         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
155158         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
155159         but with opposite signedness.
155161 2001-08-30  Paul Eggert  <eggert@twinsun.com>
155163         Merge 'exclude' changes from tar 1.13.22.
155164         This fixes one or two unlikely storage allocation overflow bugs,
155165         but doesn't change user-visible behavior otherwise.
155167 2001-08-30  Paul Eggert  <eggert@twinsun.com>
155169         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
155170         (jm_PREREQ_EXCLUDE): New macro.
155172 2001-08-30  Paul Eggert  <eggert@twinsun.com>
155174         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
155175         tm to be declared.
155177 2001-08-30  Paul Eggert  <eggert@twinsun.com>
155179         * lib/hash.c: Remove '2001' from copyright notice.
155181 2001-08-30  Paul Eggert  <eggert@twinsun.com>
155183         * lib/full-write.h: New file.
155184         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
155185         * lib/full-write.c: Correct credits, as cccp.c no longer
155186         exists and anyway it was so heavily changed from the old cccp
155187         code as to be unrecognizable.  Include full-write.h.
155188         (full_write): Return size_t, with short writes meaning failure.
155189         All callers changed.  This fixes a bug with large buffers
155190         on 64-bit hosts.
155191         * lib/utime.c: Include full-write.h.
155193 2001-08-30  Paul Eggert  <eggert@twinsun.com>
155195         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
155196         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
155197         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
155198         Include if available.
155199         (<xalloc.h>): Include
155200         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
155201         (verify): New macro.  Use it to verify that EXCLUDE macros do not
155202         collide with FNM macros.
155203         (struct patopts): New struct.
155204         (struct exclude): Use it, as exclude patterns now come with options.
155205         (new_exclude): Support above changes.
155206         (new_exclude, add_exclude_file):
155207         Initial size must now be a power of two to simplify overflow checking.
155208         (free_exclude, fnmatch_no_wildcards): New function.
155209         (excluded_filename): No longer requires options arg, as the options
155210         are determined by add_exclude.  Now returns bool, not int.
155211         (excluded_filename, add_exclude):
155212         Add support for the fancy new exclusion options.
155213         (add_exclude, add_exclude_file): Now takes int options arg.
155214         Check for arithmetic overflow when computing sizes.
155215         (add_exclude_file): xrealloc might modify errno, so don't
155216         realloc until after errno might be used.
155218         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
155219         New macros.
155220         (free_exclude): New decl.
155221         (add_exclude, add_exclude_file): Now takes int options arg.
155222         (excluded_filename): No longer requires options arg, as the options
155223         are determined by add_exclude.  Now returns bool, not int.
155225 2001-08-30  Paul Eggert  <eggert@twinsun.com>
155227         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
155229 2001-08-27  Jim Meyering  <meyering@lucent.com>
155231         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
155233         * lib/version-etc.c (N_): Remove definition.
155234         Revert most of last change.
155235         Instead, simply don't mark the `Copyright...' string for translation.
155236         Based on advice from Paul Eggert.
155238         * lib/strtoxmax.c: Tweak comment.
155240 2001-08-26  Jim Meyering  <meyering@lucent.com>
155242         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
155244         * m4/xstrtoimax.m4: New file.
155245         * m4/xstrtoumax.m4: Add comments explaining why we
155246         AC_REPLACE_FUNCS(strtol).
155248 2001-08-26  Jim Meyering  <meyering@lucent.com>
155250         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
155251         of copyright with `%s' so translators don't get an untranslated
155252         message in 2002.
155253         (COPYRIGHT_YEAR): Define.
155254         (version_etc): Use fprintf rather than fputs.
155255         Suggestion from Ulrich Drepper.
155257         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
155259         * lib/strtoll.c: New file, from GNU libc.
155260         * lib/xstrtoimax.c: New file.
155262         * lib/xstrtol.h: Add xstrtoimax.
155263         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
155264         * lib/strtoimax.c: New file.  Likewise, but first define
155265         STRTOUXMAX_SIGNED.
155267         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
155268         ...
155269         * lib/strtoxmax.c: ... then renamed to this.
155271 2001-08-18  Paul Eggert  <eggert@twinsun.com>
155273         * m4/inttypes.m4: Add AC_PREREQ(2.13).
155274         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
155275         (jm_AC_TYPE_INTMAX_T): New macro.
155276         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
155278         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
155280         * m4/longlong.m4: Renamed from ulonglong.m4.
155281         * m4/inttypes.m4: Renamed from inttypes_h.m4.
155282         * m4/uintmax_t.m4: Removed.
155284 2001-08-13  Paul Eggert  <eggert@twinsun.com>
155286         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
155287         Port to Solaris 8, where 'sed' requires a space after the 'r'
155288         command, and where sh dislikes "$/".  Clean up the spacing a bit.
155289         Redirect output to $tmp just once.
155291 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
155293         * lib/addext.c (<errno.h>): Include.
155294         (errno): Declare if not defined.
155295         (addext): Work correctly when pathconf returns -1 and leaves
155296         errno alone because there is no limit.  Also, work even if
155297         pathconf returns a value greater than SIZE_MAX.
155299 2001-08-12  Jim Meyering  <meyering@lucent.com>
155301         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
155302         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
155303         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
155304         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
155305         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
155306         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
155307         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
155308         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
155309         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
155310         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
155311         utime.m4, utimes.m4, xstrtoumax.m4:
155312         Quote the first argument in each use of AC_DEFUN.
155314 2001-08-12  Jim Meyering  <meyering@lucent.com>
155316         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
155317         Simply `return getcwd (NULL, 0);'.
155318         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
155319         Use 1300 as initial value for length, not PATH_MAX.
155321         * lib/pathmax.h: Clean up cpp syntax.
155323 2001-08-12  Jim Meyering  <meyering@lucent.com>
155325         * lib/gettimeofday.c: New file.
155326         * lib/gtod.h: New file.
155327         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
155329 2001-08-05  Jim Meyering  <meyering@lucent.com>
155331         * m4/jm-macros.m4: Require autoconf-2.52.
155333 2001-08-04  Jim Meyering  <meyering@lucent.com>
155335         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
155336         stmt, to get in sync with glibc.
155338 2001-08-03  Paul Eggert  <eggert@twinsun.com>
155340         The following changes are from gettext 0.10.39 as maintained by
155341         Bruno Haible.
155343         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
155344         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
155345         with inverted sense.  All uses changed.
155347         * lib/mbswidth.c: Don't include <limits.h>.
155348         Include <stdlib.h> and <string.h> unconditionally.
155349         (iswcntrl, mbsinit, ISCNTRL): New macros.
155350         (mbsnwidth): Use K&R style function declarations.
155351         Don't bother checking for MB_LEN_MAX == 1, since the compiler
155352         can optimize it when MB_CUR_MAX == 1.
155353         The width of control characters is zero, not 1.
155355 2001-08-03  Paul Eggert  <eggert@twinsun.com>
155357         The following changes are from gettext 0.10.39 as maintained by
155358         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
155360         * m4/codeset.m4: Upgrade to serial AM1.
155361         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
155362         all uses changed.  Quote first arg of AC_DEFUN.
155363         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
155365         * m4/iconv.m4: Upgrade to serial AM2.
155366         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
155367         Add --with-libconv-prefix.
155368         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
155369         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
155370         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
155371         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
155372         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
155374         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
155375         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
155376         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
155377         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
155378         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
155379         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
155380         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
155381         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
155382         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
155384         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
155385         string.h any more.
155387         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
155388         not the default value.
155390         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
155391         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
155392         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
155393         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
155394         Also check for iswcntrl, used for wcwidth fallback.
155395         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
155396         to Autoconf 2.13.
155398 2001-08-03  Jim Meyering  <meyering@lucent.com>
155400         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
155401         as it was in the original.  Reported by Paul Eggert.
155403 2001-07-16  Jim Meyering  <meyering@lucent.com>
155405         * m4/gettimeofday.m4: New file.
155406         Prompted by a report from Bernhard Baehr.
155408 2001-07-15  Jim Meyering  <meyering@lucent.com>
155410         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
155411         stuff. Now it's in ../Makefile.cfg.
155413 2001-07-15  Jim Meyering  <meyering@lucent.com>
155415         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
155416         (BUILT_SOURCES): Add unlocked-io.h.
155417         (io_functions): Define.
155418         (unlocked-io.h): New rule.
155419         (DISTCLEANFILES): Add unlocked-io.h.
155420         (all-local): Depend on unlocked-io.h, to ensure it is created.
155422         * lib/unlocked-io.hin: New file
155424         * lib/regex.c: Update from glibc.
155426 2001-07-05  Jim Meyering  <meyering@lucent.com>
155428         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
155429         recommendation.
155430         (libfetish_a_SOURCES): Put all .h files here instead.
155431         Remove a thus-exposed (better checks in automake) duplicate and
155432         two unnecessary .h files.
155434 2001-07-04  Jim Meyering  <meyering@lucent.com>
155436         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
155437         that generates jm-glibc-io.m4 so that it doesn't trigger any make
155438         distcheck failure.
155440 2001-07-02  Jim Meyering  <meyering@lucent.com>
155442         The following changes were prompted by suggestions from Bruno Haible.
155444         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
155445         is now generated.
155446         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
155447         definition of EXTRA_DIST.
155448         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
155449         ensure that the generated file is created/updated whenever the list
155450         of $(unlocked_functions) is changed.
155451         (jm-glibc-io.m4): New rule.
155452         (unlocked-io.h): New rule -- currently unused.
155454 2001-06-24  Jim Meyering  <meyering@lucent.com>
155456         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
155457         unmatched right bracket, rather than kludging it with an extra,
155458         falsely-matching quote in a comment.  Patch by Akim Demaille.
155460 2001-06-11  Jim Meyering  <meyering@lucent.com>
155462         * lib/regex.c: Update from GNU libc.
155464 2001-05-27  Jim Meyering  <meyering@lucent.com>
155466         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
155467         Check for ut_type in struct utmp.
155469 2001-05-27  Jim Meyering  <meyering@lucent.com>
155471         * lib/readutmp.h (UT_TYPE): Define.
155473 2001-05-24  Jim Meyering  <meyering@lucent.com>
155475         * lib/argmatch.c: Include "quote.h".
155476         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
155477         quote function.  Reported by Göran Uddeborg.
155479 2001-05-22  Jim Meyering  <meyering@lucent.com>
155481         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
155482         now that we use the package-supplied version unconditionally.
155483         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
155485 2001-05-21  Jim Meyering  <meyering@lucent.com>
155487         * m4/regex.m4: Change a couple backticks to single quotes to avoid
155488         shell syntax errors.
155490 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
155492         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
155494 2001-05-20  Paul Eggert  <eggert@twinsun.com>
155496         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
155497         Don't bother to check library strftime, since
155498         we'll be using our own my_strftime function anyway.
155499         Define my_strftime instead of strftime.
155501 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
155503         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
155504         which is not yet declared.
155506 2001-05-15  Jim Meyering  <meyering@lucent.com>
155508         * m4/regex.m4: Use proper quoting so brackets appear in the test
155509         program.
155510         Reported by, and with help from, Bruno Haible.
155512 2001-05-13  Jim Meyering  <meyering@lucent.com>
155514         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
155515         undefined.
155517 2001-05-11  Paul Eggert  <eggert@twinsun.com>
155519         dirname code cleanup.  base_name now behaves more compatibly
155520         with POSIX basename when given file names that have trailing
155521         slashes, and similarly for dir_name.  Add new primitives
155522         base_len and dir_len.  Put the directory-name-related decls
155523         into dirname.h.
155525         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
155526         * lib/backupfile.c (base_name): Likewise.
155527         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
155528         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
155529         * lib/makepath.c (strip_trailing_slashes): Likewise.
155530         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
155531         ISSLASH): Likewise.
155532         * lib/rename.c (strip_trailing_slashes): Likewise.
155533         * lib/same.c (base_name): Likewise.
155534         * lib/stripslash.c (ISSLASH): Likewise.
155536         * lib/addext.c: Include <dirname.h> after size_t is defined.
155537         * lib/backupfile.c: Likewise.
155539         * lib/addext.c (addext): Use base_len to trim redundant
155540         trailing slashes instead of doing it ourselves.
155541         But do not trim the last slash if it is not redundant.
155543         * lib/backupfile.c (find_backup_file_name,
155544         max_backup_version): Use base_len instead of rolling it ourselves.
155545         Handle the case of "" and (on DOS) "C:" correctly.
155547         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
155548         needed. Include <string.h>, <dirname.h>.
155549         (base_name): Allow file names ending in slashes, other than names
155550         that are all slashes.  In this case, return the basename followed
155551         by the slashes.  This is more general, and can be used in places
155552         where the original base_name purposely had an assertion failure.
155553         (base_len): New function.
155555         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
155556         Do not include <assert.h>; no longer needed.
155557         Include xalloc.h.
155558         (memrchr): Remove decl.
155559         (dir_name_r): Remove.
155560         (dir_len): Renamed from dirlen.  All callers changed.
155561         Rewrite in terms of base_name, for simplicity and consistency.
155562         (dir_name): Never return NULL.  All callers changed.
155563         Do not include <stdlib.h> in test program; no longer needed.
155564         return 0; is fine for test program.
155566         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
155567         New macros.
155568         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
155570         * lib/path-concat.c (path_concat): Use base_len to compute
155571         base length, not strlen; this means we cannot rely on memcpy
155572         to null-terminate.
155574         * lib/same.c (STREQ): Remove.
155575         (same_name): Handle the case where the basename ends in trailing '/'.
155577         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
155578         a slash was stripped.  Do not strip the last slash after a
155579         file system prefix.
155581 2001-05-11  Paul Eggert  <eggert@twinsun.com>
155583         * lib/Makefile.am (libfetish_a_SOURCES):
155584         Add strftime.c, since we now compile it on all hosts.
155586         * lib/strftime.c (my_strftime):
155587         Define to nstrftime if emacs, but only if my_strftime is not defined.
155588         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
155589         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
155590         Add one more extra argument: a nanoseconds value.
155591         All uses changed.
155592         (ns): New macro.
155593         (my_strftime function): Add %N format.
155594         (emacs_strftimeu): Renamed from emacs_strftime,
155595         with extra ut argument.
155597 2001-05-09  Paul Eggert  <eggert@twinsun.com>
155599         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
155601 2001-04-21  Jim Meyering  <meyering@lucent.com>
155603         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
155604         doesn't interfere.
155606 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
155608         * m4/ftruncate.m4: Check for chsize.
155609         Link with ftruncate.o unconditionally if ftruncate is missing.
155610         This was required when cross-compiling to i586-mingw32msvc.
155612 2001-04-08  Jim Meyering  <meyering@lucent.com>
155614         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
155615         recomputed; that's necessary when the offset spans a DST transition.
155616         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
155618 2001-04-02  Jim Meyering  <meyering@lucent.com>
155620         * lib/regex.h, regex.c: Update from GNU libc.
155622 2001-03-24  Jim Meyering  <meyering@lucent.com>
155624         * m4/jm-macros.m4: Require autoconf-2.49d.
155626 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
155628         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
155630 2001-03-19  Paul Eggert  <eggert@twinsun.com>
155632         * lib/version-etc.c (version_etc_copyright): Update to 2001.
155634 2001-03-17  Jim Meyering  <meyering@lucent.com>
155636         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
155637         now that the version in autoconf is equivalent.
155638         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
155640         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
155641         Suggestion from Akim Demaille.
155643         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
155644         (jm_PREREQ_TEMPNAME): New function.
155646 2001-03-16  Paul Eggert  <eggert@twinsun.com>
155648         * lib/tempname.c (uint64_t): Define to uintmax_t if
155649         not defined, and if UINT64_MAX is not defined.
155650         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
155651         Reported by John David Anglin.
155653 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
155655         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
155656         resolve alias if codeset is empty.
155657         * lib/config.charset (BeOS): Use wildcard syntax.
155659 2001-03-13  Jim Meyering  <meyering@lucent.com>
155661         * lib/path-concat.c (path_concat)
155662         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
155663         concatenating e.g., `C:' and `foo'.
155664         From Bruno Haible.
155666 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
155668         * lib/localcharset.c (locale_charset): Don't use
155669         setlocale(LC_CTYPE,NULL). Don't return NULL.
155670         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
155672 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
155674         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
155675         support for DOS/DJGPP.
155677 2001-03-01  Paul Eggert  <eggert@twinsun.com>
155679         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
155680         lacks mkstemp.  Compile our own tempname.c if we compile our own
155681         mkstemp.c, as mkstemp relies on tempname.
155683 2001-03-01  Jim Meyering  <meyering@lucent.com>
155685         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
155686         AH_VERBATIM really does output its argument verbatim.
155688 2001-02-28  Paul Eggert  <eggert@twinsun.com>
155690         * lib/Makefile.am (libfetish_a_SOURCES):
155691         Add dup-safer.c, fopen-safer.c.
155692         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
155694         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
155695         * lib/unistd-safer.h: New files.
155697 2001-02-25  Paul Eggert  <eggert@twinsun.com>
155699         The mkstemp replacement is taken from glibc 2.2.2, with some
155700         portability fixes for use outside glibc, as follows:
155702         * lib/tempname.c (struct_stat64): New macro.
155703         (direxists, __gen_tempname): Use it.
155704         This avoids a portability problem with Solaris 8.
155706         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
155707         (<stddef.h>, <stdint.h>, <string.h>):
155708         Include only if STDC_HEADERS || _LIBC.
155709         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
155710         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
155711         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
155712         (__set_errno): Define this macro if <errno.h> doesn't.
155713         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
155714         Define these macros if <stdio.h> doesn't.
155715         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
155716         Define these macros if <sys/stat.h>
155717         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
155718         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
155719         __xstat64): Define if not _LIBC.
155720         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
155721         (__gen_tempname): Invoke gettimeofday only if
155722         HAVE_GETTIMEOFDAY || _LIBC;
155723         otherwise, fall back on plain "time".
155724         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
155726         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
155728         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
155730 2001-02-18  Paul Eggert  <eggert@twinsun.com>
155732         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
155734 2001-02-17  Paul Eggert  <eggert@twinsun.com>
155736         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
155737         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
155738         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
155739         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
155741 2001-02-17  Paul Eggert  <eggert@twinsun.com>
155743         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
155744         Remove workaround macros for hosts that have mbrtowc but not
155745         mbstate_t, as we now insist on proper declarations for both
155746         before using mbrtowc.
155748 2001-02-17  Jim Meyering  <meyering@lucent.com>
155750         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
155751         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
155752         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
155753         UnixWare 7.1.1.
155755         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
155756         rather than AC_CACHE_VAL.
155758 2001-02-17  Jim Meyering  <meyering@lucent.com>
155760         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
155761         around included file name.
155763         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
155765         * lib/strftime.c: Update from GNU libc (the only changes were to
155766         comments).
155768 2001-02-17  Jim Meyering  <meyering@lucent.com>
155770         * lib/regex.c: Update from libc.
155772 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
155774         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
155775         clash.
155777 2001-02-16  Paul Eggert  <eggert@twinsun.com>
155779         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
155780         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
155781         Reported by Mark Hounschell via Paul Eggert.
155783 2001-02-07  Jim Meyering  <meyering@lucent.com>
155785         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
155787 2001-02-05  Jim Meyering  <meyering@lucent.com>
155789         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
155790         it includes the patch required for `large file' support with at least
155791         HP-UX's 10.20 /bin/cc.
155793 2001-02-03  Jim Meyering  <meyering@lucent.com>
155795         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
155796         AS_IF, now that it works once again (mysteriously).
155797         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
155799 2001-01-30  Jim Meyering  <meyering@lucent.com>
155801         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
155802         * m4/chown.m4: Rename conftestchown to conftest.chown.
155803         * m4/rename.m4: s/conftestdir/conftest.d1/ and
155804         s/conftestdir2/conftest.d2/.
155805         * m4/utimes.m4: s/conftestdata/conftest.data/
155806         Inspired by Pavel Roskin's change in autoconf.
155808 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
155810         * lib/config.charset: Update for FreeBSD 4.2.
155812 2001-01-27  Jim Meyering  <meyering@lucent.com>
155814         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
155815         a use of AS_IF.
155816         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
155818 2001-01-26  Jim Meyering  <meyering@lucent.com>
155820         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
155821         quotearg.c includes it.
155823 2001-01-26  Jim Meyering  <meyering@lucent.com>
155825         * lib/quotearg.c: Include stddef.h.
155826         * lib/quote.c: Include stddef.h.
155827         Reported by Axel Kittenberger.
155829         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
155830         line in double quotes so that it evokes a better diagnostic.
155831         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
155832         Reported by Axel Kittenberger.
155834 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
155836         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
155837         as if it was a `charset'.
155839 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
155841         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
155842         has const.
155844 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
155846         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
155847         to avoid a warning.  Add back 'const' to inptr.
155849 2001-01-20  Jim Meyering  <meyering@lucent.com>
155851         Be sure that headers are checked before used in code compiled
155852         for the type checks.
155853         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
155854         In place of that, invoke jm_CHECK_ALL_TYPES.
155855         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
155856         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
155857         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
155858         The check for ssize_t was mistakenly run before the test for unistd.h.
155860         The configure-time check for stdbool.h was missing.
155861         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
155862         (jm_PREREQ_HASH): New function.
155864 2001-01-17  Jim Meyering  <meyering@lucent.com>
155866         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
155867         for autoconf-2.49c.
155868         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
155870 2001-01-16  Jim Meyering  <meyering@lucent.com>
155872         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
155873         From Bruno Haible.
155875 2001-01-14  Jim Meyering  <meyering@lucent.com>
155877         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
155878         foo and bar.  Create conftestdir/ in the script, not in the C code.
155879         Remove directories in the script, not in the C code.
155880         Remove conftestdir{,2} before trying to create the directory.
155881         Make the entire configure script fail if the mkdir fails.
155883 2001-01-14  Jim Meyering  <meyering@lucent.com>
155885         * lib/rename.c: New file.  From Volker Borchert.
155886         Include stdlib.h, string.h or strings.h, and xalloc.h.
155887         Use strip_trailing_slashes rather than open-coding it.
155889 2001-01-03  Paul Eggert  <eggert@twinsun.com>
155891         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
155893 2001-01-03  Jim Meyering  <meyering@lucent.com>
155895         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
155896         of local `inptr' to avoid warning with some system declarations of
155897         iconv.
155899 2001-01-02  Volker Borchert  <bt@teknon.de>
155901         * m4/rename.m4: New file.
155902         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
155904 2001-01-01  Jim Meyering  <meyering@lucent.com>
155906         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
155907         even on systems with utmpx.h.  It's necessary for the declaration of
155908         utmp's ut_user member.  Reported by Andreas Jaeger.
155910         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
155911         available. They are required for the declarations of getgrgid and
155912         getpwuid resp.
155913         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
155914         Reported by Andreas Jaeger.
155916 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
155918         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
155919         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
155920         so `make install' also works in VPATH builds.
155922 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
155924         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
155925         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
155926         can be used in subdirectories.
155928 2000-12-29  Paul Eggert  <eggert@twinsun.com>
155930         * lib/modechange.c: Do not assume that mode_t uses the
155931         traditional octal encoding.  E.g. "chmod 1 FOO" should set
155932         the other-execute bit of FOO even if S_IXOTH != 1.
155934         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
155935         WOTH, XOTH, ALLM): New macros.
155936         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
155937          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
155938         Use them.
155939         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
155940         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
155941         (mode_compile):
155942         No need to use uintmax_t; unsigned long is long enough.
155943         Don't bother to get suffix since we don't use it.
155945 2000-12-26  Jim Meyering  <meyering@lucent.com>
155947         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
155948         better with autoheader.
155950 2000-12-24  Jim Meyering  <meyering@lucent.com>
155952         * lib/hash.c (is_prime): Return explicit boolean values.
155953         (hash_get_first): Return NULL to appease Irix5.6's 89.
155954         Reported by Nelson Beebe.
155956 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
155958         * lib/localcharset.c (locale_charset): Add support for Win32.
155960 2000-12-18  Paul Eggert  <eggert@twinsun.com>
155962         * lib/physmem.h, lib/physmem.c: New files.
155964         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
155965         (noinst_HEADERS): Add physmem.h.
155967         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
155968         't' for compatibility with Solaris 8 sort.
155970 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
155972         * lib/config.charset: Add support for BeOS.
155974 2000-12-17  Jim Meyering  <meyering@lucent.com>
155976         * m4/dos.m4 (jm_AC_DOS): New file and macro.
155977         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
155979 2000-12-16  Jim Meyering  <meyering@lucent.com>
155981         This bug had a serious impact on chown: `chown N:M FILE' (for integer
155982         N and M) would have treated it like `chown N:N FILE'.
155984         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
155986 2000-12-16  Jim Meyering  <meyering@lucent.com>
155988         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
155989         SHELLS_FILE to a file name that's useful on djgpp systems.
155990         Include stdlib.h.
155991         (ADDITIONAL_DEFAULT_SHELLS): Define.
155992         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
155993         Based mostly on a patch from Prashant TR.
155995 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
155997         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
155998         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
155999         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
156001 2000-12-08  Andreas Schwab  <schwab@suse.de>
156003         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
156004         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
156006 2000-12-07  Jim Meyering  <meyering@lucent.com>
156008         * lib/stripslash.c (ISSLASH): Define.
156009         (strip_trailing_slashes): Use ISSLASH rather than comparing against
156010         `/'.
156011         From Prashant TR.
156013         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
156014         (dir_name_r): Declare this function as static.
156015         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
156016         manifest itself on a name containing a mix of slashes and
156017         backslashes.
156018         Make this function work with names starting with a DOS-style
156019         drive letter and colon prefix.
156020         (dir_name): Append `.' if necessary.
156021         Based mostly on patches from Prashant TR and Eli Zaretskii.
156023         * lib/dirname.h (dir_name_r): Remove prototype.
156025 2000-12-06  Paul Eggert  <eggert@twinsun.com>
156027         * m4/off_t-format.m4: Remove this file.
156028         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
156030 2000-12-06  Jim Meyering  <meyering@lucent.com>
156032         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
156033         replacement strtoull, we may well need the replacement strtoul, too.
156034         Check for declarations of strtoul and strtoull.
156035         Check for strtol.  Mainly as a cue to cause automake to include
156036         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
156037         Check for limits.h -- strtol.c needs it.
156039 2000-12-05  Jim Meyering  <meyering@lucent.com>
156041         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
156043 2000-12-04  Jim Meyering  <meyering@lucent.com>
156045         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
156046         Also include memory.h, stdlib.h, unistd.h if appropriate.
156047         Reported by Andreas Jaeger (conflicting declaration of malloc).
156049 2000-12-02  Jim Meyering  <meyering@lucent.com>
156051         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
156052         * m4/jm-macros.m4 (jm_MACROS): require it.
156054 2000-12-02  Jim Meyering  <meyering@lucent.com>
156056         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
156058 2000-12-01  Paul Eggert  <eggert@twinsun.com>
156060         * lib/memrchr.c: Include <config.h> before any system include file.
156062 2000-11-30  Jim Meyering  <meyering@lucent.com>
156064         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
156066 2000-11-30  Jim Meyering  <meyering@lucent.com>
156068         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
156070 2000-11-29  Paul Eggert  <eggert@twinsun.com>
156072         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
156074 2000-11-26  Jim Meyering  <meyering@lucent.com>
156076         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
156078 2000-11-22  Paul Eggert  <eggert@twinsun.com>
156080         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
156081         size of (size_t) -1; it's not portable.
156083 2000-11-17  Jim Meyering  <meyering@lucent.com>
156085         * lib/strstr.c: Update from GNU libc.
156087 2000-11-17  Akim Demaille  <akim@epita.fr>
156089         * lib/obstack.h: Formatting changes.
156090         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
156091         prevent type checking.
156092         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
156093         cast the value to (void *): assigning a `foo *' to a `void *'
156094         variable is valid.
156095         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
156097 2000-11-16  Jim Meyering  <meyering@lucent.com>
156099         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
156101 2000-11-11  Jim Meyering  <meyering@lucent.com>
156103         * lib/error.c: Add a couple #includes, merging from GNU libc version.
156105 2000-11-10  Jim Meyering  <meyering@lucent.com>
156107         * lib/obstack.h: Update from GNU libc.
156108         * lib/obstack.c: Likewise.
156110 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
156112         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
156114 2000-11-06  Paul Eggert  <eggert@twinsun.com>
156116         * lib/getusershell.c (setusershell): Use rewind rather than
156117         fseek/fseeko, to avoid configuration hassles with fseeko.
156118         Don't bother opening SHELLS_FILE if shellstream is NULL;
156119         it's not necessary.
156121 2000-11-05  Jim Meyering  <meyering@lucent.com>
156123         * lib/makepath.h (make_dir): Declare.
156124         * lib/makepath.c (make_dir): Remove `static' attribute.
156125         Tweak a comment.
156127 2000-11-04  Jim Meyering  <meyering@lucent.com>
156129         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
156131 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
156133         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
156134         last one in a bucket, advance to the next bucket.
156136 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
156138         * lib/fnmatch.c: Do not comment out all the code if we are using
156139         the GNU C library, because in some cases we are replacing buggy
156140         code in the GNU C library itself.
156142 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
156144         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
156145         (regex_compile): Catch bogus \(\1\).
156147 2000-10-30  Paul Eggert  <eggert@twinsun.com>
156149         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
156150         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
156151         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
156153 2000-10-30  Paul Eggert  <eggert@twinsun.com>
156155         * lib/error.h, getline.h, modechange.h:
156156         Remove "2000" from Copyright line, as the file hasn't been
156157         changed this year other than in the copyright notice.
156159         * lib/xalloc.h: Add "2000" to Copyright line, as this file
156160         was changed this year.
156162 2000-10-29  Jim Meyering  <meyering@lucent.com>
156164         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
156165         renaming.
156166         * m4/ls-mntd-fs.m4: Likewise
156168 2000-10-29  Jim Meyering  <meyering@lucent.com>
156170         * lib/xstat.in: Fix grammar in comment.
156172 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
156174         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
156175         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
156176         doesn't define __restrict_arr.
156178 2000-10-28  Jim Meyering  <meyering@lucent.com>
156180         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
156181         (jm_PREREQ_MEMCHR): New function.
156183 2000-10-28  Jim Meyering  <meyering@lucent.com>
156185         * lib/memchr.c: Update from libc.
156186         Adjust for portability:
156187         [HAVE_STDLIB_H]: Include stdlib.h.
156188         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
156189         Undef __memchr, too.
156190         [!weak_alias]: Define __memchr to memchr.
156192         * lib/regex.c: Update from libc.
156193         * lib/regex.h: Likewise.
156194         * lib/getopt1.c: Likewise.
156195         * lib/memcmp.c: Likewise.
156197         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
156198         Avoid using fseek, when possible -- it's broken by design.
156199         Patch by Ulrich Drepper.
156201 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
156203         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
156204         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
156205         Giving in to popular pressure to shut up the compiler with casts.
156207 2000-10-26  Jim Meyering  <meyering@lucent.com>
156209         * lib/strftime.c: Update from libc.
156211 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
156213         * regex.c: More `unsigned char' -> `re_char' changes.
156214         Also change several `int' into `re_wchar_t'.
156215         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
156216         (PUSH_FAILURE_POINTER): Don't cast any more.
156217         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
156218         We want GCC to complain, since this piece of code makes
156219         re_match non-reentrant, which *should* be fixed.
156220         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
156221         (EXTEND_BUFFER): Use RETALLOC.
156222         (SET_LIST_BIT): Don't cast.
156223         (re_wchar_t): New type.
156224         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
156225         that those two functions will always properly return.
156226         (IMMEDIATE_QUIT_CHECK): Cast to void.
156227         (analyse_first): Use recursion rather than an explicit stack.
156228         (re_compile_fastmap): Can't fail anymore.
156229         (re_search_2): Don't check re_compile_fastmap for failure.
156230         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
156231         Now also sets the new value (passed in a new argument).
156232         (re_match_2_internal): Use it.
156233         Also, use a new var `reg' of type size_t when looping through regs
156234         rather than reuse the inappropriate `mcnt'.
156236 2000-10-25  Jim Meyering  <meyering@lucent.com>
156238         * lib/obstack.c: Update from libc.
156240 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
156242         * regex.c (regex_compile): Change the way of handling a range from
156243         a char less than 256 to a char not less than 256.
156245 2000-10-24  Andrew Innes  <andrewi@gnu.org>
156247         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
156248         NT-Emacs only.
156249         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
156250         so that re_search functions only quit when callers expect them to.
156252 2000-10-23  Jim Meyering  <meyering@lucent.com>
156254         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
156255         wrong.  That set_locale call must not have any side effects.
156256         From Paul Eggert.
156258 2000-10-22  Jim Meyering  <meyering@lucent.com>
156260         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
156261         [CYCLIC]: Remove now-unused definition.
156263         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
156264         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
156265         Suggestion from Ulrich Drepper.
156267 2000-10-21  Jim Meyering  <meyering@lucent.com>
156269         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
156270         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
156271         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
156273 2000-10-21  Jim Meyering  <meyering@lucent.com>
156275         * lib/dirname.c (memrchr): Declare if necessary.
156276         (dir_name): Remove the restriction that there be no
156277         trailing slashes.  Now, this code skips past them, effectively
156278         ignoring them.
156279         [TEST_DIRNAME] (main): New unit tests.
156281         * lib/memrchr.c: New file from GNU libc.
156282         Undef __memrchr, too.
156283         [!weak_alias]: Define __memrchr to memrchr.
156284         Guard weak_alias use with `#ifdef weak_alias'.
156286 2000-10-21  Jim Meyering  <meyering@lucent.com>
156288         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
156289         (dir_name): Use dir_name_r.
156290         * lib/dirname.h (dir_name_r): Declare it.
156292 2000-10-17  Jim Meyering  <meyering@lucent.com>
156294         * lib/quote.h (PARAMS): Define and use.
156295         Reported by Akim Demaille.
156297         * lib/getopt.c: Update from libc.
156299 2000-10-16  Jim Meyering  <meyering@lucent.com>
156301         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
156302         setlocale.
156303         From Jan Fedak.
156305 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
156307         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
156309 2000-09-25  Jim Meyering  <meyering@lucent.com>
156311         * lib/md5.h (rol): Define (from GnuPG).
156313         * lib/sha.c: Give credit (GnuPG) where due.
156314         (M): Use rol rather than open-coding it.
156315         Add a FIXME comment.
156317 2000-09-21  Jim Meyering  <meyering@lucent.com>
156319         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
156320         Reported by Michael Stone.
156322 2000-09-20  Jim Meyering  <meyering@lucent.com>
156324         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
156325         (noinst_HEADERS): Add sha.h.
156326         Based on code from Scott G. Miller and from GnuPG.
156328 2000-09-18  Jim Meyering  <meyering@lucent.com>
156330         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
156331         LIBS. Otherwise, everyone ends up linking with -lelf for some
156332         configurations.
156333         Reported by Mike Stone.
156335 2000-09-15  Jim Meyering  <meyering@lucent.com>
156337         * lib/regex.c: Update from libc.
156339 2000-09-10  Jim Meyering  <meyering@lucent.com>
156341         * lib/getopt.c (_getopt_internal): Update from glibc.
156343 2000-09-09  Jim Meyering  <meyering@lucent.com>
156345         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
156346         think it should be used as a general replacement for isascii.
156347         * lib/fnmatch.c: Likewise.
156348         * lib/mbswidth.c: Likewise
156349         * lib/regex.c: Likewise.
156351         Don't use atoi.
156352         * lib/userspec.c: Include sys/param.h and limits.h.
156353         Include xstrtol.h.
156354         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
156355         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
156356         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
156357         UID, GID.  Check range.
156359 2000-09-06  Jim Meyering  <meyering@lucent.com>
156361         * lib/getopt.c (_getopt_internal): Update from glibc.
156363 2000-08-30  Jim Meyering  <meyering@lucent.com>
156365         * lib/strftime.c: Merge in changes from GNU libc.
156367 2000-08-26  Jim Meyering  <meyering@lucent.com>
156369         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
156370         * m4/fpending.m4: New file.
156372 2000-08-26  Jim Meyering  <meyering@lucent.com>
156374         * lib/closeout.c: Include "__fpending.h".
156375         (close_stdout_status): Return right away if there's nothing to flush.
156377         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
156378         * lib/__fpending.c: New file.
156379         * lib/__fpending.h: New file.
156381 2000-08-20  Jim Meyering  <meyering@lucent.com>
156383         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
156384         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
156385         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
156387 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
156389         Improve fileutils installation on systems where running
156390         programs (like install) can't be unlinked.
156391         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
156392         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
156394 2000-08-07  Paul Eggert  <eggert@twinsun.com>
156396         Standardize on "memory exhausted" instead of "Memory exhausted"
156397         or "virtual memory exhausted".
156398         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
156399         "virtual memory exhausted".
156400         * lib/same.c (same_name): Invoke xalloc_die instead of printing
156401         our own message.
156402         * lib/userspec.c (parse_user_spec): Likewise.
156403         * lib/bumpalloc.h: comment fix
156404         * lib/same.c, userspec.c: Include xalloc.h.
156406         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
156407         not char *const and pointing to a constant array.
156408         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
156409         (xrealloc): Comment fix.
156411         * lib/userspec.c (parse_user_spec):
156412         Don't translate a message until just before returning,
156413         to avoid unnecessary translation.
156415 2000-08-07  Jim Meyering  <meyering@lucent.com>
156417         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
156418         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
156419         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
156420         getgroups.c, gethostname.c, getopt.h, group-member.c,
156421         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
156422         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
156423         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
156424         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
156425         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
156426         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
156427         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
156428         yesno.c: Back out Copyright date changes for each file with no change
156429         this year.  This eases coordination with other programs using the same
156430         source code modules.  From Paul Eggert.
156432 2000-08-06  Paul Eggert  <eggert@twinsun.com>
156434         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
156435         not char, for compatibility with glibc 2.1.3 strftime.c.
156437 2000-08-03  Greg McGary  <greg@mcgary.org>
156439         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
156440         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
156441         (EXTEND_BUFFER): Use them.
156443 2000-08-01  Jim Meyering  <meyering@lucent.com>
156445         * lib/dirname.c (ISSLASH): Define.
156446         (BACKSLASH_IS_PATH_SEPARATOR): Define.
156447         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
156448         both `\' and `/' may be use as path separators.
156449         Based on a patch from Prashant TR.
156451 2000-07-31  Paul Eggert  <eggert@twinsun.com>
156453         * lib/quotearg.c (quotearg_n_options): Don't make the initial
156454         slot vector a constant, since it might get modified.
156456 2000-07-31  Jim Meyering  <meyering@lucent.com>
156458         * lib/xmalloc.c: Use `virtual memory exhausted', not
156459         `Memory exhausted'.
156460         * lib/obstack.c (print_and_abort): Likewise.
156462 2000-07-30  Paul Eggert  <eggert@twinsun.com>
156464         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
156465         buffer, so that the caller can always quote one small
156466         component of a "memory exhausted" message in slot 0.
156467         From a suggestion by Jim Meyering.
156469 2000-07-30  Jim Meyering  <meyering@lucent.com>
156471         * lib/makepath.c (make_path): Quote the other instance, too.
156473         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
156474         (STATIC_BUF_SIZE): Define.
156475         (quotearg_n_options): Use only statically allocated storage when
156476         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
156477         than STATIC_BUF_SIZE.
156479 2000-07-29  Jim Meyering  <meyering@lucent.com>
156481         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
156482         * lib/dirname.c (dir_name): Likewise.
156484         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
156485         `/'.
156487         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
156488         (dir_name): Assert that there are no trailing slashes.
156490 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
156492         * lib/mbswidth.h (mbswidth): Add a flags argument.
156493         (mbswidth): New declaration.
156494         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
156495         * lib/mbswidth.c (mbswidth): Add a flags argument.
156496         (mbsnwidth): New function.
156498 2000-07-24  Jim Meyering  <meyering@lucent.com>
156500         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
156502 2000-07-23  Paul Eggert  <eggert@twinsun.com>
156504         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
156506 2000-07-23  Paul Eggert  <eggert@twinsun.com>
156508         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
156509         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
156510         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
156511         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
156512         invoke multibyte primitives.
156514 2000-07-23  Paul Eggert  <eggert@twinsun.com>
156516         * lib/quotearg.c:
156517         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
156518         so that mbstate_t is always defined.
156520         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
156521         be 1 in at least one GCC installation, and this configuration
156522         error is likely to be common.  Ignoring MB_LEN_MAX hurts
156523         performance on hosts that have mbrtowc but have only unibyte
156524         locales, but I assume these hosts are rare.
156526 2000-07-23  Paul Eggert  <eggert@twinsun.com>
156528         * lib/mbswidth.c (_XOPEN_SOURCE):
156529         Don't define; this causes problems on Solaris 7.
156530         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
156532 2000-07-23  Jim Meyering  <meyering@lucent.com>
156534         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
156535         too: getgrgid, getpwuid, getuid.
156537 2000-07-23  Jim Meyering  <meyering@lucent.com>
156539         * lib/basename.c (base_name): Add an assertion.
156541 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
156543         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
156544         shadow its mbsinit function.
156546 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
156548         * lib/mbswidth.h: New file.
156549         * lib/mbswidth.c: New file.
156550         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
156551         (noinst_HEADERS): Add mbswidth.h.
156553 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
156555         * lib/config.charset: Add support for FreeBSD. Improve support for
156556         HP-UX and IRIX 6.
156558 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
156560         * m4/mbswidth.m4: New file.
156561         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
156563 2000-07-15  Jim Meyering  <meyering@lucent.com>
156565         * lib/makepath.c: Include quote.h.
156566         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
156567         corresponding argument in a `quote (...)' call.
156568         Give better diagnostics.
156570         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
156571         (noinst_HEADERS): Add quote.h.
156573         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
156574         from tar's src/misc.c.
156575         * lib/quote.h: New file.  Prototypes for same.
156577 2000-07-14  Paul Eggert  <eggert@twinsun.com>
156579         From a suggestion by Bruno Haible.
156580         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
156581         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
156582         to decide whether to define the BeOS workaround macro;
156583         this adjusts to the change to AC_MBSTATE_T.
156585 2000-07-14  Jim Meyering  <meyering@lucent.com>
156587         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
156588         jm_AC_TYPE_UINTMAX_T.
156590 2000-07-13  Paul Eggert  <eggert@twinsun.com>
156592         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
156594         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
156595         quotearg_buffer_restyled): Add support for
156596         clocale_quoting_style.  Undo previous change to
156597         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
156598         and "{RIGHT QUOTATION MARK}" msgids.
156600 2000-07-10  Paul Eggert  <eggert@twinsun.com>
156602         From a suggestion by Bruno Haible.
156603         * m4/mbstate_t.m4 (AC_MBSTATE_T):
156604         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
156605         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
156606         and mbstate_t, to a single-part test that simply defines mbstate_t.
156607         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
156608         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
156610 2000-07-10  Jim Meyering  <meyering@lucent.com>
156612         * m4/strerror_r.m4: Mirror the correction made in autoconf.
156614         * m4/gnu-source.m4: Output to confdefs.h directly.
156615         Suggestion from Akim Demaille.
156617 2000-07-09  Paul Eggert  <eggert@twinsun.com>
156619         The old behavior of quoting `like this' doesn't look good with
156620         newer, ISO-style fonts.  See:
156621         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
156623         Instead, quote "like this" by default.  Let the translator
156624         tailor the locale-specific quoting behavior by providing
156625         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
156627         * lib/quotearg.c (N_): New macro.
156628         (gettext_default): New function.
156629         (quotearg_buffer_restyled): Use
156630         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
156631         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
156633 2000-07-09  Jim Meyering  <meyering@lucent.com>
156635         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
156636         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
156638         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
156639         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
156641 2000-07-09  Jim Meyering  <meyering@lucent.com>
156643         * lib/Most files: Update copyright dates to include 2000.
156645 2000-07-08  Jim Meyering  <meyering@lucent.com>
156647         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
156648         if not defined.
156649         (xgethostname): Remove now-unnecessary #ifdef.
156650         Move declaration of `err' into loop where it's used.
156652 2000-07-05  Paul Eggert  <eggert@twinsun.com>
156653         and Bruno Haible  <haible@clisp.cons.org>
156655         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
156656         only if the test for an object-type mbstate_t fails.  This
156657         prevents us from mistakenly reporting that mbstate_t is a
156658         system object type after we "#define mbstate_t int" to work
156659         around its lack.
156661 2000-07-05  Paul Eggert  <eggert@twinsun.com>
156662         and Bruno Haible  <haible@clisp.cons.org>
156664         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
156666 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
156668         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
156669         to strerror_r.
156670         Include <ctype.h> for use of isalpha.
156672 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
156674         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
156675         by allocating a larger buffer. Test the gethostname return value for
156676         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
156677         returns an error and ENAMETOOLONG isn't defined.
156679 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
156681         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
156682         dimension.
156684 2000-07-04  Jim Meyering  <meyering@lucent.com>
156686         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
156687         of the deprecated AC_CHECKING.
156689 2000-07-04  Jim Meyering  <meyering@lucent.com>
156691         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
156692         Reported by Bruno Haible.
156694 2000-07-04  Jim Meyering  <meyering@lucent.com>
156696         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
156697         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
156698         lacks mbrtowc.
156700 2000-07-03  Paul Eggert  <eggert@twinsun.com>
156702         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
156703         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
156705 2000-07-03  Paul Eggert  <eggert@twinsun.com>
156706         and Bruno Haible  <haible@clisp.cons.org>
156708         * lib/quotearg.c (mbrtowc):
156709         Assign to *pwc, and return 1 only if result is nonzero.
156710         (iswprint): Use ISPRINT when substituting our own mbrtowc.
156712 2000-07-03  Jim Meyering  <meyering@lucent.com>
156714         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
156716 2000-07-03  Jim Meyering  <meyering@lucent.com>
156718         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
156719         This is necessary to get a definition of e.g., UTMP_FILE on
156720         HP-UX 10.20.
156721         From Bob Proulx.
156723 2000-07-02  Jim Meyering  <meyering@lucent.com>
156725         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
156727         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
156728         AC_LIBOBJ(function_name).
156729         * m4/chown.m4: Likewise.
156730         * m4/fnmatch.m4: Likewise.
156731         * m4/ftruncate.m4: Likewise.
156732         * m4/getgroups.m4: Likewise.
156733         * m4/getline.m4: Likewise.
156734         * m4/group-member.m4: Likewise.
156735         * m4/jm-macros.m4: Likewise.
156736         * m4/lstat.m4: Likewise.
156737         * m4/malloc.m4: Likewise.
156738         * m4/memcmp.m4: Likewise.
156739         * m4/nanosleep.m4: Likewise.
156740         * m4/putenv.m4: Likewise.
156741         * m4/realloc.m4: Likewise.
156742         * m4/regex.m4: Likewise.
156743         * m4/stat.m4: Likewise.
156744         * m4/strftime.m4: Likewise.
156746 2000-07-02  Jim Meyering  <meyering@lucent.com>
156748         * lib/quotearg.c (mbstate_t): Don't define here.
156750 2000-07-02  Jim Meyering  <meyering@lucent.com>
156752         * lib/nanosleep.c (SIGCONT): Define if not already defined.
156754 2000-07-01  Jim Meyering  <meyering@lucent.com>
156756         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
156758 2000-07-01  Jim Meyering  <meyering@lucent.com>
156760         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
156761         problem.
156763 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
156765         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
156766         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
156768 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
156770         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
156771         per change in ../m4/ls-mntd-fs.m4.
156772         (read_filesystem_list): Ignore symbolic links.
156774 2000-06-29  Jim Meyering  <meyering@lucent.com>
156776         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
156777         for declaration of strcmp.
156779         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
156781         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
156782         Avoid warning by casting result to `char *' to remove `const'.
156784 2000-06-28  Jim Meyering  <meyering@lucent.com>
156786         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
156787         included by quotearg.c, for which we perform this test.  From
156788         Bruno Haible.
156790 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
156792         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
156793         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
156794         <utmpx.h> exists, put readutmp.o into LIBOBJS.
156796 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
156798         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
156800 2000-06-26  Paul Eggert  <eggert@twinsun.com>
156802         savedir now sets errno on failure and invokes xmalloc to get memory.
156803         Fix a couple of other minor bugs while we're at it.
156805         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
156806         (NAMLEN): Remove macro.
156807         (malloc, realloc): Remove decls.
156808         (stpcpy): Likewise.
156809         ("xalloc.h"): Include.
156810         (NAME_SIZE_DEFAULT): New macro.
156811         (savedir): Use xmalloc / xrealloc to allocate memory.
156812         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
156813         Skip "" directory entries.
156814         Use strlen to calculate directory entry length, since the old method
156815         is rarely used these days and isn't worth supporting.
156816         Don't use a pointer after freeing it.
156817         Check for integer overflow when calculating allocation size.
156818         Use memcpy to copy entries, instead of stpcpy.
156819         Set errno properly when returning NULL.
156820         Check for readdir error.
156822 2000-06-26  Jim Meyering  <meyering@lucent.com>
156824         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
156826 2000-06-25  Jim Meyering  <meyering@lucent.com>
156828         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
156829         Linux header bug when _XOPEN_SOURCE is defined to 500.
156831 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
156833         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
156834         deficiency.
156836 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
156838         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
156839         Include xalloc.h.
156840         Don't include <stdlib.h>.  Don't declare malloc, realloc.
156842 2000-06-24  Jim Meyering  <meyering@lucent.com>
156844         * m4/strerror_r.m4: Revive this file -- to try out an experimental
156845         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
156846         for which strerror does return char*, but which lacks a conveniently
156847         accessible declaration of the function.  If the compile-test says
156848         strerror_r doesn't work, then resort to a `run'-test that works on
156849         BeOS and segfaults on DEC Unix.
156851 2000-06-24  Jim Meyering  <meyering@lucent.com>
156853         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
156855 2000-06-23  Paul Eggert  <eggert@twinsun.com>
156857         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
156858         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
156860 2000-06-23  Paul Eggert  <eggert@twinsun.com>
156862         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
156863         (mbrtowc, mbstate_t): Define substitutes if
156864         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
156865         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
156866         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
156868 2000-06-23  Jim Meyering  <meyering@lucent.com>
156870         * m4/afs.m4: Add missing AC_MSG_RESULT.
156871         Reported by Bruno Haible.
156873         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
156874         Suggestion from Bruno Haible.
156876 2000-06-23  Jim Meyering  <meyering@lucent.com>
156878         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
156880 2000-06-21  Jim Meyering  <meyering@lucent.com>
156882         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
156884 2000-06-21  Jim Meyering  <meyering@lucent.com>
156886         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
156887         (noinst_HEADERS): Add getstr.h.
156889         * lib/getline.c (getstr): Move into a separate file.
156890         * lib/getstr.c (getstr): New file, extracted from getline.c, with
156891         the following changes: new parameter, delim2; both delim[12]
156892         parameters have type `int', not `char'.  The latter would lose
156893         with 8-bit delimiters.
156894         * lib/getstr.h: New file.
156896 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
156898         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
156899         than 1024, return a memory chunk of least possible size, instead
156900         of size PATH_MAX + 2. In the loop, increment the size proportionally.
156901         Use free/xmalloc instead of xrealloc to avoid copying for very long
156902         paths.
156904 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
156906         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
156907         the empty string.
156909 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
156911         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
156912         address, not strdup.  Include <stdlib.h> and don't declare free().
156914 2000-06-19  Jim Meyering  <meyering@lucent.com>
156916         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
156918 2000-06-18  Jim Meyering  <meyering@lucent.com>
156920         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
156922         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
156923         `checking whether...' message to be consistent with that of the
156924         lstat test.
156926 2000-06-18  Jim Meyering  <meyering@lucent.com>
156928         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
156929         Besides, these days every porting target provides a mkdir function.
156931         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
156932         needed. (this snippet comes from src/system.h).
156934 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
156936         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
156938 2000-06-15  Paul Eggert  <eggert@twinsun.com>
156940         * lib/human.c (adjust_value): New function.
156941         (human_readable_inexact): Apply rounding style even when
156942         printing approximate values.
156944 2000-06-14  Paul Eggert  <eggert@twinsun.com>
156946         * lib/human.c (human_readable_inexact): Allow an input block
156947         size that is not a multiple of the output block size, and vice versa.
156948         Reported by Piergiorgio Sartor.
156950 2000-06-14  Paul Eggert  <eggert@twinsun.com>
156952         * lib/getdate.y (get_date): Apply relative times after time
156953         zone indicator, not before.  Reported by Todd A. Jacobs.
156955 2000-06-13  Jim Meyering  <meyering@lucent.com>
156957         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
156959         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
156961 2000-06-12  Paul Eggert  <eggert@twinsun.com>
156963         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
156965 2000-06-12  Jim Meyering  <meyering@lucent.com>
156967         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
156968         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
156969         optional argument.
156970         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
156971         the optional argument, `lib'.
156973 2000-06-08  Jim Meyering  <meyering@lucent.com>
156975         * m4/largefile.m4: Remove file (now that it's part of autoconf).
156977 2000-06-04  Paul Eggert  <eggert@twinsun.com>
156979         Rewrite largefile configuration so that we don't need to run
156980         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
156981         AC_CANONICAL_HOST in configure.in -- jmm]
156983         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
156984         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
156985         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
156986         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
156987         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
156988         All uses changed.
156989         Instead of inspecting the output of getconf, try to compile the
156990         test program without and with the macro definition.
156991         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
156992         for getconf.  Instead, check for the needed flags by compiling
156993         test programs.
156995 2000-06-04  Paul Eggert  <eggert@twinsun.com>
156997         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
156999 2000-06-04  Jim Meyering  <meyering@lucent.com>
157001         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
157002         SunOS 4.1.4 for which gid_t is an unsigned type.
157004 2000-06-03  Jim Meyering  <meyering@lucent.com>
157006         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
157007         now that autoconf requires that.
157009         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
157010         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
157011         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
157013 2000-06-03  Jim Meyering  <meyering@lucent.com>
157015         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
157017 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
157019         * m4/glibc21.m4: New file.
157020         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
157022 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
157024         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
157025         newer, don't install charset.alias.
157026         * lib/config.charset: Change the Linux/glibc rules so they become empty
157027         on glibc-2.1 or newer.
157029 2000-06-02  Jim Meyering  <meyering@lucent.com>
157031         * lib/mountlist.c: Back out last change.  Instead, do this...
157032         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
157033         me_dummy member using the same `ignore'-testing code.
157034         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
157035         fs_type strings.
157036         From Mark D. Roth.
157038 2000-05-29  Jim Meyering  <meyering@lucent.com>
157040         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
157041         mounts with the `ignore' attribute.  Based on a patch from
157042         Mark D. Roth.
157044 2000-05-28  Jim Meyering  <meyering@lucent.com>
157046         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
157047         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
157048         * m4/stat.m4: Likewise.
157049         * m4/lstat.m4: Likewise.
157050         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
157052         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
157053         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
157055 2000-05-26  Jim Meyering  <meyering@lucent.com>
157057         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
157059 2000-05-24  Jim Meyering  <meyering@lucent.com>
157061         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
157062         autoconf requires that.
157063         * m4/lib-check.m4: Likewise.
157064         * m4/jm-macros.m4: Likewise.
157065         * m4/strftime.m4: Likewise.
157067         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
157068         AC_CHECK_DECLS, now that autoconf requires that.
157070 2000-05-22  Jim Meyering  <meyering@lucent.com>
157072         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
157073         * m4/lstat.m4: Likewise.
157075 2000-05-22  Jim Meyering  <meyering@lucent.com>
157077         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
157079 2000-05-20  Jim Meyering  <meyering@lucent.com>
157081         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
157082         (jm_PREREQ): Use it.
157084 2000-05-18  Jim Meyering  <meyering@lucent.com>
157086         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
157087         back, too, since it may have been modified by allocate_entry.
157088         (hash_delete): Rewrite to use neither the assignment operator
157089         nor the comma operator in an if-expression.
157091 2000-05-15  Paul Eggert  <eggert@twinsun.com>
157093         * lib/closeout.c:
157094         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
157095         Remove; no longer needed.
157096         "quotearg.h": Add include.
157097         (file_name): Do not bother to explicitly initialize to NULL; it's less
157098         efficient on some hosts.
157099         (close_stdout_status): Remove test as to whether stdout was already
157100         closed; it breaks for the case "echo x | sort >&-".
157101         Quote file name colons.
157102         Do not assume that _("write error") lacks format strings.
157104 2000-05-15  Jim Meyering  <meyering@lucent.com>
157106         * lib/version-etc.c (version_etc_copyright): Update the copyright
157107         string used in all --version output.
157109 2000-05-14  Jim Meyering  <meyering@lucent.com>
157111         * lib/closeout.c (close_stdout_set_file_name): New function.
157112         (close_stdout_status): Use new file-scoped global.
157113         Return right away if fstat says the stdout file descriptor is invalid.
157114         * lib/closeout.h (close_stdout_set_file_name): Declare.
157116 2000-05-10  Jim Meyering  <meyering@lucent.com>
157118         * lib/closeout.c [default_exit_status]: New file-scoped variable.
157119         (close_stdout_set_status): New function.
157120         * lib/closeout.h (close_stdout_set_status): Declare.
157122 2000-05-09  Jim Meyering  <meyering@lucent.com>
157124         * m4/gettext.m4: Rename this...
157125         * m4/libintl.m4: ...to this.
157127 2000-05-08  Jim Meyering  <meyering@lucent.com>
157129         * lib/long-options.c: Don't include closeout.h.
157130         (parse_long_options): Don't call close_stdout for --version.
157132 2000-05-06  Paul Eggert  <eggert@twinsun.com>
157134         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
157135         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
157136         2.1.3 bug.  This avoids a clash when files like regex.c define
157137         _GNU_SOURCE.
157139 2000-05-06  Jim Meyering  <meyering@lucent.com>
157141         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
157142         (AC_REPLACE_FUNCS): Add strnlen.
157144         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
157145         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
157147         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
157148         AC_SEARCH_LIBS call for nanosleep.
157149         (LIB_NANOSLEEP): Set and AC_SUBST.
157151 2000-05-06  Jim Meyering  <meyering@lucent.com>
157153         * lib/strnlen.c: Undefine __strnlen and strnlen.
157154         [!weak_alias]: Define __strnlen to strnlen.
157156         * lib/atexit.c: New file, from libiberty.
157158 2000-05-06  Jim Meyering  <meyering@lucent.com>
157160         * lib/closeout.c (close_stdout_status): Also check for errors on the
157161         stderr stream.
157163 2000-05-05  Jim Meyering  <meyering@lucent.com>
157165         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
157166         AC_SEARCH_LIBS call for clock_gettime.
157167         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
157169         * m4/search-libs.m4: Update from autoconf.
157171         su doesn't work on Solaris 2.6.
157172         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
157173         <shadow.h>.  Reported by Dragos Harabor.
157175 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
157177         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
157178         memcpy instead of xmalloc, xrealloc, path_concat.
157179         (locale_charset): Treat empty environment variables as absent.
157180         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
157182 2000-05-04  Jim Meyering  <meyering@lucent.com>
157184         * lib/getopt.c: Update from glibc.
157185         * lib/obstack.c: Likewise.
157186         * lib/obstack.h: Likewise.
157187         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
157188         file
157190         * lib/regex.h: Likewise.
157191         * lib/strndup.c: Likewise.
157192         * lib/strnlen.c: New file, from glibc.
157194 2000-05-03  Jim Meyering  <meyering@lucent.com>
157196         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
157198 2000-05-02  Paul Eggert  <eggert@twinsun.com>
157200         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
157201         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
157202         compile-time test, rather than inspecting host and OS, to
157203         decide whether to define _LARGEFILE_SOURCE.
157205 2000-05-01  Jim Meyering  <meyering@lucent.com>
157207         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
157209         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
157210         Based on a patch from Bruno Haible.
157212 2000-05-01  Jim Meyering  <meyering@lucent.com>
157214         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
157216 2000-04-29  Jim Meyering  <meyering@lucent.com>
157218         * lib/path-concat.c: Declare strdup only if it's not defined.
157219         * lib/canon-host.c: Likewise.
157221 2000-04-28  Jim Meyering  <meyering@lucent.com>
157223         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
157224         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
157225         is included first, then limits.h is included by locale.h by libintl.h.
157226         From John David Anglin.
157228 2000-04-25  Jim Meyering  <meyering@lucent.com>
157230         * lib/makepath.c (S_IRWXUGO): Define.
157231         (make_path): Always perform explicit chmod if MODE specifies any
157232         of the `special' permission bits.  Prompted by a bug report against
157233         install from Mate Wierdl and Joost van Baal.
157235 2000-04-18  Jim Meyering  <meyering@lucent.com>
157237         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
157238         (jm_PREREQ): Use it.
157240 2000-04-18  Jim Meyering  <meyering@lucent.com>
157242         * lib/README: New file.
157244         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
157245         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
157247 2000-04-17  Jim Meyering  <meyering@lucent.com>
157249         Get it right :-)
157250         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
157251         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
157252         Suggestion from Akim Demaille.
157254 2000-04-17  Jim Meyering  <meyering@lucent.com>
157256         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
157257         the definition of it to rpl_strftime also defined-away the system's
157258         declaration.
157260 2000-04-15  Jim Meyering  <meyering@lucent.com>
157262         Use `C' to denote so-called `contiguous' files, the same way
157263         that tar does.
157264         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
157265         (ftypelet): Use S_ISCTG.
157266         From Michael Deutschmann.
157268 2000-04-14  Jim Meyering  <meyering@lucent.com>
157270         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
157271         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
157272         clobbered.
157274 2000-04-14  Jim Meyering  <meyering@lucent.com>
157276         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
157278 2000-04-13  Jim Meyering  <meyering@lucent.com>
157280         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
157281         AH_VERBATIM to insert required #ifndef into config.h.in.
157282         Suggestion from Akim Demaille.
157284 2000-04-12  Jim Meyering  <meyering@lucent.com>
157286         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
157287         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
157288         Christian Krackowizer.
157290         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
157291         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
157292         (AC_SYS_LARGEFILE): Require.
157293         (AM_C_PROTOTYPES): Require.
157295 2000-04-08  Jim Meyering  <meyering@lucent.com>
157297         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
157298         names don't conflict.  Reported by Eli Zaretskii.
157300 2000-04-07  Jim Meyering  <meyering@lucent.com>
157302         * lib/putenv.c: Move inclusion of errno.h so it follows that of
157303         sys/types.h, to work around system header problems on AIX 3.2.5.
157304         From Bruno Haible.
157306 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
157308         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
157309         bug.  Deal with the different error behavior of Irix iconv.
157311 2000-04-05  Paul Eggert  <eggert@twinsun.com>
157313         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
157314         IRIX if the installer said otherwise.
157316 2000-04-05  Jim Meyering  <meyering@lucent.com>
157318         Portability tweaks required for ultrix4.3.
157319         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
157320         (jm_CHECK_DECLS): Add getutent to the list of functions.
157321         (_jm_DECL_HEADERS): Add utmpx.h.
157322         From John David Anglin.
157324         * m4/strftime.m4: Back out the 2000-04-02 change.
157325         Instead of that change, simply undefine putenv in the test program.
157327 2000-04-05  Jim Meyering  <meyering@lucent.com>
157329         Portability tweaks required for ultrix4.3.
157330         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
157331         getutent.
157332         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
157333         * lib/canon-host.c: Declare strdup.
157334         * lib/path-concat.c: Likewise.
157335         From John David Anglin.
157337 2000-04-04  Jim Meyering  <meyering@lucent.com>
157339         Be more DOS 8.3-friendly.
157340         * lib/ref-add.sin: Renamed from ref-add.sed.in.
157341         * lib/ref-del.sin: Renamed from ref-del.sed.in.
157342         * lib/Makefile.am: Reflect renaming.
157343         Reported by Eli Zaretskii.
157345         Use a temporary file name that won't clash with `charset.alias'
157346         in the DOS 8.3 name space.
157347         * lib/Makefile.am (charset_tmp): Define.
157348         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
157349         (uninstall-local): Likewise.
157350         Reported by Eli Zaretskii.
157352 2000-04-03  Jim Meyering  <meyering@lucent.com>
157354         * m4/gettext.m4: Fix typo in comment.
157356         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
157357         textutils/configure.in).  Suggestion from Paul Eggert.
157358         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
157360 2000-04-02  Paul Eggert  <eggert@twinsun.com>
157362         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
157363         variable in the shell rather than using putenv, which isn't
157364         portable.  This avoids the configure-time inter-test dependency
157365         on the potentially-renamed putenv function.
157367 2000-03-30  Paul Eggert  <eggert@twinsun.com>
157369         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
157370         before checking struct stat.st_blksize, so that
157371         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
157373 2000-03-29  Paul Eggert  <eggert@twinsun.com>
157375         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
157376         since strftime.c uses HAVE_STRFTIME to decide whether to use
157377         the underlying strftime.
157379 2000-03-29  Paul Eggert  <eggert@twinsun.com>
157381         * lib/time/strftime.c (my_strftime): Make sure we call the system
157382         strftime, not ourselves, when invoking the underlying strftime.
157384 2000-03-24  Jim Meyering  <meyering@lucent.com>
157386         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
157387         (charset_alias): Define.
157388         (install-exec-local): Factor out common code.
157389         (uninstall-local): Split lines longer than 80.
157390         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
157391         (SUFFIXES): Define.
157392         (.sed.in.sed): New rule.  Don't redirect directly to $@.
157393         (CLEANFILES): Add ref-add.sed and ref-del.sed.
157395 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
157397         * lib/config.charset: Output a line containing "Packages using this
157398         file".
157399         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
157400         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
157401         ref-del.sed): New rules.
157403 2000-03-17  Jim Meyering  <meyering@lucent.com>
157405         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
157406         Otherwise, include <strings.h>
157408 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
157410         * lib/unicodeio.c (utf8_wctomb): New function.
157411         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
157412         format instead of in UCS-4 with platform dependent endianness.
157414 2000-03-10  Jim Meyering  <meyering@lucent.com>
157416         * m4/lib-check.m4: Look for getspnam in -lgen, too.
157417         From Marco Franzen.
157419 2000-03-07  Paul Eggert  <eggert@twinsun.com>
157421         * lib/savedir.c (savedir): Work even if directory size is
157422         negative; this can happen with some screwy NFS configurations.
157424 2000-03-06  Jim Meyering  <meyering@lucent.com>
157426         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
157427         if it's NULL (because we ran out of memory).  From Bruno Haible.
157429 2000-03-05  Jim Meyering  <meyering@lucent.com>
157431         * lib/localcharset.c ("path-concat.h"): Include.
157432         (get_charset_aliases): Use path_concat instead of ANSI string
157433         concatenation.
157435         * lib/unicodeio.h (PARAMS): Define.
157436         Use it to guard prototype.
157438 2000-03-04  Jim Meyering  <meyering@lucent.com>
157440         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
157441         for lib/localcharset.c.
157443 2000-03-04  Jim Meyering  <meyering@lucent.com>
157445         * lib/Makefile.am (install-exec-local): Create $(libdir) before
157446         installing into it.
157447         (uninstall-local): Uncomment this rule so `make distcheck' works
157448         once again.
157450         * lib/unicodeio.c (<errno.h>): Include it.
157451         (errno): Declare if not defined.
157453         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
157455         * lib/config.charset: New version, incorporating remarks from a linux
157456         i18n mailing list.  From Bruno Haible.
157458 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
157460         * m4/codeset.m4: New file.
157461         * m4/iconv.m4: New file.
157462         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
157464 2000-03-03  Jim Meyering  <meyering@lucent.com>
157466         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
157468 2000-03-02  Jim Meyering  <meyering@lucent.com>
157470         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
157471         the messages come out on separate lines.
157473         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
157474         rather than jm_CHECK_DECLARATIONS.
157475         * m4/decl.m4: Remove now-unused file.
157477         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
157478         geteuid.
157480 2000-03-02  Jim Meyering  <meyering@lucent.com>
157482         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
157484 2000-03-01  Jim Meyering  <meyering@lucent.com>
157486         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
157487         * lib/unicodeio.c: Likewise.
157489 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
157491         * lib/config.charset: New file.
157492         * lib/localcharset.c: New file.
157493         * lib/unicodeio.h, lib/unicodeio.c: New files.
157494         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
157495         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
157496         (noinst_HEADERS): Add unicodeio.h.
157497         (all-local, install-exec-local, charset.alias): New targets.
157499 2000-02-28  Paul Eggert  <eggert@twinsun.com>
157501         * lib/quotearg.c (ALERT_CHAR): New macro.
157502         (quotearg_buffer_restyled): Use it.
157504 2000-02-27  Jim Meyering  <meyering@lucent.com>
157506         * m4/check-decl.m4: Add getenv to the list.
157508 2000-02-27  Jim Meyering  <meyering@lucent.com>
157510         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
157511         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
157513         * lib/backupfile.c: Guard inclusion of stdlib.h with
157514         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
157515         Declare malloc if needed.
157517         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
157518         `#ifndef HAVE_DECL..'
157519         now that autoconf always defines the HAVE_DECL_ symbols.
157520         * lib/human.c: Likewise.
157521         * lib/same.c: Likewise.
157522         * lib/strtoumax.c: Likewise.
157524         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
157525         declaration check was not run.
157526         * lib/hash.c: Likewise.
157527         * lib/human.c: Likewise.
157528         * lib/same.c: Likewise.
157529         * lib/strtoumax.c: Likewise.
157531         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
157532         `.', then first look up the entire `.'-containing string as a login
157533         name.
157535 2000-02-23  Jim Meyering  <meyering@lucent.com>
157537         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
157538         in place of my hack.
157540 2000-02-18  Paul Eggert  <eggert@twinsun.com>
157542         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
157543         (textint): New typedef.
157544         (parser_control): Member year changed from int to textint.
157545         All uses changed.
157546         (YYSTYPE): Removed; replaced by %union with int and textint members.
157547         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
157548         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
157549         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
157550         (tSNUMBER, tUNUMBER): Now of type <textintval>.
157551         (date, number, to_year): Use width of number in digits, not its value,
157552         to determine whether it's a 2-digit year, or a 2-digit time.
157553         (yylex): Store number of digits of numeric tokens.
157554         Reported by John Kendall.
157556         (parser_control): Changed from struct parser_control to typedef (for
157557         consistency).  All uses changed.
157559         (tID): Removed; not used.
157560         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
157562 2000-02-14  Paul Eggert  <eggert@twinsun.com>
157564         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
157565         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
157567 2000-02-12  Jim Meyering  <meyering@lucent.com>
157569         * lib/userspec.c (ISDIGIT): Define it.
157570         (isdigit): Remove definition.
157571         (is_number): Use ISDIGIT, not isdigit.
157572         <libintl.h>: Include.
157573         (_ and N_): Define.
157574         (parse_user_spec): Mark translatable strings.
157576 2000-02-10  Jim Meyering  <meyering@lucent.com>
157578         With these changes, nanosleep.[ch] are finally enough like the other
157579         lib/* replacement files to compile on a few more losing systems.
157581         * lib/nanosleep.h: Don't include config.h.
157582         Remove prototype from declaration of nanosleep.
157583         (PARAMS): Remove now-unneeded definition.
157584         * lib/nanosleep.c: #undef nanosleep.
157585         (rpl_nanosleep): Rename from nanosleep.
157587 2000-02-10  Jim Meyering  <meyering@lucent.com>
157589         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
157590         gnu_nanosleep to rpl_nanosleep.
157592 2000-02-09  Jim Meyering  <meyering@lucent.com>
157594         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
157595         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
157597 2000-02-08  Akim Demaille  <akim@epita.fr>
157599         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
157600         `[' and `]' and remove uses of `changequote'.
157601         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
157602         (AC_SYS_LARGEFILE): Likewise.
157603         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
157604         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
157605         of changequote.
157606         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
157607         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
157608         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
157609         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
157611 2000-02-05  Jim Meyering  <meyering@lucent.com>
157613         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
157614         Remove explicit use of AC_HEADER_TIME.  It is required by
157615         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
157616         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
157617         in autoconf whereby the expansion of the latter ended up preceding
157618         the expansion of its prerequisite, AC_HEADER_TIME.
157619         Reported by Volker Borchert.
157621 2000-02-03  Jim Meyering  <meyering@lucent.com>
157623         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
157625 2000-02-03  Jim Meyering  <meyering@lucent.com>
157627         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
157628         rather than with `#if HAVE_UTMPNAME'.
157630 2000-02-02  Jim Meyering  <meyering@lucent.com>
157632         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
157633         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
157634         Reported by Eli Zaretskii.
157636 2000-02-01  Jim Meyering  <meyering@lucent.com>
157638         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
157640 2000-01-31  Jim Meyering  <meyering@lucent.com>
157642         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
157643         functions.  Add the time.h and sys/time.h headers along with the
157644         AC_REQUIRE'ment of AC_HEADER_TIME.
157646 2000-01-31  Jim Meyering  <meyering@lucent.com>
157648         * lib/nanosleep.h (nanosleep): Guard declaration with
157649         `#if ! HAVE_DECL_NANOSLEEP'.
157650         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
157651         the declaration in that vendor's sys/timers.h.
157652         Reported by Christian Krackowizer.
157654         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
157655         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
157656         (ISPRINT): Likewise.
157657         Reported by Tom Tromey.
157659 2000-01-30  Jim Meyering  <meyering@lucent.com>
157661         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
157663         * m4/prereq.m4 (utmp_includes): Define.
157664         Check for ut_user and ut_name members in both struct utmpx
157665         and struct utmp.
157667 2000-01-30  Jim Meyering  <meyering@lucent.com>
157669         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
157670         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
157671         header files where only utmpx.ut_user is declared.
157673         * lib/readutmp.h (UT_USER): Define.
157675 2000-01-29  Jim Meyering  <meyering@lucent.com>
157677         * m4/lib-check.m4: New file containing library-related checks from
157678         fileutils and sh-utils (textutils had none).
157680 2000-01-28  Jim Meyering  <meyering@lucent.com>
157682         * m4/perl.m4: Change format of warning message to look more like that
157683         from the missing script.  Suggestion from François Pinard.
157685 2000-01-25  Jim Meyering  <meyering@lucent.com>
157687         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
157688         well as time.h in the compile check.
157689         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
157690         Fix typo in cross-compiling case: s/yes/no/.
157692 2000-01-23  Jim Meyering  <meyering@lucent.com>
157694         * m4/jm-macros.m4: Move df-related tests here from
157695         fileutils/configure.in
157697         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
157698         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
157700         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
157701         s/space/ac_fsusage_space/.
157702         (jm_FILE_SYSTEM_USAGE): Take two parameters.
157704         * m4/ftruncate.m4: New file (derived from part of
157705         fileutils/configure.in).
157706         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
157707         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
157709         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
157710         AC_SUBST these here, rather than just in sh-util/configure.in, so
157711         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
157712         all the same.
157713         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
157714         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
157715         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
157716         (AC_SUBST(POW_LIBM)): Likewise.
157717         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
157719 2000-01-23  Jim Meyering  <meyering@lucent.com>
157721         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
157722         obstack.c.
157724 2000-01-22  Jim Meyering  <meyering@lucent.com>
157726         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
157728         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
157730         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
157731         configure.in
157732         (AC_CHECK_HEADERS): Likewise for sh-utils.
157733         (AC_CHECK_HEADERS): Likewise for textutils.
157734         Merge the three lists of headers.
157736         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
157737         from fileutils' configure.in.
157739         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
157740         code. Moved tests into their own function (_jm_DECL_HEADERS) in
157741         check-decl.m4.
157743         * m4/check-decl.m4: Use #if rather than #ifdef.
157744         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
157745         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
157746         (_jm_DECL_HEADERS): Define new function.
157747         (jm_CHECK_DECLARATIONS): Require it.
157749 2000-01-22  Jim Meyering  <meyering@lucent.com>
157751         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
157752         [! HAVE_DECL_STRTOULL]: Declare strtoull.
157753         Required for some AIX systems.  Reported by Christian Krackowizer.
157754         [TESTING] (main): New function.
157756         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
157757         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
157758         letters.
157760         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
157761         iswprint.
157763         * lib/strverscmp.c (ISDIGIT): Define.
157764         (strverscmp): Use ISDIGIT, not isdigit.
157766 2000-01-19  Jim Meyering  <meyering@lucent.com>
157768         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
157769         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
157770         defines `struct timespec' in <sys/time.h>
157772         * m4/c-bs-a.m4: Remove uses of changequote altogether.
157773         Thanks to Akim for explaining.
157775 2000-01-17  Paul Eggert  <eggert@twinsun.com>
157777         * lib/nanosleep.c (nanosleep):
157778         Don't use SA_INTERRUPT to decide whether to call sigaction, as
157779         POSIX.1 doesn't require SA_INTERRUPT and some systems
157780         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
157781         it's been part of POSIX.1 since day 1 (in 1988).
157783 2000-01-17  Jim Meyering  <meyering@lucent.com>
157785         * lib/interlock: Remove unused file.  Reported by François Pinard.
157787 2000-01-16  Paul Eggert  <eggert@twinsun.com>
157789         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
157790         alert, backslash, formfeed, and vertical tab unnecessarily in
157791         shell quoting style.
157793 2000-01-16  Jim Meyering  <meyering@lucent.com>
157795         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
157796         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
157797         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
157798         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
157800 2000-01-16  Jim Meyering  <meyering@lucent.com>
157802         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
157803         because the latter didn't work.
157805 2000-01-15  Jim Meyering  <meyering@lucent.com>
157807         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
157808         (AC_REPLACE_FUNCS): Add memcpy and memset.
157809         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
157810         Add strpbrk.
157811         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
157813 2000-01-12  Jim Meyering  <meyering@lucent.com>
157815         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
157816         (jm_PREREQ): Use it.
157817         (jm_PREREQ_READUTMP): New macro.
157818         (jm_PREREQ): Use it.
157820 2000-01-11  Paul Eggert  <eggert@twinsun.com>
157822         Quote multibyte characters correctly.
157823         * m4/c-bs-a.m4: New file.
157824         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
157825         (jm_PREREQ): Use it.
157827 2000-01-11  Paul Eggert  <eggert@twinsun.com>
157829         * m4/uintmax_t.m4: Port to autoconf 2.13.
157831 2000-01-08  Jim Meyering  <meyering@ascend.com>
157833         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
157834         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
157836 2000-01-04  Jim Meyering  <meyering@ascend.com>
157838         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
157839         jm_STRUCT_DIRENT_D_TYPE.
157840         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
157841         jm_STRUCT_DIRENT_D_INO.
157842         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
157843         jm_STRUCT_UTIMBUF.
157844         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
157845         renamings.
157846         * m4/utime.m4: Likewise.
157848         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
157849         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
157851 2000-01-03  Paul Eggert  <eggert@twinsun.com>
157853         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
157854         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
157856 2000-01-02  Jim Meyering  <meyering@ascend.com>
157858         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
157859         remember if this is necessary.
157861 1999-12-26  Jim Meyering  <meyering@ascend.com>
157863         * m4/jm-macros.m4: Use it here.
157864         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
157866 1999-12-23  Jim Meyering  <meyering@ascend.com>
157868         * m4/jm-macros.m4: Check for clock_gettime (moved from
157869         fileutils/configure.in)
157870         Check for gettimeofday.
157872 1999-12-20  Jim Meyering  <meyering@ascend.com>
157874         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
157875         autoconf-2.14a-1999-12-20.
157877 1999-12-19  Jim Meyering  <meyering@ascend.com>
157879         * m4/lstat-slash.m4: New file.
157880         * m4/jm-macros.m4: Use the new macro:
157881         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
157883 1999-12-07  Jim Meyering  <meyering@ascend.com>
157885         * m4/perl.m4: Require that File::Compare be available, too.
157886         Too many systems seem to lack it.
157888         * m4/strftime.m4: Add checks for most of the cpp macros tested in
157889         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
157891 1999-11-18  Paul Eggert  <eggert@twinsun.com>
157893         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
157894         problem with the QNX 4.25 shell, which doesn't propagate exit
157895         status of failed commands inside shell assignments.
157897 1999-11-17  Jim Meyering  <meyering@ascend.com>
157899         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
157901 1999-11-07  Jim Meyering  <meyering@ascend.com>
157903         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
157905 1999-11-06  Jim Meyering  <meyering@ascend.com>
157907         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
157908         * m4/jm-macros.m4 (jm_MACROS): Use it here.
157910 1999-11-05  Jim Meyering  <meyering@ascend.com>
157912         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
157913         configure.in of textutils, fileutils, and sh-utils into this one
157914         (shared between those packages) file.
157915         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
157916         AC_STRUCT_ST_BLKSIZE.
157918 1999-11-03  Jim Meyering  <meyering@ascend.com>
157920         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
157921         of AC_CHECK_TYPE checks includes unistd.h.
157922         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
157923         Suggestion from Akim Demaille.
157925 1999-10-30  Jim Meyering  <meyering@ascend.com>
157927         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
157928         m4-quoted string.
157929         * m4/ls-mntd-fs.m4: Likewise.
157930         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
157931         * m4/jm-winsz1.m4: Likewise.
157933         * m4/const.m4: Remove file, since the fix made it into the experimental
157934         version of autoconf.
157935         * m4/mktime.m4: Likewise.
157937         * m4/check-type.m4: Remove file, now that the latest version of
157938         AC_CHECK_TYPE takes a third arg to specify additional #includes.
157940         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
157941         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
157942         AC_CHECK_TYPE.
157944 1999-10-04  Jim Meyering  <meyering@ascend.com>
157946         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
157948 1999-09-22  Paul Eggert  <eggert@twinsun.com>
157950         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
157951         2.95.1 bug with HP-UX 10.20.
157953 1999-09-17  Jim Meyering  <meyering@ascend.com>
157955         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
157956         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
157957         due to missing strdup (against sh-utils-2.0).
157959 1999-08-29  Jim Meyering  <meyering@ascend.com>
157961         * m4/jm-macros.m4: Require jm_BISON.
157962         * m4/bison.m4: New file.
157964 1999-08-17  Paul Eggert  <eggert@twinsun.com>
157966         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
157967         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
157969 1999-08-05  Jim Meyering  <meyering@ascend.com>
157971         * m4/getline.m4: Rename test file from conftestdata to conftest.data
157972         to avoid conflicts with `conftest' on 8+3 filesystems.
157973         Suggestion from Eli Zaretskii.
157975 1999-08-04  Jim Meyering  <meyering@ascend.com>
157977         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
157978         fileutils and sh-utils (textutils's getline test was inadequate).
157979         (AM_FUNC_GETLINE): Run this test.
157980         (AC_CHECK_FUNCS): Check for getdelim.
157981         Reported by Bob Proulx.
157983 1999-08-02  Jim Meyering  <meyering@ascend.com>
157985         * m4/jm-macros.m4: Add a comment.
157987 1999-08-01  Paul Eggert  <eggert@twinsun.com>
157989         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
157990         <inttypes.h> defines strtoumax as a macro (and not as a
157991         function).
157993 1999-08-01  Paul Eggert  <eggert@twinsun.com>
157995         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
157996         that we can shift, multiply and divide unsigned long long
157997         values; Ultrix cc can't do it.
157999 1999-08-01  Paul Eggert  <eggert@twinsun.com>
158001         * m4/mktime.m4: New file, which is a preview of what should appear
158002         in the next public autoconf release.
158004 1999-08-01  Paul Eggert  <eggert@twinsun.com>
158006         * m4/lfs.m4: Remove this file.
158007         * m4/largefile.m4: New file.  It contains the old contents of
158008         lfs.m4, except that all names with prefix AC_LFS have been
158009         changed to use the prefix AC_SYS_LARGEFILE instead, to be
158010         compatible with future autoconf versions.  Also, some minor m4
158011         quoting problems have been fixed.
158013 1999-08-01  Paul Eggert  <eggert@twinsun.com>
158015         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
158016         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
158017         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
158018         and simplify the shell code.
158020 1999-08-01  Jim Meyering  <meyering@ascend.com>
158022         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
158023         m4.
158025 1999-07-20  Jim Meyering  <meyering@ascend.com>
158027         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
158029 1999-07-15  Jim Meyering  <meyering@ascend.com>
158031         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
158033 1999-05-22  Jim Meyering  <meyering@ascend.com>
158035         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
158037 1999-05-20  Jim Meyering  <meyering@ascend.com>
158039         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
158040         Add a colon after each `then' in case $4 is empty.
158042 1999-05-16  Jim Meyering  <meyering@ascend.com>
158044         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
158046 1999-05-10  Jim Meyering  <meyering@ascend.com>
158048         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
158050         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
158051         AC_FUNC_MKTIME.
158053 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
158055         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
158057 1999-05-04  Paul Eggert  <eggert@twinsun.com>
158059         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
158060         not CPPFLAGS, so that linking works correctly in IRIX.
158062 1999-04-30  Paul Eggert  <eggert@twinsun.com>
158064         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
158066 1999-04-20  Paul Eggert  <eggert@twinsun.com>
158068         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
158069         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
158070         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
158071         jm_AC_TYPE_UNSIGNED_LONG_LONG.
158072         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
158074         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
158076 1999-04-20  Jim Meyering  <meyering@ascend.com>
158078         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
158079         AC_REPLACE xstroull if necessary.  From Paul Eggert.
158080         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
158082 1999-04-18  Jim Meyering  <meyering@ascend.com>
158084         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
158085         * m4/jm-macros.m4: Use it.
158087 1999-04-06  Jim Meyering  <meyering@ascend.com>
158089         * m4/strftime.m4: Remove test for %f.
158091 1999-03-29  Jim Meyering  <meyering@ascend.com>
158093         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
158094         superset of the AC_TYPE_* checks in the textutils, fileutils,
158095         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
158096         AC_TYPE_PID_T.
158098 1999-03-28  Jim Meyering  <meyering@ascend.com>
158100         * m4/jm-macros.m4: Define GNU_PACKAGE here.
158101         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
158102         replaced e.g., in the *.sh files of the sh-utils.
158104 1999-03-20  Jim Meyering  <meyering@ascend.com>
158106         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
158107         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
158108         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
158110 1999-03-19  Jim Meyering  <meyering@ascend.com>
158112         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
158114 1999-03-12  Jim Meyering  <meyering@ascend.com>
158116         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
158118 1999-03-07  Jim Meyering  <meyering@ascend.com>
158120         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
158121         declared.
158123 1999-02-17  Jim Meyering  <meyering@ascend.com>
158125         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
158126         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
158128 1999-02-07  Jim Meyering  <meyering@ascend.com>
158130         * m4/group-member.m4: New file -- extracted from sh-utils'
158131         configure.in.
158133         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
158134         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
158136 1999-02-06  Jim Meyering  <meyering@ascend.com>
158138         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
158139         * m4/fnmatch.m4: Likewise.
158140         * m4/getgroups.m4: Likewise.
158141         * m4/lstat.m4: Likewise.
158142         * m4/malloc.m4: Likewise.
158143         * m4/putenv.m4: Likewise.
158144         * m4/realloc.m4: Likewise.
158145         * m4/regex.m4: Likewise.
158146         * m4/stat.m4: Likewise.
158147         * m4/strftime.m4: Likewise.
158148         Suggestion from Alain Magloire.
158150         * m4/chown.m4: Use `.$ac_objext', not `.o'.
158151         * m4/fnmatch.m4: Likewise.
158152         * m4/getgroups.m4: Likewise.
158153         * m4/getline.m4: Likewise.
158154         * m4/lstat.m4: Likewise.
158155         * m4/malloc.m4: Likewise.
158156         * m4/memcmp.m4: Likewise.
158157         * m4/putenv.m4: Likewise.
158158         * m4/realloc.m4: Likewise.
158159         * m4/regex.m4: Likewise.
158160         * m4/stat.m4: Likewise.
158161         * m4/strftime.m4: Likewise.
158162         Suggestion from Alain Magloire.
158164         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
158165         an argument.
158167         * m4/regex.m4: Add a run-time Test for proper operation of
158168         re_compile_pattern.
158170 1999-01-31  Jim Meyering  <meyering@ascend.com>
158172         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
158174 1999-01-30  Jim Meyering  <meyering@ascend.com>
158176         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
158178         * m4/jm-mktime.m4: Make this a wrapper around the official
158179         AM_FUNC_MKTIME rather than my private copy, now that the official one
158180         is up to date.
158181         * m4/mktime.m4: Remove file.
158183         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
158184         * m4/uptime.m4: Likewise.
158185         * m4/uintmax_t.m4: Likewise.
158187 1999-01-28  Jim Meyering  <meyering@ascend.com>
158189         * m4/jm-macros.m4: Use jm_AFS.
158190         * m4/afs.m4: New file (from fileutils' configure.in).
158192         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
158193         * m4/chown.m4: Likewise.
158194         * m4/d-ino.m4: Likewise.
158195         * m4/d-type.m4: Likewise.
158196         * m4/fnmatch.m4: Likewise.
158197         * m4/getgroups.m4: Likewise.
158198         * m4/gettext.m4: Likewise.
158199         * m4/jm-mktime.m4: Likewise.
158200         * m4/jm-winsz2.m4: Likewise.
158201         * m4/lcmessage.m4: Likewise.
158202         * m4/ls-mntd-fs.m4: Likewise.
158203         * m4/malloc.m4: Likewise.
158204         * m4/memcmp.m4: Likewise.
158205         * m4/putenv.m4: Likewise.
158206         * m4/realloc.m4: Likewise.
158207         * m4/st_mtim.m4: Likewise.
158208         * m4/strftime.m4: Likewise.
158210 1999-01-16  Jim Meyering  <meyering@ascend.com>
158212         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
158213         (ARGMATCH_DIE_DECL): Define.
158215 1999-01-12  Jim Meyering  <meyering@ascend.com>
158217         * m4/Makefile.am.in: Rewrite to avoid using fmt.
158218         Reported by Lars Hecking.
158220 1999-01-10  Jim Meyering  <meyering@ascend.com>
158222         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
158223         gross kludge.
158224         * m4/inttypes_h.m4: Likewise.
158225         * m4/lstat.m4: Likewise.
158226         * m4/malloc.m4: Likewise.
158227         * m4/readdir.m4: Likewise.
158228         * m4/realloc.m4: Likewise.
158229         * m4/st_dm_mode.m4: Likewise.
158230         * m4/stat.m4: Likewise.
158231         * m4/utimbuf.m4: Likewise.
158232         * m4/utimes.m4: Likewise.
158234         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
158235         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
158236         comments in config.h.in are meaningful.
158238         * m4/jm-macros.m4: Require autoconf-2.13 here.
158240         * m4/regex.m4: By default, don't use the included regex.c on systems
158241         with glibc 2.  Suggestion from Uli Drepper.
158243 1999-01-02  Jim Meyering  <meyering@ascend.com>
158245         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
158247 1998-12-18  Jim Meyering  <meyering@ascend.com>
158249         * m4/Makefile.am.in (Makefile.am): Simplify rule.
158250         Based on a suggestion from Lars Hecking.
158252 1998-11-16  Paul Eggert  <eggert@twinsun.com>
158254         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
158256 1998-11-16  Jim Meyering  <meyering@ascend.com>
158258         * m4/lfs.m4: Double-quote the `uname...` expression.
158260 1998-11-14  Jim Meyering  <meyering@ascend.com>
158262         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
158263         * m4/stat.m4: Likewise.
158265 1998-11-03  Jim Meyering  <meyering@ascend.com>
158267         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
158268         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
158270 1998-10-18  Jim Meyering  <meyering@ascend.com>
158272         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
158274 1998-10-17  Jim Meyering  <meyering@ascend.com>
158276         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
158277         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
158278         calls for those previously hard-coded headers.  Instead, take a new
158279         parameter.
158280         (jm_CHECK_DECLARATIONS): Reflect interface change.
158281         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
158282         (jm_CHECK_DECL_LOCALTIME_R): New macro.
158284         * m4/mktime.m4: Test for spring-forward gap before long-running test.
158286 1998-10-14  Jim Meyering  <meyering@ascend.com>
158288         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
158289         instead of "TZ=America/Vancouver".  From Paul Eggert.
158291 1998-10-11  Jim Meyering  <meyering@ascend.com>
158293         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
158294         This adds a test for a recently added compatibility fix for mktime.c.
158295         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
158297 1998-09-27  Jim Meyering  <meyering@ascend.com>
158299         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
158301         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
158302         ../configure.in, including a change from Gordon Matzigkeit to allow
158303         cross-compiling for the Hurd.
158305         * m4/glibc.m4: New file/macro to test for the GNU C Library
158306         versions 1 and 2.  From Gordon Matzigkeit.
158307         Indent.
158309 1998-09-21  Jim Meyering  <meyering@ascend.com>
158311         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
158313 1998-08-18  Paul Eggert  <eggert@twinsun.com>
158315         Port nanosecond-resolution times to UnixWare 2.1.2 and
158316         pedantic Solaris 2.6.
158318         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
158319         AC_STRUCT_ST_MTIM.
158320         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
158321         Generate name of ns member, instead of just 1 or undef.
158322         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
158324 1998-08-15  Jim Meyering  <meyering@ascend.com>
158326         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
158327         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
158328         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
158329         instead of jm_TYPE_SSIZE_T.
158331 1998-08-12  Jim Meyering  <meyering@ascend.com>
158333         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
158335 1998-08-02  Jim Meyering  <meyering@ascend.com>
158337         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
158338         in acconfig.h manually.
158340 1998-07-31  Paul Eggert  <eggert@twinsun.com>
158342         * m4/st_mtim.m4: New file.
158344 1998-07-28  Jim Meyering  <meyering@ascend.com>
158346         * m4/utimes.m4: Undef stat.
158348 1998-07-25  Jim Meyering  <meyering@ascend.com>
158350         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
158351         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
158353 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
158355         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
158356         uid and gid actually remain unchanged.
158358 1998-07-07  Jim Meyering  <meyering@ascend.com>
158360         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
158362 1998-07-04  Jim Meyering  <meyering@ascend.com>
158364         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
158365         to prove that this macro can be used in packages without regex.c.
158367 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
158369         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
158370         is to be used.
158372 1998-07-03  Jim Meyering  <meyering@ascend.com>
158374         * m4/gettext.m4: Add -lintl if it's found to be necessary.
158376         * m4/gettext.m4: New file -- from gettext-0.10.35.
158377         * m4/lcmessage.m4: Likewise.
158378         * m4/progtest.m4: Likewise.
158380         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
158381         * m4/jm-macros.m4: Require the new macro.
158383 1998-06-29  Jim Meyering  <meyering@ascend.com>
158385         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
158386         for the definition of NGROUPS (used in a system header included
158387         by sys/mount.h).
158389 1998-06-28  Jim Meyering  <meyering@ascend.com>
158391         * m4/ls-mntd-fs.m4: New file.
158392         * m4/fstypename.m4: New file.
158394         * m4/jm-macros.m4: Require the new macro.
158395         * m4/jm-glibc-io.m4: New file.
158397 1998-05-19  Jim Meyering  <meyering@ascend.com>
158399         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
158400         * m4/lchown.m4: New file.
158402         * m4/Makefile.am.in: New file.
158403         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
158405 1998-05-14  Jim Meyering  <meyering@ascend.com>
158407         * m4/Makefile.am (EXTRA_DIST): Add them.
158408         * m4/jm-macros.m4: New file.
158409         * m4/utimbuf.m4: New file.
158411 1998-05-12  Jim Meyering  <meyering@ascend.com>
158413         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
158415 1998-05-11  Jim Meyering  <meyering@ascend.com>
158417         * m4/isc-posix.m4: New file.
158419 1998-05-10  Jim Meyering  <meyering@ascend.com>
158421         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
158423 1998-05-09  Jim Meyering  <meyering@ascend.com>
158425         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
158426         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
158427         with automake.
158429         * m4/ssize_t.m4: New file.
158430         * m4/mktime.m4: Remove file -- the new automake has this now.
158432 1998-04-26  Jim Meyering  <meyering@ascend.com>
158434         * m4/assert.m4: New file.
158435         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
158437 1998-04-05  Jim Meyering  <meyering@ascend.com>
158439         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
158440         (jm_PREREQ): Use it here.
158442 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
158444         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
158445         in acconfig.h.
158447 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
158449         * m4/prereq.m4: New file.
158450         * m4/error.m4: New file.
158451         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
158453 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
158455         * m4/getline.m4: Don't set am_cv_func_working_getline before the
158456         cache-check for the same variable -- that defeated the purpose of
158457         the test; the test program was never run.  This was a problem only
158458         on systems with losing getline functions -- HP-UX 10.20 is one.
158459         Reported by Bjorn Helgaas.
158461 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
158463         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
158465 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
158467         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
158469         * m4/const.m4: New file.  Use an initializer in this declaration
158470         typedef int charset[2]; const charset x;
158471         Reported by Bob Glickstein.
158473 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
158475         * m4/chown.m4: Fix reversed types on -1 args to chown.
158476         From Kaveh Ghazi.
158478 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
158480         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
158481         Add lseek and memchr.
158483         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
158484         T.E.Dickey <dickey@clark.net> said that some older preprocessors
158485         have a 20-character limit on names.
158487 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
158489         * m4/inttypes_h.m4: New file.
158490         * m4/uintmax_t.m4: New file.
158491         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
158494         -----
158496         Local Variables:
158497         coding: utf-8
158498         End:
158500         Copyright (C) 1997-2023 Free Software Foundation, Inc.
158502         Copying and distribution of this file, with or without
158503         modification, are permitted provided the copyright notice
158504         and this notice are preserved.